github-pages-deploy-action/node_modules/prettier/parser-glimmer.js

2 lines
134 KiB
JavaScript
Raw Normal View History

2019-11-19 20:48:29 +08:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e())}(this,function(){"use strict";var t=function(t,e){var r=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return r.loc=e,r};function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function n(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),t}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function h(t,e){if("string"!=typeof t)return t;var r=t.split("."),a=!1;return"this"===r[0]&&(a=!0,r=r.slice(1)),{type:"PathExpression",original:t,this:a,parts:r,data:!1,loc:v(e||null)}}function p(t,e,r){return{type:t,value:e,original:e,loc:v(r||null)}}function f(t,e){return{type:"Hash",pairs:t||[],loc:v(e||null)}}function d(t){return t||null}function m(t,e){return{line:t,column:e}}var g={source:"(synthetic)",start:{line:1,column:0},end:{line:1,column:0}};function v(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(1===r.length){var n=r[0];return n&&"object"===e(n)?{source:d(n.source),start:m(n.start.line,n.start.column),end:m(n.end.line,n.end.column)}:g}var i=r[0],s=r[1],o=r[2],l=r[3];return{source:d(r[4]),start:m(i,s),end:m(o,l)}}function b(t){return!Array.isArray(t)}var y={mustache:function(t,e,r,a,n){return"string"==typeof t&&(t=h(t)),{type:"MustacheStatement",path:t,params:e||[],hash:r||f([]),escaped:!a,loc:v(n||null)}},block:function(t,e,r,a,n,i){return{type:"BlockStatement",path:h(t),params:e||[],hash:r||f([]),program:a||null,inverse:n||null,loc:v(i||null)}},partial:function(t,e,r,a,n){return{type:"PartialStatement",name:t,params:e||[],hash:r||f([]),indent:a||"",strip:{open:!1,close:!1},loc:v(n||null)}},comment:function(t,e){return{type:"CommentStatement",value:t,loc:v(e||null)}},mustacheComment:function(t,e){return{type:"MustacheCommentStatement",value:t,loc:v(e||null)}},element:function(t,r,a,n,i,s,o){Array.isArray(i)?"string"===i[0]?(s=i,i=[]):b(s)&&(o=s,s=[]):b(i)?(o=i,i=[]):b(s)&&(o=s,s=[]);var l=!1;return"object"===e(t)&&(l=t.selfClosing,t=t.name),{type:"ElementNode",tag:t||"",selfClosing:l,attributes:r||[],blockParams:s||[],modifiers:a||[],comments:i||[],children:n||[],loc:v(o||null)}},elementModifier:function(t,e,r,a){return{type:"ElementModifierStatement",path:h(t),params:e||[],hash:r||f([]),loc:v(a||null)}},attr:function(t,e,r){return{type:"AttrNode",name:t,value:e,loc:v(r||null)}},text:function(t,e){return{type:"TextNode",chars:t||"",loc:v(e||null)}},sexpr:function(t,e,r,a){return{type:"SubExpression",path:h(t),params:e||[],hash:r||f([]),loc:v(a||null)}},path:h,concat:function(t,e){return{type:"ConcatStatement",parts:t||[],loc:v(e||null)}}