import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";var t;(function(e){function t(e){return typeof e==`string`}e.is=t})(t||={});var n;(function(e){function t(e){return typeof e==`string`}e.is=t})(n||={});var r;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(r||={});var i;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(i||={});var a;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.line)&&A.uinteger(t.character)}e.is=n})(a||={});var o;(function(e){function t(e,t,n,r){if(A.uinteger(e)&&A.uinteger(t)&&A.uinteger(n)&&A.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}e.is=n})(o||={});var s;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&o.is(t.range)&&(A.string(t.uri)||A.undefined(t.uri))}e.is=n})(s||={});var c;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&o.is(t.targetRange)&&A.string(t.targetUri)&&o.is(t.targetSelectionRange)&&(o.is(t.originSelectionRange)||A.undefined(t.originSelectionRange))}e.is=n})(c||={});var l;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.numberRange(t.red,0,1)&&A.numberRange(t.green,0,1)&&A.numberRange(t.blue,0,1)&&A.numberRange(t.alpha,0,1)}e.is=n})(l||={});var u;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&o.is(t.range)&&l.is(t.color)}e.is=n})(u||={});var d;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.undefined(t.textEdit)||b.is(t))&&(A.undefined(t.additionalTextEdits)||A.typedArray(t.additionalTextEdits,b.is))}e.is=n})(d||={});var f;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(f||={});var p;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return A.defined(n)&&(o.startCharacter=n),A.defined(r)&&(o.endCharacter=r),A.defined(i)&&(o.kind=i),A.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.startLine)&&A.uinteger(t.startLine)&&(A.undefined(t.startCharacter)||A.uinteger(t.startCharacter))&&(A.undefined(t.endCharacter)||A.uinteger(t.endCharacter))&&(A.undefined(t.kind)||A.string(t.kind))}e.is=n})(p||={});var m;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&s.is(t.location)&&A.string(t.message)}e.is=n})(m||={});var h;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(h||={});var g;(function(e){e.Unnecessary=1,e.Deprecated=2})(g||={});var _;(function(e){function t(e){let t=e;return A.objectLiteral(t)&&A.string(t.href)}e.is=t})(_||={});var v;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return A.defined(n)&&(o.severity=n),A.defined(r)&&(o.code=r),A.defined(i)&&(o.source=i),A.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return A.defined(t)&&o.is(t.range)&&A.string(t.message)&&(A.number(t.severity)||A.undefined(t.severity))&&(A.integer(t.code)||A.string(t.code)||A.undefined(t.code))&&(A.undefined(t.codeDescription)||A.string(t.codeDescription?.href))&&(A.string(t.source)||A.undefined(t.source))&&(A.undefined(t.relatedInformation)||A.typedArray(t.relatedInformation,m.is))}e.is=n})(v||={});var y;(function(e){function t(e,t,...n){let r={title:e,command:t};return A.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.title)&&A.string(t.command)}e.is=n})(y||={});var b;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return A.objectLiteral(t)&&A.string(t.newText)&&o.is(t.range)}e.is=i})(b||={});var x;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(A.string(t.description)||t.description===void 0)}e.is=n})(x||={});var S;(function(e){function t(e){let t=e;return A.string(t)}e.is=t})(S||={});var ee;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return b.is(t)&&(x.is(t.annotationId)||S.is(t.annotationId))}e.is=i})(ee||={});var C;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(C||={});var w;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&A.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||S.is(t.annotationId))}e.is=n})(w||={});var te;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&A.string(t.oldUri)&&A.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||S.is(t.annotationId))}e.is=n})(te||={});var T;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&A.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||A.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||A.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||S.is(t.annotationId))}e.is=n})(T||={});var E;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>A.string(e.kind)?w.is(e)||te.is(e)||T.is(e):C.is(e)))}e.is=t})(E||={});var ne;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)}e.is=n})(ne||={});var D;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.integer(t.version)}e.is=n})(D||={});var re;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&(t.version===null||A.integer(t.version))}e.is=n})(re||={});var O;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.string(t.languageId)&&A.integer(t.version)&&A.string(t.text)}e.is=n})(O||={});var ie;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(ie||={});var k;(function(e){function t(e){let t=e;return A.objectLiteral(e)&&ie.is(t.kind)&&A.string(t.value)}e.is=t})(k||={});var ae;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ae||={});var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||={});var se;(function(e){e.Deprecated=1})(se||={});var ce;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&A.string(t.newText)&&o.is(t.insert)&&o.is(t.replace)}e.is=n})(ce||={});var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||={});var ue;(function(e){function t(e){let t=e;return t&&(A.string(t.detail)||t.detail===void 0)&&(A.string(t.description)||t.description===void 0)}e.is=t})(ue||={});var de;(function(e){function t(e){return{label:e}}e.create=t})(de||={});var fe;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(fe||={});var pe;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return A.string(t)||A.objectLiteral(t)&&A.string(t.language)&&A.string(t.value)}e.is=n})(pe||={});var me;(function(e){function t(e){let t=e;return!!t&&A.objectLiteral(t)&&(k.is(t.contents)||pe.is(t.contents)||A.typedArray(t.contents,pe.is))&&(e.range===void 0||o.is(e.range))}e.is=t})(me||={});var he;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(he||={});var ge;(function(e){function t(e,t,...n){let r={label:e};return A.defined(t)&&(r.documentation=t),A.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(ge||={});var _e;(function(e){e.Text=1,e.Read=2,e.Write=3})(_e||={});var ve;(function(e){function t(e,t){let n={range:e};return A.number(t)&&(n.kind=t),n}e.create=t})(ve||={});var ye;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ye||={});var be;(function(e){e.Deprecated=1})(be||={});var xe;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(xe||={});var Se;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Se||={});var Ce;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&A.string(t.name)&&A.number(t.kind)&&o.is(t.range)&&o.is(t.selectionRange)&&(t.detail===void 0||A.string(t.detail))&&(t.deprecated===void 0||A.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(Ce||={});var we;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(we||={});var Te;(function(e){e.Invoked=1,e.Automatic=2})(Te||={});var Ee;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return A.defined(t)&&A.typedArray(t.diagnostics,v.is)&&(t.only===void 0||A.typedArray(t.only,A.string))&&(t.triggerKind===void 0||t.triggerKind===Te.Invoked||t.triggerKind===Te.Automatic)}e.is=n})(Ee||={});var De;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):y.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&A.string(t.title)&&(t.diagnostics===void 0||A.typedArray(t.diagnostics,v.is))&&(t.kind===void 0||A.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||y.is(t.command))&&(t.isPreferred===void 0||A.boolean(t.isPreferred))&&(t.edit===void 0||E.is(t.edit))}e.is=n})(De||={});var Oe;(function(e){function t(e,t){let n={range:e};return A.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return A.defined(t)&&o.is(t.range)&&(A.undefined(t.command)||y.is(t.command))}e.is=n})(Oe||={});var ke;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&A.uinteger(t.tabSize)&&A.boolean(t.insertSpaces)}e.is=n})(ke||={});var Ae;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return A.defined(t)&&o.is(t.range)&&(A.undefined(t.target)||A.string(t.target))}e.is=n})(Ae||={});var je;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return A.objectLiteral(n)&&o.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(je||={});var Me;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Me||={});var Ne;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ne||={});var Pe;(function(e){function t(e){let t=e;return A.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Pe||={});var Fe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&o.is(t.range)&&A.string(t.text)}e.is=n})(Fe||={});var Ie;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&o.is(t.range)&&A.boolean(t.caseSensitiveLookup)&&(A.string(t.variableName)||t.variableName===void 0)}e.is=n})(Ie||={});var Le;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&o.is(t.range)&&(A.string(t.expression)||t.expression===void 0)}e.is=n})(Le||={});var Re;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return A.defined(t)&&o.is(e.stoppedLocation)}e.is=n})(Re||={});var ze;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(ze||={});var Be;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&(t.tooltip===void 0||A.string(t.tooltip)||k.is(t.tooltip))&&(t.location===void 0||s.is(t.location))&&(t.command===void 0||y.is(t.command))}e.is=n})(Be||={});var Ve;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&a.is(t.position)&&(A.string(t.label)||A.typedArray(t.label,Be.is))&&(t.kind===void 0||ze.is(t.kind))&&t.textEdits===void 0||A.typedArray(t.textEdits,b.is)&&(t.tooltip===void 0||A.string(t.tooltip)||k.is(t.tooltip))&&(t.paddingLeft===void 0||A.boolean(t.paddingLeft))&&(t.paddingRight===void 0||A.boolean(t.paddingRight))}e.is=n})(Ve||={});var He;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(He||={});var Ue;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Ue||={});var We;(function(e){function t(e){return{items:e}}e.create=t})(We||={});var Ge;(function(e){e.Invoked=0,e.Automatic=1})(Ge||={});var Ke;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Ke||={});var qe;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(qe||={});var Je;(function(e){function t(e){let t=e;return A.objectLiteral(t)&&n.is(t.uri)&&A.string(t.name)}e.is=t})(Je||={});var Ye;(function(e){function t(e,t,n,r){return new Xe(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(A.defined(t)&&A.string(t.uri)&&(A.undefined(t.languageId)||A.string(t.languageId))&&A.uinteger(t.lineCount)&&A.func(t.getText)&&A.func(t.positionAt)&&A.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return a.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return a.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1Da,default:()=>_t,languages:()=>jr,options:()=>Nr,parsers:()=>Pr,printers:()=>Ea}),Qe=Object.create,$e=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=Object.getOwnPropertyNames,nt=Object.getPrototypeOf,rt=Object.prototype.hasOwnProperty,it=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),at=(e,t)=>{for(var n in t)$e(e,n,{get:t[n],enumerable:!0})},ot=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of tt(t))!rt.call(e,i)&&i!==n&&$e(e,i,{get:()=>t[i],enumerable:!(r=et(t,i))||r.enumerable});return e},st=(e,t,n)=>(n=e==null?{}:Qe(nt(e)),ot(t||!e||!e.__esModule?$e(n,`default`,{value:e,enumerable:!0}):n,e)),ct=it(e=>{var t={ANCHOR:`&`,COMMENT:`#`,TAG:`!`,DIRECTIVES_END:`-`,DOCUMENT_END:`.`},n={ALIAS:`ALIAS`,BLANK_LINE:`BLANK_LINE`,BLOCK_FOLDED:`BLOCK_FOLDED`,BLOCK_LITERAL:`BLOCK_LITERAL`,COMMENT:`COMMENT`,DIRECTIVE:`DIRECTIVE`,DOCUMENT:`DOCUMENT`,FLOW_MAP:`FLOW_MAP`,FLOW_SEQ:`FLOW_SEQ`,MAP:`MAP`,MAP_KEY:`MAP_KEY`,MAP_VALUE:`MAP_VALUE`,PLAIN:`PLAIN`,QUOTE_DOUBLE:`QUOTE_DOUBLE`,QUOTE_SINGLE:`QUOTE_SINGLE`,SEQ:`SEQ`,SEQ_ITEM:`SEQ_ITEM`},r=`tag:yaml.org,2002:`,i={MAP:`tag:yaml.org,2002:map`,SEQ:`tag:yaml.org,2002:seq`,STR:`tag:yaml.org,2002:str`};function a(e){let t=[0],n=e.indexOf(` `);for(;n!==-1;)n+=1,t.push(n),n=e.indexOf(` `,n);return t}function o(e){let t,n;return typeof e==`string`?(t=a(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||=a(e.context.src),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function s(e,t){if(typeof e!=`number`||e<0)return null;let{lineStarts:n,src:r}=o(t);if(!n||!r||e>r.length)return null;for(let t=0;t=1)||e>n.length)return null;let i=n[e-1],a=n[e];for(;a&&a>i&&r[a-1]===` `;)--a;return r.slice(i,a)}function l({start:e,end:t},n,r=80){let i=c(e.line,n);if(!i)return null;let{col:a}=e;if(i.length>r)if(a<=r-10)i=i.substr(0,r-1)+`…`;else{let e=Math.round(r/2);i.length>a+e&&(i=i.substr(0,a+e-1)+`…`),a-=i.length-r,i=`…`+i.substr(1-r)}let o=1,s=``;t&&(t.line===e.line&&a+(t.col-e.col)<=r+1?o=t.col-e.col:(o=Math.min(i.length+1,r)-a,s=`…`));let l=a>1?` `.repeat(a-1):``,u=`^`.repeat(o);return`${i} ${l}${u}${s}`}var u=class e{static copy(t){return new e(t.start,t.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return typeof this.start!=`number`||!this.end||this.end<=this.start}setOrigRange(e,t){let{start:n,end:r}=this;if(e.length===0||r<=e[0])return this.origStart=n,this.origEnd=r,t;let i=t;for(;in);)++i;this.origStart=n+i;let a=i;for(;i=r);)++i;return this.origEnd=r+i,a}},d=class e{static addStringTerminator(t,n,r){if(r[r.length-1]===` `)return r;let i=e.endOfWhiteSpace(t,n);return i>=t.length||t[i]===` `?r+` `:r}static atDocumentBoundary(e,n,r){let i=e[n];if(!i)return!0;let a=e[n-1];if(a&&a!==` `)return!1;if(r){if(i!==r)return!1}else if(i!==t.DIRECTIVES_END&&i!==t.DOCUMENT_END)return!1;let o=e[n+1],s=e[n+2];if(o!==i||s!==i)return!1;let c=e[n+3];return!c||c===` `||c===` `||c===` `}static endOfIdentifier(e,t){let n=e[t],r=n===`<`,i=r?[` `,` `,` `,`>`]:[` `,` `,` `,`[`,`]`,`{`,`}`,`,`];for(;n&&i.indexOf(n)===-1;)n=e[t+=1];return r&&n===`>`&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;n===` `;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&n!==` `;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;n===` `||n===` `;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if(n===` `)return t;for(;n&&n!==` `;)n=e[--t];return t+1}static endOfBlockIndent(t,n,r){let i=e.endOfIndent(t,r);if(i>r+n)return i;{let n=e.endOfWhiteSpace(t,i),r=t[n];if(!r||r===` `)return n}return null}static atBlank(e,t,n){let r=e[t];return r===` `||r===` `||r===` `||n&&!r}static nextNodeIsIndented(e,t,n){return!e||t<0?!1:t>0?!0:n&&e===`-`}static normalizeOffset(t,n){let r=t[n];return r?r!==` `&&t[n-1]===` `?n-1:e.endOfWhiteSpace(t,n):n}static foldNewline(t,n,r){let i=0,a=!1,o=``,s=t[n+1];for(;s===` `||s===` `||s===` `;){switch(s){case` `:i=0,n+=1,o+=` `;break;case` `:i<=r&&(a=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case` `:i+=1,n+=1;break}s=t[n+1]}return o||=` `,s&&i<=r&&(a=!0),{fold:o,offset:n,error:a}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;let{src:r}=this.context,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+ +!!n,i.end):null}get anchor(){for(let e=0;e0?e.join(` `):null}commentHasRequiredWhitespace(t){let{src:n}=this.context;if(this.header&&t===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return t!==r||e.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;nn.setOrigRange(e,t)),t}toString(){let{context:{src:t},range:n,value:r}=this;if(r!=null)return r;let i=t.slice(n.start,n.end);return e.addStringTerminator(t,n.end,i)}},f=class extends Error{constructor(e,t,n){if(!n||!(t instanceof d))throw Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset==`number`){this.range=new u(this.offset,this.offset+1);let t=e&&s(this.offset,e);if(t){let e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;let r=e&&l(this.linePos,e);r&&(this.message+=`: ${r} `)}delete this.source}},p=class extends f{constructor(e,t){super(`YAMLReferenceError`,e,t)}},m=class extends f{constructor(e,t){super(`YAMLSemanticError`,e,t)}},h=class extends f{constructor(e,t){super(`YAMLSyntaxError`,e,t)}},g=class extends f{constructor(e,t){super(`YAMLWarning`,e,t)}};function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=class e extends d{static endOfLine(e,t,n){let r=e[t],i=t;for(;r&&r!==` `&&!(n&&(r===`[`||r===`]`||r===`{`||r===`}`||r===`,`));){let t=e[i+1];if(r===`:`&&(!t||t===` `||t===` `||t===` `||n&&t===`,`)||(r===` `||r===` `)&&t===`#`)break;i+=1,r=t}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange,{src:n}=this.context,r=n[t-1];for(;ea?n.slice(a,r+1):e)}else i+=e}let a=n[e];switch(a){case` `:return{errors:[new m(this,`Plain value cannot start with a tab character`)],str:i};case`@`:case"`":{let e=`Plain value cannot start with reserved character ${a}`;return{errors:[new m(this,e)],str:i}}default:return i}}parseBlockValue(t){let{indent:n,inFlow:r,src:i}=this.context,a=t,o=t;for(let t=i[a];t===` `&&!d.atDocumentBoundary(i,a+1);t=i[a]){let t=d.endOfBlockIndent(i,n,a+1);if(t===null||i[t]===`#`)break;i[t]===` `?a=t:(o=e.endOfLine(i,t,r),a=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=o,o}parse(t,n){this.context=t;let{inFlow:r,src:i}=t,a=n,o=i[a];return o&&o!==`#`&&o!==` `&&(a=e.endOfLine(i,n,r)),this.valueRange=new u(n,a),a=d.endOfWhiteSpace(i,a),a=this.parseComment(a),(!this.hasComment||this.valueRange.isEmpty())&&(a=this.parseBlockValue(a)),a}};e.Char=t,e.Node=d,e.PlainValue=v,e.Range=u,e.Type=n,e.YAMLError=f,e.YAMLReferenceError=p,e.YAMLSemanticError=m,e.YAMLSyntaxError=h,e.YAMLWarning=g,e._defineProperty=_,e.defaultTagPrefix=r,e.defaultTags=i}),lt=it(e=>{var t=ct(),n=class extends t.Node{constructor(){super(t.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new t.Range(n,n+1),n+1}},r=class extends t.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,r){this.context=e;let{parseNode:i,src:a}=e,{atLineStart:o,lineStart:s}=e;!o&&this.type===t.Type.SEQ_ITEM&&(this.error=new t.YAMLSemanticError(this,`Sequence items must not have preceding content on the same line`));let c=o?r-s:e.indent,l=t.Node.endOfWhiteSpace(a,r+1),u=a[l],d=u===`#`,f=[],p=null;for(;u===` `||u===`#`;){if(u===`#`){let e=t.Node.endOfLine(a,l+1);f.push(new t.Range(l,e)),l=e}else o=!0,s=l+1,a[t.Node.endOfWhiteSpace(a,s)]===` `&&f.length===0&&(p=new n,s=p.parse({src:a},s)),l=t.Node.endOfIndent(a,s);u=a[l]}if(t.Node.nextNodeIsIndented(u,l-(s+c),this.type!==t.Type.SEQ_ITEM)?this.node=i({atLineStart:o,inCollection:!1,indent:c,lineStart:s,parent:this},l):u&&s>r+1&&(l=s-1),this.node){if(p){let t=e.parent.items||e.parent.contents;t&&t.push(p)}f.length&&Array.prototype.push.apply(this.props,f),l=this.node.range.end}else if(d){let e=f[0];this.props.push(e),l=e.end}else l=t.Node.endOfLine(a,r+1);let m=this.node?this.node.valueRange.end:l;return this.valueRange=new t.Range(r,m),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){let{context:{src:e},node:n,range:r,value:i}=this;if(i!=null)return i;let a=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return t.Node.addStringTerminator(e,r.end,a)}},i=class extends t.Node{constructor(){super(t.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new t.Range(n,r),r}};function a(e){let n=e;for(;n instanceof r;)n=n.node;if(!(n instanceof o))return null;let i=n.items.length,a=-1;for(let e=i-1;e>=0;--e){let r=n.items[e];if(r.type===t.Type.COMMENT){let{indent:t,lineStart:n}=r.context;if(t>0&&r.range.start>=n+t)break;a=e}else if(r.type===t.Type.BLANK_LINE)a=e;else break}if(a===-1)return null;let s=n.items.splice(a,i-a),c=s[0].range.start;for(;n.range.end=c,n.valueRange&&n.valueRange.end>c&&(n.valueRange.end=c),n!==e;)n=n.context.parent;return s}var o=class e extends t.Node{static nextContentHasIndent(n,r,i){let a=t.Node.endOfLine(n,r)+1;r=t.Node.endOfWhiteSpace(n,a);let o=n[r];return o?r>=a+i?!0:o!==`#`&&o!==` `?!1:e.nextContentHasIndent(n,r,i):!1}constructor(e){super(e.type===t.Type.SEQ_ITEM?t.Type.SEQ:t.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start0}parse(r,o){this.context=r;let{parseNode:s,src:c}=r,l=t.Node.startOfLine(c,o),u=this.items[0];u.context.parent=this,this.valueRange=t.Range.copy(u.valueRange);let d=u.range.start-u.context.lineStart,f=o;f=t.Node.normalizeOffset(c,f);let p=c[f],m=t.Node.endOfWhiteSpace(c,l)===f,h=!1;for(;p;){for(;p===` `||p===`#`;){if(m&&p===` `&&!h){let e=new n;if(f=e.parse({src:c},f),this.valueRange.end=f,f>=c.length){p=null;break}this.items.push(e),--f}else if(p===`#`){if(f=c.length){p=null;break}}if(l=f+1,f=t.Node.endOfIndent(c,l),t.Node.atBlank(c,f)){let e=t.Node.endOfWhiteSpace(c,f),n=c[e];(!n||n===` `||n===`#`)&&(f=e)}p=c[f],m=!0}if(!p)break;if(f!==l+d&&(m||p!==`:`))if(fo&&(f=l);break}else this.error||=new t.YAMLSyntaxError(this,`All collection items must start at the same column`);if(u.type===t.Type.SEQ_ITEM){if(p!==`-`){l>o&&(f=l);break}}else if(p===`-`&&!this.error){let e=c[f+1];(!e||e===` `||e===` `||e===` `)&&(this.error=new t.YAMLSyntaxError(this,`A collection cannot be both a mapping and a sequence`))}let r=s({atLineStart:m,inCollection:!0,indent:d,lineStart:l,parent:this},f);if(!r)return f;if(this.items.push(r),this.valueRange.end=r.valueRange.end,f=t.Node.normalizeOffset(c,r.range.end),p=c[f],m=!1,h=r.includesTrailingLines,p){let e=f-1,t=c[e];for(;t===` `||t===` `;)t=c[--e];t===` `&&(l=e+1,m=!0)}let g=a(r);g&&Array.prototype.push.apply(this.items,g)}return f}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach(n=>{t=n.setOrigRanges(e,t)}),t}toString(){let{context:{src:e},items:n,range:r,value:i}=this;if(i!=null)return i;let a=e.slice(r.start,n[0].range.start)+String(n[0]);for(let e=1;e0&&(this.contents=this.directives,this.directives=[]),l}return a[l]?(this.directivesEndMarker=new t.Range(l,l+3),l+3):(c?this.error=new t.YAMLSemanticError(this,`Missing directives-end indicator line`):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),l)}parseContents(r){let{parseNode:o,src:s}=this.context;this.contents||=[];let c=r;for(;s[c-1]===`-`;)--c;let l=t.Node.endOfWhiteSpace(s,r),u=c===r;for(this.valueRange=new t.Range(l);!t.Node.atDocumentBoundary(s,l,t.Char.DOCUMENT_END);){switch(s[l]){case` `:if(u){let e=new n;l=e.parse({src:s},l),l{t=n.setOrigRanges(e,t)}),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach(n=>{t=n.setOrigRanges(e,t)}),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let i=n.join(``);return e.length>0&&((n.length>0||e[0].type===t.Type.COMMENT)&&(i+=`--- `),i+=e.join(``)),i[i.length-1]!==` `&&(i+=` `),i}},l=class extends t.Node{parse(e,n){this.context=e;let{src:r}=e,i=t.Node.endOfIdentifier(r,n+1);return this.valueRange=new t.Range(n+1,i),i=t.Node.endOfWhiteSpace(r,i),i=this.parseComment(i),i}},u={CLIP:`CLIP`,KEEP:`KEEP`,STRIP:`STRIP`},d=class extends t.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=u.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===u.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:i}=this.context;if(this.valueRange.isEmpty())return``;let a=null,o=i[n-1];for(;o===` `||o===` `||o===` `;){if(--n,n<=e){if(this.chomping===u.KEEP)break;return``}o===` `&&(a=n),o=i[n-1]}let s=n+1;a&&(this.chomping===u.KEEP?(s=a,n=this.valueRange.end):n=a);let c=r+this.blockIndent,l=this.type===t.Type.BLOCK_FOLDED,d=!0,f=``,p=``,m=!1;for(let r=e;rs&&(s=l):(l{if(r instanceof t.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let t=n;for(;tr.offset);)++t;r.origOffset=r.offset+t,n=t}}),n}toString(){let{context:{src:e},items:n,range:r,value:i}=this;if(i!=null)return i;let a=n.filter(e=>e instanceof t.Node),o=``,s=r.start;return a.forEach(t=>{let n=e.slice(s,t.range.start);s=t.range.end,o+=n+String(t),o[o.length-1]===` `&&e[s-1]!==` `&&e[s]===` `&&(s+=1)}),o+=e.slice(s,r.end),t.Node.addStringTerminator(e,r.end,o)}},p=class e extends t.Node{static endOfQuote(e,t){let n=e[t];for(;n&&n!==`"`;)t+=n===`\\`?2:1,n=e[t];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:i,src:a}=this.context;a[r-1]!==`"`&&e.push(new t.YAMLSyntaxError(this,`Missing closing "quote`));let o=``;for(let s=n+1;se?a.slice(e,s+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:i}=this.context,a=i.substr(e,n),o=a.length===n&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;return isNaN(o)?(r.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(e-2,n+2)}`)),i.substr(e-2,n+2)):String.fromCodePoint(o)}parse(n,r){this.context=n;let{src:i}=n,a=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,a),a=t.Node.endOfWhiteSpace(i,a),a=this.parseComment(a),a}},m=class e extends t.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if(n===`'`){if(e[t+1]!==`'`)break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:i,src:a}=this.context;a[r-1]!==`'`&&e.push(new t.YAMLSyntaxError(this,`Missing closing 'quote`));let o=``;for(let s=n+1;se?a.slice(e,s+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parse(n,r){this.context=n;let{src:i}=n,a=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,a),a=t.Node.endOfWhiteSpace(i,a),a=this.parseComment(a),a}};function h(e,n){switch(e){case t.Type.ALIAS:return new l(e,n);case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return new d(e,n);case t.Type.FLOW_MAP:case t.Type.FLOW_SEQ:return new f(e,n);case t.Type.MAP_KEY:case t.Type.MAP_VALUE:case t.Type.SEQ_ITEM:return new r(e,n);case t.Type.COMMENT:case t.Type.PLAIN:return new t.PlainValue(e,n);case t.Type.QUOTE_DOUBLE:return new p(e,n);case t.Type.QUOTE_SINGLE:return new m(e,n);default:return null}}var g=class e{static parseType(e,n,r){switch(e[n]){case`*`:return t.Type.ALIAS;case`>`:return t.Type.BLOCK_FOLDED;case`|`:return t.Type.BLOCK_LITERAL;case`{`:return t.Type.FLOW_MAP;case`[`:return t.Type.FLOW_SEQ;case`?`:return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.MAP_KEY:t.Type.PLAIN;case`:`:return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.MAP_VALUE:t.Type.PLAIN;case`-`:return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.SEQ_ITEM:t.Type.PLAIN;case`"`:return t.Type.QUOTE_DOUBLE;case`'`:return t.Type.QUOTE_SINGLE;default:return t.Type.PLAIN}}constructor(n={},{atLineStart:r,inCollection:i,inFlow:a,indent:s,lineStart:c,parent:l}={}){t._defineProperty(this,`parseNode`,(n,r)=>{if(t.Node.atDocumentBoundary(this.src,r))return null;let i=new e(this,n),{props:a,type:s,valueStart:c}=i.parseProps(r),l=h(s,a),u=l.parse(i,c);if(l.range=new t.Range(r,u),u<=r&&(l.error=Error(`Node#parse consumed no characters`),l.error.parseEnd=u,l.error.source=l,l.range.end=r+1),i.nodeStartsCollection(l)){!l.error&&!i.atLineStart&&i.parent.type===t.Type.DOCUMENT&&(l.error=new t.YAMLSyntaxError(l,`Block collection must not have preceding content here (e.g. directives-end indicator)`));let n=new o(l);return u=n.parse(new e(i),u),n.range=new t.Range(r,u),n}return l}),this.atLineStart=r??(n.atLineStart||!1),this.inCollection=i??(n.inCollection||!1),this.inFlow=a??(n.inFlow||!1),this.indent=s??n.indent,this.lineStart=c??n.lineStart,this.parent=l??(n.parent||{}),this.root=n.root,this.src=n.src}nodeStartsCollection(e){let{inCollection:n,inFlow:i,src:a}=this;if(n||i)return!1;if(e instanceof r)return!0;let o=e.range.end;return a[o]===` `||a[o-1]===` `?!1:(o=t.Node.endOfWhiteSpace(a,o),a[o]===`:`)}parseProps(n){let{inFlow:r,parent:i,src:a}=this,o=[],s=!1;n=this.atLineStart?t.Node.endOfIndent(a,n):t.Node.endOfWhiteSpace(a,n);let c=a[n];for(;c===t.Char.ANCHOR||c===t.Char.COMMENT||c===t.Char.TAG||c===` `;){if(c===` `){let e=n,r;do r=e+1,e=t.Node.endOfIndent(a,r);while(a[e]===` `);let o=e-(r+this.indent),c=i.type===t.Type.SEQ_ITEM&&i.context.atLineStart;if(a[e]!==`#`&&!t.Node.nextNodeIsIndented(a[e],o,!c))break;this.atLineStart=!0,this.lineStart=r,s=!1,n=e}else if(c===t.Char.COMMENT){let e=t.Node.endOfLine(a,n+1);o.push(new t.Range(n,e)),n=e}else{let e=t.Node.endOfIdentifier(a,n+1);c===t.Char.TAG&&a[e]===`,`&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(a.slice(n+1,e+13))&&(e=t.Node.endOfIdentifier(a,e+5)),o.push(new t.Range(n,e)),s=!0,n=t.Node.endOfWhiteSpace(a,e)}c=a[n]}return s&&c===`:`&&t.Node.atBlank(a,n+1,!0)&&--n,{props:o,type:e.parseType(a,n,r),valueStart:n}}};function _(e){let t=[];e.indexOf(`\r`)!==-1&&(e=e.replace(/\r\n?/g,(e,n)=>(e.length>1&&t.push(n),` `)));let n=[],r=0;do{let t=new c,i=new g({src:e});r=t.parse(i,r),n.push(t)}while(r{if(t.length===0)return!1;for(let e=1;en.join(`... `),n}e.parse=_}),ut=it(e=>{var t=ct();function n(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)} ${t}${e}`:e}function r(e,t,n){return n?n.indexOf(` `)===-1?`${e} #${n}`:`${e} `+n.replace(/^/gm,`${t||``}#`):e}var i=class{};function a(e,t,n){if(Array.isArray(e))return e.map((e,t)=>a(e,String(t),n));if(e&&typeof e.toJSON==`function`){let r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});let i=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(i),i}return(!n||!n.keep)&&typeof e==`bigint`?Number(e):e}var o=class extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:a(this.value,e,t)}toString(){return String(this.value)}};function s(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else{let e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}var c=e=>e==null||typeof e==`object`&&e[Symbol.iterator]().next().done,l=class e extends i{constructor(e){super(),t._defineProperty(this,`items`,[]),this.schema=e}addIn(t,n){if(c(t))this.add(n);else{let[r,...i]=t,a=this.get(r,!0);if(a instanceof e)a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,s(this.schema,i,n));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn([t,...n]){if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(r instanceof e)return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn([t,...n],r){let i=this.get(t,!0);return n.length===0?!r&&i instanceof o?i.value:i:i instanceof e?i.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!==`PAIR`)return!1;let t=e.value;return t==null||t instanceof o&&t.value==null&&!t.commentBefore&&!t.comment&&!t.tag})}hasIn([t,...n]){if(n.length===0)return this.has(t);let r=this.get(t,!0);return r instanceof e?r.hasIn(n):!1}setIn([t,...n],r){if(n.length===0)this.set(t,r);else{let i=this.get(t,!0);if(i instanceof e)i.setIn(n,r);else if(i===void 0&&this.schema)this.set(t,s(this.schema,n,r));else throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}}toJSON(){return null}toString(n,{blockItem:i,flowChars:a,isMap:o,itemIndent:s},c,l){let{indent:u,indentStep:d,stringify:f}=n,p=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||n.inFlow;p&&(s+=d);let m=o&&this.hasAllNullValues();n=Object.assign({},n,{allNullValues:m,indent:s,inFlow:p,type:null});let h=!1,g=!1,_=this.items.reduce((e,t,i)=>{let a;t&&(!h&&t.spaceBefore&&e.push({type:`comment`,str:``}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach(t=>{e.push({type:`comment`,str:`#${t}`})}),t.comment&&(a=t.comment),p&&(!h&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(g=!0)),h=!1;let o=f(t,n,()=>a=null,()=>h=!0);return p&&!g&&o.includes(` `)&&(g=!0),p&&ie.str);if(g||r.reduce((e,t)=>e+t.length+2,2)>e.maxFlowStringSingleLineLength){v=t;for(let e of r)v+=e?` ${d}${u}${e}`:` `;v+=` ${u}${n}`}else v=`${t} ${r.join(` `)} ${n}`}else{let e=_.map(i);v=e.shift();for(let t of e)v+=t?` ${u}${t}`:` `}return this.comment?(v+=` `+this.comment.replace(/^/gm,`${u}#`),c&&c()):h&&l&&l(),v}};t._defineProperty(l,`maxFlowStringSingleLineLength`,60);function u(e){let t=e instanceof o?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}var d=class extends l{add(e){this.items.push(e)}delete(e){let t=u(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=u(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&r instanceof o?r.value:r}has(e){let t=u(e);return typeof t==`number`&&te.type===`comment`?e.str:`- ${e.str}`,flowChars:{start:`[`,end:`]`},isMap:!1,itemIndent:(e.indent||``)+` `},t,n):JSON.stringify(this)}},f=(e,t,n)=>t===null?``:typeof t==`object`?e instanceof i&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:``,indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t):String(t),p=class e extends i{constructor(t,n=null){super(),this.key=t,this.value=n,this.type=e.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(this.key??=new o(null),this.key instanceof i)this.key.commentBefore=e;else throw Error(`Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.`)}addToJSMap(e,t){let n=a(this.key,``,e);if(t instanceof Map){let r=a(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{let r=f(this.key,n,e),i=a(this.value,r,e);r in t?Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[r]=i}return t}toJSON(e,t){let n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,n,a){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:c,simpleKeys:u}=e.doc.options,{key:f,value:p}=this,m=f instanceof i&&f.comment;if(u){if(m)throw Error(`With simple keys, key nodes cannot have comments`);if(f instanceof l)throw Error(`With simple keys, collection cannot be used as a key value`)}let h=!u&&(!f||m||(f instanceof i?f instanceof l||f.type===t.Type.BLOCK_FOLDED||f.type===t.Type.BLOCK_LITERAL:typeof f==`object`)),{doc:g,indent:_,indentStep:v,stringify:y}=e;e=Object.assign({},e,{implicitKey:!h,indent:_+v});let b=!1,x=y(f,e,()=>m=null,()=>b=!0);if(x=r(x,e.indent,m),!h&&x.length>1024){if(u)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);h=!0}if(e.allNullValues&&!u)return this.comment?(x=r(x,e.indent,this.comment),n&&n()):b&&!m&&a&&a(),e.inFlow&&!h?x:`? ${x}`;x=h?`? ${x} ${_}:`:`${x}:`,this.comment&&(x=r(x,e.indent,this.comment),n&&n());let S=``,ee=null;if(p instanceof i){if(p.spaceBefore&&(S=` `),p.commentBefore){let t=p.commentBefore.replace(/^/gm,`${e.indent}#`);S+=` ${t}`}ee=p.comment}else p&&typeof p==`object`&&(p=g.schema.createNode(p,!0));e.implicitKey=!1,!h&&!this.comment&&p instanceof o&&(e.indentAtStart=x.length+1),b=!1,!c&&s>=2&&!e.inFlow&&!h&&p instanceof d&&p.type!==t.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));let C=y(p,e,()=>ee=null,()=>b=!0),w=` `;return S||this.comment?w=`${S} ${e.indent}`:!h&&p instanceof l?(!(C[0]===`[`||C[0]===`{`)||C.includes(` `))&&(w=` ${e.indent}`):C[0]===` `&&(w=``),b&&!ee&&a&&a(),r(x+w+C,e.indent,ee)}};t._defineProperty(p,`Type`,{PAIR:`PAIR`,MERGE_PAIR:`MERGE_PAIR`});var m=(e,t)=>{if(e instanceof h){let n=t.get(e.source);return n.count*n.aliasCount}else if(e instanceof l){let n=0;for(let r of e.items){let e=m(r,t);e>n&&(n=e)}return n}else if(e instanceof p){let n=m(e.key,t),r=m(e.value,t);return Math.max(n,r)}return 1},h=class e extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:i,inStringifyKey:a}){let o=Object.keys(n).find(e=>n[e]===t);if(!o&&a&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${i?` `:``}`;let s=r.anchors.getName(t)?`Alias node must be after source node`:`Source node not found for alias node`;throw Error(`${s} [${e}]`)}constructor(e){super(),this.source=e,this.type=t.Type.ALIAS}set tag(e){throw Error(`Alias nodes cannot have tags`)}toJSON(e,n){if(!n)return a(this.source,e,n);let{anchors:r,maxAliasCount:i}=n,o=r.get(this.source);if(!o||o.res===void 0){let e=`This should not happen: Alias anchor was not resolved?`;throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):ReferenceError(e)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=m(this.source,r)),o.count*o.aliasCount>i)){let e=`Excessive alias count indicates a resource exhaustion attack`;throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):ReferenceError(e)}return o.res}toString(t){return e.stringify(this,t)}};t._defineProperty(h,`default`,!0);function g(e,t){let n=t instanceof o?t.value:t;for(let r of e)if(r instanceof p&&(r.key===t||r.key===n||r.key&&r.key.value===n))return r}var _=class extends l{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);let n=g(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n)if(t)n.value=e.value;else throw Error(`Key ${e.key} already set`);else if(r){let t=this.items.findIndex(t=>r(e,t)<0);t===-1?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){let t=g(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=g(this.items,e),r=n&&n.value;return!t&&r instanceof o?r.value:r}has(e){return!!g(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){let r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(let e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!(e instanceof p))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:`{`,end:`}`},isMap:!0,itemIndent:e.indent||``},t,n)}},v=`<<`,y=class extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof d||(t=new d,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new o(v),new d);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(let{source:n}of this.value.items){if(!(n instanceof _))throw Error(`Merge sources must be maps`);let r=n.toJSON(null,e,Map);for(let[e,n]of r)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){let n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];let r=super.toString(e,t);return this.value=n,r}},b={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},x={trueStr:`true`,falseStr:`false`},S={asBigInt:!1},ee={nullStr:`null`},C={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function w(e,t,n){for(let{format:n,test:r,resolve:i}of t)if(r){let t=e.match(r);if(t){let e=i.apply(null,t);return e instanceof o||(e=new o(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new o(e)}var te=`flow`,T=`block`,E=`quoted`,ne=(e,t)=>{let n=e[t+1];for(;n===` `||n===` `;){do n=e[t+=1];while(n&&n!==` `);n=e[t+1]}return t};function D(e,t,n,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}){if(!i||i<0)return e;let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===T&&(h=ne(e,h),h!==-1&&(d=h+c));for(let t;t=e[h+=1];){if(n===E&&t===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(t===` `)n===T&&(h=ne(e,h)),d=h+c,f=void 0;else{if(t===` `&&p&&p!==` `&&p!==` `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==` `&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===E){for(;p===` `||p===` `;)p=t,t=e[h+=1],m=!0;let n=h>_+1?h-2:g-1;if(u[n])return e;l.push(n),u[n]=!0,d=n+c,f=void 0}else m=!0}p=t}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;re?Object.assign({indentAtStart:e},C.fold):C.fold,O=e=>/^(%|---|\.\.\.)/m.test(e);function ie(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;tr)return!0;if(n=t+1,i-n<=r)return!1}return!0}function k(e,t){let{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:i}=C.doubleQuoted,a=JSON.stringify(e);if(r)return a;let o=t.indent||(O(e)?` `:``),s=``,c=0;for(let e=0,t=a[e];t;t=a[++e])if(t===` `&&a[e+1]===`\\`&&a[e+2]===`n`&&(s+=a.slice(c,e)+`\\ `,e+=1,c=e,t=`\\`),t===`\\`)switch(a[e+1]){case`u`:{s+=a.slice(c,e);let t=a.substr(e+2,4);switch(t){case`0000`:s+=`\\0`;break;case`0007`:s+=`\\a`;break;case`000b`:s+=`\\v`;break;case`001b`:s+=`\\e`;break;case`0085`:s+=`\\N`;break;case`00a0`:s+=`\\_`;break;case`2028`:s+=`\\L`;break;case`2029`:s+=`\\P`;break;default:t.substr(0,2)===`00`?s+=`\\x`+t.substr(2):s+=a.substr(e,6)}e+=5,c=e+1}break;case`n`:if(n||a[e+2]===`"`||a.length`;if(!r)return u+` `;let d=``,f=``;if(r=r.replace(/[\n\t ]*$/,e=>{let t=e.indexOf(` `);return t===-1?u+=`-`:(r===e||t!==e.length-1)&&(u+=`+`,o&&o()),f=e.replace(/\n$/,``),``}).replace(/^[\n ]*/,e=>{e.indexOf(` `)!==-1&&(u+=c);let t=e.match(/ +$/);return t?(d=e.slice(0,-t[0].length),t[0]):(d=e,``)}),f&&=f.replace(/\n+(?!\n|$)/g,`$&${s}`),d&&=d.replace(/\n+/g,`$&${s}`),e&&(u+=` #`+e.replace(/ ?[\r\n]+/g,` `),a&&a()),!r)return`${u}${c} ${s}${f}`;if(l)return r=r.replace(/\n+/g,`$&${s}`),`${u} ${s}${d}${r}${f}`;r=r.replace(/\n+/g,` $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${s}`);let p=D(`${d}${r}${f}`,s,T,C.fold);return`${u} ${s}${p}`}function se(e,r,i,a){let{comment:o,type:s,value:c}=e,{actualString:l,implicitKey:u,indent:d,inFlow:f}=r;if(u&&/[\n[\]{},]/.test(c)||f&&/[[\]{},]/.test(c))return k(c,r);if(!c||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return u||f||c.indexOf(` `)===-1?c.indexOf(`"`)!==-1&&c.indexOf(`'`)===-1?ae(c,r):k(c,r):oe(e,r,i,a);if(!u&&!f&&s!==t.Type.PLAIN&&c.indexOf(` `)!==-1)return oe(e,r,i,a);if(d===``&&O(c))return r.forceBlockIndent=!0,oe(e,r,i,a);let p=c.replace(/\n+/g,`$& ${d}`);if(l){let{tags:e}=r.doc.schema;if(typeof w(p,e,e.scalarFallback).value!=`string`)return k(c,r)}let m=u?p:D(p,d,te,re(r));return o&&!f&&(m.indexOf(` `)!==-1||o.indexOf(` `)!==-1)?(i&&i(),n(m,d,o)):m}function ce(e,n,r,i){let{defaultType:a}=C,{implicitKey:o,inFlow:s}=n,{type:c,value:l}=e;typeof l!=`string`&&(l=String(l),e=Object.assign({},e,{value:l}));let u=a=>{switch(a){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return oe(e,n,r,i);case t.Type.QUOTE_DOUBLE:return k(l,n);case t.Type.QUOTE_SINGLE:return ae(l,n);case t.Type.PLAIN:return se(e,n,r,i);default:return null}};(c!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)||(o||s)&&(c===t.Type.BLOCK_FOLDED||c===t.Type.BLOCK_LITERAL))&&(c=t.Type.QUOTE_DOUBLE);let d=u(c);if(d===null&&(d=u(a),d===null))throw Error(`Unsupported default string type ${a}`);return d}function le({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);if(!isFinite(r))return isNaN(r)?`.nan`:r<0?`-.inf`:`.inf`;let i=JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(i)){let e=i.indexOf(`.`);e<0&&(e=i.length,i+=`.`);let n=t-(i.length-e-1);for(;n-- >0;)i+=`0`}return i}function ue(e,n){let r,i;switch(n.type){case t.Type.FLOW_MAP:r=`}`,i=`flow map`;break;case t.Type.FLOW_SEQ:r=`]`,i=`flow sequence`;break;default:e.push(new t.YAMLSemanticError(n,`Not a flow collection!?`));return}let a;for(let e=n.items.length-1;e>=0;--e){let r=n.items[e];if(!r||r.type!==t.Type.COMMENT){a=r;break}}if(a&&a.char!==r){let o=`Expected ${i} to end with ${r}`,s;typeof a.offset==`number`?(s=new t.YAMLSemanticError(n,o),s.offset=a.offset+1):(s=new t.YAMLSemanticError(a,o),a.range&&a.range.end&&(s.offset=a.range.end-a.range.start)),e.push(s)}}function de(e,n){let r=n.context.src[n.range.start-1];r!==` `&&r!==` `&&r!==` `&&e.push(new t.YAMLSemanticError(n,`Comments must be separated from other tokens by white space characters`))}function fe(e,n){let r=String(n),i=r.substr(0,8)+`...`+r.substr(-8);return new t.YAMLSemanticError(e,`The "${i}" key is too long`)}function pe(e,t){for(let{afterKey:n,before:r,comment:i}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),i===void 0?(n||!t.commentBefore)&&(t.spaceBefore=!0):t.commentBefore?t.commentBefore+=` `+i:t.commentBefore=i):i!==void 0&&(e.comment?e.comment+=` `+i:e.comment=i)}}function me(e,t){let n=t.strValue;return n?typeof n==`string`?n:(n.errors.forEach(n=>{n.source||=t,e.errors.push(n)}),n.str):``}function he(e,n){let{handle:r,suffix:i}=n.tag,a=e.tagPrefixes.find(e=>e.handle===r);if(!a){let i=e.getDefaults().tagPrefixes;if(i&&(a=i.find(e=>e.handle===r)),!a)throw new t.YAMLSemanticError(n,`The ${r} tag handle is non-default and was not declared.`)}if(!i)throw new t.YAMLSemanticError(n,`The ${r} tag has no suffix.`);if(r===`!`&&(e.version||e.options.version)===`1.0`){if(i[0]===`^`)return e.warnings.push(new t.YAMLWarning(n,`YAML 1.0 ^ tag expansion is not supported`)),i;if(/[:/]/.test(i)){let e=i.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${i}`}}return a.prefix+decodeURIComponent(i)}function ge(e,n){let{tag:r,type:i}=n,a=!1;if(r){let{handle:i,suffix:o,verbatim:s}=r;if(s){if(s!==`!`&&s!==`!!`)return s;let r=`Verbatim tags aren't resolved, so ${s} is invalid.`;e.errors.push(new t.YAMLSemanticError(n,r))}else if(i===`!`&&!o)a=!0;else try{return he(e,n)}catch(t){e.errors.push(t)}}switch(i){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return a?t.defaultTags.STR:null;default:return null}}function _e(e,t,n){let{tags:r}=e.schema,i=[];for(let a of r)if(a.tag===n)if(a.test)i.push(a);else{let n=a.resolve(e,t);return n instanceof l?n:new o(n)}let a=me(e,t);return typeof a==`string`&&i.length>0?w(a,i,r.scalarFallback):null}function ve({type:e}){switch(e){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}function ye(e,n,r){try{let t=_e(e,n,r);if(t)return r&&n.tag&&(t.tag=r),t}catch(t){return t.source||=n,e.errors.push(t),null}try{let i=ve(n);if(!i)throw Error(`The tag ${r} is unavailable`);let a=`The tag ${r} is unavailable, falling back to ${i}`;e.warnings.push(new t.YAMLWarning(n,a));let o=_e(e,n,i);return o.tag=r,o}catch(r){let i=new t.YAMLReferenceError(n,r.message);return i.stack=r.stack,e.errors.push(i),null}}var be=e=>{if(!e)return!1;let{type:n}=e;return n===t.Type.MAP_KEY||n===t.Type.MAP_VALUE||n===t.Type.SEQ_ITEM};function xe(e,n){let r={before:[],after:[]},i=!1,a=!1,o=be(n.context.parent)?n.context.parent.props.concat(n.props):n.props;for(let{start:s,end:c}of o)switch(n.context.src[s]){case t.Char.COMMENT:{n.commentHasRequiredWhitespace(s)||e.push(new t.YAMLSemanticError(n,`Comments must be separated from other tokens by white space characters`));let{header:i,valueRange:a}=n;(a&&(s>a.start||i&&s>i.start)?r.after:r.before).push(n.context.src.slice(s+1,c));break}case t.Char.ANCHOR:i&&e.push(new t.YAMLSemanticError(n,`A node can have at most one anchor`)),i=!0;break;case t.Char.TAG:a&&e.push(new t.YAMLSemanticError(n,`A node can have at most one tag`)),a=!0;break}return{comments:r,hasAnchor:i,hasTag:a}}function Se(e,n){let{anchors:r,errors:i,schema:a}=e;if(n.type===t.Type.ALIAS){let e=n.rawValue,a=r.getNode(e);if(!a){let r=`Aliased anchor not found: ${e}`;return i.push(new t.YAMLReferenceError(n,r)),null}let o=new h(a);return r._cstAliases.push(o),o}let o=ge(e,n);if(o)return ye(e,n,o);if(n.type!==t.Type.PLAIN){let e=`Failed to resolve ${n.type} node here`;return i.push(new t.YAMLSyntaxError(n,e)),null}try{return w(me(e,n),a.tags,a.tags.scalarFallback)}catch(e){return e.source||=n,i.push(e),null}}function Ce(e,n){if(!n)return null;n.error&&e.errors.push(n.error);let{comments:r,hasAnchor:i,hasTag:a}=xe(e.errors,n);if(i){let{anchors:t}=e,r=n.anchor,i=t.getNode(r);i&&(t.map[t.newName(r)]=i),t.map[r]=n}n.type===t.Type.ALIAS&&(i||a)&&e.errors.push(new t.YAMLSemanticError(n,`An alias node must not specify any properties`));let o=Se(e,n);if(o){o.range=[n.range.start,n.range.end],e.options.keepCstNodes&&(o.cstNode=n),e.options.keepNodeTypes&&(o.type=n.type);let t=r.before.join(` `);t&&(o.commentBefore=o.commentBefore?`${o.commentBefore} ${t}`:t);let i=r.after.join(` `);i&&(o.comment=o.comment?`${o.comment} ${i}`:i)}return n.resolved=o}function we(e,n){if(n.type!==t.Type.MAP&&n.type!==t.Type.FLOW_MAP){let r=`A ${n.type} node cannot be resolved as a mapping`;return e.errors.push(new t.YAMLSyntaxError(n,r)),null}let{comments:r,items:i}=n.type===t.Type.FLOW_MAP?Oe(e,n):De(e,n),a=new _;a.items=i,pe(a,r);let o=!1;for(let r=0;r{if(e instanceof h){let{type:n}=e.source;return n===t.Type.MAP||n===t.Type.FLOW_MAP?!1:o=`Merge nodes aliases can only point to maps`}return o=`Merge nodes can only have Alias nodes as values`}),o&&e.errors.push(new t.YAMLSemanticError(n,o))}else for(let o=r+1;o{if(i.length===0)return!1;let{start:a}=i[0];if(n&&a>n.valueRange.start||r[a]!==t.Char.COMMENT)return!1;for(let t=e;t0){r=new t.PlainValue(t.Type.PLAIN,[]),r.context={parent:c,src:c.context.src};let e=c.range.start+1;if(r.range={start:e,end:e},r.valueRange={start:e,end:e},typeof c.range.origStart==`number`){let e=c.range.origStart+1;r.range.origStart=r.range.origEnd=e,r.valueRange.origStart=r.valueRange.origEnd=e}}let s=new p(a,Ce(e,r));Ee(c,s),i.push(s),a&&typeof o==`number`&&c.range.start>o+1024&&e.errors.push(fe(n,a)),a=void 0,o=null}break;default:a!==void 0&&i.push(new p(a)),a=Ce(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let r=s+1;;++r){let i=n.items[r];switch(i&&i.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:e.errors.push(new t.YAMLSemanticError(c,`Implicit map keys need to be followed by map values`));break e}}c.valueRangeContainsNewline&&e.errors.push(new t.YAMLSemanticError(c,`Implicit map keys need to be on a single line`))}}return a!==void 0&&i.push(new p(a)),{comments:r,items:i}}function Oe(e,n){let r=[],i=[],a,o=!1,s=`{`;for(let c=0;ce instanceof p&&e.key instanceof l)&&e.warnings.push(new t.YAMLWarning(n,`Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.`)),n.resolved=a,a}function Ae(e,n){let r=[],i=[];for(let a=0;as+1024&&e.errors.push(fe(n,o));let{src:i}=l.context;for(let n=s;n{var t=ct(),n=ut(),r={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve:(e,r)=>{let i=n.resolveString(e,r);if(typeof Buffer==`function`)return Buffer.from(i,`base64`);if(typeof atob==`function`){let e=atob(i.replace(/[\n\r]/g,``)),t=new Uint8Array(e.length);for(let n=0;n{let c;if(typeof Buffer==`function`)c=i instanceof Buffer?i.toString(`base64`):Buffer.from(i.buffer).toString(`base64`);else if(typeof btoa==`function`){let e=``;for(let t=0;t1)throw new t.YAMLSemanticError(r,`Each pair must have its own sequence indicator`);let e=a.items[0]||new n.Pair;a.commentBefore&&(e.commentBefore=e.commentBefore?`${a.commentBefore} ${e.commentBefore}`:a.commentBefore),a.comment&&(e.comment=e.comment?`${a.comment} ${e.comment}`:a.comment),a=e}i.items[e]=a instanceof n.Pair?a:new n.Pair(a)}}return i}function a(e,t,r){let i=new n.YAMLSeq(e);i.tag=`tag:yaml.org,2002:pairs`;for(let n of t){let t,a;if(Array.isArray(n))if(n.length===2)t=n[0],a=n[1];else throw TypeError(`Expected [key, value] tuple: ${n}`);else if(n&&n instanceof Object){let e=Object.keys(n);if(e.length===1)t=e[0],a=n[t];else throw TypeError(`Expected { key: value } tuple: ${n}`)}else t=n;let o=e.createPair(t,a,r);i.items.push(o)}return i}var o={default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:i,createNode:a},s=class e extends n.YAMLSeq{constructor(){super(),t._defineProperty(this,`add`,n.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,`delete`,n.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,`get`,n.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,`has`,n.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,`set`,n.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){let r=new Map;t&&t.onCreate&&t.onCreate(r);for(let e of this.items){let i,a;if(e instanceof n.Pair?(i=n.toJSON(e.key,``,t),a=n.toJSON(e.value,i,t)):i=n.toJSON(e,``,t),r.has(i))throw Error(`Ordered maps must not include duplicate keys`);r.set(i,a)}return r}};t._defineProperty(s,`tag`,`tag:yaml.org,2002:omap`);function c(e,r){let a=i(e,r),o=[];for(let{key:e}of a.items)if(e instanceof n.Scalar){if(o.includes(e.value))throw new t.YAMLSemanticError(r,`Ordered maps must not include duplicate keys`);o.push(e.value)}return Object.assign(new s,a)}function l(e,t,n){let r=a(e,t,n),i=new s;return i.items=r.items,i}var u={identify:e=>e instanceof Map,nodeClass:s,default:!1,tag:`tag:yaml.org,2002:omap`,resolve:c,createNode:l},d=class e extends n.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){let t=e instanceof n.Pair?e:new n.Pair(e);n.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=n.findPair(this.items,e);return!t&&r instanceof n.Pair?r.key instanceof n.Scalar?r.key.value:r.key:r}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=n.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new n.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw Error(`Set items must all have null values`)}};t._defineProperty(d,`tag`,`tag:yaml.org,2002:set`);function f(e,r){let i=n.resolveMap(e,r);if(!i.hasAllNullValues())throw new t.YAMLSemanticError(r,`Set items must all have null values`);return Object.assign(new d,i)}function p(e,t,n){let r=new d;for(let i of t)r.items.push(e.createPair(i,null,n));return r}var m={identify:e=>e instanceof Set,nodeClass:d,default:!1,tag:`tag:yaml.org,2002:set`,resolve:f,createNode:p},h=(e,t)=>{let n=t.split(`:`).reduce((e,t)=>e*60+Number(t),0);return e===`-`?-n:n},g=({value:e})=>{if(isNaN(e)||!isFinite(e))return n.stringifyNumber(e);let t=``;e<0&&(t=`-`,e=Math.abs(e));let r=[e%60];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.map(e=>e<10?`0`+String(e):String(e)).join(`:`).replace(/000000\d*$/,``)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},v={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},y={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$`),resolve:(e,t,n,r,i,a,o,s,c)=>{s&&=(s+`00`).substr(1,3);let l=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(c&&c!==`Z`){let e=h(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,``)};function b(e){let t={};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<`u`?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<`u`?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function x(e,t){b(!1)&&console.warn(t?`${t}: ${e}`:e)}function S(e){b(!0)&&x(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,``).replace(/\.js$/,``).replace(/\\/g,`/`)}' will be removed in a future release.`,`DeprecationWarning`)}var ee={};function C(e,t){if(!ee[e]&&b(!0)){ee[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:`.`,x(n,`DeprecationWarning`)}}e.binary=r,e.floatTime=v,e.intTime=_,e.omap=u,e.pairs=o,e.set=m,e.timestamp=y,e.warn=x,e.warnFileDeprecation=S,e.warnOptionDeprecation=C}),ft=it(e=>{var t=ct(),n=ut(),r=dt();function i(e,t,r){let i=new n.YAMLMap(e);if(t instanceof Map)for(let[n,a]of t)i.items.push(e.createPair(n,a,r));else if(t&&typeof t==`object`)for(let n of Object.keys(t))i.items.push(e.createPair(n,t[n],r));return typeof e.sortMapEntries==`function`&&i.items.sort(e.sortMapEntries),i}var a={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:`tag:yaml.org,2002:map`,resolve:n.resolveMap};function o(e,t,r){let i=new n.YAMLSeq(e);if(t&&t[Symbol.iterator])for(let n of t){let t=e.createNode(n,r.wrapScalars,null,r);i.items.push(t)}return i}var s={createNode:o,default:!0,nodeClass:n.YAMLSeq,tag:`tag:yaml.org,2002:seq`,resolve:n.resolveSeq},c=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),n.stringifyString(e,t,r,i)},options:n.strOptions}],l=e=>typeof e==`bigint`||Number.isInteger(e),u=(e,t,r)=>n.intOptions.asBigInt?BigInt(e):parseInt(t,r);function d(e,t,r){let{value:i}=e;return l(i)&&i>=0?r+i.toString(t):n.stringifyNumber(e)}var f={identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},p={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]===`t`||e[0]===`T`,options:n.boolOptions,stringify:({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr},m={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:n.intOptions,stringify:e=>d(e,8,`0o`)},h={identify:l,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:n.intOptions,stringify:n.stringifyNumber},g={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:n.intOptions,stringify:e=>d(e,16,`0x`)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},v={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},y={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){let i=t||r,a=new n.Scalar(parseFloat(e));return i&&i[i.length-1]===`0`&&(a.minFractionDigits=i.length),a},stringify:n.stringifyNumber},b=c.concat([f,p,m,h,g,_,v,y]),x=e=>typeof e==`bigint`||Number.isInteger(e),S=({value:e})=>JSON.stringify(e),ee=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify:S},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:S},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true|false$/,resolve:e=>e===`true`,stringify:S},{identify:x,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>n.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>x(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:S}];ee.scalarFallback=e=>{throw SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var C=({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr,w=e=>typeof e==`bigint`||Number.isInteger(e);function te(e,t,r){let i=t.replace(/_/g,``);if(n.intOptions.asBigInt){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let t=BigInt(i);return e===`-`?BigInt(-1)*t:t}let a=parseInt(i,r);return e===`-`?-1*a:a}function T(e,t,r){let{value:i}=e;if(w(i)){let e=i.toString(t);return i<0?`-`+r+e.substr(1):r+e}return n.stringifyNumber(e)}var E={core:b,failsafe:c,json:ee,yaml11:c.concat([{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:C},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:C},{identify:w,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>te(t,n,2),stringify:e=>T(e,2,`0b`)},{identify:w,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>te(t,n,8),stringify:e=>T(e,8,`0`)},{identify:w,default:!0,tag:`tag:yaml.org,2002:int`,test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>te(t,n,10),stringify:n.stringifyNumber},{identify:w,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>te(t,n,16),stringify:e=>T(e,16,`0x`)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){let r=new n.Scalar(parseFloat(e.replace(/_/g,``)));if(t){let e=t.replace(/_/g,``);e[e.length-1]===`0`&&(r.minFractionDigits=e.length)}return r},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp)},ne={binary:r.binary,bool:p,float:y,floatExp:v,floatNaN:_,floatTime:r.floatTime,int:h,intHex:g,intOct:m,intTime:r.intTime,map:a,null:f,omap:r.omap,pairs:r.pairs,seq:s,set:r.set,timestamp:r.timestamp};function D(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)||e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function re(e,t,r){if(e instanceof n.Node)return e;let{defaultPrefix:i,onTagObj:o,prevObjects:c,schema:l,wrapScalars:u}=r;t&&t.startsWith(`!!`)&&(t=i+t.slice(2));let d=D(e,t,l.tags);if(!d){if(typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`)return u?new n.Scalar(e):e;d=e instanceof Map?a:e[Symbol.iterator]?s:a}o&&(o(d),delete r.onTagObj);let f={value:void 0,node:void 0};if(e&&typeof e==`object`&&c){let t=c.get(e);if(t){let e=new n.Alias(t);return r.aliasNodes.push(e),e}f.value=e,c.set(e,f)}return f.node=d.createNode?d.createNode(r.schema,e,r):u?new n.Scalar(e):e,t&&f.node instanceof n.Node&&(f.node.tag=t),f.node}function O(e,t,n,r){let i=e[r.replace(/\W/g,``)];if(!i){let t=Object.keys(e).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(let e of n)i=i.concat(e);else typeof n==`function`&&(i=n(i.slice()));for(let e=0;eJSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag "${n}"; use one of ${e}`)}i[e]=r}}return i}var ie=(e,t)=>e.keyt.key),k=class e{constructor({customTags:e,merge:t,schema:n,sortMapEntries:i,tags:a}){this.merge=!!t,this.name=n,this.sortMapEntries=i===!0?ie:i||null,!e&&a&&r.warnOptionDeprecation(`tags`,`customTags`),this.tags=O(E,ne,e||a,n)}createNode(t,n,r,i){let a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:n};return re(t,r,i?Object.assign(i,a):a)}createPair(e,t,r){r||={wrapScalars:!0};let i=this.createNode(e,r.wrapScalars,null,r),a=this.createNode(t,r.wrapScalars,null,r);return new n.Pair(i,a)}};t._defineProperty(k,`defaultPrefix`,t.defaultTagPrefix),t._defineProperty(k,`defaultTags`,t.defaultTags),e.Schema=k}),pt=it(e=>{var t=ct(),n=ut(),r=ft(),i={anchorPrefix:`a`,customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:`1.2`},a={get binary(){return n.binaryOptions},set binary(e){Object.assign(n.binaryOptions,e)},get bool(){return n.boolOptions},set bool(e){Object.assign(n.boolOptions,e)},get int(){return n.intOptions},set int(e){Object.assign(n.intOptions,e)},get null(){return n.nullOptions},set null(e){Object.assign(n.nullOptions,e)},get str(){return n.strOptions},set str(e){Object.assign(n.strOptions,e)}},o={"1.0":{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:t.defaultTagPrefix},{handle:`!!`,prefix:`tag:private.yaml.org,2002:`}]},1.1:{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]},1.2:{schema:`core`,merge:!1,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]}};function s(e,t){if((e.version||e.options.version)===`1.0`){let e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return`!`+e[1];let n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,``)}`}let n=e.tagPrefixes.find(e=>t.indexOf(e.prefix)===0);if(!n){let r=e.getDefaults().tagPrefixes;n=r&&r.find(e=>t.indexOf(e.prefix)===0)}if(!n)return t[0]===`!`?t:`!<${t}>`;let r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`})[e]);return n.handle+r}function c(e,t){if(t instanceof n.Alias)return n.Alias;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)||n[0]}let r,i;if(t instanceof n.Scalar){i=t.value;let n=e.filter(e=>e.identify&&e.identify(i)||e.class&&i instanceof e.class);r=n.find(e=>e.format===t.format)||n.find(e=>!e.format)}else i=t,r=e.find(e=>e.nodeClass&&i instanceof e.nodeClass);if(!r){let e=i&&i.constructor?i.constructor.name:typeof i;throw Error(`Tag not resolved for ${e} value`)}return r}function l(e,t,{anchors:n,doc:r}){let i=[],a=r.anchors.getName(e);return a&&(n[a]=e,i.push(`&${a}`)),e.tag?i.push(s(r,e.tag)):t.default||i.push(s(r,t.tag)),i.join(` `)}function u(e,t,r,i){let{anchors:a,schema:o}=t.doc,s;if(!(e instanceof n.Node)){let t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(let e of t.aliasNodes){e.source=e.source.node;let t=a.getName(e.source);t||(t=a.newName(),a.map[t]=e.source)}}if(e instanceof n.Pair)return e.toString(t,r,i);s||=c(o.tags,e);let u=l(e,s,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);let d=typeof s.stringify==`function`?s.stringify(e,t,r,i):e instanceof n.Scalar?n.stringifyString(e,t,r,i):e.toString(t,r,i);return u?e instanceof n.Scalar||d[0]===`{`||d[0]===`[`?`${u} ${d}`:`${u} ${t.indent}${d}`:d}var d=class e{static validAnchorNode(e){return e instanceof n.Scalar||e instanceof n.YAMLSeq||e instanceof n.YAMLMap}constructor(e){t._defineProperty(this,`map`,Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new n.Alias(e)}createMergePair(...e){let t=new n.Merge;return t.value.items=e.map(e=>{if(e instanceof n.Alias){if(e.source instanceof n.YAMLMap)return e}else if(e instanceof n.YAMLMap)return this.createAlias(e);throw Error(`Merge sources must be Map nodes or their Aliases`)}),t}getName(e){let{map:t}=this;return Object.keys(t).find(n=>t[n]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||=this.prefix;let t=Object.keys(this.map);for(let n=1;;++n){let r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){let{map:e,_cstAliases:t}=this;Object.keys(e).forEach(t=>{e[t]=e[t].resolved}),t.forEach(e=>{e.source=e.source.resolved}),delete this._cstAliases}setAnchor(t,n){if(t!=null&&!e.validAnchorNode(t))throw Error(`Anchors may only be set for Scalar, Seq and Map nodes`);if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw Error(`Anchor names must not contain whitespace or control characters`);let{map:r}=this,i=t&&Object.keys(r).find(e=>r[e]===t);if(i)if(n)i!==n&&(delete r[i],r[n]=t);else return i;else{if(!n){if(!t)return null;n=this.newName()}r[n]=t}return n}},f=(e,t)=>{if(e&&typeof e==`object`){let{tag:r}=e;e instanceof n.Collection?(r&&(t[r]=!0),e.items.forEach(e=>f(e,t))):e instanceof n.Pair?(f(e.key,t),f(e.value,t)):e instanceof n.Scalar&&r&&(t[r]=!0)}return t},p=e=>Object.keys(f(e,{}));function m(e,r){let i={before:[],after:[]},a,o=!1;for(let s of r)if(s.valueRange){if(a!==void 0){e.errors.push(new t.YAMLSyntaxError(s,`Document contains trailing content not separated by a ... or --- line`));break}let r=n.resolveNode(e,s);o&&=(r.spaceBefore=!0,!1),a=r}else s.comment===null?s.type===t.Type.BLANK_LINE&&(o=!0,a===void 0&&i.before.length>0&&!e.commentBefore&&(e.commentBefore=i.before.join(` `),i.before=[])):(a===void 0?i.before:i.after).push(s.comment);if(e.contents=a||null,!a)e.comment=i.before.concat(i.after).join(` `)||null;else{let t=i.before.join(` `);if(t){let e=a instanceof n.Collection&&a.items[0]?a.items[0]:a;e.commentBefore=e.commentBefore?`${t} ${e.commentBefore}`:t}e.comment=i.after.join(` `)||null}}function h({tagPrefixes:e},n){let[r,i]=n.parameters;if(!r||!i)throw new t.YAMLSemanticError(n,`Insufficient parameters given for %TAG directive`);if(e.some(e=>e.handle===r))throw new t.YAMLSemanticError(n,`The %TAG directive must only be given at most once per handle in the same document.`);return{handle:r,prefix:i}}function g(e,n){let[r]=n.parameters;if(n.name===`YAML:1.0`&&(r=`1.0`),!r)throw new t.YAMLSemanticError(n,`Insufficient parameters given for %YAML directive`);if(!o[r]){let i=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${r}`;e.warnings.push(new t.YAMLWarning(n,i))}return r}function _(e,n,r){let i=[],a=!1;for(let r of n){let{comment:n,name:o}=r;switch(o){case`TAG`:try{e.tagPrefixes.push(h(e,r))}catch(t){e.errors.push(t)}a=!0;break;case`YAML`:case`YAML:1.0`:e.version&&e.errors.push(new t.YAMLSemanticError(r,`The %YAML directive must only be given at most once per document.`));try{e.version=g(e,r)}catch(t){e.errors.push(t)}a=!0;break;default:if(o){let n=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new t.YAMLWarning(r,n))}}n&&i.push(n)}r&&!a&&(e.version||r.version||e.options.version)===`1.1`&&(e.tagPrefixes=r.tagPrefixes.map(({handle:e,prefix:t})=>({handle:e,prefix:t})),e.version=r.version),e.commentBefore=i.join(` `)||null}function v(e){if(e instanceof n.Collection)return!0;throw Error(`Expected a YAML collection as document contents`)}var y=class e{constructor(e){this.anchors=new d(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return v(this.contents),this.contents.add(e)}addIn(e,t){v(this.contents),this.contents.addIn(e,t)}delete(e){return v(this.contents),this.contents.delete(e)}deleteIn(e){return n.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(v(this.contents),this.contents.deleteIn(e))}getDefaults(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof n.Collection?this.contents.get(e,t):void 0}getIn(e,t){return n.isEmptyPath(e)?!t&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof n.Collection?this.contents.has(e):!1}hasIn(e){return n.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(e):!1}set(e,t){v(this.contents),this.contents.set(e,t)}setIn(e,t){n.isEmptyPath(e)?this.contents=t:(v(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;typeof e==`number`&&(e=e.toFixed(1)),e===`1.0`||e===`1.1`||e===`1.2`?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e==`string`&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);let n=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema(n)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type=`DOCUMENT`);let{directives:r=[],contents:i=[],directivesEndMarker:a,error:o,valueRange:s}=e;if(o&&(o.source||=this,this.errors.push(o)),_(this,r,n),a&&(this.directivesEndMarker=!0),this.range=s?[s.start,s.end]:null,this.setSchema(),this.anchors._cstAliases=[],m(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(let e of this.errors)e instanceof t.YAMLError&&e.makePretty();for(let e of this.warnings)e instanceof t.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return p(this.contents).filter(e=>e.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(e,t){if(e[0]!==`!`||e[e.length-1]!==`!`)throw Error(`Handle must start and end with !`);if(t){let n=this.tagPrefixes.find(t=>t.handle===e);n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter(t=>t.handle!==e)}toJSON(e,t){let{keepBlobsInJSON:r,mapAsMap:i,maxAliasCount:a}=this.options,o=r&&(typeof e!=`string`||!(this.contents instanceof n.Scalar)),s={doc:this,indentStep:` `,keep:o,mapAsMap:o&&!!i,maxAliasCount:a,stringify:u},c=Object.keys(this.anchors.map);c.length>0&&(s.anchors=new Map(c.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}])));let l=n.toJSON(this.contents,e,s);if(typeof t==`function`&&s.anchors)for(let{count:e,res:n}of s.anchors.values())t(n,e);return l}toString(){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let t=JSON.stringify(e);throw Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();let t=[],r=!1;if(this.version){let e=`%YAML 1.2`;this.schema.name===`yaml-1.1`&&(this.version===`1.0`?e=`%YAML:1.0`:this.version===`1.1`&&(e=`%YAML 1.1`)),t.push(e),r=!0}let i=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:e,prefix:n})=>{i.some(e=>e.indexOf(n)===0)&&(t.push(`%TAG ${e} ${n}`),r=!0)}),(r||this.directivesEndMarker)&&t.push(`---`),this.commentBefore&&((r||!this.directivesEndMarker)&&t.unshift(``),t.unshift(this.commentBefore.replace(/^/gm,`#`)));let a={anchors:Object.create(null),doc:this,indent:``,indentStep:` `.repeat(e),stringify:u},o=!1,s=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&t.push(``),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,`#`)),a.forceBlockIndent=!!this.comment,s=this.contents.comment);let e=s?null:()=>o=!0,i=u(this.contents,a,()=>s=null,e);t.push(n.addComment(i,``,s))}else this.contents!==void 0&&t.push(u(this.contents,a));return this.comment&&((!o||s)&&t[t.length-1]!==``&&t.push(``),t.push(this.comment.replace(/^/gm,`#`))),t.join(` `)+` `}};t._defineProperty(y,`defaults`,o),e.Document=y,e.defaultOptions=i,e.scalarOptions=a}),mt=it(e=>{var t=lt(),n=pt(),r=ft(),i=ct(),a=dt();ut();function o(e,t=!0,i){i===void 0&&typeof t==`string`&&(i=t,t=!0);let a=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(a).createNode(e,t,i)}var s=class extends n.Document{constructor(e){super(Object.assign({},n.defaultOptions,e))}};function c(e,n){let r=[],i;for(let a of t.parse(e)){let e=new s(n);e.parse(a,i),r.push(e),i=e}return r}function l(e,n){let r=t.parse(e),a=new s(n).parse(r[0]);return r.length>1&&a.errors.unshift(new i.YAMLSemanticError(r[1],`Source contains multiple documents; please use YAML.parseAllDocuments()`)),a}function u(e,t){let n=l(e,t);if(n.warnings.forEach(e=>a.warn(e)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function d(e,t){let n=new s(t);return n.contents=e,String(n)}e.YAML={createNode:o,defaultOptions:n.defaultOptions,Document:s,parse:u,parseAllDocuments:c,parseCST:t.parse,parseDocument:l,scalarOptions:n.scalarOptions,stringify:d}}),ht=it((e,t)=>{t.exports=mt().YAML}),gt=it(e=>{var t=ut(),n=ct();e.findPair=t.findPair,e.parseMap=t.resolveMap,e.parseSeq=t.resolveSeq,e.stringifyNumber=t.stringifyNumber,e.stringifyString=t.stringifyString,e.toJSON=t.toJSON,e.Type=n.Type,e.YAMLError=n.YAMLError,e.YAMLReferenceError=n.YAMLReferenceError,e.YAMLSemanticError=n.YAMLSemanticError,e.YAMLSyntaxError=n.YAMLSyntaxError,e.YAMLWarning=n.YAMLWarning}),_t={};at(_t,{__parsePrettierYamlConfig:()=>Da,languages:()=>jr,options:()=>Nr,parsers:()=>Pr,printers:()=>Ea});var vt=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function yt(e){return this[e<0?this.length+e:e]}var bt=vt(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return yt}),xt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},St=vt(`replaceAll`,function(){if(typeof this==`string`)return xt}),Ct=()=>{},wt=`string`,Tt=`array`,Et=`cursor`,Dt=`indent`,Ot=`align`,kt=`trim`,At=`group`,jt=`fill`,Mt=`if-break`,Nt=`indent-if-break`,Pt=`line-suffix`,Ft=`line-suffix-boundary`,It=`line`,Lt=`label`,Rt=`break-parent`,zt=new Set([Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt]);function Bt(e){if(typeof e==`string`)return wt;if(Array.isArray(e))return Tt;if(!e)return;let{type:t}=e;if(zt.has(t))return t}var Vt=Bt,Ht=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Ut(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(Vt(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=Ht([...zt].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${r}.`}var Wt=class extends Error{name=`InvalidDocError`;constructor(e){super(Ut(e)),this.doc=e}};function Gt(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(Vt(e)){case Tt:return t(e.map(r));case jt:return t({...e,parts:e.parts.map(r)});case Mt:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case At:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case Ot:case Dt:case Nt:case Lt:case Pt:return t({...e,contents:r(e.contents)});case wt:case Et:case kt:case Ft:case It:case Rt:return t(e);default:throw new Wt(e)}}}function Kt(e,t=un){return Gt(e,e=>typeof e==`string`?sn(t,e.split(` `)):e)}var qt=Ct,Jt=Ct,Yt=Ct,Xt=Ct;function Zt(e,t){return Xt(e),qt(t),{type:Ot,contents:t,n:e}}function Qt(e){return Zt(-1/0,e)}function $t(e){return Zt({type:`root`},e)}function en(e){return Zt(-1,e)}var tn={type:Rt};function nn(e){return Yt(e),{type:jt,parts:e}}function rn(e,t={}){return qt(e),Jt(t.expandedStates,!0),{type:At,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function an(e,t){return rn(e[0],{...t,expandedStates:e})}function on(e,t=``,n={}){return qt(e),t!==``&&qt(t),{type:Mt,breakContents:e,flatContents:t,groupId:n.groupId}}function sn(e,t){qt(e),Jt(t);let n=[];for(let r=0;r{let i=!!r?.backwards;if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&oe===` `||e===`\r`||e===`\u2028`||e===`\u2029`;function hn(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===` `)return t-2;if(mn(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===` `)return t+2;if(mn(i))return t+1}return t}var gn=hn;function _n(e,t){let n=t-1;n=pn(e,n,{backwards:!0}),n=gn(e,n,{backwards:!0}),n=pn(e,n,{backwards:!0});let r=gn(e,n,{backwards:!0});return n!==r}var vn=_n,yn=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},bn=`format`,xn=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Sn=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Cn=/^\s*@(?:format|prettier)\s*$/u,wn=e=>Cn.test(e),Tn=e=>Sn.test(e),En=e=>xn.test(e),Dn=e=>`# @${bn} ${e}`;function On(e,t){switch(e.type){case`comment`:if(wn(e.value))return null;break;case`quoteDouble`:case`quoteSingle`:t.type=`quote`;break;case`document`:t.directivesEndMarker||delete t.directivesEndMarker,t.documentEndMarker||delete t.documentEndMarker;break}}On.ignoredProperties=new Set([`position`]);var kn=On;function An(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,j]:void 0}}An.getVisitorKeys=()=>[];var jn=An,Mn=null;function Nn(e){if(Mn!==null&&typeof Mn.property){let e=Mn;return Mn=Nn.prototype=null,e}return Mn=Nn.prototype=e??Object.create(null),new Nn}var Pn=10;for(let e=0;e<=Pn;e++)Nn();function Fn(e){return Nn(e)}function In(e,t=`type`){Fn(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Ln=In,M=[[`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`key`,`value`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`content`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`]],Rn=Ln({root:M[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:M[0],documentBody:M[0],directive:M[1],alias:M[1],blockLiteral:M[1],blockFolded:M[0],plain:M[0],quoteSingle:M[1],quoteDouble:M[1],mapping:M[0],mappingItem:M[2],mappingKey:M[3],mappingValue:M[3],sequence:M[0],sequenceItem:M[3],flowMapping:M[0],flowMappingItem:M[2],flowSequence:M[0],flowSequenceItem:M[3],comment:M[1],tag:M[4],anchor:M[4]}),zn=e=>e.position.start.offset,Bn=e=>e.position.end.offset;function Vn(e){return Array.isArray(e)&&e.length>0}var Hn=Vn;function Un(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function Wn(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>Wn(n,t,e))}:e,n)}function Gn(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function Kn(e,t){let n=0,r=t.length;for(let i=e.position.end.offset-1;it===0&&t===n.length-1?e:t!==0&&t!==n.length-1?e.trim():t===0?e.trimEnd():e.trimStart());if(n.proseWrap===`preserve`)return r.map(e=>e?[e]:[]);let i=[];for(let[t,n]of r.entries()){let a=ir(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&bt(0,bt(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...bt(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function or(e,{parentIndent:t,isLastDescendant:n,options:r}){let i=e.position.start.line===e.position.end.line?``:r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],a;if(e.indent===null){let e=i.match(/^(? *)[^\n\r ]/mu);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(` `).map(e=>e.slice(a));if(r.proseWrap===`preserve`||e.type===`blockLiteral`)return c(o.map(e=>e?[e]:[]));let s=[];for(let[e,t]of o.entries()){let n=ir(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/u.test(n[0])&&!/^\s|\s$/u.test(bt(0,s,-1))?s[s.length-1]=[...bt(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/u.test(bt(0,t,-1))?t[t.length-1]+=` `+n:t.push(n);return t}),r.proseWrap===`never`&&(s=s.map(e=>[e.join(` `)])),c(s);function c(t){if(e.chomping===`keep`)return bt(0,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].length===0;e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function sr(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:case`alias`:case`flowMapping`:case`flowSequence`:return!0;default:return!1}}var cr=new WeakMap;function lr(e,t){let{node:n,root:r}=e,i;return cr.has(r)?i=cr.get(r):(i=new Set,cr.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),Kn(n,t)&&!ur(e.parent))?ln:``}function ur(e){return rr(e)&&!Un(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function dr(e,t){return Zt(` `.repeat(e),t)}function fr(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=qn(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),tr(r)&&o.push(` `,n(`indicatorComment`));let s=or(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(j),c.push(nn(sn(cn,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(Qt(t.length===0?j:un)):c.push(t.length===0?j:$t(un));return r.indent===null?o.push(en(dr(t.tabWidth,c))):o.push(Qt(dr(r.indent-1+i,c))),o}var pr=fr;function mr(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=ln;i&&r.children.length>0&&t.bracketSpacing&&(s=cn);let c=bt(0,r.children,-1),l=c?.type===`flowMappingItem`&&Zn(c.key)&&Zn(c.value);return[a,dr(t.tabWidth,[s,hr(e,t,n),t.trailingComma===`none`?``:on(`,`),rr(r)?[j,sn(j,e.map(n,`endComments`))]:``]),l?``:s,o]}function hr(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,cn,i.position.start.line===a.position.start.line?``:lr(e,t.originalText)]],`children`)}function gr(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=Zn(a),c=Zn(o);if(s&&c)return`: `;let l=n(`key`),u=vr(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&_r(a.content,t)&&!nr(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,dr(2,l)];let d=n(`value`);if(s)return[`: `,dr(2,d)];if($n(o)||!sr(a.content))return[`? `,dr(2,l),j,...e.map(()=>[n(),j],`value`,`leadingComments`),`: `,dr(2,d)];if(yr(a.content)&&!$n(a.content)&&!er(a.content)&&!nr(a.content)&&!rr(a)&&!$n(o.content)&&!er(o.content)&&!rr(o)&&_r(o.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=rn([on(`? `),rn(dr(2,l),{id:f})]),m=[j,`: `,dr(2,d)],h=[u,`:`];rr(o)&&o.content&&Un(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):$n(o.content)||rr(o)&&o.content&&!Un(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&nr(a.content)&&sr(o.content)||Un(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(j):o.content?h.push(cn):nr(o)&&h.push(` `),h.push(d);let g=dr(t.tabWidth,h);return _r(a.content,t)&&!$n(a.content)&&!er(a.content)&&!nr(a.content)&&!rr(a)?an([[l,g]]):an([[p,on(m,g,{groupId:f})]])}function _r(e,t){if(!e)return!0;switch(e.type){case`plain`:case`quoteSingle`:case`quoteDouble`:break;case`alias`:return!0;default:return!1}if(t.proseWrap===`preserve`)return e.position.start.line===e.position.end.line;if(/\\$/mu.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(` `);case`always`:return!/[\n ]/u.test(e.value);default:return!1}}function vr(e){return e.key.content?.type===`alias`}function yr(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:return e.position.start.line===e.position.end.line;case`alias`:return!0;default:return!1}}var br=gr;function xr(e){return Wn(e,Sr)}function Sr(e){switch(e.type){case`document`:Gn(e,`head`,()=>e.children[0]),Gn(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:Gn(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:Gn(e,`key`,()=>e.children[0]),Gn(e,`value`,()=>e.children[1]);break}return e}var Cr=xr;function wr(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&$n(r)&&i.push([sn(j,e.map(n,`leadingComments`)),j]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return Un(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!qn(e)&&(s=lr(e,t.originalText)),(a||o)&&(Un(r,[`sequence`,`mapping`])&&!er(r)?i.push(j):i.push(` `)),er(r)&&i.push([r.middleComments.length===1?``:j,sn(j,e.map(n,`middleComments`)),j]),Xn(e)?i.push(Kt(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(rn(Tr(e,t,n))),nr(r)&&!Un(r,[`document`,`documentHead`])&&i.push(dn([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&sr(r)?``:tn,n(`trailingComment`)])),ur(r)&&i.push(dr(r.type===`sequenceItem`?2:0,[j,sn(j,e.map(({node:e})=>[vn(t.originalText,zn(e))?j:``,n()],`endComments`))])),i.push(s),i}function Tr(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=Jn(r),i=!(Un(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(j),a.push(n()),Dr(e)&&(i&&a.push(j),a.push(`...`),nr(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(j),a}case`document`:{let t=[];return Or(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),nr(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Er(r)&&t.push(n(`body`)),sn(j,t)}case`documentHead`:return sn(j,[...e.map(n,`children`),...e.map(n,`endComments`)]);case`documentBody`:{let{children:i,endComments:a}=r,o=``;if(i.length>0&&a.length>0){let e=Jn(r);Un(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[j,j]):o=Un(bt(0,i,-1),[`mapping`])&&vn(t.originalText,zn(a[0]))?[j,j]:j}return[sn(j,e.map(n,`children`)),o,sn(j,e.map(n,`endComments`))]}case`directive`:return[`%`,sn(` `,[r.name,...r.parameters])];case`comment`:return[`#`,r.value];case`alias`:return[`*`,r.value];case`tag`:return t.originalText.slice(r.position.start.offset,r.position.end.offset);case`anchor`:return[`&`,r.value];case`plain`:return kr(r.type,t.originalText.slice(r.position.start.offset,r.position.end.offset),t);case`quoteDouble`:case`quoteSingle`:{let e=t.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type===`quoteSingle`&&e.includes(`\\`)||r.type===`quoteDouble`&&/\\[^"]/u.test(e)){let n=r.type===`quoteDouble`?`"`:`'`;return[n,kr(r.type,e,t),n]}if(e.includes(`"`))return[`'`,kr(r.type,r.type===`quoteDouble`?St(0,St(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,kr(r.type,r.type===`quoteSingle`?St(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,kr(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return pr(e,t,n);case`mapping`:case`sequence`:return sn(j,e.map(n,`children`));case`sequenceItem`:return[`- `,dr(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return br(e,t,n);case`flowMapping`:return mr(e,t,n);case`flowSequence`:return mr(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new yn(r,`YAML`)}}function Er(e){return e.body.children.length>0||rr(e.body)}function Dr(e){let t=e.node;if(t.documentEndMarker||nr(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||rr(n.head)}function Or(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||rr(t.head)||nr(t.head)}function kr(e,t,n){return sn(j,ar(e,t,n).map(e=>nn(sn(cn,e))))}var Ar={preprocess:Cr,embed:jn,print:wr,massageAstNode:kn,insertPragma:Dn,getVisitorKeys:Rn},jr=[{name:`YAML`,type:`data`,aceMode:`yaml`,extensions:[`.yml`,`.mir`,`.reek`,`.rviz`,`.sublime-syntax`,`.syntax`,`.yaml`,`.yaml-tmlanguage`,`.yaml.sed`,`.yml.mysql`],filenames:[`.clang-format`,`.clang-tidy`,`.clangd`,`.gemrc`,`CITATION.cff`,`glide.lock`,`pixi.lock`,`.prettierrc`,`.stylelintrc`,`.lintstagedrc`],tmScope:`source.yaml`,aliases:[`yml`],codemirrorMode:`yaml`,codemirrorMimeType:`text/x-yaml`,parsers:[`yaml`],vscodeLanguageIds:[`yaml`,`ansible`,`dockercompose`,`github-actions-workflow`,`home-assistant`],linguistLanguageId:407}],Mr={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.`}},Nr={bracketSpacing:Mr.bracketSpacing,singleQuote:Mr.singleQuote,proseWrap:Mr.proseWrap},Pr={};at(Pr,{yaml:()=>Ta});var Fr=st(ht(),1),Ir=st(gt(),1);Ir.default.findPair,Ir.default.toJSON,Ir.default.parseMap,Ir.default.parseSeq,Ir.default.stringifyNumber,Ir.default.stringifyString,Ir.default.Type,Ir.default.YAMLError,Ir.default.YAMLReferenceError;var Lr=Ir.default.YAMLSemanticError;Ir.default.YAMLSyntaxError,Ir.default.YAMLWarning;function Rr(e,t=null){`children`in e&&e.children.forEach(t=>Rr(t,e)),`anchor`in e&&e.anchor&&Rr(e.anchor,e),`tag`in e&&e.tag&&Rr(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>Rr(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>Rr(t,e)),`indicatorComment`in e&&e.indicatorComment&&Rr(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&Rr(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>Rr(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function zr(e){return`${e.line}:${e.column}`}function Br(e){Rr(e);let t=Vr(e),n=e.children.slice();e.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset).filter(e=>!e._parent).forEach(e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();Ur(e,t,n[0])})}function Vr(e){let t=Array.from(Array(e.position.end.line),()=>({}));for(let n of e.comments)t[n.position.start.line-1].comment=n;return Hr(t,e),t}function Hr(e,t){if(t.position.start.offset!==t.position.end.offset){if(`leadingComments`in t){let{start:n}=t.position,{leadingAttachableNode:r}=e[n.line-1];(!r||n.column1&&t.type!==`document`&&t.type!==`documentHead`){let{end:n}=t.position,{trailingAttachableNode:r}=e[n.line-1];(!r||n.column>=r.position.end.column)&&(e[n.line-1].trailingAttachableNode=t)}if(t.type!==`root`&&t.type!==`document`&&t.type!==`documentHead`&&t.type!==`documentBody`){let{start:n,end:r}=t.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let n of i){let i=e[n-1].trailingNode;(!i||r.column>=i.position.end.column)&&(e[n-1].trailingNode=t)}}`children`in t&&t.children.forEach(t=>{Hr(e,t)})}}function Ur(e,t,n){let r=e.position.start.line,{trailingAttachableNode:i}=t[r-1];if(i){if(i.trailingComment)throw Error(`Unexpected multiple trailing comment at ${zr(e.position.start)}`);Rr(e,i),i.trailingComment=e;return}for(let i=r;i>=n.position.start.line;i--){let{trailingNode:n}=t[i-1],a;if(n)a=n;else if(i!==r&&t[i-1].comment)a=t[i-1].comment._parent;else continue;if((a.type===`sequence`||a.type===`mapping`)&&(a=a.children[0]),a.type===`mappingItem`){let[e,t]=a.children;a=Gr(e)?e:t}for(;;){if(Wr(a,e)){Rr(e,a),a.endComments.push(e);return}if(!a._parent)break;a=a._parent}break}for(let i=r+1;i<=n.position.end.line;i++){let{leadingAttachableNode:n}=t[i-1];if(n){Rr(e,n),n.leadingComments.push(e);return}}let a=n.children[1];Rr(e,a),a.endComments.push(e)}function Wr(e,t){if(e.position.start.offsett.position.end.offset)switch(e.type){case`flowMapping`:case`flowSequence`:return e.children.length===0||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offsete.position.start.column;case`mappingKey`:case`mappingValue`:return t.position.start.column>e._parent.position.start.column&&(e.children.length===0||e.children.length===1&&e.children[0].type!==`blockFolded`&&e.children[0].type!==`blockLiteral`)&&(e.type===`mappingValue`||Gr(e));default:return!1}}function Gr(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function N(e,t){return{type:e,position:t}}function Kr(e,t,n){return{...N(`root`,e),children:t,comments:n}}function qr(e){switch(e.type){case`DOCUMENT`:for(let t=e.contents.length-1;t>=0;t--)e.contents[t].type===`BLANK_LINE`?e.contents.splice(t,1):qr(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)e.directives[t].type===`BLANK_LINE`&&e.directives.splice(t,1);break;case`FLOW_MAP`:case`FLOW_SEQ`:case`MAP`:case`SEQ`:for(let t=e.items.length-1;t>=0;t--){let n=e.items[t];`char`in n||(n.type===`BLANK_LINE`?e.items.splice(t,1):qr(n))}break;case`MAP_KEY`:case`MAP_VALUE`:case`SEQ_ITEM`:e.node&&qr(e.node);break;case`ALIAS`:case`BLANK_LINE`:case`BLOCK_FOLDED`:case`BLOCK_LITERAL`:case`COMMENT`:case`DIRECTIVE`:case`PLAIN`:case`QUOTE_DOUBLE`:case`QUOTE_SINGLE`:break;default:throw Error(`Unexpected node type ${JSON.stringify(e.type)}`)}}function Jr(e,t){return{start:e,end:t}}function Yr(e){return{start:e,end:e}}var Xr;(function(e){e.Tag=`!`,e.Anchor=`&`,e.Comment=`#`})(Xr||={});function Zr(e,t){return{...N(`anchor`,e),value:t}}function Qr(e,t){return{...N(`comment`,e),value:t}}function $r(e,t,n){return{anchor:t,tag:e,middleComments:n}}function ei(e,t){return{...N(`tag`,e),value:t}}function ti(e,t,n=()=>!1){let r=e.cstNode,i=[],a=null,o=null,s=null;for(let c of r.props){let l=t.text[c.origStart];switch(l){case Xr.Tag:a||=c,o=ei(t.transformRange(c),e.tag);break;case Xr.Anchor:a||=c,s=Zr(t.transformRange(c),r.anchor);break;case Xr.Comment:{let e=Qr(t.transformRange(c),t.text.slice(c.origStart+1,c.origEnd));t.comments.push(e),!n(e)&&a&&a.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&i.push(e);break}default:throw Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return $r(o,s,i)}function ni(){return{leadingComments:[]}}function ri(e=null){return{trailingComment:e}}function ii(){return{...ni(),...ri()}}function ai(e,t,n){return{...N(`alias`,e),...ii(),...t,value:n}}function oi(e,t){let n=e.cstNode;return ai(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function si(e){return{...e,type:`blockFolded`}}function ci(e,t,n,r,i,a){return{...N(`blockValue`,e),...ni(),...t,chomping:n,indent:r,value:i,indicatorComment:a}}var li;(function(e){e.CLIP=`clip`,e.STRIP=`strip`,e.KEEP=`keep`})(li||={});function ui(e,t){let n=e.cstNode,r=n.chomping===`CLIP`?0:1,i=n.header.origEnd-n.header.origStart-1-r!=0,a=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),o=null;return ci(a,ti(e,t,e=>{if(!(a.start.offset=0;i--){let c=e.contents[i];if(c.type===`COMMENT`){let i=t.transformNode(c);n&&n.line===i.position.start.line?o.unshift(i):s?r.unshift(i):i.position.start.offset>=e.valueRange.origEnd?a.unshift(i):r.unshift(i)}else s=!0}if(a.length>1)throw Error(`Unexpected multiple document trailing comments at ${zr(a[1].position.start)}`);if(o.length>1)throw Error(`Unexpected multiple documentHead trailing comments at ${zr(o[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:xi(a)||null,documentHeadTrailingComment:xi(o)||null}}function Ti(e,t,n){let r=Si(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=r===-1?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);n.text[i-1]===`\r`&&i--;let a=n.transformRange({origStart:t===null?i:t.position.start.offset,origEnd:i});return{position:a,documentEndPoint:r===-1?a.end:n.transformOffset(e.valueRange.origEnd+3)}}function Ei(e,t,n,r){return{...N(`documentHead`,e),...yi(n),...ri(r),children:t}}function Di(e,t){let n=e.cstNode,{directives:r,comments:i,endComments:a}=Oi(n,t),{position:o,documentEndMarkererPoint:s}=ki(n,r,t);return t.comments.push(...i,...a),{createDocumentHeadWithTrailingComment:e=>(e&&t.comments.push(e),Ei(o,r,a,e)),documentHeadEndMarkerPoint:s}}function Oi(e,t){let n=[],r=[],i=[],a=!1;for(let o=e.directives.length-1;o>=0;o--){let s=t.transformNode(e.directives[o]);s.type===`comment`?a?r.unshift(s):i.unshift(s):(a=!0,n.unshift(s))}return{directives:n,comments:r,endComments:i}}function ki(e,t,n){let r=Si(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return t.length!==0&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),documentEndMarkererPoint:r===-1?null:n.transformOffset(r)}}function Ai(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=Di(e,t),{documentBody:i,documentEndPoint:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Ci(e,t,r),c=n(s);o&&t.comments.push(o);let l=e.cstNode;return vi(Jr(c.position.start,a),!!l.directivesEndMarker,!!l.documentEndMarker,c,i,o)}function ji(e,t,n){return{...N(`flowCollection`,e),...ii(),...yi(),...t,children:n}}function Mi(e,t,n){return{...ji(e,t,n),type:`flowMapping`}}function Ni(e,t,n){return{...N(`flowMappingItem`,e),...ni(),children:[t,n]}}function Pi(e,t){let n=[];for(let r of e)r&&`type`in r&&r.type===`COMMENT`?t.comments.push(t.transformNode(r)):n.push(r);return n}function Fi(e){let[t,n]=[`?`,`:`].map(t=>{let n=e.find(e=>`char`in e&&e.char===t);return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null});return{additionalKeyRange:t,additionalValueRange:n}}function Ii(e,t){let n=t;return t=>e.slice(n,n=t)}function Li(e){let t=[],n=Ii(e,1),r=!1;for(let i=1;i{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=Fi(i);return Bi(e,t,Ni,a,o)}),a=n[0],o=xi(n);return Mi(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function Hi(e,t,n){return{...ji(e,t,n),type:`flowSequence`}}function Ui(e,t){return{...N(`flowSequenceItem`,e),children:[t]}}function Wi(e,t){let n=Pi(e.cstNode.items,t),r=Li(n),i=e.items.map((e,n)=>{if(e.type!==`PAIR`){let n=t.transformNode(e);return Ui(Jr(n.position.start,n.position.end),n)}else{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=Fi(i);return Bi(e,t,Ni,a,o)}}),a=n[0],o=xi(n);return Hi(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function Gi(e,t,n){return{...N(`mapping`,e),...ni(),...t,children:n}}function Ki(e,t,n){return{...N(`mappingItem`,e),...ni(),children:[t,n]}}function qi(e,t){let n=e.cstNode;n.items.filter(e=>e.type===`MAP_KEY`||e.type===`MAP_VALUE`).forEach(e=>gi(e,t));let r=Ji(Pi(n.items,t)),i=e.items.map((e,n)=>{let i=r[n],[a,o]=i[0].type===`MAP_VALUE`?[null,i[0].range]:[i[0].range,i.length===1?null:i[1].range];return Bi(e,t,Ki,a,o)});return Gi(Jr(i[0].position.start,xi(i).position.end),t.transformContent(e),i)}function Ji(e){let t=[],n=Ii(e,0),r=!1;for(let i=0;i=0;r--)if(n.test(e[r]))return r;return-1}function Zi(e,t){let n=e.cstNode;return Yi(t.transformRange({origStart:n.valueRange.origStart,origEnd:Xi(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function Qi(e){return{...e,type:`quoteDouble`}}function $i(e,t,n){return{...N(`quoteValue`,e),...t,...ii(),value:n}}function ea(e,t){let n=e.cstNode;return $i(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function ta(e,t){return Qi(ea(e,t))}function na(e){return{...e,type:`quoteSingle`}}function ra(e,t){return na(ea(e,t))}function ia(e,t,n){return{...N(`sequence`,e),...ni(),...yi(),...t,children:n}}function aa(e,t){return{...N(`sequenceItem`,e),...ii(),...yi(),children:t?[t]:[]}}function oa(e,t){let n=Pi(e.cstNode.items,t).map((n,r)=>{gi(n,t);let i=t.transformNode(e.items[r]);return aa(Jr(t.transformOffset(n.valueRange.origStart),i===null?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)});return ia(Jr(n[0].position.start,xi(n).position.end),t.transformContent(e),n)}function sa(e,t){if(e===null||e.type===void 0&&e.value===null)return null;switch(e.type){case`ALIAS`:return oi(e,t);case`BLOCK_FOLDED`:return di(e,t);case`BLOCK_LITERAL`:return pi(e,t);case`COMMENT`:return mi(e,t);case`DIRECTIVE`:return _i(e,t);case`DOCUMENT`:return Ai(e,t);case`FLOW_MAP`:return Vi(e,t);case`FLOW_SEQ`:return Wi(e,t);case`MAP`:return qi(e,t);case`PLAIN`:return Zi(e,t);case`QUOTE_DOUBLE`:return ta(e,t);case`QUOTE_SINGLE`:return ra(e,t);case`SEQ`:return oa(e,t);default:throw Error(`Unexpected node type ${e.type}`)}}var ca,la=class{text;comments=[];#e;#t;constructor(e,t){this.text=t,this.#e=e}setOrigRanges(){if(!this.#e.setOrigRanges())for(let e of this.#e)e.setOrigRanges([],0)}#n(e){if(!ca){let[e]=this.#e;ca=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(e)),`rangeAsLinePos`).get}if(this.#t??={root:{context:{src:this.text}}},this.text===``&&e.origStart===0&&e.origEnd===0)return{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}};let{start:{line:t,col:n},end:{line:r,col:i}}=ca.call({range:{start:this.#r(e.origStart),end:this.#r(e.origEnd)},context:this.#t});return{start:{offset:e.origStart,line:t,column:n},end:{offset:e.origEnd,line:r,column:i}}}#r(e){return e<0?0:e>this.text.length?this.text.length:e}transformOffset(e){return this.#n({origStart:e,origEnd:e}).start}transformRange(e){let{start:t,end:n}=this.#n(e);return Jr(t,n)}transformNode(e){return sa(e,this)}transformContent(e){return ti(e,this)}};function ua(e,t,n){let r=SyntaxError(e);return r.name=`YAMLSyntaxError`,r.source=t,r.position=n,r}function da(e,t){let n=e.source.range||e.source.valueRange;return ua(e.message,t.text,t.transformRange(n))}function fa(e){if(`children`in e){if(e.children.length===1){let t=e.children[0];if(t.type===`plain`&&t.tag===null&&t.anchor===null&&t.value===``)return e.children.splice(0,1),e}e.children.forEach(fa)}return e}function pa(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function ma(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(ma),e.type===`document`){let[t,n]=e.children;t.position.start.offset===t.position.end.offset?t.position.start=t.position.end=n.position.start:n.position.start.offset===n.position.end.offset&&(n.position.start=n.position.end=t.position.end)}let n=pa(e.position,ha,ga,ya),r=pa(e.position,_a,va,ba);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(xi(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=xi(i);n(e.position.start),r(t.position.end),`leadingComments`in e&&e.leadingComments.length!==0&&n(e.leadingComments[0].position.start),`tag`in e&&e.tag&&n(e.tag.position.start),`anchor`in e&&e.anchor&&n(e.anchor.position.start),`trailingComment`in t&&t.trailingComment&&r(t.trailingComment.position.end)}}function ha(e){return e.start}function ga(e,t){e.start=t}function _a(e){return e.end}function va(e,t){e.end=t}function ya(e,t){return t.offsete.offset}function xa(e){let t=Fr.default.parseCST(e),n=new la(t,e);n.setOrigRanges();let r=t.map(e=>new Fr.default.Document({merge:!1,keepCstNodes:!0}).parse(e));for(let e of r)for(let t of e.errors)if(!(t instanceof Lr&&t.message===`Map keys must be unique; "<<" is repeated`))throw da(t,n);r.forEach(e=>qr(e.cstNode));let i=Kr(n.transformRange({origStart:0,origEnd:e.length}),r.map(e=>n.transformNode(e)),n.comments);return Br(i),ma(i),fa(i),i}function Sa(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var Ca=Sa;function wa(e){try{let t=xa(e);return delete t.comments,t}catch(e){throw e?.position?Ca(e.message,{loc:e.position,cause:e}):e}}var Ta={astFormat:`yaml`,parse:wa,hasPragma:Tn,hasIgnorePragma:En,locStart:zn,locEnd:Bn},Ea={yaml:Ar},Da=st(ht(),1).default.parse,Oa=e({default:()=>ja,languages:()=>fv,options:()=>uv,printers:()=>dv}),ka=Object.defineProperty,Aa=(e,t)=>{for(var n in t)ka(e,n,{get:t[n],enumerable:!0})},ja={};Aa(ja,{languages:()=>fv,options:()=>uv,printers:()=>dv});var Ma=[{name:`JavaScript`,type:`programming`,aceMode:`javascript`,extensions:`.js,._js,.bones,.cjs,.es,.es6,.gs,.jake,.javascript,.jsb,.jscad,.jsfl,.jslib,.jsm,.jspre,.jss,.mjs,.njs,.pac,.sjs,.ssjs,.xsjs,.xsjslib,.start.frag,.end.frag,.wxs`.split(`,`),filenames:[`Jakefile`,`start.frag`,`end.frag`],tmScope:`source.js`,aliases:[`js`,`node`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`chakra`,`d8`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`,`zx`],parsers:[`babel`,`acorn`,`espree`,`meriyah`,`babel-flow`,`babel-ts`,`flow`,`typescript`],vscodeLanguageIds:[`javascript`,`mongo`],linguistLanguageId:183},{name:`Flow`,type:`programming`,aceMode:`javascript`,extensions:[`.js.flow`],filenames:[],tmScope:`source.js`,aliases:[],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`chakra`,`d8`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`],parsers:[`flow`,`babel-flow`],vscodeLanguageIds:[`javascript`],linguistLanguageId:183},{name:`JSX`,type:`programming`,aceMode:`javascript`,extensions:[`.jsx`],filenames:void 0,tmScope:`source.js.jsx`,aliases:void 0,codemirrorMode:`jsx`,codemirrorMimeType:`text/jsx`,interpreters:void 0,parsers:[`babel`,`babel-flow`,`babel-ts`,`flow`,`typescript`,`espree`,`meriyah`],vscodeLanguageIds:[`javascriptreact`],group:`JavaScript`,linguistLanguageId:183},{name:`TypeScript`,type:`programming`,aceMode:`typescript`,extensions:[`.ts`,`.cts`,`.mts`],tmScope:`source.ts`,aliases:[`ts`],codemirrorMode:`javascript`,codemirrorMimeType:`application/typescript`,interpreters:[`bun`,`deno`,`ts-node`,`tsx`],parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescript`],linguistLanguageId:378},{name:`TSX`,type:`programming`,aceMode:`tsx`,extensions:[`.tsx`],tmScope:`source.tsx`,codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],Na={};Aa(Na,{canAttachComment:()=>Dc,embed:()=>Jd,features:()=>$_,getVisitorKeys:()=>Io,handleComments:()=>Nl,hasPrettierIgnore:()=>fh,insertPragma:()=>mf,isBlockComment:()=>Bo,isGap:()=>Fl,massageAstNode:()=>bc,print:()=>Q_,printComment:()=>yf,printPrettierIgnored:()=>Q_,willPrintOwnComments:()=>Rl});var Pa=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),Fa=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Ia=Pa(`replaceAll`,function(){if(typeof this==`string`)return Fa});function La(e){return this[e<0?this.length+e:e]}var P=Pa(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return La});function Ra(e){return typeof e==`object`&&!!e}var za=Ra;function*Ba(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>za(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*Va(e,t){let n=[e];for(let e=0;e/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Wa(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Ga(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Ka=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,qa=/[^\x20-\x7F]/u,Ja=new Set(Ka);function Ya(e){if(!e)return 0;if(!qa.test(e))return e.length;e=e.replace(Ua(),e=>Ja.has(e)?` `:` `);let t=0;for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=Wa(e)||Ga(e)?2:1)}return t}var Xa=Ya;function Za(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&oe===` `||e===`\r`||e===`\u2028`||e===`\u2029`;function no(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===` `)return t-2;if(to(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===` `)return t+2;if(to(i))return t+1}return t}var ro=no;function io(e,t,n={}){let r=Qa(e,n.backwards?t-1:t,n);return r!==ro(e,r,n)}var ao=io;function oo(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n0}var F=po,mo=()=>{},ho=Object.freeze({character:`'`,codePoint:39}),go=Object.freeze({character:`"`,codePoint:34}),_o=Object.freeze({preferred:ho,alternate:go}),vo=Object.freeze({preferred:go,alternate:ho});function yo(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?_o:vo,{length:i}=e,a=0,o=0;for(let t=0;to?r:n).character}var bo=yo,xo=/\\(["'\\])|(["'])/gu;function So(e,t){let n=t===`"`?`'`:`"`;return t+Ia(0,e,xo,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var Co=So;function wo(e,t){/^(?["']).*\k$/su.test(e);let n=e.slice(1,-1),r=t.parser===`json`||t.parser===`jsonc`||t.parser===`json5`&&t.quoteProps===`preserve`&&!t.singleQuote?`"`:t.__isInHtmlAttribute?`'`:bo(n,t.singleQuote);return e.charAt(0)===r?e:Co(n,r)}var To=wo,Eo=e=>Number.isInteger(e)&&e>=0;function I(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(I(n),t):t}function L(e){return e.range?.[1]??e.end}function Do(e,t){let n=I(e);return Eo(n)&&n===I(t)}function Oo(e,t){let n=L(e);return Eo(n)&&n===L(t)}function ko(e,t){return Do(e,t)&&Oo(e,t)}var Ao=null;function jo(e){if(Ao!==null&&typeof Ao.property){let e=Ao;return Ao=jo.prototype=null,e}return Ao=jo.prototype=e??Object.create(null),new jo}var Mo=10;for(let e=0;e<=Mo;e++)jo();function No(e){return jo(e)}function Po(e,t=`type`){No(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Fo=Po,R=[[`decorators`,`key`,`typeAnnotation`,`value`],[],[`elementType`],[`expression`],[`expression`,`typeAnnotation`],[`left`,`right`],[`argument`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`,`superTypeParameters`],[`id`,`typeParameters`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`name`,`typeAnnotation`],[`test`,`consequent`,`alternate`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`value`],[`id`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`id`],[`id`,`typeParameters`,`extends`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`body`,`test`],[`members`],[`id`,`init`],[`exported`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`id`,`params`,`body`,`typeParameters`,`returnType`],[`key`,`value`],[`local`],[`objectType`,`indexType`],[`typeParameter`],[`types`],[`node`],[`object`,`property`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`literal`],[`decorators`,`key`,`value`],[`expressions`],[`qualification`,`id`],[`decorators`,`key`,`typeAnnotation`],[`typeParameters`,`params`,`returnType`],[`expression`,`typeArguments`],[`params`],[`parameterName`,`typeAnnotation`]],Io=Fo({AccessorProperty:R[0],AnyTypeAnnotation:R[1],ArgumentPlaceholder:R[1],ArrayExpression:[`elements`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrayTypeAnnotation:R[2],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],AsConstExpression:R[3],AsExpression:R[4],AssignmentExpression:R[5],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],AwaitExpression:R[6],BigIntLiteral:R[1],BigIntLiteralTypeAnnotation:R[1],BigIntTypeAnnotation:R[1],BinaryExpression:R[5],BindExpression:[`object`,`callee`],BlockStatement:R[7],BooleanLiteral:R[1],BooleanLiteralTypeAnnotation:R[1],BooleanTypeAnnotation:R[1],BreakStatement:R[8],CallExpression:R[9],CatchClause:[`param`,`body`],ChainExpression:R[3],ClassAccessorProperty:R[0],ClassBody:R[10],ClassDeclaration:R[11],ClassExpression:R[11],ClassImplements:R[12],ClassMethod:R[13],ClassPrivateMethod:R[13],ClassPrivateProperty:R[14],ClassProperty:R[14],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:R[15],ConditionalExpression:R[16],ConditionalTypeAnnotation:R[17],ContinueStatement:R[8],DebuggerStatement:R[1],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclaredPredicate:R[18],DeclareEnum:R[19],DeclareExportAllDeclaration:[`source`,`attributes`],DeclareExportDeclaration:R[20],DeclareFunction:[`id`,`predicate`],DeclareHook:R[21],DeclareInterface:R[22],DeclareModule:R[19],DeclareModuleExports:R[23],DeclareNamespace:R[19],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareTypeAlias:R[24],DeclareVariable:R[21],Decorator:R[3],Directive:R[18],DirectiveLiteral:R[1],DoExpression:R[10],DoWhileStatement:R[25],EmptyStatement:R[1],EmptyTypeAnnotation:R[1],EnumBigIntBody:R[26],EnumBigIntMember:R[27],EnumBooleanBody:R[26],EnumBooleanMember:R[27],EnumDeclaration:R[19],EnumDefaultedMember:R[21],EnumNumberBody:R[26],EnumNumberMember:R[27],EnumStringBody:R[26],EnumStringMember:R[27],EnumSymbolBody:R[26],ExistsTypeAnnotation:R[1],ExperimentalRestProperty:R[6],ExperimentalSpreadProperty:R[6],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportDefaultSpecifier:R[28],ExportNamedDeclaration:R[20],ExportNamespaceSpecifier:R[28],ExportSpecifier:[`local`,`exported`],ExpressionStatement:R[3],File:[`program`],ForInStatement:R[29],ForOfStatement:R[29],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:R[30],FunctionExpression:R[30],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:R[15],GenericTypeAnnotation:R[12],HookDeclaration:R[31],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],Identifier:[`typeAnnotation`,`decorators`],IfStatement:R[16],ImportAttribute:R[32],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:R[33],ImportExpression:[`source`,`options`],ImportNamespaceSpecifier:R[33],ImportSpecifier:[`imported`,`local`],IndexedAccessType:R[34],InferredPredicate:R[1],InferTypeAnnotation:R[35],InterfaceDeclaration:R[22],InterfaceExtends:R[12],InterfaceTypeAnnotation:[`extends`,`body`],InterpreterDirective:R[1],IntersectionTypeAnnotation:R[36],JsExpressionRoot:R[37],JsonRoot:R[37],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXClosingFragment:R[1],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:R[1],JSXExpressionContainer:R[3],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXIdentifier:R[1],JSXMemberExpression:R[38],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXOpeningFragment:R[1],JSXSpreadAttribute:R[6],JSXSpreadChild:R[3],JSXText:R[1],KeyofTypeAnnotation:R[6],LabeledStatement:[`label`,`body`],Literal:R[1],LogicalExpression:R[5],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:R[21],MatchExpression:R[39],MatchExpressionCase:R[40],MatchIdentifierPattern:R[21],MatchLiteralPattern:R[41],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:[`properties`,`rest`],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:R[6],MatchStatement:R[39],MatchStatementCase:R[40],MatchUnaryPattern:R[6],MatchWildcardPattern:R[1],MemberExpression:R[38],MetaProperty:[`meta`,`property`],MethodDefinition:R[42],MixedTypeAnnotation:R[1],ModuleExpression:R[10],NeverTypeAnnotation:R[1],NewExpression:R[9],NGChainedExpression:R[43],NGEmptyExpression:R[1],NGMicrosyntax:R[10],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:R[1],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:R[32],NGPipeExpression:[`left`,`right`,`arguments`],NGRoot:R[37],NullableTypeAnnotation:R[23],NullLiteral:R[1],NullLiteralTypeAnnotation:R[1],NumberLiteralTypeAnnotation:R[1],NumberTypeAnnotation:R[1],NumericLiteral:R[1],ObjectExpression:[`properties`],ObjectMethod:R[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],ObjectProperty:R[42],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeCallProperty:R[18],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:R[6],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],OptionalCallExpression:R[9],OptionalIndexedAccessType:R[34],OptionalMemberExpression:R[38],ParenthesizedExpression:R[3],PipelineBareFunction:[`callee`],PipelinePrimaryTopicReference:R[1],PipelineTopicExpression:R[3],Placeholder:R[1],PrivateIdentifier:R[1],PrivateName:R[21],Program:R[7],Property:R[32],PropertyDefinition:R[14],QualifiedTypeIdentifier:R[44],QualifiedTypeofIdentifier:R[44],RegExpLiteral:R[1],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:R[6],SatisfiesExpression:R[4],SequenceExpression:R[43],SpreadElement:R[6],StaticBlock:R[10],StringLiteral:R[1],StringLiteralTypeAnnotation:R[1],StringTypeAnnotation:R[1],Super:R[1],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],SymbolTypeAnnotation:R[1],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:R[1],TemplateLiteral:[`quasis`,`expressions`],ThisExpression:R[1],ThisTypeAnnotation:R[1],ThrowStatement:R[6],TopicReference:R[1],TryStatement:[`block`,`handler`,`finalizer`],TSAbstractAccessorProperty:R[45],TSAbstractKeyword:R[1],TSAbstractMethodDefinition:R[32],TSAbstractPropertyDefinition:R[45],TSAnyKeyword:R[1],TSArrayType:R[2],TSAsExpression:R[4],TSAsyncKeyword:R[1],TSBigIntKeyword:R[1],TSBooleanKeyword:R[1],TSCallSignatureDeclaration:R[46],TSClassImplements:R[47],TSConditionalType:R[17],TSConstructorType:R[46],TSConstructSignatureDeclaration:R[46],TSDeclareFunction:R[31],TSDeclareKeyword:R[1],TSDeclareMethod:[`decorators`,`key`,`typeParameters`,`params`,`returnType`],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSEnumBody:R[26],TSEnumDeclaration:R[19],TSEnumMember:[`id`,`initializer`],TSExportAssignment:R[3],TSExportKeyword:R[1],TSExternalModuleReference:R[3],TSFunctionType:R[46],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSImportType:[`options`,`qualifier`,`typeArguments`,`source`],TSIndexedAccessType:R[34],TSIndexSignature:[`parameters`,`typeAnnotation`],TSInferType:R[35],TSInstantiationExpression:R[47],TSInterfaceBody:R[10],TSInterfaceDeclaration:R[22],TSInterfaceHeritage:R[47],TSIntersectionType:R[36],TSIntrinsicKeyword:R[1],TSJSDocAllType:R[1],TSJSDocNonNullableType:R[23],TSJSDocNullableType:R[23],TSJSDocUnknownType:R[1],TSLiteralType:R[41],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSMethodSignature:[`key`,`typeParameters`,`params`,`returnType`],TSModuleBlock:R[10],TSModuleDeclaration:R[19],TSNamedTupleMember:[`label`,`elementType`],TSNamespaceExportDeclaration:R[21],TSNeverKeyword:R[1],TSNonNullExpression:R[3],TSNullKeyword:R[1],TSNumberKeyword:R[1],TSObjectKeyword:R[1],TSOptionalType:R[23],TSParameterProperty:[`parameter`,`decorators`],TSParenthesizedType:R[23],TSPrivateKeyword:R[1],TSPropertySignature:[`key`,`typeAnnotation`],TSProtectedKeyword:R[1],TSPublicKeyword:R[1],TSQualifiedName:R[5],TSReadonlyKeyword:R[1],TSRestType:R[23],TSSatisfiesExpression:R[4],TSStaticKeyword:R[1],TSStringKeyword:R[1],TSSymbolKeyword:R[1],TSTemplateLiteralType:[`quasis`,`types`],TSThisType:R[1],TSTupleType:[`elementTypes`],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSTypeAnnotation:R[23],TSTypeAssertion:R[4],TSTypeLiteral:R[26],TSTypeOperator:R[23],TSTypeParameter:[`name`,`constraint`,`default`],TSTypeParameterDeclaration:R[48],TSTypeParameterInstantiation:R[48],TSTypePredicate:R[49],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeReference:[`typeName`,`typeArguments`],TSUndefinedKeyword:R[1],TSUnionType:R[36],TSUnknownKeyword:R[1],TSVoidKeyword:R[1],TupleTypeAnnotation:[`types`,`elementTypes`],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeAlias:R[24],TypeAnnotation:R[23],TypeCastExpression:R[4],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeOperator:R[23],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:R[48],TypeParameterInstantiation:R[48],TypePredicate:R[49],UnaryExpression:R[6],UndefinedTypeAnnotation:R[1],UnionTypeAnnotation:R[36],UnknownTypeAnnotation:R[1],UpdateExpression:R[6],V8IntrinsicIdentifier:R[1],VariableDeclaration:[`declarations`],VariableDeclarator:R[27],Variance:R[1],VoidPattern:R[1],VoidTypeAnnotation:R[1],WhileStatement:R[25],WithStatement:[`object`,`body`],YieldExpression:R[6]});function Lo(e){let t=new Set(e);return e=>t.has(e?.type)}var z=Lo;function Ro(e){return e.extra?.raw??e.raw}var zo=Ro,Bo=z([`Block`,`CommentBlock`,`MultiLine`]),Vo=z([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),Ho=z([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function Uo(e,t){let n=t.split(`.`);for(let t=n.length-1;t>=0;t--){let r=n[t];if(t===0)return e.type===`Identifier`&&e.name===r;if(t===1&&e.type===`MetaProperty`&&e.property.type===`Identifier`&&e.property.name===r){e=e.meta;continue}if(e.type===`MemberExpression`&&!e.optional&&!e.computed&&e.property.type===`Identifier`&&e.property.name===r){e=e.object;continue}return!1}}function Wo(e,t){return t.some(t=>Uo(e,t))}var Go=Wo;function Ko({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var qo=Ko;function Jo({node:e,parent:t}){return e?.type===`EmptyStatement`?t.type===`IfStatement`?t.consequent===e||t.alternate===e:t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`LabeledStatement`||t.type===`WithStatement`||t.type===`WhileStatement`?t.body===e:!1:!1}var Yo=Jo;function Xo(e,t){return t(e)||Ha(e,{getVisitorKeys:Io,predicate:t})}function Zo(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||B(e)||V(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||uc(e)||e.type===`TSNonNullExpression`||e.type===`ChainExpression`}function Qo(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function $o(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 Error(`Unexpected node has no left side.`)}var es=z([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),ts=z([`ArrayExpression`]),ns=z([`ObjectExpression`]);function rs(e){return e.type===`LogicalExpression`&&e.operator===`??`}function is(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function as(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function os(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&is(e.argument)}function ss(e){return!!(e&&(e.type===`StringLiteral`||e.type===`Literal`&&typeof e.value==`string`))}function cs(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}var ls=z([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),us=z([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]),ds=z([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),fs=z([`FunctionExpression`,`ArrowFunctionExpression`]);function ps(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function ms(e){return B(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}var hs=z([`JSXElement`,`JSXFragment`]);function gs(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}function _s(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function vs(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!Do(e,e.typeAnnotation)}var ys=z([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]);function bs(e){return V(e)||e.type===`BindExpression`&&!!e.object}var xs=z([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function Ss(e){return qo(e)||Vo(e)||xs(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function Cs(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}var ws=`it,it.only,it.skip,describe,describe.only,describe.skip,test,test.only,test.skip,test.fixme,test.step,test.describe,test.describe.only,test.describe.skip,test.describe.fixme,test.describe.parallel,test.describe.parallel.only,test.describe.serial,test.describe.serial.only,skip,xit,xdescribe,xtest,fit,fdescribe,ftest`.split(`,`);function Ts(e){return Go(e,ws)}function Es(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=ec(e);if(n.length===1){if(ms(e)&&Es(t))return fs(n[0]);if(Cs(e.callee))return ms(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||ss(n[0]))&&Ts(e.callee))return n[2]&&!is(n[2])?!1:(n.length===2?fs(n[1]):ps(n[1])&&Zs(n[1]).length<=1)||ms(n[1]);return!1}var Ds=e=>t=>(t?.type===`ChainExpression`&&(t=t.expression),e(t)),B=Ds(z([`CallExpression`,`OptionalCallExpression`])),V=Ds(z([`MemberExpression`,`OptionalMemberExpression`]));function Os(e,t=5){return ks(e,t)<=t}function ks(e,t){let n=0;for(let r in e){let i=e[r];if(za(i)&&typeof i.type==`string`&&(n++,n+=ks(i,t-n)),n>t)return n}return n}var As=.25;function js(e,t){let{printWidth:n}=t;if(U(e))return!1;let r=n*As;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||os(e)&&!U(e.argument))return!0;let i=e.type===`Literal`&&`regex`in e&&e.regex.pattern||e.type===`RegExpLiteral`&&e.pattern;return i?i.length<=r:ss(e)?To(zo(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(` `):e.type===`UnaryExpression`?js(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:ls(e)}function Ms(e,t){return hs(t)?ic(t):U(t,H.Leading,t=>ao(e,L(t)))}function Ns(e){return e.quasis.some(e=>e.value.raw.includes(` `))}function Ps(e,t){return(e.type===`TemplateLiteral`&&Ns(e)||e.type===`TaggedTemplateExpression`&&Ns(e.quasi))&&!ao(t,I(e),{backwards:!0})}function Fs(e){if(!U(e))return!1;let t=P(0,oc(e,H.Dangling),-1);return t&&!Bo(t)}function Is(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(fs(n)){if(t+=1,t>1)return!0}else if(B(n)){for(let e of ec(n))if(fs(e))return!0}return!1}function Ls(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&B(t)&&B(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var Rs=new Set([`!`,`-`,`+`,`~`]);function zs(e,t=2){if(t<=0)return!1;if(e.type===`ChainExpression`||e.type===`TSNonNullExpression`)return zs(e.expression,t);let n=e=>zs(e,t-1);if(cs(e))return Xa(e.pattern??e.regex.pattern)<=5;if(ls(e)||us(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(` `))&&e.expressions.every(n);if(ns(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(ts(e))return e.elements.every(e=>e===null||n(e));if(cc(e)){if(e.type===`ImportExpression`||zs(e.callee,t)){let r=ec(e);return r.length<=t&&r.every(n)}return!1}return V(e)?zs(e.object,t)&&zs(e.property,t):e.type===`UnaryExpression`&&Rs.has(e.operator)||e.type===`UpdateExpression`?zs(e.argument,t):!1}function Bs(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function Vs(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return Vs(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return Vs(e.object,t);case`TaggedTemplateExpression`:return e.tag.type===`FunctionExpression`?!1:Vs(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type===`FunctionExpression`?!1:Vs(e.callee,t);case`ConditionalExpression`:return Vs(e.test,t);case`UpdateExpression`:return!e.prefix&&Vs(e.argument,t);case`BindExpression`:return e.object&&Vs(e.object,t);case`SequenceExpression`:return Vs(e.expressions[0],t);case`ChainExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`TSNonNullExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return Vs(e.expression,t);default:return t(e)}}var Hs={"==":!0,"!=":!0,"===":!0,"!==":!0},Us={"*":!0,"/":!0,"%":!0},Ws={">>":!0,">>>":!0,"<<":!0};function Gs(e,t){return!(qs(t)!==qs(e)||e===`**`||Hs[e]&&Hs[t]||t===`%`&&Us[e]||e===`%`&&Us[t]||t!==e&&Us[t]&&Us[e]||Ws[e]&&Ws[t])}var Ks=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function qs(e){return Ks.get(e)}function Js(e){return!!Ws[e]||e===`|`||e===`^`||e===`&`}function Ys(e){return e.rest?!0:P(0,Zs(e),-1)?.type===`RestElement`}var Xs=new WeakMap;function Zs(e){if(Xs.has(e))return Xs.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),Xs.set(e,t),t}function Qs(e,t){let{node:n}=e,r=0,i=()=>t(e,r++);n.this&&e.call(i,`this`),e.each(i,`params`),n.rest&&e.call(i,`rest`)}var $s=new WeakMap;function ec(e){if($s.has(e))return $s.get(e);if(e.type===`ChainExpression`)return ec(e.expression);let t;return e.type===`ImportExpression`||e.type===`TSImportType`?(t=[e.source],e.options&&t.push(e.options)):t=e.type===`TSExternalModuleReference`?[e.expression]:e.arguments,$s.set(e,t),t}function tc(e,t){let{node:n}=e;if(n.type===`ChainExpression`)return e.call(()=>tc(e,t),`expression`);n.type===`ImportExpression`||n.type===`TSImportType`?(e.call(()=>t(e,0),`source`),n.options&&e.call(()=>t(e,1),`options`)):n.type===`TSExternalModuleReference`?e.call(()=>t(e,0),`expression`):e.each(t,`arguments`)}function nc(e,t){let n=[];if(e.type===`ChainExpression`&&(e=e.expression,n.push(`expression`)),e.type===`ImportExpression`||e.type===`TSImportType`){if(t===0||t===(e.options?-2:-1))return[...n,`source`];if(e.options&&(t===1||t===-1))return[...n,`options`];throw RangeError(`Invalid argument index`)}else if(e.type===`TSExternalModuleReference`){if(t===0||t===-1)return[...n,`expression`]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&H.Leading&&!n.leading||e&H.Trailing&&!n.trailing||e&H.Dangling&&(n.leading||n.trailing)||e&H.Block&&!Bo(n)||e&H.Line&&!Ho(n)||e&H.First&&r!==0||e&H.Last&&r!==i.length-1||e&H.PrettierIgnore&&!rc(n)||t&&!t(n))};function U(e,t,n){if(!F(e?.comments))return!1;let r=ac(t,n);return r?e.comments.some(r):!0}function oc(e,t,n){if(!Array.isArray(e?.comments))return[];let r=ac(t,n);return r?e.comments.filter(r):e.comments}var sc=(e,{originalText:t})=>fo(t,L(e));function cc(e){return B(e)||e.type===`NewExpression`||e.type===`ImportExpression`}function lc(e){return e&&(e.type===`ObjectProperty`||e.type===`Property`&&!gs(e))}var uc=z([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),dc=z([`TSUnionType`,`UnionTypeAnnotation`]),fc=z([`TSIntersectionType`,`IntersectionTypeAnnotation`]),pc=z([`TSConditionalType`,`ConditionalTypeAnnotation`]),mc=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`,hc=z([`TSTypeAliasDeclaration`,`TypeAlias`]);function gc({key:e,parent:t}){return!(e===`types`&&dc(t)||e===`types`&&fc(t))}var _c=new Set([`range`,`raw`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`extra`,`start`,`end`,`loc`,`flags`,`errors`,`tokens`]),vc=e=>{for(let t of e.quasis)delete t.value};function yc(e,t,n){if(e.type===`Program`&&delete t.sourceType,(e.type===`BigIntLiteral`||e.type===`Literal`)&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!Yo({node:e,parent:n})||e.type===`JSXText`||e.type===`JSXExpressionContainer`&&(e.expression.type===`Literal`||e.expression.type===`StringLiteral`)&&e.expression.value===` `)return null;if((e.type===`Property`||e.type===`ObjectProperty`||e.type===`MethodDefinition`||e.type===`ClassProperty`||e.type===`ClassMethod`||e.type===`PropertyDefinition`||e.type===`TSDeclareMethod`||e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`||e.type===`ImportAttribute`)&&e.key&&!e.computed){let{key:n}=e;ss(n)||is(n)?t.key=String(n.value):n.type===`Identifier`&&(t.key=n.name)}if(e.type===`JSXElement`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.name===`jsx`))for(let{type:e,expression:n}of t.children)e===`JSXExpressionContainer`&&n.type===`TemplateLiteral`&&vc(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&vc(t.value.expression),e.type===`JSXAttribute`&&e.value?.type===`Literal`&&/["']|"|'/u.test(e.value.value)&&(t.value.value=Ia(0,e.value.value,/["']|"|'/gu,`"`));let r=e.expression||e.callee;if(e.type===`Decorator`&&r.type===`CallExpression`&&r.callee.name===`Component`&&r.arguments.length===1){let n=e.expression.arguments[0].properties;for(let[e,r]of t.expression.arguments[0].properties.entries())switch(n[e].key.name){case`styles`:ts(r.value)&&vc(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&vc(r.value);break}}e.type===`TaggedTemplateExpression`&&(e.tag.type===`MemberExpression`||e.tag.type===`Identifier`&&(e.tag.name===`gql`||e.tag.name===`graphql`||e.tag.name===`css`||e.tag.name===`md`||e.tag.name===`markdown`||e.tag.name===`html`)||e.tag.type===`CallExpression`)&&vc(t.quasi),e.type===`TemplateLiteral`&&vc(t),e.type===`ChainExpression`&&e.expression.type===`TSNonNullExpression`&&(t.type=`TSNonNullExpression`,t.expression.type=`ChainExpression`)}yc.ignoredProperties=_c;var bc=yc,xc=z([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),Sc=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!gs(t)&&t.value!==t.key,Cc=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&Zs(e).length===0&&!e.returnType&&!F(e.typeParameters)&&e.body),wc=(e,[t])=>t?.typeAnnotation===e&&mc(t),Tc=(e,[t,...n])=>wc(e,[t])||t?.typeName===e&&wc(t,n);function Ec(e,t){return xc(e)||Sc(e,t)||Cc(e,t)?!1:e.type===`EmptyStatement`?Yo({node:e,parent:t[0]}):!(Tc(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var Dc=Ec;function Oc(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function kc(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=Oc(e)}function W(e,t){t.leading=!0,t.trailing=!1,kc(e,t)}function Ac(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),kc(e,t)}function G(e,t){t.leading=!1,t.trailing=!0,kc(e,t)}function jc(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Qa(e,r),r=so(e,r),r=lo(e,r),r=ro(e,r);return r}var Mc=jc;function Nc(e,t){let n=Mc(e,t);return n===!1?``:e.charAt(n)}var Pc=Nc;function Fc(e,t,n){for(let r=t;rHo(e)||!Ic(t,I(e),L(e));function Vc(e){return[Cl,Qc,cl,sl,Xc,qc,Jc,Yc,el,gl,fl,pl,hl,_l,vl,nl,ll,ul,Zc,Dl,wl,Al].some(t=>t(e))}function Hc(e){return[Kc,cl,Qc,_l,qc,Jc,Yc,el,ll,dl,ml,hl,xl,ul,Tl,El,Ol,wl,jl,kl,Al].some(t=>t(e))}function Uc(e){return[Cl,qc,Jc,ol,nl,hl,al,il,ul,Sl,Al].some(t=>t(e))}function Wc(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?W(n,t):Ac(e,t)}function Gc(e,t){e.type===`BlockStatement`?Wc(e,t):W(e,t)}function Kc({comment:e,followingNode:t}){return t&&zc(e)?(W(t,e),!0):!1}function qc({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(n?.type!==`IfStatement`||!r)return!1;if(Pc(i,L(e))===`)`)return G(t,e),!0;if(r.type===`BlockStatement`&&r===n.consequent&&I(e)>=L(t)&&L(e)<=I(r))return W(r,e),!0;if(t===n.consequent&&r===n.alternate){let a=Mc(i,L(n.consequent));if(r.type===`BlockStatement`&&I(e)>=a&&L(e)<=I(r))return W(r,e),!0;if(I(e)`?(Ac(t,e),!0):!1}function ol({comment:e,enclosingNode:t,text:n}){return Pc(n,L(e))===`)`?t&&(Ml(t)&&Zs(t).length===0||cc(t)&&ec(t).length===0)?(Ac(t,e),!0):(t?.type===`MethodDefinition`||t?.type===`TSAbstractMethodDefinition`)&&Zs(t.value).length===0?(Ac(t.value,e),!0):!1:!1}function sl({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`ComponentTypeParameter`&&(n?.type===`DeclareComponent`||n?.type===`ComponentTypeAnnotation`)&&r?.type!==`ComponentTypeParameter`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&n?.type===`ComponentDeclaration`&&Pc(i,L(e))===`)`?(G(t,e),!0):!1}function cl({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`FunctionTypeParam`&&n?.type===`FunctionTypeAnnotation`&&r?.type!==`FunctionTypeParam`||(t?.type===`Identifier`||t?.type===`AssignmentPattern`||t?.type===`ObjectPattern`||t?.type===`ArrayPattern`||t?.type===`RestElement`||t?.type===`TSParameterProperty`)&&Ml(n)&&Pc(i,L(e))===`)`?(G(t,e),!0):!Bo(e)&&r?.type===`BlockStatement`&&rl(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&Mc(i,L(e))===I(r)?(Wc(r,e),!0):!1}function ll({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`?(W(t,e),!0):!1}function ul({comment:e,enclosingNode:t}){return(t?.type===`ContinueStatement`||t?.type===`BreakStatement`)&&!t.label?(G(t,e),!0):!1}function dl({comment:e,precedingNode:t,enclosingNode:n}){return B(n)&&t&&n.callee===t&&n.arguments.length>0?(W(n.arguments[0],e),!0):!1}function fl({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return dc(n)?(rc(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(G(t,e),!0):!1):(dc(r)&&rc(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function pl({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(rc(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(G(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&rc(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function ml({comment:e,enclosingNode:t}){return lc(t)?(W(t,e),!0):!1}function hl({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?Ac(n,e):W(n,e),!0):t?.type===`Program`&&t.body.length===0&&!F(t.directives)?(r?Ac(t,e):W(t,e),!0):!1}function gl({comment:e,enclosingNode:t,followingNode:n}){return(t?.type===`ForInStatement`||t?.type===`ForOfStatement`)&&n!==t.body?(W(t,e),!0):!1}function _l({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return W(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&ao(r,L(e))?(G(t,e),!0):!1}function vl({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`?(W(t,e),!0):!1}var yl=z([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),bl=z([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function xl({comment:e,enclosingNode:t,followingNode:n}){return yl(t)&&n&&(bl(n)||Bo(e))?(W(n,e),!0):!1}function Sl({comment:e,enclosingNode:t,precedingNode:n,followingNode:r,text:i}){return!r&&(t?.type===`TSMethodSignature`||t?.type===`TSDeclareFunction`||t?.type===`TSAbstractMethodDefinition`)&&(!n||n!==t.returnType)&&Pc(i,L(e))===`;`?(G(t,e),!0):!1}function Cl({comment:e,enclosingNode:t,followingNode:n}){if(rc(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function wl({comment:e,precedingNode:t,enclosingNode:n}){if(n?.type===`TSMappedType`&&!t)return Ac(n,e),!0}function Tl({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&Ho(e)?Wc(n,e):Ac(t,e),!0)}function El({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return dc(t)&&((n.type===`TSArrayType`||n.type===`ArrayTypeAnnotation`)&&!r||fc(n))?(G(P(0,t.types,-1),e),!0):!1}function Dl({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?G(n,e):Ac(t,e),!0}function Ol({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&Ic(i,I(n.argument),I(t.right))&&Bc(e,i)&&!Ic(i,I(t.right),I(e))?(G(t.right,e),!0):!1}function kl({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(dc(t)||fc(t)))return W(t,n),!0}function Al({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(uc(e)&&t===e.expression&&!Bc(r,i))return n?W(n,r):G(e,r),!0}function jl({comment:e,enclosingNode:t,followingNode:n,precedingNode:r}){return t&&n&&r&&t.type===`ArrowFunctionExpression`&&t.returnType===r&&(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`)?(W(n,e),!0):!1}var Ml=z([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`]),Nl={endOfLine:Hc,ownLine:Vc,remaining:Uc};function Pl(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=Ia(0,e,/[\s(]/gu,``),e===``||e===`/*`||e===`/*::`}var Fl=Pl,Il=z([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function Ll(e){let{key:t,parent:n}=e;if(t===`types`&&dc(n)||t===`argument`&&n.type===`JSXSpreadAttribute`||t===`expression`&&n.type===`JSXSpreadChild`||t===`superClass`&&(n.type===`ClassDeclaration`||n.type===`ClassExpression`)||(t===`id`||t===`typeParameters`)&&Il(n)||t===`patterns`&&n.type===`MatchOrPattern`)return!0;let{node:r}=e;return ic(r)?!1:dc(r)?gc(e):!!hs(r)}var Rl=Ll,zl=`string`,Bl=`array`,Vl=`cursor`,Hl=`indent`,Ul=`align`,Wl=`trim`,Gl=`group`,Kl=`fill`,ql=`if-break`,Jl=`indent-if-break`,Yl=`line-suffix`,Xl=`line-suffix-boundary`,Zl=`line`,Ql=`label`,$l=`break-parent`,eu=new Set([Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l]);function tu(e){if(typeof e==`string`)return zl;if(Array.isArray(e))return Bl;if(!e)return;let{type:t}=e;if(eu.has(t))return t}var nu=tu,ru=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function iu(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(nu(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=ru([...eu].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${r}.`}var au=class extends Error{name=`InvalidDocError`;constructor(e){super(iu(e)),this.doc=e}},ou={};function su(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===ou){n(i.pop());continue}n&&i.push(e,ou);let a=nu(e);if(!a)throw new au(e);if(t?.(e)!==!1)switch(a){case Bl:case Kl:{let t=a===Bl?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case ql:i.push(e.flatContents,e.breakContents);break;case Gl:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case Ul:case Hl:case Jl:case Ql:case Yl:i.push(e.contents);break;case zl:case Vl:case Wl:case Xl:case Zl:case $l:break;default:throw new au(e)}}}var cu=su;function lu(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(nu(e)){case Bl:return t(e.map(r));case Kl:return t({...e,parts:e.parts.map(r)});case ql:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case Gl:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case Ul:case Hl:case Jl:case Ql:case Yl:return t({...e,contents:r(e.contents)});case zl:case Vl:case Wl:case Xl:case Zl:case $l:return t(e);default:throw new au(e)}}}function uu(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return cu(e,a),r}function du(e){if(e.type===Gl&&e.break||e.type===Zl&&e.hard||e.type===$l)return!0}function fu(e){return uu(e,du,!1)}function pu(e){if(e.length>0){let t=P(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function mu(e){let t=new Set,n=[];function r(e){if(e.type===$l&&pu(n),e.type===Gl){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===Gl&&n.pop().break&&pu(n)}cu(e,r,i,!0)}function hu(e){return e.type===Zl&&!e.hard?e.soft?``:` `:e.type===ql?e.flatContents:e}function gu(e){return lu(e,hu)}function _u(e){switch(nu(e)){case Kl:if(e.parts.every(e=>e===``))return``;break;case Gl:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===Gl&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ul:case Hl:case Jl:case Yl:if(!e.contents)return``;break;case ql:if(!e.flatContents&&!e.breakContents)return``;break;case Bl:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof P(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case zl:case Vl:case Wl:case Xl:case Zl:case Ql:case $l:break;default:throw new au(e)}return e}function vu(e){return lu(e,e=>_u(e))}function yu(e,t=zu){return lu(e,e=>typeof e==`string`?Y(t,e.split(` `)):e)}function bu(e){if(e.type===Zl)return!0}function xu(e){return uu(e,bu,!1)}function Su(e,t){return e.type===Ql?{...e,contents:t(e.contents)}:t(e)}function Cu(e){let t=!0;return cu(e,e=>{switch(nu(e)){case zl:if(e===``)break;case Wl:case Xl:case Zl:case $l:return t=!1,!1}}),t}var wu=mo,Tu=mo,Eu=mo,Du=mo;function K(e){return wu(e),{type:Hl,contents:e}}function Ou(e,t){return Du(e),wu(t),{type:Ul,contents:t,n:e}}function ku(e){return Ou(-1/0,e)}function Au(e){return Ou(-1,e)}function ju(e,t,n){wu(e);let r=e;if(t>0){for(let e=0;e0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function Qu(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?Yu:{type:2,width:t}:{type:3,string:t},Zu(e,r,n)}function $u(e,t){return Zu(e,Ju,t)}function ed(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function td(e){let t=ed(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var nd=Symbol(`MODE_BREAK`),rd=Symbol(`MODE_FLAT`),id=Symbol(`DOC_FILL_PRINTED_LENGTH`);function ad(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=nu(u);switch(d){case zl:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=Xa(u));break;case Bl:case Kl:{let t=d===Bl?u:u.parts,n=u[id]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case Hl:case Ul:case Jl:case Ql:c.push({mode:e,doc:u.contents});break;case Wl:{let{text:e,count:t}=td(l);l=e,n+=t;break}case Gl:{if(a&&u.break)return!1;let t=u.break?nd:e,n=u.expandedStates&&t===nd?P(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case ql:{let t=(u.groupId?i[u.groupId]||rd:e)===nd?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case Zl:if(e===nd||u.hard)return!0;u.soft||(s=!0);break;case Yl:r=!0;break;case Xl:if(r)return!1;break}}return!1}function od(e,t){let n=Object.create(null),r=t.printWidth,i=qu(t.endOfLine),a=0,o=[{indent:Xu,mode:nd,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(mu(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(nu(f)){case zl:{let e=i===` `?f:Ia(0,f,` `,i);e&&(s+=e,o.length>0&&(a+=Xa(e)));break}case Bl:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case Vl:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case Hl:o.push({indent:$u(e,t),mode:d,doc:f.contents});break;case Ul:o.push({indent:Qu(e,f.n,t),mode:d,doc:f.contents});break;case Wl:_();break;case Gl:switch(d){case rd:if(!c){o.push({indent:e,mode:f.break?nd:rd,doc:f.contents});break}case nd:{c=!1;let t={indent:e,mode:rd,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&ad(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=P(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:nd,doc:t});break}else for(let r=1;r=f.expandedStates.length){o.push({indent:e,mode:nd,doc:t});break}else{let t={indent:e,mode:rd,doc:f.expandedStates[r]};if(ad(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:nd,doc:f.contents});break}}f.id&&(n[f.id]=P(0,o,-1).mode);break;case Kl:{let t=r-a,i=f[id]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:rd,doc:u},h={indent:e,mode:nd,doc:u},g=ad(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:rd,doc:p},v={indent:e,mode:nd,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[id]:i+2}},x=ad({indent:e,mode:rd,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case ql:case Jl:{let t=f.groupId?n[f.groupId]:d;if(t===nd){let t=f.type===ql?f.breakContents:f.negate?f.contents:K(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===rd){let t=f.type===ql?f.flatContents:f.negate?K(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case Yl:l.push({indent:e,mode:d,doc:f.contents});break;case Xl:l.length>0&&o.push({indent:e,mode:d,doc:Ru});break;case Zl:switch(d){case rd:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case nd:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length);break}break;case Ql:o.push({indent:e,mode:d,doc:f.contents});break;case $l:break;default:throw new au(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,P(0,h,-1))};function _(){let{text:e,count:t}=td(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function sd(e,t,n=0){let r=0;for(let i=n;i{if(a.push(n()),c.tail)return;let{tabWidth:l}=t,u=c.value.raw,d=u.includes(` `)?ud(u,l):s;s=d;let f=o[e],p=r[i][e],m=Ic(t.originalText,L(c),I(r.quasis[e+1]));if(!m){let e=od(f,{...t,printWidth:1/0}).formatted;e.includes(` `)?m=!0:f=e}m&&(U(p)||p.type===`Identifier`||V(p)||p.type===`ConditionalExpression`||p.type===`SequenceExpression`||uc(p)||ys(p))&&(f=[K([Z,f]),Z]);let h=d===0&&u.endsWith(` `)?Ou(-1/0,f):ju(f,d,l);a.push(q(["${",h,Vu,`}`]))},`quasis`),a.push("`"),a}function fd(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=oc(i.quasi,H.Leading)[0];return o&&(a=Ic(t.originalText,L(i.typeArguments??i.tag),I(o))?Z:` `),Lu(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,Vu,r])}function pd(e,t,n){let{node:r}=e,i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(e=>e.length>0)){t.__inJestEach=!0;let a=e.map(n,`expressions`);t.__inJestEach=!1;let o=a.map(e=>"${"+od(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted+`}`),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;ee.cells.length)),l=Array.from({length:c}).fill(0),u=[{cells:i},...s.filter(e=>e.cells.length>0)];for(let{cells:e}of u.filter(e=>!e.hasLineBreak))for(let[t,n]of e.entries())l[t]=Math.max(l[t],Xa(n));return[Vu,"`",K([Q,Y(Q,u.map(e=>Y(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-Xa(t))))))]),Q,"`"]}}function md(e,t){let{node:n}=e,r=t();return U(n)&&(r=q([K([Z,r]),Z])),["${",r,Vu,`}`]}function hd(e,t){return e.map(()=>md(e,t),`expressions`)}function gd(e,t){return lu(e,e=>typeof e==`string`?t?Ia(0,e,/(\\*)`/gu,"$1$1\\`"):_d(e):e)}function _d(e){return Ia(0,e,/([\\`]|\$\{)/gu,`\\$1`)}function vd({node:e,parent:t}){let n=/^[fx]?(?:describe|it|test)$/u;return t.type===`TaggedTemplateExpression`&&t.quasi===e&&t.tag.type===`MemberExpression`&&t.tag.property.type===`Identifier`&&t.tag.property.name===`each`&&(t.tag.object.type===`Identifier`&&n.test(t.tag.object.name)||t.tag.object.type===`MemberExpression`&&t.tag.object.property.type===`Identifier`&&(t.tag.object.property.name===`only`||t.tag.object.property.name===`skip`)&&t.tag.object.object.type===`Identifier`&&n.test(t.tag.object.object.name))}var yd=[(e,t)=>e.type===`ObjectExpression`&&t===`properties`,(e,t)=>e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`Component`&&t===`arguments`,(e,t)=>e.type===`Decorator`&&t===`expression`];function bd(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>lc(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>ts(e)&&t===`elements`,n,...yd)||e.match(t,n,...yd)}function xd(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>lc(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...yd)}function Sd(e,t){return U(e,H.Block|H.Leading,({value:e})=>e===` ${t} `)}function Cd({node:e,parent:t},n){return Sd(e,n)||wd(t)&&Sd(t,n)||t.type===`ExpressionStatement`&&Sd(t,n)}function wd(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function Td(e,t,n){let{node:r}=n,i=``;for(let[e,t]of r.quasis.entries()){let{raw:n}=t.value;e>0&&(i+=`@prettier-placeholder-`+(e-1)+`-id`),i+=n}let a=Ed(await e(i,{parser:`scss`}),hd(n,t));if(!a)throw Error(`Couldn't insert all the expressions`);return["`",K([Q,a]),Z,"`"]}function Ed(e,t){if(!F(t))return e;let n=0,r=lu(vu(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/u).map((e,r)=>r%2==0?yu(e):(n++,t[e])));return t.length===n?r:null}function Dd(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&Go(e.tag,[`css`,`css.global`,`css.resolve`]))||e.match(void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`,(e,t)=>t===`children`&&e.type===`JSXElement`&&e.openingElement.name.type===`JSXIdentifier`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.type===`JSXIdentifier`&&e.name.name===`jsx`))}function Od(e){return e.type===`Identifier`&&e.name===`styled`}function kd(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name===`extend`}function Ad({parent:e}){if(!e||e.type!==`TaggedTemplateExpression`)return!1;let t=e.tag.type===`ParenthesizedExpression`?e.tag.expression:e.tag;switch(t.type){case`MemberExpression`:return Od(t.object)||kd(t);case`CallExpression`:return Od(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(Od(t.callee.object.object)||kd(t.callee.object))||t.callee.object.type===`CallExpression`&&Od(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function jd({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var Md=e=>Dd(e)||Ad(e)||jd(e)||bd(e);async function Nd(e,t,n){let{node:r}=n,i=r.quasis.length,a=hd(n,t),o=[];for(let t=0;t2&&u[0].trim()===``&&u[1].trim()===``,m=d>2&&u[d-1].trim()===``&&u[d-2].trim()===``,h=u.every(e=>/^\s*(?:#[^\n\r]*)?$/u.test(e));if(!c&&/#[^\n\r]*$/u.test(u[d-1]))return null;let g=null;g=h?Pd(u):await e(l,{parser:`graphql`}),g?(g=gd(g,!1),!s&&p&&o.push(``),o.push(g),!c&&m&&o.push(``)):!s&&!c&&p&&o.push(``),f&&o.push(f)}return["`",K([Q,Y(Q,o)]),Q,"`"]}function Pd(e){let t=[],n=!1,r=e.map(e=>e.trim());for(let[e,i]of r.entries())i!==``&&(r[e-1]===``&&n?t.push([Q,i]):t.push(i),n=!0);return t.length===0?null:Y(Q,t)}function Fd({node:e,parent:t}){return Cd({node:e,parent:t},`GraphQL`)||t&&(t.type===`TaggedTemplateExpression`&&(t.tag.type===`MemberExpression`&&t.tag.object.name===`graphql`&&t.tag.property.name===`experimental`||t.tag.type===`Identifier`&&(t.tag.name===`gql`||t.tag.name===`graphql`))||t.type===`CallExpression`&&t.callee.type===`Identifier`&&t.callee.name===`graphql`)}var Id=0;async function Ld(e,t,n,r,i){let{node:a}=r,o=Id;Id=Id+1>>>0;let s=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${o}_IN_JS`,c=a.quasis.map((e,t,n)=>t===n.length-1?e.value.cooked:e.value.cooked+s(t)).join(``),l=hd(r,n),u=new RegExp(s(`(\\d+)`),`gu`),d=0,f=lu(await t(c,{parser:e,__onHtmlRoot(e){d=e.children.length}}),e=>{if(typeof e!=`string`)return e;let t=[],n=e.split(u);for(let e=0;e1?K(q(f)):q(f),m,"`"]))}function Rd(e){return Cd(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var zd=Ld.bind(void 0,`html`),Bd=Ld.bind(void 0,`angular`);async function Vd(e,t,n){let{node:r}=n,i=Ia(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=Hd(i),o=a!==``;o&&(i=Ia(0,i,RegExp(`^${a}`,`gmu`),``));let s=gd(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?K([Z,s]):[zu,ku(s)],Z,"`"]}function Hd(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?``:t[1]}function Ud({node:e,parent:t}){return t?.type===`TaggedTemplateExpression`&&e.quasis.length===1&&t.tag.type===`Identifier`&&(t.tag.name===`md`||t.tag.name===`markdown`)}var Wd=[{test:Md,print:Td},{test:Fd,print:Nd},{test:Rd,print:zd},{test:xd,print:Bd},{test:Ud,print:Vd}].map(({test:e,print:t})=>({test:e,print:Kd(t)}));function Gd(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||qd(t))return;let n=Wd.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function Kd(e){return async(...t)=>{let n=await e(...t);return n&&Lu({embed:!0,...n.label},n)}}function qd({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var Jd=Gd,Yd=/\*\/$/,Xd=/^\/\*\*?/,Zd=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Qd=/(^|\s+)\/\/([^\n\r]*)/g,$d=/^(\r?\n)+/,ef=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,tf=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,nf=/(\r?\n|^) *\* ?/g,rf=[];function af(e){let t=e.match(Zd);return t?t[0].trimStart():``}function of(e){let t=e.match(Zd)?.[0];return t==null?e:e.slice(t.length)}function sf(e){e=Ia(0,e.replace(Xd,``).replace(Yd,``),nf,`$1`);let t=``;for(;t!==e;)t=e,e=Ia(0,e,ef,` $1 $2 `);e=e.replace($d,``).trimEnd();let n=Object.create(null),r=Ia(0,e,tf,``).replace($d,``).trimEnd(),i;for(;i=tf.exec(e);){let e=Ia(0,i[2],Qd,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...rf,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function cf({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>lf(e,t[e])).map(e=>` * ${e} `).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${lf(n[0],e)[0]} */`}}let i=e.split(` `).map(e=>` * ${e}`).join(` `)+` `;return`/** `+(e?i:``)+(e&&n.length>0?` * `:``)+r+` */`}function lf(e,t){return[...rf,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var uf=`format`;function df(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(` `);return t===-1?e:e.slice(0,t)}var ff=df;function pf(e){let t=ff(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=sf(af(e));return{shebang:t,text:e,pragmas:n,comments:r}}function mf(e){let{shebang:t,text:n,pragmas:r,comments:i}=pf(e),a=of(n),o=cf({pragmas:{[uf]:``,...r},comments:i.trimStart()});return(t?`${t} `:``)+o+(a.startsWith(` `)?` `:` `)+a}function hf(e){if(!Bo(e))return!1;let t=`*${e.value}*`.split(` `);return t.length>1&&t.every(e=>e.trimStart()[0]===`*`)}var gf=new WeakMap;function _f(e){return gf.has(e)||gf.set(e,hf(e)),gf.get(e)}var vf=_f;function yf(e,t){let n=e.node;if(Ho(n))return t.originalText.slice(I(n),L(n)).trimEnd();if(vf(n))return bf(n);if(Bo(n))return[`/*`,yu(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function bf(e){let t=e.value.split(` `);return[`/*`,Y(Q,t.map((e,n)=>n===0?e.trimEnd():` `+(ne.type===`ForOfStatement`)?.left;if(t&&Vs(t,e=>e===n))return!0}if(r===`object`&&n.name===`let`&&i.type===`MemberExpression`&&i.computed&&!i.optional){let t=e.findAncestor(e=>e.type===`ExpressionStatement`||e.type===`ForStatement`||e.type===`ForInStatement`),r=t?t.type===`ExpressionStatement`?t.expression:t.type===`ForStatement`?t.init:t.left:void 0;if(r&&Vs(r,e=>e===n))return!0}if(r===`expression`)switch(n.name){case`await`:case`interface`:case`module`:case`using`:case`yield`:case`let`:case`component`:case`hook`:case`type`:{let t=e.findAncestor(e=>!uc(e));if(t!==i&&t.type===`ExpressionStatement`)return!0}}return!1}if(n.type===`ObjectExpression`||n.type===`FunctionExpression`||n.type===`ClassExpression`||n.type===`DoExpression`){let t=e.findAncestor(e=>e.type===`ExpressionStatement`)?.expression;if(t&&Vs(t,e=>e===n))return!0}if(n.type===`ObjectExpression`){let t=e.findAncestor(e=>e.type===`ArrowFunctionExpression`)?.body;if(t&&t.type!==`SequenceExpression`&&t.type!==`AssignmentExpression`&&Vs(t,e=>e===n))return!0}switch(i.type){case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(r===`superClass`&&(n.type===`ArrowFunctionExpression`||n.type===`AssignmentExpression`||n.type===`AwaitExpression`||n.type===`BinaryExpression`||n.type===`ConditionalExpression`||n.type===`LogicalExpression`||n.type===`NewExpression`||n.type===`ObjectExpression`||n.type===`SequenceExpression`||n.type===`TaggedTemplateExpression`||n.type===`UnaryExpression`||n.type===`UpdateExpression`||n.type===`YieldExpression`||n.type===`TSNonNullExpression`||n.type===`ClassExpression`&&F(n.decorators)))return!0;break;case`ExportDefaultDeclaration`:return Df(e,t)||n.type===`SequenceExpression`;case`Decorator`:if(r===`expression`&&!Af(n))return!0;break;case`TypeAnnotation`:if(e.match(void 0,void 0,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)&&wf(n))return!0;break;case`BinaryExpression`:if(r===`left`&&(i.operator===`in`||i.operator===`instanceof`)&&n.type===`UnaryExpression`)return!0;break;case`VariableDeclarator`:if(r===`init`&&e.match(void 0,void 0,(e,t)=>t===`declarations`&&e.type===`VariableDeclaration`,(e,t)=>t===`left`&&e.type===`ForInStatement`))return!0;break}switch(n.type){case`UpdateExpression`:if(i.type===`UnaryExpression`)return n.prefix&&(n.operator===`++`&&i.operator===`+`||n.operator===`--`&&i.operator===`-`);case`UnaryExpression`:switch(i.type){case`UnaryExpression`:return n.operator===i.operator&&(n.operator===`+`||n.operator===`-`);case`BindExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TaggedTemplateExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`BinaryExpression`:return r===`left`&&i.operator===`**`;case`TSNonNullExpression`:return!0;default:return!1}case`BinaryExpression`:if(i.type===`UpdateExpression`||n.operator===`in`&&Cf(e))return!0;if(n.operator===`|>`&&n.extra?.parenthesized){let t=e.grandparent;if(t.type===`BinaryExpression`&&t.operator===`|>`)return!0}case`TSTypeAssertion`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`LogicalExpression`:switch(i.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return!uc(n);case`ConditionalExpression`:return uc(n)||rs(n);case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:return r===`callee`;case`ClassExpression`:case`ClassDeclaration`:return r===`superClass`;case`TSTypeAssertion`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`JSXSpreadAttribute`:case`SpreadElement`:case`BindExpression`:case`AwaitExpression`:case`TSNonNullExpression`:case`UpdateExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||uc(n));case`LogicalExpression`:if(n.type===`LogicalExpression`)return i.operator!==n.operator;case`BinaryExpression`:{let{operator:e,type:t}=n;if(!e&&t!==`TSTypeAssertion`)return!0;let a=qs(e),o=i.operator,s=qs(o);return!!(s>a||r===`right`&&s===a||s===a&&!Gs(o,e)||s`);default:return!1}case`TSFunctionType`:if(e.match(e=>e.type===`TSFunctionType`,(e,t)=>t===`typeAnnotation`&&e.type===`TSTypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;case`TSConditionalType`:case`TSConstructorType`:case`ConditionalTypeAnnotation`:if(r===`extendsType`&&pc(n)&&i.type===n.type||r===`checkType`&&pc(i))return!0;if(r===`extendsType`&&i.type===`TSConditionalType`){let{typeAnnotation:e}=n.returnType||n.typeAnnotation;if(e.type===`TSTypePredicate`&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),e.type===`TSInferType`&&e.typeParameter.constraint)return!0}case`TSUnionType`:case`TSIntersectionType`:if(dc(i)||fc(i))return!0;case`TSInferType`:if(n.type===`TSInferType`){if(i.type===`TSRestType`)return!1;if(r===`types`&&(i.type===`TSUnionType`||i.type===`TSIntersectionType`)&&n.typeParameter.type===`TSTypeParameter`&&n.typeParameter.constraint)return!0}case`TSTypeOperator`:return i.type===`TSArrayType`||i.type===`TSOptionalType`||i.type===`TSRestType`||r===`objectType`&&i.type===`TSIndexedAccessType`||i.type===`TSTypeOperator`||i.type===`TSTypeAnnotation`&&e.grandparent.type.startsWith(`TSJSDoc`);case`TSTypeQuery`:return r===`objectType`&&i.type===`TSIndexedAccessType`||r===`elementType`&&i.type===`TSArrayType`;case`TypeOperator`:return i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||i.type===`TypeOperator`;case`TypeofTypeAnnotation`:return r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||r===`elementType`&&i.type===`ArrayTypeAnnotation`;case`ArrayTypeAnnotation`:return i.type===`NullableTypeAnnotation`;case`IntersectionTypeAnnotation`:case`UnionTypeAnnotation`:return i.type===`TypeOperator`||i.type===`KeyofTypeAnnotation`||i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||i.type===`IntersectionTypeAnnotation`||i.type===`UnionTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);case`InferTypeAnnotation`:case`NullableTypeAnnotation`:return i.type===`ArrayTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);case`ComponentTypeAnnotation`:case`FunctionTypeAnnotation`:{if(n.type===`ComponentTypeAnnotation`&&(n.rendersType===null||n.rendersType===void 0))return!1;if(e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypePredicate`,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;let t=i.type===`NullableTypeAnnotation`?e.grandparent:i;return t.type===`UnionTypeAnnotation`||t.type===`IntersectionTypeAnnotation`||t.type===`ArrayTypeAnnotation`||r===`objectType`&&(t.type===`IndexedAccessType`||t.type===`OptionalIndexedAccessType`)||r===`checkType`&&i.type===`ConditionalTypeAnnotation`||r===`extendsType`&&i.type===`ConditionalTypeAnnotation`&&n.returnType?.type===`InferTypeAnnotation`&&n.returnType?.typeParameter.bound||t.type===`NullableTypeAnnotation`||i.type===`FunctionTypeParam`&&i.name===null&&Zs(n).some(e=>e.typeAnnotation?.type===`NullableTypeAnnotation`)}case`OptionalIndexedAccessType`:return r===`objectType`&&i.type===`IndexedAccessType`;case`StringLiteral`:case`NumericLiteral`:case`Literal`:if(typeof n.value==`string`&&i.type===`ExpressionStatement`&&typeof i.directive!=`string`){let t=e.grandparent;return t.type===`Program`||t.type===`BlockStatement`}return r===`object`&&V(i)&&is(n);case`AssignmentExpression`:return!((r===`init`||r===`update`)&&i.type===`ForStatement`||r===`expression`&&n.left.type!==`ObjectPattern`&&i.type===`ExpressionStatement`||r===`key`&&i.type===`TSPropertySignature`||i.type===`AssignmentExpression`||r===`expressions`&&i.type===`SequenceExpression`&&e.match(void 0,void 0,(e,t)=>(t===`init`||t===`update`)&&e.type===`ForStatement`)||r===`value`&&i.type===`Property`&&e.match(void 0,void 0,(e,t)=>t===`properties`&&e.type===`ObjectPattern`)||i.type===`NGChainedExpression`||r===`node`&&i.type===`JsExpressionRoot`);case`ConditionalExpression`:switch(i.type){case`TaggedTemplateExpression`:case`UnaryExpression`:case`SpreadElement`:case`BinaryExpression`:case`LogicalExpression`:case`NGPipeExpression`:case`ExportDefaultDeclaration`:case`AwaitExpression`:case`JSXSpreadAttribute`:case`TSTypeAssertion`:case`TypeCastExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`ConditionalExpression`:return t.experimentalTernaries?!1:r===`test`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;default:return!1}case`FunctionExpression`:switch(i.type){case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`TaggedTemplateExpression`:return!0;default:return!1}case`ArrowFunctionExpression`:switch(i.type){case`BinaryExpression`:return i.operator!==`|>`||n.extra?.parenthesized;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:case`BindExpression`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`LogicalExpression`:case`AwaitExpression`:case`TSTypeAssertion`:case`MatchExpressionCase`:return!0;case`TSInstantiationExpression`:return r===`expression`;case`ConditionalExpression`:return r===`test`;default:return!1}case`ClassExpression`:switch(i.type){case`NewExpression`:return r===`callee`;default:return!1}case`OptionalMemberExpression`:case`OptionalCallExpression`:case`CallExpression`:case`MemberExpression`:if(Of(e))return!0;case`TaggedTemplateExpression`:case`TSNonNullExpression`:if(r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)){let e=n;for(;e;)switch(e.type){case`CallExpression`:case`OptionalCallExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:case`BindExpression`:e=e.object;break;case`TaggedTemplateExpression`:e=e.tag;break;case`TSNonNullExpression`:e=e.expression;break;default:return!1}}return!1;case`BindExpression`:return r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)||r===`object`&&V(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||ts(i)||r===`arguments`&&B(i)||r===`right`&&i.type===`NGPipeExpression`||r===`property`&&i.type===`MemberExpression`||i.type===`AssignmentExpression`);case`JSXFragment`:case`JSXElement`:return r===`callee`||r===`left`&&i.type===`BinaryExpression`&&i.operator===`<`||!ts(i)&&i.type!==`ArrowFunctionExpression`&&i.type!==`AssignmentExpression`&&i.type!==`AssignmentPattern`&&i.type!==`BinaryExpression`&&i.type!==`NewExpression`&&i.type!==`ConditionalExpression`&&i.type!==`ExpressionStatement`&&i.type!==`JsExpressionRoot`&&i.type!==`JSXAttribute`&&i.type!==`JSXElement`&&i.type!==`JSXExpressionContainer`&&i.type!==`JSXFragment`&&i.type!==`LogicalExpression`&&!B(i)&&!lc(i)&&i.type!==`ReturnStatement`&&i.type!==`ThrowStatement`&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`;case`TSInstantiationExpression`:return r===`object`&&V(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var Sf=z(`BlockStatement.BreakStatement.ComponentDeclaration.ClassBody.ClassDeclaration.ClassMethod.ClassProperty.PropertyDefinition.ClassPrivateProperty.ContinueStatement.DebuggerStatement.DeclareComponent.DeclareClass.DeclareExportAllDeclaration.DeclareExportDeclaration.DeclareFunction.DeclareHook.DeclareInterface.DeclareModule.DeclareModuleExports.DeclareNamespace.DeclareVariable.DeclareEnum.DoWhileStatement.EnumDeclaration.ExportAllDeclaration.ExportDefaultDeclaration.ExportNamedDeclaration.ExpressionStatement.ForInStatement.ForOfStatement.ForStatement.FunctionDeclaration.HookDeclaration.IfStatement.ImportDeclaration.InterfaceDeclaration.LabeledStatement.MethodDefinition.ReturnStatement.SwitchStatement.ThrowStatement.TryStatement.TSDeclareFunction.TSEnumDeclaration.TSImportEqualsDeclaration.TSInterfaceDeclaration.TSModuleDeclaration.TSNamespaceExportDeclaration.TypeAlias.VariableDeclaration.WhileStatement.WithStatement`.split(`.`));function Cf(e){let t=0,{node:n}=e;for(;n;){let r=e.getParentNode(t++);if(r?.type===`ForStatement`&&r.init===n)return!0;n=r}return!1}function wf(e){return Xo(e,e=>e.type===`ObjectTypeAnnotation`&&Xo(e,e=>e.type===`FunctionTypeAnnotation`))}function Tf(e){return ns(e)}function Ef(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(Ef);break;case`ObjectProperty`:if(n===`value`)return e.callParent(()=>e.key===`properties`&&e.isLast);break;case`BinaryExpression`:case`LogicalExpression`:if(n===`right`)return e.callParent(Ef);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(Ef);break;case`UnaryExpression`:if(t.prefix)return e.callParent(Ef);break}return!1}function Df(e,t){let{node:n,parent:r}=e;return n.type===`FunctionExpression`||n.type===`ClassExpression`?r.type===`ExportDefaultDeclaration`||!xf(e,t):!Zo(n)||r.type!==`ExportDefaultDeclaration`&&xf(e,t)?!1:e.call(()=>Df(e,t),...$o(n))}function Of(e){return!!(e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&(e.type===`CallExpression`||e.type===`NewExpression`))||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`)||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`)&&(e.match(void 0,void 0,(e,t)=>t===`callee`&&(e.type===`CallExpression`&&!e.optional||e.type===`NewExpression`)||t===`object`&&e.type===`MemberExpression`&&!e.optional)||e.match(void 0,void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))}function kf(e){return e.type===`Identifier`?!0:V(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&kf(e.object):!1}function Af(e){return e.type===`ChainExpression`&&(e=e.expression),kf(e)||B(e)&&!e.optional&&kf(e.callee)}var jf=xf;function Mf(e,t){let n=t-1;n=Qa(e,n,{backwards:!0}),n=ro(e,n,{backwards:!0}),n=Qa(e,n,{backwards:!0});let r=ro(e,n,{backwards:!0});return n!==r}var Nf=Mf,Pf=()=>!0;function Ff(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function If(e,t){let n=e.node,r=[Ff(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=ao(a,s(n))?ao(a,o(n),{backwards:!0})?Q:X:` `;r.push(e)}else r.push(Q);let c=ro(a,Qa(a,s(n)));return c!==!1&&ao(a,c)&&r.push(Q),r}function Lf(e,t,n){let r=e.node,i=Ff(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||ao(o,s(r),{backwards:!0})?{doc:Bu([Q,Nf(o,s(r))?Q:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[Bu([` `,i]),Mu],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function $(e,t,n={}){let{node:r}=e;if(!F(r?.comments))return``;let{indent:i=!1,marker:a,filter:o=Pf}=n,s=[];if(e.each(({node:n})=>{n.leading||n.trailing||n.marker!==a||!o(n)||s.push(Ff(e,t))},`comments`),s.length===0)return``;let c=Y(Q,s);return i?K([Q,c]):c}function Rf(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(If(e,t)):c&&(o=Lf(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function zf(e,t,n){let{leading:r,trailing:i}=Rf(e,n);return!r&&!i?t:Su(t,e=>[r,e,i])}var Bf=class extends Error{name=`ArgExpansionBailout`};function Vf(e,t,n,r,i){let a=e.node,o=Zs(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,$(e,t,{filter:e=>Pc(t.originalText,L(e))===`)`}),`)`];let{parent:c}=e,l=Es(c),u=Hf(a),d=[];if(Qs(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):sc(o[r],t)?d.push(Q,Q):d.push(X))}),r&&!Gf(e)){if(fu(s)||fu(d))throw new Bf;return q([gu(s),`(`,gu(d),`)`])}let f=o.every(e=>!F(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(_s(c)||vs(c)||c.type===`TypeAlias`||c.type===`UnionTypeAnnotation`||c.type===`IntersectionTypeAnnotation`||c.type===`FunctionTypeAnnotation`&&c.returnType===a)&&o.length===1&&o[0].name===null&&a.this!==o[0]&&o[0].typeAnnotation&&a.typeParameters===null&&Ss(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,K([Z,...d]),J(!Ys(a)&&Bs(t,`all`)&&e.root.type!==`NGRoot`?`,`:``),Z,`)`]}function Hf(e){if(!e)return!1;let t=Zs(e);if(t.length!==1)return!1;let[n]=t;return!U(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&ds(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&ds(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||ns(n.right)&&n.right.properties.length===0||ts(n.right)&&n.right.elements.length===0))}function Uf(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function Wf(e,t){let n=Uf(e);if(!n)return!1;let r=e.typeParameters?.params;if(r){if(r.length>1)return!1;if(r.length===1){let e=r[0];if(e.constraint||e.default)return!1}}return Zs(e).length===1&&(ds(n)||fu(t))}function Gf(e){return e.match(e=>e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`,(e,t)=>{if(e.type===`CallExpression`&&t===`arguments`&&e.arguments.length===1&&e.callee.type===`CallExpression`){let t=e.callee.callee;return t.type===`Identifier`||t.type===`MemberExpression`&&!t.computed&&t.object.type===`Identifier`&&t.property.type===`Identifier`}return!1},(e,t)=>e.type===`VariableDeclarator`&&t===`init`||e.type===`ExportDefaultDeclaration`&&t===`declaration`||e.type===`TSExportAssignment`&&t===`expression`||e.type===`AssignmentExpression`&&t===`right`&&e.left.type===`MemberExpression`&&e.left.object.type===`Identifier`&&e.left.object.name===`module`&&e.left.property.type===`Identifier`&&e.left.property.name===`exports`,e=>e.type!==`VariableDeclaration`||e.kind===`const`&&e.declarations.length===1)}function Kf(e){let t=Zs(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function qf(e,t){return(t===`params`||t===`this`||t===`rest`)&&Hf(e)}function Jf(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:B(t)||V(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function Yf(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var Xf=z([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]);function Zf(e){let{node:t}=e;return t.declare||Xf(t)&&e.parent.type!==`DeclareExportDeclaration`?`declare `:``}var Qf=z([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function $f({node:e}){return e.abstract||Qf(e)?`abstract `:``}function ep(e,t,n){return e.type===`EmptyStatement`?U(e,H.Leading)?[` `,t]:t:e.type===`BlockStatement`||n?[` `,t]:K([X,t])}function tp(e){return e.accessibility?e.accessibility+` `:``}var np=/^[\$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]*$/,rp=e=>np.test(e);function ip(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 ap=ip,op=0;function sp(e,t,n){let{node:r,parent:i,grandparent:a,key:o}=e,s=o!==`body`&&(i.type===`IfStatement`||i.type===`WhileStatement`||i.type===`SwitchStatement`||i.type===`DoWhileStatement`),c=r.operator===`|>`&&e.root.extra?.__isUsingHackPipeline,l=cp(e,t,n,!1,s);if(s)return l;if(c)return q(l);if(o===`callee`&&(B(i)||i.type===`NewExpression`)||i.type===`UnaryExpression`||V(i)&&!i.computed)return q([K([Z,...l]),Z]);let u=i.type===`ReturnStatement`||i.type===`ThrowStatement`||i.type===`JSXExpressionContainer`&&a.type===`JSXAttribute`||r.operator!==`|`&&i.type===`JsExpressionRoot`||r.type!==`NGPipeExpression`&&(i.type===`NGRoot`&&t.parser===`__ng_binding`||i.type===`NGMicrosyntaxExpression`&&a.type===`NGMicrosyntax`&&a.body.length===1)||r===i.body&&i.type===`ArrowFunctionExpression`||r!==i.body&&i.type===`ForStatement`||i.type===`ConditionalExpression`&&a.type!==`ReturnStatement`&&a.type!==`ThrowStatement`&&!B(a)&&a.type!==`NewExpression`||i.type===`TemplateLiteral`||fp(e),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||lc(i),f=ys(r.left)&&Gs(r.operator,r.left.operator);if(u||lp(r)&&!f||!lp(r)&&d)return q(l);if(l.length===0)return``;let p=hs(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===Gl),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++op),v=q([...h,K(g)],{id:_});return p?q([v,Iu(P(0,l,-1),{groupId:_})]):v}function cp(e,t,n,r,i){let{node:a}=e;if(!ys(a))return[q(n())];let o=[];Gs(a.operator,a.left.operator)?o=e.call(()=>cp(e,t,n,!0,i),`left`):o.push(q(n(`left`)));let s=lp(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.operator===`|>`||a.type===`NGPipeExpression`||dp(e,t))&&!Ms(t.originalText,c),u=!U(c,H.Leading,zc)&&Ms(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?q(K([Z,`: `,Y([X,`: `],e.map(()=>Ou(2,q(n())),`arguments`))])):``,p;if(s)p=[d,Ms(t.originalText,c)?K([X,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>cp(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(nu(r)){case Bl:e=r.splice(0,1)[0];break;case Ql:e=r.contents.splice(0,1)[0];break}p=[X,e,d,` `,r,f]}else p=[l?X:``,d,l?` `:X,r,f]}let{parent:m}=e,h=U(a.left,H.Trailing|H.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=q(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&U(a)){let n=vu(zf(e,o,t));return n.type===Kl?n.parts:Array.isArray(n)?n:[n]}return o}function lp(e){return e.type===`LogicalExpression`?!!(ns(e.right)&&e.right.properties.length>0||ts(e.right)&&e.right.elements.length>0||hs(e.right)):!1}var up=e=>e.type===`BinaryExpression`&&e.operator===`|`;function dp(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&up(e.node)&&!e.hasAncestor(e=>!up(e)&&e.type!==`JsExpressionRoot`)}function fp(e){if(e.key!==`arguments`)return!1;let{parent:t}=e;if(!(B(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:n}=t;return n.type===`Identifier`&&n.name===`Boolean`}function pp(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`TypeParameterInstantiation`&&(!pc(i)||!t.experimentalTernaries)&&i.type!==`TSTypeParameterInstantiation`&&i.type!==`GenericTypeAnnotation`&&i.type!==`TSTypeReference`&&i.type!==`TSTypeAssertion`&&i.type!==`TupleTypeAnnotation`&&i.type!==`TSTupleType`&&!(i.type===`FunctionTypeParam`&&!i.name&&e.grandparent.this!==i)&&!((hc(i)||i.type===`VariableDeclarator`)&&Ms(t.originalText,r))&&!(hc(i)&&U(i.id,H.Trailing|H.Line)),o=gp(r),s=e.map(()=>{let r=n();return o||(r=Ou(2,r)),zf(e,r,t)},`types`),c=``,l=``;if(gc(e)&&({leading:c,trailing:l}=Rf(e,t)),o)return[c,Y(` | `,s),l];let u=[J([a&&!Ms(t.originalText,r)?X:``,`| `]),Y([X,`| `],s)];if(jf(e,t))return[c,q([K(u),Z]),l];let d=[c,q(u)];return(i.type===`TupleTypeAnnotation`||i.type===`TSTupleType`)&&i[i.type===`TupleTypeAnnotation`&&i.types?`types`:`elementTypes`].length>1?[q([K([J([`(`,Z]),d]),Z,J(`)`)]),l]:[q(a?K(d):d),l]}var mp=z([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),hp=z([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function gp(e){let{types:t}=e;if(t.some(e=>U(e)))return!1;let n=t.find(e=>hp(e));return n?t.every(e=>e===n||mp(e)):!1}function _p(e){return Ss(e)||ds(e)?!0:dc(e)?gp(e):!1}var vp=new WeakSet;function yp(e,t,n=`typeAnnotation`){let{node:{[n]:r}}=e;if(!r)return``;let i=!1;if(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`){let t=e.call(bp,n);(t===`=>`||t===`:`&&U(r,H.Leading))&&(i=!0),vp.add(r)}return i?[` `,t(n)]:t(n)}var bp=e=>e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>(t===`returnType`||t===`typeAnnotation`)&&(e.type===`TSFunctionType`||e.type===`TSConstructorType`))?`=>`:e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>t===`typeAnnotation`&&(e.type===`TSJSDocNullableType`||e.type===`TSJSDocNonNullableType`||e.type===`TSTypePredicate`))||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareFunction`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareHook`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`bound`&&e.type===`TypeParameter`&&e.usesExtendsBound)?``:`:`;function xp(e,t,n){let r=bp(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}function Sp(e,t,n,r){let{node:i}=e,a=i.inexact?`...`:``;return U(i,H.Dangling)?q([n,a,$(e,t,{indent:!0}),Z,r]):[n,a,r]}function Cp(e,t,n){let{node:r}=e,i=[],a=r.type===`TupleTypeAnnotation`&&r.types?`types`:r.type===`TSTupleType`||r.type===`TupleTypeAnnotation`?`elementTypes`:`elements`,o=r[a];if(o.length===0)i.push(Sp(e,t,`[`,`]`));else{let s=P(0,o,-1),c=s?.type!==`RestElement`&&!r.inexact,l=s===null,u=Symbol(`array`),d=!t.__inJestEach&&o.length>1&&o.every((e,t,n)=>{let r=e?.type;if(!ts(e)&&!ns(e))return!1;let i=n[t+1];if(i&&r!==i.type)return!1;let a=ts(e)?`elements`:`properties`;return e[a]&&e[a].length>1}),f=wp(r,t),p=c?l?`,`:Bs(t)?f?J(`,`,``,{groupId:u}):J(`,`):``:``;i.push(q([`[`,K([Z,f?Dp(e,t,n,p):[Ep(e,t,n,a,r.inexact),p],$(e,t)]),Z,`]`],{shouldBreak:d,id:u}))}return i.push(Jf(e),yp(e,n)),i}function wp(e,t){return ts(e)&&e.elements.length>0&&e.elements.every(e=>e&&(is(e)||os(e)&&!U(e.argument))&&!U(e,H.Trailing|H.Line,e=>!ao(t.originalText,I(e),{backwards:!0})))}function Tp({node:e},{originalText:t}){let n=L(e);if(n===I(e))return!1;let{length:r}=t;for(;n{a.push(r?q(n()):``),(!o||i)&&a.push([`,`,X,r&&Tp(e,t)?Z:``])},r),i&&a.push(`...`),a}function Dp(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(Tp(e,t)?[Q,Q]:U(o,H.Leading|H.Line)?Q:X)},`elements`),Pu(i)}function Op(e,t,n){let{node:r}=e,i=ec(r);if(i.length===0)return[`(`,$(e,t),`)`];let a=i.length-1;if(Np(i)){let t=[`(`];return tc(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];tc(e,({node:e},r)=>{let i=n();r===a||(sc(e,t)?(o=!0,i=[i,`,`,Q,Q]):i=[i,`,`,X]),s.push(i)});let c=!t.parser.startsWith(`__ng_`)&&r.type!==`ImportExpression`&&r.type!==`TSImportType`&&r.type!==`TSExternalModuleReference`&&Bs(t,`all`)?`,`:``;function l(){return q([`(`,K([X,...s]),c,X,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&Is(i))return l();if(jp(i)){let e=s.slice(1);if(e.some(fu))return l();let t;try{t=n(nc(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof Bf)return l();throw e}return fu(t)?[Mu,Fu([[`(`,q(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:Fu([[`(`,t,`, `,...e,`)`],[`(`,q(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(Ap(i,s,t)){let e=s.slice(0,-1);if(e.some(fu))return l();let t;try{t=n(nc(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof Bf)return l();throw e}return fu(t)?[Mu,Fu([[`(`,...e,q(t,{shouldBreak:!0}),`)`],l()])]:Fu([[`(`,...e,t,`)`],[`(`,...e,q(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,K([Z,...s]),J(c),Z,`)`];return Ls(e)?u:q(u,{shouldBreak:s.some(fu)||o})}function kp(e,t=!1){return ns(e)&&(e.properties.length>0||U(e))||ts(e)&&(e.elements.length>0||U(e))||e.type===`TSTypeAssertion`&&kp(e.expression)||uc(e)&&kp(e.expression)||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!==`TSTypeReference`||Fp(e.body))&&(e.body.type===`BlockStatement`||e.body.type===`ArrowFunctionExpression`&&kp(e.body,!0)||ns(e.body)||ts(e.body)||!t&&(B(e.body)||e.body.type===`ConditionalExpression`)||hs(e.body))||e.type===`DoExpression`||e.type===`ModuleExpression`}function Ap(e,t,n){let r=P(0,e,-1);if(e.length===1){let e=P(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let i=P(0,e,-2);return!U(r,H.Leading)&&!U(r,H.Trailing)&&kp(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!ts(r))&&!(e.length>1&&wp(r,n))}function jp(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&Ip(n)?!0:!U(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&Mp(n)&&!kp(n)}function Mp(e){if(e.type===`ParenthesizedExpression`)return Mp(e.expression);if(uc(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 e=t.type===`GenericTypeAnnotation`?t.typeParameters:t.typeArguments;e?.params.length===1&&(t=e.params[0])}return Ss(t)&&zs(e.expression,1)}return cc(e)&&ec(e).length>1?!1:ys(e)?zs(e.left,1)&&zs(e.right,1):cs(e)||zs(e)}function Np(e){return e.length===2?Pp(e,0):e.length===3?e[0].type===`Identifier`&&Pp(e,1):!1}function Pp(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&Zs(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&!e.some(e=>U(e))}function Fp(e){return e.type===`BlockStatement`&&(e.body.some(e=>e.type!==`EmptyStatement`)||U(e,H.Dangling))}function Ip(e){if(!(e.type===`ObjectExpression`&&e.properties.length===1))return!1;let[t]=e.properties;return lc(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||ss(t.key)&&t.key.value===`type`)&&ss(t.value)&&t.value.value===`module`:!1}var Lp=Op;function Rp(e,t,n){return[n(`object`),q(K([Z,zp(e,t,n)]))]}function zp(e,t,n){return[`::`,n(`callee`)]}var Bp=e=>((e.type===`ChainExpression`||e.type===`TSNonNullExpression`)&&(e=e.expression),B(e)&&ec(e).length>0);function Vp(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(V(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function Hp(e,t,n){let r=n(`object`),i=Up(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(V(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>!(e.type===`ChainExpression`||e.type===`TSNonNullExpression`)),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||Vp(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!V(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(Bp(a.object)||r.label?.memberChain);return Lu(r.label,[r,c?i:q(K([Z,i]))])}function Up(e,t,n){let r=n(`property`),{node:i}=e,a=Jf(e);return i.computed?!i.property||is(i.property)?[a,`[`,r,`]`]:q([a,`[`,K([Z,r]),Z,`]`]):[a,`.`,r]}function Wp(e,t,n){if(e.node.type===`ChainExpression`)return e.call(()=>Wp(e,t,n),`expression`);let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=Mc(n,L(e));return n.charAt(r)===`)`?r!==!1&&fo(n,r+1):sc(e,t)}function o(){let{node:r}=e;if(r.type===`ChainExpression`)return e.call(o,`expression`);if(B(r)&&(bs(r.callee)||B(r.callee))){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[zf(e,[Jf(e),n(`typeArguments`),Lp(e,t,n)],t),s?Q:``]}),e.call(o,`callee`)}else bs(r)?(i.unshift({node:r,needsParens:jf(e,t),printed:zf(e,V(r)?Up(e,t,n):zp(e,t,n),t)}),e.call(o,`object`)):r.type===`TSNonNullExpression`?(i.unshift({node:r,printed:zf(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[Jf(e),n(`typeArguments`),Lp(e,t,n)]}),s.callee&&e.call(o,`callee`);let c=[],l=[i[0]],u=1;for(;u0&&c.push(l);function f(e){return/^[A-Z]|^[$_]+$/u.test(e)}function p(e){return e.length<=t.tabWidth}function m(e){let t=e[1][0]?.node.computed;if(e[0].length===1){let n=e[0][0].node;return n.type===`ThisExpression`||n.type===`Identifier`&&(f(n.name)||r&&p(n.name)||t)}let n=P(0,e[0],-1).node;return V(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!U(c[1][0].node)&&m(c);function g(e){let t=e.map(e=>e.printed);return e.length>0&&P(0,e,-1).needsParens?[`(`,...t,`)`]:t}function _(e){return e.length===0?``:K([Q,Y(Q,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>U(e.node,H.Leading))||x.slice(0,-1).some(e=>U(e.node,H.Trailing))||c[b]&&U(c[b][0].node,H.Leading);if(c.length<=b&&!S&&!c.some(e=>P(0,e,-1).hasTrailingEmptyLine))return Ls(e)?y:q(y);let ee=P(0,c[+!!h],-1).node,C=!B(ee)&&a(ee),w=[g(c[0]),h?c.slice(1,2).map(g):``,C?Q:``,_(c.slice(h?2:1))],te=i.map(({node:e})=>e).filter(B);function T(){let e=P(0,P(0,c,-1),-1).node,t=P(0,v,-1);return B(e)&&fu(t)&&te.slice(0,-1).some(e=>e.arguments.some(fs))}let E;return E=S||te.length>2&&te.some(e=>!e.arguments.every(e=>zs(e)))||v.slice(0,-1).some(fu)||T()?q(w):[fu(y)||C?Mu:``,Fu([y,w])],Lu({memberChain:!0},E)}var Gp=Wp;function Kp(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=Jf(e),o=ec(r),s=r.type!==`TSImportType`&&r.typeArguments?n(`typeArguments`):``,c=o.length===1&&Ps(o[0],t.originalText);if(c||Yp(e)||Xp(e)||Es(r,e.parent)){let t=[];if(tc(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[i?`new `:``,qp(e,n),a,s,`(`,Y(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&bs(r.callee)&&!e.call(()=>jf(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return Gp(e,t,n);let u=[i?`new `:``,qp(e,n),a,s,Lp(e,t,n)];return l||B(r.callee)?q(u):u}function qp(e,t){let{node:n}=e;return n.type===`ImportExpression`?`import${n.phase?`.${n.phase}`:``}`:n.type===`TSImportType`?`import`:n.type===`TSExternalModuleReference`?`require`:t(`callee`)}var Jp=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function Yp(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&Go(t.callee,Jp)))return!1;let n=ec(t);return n.length===1&&ss(n[0])&&!U(n[0])}function Xp(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=ec(t);return t.callee.name===`require`?(n.length===1&&ss(n[0])||n.length>1)&&!U(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&ss(n[0])&&n[1].type===`ArrayExpression`:!1}function Zp(e,t,n,r,i,a){let o=em(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return q([q(r),i,q(K([X,s]))]);case`never-break-after-operator`:return q([q(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return q([q(r),i,q(K(X),{id:e}),Vu,Iu(s,{groupId:e})])}case`break-lhs`:return q([r,i,` `,q(s)]);case`chain`:return[q(r),i,X,s];case`chain-tail`:return[q(r),i,K([X,s])];case`chain-tail-arrow-chain`:return[q(r),i,s];case`only-left`:return r}}function Qp(e,t,n){let{node:r}=e;return Zp(e,t,n,n(`left`),[` `,r.operator],`right`)}function $p(e,t,n){return Zp(e,t,n,n(`id`),` =`,`init`)}function em(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!rm(o);if(e.match(rm,im,e=>!s||e.type!==`ExpressionStatement`&&e.type!==`VariableDeclaration`))return s?o.type===`ArrowFunctionExpression`&&o.body.type===`ArrowFunctionExpression`?`chain-tail-arrow-chain`:`chain-tail`:`chain`;if(!s&&rm(o.right)||Ms(t.originalText,o))return`break-after-operator`;if(a.type===`ImportAttribute`||o.type===`CallExpression`&&o.callee.name===`require`||t.parser===`json5`||t.parser===`jsonc`||t.parser===`json`)return`never-break-after-operator`;let c=xu(r);if(nm(a)||sm(a)||cm(a)&&c)return`break-lhs`;let l=dm(a,r,t);return e.call(()=>tm(e,t,n,l),i)?`break-after-operator`:am(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||as(o)||is(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function tm(e,t,n,r){let i=e.node;if(ys(i)&&!lp(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!hm(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return ys(e)&&!lp(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return F(i.decorators)}if(r)return!1;let a=i,o=[];for(;;)if(a.type===`UnaryExpression`||a.type===`AwaitExpression`||a.type===`YieldExpression`&&a.argument!==null)a=a.argument,o.push(`argument`);else if(a.type===`TSNonNullExpression`)a=a.expression,o.push(`expression`);else break;return!!(ss(a)||e.call(()=>um(e,t,n),...o))}function nm(e){if(im(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>lc(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function rm(e){return e.type===`AssignmentExpression`}function im(e){return rm(e)||e.type===`VariableDeclarator`}function am(e){let t=om(e);if(F(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function om(e){if(hc(e))return e.typeParameters?.params}function sm(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=lm(t.typeAnnotation);return F(n)&&n.length>1&&n.some(e=>F(lm(e))||e.type===`TSConditionalType`)}function cm(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function lm(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments;break}return t?.params}function um(e,t,n,r=!1){let{node:i}=e,a=()=>um(e,t,n,!0);if(i.type===`ChainExpression`||i.type===`TSNonNullExpression`)return e.call(a,`expression`);if(B(i)){if(Kp(e,t,n).label?.memberChain)return!1;let r=ec(i);return!(r.length===0||r.length===1&&js(r[0],t))||fm(i,n)?!1:e.call(a,`callee`)}return V(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function dm(e,t,n){return lc(e)?(t=vu(t),typeof t==`string`&&Xa(t)1)return!0;if(n.length===1){let e=n[0];if(dc(e)||fc(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(fu(t(e.typeParameters?`typeParameters`:`typeArguments`)))return!0}return!1}function pm(e){return(e.typeParameters??e.typeArguments)?.params}function mm(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function hm(e){return mm(e.checkType)||mm(e.extendsType)}var gm=new WeakMap;function _m(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function vm(e,t){return t.parser===`json`||t.parser===`jsonc`||!ss(e.key)||To(zo(e.key),t).slice(1,-1)!==e.key.value?!1:!!(rp(e.key.value)&&!(t.parser===`babel-ts`&&e.type===`ClassProperty`||(t.parser===`typescript`||t.parser===`oxc-ts`)&&e.type===`PropertyDefinition`)||_m(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!==`ImportAttribute`&&(t.parser===`babel`||t.parser===`acorn`||t.parser===`oxc`||t.parser===`espree`||t.parser===`meriyah`||t.parser===`__babel_estree`))}function ym(e,t){let{key:n}=e.node;return(n.type===`Identifier`||is(n)&&_m(ap(zo(n)))&&String(n.value)===ap(zo(n))&&!(t.parser===`typescript`||t.parser===`babel-ts`||t.parser===`oxc-ts`))&&(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&gm.get(e.parent))}function bm(e,t,n){let{node:r}=e;if(r.computed)return[`[`,n(`key`),`]`];let{parent:i}=e,{key:a}=r;if(t.quoteProps===`consistent`&&!gm.has(i)){let n=e.siblings.some(e=>!e.computed&&ss(e.key)&&!vm(e,t));gm.set(i,n)}if(ym(e,t)){let n=To(JSON.stringify(a.type===`Identifier`?a.name:a.value.toString()),t);return e.call(()=>zf(e,n,t),`key`)}return vm(r,t)&&(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!gm.get(i))?e.call(()=>zf(e,/^\d/u.test(a.value)?ap(a.value):a.value,t),`key`):n(`key`)}function xm(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):Zp(e,t,n,bm(e,t,n),`:`,`value`)}var Sm=({node:e,key:t,parent:n})=>t===`value`&&e.type===`FunctionExpression`&&(n.type===`ObjectMethod`||n.type===`ClassMethod`||n.type===`ClassPrivateMethod`||n.type===`MethodDefinition`||n.type===`TSAbstractMethodDefinition`||n.type===`TSDeclareMethod`||n.type===`Property`&&gs(n));function Cm(e,t,n,r){if(Sm(e))return Tm(e,t,n);let{node:i}=e,a=!1;if((i.type===`FunctionDeclaration`||i.type===`FunctionExpression`)&&r?.expandLastArg){let{parent:t}=e;B(t)&&(ec(t).length>1||Zs(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=[Zf(e),i.async?`async `:``,`function${i.generator?`*`:``} `,i.id?n(`id`):``],s=Vf(e,t,n,a),c=Om(e,n),l=Wf(i,c);return o.push(n(`typeParameters`),q([l?q(s):s,c]),i.body?` `:``,n(`body`)),t.semi&&(i.declare||!i.body)&&o.push(`;`),o}function wm(e,t,n){let{node:r}=e,{kind:i}=r,a=r.value||r,o=[];return!i||i===`init`||i===`method`||i===`constructor`?a.async&&o.push(`async `):o.push(i,` `),a.generator&&o.push(`*`),o.push(bm(e,t,n),r.optional?`?`:``,r===a?Tm(e,t,n):n(`value`)),o}function Tm(e,t,n){let{node:r}=e,i=Vf(e,t,n),a=Om(e,n),o=Kf(r),s=Wf(r,a),c=[n(`typeParameters`),q([o?q(i,{shouldBreak:!0}):s?q(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(t.semi?`;`:``),c}function Em(e){let t=Zs(e);return t.length===1&&!e.typeParameters&&!U(e,H.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!U(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Dm(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return Em(t)}return!1}function Om(e,t){let{node:n}=e,r=[yp(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function km(e,t,n){let{node:r}=e,i=[];if(r.argument){let e=n(`argument`);Mm(t,r.argument)?e=[`(`,K([Q,e]),Q,`)`]:(ys(r.argument)||t.experimentalTernaries&&r.argument.type===`ConditionalExpression`&&(r.argument.consequent.type===`ConditionalExpression`||r.argument.alternate.type===`ConditionalExpression`))&&(e=q([J(`(`),K([Z,e]),Z,J(`)`)])),i.push(` `,e)}let a=U(r,H.Dangling),o=t.semi&&a&&U(r,H.Last|H.Line);return o&&i.push(`;`),a&&i.push(` `,$(e,t)),!o&&t.semi&&i.push(`;`),i}function Am(e,t,n){return[`return`,km(e,t,n)]}function jm(e,t,n){return[`throw`,km(e,t,n)]}function Mm(e,t){if(Ms(e.originalText,t)||U(t,H.Leading,t=>Ic(e.originalText,I(t),L(t)))&&!hs(t))return!0;if(Zo(t)){let n=t,r;for(;r=Qo(n);)if(n=r,Ms(e.originalText,n))return!0}return!1}function Nm(e,t){if(t.semi||Im(e,t)||Rm(e,t)||Lm(e,t))return!1;let{node:n,key:r,parent:i}=e;return!!(n.type===`ExpressionStatement`&&(r===`body`&&(i.type===`Program`||i.type===`BlockStatement`||i.type===`StaticBlock`||i.type===`TSModuleBlock`)||r===`consequent`&&i.type===`SwitchCase`)&&e.call(()=>Pm(e,t),`expression`))}function Pm(e,t){let{node:n}=e;switch(n.type){case`ParenthesizedExpression`:case`TypeCastExpression`:case`ArrayExpression`:case`ArrayPattern`:case`TemplateLiteral`:case`TemplateElement`:case`RegExpLiteral`:return!0;case`ArrowFunctionExpression`:if(!Dm(e,t))return!0;break;case`UnaryExpression`:{let{prefix:e,operator:t}=n;if(e&&(t===`+`||t===`-`))return!0;break}case`BindExpression`:if(!n.object)return!0;break;case`Literal`:if(n.regex)return!0;break;default:if(hs(n))return!0}return jf(e,t)?!0:Zo(n)?e.call(()=>Pm(e,t),...$o(n)):!1}var Fm=({node:e,parent:t})=>e.type===`ExpressionStatement`&&t.type===`Program`&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function Im(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&Fm(e)&&hs(e.node.expression)}function Lm(e,t){return t.__isHtmlInlineEventHandler&&Fm(e)}function Rm(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&Fm(e)}var zm=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function Bm(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var Vm=new class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let t=this.#e,n=0;for(let r=0;r=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(P(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${Bm([...this.#e].join(``))}]+`,r=new RegExp(t?`(${n})`:n,`u`);return e.split(r)}hasWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=this.#e;return Array.prototype.every.call(e,e=>t.has(e))}#t(e){let t=1/0;for(let n of e.split(` `)){if(n.length===0)continue;let e=this.getLeadingWhitespaceCount(n);if(e===0)return 0;n.length!==e&&ee.slice(t)).join(` `)}}(` \r `),Hm=e=>e===``||e===X||e===Q||e===Z;function Um(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&sh(r))return[n(`openingElement`),n(`closingElement`)];let i=r.type===`JSXElement`?n(`openingElement`):n(`openingFragment`),a=r.type===`JSXElement`?n(`closingElement`):n(`closingFragment`);if(r.children.length===1&&r.children[0].type===`JSXExpressionContainer`&&(r.children[0].expression.type===`TemplateLiteral`||r.children[0].expression.type===`TaggedTemplateExpression`))return[i,...e.map(n,`children`),a];r.children=r.children.map(e=>lh(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(hs),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=fu(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?X:J([d,Z],` `),p=Wm(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>ch(e));for(let e=p.length-2;e>=0;e--){let t=p[e]===``&&p[e+1]===``,n=p[e]===Q&&p[e+1]===``&&p[e+2]===Q,r=(p[e]===Z||p[e]===Q)&&p[e+1]===``&&p[e+2]===f,i=p[e]===f&&p[e+1]===``&&(p[e+2]===Z||p[e+2]===Q),a=p[e]===f&&p[e+1]===``&&p[e+2]===f,o=p[e]===Z&&p[e+1]===``&&p[e+2]===Q||p[e]===Q&&p[e+1]===``&&p[e+2]===Z;n&&m||t||r||a||o?p.splice(e,2):i&&p.splice(e+1,2)}for(;p.length>0&&Hm(P(0,p,-1));)p.pop();for(;p.length>1&&Hm(p[0])&&Hm(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&Cu(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,Q],``);continue}else if(e===p.length-1){h.push([h.pop(),d]);continue}else if(p[e-1]===``&&p[e-2]===Q){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),fu(t)&&(l=!0)}let g=m?Pu(h):q(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[Nu,g,Nu]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[Nu,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,Nu]),u)return g;let _=q([i,K([Q,g]),Q,a]);return l?_:Fu([q([i,...p,a]),_])}function Wm(e,t,n,r,i){let a=``,o=[a];function s(e){a=e,o.push([o.pop(),e])}function c(e){e!==``&&(a=e,o.push(e,``))}return e.each(({node:e,next:t})=>{if(e.type===`JSXText`){let n=zo(e);if(ch(e)){let o=Vm.split(n,!0);o[0]===``&&(o.shift(),/\n/u.test(o[0])?c(Km(i,o[1],e,t)):c(r),o.shift());let l;if(P(0,o,-1)===``&&(o.pop(),l=o.pop()),o.length===0)return;for(let[e,t]of o.entries())e%2==1?c(X):s(t);l===void 0?c(Gm(i,a,e,t)):/\n/u.test(l)?c(Km(i,a,e,t)):c(r)}else /\n/u.test(n)?n.match(/\n/gu).length>1&&c(Q):c(r)}else if(s(n()),t&&ch(t)){let n=Vm.trim(zo(t)),[r]=Vm.split(n);c(Gm(i,r,e,t))}else c(Q)},`children`),o}function Gm(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Z:Q:Z}function Km(e,t,n,r){return e?Q:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?Q:Z:Q}var qm=z([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function Jm(e,t,n){let{parent:r}=e;if(qm(r))return t;let i=Ym(e),a=jf(e,n);return q([a?``:J(`(`),K([Z,t]),Z,a?``:J(`)`)],{shouldBreak:i})}function Ym(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&B(e))&&(e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`)||e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`))}function Xm(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(ss(r.value)){let n=Ia(0,Ia(0,zo(r.value).slice(1,-1),`'`,`'`),`"`,`"`),i=bo(n,t.jsxSingleQuote);n=i===`"`?Ia(0,n,`"`,`"`):Ia(0,n,`'`,`'`),a=e.call(()=>zf(e,yu(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function Zm(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!U(e)&&(ts(e)||ns(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||B(e)||e.type===`ChainExpression`&&B(e.expression)||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||hs(t)&&(e.type===`ConditionalExpression`||ys(e)));return i(r.expression,e.parent)?q([`{`,n(`expression`),Vu,`}`]):q([`{`,K([Z,n(`expression`)]),Z,Vu,`}`])}function Qm(e,t,n){let{node:r}=e,i=U(r.name)||U(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&ss(r.attributes[0].value)&&!r.attributes[0].value.value.includes(` `)&&!i&&!U(r.attributes[0]))return q([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>ss(e.value)&&e.value.value.includes(` `)),o=t.singleAttributePerLine&&r.attributes.length>1?Q:X;return q([`<`,n(`name`),n(`typeArguments`),K(e.map(()=>[o,n()],`attributes`)),...$m(r,t,i)],{shouldBreak:a})}function $m(e,t,n){return e.selfClosing?[X,`/>`]:eh(e,t,n)?[`>`]:[Z,`>`]}function eh(e,t,n){let r=e.attributes.length>0&&U(P(0,e.attributes,-1),H.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function th(e,t,n){let{node:r}=e,i=[``),i}function nh(e,t){let{node:n}=e,r=U(n),i=U(n,H.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:``]}function rh(e,t,n){return Jm(e,zf(e,Um(e,t,n),t),t)}function ih(e,t){let{node:n}=e,r=U(n,H.Line);return[$(e,t,{indent:r}),r?Q:``]}function ah(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return U(r)?[K([Z,zf(e,i,t)]),Z]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function oh(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return Xm(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return Y(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return Y(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return ah(e,t,n);case`JSXExpressionContainer`:return Zm(e,t,n);case`JSXFragment`:case`JSXElement`:return rh(e,t,n);case`JSXOpeningElement`:return Qm(e,t,n);case`JSXClosingElement`:return th(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return nh(e,t);case`JSXEmptyExpression`:return ih(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new zm(r,`JSX`)}}function sh(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!ch(t)}function ch(e){return e.type===`JSXText`&&(Vm.hasNonWhitespaceCharacter(zo(e))||!/\n/u.test(zo(e)))}function lh(e){return e.type===`JSXExpressionContainer`&&ss(e.expression)&&e.expression.value===` `&&!U(e.expression)}function uh(e){let{node:t,parent:n}=e;if(!hs(t)||!hs(n))return!1;let{index:r,siblings:i}=e,a;for(let e=r;e>0;e--){let t=i[e-1];if(!(t.type===`JSXText`&&!ch(t))){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&ic(a.expression)}function dh(e){return ic(e.node)||uh(e)}var fh=dh;function ph(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return sp(e,t,n);case`NGChainedExpression`:return q(Y([`;`,X],e.map(()=>_h(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:mh(e)?` `:[`;`,X],n()],`body`);case`NGMicrosyntaxKey`:return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(r.name)?r.name:JSON.stringify(r.name);case`NGMicrosyntaxExpression`:return[n(`expression`),r.alias===null?``:[` as `,n(`alias`)]];case`NGMicrosyntaxKeyedExpression`:{let{index:t,parent:i}=e,a=mh(e)||hh(e)||(t===1&&(r.key.name===`then`||r.key.name===`else`||r.key.name===`as`)||t===2&&(r.key.name===`else`&&i.body[t-1].type===`NGMicrosyntaxKeyedExpression`&&i.body[t-1].key.name===`then`||r.key.name===`track`))&&i.body[0].type===`NGMicrosyntaxExpression`;return[n(`key`),a?` `:`: `,n(`expression`)]}case`NGMicrosyntaxLet`:return[`let `,n(`key`),r.value===null?``:[` = `,n(`value`)]];case`NGMicrosyntaxAs`:return[n(`key`),` as `,n(`alias`)];default:throw new zm(r,`Angular`)}}function mh({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function hh(e){let{node:t}=e;return e.parent.body[1].key.name===`of`&&t.type===`NGMicrosyntaxKeyedExpression`&&t.key.name===`track`&&t.key.type===`NGMicrosyntaxKey`}var gh=z([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function _h({node:e}){return Xo(e,gh)}function vh(e,t,n){let{node:r}=e;return q([Y(X,e.map(n,`decorators`)),xh(r,t)?Q:X])}function yh(e,t,n){return Sh(e.node)?[Y(Q,e.map(n,`declaration`,`decorators`)),Q]:``}function bh(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!F(a)||Sh(i)||fh(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||xh(r,t);return[e.key===`declaration`&&es(i)?Q:o?Mu:``,Y(X,e.map(n,`decorators`)),X]}function xh(e,t){return e.decorators.some(e=>ao(t.originalText,L(e)))}function Sh(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return F(t)&&Do(e,t[0])}var Ch=new WeakMap;function wh(e){return Ch.has(e)||Ch.set(e,e.type===`ConditionalExpression`&&!Vs(e,e=>e.type===`ObjectExpression`)),Ch.get(e)}var Th=e=>e.type===`SequenceExpression`;function Eh(e,t,n,r={}){let i=[],a,o=[],s=!1,c=!r.expandLastArg&&e.node.body.type===`ArrowFunctionExpression`,l;(function u(){let{node:d}=e,f=Dh(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=Rf(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&Zs(d).length>0||d.typeParameters||Zs(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!Ms(t.originalText,l)&&(Th(l)||Oh(l,a,t)||!s&&wh(l)),d=e.key===`callee`&&cc(e.parent),f=Symbol(`arrow-chain`),p=kh(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!U(e.node,H.Leading&H.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=Ah(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),q([q(h?K([g?Z:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?Iu(a,{groupId:f}):q(a),c&&d?J(Z,``,{groupId:f}):``])}function Dh(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),Dm(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=Om(e,n);if(i){if(fu(o))throw new Bf;o=q(gu(o))}a.push(q([Vf(e,t,n,i,!0),o]))}let o=$(e,t,{filter(e){let n=Mc(t.originalText,L(e));return n!==!1&&t.originalText.slice(n,n+2)===`=>`}});return o&&a.push(` `,o),a}function Oh(e,t,n){return ts(e)||ns(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||hs(e)||t.label?.hug!==!1&&(t.label?.embed||Ps(e,n.originalText))}function kh(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&cc(i)||ys(i)?q([n[0],` =>`,K([X,Y([` =>`,X],n.slice(1))])],{shouldBreak:r}):a===`callee`&&cc(i)||t.assignmentLayout?q(Y([` =>`,X],n),{shouldBreak:r}):q(K(Y([` =>`,X],n)),{shouldBreak:r})}function Ah(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg&&Bs(t,`all`)?J(`,`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!U(s)?Z:``;return o&&wh(a)?[` `,q([J(``,`(`),K([Z,r]),J(``,`)`),l,u]),i]:o?[` `,r,i]:[K([X,r,i]),l,u]}var jh=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},Mh=Pa(`findLast`,function(){if(Array.isArray(this))return jh});function Nh(e,t,n,r){let{node:i}=e,a=[],o=Mh(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push(Q),sc(e,t)&&a.push(Q)))},r),a}function Ph(e,t,n){let r=Fh(e,t,n),{node:i,parent:a}=e;if(i.type===`Program`&&a?.type!==`ModuleExpression`)return r?[r,Q]:``;let o=[];if(i.type===`StaticBlock`&&o.push(`static `),o.push(`{`),r)o.push(K([Q,r]),Q);else{let t=e.grandparent;a.type===`ArrowFunctionExpression`||a.type===`FunctionExpression`||a.type===`FunctionDeclaration`||a.type===`ComponentDeclaration`||a.type===`HookDeclaration`||a.type===`ObjectMethod`||a.type===`ClassMethod`||a.type===`ClassPrivateMethod`||a.type===`ForStatement`||a.type===`WhileStatement`||a.type===`DoWhileStatement`||a.type===`DoExpression`||a.type===`ModuleExpression`||a.type===`CatchClause`&&!t.finalizer||a.type===`TSModuleDeclaration`||a.type===`MatchStatementCase`||i.type===`StaticBlock`||o.push(Q)}return o.push(`}`),o}function Fh(e,t,n){let{node:r}=e,i=F(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=U(r,H.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(Nh(e,t,n,`directives`)),(a||o)&&(s.push(Q),sc(P(0,r.directives,-1),t)&&s.push(Q))),a&&s.push(Nh(e,t,n,`body`)),o&&s.push($(e,t)),s}function Ih(e){let t=new WeakMap;return function(n){return t.has(n)||t.set(n,Symbol(e)),t.get(n)}}var Lh=Ih;function Rh(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=!zh(e),s=o?X:Q,c=U(r,H.Dangling),[l,u]=a&&r.exact?[`{|`,`|}`]:`{}`,d;if(Bh(e,({node:r,next:c,isLast:l})=>{if(d??=r,i.push(n()),o&&a){let{parent:n}=e;n.inexact||!l?i.push(`,`):Bs(t)&&i.push(J(`,`))}!o&&(Wh({node:r,next:c},t)||Kh({node:r,next:c},t))&&i.push(`;`),l||(i.push(s),sc(r,t)&&i.push(Q))}),c&&i.push($(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){let e;e=U(r,H.Dangling)?[U(r,H.Line)||ao(t.originalText,L(P(0,oc(r),-1)))?Q:X,`...`]:[d?X:``,`...`],i.push(e)}if(o){let n=c||t.objectWrap===`preserve`&&d&&Ic(t.originalText,I(r),I(d)),a;if(i.length===0)a=l+u;else{let e=t.bracketSpacing?X:Z;a=[l,K([e,...i]),e,u]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,qf)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,qf)?a:q(a,{shouldBreak:n})}return[l,i.length>0?[K([Q,i]),Q]:``,u]}function zh(e){let{node:t}=e;if(t.type===`ObjectTypeAnnotation`){let{key:t,parent:n}=e;return t===`body`&&(n.type===`InterfaceDeclaration`||n.type===`DeclareInterface`||n.type===`DeclareClass`)}return t.type===`ClassBody`||t.type===`TSInterfaceBody`}function Bh(e,t){let{node:n}=e;if(n.type===`ClassBody`||n.type===`TSInterfaceBody`){e.each(t,`body`);return}if(n.type===`TSTypeLiteral`){e.each(t,`members`);return}if(n.type===`ObjectTypeAnnotation`){let n=[`properties`,`indexers`,`callProperties`,`internalSlots`].flatMap(t=>e.map(({node:e,index:n})=>({node:e,loc:I(e),selector:[t,n]}),t)).sort((e,t)=>e.loc-t.loc);for(let[r,{node:i,selector:a}]of n.entries())e.call(()=>t({node:i,next:n[r+1]?.node,isLast:r===n.length-1}),...a)}}function Vh(e,t){let{parent:n}=e;return e.callParent(zh)?t.semi||n.type===`ObjectTypeAnnotation`?`;`:``:n.type===`TSTypeLiteral`?e.isLast?t.semi?J(`;`):``:t.semi||Kh({node:e.node,next:e.next},t)?`;`:J(``,`;`):``}var Hh=z([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),Uh=e=>{if(e.computed||e.typeAnnotation)return!1;let{type:t,name:n}=e.key;return t===`Identifier`&&(n===`static`||n===`get`||n===`set`)};function Wh({node:e,next:t},n){if(n.semi||!Hh(e))return!1;if(!e.value&&Uh(e))return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let e=t.key?.name;if(e===`in`||e===`instanceof`)return!0}if(Hh(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 e=t.value?t.value.generator:t.generator;return!!(t.computed||e)}case`TSIndexSignature`:return!0}return!1}var Gh=z([`TSPropertySignature`]);function Kh({node:e,next:t},n){if(n.semi||!Gh(e))return!1;if(Uh(e))return!0;if(!t)return!1;switch(t.type){case`TSCallSignatureDeclaration`:return!0}return!1}var qh=Lh(`heritageGroup`),Jh=z([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function Yh(e,t,n){let{node:r}=e,i=Jh(r),a=[Zf(e),$f(e),i?`interface`:`class`],o=eg(e),s=[],c=[];if(r.type!==`InterfaceTypeAnnotation`){r.id&&s.push(` `);for(let i of[`id`,`typeParameters`])if(r[i]){let{leading:r,trailing:a}=e.call(()=>Rf(e,t),i);s.push(r,n(i),K(a))}}if(r.superClass){let i=[ng(e,t,n),n(r.superTypeArguments?`superTypeArguments`:`superTypeParameters`)],a=e.call(()=>[`extends `,zf(e,i,t)],`superClass`);o?c.push(X,q(a)):c.push(` `,a)}else c.push(tg(e,t,n,`extends`));c.push(tg(e,t,n,`mixins`),tg(e,t,n,`implements`));let l;return o?(l=qh(r),a.push(q([...s,K(c)],{id:l}))):a.push(...s,...c),!i&&o&&Xh(r.body)?a.push(J(Q,` `,{groupId:l})):a.push(` `),a.push(n(`body`)),a}function Xh(e){return e.type===`ObjectTypeAnnotation`?[`properties`,`indexers`,`callProperties`,`internalSlots`].some(t=>F(e[t])):F(e.body)}function Zh(e){let t=+!!e.superClass;for(let n of[`extends`,`mixins`,`implements`])if(Array.isArray(e[n])&&(t+=e[n].length),t>1)return!0;return t>1}function Qh(e){let{node:t}=e;if(U(t.id,H.Trailing)||U(t.typeParameters,H.Trailing)||U(t.superClass)||Zh(t))return!0;if(t.superClass)return e.parent.type===`AssignmentExpression`?!1:!(t.superTypeArguments??t.superTypeParameters)&&V(t.superClass);let n=t.extends?.[0]??t.mixins?.[0]??t.implements?.[0];return n?n.type===`InterfaceExtends`&&n.id.type===`QualifiedTypeIdentifier`&&!n.typeParameters||(n.type===`TSClassImplements`||n.type===`TSInterfaceHeritage`)&&V(n.expression)&&!n.typeArguments:!1}var $h=new WeakMap;function eg(e){let{node:t}=e;return $h.has(t)||$h.set(t,Qh(e)),$h.get(t)}function tg(e,t,n,r){let{node:i}=e;if(!F(i[r]))return``;let a=$(e,t,{marker:r}),o=Y([`,`,X],e.map(n,r));if(!Zh(i)){let t=[`${r} `,a,o];return eg(e)?[X,q(t)]:[` `,t]}return[X,a,a&&Q,r,q(K([X,o]))]}function ng(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?q(J([`(`,K([Z,r]),Z,`)`],r)):r}function rg(e,t,n){let{node:r}=e,i=[];return F(r.decorators)&&i.push(vh(e,t,n)),i.push(tp(r)),r.static&&i.push(`static `),i.push($f(e)),r.override&&i.push(`override `),i.push(wm(e,t,n)),i}function ig(e,t,n){let{node:r}=e,i=[];return F(r.decorators)&&i.push(vh(e,t,n)),i.push(Zf(e),tp(r)),r.static&&i.push(`static `),i.push($f(e)),r.override&&i.push(`override `),r.readonly&&i.push(`readonly `),r.variance&&i.push(n(`variance`)),(r.type===`ClassAccessorProperty`||r.type===`AccessorProperty`||r.type===`TSAbstractAccessorProperty`)&&i.push(`accessor `),i.push(bm(e,t,n),Jf(e),Yf(e),yp(e,n)),[Zp(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),t.semi?`;`:``]}var ag=z([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function og(e){return ag(e)?og(e.expression):e}var sg=z([`FunctionExpression`,`ArrowFunctionExpression`]);function cg(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function lg(e,t){if(Rm(e,t)){let t=og(e.node.expression);return sg(t)||cg(t)}return!(!t.semi||Im(e,t)||Lm(e,t))}function ug(e,t,n){return[n(`expression`),lg(e,t)?`;`:``]}function dg(e,t,n){if(t.__isVueBindings||t.__isVueForBindingLeft){let r=e.map(n,`program`,`body`,0,`params`);if(r.length===1)return r[0];let i=Y([`,`,X],r);return t.__isVueForBindingLeft?[`(`,K([Z,q(i)]),Z,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return Y([`,`,X],t)}}function fg(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return hg(n);case`BigIntLiteral`:return mg(n.extra.raw);case`NumericLiteral`:return ap(n.extra.raw);case`StringLiteral`:return yu(To(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return _g(n.extra.raw,t);case`Literal`:{if(n.regex)return hg(n.regex);if(n.bigint)return mg(n.raw);let{value:r}=n;return typeof r==`number`?ap(n.raw):typeof r==`string`?pg(e)?_g(n.raw,t):yu(To(n.raw,t)):String(r)}}}function pg(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function mg(e){return e.toLowerCase()}function hg({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var gg=`use strict`;function _g(e,t){let n=e.slice(1,-1);if(n===gg||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}function vg(e,t,n){let r=e.originalText.slice(t,n);for(let i of e[Symbol.for(`comments`)]){let e=I(i);if(e>n)break;let a=L(i);if(ae.value&&(e.value.type===`ObjectPattern`||e.value.type===`ArrayPattern`))||r.type!==`ObjectPattern`&&t.objectWrap===`preserve`&&u.length>0&&Cg(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,q(n())];return f=[`,`,X],sc(e,t)&&f.push(Q),r},l);if(c){let n;if(U(r,H.Dangling)){let i=U(r,H.Line);n=[$(e,t),i||ao(t.originalText,L(P(0,oc(r),-1)))?Q:X,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||P(0,u,-1)?.type===`RestElement`),h;if(p.length===0){if(!U(r,H.Dangling))return[`{}`,yp(e,n)];h=q([`{`,$(e,t,{indent:!0}),Z,`}`,Jf(e),yp(e,n)])}else{let r=t.bracketSpacing?X:Z;h=[`{`,K([r,...p]),J(m&&Bs(t)?`,`:``),r,`}`,Jf(e),yp(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!F(e.decorators),qf)||ds(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,qf)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,qf))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:q(h,{shouldBreak:d})}function Cg(e,t,n){let r=n.originalText,i=I(e),a=I(t);if(bg(e)){let t=I(e);i=t+yg(n,t,a).lastIndexOf(`{`)}return Ic(r,i,a)}function wg(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,Ag(r),Ng(e,t,n),Mg(e,t,n),Lg(e,t,n),t.semi?`;`:``]}var Tg=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function Eg(e,t,n){let{node:r}=e,i=[yh(e,t,n),Zf(e),`export`,Tg(r)?` default`:``],{declaration:a,exported:o}=r;return U(r,H.Dangling)&&(i.push(` `,$(e,t)),Fs(r)&&i.push(Q)),a?i.push(` `,n(`declaration`)):(i.push(jg(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(Ng(e,t,n)),i.push(Mg(e,t,n),Lg(e,t,n))),i.push(Og(r,t)),i}var Dg=z([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function Og(e,t){return t.semi&&(!e.declaration||Tg(e)&&!Dg(e.declaration))?`;`:``}function kg(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function Ag(e,t){return kg(e.importKind,t)}function jg(e){return kg(e.exportKind)}function Mg(e,t,n){let{node:r}=e;return r.source?[Pg(r,t)?` from`:``,` `,n(`source`)]:``}function Ng(e,t,n){let{node:r}=e;if(!Pg(r,t))return``;let i=[` `];if(F(r.specifiers)){let a=[],o=[];e.each(()=>{let t=e.node.type;if(t===`ExportNamespaceSpecifier`||t===`ExportDefaultSpecifier`||t===`ImportNamespaceSpecifier`||t===`ImportDefaultSpecifier`)a.push(n());else if(t===`ExportSpecifier`||t===`ImportSpecifier`)o.push(n());else throw new zm(r,`specifier`)},`specifiers`),i.push(Y(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>U(e))?i.push(q([`{`,K([t.bracketSpacing?X:Z,Y([`,`,X],o)]),J(Bs(t)?`,`:``),t.bracketSpacing?X:Z,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function Pg(e,t){return e.type!==`ImportDeclaration`||F(e.specifiers)||e.importKind===`type`?!0:yg(t,I(e),I(e.source)).trimEnd().endsWith(`from`)}function Fg(e,t){if(e.extra?.deprecatedAssertSyntax)return`assert`;let n=yg(t,L(e.source),e.attributes?.[0]?I(e.attributes[0]):L(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||F(e.attributes)?`with`:void 0}var Ig=e=>{let{attributes:t}=e;if(t.length!==1)return!1;let[n]=t,{type:r,key:i,value:a}=n;return r===`ImportAttribute`&&(i.type===`Identifier`&&i.name===`type`||ss(i)&&i.value===`type`)&&ss(a)&&!U(n)&&!U(i)&&!U(a)};function Lg(e,t,n){let{node:r}=e;if(!r.source)return``;let i=Fg(r,t);if(!i)return``;let a=Sg(e,t,n);return Ig(r)&&(a=gu(a)),[` ${i} `,a]}function Rg(e,t,n){let{node:r}=e,{type:i}=r,a=i.startsWith(`Import`),o=a?`imported`:`local`,s=a?`local`:`exported`,c=r[o],l=r[s],u=``,d=``;return i===`ExportNamespaceSpecifier`||i===`ImportNamespaceSpecifier`?u=`*`:c&&(u=n(o)),l&&!zg(r)&&(d=n(s)),[kg(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function zg(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;if(t.type!==n.type||!ko(t,n))return!1;if(ss(t))return t.value===n.value&&zo(t)===zo(n);switch(t.type){case`Identifier`:return t.name===n.name;default:return!1}}function Bg(e,t){return[`...`,t(`argument`),yp(e,t)]}function Vg(e){let t=[e];for(let e=0;ef[e]===r),m=f.type===r.type&&!p,h,g,_=0;do g=h||r,h=e.getParentNode(_),_++;while(h&&h.type===r.type&&s.every(e=>h[e]!==g));let v=h||f,y=g;if(i&&(hs(r[s[0]])||hs(c)||hs(l)||Vg(y))){d=!0,m=!0;let e=e=>[J(`(`),K([Z,e]),Z,J(`)`)],t=e=>e.type===`NullLiteral`||e.type===`Literal`&&e.value===null||e.type===`Identifier`&&e.name===`undefined`;u.push(` ? `,t(c)?n(a):e(n(a)),` : `,l.type===r.type||t(l)?n(o):e(n(o)))}else{let e=e=>t.useTabs?K(n(e)):Ou(2,n(e)),i=[X,`? `,c.type===r.type?J(``,`(`):``,e(a),c.type===r.type?J(``,`)`):``,X,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?Au(K(i)):Ou(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?q(e):e,x=!d&&(V(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=Wg(e),ee=b([Hg(e,t,n),m?u:K(u),i&&x&&!S?Z:``]);return p||S?q([K([Z,ee]),Z]):ee}function Kg(e,t){return(V(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function qg(e,t,n,r){return[...e.map(e=>oc(e)),oc(t),oc(n)].flat().some(e=>Bo(e)&&Ic(r.originalText,I(e),L(e)))}var Jg=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function Yg(e){let{node:t}=e;if(t.type!==`ConditionalExpression`)return!1;let n,r=t;for(let t=0;!n;t++){let i=e.getParentNode(t);if(i.type===`ChainExpression`&&i.expression===r||B(i)&&i.callee===r||V(i)&&i.object===r||i.type===`TSNonNullExpression`&&i.expression===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||uc(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r===t?!1:n[Jg.get(n.type)]===r}var Xg=e=>[J(`(`),K([Z,e]),Z,J(`)`)];function Zg(e,t,n,r){if(!t.experimentalTernaries)return Gg(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=pc(i),s=a?`consequent`:`trueType`,c=a?`alternate`:`falseType`,l=a?[`test`]:[`checkType`,`extendsType`],u=i[s],d=i[c],f=l.map(e=>i[e]),{parent:p}=e,m=p.type===i.type,h=m&&l.some(e=>p[e]===i),g=m&&p[c]===i,_=u.type===i.type,v=d.type===i.type,y=v||g,b=t.tabWidth>2||t.useTabs,x,S,ee=0;do S=x||i,x=e.getParentNode(ee),ee++;while(x&&x.type===i.type&&l.every(e=>x[e]!==S));let C=x||p,w=r&&r.assignmentLayout&&r.assignmentLayout!==`break-after-operator`&&(p.type===`AssignmentExpression`||p.type===`VariableDeclarator`||p.type===`ClassProperty`||p.type===`PropertyDefinition`||p.type===`ClassPrivateProperty`||p.type===`ObjectProperty`||p.type===`Property`),te=(p.type===`ReturnStatement`||p.type===`ThrowStatement`)&&!(_||v),T=a&&C.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,E=Yg(e),ne=Kg(i,p),D=o&&jf(e,t),re=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,O=qg(f,u,d,t)||_||v,ie=!y&&!m&&!o&&(T?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:js(u,t)&&Os(i.test,3)),k=y||g||o&&!m||m&&a&&Os(i.test,1)||ie,ae=[];!_&&U(u,H.Dangling)&&e.call(()=>{ae.push($(e,t),Q)},`consequent`);let oe=[];U(i.test,H.Dangling)&&e.call(()=>{oe.push($(e,t))},`test`),!v&&U(d,H.Dangling)&&e.call(()=>{oe.push($(e,t))},`alternate`),U(i,H.Dangling)&&oe.push($(e,t));let se=Symbol(`test`),ce=Symbol(`consequent`),le=Symbol(`test-and-consequent`),ue=q([a?[Xg(n(`test`)),i.test.type===`ConditionalExpression`?Mu:``]:[n(`checkType`),` `,`extends`,` `,pc(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):q(Xg(n(`extendsType`)))],` ?`],{id:se}),de=n(s),fe=K([_||T&&(hs(u)||m||y)?Q:X,ae,de]),pe=k?q([ue,y?fe:J(fe,q(fe,{id:ce}),{groupId:se})],{id:le}):[ue,fe],me=n(c),he=ie?J(me,Au(Xg(me)),{groupId:le}):me,ge=[pe,oe.length>0?[K([Q,oe]),Q]:v?Q:ie?J(X,` `,{groupId:le}):X,`:`,v?` `:b?k?J(re,J(y||ie?` `:re,` `),{groupId:le}):J(re,` `):` `,v?he:q([K(he),T&&!ie?Z:``]),ne&&!E?Z:``,O?Mu:``];return w&&!O?q(K([Z,q(ge)])):w||te?q(K(ge)):E||o&&h?q([K([Z,ge]),D?Z:``]):p===C?q(ge):ge}function Qg(e,t,n,r){let{node:i}=e;if(ls(i))return fg(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[$(e,t),n(`node`),Q];case`File`:return dg(e,t,n)??n(`program`);case`ExpressionStatement`:return ug(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!U(i.expression)&&(ns(i.expression)||ts(i.expression))?[`(`,n(`expression`),`)`]:q([`(`,K([Z,n(`expression`)]),Z,`)`]);case`AssignmentExpression`:return Qp(e,t,n);case`VariableDeclarator`:return $p(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return sp(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return Hp(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return Rp(e,t,n);case`Identifier`:return[i.name,Jf(e),Yf(e),yp(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return Bg(e,n);case`RestElement`:return Bg(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return Cm(e,t,n,r);case`ArrowFunctionExpression`:return Eh(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:{let t=[`await`];if(i.argument){t.push(` `,n(`argument`));let{parent:r}=e;if(B(r)&&r.callee===i||V(r)&&r.object===i){t=[K([Z,...t]),Z];let n=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(n?.type!==`AwaitExpression`||!Vs(n.argument,e=>e===i))return q(t)}}return t}case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return Eg(e,t,n);case`ImportDeclaration`:return wg(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return Rg(e,t,n);case`ImportAttribute`:return xm(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return Ph(e,t,n);case`ClassBody`:return Rh(e,t,n);case`ThrowStatement`:return jm(e,t,n);case`ReturnStatement`:return Am(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return Kp(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return Sg(e,t,n);case`Property`:return gs(i)?wm(e,t,n):xm(e,t,n);case`ObjectProperty`:return xm(e,t,n);case`ObjectMethod`:return wm(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return Cp(e,t,n);case`SequenceExpression`:{let{parent:t}=e;if(t.type===`ExpressionStatement`||t.type===`ForStatement`){let t=[];return e.each(({isFirst:e})=>{e?t.push(n()):t.push(`,`,K([X,n()]))},`expressions`),q(t)}let r=Y([`,`,X],e.map(n,`expressions`));return(t.type===`ReturnStatement`||t.type===`ThrowStatement`)&&e.key===`argument`||t.type===`ArrowFunctionExpression`&&e.key===`body`?q(J([K([Z,r]),Z],r)):q(r)}case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),t.semi?`;`:``];case`UnaryExpression`:{let e=[i.operator];return/[a-z]$/u.test(i.operator)&&e.push(` `),U(i.argument)?e.push(q([`(`,K([Z,n(`argument`)]),Z,`)`])):e.push(n(`argument`)),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return Zg(e,t,n,r);case`VariableDeclaration`:{let r=e.map(n,`declarations`),a=e.parent,o=a.type===`ForStatement`||a.type===`ForInStatement`||a.type===`ForOfStatement`,s=i.declarations.some(e=>e.init),c;return r.length===1&&!U(i.declarations[0])?c=r[0]:r.length>0&&(c=K(r[0])),q([Zf(e),i.kind,c?[` `,c]:``,K(r.slice(1).map(e=>[`,`,s&&!o?Q:X,e])),t.semi&&!(o&&a.body!==i)?`;`:``])}case`WithStatement`:return q([`with (`,n(`object`),`)`,ep(i.body,n(`body`))]);case`IfStatement`:{let r=ep(i.consequent,n(`consequent`)),a=[q([`if (`,q([K([Z,n(`test`)]),Z]),`)`,r])];if(i.alternate){let r=U(i.consequent,H.Trailing|H.Line)||Fs(i),o=i.consequent.type===`BlockStatement`&&!r;a.push(o?` `:Q),U(i,H.Dangling)&&a.push($(e,t),r?Q:` `),a.push(`else`,q(ep(i.alternate,n(`alternate`),i.alternate.type===`IfStatement`)))}return a}case`ForStatement`:{let r=ep(i.body,n(`body`)),a=$(e,t),o=a?[a,Z]:``;return!i.init&&!i.test&&!i.update?[o,q([`for (;;)`,r])]:[o,q([`for (`,q([K([Z,n(`init`),`;`,X,n(`test`),`;`,i.update?[X,n(`update`)]:J(``,X)]),Z]),`)`,r])]}case`WhileStatement`:return q([`while (`,q([K([Z,n(`test`)]),Z]),`)`,ep(i.body,n(`body`))]);case`ForInStatement`:return q([`for (`,n(`left`),` in `,n(`right`),`)`,ep(i.body,n(`body`))]);case`ForOfStatement`:return q([`for`,i.await?` await`:``,` (`,n(`left`),` of `,n(`right`),`)`,ep(i.body,n(`body`))]);case`DoWhileStatement`:return[q([`do`,ep(i.body,n(`body`))]),i.body.type===`BlockStatement`?` `:Q,`while (`,q([K([Z,n(`test`)]),Z]),`)`,t.semi?`;`:``];case`DoExpression`:return[i.async?`async `:``,`do `,n(`body`)];case`BreakStatement`:case`ContinueStatement`:return[i.type===`BreakStatement`?`break`:`continue`,i.label?[` `,n(`label`)]:``,t.semi?`;`:``];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!U(i.body,H.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return[`try `,n(`block`),i.handler?[` `,n(`handler`)]:``,i.finalizer?[` finally `,n(`finalizer`)]:``];case`CatchClause`:if(i.param){let e=U(i.param,e=>!Bo(e)||e.leading&&ao(t.originalText,L(e))||e.trailing&&ao(t.originalText,I(e),{backwards:!0})),r=n(`param`);return[`catch `,e?[`(`,K([Z,r]),Z,`) `]:[`(`,r,`) `],n(`body`)]}return[`catch `,n(`body`)];case`SwitchStatement`:return[q([`switch (`,K([Z,n(`discriminant`)]),Z,`)`]),` {`,i.cases.length>0?K([Q,Y(Q,e.map(({node:e,isLast:r})=>[n(),!r&&sc(e,t)?Q:``],`cases`))]):``,Q,`}`];case`SwitchCase`:{let r=[];i.test?r.push(`case `,n(`test`),`:`):r.push(`default:`),U(i,H.Dangling)&&r.push(` `,$(e,t));let a=i.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let i=Nh(e,t,n,`consequent`);r.push(a.length===1&&a[0].type===`BlockStatement`?[` `,i]:K([Q,i]))}return r}case`DebuggerStatement`:return[`debugger`,t.semi?`;`:``];case`ClassDeclaration`:case`ClassExpression`:return Yh(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return rg(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return ig(e,t,n);case`TemplateElement`:return yu(i.value.raw);case`TemplateLiteral`:return dd(e,t,n);case`TaggedTemplateExpression`:return fd(e,t,n);case`PrivateIdentifier`:return[`#`,i.name];case`PrivateName`:return[`#`,n(`id`)];case`TopicReference`:return`%`;case`ArgumentPlaceholder`:return`?`;case`ModuleExpression`:return[`module `,n(`body`)];case`VoidPattern`:return`void`;case`EmptyStatement`:if(Yo(e))return`;`;default:throw new zm(i,`ESTree`)}}function $g(e){return[e(`elementType`),`[]`]}var e_=z([`SatisfiesExpression`,`TSSatisfiesExpression`]);function t_(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,e_(i)?`satisfies`:`as`,` `,o];return a===`callee`&&B(r)||a===`object`&&V(r)?q([K([Z,...s]),Z]):s}function n_(e,t,n){let{node:r}=e,i=[Zf(e),`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=r_(e,t,n);return r.rendersType?i.push(q([a,` `,n(`rendersType`)])):i.push(q([a])),r.body&&i.push(` `,n(`body`)),t.semi&&r.type===`DeclareComponent`&&i.push(`;`),i}function r_(e,t,n){let{node:r}=e,i=r.params;if(r.rest&&(i=[...i,r.rest]),i.length===0)return[`(`,$(e,t,{filter:e=>Pc(t.originalText,L(e))===`)`}),`)`];let a=[];return a_(e,(e,o)=>{let s=o===i.length-1;s&&r.rest&&a.push(`...`),a.push(n()),!s&&(a.push(`,`),sc(i[o],t)?a.push(Q,Q):a.push(X))}),[`(`,K([Z,...a]),J(Bs(t,`all`)&&!i_(r,i)?`,`:``),Z,`)`]}function i_(e,t){return e.rest||P(0,t,-1)?.type===`RestElement`}function a_(e,t){let{node:n}=e,r=0,i=e=>t(e,r++);e.each(i,`params`),n.rest&&e.call(i,`rest`)}function o_(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function s_(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function c_(e,t,n){return Sg(e,t,n)}function l_(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,c_(e,t,n)]}function u_(e,t){let{node:n}=e,r=t(`id`);n.computed&&(r=[`[`,r,`]`]);let i=``;return n.initializer&&(i=t(`initializer`)),n.init&&(i=t(`init`)),i?[r,` = `,i]:r}function d_(e,t){let{node:n}=e;return[Zf(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function f_(e,t,n){let{node:r}=e,i=[$f(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=Vf(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(p_(e)?` => `:`: `,n(`returnType`)):o.push(yp(e,n,`returnType`)),Wf(r,o)&&(a=q(a)),i.push(a,o),[q(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?Vh(e,t):``]}function p_(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(_s(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&Do(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function m_(e,t,n){let{node:r}=e,i=[`hook`];r.id&&i.push(` `,n(`id`));let a=Vf(e,t,n,!1,!0),o=Om(e,n),s=Wf(r,o);return i.push(q([s?q(a):a,o]),r.body?` `:``,n(`body`)),i}function h_(e,t,n){let{node:r}=e,i=[Zf(e),`hook`];return r.id&&i.push(` `,n(`id`)),t.semi&&i.push(`;`),i}function g_(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function __(e,t,n){let{node:r}=e,i=Vf(e,t,n,!1,!0),a=[g_(e)?`: `:` => `,n(`returnType`)];return q([g_(e)?``:`hook `,Wf(r,a)?q(i):i,a])}function v_(e,t,n){return[n(`objectType`),Jf(e),`[`,n(`indexType`),`]`]}function y_(e,t,n){return[`infer `,n(`typeParameter`)]}function b_(e,t,n){let r=!1;return q(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=ds(a),l=ds(i);return l&&c?[` & `,r?K(s):s]:!l&&!c||Ms(t.originalText,a)?t.experimentalOperatorPosition===`start`?K([X,`& `,s]):K([` &`,X,s]):(o>1&&(r=!0),[` & `,o>1?K(s):s])},`types`))}function x_(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function S_(e,t,n){let{node:r}=e;return[q([r.variance?n(`variance`):``,`[`,K([n(`keyTparam`),` in `,n(`sourceType`)]),`]`,x_(r.optional),`: `,n(`propType`)]),Vh(e,t)]}function C_(e,t){return e===`+`||e===`-`?e+t:t}function w_(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=I(r),n=yg(t,e+1,I(r.key)),a=e+1+n.search(/\S/u);Ic(t.originalText,e,a)&&(i=!0)}return q([`{`,K([t.bracketSpacing?X:Z,U(r,H.Dangling)?q([$(e,t),Q]):``,q([r.readonly?[C_(r.readonly,`readonly`),` `]:``,`[`,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``,`]`,r.optional?C_(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`)]),t.semi?J(`;`):``]),t.bracketSpacing?X:Z,`}`],{shouldBreak:i})}function T_(e,t,n){let{node:r}=e;return[q([`match (`,K([Z,n(`argument`)]),Z,`)`]),` {`,r.cases.length>0?K([Q,Y(Q,e.map(({node:e,isLast:r})=>[n(),!r&&sc(e,t)?Q:``],`cases`))]):``,Q,`}`]}function E_(e,t,n){let{node:r}=e,i=U(r,H.Dangling)?[` `,$(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:K([X,n(`body`),`,`]);return[n(`pattern`),r.guard?q([K([X,`if (`,n(`guard`),`)`])]):``,q([` =>`,i,a])]}function D_(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return j_(e,t,n);case`MatchAsPattern`:return[n(`pattern`),` as `,n(`target`)];case`MatchWildcardPattern`:return[`_`];case`MatchLiteralPattern`:return n(`literal`);case`MatchUnaryPattern`:return[r.operator,n(`argument`)];case`MatchIdentifierPattern`:return n(`id`);case`MatchMemberPattern`:{let e=r.property.type===`Identifier`?[`.`,n(`property`)]:[`[`,K([Z,n(`property`)]),Z,`]`];return q([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:{let t=e.map(n,`properties`);return r.rest&&t.push(n(`rest`)),q([`{`,K([Z,Y([`,`,X],t)]),r.rest?``:J(`,`),Z,`}`])}case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),q([`[`,K([Z,Y([`,`,X],t)]),r.rest?``:J(`,`),Z,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):q([n(`key`),`:`,K([X,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}var O_=z([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function k_(e){let{patterns:t}=e;if(t.some(e=>U(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||O_(e)):!1}function A_(e){return O_(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`?k_(e):!1}function j_(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!Ms(t.originalText,r),o=A_(r),s=e.map(()=>{let r=n();return o||(r=Ou(2,r)),zf(e,r,t)},`patterns`);if(o)return Y(` | `,s);let c=[J([`| `]),Y([X,`| `],s)];return jf(e,t)?q([K([J([Z]),c]),Z]):i.type===`MatchArrayPattern`&&i.elements.length>1?q([K([J([`(`,Z]),c]),Z,J(`)`)]):q(a?K(c):c)}function M_(e,t,n){let{node:r}=e,i=[Zf(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(K([X,`super `,n(`lowerBound`)])),r.upperBound&&e.push(K([X,`extends `,n(`upperBound`)])),i.push(q(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(t.semi?`;`:``),i}function N_(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function P_(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function F_(e,t,n){let{node:r}=e;return[Zp(e,t,n,[Zf(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),t.semi?`;`:``]}function I_(e,t,n){let{node:r}=e;return Zs(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function L_(e,t,n,r){let{node:i}=e;if(!i[r])return``;if(!Array.isArray(i[r]))return n(r);let a=Es(e.grandparent),o=e.match(e=>!(e[r].length===1&&ds(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,cm);if(i[r].length===0||!o&&(a||i[r].length===1&&(i[r][0].type===`NullableTypeAnnotation`||_p(i[r][0]))))return[`<`,Y(`, `,e.map(n,r)),R_(e,t),`>`];let s=i.type===`TSTypeParameterInstantiation`?``:I_(e,t,r)?`,`:Bs(t)?J(`,`):``;return q([`<`,K([Z,Y([`,`,X],e.map(n,r))]),s,Z,`>`])}function R_(e,t){let{node:n}=e;if(!U(n,H.Dangling))return``;let r=!U(n,H.Line),i=$(e,t,{indent:!r});return r?i:[i,Q]}function z_(e,t,n){let{node:r}=e,i=[r.const?`const `:``],a=r.type===`TSTypeParameter`?n(`name`):r.name;if(r.variance&&i.push(n(`variance`)),r.in&&i.push(`in `),r.out&&i.push(`out `),i.push(a),r.bound&&(r.usesExtendsBound&&i.push(` extends `),i.push(yp(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,q(K(X),{id:e}),Vu,Iu(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,q(K(X),{id:e}),Vu,Iu(n(`default`),{groupId:e}))}return q(i)}function B_(e,t){let{node:n}=e;return[n.type===`TSTypePredicate`&&n.asserts?`asserts `:n.type===`TypePredicate`&&n.kind?`${n.kind} `:``,t(`parameterName`),n.typeAnnotation?[` is `,yp(e,t)]:``]}function V_({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function H_(e,t,n){let{node:r}=e;if(Vo(r))return r.type.slice(0,-14).toLowerCase();switch(r.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return n_(e,t,n);case`ComponentParameter`:return o_(e,t,n);case`ComponentTypeParameter`:return s_(e,t,n);case`HookDeclaration`:return m_(e,t,n);case`DeclareHook`:return h_(e,t,n);case`HookTypeAnnotation`:return __(e,t,n);case`DeclareFunction`:return[Zf(e),`function `,n(`id`),n(`predicate`),t.semi?`;`:``];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,yp(e,n),t.semi?`;`:``];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return[Zf(e),r.kind??`var`,` `,n(`id`),t.semi?`;`:``];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return Eg(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return M_(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return F_(e,t,n);case`IntersectionTypeAnnotation`:return b_(e,t,n);case`UnionTypeAnnotation`:return pp(e,t,n);case`ConditionalTypeAnnotation`:return Zg(e,t,n);case`InferTypeAnnotation`:return y_(e,t,n);case`FunctionTypeAnnotation`:return f_(e,t,n);case`TupleTypeAnnotation`:return Cp(e,t,n);case`TupleTypeLabeledElement`:return P_(e,t,n);case`TupleTypeSpreadElement`:return N_(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),L_(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return v_(e,t,n);case`TypeAnnotation`:return xp(e,t,n);case`TypeParameter`:return z_(e,t,n);case`TypeofTypeAnnotation`:return V_(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return $g(n);case`DeclareEnum`:case`EnumDeclaration`:return d_(e,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return l_(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return u_(e,n);case`FunctionTypeParam`:{let t=r.name?n(`name`):e.parent.this===r?`this`:``;return[t,Jf(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:return Yh(e,t,n);case`ObjectTypeAnnotation`:return Rh(e,t,n);case`ClassImplements`:case`InterfaceExtends`:return[n(`id`),n(`typeParameters`)];case`NullableTypeAnnotation`:return[`?`,n(`typeAnnotation`)];case`Variance`:{let{kind:e}=r;return e===`plus`?`+`:`-`}case`KeyofTypeAnnotation`:return[`keyof `,n(`argument`)];case`ObjectTypeCallProperty`:return[r.static?`static `:``,n(`value`),Vh(e,t)];case`ObjectTypeMappedTypeProperty`:return S_(e,t,n);case`ObjectTypeIndexer`:return[r.static?`static `:``,r.variance?n(`variance`):``,`[`,n(`id`),r.id?`: `:``,n(`key`),`]: `,n(`value`),Vh(e,t)];case`ObjectTypeProperty`:{let i=``;return r.proto?i=`proto `:r.static&&(i=`static `),[i,r.kind===`init`?``:r.kind+` `,r.variance?n(`variance`):``,bm(e,t,n),Jf(e),gs(r)?``:`: `,n(`value`),Vh(e,t)]}case`ObjectTypeInternalSlot`:return[r.static?`static `:``,`[[`,n(`id`),`]]`,Jf(e),r.method?``:`: `,n(`value`),Vh(e,t)];case`ObjectTypeSpreadProperty`:return Bg(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(r.value);case`StringLiteralTypeAnnotation`:return yu(To(zo(r),t));case`NumberLiteralTypeAnnotation`:return ap(zo(r));case`BigIntLiteralTypeAnnotation`:return mg(zo(r));case`TypeCastExpression`:return[`(`,n(`expression`),yp(e,n),`)`];case`TypePredicate`:return B_(e,n);case`TypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return L_(e,t,n,`params`);case`InferredPredicate`:case`DeclaredPredicate`:return[e.key===`predicate`&&e.parent.type!==`DeclareFunction`&&!e.parent.returnType?`: `:` `,`%checks`,...r.type===`DeclaredPredicate`?[`(`,n(`value`),`)`]:[]];case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return t_(e,t,n);case`MatchExpression`:case`MatchStatement`:return T_(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return E_(e,t,n);case`MatchOrPattern`:case`MatchAsPattern`:case`MatchWildcardPattern`:case`MatchLiteralPattern`:case`MatchUnaryPattern`:case`MatchIdentifierPattern`:case`MatchMemberPattern`:case`MatchBindingPattern`:case`MatchObjectPattern`:case`MatchObjectPatternProperty`:case`MatchRestPattern`:case`MatchArrayPattern`:return D_(e,t,n)}}function U_(e,t,n){let{node:r}=e,i=r.parameters.length>1?J(Bs(t)?`,`:``):``,a=q([K([Z,Y([`, `,Z],e.map(n,`parameters`))]),i,Z]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,yp(e,n),Vh(e,t)]}function W_(e,t,n){let{node:r}=e;return[r.postfix?``:n,yp(e,t),r.postfix?n:``]}function G_(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(tp(r),a,r.computed?`[`:``,n(`key`),r.computed?`]`:``,Jf(e));let o=Vf(e,t,n,!1,!0),s=yp(e,n,`returnType`),c=Wf(r,s);return i.push(c?q(o):o),r.returnType&&i.push(q(s)),[q(i),Vh(e,t)]}function K_(e,t,n){let{node:r}=e;return[Zf(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,q(n(`body`))]:t.semi?`;`:``]}function q_(e,t,n){let{node:r}=e,i=!(ts(r.expression)||ns(r.expression)),a=q([`<`,K([Z,n(`typeAnnotation`)]),Z,`>`]),o=[J(`(`),K([Z,n(`expression`)]),Z,J(`)`)];return i?Fu([[a,n(`expression`)],[a,q(o,{shouldBreak:!0})],[a,n(`expression`)]]):q([a,n(`expression`)])}function J_(e,t,n){let{node:r}=e;if(r.type.startsWith(`TS`)){if(qo(r))return r.type.slice(2,-7).toLowerCase();switch(r.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return q_(e,t,n);case`TSDeclareFunction`:return Cm(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),t.semi?`;`:``];case`TSModuleBlock`:return Ph(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return Rh(e,t,n);case`TSTypeAliasDeclaration`:return F_(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return rg(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return ig(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return dd(e,t,n);case`TSNamedTupleMember`:return P_(e,t,n);case`TSRestType`:return N_(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return Yh(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return L_(e,t,n,`params`);case`TSTypeParameter`:return z_(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return t_(e,t,n);case`TSArrayType`:return $g(n);case`TSPropertySignature`:return[r.readonly?`readonly `:``,bm(e,t,n),Jf(e),yp(e,n),Vh(e,t)];case`TSParameterProperty`:return[tp(r),r.static?`static `:``,r.override?`override `:``,r.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return V_(e,n);case`TSIndexSignature`:return U_(e,t,n);case`TSTypePredicate`:return B_(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[Kp(e,t,n),r.qualifier?[`.`,n(`qualifier`)]:``,L_(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return v_(e,t,n);case`TSTypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return w_(e,t,n);case`TSMethodSignature`:return G_(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),t.semi?`;`:``];case`TSEnumDeclaration`:return d_(e,n);case`TSEnumBody`:return c_(e,t,n);case`TSEnumMember`:return u_(e,n);case`TSImportEqualsDeclaration`:return[`import `,Ag(r,!1),n(`id`),` = `,n(`moduleReference`),t.semi?`;`:``];case`TSExternalModuleReference`:return Kp(e,t,n);case`TSModuleDeclaration`:return K_(e,t,n);case`TSConditionalType`:return Zg(e,t,n);case`TSInferType`:return y_(e,t,n);case`TSIntersectionType`:return b_(e,t,n);case`TSUnionType`:return pp(e,t,n);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return f_(e,t,n);case`TSTupleType`:return Cp(e,t,n);case`TSTypeReference`:return[n(`typeName`),L_(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return xp(e,t,n);case`TSEmptyBodyFunctionExpression`:return Tm(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return W_(e,n,`?`);case`TSJSDocNonNullableType`:return W_(e,n,`!`);default:throw new zm(r,`TypeScript`)}}}function Y_(e,t,n,r){for(let i of[ph,oh,H_,J_,Qg]){let a=i(e,t,n,r);if(a!==void 0)return a}}var X_=z([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function Z_(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=fh(e)?t.originalText.slice(I(i),L(i)):Y_(e,t,n,r);if(!a)return``;if(X_(i))return a;let o=F(i.decorators),s=bh(e,t,n),c=i.type===`ClassExpression`;if(o&&!c)return Su(a,e=>q([s,e]));let l=jf(e,t),u=Nm(e,t);return!s&&!l&&!u?a:Su(a,e=>[u?`;`:``,l?`(`:``,l&&c&&o?[K([X,s,e]),X]:[s,e],l?`)`:``])}var Q_=Z_,$_={experimental_avoidAstMutation:!0},ev=[{name:`JSON.stringify`,type:`data`,aceMode:`json`,extensions:[`.importmap`],filenames:[`package.json`,`package-lock.json`,`composer.json`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json-stringify`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON`,type:`data`,aceMode:`json`,extensions:[`.json`,`.4DForm`,`.4DProject`,`.avsc`,`.geojson`,`.gltf`,`.har`,`.ice`,`.JSON-tmLanguage`,`.json.example`,`.mcmeta`,`.sarif`,`.tact`,`.tfstate`,`.tfstate.backup`,`.topojson`,`.webapp`,`.webmanifest`,`.yy`,`.yyp`],filenames:[`.all-contributorsrc`,`.arcconfig`,`.auto-changelog`,`.c8rc`,`.htmlhintrc`,`.imgbotconfig`,`.nycrc`,`.tern-config`,`.tern-project`,`.watchmanconfig`,`.babelrc`,`.jscsrc`,`.jshintrc`,`.jslintrc`,`.swcrc`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON with Comments`,type:`data`,aceMode:`javascript`,extensions:[`.jsonc`,`.code-snippets`,`.code-workspace`,`.sublime-build`,`.sublime-color-scheme`,`.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:[],tmScope:`source.json.comments`,aliases:[`jsonc`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,group:`JSON`,parsers:[`jsonc`],vscodeLanguageIds:[`jsonc`],linguistLanguageId:423},{name:`JSON5`,type:`data`,aceMode:`json5`,extensions:[`.json5`],tmScope:`source.js`,codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json5`],vscodeLanguageIds:[`json5`],linguistLanguageId:175}],tv={};Aa(tv,{getVisitorKeys:()=>rv,massageAstNode:()=>sv,print:()=>iv});var nv=[[]],rv=Fo({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:nv[0],BooleanLiteral:nv[0],StringLiteral:nv[0],NumericLiteral:nv[0],Identifier:nv[0],TemplateLiteral:[`quasis`],TemplateElement:nv[0]});function iv(e,t,n){let{node:r}=e;switch(r.type){case`JsonRoot`:return[n(`node`),Q];case`ArrayExpression`:{if(r.elements.length===0)return`[]`;let t=e.map(()=>e.node===null?`null`:n(),`elements`);return[`[`,K([Q,Y([`,`,Q],t)]),Q,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,K([Q,Y([`,`,Q],e.map(n,`properties`))]),Q,`}`];case`ObjectProperty`:return[n(`key`),`: `,n(`value`)];case`UnaryExpression`:return[r.operator===`+`?``:r.operator,n(`argument`)];case`NullLiteral`:return`null`;case`BooleanLiteral`:return r.value?`true`:`false`;case`StringLiteral`:return JSON.stringify(r.value);case`NumericLiteral`:return av(e)?JSON.stringify(String(r.value)):JSON.stringify(r.value);case`Identifier`:return av(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new zm(r,`JSON`)}}function av(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var ov=new Set([`start`,`end`,`extra`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function sv(e,t){let{type:n}=e;if(n===`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(n===`UnaryExpression`&&e.operator===`+`)return t.argument;if(n===`ArrayExpression`){for(let[n,r]of e.elements.entries())r===null&&t.elements.splice(n,0,{type:`NullLiteral`});return}if(n===`TemplateLiteral`)return{type:`StringLiteral`,value:e.quasis[0].value.cooked}}sv.ignoredProperties=ov;var cv={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.`}},lv=`JavaScript`,uv={arrowParens:{category:lv,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:cv.bracketSameLine,objectWrap:cv.objectWrap,bracketSpacing:cv.bracketSpacing,jsxBracketSameLine:{category:lv,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:lv,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:lv,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:lv,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:cv.singleQuote,jsxSingleQuote:{category:lv,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:lv,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:lv,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:cv.singleAttributePerLine},dv={estree:Na,"estree-json":tv},fv=[...Ma,...ev],pv=Object.create,mv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,gv=Object.getOwnPropertyNames,_v=Object.getPrototypeOf,vv=Object.prototype.hasOwnProperty,yv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bv=(e,t)=>{for(var n in t)mv(e,n,{get:t[n],enumerable:!0})},xv=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of gv(t))!vv.call(e,i)&&i!==n&&mv(e,i,{get:()=>t[i],enumerable:!(r=hv(t,i))||r.enumerable});return e},Sv=(e,t,n)=>(n=e==null?{}:pv(_v(e)),xv(t||!e||!e.__esModule?mv(n,`default`,{value:e,enumerable:!0}):n,e)),Cv=yv((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,h,g,_,v,y,b;p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,g=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,f=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,_=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,b=/[\t\v\f\ufeff\p{Zs}]+/uy,l=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,a=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,o=/[^<>{}]+/y,y=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,d=RegExp(l.source),t.exports=function*(e,{jsx:t=!1}={}){var x,S,ee,C,w,te,T,E,ne,D,re,O,ie,k;for({length:te}=e,C=0,w=``,k=[{tag:`JS`}],x=[],re=0,O=!1;C`:k.pop(),w===`/`||E.tag===`JSXTagEnd`?(D=`?JSX`,O=!0):k.push({tag:`JSXChildren`});break;case`{`:k.push({tag:`InterpolationInJSX`,nesting:x.length}),D=`?InterpolationInJSX`,O=!1;break;case`/`:w===`<`&&(k.pop(),k[k.length-1].tag===`JSXChildren`&&k.pop(),k.push({tag:`JSXTagEnd`}))}w=D,yield{type:`JSXPunctuator`,value:T[0]};continue}if(r.lastIndex=C,T=r.exec(e)){C=r.lastIndex,w=T[0],yield{type:`JSXIdentifier`,value:T[0]};continue}if(a.lastIndex=C,T=a.exec(e)){C=a.lastIndex,w=T[0],yield{type:`JSXString`,value:T[0],closed:T[2]!==void 0};continue}break;case`JSXChildren`:if(o.lastIndex=C,T=o.exec(e)){C=o.lastIndex,w=T[0],yield{type:`JSXText`,value:T[0]};continue}switch(e[C]){case`<`:k.push({tag:`JSXTag`}),C++,w=`<`,yield{type:`JSXPunctuator`,value:`<`};continue;case`{`:k.push({tag:`InterpolationInJSX`,nesting:x.length}),C++,w=`?InterpolationInJSX`,O=!1,yield{type:`JSXPunctuator`,value:`{`};continue}}if(b.lastIndex=C,T=b.exec(e)){C=b.lastIndex,yield{type:`WhiteSpace`,value:T[0]};continue}if(l.lastIndex=C,T=l.exec(e)){C=l.lastIndex,O=!1,c.test(w)&&(w=`?NoLineTerminatorHere`),yield{type:`LineTerminatorSequence`,value:T[0]};continue}if(u.lastIndex=C,T=u.exec(e)){C=u.lastIndex,d.test(T[0])&&(O=!1,c.test(w)&&(w=`?NoLineTerminatorHere`)),yield{type:`MultiLineComment`,value:T[0],closed:T[1]!==void 0};continue}if(h.lastIndex=C,T=h.exec(e)){C=h.lastIndex,O=!1,yield{type:`SingleLineComment`,value:T[0]};continue}S=String.fromCodePoint(e.codePointAt(C)),C+=S.length,w=S,O=!1,yield{type:E.tag.startsWith(`JSX`)?`JSXInvalid`:`Invalid`,value:S}}}});bv({},{__debug:()=>oT,check:()=>iT,doc:()=>_w,format:()=>rT,formatWithCursor:()=>nT,getSupportInfo:()=>aT,util:()=>Sw,version:()=>xw});var wv=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),Tv=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Ev=wv(`replaceAll`,function(){if(typeof this==`string`)return Tv}),Dv=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Ov=new class extends Dv{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function kv(e,t,n){return Ov.diff(e,t,n)}var Av=()=>{},jv=`cr`,Mv=`crlf`,Nv=`lf`,Pv=`\r`,Fv=`\r `,Iv=` `,Lv=Iv;function Rv(e){let t=e.indexOf(Pv);return t===-1?Nv:e.charAt(t+1)===Iv?Mv:jv}function zv(e){return e===jv?Pv:e===Mv?Fv:Lv}var Bv=new Map([[Iv,/\n/gu],[Pv,/\r/gu],[Fv,/\r\n/gu]]);function Vv(e,t){let n=Bv.get(t);return e.match(n)?.length??0}var Hv=/\r\n?/gu;function Uv(e){return Ev(0,e,Hv,Iv)}function Wv(e){return this[e<0?this.length+e:e]}var Gv=wv(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Wv}),Kv=`string`,qv=`array`,Jv=`cursor`,Yv=`indent`,Xv=`align`,Zv=`trim`,Qv=`group`,$v=`fill`,ey=`if-break`,ty=`indent-if-break`,ny=`line-suffix`,ry=`line-suffix-boundary`,iy=`line`,ay=`label`,oy=`break-parent`,sy=new Set([Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy]);function cy(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===` `);)t--;return tnew Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function fy(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(uy(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=dy([...sy].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${r}.`}var py=class extends Error{name=`InvalidDocError`;constructor(e){super(fy(e)),this.doc=e}},my={};function hy(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===my){n(i.pop());continue}n&&i.push(e,my);let a=uy(e);if(!a)throw new py(e);if(t?.(e)!==!1)switch(a){case qv:case $v:{let t=a===qv?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case ey:i.push(e.flatContents,e.breakContents);break;case Qv:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case Xv:case Yv:case ty:case ay:case ny:i.push(e.contents);break;case Kv:case Jv:case Zv:case ry:case iy:case oy:break;default:throw new py(e)}}}var gy=hy;function _y(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(uy(e)){case qv:return t(e.map(r));case $v:return t({...e,parts:e.parts.map(r)});case ey:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case Qv:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case Xv:case Yv:case ty:case ay:case ny:return t({...e,contents:r(e.contents)});case Kv:case Jv:case Zv:case ry:case iy:case oy:return t(e);default:throw new py(e)}}}function vy(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return gy(e,a),r}function yy(e){if(e.type===Qv&&e.break||e.type===iy&&e.hard||e.type===oy)return!0}function by(e){return vy(e,yy,!1)}function xy(e){if(e.length>0){let t=Gv(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function Sy(e){let t=new Set,n=[];function r(e){if(e.type===oy&&xy(n),e.type===Qv){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===Qv&&n.pop().break&&xy(n)}gy(e,r,i,!0)}function Cy(e){return e.type===iy&&!e.hard?e.soft?``:` `:e.type===ey?e.flatContents:e}function wy(e){return _y(e,Cy)}function Ty(e){for(e=[...e];e.length>=2&&Gv(0,e,-2).type===iy&&Gv(0,e,-1).type===oy;)e.length-=2;if(e.length>0){let t=Ey(Gv(0,e,-1));e[e.length-1]=t}return e}function Ey(e){switch(uy(e)){case Yv:case ty:case Qv:case ny:case ay:{let t=Ey(e.contents);return{...e,contents:t}}case ey:return{...e,breakContents:Ey(e.breakContents),flatContents:Ey(e.flatContents)};case $v:return{...e,parts:Ty(e.parts)};case qv:return Ty(e);case Kv:return cy(e);case Xv:case Jv:case Zv:case ry:case iy:case oy:break;default:throw new py(e)}return e}function Dy(e){return Ey(ky(e))}function Oy(e){switch(uy(e)){case $v:if(e.parts.every(e=>e===``))return``;break;case Qv:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===Qv&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Xv:case Yv:case ty:case ny:if(!e.contents)return``;break;case ey:if(!e.flatContents&&!e.breakContents)return``;break;case qv:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof Gv(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case Kv:case Jv:case Zv:case ry:case iy:case ay:case oy:break;default:throw new py(e)}return e}function ky(e){return _y(e,e=>Oy(e))}function Ay(e,t=ib){return _y(e,e=>typeof e==`string`?Zy(t,e.split(` `)):e)}function jy(e){if(e.type===iy)return!0}function My(e){return vy(e,jy,!1)}function Ny(e,t){return e.type===ay?{...e,contents:t(e.contents)}:t(e)}var Py=Av,Fy=Av,Iy=Av,Ly=Av;function Ry(e){return Py(e),{type:Yv,contents:e}}function zy(e,t){return Ly(e),Py(t),{type:Xv,contents:t,n:e}}function By(e){return zy(-1/0,e)}function Vy(e){return zy({type:`root`},e)}function Hy(e){return zy(-1,e)}function Uy(e,t,n){Py(e);let r=e;if(t>0){for(let e=0;e0?`, { ${t.join(`, `)} }`:``;return`indentIfBreak(${r(e.contents)}${n})`}if(e.type===Qv){let t=[];e.break&&e.break!==`propagated`&&t.push(`shouldBreak: true`),e.id&&t.push(`id: ${i(e.id)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return e.expandedStates?`conditionalGroup([${e.expandedStates.map(e=>r(e)).join(`,`)}]${n})`:`group(${r(e.contents)}${n})`}if(e.type===$v)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===ny)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===ry)return`lineSuffixBoundary`;if(e.type===ay)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===Jv)return`cursor`;throw Error(`Unknown doc type `+e.type)}function i(e){if(typeof e!=`symbol`)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||`symbol`;for(let i=0;;i++){let a=r+(i>0?` #${i}`:``);if(!n.has(a))return n.add(a),t[e]=`Symbol.for(${JSON.stringify(a)})`}}}var ub=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function db(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function fb(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var pb=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,mb=/[^\x20-\x7F]/u,hb=new Set(pb);function gb(e){if(!e)return 0;if(!mb.test(e))return e.length;e=e.replace(ub(),e=>hb.has(e)?` `:` `);let t=0;for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=db(e)||fb(e)?2:1)}return t}var _b=gb,vb={type:0},yb={type:1},bb={value:``,length:0,queue:[],get root(){return bb}};function xb(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function Sb(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?yb:{type:2,width:t}:{type:3,string:t},xb(e,r,n)}function Cb(e,t){return xb(e,vb,t)}function wb(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function Tb(e){let t=wb(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var Eb=Symbol(`MODE_BREAK`),Db=Symbol(`MODE_FLAT`),Ob=Symbol(`DOC_FILL_PRINTED_LENGTH`);function kb(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=uy(u);switch(d){case Kv:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=_b(u));break;case qv:case $v:{let t=d===qv?u:u.parts,n=u[Ob]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case Yv:case Xv:case ty:case ay:c.push({mode:e,doc:u.contents});break;case Zv:{let{text:e,count:t}=Tb(l);l=e,n+=t;break}case Qv:{if(a&&u.break)return!1;let t=u.break?Eb:e,n=u.expandedStates&&t===Eb?Gv(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case ey:{let t=(u.groupId?i[u.groupId]||Db:e)===Eb?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case iy:if(e===Eb||u.hard)return!0;u.soft||(s=!0);break;case ny:r=!0;break;case ry:if(r)return!1;break}}return!1}function Ab(e,t){let n=Object.create(null),r=t.printWidth,i=zv(t.endOfLine),a=0,o=[{indent:bb,mode:Eb,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(Sy(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(uy(f)){case Kv:{let e=i===` `?f:Ev(0,f,` `,i);e&&(s+=e,o.length>0&&(a+=_b(e)));break}case qv:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case Jv:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case Yv:o.push({indent:Cb(e,t),mode:d,doc:f.contents});break;case Xv:o.push({indent:Sb(e,f.n,t),mode:d,doc:f.contents});break;case Zv:_();break;case Qv:switch(d){case Db:if(!c){o.push({indent:e,mode:f.break?Eb:Db,doc:f.contents});break}case Eb:{c=!1;let t={indent:e,mode:Db,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&kb(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=Gv(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:Eb,doc:t});break}else for(let r=1;r=f.expandedStates.length){o.push({indent:e,mode:Eb,doc:t});break}else{let t={indent:e,mode:Db,doc:f.expandedStates[r]};if(kb(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:Eb,doc:f.contents});break}}f.id&&(n[f.id]=Gv(0,o,-1).mode);break;case $v:{let t=r-a,i=f[Ob]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:Db,doc:u},h={indent:e,mode:Eb,doc:u},g=kb(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:Db,doc:p},v={indent:e,mode:Eb,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[Ob]:i+2}},x=kb({indent:e,mode:Db,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case ey:case ty:{let t=f.groupId?n[f.groupId]:d;if(t===Eb){let t=f.type===ey?f.breakContents:f.negate?f.contents:Ry(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===Db){let t=f.type===ey?f.flatContents:f.negate?Ry(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case ny:l.push({indent:e,mode:d,doc:f.contents});break;case ry:l.length>0&&o.push({indent:e,mode:d,doc:tb});break;case iy:switch(d){case Db:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case Eb:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length);break}break;case ay:o.push({indent:e,mode:d,doc:f.contents});break;case oy:break;default:throw new py(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,Gv(0,h,-1))};function _(){let{text:e,count:t}=Tb(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function jb(e,t,n=0){let r=0;for(let i=n;i1?Gv(0,e,-2):null}getValue(){return Gv(0,this.stack,-1)}getNode(e=0){let t=this.#e(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#e(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=Gv(0,n,-1);for(let e of t)i=i?.[e],n.push(e,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#e(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=Gv(0,n,-1);for(let e of t)i=i[e],n.push(e,i);try{for(let t=0;t{n[r]=e(t,r,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let e=null;if(typeof n==`number`&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#t())if(e(t))return t}hasAncestor(e){for(let t of this.#t())if(e(t))return!0;return!1}*#t(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}};function Pb(e){return typeof e==`object`&&!!e}var Fb=Pb;function Ib(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&oe===` `||e===`\r`||e===`\u2028`||e===`\u2029`;function Hb(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===` `)return t-2;if(Vb(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===` `)return t+2;if(Vb(i))return t+1}return t}var Ub=Hb;function Wb(e,t,n={}){let r=Rb(e,n.backwards?t-1:t,n);return r!==Ub(e,r,n)}var Gb=Wb;function Kb(e){return Array.isArray(e)&&e.length>0}var qb=Kb;function*Jb(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>Fb(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*Yb(e,t){let n=[e];for(let e=0;e(a??=[e,...t],i(r,a)?[r]:Zb(r,a,n))),{locStart:s,locEnd:c}=n;return o.sort((e,t)=>s(e)-s(t)||c(e)-c(t)),r.set(e,o),o}var Qb=Zb;function $b(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function ex(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=$b(e)}function tx(e,t){t.leading=!0,t.trailing=!1,ex(e,t)}function nx(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),ex(e,t)}function rx(e,t){t.leading=!1,t.trailing=!0,ex(e,t)}var ix=new WeakMap;function ax(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=Qb(e,i,{cache:ix,locStart:a,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),u,d,f=0,p=l.length;for(;f>1,r=l[e],m=a(r),h=o(r);if(m<=s&&c<=h)return ax(r,t,n,r,[r,...i]);if(h<=s){u=r,f=e+1;continue}if(c<=m){d=r,p=e;continue}throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=fx(e,t,n);u&&fx(e,u,n)!==i&&(u=null),d&&fx(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var ox=()=>!1;function sx(e,t){let{comments:n}=e;if(delete e.comments,!qb(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=ox,endOfLine:c=ox,remaining:l=ox}=a,u=n.map((r,i)=>({...ax(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i}));for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:d,text:f,options:p,ast:m,isLastComment:h}=t,g;if(i?g=[t]:(n.enclosingNode=o,n.precedingNode=a,n.followingNode=d,g=[n,f,p,m,h]),lx(f,p,u,e))n.placement=`ownLine`,s(...g)||(d?tx(d,n):a?rx(a,n):nx(o||m,n));else if(ux(f,p,u,e))n.placement=`endOfLine`,c(...g)||(a?rx(a,n):d?tx(d,n):nx(o||m,n));else if(n.placement=`remaining`,!l(...g))if(a&&d){let e=r.length;e>0&&r[e-1].followingNode!==d&&dx(r,p),r.push(t)}else a?rx(a,n):d?tx(d,n):nx(o||m,n)}if(dx(r,t),!i)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var cx=e=>!/[\S\n\u2028\u2029]/u.test(e);function lx(e,t,n,r){let{comment:i,precedingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=o(i);if(a)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:i}=n[t];if(i!==a||!cx(e.slice(s(r),c)))break;c=o(r)}return Gb(e,c,{backwards:!0})}function ux(e,t,n,r){let{comment:i,followingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=s(i);if(a)for(let t=r+1;t0;--o){let{comment:n,precedingNode:r,followingNode:i}=e[o-1],s=t.originalText.slice(t.locEnd(n),a);if(t.printer.isGap?.(s,t)??/^[\s(]*$/u.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t1&&e.comments.sort((e,n)=>t.locStart(e)-t.locStart(n));e.length=0}function fx(e,t,n){let r=n.locStart(t)-1;for(let t=1;t!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(gx(e,t)):c&&(o=_x(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function yx(e,t,n){let{leading:r,trailing:i}=vx(e,n);return!r&&!i?t:Ny(t,e=>[r,e,i])}function bx(e){let{[Symbol.for(`comments`)]:t,[Symbol.for(`printedComments`)]:n}=e;for(let e of t){if(!e.printed&&!n.has(e))throw Error(`Comment "`+e.value.trim()+`" was not printed. Please report this error!`);delete e.printed}}var xx=()=>Av,Sx=class extends Error{name=`ConfigError`},Cx=class extends Error{name=`UndefinedParserError`},wx={checkIgnorePragma:{category:`Special`,type:`boolean`,default:!1,description:`Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.`,cliCategory:`Other`},cursorOffset:{category:`Special`,type:`int`,default:-1,range:{start:-1,end:1/0,step:1},description:`Print (to stderr) where a cursor at the given position would move to after formatting.`,cliCategory:`Editor`},endOfLine:{category:`Global`,type:`choice`,default:`lf`,description:`Which end of line characters to apply.`,choices:[{value:`lf`,description:`Line Feed only (\\n), common on Linux and macOS as well as inside git repos`},{value:`crlf`,description:`Carriage Return + Line Feed characters (\\r\\n), common on Windows`},{value:`cr`,description:`Carriage Return character only (\\r), used very rarely`},{value:`auto`,description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:`Special`,type:`path`,description:`Specify the input filepath. This will be used to do parser inference.`,cliName:`stdin-filepath`,cliCategory:`Other`,cliDescription:`Path to the file to pretend that stdin comes from.`},insertPragma:{category:`Special`,type:`boolean`,default:!1,description:`Insert @format pragma into file's first docblock comment.`,cliCategory:`Other`},parser:{category:`Global`,type:`choice`,default:void 0,description:`Which parser to use.`,exception:e=>typeof e==`string`||typeof e==`function`,choices:[{value:`flow`,description:`Flow`},{value:`babel`,description:`JavaScript`},{value:`babel-flow`,description:`Flow`},{value:`babel-ts`,description:`TypeScript`},{value:`typescript`,description:`TypeScript`},{value:`acorn`,description:`JavaScript`},{value:`espree`,description:`JavaScript`},{value:`meriyah`,description:`JavaScript`},{value:`css`,description:`CSS`},{value:`less`,description:`Less`},{value:`scss`,description:`SCSS`},{value:`json`,description:`JSON`},{value:`json5`,description:`JSON5`},{value:`jsonc`,description:`JSON with Comments`},{value:`json-stringify`,description:`JSON.stringify`},{value:`graphql`,description:`GraphQL`},{value:`markdown`,description:`Markdown`},{value:`mdx`,description:`MDX`},{value:`vue`,description:`Vue`},{value:`yaml`,description:`YAML`},{value:`glimmer`,description:`Ember / Handlebars`},{value:`html`,description:`HTML`},{value:`angular`,description:`Angular`},{value:`lwc`,description:`Lightning Web Components`},{value:`mjml`,description:`MJML`}]},plugins:{type:`path`,array:!0,default:[{value:[]}],category:`Global`,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e==`string`||typeof e==`object`,cliName:`plugin`,cliCategory:`Config`},printWidth:{category:`Global`,type:`int`,default:80,description:`The line length where Prettier will try wrap.`,range:{start:0,end:1/0,step:1}},rangeEnd:{category:`Special`,type:`int`,default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:`Editor`},rangeStart:{category:`Special`,type:`int`,default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:`Editor`},requirePragma:{category:`Special`,type:`boolean`,default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:`Other`},tabWidth:{type:`int`,category:`Global`,default:2,description:`Number of spaces per indentation level.`,range:{start:0,end:1/0,step:1}},useTabs:{category:`Global`,type:`boolean`,default:!1,description:`Indent with tabs instead of spaces.`},embeddedLanguageFormatting:{category:`Global`,type:`choice`,default:`auto`,description:`Control how Prettier formats quoted code embedded in the file.`,choices:[{value:`auto`,description:`Format embedded code if Prettier can automatically identify it.`},{value:`off`,description:`Never automatically format embedded code.`}]}};function Tx({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of Dx(Object.assign({},...e.map(({options:e})=>e),wx)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...Ex(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(e=>e.defaultOptions?.[i.name]!==void 0).map(e=>[e.name,e.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*Ex(e,t,n){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers){for(let t of e.parsers)if(!r.has(t)){r.add(t);let i=n.find(e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function Dx(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=Gv(0,e.default,-1).value),t.push(e)}return t}var Ox=Array.prototype.toReversed??function(){return[...this].reverse()},kx=wv(`toReversed`,function(){if(Array.isArray(this))return Ox});function Ax(){let e=globalThis,t=e.Deno?.build?.os;return typeof t==`string`?t===`windows`:e.navigator?.platform?.startsWith(`Win`)??e.process?.platform?.startsWith(`win`)??!1}var jx=Ax();function Mx(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Nx(e){return e=Mx(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function Px(e){e=Mx(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function Fx(e){return jx?Px(e):Nx(e)}var Ix=e=>String(e).split(/[/\\]/u).pop(),Lx=e=>String(e).startsWith(`file:`);function Rx(e,t){if(!t)return;let n=Ix(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function zx(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}var Bx=void 0;function Vx(e,t){if(t){if(Lx(t))try{t=Fx(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function Hx(e,t){let n=kx(0,e.plugins).flatMap(e=>e.languages??[]);return(zx(n,t.language)??Rx(n,t.physicalFile)??Rx(n,t.file)??Vx(n,t.physicalFile)??Vx(n,t.file)??Bx?.(n,t.physicalFile))?.parsers[0]}var Ux=Hx,Wx={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>Wx.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${Wx.key(t)}: ${Wx.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>Wx.value({[e]:t})},Gx=new Proxy(String,{get:()=>Gx}),Kx=Gx,qx=()=>Gx,Jx=(e,t,{descriptor:n})=>{let r=[`${Kx.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Kx.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},Yx=Symbol.for(`vnopts.VALUE_NOT_EXIST`),Xx=Symbol.for(`vnopts.VALUE_UNCHANGED`),Zx=` `.repeat(2),Qx=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push($x(e,t,r,n.descriptor)),i&&a.push([$x(e,t,i.title,n.descriptor)].concat(i.values.map(e=>eS(e,n.loggerPrintWidth))).join(` `)),tS(a,n.loggerPrintWidth)};function $x(e,t,n,r){return[`Invalid ${Kx.red(r.key(e))} value.`,`Expected ${Kx.blue(n)},`,`but received ${t===Yx?Kx.gray(`nothing`):Kx.red(r.value(t))}.`].join(` `)}function eS({text:e,list:t},n){let r=[];return e&&r.push(`- ${Kx.blue(e)}`),t&&r.push([`- ${Kx.blue(t.title)}:`].concat(t.values.map(e=>eS(e,n-Zx.length).replace(/^|\n/g,`$&${Zx}`))).join(` `)),tS(r,n)}function tS(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(` `,1)[0].length);return i>t&&i>a?r:n}var nS=[],rS=[];function iS(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let a=e.length,o=t.length;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-o);)a--,o--;let s=0;for(;sr)return r;if(a===0)return r!==void 0&&o>r?r:o;let c,l,u,d,f=0,p=0;for(;fl?d>l?l+1:d:d>u?u+1:d;if(r!==void 0){let e=l;for(f=0;fr)return r}}return nS.length=a,rS.length=a,r!==void 0&&l>r?r:l}function aS(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let n of t)if(n===e)return n;if(r===0)return;let a,o=1/0,s=new Set;for(let n of t){if(s.has(n))continue;s.add(n);let t=Math.abs(n.length-i);if(t>=o||r!==void 0&&t>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,l=c===void 0?iS(e,n):iS(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=iS(e,n)),ur))return a}var oS=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${Kx.yellow(n.pair({key:e,value:t}))}.`],o=aS(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${Kx.blue(n.key(o))}?`),r.warn(a.join(` `))},sS=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function cS(e,t){let n=new e(t),r=Object.create(n);for(let e of sS)e in t&&(r[e]=uS(t[e],n,lS.prototype[e].length));return r}var lS=class{static create(e){return cS(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return`nothing`}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Xx}};function uS(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var dS=class extends lS{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},fS=class extends lS{expected(){return`anything`}validate(){return!0}},pS=class extends lS{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:`an array of the following values`,values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);e!==!0&&n.push(e.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);e!==!1&&n.push(...e.map(({value:e})=>({value:[e]})))}return n}forward(e,t){let n=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(mS))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);`remain`in e&&n.push(e.remain),r.push(...e.redirect.map(mS))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function mS({from:e,to:t}){return{from:[e],to:t}}var hS=class extends lS{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function gS(e,t){let n=Object.create(null);for(let r of e){let e=r[t];if(n[e])throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n}function _S(e,t){let n=new Map;for(let r of e){let e=r[t];if(n.has(e))throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n}function vS(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function yS(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function bS(e){return e===Math.floor(e)}function xS(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=[`undefined`,`object`,`boolean`,`number`,`string`];return n===r?n===`string`?e.localeCompare(t):Number(e)-Number(t):i.indexOf(n)-i.indexOf(r)}function SS(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function CS(e){return e===void 0?{}:e}function wS(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return AS((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(wS)}}:{text:t}}function TS(e,t){return e===!0?!0:e===!1?{value:t}:e}function ES(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length===0?!1:e}function DS(e,t){return typeof e==`string`||`key`in e?{from:t,to:e}:`from`in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function OS(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>DS(e,t)):[DS(e,t)]}function kS(e,t){let n=OS(typeof e==`object`&&`redirect`in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e==`object`&&`remain`in e?{remain:e.remain,redirect:n}:{redirect:n}}function AS(e,t){if(!e)throw Error(t)}var jS=class extends lS{constructor(e){super(e),this._choices=_S(e.choices.map(e=>e&&typeof e==`object`?e:{value:e}),`value`)}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(xS).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(` or `)).join(`, `),list:{title:`one of the following values`,values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},MS=class extends lS{expected(){return`a number`}validate(e,t){return typeof e==`number`}},NS=class extends MS{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&bS(e)}},PS=class extends lS{expected(){return`a string`}validate(e){return typeof e==`string`}},FS=Wx,IS=oS,LS=Qx,RS=Jx,zS=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=FS,unknown:a=IS,invalid:o=LS,deprecated:s=RS,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>Xx}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:gS(e,`name`),normalizeDefaultResult:CS,normalizeExpectedResult:wS,normalizeDeprecatedResult:ES,normalizeForwardResult:OS,normalizeRedirectResult:kS,normalizeValidateResult:TS},this._unknownHandler=a,this._invalidHandler=SS(o),this._deprecatedHandler=s,this._identifyMissing=(e,t)=>!(e in t)||c(e,t),this._identifyRequired=l,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=vS()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=CS(r.default(this._utils));`value`in t&&n.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let n=this._utils.schemas[e],r=t[e],i=n.postprocess(r,this._utils);i!==Xx&&(this._applyValidation(i,e,n),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of r){let r=this._utils.schemas[i],a=r.preprocess(e[i],this._utils);this._applyValidation(a,i,r);let o=({from:e,to:t})=>{n.push(typeof t==`string`?{[t]:e}:{[t.key]:t.value})},s=({value:e,redirectTo:t})=>{let n=ES(r.deprecated(e,this._utils),a,!0);if(n!==!1)if(n===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of n){let n={key:i,value:e};if(!this._hasDeprecationWarned(n)){let r=typeof t==`string`?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}};OS(r.forward(a,this._utils),a).forEach(o);let c=kS(r.redirect(a,this._utils),a);if(c.redirect.forEach(o),`remain`in c){let e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,s({value:e})}for(let{from:e,to:t}of c.redirect)s({value:e,redirectTo:t})}for(let r of i){let i=e[r];this._applyUnknownHandler(r,i,t,(e,t)=>{n.push({[e]:t})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,Yx,this._utils)}_partitionOptionKeys(e){let[t,n]=yS(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=TS(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?r(e,t):n[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Xx){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of n){let n=t.override[r];this._applyValidation(n,r,this._utils.schemas[r]),e[r]=n}for(let n of r){let r=t.override[n];this._applyUnknownHandler(n,r,e,(t,n)=>{let r=this._utils.schemas[t];this._applyValidation(n,t,r),e[t]=n})}}}}},BS;function VS(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:a,descriptor:o}={}){if(r){if(!a)throw Error(`'FlagSchema' option is required.`);if(!o)throw Error(`'descriptor' option is required.`)}else o=Wx;let s=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{let{_:r,...i}=n.schemas;return oS(e,t,{...n,schemas:i})},c=new zS(HS(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&BS&&(c._hasDeprecationWarned=BS);let u=c.normalize(e);return l&&(BS=c._hasDeprecationWarned),u}function HS(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(fS.create({name:`_`}));for(let i of e)r.push(US(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(dS.create({name:i.alias,sourceName:i.name}));return r}function US(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=NS,t&&(a.preprocess=Number);break;case`string`:o=PS;break;case`choice`:o=jS,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=hS;break;case`flag`:o=r,a.flags=n.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;case`path`:o=PS;break;default:throw Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,n,r)=>e.exception(t)||n.validate(t,r):a.validate=(e,t,n)=>e===void 0||t.validate(e,n),e.redirect&&(s.redirect=t=>t?{to:typeof e.redirect==`string`?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?Gv(0,t,-1):t),r)}return e.array?pS.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var WS=VS,GS=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},KS=wv(`findLast`,function(){if(Array.isArray(this))return GS}),qS=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),JS=[];function YS(e){return!!e?.[qS]}var XS=YS,ZS=new Set([`yaml`,`toml`]),QS=({node:e})=>XS(e)&&ZS.has(e.language);async function $S(e,t,n,r){let{node:i}=n,{language:a}=i;if(!ZS.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:Ux(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return Vy([i.startDelimiter,i.explicitLanguage??``,nb,s,s?nb:``,i.endDelimiter])}function eC(e,t){return QS({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var tC=eC;function nC({node:e}){return e.raw}var rC=nC,iC=new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),aC=e=>Object.keys(e).filter(e=>!iC.has(e));function oC(e,t){let n=e?t=>e(t,iC):aC;return t?new Proxy(n,{apply:(e,t,n)=>XS(n[0])?JS:Reflect.apply(e,t,n)}):n}var sC=oC;function cC(e,t){if(!t)throw Error(`parserName is required.`);let n=KS(0,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new Sx(r)}function lC(e,t){if(!t)throw Error(`astFormat is required.`);let n=KS(0,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(e.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new Sx(r)}function uC({plugins:e,parser:t}){return dC(cC(e,t),t)}function dC(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function fC(e,t){let n=e.printers[t];return mC(typeof n==`function`?await n():n)}var pC=new WeakMap;function mC(e){if(pC.has(e))return pC.get(e);let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=_C(t);let s=t.experimental_frontMatterSupport;n=sC(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return tC(...n),Reflect.apply(e,t,n)}}));let l=r;if(r){let e;l=new Proxy(r,{get(t,i,a){return i===`getVisitorKeys`?(e??=r.getVisitorKeys?sC(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&QS(...n)?$S:Reflect.apply(e,t,n)})}let u=a;s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return XS(r.node)?rC(r):Reflect.apply(e,t,n)}}));let d={features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o};return pC.set(e,d),d}var hC=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function gC(e){return{...hC,...e}}function _C(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:gC(e?.experimental_frontMatterSupport)}}var vC={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function yC(e,t={}){let n={...e};if(!n.parser)if(n.filepath){if(n.parser=Ux(n,{physicalFile:n.filepath}),!n.parser)throw new Cx(`No parser could be inferred for file "${n.filepath}".`)}else throw new Cx(`No parser and no file path given, couldn't infer a parser.`);let r=Tx({plugins:e.plugins,showDeprecated:!0}).options,i={...vC,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=cC(n.plugins,n.parser),o=await dC(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:lC(n.plugins,o.astFormat),c=await fC(s,o.astFormat);n.printer=c,n.getVisitorKeys=c.getVisitorKeys;let l=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,e])=>e!==void 0)):{},u={...i,...l};for(let[e,t]of Object.entries(u))(n[e]===null||n[e]===void 0)&&(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),WS(n,r,{passThrough:Object.keys(vC),...t})}var bC=yC;Sv(Cv(),1);var xC=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,SC=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;RegExp(`[`+xC+`]`),RegExp(`[`+xC+SC+`]`),xC=SC=null;var CC={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]};new Set(CC.keyword),new Set(CC.strict),new Set(CC.strictBind);var wC=(e,t)=>n=>e(t(n));function TC(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:wC(wC(e.white,e.bgRed),e.bold),gutter:e.gray,marker:wC(e.red,e.bold),message:wC(e.red,e.bold),reset:e.reset}}TC(qx(!0)),TC(qx(!1));function EC(){return new Proxy({},{get:()=>e=>e})}var DC=/\r\n|[\n\r\u2028\u2029]/;function OC(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;c?e===0?m[n]=[c,t[n-1].length-c+1]:e===p?m[n]=[0,u]:m[n]=[0,t[n-e].length]:m[n]=!0}else c===u?c?m[s]=[c,0]:m[s]=!0:m[s]=[c,u-c];return{start:d,end:f,markerLines:m}}function kC(e,t,n={}){let r=EC(!1),{start:i,end:a,markerLines:o}=OC(t,e.split(DC),n),s=t.start&&typeof t.start.column==`number`,c=String(a).length,l=e.split(DC,a).slice(i,a).map((e,t)=>{let a=i+1+t,s=` ${` ${a}`.slice(-c)} |`,l=o[a],u=!o[a+1];if(l){let t=``;if(Array.isArray(l)){let i=e.slice(0,Math.max(l[0]-1,0)).replace(/[^\t]/g,` `),a=l[1]||1;t=[` `,r.gutter(s.replace(/\d/g,` `)),` `,i,r.marker(`^`).repeat(a)].join(``),u&&n.message&&(t+=` `+r.message(n.message))}return[r.marker(`>`),r.gutter(s),e.length>0?` ${e}`:``,t].join(``)}else return` ${r.gutter(s)}${e.length>0?` ${e}`:``}`}).join(` `);return n.message&&!s&&(l=`${` `.repeat(c+1)}${n.message} ${l}`),l}async function AC(e,t){let n=await uC(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(t){jC(t,e)}return{text:r,ast:i}}function jC(e,t){let{loc:n}=e;if(n){let r=kC(t,n,{highlightCode:!0});throw e.message+=` `+r,e.codeFrame=r,e}throw e}var MC=AC;async function NC(e,t,n,r,i){if(n.embeddedLanguageFormatting!==`auto`)return;let{printer:a}=n,{embed:o}=a;if(!o)return;if(o.length>2)throw Error(`printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed`);let{hasPrettierIgnore:s}=a,{getVisitorKeys:c}=o,l=[];f();let u=e.stack;for(let{print:r,node:a,pathStack:o}of l)try{e.stack=o;let s=await r(d,t,e,n);s&&i.set(a,s)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}e.stack=u;function d(e,t){return PC(e,t,n,r)}function f(){let{node:t}=e;if(typeof t!=`object`||!t||s?.(e))return;for(let n of c(t))Array.isArray(t[n])?e.each(f,n):e.call(f,n);let r=o(e,n);if(r){if(typeof r==`function`){l.push({print:r,node:t,pathStack:[...e.stack]});return}i.set(t,r)}}}async function PC(e,t,n,r){let i=await bC({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await MC(e,i);return Dy(await r(a,i))}function FC(e,t,n,r){let{originalText:i,[Symbol.for(`comments`)]:a,locStart:o,locEnd:s,[Symbol.for(`printedComments`)]:c}=t,{node:l}=e,u=o(l),d=s(l);for(let e of a)o(e)>=u&&s(e)<=d&&c.add(e);let{printPrettierIgnored:f}=t.printer;return f?f(e,t,n,r):i.slice(u,d)}var IC=FC;async function LC(e,t){({ast:e}=await zC(e,t));let n=new Map,r=new Nb(e),i=xx(t),a=new Map;await NC(r,s,t,LC,a);let o=await RC(r,t,s,void 0,a);if(bx(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[Gy,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,Gy]}return o;function s(e,t){return e===void 0||e===r?c(t):Array.isArray(e)?r.call(()=>c(t),...e):r.call(()=>c(t),e)}function c(e){i(r);let o=r.node;if(o==null)return``;let c=Fb(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=RC(r,t,s,e,a);return c&&n.set(o,l),l}}function RC(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?IC(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=Ny(s,e=>[Gy,e,Gy]);break;case t.nodeBeforeCursor:s=Ny(s,e=>[e,Gy]);break;case t.nodeAfterCursor:s=Ny(s,e=>[Gy,e]);break}return o.printComment&&!o.willPrintOwnComments?.(e,t)&&(s=yx(e,s,t)),s}async function zC(e,t){let n=e.comments??[];t[Symbol.for(`comments`)]=n,t[Symbol.for(`printedComments`)]=new Set,sx(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function BC(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:a}=t,o=e=>r(e)<=n&&i(e)>=n,s=e,c=[e];for(let t of Yb(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(Xb(s,{getVisitorKeys:a}))return{cursorNode:s};let l,u,d=-1,f=1/0;for(;c.length>0&&(l===void 0||u===void 0);){s=c.pop();let e=l!==void 0,t=u!==void 0;for(let o of Jb(s,{getVisitorKeys:a})){if(!e){let e=i(o);e<=n&&e>d&&(l=o,d=e)}if(!t){let e=r(o);e>=n&&eo(e,t)).filter(Boolean);let n={},s=new Set(i(e));for(let t in e)!Object.prototype.hasOwnProperty.call(e,t)||a?.has(t)||(s.has(t)?n[t]=o(e[t],e):n[t]=e[t]);let c=r(e,n,t);if(c!==null)return c??n}}var UC=HC,WC=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},GC=wv(`findLastIndex`,function(){if(Array.isArray(this))return WC}),KC=({parser:e})=>e===`json`||e===`json5`||e===`jsonc`||e===`json-stringify`;function qC(e,t){return t=new Set(t),e.find(e=>QC.has(e.type)&&t.has(e))}function JC(e){let t=GC(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function YC(e,t,{locStart:n,locEnd:r}){let[i,...a]=e,[o,...s]=t;if(i===o)return[i,o];let c=n(i);for(let e of JC(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of JC(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function XC(e,t,n,r,i=[],a){let{locStart:o,locEnd:s}=n,c=o(e),l=s(e);if(t>l||tr&&!/\S/u.test(e[i-1]);--i);let l=XC(n,r,t,(e,n)=>ew(t,e,n),[],`rangeStart`);if(!l)return;let u=c?l:XC(n,i,t,e=>ew(t,e),[],`rangeEnd`);if(!u)return;let d,f;if(KC(t)){let e=qC(l,u);d=e,f=e}else [d,f]=YC(l,u,t);return[Math.min(a(d),a(f)),Math.max(o(d),o(f))]}var nw=``,rw=Symbol(`cursor`);async function iw(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await MC(e,t);t.cursorOffset>=0&&(t={...t,...VC(r,t)});let a=await LC(r,t,n);n>0&&(a=Uy([nb,a],n,t.tabWidth));let o=Ab(a,t);if(n>0){let e=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(e),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>e.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=e+zv(t.endOfLine)}let s=t[Symbol.for(`comments`)];if(t.cursorOffset>=0){let e,n,r,a;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(r=o.cursorNodeStart,a=o.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw Error(`Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor`);e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;n=i.slice(e,r)}else e=0,n=i,r=0,a=o.formatted;let c=t.cursorOffset-e;if(n===a)return{formatted:o.formatted,cursorOffset:r+c,comments:s};let l=n.split(``);l.splice(c,0,rw);let u=kv(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(rw))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function aw(e,t){let{ast:n,text:r}=await MC(e,t),[i,a]=tw(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(` `,i)+1),c=r.slice(s,i).match(/^\s*/u)[0],l=Mb(c,t.tabWidth),u=await iw(o,{...t,rangeStart:0,rangeEnd:1/0,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=a?t.cursorOffset-i:-1,endOfLine:`lf`},l),d=u.formatted.trimEnd(),{cursorOffset:f}=t;f>a?f+=d.length-o.length:u.cursorOffset>=0&&(f=u.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(a);if(t.endOfLine!==`lf`){let e=zv(t.endOfLine);f>=0&&e===`\r `&&(f+=Vv(p.slice(0,f),` `)),p=Ev(0,p,` `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function ow(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function sw(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=ow(e,n,-1),r=ow(e,r,0),i=ow(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function cw(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=sw(e,t),o=e.charAt(0)===nw;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=Rv(e)),e.includes(`\r`)){let t=t=>Vv(e.slice(0,Math.max(t,0)),`\r `);n-=t(n),r-=t(r),i-=t(i),e=Uv(e)}return{hasBOM:o,text:e,options:sw(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function lw(e,t){let n=await uC(t);return!n.hasPragma||n.hasPragma(e)}async function uw(e,t){return(await uC(t)).hasIgnorePragma?.(e)}async function dw(e,t){let{hasBOM:n,text:r,options:i}=cw(e,await bC(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await lw(r,i)||i.checkIgnorePragma&&await uw(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd=0&&a.cursorOffset++),a}async function fw(e,t,n){let{text:r,options:i}=cw(e,await bC(t)),a=await MC(r,i);return n&&(n.preprocessForPrint&&(a.ast=await zC(a.ast,i)),n.massage&&(a.ast=UC(a.ast,i))),a}async function pw(e,t){return t=await bC(t),Ab(await LC(e,t),t)}async function mw(e,t){let{formatted:n}=await dw(lb(e),{...t,parser:`__js_expression`});return n}async function hw(e,t){t=await bC(t);let{ast:n}=await MC(e,t);return t.cursorOffset>=0&&(t={...t,...VC(n,t)}),LC(n,t)}async function gw(e,t){return Ab(e,await bC(t))}var _w={};bv(_w,{builders:()=>vw,printer:()=>yw,utils:()=>bw});var vw={join:Zy,line:$y,softline:eb,hardline:nb,literalline:ib,group:qy,conditionalGroup:Jy,fill:Ky,lineSuffix:ab,lineSuffixBoundary:ob,cursor:Gy,breakParent:Wy,ifBreak:Yy,trim:sb,indent:Ry,indentIfBreak:Xy,align:zy,addAlignmentToDoc:Uy,markAsRoot:Vy,dedentToRoot:By,dedent:Hy,hardlineWithoutBreakParent:tb,literallineWithoutBreakParent:rb,label:Qy,concat:e=>e},yw={printDocToString:Ab},bw={willBreak:by,traverseDoc:gy,findInDoc:vy,mapDoc:_y,removeLines:wy,stripTrailingHardline:Dy,replaceEndOfLine:Ay,canBreak:My},xw=`3.8.3`,Sw={};bv(Sw,{addDanglingComment:()=>nx,addLeadingComment:()=>tx,addTrailingComment:()=>rx,getAlignmentSize:()=>Mb,getIndentSize:()=>Mw,getMaxContinuousCount:()=>Fw,getNextNonSpaceNonCommentCharacter:()=>Lw,getNextNonSpaceNonCommentCharacterIndex:()=>Yw,getPreferredQuote:()=>Uw,getStringWidth:()=>_b,hasNewline:()=>Gb,hasNewlineInRange:()=>Gw,hasSpaces:()=>qw,isNextLineEmpty:()=>eT,isNextLineEmptyAfterIndex:()=>Aw,isPreviousLineEmpty:()=>Zw,makeString:()=>$w,skip:()=>Ib,skipEverythingButNewLine:()=>Bb,skipInlineComment:()=>ww,skipNewline:()=>Ub,skipSpaces:()=>Rb,skipToLineEnd:()=>zb,skipTrailingComment:()=>Ew,skipWhitespace:()=>Lb});function Cw(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;nMath.max(e,t.length),0)/t.length}var Fw=Pw;function Iw(e,t){let n=Ow(e,t);return n===!1?``:e.charAt(n)}var Lw=Iw,Rw=Object.freeze({character:`'`,codePoint:39}),zw=Object.freeze({character:`"`,codePoint:34}),Bw=Object.freeze({preferred:Rw,alternate:zw}),Vw=Object.freeze({preferred:zw,alternate:Rw});function Hw(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Bw:Vw,{length:i}=e,a=0,o=0;for(let t=0;to?r:n).character}var Uw=Hw;function Ww(e,t,n){for(let r=t;ri===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:`\\`+i))+t}function eT(e,t){return arguments.length===2||typeof t==`number`?Aw(e,t):Qw(...arguments)}function tT(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}var nT=tT(dw);async function rT(e,t){let{formatted:n}=await nT(e,{...t,cursorOffset:-1});return n}async function iT(e,t){return await rT(e,t)===e}var aT=tT(Tx,0),oT={parse:tT(fw),formatAST:tT(pw),formatDoc:tT(mw),printToDoc:tT(hw),printDocToString:tT(gw)};export{ye as C,je as S,s as _,we as a,a as b,de as c,v as d,h as f,le as g,oe as h,De as i,ae as l,p as m,Oa as n,Oe as o,g as p,Ze as r,y as s,rT as t,fe as u,c as v,b as w,o as x,ie as y};