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.
23 lines
233 KiB
23 lines
233 KiB
2 years ago
|
!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.espree=t())}(this,(function(){"use strict";var e=function(e,t){const i=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return i.loc=t,i};var t,i=function(...e){let t;for(const[i,r]of e.entries())try{return{result:r()}}catch(e){0===i&&(t=e)}return{error:t}},r=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function u(){if(void 0===t){var e=new ArrayBuffer(2),i=new Uint8Array(e),r=new Uint16Array(e);if(i[0]=1,i[1]=2,258===r[0])t="BE";else{if(513!==r[0])throw new Error("unable to figure out endianess");t="LE"}}return t}function n(){return void 0!==r.location?r.location.hostname:""}function s(){return[]}function a(){return 0}function o(){return Number.MAX_VALUE}function c(){return Number.MAX_VALUE}function p(){return[]}function D(){return"Browser"}function h(){return void 0!==r.navigator?r.navigator.appVersion:""}function l(){}function f(){}function d(){return"javascript"}function E(){return"browser"}function m(){return"/tmp"}var C=m,A={EOL:"\n",arch:d,platform:E,tmpdir:C,tmpDir:m,networkInterfaces:l,getNetworkInterfaces:f,release:h,type:D,cpus:p,totalmem:c,freemem:o,uptime:a,loadavg:s,hostname:n,endianness:u},F=Object.freeze({__proto__:null,endianness:u,hostname:n,loadavg:s,uptime:a,freemem:o,totalmem:c,cpus:p,type:D,release:h,networkInterfaces:l,getNetworkInterfaces:f,arch:d,platform:E,tmpDir:m,tmpdir:C,EOL:"\n",default:A});const g=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");const t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const i=t.filter((e=>"\r\n"===e)).length;return i>t.length-i?"\r\n":"\n"};var y=g;y.graceful=e=>"string"==typeof e&&g(e)||"\n";var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function B(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e){var t={exports:{}};return e(t,t.exports),t.exports}var b=B(F),S=function(e){const t=e.match(O);return t?t[0].trimLeft():""},w=function(e){const t=e.match(O);return t&&t[0]?e.substring(t[0].length):e},T=function(e){return X(e).pragmas},k=X,I=function({comments:e="",pragmas:t={}}){const i=(0,_().default)(e)||N().EOL,r=" *",u=Object.keys(t),n=u.map((e=>q(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>" * "+e+i)).join("");if(!e){if(0===u.length)return"";if(1===u.length&&!Array.isArray(t[u[0]])){const e=t[u[0]];return`/** ${q(u[0],e)[0]} */`}}const s=e.split(i).map((e=>` * ${e}`)).join(i)+i;return"/**"+i+(e?s:"")+(e&&u.length?r+i:"")+n+" */"};function N(){const e=b;return N=function(){return e},e}function _(){const e=(t=y)&&t.__esModule?t:{default:t};var t;return _=function(){return e},e}const L=/\*\/$/,P=/^\/\*\*/,O=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,R=/(^|\s+)\/\/([^\r\n]*)/g,j=/^(\r?\n)+/,V=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,M=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,U=/(\r?\n|^) *\* ?/g,$=[];function X(e){const t=(0,_().default)(e)||N().EOL;e=e.replace(P,"").replace(L,"").replace(U,"$1");let i="";for(;i!==e;)i=e,e=e.replace(V,`${t}$1 $2${t}`);e=e.replace(j,"").trimRight();const r=Object.create(null),u=e.replace(M,"").replace(j,"").trimRight();let n;for(;n=M.exec(e);){const e=n[2].replace(R,"");"string"==typeof r[n[1]]||Array.isArray(r[n[1]])?r[n[1]]=$.concat(r[n[1]],e):r[n[1]]=e}return{comments:u,pragmas:r}}function q(e,t){return $.concat(t).map((t=>`@${e} ${t}`.trim()))}var G=Object.defineProperty({extract:S,strip:w,parse:T,parseWithComments:k,print:I},"__esModule",{value:!0}),W=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const J=e=>!Number.isNaN(e)
|
||
|
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:Fr},endOfLine:{since:"1.15.0",category:yr,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:Cr`
|
||
|
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:xr,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:gr,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:xr,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:gr},parser:{since:"0.0.10",category:yr,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:yr,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:Ar},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:yr,description:Cr`
|
||
|
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:Ar},printWidth:{since:"0.0.0",category:yr,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:xr,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Cr`
|
||
|
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:Fr},rangeStart:{since:"1.4.0",category:xr,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Cr`
|
||
|
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:Fr},requirePragma:{since:"1.7.0",category:xr,type:"boolean",default:!1,description:Cr`
|
||
|
Require either '@prettier' or '@format' to be present in the file's first docblock comment
|
||
|
in order for it to be formatted.
|
||
|
`,cliCategory:gr},tabWidth:{type:"int",category:yr,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:yr,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:yr,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 vr=["cliName","cliCategory","cliDescription"],br={compare:fr,lt:dr,gte:Er},Sr="2.4.1",wr={CATEGORY_CONFIG:Ar,CATEGORY_EDITOR:Fr,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:gr,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:yr,CATEGORY_SPECIAL:xr,options:Br}.options;var Tr={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:i=!1,showInternal:r=!1}={}){const u=Sr.split("-",1)[0],n=e.flatMap((e=>e.languages||[])).filter(c),s=(a=Object.assign({},...e.map((({options:e})=>e)),wr),o="name",Object.entries(a).map((([e,t])=>Object.assign({[o]:e},t)))).filter((e=>c(e)&&p(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(r)return e;return te(e,vr)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(c).sort(((e,t)=>br.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>c(e)&&p(e))),"parser"===t.name&&function(e,t,i){const r=new Set(e.choices.map((e=>e.value)));for(const u of t)if(u.parsers)for(const t of u.parsers)if(!r.has(t)){r.add(t);const n=i.find((e=>e.parsers&&e.parsers[t]));let s=u.name;n&&n.name&&(s+=` (plugin: ${n.name})`),e.choices.push({value:t,description:s})}}(t,n,e));const i=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:i})}));var a,o;return{languages:n,options:s};function c(e){return t||!("since"in e)||e.since&&br.gte(u,e.since)}function p(e){return i||!("deprecated"in e)||e.deprecated&&br.lt(u,e.deprecated)}}};const{getSupportInfo:kr}=Tr,Ir=/[^\x20-\x7F]/;function Nr(e){return(t,i,r)=>{const u=r&&r.backwards;if(!1===i)return!1;const{length:n}=t;let s=i;for(;s>=0&&s<n;){const i=t.charAt(s);if(e instanceof RegExp){if(!e.test(i))return s}else if(!e.includes(i))return s;u?s--:s++}return(-1===s||s===n)&&s}}const _r=Nr(/\s/),Lr=Nr(" \t"),Pr=Nr(",; \t"),Or=Nr(/[^\n\r]/);function Rr(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let i=t+2;i<e.length;++i)if("*"===e.charAt(i)&&"/"===e.charAt(i+1))return i+2;return t}function jr(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Or(e,t):t)}function Vr(e,t,i){const r=i&&i.backwards;if(!1===t)return!1;const u=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===u)return t-2;if("\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)return t-1}else{if("\r"===u&&"\n"===e.charAt(t+1))return t+2;if("\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)return t+1}return t}function Mr(e,t,i={}){const r=Lr(e,i.backwards?t-1:t,i);return r!==Vr(e,r,i)}function Ur(e,t){let i=null,r=t;for(;r!==i;)i=r,r=Pr(e,r),r=Rr(e,r),r=Lr(e,r);return r=jr(e,r),r=Vr(e,r),!1!==r&&Mr(e,r)}function $r(e,t){let i=null,r=t;for(;r!==i;)i=r,r=Lr(e,r),r=Rr(e,r),r=jr(e,r),r=Vr(e,r);return r}function Xr(e,t,i){return $r(e,i(t))}function qr(e,t,i=0){let r=0;for(let u=i;u<e.length;++u)"\t"===e[u]?r=r+t-r%t:r++;return r}function Gr(e,t){const i=e.slice(1,-1),r={quote:'"',regex:/"/g},u={quote:"'",regex:/'/g},n="'"===t?u:r,s=n===u?r:u;let a=n.quote;if(i.includes(n.quote)||i.includes(s.quote)){a=(i.match(n.regex)||[]).length>(i.match(s.regex)||[]).length?s.quote:n.quote}return a}function Wr(e,t,i){const r='"'===t?"'":'"',u=e.replace(/\\(.)|(["'])/gs,((e,u,n)=>u===r?u:n===t?"\\"+n:n||(i&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(u)?u:"\\"+u)));return t+u+t}function Jr(e,t){(e
|