| `||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var He=to;function ro(e,t,r={}){let n=Xe(e,r.backwards?t-1:t,r),s=He(e,n,r);return n!==s}var Z=ro;function no(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var _t=no;function so(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?eu(e,t):t}var vt=so;function uo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Zs(e,n),n=_t(e,n),n=Xe(e,n);return n=vt(e,n),n=He(e,n),n!==!1&&Z(e,n)}var jt=uo;function io(e){return Array.isArray(e)&&e.length>0}var O=io;var tu=new Proxy(()=>{},{get:()=>tu}),Mt=tu;var gr="'",ru='"';function ao(e,t){let r=t===!0||t===gr?gr:ru,n=r===gr?ru:gr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Sr=ao;function oo(e,t,r){let n=t==='"'?"'":'"',u=Y(!1,e,/\\(.)|(["'])/gsu,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+u+t}var nu=oo;function po(e,t){Mt.ok(/^(?<quote>["']).*\k<quote>$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Sr(r,t.singleQuote);return e.charAt(0)===n?e:nu(r,n,!1)}var nt=po;function q(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(q(r),t):t}function k(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function Pt(e,t){let r=q(e);return Number.isInteger(r)&&r===q(t)}function co(e,t){let r=k(e);return Number.isInteger(r)&&r===k(t)}function su(e,t){return Pt(e,t)&&co(e,t)}var rr=null;function nr(e){if(rr!==null&&typeof rr.property){let t=rr;return rr=nr.prototype=null,t}return rr=nr.prototype=e??Object.create(null),new nr}var lo=10;for(let e=0;e<=lo;e++)nr();function wn(e){return nr(e)}function mo(e,t="type"){wn(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=mo;var uu={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]};var yo=Br(uu),br=yo;function Do(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var R=Do;var fo=R(["Block","CommentBlock","MultiLine"]),ee=fo;var Eo=R(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Pr=Eo;function Fo(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let s=r[n];if(n===0)return e.type==="Identifier"&&e.name===s;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==s)return!1;e=e.object}}function Co(e,t){return t.some(r=>Fo(e,r))}var iu=Co;function Ao({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var kr=Ao;function ur(e,t){return t(e)||Vs(e,{getVisitorKeys:br,predicate:t})}function Jt(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||L(e)||W(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ae(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function pu(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Lr(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var At=R(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),cu=R(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),U=R(["ArrayExpression","TupleExpression"]),se=R(["ObjectExpression","RecordExpression"]);function lu(e){return e.type==="LogicalExpression"&&e.operator==="??"}function Fe(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Mn(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&Fe(e.argument)}function te(e){return!!(e&&(e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"))}function Rn(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var wr=R(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),To=R(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]),Re=R(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Rt=R(["FunctionExpression","ArrowFunctionExpression"]);function xo(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function On(e){return L(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var X=R(["JSXElement","JSXFragment"]);function kt(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function Or(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function mu(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!Pt(e,e.typeAnnotation)}var De=R(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Tt(e){return W(e)||e.type==="BindExpression"&&!!e.object}var ho=R(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function qt(e){return kr(e)||Pr(e)||ho(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters&&!e.typeArguments}function go(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}var So=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function Bo(e){return iu(e,So)}function It(e,t){if((e==null?void 0:e.type)!=="CallExpression"||e.optional)return!1;let r=pe(e);if(r.length===1){if(On(e)&&It(t))return Rt(r[0]);if(go(e.callee))return On(r[0])}else if((r.length===2||r.length===3)&&(r[0].type==="TemplateLiteral"||te(r[0]))&&Bo(e.callee))return r[2]&&!Fe(r[2])?!1:(r.length===2?Rt(r[1]):xo(r[1])&&z(r[1]).length<=1)||On(r[1]);return!1}var yu=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),L=yu(R(["CallExpression","OptionalCallExpression"])),W=yu(R(["MemberExpression","OptionalMemberExpression"]));function Jn(e,t=5){return Du(e,t)<=t}function Du(e,t){let r=0;for(let n in e){let s=e[n];if(s&&typeof s=="object"&&typeof s.type=="string"&&(r++,r+=Du(s,t-r)),r>t)return r}return r}var bo=.25;function ir(e,t){let{printWidth:r}=t;if(T(e))return!1;let n=r*bo;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Mn(e)&&!T(e.argument))return!0;let s=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return s?s.length<=n:te(e)?nt(fe(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` |
| `)),i=t.singleAttributePerLine&&n.attributes.length>1?F:x;return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),f(e.map(()=>[i,r()],"attributes")),...gc(n,t,s)],{shouldBreak:u})}function gc(e,t,r){return e.selfClosing?[x,"/>"]:Sc(e,t,r)?[">"]:[E,">"]}function Sc(e,t,r){let n=e.attributes.length>0&&T(M(!1,e.attributes,-1),h.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Bc(e,t,r){let{node:n}=e,s=[];s.push("</");let u=r("name");return T(n.name,h.Leading|h.Line)?s.push(f([F,u]),F):T(n.name,h.Leading|h.Block)?s.push(" ",u):s.push(u),s.push(">"),s}function bc(e,t){let{node:r}=e,n=T(r),s=T(r,h.Line),u=r.type==="JSXOpeningFragment";return[u?"<":"</",f([s?F:n&&!u?" ":"",J(e,t)]),s?F:"",">"]}function Pc(e,t,r){let n=ye(e,Fc(e,t,r),t);return Tc(e,n,t)}function kc(e,t){let{node:r}=e,n=T(r,h.Line);return[J(e,t,{indent:n}),n?F:""]}function Ic(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!T(s)||!Zn(e)?u:[f([E,ye(e,u,t)]),E]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ti(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return dc(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return b(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return b(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Ic(e,t,r);case"JSXExpressionContainer":return xc(e,t,r);case"JSXFragment":case"JSXElement":return Pc(e,t,r);case"JSXOpeningElement":return hc(e,t,r);case"JSXClosingElement":return Bc(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return bc(e,t);case"JSXEmptyExpression":return kc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Ne(n,"JSX")}}function Lc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Dr(t)}function Dr(e){return e.type==="JSXText"&&(Hr.hasNonWhitespaceCharacter(fe(e))||!/\n/u.test(fe(e)))}function wc(e){return e.type==="JSXExpressionContainer"&&te(e.expression)&&e.expression.value===" "&&!T(e.expression)}function di(e){let{node:t,parent:r}=e;if(!X(t)||!X(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!Dr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&Lt(u.expression)}function Oc(e){return Lt(e.node)||di(e)}var Vr=Oc;var _c=0;function $r(e,t,r){var v;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((v=e.root.extra)==null?void 0:v.__isUsingHackPipeline),p=Es(e,r,t,!1,a);if(a)return p;if(o)return l(p);if(L(s)&&s.callee===n||s.type==="UnaryExpression"||W(s)&&!s.computed)return l([f([E,...p]),E]);let y=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!L(u)||s.type==="TemplateLiteral",D=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ce(s),m=De(n.left)&&ar(n.operator,n.left.operator);if(y||Ht(n)&&!m||!Ht(n)&&D)return l(p);if(p.length===0)return"";let C=X(n.right),c=p.findIndex(j=>typeof j!="string"&&!Array.isArray(j)&&j.type===me),A=p.slice(0,c===-1?1:c+1),d=p.slice(A.length,C?-1:void 0),S=Symbol("logicalChain-"+ ++_c),g=l([...A,f(d)],{id:S});if(!C)return g;let _=M(!1,p,-1);return l([g,xt(_,{groupId:S})])}function Es(e,t,r,n,s){var S;let{node:u}=e;if(!De(u))return[l(t())];let i=[];ar(u.operator,u.left.operator)?i=e.call(g=>Es(g,t,r,!0,s),"left"):i.push(l(t("left")));let a=Ht(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||vc(e,r))&&!Le(r.originalText,u.right),y=!T(u.right,h.Leading,Wr)&&Le(r.originalText,u.right),D=u.type==="NGPipeExpression"?"|":u.operator,m=u.type==="NGPipeExpression"&&u.arguments.length>0?l(f([E,": ",b([x,": "],e.map(()=>Be(2,l(t())),"arguments"))])):"",C;if(a)C=[D," ",t("right"),m];else{let _=D==="|>"&&((S=e.root.extra)==null?void 0:S.__isUsingHackPipeline)?e.call(v=>Es(v,t,r,!0,s),"right"):t("right");if(r.experimentalOperatorPosition==="start"){let v="";if(y)switch(Se(_)){case he:v=_.splice(0,1)[0];break;case ge:v=_.contents.splice(0,1)[0];break}C=[x,v,D," ",_,m]}else C=[o?x:"",D,o?" ":x,_,m]}let{parent:c}=e,A=T(u.left,h.Trailing|h.Line);if((A||!(s&&u.type==="LogicalExpression")&&c.type!==u.type&&u.left.type!==u.type&&u.right.type!==u.type)&&(C=l(C,{shouldBreak:A})),r.experimentalOperatorPosition==="start"?i.push(a||y?" ":"",C):i.push(o?"":" ",C),n&&T(u)){let g=Ut(ye(e,i,r));return g.type===Oe?g.parts:Array.isArray(g)?g:[g]}return i}function Ht(e){return e.type!=="LogicalExpression"?!1:!!(se(e.right)&&e.right.properties.length>0||U(e.right)&&e.right.elements.length>0||X(e.right))}var xi=e=>e.type==="BinaryExpression"&&e.operator==="|";function vc(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&xi(e.node)&&!e.hasAncestor(r=>!xi(r)&&r.type!=="JsExpressionRoot")}function gi(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),T(n.node)?" //"+lt(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return $r(e,t,r);case"NGChainedExpression":return l(b([";",x],e.map(()=>Mc(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":hi(e)?" ":[";",x],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:u}=e,i=hi(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(s===2||s===3)&&(n.key.name==="else"&&u.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&u.body[s-1].key.name==="then"||n.key.name==="track"))&&u.body[0].type==="NGMicrosyntaxExpression";return[r("key"),i?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new Ne(n,"Angular")}}function hi({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var jc=R(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Mc({node:e}){return ur(e,jc)}function Fs(e,t,r){let{node:n}=e;return l([b(x,e.map(r,"decorators")),bi(n,t)?F:x])}function Si(e,t,r){return Pi(e.node)?[b(F,e.map(r,"declaration","decorators")),F]:""}function Bi(e,t,r){let{node:n,parent:s}=e,{decorators:u}=n;if(!O(u)||Pi(s)||Vr(e))return"";let i=n.type==="ClassExpression"||n.type==="ClassDeclaration"||bi(n,t);return[e.key==="declaration"&&cu(s)?F:i?Ee:"",b(x,e.map(r,"decorators")),x]}function bi(e,t){return e.decorators.some(r=>Z(t.originalText,k(r)))}function Pi(e){var r;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=(r=e.declaration)==null?void 0:r.decorators;return O(t)&&Pt(e,t[0])}var Dt=class extends Error{name="ArgExpansionBailout"};function Rc(e,t,r){let{node:n}=e,s=pe(n);if(s.length===0)return["(",J(e,t),")"];let u=s.length-1;if(Wc(s)){let D=["("];return Wt(e,(m,C)=>{D.push(r()),C!==u&&D.push(", ")}),D.push(")"),D}let i=!1,a=[];Wt(e,({node:D},m)=>{let C=r();m===u||(ce(D,t)?(i=!0,C=[C,",",F,F]):C=[C,",",x]),a.push(C)});let o=!t.parser.startsWith("__ng_")&&n.type!=="ImportExpression"&&oe(t,"all")?",":"";function p(){return l(["(",f([x,...a]),o,x,")"],{shouldBreak:!0})}if(i||e.parent.type!=="Decorator"&&fu(s))return p();if(qc(s)){let D=a.slice(1);if(D.some(re))return p();let m;try{m=r(qn(n,0),{expandFirstArg:!0})}catch(C){if(C instanceof Dt)return p();throw C}return re(m)?[Ee,et([["(",l(m,{shouldBreak:!0}),", ",...D,")"],p()])]:et([["(",m,", ",...D,")"],["(",l(m,{shouldBreak:!0}),", ",...D,")"],p()])}if(Jc(s,a,t)){let D=a.slice(0,-1);if(D.some(re))return p();let m;try{m=r(qn(n,-1),{expandLastArg:!0})}catch(C){if(C instanceof Dt)return p();throw C}return re(m)?[Ee,et([["(",...D,l(m,{shouldBreak:!0}),")"],p()])]:et([["(",...D,m,")"],["(",...D,l(m,{shouldBreak:!0}),")"],p()])}let y=["(",f([E,...a]),B(o),E,")"];return jr(e)?y:l(y,{shouldBreak:a.some(re)||i})}function fr(e,t=!1){return se(e)&&(e.properties.length>0||T(e))||U(e)&&(e.elements.length>0||T(e))||e.type==="TSTypeAssertion"&&fr(e.expression)||Ae(e)&&fr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||Nc(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&fr(e.body,!0)||se(e.body)||U(e.body)||!t&&(L(e.body)||e.body.type==="ConditionalExpression")||X(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function Jc(e,t,r){var u,i;let n=M(!1,e,-1);if(e.length===1){let a=M(!1,t,-1);if((u=a.label)!=null&&u.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let s=M(!1,e,-2);return!T(n,h.Leading)&&!T(n,h.Trailing)&&fr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!U(n))&&!(e.length>1&&Cs(n,r))}function qc(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Gc(r)?!0:!T(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Ii(r)&&!fr(r)}function Ii(e){if(e.type==="ParenthesizedExpression")return Ii(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.typeArguments??t.typeParameters;(r==null?void 0:r.params.length)===1&&(t=r.params[0])}return qt(t)&&Ie(e.expression,1)}return mt(e)&&pe(e).length>1?!1:De(e)?Ie(e.left,1)&&Ie(e.right,1):Rn(e)||Ie(e)}function Wc(e){return e.length===2?ki(e,0):e.length===3?e[0].type==="Identifier"&&ki(e,1):!1}function ki(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&z(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(s=>T(s))}function Nc(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||T(e,h.Dangling))}function Gc(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ce(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&te(e.properties[0].value)&&e.properties[0].value.value==="module"}var Er=Rc;var Uc=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),L(e)&&pe(e).length>0);function Li(e,t,r){var p;let n=r("object"),s=As(e,t,r),{node:u}=e,i=e.findAncestor(y=>!(W(y)||y.type==="TSNonNullExpression")),a=e.findAncestor(y=>!(y.type==="ChainExpression"||y.type==="TSNonNullExpression")),o=i&&(i.type==="NewExpression"||i.type==="BindExpression"||i.type==="AssignmentExpression"&&i.left.type!=="Identifier")||u.computed||u.object.type==="Identifier"&&u.property.type==="Identifier"&&!W(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(Uc(u.object)||((p=n.label)==null?void 0:p.memberChain));return ut(n.label,[n,o?s:l(f([E,s]))])}function As(e,t,r){let n=r("property"),{node:s}=e,u=$(e);return s.computed?!s.property||Fe(s.property)?[u,"[",n,"]"]:l([u,"[",f([E,n]),E,"]"]):[u,".",n]}function wi(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>wi(e,t,r),"expression");let{parent:n}=e,s=!n||n.type==="ExpressionStatement",u=[];function i(w){let{originalText:ne}=t,xe=it(ne,k(w));return ne.charAt(xe)===")"?xe!==!1&&jt(ne,xe+1):ce(w,t)}function a(){let{node:w}=e;if(w.type==="ChainExpression")return e.call(a,"expression");if(L(w)&&(Tt(w.callee)||L(w.callee))){let ne=i(w);u.unshift({node:w,hasTrailingEmptyLine:ne,printed:[ye(e,[$(e),tt(e,t,r),Er(e,t,r)],t),ne?F:""]}),e.call(a,"callee")}else Tt(w)?(u.unshift({node:w,needsParens:ke(e,t),printed:ye(e,W(w)?As(e,t,r):Kr(e,t,r),t)}),e.call(a,"object")):w.type==="TSNonNullExpression"?(u.unshift({node:w,printed:ye(e,"!",t)}),e.call(a,"expression")):u.unshift({node:w,printed:r()})}let{node:o}=e;u.unshift({node:o,printed:[$(e),tt(e,t,r),Er(e,t,r)]}),o.callee&&e.call(a,"callee");let p=[],y=[u[0]],D=1;for(;D<u.length&&(u[D].node.type==="TSNonNullExpression"||L(u[D].node)||W(u[D].node)&&u[D].node.computed&&Fe(u[D].node.property));++D)y.push(u[D]);if(!L(u[0].node))for(;D+1<u.length&&(Tt(u[D].node)&&Tt(u[D+1].node));++D)y.push(u[D]);p.push(y),y=[];let m=!1;for(;D<u.length;++D){if(m&&Tt(u[D].node)){if(u[D].node.computed&&Fe(u[D].node.property)){y.push(u[D]);continue}p.push(y),y=[],m=!1}(L(u[D].node)||u[D].node.type==="ImportExpression")&&(m=!0),y.push(u[D]),T(u[D].node,h.Trailing)&&(p.push(y),y=[],m=!1)}y.length>0&&p.push(y);function C(w){return/^[A-Z]|^[$_]+$/u.test(w)}function c(w){return w.length<=t.tabWidth}function A(w){var pt;let ne=(pt=w[1][0])==null?void 0:pt.node.computed;if(w[0].length===1){let bt=w[0][0].node;return bt.type==="ThisExpression"||bt.type==="Identifier"&&(C(bt.name)||s&&c(bt.name)||ne)}let xe=M(!1,w[0],-1).node;return W(xe)&&xe.property.type==="Identifier"&&(C(xe.property.name)||ne)}let d=p.length>=2&&!T(p[1][0].node)&&A(p);function S(w){let ne=w.map(xe=>xe.printed);return w.length>0&&M(!1,w,-1).needsParens?["(",...ne,")"]:ne}function g(w){return w.length===0?"":f([F,b(F,w.map(S))])}let _=p.map(S),v=_,j=d?3:2,I=p.flat(),G=I.slice(1,-1).some(w=>T(w.node,h.Leading))||I.slice(0,-1).some(w=>T(w.node,h.Trailing))||p[j]&&T(p[j][0].node,h.Leading);if(p.length<=j&&!G&&!p.some(w=>M(!1,w,-1).hasTrailingEmptyLine))return jr(e)?v:l(v);let P=M(!1,p[d?1:0],-1).node,N=!L(P)&&i(P),ue=[S(p[0]),d?p.slice(1,2).map(S):"",N?F:"",g(p.slice(d?2:1))],Q=u.map(({node:w})=>w).filter(L);function Bt(){let w=M(!1,M(!1,p,-1),-1).node,ne=M(!1,_,-1);return L(w)&&re(ne)&&Q.slice(0,-1).some(xe=>xe.arguments.some(Rt))}let Ct;return G||Q.length>2&&Q.some(w=>!w.arguments.every(ne=>Ie(ne)))||_.slice(0,-1).some(re)||Bt()?Ct=l(ue):Ct=[re(v)||N?Ee:"",et([v,ue])],ut({memberChain:!0},Ct)}var Oi=wi;function Qr(e,t,r){var y;let{node:n}=e,s=n.type==="NewExpression",u=n.type==="ImportExpression",i=$(e),a=pe(n),o=a.length===1&&_r(a[0],t.originalText);if(o||Yc(e)||It(n,e.parent)){let D=[];if(Wt(e,()=>{D.push(r())}),!(o&&((y=D[0].label)!=null&&y.embed)))return[s?"new ":"",_i(e,r),i,tt(e,t,r),"(",b(", ",D),")"]}if(!u&&!s&&Tt(n.callee)&&!e.call(D=>ke(D,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return Oi(e,t,r);let p=[s?"new ":"",_i(e,r),i,tt(e,t,r),Er(e,t,r)];return u||L(n.callee)?l(p):p}function _i(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:t("callee")}function Yc(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=pe(t);return t.callee.name==="require"?r.length===1&&te(r[0])||r.length>1:t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&te(r[0])&&r[1].type==="ArrayExpression":!1}function ht(e,t,r,n,s,u){let i=Xc(e,t,r,n,u),a=u?r(u,{assignmentLayout:i}):"";switch(i){case"break-after-operator":return l([l(n),s,l(f([x,a]))]);case"never-break-after-operator":return l([l(n),s," ",a]);case"fluid":{let o=Symbol("assignment");return l([l(n),s,l(f(x),{id:o}),je,xt(a,{groupId:o})])}case"break-lhs":return l([n,s," ",l(a)]);case"chain":return[l(n),s,x,a];case"chain-tail":return[l(n),s,f([x,a])];case"chain-tail-arrow-chain":return[l(n),s,a];case"only-left":return n}}function ji(e,t,r){let{node:n}=e;return ht(e,t,r,r("left"),[" ",n.operator],"right")}function Mi(e,t,r){return ht(e,t,r,r("id")," =","init")}function Xc(e,t,r,n,s){let{node:u}=e,i=u[s];if(!i)return"only-left";let a=!zr(i);if(e.match(zr,Ri,m=>!a||m.type!=="ExpressionStatement"&&m.type!=="VariableDeclaration"))return a?i.type==="ArrowFunctionExpression"&&i.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&zr(i.right)||Le(t.originalText,i))return"break-after-operator";if(u.type==="ImportAttribute"||i.type==="CallExpression"&&i.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let y=bu(n);if(Vc(u)||zc(u)||Ts(u)&&y)return"break-lhs";let D=el(u,n,t);return e.call(()=>Hc(e,t,r,D),s)?"break-after-operator":$c(u)?"break-lhs":!y&&(D||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="BooleanLiteral"||Fe(i)||i.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Hc(e,t,r,n){let s=e.node;if(De(s)&&!Ht(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!nl(s))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=s;return De(p)&&!Ht(p)}let{consequent:a,alternate:o}=s;return a.type==="ConditionalExpression"||o.type==="ConditionalExpression"}case"ClassExpression":return O(s.decorators)}if(n)return!1;let u=s,i=[];for(;;)if(u.type==="UnaryExpression"||u.type==="AwaitExpression"||u.type==="YieldExpression"&&u.argument!==null)u=u.argument,i.push("argument");else if(u.type==="TSNonNullExpression")u=u.expression,i.push("expression");else break;return!!(te(u)||e.call(()=>Ji(e,t,r),...i))}function Vc(e){if(Ri(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ce(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function zr(e){return e.type==="AssignmentExpression"}function Ri(e){return zr(e)||e.type==="VariableDeclarator"}function $c(e){let t=Qc(e);if(O(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Kc=R(["TSTypeAliasDeclaration","TypeAlias"]);function Qc(e){var t;if(Kc(e))return(t=e.typeParameters)==null?void 0:t.params}function zc(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=vi(t.typeAnnotation);return O(r)&&r.length>1&&r.some(n=>O(vi(n))||n.type==="TSConditionalType")}function Ts(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var Zc=R(["TSTypeReference","GenericTypeAnnotation"]);function vi(e){var t;if(Zc(e))return(t=e.typeArguments??e.typeParameters)==null?void 0:t.params}function Ji(e,t,r,n=!1){var i;let{node:s}=e,u=()=>Ji(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(u,"expression");if(L(s)){if((i=Qr(e,t,r).label)!=null&&i.memberChain)return!1;let o=pe(s);return!(o.length===0||o.length===1&&ir(o[0],t))||tl(s,r)?!1:e.call(u,"callee")}return W(s)?e.call(u,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function el(e,t,r){return Ce(e)?(t=Ut(t),typeof t=="string"&&rt(t)<r.tabWidth+3):!1}function tl(e,t){let r=rl(e);if(O(r)){if(r.length>1)return!0;if(r.length===1){let s=r[0];if(we(s)||Nt(s)||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(re(t(n)))return!0}return!1}function rl(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function nl(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!r.typeParameters;case"TSTypeReference":return!!(r.typeArguments??r.typeParameters);default:return!1}}return t(e.checkType)||t(e.extendsType)}function Ue(e,t,r,n,s){let u=e.node,i=z(u),a=s?tt(e,r,t):"";if(i.length===0)return[a,"(",J(e,r,{filter:c=>be(r.originalText,k(c))===")"}),")"];let{parent:o}=e,p=It(o),y=ds(u),D=[];if(Au(e,(c,A)=>{let d=A===i.length-1;d&&u.rest&&D.push("..."),D.push(t()),!d&&(D.push(","),p||y?D.push(" "):ce(i[A],r)?D.push(F,F):D.push(x))}),n&&!ul(e)){if(re(a)||re(D))throw new Dt;return l([cr(a),"(",cr(D),")"])}let m=i.every(c=>!O(c.decorators));return y&&m?[a,"(",...D,")"]:p?[a,"(",...D,")"]:(Or(o)||mu(o)||o.type==="TypeAlias"||o.type==="UnionTypeAnnotation"||o.type==="IntersectionTypeAnnotation"||o.type==="FunctionTypeAnnotation"&&o.returnType===u)&&i.length===1&&i[0].name===null&&u.this!==i[0]&&i[0].typeAnnotation&&u.typeParameters===null&&qt(i[0].typeAnnotation)&&!u.rest?r.arrowParens==="always"||u.type==="HookTypeAnnotation"?["(",...D,")"]:D:[a,"(",f([E,...D]),B(!Cu(u)&&oe(r,"all")?",":""),E,")"]}function ds(e){if(!e)return!1;let t=z(e);if(t.length!==1)return!1;let[r]=t;return!T(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Re(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Re(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||se(r.right)&&r.right.properties.length===0||U(r.right)&&r.right.elements.length===0))}function sl(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function ot(e,t){var s;let r=sl(e);if(!r)return!1;let n=(s=e.typeParameters)==null?void 0:s.params;if(n){if(n.length>1)return!1;if(n.length===1){let u=n[0];if(u.constraint||u.default)return!1}}return z(e).length===1&&(Re(r)||re(t))}function ul(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function qi(e){let t=z(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var il=R(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),al=R(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function ol(e){let{types:t}=e;if(t.some(n=>T(n)))return!1;let r=t.find(n=>al(n));return r?t.every(n=>n===r||il(n)):!1}function xs(e){return qt(e)||Re(e)?!0:we(e)?ol(e):!1}function Wi(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[K(e),"opaque type ",r("id"),r("typeParameters")];return s.supertype&&u.push(": ",r("supertype")),s.impltype&&u.push(" = ",r("impltype")),u.push(n),u}function Zr(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[K(e)];u.push("type ",r("id"),r("typeParameters"));let i=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[ht(e,t,r,u," =",i),n]}function en(e,t,r){let n=!1;return l(e.map(({isFirst:s,previous:u,node:i,index:a})=>{let o=r();if(s)return o;let p=Re(i),y=Re(u);return y&&p?[" & ",n?f(o):o]:!y&&!p?t.experimentalOperatorPosition==="start"?f([x,"& ",o]):f([" &",x,o]):(a>1&&(n=!0),[" & ",a>1?f(o):o])},"types"))}function tn(e,t,r){let{node:n}=e,{parent:s}=e,u=s.type!=="TypeParameterInstantiation"&&(!Je(s)||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((s.type==="TypeAlias"||s.type==="VariableDeclarator"||s.type==="TSTypeAliasDeclaration")&&Le(t.originalText,n)),i=xs(n),a=e.map(y=>{let D=r();return i||(D=Be(2,D)),ye(y,D,t)},"types");if(i)return b(" | ",a);let o=u&&!Le(t.originalText,n),p=[B([o?x:"","| "]),b([x,"| "],a)];return ke(e,t)?l([f(p),E]):(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?l([f([B(["(",E]),p]),E,B(")")]):l(u?f(p):p)}function pl(e){var n;let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(Or(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&&Pt(r,t)||r.type==="ObjectTypeCallProperty"||((n=e.getParentNode(2))==null?void 0:n.type)==="DeclareFunction"))}function rn(e,t,r){let{node:n}=e,s=[Vt(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&s.push("new ");let u=Ue(e,r,t,!1,!0),i=[];return n.type==="FunctionTypeAnnotation"?i.push(pl(e)?" => ":": ",r("returnType")):i.push(H(e,r,n.returnType?"returnType":"typeAnnotation")),ot(n,i)&&(u=l(u)),s.push(u,i),l(s)}function nn(e,t,r){return[r("objectType"),$(e),"[",r("indexType"),"]"]}function sn(e,t,r){return["infer ",r("typeParameter")]}function hs(e,t,r){let{node:n}=e;return[n.postfix?"":r,H(e,t),n.postfix?r:""]}function un(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function an(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var cl=new WeakSet;function H(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let u=e.call(Ni,r);(u==="=>"||u===":"&&T(n,h.Leading))&&(s=!0),cl.add(n)}return s?[" ",t(r)]:t(r)}var Ni=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function on(e,t,r){let n=Ni(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function pn(e){return[e("elementType"),"[]"]}function cn({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TypeofTypeAnnotation"||e.typeArguments?"typeArguments":"typeParameters";return["typeof ",t(r),t(n)]}function ln(e,t){let{node:r}=e;return[r.type==="TSTypePredicate"&&r.asserts?"asserts ":r.type==="TypePredicate"&&r.kind?`${r.kind} `:"",t("parameterName"),r.typeAnnotation?[" is ",H(e,t)]:""]}function $(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":L(t)||W(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function mn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var ll=new Set(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function K(e){let{node:t}=e;return t.declare||ll.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var ml=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Vt({node:e}){return e.abstract||ml.has(e.type)?"abstract ":""}function tt(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Kr(e,t,r){return["::",r("callee")]}function ft(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:f([x,t])}function yn(e,t){return["...",t("argument"),H(e,t)]}function $t(e){return e.accessibility?e.accessibility+" ":""}function yl(e,t,r,n){let{node:s}=e,u=s.inexact?"...":"";return T(s,h.Dangling)?l([r,u,J(e,t,{indent:!0}),E,n]):[r,u,n]}function Kt(e,t,r){let{node:n}=e,s=[],u=n.type==="TupleExpression"?"#[":"[",i="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",o=n[a];if(o.length===0)s.push(yl(e,t,u,i));else{let p=M(!1,o,-1),y=(p==null?void 0:p.type)!=="RestElement"&&!n.inexact,D=p===null,m=Symbol("array"),C=!t.__inJestEach&&o.length>1&&o.every((d,S,g)=>{let _=d==null?void 0:d.type;if(!U(d)&&!se(d))return!1;let v=g[S+1];if(v&&_!==v.type)return!1;let j=U(d)?"elements":"properties";return d[j]&&d[j].length>1}),c=Cs(n,t),A=y?D?",":oe(t)?c?B(",","",{groupId:m}):B(","):"":"";s.push(l([u,f([E,c?fl(e,t,r,A):[Dl(e,t,a,n.inexact,r),A],J(e,t)]),E,i],{shouldBreak:C,id:m}))}return s.push($(e),H(e,r)),s}function Cs(e,t){return U(e)&&e.elements.length>1&&e.elements.every(r=>r&&(Fe(r)||Mn(r)&&!T(r.argument))&&!T(r,h.Trailing|h.Line,n=>!Z(t.originalText,q(n),{backwards:!0})))}function Gi({node:e},{originalText:t}){let r=s=>_t(t,vt(t,s)),n=s=>t[s]===","?s:n(r(s+1));return jt(t,n(k(e)))}function Dl(e,t,r,n,s){let u=[];return e.each(({node:i,isLast:a})=>{u.push(i?l(s()):""),(!a||n)&&u.push([",",x,i&&Gi(e,t)?E:""])},r),n&&u.push("..."),u}function fl(e,t,r,n){let s=[];return e.each(({isLast:u,next:i})=>{s.push([r(),u?n:","]),u||s.push(Gi(e,t)?[F,F]:T(i,h.Leading|h.Line)?F:x)},"elements"),qr(s)}var El=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,Fl=e=>El.test(e),Ui=Fl;function Cl(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var Et=Cl;var Dn=new WeakMap;function Xi(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function Yi(e,t){return t.parser==="json"||t.parser==="jsonc"||!te(e.key)||nt(fe(e.key),t).slice(1,-1)!==e.key.value?!1:!!(Ui(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Xi(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Al(e,t){let{key:r}=e.node;return(r.type==="Identifier"||Fe(r)&&Xi(Et(fe(r)))&&String(r.value)===Et(fe(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&Dn.get(e.parent))}function Ft(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:u}=n;if(t.quoteProps==="consistent"&&!Dn.has(s)){let i=e.siblings.some(a=>!a.computed&&te(a.key)&&!Yi(a,t));Dn.set(s,i)}if(Al(e,t)){let i=nt(JSON.stringify(u.type==="Identifier"?u.name:u.value.toString()),t);return e.call(a=>ye(a,i,t),"key")}return Yi(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!Dn.get(s))?e.call(i=>ye(i,/^\d/u.test(u.value)?Et(u.value):u.value,t),"key"):r("key")}function fn(e,t,r){let{node:n}=e;return n.shorthand?r("value"):ht(e,t,r,Ft(e,t,r),":","value")}var Tl=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&kt(r));function En(e,t,r,n){if(Tl(e))return Fn(e,r,t);let{node:s}=e,u=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&(n!=null&&n.expandLastArg)){let{parent:y}=e;L(y)&&(pe(y).length>1||z(s).every(D=>D.type==="Identifier"&&!D.typeAnnotation))&&(u=!0)}let i=[K(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?t("id"):""],a=Ue(e,t,r,u),o=Qt(e,t),p=ot(s,o);return i.push(tt(e,r,t),l([p?l(a):a,o]),s.body?" ":"",t("body")),r.semi&&(s.declare||!s.body)&&i.push(";"),i}function Fr(e,t,r){let{node:n}=e,{kind:s}=n,u=n.value||n,i=[];return!s||s==="init"||s==="method"||s==="constructor"?u.async&&i.push("async "):(Mt.ok(s==="get"||s==="set"),i.push(s," ")),u.generator&&i.push("*"),i.push(Ft(e,t,r),n.optional||n.key.optional?"?":"",n===u?Fn(e,t,r):r("value")),i}function Fn(e,t,r){let{node:n}=e,s=Ue(e,r,t),u=Qt(e,r),i=qi(n),a=ot(n,u),o=[tt(e,t,r),l([i?l(s,{shouldBreak:!0}):a?l(s):s,u])];return n.body?o.push(" ",r("body")):o.push(t.semi?";":""),o}function dl(e){let t=z(e);return t.length===1&&!e.typeParameters&&!T(e,h.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!T(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Cn(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return dl(r)}return!1}function Qt(e,t){let{node:r}=e,s=[H(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function Hi(e,t,r){let{node:n}=e,s=t.semi?";":"",u=[];if(n.argument){let o=r("argument");xl(t,n.argument)?o=["(",f([F,o]),F,")"]:(De(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(o=l([B("("),f([E,o]),E,B(")")])),u.push(" ",o)}let i=T(n,h.Dangling),a=s&&i&&T(n,h.Last|h.Line);return a&&u.push(s),i&&u.push(" ",J(e,t)),a||u.push(s),u}function Vi(e,t,r){return["return",Hi(e,t,r)]}function $i(e,t,r){return["throw",Hi(e,t,r)]}function xl(e,t){if(Le(e.originalText,t)||T(t,h.Leading,r=>de(e.originalText,q(r),k(r)))&&!X(t))return!0;if(Jt(t)){let r=t,n;for(;n=pu(r);)if(r=n,Le(e.originalText,r))return!0}return!1}var gs=new WeakMap;function Ki(e){return gs.has(e)||gs.set(e,e.type==="ConditionalExpression"&&!ae(e,t=>t.type==="ObjectExpression")),gs.get(e)}var Qi=e=>e.type==="SequenceExpression";function zi(e,t,r,n={}){let s=[],u,i=[],a=!1,o=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function S(){let{node:g}=e,_=hl(e,t,r,n);if(s.length===0)s.push(_);else{let{leading:v,trailing:j}=ls(e,t);s.push([v,_]),i.unshift(j)}o&&(a||(a=g.returnType&&z(g).length>0||g.typeParameters||z(g).some(v=>v.type!=="Identifier"))),!o||g.body.type!=="ArrowFunctionExpression"?(u=r("body",n),p=g.body):e.call(S,"body")})();let y=!Le(t.originalText,p)&&(Qi(p)||gl(p,u,t)||!a&&Ki(p)),D=e.key==="callee"&&mt(e.parent),m=Symbol("arrow-chain"),C=Sl(e,n,{signatureDocs:s,shouldBreak:a}),c=!1,A=!1,d=!1;return o&&(D||n.assignmentLayout)&&(A=!0,d=!T(e.node,h.Leading&h.Line),c=n.assignmentLayout==="chain-tail-arrow-chain"||D&&!y),u=Bl(e,t,n,{bodyDoc:u,bodyComments:i,functionBody:p,shouldPutBodyOnSameLine:y}),l([l(A?f([d?E:"",C]):C,{shouldBreak:c,id:m})," =>",o?xt(u,{groupId:m}):l(u),o&&D?B(E,"",{groupId:m}):""])}function hl(e,t,r,n){let{node:s}=e,u=[];if(s.async&&u.push("async "),Cn(e,t))u.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,o=Qt(e,r);if(a){if(re(o))throw new Dt;o=l(cr(o))}u.push(l([Ue(e,r,t,a,!0),o]))}let i=J(e,t,{filter(a){let o=it(t.originalText,k(a));return o!==!1&&t.originalText.slice(o,o+2)==="=>"}});return i&&u.push(" ",i),u}function gl(e,t,r){var n,s;return U(e)||se(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||X(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((s=t.label)==null?void 0:s.embed)||_r(e,r.originalText))}function Sl(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:s,key:u}=e;return u!=="callee"&&mt(s)||De(s)?l([r[0]," =>",f([x,b([" =>",x],r.slice(1))])],{shouldBreak:n}):u==="callee"&&mt(s)||t.assignmentLayout?l(b([" =>",x],r),{shouldBreak:n}):l(f(b([" =>",x],r)),{shouldBreak:n})}function Bl(e,t,r,{bodyDoc:n,bodyComments:s,functionBody:u,shouldPutBodyOnSameLine:i}){let{node:a,parent:o}=e,p=r.expandLastArg&&oe(t,"all")?B(","):"",y=(r.expandLastArg||o.type==="JSXExpressionContainer")&&!T(a)?E:"";return i&&Ki(u)?[" ",l([B("","("),f([E,n]),B("",")"),p,y]),s]:(Qi(u)&&(n=l(["(",f([E,n]),E,")"])),i?[" ",n,s]:[f([x,n,s]),p,y])}var bl=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let s=t[n];if(r(s,n,t))return s}}},Zi=bl;function Cr(e,t,r,n){let{node:s}=e,u=[],i=Zi(!1,s[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(u.push(r()),a!==i&&(u.push(F),ce(a,t)&&u.push(F)))},n),u}function An(e,t,r){let n=Pl(e,t,r),{node:s,parent:u}=e;if(s.type==="Program"&&(u==null?void 0:u.type)!=="ModuleExpression")return n?[n,F]:"";let i=[];if(s.type==="StaticBlock"&&i.push("static "),i.push("{"),n)i.push(f([F,n]),F);else{let a=e.grandparent;u.type==="ArrowFunctionExpression"||u.type==="FunctionExpression"||u.type==="FunctionDeclaration"||u.type==="ComponentDeclaration"||u.type==="HookDeclaration"||u.type==="ObjectMethod"||u.type==="ClassMethod"||u.type==="ClassPrivateMethod"||u.type==="ForStatement"||u.type==="WhileStatement"||u.type==="DoWhileStatement"||u.type==="DoExpression"||u.type==="ModuleExpression"||u.type==="CatchClause"&&!a.finalizer||u.type==="TSModuleDeclaration"||s.type==="StaticBlock"||i.push(F)}return i.push("}"),i}function Pl(e,t,r){let{node:n}=e,s=O(n.directives),u=n.body.some(o=>o.type!=="EmptyStatement"),i=T(n,h.Dangling);if(!s&&!u&&!i)return"";let a=[];return s&&(a.push(Cr(e,t,r,"directives")),(u||i)&&(a.push(F),ce(M(!1,n.directives,-1),t)&&a.push(F))),u&&a.push(Cr(e,t,r,"body")),i&&a.push(J(e,t)),a}function kl(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var Tn=kl;function Il(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function ea(e,t,r){let{node:n}=e;return l([n.variance?r("variance"):"","[",f([r("keyTparam")," in ",r("sourceType")]),"]",Il(n.optional),": ",r("propType")])}function Ss(e,t){return e==="+"||e==="-"?e+t:t}function ta(e,t,r){let{node:n}=e,s=t.objectWrap==="preserve"&&de(t.originalText,q(n),q(n.typeParameter));return l(["{",f([t.bracketSpacing?x:E,l([r("typeParameter"),n.optional?Ss(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?B(";"):""]),J(e,t),t.bracketSpacing?x:E,"}"],{shouldBreak:s})}var Ar=Tn("typeParameters");function Ll(e,t,r){let{node:n}=e;return z(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function Ot(e,t,r,n){let{node:s}=e;if(!s[n])return"";if(!Array.isArray(s[n]))return r(n);let u=It(e.grandparent),i=e.match(p=>!(p[n].length===1&&Re(p[n][0])),void 0,(p,y)=>y==="typeAnnotation",p=>p.type==="Identifier",Ts);if(s[n].length===0||!i&&(u||s[n].length===1&&(s[n][0].type==="NullableTypeAnnotation"||xs(s[n][0]))))return["<",b(", ",e.map(r,n)),wl(e,t),">"];let o=s.type==="TSTypeParameterInstantiation"?"":Ll(e,t,n)?",":oe(t)?B(","):"";return l(["<",f([E,b([",",x],e.map(r,n))]),o,E,">"],{id:Ar(s)})}function wl(e,t){let{node:r}=e;if(!T(r,h.Dangling))return"";let n=!T(r,h.Line),s=J(e,t,{indent:!n});return n?s:[s,F]}function dn(e,t,r){let{node:n,parent:s}=e,u=[n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(s.type==="TSMappedType")return s.readonly&&u.push(Ss(s.readonly,"readonly")," "),u.push("[",i),n.constraint&&u.push(" in ",r("constraint")),s.nameType&&u.push(" as ",e.callParent(()=>r("nameType"))),u.push("]"),u;if(n.variance&&u.push(r("variance")),n.in&&u.push("in "),n.out&&u.push("out "),u.push(i),n.bound&&(n.usesExtendsBound&&u.push(" extends "),u.push(H(e,r,"bound"))),n.constraint){let a=Symbol("constraint");u.push(" extends",l(f(x),{id:a}),je,xt(r("constraint"),{groupId:a}))}return n.default&&u.push(" = ",r("default")),l(u)}var ra=R(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function xn(e,t,r){let{node:n}=e,s=[K(e),Vt(e),"class"],u=T(n.id,h.Trailing)||T(n.typeParameters,h.Trailing)||T(n.superClass)||O(n.extends)||O(n.mixins)||O(n.implements),i=[],a=[];if(n.id&&i.push(" ",r("id")),i.push(r("typeParameters")),n.superClass){let y=[_l(e,t,r),r(n.superTypeArguments?"superTypeArguments":"superTypeParameters")],D=e.call(m=>["extends ",ye(m,y,t)],"superClass");u?a.push(x,l(D)):a.push(" ",D)}else a.push(Bs(e,t,r,"extends"));a.push(Bs(e,t,r,"mixins"),Bs(e,t,r,"implements"));let o;if(u){let y;ua(n)?y=[...i,f(a)]:y=f([...i,a]),o=na(n),s.push(l(y,{id:o}))}else s.push(...i,...a);let p=n.body;return u&&O(p.body)?s.push(B(F," ",{groupId:o})):s.push(" "),s.push(r("body")),s}var na=Tn("heritageGroup");function sa(e){return B(F,"",{groupId:na(e)})}function Ol(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function ua(e){return e.typeParameters&&!T(e.typeParameters,h.Trailing|h.Line)&&!Ol(e)}function Bs(e,t,r,n){let{node:s}=e;if(!O(s[n]))return"";let u=J(e,t,{marker:n});return[ua(s)?B(" ",x,{groupId:Ar(s.typeParameters)}):x,u,u&&F,n,l(f([x,b([",",x],e.map(r,n))]))]}function _l(e,t,r){let n=r("superClass"),{parent:s}=e;return s.type==="AssignmentExpression"?l(B(["(",f([E,n]),E,")"],n)):n}function hn(e,t,r){let{node:n}=e,s=[];return O(n.decorators)&&s.push(Fs(e,t,r)),s.push($t(n)),n.static&&s.push("static "),s.push(Vt(e)),n.override&&s.push("override "),s.push(Fr(e,t,r)),s}function gn(e,t,r){let{node:n}=e,s=[],u=t.semi?";":"";O(n.decorators)&&s.push(Fs(e,t,r)),s.push(K(e),$t(n)),n.static&&s.push("static "),s.push(Vt(e)),n.override&&s.push("override "),n.readonly&&s.push("readonly "),n.variance&&s.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&s.push("accessor "),s.push(Ft(e,t,r),$(e),mn(e),H(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[ht(e,t,r,s," =",i?void 0:"value"),u]}function ia(e,t,r){let{node:n}=e,s=[];return e.each(({node:u,next:i,isLast:a})=>{s.push(r()),!t.semi&&ra(u)&&vl(u,i)&&s.push(";"),a||(s.push(F),ce(u,t)&&s.push(F))},"body"),T(n,h.Dangling)&&s.push(J(e,t)),["{",s.length>0?[f([F,s]),F]:"","}"]}function vl(e,t){var s;let{type:r,name:n}=e.key;if(!e.computed&&r==="Identifier"&&(n==="static"||n==="get"||n==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let u=(s=t.key)==null?void 0:s.name;if(u==="in"||u==="instanceof")return!0}if(ra(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let i=t.value?t.value.generator:t.generator;return!!(t.computed||i)}case"TSIndexSignature":return!0}return!1}var jl=R(["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"]);function bs(e){return jl(e)?bs(e.expression):e}var aa=R(["FunctionExpression","ArrowFunctionExpression"]);function oa(e){return e.type==="MemberExpression"||e.type==="OptionalMemberExpression"||e.type==="Identifier"&&e.name!=="undefined"}function pa(e,t){if(t.semi||Ps(e,t)||ks(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>ca(e,t),"expression"))}function ca(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Cn(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(X(r))return!0}return ke(e,t)?!0:Jt(r)?e.call(()=>ca(e,t),...Lr(r)):!1}function Ps({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&X(e.expression)&&t.type==="Program"&&t.body.length===1}function ks({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function la(e,t,r){let n=[r("expression")];if(ks(e,t)){let s=bs(e.node.expression);(aa(s)||oa(s))&&n.push(";")}else Ps(e,t)||t.semi&&n.push(";");return n}function ma(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let s=b([",",x],n);return t.__isVueForBindingLeft?["(",f([E,l(s)]),E,")"]:s}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return b([",",x],n)}}function fa(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return ya(r);case"BigIntLiteral":return Sn(r.extra.raw);case"NumericLiteral":return Et(r.extra.raw);case"StringLiteral":return ve(nt(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DirectiveLiteral":return Da(r.extra.raw,t);case"Literal":{if(r.regex)return ya(r.regex);if(r.bigint)return Sn(r.raw);let{value:n}=r;return typeof n=="number"?Et(r.raw):typeof n=="string"?Ml(e)?Da(r.raw,t):ve(nt(r.raw,t)):String(n)}}}function Ml(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function Sn(e){return e.toLowerCase()}function ya({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function Da(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Rl(e,t,r){let n=e.originalText.slice(t,r);for(let s of e[Symbol.for("comments")]){let u=q(s);if(u>r)break;let i=k(s);if(i<t)continue;let a=i-u;n=n.slice(0,u-t)+" ".repeat(a)+n.slice(i-t)}return n}var Is=Rl;function Ea(e,t,r){let{node:n}=e;return["import",n.phase?` ${n.phase}`:"",ws(n),Aa(e,t,r),Ca(e,t,r),da(e,t,r),t.semi?";":""]}var Fa=e=>e.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function Bn(e,t,r){let{node:n}=e,s=[Si(e,t,r),K(e),"export",Fa(n)?" default":""],{declaration:u,exported:i}=n;return T(n,h.Dangling)&&(s.push(" ",J(e,t)),vr(n)&&s.push(F)),u?s.push(" ",r("declaration")):(s.push(Wl(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(s.push(" *"),i&&s.push(" as ",r("exported"))):s.push(Aa(e,t,r)),s.push(Ca(e,t,r),da(e,t,r))),s.push(ql(n,t)),s}var Jl=R(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);function ql(e,t){return t.semi&&(!e.declaration||Fa(e)&&!Jl(e.declaration))?";":""}function Ls(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function ws(e,t){return Ls(e.importKind,t)}function Wl(e){return Ls(e.exportKind)}function Ca(e,t,r){let{node:n}=e;if(!n.source)return"";let s=[];return Ta(n,t)&&s.push(" from"),s.push(" ",r("source")),s}function Aa(e,t,r){let{node:n}=e;if(!Ta(n,t))return"";let s=[" "];if(O(n.specifiers)){let u=[],i=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")u.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")i.push(r());else throw new Ne(n,"specifier")},"specifiers"),s.push(b(", ",u)),i.length>0&&(u.length>0&&s.push(", "),i.length>1||u.length>0||n.specifiers.some(o=>T(o))?s.push(l(["{",f([t.bracketSpacing?x:E,b([",",x],i)]),B(oe(t)?",":""),t.bracketSpacing?x:E,"}"])):s.push(["{",t.bracketSpacing?" ":"",...i,t.bracketSpacing?" ":"","}"]))}else s.push("{}");return s}function Ta(e,t){return e.type!=="ImportDeclaration"||O(e.specifiers)||e.importKind==="type"?!0:Is(t,q(e),q(e.source)).trimEnd().endsWith("from")}function Nl(e,t){var n,s;if((n=e.extra)!=null&&n.deprecatedAssertSyntax)return"assert";let r=Is(t,k(e.source),(s=e.attributes)!=null&&s[0]?q(e.attributes[0]):k(e)).trimStart();return r.startsWith("assert")?"assert":r.startsWith("with")||O(e.attributes)?"with":void 0}function da(e,t,r){let{node:n}=e;if(!n.source)return"";let s=Nl(n,t);if(!s)return"";let u=[` ${s} {`];return O(n.attributes)&&(t.bracketSpacing&&u.push(" "),u.push(b(", ",e.map(r,"attributes"))),t.bracketSpacing&&u.push(" ")),u.push("}"),u}function xa(e,t,r){let{node:n}=e,{type:s}=n,u=s.startsWith("Import"),i=u?"imported":"local",a=u?"local":"exported",o=n[i],p=n[a],y="",D="";return s==="ExportNamespaceSpecifier"||s==="ImportNamespaceSpecifier"?y="*":o&&(y=r(i)),p&&!Gl(n)&&(D=r(a)),[Ls(s==="ImportSpecifier"?n.importKind:n.exportKind,!1),y,y&&D?" as ":"",D]}function Gl(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!su(t,r))return!1;if(te(t))return t.value===r.value&&fe(t)===fe(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function gt(e,t,r){var j;let n=t.semi?";":"",{node:s}=e,u=s.type==="ObjectTypeAnnotation",i=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumBigIntBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||i?"members":s.type==="TSInterfaceBody"?"body":"properties"];u&&a.push("indexers","callProperties","internalSlots");let o=a.flatMap(I=>e.map(({node:G})=>({node:G,printed:r(),loc:q(G)}),I));a.length>1&&o.sort((I,G)=>I.loc-G.loc);let{parent:p,key:y}=e,D=u&&y==="body"&&(p.type==="InterfaceDeclaration"||p.type==="DeclareInterface"||p.type==="DeclareClass"),m=s.type==="TSInterfaceBody"||i||D||s.type==="ObjectPattern"&&p.type!=="FunctionDeclaration"&&p.type!=="FunctionExpression"&&p.type!=="ArrowFunctionExpression"&&p.type!=="ObjectMethod"&&p.type!=="ClassMethod"&&p.type!=="ClassPrivateMethod"&&p.type!=="AssignmentPattern"&&p.type!=="CatchClause"&&s.properties.some(I=>I.value&&(I.value.type==="ObjectPattern"||I.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&t.objectWrap==="preserve"&&o.length>0&&de(t.originalText,q(s),o[0].loc),C=D?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?B(n,";"):",",c=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",A=s.exact?"|}":"}",d=[],S=o.map(I=>{let G=[...d,l(I.printed)];return d=[C,x],(I.node.type==="TSPropertySignature"||I.node.type==="TSMethodSignature"||I.node.type==="TSConstructSignatureDeclaration"||I.node.type==="TSCallSignatureDeclaration")&&T(I.node,h.PrettierIgnore)&&d.shift(),ce(I.node,t)&&d.push(F),G});if(s.inexact||s.hasUnknownMembers){let I;if(T(s,h.Dangling)){let G=T(s,h.Line);I=[J(e,t),G||Z(t.originalText,k(M(!1,lt(s),-1)))?F:x,"..."]}else I=["..."];S.push([...d,...I])}let g=(j=M(!1,o,-1))==null?void 0:j.node,_=!(s.inexact||s.hasUnknownMembers||g&&(g.type==="RestElement"||(g.type==="TSPropertySignature"||g.type==="TSCallSignatureDeclaration"||g.type==="TSMethodSignature"||g.type==="TSConstructSignatureDeclaration")&&T(g,h.PrettierIgnore))),v;if(S.length===0){if(!T(s,h.Dangling))return[c,A,H(e,r)];v=l([c,J(e,t,{indent:!0}),E,A,$(e),H(e,r)])}else v=[D&&O(s.properties)?sa(p):"",c,f([t.bracketSpacing?x:E,...S]),B(_&&(C!==","||oe(t))?C:""),t.bracketSpacing?x:E,A,$(e),H(e,r)];return e.match(I=>I.type==="ObjectPattern"&&!O(I.decorators),Os)||Re(s)&&(e.match(void 0,(I,G)=>G==="typeAnnotation",(I,G)=>G==="typeAnnotation",Os)||e.match(void 0,(I,G)=>I.type==="FunctionTypeParam"&&G==="typeAnnotation",Os))||!m&&e.match(I=>I.type==="ObjectPattern",I=>I.type==="AssignmentExpression"||I.type==="VariableDeclarator")?v:l(v,{shouldBreak:m})}function Os(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&ds(e)}function Ul(e){let t=[e];for(let r=0;r<t.length;r++){let n=t[r];for(let s of["test","consequent","alternate"]){let u=n[s];if(X(u))return!0;u.type==="ConditionalExpression"&&t.push(u)}}return!1}function Yl(e,t,r){let{node:n}=e,s=n.type==="ConditionalExpression",u=s?"alternate":"falseType",{parent:i}=e,a=s?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return i.type===n.type&&i[u]===n?Be(2,a):a}var Xl=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Hl(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||L(u)&&u.callee===n||W(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Xl.get(r.type)]===n}function ha(e,t,r){let{node:n}=e,s=n.type==="ConditionalExpression",u=s?"consequent":"trueType",i=s?"alternate":"falseType",a=s?["test"]:["checkType","extendsType"],o=n[u],p=n[i],y=[],D=!1,{parent:m}=e,C=m.type===n.type&&a.some(N=>m[N]===n),c=m.type===n.type&&!C,A,d,S=0;do d=A||n,A=e.getParentNode(S),S++;while(A&&A.type===n.type&&a.every(N=>A[N]!==d));let g=A||m,_=d;if(s&&(X(n[a[0]])||X(o)||X(p)||Ul(_))){D=!0,c=!0;let N=Q=>[B("("),f([E,Q]),E,B(")")],ue=Q=>Q.type==="NullLiteral"||Q.type==="Literal"&&Q.value===null||Q.type==="Identifier"&&Q.name==="undefined";y.push(" ? ",ue(o)?r(u):N(r(u))," : ",p.type===n.type||ue(p)?r(i):N(r(i)))}else{let N=Q=>t.useTabs?f(r(Q)):Be(2,r(Q)),ue=[x,"? ",o.type===n.type?B("","("):"",N(u),o.type===n.type?B("",")"):"",x,": ",N(i)];y.push(m.type!==n.type||m[i]===n||C?ue:t.useTabs?Jr(f(ue)):Be(Math.max(0,t.tabWidth-2),ue))}let v=[u,i,...a].some(N=>T(n[N],ue=>ee(ue)&&de(t.originalText,q(ue),k(ue)))),j=N=>m===g?l(N,{shouldBreak:v}):v?[N,Ee]:N,I=!D&&(W(m)||m.type==="NGPipeExpression"&&m.left===n)&&!m.computed,G=Hl(e),P=j([Yl(e,t,r),c?y:f(y),s&&I&&!G?E:""]);return C||G?l([f([E,P]),E]):P}function Vl(e,t){return(W(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function $l(e,t,r,n){return[...e.map(u=>lt(u)),lt(t),lt(r)].flat().some(u=>ee(u)&&de(n.originalText,q(u),k(u)))}var Kl=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Ql(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||L(u)&&u.callee===n||W(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Kl.get(r.type)]===n}var _s=e=>[B("("),f([E,e]),E,B(")")];function zt(e,t,r,n){if(!t.experimentalTernaries)return ha(e,t,r);let{node:s}=e,u=s.type==="ConditionalExpression",i=Je(s),a=u?"consequent":"trueType",o=u?"alternate":"falseType",p=u?["test"]:["checkType","extendsType"],y=s[a],D=s[o],m=p.map(Ye=>s[Ye]),{parent:C}=e,c=C.type===s.type,A=c&&p.some(Ye=>C[Ye]===s),d=c&&C[o]===s,S=y.type===s.type,g=D.type===s.type,_=g||d,v=t.tabWidth>2||t.useTabs,j,I,G=0;do I=j||s,j=e.getParentNode(G),G++;while(j&&j.type===s.type&&p.every(Ye=>j[Ye]!==I));let P=j||C,N=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(C.type==="AssignmentExpression"||C.type==="VariableDeclarator"||C.type==="ClassProperty"||C.type==="PropertyDefinition"||C.type==="ClassPrivateProperty"||C.type==="ObjectProperty"||C.type==="Property"),ue=(C.type==="ReturnStatement"||C.type==="ThrowStatement")&&!(S||g),Q=u&&P.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",Bt=Ql(e),Ct=Vl(s,C),w=i&&ke(e,t),ne=v?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",xe=$l(m,y,D,t)||S||g,pt=!_&&!c&&!i&&(Q?y.type==="NullLiteral"||y.type==="Literal"&&y.value===null:ir(y,t)&&Jn(s.test,3)),bt=_||d||i&&!c||c&&u&&Jn(s.test,1)||pt,Rs=[];!S&&T(y,h.Dangling)&&e.call(Ye=>{Rs.push(J(Ye,t),F)},"consequent");let er=[];T(s.test,h.Dangling)&&e.call(Ye=>{er.push(J(Ye,t))},"test"),!g&&T(D,h.Dangling)&&e.call(Ye=>{er.push(J(Ye,t))},"alternate"),T(s,h.Dangling)&&er.push(J(e,t));let Js=Symbol("test"),Ga=Symbol("consequent"),Tr=Symbol("test-and-consequent"),Ua=u?[_s(r("test")),s.test.type==="ConditionalExpression"?Ee:""]:[r("checkType")," ","extends"," ",Je(s.extendsType)||s.extendsType.type==="TSMappedType"?r("extendsType"):l(_s(r("extendsType")))],qs=l([Ua," ?"],{id:Js}),Ya=r(a),dr=f([S||Q&&(X(y)||c||_)?F:x,Rs,Ya]),Xa=bt?l([qs,_?dr:B(dr,l(dr,{id:Ga}),{groupId:Js})],{id:Tr}):[qs,dr],Ln=r(o),Ws=pt?B(Ln,Jr(_s(Ln)),{groupId:Tr}):Ln,tr=[Xa,er.length>0?[f([F,er]),F]:g?F:pt?B(x," ",{groupId:Tr}):x,":",g?" ":v?bt?B(ne,B(_||pt?" ":ne," "),{groupId:Tr}):B(ne," "):" ",g?Ws:l([f(Ws),Q&&!pt?E:""]),Ct&&!Bt?E:"",xe?Ee:""];return N&&!xe?l(f([E,l(tr)])):N||ue?l(f(tr)):Bt||i&&A?l([f([E,tr]),w?E:""]):C===P?l(tr):tr}function ga(e,t,r,n){let{node:s}=e;if(wr(s))return fa(e,t);let u=t.semi?";":"",i=[];switch(s.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),F];case"File":return ma(e,t,r)??r("program");case"EmptyStatement":return"";case"ExpressionStatement":return la(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!T(s.expression)&&(se(s.expression)||U(s.expression))?["(",r("expression"),")"]:l(["(",f([E,r("expression")]),E,")"]);case"AssignmentExpression":return ji(e,t,r);case"VariableDeclarator":return Mi(e,t,r);case"BinaryExpression":case"LogicalExpression":return $r(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Li(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return s.object&&i.push(r("object")),i.push(l(f([E,Kr(e,t,r)]))),i;case"Identifier":return[s.name,$(e),mn(e),H(e,r)];case"V8IntrinsicIdentifier":return["%",s.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return yn(e,r);case"FunctionDeclaration":case"FunctionExpression":return En(e,r,t,n);case"ArrowFunctionExpression":return zi(e,t,r,n);case"YieldExpression":return i.push("yield"),s.delegate&&i.push("*"),s.argument&&i.push(" ",r("argument")),i;case"AwaitExpression":if(i.push("await"),s.argument){i.push(" ",r("argument"));let{parent:a}=e;if(L(a)&&a.callee===s||W(a)&&a.object===s){i=[f([E,...i]),E];let o=e.findAncestor(p=>p.type==="AwaitExpression"||p.type==="BlockStatement");if((o==null?void 0:o.type)!=="AwaitExpression"||!ae(o.argument,p=>p===s))return l(i)}}return i;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Bn(e,t,r);case"ImportDeclaration":return Ea(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return xa(e,t,r);case"ImportAttribute":return fn(e,t,r);case"Program":case"BlockStatement":case"StaticBlock":return An(e,t,r);case"ClassBody":return ia(e,t,r);case"ThrowStatement":return $i(e,t,r);case"ReturnStatement":return Vi(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Qr(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return gt(e,t,r);case"Property":return kt(s)?Fr(e,t,r):fn(e,t,r);case"ObjectProperty":return fn(e,t,r);case"ObjectMethod":return Fr(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return Kt(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let o=[];return e.each(({isFirst:p})=>{p?o.push(r()):o.push(",",f([x,r()]))},"expressions"),l(o)}return l(b([",",x],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),u];case"UnaryExpression":return i.push(s.operator),/[a-z]$/u.test(s.operator)&&i.push(" "),T(s.argument)?i.push(l(["(",f([E,r("argument")]),E,")"])):i.push(r("argument")),i;case"UpdateExpression":return[s.prefix?s.operator:"",r("argument"),s.prefix?"":s.operator];case"ConditionalExpression":return zt(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),o=e.parent,p=o.type==="ForStatement"||o.type==="ForInStatement"||o.type==="ForOfStatement",y=s.declarations.some(m=>m.init),D;return a.length===1&&!T(s.declarations[0])?D=a[0]:a.length>0&&(D=f(a[0])),i=[K(e),s.kind,D?[" ",D]:"",f(a.slice(1).map(m=>[",",y&&!p?F:x,m]))],p&&o.body!==s||i.push(u),l(i)}case"WithStatement":return l(["with (",r("object"),")",ft(s.body,r("body"))]);case"IfStatement":{let a=ft(s.consequent,r("consequent")),o=l(["if (",l([f([E,r("test")]),E]),")",a]);if(i.push(o),s.alternate){let p=T(s.consequent,h.Trailing|h.Line)||vr(s),y=s.consequent.type==="BlockStatement"&&!p;i.push(y?" ":F),T(s,h.Dangling)&&i.push(J(e,t),p?F:" "),i.push("else",l(ft(s.alternate,r("alternate"),s.alternate.type==="IfStatement")))}return i}case"ForStatement":{let a=ft(s.body,r("body")),o=J(e,t),p=o?[o,E]:"";return!s.init&&!s.test&&!s.update?[p,l(["for (;;)",a])]:[p,l(["for (",l([f([E,r("init"),";",x,r("test"),";",x,r("update")]),E]),")",a])]}case"WhileStatement":return l(["while (",l([f([E,r("test")]),E]),")",ft(s.body,r("body"))]);case"ForInStatement":return l(["for (",r("left")," in ",r("right"),")",ft(s.body,r("body"))]);case"ForOfStatement":return l(["for",s.await?" await":""," (",r("left")," of ",r("right"),")",ft(s.body,r("body"))]);case"DoWhileStatement":{let a=ft(s.body,r("body"));return i=[l(["do",a])],s.body.type==="BlockStatement"?i.push(" "):i.push(F),i.push("while (",l([f([E,r("test")]),E]),")",u),i}case"DoExpression":return[s.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return i.push(s.type==="BreakStatement"?"break":"continue"),s.label&&i.push(" ",r("label")),i.push(u),i;case"LabeledStatement":return s.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),s.handler?[" ",r("handler")]:"",s.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(s.param){let a=T(s.param,p=>!ee(p)||p.leading&&Z(t.originalText,k(p))||p.trailing&&Z(t.originalText,q(p),{backwards:!0})),o=r("param");return["catch ",a?["(",f([E,o]),E,") "]:["(",o,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[l(["switch (",f([E,r("discriminant")]),E,")"])," {",s.cases.length>0?f([F,b(F,e.map(({node:a,isLast:o})=>[r(),!o&&ce(a,t)?F:""],"cases"))]):"",F,"}"];case"SwitchCase":{s.test?i.push("case ",r("test"),":"):i.push("default:"),T(s,h.Dangling)&&i.push(" ",J(e,t));let a=s.consequent.filter(o=>o.type!=="EmptyStatement");if(a.length>0){let o=Cr(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",o]:f([F,o]))}return i}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return xn(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return hn(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return gn(e,t,r);case"TemplateElement":return ve(s.value.raw);case"TemplateLiteral":return Gr(e,r,t);case"TaggedTemplateExpression":return Hu(e,r);case"PrivateIdentifier":return["#",s.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",r("body")];case"InterpreterDirective":default:throw new Ne(s,"ESTree")}}function bn(e,t,r){let{parent:n,node:s,key:u}=e,i=[r("expression")];switch(s.type){case"AsConstExpression":i.push(" as const");break;case"AsExpression":case"TSAsExpression":i.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":i.push(" satisfies ",r("typeAnnotation"));break}return u==="callee"&&L(n)||u==="object"&&W(n)?l([f([E,...i]),E]):i}function Sa(e,t,r){let{node:n}=e,s=[K(e),"component"];n.id&&s.push(" ",r("id")),s.push(r("typeParameters"));let u=zl(e,r,t);return n.rendersType?s.push(l([u," ",r("rendersType")])):s.push(l([u])),n.body&&s.push(" ",r("body")),t.semi&&n.type==="DeclareComponent"&&s.push(";"),s}function zl(e,t,r){let{node:n}=e,s=n.params;if(n.rest&&(s=[...s,n.rest]),s.length===0)return["(",J(e,r,{filter:i=>be(r.originalText,k(i))===")"}),")"];let u=[];return em(e,(i,a)=>{let o=a===s.length-1;o&&n.rest&&u.push("..."),u.push(t()),!o&&(u.push(","),ce(s[a],r)?u.push(F,F):u.push(x))}),["(",f([E,...u]),B(oe(r,"all")&&!Zl(n,s)?",":""),E,")"]}function Zl(e,t){var r;return e.rest||((r=M(!1,t,-1))==null?void 0:r.type)==="RestElement"}function em(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);e.each(s,"params"),r.rest&&e.call(s,"rest")}function Ba(e,t,r){let{node:n}=e;return n.shorthand?r("local"):[r("name")," as ",r("local")]}function ba(e,t,r){let{node:n}=e,s=[];return n.name&&s.push(r("name"),n.optional?"?: ":": "),s.push(r("typeAnnotation")),s}function Pa(e,t,r){return gt(e,r,t)}function Pn(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let s="";return r.initializer&&(s=t("initializer")),r.init&&(s=t("init")),s?[n," = ",s]:n}function ka(e,t,r){let{node:n}=e,s;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":s="boolean";break;case"EnumNumberBody":s="number";break;case"EnumBigIntBody":s="bigint";break;case"EnumStringBody":s="string";break;case"EnumSymbolBody":s="symbol";break}return[s?`of ${s} `:"",Pa(e,t,r)]}function kn(e,t,r){let{node:n}=e;return[K(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?Pa(e,t,r):t("body")]}function La(e,t,r){let{node:n}=e,s=["hook"];n.id&&s.push(" ",r("id"));let u=Ue(e,r,t,!1,!0),i=Qt(e,r),a=ot(n,i);return s.push(l([a?l(u):u,i]),n.body?" ":"",r("body")),s}function wa(e,t,r){let{node:n}=e,s=[K(e),"hook"];return n.id&&s.push(" ",r("id")),t.semi&&s.push(";"),s}function Ia(e){var r;let{node:t}=e;return t.type==="HookTypeAnnotation"&&((r=e.getParentNode(2))==null?void 0:r.type)==="DeclareHook"}function Oa(e,t,r){let{node:n}=e,s=[];s.push(Ia(e)?"":"hook ");let u=Ue(e,r,t,!1,!0),i=[];return i.push(Ia(e)?": ":" => ",r("returnType")),ot(n,i)&&(u=l(u)),s.push(u,i),l(s)}function In(e,t,r){let{node:n}=e,s=[K(e),"interface"],u=[],i=[];n.type!=="InterfaceTypeAnnotation"&&u.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!T(n.typeParameters,h.Trailing|h.Line);return O(n.extends)&&i.push(a?B(" ",x,{groupId:Ar(n.typeParameters)}):x,"extends ",(n.extends.length===1?Eu:f)(b([",",x],e.map(r,"extends")))),T(n.id,h.Trailing)||O(n.extends)?a?s.push(l([...u,f(i)])):s.push(l(f([...u,...i]))):s.push(...u,...i),s.push(" ",r("body")),l(s)}function _a(e,t,r){let{node:n}=e;if(Pr(n))return n.type.slice(0,-14).toLowerCase();let s=t.semi?";":"";switch(n.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return Sa(e,t,r);case"ComponentParameter":return Ba(e,t,r);case"ComponentTypeParameter":return ba(e,t,r);case"HookDeclaration":return La(e,t,r);case"DeclareHook":return wa(e,t,r);case"HookTypeAnnotation":return Oa(e,t,r);case"DeclareClass":return xn(e,t,r);case"DeclareFunction":return[K(e),"function ",r("id"),r("predicate"),s];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",H(e,r),s];case"DeclareNamespace":return["declare namespace ",r("id")," ",r("body")];case"DeclareVariable":return[K(e),n.kind??"var"," ",r("id"),s];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Bn(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return Wi(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Zr(e,t,r);case"IntersectionTypeAnnotation":return en(e,t,r);case"UnionTypeAnnotation":return tn(e,t,r);case"ConditionalTypeAnnotation":return zt(e,t,r);case"InferTypeAnnotation":return sn(e,t,r);case"FunctionTypeAnnotation":return rn(e,t,r);case"TupleTypeAnnotation":return Kt(e,t,r);case"TupleTypeLabeledElement":return an(e,t,r);case"TupleTypeSpreadElement":return un(e,t,r);case"GenericTypeAnnotation":return[r("id"),Ot(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return nn(e,t,r);case"TypeAnnotation":return on(e,t,r);case"TypeParameter":return dn(e,t,r);case"TypeofTypeAnnotation":return cn(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return pn(r);case"DeclareEnum":case"EnumDeclaration":return kn(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return ka(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return Pn(e,r);case"FunctionTypeParam":{let u=n.name?r("name"):e.parent.this===n?"this":"";return[u,$(e),u?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return In(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:u}=n;return Mt.ok(u==="plus"||u==="minus"),u==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return ea(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let u="";return n.proto?u="proto ":n.static&&(u="static "),[u,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",Ft(e,t,r),$(e),kt(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return gt(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",$(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return yn(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return ve(nt(fe(n),t));case"NumberLiteralTypeAnnotation":return Et(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Sn(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),H(e,r),")"];case"TypePredicate":return ln(e,r);case"TypeOperator":return[n.operator," ",r("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return Ot(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return bn(e,t,r)}}function va(e,t,r){var i;let{node:n}=e;if(!n.type.startsWith("TS"))return;if(kr(n))return n.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",u=[];switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(U(n.expression)||se(n.expression)),o=l(["<",f([E,r("typeAnnotation")]),E,">"]),p=[B("("),f([E,r("expression")]),E,B(")")];return a?et([[o,r("expression")],[o,l(p,{shouldBreak:!0})],[o,r("expression")]]):l([o,r("expression")])}case"TSDeclareFunction":return En(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return An(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return gt(e,t,r);case"TSTypeAliasDeclaration":return Zr(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return hn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return gn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r(n.typeArguments?"typeArguments":"typeParameters")];case"TSTemplateLiteralType":return Gr(e,r,t);case"TSNamedTupleMember":return an(e,t,r);case"TSRestType":return un(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return In(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Ot(e,t,r,"params");case"TSTypeParameter":return dn(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return bn(e,t,r);case"TSArrayType":return pn(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",Ft(e,t,r),$(e),H(e,r)];case"TSParameterProperty":return[$t(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return cn(e,r);case"TSIndexSignature":{let a=n.parameters.length>1?B(oe(t)?",":""):"",o=l([f([E,b([", ",E],e.map(r,"parameters"))]),a,E]),p=e.parent.type==="ClassBody"&&e.key==="body";return[p&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",H(e,r),p?s:""]}case"TSTypePredicate":return ln(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return["import(",r("argument"),")",n.qualifier?[".",r("qualifier")]:"",Ot(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return nn(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return ta(e,t,r);case"TSMethodSignature":{let a=n.kind&&n.kind!=="method"?`${n.kind} `:"";u.push($t(n),a,n.computed?"[":"",r("key"),n.computed?"]":"",$(e));let o=Ue(e,r,t,!1,!0),p=n.returnType?"returnType":"typeAnnotation",y=n[p],D=y?H(e,r,p):"",m=ot(n,D);return u.push(m?l(o):o),y&&u.push(l(D)),l(u)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return kn(e,r,t);case"TSEnumMember":return Pn(e,r);case"TSImportEqualsDeclaration":return[n.isExport?"export ":"","import ",ws(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,o=a.type==="TSModuleDeclaration",p=((i=n.body)==null?void 0:i.type)==="TSModuleDeclaration";return o?u.push("."):(u.push(K(e)),n.kind!=="global"&&u.push(n.kind," ")),u.push(r("id")),p?u.push(r("body")):n.body?u.push(" ",l(r("body"))):u.push(s),u}case"TSConditionalType":return zt(e,t,r);case"TSInferType":return sn(e,t,r);case"TSIntersectionType":return en(e,t,r);case"TSUnionType":return tn(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return rn(e,t,r);case"TSTupleType":return Kt(e,t,r);case"TSTypeReference":return[r("typeName"),Ot(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSTypeAnnotation":return on(e,t,r);case"TSEmptyBodyFunctionExpression":return Fn(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return hs(e,r,"?");case"TSJSDocNonNullableType":return hs(e,r,"!");case"TSParenthesizedType":default:throw new Ne(n,"TypeScript")}}function tm(e,t,r,n){if(Vr(e))return Di(e,t);for(let s of[gi,Ti,_a,va,ga]){let u=s(e,t,r,n);if(u!==void 0)return u}}var rm=R(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function nm(e,t,r,n){var D;e.isRoot&&((D=t.__onHtmlBindingRoot)==null||D.call(t,e.node,t));let s=tm(e,t,r,n);if(!s)return"";let{node:u}=e;if(rm(u))return s;let i=O(u.decorators),a=Bi(e,t,r),o=u.type==="ClassExpression";if(i&&!o)return lr(s,m=>l([a,m]));let p=ke(e,t),y=pa(e,t);return!a&&!p&&!y?s:lr(s,m=>[y?";":"",p?"(":"",p&&o&&i?[f([x,a,m]),x]:[a,m],p?")":""])}var ja=nm;var sm={avoidAstMutation:!0};var Ma=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}];var js={};xr(js,{getVisitorKeys:()=>Ja,massageAstNode:()=>Wa,print:()=>am});var um={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},Ra=um;var im=Br(Ra),Ja=im;function am(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),F];case"ArrayExpression":{if(n.elements.length===0)return"[]";let s=e.map(()=>e.node===null?"null":r(),"elements");return["[",f([F,b([",",F],s)]),F,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",f([F,b([",",F],e.map(r,"properties"))]),F,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return qa(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return qa(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new Ne(n,"JSON")}}function qa(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var om=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Wa(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,s]of e.elements.entries())s===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}Wa.ignoredProperties=om;var Zt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var St="JavaScript",pm={arrowParens:{category:St,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Zt.bracketSameLine,objectWrap:Zt.objectWrap,bracketSpacing:Zt.bracketSpacing,jsxBracketSameLine:{category:St,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:St,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:St,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:St,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Zt.singleQuote,jsxSingleQuote:{category:St,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:St,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:St,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Zt.singleAttributePerLine},Na=pm;var cm={estree:vs,"estree-json":js},lm=[...Xs,...Ma];var lx=Ms;export{lx as default,lm as languages,Na as options,cm as printers}; |