webhook-action/node_modules/prettier/parser-flow.js

2 lines
1.8 MiB
JavaScript
Raw Normal View History

2020-08-27 08:23:33 +00:00
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((r="undefined"!=typeof globalThis?globalThis:r||self).prettierPlugins=r.prettierPlugins||{},r.prettierPlugins.flow=t())}(this,(function(){"use strict";var r=function(r,t){const e=new SyntaxError(r+" ("+t.start.line+":"+t.start.column+")");return e.loc=t,e};function t(r,t,e){return r(e={path:t,exports:{},require:function(r,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&e.path)}},e.exports),e.exports}function e(r){return r&&r.default||r}var n=Object.freeze({__proto__:null,default:{EOL:"\n"}});const u=r=>{if("string"!=typeof r)throw new TypeError("Expected a string");const t=r.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const e=t.filter(r=>"\r\n"===r).length;return e>t.length-e?"\r\n":"\n"};var a=u;a.graceful=r=>"string"==typeof r&&u(r)||"\n";var i=e(n),c=t((function(r,t){function e(){const r=i;return e=function(){return r},r}function n(){const r=(t=a)&&t.__esModule?t:{default:t};var t;return n=function(){return r},r}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(r){const t=r.match(f);return t?t[0].trimLeft():""},t.strip=function(r){const t=r.match(f);return t&&t[0]?r.substring(t[0].length):r},t.parse=function(r){return D(r).pragmas},t.parseWithComments=D,t.print=function({comments:r="",pragmas:t={}}){const u=(0,n().default)(r)||e().EOL,a=Object.keys(t),i=a.map(r=>d(r,t[r])).reduce((r,t)=>r.concat(t),[]).map(r=>" * "+r+u).join("");if(!r){if(0===a.length)return"";if(1===a.length&&!Array.isArray(t[a[0]])){const r=t[a[0]];return"".concat("/**"," ").concat(d(a[0],r)[0]).concat(" */")}}const c=r.split(u).map(r=>"".concat(" *"," ").concat(r)).join(u)+u;return"/**"+u+(r?c:"")+(r&&a.length?" *"+u:"")+i+" */"};const u=/\*\/$/,c=/^\/\*\*/,f=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,o=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,v=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,b=/(\r?\n|^) *\* ?/g,p=[];function D(r){const t=(0,n().default)(r)||e().EOL;r=r.replace(c,"").replace(u,"").replace(b,"$1");let a="";for(;a!==r;)a=r,r=r.replace(v,"".concat(t,"$1 $2").concat(t));r=r.replace(s,"").trimRight();const i=Object.create(null),f=r.replace(l,"").replace(s,"").trimRight();let D;for(;D=l.exec(r);){const r=D[2].replace(o,"");"string"==typeof i[D[1]]||Array.isArray(i[D[1]])?i[D[1]]=p.concat(i[D[1]],r):i[D[1]]=r}return{comments:f,pragmas:i}}function d(r,t){return p.concat(t).map(t=>"@".concat(r," ").concat(t).trim())}})),f=r=>"string"==typeof r?r.replace((({onlyFirst:r=!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,r?void 0:"g")})(),""):r;const o=r=>!Number.isNaN(r)&&(r>=4352&&(r<=4447||9001===r||9002===r||11904<=r&&r<=12871&&12351!==r||12880<=r&&r<=19903||19968<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65131||65281<=r&&r<=65376||65504<=r&&r<=65510||110592<=r&&r<=110593||127488<=r&&r<=127569||131072<=r&&r<=262141));var s=o,v=o;s.default=v;const l=r=>{if("string"!=typeof(r=r.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDA