36 lines
194 KiB
JavaScript
36 lines
194 KiB
JavaScript
|
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var qa=Object.create;var Tr=Object.defineProperty;var Wa=Object.getOwnPropertyDescriptor;var Ga=Object.getOwnPropertyNames;var Ua=Object.getPrototypeOf,Na=Object.prototype.hasOwnProperty;var qs=e=>{throw TypeError(e)};var Xa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xr=(e,t)=>{for(var r in t)Tr(e,r,{get:t[r],enumerable:!0})},Ws=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ga(t))!Na.call(e,s)&&s!==r&&Tr(e,s,{get:()=>t[s],enumerable:!(n=Wa(t,s))||n.enumerable});return e};var Ya=(e,t,r)=>(r=e!=null?qa(Ua(e)):{},Ws(t||!e||!e.__esModule?Tr(r,"default",{value:e,enumerable:!0}):r,e)),Ha=e=>Ws(Tr({},"__esModule",{value:!0}),e);var Gs=(e,t,r)=>t.has(e)||qs("Cannot "+r);var pt=(e,t,r)=>(Gs(e,t,"read from private field"),r?r.call(e):t.get(e)),Us=(e,t,r)=>t.has(e)?qs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ns=(e,t,r,n)=>(Gs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var ii=Xa(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.extract=nc;kt.parse=uc;kt.parseWithComments=ui;kt.print=ic;kt.strip=sc;var Qp=/\*\/$/,Zp=/^\/\*\*?/,ni=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,ec=/(^|\s+)\/\/([^\r\n]*)/g,ei=/^(\r?\n)+/,tc=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ti=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,rc=/(\r?\n|^) *\* ?/g,si=[];function nc(e){let t=e.match(ni);return t?t[0].trimLeft():""}function sc(e){let t=e.match(ni);return t&&t[0]?e.substring(t[0].length):e}function uc(e){return ui(e).pragmas}function ui(e){let t=`
|
||
|
`;e=e.replace(Zp,"").replace(Qp,"").replace(rc,"$1");let r="";for(;r!==e;)r=e,e=e.replace(tc,`${t}$1 $2${t}`);e=e.replace(ei,"").trimRight();let n=Object.create(null),s=e.replace(ti,"").replace(ei,"").trimRight(),u;for(;u=ti.exec(e);){let i=u[2].replace(ec,"");typeof n[u[1]]=="string"||Array.isArray(n[u[1]])?n[u[1]]=si.concat(n[u[1]],i):n[u[1]]=i}return{comments:s,pragmas:n}}function ic({comments:e="",pragmas:t={}}){let r=`
|
||
|
`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(c=>ri(c,t[c])).map(c=>`${s} ${c}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let c=t[i[0]];return`${n} ${ri(i[0],c)[0]}${u}`}}let o=e.split(r).map(c=>`${s} ${c}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length?s+r:"")+a+u}function ri(e,t){return si.concat(t).map(r=>`@${e} ${r}`.trim())}});var ym={};xr(ym,{languages:()=>mm,options:()=>va,printers:()=>lm});var Xs=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],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",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}];var _s={};xr(_s,{canAttachComment:()=>Tp,embed:()=>Zu,experimentalFeatures:()=>um,getCommentChildNodes:()=>xp,getVisitorKeys:()=>br,handleComments:()=>Zn,insertPragma:()=>oi,isBlockComment:()=>re,isGap:()=>hp,massageAstNode:()=>Au,print:()=>ka,printComment:()=>ku,willPrintOwnComments:()=>es});var Va=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Q=Va;var $a=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},O=$a;function Ka(e){return e!==null&&typeof e=="object"}var Ys=Ka;function*za(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>Ys(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*Qa(e,t){let r=[e];for(let n=0;n<r.length;n++){let s=r[n];for(let u of za(s,t))yield u,r.push(u)}}function Hs(e,{getVisitorKeys:t,predicate:r}){for(let n of Qa(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}var Vs=()=>/[#*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\u293
|
||
|
`)return t-2;if(s===`
|
||
|
`||s==="\r"||s==="\u2028"||s==="\u2029")return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
||
|
`)return t+2;if(s===`
|
||
|
`||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var Ue=to;function ro(e,t,r={}){let n=Ge(e,r.backwards?t-1:t,r),s=Ue(e,n,r);return n!==s}var te=ro;function no(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var Ot=no;function so(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Zs(e,t):t}var _t=so;function uo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Qs(e,n),n=Ot(e,n),n=Ge(e,n);return n=_t(e,n),n=Ue(e,n),n!==!1&&te(e,n)}var vt=uo;function io(e){return Array.isArray(e)&&e.length>0}var L=io;var gr="'",eu='"';function ao(e,t){let r=t===!0||t===gr?gr:eu,n=r===gr?eu:gr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Sr=ao;function oo(e,t,r){let n=t==='"'?"'":'"',u=Q(!1,e,/\\(.)|(["'])/gs,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+u+t}var tu=oo;function po(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Sr(r,t.singleQuote);return tu(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var tt=po;function R(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(R(r),t):t}function k(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function gt(e,t){let r=R(e);return Number.isInteger(r)&&r===R(t)}function co(e,t){let r=k(e);return Number.isInteger(r)&&r===k(t)}function ru(e,t){return gt(e,t)&&co(e,t)}var er=null;function tr(e){if(er!==null&&typeof er.property){let t=er;return er=tr.prototype=null,t}return er=tr.prototype=e??Object.create(null),new tr}var lo=10;for(let e=0;e<=lo;e++)tr();function On(e){return tr(e)}function mo(e,t="type"){On(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=mo;var nu={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParamet
|
||
|
`):e.type==="UnaryExpression"?sr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:wr(e)}function Oe(e,t){return N(t)?bt(t):T(t,g.Leading,r=>te(e,k(r)))}function uu(e){return e.quasis.some(t=>t.value.raw.includes(`
|
||
|
`))}function _r(e,t){return(e.type==="TemplateLiteral"&&uu(e)||e.type==="TaggedTemplateExpression"&&uu(e.quasi))&&!te(t,R(e),{backwards:!0})}function vr(e){if(!T(e))return!1;let t=O(!1,ct(e,g.Dangling),-1);return t&&!re(t)}function mu(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(jt(r)){if(t+=1,t>1)return!0}else if(w(r)){for(let n of ue(r))if(jt(n))return!0}return!1}function jr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&w(t)&&w(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Po=new Set(["!","-","+","~"]);function be(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return be(e.expression,t);let r=n=>be(n,t-1);if(Jn(e))return et(e.pattern??e.regex.pattern)<=5;if(wr(e)||To(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||
|
`))&&e.expressions.every(r);if(se(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(U(e))return e.elements.every(n=>n===null||r(n));if(lt(e)){if(e.type==="ImportExpression"||be(e.callee,t)){let n=ue(e);return n.length<=t&&n.every(r)}return!1}return q(e)?be(e.object,t)&&be(e.property,t):e.type==="UnaryExpression"&&Po.has(e.operator)||e.type==="UpdateExpression"?be(e.argument,t):!1}function fe(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function yu(e){return e}function oe(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ae(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ae(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ae(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ae(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ae(e.callee,t);case"ConditionalExpression":return ae(e.test,t);case"UpdateExpression":return!e.prefix&&ae(e.argument,t);case"BindExpression":return e.object&&ae(e.object,t);case"SequenceExpression":return ae(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ae(e.expression,t);default:return t(e)}}var iu={"==":!0,"!=":!0,"===":!0,"!==":!0},Ir={"*":!0,"/":!0,"%":!0},Mn={">>":!0,">>>":!0,"<<":!0};function ur(e,t){return!(rr(t)!==rr(e)||e==="**"||iu[e]&&iu[t]||t==="%"&&Ir[e]||e==="%"&&Ir[t]||t!==e&&Ir[t]&&Ir[e]||Mn[e]&&Mn[t])}var ko=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function rr(e){return ko.get(e)}function Du(e){return!!Mn[e]||e==="|"||e==="^"||e==="&"}function fu(e){var r;if(e.rest)return!0;let t=$(e);return((r=O(!1,t,-1))==null?void 0:r.type)==="RestElement"}var vn=new WeakMap;function $(e){if(vn.has(e))return vn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),vn.set(e,t),t}function Eu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var jn=new WeakMap;function ue(e){if(jn.has(e))return jn.get(e);if(e.type==="ChainExpression")return ue(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),jn.set(e,t),t}function qt(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>qt(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Wn(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function ir(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function bt(e){return(e==null?void 0:e.prettierIgnore)||T(e,g.PrettierIgnore)}var g={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Fu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&g.Leading&&!r.leading||e&g.Trailing&&!r.trailing||e&g.Dangling&&(r.leading||r.trailing)||e&g.Block&&!re(r)||e&g.Line&&!Rt(r)||e&g.First&&n!==0||e&g.Last&&n!==s.length-1||e&g.PrettierIgnore&&!ir(r)||t&&!t(r))};function T(e,t,r){if(!L
|
||
|
Expected it to be 'string' or 'object'.`;if(ut(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=wo([...Rr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
||
|
Expected it to be ${n}.`}var Gn=class extends Error{name="InvalidDocError";constructor(t){super(Oo(t)),this.doc=t}},Ct=Gn;var du={};function _o(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===du){r(s.pop());continue}r&&s.push(u,du);let i=ut(u);if(!i)throw new Ct(u);if((t==null?void 0:t(u))!==!1)switch(i){case _e:case Pe:{let a=i===_e?u:u.parts;for(let o=a.length,c=o-1;c>=0;--c)s.push(a[c]);break}case xe:s.push(u.flatContents,u.breakContents);break;case le:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case Ye:case Xe:case He:case ve:case Ve:s.push(u.contents);break;case rt:case nt:case st:case $e:case me:case je:break;default:throw new Ct(u)}}}var Un=_o;var Tu=()=>{},Ke=Tu,Jr=Tu;function f(e){return Ke(e),{type:Xe,contents:e}}function he(e,t){return Ke(t),{type:Ye,contents:t,n:e}}function l(e,t={}){return Ke(e),Jr(t.expandedStates,!0),{type:le,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function xu(e){return he(Number.NEGATIVE_INFINITY,e)}function qr(e){return he(-1,e)}function ze(e,t){return l(e[0],{...t,expandedStates:e})}function Gt(e){return Jr(e),{type:Pe,parts:e}}function b(e,t="",r={}){return Ke(e),t!==""&&Ke(t),{type:xe,breakContents:e,flatContents:t,groupId:r.groupId}}function At(e,t){return Ke(e),{type:He,contents:e,groupId:t.groupId,negate:t.negate}}function Nn(e){return Ke(e),{type:Ve,contents:e}}var ke={type:$e},Ee={type:je};var Xn={type:me,hard:!0},vo={type:me,hard:!0,literal:!0},x={type:me},E={type:me,soft:!0},F=[Xn,Ee],Wr=[vo,Ee],Yn={type:nt};function P(e,t){Ke(e),Jr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function hu(e,t,r){Ke(e);let n=e;if(t>0){for(let s=0;s<Math.floor(t/r);++s)n=f(n);n=he(t%r,n),n=he(Number.NEGATIVE_INFINITY,n)}return n}function it(e,t){return Ke(t),e?{type:ve,label:e,contents:t}:t}function mt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(ut(u)){case _e:return t(u.map(n));case Pe:return t({...u,parts:u.parts.map(n)});case xe:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case le:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case Ye:case Xe:case He:case ve:case Ve:return t({...u,contents:n(u.contents)});case rt:case nt:case st:case $e:case me:case je:return t(u);default:throw new Ct(u)}}}function Su(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return Un(e,u),n}function jo(e){if(e.type===le&&e.break||e.type===me&&e.hard||e.type===je)return!0}function ne(e){return Su(e,jo,!1)}function gu(e){if(e.length>0){let t=O(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Bu(e){let t=new Set,r=[];function n(u){if(u.type===je&&gu(r),u.type===le){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===le&&r.pop().break&&gu(r)}Un(e,n,s,!0)}function Mo(e){return e.type===me&&!e.hard?e.soft?"":" ":e.type===xe?e.flatContents:e}function ar(e){return mt(e,Mo)}function Ro(e){switch(ut(e)){case Pe:if(e.parts.every(t=>t===""))return"";break;case le:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===le&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ye:case Xe:case He:case Ve:if(!e.contents)return"";break;case xe:if(!e.flatContents&&!e.breakContents)return"";break;case _e:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof O(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case rt:case nt:case st:case $e:case me:case ve:case je:break;default:throw new Ct(e)}return e}function Ut(e){return mt(e,t=>Ro(t))}function Ie(e,t=Wr){return mt(e,r=>typeof r=="string"?P(t,r.split(`
|
||
|
`)):r)}function Jo(e){if(e.type===me)return!0}function bu(e){return Su(e,Jo,!1)}function or(e,t){return e.type===ve?{...e,contents:t(e.contents)}:t(e)}function qo(e){let t=`*${e.value}*`.split(`
|
||
|
`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Pu=qo;function ku(e,t){let r=e.node;if(Rt(r))return t.originalText.slice(R(r),k(r)).trimEnd();if(re(r))return Pu(r)?Wo(r):["/*",Ie(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Wo(e){let t=e.value.split(`
|
||
|
`);return["/*",P(F,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}var Zn={};xr(Zn,{endOfLine:()=>Vo,ownLine:()=>Ho,remaining:()=>$o});function Go(e){let t=e.type||e.kind||"(unknown type)",r=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 r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Hn(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Go(e)}function ce(e,t){t.leading=!0,t.trailing=!1,Hn(e,t)}function Le(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Hn(e,t)}function K(e,t){t.leading=!1,t.trailing=!0,Hn(e,t)}function Uo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Ge(e,n),n=Ot(e,n),n=_t(e,n),n=Ue(e,n);return n}var yt=Uo;function No(e,t){let r=yt(e,t);return r===!1?"":e.charAt(r)}var ge=No;function Xo(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||
|
`)return!0;return!1}var Te=Xo;function Yo(e){return re(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var Iu=Yo;function Ho(e){return[Ru,wu,vu,ip,zo,$n,Kn,Lu,Ou,cp,op,Qn,Mu,lp,_u,ju,zn,Qo,Ap].some(t=>t(e))}function Vo(e){return[Ko,vu,wu,Mu,$n,Kn,Lu,Ou,ju,ap,pp,Qn,Dp,zn,Fp,Cp].some(t=>t(e))}function $o(e){return[Ru,$n,Kn,Zo,up,_u,Qn,sp,np,Ep,zn,fp].some(t=>t(e))}function Pt(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?ce(r,t):Le(e,t)}function Vn(e,t){e.type==="BlockStatement"?Pt(e,t):ce(e,t)}function Ko({comment:e,followingNode:t}){return t&&Iu(e)?(ce(t,e),!0):!1}function $n({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(ge(s,k(e))===")")return K(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")K(t,e);else{let i=Rt(e)||e.loc.start.line===e.loc.end.line,a=e.loc.start.line===t.loc.start.line;i&&a?K(t,e):Le(r,e)}return!0}return n.type==="BlockStatement"?(Pt(n,e),!0):n.type==="IfStatement"?(Vn(n.consequent,e),!0):r.consequent===n?(ce(n,e),!0):!1}function Kn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:ge(s,k(e))===")"?(K(t,e),!0):n.type==="BlockStatement"?(Pt(n,e),!0):r.body===n?(ce(n,e),!0):!1}function Lu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(K(t,e),!0):n.type==="BlockStatement"?(Pt(n,e),!0):n.type==="TryStatement"?(Vn(n.finalizer,e),!0):n.type==="CatchClause"?(Vn(n.body,e),!0):!1}function zo({comment:e,enclosingNode:t,followingNode:r}){return q(t)&&(r==null?void 0:r.type)==="Identifier"?(ce(t,e),!0):!1}function Qo({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(Le(t,e),!0):!1}function wu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!Te(s,k(t),R(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?u.experimentalTernaries&&r.alternate===n&&!(re(e)&&!Te(u.originalText,R(e),k(e)))?(Le(r,e),!0):(ce(n,e),!0):!1}function Zo({comment:e,precedingNode:t,enclosingNode:r}){return Ae(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(K(r.value.left,e),!0):!1}var ep=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Ou({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(ep.has(r==null?void 0:r.type)){if(L(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return K(O(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Pt(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return K(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?K(t,e):Le(r,e,s),!0}}return!1}var tp=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function _u({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&ge(n,k(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&ge(n,k(t))!==":"?(K(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&tp.has(r==null?void 0:r.type)?(K(t,e),!0):!1}var rp=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);fun
|
||
|
`;default:return`
|
||
|
`}}var Se=Symbol("MODE_BREAK"),at=Symbol("MODE_FLAT"),pr=Symbol("cursor");function Wu(){return{value:"",length:0,queue:[]}}function gp(e,t){return ts(e,{type:"indent"},t)}function Sp(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Wu():t<0?ts(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:ts(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function ts(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let p of n)switch(p.type){case"indent":m(),r.useTabs?o(1):c(r.tabWidth);break;case"stringAlign":m(),s+=p.n,u+=p.n.length;break;case"numberAlign":i+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return y(),{...e,value:s,length:u,queue:n};function o(p){s+=" ".repeat(p),u+=r.tabWidth*p}function c(p){s+=" ".repeat(p),u+=p}function m(){r.useTabs?D():y()}function D(){i>0&&o(i),C()}function y(){a>0&&c(a),C()}function C(){i=0,a=0}}function rs(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===pr){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(pr);return t}function Gr(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:c,doc:m}=a.pop(),D=ut(m);switch(D){case rt:o.push(m),r-=et(m);break;case _e:case Pe:{let y=D===_e?m:m.parts;for(let C=y.length-1;C>=0;C--)a.push({mode:c,doc:y[C]});break}case Xe:case Ye:case He:case ve:a.push({mode:c,doc:m.contents});break;case st:r+=rs(o);break;case le:{if(u&&m.break)return!1;let y=m.break?Se:c,C=m.expandedStates&&y===Se?O(!1,m.expandedStates,-1):m.contents;a.push({mode:y,doc:C});break}case xe:{let C=(m.groupId?s[m.groupId]||at:c)===Se?m.breakContents:m.flatContents;C&&a.push({mode:c,doc:C});break}case me:if(c===Se||m.hard)return!0;m.soft||(o.push(" "),r--);break;case Ve:n=!0;break;case $e:if(n)return!1;break}}return!1}function ns(e,t){let r={},n=t.printWidth,s=qu(t.endOfLine),u=0,i=[{ind:Wu(),mode:Se,doc:e}],a=[],o=!1,c=[],m=0;for(Bu(e);i.length>0;){let{ind:y,mode:C,doc:p}=i.pop();switch(ut(p)){case rt:{let d=s!==`
|
||
|
`?Q(!1,p,`
|
||
|
`,s):p;a.push(d),i.length>0&&(u+=et(d));break}case _e:for(let d=p.length-1;d>=0;d--)i.push({ind:y,mode:C,doc:p[d]});break;case nt:if(m>=2)throw new Error("There are too many 'cursor' in doc.");a.push(pr),m++;break;case Xe:i.push({ind:gp(y,t),mode:C,doc:p.contents});break;case Ye:i.push({ind:Sp(y,p.n,t),mode:C,doc:p.contents});break;case st:u-=rs(a);break;case le:switch(C){case at:if(!o){i.push({ind:y,mode:p.break?Se:at,doc:p.contents});break}case Se:{o=!1;let d={ind:y,mode:at,doc:p.contents},A=n-u,S=c.length>0;if(!p.break&&Gr(d,i,A,S,r))i.push(d);else if(p.expandedStates){let B=O(!1,p.expandedStates,-1);if(p.break){i.push({ind:y,mode:Se,doc:B});break}else for(let _=1;_<p.expandedStates.length+1;_++)if(_>=p.expandedStates.length){i.push({ind:y,mode:Se,doc:B});break}else{let J=p.expandedStates[_],v={ind:y,mode:at,doc:J};if(Gr(v,i,A,S,r)){i.push(v);break}}}else i.push({ind:y,mode:Se,doc:p.contents});break}}p.id&&(r[p.id]=O(!1,i,-1).mode);break;case Pe:{let d=n-u,{parts:A}=p;if(A.length===0)break;let[S,B]=A,_={ind:y,mode:at,doc:S},J={ind:y,mode:Se,doc:S},v=Gr(_,[],d,c.length>0,r,!0);if(A.length===1){v?i.push(_):i.push(J);break}let h={ind:y,mode:at,doc:B},W={ind:y,mode:Se,doc:B};if(A.length===2){v?i.push(h,_):i.push(W,J);break}A.splice(0,2);let Fe={ind:y,mode:C,doc:Gt(A)},Y=A[0];Gr({ind:y,mode:at,doc:[S,B,Y]},[],d,c.length>0,r,!0)?i.push(Fe,h,_):v?i.push(Fe,W,_):i.push(Fe,W,J);break}case xe:case He:{let d=p.groupId?r[p.groupId]:C;if(d===Se){let A=p.type===xe?p.breakContents:p.negate?p.contents:f(p.contents);A&&i.push({ind:y,mode:C,doc:A})}if(d===at){let A=p.type===xe?p.flatContents:p.negate?f(p.contents):p.contents;A&&i.push({ind:y,mode:C,doc:A})}break}case Ve:c.push({ind:y,mode:C,doc:p.contents});break;case $e:c.length>0&&i.push({ind:y,mode:C,doc:Xn});break;case me:switch(C){case at:if(p.hard)o=!0;else{p.soft||(a.push(" "),u+=1);break}case Se:if(c.length>0){i.push({ind:y,mode:C,doc:p},...c.reverse()),c.length=0;break}p.literal?y.root?(a.push(s,y.root.value),u=y.root.length):(a.push(s),u=0):(u-=rs(a),a.push(s+y.value),u=y.length);break}break;case ve:i.push({ind:y,mode:C,doc:p.contents});break;case je:break;default:throw new Ct(p)}i.length===0&&c.length>0&&(i.push(...c.reverse()),c.length=0)}let D=a.indexOf(pr);if(D!==-1){let y=a.indexOf(pr,D+1),C=a.slice(0,D).join(""),p=a.slice(D+1,y).join(""),d=a.slice(y+1).join("");return{formatted:C+p+d,cursorNodeStart:C.length,cursorNodeText:p}}return{formatted:a.join("")}}function Bp(e,t,r=0){let n=0;for(let s=r;s<e.length;++s)e[s]===" "?n=n+t-n%t:n++;return n}var Gu=Bp;function bp(e,t){let r=e.lastIndexOf(`
|
||
|
`);return r===-1?0:Gu(e.slice(r+1).match(/^[\t ]*/)[0],t)}var Uu=bp;function Ur(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&Ip(e)){let c=Pp(e,r,t);if(c)return c}let u="expressions";n.type==="TSTemplateLiteralType"&&(u="types");let i=[],a=e.map(t,u);i.push(ke,"`");let o=0;return e.each(({index:c,node:m})=>{if(i.push(t()),m.tail)return;let{tabWidth:D}=r,y=m.value.raw,C=y.includes(`
|
||
|
`)?Uu(y,D):o;o=C;let p=a[c],d=n[u][c],A=Te(r.originalText,k(m),R(n.quasis[c+1]));if(!A){let B=ns(p,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;B.includes(`
|
||
|
`)?A=!0:p=B}A&&(T(d)||d.type==="Identifier"||q(d)||d.type==="ConditionalExpression"||d.type==="SequenceExpression"||de(d)||De(d))&&(p=[f([E,p]),E]);let S=C===0&&y.endsWith(`
|
||
|
`)?he(Number.NEGATIVE_INFINITY,p):hu(p,C,D);i.push(l(["${",S,ke,"}"]))},"quasis"),i.push("`"),i}function Nu(e){let t=e("quasi");return it(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),ke,t])}function Pp(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(y=>"${"+ns(y,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let y=1;y<n.quasis.length;y++){let C=O(!1,o,-1),p=a[y-1];C.cells.push(p),p.includes(`
|
||
|
`)&&(C.hasLineBreak=!0),n.quasis[y].value.raw.includes(`
|
||
|
`)&&o.push({hasLineBreak:!1,cells:[]})}let c=Math.max(s.length,...o.map(y=>y.cells.length)),m=Array.from({length:c}).fill(0),D=[{cells:s},...o.filter(y=>y.cells.length>0)];for(let{cells:y}of D.filter(C=>!C.hasLineBreak))for(let[C,p]of y.entries())m[C]=Math.max(m[C],et(p));return i.push(ke,"`",f([F,P(F,D.map(y=>P(" | ",y.cells.map((C,p)=>y.hasLineBreak?C:C+" ".repeat(m[p]-et(C))))))]),F,"`"),i}}function kp(e,t){let{node:r}=e,n=t();return T(r)&&(n=l([f([E,n]),E])),["${",n,ke,"}"]}function Nt(e,t){return e.map(r=>kp(r,t),"expressions")}function Nr(e,t){return mt(e,r=>typeof r=="string"?t?Q(!1,r,/(\\*)`/g,"$1$1\\`"):ss(r):r)}function ss(e){return Q(!1,e,/([\\`]|\${)/g,String.raw`\$1`)}function Ip({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;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"&&r.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"&&r.test(t.tag.object.object.name))}var is=[(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 Xu(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Ae(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>U(n)&&s==="elements",r,...is)||e.match(t,r,...is)}function Yu(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ae(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...is)}function us(e,t){return T(e,g.Block|g.Leading,({value:r})=>r===` ${t} `)}function Xr({node:e,parent:t},r){return us(e,r)||Lp(t)&&us(t,r)||t.type==="ExpressionStatement"&&us(t,r)}function Lp(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function wp(e,t,r){let{node:n}=r,s=n.quasis.map(m=>m.value.raw),u=0,i=s.reduce((m,D,y)=>y===0?D:m+"@prettier-placeholder-"+u+++"-id"+D,""),a=await e(i,{parser:"scss"}),o=Nt(r,t),c=Op(a,o);if(!c)throw new Error("Couldn't insert all the expressions");return["`",f([F,c]),E,"`"]}function Op(e,t){if(!L(t))return e;let r=0,n=mt(Ut(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/).map((u,i)=>i%2===0?Ie(u):(r++,t[u])));return t.length===r?n:null}function _p({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Yr(e){return e.type==="Identifier"&&e.name==="styled"}function Hu(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function vp({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 Yr(t.object)||Hu(t);case"CallExpression":return Yr(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Yr(t.callee.object.object)||Hu(t.callee.object))||t.callee.object.type==="CallExpression"&&Yr(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function jp({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Mp(e){if(_p(e)||vp(e)||jp(e)||Xu(e))return wp}v
|
||
|
`),C=y.length,p=u[a],d=C>2&&y[0].trim()===""&&y[1].trim()==="",A=C>2&&y[C-1].trim()===""&&y[C-2].trim()==="",S=y.every(_=>/^\s*(?:#[^\n\r]*)?$/.test(_));if(!m&&/#[^\n\r]*$/.test(y[C-1]))return null;let B=null;S?B=Jp(y):B=await e(D,{parser:"graphql"}),B?(B=Nr(B,!1),!c&&d&&i.push(""),i.push(B),!m&&A&&i.push("")):!c&&!m&&d&&i.push(""),p&&i.push(p)}return["`",f([F,P(F,i)]),F,"`"]}function Jp(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([F,u]):t.push(u),r=!0);return t.length===0?null:P(F,t)}function qp({node:e,parent:t}){return Xr({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")}function Wp(e){if(qp(e))return Rp}var $u=Wp;var as=0;async function Ku(e,t,r,n,s){let{node:u}=n,i=as;as=as+1>>>0;let a=S=>`PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`,o=u.quasis.map((S,B,_)=>B===_.length-1?S.value.cooked:S.value.cooked+a(B)).join(""),c=Nt(n,r),m=new RegExp(a(String.raw`(\d+)`),"g"),D=0,y=await t(o,{parser:e,__onHtmlRoot(S){D=S.children.length}}),C=mt(y,S=>{if(typeof S!="string")return S;let B=[],_=S.split(m);for(let J=0;J<_.length;J++){let v=_[J];if(J%2===0){v&&(v=ss(v),s.__embeddedInHtml&&(v=Q(!1,v,/<\/(?=script\b)/gi,String.raw`<\/`)),B.push(v));continue}let h=Number(v);B.push(c[h])}return B}),p=/^\s/.test(o)?" ":"",d=/\s$/.test(o)?" ":"",A=s.htmlWhitespaceSensitivity==="ignore"?F:p&&d?x:null;return A?l(["`",f([A,l(C)]),A,"`"]):it({hug:!1},l(["`",p,D>1?f(l(C)):l(C),d,"`"]))}function Gp(e){return Xr(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Up=Ku.bind(void 0,"html"),Np=Ku.bind(void 0,"angular");function Xp(e){if(Gp(e))return Up;if(Yu(e))return Np}var zu=Xp;async function Yp(e,t,r){let{node:n}=r,s=Q(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(o,c)=>"\\".repeat(c.length/2)+"`"),u=Hp(s),i=u!=="";i&&(s=Q(!1,s,new RegExp(`^${u}`,"gm"),""));let a=Nr(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?f([E,a]):[Wr,xu(a)],E,"`"]}function Hp(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Vp(e){if($p(e))return Yp}function $p({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var Qu=Vp;function Kp(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||zp(t))return;let r;for(let n of[Vu,$u,zu,Qu])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&it({embed:!0,...u.label},u)}}function zp({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Zu=Kp;var dt=Ya(ii(),1);function ac(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||
|
`);return t===-1?e:e.slice(0,t)}var ai=ac;function oc(e){let t=ai(e);t&&(e=e.slice(t.length+1));let r=(0,dt.extract)(e),{pragmas:n,comments:s}=(0,dt.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:s}}function oi(e){let{shebang:t,text:r,pragmas:n,comments:s}=oc(e),u=(0,dt.strip)(r),i=(0,dt.print)({pragmas:{format:"",...n},comments:s.trimStart()});return(t?`${t}
|
||
|
`:"")+i+(u.startsWith(`
|
||
|
`)?`
|
||
|
`:`
|
||
|
|
||
|
`)+u}function pc(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),c=u(a);for(let m of n)s(m)>=o&&u(m)<=c&&i.add(m);return r.slice(o,c)}var pi=pc;function os(e,t){var u,i,a,o,c,m,D,y,C;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&yc(r)&&cr(e))return!0;if(cc(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let p=(i=e.findAncestor(d=>d.type==="ForOfStatement"))==null?void 0:i.left;if(p&&ae(p,d=>d===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let p=e.findAncestor(A=>A.type==="ExpressionStatement"||A.type==="ForStatement"||A.type==="ForInStatement"),d=p?p.type==="ExpressionStatement"?p.expression:p.type==="ForStatement"?p.init:p.left:void 0;if(d&&ae(d,A=>A===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let p=e.findAncestor(d=>!de(d));if(p!==s&&p.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let p=(a=e.findAncestor(d=>d.type==="ExpressionStatement"))==null?void 0:a.expression;if(p&&ae(p,d=>d===r))return!0}if(r.type==="ObjectExpression"){let p=(o=e.findAncestor(d=>d.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(p&&p.type!=="SequenceExpression"&&p.type!=="AssignmentExpression"&&ae(p,d=>d===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&L(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return ci(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"){if(q(r)&&r.computed)return!0;let p=!1,d=!1,A=r;for(;A;)switch(A.type){case"MemberExpression":d=!0,A=A.object;break;case"CallExpression":if(d||p)return t.parser!=="typescript";p=!0,A=A.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(p,d)=>d==="returnType"&&p.type==="ArrowFunctionExpression")&&mc(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&lc(e))return!0;if(r.operator==="|>"&&((c=r.extra)!=null&&c.parenthesized)){let p=e.grandparent;if(p.type==="BinaryExpression"&&p.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpre
|
||
|
\r `),Ds=e=>e===""||e===x||e===F||e===E;function Ac(e,t,r){var _,J,v;let{node:n}=e;if(n.type==="JSXElement"&&Oc(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(h=>_c(h)?{type:"JSXText",value:" ",raw:" "}:h);let i=n.children.some(N),a=n.children.filter(h=>h.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,c=ne(s)||i||o||a,m=e.parent.rootMarker==="mdx",D=t.singleQuote?"{' '}":'{" "}',y=m?" ":b([D,E]," "),C=((J=(_=n.openingElement)==null?void 0:_.name)==null?void 0:J.name)==="fbt",p=dc(e,t,r,y,C),d=n.children.some(h=>lr(h));for(let h=p.length-2;h>=0;h--){let W=p[h]===""&&p[h+1]==="",Fe=p[h]===F&&p[h+1]===""&&p[h+2]===F,Y=(p[h]===E||p[h]===F)&&p[h+1]===""&&p[h+2]===y,ie=p[h]===y&&p[h+1]===""&&(p[h+2]===E||p[h+2]===F),Z=p[h]===y&&p[h+1]===""&&p[h+2]===y,wt=p[h]===E&&p[h+1]===""&&p[h+2]===F||p[h]===F&&p[h+1]===""&&p[h+2]===E;Fe&&d||W||Y||Z||wt?p.splice(h,2):ie&&p.splice(h+1,2)}for(;p.length>0&&Ds(O(!1,p,-1));)p.pop();for(;p.length>1&&Ds(p[0])&&Ds(p[1]);)p.shift(),p.shift();let A=[];for(let[h,W]of p.entries()){if(W===y){if(h===1&&p[h-1]===""){if(p.length===2){A.push(D);continue}A.push([D,F]);continue}else if(h===p.length-1){A.push(D);continue}else if(p[h-1]===""&&p[h-2]===F){A.push(D);continue}}A.push(W),ne(W)&&(c=!0)}let S=d?Gt(A):l(A,{shouldBreak:!0});if(((v=t.cursorNode)==null?void 0:v.type)==="JSXText"&&n.children.includes(t.cursorNode)&&(S=[Yn,S,Yn]),m)return S;let B=l([s,f([F,S]),F,u]);return c?B:ze([l([s,...p,u]),B])}function dc(e,t,r,n,s){let u=[];return e.each(({node:i,next:a})=>{if(i.type==="JSXText"){let o=fe(i);if(lr(i)){let c=Hr.split(o,!0);c[0]===""&&(u.push(""),c.shift(),/\n/.test(c[0])?u.push(Di(s,c[1],i,a)):u.push(n),c.shift());let m;if(O(!1,c,-1)===""&&(c.pop(),m=c.pop()),c.length===0)return;for(let[D,y]of c.entries())D%2===1?u.push(x):u.push(y);m!==void 0?/\n/.test(m)?u.push(Di(s,O(!1,u,-1),i,a)):u.push(n):u.push(yi(s,O(!1,u,-1),i,a))}else/\n/.test(o)?o.match(/\n/g).length>1&&u.push("",F):u.push("",n)}else{let o=r();if(u.push(o),a&&lr(a)){let m=Hr.trim(fe(a)),[D]=Hr.split(m);u.push(yi(s,D,i,a))}else u.push(F)}},"children"),u}function yi(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?E:F:E}function Di(e,t,r,n){return e?F:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?F:E:F}var Tc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function xc(e,t,r){let{parent:n}=e;if(Tc.has(n.type))return t;let s=e.match(void 0,i=>i.type==="ArrowFunctionExpression",w,i=>i.type==="JSXExpressionContainer"),u=Be(e,r);return l([u?"":b("("),f([E,t]),E,u?"":b(")")],{shouldBreak:s})}function hc(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(z(n.value)){let i=fe(n.value),a=Q(!1,Q(!1,i.slice(1,-1),"'","'"),""",'"'),o=Sr(a,t.jsxSingleQuote);a=o==='"'?Q(!1,a,'"',"""):Q(!1,a,"'","'"),u=e.call(()=>ye(e,Ie(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function gc(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!T(u)&&(U(u)||se(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||w(u)||u.type==="ChainExpression"&&w(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||N(i)&&(u.type==="ConditionalExpression"||De(u)));return s(n.expression,e.parent)?l(["{",r("expression"),ke,"}"]):l(["{"
|
||
|
`)&&!s&&!T(n.attributes[0]))return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(c=>z(c.value)&&c.value.value.includes(`
|
||
|
`)),i=t.singleAttributePerLine&&n.attributes.length>1?F:x;return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),f(e.map(()=>[i,r()],"attributes")),...Bc(n,t,s)],{shouldBreak:u})}function Bc(e,t,r){return e.selfClosing?[x,"/>"]:bc(e,t,r)?[">"]:[E,">"]}function bc(e,t,r){let n=e.attributes.length>0&&T(O(!1,e.attributes,-1),g.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Pc(e,t,r){let{node:n}=e,s=[];s.push("</");let u=r("name");return T(n.name,g.Leading|g.Line)?s.push(f([F,u]),F):T(n.name,g.Leading|g.Block)?s.push(" ",u):s.push(u),s.push(">"),s}function kc(e,t){let{node:r}=e,n=T(r),s=T(r,g.Line),u=r.type==="JSXOpeningFragment";return[u?"<":"</",f([s?F:n&&!u?" ":"",M(e,t)]),s?F:"",">"]}function Ic(e,t,r){let n=ye(e,Ac(e,t,r),t);return xc(e,n,t)}function Lc(e,t){let{node:r}=e,n=T(r,g.Line);return[M(e,t,{indent:n}),n?F:""]}function wc(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!T(s)||!es(e)?u:[f([E,ye(e,u,t)]),E]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function fi(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return hc(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return P(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return P(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return wc(e,t,r);case"JSXExpressionContainer":return gc(e,t,r);case"JSXFragment":case"JSXElement":return Ic(e,t,r);case"JSXOpeningElement":return Sc(e,t,r);case"JSXClosingElement":return Pc(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return kc(e,t);case"JSXEmptyExpression":return Lc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Me(n,"JSX")}}function Oc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!lr(t)}function lr(e){return e.type==="JSXText"&&(Hr.hasNonWhitespaceCharacter(fe(e))||!/\n/.test(fe(e)))}function _c(e){return e.type==="JSXExpressionContainer"&&z(e.expression)&&e.expression.value===" "&&!T(e.expression)}function Ei(e){let{node:t,parent:r}=e;if(!N(t)||!N(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!lr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&bt(u.expression)}function vc(e){return bt(e.node)||Ei(e)}var Vr=vc;var jc=0;function $r(e,t,r){var J;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((J=e.root.extra)==null?void 0:J.__isUsingHackPipeline),c=fs(e,r,t,!1,a);if(a)return c;if(o)return l(c);if(w(s)&&s.callee===n||s.type==="UnaryExpression"||q(s)&&!s.computed)return l([f([E,...c]),E]);let m=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!w(u)||s.type==="TemplateLiteral",D=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ae(s),y=De(n.left)&&ur(n.operator,n.left.operator);if(m||Xt(n)&&!y||!Xt(n)&&D)return l(c);if(c.length===0)return"";let C=N(n.right),p=c.findIndex(v=>typeof v!="string"&&!Array.isArray(v)&&v.type===le),d=c.slice(0,p===-1?1:p+1),A=c.slice(d.length,C?-1:void 0),S=Symbol("logicalChain-"+ ++jc),B=l([...d,f(A)],{id:S});if(!C)return B;let _=O(!1,c,-1);return l([B,At(_,{groupId:S})])}function fs(e,t,r,n,s)
|