forked from kevin.shehu/GGD
2 lines
3.0 MiB
JavaScript
2 lines
3.0 MiB
JavaScript
|
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((r="undefined"!=typeof globalThis?globalThis:r||self).prettierPlugins=r.prettierPlugins||{},r.prettierPlugins.flow=e())}(this,(function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(r){return r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var n,t=function(r,e){const n=new SyntaxError(r+" ("+e.start.line+":"+e.start.column+")");return n.loc=e,n},u={},a=void 0!==a?a:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function i(){if(void 0===n){var r=new ArrayBuffer(2),e=new Uint8Array(r),t=new Uint16Array(r);if(e[0]=1,e[1]=2,258===t[0])n="BE";else{if(513!==t[0])throw new Error("unable to figure out endianess");n="LE"}}return n}function c(){return void 0!==a.location?a.location.hostname:""}function f(){return[]}function o(){return 0}function s(){return Number.MAX_VALUE}function l(){return Number.MAX_VALUE}function v(){return[]}function D(){return"Browser"}function b(){return void 0!==a.navigator?a.navigator.appVersion:""}function p(){}function E(){}function m(){return"javascript"}function F(){return"browser"}function k(){return"/tmp"}var d=k,h={EOL:"\n",arch:m,platform:F,tmpdir:d,tmpDir:k,networkInterfaces:p,getNetworkInterfaces:E,release:b,type:D,cpus:v,totalmem:l,freemem:s,uptime:o,loadavg:f,hostname:c,endianness:i},y=e(Object.freeze({__proto__:null,endianness:i,hostname:c,loadavg:f,uptime:o,freemem:s,totalmem:l,cpus:v,type:D,release:b,networkInterfaces:p,getNetworkInterfaces:E,arch:m,platform:F,tmpDir:k,tmpdir:d,EOL:"\n",default:h})),_={exports:{}};const A=r=>{if("string"!=typeof r)throw new TypeError("Expected a string");const e=r.match(/(?:\r?\n)/g)||[];if(0===e.length)return;const n=e.filter((r=>"\r\n"===r)).length;return n>e.length-n?"\r\n":"\n"};function C(){const r=y;return C=function(){return r},r}function w(){const r=(e=_.exports)&&e.__esModule?e:{default:e};var e;return w=function(){return r},r}_.exports=A,_.exports.graceful=r=>"string"==typeof r&&A(r)||"\n",Object.defineProperty(u,"__esModule",{value:!0}),u.extract=function(r){const e=r.match(B);return e?e[0].trimLeft():""},u.strip=function(r){const e=r.match(B);return e&&e[0]?r.substring(e[0].length):r},u.parse=function(r){return P(r).pragmas},u.parseWithComments=P,u.print=function(r){let{comments:e="",pragmas:n={}}=r;const t=(0,w().default)(e)||C().EOL,u=" *",a=Object.keys(n),i=a.map((r=>R(r,n[r]))).reduce(((r,e)=>r.concat(e)),[]).map((r=>" * "+r+t)).join("");if(!e){if(0===a.length)return"";if(1===a.length&&!Array.isArray(n[a[0]])){const r=n[a[0]];return"".concat("/**"," ").concat(R(a[0],r)[0]).concat(" */")}}const c=e.split(t).map((r=>"".concat(u," ").concat(r))).join(t)+t;return"/**"+t+(e?c:"")+(e&&a.length?u+t:"")+i+" */"};const S=/\*\/$/,g=/^\/\*\*/,B=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,T=/(^|\s+)\/\/([^\r\n]*)/g,I=/^(\r?\n)+/,O=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,N=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,x=/(\r?\n|^) *\* ?/g,L=[];function P(r){const e=(0,w().default)(r)||C().EOL;r=r.replace(g,"").replace(S,"").replace(x,"$1");let n="";for(;n!==r;)n=r,r=r.replace(O,"".concat(e,"$1 $2").concat(e));r=r.replace(I,"").trimRight();const t=Object.create(null),u=r.replace(N,"").replace(I,"").trimRight();let a;for(;a=N.exec(r);){const r=a[2].replace(T,"");"string"==typeof t[a[1]]||Array.isArray(t[a[1]])?t[a[1]]=L.concat(t[a[1]],r):t[a[1]]=r}return{comments:u,pragmas:t}}function R(r,e){return L.concat(e).map((e=>"@".concat(r," ").concat(e).trim()))}var M={exports:{}};const G=function(){let{onlyFirst:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")};var U={exports:{}};const j=r=>
|