Files
codeql-action/node_modules/prettier/esm/parser-postcss.mjs
T

23 lines
217 KiB
JavaScript
Raw Normal View History

2021-07-27 16:54:26 +00:00
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){var t={exports:{}};return e(t,t.exports),t.exports}var n=function(e){return e&&e.Math==Math&&e},o=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},s=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!u.call({1:2},1)?function(e){var t=a(this,e);return!!t&&t.enumerable}:u},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},f={}.toString,p=function(e){return f.call(e).slice(8,-1)},h="".split,d=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==p(e)?h.call(e,""):Object(e)}:Object,D=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return d(D(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},v=function(e,t){if(!m(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!m(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!m(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!m(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},y=function(e){return Object(D(e))},w={}.hasOwnProperty,b=Object.hasOwn||function(e,t){return w.call(y(e),t)},C=o.document,E=m(C)&&m(C.createElement),F=!s&&!i((function(){return 7!=Object.defineProperty((e="div",E?C.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),A=Object.getOwnPropertyDescriptor,x={f:s?A:function(e,t){if(e=g(e),t=v(t,!0),F)try{return A(e,t)}catch(e){}if(b(e,t))return l(!c.f.call(e,t),e[t])}},k=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},_=Object.defineProperty,O={f:s?_:function(e,t,r){if(k(e),t=v(t,!0),k(r),F)try{return _(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},S=s?function(e,t,r){return O.f(e,t,l(1,r))}:function(e,t,r){return e[t]=r,e},T=function(e,t){try{S(o,e,t)}catch(r){o[e]=t}return t},I=o["__core-js_shared__"]||T("__core-js_shared__",{}),N=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(e){return N.call(e)});var M,R,j,L,B=I.inspectSource,P=o.WeakMap,$="function"==typeof P&&/native code/.test(B(P)),U=r((function(e){(e.exports=function(e,t){return I[e]||(I[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),G=0,W=Math.random(),z=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++G+W).toString(36)},V=U("keys"),q={},X=o.WeakMap;if($||I.state){var J=I.state||(I.state=new X),H=J.get,Y=J.has,K=J.set;M=function(e,t){if(Y.call(J,e))throw new TypeError("Object already initialized");return t.facade=e,K.call(J,e,t),t},R=function(e){return H.call(J,e)||{}},j=function(e){return Y.call(J,e)}}else{var Z=V[L="state"]||(V[L]=z(L));q[Z]=!0,M=function(e,t){if(b(e,Z))throw new TypeError("Object already initialized");return t.facade=e,S(e,Z,t),t},R=function(e){return b(e,Z)?e[Z]:{}},j=function(e){return b(e,Z)}}var Q,ee,te={set:M,get:R,has:j,enforce:function(e){return j(e)?R(e):M(e,{})},getterFor:function(e){return function(t){var r;if(!m(t)||(r=R(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},re=r((function(e){var t=te.get,r=te.enforce,n=String(String).split("String");(e.exports=function(e,t,i,s){var u,a=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,l=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||S(i,"name",t),(u=r(i)).source||(u.source=n.join("string"==typeof t?t:""))),e!==o?(a?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=i:S(e,t,i)):c?e[t]=i:T(t,i)})(Function.prototy
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:i},endOfLine:{since:"1.15.0",category:u,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:n`
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:a,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:s,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:a,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:s},parser:{since:"0.0.10",category:u,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:u,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:o},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:u,description:n`
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:o},printWidth:{since:"0.0.0",category:u,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:a,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:n`
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:i},rangeStart:{since:"1.4.0",category:a,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:n`
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:i},requirePragma:{since:"1.7.0",category:a,type:"boolean",default:!1,description:n`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:s},tabWidth:{type:"int",category:u,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:u,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:u,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."}]}};e.exports={CATEGORY_CONFIG:o,CATEGORY_EDITOR:i,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:s,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:u,CATEGORY_SPECIAL:a,options:c}},7290:(e,t,r)=>{const n=["cliName","cliCategory","cliDescription"];function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r(4304),r(4070),r(2612);const i={compare:r(2828),lt:r(3725),gte:r(9195)},s=r(9077),u=r(306).i8,a=r(8988).options;e.exports={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:c=!1}={}){const l=u.split("-",1)[0],f=e.flatMap((e=>e.languages||[])).filter(h),p=s(Object.assign({},...e.map((({options:e})=>e)),a),"name").filter((e=>h(e)&&d(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){return c?e:o(e,n)})).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)=>i.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>h(e)&&d(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const o of t)if(o.parsers)for(const t of o.parsers)if(!n.has(t)){n.add(t);const i=r.find((e=>e.parsers&&e.parsers[t]));let s=o.name;i&&i.name&&(s+=` (plugin: ${i.name})`),e.choices.push({value:t,description:s})}}(t,f,e));const r=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:r})}));return{languages:f,options:p};function h(e){return t||!("since"in e)||e.since&&i.gte(l,e.since)}function d(e){return r||!("deprecated"in e)||e.deprecated&&i.lt(l,e.deprecated)}}}},9077:e=>{e.exports=(e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r)))},5115:e=>{const t=new RegExp("^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)","s");e.exports=function(e){const r=e.match(t);if(!r)return{content:e};const{startDelimiter:n,language:o,value:i="",endDelimiter:s}=r.groups;let u=o.trim()||"yaml";if("+++"===n&&(u="toml"),"yaml"!==u&&n!==s)return{content:e};const[a]=r;return{frontMatter:{type:"front-matter",lang:u,value:i,startDelimiter:n,endDelimiter:s,raw:a.replace(/\n$/,"")},content:a.replace(/[^\n]/g," ")+e.slice(a.length)}}},4652:e=>{e.exports=e=>e[e.length-1]},6920:e=>{e.exports=function(e,t){let r=0;for(let n=0;n<e.line-1;++n)r=t.indexOf("\n",r)+1;return r+e.column}},306:e=>{e.exports={i8:"2.3.2"}},7545:(e,t,r)=>{r.r(t),r.d(t,{existsSync:()=>n,readFileSync:()=>o,default:()=>i});const n=()=>!1,o=()=>"",i={existsSync:n,readFileSync:o}},9623:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});const n={EOL:"\n",platform:()=>"browser",cpus:()=>[{model:"Prettier"}]}},6391:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});var n=r(5724),o={};for(const e in n)"default"!==e&&(o[e]=()=>n[e]);r.d(t,o)},8472:()=>{},2868:()=>{},3248:()=>{},6083:()=>{}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}return r.d=(e,t)=>{for(var n in t)