Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terminal-cv/node_modules/prettier/parser-babel.js

23 lines
368 KiB

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.babel=t())}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){var t={exports:{}};return e(t,t.exports),t.exports}var r,i,a=function(e){return e&&e.Math==Math&&e},n=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},u=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p={f:c&&!h.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:h},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,D=function(e){return d.call(e).slice(8,-1)},m="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==D(e)?m.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},A=function(e){return f(y(e))},E=function(e){return"object"==typeof e?null!==e:"function"==typeof e},C=function(e){return"function"==typeof e?e:void 0},x=function(e,t){return arguments.length<2?C(n[e]):n[e]&&n[e][t]},F=x("navigator","userAgent")||"",g=n.process,b=n.Deno,P=g&&g.versions||b&&b.version,T=P&&P.v8;T?i=(r=T.split("."))[0]<4?1:r[0]+r[1]:F&&(!(r=F.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=F.match(/Chrome\/(\d+)/))&&(i=r[1]);var w=i&&+i,S=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&w&&w<41})),B=S&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,N=B?function(e){return"symbol"==typeof e}:function(e){var t=x("Symbol");return"function"==typeof t&&Object(e)instanceof t},I=function(e,t){try{Object.defineProperty(n,e,{value:t,configurable:!0,writable:!0})}catch(s){n[e]=t}return t},v="__core-js_shared__",k=n[v]||I(v,{}),L=s((function(e){(e.exports=function(e,t){return k[e]||(k[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),O=function(e){return Object(y(e))},M={}.hasOwnProperty,R=Object.hasOwn||function(e,t){return M.call(O(e),t)},j=0,_=Math.random(),U=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++j+_).toString(36)},q=L("wks"),$=n.Symbol,H=B?$:$&&$.withoutSetter||U,V=function(e){return R(q,e)&&(S||"string"==typeof q[e])||(S&&R($,e)?q[e]=$[e]:q[e]=H("Symbol."+e)),q[e]},z=V("toPrimitive"),W=function(e,t){if(!E(e)||N(e))return e;var s,r=e[z];if(void 0!==r){if(void 0===t&&(t="default"),s=r.call(e,t),!E(s)||N(s))return s;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var s,r;if("string"===t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;if("function"==typeof(s=e.valueOf)&&!E(r=s.call(e)))return r;if("string"!==t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},G=function(e){var t=W(e,"string");return N(t)?t:String(t)},K=n.document,X=E(K)&&E(K.createElement),J=!u&&!o((function(){return 7!=Object.defineProperty((e="div",X?K.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),Y=Object.getOwnPropertyDescriptor,Q={f:u?Y:function(e,t){if(e=A(e),t=G(t),J)try{return Y(e,t)}catch(e){}if(R(e,t))return l(!p.f.call(e,t),e[t])}},Z=function(e){if(!E(e))throw TypeError(String(e)+" is not an object");return e},ee=Object.defineProperty,te={f:u?ee:function(e,t,s){if(Z(e),t=G(t),Z(s),J)try{return ee(e,t,s)}catch(e){}if("get"in s||"set"in s)throw TypeError("Accessors not supporte
Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end.
`,cliCategory:ks},endOfLine:{since:"1.15.0",category:Os,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"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:Is`
Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)
`}]},filepath:{since:"1.4.0",category:Ms,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:Ls,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:Ms,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:Ls},parser:{since:"0.0.10",category:Os,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Os,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:vs},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Os,description:Is`
Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:vs},printWidth:{since:"0.0.0",category:Os,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:Ms,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Is`
Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:ks},rangeStart:{since:"1.4.0",category:Ms,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Is`
Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:ks},requirePragma:{since:"1.7.0",category:Ms,type:"boolean",default:!1,description:Is`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:Ls},tabWidth:{type:"int",category:Os,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Os,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Os,type:"choice",default:[{since:"2.1.0",value:"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."}]}};const js=["cliName","cliCategory","cliDescription"],_s={compare:ws,lt:Ss,gte:Bs},Us="2.4.1",qs={CATEGORY_CONFIG:vs,CATEGORY_EDITOR:ks,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:Ls,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Os,CATEGORY_SPECIAL:Ms,options:Rs}.options;var $s={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:s=!1,showInternal:r=!1}={}){const i=Us.split("-",1)[0],a=e.flatMap((e=>e.languages||[])).filter(h),n=(o=Object.assign({},...e.map((({options:e})=>e)),qs),u="name",Object.entries(o).map((([e,t])=>Object.assign({[u]:e},t)))).filter((e=>h(e)&&c(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(r)return e;return ut(e,js)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(h).sort(((e,t)=>_s.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>h(e)&&c(e))),"parser"===t.name&&function(e,t,s){const r=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!r.has(t)){r.add(t);const a=s.find((e=>e.parsers&&e.parsers[t]));let n=i.name;a&&a.name&&(n+=` (plugin: ${a.name})`),e.choices.push({value:t,description:n})}}(t,a,e));const s=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:s})}));var o,u;return{languages:a,options:n};function h(e){return t||!("since"in e)||e.since&&_s.gte(i,e.since)}function c(e){return s||!("deprecated"in e)||e.deprecated&&_s.lt(i,e.deprecated)}}};const{getSupportInfo:Hs}=$s,Vs=/[^\x20-\x7F]/;function zs(e){return(t,s,r)=>{const i=r&&r.backwards;if(!1===s)return!1;const{length:a}=t;let n=s;for(;n>=0&&n<a;){const s=t.charAt(n);if(e instanceof RegExp){if(!e.test(s))return n}else if(!e.includes(s))return n;i?n--:n++}return(-1===n||n===a)&&n}}const Ws=zs(/\s/),Gs=zs(" \t"),Ks=zs(",; \t"),Xs=zs(/[^\n\r]/);function Js(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let s=t+2;s<e.length;++s)if("*"===e.charAt(s)&&"/"===e.charAt(s+1))return s+2;return t}function Ys(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Xs(e,t):t)}function Qs(e,t,s){const r=s&&s.backwards;if(!1===t)return!1;const i=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Zs(e,t,s={}){const r=Gs(e,s.backwards?t-1:t,s);return r!==Qs(e,r,s)}function er(e,t){let s=null,r=t;for(;r!==s;)s=r,r=Ks(e,r),r=Js(e,r),r=Gs(e,r);return r=Ys(e,r),r=Qs(e,r),!1!==r&&Zs(e,r)}function tr(e,t){let s=null,r=t;for(;r!==s;)s=r,r=Gs(e,r),r=Js(e,r),r=Ys(e,r),r=Qs(e,r);return r}function sr(e,t,s){return tr(e,s(t))}function rr(e,t,s=0){let r=0;for(let i=s;i<e.length;++i)"\t"===e[i]?r=r+t-r%t:r++;return r}function ir(e,t){const s=e.slice(1,-1),r={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},a="'"===t?i:r,n=a===i?r:i;let o=a.quote;if(s.includes(a.quote)||s.includes(n.quote)){o=(s.match(a.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:a.quote}return o}function ar(e,t,s){const r='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,a)=>i===r?i:a===t?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function nr(e,t){(e