Fixed React dependency and added exercise 07 and 08
This commit is contained in:
1 parent
e1cbab07d4
commit
494cbfdf5c
800 files changed
+138315
-16
No files matched your search
Binary file not shown.
@@ -15,17 +15,22 @@
|
||||
<body>
|
||||
<div id="navigation">
|
||||
</div>
|
||||
<div class="container"></div>
|
||||
<div id="date"></div>
|
||||
<div class="container">
|
||||
<div id="date"></div>
|
||||
<div class="content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--scripts-->
|
||||
<script src="./lib//jquery-3.3.1.min.js"></script>
|
||||
<script src="./lib/es6-shim.min.js"></script>
|
||||
<!--<script src="../../lib/bootstrap.min.js"></script>-->
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~loacle.de"></script>
|
||||
<script src="./lib//jquery-2.2.4.min.js"></script>
|
||||
<script src="../../lib/bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
|
||||
<!--script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script-->
|
||||
|
||||
<script src="./lib/babel.min.js"></script>
|
||||
<script src="./lib/react.js"></script>
|
||||
@@ -36,7 +41,8 @@
|
||||
<script src="scripts/Patient.js"></script>
|
||||
<script src="scripts/fhirService.js"></script>
|
||||
|
||||
<script src="scripts/react.js" type="text/babel"></script>
|
||||
<script src="scripts/react.js" type="text/babel">
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
function loadTemplates() {
|
||||
$('#navigation').load('templates/NavbarTemplate.html');
|
||||
$('#content').load('templates/AboutTemplate.html');
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(loadTemplates);
|
||||
function loadTemplates() {␍ $('#navigation').load('templates/NavbarTemplate.html');
|
||||
$('#content').load('templates/AboutTemplate.html');
|
||||
}␍␍$(document).ready(loadTemplates());
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),i=e[t[0]];return function(e,t,n){i.apply(this,[e,t,n].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function s(e){var t=(e.presets||[]).map(function(e){var t=n(x,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===d(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=h({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return h({},e,{presets:t,plugins:r})}function a(e,t){return v.transform(e,s(t))}function o(e,t,r){return v.transformFromAst(e,t,s(r))}function u(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function l(e){Object.keys(e).forEach(function(t){return u(t,e[t])})}function p(e,t){x.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),x[e]=t}function c(e){Object.keys(e).forEach(function(t){return p(t,e[t])})}function f(){window.removeEventListener("DOMContentLoaded",E)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.availablePresets=t.availablePlugins=void 0;var h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.transform=a,t.transformFromAst=o,t.registerPlugin=u,t.registerPlugins=l,t.registerPreset=p,t.registerPresets=c,t.disableScriptTags=f;var y=r(2492),v=i(y),m=r(2604),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},x=t.availablePresets={};l({"check-es2015-constants":r(692),"external-helpers-2":r(2635),"syntax-async-functions":r(697),"syntax-async-generators":r(2636),"syntax-class-constructor-call":r(1643),"syntax-class-properties":r(1644),"syntax-decorators":r(1064),"syntax-do-expressions":r(1645),"syntax-exponentiation-operator":r(1646),"syntax-export-extensions":r(1647),"syntax-flow":r(698),"syntax-function-bind":r(1648),"syntax-function-sent":r(2637),"syntax-jsx":r(1065),"syntax-object-rest-spread":r(1649),"syntax-trailing-function-commas":r(1066),"transform-async-functions":r(2638),"transform-async-to-generator":r(1067),"transform-async-to-module-method":r(2884),"transform-class-constructor-call":r(1760),"transform-class-properties":r(1800),"transform-decorators":r(1841),"transform-decorators-legacy":r(3353).default,"transform-do-expressions":r(1842),"transform-es2015-arrow-functions":r(768),"transform-es2015-block-scoped-functions":r(769),"transform-es2015-block-scoping":r(774),"transform-es2015-classes":r(777),"transform-es2015-computed-properties":r(780),"transform-es2015-destructuring":r(785),"transform-es2015-duplicate-keys":r(1227),"transform-es2015-for-of":r(790),"transform-es2015-function-name":r(791),"transform-es2015-instanceof":r(4165),"transform-es2015-literals":r(836),"transform-es2015-modules-amd":r(1279),"transform-es2015-modules-commonjs":r(852),"transform-es2015-modules-systemjs":r(2013),"transform-es2015-modules-umd":r(2020),"transform-es2015-object-super":r(858),"transform-es2015-parameters":r(876),"transform-es2015-shorthand-properties":r(878),"transform-es2015-spread":r(893),"transform-es2015-sticky-regex":r(898),"transform-es2015-template-literals":r(913),"transform-es2015-typeof-symbol":r(918),"transform-es2015-unicode-regex":r(924),"transform-es3-member-expression-literals":r(5092),"transform-es3-property-literals":r(5093),"transform-es5-property-mutators":r(5094),"transform-eval":r(5326),"transform-exponentiation-operator":r(1456),"transform-export-extensions":r(2260),"transform-flow-comments":r(5501),"transform-flow-strip-types":r(2261),"transform-function-bind":r(2262),"transform-jscript":r(5502),"transform-object-assign":r(5503),"transform-object-rest-spread":r(2263),"transform-object-set-prototype-of-to-assign":r(5534)Line truncated
|
||||
var h=r(1),d=n(h),y=r(17),v=n(y),m=r(11),g=n(m);t.assertEach=a,t.assertOneOf=o,t.assertNodeType=u,t.assertNodeOrValueType=l,t.assertValueType=p,t.chain=c,t.default=f;var b=r(3),x=i(b),E=t.VISITOR_KEYS={},A=t.ALIAS_KEYS={},S=t.NODE_FIELDS={},_=t.BUILDER_KEYS={},T=t.DEPRECATED_KEYS={},P={}},190,[6514,184,1023,181],[6611,6264],function(e,t){function r(e){for(var t=-1,r=e?e.length:0,i=0,n=[];++t<r;){var s=e[t];s&&(n[i++]=s)}return n}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},[6862,6333],[6446,1,2,1621,259,1051,15,689,2503,2509,2517,2507,2506,2512,2505,2516,2515,2508,2504],[6585,2834,19,377,1073,1655,2686,2703,1074,1075,18,702,377,1073,1655],[6591,19,46,1656,2730,2734,376,1666,1073,18,702,2687,2693,2701,2691,2690,2696,2689,2700,2699,2692,2688],[6669,2842],[6682,2837,1683],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},[6532,1089,1087],[6591,5,12,1707,2976,2980,585,1717,1108,7,720,2933,2939,2947,2937,2936,2942,2935,2946,2945,2938,2934],380,[6532,1121,1119],[6591,5,12,1738,3115,3119,476,1757,1136,7,732,3075,3081,3089,3079,3078,3084,3077,3088,3087,3080,3076],285,[6682,3185,1144],380,[6532,1149,1147],[6585,3181,28,391,1163,1776,3235,3252,1164,1166,29,746,391,1163,1776],[6591,28,67,1777,3266,3270,390,1172,1163,29,746,3236,3242,3250,3240,3239,3245,3238,3249,3248,3241,3237],[6682,3360,1801],380,[6532,1178,1176],[6585,3356,40,396,1192,1817,3410,3427,1193,1195,30,761,396,1192,1817],[6591,40,68,1818,3441,3445,395,1201,1192,30,761,3411,3417,3425,3415,3414,3420,3413,3424,3423,3416,3412],[6446,1,2,1853,487,1209,21,775,3561,3567,3575,3565,3564,3570,3563,3574,3573,3566,3562],[6446,1,2,1860,489,1211,22,778,3604,3610,3618,3608,3607,3613,3606,3617,3616,3609,3605],141,[6803,1896,3849,3853,611,3927,1237,801,3806,3812,3820,3810,3809,3815,3808,3819,3818,3811,3807],380,[6532,1253,1251],[6803,1935,4044,4048,502,4138,1268,818,4004,4010,4018,4008,4007,4013,4006,4017,4016,4009,4005],373,[6682,4172,1967],380,[6532,1285,1283],[6585,4168,41,409,1299,1983,4222,4239,1300,1302,31,845,409,1299,1983],[6591,41,69,1984,4253,4257,408,1308,1299,31,845,4223,4229,4237,4227,4226,4232,4225,4236,4235,4228,4224],[6446,1,2,2008,624,1309,23,853,4342,4348,4356,4346,4345,4351,4344,4355,4354,4347,4343],[6821,4389,1313],[6446,32,70,2015,627,1314,33,856,4395,4401,4409,4399,4398,4404,4397,4408,4407,4400,4396],[6591,34,59,2022,4481,4485,513,2032,1316,24,860,4438,4444,4452,4442,4441,4447,4440,4451,4450,4443,4439],[6682,4589,1327],380,[6532,1332,1330],[6868,2064,635,78,1346,877,4642,4648,4656,4646,4645,4651,4644,4655,4654,4647,4643],[6682,4666,4664],380,[6532,1352,1350],[6591,42,71,2083,4767,4771,519,2102,1367,35,887,4727,4733,4741,4731,4730,4736,4729,4740,4739,4732,4728],285,[6682,4872,4870],380,[6532,1386,1384],[6591,43,72,2131,4973,4977,525,2150,1401,25,907,4933,4939,4947,4937,4936,4942,4935,4946,4945,4938,4934],285,183,[6591,4,14,2174,5156,5160,648,937,1424,8,927,5113,5119,5127,5117,5116,5122,5115,5126,5125,5118,5114],[6591,4,14,2180,5216,5220,535,937,1427,8,930,5176,5182,5190,5180,5179,5185,5178,5189,5188,5181,5177],380,[6532,1442,1440],[6591,44,73,2223,5381,5385,540,2242,1458,26,944,5341,5347,5355,5345,5344,5350,5343,5354,5353,5346,5342],285,[6682,5452,5450],380,[6532,1470,1468],[6591,45,74,2295,5669,5673,550,2313,1506,36,970,5629,5635,5643,5633,5632,5638,5631,5642,5641,5634,5630],285,[6682,5740,5738],380,[6532,1519,1517],[6591,38,75,2334,5844,5848,554,2352,1534,37,984,5804,5810,5818,5808,5807,5813,5806,5817,5816,5809,5805],285,[6682,5915,5913],380,[6532,1547,1545],function(e,t,r){e.exports={default:r(2428),__esModule:!0}},[6864,450,1562,2380,5990,6007,1566,1e3,450,1562,2380],[6868,2381,449,6081,1562,1e3,5991,5997,6005,5995,5994,6e3,5993,6004,6003,5996,5992],103,373,380,[6532,1585,1019],[6613,6292],function(e,t,r){"use strict";var i=function(e,t,r,i,n,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,i,n,s,a,o],p=0;u=new Error(t.replace(/%s/g,function(){return l[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=i},function(e,t,r){var i=r(2457),n=r(6305),s=r(6390),a=r(1607),o=a(function(e){return e.push(void 0,n),i(s,void 0,e)});e.exports=o},[6793,1605,2473],[6816,6329,1612,571,684],function(e,t){"use strict";function r(e){return 10===e||13===e||8232===e||8233===e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNewLine=r;var i=t.lineBreak=/\r\n?|\n|\u2028|\u2029/;t.lineBreakG=new RegExp(i.source,"g"),t.nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/},183,[6536,1641,1642,461],460,[6575,1654,578,1069],83,460,83,285,[6525,1695,1088],460,[6575,1705,584,1104],83,460,83,[6525,1730,1120],[6585,1718,5,385,1136,1737,3074,3091,1137,1138,7,732,385,1136,1737],460,[6580,736,1140,85,3166],[6525,1770,1148],460,[6580,749,1169,86,3339],[6525,1811,1177],460,[6580,764,1198,87,3514],183,[6536,1850,1851,485],[6440,1,397,1209,18Line truncated
|
||||
(0,u.default)(this,t);var n=(0,p.default)(this,e.call(this));return n.initialized=!1,n.raw=(0,A.default)({},r),n.key=n.take("name")||i,n.manipulateOptions=n.take("manipulateOptions"),n.post=n.take("post"),n.pre=n.take("pre"),n.visitor=n.normaliseVisitor((0,_.default)(n.take("visitor"))||{}),n}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var s=r,o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var p=l;if(p){var c=p.apply(this,i);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=x.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(v.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=T,r=Array.isArray(t),i=0,t=r?t:(0,a.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return x.default.explode(e),e},t}(g.default);t.default=P,e.exports=t.default},[6437,558],[6490,2,460],[6491,1628,559,3],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2605),s=i(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var i in r.bindings){var n=r.bindings[i];if("const"===n.kind||"module"===n.kind)for(var a=n.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l;throw p.buildCodeFrameError(t.get("readOnly",i))}}}}}},e.exports=t.default},[6507,1059],[6511,1637],190,581,function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},[6552,46,107,463],[6490,46,463],function(e,t){function r(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?n:t,e>-1&&e%1==0&&e<t}var i=/^\d+$/,n=9007199254740991;e.exports=r},[6582,2838],[6552,46,109,466],[6490,46,466],265,[6575,1664,580,705],[6580,1664,1076,467,2754],[6565,2823],[6580,708,1081,83,2819],[6667,2840],[6510,2852],[6706,716,191,190,272,380],function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},[6527,272,190,110],function(e,t){var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},[6552,12,112,470],[6490,12,470],701,[6582,1720],[6552,12,114,473],[6490,12,473],265,[6575,1715,587,723],[6580,1715,1111,474,3e3],[6510,3031],[6706,731,195,194,276,383],713,714,[6527,276,194,116],716,[6582,1720],[6552,12,118,477],[6490,12,477],[6561,1759],[6565,3169],[6568,1140,1141,85],[6667,3190],[6679,3180],[6510,3202],[6706,745,200,199,283,388],713,714,[6527,283,199,119],716,[6582,3186],[6552,67,121,480],[6490,67,480],[6565,3343],701,[6568,1169,750,86],[6574,1169,286],[6667,3365],[6679,3355],[6510,3377],[6706,760,204,203,291,393],713,714,[6527,291,203,123],716,[6582,3361],[6552,68,125,483],[6490,68,483],[6565,3518],701,[6568,1198,765,87],[6574,1198,294],function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var i=e.node;if(i.shadow)return;i.shadow={this:!1},i.type="FunctionExpression";var n=t.thisExpression();n._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),n]))),e.replaceWith(t.callExpression(t.memberExpression(i,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(3528),s=i(n);t.default=function(e){function t(e,t){for(var i=t.get(e),n=i,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u,p=l.node;if(l.isFunctionDeclaration()){var c=r.variableDeclaration("let",[r.variableDeclarator(p.id,r.toExpression(p))]);c._blockHoist=2,p.id=null,l.replaceWith(c)}}}var r=e.types;return{visitoLine truncated
|
||||
p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;r=A(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name,i=this.exports[r];if(i&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=m.assignmentExpression(e.node.operator[0]+"=",t.node,m.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var s=[];s.push(n);var a=void 0;a="--"===e.node.operator?"+":"-",s.push(m.binaryExpression(a,t.node,m.numericLiteral(1)));for(var o=e.replaceWithMultiple(m.sequenceExpression(s)),u=o,l=Array.isArray(u),c=0,u=l?u:(0,p.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var h=f;this.requeueInParent(h)}}}}};return{inherits:r(2373),visitor:{ThisExpression:function(e,t){this.ranCommonJS||t.opts.allowTopLevelThis===!0||e.findParent(function(e){return!e.is("shadow")&&_.indexOf(e.type)>=0})||e.replaceWith(m.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var i=T[t];if(i)return i;var n=e.scope.generateUidIdentifier((0,h.basename)(t,(0,h.extname)(t))),s=m.variableDeclaration("var",[m.variableDeclarator(n,g(m.stringLiteral(t)).expression)]);return f[t]&&(s.loc=f[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),T[t]=n}function i(e,t,r){var i=e[t]||[];e[t]=i.concat(r)}this.ranCommonJS=!0;var n=!!this.opts.strict,s=e.scope;s.rename("module"),s.rename("exports"),s.rename("require");for(var o=!1,l=!1,c=e.get("body"),f=(0,u.default)(null),d=(0,u.default)(null),y=(0,u.default)(null),v=[],_=(0,u.default)(null),T=(0,u.default)(null),P=!1,w=c,k=Array.isArray(w),C=0,w=k?w:(0,p.default)(w);;){var D;if(k){if(C>=w.length)break;D=w[C++]}else{if(C=w.next(),C.done)break;D=C.value}var O=D;if(O.isExportDeclaration()){o=!0;for(var N=[].concat(O.get("declaration"),O.get("specifiers")),I=N,F=Array.isArray(I),B=0,I=F?I:(0,p.default)(I);;){var R;if(F){if(B>=I.length)break;R=I[B++]}else{if(B=I.next(),B.done)break;R=B.value}var L=R,M=L.getBindingIdentifiers();if(M.__esModule)throw L.buildCodeFrameError('Illegal export "__esModule"')}}if(O.isImportDeclaration()){var j;l=!0;var V=O.node.source.value,U=f[V]||{specifiers:[],maxBlockHoist:0,loc:O.node.loc};(j=U.specifiers).push.apply(j,O.node.specifiers),"number"==typeof O.node._blockHoist&&(U.maxBlockHoist=Math.max(O.node._blockHoist,U.maxBlockHoist)),f[V]=U,O.remove()}else if(O.isExportDefaultDeclaration()){if(P)throw O.buildCodeFrameError("Only one default export allowed per module.");var Y=O.get("declaration");if(Y.isFunctionDeclaration()){var K=Y.node.id,W=m.identifier("default");K?(i(d,K.name,W),v.push(A(W,K)),O.replaceWith(Y.node)):(v.push(A(W,m.toExpression(Y.node))),O.remove())}else if(Y.isClassDeclaration()){var G=Y.node.id,q=m.identifier("default");G?(i(d,G.name,q),O.replaceWithMultiple([Y.node,A(q,G)])):O.replaceWith(A(q,m.toExpression(Y.node)))}else O.replaceWith(A(m.identifier("default"),Y.node)),O.parentPath.requeue(O.get("expression.left"));P=!0}else if(O.isExportNamedDeclaration()){var H=O.get("declaration");if(H.node){if(H.isFunctionDeclaration()){var X=H.node.id;i(d,X.name,X),v.push(A(X,X)),O.replaceWith(H.node)}else if(H.isClassDeclaration()){var J=H.node.id;i(d,J.name,J),O.replaceWithMultiple([H.node,A(J,J)]),y[J.name]=!0}else if(H.isVariableDeclaration()){for(var $=H.get("declarations"),z=$,Q=Array.isArray(z),Z=0,z=Q?z:(0,p.default)(z);;){var ee;if(Q){if(Z>=z.length)break;ee=z[Z++]}else{if(Z=z.next(),Z.done)break;ee=Z.value}var te=ee,re=te.get("id"),ie=te.get("init");ie.node||ie.replaceWith(m.identifier("undefined")),re.isIdentifier()&&(i(d,re.node.name,re.node),ie.replaceWith(A(re.node,ie.node).expression),y[re.node.name]=!0)}O.replaceWith(H.node)}continue}var ne=O.get("specifiers"),se=[],ae=O.node.source;if(ae)for(var oe=r(ae.value,O.node._blockHoist),ue=ne,le=Array.isArray(ue),pe=0,ue=le?ue:(0,p.default)(ue);;){var ce;if(le){if(pe>=ue.length)break;ce=ue[pe++]}else{if(pe=ue.next(),pe.done)break;ce=pe.value}var fe=ce;fe.isExportNamespaceSpecifier()||fe.isExportDefaultSpecifier()||fe.isExportSpecifier()&&("default"===fe.node.local.name?v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(m.callExpression(this.addHelper("interopRequireDefault"),[oe]),fe.node.local))):v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(oe,fe.node.local))),y[fe.node.exported.name]=!0)}else for(var he=ne,de=Array.isArray(he),ye=0,he=de?he:(0,p.default)(he);;){var ve;if(de){if(ye>=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var me=ve;me.isExportSpecifier()&&(i(d,me.node.local.name,me.node.exported),y[me.node.exported.name]=!0,se.push(A(me.node.exported,me.node.local)))}O.replaceWithMultiple(se)}else if(O.isExportAllDeclaration()){var ge=S({OBJECT:r(O.node.source.value,O.node._blockHoist)});ge.loc=O.node.loc,v.push(ge),Line truncated
|
||||
if(null!=r){var i=l.default[t];if(i&&i.alias&&(i=l.default[i.alias]),i){var n=o[i.type];n&&(r=n(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=s;var a=r(1048),o=n(a),u=r(572),l=i(u);t.config=l.default},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return!!e}function a(e){return c.booleanify(e)}function o(e){return c.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=s,t.booleanString=a,t.list=o;var u=r(2486),l=n(u),p=r(1050),c=i(p);t.filename=l.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){var r=t||n.EXTENSIONS,i=C.default.extname(e);return(0,S.default)(r,i)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(y.default).join("|"),"i")),"string"==typeof e){e=(0,O.default)(e),((0,m.default)(e,"./")||(0,m.default)(e,"*/"))&&(e=e.slice(2)),(0,m.default)(e,"**/")&&(e=e.slice(3));var t=E.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,w.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?(0,b.default)(e)?o([e],t):(0,T.default)(e)?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];if(e=(0,O.default)(e),r){for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,f.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(p(o,e))return!1}return!0}if(t.length)for(var u=t,l=Array.isArray(u),c=0,u=l?u:(0,f.default)(u);;){var h;if(l){if(c>=u.length)break;h=u[c++]}else{if(c=u.next(),c.done)break;h=c.value}var d=h;if(p(d,e))return!0}return!1}function p(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var c=r(1),f=i(c),h=r(48);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return h.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return h.inspect}}),t.canCompile=n,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var d=r(6392),y=i(d),v=r(6409),m=i(v),g=r(2482),b=i(g),x=r(6416),E=i(x),A=r(50),S=i(A),_=r(82),T=i(_),P=r(255),w=i(P),k=r(187),C=i(k),D=r(2486),O=i(D);n.EXTENSIONS=[".js",".jsx",".es6",".es"]},[6457,39,16,2,1,2518,259,1622,15,689],[6460,367],[6475,104,2538,2537,2535,2533,2536,2534,2532,105,1624,574,2539,2540],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function a(e){this.token("..."),this.print(e.argument,e)}function o(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function u(e){this.printJoin(e.decorators,e),this._method(e)}function l(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(b.isAssignmentPattern(eLine truncated
|
||||
t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},[6543,1683,2679,2682,2683,376,2642,18],[6553,268,46,577,107,699,700,463,2654],[6556,2661,1072],[6561,2685],[6565,2681],[6584,46],[6597,18],[6601,46],function(e,t){!function(){"use strict";function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function i(e){return e>=48&&e<=55}function n(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&h.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return e<128?d[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?y[e]:f.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:c.NonAsciiIdentifierStart.test(a(e))}function p(e){return e<128?y[e]:c.NonAsciiIdentifierPart.test(a(e))}var c,f,h,d,y,v;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\Line truncated
|
||||
var K;if(U){if(Y>=V.length)break;K=V[Y++]}else{if(Y=V.next(),Y.done)break;K=Y.value}var W=K;W.remove()}y.length&&(e.isClassExpression()?(e.scope.push({id:v}),e.replaceWith(t.assignmentExpression("=",v,e.node))):(e.node.id||(e.node.id=v),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(y))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){var r=t.get("body"),i=r.get("body");i.some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(691),o=i(a);e.exports=t.default},[6675,3374],1580,[6512,204,202],[6701,755,3388,3387,201,1186,1814],[6516,288,393,1803],[6703,1175],[6519,1179,289,1182,290,203,599,3389,759,1810,123],[6708,757,758,394,1187,203,1805,288],[6710,1811,1177],[6523,203,600,1183],[6524,203,394,3379,1183],[6711,289,56,393],[6712,290],[6537,3382,123,599,56],685,[6540,3396,1807],[6584,68],[6597,30],[6601,68],1658,[6636,598,30],1658,[6475,124,3471,3470,3468,3466,3469,3467,3465,125,1824,762,3472,3473],[6553,754,68,601,125,762,763,483,3475],1784,1660,1669,[6556,3486,484],[6557,3481,1827,1828,1831,3511,3512,3513,126,87],[6558,3502],[6559,1830,484],[6615,3510],[6645,3489,87,294],1674,1794,[6660,87],[6617,1829,602,766],[6618,294],[6581,767,126,765,293,87],1681,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(16),s=i(n),a=r(1),o=i(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function i(e,r,i){var n=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var h;if(p){if(c>=l.length)break;h=l[c++]}else{if(c=l.next(),c.done)break;h=c.value}var d=h;n.push(f({CLASS_REF:r,DECORATOR:d}))}}for(var y=(0,s.default)(null),v=e.get("body.body"),m=Array.isArray(v),g=0,v=m?v:(0,o.default)(v);;){var b;if(m){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var x=b,E=x.node.decorators;if(E){var A=u.toKeyAlias(x.node);y[A]=y[A]||[],y[A].push(x.node),x.remove()}}for(var S in y)var _=y[S];return n}function n(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(s.decorators)return!0}}else if(e.isObjectExpression())for(var a=e.node.properties,u=Array.isArray(a),l=0,a=u?a:(0,o.default)(a);;){var p;if(u){if(l>=a.length)break;p=a[l++]}else{if(l=a.next(),l.done)break;p=l.value}var c=p;if(c.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(1064),visitor:{ClassExpression:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(i(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.node.id,r=[];r=r.concat(i(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){n(e)&&a(e)}}}};var u=r(559),l=i(u),p=r(2572),c=i(p),f=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(1645),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},1086,[6512,1204,485],1088,380,[6519,3541,3535,3547,603,772,773,3539,1849,3544,486],714,[6527,1205,772,486],[6529,485],716,[6439,2],[6452,21],[6456,2],[6473,16,21],[6475,127,3596,3595,3593,3591,3594,3592,3590,128,1857,604,3597,3598],[6487,47,2,605,128,604,776,488,3600],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(1),a=n(s),o=r(2),u=n(o),l=r(489),p=r(2591),c=n(p),f=r(1630),h=n(f),d=r(2571),y=i(d),v=r(3602),m=n(v),g=r(22),b=i(g),x=(0,m.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:fuLine truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,n){var s=e.specifiers[0];if(i.isExportNamespaceSpecifier(s)||i.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=n.generateUidIdentifier(a.exported.name),u=void 0;u=i.isExportNamespaceSpecifier(a)?i.importNamespaceSpecifier(o):i.importDefaultSpecifier(o),r.push(i.importDeclaration([u],e.source)),r.push(i.exportNamedDeclaration(null,[i.exportSpecifier(o,a.exported)])),t(e,r,n)}}var i=e.types;return{inherits:r(1647),visitor:{ExportNamedDeclaration:function(e){var r=e.node,i=e.scope,n=[];t(r,n,i),n.length&&(r.specifiers.length>=1&&n.push(r),e.replaceWithMultiple(n))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(1),s=i(n);t.default=function(e){var t=e.types,i="@flow";return{inherits:r(698),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,n=r,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u;l.value.indexOf(i)>=0&&(l.value=l.value.replace(i,""),l.value.replace(/\*/g,"").trim()||(l.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){var i=t.params[r];i.optional=!1}},TypeCastExpression:function(e){var r=e.node;do r=r.expression;while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function i(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function n(e,r){var n=i(e,r);if(n)return n;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(1648),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,i=t.callee;if(s.isBindExpression(i)){var a=n(i,r);t.callee=s.memberExpression(i.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){var t=e.node,r=e.scope,i=n(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[i]))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5504),s=i(n);t.default=function(e){function t(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var a;if(r){if(n>=t.length)break;a=t[n++]}else{if(n=t.next(),n.done)break;a=n.value}var o=a;if(i.isSpreadProperty(o))return!0}return!1}var i=e.types;return{inherits:r(1649),visitor:{ObjectExpression:function(e,r){function n(){o.length&&(a.push(i.objectExpression(o)),o=[])}if(t(e.node)){for(var a=[],o=[],u=e.node.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;i.isSpreadProperty(f)?(n(),a.push(f.argument)):o.push(f)}n(),i.isObjectExpression(a[0])||a.unshift(i.objectExpression([])),e.replaceWith(i.callExpression(r.addHelper("extends"),a))}}}}},e.exports=t.default},1086,[6512,1486,544],1088,380,[6519,5517,5511,5523,660,960,961,5515,2270,5520,545],714,[6527,1487,960,545],[6529,544],716,1086,[6512,1493,546],1088,380,[6519,5549,5543,5555,661,964,965,5547,2279,5552,547],714,[6527,1494,964,547],[6529,546],716,103,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,n=!0,s=0;s<r.length;s++){var a=r[s],o=i.toComputedKey(a);if(i.isLiteral(o,{value:"displayName"})){n=!1;break}}n&&r.unshift(i.objectProperty(i.identifier("displayName"),i.stringLiteral(e)))}function r(e){if(!e||!i.isCallExpression(e))return!1;if(!n(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!i.isObjectExpression(r)}var i=e.types,n=i.buildMatchMemberExpression("React.createClass");return{visitor:{ExportDefaultDeclaration:function(e,i){var n=e.node;if(r(n.declaration)){var a=i.file.opts.basename;"index"===a&&(a=s.default.basename(s.default.dirname(i.file.opts.filename))),t(a,n.declaration)}},CallExpression:function(e){var n=e.node;if(r(n)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(i.isMemberExpression(s)&&(s=s.property),i.isIdentifier(s)&&t(s.name,n))}}}}};var n=r(187),s=i(n);e.exports=t.default},1086,[6512,1500,548],1088,380,[6519,5598,5592,5604,662,968,969,5596,2290,5601,549],714,[6527,1501,968,54Line truncated
|
||||
if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(r,"Invalid regular expression flag")}return this.finishToken(p.types.regexp,{pattern:n,flags:s})}},{key:"readInt",value:function(e,t){for(var r=this.state.pos,i=0,n=0,s=null==t?1/0:t;n<s;++n){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0,o>=e)break;++this.state.pos,i=i*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:i}},{key:"readRadixNumber",value:function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(p.types.num,t)}},{key:"readNumber",value:function(e){var t=this.state.pos,r=!1,i=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.state.pos);46===n&&(++this.state.pos,this.readInt(10),r=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||(n=this.input.charCodeAt(++this.state.pos),43!==n&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var s=this.input.slice(t,this.state.pos),a=void 0;return r?a=parseFloat(s):i&&1!==s.length?/[89]/.test(s)||this.state.strict?this.raise(t,"Invalid number"):a=parseInt(s,8):a=parseInt(s,10),this.finishToken(p.types.num,a)}},{key:"readCodePoint",value:function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t}},{key:"readString",value:function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):((0,h.isNewLine)(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(p.types.string,t)}},{key:"readTmplToken",value:function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(p.types.template)?36===r?(this.state.pos+=2,this.finishToken(p.types.dollarBraceL)):(++this.state.pos,this.finishToken(p.types.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(p.types.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if((0,h.isNewLine)(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return n(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),i>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(i)}return String.fromCharCode(t)}}},{key:"readHexChar",value:function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r}},{key:"readWord1",value:function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if((0,l.isIdentifierChar)(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var s=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint();(t?l.isIdentifierStart:l.isIdentifierChar)(a,!0)||this.raise(s,"Invalid Unicode escape"),e+=n(a),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)}},{keyLine truncated
|
||||
},E="0000",A=function(e,t){var r=String(e);return r.length<t?(E+r).slice(-t):r},S=function(e){return Number(e).toString(16).toUpperCase()},_=[].slice,T=function(e){for(var t,r=-1,i=e.length,n=i-1,s=[],a=!0,o=0;++r<i;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=n){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},P=function(e,t){for(var r,i,n=0,s=e.length;n<s;){if(r=e[n],i=e[n+1],t>=r&&t<i)return t==r?i==r+1?(e.splice(n,2),e):(e[n]=t+1,e):t==i-1?(e[n+1]=t,e):(e.splice(n,2,r,t,t+1,i),e);n+=2}return e},w=function(e,t,r){if(r<t)throw Error(u.rangeOrder);for(var i,n,s=0;s<e.length;){if(i=e[s],n=e[s+1]-1,i>r)return e;if(t<=i&&r>=n)e.splice(s,2);else{if(t>=i&&r<n)return t==i?(e[s]=r+1,e[s+1]=n+1,e):(e.splice(s,2,i,t,r+1,n+1),e);if(t>=i&&t<=n)e[s+1]=t;else if(r>=i&&r<=n)return e[s]=r+1,e;s+=2}}return e},k=function(e,t){var r,i,n=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(u.codePointRange);for(;n<a;){if(r=e[n],i=e[n+1],t>=r&&t<i)return e;if(t==r-1)return e[n]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==i)return t+1==e[n+2]?(e.splice(n,4,r,e[n+3]),e):(e[n+1]=t+1,e);s=n,n+=2}return e.push(t,t+1),e},C=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?k(s,r):O(s,r,i),n+=2;return s},D=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?P(s,r):w(s,r,i),n+=2;return s},O=function(e,t,r){if(r<t)throw Error(u.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(u.codePointRange);for(var i,n,s=0,a=!1,o=e.length;s<o;){if(i=e[s],n=e[s+1],a){if(i==r+1)return e.splice(s-1,2),e;if(i>r)return e;i>=t&&i<=r&&(n>t&&n-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(i==r+1)return e[s]=t,e;if(i>r)return e.splice(s,0,t,r+1),e;if(t>=i&&t<n&&r+1<=n)return e;t>=i&&t<n||n==t?(e[s+1]=r+1,a=!0):t<=i&&r+1>=n&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},N=function(e,t){var r=0,i=e.length,n=e[r],s=e[i-1];if(i>=2&&(t<n||t>s))return!1;for(;r<i;){if(n=e[r],s=e[r+1],t>=n&&t<s)return!0;r+=2}return!1},I=function(e,t){for(var r,i=0,n=t.length,s=[];i<n;)r=t[i],N(e,r)&&s.push(r),++i;return T(s)},F=function(e){return!e.length},B=function(e){return 2==e.length&&e[0]+1==e[1]},R=function(e){for(var t,r,i=0,n=[],s=e.length;i<s;){for(t=e[i],r=e[i+1];t<r;)n.push(t),++t;i+=2}return n},L=Math.floor,M=function(e){return parseInt(L((e-65536)/1024)+l,10)},j=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+V(e):e>=32&&e<=126?V(e):e<=255?"\\x"+A(S(e),2):"\\u"+A(S(e),4)},Y=function(e){return e<=65535?U(e):"\\u{"+e.toString(16).toUpperCase()+"}"},K=function(e){var t,r=e.length,i=e.charCodeAt(0);return i>=l&&i<=p&&r>1?(t=e.charCodeAt(1),1024*(i-l)+t-c+65536):i},W=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return U(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?U(t):t+1==r?U(t)+U(r):U(t)+"-"+U(r),n+=2;return"["+i+"]"},G=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return Y(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?Y(t):t+1==r?Y(t)+Y(r):Y(t)+"-"+Y(r),n+=2;return"["+i+"]"},q=function(e){for(var t,r,i=[],n=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<l?(r<l&&s.push(t,r+1),r>=l&&r<=p&&(s.push(t,l),i.push(l,r+1)),r>=c&&r<=f&&(s.push(t,l),i.push(l,p+1),n.push(c,r+1)),r>f&&(s.push(t,l),i.push(l,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=l&&t<=p?(r>=l&&r<=p&&i.push(t,r+1),r>=c&&r<=f&&(i.push(t,p+1),n.push(c,r+1)),r>f&&(i.push(t,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=c&&t<=f?(r>=c&&r<=f&&n.push(t,r+1),r>f&&(n.push(t,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>f&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:i,loneLowSurrogates:n,bmp:s,astral:a}},H=function(e){for(var t,r,i,n,s,a,o=[],u=[],l=!1,p=-1,c=e.length;++p<c;)if(t=e[p],r=e[p+1]){for(i=t[0],n=t[1],s=r[0],a=r[1],u=n;s&&i[0]==s[0]&&i[1]==s[1];)u=B(a)?k(u,a[0]):O(u,a[0],a[1]-1),++p,t=e[p],i=t[0],n=t[1],r=e[p+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([i,l?u:n]),l=!1}else o.push(t);return X(o)},X=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var i=e[t],n=i[1],s=n[0],a=n[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],p=u[1];s==l&&a==p&&(B(o[0])?i[0]=k(i[0],o[0][0]):i[0]=O(i[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},J=function(e){if(!e.length)return[];for(var t,r,i,n,s,a,o=0,u=0,l=0,p=[],h=e.length;o<h;){t=e[o],r=e[o+1]-1,i=M(t),n=j(t),s=M(r),a=j(r);var d=n==c,y=a==f,v=!1;i==s||d&&y?(p.push([[i,s+1],[n,a+1]]),v=!0):p.push([[i,i+1],[n,f+1]]),!v&&i+1<s&&(y?(p.push([[i+1,s+1],[c,a+1]]),v=!0):p.push([[i+1,s],[c,f+1]])),v||p.push([[s,s+1],[c,a+1]]),u=i,l=s,o+=2}return H(p)},$=function(e){var t=[];return m(e,function(e){var r=e[0],i=e[1];t.push(W(r)+W(i))}),t.join("|")},z=fuLine truncated
|
||||
t.Noop=a,t.Directive=o;var u=r(1054);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function n(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=i,t.ClassProperty=n,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function a(e){this.word("do"),this.space(),this.print(e.body,e)}function o(e){this.token("("),this.print(e.expression,e),this.token(")")}function u(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function l(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function p(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||k.isCallExpression(t,{callee:e})||k.isMemberExpression(t)||k.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function f(){this.word("this")}function h(){this.word("super")}function d(e){this.token("@"),this.print(e.expression,e),this.newline()}function y(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function v(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=y,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function m(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function g(){this.semicolon(!0)}function b(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!D.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function S(e){if(this.print(e.object,e),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;k.isLiteral(e.property)&&(0,P.default)(e.property.value)&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function _(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=s,t.DoExpression=a,t.ParenthesizedExpression=o,t.UpdateExpression=u,t.ConditionalExpression=l,t.NewExpression=p,t.SequenceExpression=c,t.ThisExpression=f,t.Super=h,t.Decorator=d,t.CallExpression=v,t.EmptyStatement=g,t.ExpressionStatement=b,t.AssignmentPattern=x,t.AssignmentExpression=E,t.BindExpression=A,t.MemberExpression=S,t.MetaProperty=_;var T=r(253),P=n(T),w=r(51),k=i(w),C=r(1626),D=i(C);t.YieldExpression=m("yield"),t.AwaitExpression=m("await");t.BinaryExpression=E,t.LogicalExpression=E},function(e,t,r){"use strict";function i(){this.word("any")}function n(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("bool")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("Line truncated
|
||||
if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,m.default)(a,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,i.addNewlines&&(s+=i.addNewlines(e,t)||0);var p=w.needsWhitespaceAfter;e&&(p=w.needsWhitespaceBefore),p(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var i=e.loc&&e.loc.start.column;if(i){var n=new RegExp("\\n\\s{1,"+i+"}","g");r=r.replace(n,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,l.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;this._printComment(s)}},e}();t.default=B;for(var R=[r(2552),r(2546),r(2551),r(2545),r(2549),r(2550),r(1054),r(2547),r(2544),r(2548)],L=0;L<R.length;L++){var M=R[L];(0,o.default)(B.prototype,M)}e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(39),s=i(n),a=r(11),o=i(a),u=r(2),l=i(u),p=r(2490),c=i(p),f=function(){function e(t,r){var i=this;(0,l.default)(this,e),this._opts=t,this._map=new c.default.SourceMapGenerator({file:t.sourceMapTarget,sourceRoot:t.sourceRoot}),"string"==typeof r?this._map.setSourceContent(t.sourceFileName,r):"object"===("undefined"==typeof r?"undefined":(0,o.default)(r))&&(0,s.default)(r).forEach(function(e){i._map.setSourceContent(e,r[e])})}return e.prototype.get=function(){return this._map.toJSON()},e.prototype.mark=function(e,t,r,i,n,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===i||(this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=i,this._map.addMapping({name:n,generated:{line:e,column:t},source:null==r?null:s||this._opts.sourceFileName,original:null==r?null:{line:r,column:i}}))},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2),s=i(n),a=function(){function e(t){(0,s.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.start-e.start},0,i.length);if(n>=0){for(;n&&e.start===i[n-1].start;)--n;t=i[n-1],r=i[n]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.end-e.end},0,i.length);if(n>=0){for(;n&&e.end===i[n-1].end;)--n;t=i[n],r=i[n+1],","===r.type.label&&(r=i[n+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,i=t.loc.start.line,n=0,s=r;s<i;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,n++);return n},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var i=t+r>>>1,n=e(this.tokens[i]);return n<0?this._findToken(e,i+1,r):n>0?this._findToken(e,t,i):0===n?i:-1},e}();t.default=a,e.exports=t.default},[6461,366,17,1,51],[6462,51,1055,261],[6463,261],[6464,261],[6465,261],[6467,261,2559,2560,2562,2564,2565,2561],[6468,261],[6469,261],[6470,51],[6472,51],[6474,1,1627,51,1055],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=s.node,u=a.expression;if(l.isMemberExpression(u)){var p=s.scope.maybeGenerateMemoised(u.object),c=void 0,f=[];p?(c=p,f.push(l.assignmentExpression("=",p,u.object))):c=u.object,f.push(l.callExpression(l.memberExpression(l.memberExpression(c,u.property,u.computLine truncated
|
||||
t.addComments=n},[6587,19,376],[6588,18],[6589,379,19],[6590,19,377,18],[6592,19,2695,18],[6593,19,18],[6594,2694,18],[6595,379,19,1075,18],[6596,46,19,18],function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("body"===e.key&&t.isArrowFunctionExpression())return e.replaceWith(e.scope.buildUndefinedNode()),!0},function(e,t){var r=!1;if(r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0}]},[6598,379,19,702,2697,377,18],[6599,19,2698],[6600,19,2704,376,377,2717,18],[6603,46,1657,18],[6604,379,1084,19,1656,1074,18,2756],[6605,2716,2715,2705],[6606,2707,2706,2710,2708,2712],2491,function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},[6607,2709],1615,[6608,2711],1615,function(e,t,r){(function(t){"use strict";var r=t.argv,i=r.indexOf("--"),n=function(e){e="--"+e;var t=r.indexOf(e);return t!==-1&&(i===-1||t<i)};e.exports=function(){return"FORCE_COLOR"in t.env||!(n("no-color")||n("no-colors")||n("color=false"))&&(!!(n("color")||n("colors")||n("color=true")||n("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(10))},function(e,t){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function i(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){return i(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:i,isIterationStatement:r,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:s}}()},[6609,1658],[6610,2713,1658,2714],function(e,t){e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},[6475,108,2725,2724,2722,2720,2723,2721,2719,109,1659,703,2726,2727],2531,[6544,108],[6545,378,19,109,108,579],[6479,704,108],[6546,19,109,108,579],[6547,46,268,108,704],[6548,19,378,109,108,466],[6549,109,108,466],[6550,109,108],[6551,2728,109,703,108,579,466],2541,[6554,46,268,704,703,109],[6611,2731],[6612,2732],function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms"Line truncated
|
||||
function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){function r(e,t){return e.add(t),e}e.exports=r},1902,1602,2458,[6741,1230,800],[6742,3725,3731,1228,3733,3744,3751,3752,3755,3757,3766,3767,3768,399,3796,1891,497,800],[6743,497],[6744,3732,399],[6746,1234,1891,3772,497,1892],function(e,t){function r(e){return i(Object(e))}var i=Object.keys;e.exports=r},1951,function(e,t){function r(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}e.exports=r},[6747,1886,799],[6748,399,3790],function(e,t){function r(e){return e&&e.Object===Object?e:null}e.exports=r},function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},[6750,1229],[6751,3728,1887,3783],function(e,t){function r(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;e.exports=r},[6752,3729,1887,3784],[6753,1886],[6754,1229],2467,[6756,1230,1890],[6757,205],[6758,3769,3798],[6759,3736,1890,800],[6760,3739],[6764,3721,1884,3723,3724,3727,1892],function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},[6765,3742,1893,399,1231,3770,1235,1894,3791],[6766,797],function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},[6767,797],[6768,797],[6769,797],[6770,3740,1893,399,1235,1894],function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,n=i.hasOwnProperty;e.exports=r},[6771,1229,3745,3746,3747,3748,3749,3750],[6772,3735,1889,1232],[6773,1233,798,1231,497],[6774,399,799],function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},[6775,3753],function(e,t){function r(){this.__data__=[]}e.exports=r},[6776,795],[6777,795],[6778,795],[6779,795],[6780,3722,794,1884],[6781,796],[6782,796],[6783,796],[6784,796],1960,830,[6787,794],function(e,t){function r(e){return this.__data__.delete(e)}e.exports=r},function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},[6788,794,1885],[6789,3797,3804],[6790,799],[6791,1228,1230,3754,798,1232,800],[6792,3734],[6793,1888,3759],[6796,798,1236],[6797,205,3800],[6800,1885],[6500,3730,3802],function(e,t){function r(){return[]}e.exports=r},function(e,t){function r(){return!1}e.exports=r},[6501,3803],[6502,3801],[6503,1234,497,799],[6801,3741],[6583,6,13,400,9],[6586,6,9,400],2688,[6587,6,611],[6588,9],[6589,88,6],[6590,6,400,9],[6592,6,3814,9],[6593,6,9],[6594,3813,9],[6804,1242],[6596,13,6,9],2698,[6598,88,6,801,3816,400,9],[6599,6,3817],[6600,6,3823,611,400,3836,9],[6603,13,1897,9],[6806,1896,1238,3929],[6605,3835,3834,3824],[6606,3826,3825,3829,3827,3831],2491,2707,[6607,3828],1615,[6608,3830],1615,2712,2713,[6609,1898],[6610,3832,1898,3833],2716,[6475,133,3844,3843,3841,3839,3842,3840,3838,134,1899,802,3845,3846],2531,[6544,133],[6545,136,6,134,133,612],[6479,803,133],[6546,6,134,133,612],[6547,13,80,133,803],[6548,6,136,134,133,498],[6549,134,133,498],[6727,134,133],[6551,3847,134,802,133,612,498],2541,[6554,13,80,803,802,134],[6611,3850],[6612,3851],2732,[6613,6281],456,[6728,499,135],[6729,3898,3899,3900,3901,3902],[6732,3915,3916,3917,3918,3919],[6733,499,135],[6807,135],[6734,499,135],[6735,804,3922,3923,3924,3925,3926],[6737,135],[6738,499,135],3728,3729,1602,1603,2458,[6808,810],[6741,806,614],[6742,3860,3865,1239,3869,3884,3891,3892,3894,3896,3904,3905,3906,811,3933,1908,500,614],[6743,500],[6744,3867,811],[6745,1905],[6494,3903],[6746,1243,1908,3908,500,1910],3738,[6809,3858,3909],1951,function(e,t){function r(e,t){var r="";if(!e||t<1||t>i)return r;do t%2&&(r+=e),t=n(t/2),t&&(e+=e);while(t);return r}var i=9007199254740991,n=Math.floor;e.exports=r},3740,[6747,1901,1913],[6810,3866],3743,3744,[6750,1240],[6751,3863,1903,3920],3747,[6752,3864,1903,3921],[6753,1901],[6754,1240],2467,[6756,806,1906],[6757,135],[6759,3872,1906,614],[6760,3878],[6764,3854,1900,3857,3859,3862,1910],3758,[6766,809],3761,[6767,809],[6768,809],[6769,809],2581,3766,[6771,1240,3885,3886,3887,3888,3889,3890],[6772,3871,1905,808],3771,[6775,3893],function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},3773,[6776,805],[6777,805],[6778,805],[6779,805],[6780,3855,804,1900],[6781,807],[6782,807],[6783,807],[6784,807],1960,830,[6787,804],3786,3787,3788,[6788,804,3856],[6791,1239,806,1904,613,808,614],[6811,806,1904,3934],[6812,3870],[6813,1902,3868,3928,1914],[6794,3932],[6796,613,1244],[6797,135,3937],[6815,3877,1907,1241,808],[6816,3879,1909,1245,3940],3799,3800,[6501,3939],[6503,1243,500,1913],[6801,3881],[6817,3882,614],[6668,3949],[6670,3951],[6674,3955],[6676,3956],[6677,3958],[6506,1266,1932,3981],[6683,57],[6684,3983],[6685,3984,57],[6686,3985,57],[6687,1265,57],[6688,3986,57],[6689,3987,57],[6690,3988,57],[6691,1265,57],[6692,1265,1931,3990,3991,57],[6693,1932,1266,1264],[6694,193Line truncated
|
||||
var X=(0,o.default)(q.node.value);"string"!==X&&"number"!==X||(W=q.node.value,G=W[H.node.name])}}if(G){var J=i.get("arguments").map(r);if(!n)return;return G.apply(W,J)}}t(i)}}var n=!0,s=void 0,a=new c.default,u=r(this);return n||(u=void 0),{confident:n,deopt:s,value:u}}t.__esModule=!0;var a=r(11),o=i(a),u=r(1),l=i(u),p=r(448),c=i(p);t.evaluateTruthy=n,t.evaluate=s;var f=["String","Number","Math"],h=["random"]}).call(t,function(){return this}())},[6867,417],[6869,4650],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=h.unionTypeAnnotation(i);var n=[],s=a(r,e,n),o=l(e,t);if(o&&!function(){var e=a(r,o.ifStatement);s=s.filter(function(t){return e.indexOf(t)<0}),i.push(o.typeAnnotation)}(),s.length){s=s.concat(n);for(var u=s,p=Array.isArray(u),f=0,u=p?u:(0,c.default)(u);;){var d;if(p){if(f>=u.length)break;d=u[f++]}else{if(f=u.next(),f.done)break;d=f.value}var y=d;i.push(y.getTypeAnnotation())}}if(i.length)return h.createUnionTypeAnnotation(i)}function a(e,t,r){var i=e.constantViolations.slice();return i.unshift(e.path),i.filter(function(e){e=e.resolve();var i=e._guessExecutionStatusRelativeTo(t);return r&&"function"===i&&r.push(e),"before"===i})}function o(e,t){var r=t.node.operator,i=t.get("right").resolve(),n=t.get("left").resolve(),s=void 0;if(n.isIdentifier({name:e})?s=i:i.isIdentifier({name:e})&&(s=n),s)return"==="===r?s.getTypeAnnotation():h.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?h.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(n.isUnaryExpression({operator:"typeof"})?(a=n,o=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,o=n),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:e}))return h.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function u(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var r=u(e);if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var p=o(t,a);p&&s.push(p)}}while(n.length);return s.length?{typeAnnotation:h.createUnionTypeAnnotation(s),ifStatement:r}:l(r,t)}}t.__esModule=!0;var p=r(1),c=n(p);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:s(this,e.name):"undefined"===e.name?h.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?h.numberTypeAnnotation():void("arguments"===e.name)}};var f=r(3),h=i(f);e.exports=t.default},[6870,4649],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(C.isIdentifier(a)){if(!r(a.name))return!1}else if(C.isLiteral(a)){if(!r(a.value))return!1}else{if(C.isMemberExpression(a)){if(a.computed&&!C.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!C.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function a(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(){return this.scope.isStatic(this.node)}function u(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function p(e){return C.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function f(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?C.isBlockStatement(e):!!this.isBlockStatement()&&C.isExpression(e))}function h(e){var t=this,r=!0;do{var i=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return!this.parentPath.isLabeledStatement()&&!C.isBlockStatement(this.container)&&(0,w.default)(C.STATEMENT_OR_BLOCK_KEYS,this.key)}function y(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var i=r.path,n=i.parentPath;return!!n.isImportDeclaration()&&(n.node.source.value===e&&(!t||(!(!i.isImportDefaultSpecifier()||"default"!==t)||(!(!i.isImportNamespaceSpecifier()||"*"!==t)||!(!i.isImportSpecifier()||i.node.imported.name!==t)))))}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function
Line truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",i(e,t)),e.replaceWith(n.noop())}function i(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var n=e.types;return{inherits:r(698),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",i(e.get("typeAnnotation"))),e.replaceWith(n.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},Function:{exit:function(e){var t=e.node;t.params.forEach(function(e){return e.optional=!1})}},"ExportNamedDeclaration|Flow":function(e){var r=e.node,i=e.parent;n.isExportNamedDeclaration(r)&&!n.isFlow(r.declaration)||t(e,i)},ImportDeclaration:function(e){var r=e.node,i=e.parent;n.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,i)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},[6505,5505],[6506,5533,5532,5530],2607,2608,[6508,1490,5526,5525],[6509,2264,545],[6510,5506],[6513,544,1484,5510,660],[6515,544],[6516,959,2267,2265],[6517,2264],[6518,5518,2269,2270,660,545],2445,1090,[6520,958,5519,2266,1488,2265,5512],[6522,1487,958,5522,959],[6523,960,5527,1488],[6524,960,1490,5508,1488],[6525,5521,2266],[6526,660],[6530,1489,1485],[6531,1489],[6533,1489],[6534,1485],[6535,1486],[6537,5509,545,961,1484],[6538,958,5529,1484],[6539,5507,5516,961,1490,2268],[6540,5524,2268],[6541,5531,544,660,961,545],function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5536),s=i(n);t.default=function(e){function t(e){return n.isLiteral(n.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return n.isMemberExpression(t)&&n.isLiteral(n.toComputedKey(t,t.property),{value:"__proto__"})}function i(e,t,r){return n.expressionStatement(n.callExpression(r.addHelper("defaults"),[t,e.right]))}var n=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(n.expressionStatement(n.assignmentExpression("=",o,a))),s.push(i(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;n.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(i(s,s.left.object,t))},ObjectExpression:function(e,r){for(var i=void 0,a=e.node,u=a.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;t(f)&&(i=f.value,(0,o.default)(a.properties,f))}if(i){var h=[n.objectExpression([]),i];a.properties.length&&h.push(a),e.replaceWith(n.callExpression(r.addHelper("extends"),h))}}}}};var a=r(5577),o=i(a);e.exports=t.default},[6505,5537],[6506,5565,5564,5562],2607,2608,[6508,1497,5558,5557],[6509,2273,547],[6510,5538],[6513,546,1491,5542,661],[6515,546],[6516,963,2276,2274],[6517,2273],[6518,5550,2278,2279,661,547],2445,1090,[6520,962,5551,2275,1495,2274,5544],[6522,1494,962,5554,963],[6523,964,5559,1495],[6524,964,1497,5540,1495],[6525,5553,2275],[6526,661],[6530,1496,1492],[6531,1496],[6533,1496],[6534,1492],[6535,1493],[6537,5541,547,965,1491],[6538,962,5561,1491],[6539,5539,5548,965,1497,2277],[6540,5556,2277],[6541,5563,546,661,965,547],1902,1603,[6494,5573],2577,[6495,5567,5568,5569,5571,5572],2579,2467,2581,[6496,2282],373,[6497,5575],[6498,5578,5579],[6499,5570],[6500,5566,5581],[6501,5582],[6502,5580],[6503,5574,2282,5576],function(e,t){"use strict";t.__esModule=!0,t.default=function(){var e={enter:function(e,t){var r=function(){t.isImmutable=!1,e.stop()};return e.isJSXClosingElement()?void e.skip():e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node})?r():void(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable()||r())}};return{visitor:{JSXElement:function(t){if(!t.node._hoisted){var r={isImmutable:!0};t.traverse(e,r),r.isImmutable?t.hoist():t.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5585),s=i(n);t.default=function(e){function t(e){for(var t=0;t<e.lengtLine truncated
|
||||
}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var i=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(i)return i;e=t.path}var n=e.getAncestry();if(n.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=n.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var p=n[o-1],c=s[u-1];if(!p||!c)return"before";if(p.listKey&&p.container===c.container)return p.key>c.key?"before":"after";var f=C.VISITOR_KEYS[p.type].indexOf(p.key),h=C.VISITOR_KEYS[c.type].indexOf(c.key);return f>h?"before":"after"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var i=r.referencePaths,n=i,s=Array.isArray(n),a=0,n=s?n:(0,T.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,p=i,c=Array.isArray(p),f=0,p=c?p:(0,T.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h,y=!!d.find(function(e){return e.node===t.node});if(!y){var v=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==v)return}else l=v}}return l}}function x(e,t){return this._resolve(e,t)||this}function E(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var i=this.scope.getBinding(this.node.name);if(!i)return;if(!i.constant)return;if("module"===i.kind)return;if(i.path!==this){var n=function(){var n=i.path.resolve(e,t);return r.find(function(e){return e.node===n.node})?{v:void 0}:{v:n}}();if("object"===("undefined"==typeof n?"undefined":(0,S.default)(n)))return n.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!C.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,p=Array.isArray(l),c=0,l=p?l:(0,T.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;if(h.isProperty()){var d=h.get("key"),y=h.isnt("computed")&&d.isIdentifier({name:a});if(y=y||d.isLiteral({value:a}))return h.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var v=o.get("elements"),m=v[a];if(m)return m.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var A=r(11),S=n(A),_=r(1),T=n(_);t.matchesPattern=s,t.has=a,t.isStatic=o,t.isnt=u,t.equals=l,t.isNodeType=p,t.canHaveVariableDeclarationOrExpression=c,t.canSwapBetweenExpressionAndStatement=f,t.isCompletionRecord=h,t.isStatementOrBlock=d,t.referencesImport=y,t.getSource=v,t.willIMaybeExecuteBefore=m,t._guessExecutionStatusRelativeTo=g,t._guessExecutionStatusRelativeToDifferentFunctions=b,t.resolve=x,t._resolve=E;var P=r(1566),w=n(P),k=r(3),C=i(k);t.is=a},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=n(s),o=r(1),u=n(o),l=r(3),p=i(l),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!l.react.isCompatTag(e.node.name)){var r=e.scope.getBinding(e.node.name);if(r&&r===t.scope.getBinding(e.node.name))if(r.constant)t.bindings[e.node.name]=r;else for(var i=r.constantViolations,n=Array.isArray(i),s=0,i=n?i:(0,u.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;t.breakOnScopePaths=t.breakOnScopePaths.concat(o.getAncestry())}}}},f=function(){function e(t,r){(0,a.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();if(e)return e.path.getStatementParent()},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kinLine truncated
|
||||
case a.types._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case a.types.name:return this.parseIdentifier(!0);case a.types.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case a.types.braceL:return this.parseObj(!0);default:this.unexpected()}},p.parseBindingList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(a.types.comma),t&&this.match(a.types.comma))i.push(null);else{if(r&&this.eat(e))break;if(this.match(a.types.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var s=[];this.match(a.types.at);)s.push(this.parseDecorator());var o=this.parseMaybeDefault();s.length&&(o.decorators=s),this.parseAssignableListItemTypes(o),i.push(this.parseMaybeDefault(o.start,o.loc.start,o))}return i},p.parseAssignableListItemTypes=function(e){return e},p.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(a.types.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},p.checkLVal=function(e,t,r){switch(e.type){case"Identifier":if(this.state.strict&&(l.reservedWords.strictBind(e.name)||l.reservedWords.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":var n=!0,a=!1,o=void 0;try{for(var u,p=(0,s.default)(e.properties);!(n=(u=p.next()).done);n=!0){var c=u.value;"ObjectProperty"===c.type&&(c=c.value),this.checkLVal(c,t,r)}}catch(e){a=!0,o=e}finally{try{!n&&p.return&&p.return()}finally{if(a)throw o}}break;case"ArrayPattern":var f=!0,h=!1,d=void 0;try{for(var y,v=(0,s.default)(e.elements);!(f=(y=v.next()).done);f=!0){var m=y.value;m&&this.checkLVal(m,t,r)}}catch(e){h=!0,d=e}finally{try{!f&&v.return&&v.return()}finally{if(h)throw d}}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestProperty":case"RestElement":this.checkLVal(e.argument,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},[6481,2,47,179,1018],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var n=r(1),s=i(n),a=r(16),o=i(a),u=r(180),l=r(179),p=i(l),c=r(564),f=p.default.prototype;f.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,u.types.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var h={kind:"loop"},d={kind:"switch"};f.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start),n=this.input.slice(t.start,t.end),s=r.value=n.slice(1,-1);return this.addExtra(r,"raw",n),this.addExtra(r,"rawValue",s),i.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(i,"Directive",e.end,e.loc.end)},f.parseStatement=function(e,t){this.match(u.types.at)&&this.parseDecorators(!0);var r=this.state.type,i=this.startNode();switch(r){case u.types._break:case u.types._continue:return this.parseBreakContinueStatement(i,r.keyword);case u.types._debugger:return this.parseDebuggerStatement(i);case u.types._do:return this.parseDoStatement(i);case u.types._for:return this.parseForStatement(i);case u.types._function:return e||this.unexpected(),this.parseFunctionStatement(i);case u.types._class:return e||this.unexpected(),this.takeDecorators(i),this.parseClass(i,!0);case u.types._if:return this.parseIfStatement(i);case u.types._return:return this.parseReturnStatement(i);case u.types._switch:return this.parseSwitchStatement(i);case u.types._throw:return this.parseThrowStatement(i);case u.types._try:return this.parseTryStatement(i);case u.types._let:case u.types._const:e||this.unexpected();case u.types._var:return this.parseVarStatement(i,r);case u.types._while:return this.parseWhileStatement(i);case u.types._with:return this.parseWithStatement(i);case u.types.braceL:return this.parseBlock();case u.types.semi:return this.parseEmptyStatement(i);case u.types._export:case u.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===u.types._import?this.parseImport(i):this.parseExport(i);case u.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(u.types._function)&&!this.canInsertSemicolon())return this.expect(u.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===u.types.name&&"Line truncated
|
||||
return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},u.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},u.flowParseTypeAlias=function(e){return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(n.types.eq,!0),this.semicolon(),this.finishNode(e,"TypeAlias")},u.flowParseTypeParameter=function(){var e=this.startNode(),t=void 0;this.match(n.types.plusMin)&&("+"===this.state.value?t="plus":"-"===this.state.value&&(t="minus"),this.eat(n.types.plusMin));var r=this.flowParseTypeAnnotatableIdentifier(!1,!1);return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(n.types.eq)&&(this.eat(n.types.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},u.flowParseTypeParameterDeclaration=function(){var e=this.startNode();e.params=[],this.isRelational("<")||this.match(n.types.jsxTagStart)?this.next():this.unexpected();do e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(n.types.comma);while(!this.isRelational(">"));return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},u.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(n.types.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},u.flowParseObjectPropertyKey=function(){return this.match(n.types.num)||this.match(n.types.string)?this.parseExprAtom():this.parseIdentifier(!0)},u.flowParseObjectTypeIndexer=function(e,t){return e.static=t,this.expect(n.types.bracketL),e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser(),this.expect(n.types.bracketR),e.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},u.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(n.types.parenL);this.match(n.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(n.types.parenR)||this.expect(n.types.comma);return this.eat(n.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(n.types.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},u.flowParseObjectTypeMethod=function(e,t,r,i){var n=this.startNodeAt(e,t);return n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),n.static=r,n.key=i,n.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(n,"ObjectTypeProperty")},u.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},u.flowParseObjectType=function(e){var t=this.startNode(),r=void 0,i=void 0,s=void 0;for(t.callProperties=[],t.properties=[],t.indexers=[],this.expect(n.types.braceL);!this.match(n.types.braceR);){var a=!1,o=this.state.start,u=this.state.startLoc;r=this.startNode(),e&&this.isContextual("static")&&(this.next(),s=!0),this.match(n.types.bracketL)?t.indexers.push(this.flowParseObjectTypeIndexer(r,s)):this.match(n.types.parenL)||this.isRelational("<")?t.callProperties.push(this.flowParseObjectTypeCallProperty(r,e)):(i=s&&this.match(n.types.colon)?this.parseIdentifier():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(n.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,s,i)):(this.eat(n.types.question)&&(a=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=a,r.static=s,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(n.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},u.flowObjectTypeSemicolon=function(){this.eat(n.types.semi)||this.eat(n.types.comma)||this.match(n.types.braceR)||this.unexpected()},u.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(n.types.dot);){var s=this.startNodeAt(e,t);s.qualification=i.id,s.id=this.parseIdentifier(),i.id=this.finishNode(s,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},u.flowParseTypeofType=function(){var e=this.startNode();return this.expect(n.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},u.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(n.types.bracketL);this.state.pos<this.input.leLine truncated
|
||||
t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t){e.exports={_args:[[{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},"C:\\src\\babel-standalone"]],_from:"babel-core@6.14.0",_id:"babel-core@6.14.0",_inCache:!0,_installable:!0,_location:"/babel-core",_nodeVersion:"5.11.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/babel-core-6.14.0.tgz_1472082048405_0.022966341115534306"},_npmUser:{email:"hi@henryzoo.com",name:"hzoo"},_npmVersion:"3.10.6",_phantomChildren:{"babel-code-frame":"6.11.0","babel-messages":"6.8.0","babel-runtime":"6.9.2",debug:"2.2.0",esutils:"2.0.2",globals:"8.18.0",invariant:"2.2.1",lodash:"4.14.1","to-fast-properties":"1.0.2"},_requested:{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},_requiredBy:["#DEV:/","/babel-plugin-transform-regenerator","/babel-register"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz",_shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",_shrinkwrap:null,_spec:"babel-core@6.14.0",_where:"C:\\src\\babel-standalone",author:{email:"sebmck@gmail.com",name:"Sebastian McKenzie"},dependencies:{"babel-code-frame":"^6.8.0","babel-generator":"^6.14.0","babel-helpers":"^6.8.0","babel-messages":"^6.8.0","babel-register":"^6.14.0","babel-runtime":"^6.9.1","babel-template":"^6.14.0","babel-traverse":"^6.14.0","babel-types":"^6.14.0",babylon:"^6.9.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.4.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-exists":"^1.0.0","path-is-absolute":"^1.0.0",private:"^0.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.9.0","babel-helper-transform-fixture-test-runner":"^6.13.2","babel-polyfill":"^6.13.0"},directories:{},dist:{shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],license:"MIT",maintainers:[{email:"amjad.masad@gmail.com",name:"amasad"},{email:"hi@henryzoo.com",name:"hzoo"},{email:"npm-public@jessemccarthy.net",name:"jmm"},{email:"loganfsmyth@gmail.com",name:"loganfsmyth"},{email:"sebmck@gmail.com",name:"sebmck"},{email:"me@thejameskyle.com",name:"thejameskyle"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.14.0"}},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,AnimationEvent:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBuLine truncated
|
||||
if(e!==t){if(!u(t)&&!p(t))var d=c(t);s(d||t,function(s,u){if(d&&(u=s,s=t[u]),l(s))h||(h=new n),o(e,t,u,r,i,f,h);else{var p=f?f(e[u],s,u+"",e,t,h):void 0;void 0===p&&(p=s),a(e,u,p)}})}}var n=r(1028),s=r(1602),a=r(2460),o=r(6326),u=r(76),l=r(103),p=r(1614),c=r(1043);e.exports=i},function(e,t,r){function i(e,t,r,i,y,v,m){var g=e[r],b=t[r],x=m.get(b);if(x)return void n(e,r,x);var E=v?v(g,b,r+"",e,t,m):void 0,A=void 0===E;A&&(E=b,u(b)||h(b)?u(g)?E=g:l(g)?E=a(g):(A=!1,E=s(b,!0)):f(b)||o(b)?o(g)?E=d(g):!c(g)||i&&p(g)?(A=!1,E=s(b,!0)):E=g:A=!1),A&&(m.set(b,E),y(E,b,i,v,m),m.delete(b)),n(e,r,E)}var n=r(2460),s=r(1032),a=r(2467),o=r(1041),u=r(76),l=r(2481),p=r(682),c=r(103),f=r(254),h=r(1614),d=r(6414);e.exports=i},function(e,t,r){function i(e,t,r){var i=-1;t=n(t.length?t:[p],u(s));var c=a(e,function(e,r,s){var a=n(t,function(t){return t(e)});return{criteria:a,index:++i,value:e}});return o(c,function(e,t){return l(e,t,r)})}var n=r(1603),s=r(566),a=r(2464),o=r(6331),u=r(1609),l=r(6346),p=r(2480);e.exports=i},[6845,2462],3879,function(e,t){function r(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(n);++i<n;)s[i]=e[i+t];return s}e.exports=r},function(e,t){function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},3740,[6846,2455,6302,6303,6335,6351,1039],[6810,1603],4086,function(e,t,r){function i(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}var n=r(6330);e.exports=i},function(e,t,r){function i(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}var n=r(1606);e.exports=i},3744,[6750,1610],[6751,6300,2459,2476],3747,[6752,6301,2459,1039],[6753,1029],[6754,1610],function(e,t,r){function i(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e===e,a=n(e),o=void 0!==t,u=null===t,l=t===t,p=n(t);if(!u&&!p&&!a&&e>t||a&&o&&l&&!u&&!p||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!p&&e<t||p&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var n=r(683);e.exports=i},function(e,t,r){function i(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l){if(i>=u)return l;var p=r[i];return l*("desc"==p?-1:1)}}return e.index-t.index}var n=r(6345);e.exports=i},[6756,567,2471],[6757,186],[6847,252],4099,function(e,t,r){var i=r(2454),n=r(6406),s=r(1039),a=1/0,o=i&&1/s(new i([,-0]))[1]==a?function(e){return new i(e)}:n;e.exports=o},function(e,t,r){function i(e,t,r,i,n,S,T){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!i(new s(e),new s(t)));case f:case h:case v:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var P=u;case g:var w=S&c;if(P||(P=l),e.size!=t.size&&!w)return!1;var k=T.get(e);if(k)return k==t;S|=p,T.set(e,t);var C=o(P(e),P(t),i,n,S,T);return T.delete(e),C;case x:if(_)return _.call(e)==_.call(t)}return!1}var n=r(1029),s=r(2456),a=r(570),o=r(2469),u=r(2476),l=r(1039),p=1,c=2,f="[object Boolean]",h="[object Date]",d="[object Error]",y="[object Map]",v="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",S=n?n.prototype:void 0,_=S?S.valueOf:void 0;e.exports=i},function(e,t,r){function i(e,t,r,i,o,u){var l=o&a,p=s(e),c=p.length,f=s(t),h=f.length;if(c!=h&&!l)return!1;for(var d=c;d--;){var y=p[d];if(!(l?y in t:n(t,y)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var g=l;++d<c;){y=p[d];var b=e[y],x=t[y];if(i)var E=l?i(x,b,y,t,e,u):i(b,x,y,e,t,u);if(!(void 0===E?b===x||r(b,x,i,o,u):E)){m=!1;break}g||(g="constructor"==y)}if(m&&!g){var A=e.constructor,S=t.constructor;A!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof S&&S instanceof S)&&(m=!1)}return u.delete(e),u.delete(t),m}var n=r(1605),s=r(256),a=2;e.exports=i},[6759,6312,2471,256],[6760,2465],[6852,2475,256],3758,[6766,1038],3761,[6767,1038],[6768,1038],[6769,1038],3766,[6771,1610,6339,6340,6341,6342,6343,6344],[6772,6308,1611,681],function(e,t,r){function i(e){return a(e)||s(e)||!!(o&&e&&e[o])}var n=r(1029),s=r(1041),a=r(76),o=n?n.isConcatSpreadable:void 0;e.exports=i},3771,[6775,6348],3909,3773,[6776,1031],[6777,1031],[6778,1031],[6779,1031],[6780,6296,1027,1600],[6781,1034],[6782,1034],[6783,1034],[6784,1034],4130,4131,[6787,1027],3786,3787,3788,function(e,t,r){function i(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!s||i.length<o-1)return i.push([e,t]),this;r=this.__data__=new a(i)}return r.set(e,t),this}var n=r(1027),s=r(1600),a=r(1601),o=200;e.exports=i},function(e,t){function r(e){return e.match(x)}var i="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",o="["+i+"]",u="["+n+s+"]",l="\\ud83c[\\udffb-\\udfff]",p="(?:"+u+"|"+l+")",c="[^"+i+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",y=p+"?",v="["+a+"]?Line truncated
|
||||
r(e,u,p));r(e,u+1,p);var c=u+1;n(e,t,s,c-1),n(e,t,c+1,a)}}t.quickSort=function(e,t){n(e,t,0,e.length-1)}},function(e,t,r){function i(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new n(t)}function n(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sources"),n=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),p=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(n.map(String),!0),this._sources=l.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=p}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=n.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),n=o.getArg(t,"column");if(r<s.line||r===s.line&&n<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:n+1},consumer:new i(o.getArg(e,"map"))}})}var o=r(686),u=r(6428),l=r(2487).ArraySet,p=r(2488),c=r(6430).quickSort;i.fromSourceMap=function(e){return n.fromSourceMap(e)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},i.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(e,t,r){var n,s=t||null,a=r||i.GENERATED_ORDER;switch(a){case i.GENERATED_ORDER:n=this._generatedMappings;break;case i.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;n.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},i.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var i=[],n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(n>=0){var s=this._originalMappings[n];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n]}return i},t.SourceMapConsumer=i,n.prototype=Object.create(i.prototype),n.prototype.consumer=i,n.fromSourceMap=function(e){var t=Object.create(n.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),i=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],f=0,h=a.length;f<h;f++){var d=a[f],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=i.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=r.indexOf(d.name)),p.push(y)),u.push(y)}return c(t.__originalMappings,o.compareByOriginalPositions),t},n.prototype._version=3,Object.defineProperty(n.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){rLine truncated
|
||||
return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function p(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function c(e){return x.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function f(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function h(e,t){var r=this,i=this.node,n=i[e];return Array.isArray(n)?n.map(function(s,a){return x.default.get({listKey:e,parentPath:r,parent:i,container:n,key:a}).setContext(t)}):x.default.get({parentPath:this,parent:i,container:i,key:e}).setContext(t)}function d(e,t){for(var r=this,i=e,n=Array.isArray(i),s=0,i=n?i:(0,g.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function y(e){return A.getBindingIdentifiers(this.node,e)}function v(e){return A.getOuterBindingIdentifiers(this.node,e)}t.__esModule=!0;var m=r(i),g=o(m);t.getStatementParent=u,t.getOpposite=l,t.getCompletionRecords=p,t.getSibling=c,t.get=f,t._getKey=h,t._getPattern=d,t.getBindingIdentifiers=y,t.getOuterBindingIdentifiers=v;var b=r(n),x=o(b),E=r(s),A=a(E)},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h,d,y,v,m,g,b,x){"use strict";function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var S=r(i),_=A(S),T=r(n),P=A(T),w=r(s),k=E(w),C=r(371),D=A(C),O=r(456),N=A(O),I=r(a),F=A(I),B=r(78),R=A(B),L=r(o),M=A(L),j=r(u),V=E(j),U=r(l),Y=(0,D.default)("babel"),K=function(){function e(t,r){(0,P.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,i=t.parentPath,n=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&i&&(r=i.hub),(0,N.default)(n,"To get a node path the parent needs to exist");var u=s[o],l=U.path.get(n)||[];U.path.has(n)||U.path.set(n,l);for(var p=void 0,c=0;c<l.length;c++){var f=l[c];if(f.node===u){p=f;break}}return p||(p=new e(r,n),l.push(p)),p.setup(i,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new M.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,F.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){V.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){Y.enabled&&Y(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=K,(0,R.default)(K.prototype,r(p)),(0,R.default)(K.prototype,r(c)),(0,R.default)(K.prototype,r(f)),(0,R.default)(K.prototype,r(h)),(0,R.default)(K.prototype,r(d)),(0,R.default)(K.prototype,r(y)),(0,R.default)(K.prototype,r(v)),(0,R.default)(K.prototype,r(m)),(0,R.default)(K.prototype,r(g)),(0,R.default)(K.prototype,r(b)),(0,R.default)(K.prototype,r(x));for(var W=function(){if(q){if(H>=G.length)return"break";X=G[H++]}else{if(H=G.next(),H.done)return"break";X=H.value}var e=X,t="is"+e;K.prototype[t]=function(e){return V[t](this.node,e)},K.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},G=V.TYPES,q=Array.isArray(G),H=0,G=q?G:(0,_.default)(G);;){var X,J=W();if("break"===J)break}var $=function(e){if("_"===e[0])return"continue";V.TYPES.indexOf(e)<0&&V.TYPES.push(e);var t=k[e];K.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var z in k){$(z)}e.exports=t.default},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}fLine truncated
|
||||
this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.indexOf(e)===-1&&this.constantViolations.push(e)},e.prototype.reference=function(e){this.referencePaths.indexOf(e)===-1&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=o,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){for(var i=U.scope.get(e.node)||[],n=i,s=Array.isArray(n),a=0,n=s?n:(0,A.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}i.push(r),U.scope.has(e.node)||U.scope.set(e.node,i)}t.__esModule=!0;var y=r(i),v=h(y),m=r(n),g=h(m),b=r(s),x=h(b),E=r(a),A=h(E),S=r(50),_=h(S),T=r(459),P=h(T),w=r(o),k=h(w),C=r(u),D=h(C),O=r(457),N=h(O),I=r(20),F=f(I),B=r(l),R=h(B),L=r(455),M=h(L),j=r(p),V=f(j),U=r(c),Y=0,K={For:function(e){for(var t=V.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,A.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,i=t.declaration;if(V.isClassDeclaration(i)||V.isFunctionDeclaration(i)){var n=i.id;if(!n)return;var s=r.getBinding(n.name);s&&s.reference(e)}else if(V.isVariableDeclaration(i))for(var a=i.declarations,o=Array.isArray(a),u=0,a=o?a:(0,A.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l,c=V.getBindingIdentifiers(p);for(var f in c){var h=r.getBinding(f);h&&h.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,A.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},W=0,G=function(){function e(t,r){if((0,x.default)(this,e),r&&r.block===t.node)return r;var i=d(t,r,this);return i?i:(this.uid=W++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,void(this.path=t))}return e.prototype.traverse=function(e,t,r){(0,D.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return V.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=V.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;V.isAssignmentExpression(e)?r=e.left:V.isVariableDeclarator(e)?r=e.id:(V.isObjectProperty(r)||V.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(V.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,A.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.doneLine truncated
|
||||
fields:{id:{validate:(0,c.assertNodeType)("Identifier")},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","FunctionLine truncated
|
||||
W.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;delete e[s]}return e}function D(e,t){return O(e,t),N(e,t),I(e,t),e}function O(e,t){F("trailingComments",e,t)}function N(e,t){F("leadingComments",e,t)}function I(e,t){F("innerComments",e,t)}function F(e,t,r){t&&r&&(t[e]=(0,le.default)((0,ie.default)([].concat(t[e],r[e]))))}function B(e,t){if(!e||!t)return e;for(var r=he.INHERIT_KEYS.optional,i=Array.isArray(r),n=0,r=i?r:(0,W.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=he.INHERIT_KEYS.force,l=Array.isArray(u),p=0,u=l?u:(0,W.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=t[f]}return he.inheritsComments(e,t),e}function R(e){if(!L(e))throw new TypeError("Not a valid node "+(e&&e.type))}function L(e){return!(!e||!pe.VISITOR_KEYS[e.type])}function M(e,t,r){if(e){var i=he.VISITOR_KEYS[e.type];if(i){r=r||{},t(e,r);for(var n=i,s=Array.isArray(n),a=0,n=s?n:(0,W.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;M(d,t,r)}else M(l,t,r)}}}}function j(e,t){t=t||{};for(var r=t.preserveComments?me:ge,i=r,n=Array.isArray(i),s=0,i=n?i:(0,W.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,Y.default)(e),p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;e[d]=null}}function V(e,t){return M(e,j,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var U=r(i),Y=v(U),K=r(n),W=v(K),G=r(s),q=v(G),H=r(a),X=v(H),J=r(o);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:functionLine truncated
|
||||
e.key=this.parseMaybeAssign(),this.expect(h.types.bracketR),e.key):(e.computed=!1,e.key=this.match(h.types.num)||this.match(h.types.string)?this.parseExprAtom():this.parseIdentifier(!0))},m.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},m.parseMethod=function(e,t,r){var i=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(h.types.parenL),e.params=this.parseBindingList(h.types.parenR),e.generator=t,this.parseFunctionBody(e),this.state.inMethod=i,e},m.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},m.parseFunctionBody=function(e,t){var r=t&&!this.match(h.types.braceL),i=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var n=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=n,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=i;var o=this.state.strict,u=!1,l=!1;if(t&&(o=!0),!r&&e.body.directives.length){var c=!0,d=!1,y=void 0;try{for(var v,m=(0,f.default)(e.body.directives);!(c=(v=m.next()).done);c=!0){var g=v.value;if("use strict"===g.value.value){l=!0,o=!0,u=!0;break}}}catch(e){d=!0,y=e}finally{try{!c&&m.return&&m.return()}finally{if(d)throw y}}}if(l&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),o){var b=(0,p.default)(null),x=this.state.strict;u&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0);var E=!0,A=!1,S=void 0;try{for(var _,T=(0,f.default)(e.params);!(E=(_=T.next()).done);E=!0){var P=_.value;this.checkLVal(P,!0,b)}}catch(e){A=!0,S=e}finally{try{!E&&T.return&&T.return()}finally{if(A)throw S}}this.state.strict=x}},m.parseExprList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(h.types.comma),this.eat(e))break;i.push(this.parseExprListItem(t,r))}return i},m.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(h.types.comma)?null:this.match(h.types.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem)},m.parseIdentifier=function(e){var t=this.startNode();return this.match(h.types.name)?(!e&&this.state.strict&&v.reservedWords.strict(this.state.value)&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},m.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(h.types.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},m.parseYield=function(){var e=this.startNode();return this.next(),this.match(h.types.semi)||this.canInsertSemicolon()||!this.match(h.types.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.types.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=void 0;var h=r(i),d=f(h),y=r(n),v=f(y),m=r(s),g=f(m),b=r(a),x=f(b),E=r(o),A=f(E),S=r(u),_=f(S),T=r(l),P=r(p),w=r(c),k=f(w),C=(t.plugins={},function(e){function r(e,t){(0,g.default)(this,r),e=(0,P.getOptions)(e);var i=(0,A.default)(this,(0,v.default)(r).call(this,e,t));return i.options=e,i.inModule="module"===i.options.sourceType,i.isReservedWord=T.reservedWords[6],i.input=t,i.plugins=i.loadPlugins(i.options.plugins),i.filename=e.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return(0,_.default)(r,e),(0,x.default)(r,[{key:"hasPlugin",value:function(e){return!(!this.plugins["*"]&&!this.plugins[e])}},{key:"extend",value:function(e,t){this[e]=t(this[e])}},{key:"loadPlugins",value:function(e){var r={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow"));var i=!0,n=!1,s=void 0;try{for(var a,o=(0,d.default)(e);!(i=(a=o.next()).done);i=!0){var u=a.value;if(!r[u]){r[u]=!0;var l=t.plugins[u];l&&l(this)}}}catch(e){n=!0,s=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw s}}return r}},{key:"parse",value:function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)}}]),r}(k.default));t.default=C},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var a=r(i),o=r(n),u=s(o),l=u.default.prototype;l.raise=function(e,t){var r=(0,a.getLineInfo)(this.input,e);t+=" ("+r.line+"Line truncated
|
||||
var a=this.state.clone();try{return e.call(this,t,r,i,n)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,i,n)}}),e.extend("parseParenItem",function(e){return function(t,r,i){if(t=e.call(this,t,r,i),this.eat(o.types.question)&&(t.optional=!0),this.match(o.types.colon)){var n=this.startNodeAt(r,i);return n.expression=t,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(o.types.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(o.types.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r):e.call(this,t,r)}}),e.extend("toAssignableList",function(e){return function(t,r){for(var i=0;i<t.length;i++){var n=t[i];n&&"TypeCastExpression"===n.type&&(t[i]=this.typeCastToParameter(n))}return e.call(this,t,r)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var i=this.startNode(),n=e.call(this,t,r);return this.match(o.types.colon)?(i._exprListItem=!0,i.expression=n,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")):n}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return this.match(o.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,i){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(t,r,i),e.body.push(this.finishNode(t,"ClassMethod"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var i=t.implements=[];do{var n=this.startNode();n.id=this.parseIdentifier(),this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,i.push(this.finishNode(n,"ClassImplements"))}while(this.eat(o.types.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(o.types.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(o.types.question)&&(e.optional=!0),this.match(o.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(o.types._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var i=this.lookahead();(i.type===o.types.name&&"from"!==i.value||i.type===o.types.braceL||i.type===o.types.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(o.types.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){return this.match(o.types.colon)&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parLine truncated
|
||||
}},{key:"nextToken",value:function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(g.types.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())}},{key:"readToken",value:function(e){return(0,m.isIdentifierStart)(e)||92===e?this.readWord():this.getTokenFromCode(e)}},{key:"fullCharCodeAtPos",value:function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888}},{key:"pushComment",value:function(e,t,r,i,n,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:i,loc:new x.SourceLocation(n,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))}},{key:"skipBlockComment",value:function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);r===-1&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,E.lineBreakG.lastIndex=t;for(var i=void 0;(i=E.lineBreakG.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())}},{key:"skipLineComment",value:function(e){for(var t=this.state.pos,r=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())}},{key:"skipSpace",value:function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&E.nonASCIIwhitespace.test(String.fromCharCode(e))))break e;++this.state.pos}}}},{key:"finishToken",value:function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(g.types.ellipsis)):(++this.state.pos,this.finishToken(g.types.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.slash,1)}},{key:"readToken_mult_modulo",value:function(e){var t=42===e?g.types.star:g.types.modulo,r=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(r++,i=this.input.charCodeAt(this.state.pos+2),t=g.types.exponent),61===i&&(r++,t=g.types.assign),this.finishOp(t,r)}},{key:"readToken_pipe_amp",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?g.types.logicalOR:g.types.logicalAND,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(124===e?g.types.bitwiseOR:g.types.bitwiseAND,1)}},{key:"readToken_caret",value:function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.bitwiseXOR,1)}},{key:"readToken_plus_min",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&E.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.types.incDec,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(g.types.plusMin,1)}},{key:"readToken_lt_gt",value:function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(g.types.assign,r+1):this.finishOp(g.types.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(g.types.relational,r))}},{key:"readToken_eq_excl",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(g.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(g.types.arrow)):this.finishOp(Line truncated
|
||||
}}},function(e,t,r,i){var n=r(i),s=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?s(e+t,0):a(e,t)}},function(e,t,r,i,n){var s=r(i),a=r(n);e.exports=function(e){return s(a(e))}},function(e,t,r,i){var n=r(i),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},function(e,t,r,i){var n=r(i);e.exports=function(e){return Object(n(e))}},function(e,t,r,i){var n=r(i);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r,i,n,s){var a=r(i)("wks"),o=r(n),u=r(s).Symbol,l="function"==typeof u,p=e.exports=function(e){return a[e]||(a[e]=l&&u[e]||(l?u:o)("Symbol."+e))};p.store=a},function(e,t,r,i,n,s,a){var o=r(i),u=r(n)("iterator"),l=r(s);e.exports=r(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||l[o(e)]}},function(e,t,r,i,n,s){var a=r(i),o=r(n);e.exports=r(s).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},function(e,t,r,i,n,s,a,o){"use strict";var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=r(o)(Array,"Array",function(e,t){this._t=c(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,r):"values"==t?l(0,e[r]):l(0,[r,e[r]])},"values"),p.Arguments=p.Array,u("keys"),u("values"),u("entries")},function(e,t,r,i,n){"use strict";var s=r(i)(!0);r(n)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=s(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r,i,n,s,a,o){r(i);for(var u=r(n),l=r(s),p=r(a),c=r(o)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d=f[h],y=u[d],v=y&&y.prototype;v&&!v[c]&&l(v,c,d),p[d]=p.Array}},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=e.node,i=r.body;r.async=!1;var n=y.functionExpression(null,[],y.blockStatement(i.body),!0);n.shadow=!0,i.body=[y.returnStatement(y.callExpression(y.callExpression(t,[n]),[]))]}function l(e,t){var r=e.node,i=e.isFunctionDeclaration(),n=r.id,s=v;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!i&&n&&(s=m),r.async=!1,r.generator=!0,r.id=null,i&&(r.type="FunctionExpression");var a=y.callExpression(t,[r]),o=s({NAME:n,FUNCTION:a,PARAMS:r.params.map(function(){return e.scope.generateUidIdentifier("x")})}).expression;if(i){var u=y.variableDeclaration("let",[y.variableDeclarator(y.identifier(n.name),y.callExpression(o,[]))]);u._blockHoist=!0,e.replaceWith(u)}else{var l=o.body.body[1].argument;n||(0,c.default)({node:l,parent:e.parent,scope:e.scope}),!l||l.id||r.params.length?e.replaceWith(y.callExpression(o,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t){var r=e.node;if(!r.generator)return e.traverse(g),e.isClassMethod()||e.isObjectMethod()?u(e,t):l(e,t)};var p=r(i),c=o(p),f=r(n),h=o(f),d=r(s),y=a(d),v=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n return function NAME(PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n"),m=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n function NAME(PARAMS) {\n return ref.apply(this, arguments);\n }\n return NAME;\n })\n"),g={ArrowFunctionExpression:function(e){e.node.async||e.arrowFunctionToShadowed()},AwaitExpression:function(e){var t=e.node;t.type="YieldExpression"}};e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w]Line truncated
|
||||
case h.types._return:return this.parseReturnStatement(i);case h.types._switch:return this.parseSwitchStatement(i);case h.types._throw:return this.parseThrowStatement(i);case h.types._try:return this.parseTryStatement(i);case h.types._let:case h.types._const:e||this.unexpected();case h.types._var:return this.parseVarStatement(i,r);case h.types._while:return this.parseWhileStatement(i);case h.types._with:return this.parseWithStatement(i);case h.types.braceL:return this.parseBlock();case h.types.semi:return this.parseEmptyStatement(i);case h.types._export:case h.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===h.types._import?this.parseImport(i):this.parseExport(i);case h.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(h.types._function)&&!this.canInsertSemicolon())return this.expect(h.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===h.types.name&&"Identifier"===a.type&&this.eat(h.types.colon)?this.parseLabeledStatement(i,s,a):this.parseExpressionStatement(i,a)},m.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},m.parseDecorators=function(e){for(;this.match(h.types.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(h.types._export)||this.match(h.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},m.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},m.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(h.types.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var n=this.state.labels[i];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(r||"loop"===n.kind))break;if(e.label&&r)break}}return i===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},m.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},m.parseDoStatement=function(e){return this.next(),this.state.labels.push(g),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(h.types._while),e.test=this.parseParenExpression(),this.eat(h.types.semi),this.finishNode(e,"DoWhileStatement")},m.parseForStatement=function(e){this.next(),this.state.labels.push(g);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(h.types.parenL),this.match(h.types.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(h.types._var)||this.match(h.types._let)||this.match(h.types._const)){var r=this.startNode(),i=this.state.type;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!this.match(h.types._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var n={start:0},s=this.parseExpression(!0,n);return this.match(h.types._in)||this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.parseForIn(e,s,t)):(n.start&&this.unexpected(n.start),t&&this.unexpected(),this.parseFor(e,s))},m.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},m.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(h.types._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},m.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},m.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.types.braceL),this.state.labels.push(b);for(var t,r=void 0;!this.match(h.types.braceR);)if(this.match(h.types._case)||this.match(h.types._default)){var i=this.match(h.types._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),i?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(h.types.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop()Line truncated
|
||||
this.isRelational("<")||this.match(a.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,n,i)):(this.eat(a.types.question)&&(s=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=s,r.static=n,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(a.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},l.flowObjectTypeSemicolon=function(){this.eat(a.types.semi)||this.eat(a.types.comma)||this.match(a.types.braceR)||this.unexpected()},l.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(a.types.dot);){var n=this.startNodeAt(e,t);n.qualification=i.id,n.id=this.parseIdentifier(),i.id=this.finishNode(n,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},l.flowParseTypeofType=function(){var e=this.startNode();return this.expect(a.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},l.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(a.types.bracketL);this.state.pos<this.input.length&&!this.match(a.types.bracketR)&&(e.types.push(this.flowParseType()),!this.match(a.types.bracketR));)this.expect(a.types.comma);return this.expect(a.types.bracketR),this.finishNode(e,"TupleTypeAnnotation")},l.flowParseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdentifier(),this.eat(a.types.question)&&(e=!0),t.optional=e,t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeParam")},l.flowParseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.match(a.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(a.types.parenR)||this.expect(a.types.comma);return this.eat(a.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},l.flowIdentToTypeAnnotation=function(e,t,r,i){switch(i.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,i)}},l.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),i=void 0,n=void 0,s=!1;switch(this.state.type){case a.types.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case a.types.braceL:return this.flowParseObjectType();case a.types.bracketL:return this.flowParseTupleType();case a.types.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(a.types.parenL),i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");case a.types.parenL:if(this.next(),!this.match(a.types.parenR)&&!this.match(a.types.ellipsis))if(this.match(a.types.name)){var o=this.lookahead().type;s=o!==a.types.question&&o!==a.types.colon}else s=!0;return s?(n=this.flowParseType(),this.expect(a.types.parenR),this.eat(a.types.arrow)&&this.raise(r,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation"));case a.types.string:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"StringLiteralTypeAnnotation");case a.types._true:case a.types._false:return r.value=this.match(a.types._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case a.types.num:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case a.types._null:return r.value=this.match(a.types._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case a.types._this:return r.value=this.match(a.types._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},l.flowParsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flowParsePrimaryType();return this.matLine truncated
|
||||
this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[d.types.b_stat],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this}},{key:"curPosition",value:function(){return new h.Position(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(t){var r=new e;for(var i in this){var n=this[i];t&&"context"!==i||!Array.isArray(n)||(n=n.slice()),r[i]=n}return r}}]),e}();t.default=v},function(e,t,r,i){function n(e,t,r){for(var i=-1,n=s(t),a=n.length;++i<a;){var o=n[i],u=e[o],l=r(u,t[o],o,e,t);(l===l?l===u:u!==u)&&(void 0!==u||o in e)||(e[o]=l)}return e}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null==t?e:a(t,o(t),e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s,a,o,u,l,p,c){function f(e,t,r,i,n,s,a){var o;if(r&&(o=n?r(e,i,n):r(e)),void 0!==o)return o;if(!E(e))return e;var u=x(e);if(u){if(o=m(e),!t)return h(e,o)}else{var l=H.call(e),p=l==w;if(l!=D&&l!=A&&(!p||n))return G[l]?g(e,l,t):n?e:{};if(o=b(p?{}:e),!t)return y(o,e)}s||(s=[]),a||(a=[]);for(var c=s.length;c--;)if(s[c]==e)return a[c];return s.push(e),a.push(o),(u?d:v)(e,function(i,n){o[n]=f(i,t,r,n,e,s,a)}),o}var h=r(i),d=r(n),y=r(s),v=r(a),m=r(o),g=r(u),b=r(l),x=r(p),E=r(c),A="[object Arguments]",S="[object Array]",_="[object Boolean]",T="[object Date]",P="[object Error]",w="[object Function]",k="[object Map]",C="[object Number]",D="[object Object]",O="[object RegExp]",N="[object Set]",I="[object String]",F="[object WeakMap]",B="[object ArrayBuffer]",R="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",K="[object Uint16Array]",W="[object Uint32Array]",G={};G[A]=G[S]=G[B]=G[_]=G[T]=G[R]=G[L]=G[M]=G[j]=G[V]=G[C]=G[D]=G[O]=G[I]=G[U]=G[Y]=G[K]=G[W]=!0,G[P]=G[w]=G[k]=G[N]=G[F]=!1;var q=Object.prototype,H=q.toString;e.exports=f},function(e,t,r,i){var n=r(i),s=n();e.exports=s},function(e,t,r,i,n){function s(e,t){return a(e,t,o)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e,t,r){if(null!=e){void 0!==r&&r in s(e)&&(t=[r]);for(var i=0,n=t.length;null!=e&&i<n;)e=e[t[i++]];return i&&i==n?e:void 0}}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){if("function"!=typeof e)return s;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,i,n){return e.call(t,r,i,n)};case 4:return function(r,i,n,s){return e.call(t,r,i,n,s)};case 5:return function(r,i,n,s,a){return e.call(t,r,i,n,s,a)}}return function(){return e.apply(t,arguments)}}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(e){return l(function(t,r){var i=-1,n=null==t?0:r.length,s=n>2?r[n-2]:void 0,a=n>2?r[2]:void 0,l=n>1?r[n-1]:void 0;for("function"==typeof s?(s=o(s,l,5),n-=2):(s="function"==typeof l?l:void 0,n-=s?1:0),a&&u(r[0],r[1],a)&&(s=n<3?void 0:s,n=1);++i<n;){var p=r[i];p&&e(t,p,s)}return t})}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return function(t,r,i){for(var n=s(t),a=i(t),o=a.length,u=e?o:-1;e?u--:++u<o;){var l=a[u];if(r(n[l],l,n)===!1)break}return t}}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n("length");e.exports=s},function(e,t,r,i){function n(e,t){var r=null==e?void 0:e[t];return s(r)?r:void 0}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){var i=e.constructor;switch(t){case c:return s(e);case a:case o:return new i((+e));case f:case h:case d:case y:case v:case m:case g:case b:case x:var n=e.buffer;return new i(r?s(n):n,e.byteOffset,e.length);case u:case p:return new i(e);case l:var A=new i(e.source,E.exec(e));A.lastIndex=e.lastIndex}return A}var s=r(i),a="[object Boolean]",o="[object Date]",u="[object Number]",l="[object RegExp]",p="[object String]",c="[object ArrayBuffer]",f="[object Float32Array]",h="[object Float64Array]",d="[object Int8Array]",y="[object Int16Array]",v="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",E=/\w*$/;e.exports=n},function(e,t,r,i,n){function s(e){return null!=e&&o(a(e))}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s){function a(e,t,r){if(!l(r))return!1;var i=typeof t;if("number"==i?o(r)&&u(t,r.length):"string"==i&&t in r){var n=r[t];return e===e?e===n:n!==n}return!1}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e,t){var r=typeof e;if("string"==r&&l.test(e)||"number"==r)return!0;if(a(e))return!1;var i=!u.test(e);return i||null!=t&&e in o(t)}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i,n,s,a,o){function u(e){for(var t=h(e),r=t.length,i=r&&e.length,n=!!i&&f(i)&&(p(e)||l(e)),s=-1,a=[];++s<r;){var o=t[s];(n&&c(o,i)||y.call(e,o))&&a.push(o)}return a}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Object.prototype,y=d.hasOwnProperty;e.exports=u},function(e,t,r,i){function n(e){return s(e)?e:Object(e)}Line truncated
|
||||
if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var o=l(t,a);o&&s.push(o)}}while(n.length);return s.length?{typeAnnotation:y.createUnionTypeAnnotation(s),ifStatement:r}:c(r,t)}}t.__esModule=!0;var f=r(i),h=a(f);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:o(this,e.name):"undefined"===e.name?y.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?y.numberTypeAnnotation():void("arguments"===e.name)}};var d=r(n),y=s(d);e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function u(e){return e.typeAnnotation}function l(e){if(this.get("callee").isIdentifier())return N.genericTypeAnnotation(e.callee)}function p(){return N.stringTypeAnnotation()}function c(e){var t=e.operator;return"void"===t?N.voidTypeAnnotation():N.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?N.numberTypeAnnotation():N.STRING_UNARY_OPERATORS.indexOf(t)>=0?N.stringTypeAnnotation():N.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?N.booleanTypeAnnotation():void 0}function f(e){var t=e.operator;if(N.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return N.numberTypeAnnotation();if(N.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return N.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),i=this.get("left");return i.isBaseType("number")&&r.isBaseType("number")?N.numberTypeAnnotation():i.isBaseType("string")||r.isBaseType("string")?N.stringTypeAnnotation():N.unionTypeAnnotation([N.stringTypeAnnotation(),N.numberTypeAnnotation()])}}function h(){return N.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function d(){return N.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function y(){return this.get("expressions").pop().getTypeAnnotation()}function v(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;if("++"===t||"--"===t)return N.numberTypeAnnotation()}function g(){return N.stringTypeAnnotation()}function b(){return N.numberTypeAnnotation()}function x(){return N.booleanTypeAnnotation()}function E(){return N.nullLiteralTypeAnnotation()}function A(){return N.genericTypeAnnotation(N.identifier("RegExp"))}function S(){return N.genericTypeAnnotation(N.identifier("Object"))}function _(){return N.genericTypeAnnotation(N.identifier("Array"))}function T(){return _()}function P(){return N.genericTypeAnnotation(N.identifier("Function"))}function w(){return C(this.get("callee"))}function k(){return C(this.get("tag"))}function C(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?N.genericTypeAnnotation(N.identifier("AsyncIterator")):N.genericTypeAnnotation(N.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.Class=t.Function=t.Identifier=void 0;var D=r(i);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return a(D).default}}),t.VariableDeclarator=o,t.TypeCastExpression=u,t.NewExpression=l,t.TemplateLiteral=p,t.UnaryExpression=c,t.BinaryExpression=f,t.LogicalExpression=h,t.ConditionalExpression=d,t.SequenceExpression=y,t.AssignmentExpression=v,t.UpdateExpression=m,t.StringLiteral=g,t.NumericLiteral=b,t.BooleanLiteral=x,t.NullLiteral=E,t.RegExpLiteral=A,t.ObjectExpression=S,t.ArrayExpression=_,t.RestElement=T,t.CallExpression=w,t.TaggedTemplateExpression=k;var O=r(n),N=s(O);u.validParent=!0,T.validParent=!0,t.Function=P,t.Class=P},function(e,t,r,i,n,s,a){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(I.isIdentifier(a)){if(!r(a.name))return!1}else if(I.isLiteral(a)){if(!r(a.value))return!1}else{if(I.isMemberExpression(a)){if(a.computed&&!I.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!I.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function p(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function c(){return this.scope.isStatic(this.node)}function f(e){return!this.has(e)}function h(e,t){return this.node[e]===t}function d(e){return I.isType(this.type,e)}function y(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function v(e){return!("body"!==thiLine truncated
|
||||
this.registerBinding(e,u)}else{var l=this.getProgramParent(),p=t.getBindingIdentifiers(!0);for(var c in p)for(var f=p[c],h=Array.isArray(f),d=0,f=h?f:(0,w.default)(f);;){var y;if(h){if(d>=f.length)break;y=f[d++]}else{if(d=f.next(),d.done)break;y=d.value}var v=y,m=this.getOwnBinding(c);if(m){if(m.identifier===v)continue;this.checkBlockScopedCollisions(m,e,c,v)}m&&m.path.isFlow()&&(m=null),l.references[c]=!0,this.bindings[c]=new U.default({identifier:v,existing:m,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(G.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(G.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(G.isClassBody(e)){for(var i=e.body,n=Array.isArray(i),s=0,i=n?i:(0,w.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(G.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(G.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if(!this.isPure(f,t))return!1}return!0}if(G.isObjectExpression(e)){for(var h=e.properties,d=Array.isArray(h),y=0,h=d?h:(0,w.default)(h);;){var v;if(d){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var m=v;if(!this.isPure(m,t))return!1}return!0}return G.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):G.isClassProperty(e)||G.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):G.isUnaryExpression(e)?this.isPure(e.argument,t):G.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){H++,this._crawl(),H--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,S.default)(null),this.bindings=(0,S.default)(null),this.globals=(0,S.default)(null),this.uids=(0,S.default)(null),this.data=(0,S.default)(null),e.isLoop())for(var t=G.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,w.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("param",f)}e.isCatchClause()&&this.registerBinding("let",e);var h=this.getProgramParent();if(!h.crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(X,d),this.crawling=!1;for(var y=d.assignments,v=Array.isArray(y),m=0,y=v?y:(0,w.default)(y);;){var g;if(v){if(m>=y.length)break;g=y[m++]}else{if(m=y.next(),m.done)break;g=m.value}var b=g,x=b.getBindingIdentifiers(),E=void 0;for(var A in x)b.scope.getBinding(A)||(E=E||b.scope.getProgramParent(),E.addGlobal(x[A]));b.scope.registerConstantViolation(b)}for(var _=d.references,T=Array.isArray(_),P=0,_=T?_:(0,w.default)(_);;){var k;if(T){if(P>=_.length)break;k=_[P++]}else{if(P=_.next(),P.done)break;k=P.value}var C=k,D=C.scope.getBinding(C.node.name);D?D.reference(C):C.scope.getProgramParent().addGlobal(C.node)}for(var O=d.constantViolations,N=Array.isArray(O),I=0,O=N?O:(0,w.default)(O);;){var F;if(N){if(I>=O.length)break;F=O[I++]}else{if(I=O.next(),I.done)break;F=I.value}var B=F;B.scope.registerConstantViolation(B)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(G.ensureBlock(t.node),t=t.get("body"));var r=e.unique,i=e.kind||"var",n=null==e._blockHoist?2:e._blockHoist,s="declaration:"+i+":"+n,a=!r&&t.getData(s);if(!a){var o=G.variableDeclaration(i,[]);o._generated=!0,o._blockHoist=n;var u=t.unshiftContainer("body",[o]);a=u[0],r||t.setData(s,a)}var l=G.variableDeclarator(e.id,e.init);a.node.declarations.push(l),this.registerBinding(i,a.get("declarations").pop())},e.Line truncated
|
||||
},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,f.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?Line truncated
|
||||
}function Y(e){return!(!e||!pe.VISITOR_KEYS[e.type])}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var K=r(i),W=E(K),G=r(n),q=E(G),H=r(s),X=E(H),J=r(a);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return J.NOT_LOCAL_BINDING}}),t.is=S,t.isType=_,t.validate=T,t.shallowEqual=P,t.appendToMemberExpression=w,t.prependToMemberExpression=k,t.ensureBlock=C,t.clone=D,t.cloneWithoutLoc=O,t.cloneDeep=N,t.buildMatchMemberExpression=I,t.removeComments=F,t.inheritsComments=B,t.inheritTrailingComments=R,t.inheritLeadingComments=L,t.inheritInnerComments=M,t.inherits=V,t.assertNode=U,t.isNode=Y;var $=r(o);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return $.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return $.getOuterBindingIdentifiers}});var z=r(u);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return z.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return z.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return z.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return z.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return z.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return z.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return z.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return z.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return z.isImmutable}});var Q=r(l);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return Q.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return Q.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return Q.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return Q.toIdentifier}}),Object.defineProperty(t,"Line truncated
|
||||
R(R.S+R.F*!ge,"Symbol",{for:function(e){return F(de,e+="")?de[e]:de[e]=oe(e)},keyFor:function(e){if(Se(e))return q(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){xe=!0},useSimple:function(){xe=!1}}),R(R.S+R.F*!ge,"Object",{create:Pe,defineProperty:_e,defineProperties:Te,getOwnPropertyDescriptor:ke,getOwnPropertyNames:Ce,getOwnPropertySymbols:De}),ue&&R(R.S+R.F*(!ge||j(function(){var e=oe();return"[null]"!=le([e])||"{}"!=le({a:e})||"{}"!=le(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Se(e)){for(var t,r,i=[e],n=1;arguments.length>n;)i.push(arguments[n++]);return t=i[1],"function"==typeof t&&(r=t),!r&&X(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!Se(t))return t}),i[1]=t,le.apply(ue,i)}}}),oe[pe][fe]||r(N)(oe[pe],fe,oe[pe].valueOf),U(oe,"Symbol"),U(Math,"Math",!0),U(I.JSON,"JSON",!0)},function(e,t,r,i,n,s,a,o,u,l,p){"use strict";var c,f=r(i)(0),h=r(n),d=r(s),y=r(a),v=r(o),m=r(u),g=(r(l),d.getWeak),b=Object.isExtensible,x=v.ufstore,E={},A=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},S={get:function(e){if(m(e)){var t=g(e);return t===!0?x(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return v.def(this,e,t)}},_=e.exports=r(p)("WeakMap",A,S,v,!0,!0);7!=(new _).set((Object.freeze||Object)(E),7).get(E)&&(c=v.getConstructor(A),y(c.prototype,S),d.NEED=!0,f(["delete","has","get","set"],function(e){var t=_.prototype,r=t[e];h(t,e,function(t,i){if(m(t)&&!b(t)){this._f||(this._f=new c);var n=this._f[e](t,i);return"set"==e?this:n}return r.call(this,t,i)})}))},function(e,t,r,i){r(i)("asyncIterator")},function(e,t,r,i){r(i)("observable")},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w])if((0,x.default)(t[0],r.name))i=t[0][r.name];else if("$"===r.name[0]){var n=+r.name.slice(1);t[n]&&(i=t[n])}null===i&&e.remove(),i&&(i[k]=!0,e.replaceInline(i))},exit:function(e){var t=e.node;t.loc||A.default.clearNode(t)}};e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){return e.expression.typeAnnotation=e.typeAnnotation,e.expression}e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(a.types.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(a.types.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(a.types._class)||this.match(a.types.name)||this.match(a.types._function)||this.match(a.types._var))return this.flowParseDeclare(t)}else if(this.match(a.types.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t,r,i){var n=this.state.potentialArrowAt=r;if(this.match(a.types.colon)){var s=this.startNodeAt(t,r);if(s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),i&&!this.match(a.types.arrow)&&this.unexpected(),n&&this.eat(a.types.arrow)){var o="SequenceExpression"===e.type?e.expressions:[e],u=this.parseArrowExpression(this.startNodeAt(t,r),o);return u.returnType=s.typeAnnotation,u}return this.finishNode(s,"TypeCastExpression")}return e}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return fLine truncated
|
||||
var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(l.test(e)||!u.test(e)||null!=t&&e in Object(t))}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i){function n(e){return!!a&&a in e}var s=r(i),a=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():o.call(t,r,1),!0}var s=r(i),a=Array.prototype,o=a.splice;e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);return r<0?void 0:t[r][1]}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this.__data__,e)>-1}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){var r=this.__data__,i=s(r,e);return i<0?r.push([e,t]):r[i][1]=t,this}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(){this.__data__={hash:new o,map:new(l||u),string:new o}}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return s(this,e).delete(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).get(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).has(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){return s(this,e).set(e,t),this}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n(Object,"create");e.exports=s},function(e,t,r,i){(function(t){var n=r(i),s=n("object"==typeof t&&t),a=n("object"==typeof self&&self),o=n("object"==typeof this&&this),u=s||a||o||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t,r,i){function n(){this.__data__=new s}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){var r=this.__data__;return r instanceof a&&r.__data__.length==u&&(r=this.__data__=new o(r.__data__)),r.set(e,t),this}var a=r(i),o=r(n),u=200;e.exports=s},function(e,t,r,i,n){var s=r(i),a=r(n),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,u=/\\(\\)?/g,l=s(function(e){var t=[];return a(e).replace(o,function(e,r,i,n){t.push(i?n.replace(u,"$1"):r||e)}),t});e.exports=l},function(e,t,r,i){function n(e){if("string"==typeof e||s(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var s=r(i),a=1/0;e.exports=n},function(e,t,r,i,n,s,a,o,u){var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=r(u),y=Object.prototype,v=y.hasOwnProperty,m=y.propertyIsEnumerable,g=!m.call({valueOf:1},"valueOf"),b=c(function(e,t){if(g||h(t)||f(t))return void p(t,d(t),e);for(var r in t)v.call(t,r)&&l(e,r,t[r])});e.exports=b},function(e,t,r,i){function n(e){return s(e,!0,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null!=e&&o(e,t,a)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e){return s(e)&&u.call(e,"callee")&&(!p.call(e,"callee")||l.call(e)==a)}var s=r(i),a="[object Arguments]",o=Object.prototype,u=o.hasOwnProperty,l=o.toString,p=o.propertyIsEnumerable;e.exports=n},function(e,t,r,i,n,s){function a(e){return null!=e&&l(o(e))&&!u(e)}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e){return o(e)&&a(e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n){(function(e){var s=r(i),a=r(n),o="object"==typeof t&&t,u=o&&"object"==typeof e&&e,l=u&&u.exports===o,p=l?s.Buffer:void 0,c=p?function(e){return e instanceof p}:a;e.exports=c}).call(t,r(27)(e))},function(e,t,r,i,n){function s(e){return"string"==typeof e||!a(e)&&o(e)&&p.call(e)==u}var a=r(i),o=r(n),u="[object String]",l=Object.prototype,p=l.toString;e.exports=s},function(e,t,r,i,n,s,a,o,u){function l(e){var t=y(e);if(!t&&!h(e))return c(e);var r=f(e),i=!!r,n=r||[],s=n.length;for(var a in e)!p(e,a)||i&&("length"==a||d(a,s))||t&&"constructor"==a||n.push(a);return n}var p=r(i),c=r(n),f=r(s),h=r(a),d=r(o),y=r(u);e.exports=l},function(e,t,r,i){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a),a};return r.cache=new(n.Cache||s),r}var s=r(i),a="Expected a function";n.Cache=s,e.exports=n},function(e,t,r,i){function n(e){return null==e?"":s(e)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h){"use strict";function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function y(e){return e&&e.__esModule?e:{default:e}}function v(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(D.get("traverseNeedsParent",e.type));k.explode(t),v.node(e,t,r,i,n)}}function m(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var g=r(1915),b=y(g),x=r(6),E=y(x),A=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return y(A).default}});var S=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){retLine truncated
|
||||
if(k=P.next(),k.done)break;D=k.value}var N=D;e[N]?m(e[N],A):e[N]=A}else m(e,A)}}}for(var I in e)if(!v(I)){var F=e[I],B=C.FLIPPED_ALIAS_KEYS[I],R=C.DEPRECATED_KEYS[I];if(R&&(console.trace("Visitor defined for "+I+" but it has been renamed to "+R),B=[R]),B){delete e[I];for(var L=B,M=Array.isArray(L),j=0,L=M?L:(0,S.default)(L);;){var V;if(M){if(j>=L.length)break;V=L[j++]}else{if(j=L.next(),j.done)break;V=j.value}var U=V,Y=e[U];Y?m(Y,F):e[U]=(0,O.default)(F)}}}for(var K in e)v(K)||d(e[K]);return e}function l(e){if(!e._verified){if("function"==typeof e)throw new Error(w.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||p(t,e[t]),!v(t)){if(C.TYPES.indexOf(t)<0)throw new Error(w.get("traverseVerifyNodeType",t));var r=e[t];if("object"===("undefined"==typeof r?"undefined":(0,b.default)(r)))for(var i in r){if("enter"!==i&&"exit"!==i)throw new Error(w.get("traverseVerifyVisitorProperty",t,i));p(t+"."+i,r[i])}}e._verified=!0}}function p(e,t){for(var r=[].concat(t),i=r,n=Array.isArray(i),s=0,i=n?i:(0,S.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+("undefined"==typeof o?"undefined":(0,b.default)(o)))}}function c(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r={},i=0;i<e.length;i++){var n=e[i],s=t[i];u(n);for(var a in n){var o=n[a];s&&(o=f(o,s));var l=r[a]=r[a]||{};m(l,o)}}return r}function f(e,t){var r={};for(var i in e){var n=e[i];Array.isArray(n)&&(n=n.map(function(e){var r=function(r){return e.call(t,r,t)};return r.toString=function(){return e.toString()},r}),r[i]=n)}return r}function h(e){for(var t in e)if(!v(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function d(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function y(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function v(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function m(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var g=r(88),b=o(g),x=r(616),E=o(x),A=r(6),S=o(A);t.explode=u,t.verify=l,t.merge=c;var _=r(i),T=a(_),P=r(n),w=a(P),k=r(9),C=a(k),D=r(s),O=o(D)},function(e,t,r,i){var n=r(i),s=n.Reflect;e.exports=s},function(e,t,r,i){function n(e,t,r,i){return void 0===e||s(e,a[r])&&!o.call(i,r)?t:e}var s=r(i),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r,i,n){function s(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var a=r(i),o=r(n),u=Object.prototype,l=a?a.enumerate:void 0,p=u.propertyIsEnumerable;l&&!p.call({valueOf:1},"valueOf")&&(s=function(e){return o(l(e))}),e.exports=s},function(e,t,r,i){function n(e,t){return s(t,function(t){return e[t]})}var s=r(i);e.exports=n},function(e,t,r,i,n,s){var a=r(i),o=r(n),u=r(s),l=o(function(e,t,r,i){a(t,u(t),e,i)});e.exports=l},function(e,t,r,i){function n(e){return s(e,!1,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a){var o=r(i),u=r(n),l=r(s),p=r(a),c=p(function(e){return e.push(void 0,u),o(l,void 0,e)});e.exports=c},function(e,t,r,i,n,s,a,o){function u(e,t,r,i){e=p(e)?e:h(e),r=r&&!i?f(r):0;var n=e.length;return r<0&&(r=d(n+r,0)),c(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&l(e,t,r)>-1}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Math.max;e.exports=u},function(e,t,r,i,n,s,a){function o(e){for(var t=-1,r=c(e),i=u(e),n=i.length,s=l(e),a=!!s,o=s||[],f=o.length;++t<n;){var d=i[t];a&&("length"==d||p(d,f))||"constructor"==d&&(r||!h.call(e,d))||o.push(d)}return o}var u=r(i),l=r(n),p=r(s),c=r(a),f=Object.prototype,h=f.hasOwnProperty;e.exports=o},function(e,t,r,i,n,s,a){function o(e,t,r){return t=(r?l(e,t,r):void 0===t)?1:p(t),u(c(e),t)}var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=o},function(e,t,r,i,n){function s(e){return e?a(e,o(e)):[]}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,a.default)(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}()},function(e,t,r,i,n,s){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(i),u=a(o),l=r(n),p=a(l),c=r(s),f=a(c);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,f.default)(t)));e.prototype=(0,p.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.default?(0,u.default)(e,t):e.__proto__=t)}},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(e,t){if(!e)throw neLine truncated
|
||||
default:!1},argument:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,a.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")}}}),(0,a.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,a.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}}),(0,a.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,a.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,a.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,a.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,a.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("ObLine truncated
|
||||
o.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var u=a;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(d&&e.length>=1e3&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=y,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c,f){"use strict";function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(C.get("traverseNeedsParent",e.type));w.explode(t),y.node(e,t,r,i,n)}}function v(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var m=r(248),g=d(m),b=r(1),x=d(b),E=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return d(E).default}});var A=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return d(A).default}});var S=r(s);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return d(S).default}}),t.default=y;var _=r(a),T=d(_),P=r(o),w=h(P),k=r(20),C=h(k),D=r(u),O=d(D),N=r(3),I=h(N),F=r(l),B=h(F);t.visitors=w,y.visitors=w,y.verify=w.verify,y.explode=w.explode,y.NodePath=r(p),y.Scope=r(c),y.Hub=r(f),y.cheap=function(e,t){if(e){var r=I.VISITOR_KEYS[e.type];if(r){t(e);for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,x.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a,u=e[o];if(Array.isArray(u))for(var l=u,p=Array.isArray(l),c=0,l=p?l:(0,x.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;y.cheap(h,t)}else y.cheap(u,t)}}}},y.node=function(e,t,r,i,n,s){var a=I.VISITOR_KEYS[e.type];if(a)for(var o=new T.default(r,t,i,n),u=a,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if((!s||!s[f])&&o.visit(e,f))return}};var R=I.COMMENT_KEYS.concat(["tokens","comments","start","end","loc","raw","rawValue"]);y.clearNode=function(e){for(var t=R,r=Array.isArray(t),i=0,t=r?t:(0,x.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;null!=e[s]&&(e[s]=void 0)}for(var a in e)"_"===a[0]&&null!=e[a]&&(e[a]=void 0);B.path.delete(e);for(var o=(0,g.default)(e),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=null}},y.removeProperties=function(e){return y.cheap(e,y.clearNode),e},y.hasType=function(e,t,r,i){if((0,O.default)(i,e.type))return!1;if(e.type===r)return!0;var n={has:!1,type:r};return y(e,{blacklist:i,enter:v},t,n),n.has},y.clearCache=function(){B.clear()},y.copyCache=function(e,t){B.path.has(e)&&B.path.set(t,B.path.get(e))}},function(e,t,r,i){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function o(e){var t=this;do if(e(t))return t;while(t=t.parentPath);return null}function u(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function l(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function p(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var i=void 0,n=g.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,v.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,p=l[t+1];if(i)if(p.listKey&&i.listKey===p.listKey&&p.key<i.key)i=p;else{var c=n.indexOf(i.parentKey),f=n.indexOf(p.parentKey);c>f&&(i=p)}else i=p}return i})}function c(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var i=1/0,n=void 0,s=void 0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<i&&(i=t.length),t}),o=a[0];e:for(var u=0;u<i;u++){for(var l=o[u],p=a,c=Array.isArray(p),f=0,p=c?p:(0,v.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;if(d[u]!==l)break e}n=u,s=l}if(s)return t?t(s,n,a):s;throw new Error("Couldn't find intersection")}function f(){var e=this,t=[];do t.push(e);while(e=e.parentPath);reLine truncated
|
||||
},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return M.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=M.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;M.isAssignmentExpression(e)?r=e.left:M.isVariableDeclarator(e)?r=e.id:(M.isObjectProperty(r)||M.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(M.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,x.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;e(o)}else t.declaration&&e(t.declaration);else if(M.isModuleSpecifier(t))e(t.local);else if(M.isMemberExpression(t))e(t.object),e(t.property);else if(M.isIdentifier(t))i.push(t.name);else if(M.isLiteral(t))i.push(t.value);else if(M.isCallExpression(t))e(t.callee);else if(M.isObjectExpression(t)||M.isObjectPattern(t))for(var u=t.properties,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e(f.key||f.argument)}};n(r);var s=i.join("$");return s=s.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(s.slice(0,20))},e.prototype.isStatic=function(e){if(M.isThisExpression(e)||M.isSuper(e))return!0;if(M.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,i){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var n=!1;if(n||(n="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),n||(n="param"===e.kind&&("let"===t||"const"===t)),n)throw this.hub.file.buildCodeFrameError(i,N.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var i=this.getBinding(e);if(i)return t=t||this.generateUidIdentifier(e).name,new P.default(i,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,i){e[t]&&(e[r]=i,e[t]=null)},e.prototype.dump=function(){var e=(0,_.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var i=t.bindings[r];console.log(" -",r,{constant:i.constant,references:i.references,violations:i.constantViolations.length,kind:i.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(M.isIdentifier(e)){var i=this.getBinding(e.name);if(i&&i.constant&&i.path.isGenericType("Array"))return e}if(M.isArrayExpression(e))return e;if(M.isIdentifier(e,{name:"arguments"}))return M.callExpression(M.memberExpression(M.memberExpression(M.memberExpression(M.identifier("Array"),M.identifier("prototype")),M.identifier("slice")),M.identifier("call")),[e]);var n="toArray",s=[e];return t===!0?n="toConsumableArray":t&&(s.push(M.numericLiteral(t)),n="slicedToArray"),M.callExpression(r.addHelper(n),s)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerBinding("label",e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,x.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("module",f)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?M.unaryExpression("void",M.numericLiteral(0),!0):M.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var i=this.getBinding(r);i&&i.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?t:arguments[2];if(!e)throw new ReferenceError("no `kind`Line truncated
|
||||
@@ -0,0 +1,43 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),i=e[t[0]];return function(e,t,n){i.apply(this,[e,t,n].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function s(e){var t=(e.presets||[]).map(function(e){var t=n(x,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===d(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=h({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return h({},e,{presets:t,plugins:r})}function a(e,t){return v.transform(e,s(t))}function o(e,t,r){return v.transformFromAst(e,t,s(r))}function u(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function l(e){Object.keys(e).forEach(function(t){return u(t,e[t])})}function p(e,t){x.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),x[e]=t}function c(e){Object.keys(e).forEach(function(t){return p(t,e[t])})}function f(){window.removeEventListener("DOMContentLoaded",E)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.availablePresets=t.availablePlugins=void 0;var h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.transform=a,t.transformFromAst=o,t.registerPlugin=u,t.registerPlugins=l,t.registerPreset=p,t.registerPresets=c,t.disableScriptTags=f;var y=r(2492),v=i(y),m=r(2604),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},x=t.availablePresets={};l({"check-es2015-constants":r(692),"external-helpers-2":r(2635),"syntax-async-functions":r(697),"syntax-async-generators":r(2636),"syntax-class-constructor-call":r(1643),"syntax-class-properties":r(1644),"syntax-decorators":r(1064),"syntax-do-expressions":r(1645),"syntax-exponentiation-operator":r(1646),"syntax-export-extensions":r(1647),"syntax-flow":r(698),"syntax-function-bind":r(1648),"syntax-function-sent":r(2637),"syntax-jsx":r(1065),"syntax-object-rest-spread":r(1649),"syntax-trailing-function-commas":r(1066),"transform-async-functions":r(2638),"transform-async-to-generator":r(1067),"transform-async-to-module-method":r(2884),"transform-class-constructor-call":r(1760),"transform-class-properties":r(1800),"transform-decorators":r(1841),"transform-decorators-legacy":r(3353).default,"transform-do-expressions":r(1842),"transform-es2015-arrow-functions":r(768),"transform-es2015-block-scoped-functions":r(769),"transform-es2015-block-scoping":r(774),"transform-es2015-classes":r(777),"transform-es2015-computed-properties":r(780),"transform-es2015-destructuring":r(785),"transform-es2015-duplicate-keys":r(1227),"transform-es2015-for-of":r(790),"transform-es2015-function-name":r(791),"transform-es2015-instanceof":r(4165),"transform-es2015-literals":r(836),"transform-es2015-modules-amd":r(1279),"transform-es2015-modules-commonjs":r(852),"transform-es2015-modules-systemjs":r(2013),"transform-es2015-modules-umd":r(2020),"transform-es2015-object-super":r(858),"transform-es2015-parameters":r(876),"transform-es2015-shorthand-properties":r(878),"transform-es2015-spread":r(893),"transform-es2015-sticky-regex":r(898),"transform-es2015-template-literals":r(913),"transform-es2015-typeof-symbol":r(918),"transform-es2015-unicode-regex":r(924),"transform-es3-member-expression-literals":r(5092),"transform-es3-property-literals":r(5093),"transform-es5-property-mutators":r(5094),"transform-eval":r(5326),"transform-exponentiation-operator":r(1456),"transform-export-extensions":r(2260),"transform-flow-comments":r(5501),"transform-flow-strip-types":r(2261),"transform-function-bind":r(2262),"transform-jscript":r(5502),"transform-object-assign":r(5503),"transform-object-rest-spread":r(2263),"transform-object-set-prototype-of-to-assign":r(5534)Line truncated
|
||||
var h=r(1),d=n(h),y=r(17),v=n(y),m=r(11),g=n(m);t.assertEach=a,t.assertOneOf=o,t.assertNodeType=u,t.assertNodeOrValueType=l,t.assertValueType=p,t.chain=c,t.default=f;var b=r(3),x=i(b),E=t.VISITOR_KEYS={},A=t.ALIAS_KEYS={},S=t.NODE_FIELDS={},_=t.BUILDER_KEYS={},T=t.DEPRECATED_KEYS={},P={}},190,[6514,184,1023,181],[6611,6264],function(e,t){function r(e){for(var t=-1,r=e?e.length:0,i=0,n=[];++t<r;){var s=e[t];s&&(n[i++]=s)}return n}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},[6862,6333],[6446,1,2,1621,259,1051,15,689,2503,2509,2517,2507,2506,2512,2505,2516,2515,2508,2504],[6585,2834,19,377,1073,1655,2686,2703,1074,1075,18,702,377,1073,1655],[6591,19,46,1656,2730,2734,376,1666,1073,18,702,2687,2693,2701,2691,2690,2696,2689,2700,2699,2692,2688],[6669,2842],[6682,2837,1683],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},[6532,1089,1087],[6591,5,12,1707,2976,2980,585,1717,1108,7,720,2933,2939,2947,2937,2936,2942,2935,2946,2945,2938,2934],380,[6532,1121,1119],[6591,5,12,1738,3115,3119,476,1757,1136,7,732,3075,3081,3089,3079,3078,3084,3077,3088,3087,3080,3076],285,[6682,3185,1144],380,[6532,1149,1147],[6585,3181,28,391,1163,1776,3235,3252,1164,1166,29,746,391,1163,1776],[6591,28,67,1777,3266,3270,390,1172,1163,29,746,3236,3242,3250,3240,3239,3245,3238,3249,3248,3241,3237],[6682,3360,1801],380,[6532,1178,1176],[6585,3356,40,396,1192,1817,3410,3427,1193,1195,30,761,396,1192,1817],[6591,40,68,1818,3441,3445,395,1201,1192,30,761,3411,3417,3425,3415,3414,3420,3413,3424,3423,3416,3412],[6446,1,2,1853,487,1209,21,775,3561,3567,3575,3565,3564,3570,3563,3574,3573,3566,3562],[6446,1,2,1860,489,1211,22,778,3604,3610,3618,3608,3607,3613,3606,3617,3616,3609,3605],141,[6803,1896,3849,3853,611,3927,1237,801,3806,3812,3820,3810,3809,3815,3808,3819,3818,3811,3807],380,[6532,1253,1251],[6803,1935,4044,4048,502,4138,1268,818,4004,4010,4018,4008,4007,4013,4006,4017,4016,4009,4005],373,[6682,4172,1967],380,[6532,1285,1283],[6585,4168,41,409,1299,1983,4222,4239,1300,1302,31,845,409,1299,1983],[6591,41,69,1984,4253,4257,408,1308,1299,31,845,4223,4229,4237,4227,4226,4232,4225,4236,4235,4228,4224],[6446,1,2,2008,624,1309,23,853,4342,4348,4356,4346,4345,4351,4344,4355,4354,4347,4343],[6821,4389,1313],[6446,32,70,2015,627,1314,33,856,4395,4401,4409,4399,4398,4404,4397,4408,4407,4400,4396],[6591,34,59,2022,4481,4485,513,2032,1316,24,860,4438,4444,4452,4442,4441,4447,4440,4451,4450,4443,4439],[6682,4589,1327],380,[6532,1332,1330],[6868,2064,635,78,1346,877,4642,4648,4656,4646,4645,4651,4644,4655,4654,4647,4643],[6682,4666,4664],380,[6532,1352,1350],[6591,42,71,2083,4767,4771,519,2102,1367,35,887,4727,4733,4741,4731,4730,4736,4729,4740,4739,4732,4728],285,[6682,4872,4870],380,[6532,1386,1384],[6591,43,72,2131,4973,4977,525,2150,1401,25,907,4933,4939,4947,4937,4936,4942,4935,4946,4945,4938,4934],285,183,[6591,4,14,2174,5156,5160,648,937,1424,8,927,5113,5119,5127,5117,5116,5122,5115,5126,5125,5118,5114],[6591,4,14,2180,5216,5220,535,937,1427,8,930,5176,5182,5190,5180,5179,5185,5178,5189,5188,5181,5177],380,[6532,1442,1440],[6591,44,73,2223,5381,5385,540,2242,1458,26,944,5341,5347,5355,5345,5344,5350,5343,5354,5353,5346,5342],285,[6682,5452,5450],380,[6532,1470,1468],[6591,45,74,2295,5669,5673,550,2313,1506,36,970,5629,5635,5643,5633,5632,5638,5631,5642,5641,5634,5630],285,[6682,5740,5738],380,[6532,1519,1517],[6591,38,75,2334,5844,5848,554,2352,1534,37,984,5804,5810,5818,5808,5807,5813,5806,5817,5816,5809,5805],285,[6682,5915,5913],380,[6532,1547,1545],function(e,t,r){e.exports={default:r(2428),__esModule:!0}},[6864,450,1562,2380,5990,6007,1566,1e3,450,1562,2380],[6868,2381,449,6081,1562,1e3,5991,5997,6005,5995,5994,6e3,5993,6004,6003,5996,5992],103,373,380,[6532,1585,1019],[6613,6292],function(e,t,r){"use strict";var i=function(e,t,r,i,n,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,i,n,s,a,o],p=0;u=new Error(t.replace(/%s/g,function(){return l[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=i},function(e,t,r){var i=r(2457),n=r(6305),s=r(6390),a=r(1607),o=a(function(e){return e.push(void 0,n),i(s,void 0,e)});e.exports=o},[6793,1605,2473],[6816,6329,1612,571,684],function(e,t){"use strict";function r(e){return 10===e||13===e||8232===e||8233===e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNewLine=r;var i=t.lineBreak=/\r\n?|\n|\u2028|\u2029/;t.lineBreakG=new RegExp(i.source,"g"),t.nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/},183,[6536,1641,1642,461],460,[6575,1654,578,1069],83,460,83,285,[6525,1695,1088],460,[6575,1705,584,1104],83,460,83,[6525,1730,1120],[6585,1718,5,385,1136,1737,3074,3091,1137,1138,7,732,385,1136,1737],460,[6580,736,1140,85,3166],[6525,1770,1148],460,[6580,749,1169,86,3339],[6525,1811,1177],460,[6580,764,1198,87,3514],183,[6536,1850,1851,485],[6440,1,397,1209,18Line truncated
|
||||
(0,u.default)(this,t);var n=(0,p.default)(this,e.call(this));return n.initialized=!1,n.raw=(0,A.default)({},r),n.key=n.take("name")||i,n.manipulateOptions=n.take("manipulateOptions"),n.post=n.take("post"),n.pre=n.take("pre"),n.visitor=n.normaliseVisitor((0,_.default)(n.take("visitor"))||{}),n}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var s=r,o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var p=l;if(p){var c=p.apply(this,i);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=x.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(v.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=T,r=Array.isArray(t),i=0,t=r?t:(0,a.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return x.default.explode(e),e},t}(g.default);t.default=P,e.exports=t.default},[6437,558],[6490,2,460],[6491,1628,559,3],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2605),s=i(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var i in r.bindings){var n=r.bindings[i];if("const"===n.kind||"module"===n.kind)for(var a=n.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l;throw p.buildCodeFrameError(t.get("readOnly",i))}}}}}},e.exports=t.default},[6507,1059],[6511,1637],190,581,function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},[6552,46,107,463],[6490,46,463],function(e,t){function r(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?n:t,e>-1&&e%1==0&&e<t}var i=/^\d+$/,n=9007199254740991;e.exports=r},[6582,2838],[6552,46,109,466],[6490,46,466],265,[6575,1664,580,705],[6580,1664,1076,467,2754],[6565,2823],[6580,708,1081,83,2819],[6667,2840],[6510,2852],[6706,716,191,190,272,380],function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},[6527,272,190,110],function(e,t){var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},[6552,12,112,470],[6490,12,470],701,[6582,1720],[6552,12,114,473],[6490,12,473],265,[6575,1715,587,723],[6580,1715,1111,474,3e3],[6510,3031],[6706,731,195,194,276,383],713,714,[6527,276,194,116],716,[6582,1720],[6552,12,118,477],[6490,12,477],[6561,1759],[6565,3169],[6568,1140,1141,85],[6667,3190],[6679,3180],[6510,3202],[6706,745,200,199,283,388],713,714,[6527,283,199,119],716,[6582,3186],[6552,67,121,480],[6490,67,480],[6565,3343],701,[6568,1169,750,86],[6574,1169,286],[6667,3365],[6679,3355],[6510,3377],[6706,760,204,203,291,393],713,714,[6527,291,203,123],716,[6582,3361],[6552,68,125,483],[6490,68,483],[6565,3518],701,[6568,1198,765,87],[6574,1198,294],function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var i=e.node;if(i.shadow)return;i.shadow={this:!1},i.type="FunctionExpression";var n=t.thisExpression();n._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),n]))),e.replaceWith(t.callExpression(t.memberExpression(i,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(3528),s=i(n);t.default=function(e){function t(e,t){for(var i=t.get(e),n=i,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u,p=l.node;if(l.isFunctionDeclaration()){var c=r.variableDeclaration("let",[r.variableDeclarator(p.id,r.toExpression(p))]);c._blockHoist=2,p.id=null,l.replaceWith(c)}}}var r=e.types;return{visitoLine truncated
|
||||
p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;r=A(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name,i=this.exports[r];if(i&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=m.assignmentExpression(e.node.operator[0]+"=",t.node,m.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var s=[];s.push(n);var a=void 0;a="--"===e.node.operator?"+":"-",s.push(m.binaryExpression(a,t.node,m.numericLiteral(1)));for(var o=e.replaceWithMultiple(m.sequenceExpression(s)),u=o,l=Array.isArray(u),c=0,u=l?u:(0,p.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var h=f;this.requeueInParent(h)}}}}};return{inherits:r(2373),visitor:{ThisExpression:function(e,t){this.ranCommonJS||t.opts.allowTopLevelThis===!0||e.findParent(function(e){return!e.is("shadow")&&_.indexOf(e.type)>=0})||e.replaceWith(m.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var i=T[t];if(i)return i;var n=e.scope.generateUidIdentifier((0,h.basename)(t,(0,h.extname)(t))),s=m.variableDeclaration("var",[m.variableDeclarator(n,g(m.stringLiteral(t)).expression)]);return f[t]&&(s.loc=f[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),T[t]=n}function i(e,t,r){var i=e[t]||[];e[t]=i.concat(r)}this.ranCommonJS=!0;var n=!!this.opts.strict,s=e.scope;s.rename("module"),s.rename("exports"),s.rename("require");for(var o=!1,l=!1,c=e.get("body"),f=(0,u.default)(null),d=(0,u.default)(null),y=(0,u.default)(null),v=[],_=(0,u.default)(null),T=(0,u.default)(null),P=!1,w=c,k=Array.isArray(w),C=0,w=k?w:(0,p.default)(w);;){var D;if(k){if(C>=w.length)break;D=w[C++]}else{if(C=w.next(),C.done)break;D=C.value}var O=D;if(O.isExportDeclaration()){o=!0;for(var N=[].concat(O.get("declaration"),O.get("specifiers")),I=N,F=Array.isArray(I),B=0,I=F?I:(0,p.default)(I);;){var R;if(F){if(B>=I.length)break;R=I[B++]}else{if(B=I.next(),B.done)break;R=B.value}var L=R,M=L.getBindingIdentifiers();if(M.__esModule)throw L.buildCodeFrameError('Illegal export "__esModule"')}}if(O.isImportDeclaration()){var j;l=!0;var V=O.node.source.value,U=f[V]||{specifiers:[],maxBlockHoist:0,loc:O.node.loc};(j=U.specifiers).push.apply(j,O.node.specifiers),"number"==typeof O.node._blockHoist&&(U.maxBlockHoist=Math.max(O.node._blockHoist,U.maxBlockHoist)),f[V]=U,O.remove()}else if(O.isExportDefaultDeclaration()){if(P)throw O.buildCodeFrameError("Only one default export allowed per module.");var Y=O.get("declaration");if(Y.isFunctionDeclaration()){var K=Y.node.id,W=m.identifier("default");K?(i(d,K.name,W),v.push(A(W,K)),O.replaceWith(Y.node)):(v.push(A(W,m.toExpression(Y.node))),O.remove())}else if(Y.isClassDeclaration()){var G=Y.node.id,q=m.identifier("default");G?(i(d,G.name,q),O.replaceWithMultiple([Y.node,A(q,G)])):O.replaceWith(A(q,m.toExpression(Y.node)))}else O.replaceWith(A(m.identifier("default"),Y.node)),O.parentPath.requeue(O.get("expression.left"));P=!0}else if(O.isExportNamedDeclaration()){var H=O.get("declaration");if(H.node){if(H.isFunctionDeclaration()){var X=H.node.id;i(d,X.name,X),v.push(A(X,X)),O.replaceWith(H.node)}else if(H.isClassDeclaration()){var J=H.node.id;i(d,J.name,J),O.replaceWithMultiple([H.node,A(J,J)]),y[J.name]=!0}else if(H.isVariableDeclaration()){for(var $=H.get("declarations"),z=$,Q=Array.isArray(z),Z=0,z=Q?z:(0,p.default)(z);;){var ee;if(Q){if(Z>=z.length)break;ee=z[Z++]}else{if(Z=z.next(),Z.done)break;ee=Z.value}var te=ee,re=te.get("id"),ie=te.get("init");ie.node||ie.replaceWith(m.identifier("undefined")),re.isIdentifier()&&(i(d,re.node.name,re.node),ie.replaceWith(A(re.node,ie.node).expression),y[re.node.name]=!0)}O.replaceWith(H.node)}continue}var ne=O.get("specifiers"),se=[],ae=O.node.source;if(ae)for(var oe=r(ae.value,O.node._blockHoist),ue=ne,le=Array.isArray(ue),pe=0,ue=le?ue:(0,p.default)(ue);;){var ce;if(le){if(pe>=ue.length)break;ce=ue[pe++]}else{if(pe=ue.next(),pe.done)break;ce=pe.value}var fe=ce;fe.isExportNamespaceSpecifier()||fe.isExportDefaultSpecifier()||fe.isExportSpecifier()&&("default"===fe.node.local.name?v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(m.callExpression(this.addHelper("interopRequireDefault"),[oe]),fe.node.local))):v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(oe,fe.node.local))),y[fe.node.exported.name]=!0)}else for(var he=ne,de=Array.isArray(he),ye=0,he=de?he:(0,p.default)(he);;){var ve;if(de){if(ye>=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var me=ve;me.isExportSpecifier()&&(i(d,me.node.local.name,me.node.exported),y[me.node.exported.name]=!0,se.push(A(me.node.exported,me.node.local)))}O.replaceWithMultiple(se)}else if(O.isExportAllDeclaration()){var ge=S({OBJECT:r(O.node.source.value,O.node._blockHoist)});ge.loc=O.node.loc,v.push(ge),Line truncated
|
||||
if(null!=r){var i=l.default[t];if(i&&i.alias&&(i=l.default[i.alias]),i){var n=o[i.type];n&&(r=n(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=s;var a=r(1048),o=n(a),u=r(572),l=i(u);t.config=l.default},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return!!e}function a(e){return c.booleanify(e)}function o(e){return c.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=s,t.booleanString=a,t.list=o;var u=r(2486),l=n(u),p=r(1050),c=i(p);t.filename=l.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){var r=t||n.EXTENSIONS,i=C.default.extname(e);return(0,S.default)(r,i)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(y.default).join("|"),"i")),"string"==typeof e){e=(0,O.default)(e),((0,m.default)(e,"./")||(0,m.default)(e,"*/"))&&(e=e.slice(2)),(0,m.default)(e,"**/")&&(e=e.slice(3));var t=E.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,w.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?(0,b.default)(e)?o([e],t):(0,T.default)(e)?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];if(e=(0,O.default)(e),r){for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,f.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(p(o,e))return!1}return!0}if(t.length)for(var u=t,l=Array.isArray(u),c=0,u=l?u:(0,f.default)(u);;){var h;if(l){if(c>=u.length)break;h=u[c++]}else{if(c=u.next(),c.done)break;h=c.value}var d=h;if(p(d,e))return!0}return!1}function p(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var c=r(1),f=i(c),h=r(48);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return h.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return h.inspect}}),t.canCompile=n,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var d=r(6392),y=i(d),v=r(6409),m=i(v),g=r(2482),b=i(g),x=r(6416),E=i(x),A=r(50),S=i(A),_=r(82),T=i(_),P=r(255),w=i(P),k=r(187),C=i(k),D=r(2486),O=i(D);n.EXTENSIONS=[".js",".jsx",".es6",".es"]},[6457,39,16,2,1,2518,259,1622,15,689],[6460,367],[6475,104,2538,2537,2535,2533,2536,2534,2532,105,1624,574,2539,2540],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function a(e){this.token("..."),this.print(e.argument,e)}function o(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function u(e){this.printJoin(e.decorators,e),this._method(e)}function l(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(b.isAssignmentPattern(eLine truncated
|
||||
t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},[6543,1683,2679,2682,2683,376,2642,18],[6553,268,46,577,107,699,700,463,2654],[6556,2661,1072],[6561,2685],[6565,2681],[6584,46],[6597,18],[6601,46],function(e,t){!function(){"use strict";function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function i(e){return e>=48&&e<=55}function n(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&h.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return e<128?d[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?y[e]:f.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:c.NonAsciiIdentifierStart.test(a(e))}function p(e){return e<128?y[e]:c.NonAsciiIdentifierPart.test(a(e))}var c,f,h,d,y,v;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\Line truncated
|
||||
var K;if(U){if(Y>=V.length)break;K=V[Y++]}else{if(Y=V.next(),Y.done)break;K=Y.value}var W=K;W.remove()}y.length&&(e.isClassExpression()?(e.scope.push({id:v}),e.replaceWith(t.assignmentExpression("=",v,e.node))):(e.node.id||(e.node.id=v),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(y))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){var r=t.get("body"),i=r.get("body");i.some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(691),o=i(a);e.exports=t.default},[6675,3374],1580,[6512,204,202],[6701,755,3388,3387,201,1186,1814],[6516,288,393,1803],[6703,1175],[6519,1179,289,1182,290,203,599,3389,759,1810,123],[6708,757,758,394,1187,203,1805,288],[6710,1811,1177],[6523,203,600,1183],[6524,203,394,3379,1183],[6711,289,56,393],[6712,290],[6537,3382,123,599,56],685,[6540,3396,1807],[6584,68],[6597,30],[6601,68],1658,[6636,598,30],1658,[6475,124,3471,3470,3468,3466,3469,3467,3465,125,1824,762,3472,3473],[6553,754,68,601,125,762,763,483,3475],1784,1660,1669,[6556,3486,484],[6557,3481,1827,1828,1831,3511,3512,3513,126,87],[6558,3502],[6559,1830,484],[6615,3510],[6645,3489,87,294],1674,1794,[6660,87],[6617,1829,602,766],[6618,294],[6581,767,126,765,293,87],1681,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(16),s=i(n),a=r(1),o=i(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function i(e,r,i){var n=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var h;if(p){if(c>=l.length)break;h=l[c++]}else{if(c=l.next(),c.done)break;h=c.value}var d=h;n.push(f({CLASS_REF:r,DECORATOR:d}))}}for(var y=(0,s.default)(null),v=e.get("body.body"),m=Array.isArray(v),g=0,v=m?v:(0,o.default)(v);;){var b;if(m){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var x=b,E=x.node.decorators;if(E){var A=u.toKeyAlias(x.node);y[A]=y[A]||[],y[A].push(x.node),x.remove()}}for(var S in y)var _=y[S];return n}function n(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(s.decorators)return!0}}else if(e.isObjectExpression())for(var a=e.node.properties,u=Array.isArray(a),l=0,a=u?a:(0,o.default)(a);;){var p;if(u){if(l>=a.length)break;p=a[l++]}else{if(l=a.next(),l.done)break;p=l.value}var c=p;if(c.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(1064),visitor:{ClassExpression:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(i(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.node.id,r=[];r=r.concat(i(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){n(e)&&a(e)}}}};var u=r(559),l=i(u),p=r(2572),c=i(p),f=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(1645),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},1086,[6512,1204,485],1088,380,[6519,3541,3535,3547,603,772,773,3539,1849,3544,486],714,[6527,1205,772,486],[6529,485],716,[6439,2],[6452,21],[6456,2],[6473,16,21],[6475,127,3596,3595,3593,3591,3594,3592,3590,128,1857,604,3597,3598],[6487,47,2,605,128,604,776,488,3600],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(1),a=n(s),o=r(2),u=n(o),l=r(489),p=r(2591),c=n(p),f=r(1630),h=n(f),d=r(2571),y=i(d),v=r(3602),m=n(v),g=r(22),b=i(g),x=(0,m.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:fuLine truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,n){var s=e.specifiers[0];if(i.isExportNamespaceSpecifier(s)||i.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=n.generateUidIdentifier(a.exported.name),u=void 0;u=i.isExportNamespaceSpecifier(a)?i.importNamespaceSpecifier(o):i.importDefaultSpecifier(o),r.push(i.importDeclaration([u],e.source)),r.push(i.exportNamedDeclaration(null,[i.exportSpecifier(o,a.exported)])),t(e,r,n)}}var i=e.types;return{inherits:r(1647),visitor:{ExportNamedDeclaration:function(e){var r=e.node,i=e.scope,n=[];t(r,n,i),n.length&&(r.specifiers.length>=1&&n.push(r),e.replaceWithMultiple(n))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(1),s=i(n);t.default=function(e){var t=e.types,i="@flow";return{inherits:r(698),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,n=r,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u;l.value.indexOf(i)>=0&&(l.value=l.value.replace(i,""),l.value.replace(/\*/g,"").trim()||(l.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){var i=t.params[r];i.optional=!1}},TypeCastExpression:function(e){var r=e.node;do r=r.expression;while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function i(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function n(e,r){var n=i(e,r);if(n)return n;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(1648),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,i=t.callee;if(s.isBindExpression(i)){var a=n(i,r);t.callee=s.memberExpression(i.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){var t=e.node,r=e.scope,i=n(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[i]))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5504),s=i(n);t.default=function(e){function t(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var a;if(r){if(n>=t.length)break;a=t[n++]}else{if(n=t.next(),n.done)break;a=n.value}var o=a;if(i.isSpreadProperty(o))return!0}return!1}var i=e.types;return{inherits:r(1649),visitor:{ObjectExpression:function(e,r){function n(){o.length&&(a.push(i.objectExpression(o)),o=[])}if(t(e.node)){for(var a=[],o=[],u=e.node.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;i.isSpreadProperty(f)?(n(),a.push(f.argument)):o.push(f)}n(),i.isObjectExpression(a[0])||a.unshift(i.objectExpression([])),e.replaceWith(i.callExpression(r.addHelper("extends"),a))}}}}},e.exports=t.default},1086,[6512,1486,544],1088,380,[6519,5517,5511,5523,660,960,961,5515,2270,5520,545],714,[6527,1487,960,545],[6529,544],716,1086,[6512,1493,546],1088,380,[6519,5549,5543,5555,661,964,965,5547,2279,5552,547],714,[6527,1494,964,547],[6529,546],716,103,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,n=!0,s=0;s<r.length;s++){var a=r[s],o=i.toComputedKey(a);if(i.isLiteral(o,{value:"displayName"})){n=!1;break}}n&&r.unshift(i.objectProperty(i.identifier("displayName"),i.stringLiteral(e)))}function r(e){if(!e||!i.isCallExpression(e))return!1;if(!n(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!i.isObjectExpression(r)}var i=e.types,n=i.buildMatchMemberExpression("React.createClass");return{visitor:{ExportDefaultDeclaration:function(e,i){var n=e.node;if(r(n.declaration)){var a=i.file.opts.basename;"index"===a&&(a=s.default.basename(s.default.dirname(i.file.opts.filename))),t(a,n.declaration)}},CallExpression:function(e){var n=e.node;if(r(n)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(i.isMemberExpression(s)&&(s=s.property),i.isIdentifier(s)&&t(s.name,n))}}}}};var n=r(187),s=i(n);e.exports=t.default},1086,[6512,1500,548],1088,380,[6519,5598,5592,5604,662,968,969,5596,2290,5601,549],714,[6527,1501,968,54Line truncated
|
||||
if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(r,"Invalid regular expression flag")}return this.finishToken(p.types.regexp,{pattern:n,flags:s})}},{key:"readInt",value:function(e,t){for(var r=this.state.pos,i=0,n=0,s=null==t?1/0:t;n<s;++n){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0,o>=e)break;++this.state.pos,i=i*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:i}},{key:"readRadixNumber",value:function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(p.types.num,t)}},{key:"readNumber",value:function(e){var t=this.state.pos,r=!1,i=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.state.pos);46===n&&(++this.state.pos,this.readInt(10),r=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||(n=this.input.charCodeAt(++this.state.pos),43!==n&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var s=this.input.slice(t,this.state.pos),a=void 0;return r?a=parseFloat(s):i&&1!==s.length?/[89]/.test(s)||this.state.strict?this.raise(t,"Invalid number"):a=parseInt(s,8):a=parseInt(s,10),this.finishToken(p.types.num,a)}},{key:"readCodePoint",value:function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t}},{key:"readString",value:function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):((0,h.isNewLine)(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(p.types.string,t)}},{key:"readTmplToken",value:function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(p.types.template)?36===r?(this.state.pos+=2,this.finishToken(p.types.dollarBraceL)):(++this.state.pos,this.finishToken(p.types.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(p.types.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if((0,h.isNewLine)(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return n(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),i>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(i)}return String.fromCharCode(t)}}},{key:"readHexChar",value:function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r}},{key:"readWord1",value:function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if((0,l.isIdentifierChar)(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var s=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint();(t?l.isIdentifierStart:l.isIdentifierChar)(a,!0)||this.raise(s,"Invalid Unicode escape"),e+=n(a),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)}},{keyLine truncated
|
||||
},E="0000",A=function(e,t){var r=String(e);return r.length<t?(E+r).slice(-t):r},S=function(e){return Number(e).toString(16).toUpperCase()},_=[].slice,T=function(e){for(var t,r=-1,i=e.length,n=i-1,s=[],a=!0,o=0;++r<i;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=n){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},P=function(e,t){for(var r,i,n=0,s=e.length;n<s;){if(r=e[n],i=e[n+1],t>=r&&t<i)return t==r?i==r+1?(e.splice(n,2),e):(e[n]=t+1,e):t==i-1?(e[n+1]=t,e):(e.splice(n,2,r,t,t+1,i),e);n+=2}return e},w=function(e,t,r){if(r<t)throw Error(u.rangeOrder);for(var i,n,s=0;s<e.length;){if(i=e[s],n=e[s+1]-1,i>r)return e;if(t<=i&&r>=n)e.splice(s,2);else{if(t>=i&&r<n)return t==i?(e[s]=r+1,e[s+1]=n+1,e):(e.splice(s,2,i,t,r+1,n+1),e);if(t>=i&&t<=n)e[s+1]=t;else if(r>=i&&r<=n)return e[s]=r+1,e;s+=2}}return e},k=function(e,t){var r,i,n=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(u.codePointRange);for(;n<a;){if(r=e[n],i=e[n+1],t>=r&&t<i)return e;if(t==r-1)return e[n]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==i)return t+1==e[n+2]?(e.splice(n,4,r,e[n+3]),e):(e[n+1]=t+1,e);s=n,n+=2}return e.push(t,t+1),e},C=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?k(s,r):O(s,r,i),n+=2;return s},D=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?P(s,r):w(s,r,i),n+=2;return s},O=function(e,t,r){if(r<t)throw Error(u.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(u.codePointRange);for(var i,n,s=0,a=!1,o=e.length;s<o;){if(i=e[s],n=e[s+1],a){if(i==r+1)return e.splice(s-1,2),e;if(i>r)return e;i>=t&&i<=r&&(n>t&&n-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(i==r+1)return e[s]=t,e;if(i>r)return e.splice(s,0,t,r+1),e;if(t>=i&&t<n&&r+1<=n)return e;t>=i&&t<n||n==t?(e[s+1]=r+1,a=!0):t<=i&&r+1>=n&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},N=function(e,t){var r=0,i=e.length,n=e[r],s=e[i-1];if(i>=2&&(t<n||t>s))return!1;for(;r<i;){if(n=e[r],s=e[r+1],t>=n&&t<s)return!0;r+=2}return!1},I=function(e,t){for(var r,i=0,n=t.length,s=[];i<n;)r=t[i],N(e,r)&&s.push(r),++i;return T(s)},F=function(e){return!e.length},B=function(e){return 2==e.length&&e[0]+1==e[1]},R=function(e){for(var t,r,i=0,n=[],s=e.length;i<s;){for(t=e[i],r=e[i+1];t<r;)n.push(t),++t;i+=2}return n},L=Math.floor,M=function(e){return parseInt(L((e-65536)/1024)+l,10)},j=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+V(e):e>=32&&e<=126?V(e):e<=255?"\\x"+A(S(e),2):"\\u"+A(S(e),4)},Y=function(e){return e<=65535?U(e):"\\u{"+e.toString(16).toUpperCase()+"}"},K=function(e){var t,r=e.length,i=e.charCodeAt(0);return i>=l&&i<=p&&r>1?(t=e.charCodeAt(1),1024*(i-l)+t-c+65536):i},W=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return U(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?U(t):t+1==r?U(t)+U(r):U(t)+"-"+U(r),n+=2;return"["+i+"]"},G=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return Y(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?Y(t):t+1==r?Y(t)+Y(r):Y(t)+"-"+Y(r),n+=2;return"["+i+"]"},q=function(e){for(var t,r,i=[],n=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<l?(r<l&&s.push(t,r+1),r>=l&&r<=p&&(s.push(t,l),i.push(l,r+1)),r>=c&&r<=f&&(s.push(t,l),i.push(l,p+1),n.push(c,r+1)),r>f&&(s.push(t,l),i.push(l,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=l&&t<=p?(r>=l&&r<=p&&i.push(t,r+1),r>=c&&r<=f&&(i.push(t,p+1),n.push(c,r+1)),r>f&&(i.push(t,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=c&&t<=f?(r>=c&&r<=f&&n.push(t,r+1),r>f&&(n.push(t,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>f&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:i,loneLowSurrogates:n,bmp:s,astral:a}},H=function(e){for(var t,r,i,n,s,a,o=[],u=[],l=!1,p=-1,c=e.length;++p<c;)if(t=e[p],r=e[p+1]){for(i=t[0],n=t[1],s=r[0],a=r[1],u=n;s&&i[0]==s[0]&&i[1]==s[1];)u=B(a)?k(u,a[0]):O(u,a[0],a[1]-1),++p,t=e[p],i=t[0],n=t[1],r=e[p+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([i,l?u:n]),l=!1}else o.push(t);return X(o)},X=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var i=e[t],n=i[1],s=n[0],a=n[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],p=u[1];s==l&&a==p&&(B(o[0])?i[0]=k(i[0],o[0][0]):i[0]=O(i[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},J=function(e){if(!e.length)return[];for(var t,r,i,n,s,a,o=0,u=0,l=0,p=[],h=e.length;o<h;){t=e[o],r=e[o+1]-1,i=M(t),n=j(t),s=M(r),a=j(r);var d=n==c,y=a==f,v=!1;i==s||d&&y?(p.push([[i,s+1],[n,a+1]]),v=!0):p.push([[i,i+1],[n,f+1]]),!v&&i+1<s&&(y?(p.push([[i+1,s+1],[c,a+1]]),v=!0):p.push([[i+1,s],[c,f+1]])),v||p.push([[s,s+1],[c,a+1]]),u=i,l=s,o+=2}return H(p)},$=function(e){var t=[];return m(e,function(e){var r=e[0],i=e[1];t.push(W(r)+W(i))}),t.join("|")},z=fuLine truncated
|
||||
t.Noop=a,t.Directive=o;var u=r(1054);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function n(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=i,t.ClassProperty=n,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function a(e){this.word("do"),this.space(),this.print(e.body,e)}function o(e){this.token("("),this.print(e.expression,e),this.token(")")}function u(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function l(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function p(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||k.isCallExpression(t,{callee:e})||k.isMemberExpression(t)||k.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function f(){this.word("this")}function h(){this.word("super")}function d(e){this.token("@"),this.print(e.expression,e),this.newline()}function y(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function v(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=y,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function m(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function g(){this.semicolon(!0)}function b(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!D.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function S(e){if(this.print(e.object,e),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;k.isLiteral(e.property)&&(0,P.default)(e.property.value)&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function _(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=s,t.DoExpression=a,t.ParenthesizedExpression=o,t.UpdateExpression=u,t.ConditionalExpression=l,t.NewExpression=p,t.SequenceExpression=c,t.ThisExpression=f,t.Super=h,t.Decorator=d,t.CallExpression=v,t.EmptyStatement=g,t.ExpressionStatement=b,t.AssignmentPattern=x,t.AssignmentExpression=E,t.BindExpression=A,t.MemberExpression=S,t.MetaProperty=_;var T=r(253),P=n(T),w=r(51),k=i(w),C=r(1626),D=i(C);t.YieldExpression=m("yield"),t.AwaitExpression=m("await");t.BinaryExpression=E,t.LogicalExpression=E},function(e,t,r){"use strict";function i(){this.word("any")}function n(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("bool")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("Line truncated
|
||||
if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,m.default)(a,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,i.addNewlines&&(s+=i.addNewlines(e,t)||0);var p=w.needsWhitespaceAfter;e&&(p=w.needsWhitespaceBefore),p(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var i=e.loc&&e.loc.start.column;if(i){var n=new RegExp("\\n\\s{1,"+i+"}","g");r=r.replace(n,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,l.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;this._printComment(s)}},e}();t.default=B;for(var R=[r(2552),r(2546),r(2551),r(2545),r(2549),r(2550),r(1054),r(2547),r(2544),r(2548)],L=0;L<R.length;L++){var M=R[L];(0,o.default)(B.prototype,M)}e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(39),s=i(n),a=r(11),o=i(a),u=r(2),l=i(u),p=r(2490),c=i(p),f=function(){function e(t,r){var i=this;(0,l.default)(this,e),this._opts=t,this._map=new c.default.SourceMapGenerator({file:t.sourceMapTarget,sourceRoot:t.sourceRoot}),"string"==typeof r?this._map.setSourceContent(t.sourceFileName,r):"object"===("undefined"==typeof r?"undefined":(0,o.default)(r))&&(0,s.default)(r).forEach(function(e){i._map.setSourceContent(e,r[e])})}return e.prototype.get=function(){return this._map.toJSON()},e.prototype.mark=function(e,t,r,i,n,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===i||(this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=i,this._map.addMapping({name:n,generated:{line:e,column:t},source:null==r?null:s||this._opts.sourceFileName,original:null==r?null:{line:r,column:i}}))},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2),s=i(n),a=function(){function e(t){(0,s.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.start-e.start},0,i.length);if(n>=0){for(;n&&e.start===i[n-1].start;)--n;t=i[n-1],r=i[n]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.end-e.end},0,i.length);if(n>=0){for(;n&&e.end===i[n-1].end;)--n;t=i[n],r=i[n+1],","===r.type.label&&(r=i[n+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,i=t.loc.start.line,n=0,s=r;s<i;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,n++);return n},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var i=t+r>>>1,n=e(this.tokens[i]);return n<0?this._findToken(e,i+1,r):n>0?this._findToken(e,t,i):0===n?i:-1},e}();t.default=a,e.exports=t.default},[6461,366,17,1,51],[6462,51,1055,261],[6463,261],[6464,261],[6465,261],[6467,261,2559,2560,2562,2564,2565,2561],[6468,261],[6469,261],[6470,51],[6472,51],[6474,1,1627,51,1055],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=s.node,u=a.expression;if(l.isMemberExpression(u)){var p=s.scope.maybeGenerateMemoised(u.object),c=void 0,f=[];p?(c=p,f.push(l.assignmentExpression("=",p,u.object))):c=u.object,f.push(l.callExpression(l.memberExpression(l.memberExpression(c,u.property,u.computLine truncated
|
||||
t.addComments=n},[6587,19,376],[6588,18],[6589,379,19],[6590,19,377,18],[6592,19,2695,18],[6593,19,18],[6594,2694,18],[6595,379,19,1075,18],[6596,46,19,18],function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("body"===e.key&&t.isArrowFunctionExpression())return e.replaceWith(e.scope.buildUndefinedNode()),!0},function(e,t){var r=!1;if(r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0}]},[6598,379,19,702,2697,377,18],[6599,19,2698],[6600,19,2704,376,377,2717,18],[6603,46,1657,18],[6604,379,1084,19,1656,1074,18,2756],[6605,2716,2715,2705],[6606,2707,2706,2710,2708,2712],2491,function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},[6607,2709],1615,[6608,2711],1615,function(e,t,r){(function(t){"use strict";var r=t.argv,i=r.indexOf("--"),n=function(e){e="--"+e;var t=r.indexOf(e);return t!==-1&&(i===-1||t<i)};e.exports=function(){return"FORCE_COLOR"in t.env||!(n("no-color")||n("no-colors")||n("color=false"))&&(!!(n("color")||n("colors")||n("color=true")||n("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(10))},function(e,t){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function i(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){return i(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:i,isIterationStatement:r,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:s}}()},[6609,1658],[6610,2713,1658,2714],function(e,t){e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},[6475,108,2725,2724,2722,2720,2723,2721,2719,109,1659,703,2726,2727],2531,[6544,108],[6545,378,19,109,108,579],[6479,704,108],[6546,19,109,108,579],[6547,46,268,108,704],[6548,19,378,109,108,466],[6549,109,108,466],[6550,109,108],[6551,2728,109,703,108,579,466],2541,[6554,46,268,704,703,109],[6611,2731],[6612,2732],function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms"Line truncated
|
||||
function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){function r(e,t){return e.add(t),e}e.exports=r},1902,1602,2458,[6741,1230,800],[6742,3725,3731,1228,3733,3744,3751,3752,3755,3757,3766,3767,3768,399,3796,1891,497,800],[6743,497],[6744,3732,399],[6746,1234,1891,3772,497,1892],function(e,t){function r(e){return i(Object(e))}var i=Object.keys;e.exports=r},1951,function(e,t){function r(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}e.exports=r},[6747,1886,799],[6748,399,3790],function(e,t){function r(e){return e&&e.Object===Object?e:null}e.exports=r},function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},[6750,1229],[6751,3728,1887,3783],function(e,t){function r(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;e.exports=r},[6752,3729,1887,3784],[6753,1886],[6754,1229],2467,[6756,1230,1890],[6757,205],[6758,3769,3798],[6759,3736,1890,800],[6760,3739],[6764,3721,1884,3723,3724,3727,1892],function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},[6765,3742,1893,399,1231,3770,1235,1894,3791],[6766,797],function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},[6767,797],[6768,797],[6769,797],[6770,3740,1893,399,1235,1894],function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,n=i.hasOwnProperty;e.exports=r},[6771,1229,3745,3746,3747,3748,3749,3750],[6772,3735,1889,1232],[6773,1233,798,1231,497],[6774,399,799],function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},[6775,3753],function(e,t){function r(){this.__data__=[]}e.exports=r},[6776,795],[6777,795],[6778,795],[6779,795],[6780,3722,794,1884],[6781,796],[6782,796],[6783,796],[6784,796],1960,830,[6787,794],function(e,t){function r(e){return this.__data__.delete(e)}e.exports=r},function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},[6788,794,1885],[6789,3797,3804],[6790,799],[6791,1228,1230,3754,798,1232,800],[6792,3734],[6793,1888,3759],[6796,798,1236],[6797,205,3800],[6800,1885],[6500,3730,3802],function(e,t){function r(){return[]}e.exports=r},function(e,t){function r(){return!1}e.exports=r},[6501,3803],[6502,3801],[6503,1234,497,799],[6801,3741],[6583,6,13,400,9],[6586,6,9,400],2688,[6587,6,611],[6588,9],[6589,88,6],[6590,6,400,9],[6592,6,3814,9],[6593,6,9],[6594,3813,9],[6804,1242],[6596,13,6,9],2698,[6598,88,6,801,3816,400,9],[6599,6,3817],[6600,6,3823,611,400,3836,9],[6603,13,1897,9],[6806,1896,1238,3929],[6605,3835,3834,3824],[6606,3826,3825,3829,3827,3831],2491,2707,[6607,3828],1615,[6608,3830],1615,2712,2713,[6609,1898],[6610,3832,1898,3833],2716,[6475,133,3844,3843,3841,3839,3842,3840,3838,134,1899,802,3845,3846],2531,[6544,133],[6545,136,6,134,133,612],[6479,803,133],[6546,6,134,133,612],[6547,13,80,133,803],[6548,6,136,134,133,498],[6549,134,133,498],[6727,134,133],[6551,3847,134,802,133,612,498],2541,[6554,13,80,803,802,134],[6611,3850],[6612,3851],2732,[6613,6281],456,[6728,499,135],[6729,3898,3899,3900,3901,3902],[6732,3915,3916,3917,3918,3919],[6733,499,135],[6807,135],[6734,499,135],[6735,804,3922,3923,3924,3925,3926],[6737,135],[6738,499,135],3728,3729,1602,1603,2458,[6808,810],[6741,806,614],[6742,3860,3865,1239,3869,3884,3891,3892,3894,3896,3904,3905,3906,811,3933,1908,500,614],[6743,500],[6744,3867,811],[6745,1905],[6494,3903],[6746,1243,1908,3908,500,1910],3738,[6809,3858,3909],1951,function(e,t){function r(e,t){var r="";if(!e||t<1||t>i)return r;do t%2&&(r+=e),t=n(t/2),t&&(e+=e);while(t);return r}var i=9007199254740991,n=Math.floor;e.exports=r},3740,[6747,1901,1913],[6810,3866],3743,3744,[6750,1240],[6751,3863,1903,3920],3747,[6752,3864,1903,3921],[6753,1901],[6754,1240],2467,[6756,806,1906],[6757,135],[6759,3872,1906,614],[6760,3878],[6764,3854,1900,3857,3859,3862,1910],3758,[6766,809],3761,[6767,809],[6768,809],[6769,809],2581,3766,[6771,1240,3885,3886,3887,3888,3889,3890],[6772,3871,1905,808],3771,[6775,3893],function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},3773,[6776,805],[6777,805],[6778,805],[6779,805],[6780,3855,804,1900],[6781,807],[6782,807],[6783,807],[6784,807],1960,830,[6787,804],3786,3787,3788,[6788,804,3856],[6791,1239,806,1904,613,808,614],[6811,806,1904,3934],[6812,3870],[6813,1902,3868,3928,1914],[6794,3932],[6796,613,1244],[6797,135,3937],[6815,3877,1907,1241,808],[6816,3879,1909,1245,3940],3799,3800,[6501,3939],[6503,1243,500,1913],[6801,3881],[6817,3882,614],[6668,3949],[6670,3951],[6674,3955],[6676,3956],[6677,3958],[6506,1266,1932,3981],[6683,57],[6684,3983],[6685,3984,57],[6686,3985,57],[6687,1265,57],[6688,3986,57],[6689,3987,57],[6690,3988,57],[6691,1265,57],[6692,1265,1931,3990,3991,57],[6693,1932,1266,1264],[6694,193Line truncated
|
||||
var X=(0,o.default)(q.node.value);"string"!==X&&"number"!==X||(W=q.node.value,G=W[H.node.name])}}if(G){var J=i.get("arguments").map(r);if(!n)return;return G.apply(W,J)}}t(i)}}var n=!0,s=void 0,a=new c.default,u=r(this);return n||(u=void 0),{confident:n,deopt:s,value:u}}t.__esModule=!0;var a=r(11),o=i(a),u=r(1),l=i(u),p=r(448),c=i(p);t.evaluateTruthy=n,t.evaluate=s;var f=["String","Number","Math"],h=["random"]}).call(t,function(){return this}())},[6867,417],[6869,4650],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=h.unionTypeAnnotation(i);var n=[],s=a(r,e,n),o=l(e,t);if(o&&!function(){var e=a(r,o.ifStatement);s=s.filter(function(t){return e.indexOf(t)<0}),i.push(o.typeAnnotation)}(),s.length){s=s.concat(n);for(var u=s,p=Array.isArray(u),f=0,u=p?u:(0,c.default)(u);;){var d;if(p){if(f>=u.length)break;d=u[f++]}else{if(f=u.next(),f.done)break;d=f.value}var y=d;i.push(y.getTypeAnnotation())}}if(i.length)return h.createUnionTypeAnnotation(i)}function a(e,t,r){var i=e.constantViolations.slice();return i.unshift(e.path),i.filter(function(e){e=e.resolve();var i=e._guessExecutionStatusRelativeTo(t);return r&&"function"===i&&r.push(e),"before"===i})}function o(e,t){var r=t.node.operator,i=t.get("right").resolve(),n=t.get("left").resolve(),s=void 0;if(n.isIdentifier({name:e})?s=i:i.isIdentifier({name:e})&&(s=n),s)return"==="===r?s.getTypeAnnotation():h.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?h.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(n.isUnaryExpression({operator:"typeof"})?(a=n,o=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,o=n),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:e}))return h.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function u(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var r=u(e);if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var p=o(t,a);p&&s.push(p)}}while(n.length);return s.length?{typeAnnotation:h.createUnionTypeAnnotation(s),ifStatement:r}:l(r,t)}}t.__esModule=!0;var p=r(1),c=n(p);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:s(this,e.name):"undefined"===e.name?h.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?h.numberTypeAnnotation():void("arguments"===e.name)}};var f=r(3),h=i(f);e.exports=t.default},[6870,4649],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(C.isIdentifier(a)){if(!r(a.name))return!1}else if(C.isLiteral(a)){if(!r(a.value))return!1}else{if(C.isMemberExpression(a)){if(a.computed&&!C.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!C.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function a(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(){return this.scope.isStatic(this.node)}function u(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function p(e){return C.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function f(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?C.isBlockStatement(e):!!this.isBlockStatement()&&C.isExpression(e))}function h(e){var t=this,r=!0;do{var i=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return!this.parentPath.isLabeledStatement()&&!C.isBlockStatement(this.container)&&(0,w.default)(C.STATEMENT_OR_BLOCK_KEYS,this.key)}function y(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var i=r.path,n=i.parentPath;return!!n.isImportDeclaration()&&(n.node.source.value===e&&(!t||(!(!i.isImportDefaultSpecifier()||"default"!==t)||(!(!i.isImportNamespaceSpecifier()||"*"!==t)||!(!i.isImportSpecifier()||i.node.imported.name!==t)))))}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function
Line truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",i(e,t)),e.replaceWith(n.noop())}function i(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var n=e.types;return{inherits:r(698),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",i(e.get("typeAnnotation"))),e.replaceWith(n.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},Function:{exit:function(e){var t=e.node;t.params.forEach(function(e){return e.optional=!1})}},"ExportNamedDeclaration|Flow":function(e){var r=e.node,i=e.parent;n.isExportNamedDeclaration(r)&&!n.isFlow(r.declaration)||t(e,i)},ImportDeclaration:function(e){var r=e.node,i=e.parent;n.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,i)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},[6505,5505],[6506,5533,5532,5530],2607,2608,[6508,1490,5526,5525],[6509,2264,545],[6510,5506],[6513,544,1484,5510,660],[6515,544],[6516,959,2267,2265],[6517,2264],[6518,5518,2269,2270,660,545],2445,1090,[6520,958,5519,2266,1488,2265,5512],[6522,1487,958,5522,959],[6523,960,5527,1488],[6524,960,1490,5508,1488],[6525,5521,2266],[6526,660],[6530,1489,1485],[6531,1489],[6533,1489],[6534,1485],[6535,1486],[6537,5509,545,961,1484],[6538,958,5529,1484],[6539,5507,5516,961,1490,2268],[6540,5524,2268],[6541,5531,544,660,961,545],function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5536),s=i(n);t.default=function(e){function t(e){return n.isLiteral(n.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return n.isMemberExpression(t)&&n.isLiteral(n.toComputedKey(t,t.property),{value:"__proto__"})}function i(e,t,r){return n.expressionStatement(n.callExpression(r.addHelper("defaults"),[t,e.right]))}var n=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(n.expressionStatement(n.assignmentExpression("=",o,a))),s.push(i(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;n.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(i(s,s.left.object,t))},ObjectExpression:function(e,r){for(var i=void 0,a=e.node,u=a.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;t(f)&&(i=f.value,(0,o.default)(a.properties,f))}if(i){var h=[n.objectExpression([]),i];a.properties.length&&h.push(a),e.replaceWith(n.callExpression(r.addHelper("extends"),h))}}}}};var a=r(5577),o=i(a);e.exports=t.default},[6505,5537],[6506,5565,5564,5562],2607,2608,[6508,1497,5558,5557],[6509,2273,547],[6510,5538],[6513,546,1491,5542,661],[6515,546],[6516,963,2276,2274],[6517,2273],[6518,5550,2278,2279,661,547],2445,1090,[6520,962,5551,2275,1495,2274,5544],[6522,1494,962,5554,963],[6523,964,5559,1495],[6524,964,1497,5540,1495],[6525,5553,2275],[6526,661],[6530,1496,1492],[6531,1496],[6533,1496],[6534,1492],[6535,1493],[6537,5541,547,965,1491],[6538,962,5561,1491],[6539,5539,5548,965,1497,2277],[6540,5556,2277],[6541,5563,546,661,965,547],1902,1603,[6494,5573],2577,[6495,5567,5568,5569,5571,5572],2579,2467,2581,[6496,2282],373,[6497,5575],[6498,5578,5579],[6499,5570],[6500,5566,5581],[6501,5582],[6502,5580],[6503,5574,2282,5576],function(e,t){"use strict";t.__esModule=!0,t.default=function(){var e={enter:function(e,t){var r=function(){t.isImmutable=!1,e.stop()};return e.isJSXClosingElement()?void e.skip():e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node})?r():void(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable()||r())}};return{visitor:{JSXElement:function(t){if(!t.node._hoisted){var r={isImmutable:!0};t.traverse(e,r),r.isImmutable?t.hoist():t.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5585),s=i(n);t.default=function(e){function t(e){for(var t=0;t<e.lengtLine truncated
|
||||
}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var i=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(i)return i;e=t.path}var n=e.getAncestry();if(n.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=n.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var p=n[o-1],c=s[u-1];if(!p||!c)return"before";if(p.listKey&&p.container===c.container)return p.key>c.key?"before":"after";var f=C.VISITOR_KEYS[p.type].indexOf(p.key),h=C.VISITOR_KEYS[c.type].indexOf(c.key);return f>h?"before":"after"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var i=r.referencePaths,n=i,s=Array.isArray(n),a=0,n=s?n:(0,T.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,p=i,c=Array.isArray(p),f=0,p=c?p:(0,T.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h,y=!!d.find(function(e){return e.node===t.node});if(!y){var v=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==v)return}else l=v}}return l}}function x(e,t){return this._resolve(e,t)||this}function E(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var i=this.scope.getBinding(this.node.name);if(!i)return;if(!i.constant)return;if("module"===i.kind)return;if(i.path!==this){var n=function(){var n=i.path.resolve(e,t);return r.find(function(e){return e.node===n.node})?{v:void 0}:{v:n}}();if("object"===("undefined"==typeof n?"undefined":(0,S.default)(n)))return n.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!C.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,p=Array.isArray(l),c=0,l=p?l:(0,T.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;if(h.isProperty()){var d=h.get("key"),y=h.isnt("computed")&&d.isIdentifier({name:a});if(y=y||d.isLiteral({value:a}))return h.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var v=o.get("elements"),m=v[a];if(m)return m.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var A=r(11),S=n(A),_=r(1),T=n(_);t.matchesPattern=s,t.has=a,t.isStatic=o,t.isnt=u,t.equals=l,t.isNodeType=p,t.canHaveVariableDeclarationOrExpression=c,t.canSwapBetweenExpressionAndStatement=f,t.isCompletionRecord=h,t.isStatementOrBlock=d,t.referencesImport=y,t.getSource=v,t.willIMaybeExecuteBefore=m,t._guessExecutionStatusRelativeTo=g,t._guessExecutionStatusRelativeToDifferentFunctions=b,t.resolve=x,t._resolve=E;var P=r(1566),w=n(P),k=r(3),C=i(k);t.is=a},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=n(s),o=r(1),u=n(o),l=r(3),p=i(l),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!l.react.isCompatTag(e.node.name)){var r=e.scope.getBinding(e.node.name);if(r&&r===t.scope.getBinding(e.node.name))if(r.constant)t.bindings[e.node.name]=r;else for(var i=r.constantViolations,n=Array.isArray(i),s=0,i=n?i:(0,u.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;t.breakOnScopePaths=t.breakOnScopePaths.concat(o.getAncestry())}}}},f=function(){function e(t,r){(0,a.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();if(e)return e.path.getStatementParent()},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kinLine truncated
|
||||
case a.types._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case a.types.name:return this.parseIdentifier(!0);case a.types.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case a.types.braceL:return this.parseObj(!0);default:this.unexpected()}},p.parseBindingList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(a.types.comma),t&&this.match(a.types.comma))i.push(null);else{if(r&&this.eat(e))break;if(this.match(a.types.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var s=[];this.match(a.types.at);)s.push(this.parseDecorator());var o=this.parseMaybeDefault();s.length&&(o.decorators=s),this.parseAssignableListItemTypes(o),i.push(this.parseMaybeDefault(o.start,o.loc.start,o))}return i},p.parseAssignableListItemTypes=function(e){return e},p.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(a.types.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},p.checkLVal=function(e,t,r){switch(e.type){case"Identifier":if(this.state.strict&&(l.reservedWords.strictBind(e.name)||l.reservedWords.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":var n=!0,a=!1,o=void 0;try{for(var u,p=(0,s.default)(e.properties);!(n=(u=p.next()).done);n=!0){var c=u.value;"ObjectProperty"===c.type&&(c=c.value),this.checkLVal(c,t,r)}}catch(e){a=!0,o=e}finally{try{!n&&p.return&&p.return()}finally{if(a)throw o}}break;case"ArrayPattern":var f=!0,h=!1,d=void 0;try{for(var y,v=(0,s.default)(e.elements);!(f=(y=v.next()).done);f=!0){var m=y.value;m&&this.checkLVal(m,t,r)}}catch(e){h=!0,d=e}finally{try{!f&&v.return&&v.return()}finally{if(h)throw d}}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestProperty":case"RestElement":this.checkLVal(e.argument,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},[6481,2,47,179,1018],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var n=r(1),s=i(n),a=r(16),o=i(a),u=r(180),l=r(179),p=i(l),c=r(564),f=p.default.prototype;f.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,u.types.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var h={kind:"loop"},d={kind:"switch"};f.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start),n=this.input.slice(t.start,t.end),s=r.value=n.slice(1,-1);return this.addExtra(r,"raw",n),this.addExtra(r,"rawValue",s),i.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(i,"Directive",e.end,e.loc.end)},f.parseStatement=function(e,t){this.match(u.types.at)&&this.parseDecorators(!0);var r=this.state.type,i=this.startNode();switch(r){case u.types._break:case u.types._continue:return this.parseBreakContinueStatement(i,r.keyword);case u.types._debugger:return this.parseDebuggerStatement(i);case u.types._do:return this.parseDoStatement(i);case u.types._for:return this.parseForStatement(i);case u.types._function:return e||this.unexpected(),this.parseFunctionStatement(i);case u.types._class:return e||this.unexpected(),this.takeDecorators(i),this.parseClass(i,!0);case u.types._if:return this.parseIfStatement(i);case u.types._return:return this.parseReturnStatement(i);case u.types._switch:return this.parseSwitchStatement(i);case u.types._throw:return this.parseThrowStatement(i);case u.types._try:return this.parseTryStatement(i);case u.types._let:case u.types._const:e||this.unexpected();case u.types._var:return this.parseVarStatement(i,r);case u.types._while:return this.parseWhileStatement(i);case u.types._with:return this.parseWithStatement(i);case u.types.braceL:return this.parseBlock();case u.types.semi:return this.parseEmptyStatement(i);case u.types._export:case u.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===u.types._import?this.parseImport(i):this.parseExport(i);case u.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(u.types._function)&&!this.canInsertSemicolon())return this.expect(u.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===u.types.name&&"Line truncated
|
||||
return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},u.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},u.flowParseTypeAlias=function(e){return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(n.types.eq,!0),this.semicolon(),this.finishNode(e,"TypeAlias")},u.flowParseTypeParameter=function(){var e=this.startNode(),t=void 0;this.match(n.types.plusMin)&&("+"===this.state.value?t="plus":"-"===this.state.value&&(t="minus"),this.eat(n.types.plusMin));var r=this.flowParseTypeAnnotatableIdentifier(!1,!1);return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(n.types.eq)&&(this.eat(n.types.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},u.flowParseTypeParameterDeclaration=function(){var e=this.startNode();e.params=[],this.isRelational("<")||this.match(n.types.jsxTagStart)?this.next():this.unexpected();do e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(n.types.comma);while(!this.isRelational(">"));return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},u.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(n.types.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},u.flowParseObjectPropertyKey=function(){return this.match(n.types.num)||this.match(n.types.string)?this.parseExprAtom():this.parseIdentifier(!0)},u.flowParseObjectTypeIndexer=function(e,t){return e.static=t,this.expect(n.types.bracketL),e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser(),this.expect(n.types.bracketR),e.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},u.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(n.types.parenL);this.match(n.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(n.types.parenR)||this.expect(n.types.comma);return this.eat(n.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(n.types.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},u.flowParseObjectTypeMethod=function(e,t,r,i){var n=this.startNodeAt(e,t);return n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),n.static=r,n.key=i,n.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(n,"ObjectTypeProperty")},u.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},u.flowParseObjectType=function(e){var t=this.startNode(),r=void 0,i=void 0,s=void 0;for(t.callProperties=[],t.properties=[],t.indexers=[],this.expect(n.types.braceL);!this.match(n.types.braceR);){var a=!1,o=this.state.start,u=this.state.startLoc;r=this.startNode(),e&&this.isContextual("static")&&(this.next(),s=!0),this.match(n.types.bracketL)?t.indexers.push(this.flowParseObjectTypeIndexer(r,s)):this.match(n.types.parenL)||this.isRelational("<")?t.callProperties.push(this.flowParseObjectTypeCallProperty(r,e)):(i=s&&this.match(n.types.colon)?this.parseIdentifier():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(n.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,s,i)):(this.eat(n.types.question)&&(a=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=a,r.static=s,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(n.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},u.flowObjectTypeSemicolon=function(){this.eat(n.types.semi)||this.eat(n.types.comma)||this.match(n.types.braceR)||this.unexpected()},u.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(n.types.dot);){var s=this.startNodeAt(e,t);s.qualification=i.id,s.id=this.parseIdentifier(),i.id=this.finishNode(s,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},u.flowParseTypeofType=function(){var e=this.startNode();return this.expect(n.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},u.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(n.types.bracketL);this.state.pos<this.input.leLine truncated
|
||||
t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t){e.exports={_args:[[{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},"C:\\src\\babel-standalone"]],_from:"babel-core@6.14.0",_id:"babel-core@6.14.0",_inCache:!0,_installable:!0,_location:"/babel-core",_nodeVersion:"5.11.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/babel-core-6.14.0.tgz_1472082048405_0.022966341115534306"},_npmUser:{email:"hi@henryzoo.com",name:"hzoo"},_npmVersion:"3.10.6",_phantomChildren:{"babel-code-frame":"6.11.0","babel-messages":"6.8.0","babel-runtime":"6.9.2",debug:"2.2.0",esutils:"2.0.2",globals:"8.18.0",invariant:"2.2.1",lodash:"4.14.1","to-fast-properties":"1.0.2"},_requested:{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},_requiredBy:["#DEV:/","/babel-plugin-transform-regenerator","/babel-register"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz",_shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",_shrinkwrap:null,_spec:"babel-core@6.14.0",_where:"C:\\src\\babel-standalone",author:{email:"sebmck@gmail.com",name:"Sebastian McKenzie"},dependencies:{"babel-code-frame":"^6.8.0","babel-generator":"^6.14.0","babel-helpers":"^6.8.0","babel-messages":"^6.8.0","babel-register":"^6.14.0","babel-runtime":"^6.9.1","babel-template":"^6.14.0","babel-traverse":"^6.14.0","babel-types":"^6.14.0",babylon:"^6.9.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.4.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-exists":"^1.0.0","path-is-absolute":"^1.0.0",private:"^0.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.9.0","babel-helper-transform-fixture-test-runner":"^6.13.2","babel-polyfill":"^6.13.0"},directories:{},dist:{shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],license:"MIT",maintainers:[{email:"amjad.masad@gmail.com",name:"amasad"},{email:"hi@henryzoo.com",name:"hzoo"},{email:"npm-public@jessemccarthy.net",name:"jmm"},{email:"loganfsmyth@gmail.com",name:"loganfsmyth"},{email:"sebmck@gmail.com",name:"sebmck"},{email:"me@thejameskyle.com",name:"thejameskyle"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.14.0"}},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,AnimationEvent:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBuLine truncated
|
||||
if(e!==t){if(!u(t)&&!p(t))var d=c(t);s(d||t,function(s,u){if(d&&(u=s,s=t[u]),l(s))h||(h=new n),o(e,t,u,r,i,f,h);else{var p=f?f(e[u],s,u+"",e,t,h):void 0;void 0===p&&(p=s),a(e,u,p)}})}}var n=r(1028),s=r(1602),a=r(2460),o=r(6326),u=r(76),l=r(103),p=r(1614),c=r(1043);e.exports=i},function(e,t,r){function i(e,t,r,i,y,v,m){var g=e[r],b=t[r],x=m.get(b);if(x)return void n(e,r,x);var E=v?v(g,b,r+"",e,t,m):void 0,A=void 0===E;A&&(E=b,u(b)||h(b)?u(g)?E=g:l(g)?E=a(g):(A=!1,E=s(b,!0)):f(b)||o(b)?o(g)?E=d(g):!c(g)||i&&p(g)?(A=!1,E=s(b,!0)):E=g:A=!1),A&&(m.set(b,E),y(E,b,i,v,m),m.delete(b)),n(e,r,E)}var n=r(2460),s=r(1032),a=r(2467),o=r(1041),u=r(76),l=r(2481),p=r(682),c=r(103),f=r(254),h=r(1614),d=r(6414);e.exports=i},function(e,t,r){function i(e,t,r){var i=-1;t=n(t.length?t:[p],u(s));var c=a(e,function(e,r,s){var a=n(t,function(t){return t(e)});return{criteria:a,index:++i,value:e}});return o(c,function(e,t){return l(e,t,r)})}var n=r(1603),s=r(566),a=r(2464),o=r(6331),u=r(1609),l=r(6346),p=r(2480);e.exports=i},[6845,2462],3879,function(e,t){function r(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(n);++i<n;)s[i]=e[i+t];return s}e.exports=r},function(e,t){function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},3740,[6846,2455,6302,6303,6335,6351,1039],[6810,1603],4086,function(e,t,r){function i(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}var n=r(6330);e.exports=i},function(e,t,r){function i(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}var n=r(1606);e.exports=i},3744,[6750,1610],[6751,6300,2459,2476],3747,[6752,6301,2459,1039],[6753,1029],[6754,1610],function(e,t,r){function i(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e===e,a=n(e),o=void 0!==t,u=null===t,l=t===t,p=n(t);if(!u&&!p&&!a&&e>t||a&&o&&l&&!u&&!p||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!p&&e<t||p&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var n=r(683);e.exports=i},function(e,t,r){function i(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l){if(i>=u)return l;var p=r[i];return l*("desc"==p?-1:1)}}return e.index-t.index}var n=r(6345);e.exports=i},[6756,567,2471],[6757,186],[6847,252],4099,function(e,t,r){var i=r(2454),n=r(6406),s=r(1039),a=1/0,o=i&&1/s(new i([,-0]))[1]==a?function(e){return new i(e)}:n;e.exports=o},function(e,t,r){function i(e,t,r,i,n,S,T){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!i(new s(e),new s(t)));case f:case h:case v:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var P=u;case g:var w=S&c;if(P||(P=l),e.size!=t.size&&!w)return!1;var k=T.get(e);if(k)return k==t;S|=p,T.set(e,t);var C=o(P(e),P(t),i,n,S,T);return T.delete(e),C;case x:if(_)return _.call(e)==_.call(t)}return!1}var n=r(1029),s=r(2456),a=r(570),o=r(2469),u=r(2476),l=r(1039),p=1,c=2,f="[object Boolean]",h="[object Date]",d="[object Error]",y="[object Map]",v="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",S=n?n.prototype:void 0,_=S?S.valueOf:void 0;e.exports=i},function(e,t,r){function i(e,t,r,i,o,u){var l=o&a,p=s(e),c=p.length,f=s(t),h=f.length;if(c!=h&&!l)return!1;for(var d=c;d--;){var y=p[d];if(!(l?y in t:n(t,y)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var g=l;++d<c;){y=p[d];var b=e[y],x=t[y];if(i)var E=l?i(x,b,y,t,e,u):i(b,x,y,e,t,u);if(!(void 0===E?b===x||r(b,x,i,o,u):E)){m=!1;break}g||(g="constructor"==y)}if(m&&!g){var A=e.constructor,S=t.constructor;A!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof S&&S instanceof S)&&(m=!1)}return u.delete(e),u.delete(t),m}var n=r(1605),s=r(256),a=2;e.exports=i},[6759,6312,2471,256],[6760,2465],[6852,2475,256],3758,[6766,1038],3761,[6767,1038],[6768,1038],[6769,1038],3766,[6771,1610,6339,6340,6341,6342,6343,6344],[6772,6308,1611,681],function(e,t,r){function i(e){return a(e)||s(e)||!!(o&&e&&e[o])}var n=r(1029),s=r(1041),a=r(76),o=n?n.isConcatSpreadable:void 0;e.exports=i},3771,[6775,6348],3909,3773,[6776,1031],[6777,1031],[6778,1031],[6779,1031],[6780,6296,1027,1600],[6781,1034],[6782,1034],[6783,1034],[6784,1034],4130,4131,[6787,1027],3786,3787,3788,function(e,t,r){function i(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!s||i.length<o-1)return i.push([e,t]),this;r=this.__data__=new a(i)}return r.set(e,t),this}var n=r(1027),s=r(1600),a=r(1601),o=200;e.exports=i},function(e,t){function r(e){return e.match(x)}var i="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",o="["+i+"]",u="["+n+s+"]",l="\\ud83c[\\udffb-\\udfff]",p="(?:"+u+"|"+l+")",c="[^"+i+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",y=p+"?",v="["+a+"]?Line truncated
|
||||
r(e,u,p));r(e,u+1,p);var c=u+1;n(e,t,s,c-1),n(e,t,c+1,a)}}t.quickSort=function(e,t){n(e,t,0,e.length-1)}},function(e,t,r){function i(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new n(t)}function n(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sources"),n=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),p=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(n.map(String),!0),this._sources=l.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=p}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=n.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),n=o.getArg(t,"column");if(r<s.line||r===s.line&&n<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:n+1},consumer:new i(o.getArg(e,"map"))}})}var o=r(686),u=r(6428),l=r(2487).ArraySet,p=r(2488),c=r(6430).quickSort;i.fromSourceMap=function(e){return n.fromSourceMap(e)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},i.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(e,t,r){var n,s=t||null,a=r||i.GENERATED_ORDER;switch(a){case i.GENERATED_ORDER:n=this._generatedMappings;break;case i.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;n.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},i.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var i=[],n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(n>=0){var s=this._originalMappings[n];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n]}return i},t.SourceMapConsumer=i,n.prototype=Object.create(i.prototype),n.prototype.consumer=i,n.fromSourceMap=function(e){var t=Object.create(n.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),i=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],f=0,h=a.length;f<h;f++){var d=a[f],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=i.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=r.indexOf(d.name)),p.push(y)),u.push(y)}return c(t.__originalMappings,o.compareByOriginalPositions),t},n.prototype._version=3,Object.defineProperty(n.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){rLine truncated
|
||||
return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function p(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function c(e){return x.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function f(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function h(e,t){var r=this,i=this.node,n=i[e];return Array.isArray(n)?n.map(function(s,a){return x.default.get({listKey:e,parentPath:r,parent:i,container:n,key:a}).setContext(t)}):x.default.get({parentPath:this,parent:i,container:i,key:e}).setContext(t)}function d(e,t){for(var r=this,i=e,n=Array.isArray(i),s=0,i=n?i:(0,g.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function y(e){return A.getBindingIdentifiers(this.node,e)}function v(e){return A.getOuterBindingIdentifiers(this.node,e)}t.__esModule=!0;var m=r(i),g=o(m);t.getStatementParent=u,t.getOpposite=l,t.getCompletionRecords=p,t.getSibling=c,t.get=f,t._getKey=h,t._getPattern=d,t.getBindingIdentifiers=y,t.getOuterBindingIdentifiers=v;var b=r(n),x=o(b),E=r(s),A=a(E)},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h,d,y,v,m,g,b,x){"use strict";function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var S=r(i),_=A(S),T=r(n),P=A(T),w=r(s),k=E(w),C=r(371),D=A(C),O=r(456),N=A(O),I=r(a),F=A(I),B=r(78),R=A(B),L=r(o),M=A(L),j=r(u),V=E(j),U=r(l),Y=(0,D.default)("babel"),K=function(){function e(t,r){(0,P.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,i=t.parentPath,n=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&i&&(r=i.hub),(0,N.default)(n,"To get a node path the parent needs to exist");var u=s[o],l=U.path.get(n)||[];U.path.has(n)||U.path.set(n,l);for(var p=void 0,c=0;c<l.length;c++){var f=l[c];if(f.node===u){p=f;break}}return p||(p=new e(r,n),l.push(p)),p.setup(i,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new M.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,F.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){V.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){Y.enabled&&Y(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=K,(0,R.default)(K.prototype,r(p)),(0,R.default)(K.prototype,r(c)),(0,R.default)(K.prototype,r(f)),(0,R.default)(K.prototype,r(h)),(0,R.default)(K.prototype,r(d)),(0,R.default)(K.prototype,r(y)),(0,R.default)(K.prototype,r(v)),(0,R.default)(K.prototype,r(m)),(0,R.default)(K.prototype,r(g)),(0,R.default)(K.prototype,r(b)),(0,R.default)(K.prototype,r(x));for(var W=function(){if(q){if(H>=G.length)return"break";X=G[H++]}else{if(H=G.next(),H.done)return"break";X=H.value}var e=X,t="is"+e;K.prototype[t]=function(e){return V[t](this.node,e)},K.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},G=V.TYPES,q=Array.isArray(G),H=0,G=q?G:(0,_.default)(G);;){var X,J=W();if("break"===J)break}var $=function(e){if("_"===e[0])return"continue";V.TYPES.indexOf(e)<0&&V.TYPES.push(e);var t=k[e];K.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var z in k){$(z)}e.exports=t.default},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}fLine truncated
|
||||
this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.indexOf(e)===-1&&this.constantViolations.push(e)},e.prototype.reference=function(e){this.referencePaths.indexOf(e)===-1&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=o,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){for(var i=U.scope.get(e.node)||[],n=i,s=Array.isArray(n),a=0,n=s?n:(0,A.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}i.push(r),U.scope.has(e.node)||U.scope.set(e.node,i)}t.__esModule=!0;var y=r(i),v=h(y),m=r(n),g=h(m),b=r(s),x=h(b),E=r(a),A=h(E),S=r(50),_=h(S),T=r(459),P=h(T),w=r(o),k=h(w),C=r(u),D=h(C),O=r(457),N=h(O),I=r(20),F=f(I),B=r(l),R=h(B),L=r(455),M=h(L),j=r(p),V=f(j),U=r(c),Y=0,K={For:function(e){for(var t=V.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,A.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,i=t.declaration;if(V.isClassDeclaration(i)||V.isFunctionDeclaration(i)){var n=i.id;if(!n)return;var s=r.getBinding(n.name);s&&s.reference(e)}else if(V.isVariableDeclaration(i))for(var a=i.declarations,o=Array.isArray(a),u=0,a=o?a:(0,A.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l,c=V.getBindingIdentifiers(p);for(var f in c){var h=r.getBinding(f);h&&h.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,A.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},W=0,G=function(){function e(t,r){if((0,x.default)(this,e),r&&r.block===t.node)return r;var i=d(t,r,this);return i?i:(this.uid=W++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,void(this.path=t))}return e.prototype.traverse=function(e,t,r){(0,D.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return V.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=V.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;V.isAssignmentExpression(e)?r=e.left:V.isVariableDeclarator(e)?r=e.id:(V.isObjectProperty(r)||V.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(V.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,A.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.doneLine truncated
|
||||
fields:{id:{validate:(0,c.assertNodeType)("Identifier")},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","FunctionLine truncated
|
||||
W.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;delete e[s]}return e}function D(e,t){return O(e,t),N(e,t),I(e,t),e}function O(e,t){F("trailingComments",e,t)}function N(e,t){F("leadingComments",e,t)}function I(e,t){F("innerComments",e,t)}function F(e,t,r){t&&r&&(t[e]=(0,le.default)((0,ie.default)([].concat(t[e],r[e]))))}function B(e,t){if(!e||!t)return e;for(var r=he.INHERIT_KEYS.optional,i=Array.isArray(r),n=0,r=i?r:(0,W.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=he.INHERIT_KEYS.force,l=Array.isArray(u),p=0,u=l?u:(0,W.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=t[f]}return he.inheritsComments(e,t),e}function R(e){if(!L(e))throw new TypeError("Not a valid node "+(e&&e.type))}function L(e){return!(!e||!pe.VISITOR_KEYS[e.type])}function M(e,t,r){if(e){var i=he.VISITOR_KEYS[e.type];if(i){r=r||{},t(e,r);for(var n=i,s=Array.isArray(n),a=0,n=s?n:(0,W.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;M(d,t,r)}else M(l,t,r)}}}}function j(e,t){t=t||{};for(var r=t.preserveComments?me:ge,i=r,n=Array.isArray(i),s=0,i=n?i:(0,W.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,Y.default)(e),p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;e[d]=null}}function V(e,t){return M(e,j,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var U=r(i),Y=v(U),K=r(n),W=v(K),G=r(s),q=v(G),H=r(a),X=v(H),J=r(o);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:functionLine truncated
|
||||
e.key=this.parseMaybeAssign(),this.expect(h.types.bracketR),e.key):(e.computed=!1,e.key=this.match(h.types.num)||this.match(h.types.string)?this.parseExprAtom():this.parseIdentifier(!0))},m.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},m.parseMethod=function(e,t,r){var i=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(h.types.parenL),e.params=this.parseBindingList(h.types.parenR),e.generator=t,this.parseFunctionBody(e),this.state.inMethod=i,e},m.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},m.parseFunctionBody=function(e,t){var r=t&&!this.match(h.types.braceL),i=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var n=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=n,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=i;var o=this.state.strict,u=!1,l=!1;if(t&&(o=!0),!r&&e.body.directives.length){var c=!0,d=!1,y=void 0;try{for(var v,m=(0,f.default)(e.body.directives);!(c=(v=m.next()).done);c=!0){var g=v.value;if("use strict"===g.value.value){l=!0,o=!0,u=!0;break}}}catch(e){d=!0,y=e}finally{try{!c&&m.return&&m.return()}finally{if(d)throw y}}}if(l&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),o){var b=(0,p.default)(null),x=this.state.strict;u&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0);var E=!0,A=!1,S=void 0;try{for(var _,T=(0,f.default)(e.params);!(E=(_=T.next()).done);E=!0){var P=_.value;this.checkLVal(P,!0,b)}}catch(e){A=!0,S=e}finally{try{!E&&T.return&&T.return()}finally{if(A)throw S}}this.state.strict=x}},m.parseExprList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(h.types.comma),this.eat(e))break;i.push(this.parseExprListItem(t,r))}return i},m.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(h.types.comma)?null:this.match(h.types.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem)},m.parseIdentifier=function(e){var t=this.startNode();return this.match(h.types.name)?(!e&&this.state.strict&&v.reservedWords.strict(this.state.value)&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},m.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(h.types.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},m.parseYield=function(){var e=this.startNode();return this.next(),this.match(h.types.semi)||this.canInsertSemicolon()||!this.match(h.types.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.types.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=void 0;var h=r(i),d=f(h),y=r(n),v=f(y),m=r(s),g=f(m),b=r(a),x=f(b),E=r(o),A=f(E),S=r(u),_=f(S),T=r(l),P=r(p),w=r(c),k=f(w),C=(t.plugins={},function(e){function r(e,t){(0,g.default)(this,r),e=(0,P.getOptions)(e);var i=(0,A.default)(this,(0,v.default)(r).call(this,e,t));return i.options=e,i.inModule="module"===i.options.sourceType,i.isReservedWord=T.reservedWords[6],i.input=t,i.plugins=i.loadPlugins(i.options.plugins),i.filename=e.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return(0,_.default)(r,e),(0,x.default)(r,[{key:"hasPlugin",value:function(e){return!(!this.plugins["*"]&&!this.plugins[e])}},{key:"extend",value:function(e,t){this[e]=t(this[e])}},{key:"loadPlugins",value:function(e){var r={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow"));var i=!0,n=!1,s=void 0;try{for(var a,o=(0,d.default)(e);!(i=(a=o.next()).done);i=!0){var u=a.value;if(!r[u]){r[u]=!0;var l=t.plugins[u];l&&l(this)}}}catch(e){n=!0,s=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw s}}return r}},{key:"parse",value:function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)}}]),r}(k.default));t.default=C},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var a=r(i),o=r(n),u=s(o),l=u.default.prototype;l.raise=function(e,t){var r=(0,a.getLineInfo)(this.input,e);t+=" ("+r.line+"Line truncated
|
||||
var a=this.state.clone();try{return e.call(this,t,r,i,n)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,i,n)}}),e.extend("parseParenItem",function(e){return function(t,r,i){if(t=e.call(this,t,r,i),this.eat(o.types.question)&&(t.optional=!0),this.match(o.types.colon)){var n=this.startNodeAt(r,i);return n.expression=t,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(o.types.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(o.types.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r):e.call(this,t,r)}}),e.extend("toAssignableList",function(e){return function(t,r){for(var i=0;i<t.length;i++){var n=t[i];n&&"TypeCastExpression"===n.type&&(t[i]=this.typeCastToParameter(n))}return e.call(this,t,r)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var i=this.startNode(),n=e.call(this,t,r);return this.match(o.types.colon)?(i._exprListItem=!0,i.expression=n,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")):n}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return this.match(o.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,i){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(t,r,i),e.body.push(this.finishNode(t,"ClassMethod"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var i=t.implements=[];do{var n=this.startNode();n.id=this.parseIdentifier(),this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,i.push(this.finishNode(n,"ClassImplements"))}while(this.eat(o.types.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(o.types.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(o.types.question)&&(e.optional=!0),this.match(o.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(o.types._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var i=this.lookahead();(i.type===o.types.name&&"from"!==i.value||i.type===o.types.braceL||i.type===o.types.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(o.types.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){return this.match(o.types.colon)&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parLine truncated
|
||||
}},{key:"nextToken",value:function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(g.types.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())}},{key:"readToken",value:function(e){return(0,m.isIdentifierStart)(e)||92===e?this.readWord():this.getTokenFromCode(e)}},{key:"fullCharCodeAtPos",value:function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888}},{key:"pushComment",value:function(e,t,r,i,n,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:i,loc:new x.SourceLocation(n,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))}},{key:"skipBlockComment",value:function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);r===-1&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,E.lineBreakG.lastIndex=t;for(var i=void 0;(i=E.lineBreakG.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())}},{key:"skipLineComment",value:function(e){for(var t=this.state.pos,r=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())}},{key:"skipSpace",value:function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&E.nonASCIIwhitespace.test(String.fromCharCode(e))))break e;++this.state.pos}}}},{key:"finishToken",value:function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(g.types.ellipsis)):(++this.state.pos,this.finishToken(g.types.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.slash,1)}},{key:"readToken_mult_modulo",value:function(e){var t=42===e?g.types.star:g.types.modulo,r=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(r++,i=this.input.charCodeAt(this.state.pos+2),t=g.types.exponent),61===i&&(r++,t=g.types.assign),this.finishOp(t,r)}},{key:"readToken_pipe_amp",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?g.types.logicalOR:g.types.logicalAND,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(124===e?g.types.bitwiseOR:g.types.bitwiseAND,1)}},{key:"readToken_caret",value:function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.bitwiseXOR,1)}},{key:"readToken_plus_min",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&E.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.types.incDec,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(g.types.plusMin,1)}},{key:"readToken_lt_gt",value:function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(g.types.assign,r+1):this.finishOp(g.types.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(g.types.relational,r))}},{key:"readToken_eq_excl",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(g.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(g.types.arrow)):this.finishOp(Line truncated
|
||||
}}},function(e,t,r,i){var n=r(i),s=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?s(e+t,0):a(e,t)}},function(e,t,r,i,n){var s=r(i),a=r(n);e.exports=function(e){return s(a(e))}},function(e,t,r,i){var n=r(i),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},function(e,t,r,i){var n=r(i);e.exports=function(e){return Object(n(e))}},function(e,t,r,i){var n=r(i);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r,i,n,s){var a=r(i)("wks"),o=r(n),u=r(s).Symbol,l="function"==typeof u,p=e.exports=function(e){return a[e]||(a[e]=l&&u[e]||(l?u:o)("Symbol."+e))};p.store=a},function(e,t,r,i,n,s,a){var o=r(i),u=r(n)("iterator"),l=r(s);e.exports=r(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||l[o(e)]}},function(e,t,r,i,n,s){var a=r(i),o=r(n);e.exports=r(s).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},function(e,t,r,i,n,s,a,o){"use strict";var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=r(o)(Array,"Array",function(e,t){this._t=c(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,r):"values"==t?l(0,e[r]):l(0,[r,e[r]])},"values"),p.Arguments=p.Array,u("keys"),u("values"),u("entries")},function(e,t,r,i,n){"use strict";var s=r(i)(!0);r(n)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=s(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r,i,n,s,a,o){r(i);for(var u=r(n),l=r(s),p=r(a),c=r(o)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d=f[h],y=u[d],v=y&&y.prototype;v&&!v[c]&&l(v,c,d),p[d]=p.Array}},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=e.node,i=r.body;r.async=!1;var n=y.functionExpression(null,[],y.blockStatement(i.body),!0);n.shadow=!0,i.body=[y.returnStatement(y.callExpression(y.callExpression(t,[n]),[]))]}function l(e,t){var r=e.node,i=e.isFunctionDeclaration(),n=r.id,s=v;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!i&&n&&(s=m),r.async=!1,r.generator=!0,r.id=null,i&&(r.type="FunctionExpression");var a=y.callExpression(t,[r]),o=s({NAME:n,FUNCTION:a,PARAMS:r.params.map(function(){return e.scope.generateUidIdentifier("x")})}).expression;if(i){var u=y.variableDeclaration("let",[y.variableDeclarator(y.identifier(n.name),y.callExpression(o,[]))]);u._blockHoist=!0,e.replaceWith(u)}else{var l=o.body.body[1].argument;n||(0,c.default)({node:l,parent:e.parent,scope:e.scope}),!l||l.id||r.params.length?e.replaceWith(y.callExpression(o,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t){var r=e.node;if(!r.generator)return e.traverse(g),e.isClassMethod()||e.isObjectMethod()?u(e,t):l(e,t)};var p=r(i),c=o(p),f=r(n),h=o(f),d=r(s),y=a(d),v=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n return function NAME(PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n"),m=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n function NAME(PARAMS) {\n return ref.apply(this, arguments);\n }\n return NAME;\n })\n"),g={ArrowFunctionExpression:function(e){e.node.async||e.arrowFunctionToShadowed()},AwaitExpression:function(e){var t=e.node;t.type="YieldExpression"}};e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w]Line truncated
|
||||
case h.types._return:return this.parseReturnStatement(i);case h.types._switch:return this.parseSwitchStatement(i);case h.types._throw:return this.parseThrowStatement(i);case h.types._try:return this.parseTryStatement(i);case h.types._let:case h.types._const:e||this.unexpected();case h.types._var:return this.parseVarStatement(i,r);case h.types._while:return this.parseWhileStatement(i);case h.types._with:return this.parseWithStatement(i);case h.types.braceL:return this.parseBlock();case h.types.semi:return this.parseEmptyStatement(i);case h.types._export:case h.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===h.types._import?this.parseImport(i):this.parseExport(i);case h.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(h.types._function)&&!this.canInsertSemicolon())return this.expect(h.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===h.types.name&&"Identifier"===a.type&&this.eat(h.types.colon)?this.parseLabeledStatement(i,s,a):this.parseExpressionStatement(i,a)},m.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},m.parseDecorators=function(e){for(;this.match(h.types.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(h.types._export)||this.match(h.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},m.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},m.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(h.types.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var n=this.state.labels[i];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(r||"loop"===n.kind))break;if(e.label&&r)break}}return i===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},m.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},m.parseDoStatement=function(e){return this.next(),this.state.labels.push(g),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(h.types._while),e.test=this.parseParenExpression(),this.eat(h.types.semi),this.finishNode(e,"DoWhileStatement")},m.parseForStatement=function(e){this.next(),this.state.labels.push(g);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(h.types.parenL),this.match(h.types.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(h.types._var)||this.match(h.types._let)||this.match(h.types._const)){var r=this.startNode(),i=this.state.type;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!this.match(h.types._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var n={start:0},s=this.parseExpression(!0,n);return this.match(h.types._in)||this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.parseForIn(e,s,t)):(n.start&&this.unexpected(n.start),t&&this.unexpected(),this.parseFor(e,s))},m.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},m.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(h.types._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},m.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},m.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.types.braceL),this.state.labels.push(b);for(var t,r=void 0;!this.match(h.types.braceR);)if(this.match(h.types._case)||this.match(h.types._default)){var i=this.match(h.types._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),i?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(h.types.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop()Line truncated
|
||||
this.isRelational("<")||this.match(a.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,n,i)):(this.eat(a.types.question)&&(s=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=s,r.static=n,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(a.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},l.flowObjectTypeSemicolon=function(){this.eat(a.types.semi)||this.eat(a.types.comma)||this.match(a.types.braceR)||this.unexpected()},l.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(a.types.dot);){var n=this.startNodeAt(e,t);n.qualification=i.id,n.id=this.parseIdentifier(),i.id=this.finishNode(n,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},l.flowParseTypeofType=function(){var e=this.startNode();return this.expect(a.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},l.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(a.types.bracketL);this.state.pos<this.input.length&&!this.match(a.types.bracketR)&&(e.types.push(this.flowParseType()),!this.match(a.types.bracketR));)this.expect(a.types.comma);return this.expect(a.types.bracketR),this.finishNode(e,"TupleTypeAnnotation")},l.flowParseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdentifier(),this.eat(a.types.question)&&(e=!0),t.optional=e,t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeParam")},l.flowParseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.match(a.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(a.types.parenR)||this.expect(a.types.comma);return this.eat(a.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},l.flowIdentToTypeAnnotation=function(e,t,r,i){switch(i.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,i)}},l.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),i=void 0,n=void 0,s=!1;switch(this.state.type){case a.types.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case a.types.braceL:return this.flowParseObjectType();case a.types.bracketL:return this.flowParseTupleType();case a.types.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(a.types.parenL),i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");case a.types.parenL:if(this.next(),!this.match(a.types.parenR)&&!this.match(a.types.ellipsis))if(this.match(a.types.name)){var o=this.lookahead().type;s=o!==a.types.question&&o!==a.types.colon}else s=!0;return s?(n=this.flowParseType(),this.expect(a.types.parenR),this.eat(a.types.arrow)&&this.raise(r,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation"));case a.types.string:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"StringLiteralTypeAnnotation");case a.types._true:case a.types._false:return r.value=this.match(a.types._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case a.types.num:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case a.types._null:return r.value=this.match(a.types._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case a.types._this:return r.value=this.match(a.types._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},l.flowParsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flowParsePrimaryType();return this.matLine truncated
|
||||
this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[d.types.b_stat],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this}},{key:"curPosition",value:function(){return new h.Position(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(t){var r=new e;for(var i in this){var n=this[i];t&&"context"!==i||!Array.isArray(n)||(n=n.slice()),r[i]=n}return r}}]),e}();t.default=v},function(e,t,r,i){function n(e,t,r){for(var i=-1,n=s(t),a=n.length;++i<a;){var o=n[i],u=e[o],l=r(u,t[o],o,e,t);(l===l?l===u:u!==u)&&(void 0!==u||o in e)||(e[o]=l)}return e}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null==t?e:a(t,o(t),e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s,a,o,u,l,p,c){function f(e,t,r,i,n,s,a){var o;if(r&&(o=n?r(e,i,n):r(e)),void 0!==o)return o;if(!E(e))return e;var u=x(e);if(u){if(o=m(e),!t)return h(e,o)}else{var l=H.call(e),p=l==w;if(l!=D&&l!=A&&(!p||n))return G[l]?g(e,l,t):n?e:{};if(o=b(p?{}:e),!t)return y(o,e)}s||(s=[]),a||(a=[]);for(var c=s.length;c--;)if(s[c]==e)return a[c];return s.push(e),a.push(o),(u?d:v)(e,function(i,n){o[n]=f(i,t,r,n,e,s,a)}),o}var h=r(i),d=r(n),y=r(s),v=r(a),m=r(o),g=r(u),b=r(l),x=r(p),E=r(c),A="[object Arguments]",S="[object Array]",_="[object Boolean]",T="[object Date]",P="[object Error]",w="[object Function]",k="[object Map]",C="[object Number]",D="[object Object]",O="[object RegExp]",N="[object Set]",I="[object String]",F="[object WeakMap]",B="[object ArrayBuffer]",R="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",K="[object Uint16Array]",W="[object Uint32Array]",G={};G[A]=G[S]=G[B]=G[_]=G[T]=G[R]=G[L]=G[M]=G[j]=G[V]=G[C]=G[D]=G[O]=G[I]=G[U]=G[Y]=G[K]=G[W]=!0,G[P]=G[w]=G[k]=G[N]=G[F]=!1;var q=Object.prototype,H=q.toString;e.exports=f},function(e,t,r,i){var n=r(i),s=n();e.exports=s},function(e,t,r,i,n){function s(e,t){return a(e,t,o)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e,t,r){if(null!=e){void 0!==r&&r in s(e)&&(t=[r]);for(var i=0,n=t.length;null!=e&&i<n;)e=e[t[i++]];return i&&i==n?e:void 0}}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){if("function"!=typeof e)return s;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,i,n){return e.call(t,r,i,n)};case 4:return function(r,i,n,s){return e.call(t,r,i,n,s)};case 5:return function(r,i,n,s,a){return e.call(t,r,i,n,s,a)}}return function(){return e.apply(t,arguments)}}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(e){return l(function(t,r){var i=-1,n=null==t?0:r.length,s=n>2?r[n-2]:void 0,a=n>2?r[2]:void 0,l=n>1?r[n-1]:void 0;for("function"==typeof s?(s=o(s,l,5),n-=2):(s="function"==typeof l?l:void 0,n-=s?1:0),a&&u(r[0],r[1],a)&&(s=n<3?void 0:s,n=1);++i<n;){var p=r[i];p&&e(t,p,s)}return t})}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return function(t,r,i){for(var n=s(t),a=i(t),o=a.length,u=e?o:-1;e?u--:++u<o;){var l=a[u];if(r(n[l],l,n)===!1)break}return t}}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n("length");e.exports=s},function(e,t,r,i){function n(e,t){var r=null==e?void 0:e[t];return s(r)?r:void 0}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){var i=e.constructor;switch(t){case c:return s(e);case a:case o:return new i((+e));case f:case h:case d:case y:case v:case m:case g:case b:case x:var n=e.buffer;return new i(r?s(n):n,e.byteOffset,e.length);case u:case p:return new i(e);case l:var A=new i(e.source,E.exec(e));A.lastIndex=e.lastIndex}return A}var s=r(i),a="[object Boolean]",o="[object Date]",u="[object Number]",l="[object RegExp]",p="[object String]",c="[object ArrayBuffer]",f="[object Float32Array]",h="[object Float64Array]",d="[object Int8Array]",y="[object Int16Array]",v="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",E=/\w*$/;e.exports=n},function(e,t,r,i,n){function s(e){return null!=e&&o(a(e))}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s){function a(e,t,r){if(!l(r))return!1;var i=typeof t;if("number"==i?o(r)&&u(t,r.length):"string"==i&&t in r){var n=r[t];return e===e?e===n:n!==n}return!1}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e,t){var r=typeof e;if("string"==r&&l.test(e)||"number"==r)return!0;if(a(e))return!1;var i=!u.test(e);return i||null!=t&&e in o(t)}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i,n,s,a,o){function u(e){for(var t=h(e),r=t.length,i=r&&e.length,n=!!i&&f(i)&&(p(e)||l(e)),s=-1,a=[];++s<r;){var o=t[s];(n&&c(o,i)||y.call(e,o))&&a.push(o)}return a}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Object.prototype,y=d.hasOwnProperty;e.exports=u},function(e,t,r,i){function n(e){return s(e)?e:Object(e)}Line truncated
|
||||
if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var o=l(t,a);o&&s.push(o)}}while(n.length);return s.length?{typeAnnotation:y.createUnionTypeAnnotation(s),ifStatement:r}:c(r,t)}}t.__esModule=!0;var f=r(i),h=a(f);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:o(this,e.name):"undefined"===e.name?y.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?y.numberTypeAnnotation():void("arguments"===e.name)}};var d=r(n),y=s(d);e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function u(e){return e.typeAnnotation}function l(e){if(this.get("callee").isIdentifier())return N.genericTypeAnnotation(e.callee)}function p(){return N.stringTypeAnnotation()}function c(e){var t=e.operator;return"void"===t?N.voidTypeAnnotation():N.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?N.numberTypeAnnotation():N.STRING_UNARY_OPERATORS.indexOf(t)>=0?N.stringTypeAnnotation():N.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?N.booleanTypeAnnotation():void 0}function f(e){var t=e.operator;if(N.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return N.numberTypeAnnotation();if(N.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return N.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),i=this.get("left");return i.isBaseType("number")&&r.isBaseType("number")?N.numberTypeAnnotation():i.isBaseType("string")||r.isBaseType("string")?N.stringTypeAnnotation():N.unionTypeAnnotation([N.stringTypeAnnotation(),N.numberTypeAnnotation()])}}function h(){return N.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function d(){return N.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function y(){return this.get("expressions").pop().getTypeAnnotation()}function v(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;if("++"===t||"--"===t)return N.numberTypeAnnotation()}function g(){return N.stringTypeAnnotation()}function b(){return N.numberTypeAnnotation()}function x(){return N.booleanTypeAnnotation()}function E(){return N.nullLiteralTypeAnnotation()}function A(){return N.genericTypeAnnotation(N.identifier("RegExp"))}function S(){return N.genericTypeAnnotation(N.identifier("Object"))}function _(){return N.genericTypeAnnotation(N.identifier("Array"))}function T(){return _()}function P(){return N.genericTypeAnnotation(N.identifier("Function"))}function w(){return C(this.get("callee"))}function k(){return C(this.get("tag"))}function C(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?N.genericTypeAnnotation(N.identifier("AsyncIterator")):N.genericTypeAnnotation(N.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.Class=t.Function=t.Identifier=void 0;var D=r(i);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return a(D).default}}),t.VariableDeclarator=o,t.TypeCastExpression=u,t.NewExpression=l,t.TemplateLiteral=p,t.UnaryExpression=c,t.BinaryExpression=f,t.LogicalExpression=h,t.ConditionalExpression=d,t.SequenceExpression=y,t.AssignmentExpression=v,t.UpdateExpression=m,t.StringLiteral=g,t.NumericLiteral=b,t.BooleanLiteral=x,t.NullLiteral=E,t.RegExpLiteral=A,t.ObjectExpression=S,t.ArrayExpression=_,t.RestElement=T,t.CallExpression=w,t.TaggedTemplateExpression=k;var O=r(n),N=s(O);u.validParent=!0,T.validParent=!0,t.Function=P,t.Class=P},function(e,t,r,i,n,s,a){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(I.isIdentifier(a)){if(!r(a.name))return!1}else if(I.isLiteral(a)){if(!r(a.value))return!1}else{if(I.isMemberExpression(a)){if(a.computed&&!I.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!I.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function p(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function c(){return this.scope.isStatic(this.node)}function f(e){return!this.has(e)}function h(e,t){return this.node[e]===t}function d(e){return I.isType(this.type,e)}function y(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function v(e){return!("body"!==thiLine truncated
|
||||
this.registerBinding(e,u)}else{var l=this.getProgramParent(),p=t.getBindingIdentifiers(!0);for(var c in p)for(var f=p[c],h=Array.isArray(f),d=0,f=h?f:(0,w.default)(f);;){var y;if(h){if(d>=f.length)break;y=f[d++]}else{if(d=f.next(),d.done)break;y=d.value}var v=y,m=this.getOwnBinding(c);if(m){if(m.identifier===v)continue;this.checkBlockScopedCollisions(m,e,c,v)}m&&m.path.isFlow()&&(m=null),l.references[c]=!0,this.bindings[c]=new U.default({identifier:v,existing:m,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(G.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(G.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(G.isClassBody(e)){for(var i=e.body,n=Array.isArray(i),s=0,i=n?i:(0,w.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(G.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(G.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if(!this.isPure(f,t))return!1}return!0}if(G.isObjectExpression(e)){for(var h=e.properties,d=Array.isArray(h),y=0,h=d?h:(0,w.default)(h);;){var v;if(d){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var m=v;if(!this.isPure(m,t))return!1}return!0}return G.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):G.isClassProperty(e)||G.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):G.isUnaryExpression(e)?this.isPure(e.argument,t):G.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){H++,this._crawl(),H--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,S.default)(null),this.bindings=(0,S.default)(null),this.globals=(0,S.default)(null),this.uids=(0,S.default)(null),this.data=(0,S.default)(null),e.isLoop())for(var t=G.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,w.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("param",f)}e.isCatchClause()&&this.registerBinding("let",e);var h=this.getProgramParent();if(!h.crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(X,d),this.crawling=!1;for(var y=d.assignments,v=Array.isArray(y),m=0,y=v?y:(0,w.default)(y);;){var g;if(v){if(m>=y.length)break;g=y[m++]}else{if(m=y.next(),m.done)break;g=m.value}var b=g,x=b.getBindingIdentifiers(),E=void 0;for(var A in x)b.scope.getBinding(A)||(E=E||b.scope.getProgramParent(),E.addGlobal(x[A]));b.scope.registerConstantViolation(b)}for(var _=d.references,T=Array.isArray(_),P=0,_=T?_:(0,w.default)(_);;){var k;if(T){if(P>=_.length)break;k=_[P++]}else{if(P=_.next(),P.done)break;k=P.value}var C=k,D=C.scope.getBinding(C.node.name);D?D.reference(C):C.scope.getProgramParent().addGlobal(C.node)}for(var O=d.constantViolations,N=Array.isArray(O),I=0,O=N?O:(0,w.default)(O);;){var F;if(N){if(I>=O.length)break;F=O[I++]}else{if(I=O.next(),I.done)break;F=I.value}var B=F;B.scope.registerConstantViolation(B)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(G.ensureBlock(t.node),t=t.get("body"));var r=e.unique,i=e.kind||"var",n=null==e._blockHoist?2:e._blockHoist,s="declaration:"+i+":"+n,a=!r&&t.getData(s);if(!a){var o=G.variableDeclaration(i,[]);o._generated=!0,o._blockHoist=n;var u=t.unshiftContainer("body",[o]);a=u[0],r||t.setData(s,a)}var l=G.variableDeclarator(e.id,e.init);a.node.declarations.push(l),this.registerBinding(i,a.get("declarations").pop())},e.Line truncated
|
||||
},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,f.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?Line truncated
|
||||
}function Y(e){return!(!e||!pe.VISITOR_KEYS[e.type])}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var K=r(i),W=E(K),G=r(n),q=E(G),H=r(s),X=E(H),J=r(a);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return J.NOT_LOCAL_BINDING}}),t.is=S,t.isType=_,t.validate=T,t.shallowEqual=P,t.appendToMemberExpression=w,t.prependToMemberExpression=k,t.ensureBlock=C,t.clone=D,t.cloneWithoutLoc=O,t.cloneDeep=N,t.buildMatchMemberExpression=I,t.removeComments=F,t.inheritsComments=B,t.inheritTrailingComments=R,t.inheritLeadingComments=L,t.inheritInnerComments=M,t.inherits=V,t.assertNode=U,t.isNode=Y;var $=r(o);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return $.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return $.getOuterBindingIdentifiers}});var z=r(u);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return z.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return z.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return z.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return z.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return z.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return z.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return z.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return z.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return z.isImmutable}});var Q=r(l);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return Q.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return Q.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return Q.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return Q.toIdentifier}}),Object.defineProperty(t,"Line truncated
|
||||
R(R.S+R.F*!ge,"Symbol",{for:function(e){return F(de,e+="")?de[e]:de[e]=oe(e)},keyFor:function(e){if(Se(e))return q(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){xe=!0},useSimple:function(){xe=!1}}),R(R.S+R.F*!ge,"Object",{create:Pe,defineProperty:_e,defineProperties:Te,getOwnPropertyDescriptor:ke,getOwnPropertyNames:Ce,getOwnPropertySymbols:De}),ue&&R(R.S+R.F*(!ge||j(function(){var e=oe();return"[null]"!=le([e])||"{}"!=le({a:e})||"{}"!=le(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Se(e)){for(var t,r,i=[e],n=1;arguments.length>n;)i.push(arguments[n++]);return t=i[1],"function"==typeof t&&(r=t),!r&&X(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!Se(t))return t}),i[1]=t,le.apply(ue,i)}}}),oe[pe][fe]||r(N)(oe[pe],fe,oe[pe].valueOf),U(oe,"Symbol"),U(Math,"Math",!0),U(I.JSON,"JSON",!0)},function(e,t,r,i,n,s,a,o,u,l,p){"use strict";var c,f=r(i)(0),h=r(n),d=r(s),y=r(a),v=r(o),m=r(u),g=(r(l),d.getWeak),b=Object.isExtensible,x=v.ufstore,E={},A=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},S={get:function(e){if(m(e)){var t=g(e);return t===!0?x(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return v.def(this,e,t)}},_=e.exports=r(p)("WeakMap",A,S,v,!0,!0);7!=(new _).set((Object.freeze||Object)(E),7).get(E)&&(c=v.getConstructor(A),y(c.prototype,S),d.NEED=!0,f(["delete","has","get","set"],function(e){var t=_.prototype,r=t[e];h(t,e,function(t,i){if(m(t)&&!b(t)){this._f||(this._f=new c);var n=this._f[e](t,i);return"set"==e?this:n}return r.call(this,t,i)})}))},function(e,t,r,i){r(i)("asyncIterator")},function(e,t,r,i){r(i)("observable")},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w])if((0,x.default)(t[0],r.name))i=t[0][r.name];else if("$"===r.name[0]){var n=+r.name.slice(1);t[n]&&(i=t[n])}null===i&&e.remove(),i&&(i[k]=!0,e.replaceInline(i))},exit:function(e){var t=e.node;t.loc||A.default.clearNode(t)}};e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){return e.expression.typeAnnotation=e.typeAnnotation,e.expression}e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(a.types.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(a.types.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(a.types._class)||this.match(a.types.name)||this.match(a.types._function)||this.match(a.types._var))return this.flowParseDeclare(t)}else if(this.match(a.types.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t,r,i){var n=this.state.potentialArrowAt=r;if(this.match(a.types.colon)){var s=this.startNodeAt(t,r);if(s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),i&&!this.match(a.types.arrow)&&this.unexpected(),n&&this.eat(a.types.arrow)){var o="SequenceExpression"===e.type?e.expressions:[e],u=this.parseArrowExpression(this.startNodeAt(t,r),o);return u.returnType=s.typeAnnotation,u}return this.finishNode(s,"TypeCastExpression")}return e}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return fLine truncated
|
||||
var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(l.test(e)||!u.test(e)||null!=t&&e in Object(t))}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i){function n(e){return!!a&&a in e}var s=r(i),a=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():o.call(t,r,1),!0}var s=r(i),a=Array.prototype,o=a.splice;e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);return r<0?void 0:t[r][1]}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this.__data__,e)>-1}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){var r=this.__data__,i=s(r,e);return i<0?r.push([e,t]):r[i][1]=t,this}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(){this.__data__={hash:new o,map:new(l||u),string:new o}}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return s(this,e).delete(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).get(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).has(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){return s(this,e).set(e,t),this}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n(Object,"create");e.exports=s},function(e,t,r,i){(function(t){var n=r(i),s=n("object"==typeof t&&t),a=n("object"==typeof self&&self),o=n("object"==typeof this&&this),u=s||a||o||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t,r,i){function n(){this.__data__=new s}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){var r=this.__data__;return r instanceof a&&r.__data__.length==u&&(r=this.__data__=new o(r.__data__)),r.set(e,t),this}var a=r(i),o=r(n),u=200;e.exports=s},function(e,t,r,i,n){var s=r(i),a=r(n),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,u=/\\(\\)?/g,l=s(function(e){var t=[];return a(e).replace(o,function(e,r,i,n){t.push(i?n.replace(u,"$1"):r||e)}),t});e.exports=l},function(e,t,r,i){function n(e){if("string"==typeof e||s(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var s=r(i),a=1/0;e.exports=n},function(e,t,r,i,n,s,a,o,u){var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=r(u),y=Object.prototype,v=y.hasOwnProperty,m=y.propertyIsEnumerable,g=!m.call({valueOf:1},"valueOf"),b=c(function(e,t){if(g||h(t)||f(t))return void p(t,d(t),e);for(var r in t)v.call(t,r)&&l(e,r,t[r])});e.exports=b},function(e,t,r,i){function n(e){return s(e,!0,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null!=e&&o(e,t,a)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e){return s(e)&&u.call(e,"callee")&&(!p.call(e,"callee")||l.call(e)==a)}var s=r(i),a="[object Arguments]",o=Object.prototype,u=o.hasOwnProperty,l=o.toString,p=o.propertyIsEnumerable;e.exports=n},function(e,t,r,i,n,s){function a(e){return null!=e&&l(o(e))&&!u(e)}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e){return o(e)&&a(e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n){(function(e){var s=r(i),a=r(n),o="object"==typeof t&&t,u=o&&"object"==typeof e&&e,l=u&&u.exports===o,p=l?s.Buffer:void 0,c=p?function(e){return e instanceof p}:a;e.exports=c}).call(t,r(27)(e))},function(e,t,r,i,n){function s(e){return"string"==typeof e||!a(e)&&o(e)&&p.call(e)==u}var a=r(i),o=r(n),u="[object String]",l=Object.prototype,p=l.toString;e.exports=s},function(e,t,r,i,n,s,a,o,u){function l(e){var t=y(e);if(!t&&!h(e))return c(e);var r=f(e),i=!!r,n=r||[],s=n.length;for(var a in e)!p(e,a)||i&&("length"==a||d(a,s))||t&&"constructor"==a||n.push(a);return n}var p=r(i),c=r(n),f=r(s),h=r(a),d=r(o),y=r(u);e.exports=l},function(e,t,r,i){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a),a};return r.cache=new(n.Cache||s),r}var s=r(i),a="Expected a function";n.Cache=s,e.exports=n},function(e,t,r,i){function n(e){return null==e?"":s(e)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h){"use strict";function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function y(e){return e&&e.__esModule?e:{default:e}}function v(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(D.get("traverseNeedsParent",e.type));k.explode(t),v.node(e,t,r,i,n)}}function m(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var g=r(1915),b=y(g),x=r(6),E=y(x),A=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return y(A).default}});var S=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){retLine truncated
|
||||
if(k=P.next(),k.done)break;D=k.value}var N=D;e[N]?m(e[N],A):e[N]=A}else m(e,A)}}}for(var I in e)if(!v(I)){var F=e[I],B=C.FLIPPED_ALIAS_KEYS[I],R=C.DEPRECATED_KEYS[I];if(R&&(console.trace("Visitor defined for "+I+" but it has been renamed to "+R),B=[R]),B){delete e[I];for(var L=B,M=Array.isArray(L),j=0,L=M?L:(0,S.default)(L);;){var V;if(M){if(j>=L.length)break;V=L[j++]}else{if(j=L.next(),j.done)break;V=j.value}var U=V,Y=e[U];Y?m(Y,F):e[U]=(0,O.default)(F)}}}for(var K in e)v(K)||d(e[K]);return e}function l(e){if(!e._verified){if("function"==typeof e)throw new Error(w.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||p(t,e[t]),!v(t)){if(C.TYPES.indexOf(t)<0)throw new Error(w.get("traverseVerifyNodeType",t));var r=e[t];if("object"===("undefined"==typeof r?"undefined":(0,b.default)(r)))for(var i in r){if("enter"!==i&&"exit"!==i)throw new Error(w.get("traverseVerifyVisitorProperty",t,i));p(t+"."+i,r[i])}}e._verified=!0}}function p(e,t){for(var r=[].concat(t),i=r,n=Array.isArray(i),s=0,i=n?i:(0,S.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+("undefined"==typeof o?"undefined":(0,b.default)(o)))}}function c(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r={},i=0;i<e.length;i++){var n=e[i],s=t[i];u(n);for(var a in n){var o=n[a];s&&(o=f(o,s));var l=r[a]=r[a]||{};m(l,o)}}return r}function f(e,t){var r={};for(var i in e){var n=e[i];Array.isArray(n)&&(n=n.map(function(e){var r=function(r){return e.call(t,r,t)};return r.toString=function(){return e.toString()},r}),r[i]=n)}return r}function h(e){for(var t in e)if(!v(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function d(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function y(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function v(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function m(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var g=r(88),b=o(g),x=r(616),E=o(x),A=r(6),S=o(A);t.explode=u,t.verify=l,t.merge=c;var _=r(i),T=a(_),P=r(n),w=a(P),k=r(9),C=a(k),D=r(s),O=o(D)},function(e,t,r,i){var n=r(i),s=n.Reflect;e.exports=s},function(e,t,r,i){function n(e,t,r,i){return void 0===e||s(e,a[r])&&!o.call(i,r)?t:e}var s=r(i),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r,i,n){function s(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var a=r(i),o=r(n),u=Object.prototype,l=a?a.enumerate:void 0,p=u.propertyIsEnumerable;l&&!p.call({valueOf:1},"valueOf")&&(s=function(e){return o(l(e))}),e.exports=s},function(e,t,r,i){function n(e,t){return s(t,function(t){return e[t]})}var s=r(i);e.exports=n},function(e,t,r,i,n,s){var a=r(i),o=r(n),u=r(s),l=o(function(e,t,r,i){a(t,u(t),e,i)});e.exports=l},function(e,t,r,i){function n(e){return s(e,!1,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a){var o=r(i),u=r(n),l=r(s),p=r(a),c=p(function(e){return e.push(void 0,u),o(l,void 0,e)});e.exports=c},function(e,t,r,i,n,s,a,o){function u(e,t,r,i){e=p(e)?e:h(e),r=r&&!i?f(r):0;var n=e.length;return r<0&&(r=d(n+r,0)),c(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&l(e,t,r)>-1}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Math.max;e.exports=u},function(e,t,r,i,n,s,a){function o(e){for(var t=-1,r=c(e),i=u(e),n=i.length,s=l(e),a=!!s,o=s||[],f=o.length;++t<n;){var d=i[t];a&&("length"==d||p(d,f))||"constructor"==d&&(r||!h.call(e,d))||o.push(d)}return o}var u=r(i),l=r(n),p=r(s),c=r(a),f=Object.prototype,h=f.hasOwnProperty;e.exports=o},function(e,t,r,i,n,s,a){function o(e,t,r){return t=(r?l(e,t,r):void 0===t)?1:p(t),u(c(e),t)}var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=o},function(e,t,r,i,n){function s(e){return e?a(e,o(e)):[]}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,a.default)(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}()},function(e,t,r,i,n,s){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(i),u=a(o),l=r(n),p=a(l),c=r(s),f=a(c);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,f.default)(t)));e.prototype=(0,p.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.default?(0,u.default)(e,t):e.__proto__=t)}},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(e,t){if(!e)throw neLine truncated
|
||||
default:!1},argument:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,a.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")}}}),(0,a.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,a.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}}),(0,a.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,a.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,a.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,a.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,a.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("ObLine truncated
|
||||
o.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var u=a;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(d&&e.length>=1e3&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=y,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c,f){"use strict";function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(C.get("traverseNeedsParent",e.type));w.explode(t),y.node(e,t,r,i,n)}}function v(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var m=r(248),g=d(m),b=r(1),x=d(b),E=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return d(E).default}});var A=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return d(A).default}});var S=r(s);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return d(S).default}}),t.default=y;var _=r(a),T=d(_),P=r(o),w=h(P),k=r(20),C=h(k),D=r(u),O=d(D),N=r(3),I=h(N),F=r(l),B=h(F);t.visitors=w,y.visitors=w,y.verify=w.verify,y.explode=w.explode,y.NodePath=r(p),y.Scope=r(c),y.Hub=r(f),y.cheap=function(e,t){if(e){var r=I.VISITOR_KEYS[e.type];if(r){t(e);for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,x.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a,u=e[o];if(Array.isArray(u))for(var l=u,p=Array.isArray(l),c=0,l=p?l:(0,x.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;y.cheap(h,t)}else y.cheap(u,t)}}}},y.node=function(e,t,r,i,n,s){var a=I.VISITOR_KEYS[e.type];if(a)for(var o=new T.default(r,t,i,n),u=a,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if((!s||!s[f])&&o.visit(e,f))return}};var R=I.COMMENT_KEYS.concat(["tokens","comments","start","end","loc","raw","rawValue"]);y.clearNode=function(e){for(var t=R,r=Array.isArray(t),i=0,t=r?t:(0,x.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;null!=e[s]&&(e[s]=void 0)}for(var a in e)"_"===a[0]&&null!=e[a]&&(e[a]=void 0);B.path.delete(e);for(var o=(0,g.default)(e),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=null}},y.removeProperties=function(e){return y.cheap(e,y.clearNode),e},y.hasType=function(e,t,r,i){if((0,O.default)(i,e.type))return!1;if(e.type===r)return!0;var n={has:!1,type:r};return y(e,{blacklist:i,enter:v},t,n),n.has},y.clearCache=function(){B.clear()},y.copyCache=function(e,t){B.path.has(e)&&B.path.set(t,B.path.get(e))}},function(e,t,r,i){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function o(e){var t=this;do if(e(t))return t;while(t=t.parentPath);return null}function u(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function l(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function p(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var i=void 0,n=g.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,v.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,p=l[t+1];if(i)if(p.listKey&&i.listKey===p.listKey&&p.key<i.key)i=p;else{var c=n.indexOf(i.parentKey),f=n.indexOf(p.parentKey);c>f&&(i=p)}else i=p}return i})}function c(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var i=1/0,n=void 0,s=void 0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<i&&(i=t.length),t}),o=a[0];e:for(var u=0;u<i;u++){for(var l=o[u],p=a,c=Array.isArray(p),f=0,p=c?p:(0,v.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;if(d[u]!==l)break e}n=u,s=l}if(s)return t?t(s,n,a):s;throw new Error("Couldn't find intersection")}function f(){var e=this,t=[];do t.push(e);while(e=e.parentPath);reLine truncated
|
||||
},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return M.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=M.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;M.isAssignmentExpression(e)?r=e.left:M.isVariableDeclarator(e)?r=e.id:(M.isObjectProperty(r)||M.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(M.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,x.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;e(o)}else t.declaration&&e(t.declaration);else if(M.isModuleSpecifier(t))e(t.local);else if(M.isMemberExpression(t))e(t.object),e(t.property);else if(M.isIdentifier(t))i.push(t.name);else if(M.isLiteral(t))i.push(t.value);else if(M.isCallExpression(t))e(t.callee);else if(M.isObjectExpression(t)||M.isObjectPattern(t))for(var u=t.properties,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e(f.key||f.argument)}};n(r);var s=i.join("$");return s=s.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(s.slice(0,20))},e.prototype.isStatic=function(e){if(M.isThisExpression(e)||M.isSuper(e))return!0;if(M.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,i){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var n=!1;if(n||(n="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),n||(n="param"===e.kind&&("let"===t||"const"===t)),n)throw this.hub.file.buildCodeFrameError(i,N.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var i=this.getBinding(e);if(i)return t=t||this.generateUidIdentifier(e).name,new P.default(i,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,i){e[t]&&(e[r]=i,e[t]=null)},e.prototype.dump=function(){var e=(0,_.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var i=t.bindings[r];console.log(" -",r,{constant:i.constant,references:i.references,violations:i.constantViolations.length,kind:i.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(M.isIdentifier(e)){var i=this.getBinding(e.name);if(i&&i.constant&&i.path.isGenericType("Array"))return e}if(M.isArrayExpression(e))return e;if(M.isIdentifier(e,{name:"arguments"}))return M.callExpression(M.memberExpression(M.memberExpression(M.memberExpression(M.identifier("Array"),M.identifier("prototype")),M.identifier("slice")),M.identifier("call")),[e]);var n="toArray",s=[e];return t===!0?n="toConsumableArray":t&&(s.push(M.numericLiteral(t)),n="slicedToArray"),M.callExpression(r.addHelper(n),s)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerBinding("label",e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,x.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("module",f)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?M.unaryExpression("void",M.numericLiteral(0),!0):M.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var i=this.getBinding(r);i&&i.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?t:arguments[2];if(!e)throw new ReferenceError("no `kind`Line truncated
|
||||
+17232
File diff suppressed because it is too large.
Load diff
+1741
File diff suppressed because it is too large.
Load diff
+4
-3
@@ -1,12 +1,13 @@
|
||||
class DateMessage extends React.Components
|
||||
class DateMessage extends React.Component
|
||||
{
|
||||
currentDateSTring(int_format){
|
||||
currentDateString(int_format){
|
||||
const options = {year: 'numeric', month: '2-digit', day: '2-digit'};
|
||||
return (new Intl.DateTimeFormat(int_format, options)).format(Date.now());
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div className="container">
|
||||
<div className="col-xs-12">
|
||||
<div className="cal-xs-12">
|
||||
<span className="pull-right">
|
||||
{this.currentDateString(this.props.format)}
|
||||
</span>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
.btn-style{
|
||||
min-width: 150px;
|
||||
margin-right: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
body{
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
padding: 10px;
|
||||
color: white;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.img-center{
|
||||
margin-top: 30px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"active": true,
|
||||
"address": [
|
||||
{
|
||||
"city": "Amsterdam",
|
||||
"country": "NLD",
|
||||
"line": [ "Van Egmondkade 23" ],
|
||||
"postalCode": "1024 RJ",
|
||||
"use": "home"
|
||||
}
|
||||
],
|
||||
"birthDate": "1944-11-17",
|
||||
"communication": [
|
||||
{
|
||||
"language": {
|
||||
"coding": [
|
||||
{
|
||||
"code": "nl",
|
||||
"display": "Dutch",
|
||||
"system": "urn:ietf:bcp:47"
|
||||
}
|
||||
],
|
||||
"text": "Nederlands"
|
||||
},
|
||||
"preferred": true
|
||||
}
|
||||
],
|
||||
"contact": [
|
||||
{
|
||||
"name": {
|
||||
"family": [ "Abels" ],
|
||||
"given": [ "Sarah" ],
|
||||
"use": "usual"
|
||||
},
|
||||
"relationship": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"code": "partner",
|
||||
"system": "http://hl7.org/fhir/patient-contact-relationship"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"telecom": [
|
||||
{
|
||||
"system": "phone",
|
||||
"use": "mobile",
|
||||
"value": "0690383372"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"deceasedBoolean": false,
|
||||
"gender": "male",
|
||||
"id": "f001",
|
||||
"identifier": [
|
||||
{
|
||||
"system": "urn:oid:2.16.840.1.113883.2.4.6.3",
|
||||
"use": "usual",
|
||||
"value": "738472983"
|
||||
}
|
||||
],
|
||||
"managingOrganization": {
|
||||
"display": "Burgers University Medical Centre",
|
||||
"reference": "Organization/f001"
|
||||
},
|
||||
"maritalStatus": {
|
||||
"coding": [
|
||||
{
|
||||
"code": "M",
|
||||
"display": "Married",
|
||||
"system": "http://hl7.org/fhir/v3/MaritalStatus"
|
||||
}
|
||||
],
|
||||
"text": "Getrouwd"
|
||||
},
|
||||
"multipleBirthBoolean": true,
|
||||
"name": [
|
||||
{
|
||||
"family": [ "van de Heuvel" ],
|
||||
"given": [ "Pieter" ],
|
||||
"suffix": [ "MSc" ],
|
||||
"use": "usual"
|
||||
}
|
||||
],
|
||||
"photo": [],
|
||||
"resourceType": "Patient",
|
||||
"telecom": [
|
||||
{
|
||||
"system": "phone",
|
||||
"use": "mobile",
|
||||
"value": "0648352638"
|
||||
},
|
||||
{
|
||||
"system": "email",
|
||||
"use": "home",
|
||||
"value": "p.heuvel@gmail.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
[{"active":true,"address":[{"city":"Amsterdam","country":"NLD","line":["Van Egmondkade 23"],"postalCode":"1024 RJ","use":"home"}],"birthDate":"1944-11-17","communication":[{"language":{"coding":[{"code":"nl","display":"Dutch","system":"urn:ietf:bcp:47"}],"text":"Nederlands"},"preferred":true}],"contact":[{"name":{"family":["Abels"],"given":["Sarah"],"use":"usual"},"relationship":[{"coding":[{"code":"partner","system":"http://hl7.org/fhir/patient-contact-relationship"}]}],"telecom":[{"system":"phone","use":"mobile","value":"0690383372"}]}],"deceasedBoolean":false,"gender":"male","id":"f001","identifier":[{"system":"urn:oid:2.16.840.1.113883.2.4.6.3","use":"usual","value":"738472983"}],"managingOrganization":{"display":"Burgers University Medical Centre","reference":"Organization/f001"},"maritalStatus":{"coding":[{"code":"M","display":"Married","system":"http://hl7.org/fhir/v3/MaritalStatus"}],"text":"Getrouwd"},"multipleBirthBoolean":true,"name":[{"family":["van de Heuvel"],"given":["Pieter"],"suffix":["MSc"],"use":"usual"}],"photo":[],"resourceType":"Patient","telecom":[{"system":"phone","use":"mobile","value":"0648352638"},{"system":"email","use":"home","value":"p.heuvel@gmail.com"}]}]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title></title>
|
||||
|
||||
<!--css-->
|
||||
<link rel="stylesheet" href="css/mobile.css">
|
||||
<link rel="stylesheet" href="../../lib/bootstrap.min.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="navigation">
|
||||
</div>
|
||||
<div class="container">
|
||||
<div id="date"></div>
|
||||
<div id="content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--scripts-->
|
||||
<script src="../../lib/es6-shim.min.js"></script>
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~loacle.de"></script>
|
||||
<script src="../../lib/jquery-2.2.4.min.js"></script>
|
||||
<script src="../../lib/bootstrap.min.js"></script>
|
||||
|
||||
<script src="../../lib/babel.min.js"></script>
|
||||
<script src="../../lib/react.js"></script>
|
||||
<script src="../../lib/react-dom.js"></script>
|
||||
|
||||
<script src="scripts/app.js"></script>
|
||||
<script src="scripts/landung.js"></script>
|
||||
<script src="scripts/Patient.js"></script>
|
||||
<script src="scripts/fhirService.js"></script>
|
||||
|
||||
<script src="scripts/react.js" type="text/babel">
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,46 @@
|
||||
function Patient(fhirpatient) {
|
||||
var patient = fhirpatient;
|
||||
|
||||
return {
|
||||
"lastname": () => {
|
||||
if (patient.name) {
|
||||
var nameElement = patient.name.find((element) => {
|
||||
return (element.use == "usual");
|
||||
});
|
||||
if (nameElement)
|
||||
return nameElement.family;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
"gender": () => {
|
||||
if(patient.gender)
|
||||
return patient.gender;
|
||||
return undefined;
|
||||
|
||||
},
|
||||
"date": () => {
|
||||
if(patient.birthDate)
|
||||
return patient.birthDate;
|
||||
},
|
||||
"home": () => {
|
||||
if (patient.address) {
|
||||
var addressElement = patient.address.find((element) => {
|
||||
return (element.use == "home");
|
||||
});
|
||||
if (addressElement)
|
||||
return (addressElement.postalCode + " " + addressElement.city);
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
"country": () => {
|
||||
if (patient.address) {
|
||||
var addressElement = patient.address.find((element) => {
|
||||
return (element.use == "home");
|
||||
});
|
||||
if (addressElement)
|
||||
return (addressElement.country);
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
function loadTemplates() {␍ $('#navigation').load('templates/NavbarTemplate.html');
|
||||
$('#content').load('templates/AboutTemplate.html');
|
||||
}␍␍$(document).ready(loadTemplates);
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),i=e[t[0]];return function(e,t,n){i.apply(this,[e,t,n].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function s(e){var t=(e.presets||[]).map(function(e){var t=n(x,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===d(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=h({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return h({},e,{presets:t,plugins:r})}function a(e,t){return v.transform(e,s(t))}function o(e,t,r){return v.transformFromAst(e,t,s(r))}function u(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function l(e){Object.keys(e).forEach(function(t){return u(t,e[t])})}function p(e,t){x.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),x[e]=t}function c(e){Object.keys(e).forEach(function(t){return p(t,e[t])})}function f(){window.removeEventListener("DOMContentLoaded",E)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.availablePresets=t.availablePlugins=void 0;var h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.transform=a,t.transformFromAst=o,t.registerPlugin=u,t.registerPlugins=l,t.registerPreset=p,t.registerPresets=c,t.disableScriptTags=f;var y=r(2492),v=i(y),m=r(2604),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},x=t.availablePresets={};l({"check-es2015-constants":r(692),"external-helpers-2":r(2635),"syntax-async-functions":r(697),"syntax-async-generators":r(2636),"syntax-class-constructor-call":r(1643),"syntax-class-properties":r(1644),"syntax-decorators":r(1064),"syntax-do-expressions":r(1645),"syntax-exponentiation-operator":r(1646),"syntax-export-extensions":r(1647),"syntax-flow":r(698),"syntax-function-bind":r(1648),"syntax-function-sent":r(2637),"syntax-jsx":r(1065),"syntax-object-rest-spread":r(1649),"syntax-trailing-function-commas":r(1066),"transform-async-functions":r(2638),"transform-async-to-generator":r(1067),"transform-async-to-module-method":r(2884),"transform-class-constructor-call":r(1760),"transform-class-properties":r(1800),"transform-decorators":r(1841),"transform-decorators-legacy":r(3353).default,"transform-do-expressions":r(1842),"transform-es2015-arrow-functions":r(768),"transform-es2015-block-scoped-functions":r(769),"transform-es2015-block-scoping":r(774),"transform-es2015-classes":r(777),"transform-es2015-computed-properties":r(780),"transform-es2015-destructuring":r(785),"transform-es2015-duplicate-keys":r(1227),"transform-es2015-for-of":r(790),"transform-es2015-function-name":r(791),"transform-es2015-instanceof":r(4165),"transform-es2015-literals":r(836),"transform-es2015-modules-amd":r(1279),"transform-es2015-modules-commonjs":r(852),"transform-es2015-modules-systemjs":r(2013),"transform-es2015-modules-umd":r(2020),"transform-es2015-object-super":r(858),"transform-es2015-parameters":r(876),"transform-es2015-shorthand-properties":r(878),"transform-es2015-spread":r(893),"transform-es2015-sticky-regex":r(898),"transform-es2015-template-literals":r(913),"transform-es2015-typeof-symbol":r(918),"transform-es2015-unicode-regex":r(924),"transform-es3-member-expression-literals":r(5092),"transform-es3-property-literals":r(5093),"transform-es5-property-mutators":r(5094),"transform-eval":r(5326),"transform-exponentiation-operator":r(1456),"transform-export-extensions":r(2260),"transform-flow-comments":r(5501),"transform-flow-strip-types":r(2261),"transform-function-bind":r(2262),"transform-jscript":r(5502),"transform-object-assign":r(5503),"transform-object-rest-spread":r(2263),"transform-object-set-prototype-of-to-assign":r(5534)Line truncated
|
||||
var h=r(1),d=n(h),y=r(17),v=n(y),m=r(11),g=n(m);t.assertEach=a,t.assertOneOf=o,t.assertNodeType=u,t.assertNodeOrValueType=l,t.assertValueType=p,t.chain=c,t.default=f;var b=r(3),x=i(b),E=t.VISITOR_KEYS={},A=t.ALIAS_KEYS={},S=t.NODE_FIELDS={},_=t.BUILDER_KEYS={},T=t.DEPRECATED_KEYS={},P={}},190,[6514,184,1023,181],[6611,6264],function(e,t){function r(e){for(var t=-1,r=e?e.length:0,i=0,n=[];++t<r;){var s=e[t];s&&(n[i++]=s)}return n}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},[6862,6333],[6446,1,2,1621,259,1051,15,689,2503,2509,2517,2507,2506,2512,2505,2516,2515,2508,2504],[6585,2834,19,377,1073,1655,2686,2703,1074,1075,18,702,377,1073,1655],[6591,19,46,1656,2730,2734,376,1666,1073,18,702,2687,2693,2701,2691,2690,2696,2689,2700,2699,2692,2688],[6669,2842],[6682,2837,1683],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},[6532,1089,1087],[6591,5,12,1707,2976,2980,585,1717,1108,7,720,2933,2939,2947,2937,2936,2942,2935,2946,2945,2938,2934],380,[6532,1121,1119],[6591,5,12,1738,3115,3119,476,1757,1136,7,732,3075,3081,3089,3079,3078,3084,3077,3088,3087,3080,3076],285,[6682,3185,1144],380,[6532,1149,1147],[6585,3181,28,391,1163,1776,3235,3252,1164,1166,29,746,391,1163,1776],[6591,28,67,1777,3266,3270,390,1172,1163,29,746,3236,3242,3250,3240,3239,3245,3238,3249,3248,3241,3237],[6682,3360,1801],380,[6532,1178,1176],[6585,3356,40,396,1192,1817,3410,3427,1193,1195,30,761,396,1192,1817],[6591,40,68,1818,3441,3445,395,1201,1192,30,761,3411,3417,3425,3415,3414,3420,3413,3424,3423,3416,3412],[6446,1,2,1853,487,1209,21,775,3561,3567,3575,3565,3564,3570,3563,3574,3573,3566,3562],[6446,1,2,1860,489,1211,22,778,3604,3610,3618,3608,3607,3613,3606,3617,3616,3609,3605],141,[6803,1896,3849,3853,611,3927,1237,801,3806,3812,3820,3810,3809,3815,3808,3819,3818,3811,3807],380,[6532,1253,1251],[6803,1935,4044,4048,502,4138,1268,818,4004,4010,4018,4008,4007,4013,4006,4017,4016,4009,4005],373,[6682,4172,1967],380,[6532,1285,1283],[6585,4168,41,409,1299,1983,4222,4239,1300,1302,31,845,409,1299,1983],[6591,41,69,1984,4253,4257,408,1308,1299,31,845,4223,4229,4237,4227,4226,4232,4225,4236,4235,4228,4224],[6446,1,2,2008,624,1309,23,853,4342,4348,4356,4346,4345,4351,4344,4355,4354,4347,4343],[6821,4389,1313],[6446,32,70,2015,627,1314,33,856,4395,4401,4409,4399,4398,4404,4397,4408,4407,4400,4396],[6591,34,59,2022,4481,4485,513,2032,1316,24,860,4438,4444,4452,4442,4441,4447,4440,4451,4450,4443,4439],[6682,4589,1327],380,[6532,1332,1330],[6868,2064,635,78,1346,877,4642,4648,4656,4646,4645,4651,4644,4655,4654,4647,4643],[6682,4666,4664],380,[6532,1352,1350],[6591,42,71,2083,4767,4771,519,2102,1367,35,887,4727,4733,4741,4731,4730,4736,4729,4740,4739,4732,4728],285,[6682,4872,4870],380,[6532,1386,1384],[6591,43,72,2131,4973,4977,525,2150,1401,25,907,4933,4939,4947,4937,4936,4942,4935,4946,4945,4938,4934],285,183,[6591,4,14,2174,5156,5160,648,937,1424,8,927,5113,5119,5127,5117,5116,5122,5115,5126,5125,5118,5114],[6591,4,14,2180,5216,5220,535,937,1427,8,930,5176,5182,5190,5180,5179,5185,5178,5189,5188,5181,5177],380,[6532,1442,1440],[6591,44,73,2223,5381,5385,540,2242,1458,26,944,5341,5347,5355,5345,5344,5350,5343,5354,5353,5346,5342],285,[6682,5452,5450],380,[6532,1470,1468],[6591,45,74,2295,5669,5673,550,2313,1506,36,970,5629,5635,5643,5633,5632,5638,5631,5642,5641,5634,5630],285,[6682,5740,5738],380,[6532,1519,1517],[6591,38,75,2334,5844,5848,554,2352,1534,37,984,5804,5810,5818,5808,5807,5813,5806,5817,5816,5809,5805],285,[6682,5915,5913],380,[6532,1547,1545],function(e,t,r){e.exports={default:r(2428),__esModule:!0}},[6864,450,1562,2380,5990,6007,1566,1e3,450,1562,2380],[6868,2381,449,6081,1562,1e3,5991,5997,6005,5995,5994,6e3,5993,6004,6003,5996,5992],103,373,380,[6532,1585,1019],[6613,6292],function(e,t,r){"use strict";var i=function(e,t,r,i,n,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,i,n,s,a,o],p=0;u=new Error(t.replace(/%s/g,function(){return l[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=i},function(e,t,r){var i=r(2457),n=r(6305),s=r(6390),a=r(1607),o=a(function(e){return e.push(void 0,n),i(s,void 0,e)});e.exports=o},[6793,1605,2473],[6816,6329,1612,571,684],function(e,t){"use strict";function r(e){return 10===e||13===e||8232===e||8233===e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNewLine=r;var i=t.lineBreak=/\r\n?|\n|\u2028|\u2029/;t.lineBreakG=new RegExp(i.source,"g"),t.nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/},183,[6536,1641,1642,461],460,[6575,1654,578,1069],83,460,83,285,[6525,1695,1088],460,[6575,1705,584,1104],83,460,83,[6525,1730,1120],[6585,1718,5,385,1136,1737,3074,3091,1137,1138,7,732,385,1136,1737],460,[6580,736,1140,85,3166],[6525,1770,1148],460,[6580,749,1169,86,3339],[6525,1811,1177],460,[6580,764,1198,87,3514],183,[6536,1850,1851,485],[6440,1,397,1209,18Line truncated
|
||||
(0,u.default)(this,t);var n=(0,p.default)(this,e.call(this));return n.initialized=!1,n.raw=(0,A.default)({},r),n.key=n.take("name")||i,n.manipulateOptions=n.take("manipulateOptions"),n.post=n.take("post"),n.pre=n.take("pre"),n.visitor=n.normaliseVisitor((0,_.default)(n.take("visitor"))||{}),n}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var s=r,o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var p=l;if(p){var c=p.apply(this,i);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=x.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(v.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=T,r=Array.isArray(t),i=0,t=r?t:(0,a.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return x.default.explode(e),e},t}(g.default);t.default=P,e.exports=t.default},[6437,558],[6490,2,460],[6491,1628,559,3],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2605),s=i(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var i in r.bindings){var n=r.bindings[i];if("const"===n.kind||"module"===n.kind)for(var a=n.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l;throw p.buildCodeFrameError(t.get("readOnly",i))}}}}}},e.exports=t.default},[6507,1059],[6511,1637],190,581,function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},[6552,46,107,463],[6490,46,463],function(e,t){function r(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?n:t,e>-1&&e%1==0&&e<t}var i=/^\d+$/,n=9007199254740991;e.exports=r},[6582,2838],[6552,46,109,466],[6490,46,466],265,[6575,1664,580,705],[6580,1664,1076,467,2754],[6565,2823],[6580,708,1081,83,2819],[6667,2840],[6510,2852],[6706,716,191,190,272,380],function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},[6527,272,190,110],function(e,t){var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},[6552,12,112,470],[6490,12,470],701,[6582,1720],[6552,12,114,473],[6490,12,473],265,[6575,1715,587,723],[6580,1715,1111,474,3e3],[6510,3031],[6706,731,195,194,276,383],713,714,[6527,276,194,116],716,[6582,1720],[6552,12,118,477],[6490,12,477],[6561,1759],[6565,3169],[6568,1140,1141,85],[6667,3190],[6679,3180],[6510,3202],[6706,745,200,199,283,388],713,714,[6527,283,199,119],716,[6582,3186],[6552,67,121,480],[6490,67,480],[6565,3343],701,[6568,1169,750,86],[6574,1169,286],[6667,3365],[6679,3355],[6510,3377],[6706,760,204,203,291,393],713,714,[6527,291,203,123],716,[6582,3361],[6552,68,125,483],[6490,68,483],[6565,3518],701,[6568,1198,765,87],[6574,1198,294],function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var i=e.node;if(i.shadow)return;i.shadow={this:!1},i.type="FunctionExpression";var n=t.thisExpression();n._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),n]))),e.replaceWith(t.callExpression(t.memberExpression(i,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(3528),s=i(n);t.default=function(e){function t(e,t){for(var i=t.get(e),n=i,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u,p=l.node;if(l.isFunctionDeclaration()){var c=r.variableDeclaration("let",[r.variableDeclarator(p.id,r.toExpression(p))]);c._blockHoist=2,p.id=null,l.replaceWith(c)}}}var r=e.types;return{visitoLine truncated
|
||||
p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;r=A(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name,i=this.exports[r];if(i&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=m.assignmentExpression(e.node.operator[0]+"=",t.node,m.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var s=[];s.push(n);var a=void 0;a="--"===e.node.operator?"+":"-",s.push(m.binaryExpression(a,t.node,m.numericLiteral(1)));for(var o=e.replaceWithMultiple(m.sequenceExpression(s)),u=o,l=Array.isArray(u),c=0,u=l?u:(0,p.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var h=f;this.requeueInParent(h)}}}}};return{inherits:r(2373),visitor:{ThisExpression:function(e,t){this.ranCommonJS||t.opts.allowTopLevelThis===!0||e.findParent(function(e){return!e.is("shadow")&&_.indexOf(e.type)>=0})||e.replaceWith(m.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var i=T[t];if(i)return i;var n=e.scope.generateUidIdentifier((0,h.basename)(t,(0,h.extname)(t))),s=m.variableDeclaration("var",[m.variableDeclarator(n,g(m.stringLiteral(t)).expression)]);return f[t]&&(s.loc=f[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),T[t]=n}function i(e,t,r){var i=e[t]||[];e[t]=i.concat(r)}this.ranCommonJS=!0;var n=!!this.opts.strict,s=e.scope;s.rename("module"),s.rename("exports"),s.rename("require");for(var o=!1,l=!1,c=e.get("body"),f=(0,u.default)(null),d=(0,u.default)(null),y=(0,u.default)(null),v=[],_=(0,u.default)(null),T=(0,u.default)(null),P=!1,w=c,k=Array.isArray(w),C=0,w=k?w:(0,p.default)(w);;){var D;if(k){if(C>=w.length)break;D=w[C++]}else{if(C=w.next(),C.done)break;D=C.value}var O=D;if(O.isExportDeclaration()){o=!0;for(var N=[].concat(O.get("declaration"),O.get("specifiers")),I=N,F=Array.isArray(I),B=0,I=F?I:(0,p.default)(I);;){var R;if(F){if(B>=I.length)break;R=I[B++]}else{if(B=I.next(),B.done)break;R=B.value}var L=R,M=L.getBindingIdentifiers();if(M.__esModule)throw L.buildCodeFrameError('Illegal export "__esModule"')}}if(O.isImportDeclaration()){var j;l=!0;var V=O.node.source.value,U=f[V]||{specifiers:[],maxBlockHoist:0,loc:O.node.loc};(j=U.specifiers).push.apply(j,O.node.specifiers),"number"==typeof O.node._blockHoist&&(U.maxBlockHoist=Math.max(O.node._blockHoist,U.maxBlockHoist)),f[V]=U,O.remove()}else if(O.isExportDefaultDeclaration()){if(P)throw O.buildCodeFrameError("Only one default export allowed per module.");var Y=O.get("declaration");if(Y.isFunctionDeclaration()){var K=Y.node.id,W=m.identifier("default");K?(i(d,K.name,W),v.push(A(W,K)),O.replaceWith(Y.node)):(v.push(A(W,m.toExpression(Y.node))),O.remove())}else if(Y.isClassDeclaration()){var G=Y.node.id,q=m.identifier("default");G?(i(d,G.name,q),O.replaceWithMultiple([Y.node,A(q,G)])):O.replaceWith(A(q,m.toExpression(Y.node)))}else O.replaceWith(A(m.identifier("default"),Y.node)),O.parentPath.requeue(O.get("expression.left"));P=!0}else if(O.isExportNamedDeclaration()){var H=O.get("declaration");if(H.node){if(H.isFunctionDeclaration()){var X=H.node.id;i(d,X.name,X),v.push(A(X,X)),O.replaceWith(H.node)}else if(H.isClassDeclaration()){var J=H.node.id;i(d,J.name,J),O.replaceWithMultiple([H.node,A(J,J)]),y[J.name]=!0}else if(H.isVariableDeclaration()){for(var $=H.get("declarations"),z=$,Q=Array.isArray(z),Z=0,z=Q?z:(0,p.default)(z);;){var ee;if(Q){if(Z>=z.length)break;ee=z[Z++]}else{if(Z=z.next(),Z.done)break;ee=Z.value}var te=ee,re=te.get("id"),ie=te.get("init");ie.node||ie.replaceWith(m.identifier("undefined")),re.isIdentifier()&&(i(d,re.node.name,re.node),ie.replaceWith(A(re.node,ie.node).expression),y[re.node.name]=!0)}O.replaceWith(H.node)}continue}var ne=O.get("specifiers"),se=[],ae=O.node.source;if(ae)for(var oe=r(ae.value,O.node._blockHoist),ue=ne,le=Array.isArray(ue),pe=0,ue=le?ue:(0,p.default)(ue);;){var ce;if(le){if(pe>=ue.length)break;ce=ue[pe++]}else{if(pe=ue.next(),pe.done)break;ce=pe.value}var fe=ce;fe.isExportNamespaceSpecifier()||fe.isExportDefaultSpecifier()||fe.isExportSpecifier()&&("default"===fe.node.local.name?v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(m.callExpression(this.addHelper("interopRequireDefault"),[oe]),fe.node.local))):v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(oe,fe.node.local))),y[fe.node.exported.name]=!0)}else for(var he=ne,de=Array.isArray(he),ye=0,he=de?he:(0,p.default)(he);;){var ve;if(de){if(ye>=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var me=ve;me.isExportSpecifier()&&(i(d,me.node.local.name,me.node.exported),y[me.node.exported.name]=!0,se.push(A(me.node.exported,me.node.local)))}O.replaceWithMultiple(se)}else if(O.isExportAllDeclaration()){var ge=S({OBJECT:r(O.node.source.value,O.node._blockHoist)});ge.loc=O.node.loc,v.push(ge),Line truncated
|
||||
if(null!=r){var i=l.default[t];if(i&&i.alias&&(i=l.default[i.alias]),i){var n=o[i.type];n&&(r=n(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=s;var a=r(1048),o=n(a),u=r(572),l=i(u);t.config=l.default},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return!!e}function a(e){return c.booleanify(e)}function o(e){return c.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=s,t.booleanString=a,t.list=o;var u=r(2486),l=n(u),p=r(1050),c=i(p);t.filename=l.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){var r=t||n.EXTENSIONS,i=C.default.extname(e);return(0,S.default)(r,i)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(y.default).join("|"),"i")),"string"==typeof e){e=(0,O.default)(e),((0,m.default)(e,"./")||(0,m.default)(e,"*/"))&&(e=e.slice(2)),(0,m.default)(e,"**/")&&(e=e.slice(3));var t=E.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,w.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?(0,b.default)(e)?o([e],t):(0,T.default)(e)?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];if(e=(0,O.default)(e),r){for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,f.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(p(o,e))return!1}return!0}if(t.length)for(var u=t,l=Array.isArray(u),c=0,u=l?u:(0,f.default)(u);;){var h;if(l){if(c>=u.length)break;h=u[c++]}else{if(c=u.next(),c.done)break;h=c.value}var d=h;if(p(d,e))return!0}return!1}function p(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var c=r(1),f=i(c),h=r(48);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return h.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return h.inspect}}),t.canCompile=n,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var d=r(6392),y=i(d),v=r(6409),m=i(v),g=r(2482),b=i(g),x=r(6416),E=i(x),A=r(50),S=i(A),_=r(82),T=i(_),P=r(255),w=i(P),k=r(187),C=i(k),D=r(2486),O=i(D);n.EXTENSIONS=[".js",".jsx",".es6",".es"]},[6457,39,16,2,1,2518,259,1622,15,689],[6460,367],[6475,104,2538,2537,2535,2533,2536,2534,2532,105,1624,574,2539,2540],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function a(e){this.token("..."),this.print(e.argument,e)}function o(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function u(e){this.printJoin(e.decorators,e),this._method(e)}function l(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(b.isAssignmentPattern(eLine truncated
|
||||
t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},[6543,1683,2679,2682,2683,376,2642,18],[6553,268,46,577,107,699,700,463,2654],[6556,2661,1072],[6561,2685],[6565,2681],[6584,46],[6597,18],[6601,46],function(e,t){!function(){"use strict";function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function i(e){return e>=48&&e<=55}function n(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&h.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return e<128?d[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?y[e]:f.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:c.NonAsciiIdentifierStart.test(a(e))}function p(e){return e<128?y[e]:c.NonAsciiIdentifierPart.test(a(e))}var c,f,h,d,y,v;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\Line truncated
|
||||
var K;if(U){if(Y>=V.length)break;K=V[Y++]}else{if(Y=V.next(),Y.done)break;K=Y.value}var W=K;W.remove()}y.length&&(e.isClassExpression()?(e.scope.push({id:v}),e.replaceWith(t.assignmentExpression("=",v,e.node))):(e.node.id||(e.node.id=v),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(y))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){var r=t.get("body"),i=r.get("body");i.some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(691),o=i(a);e.exports=t.default},[6675,3374],1580,[6512,204,202],[6701,755,3388,3387,201,1186,1814],[6516,288,393,1803],[6703,1175],[6519,1179,289,1182,290,203,599,3389,759,1810,123],[6708,757,758,394,1187,203,1805,288],[6710,1811,1177],[6523,203,600,1183],[6524,203,394,3379,1183],[6711,289,56,393],[6712,290],[6537,3382,123,599,56],685,[6540,3396,1807],[6584,68],[6597,30],[6601,68],1658,[6636,598,30],1658,[6475,124,3471,3470,3468,3466,3469,3467,3465,125,1824,762,3472,3473],[6553,754,68,601,125,762,763,483,3475],1784,1660,1669,[6556,3486,484],[6557,3481,1827,1828,1831,3511,3512,3513,126,87],[6558,3502],[6559,1830,484],[6615,3510],[6645,3489,87,294],1674,1794,[6660,87],[6617,1829,602,766],[6618,294],[6581,767,126,765,293,87],1681,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(16),s=i(n),a=r(1),o=i(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function i(e,r,i){var n=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var h;if(p){if(c>=l.length)break;h=l[c++]}else{if(c=l.next(),c.done)break;h=c.value}var d=h;n.push(f({CLASS_REF:r,DECORATOR:d}))}}for(var y=(0,s.default)(null),v=e.get("body.body"),m=Array.isArray(v),g=0,v=m?v:(0,o.default)(v);;){var b;if(m){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var x=b,E=x.node.decorators;if(E){var A=u.toKeyAlias(x.node);y[A]=y[A]||[],y[A].push(x.node),x.remove()}}for(var S in y)var _=y[S];return n}function n(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(s.decorators)return!0}}else if(e.isObjectExpression())for(var a=e.node.properties,u=Array.isArray(a),l=0,a=u?a:(0,o.default)(a);;){var p;if(u){if(l>=a.length)break;p=a[l++]}else{if(l=a.next(),l.done)break;p=l.value}var c=p;if(c.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(1064),visitor:{ClassExpression:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(i(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.node.id,r=[];r=r.concat(i(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){n(e)&&a(e)}}}};var u=r(559),l=i(u),p=r(2572),c=i(p),f=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(1645),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},1086,[6512,1204,485],1088,380,[6519,3541,3535,3547,603,772,773,3539,1849,3544,486],714,[6527,1205,772,486],[6529,485],716,[6439,2],[6452,21],[6456,2],[6473,16,21],[6475,127,3596,3595,3593,3591,3594,3592,3590,128,1857,604,3597,3598],[6487,47,2,605,128,604,776,488,3600],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(1),a=n(s),o=r(2),u=n(o),l=r(489),p=r(2591),c=n(p),f=r(1630),h=n(f),d=r(2571),y=i(d),v=r(3602),m=n(v),g=r(22),b=i(g),x=(0,m.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:fuLine truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,n){var s=e.specifiers[0];if(i.isExportNamespaceSpecifier(s)||i.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=n.generateUidIdentifier(a.exported.name),u=void 0;u=i.isExportNamespaceSpecifier(a)?i.importNamespaceSpecifier(o):i.importDefaultSpecifier(o),r.push(i.importDeclaration([u],e.source)),r.push(i.exportNamedDeclaration(null,[i.exportSpecifier(o,a.exported)])),t(e,r,n)}}var i=e.types;return{inherits:r(1647),visitor:{ExportNamedDeclaration:function(e){var r=e.node,i=e.scope,n=[];t(r,n,i),n.length&&(r.specifiers.length>=1&&n.push(r),e.replaceWithMultiple(n))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(1),s=i(n);t.default=function(e){var t=e.types,i="@flow";return{inherits:r(698),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,n=r,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u;l.value.indexOf(i)>=0&&(l.value=l.value.replace(i,""),l.value.replace(/\*/g,"").trim()||(l.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){var i=t.params[r];i.optional=!1}},TypeCastExpression:function(e){var r=e.node;do r=r.expression;while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function i(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function n(e,r){var n=i(e,r);if(n)return n;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(1648),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,i=t.callee;if(s.isBindExpression(i)){var a=n(i,r);t.callee=s.memberExpression(i.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){var t=e.node,r=e.scope,i=n(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[i]))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5504),s=i(n);t.default=function(e){function t(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var a;if(r){if(n>=t.length)break;a=t[n++]}else{if(n=t.next(),n.done)break;a=n.value}var o=a;if(i.isSpreadProperty(o))return!0}return!1}var i=e.types;return{inherits:r(1649),visitor:{ObjectExpression:function(e,r){function n(){o.length&&(a.push(i.objectExpression(o)),o=[])}if(t(e.node)){for(var a=[],o=[],u=e.node.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;i.isSpreadProperty(f)?(n(),a.push(f.argument)):o.push(f)}n(),i.isObjectExpression(a[0])||a.unshift(i.objectExpression([])),e.replaceWith(i.callExpression(r.addHelper("extends"),a))}}}}},e.exports=t.default},1086,[6512,1486,544],1088,380,[6519,5517,5511,5523,660,960,961,5515,2270,5520,545],714,[6527,1487,960,545],[6529,544],716,1086,[6512,1493,546],1088,380,[6519,5549,5543,5555,661,964,965,5547,2279,5552,547],714,[6527,1494,964,547],[6529,546],716,103,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,n=!0,s=0;s<r.length;s++){var a=r[s],o=i.toComputedKey(a);if(i.isLiteral(o,{value:"displayName"})){n=!1;break}}n&&r.unshift(i.objectProperty(i.identifier("displayName"),i.stringLiteral(e)))}function r(e){if(!e||!i.isCallExpression(e))return!1;if(!n(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!i.isObjectExpression(r)}var i=e.types,n=i.buildMatchMemberExpression("React.createClass");return{visitor:{ExportDefaultDeclaration:function(e,i){var n=e.node;if(r(n.declaration)){var a=i.file.opts.basename;"index"===a&&(a=s.default.basename(s.default.dirname(i.file.opts.filename))),t(a,n.declaration)}},CallExpression:function(e){var n=e.node;if(r(n)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(i.isMemberExpression(s)&&(s=s.property),i.isIdentifier(s)&&t(s.name,n))}}}}};var n=r(187),s=i(n);e.exports=t.default},1086,[6512,1500,548],1088,380,[6519,5598,5592,5604,662,968,969,5596,2290,5601,549],714,[6527,1501,968,54Line truncated
|
||||
if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(r,"Invalid regular expression flag")}return this.finishToken(p.types.regexp,{pattern:n,flags:s})}},{key:"readInt",value:function(e,t){for(var r=this.state.pos,i=0,n=0,s=null==t?1/0:t;n<s;++n){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0,o>=e)break;++this.state.pos,i=i*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:i}},{key:"readRadixNumber",value:function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(p.types.num,t)}},{key:"readNumber",value:function(e){var t=this.state.pos,r=!1,i=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.state.pos);46===n&&(++this.state.pos,this.readInt(10),r=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||(n=this.input.charCodeAt(++this.state.pos),43!==n&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var s=this.input.slice(t,this.state.pos),a=void 0;return r?a=parseFloat(s):i&&1!==s.length?/[89]/.test(s)||this.state.strict?this.raise(t,"Invalid number"):a=parseInt(s,8):a=parseInt(s,10),this.finishToken(p.types.num,a)}},{key:"readCodePoint",value:function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t}},{key:"readString",value:function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):((0,h.isNewLine)(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(p.types.string,t)}},{key:"readTmplToken",value:function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(p.types.template)?36===r?(this.state.pos+=2,this.finishToken(p.types.dollarBraceL)):(++this.state.pos,this.finishToken(p.types.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(p.types.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if((0,h.isNewLine)(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return n(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),i>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(i)}return String.fromCharCode(t)}}},{key:"readHexChar",value:function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r}},{key:"readWord1",value:function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if((0,l.isIdentifierChar)(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var s=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint();(t?l.isIdentifierStart:l.isIdentifierChar)(a,!0)||this.raise(s,"Invalid Unicode escape"),e+=n(a),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)}},{keyLine truncated
|
||||
},E="0000",A=function(e,t){var r=String(e);return r.length<t?(E+r).slice(-t):r},S=function(e){return Number(e).toString(16).toUpperCase()},_=[].slice,T=function(e){for(var t,r=-1,i=e.length,n=i-1,s=[],a=!0,o=0;++r<i;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=n){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},P=function(e,t){for(var r,i,n=0,s=e.length;n<s;){if(r=e[n],i=e[n+1],t>=r&&t<i)return t==r?i==r+1?(e.splice(n,2),e):(e[n]=t+1,e):t==i-1?(e[n+1]=t,e):(e.splice(n,2,r,t,t+1,i),e);n+=2}return e},w=function(e,t,r){if(r<t)throw Error(u.rangeOrder);for(var i,n,s=0;s<e.length;){if(i=e[s],n=e[s+1]-1,i>r)return e;if(t<=i&&r>=n)e.splice(s,2);else{if(t>=i&&r<n)return t==i?(e[s]=r+1,e[s+1]=n+1,e):(e.splice(s,2,i,t,r+1,n+1),e);if(t>=i&&t<=n)e[s+1]=t;else if(r>=i&&r<=n)return e[s]=r+1,e;s+=2}}return e},k=function(e,t){var r,i,n=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(u.codePointRange);for(;n<a;){if(r=e[n],i=e[n+1],t>=r&&t<i)return e;if(t==r-1)return e[n]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==i)return t+1==e[n+2]?(e.splice(n,4,r,e[n+3]),e):(e[n+1]=t+1,e);s=n,n+=2}return e.push(t,t+1),e},C=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?k(s,r):O(s,r,i),n+=2;return s},D=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?P(s,r):w(s,r,i),n+=2;return s},O=function(e,t,r){if(r<t)throw Error(u.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(u.codePointRange);for(var i,n,s=0,a=!1,o=e.length;s<o;){if(i=e[s],n=e[s+1],a){if(i==r+1)return e.splice(s-1,2),e;if(i>r)return e;i>=t&&i<=r&&(n>t&&n-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(i==r+1)return e[s]=t,e;if(i>r)return e.splice(s,0,t,r+1),e;if(t>=i&&t<n&&r+1<=n)return e;t>=i&&t<n||n==t?(e[s+1]=r+1,a=!0):t<=i&&r+1>=n&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},N=function(e,t){var r=0,i=e.length,n=e[r],s=e[i-1];if(i>=2&&(t<n||t>s))return!1;for(;r<i;){if(n=e[r],s=e[r+1],t>=n&&t<s)return!0;r+=2}return!1},I=function(e,t){for(var r,i=0,n=t.length,s=[];i<n;)r=t[i],N(e,r)&&s.push(r),++i;return T(s)},F=function(e){return!e.length},B=function(e){return 2==e.length&&e[0]+1==e[1]},R=function(e){for(var t,r,i=0,n=[],s=e.length;i<s;){for(t=e[i],r=e[i+1];t<r;)n.push(t),++t;i+=2}return n},L=Math.floor,M=function(e){return parseInt(L((e-65536)/1024)+l,10)},j=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+V(e):e>=32&&e<=126?V(e):e<=255?"\\x"+A(S(e),2):"\\u"+A(S(e),4)},Y=function(e){return e<=65535?U(e):"\\u{"+e.toString(16).toUpperCase()+"}"},K=function(e){var t,r=e.length,i=e.charCodeAt(0);return i>=l&&i<=p&&r>1?(t=e.charCodeAt(1),1024*(i-l)+t-c+65536):i},W=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return U(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?U(t):t+1==r?U(t)+U(r):U(t)+"-"+U(r),n+=2;return"["+i+"]"},G=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return Y(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?Y(t):t+1==r?Y(t)+Y(r):Y(t)+"-"+Y(r),n+=2;return"["+i+"]"},q=function(e){for(var t,r,i=[],n=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<l?(r<l&&s.push(t,r+1),r>=l&&r<=p&&(s.push(t,l),i.push(l,r+1)),r>=c&&r<=f&&(s.push(t,l),i.push(l,p+1),n.push(c,r+1)),r>f&&(s.push(t,l),i.push(l,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=l&&t<=p?(r>=l&&r<=p&&i.push(t,r+1),r>=c&&r<=f&&(i.push(t,p+1),n.push(c,r+1)),r>f&&(i.push(t,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=c&&t<=f?(r>=c&&r<=f&&n.push(t,r+1),r>f&&(n.push(t,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>f&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:i,loneLowSurrogates:n,bmp:s,astral:a}},H=function(e){for(var t,r,i,n,s,a,o=[],u=[],l=!1,p=-1,c=e.length;++p<c;)if(t=e[p],r=e[p+1]){for(i=t[0],n=t[1],s=r[0],a=r[1],u=n;s&&i[0]==s[0]&&i[1]==s[1];)u=B(a)?k(u,a[0]):O(u,a[0],a[1]-1),++p,t=e[p],i=t[0],n=t[1],r=e[p+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([i,l?u:n]),l=!1}else o.push(t);return X(o)},X=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var i=e[t],n=i[1],s=n[0],a=n[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],p=u[1];s==l&&a==p&&(B(o[0])?i[0]=k(i[0],o[0][0]):i[0]=O(i[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},J=function(e){if(!e.length)return[];for(var t,r,i,n,s,a,o=0,u=0,l=0,p=[],h=e.length;o<h;){t=e[o],r=e[o+1]-1,i=M(t),n=j(t),s=M(r),a=j(r);var d=n==c,y=a==f,v=!1;i==s||d&&y?(p.push([[i,s+1],[n,a+1]]),v=!0):p.push([[i,i+1],[n,f+1]]),!v&&i+1<s&&(y?(p.push([[i+1,s+1],[c,a+1]]),v=!0):p.push([[i+1,s],[c,f+1]])),v||p.push([[s,s+1],[c,a+1]]),u=i,l=s,o+=2}return H(p)},$=function(e){var t=[];return m(e,function(e){var r=e[0],i=e[1];t.push(W(r)+W(i))}),t.join("|")},z=fuLine truncated
|
||||
t.Noop=a,t.Directive=o;var u=r(1054);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function n(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=i,t.ClassProperty=n,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function a(e){this.word("do"),this.space(),this.print(e.body,e)}function o(e){this.token("("),this.print(e.expression,e),this.token(")")}function u(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function l(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function p(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||k.isCallExpression(t,{callee:e})||k.isMemberExpression(t)||k.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function f(){this.word("this")}function h(){this.word("super")}function d(e){this.token("@"),this.print(e.expression,e),this.newline()}function y(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function v(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=y,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function m(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function g(){this.semicolon(!0)}function b(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!D.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function S(e){if(this.print(e.object,e),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;k.isLiteral(e.property)&&(0,P.default)(e.property.value)&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function _(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=s,t.DoExpression=a,t.ParenthesizedExpression=o,t.UpdateExpression=u,t.ConditionalExpression=l,t.NewExpression=p,t.SequenceExpression=c,t.ThisExpression=f,t.Super=h,t.Decorator=d,t.CallExpression=v,t.EmptyStatement=g,t.ExpressionStatement=b,t.AssignmentPattern=x,t.AssignmentExpression=E,t.BindExpression=A,t.MemberExpression=S,t.MetaProperty=_;var T=r(253),P=n(T),w=r(51),k=i(w),C=r(1626),D=i(C);t.YieldExpression=m("yield"),t.AwaitExpression=m("await");t.BinaryExpression=E,t.LogicalExpression=E},function(e,t,r){"use strict";function i(){this.word("any")}function n(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("bool")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("Line truncated
|
||||
if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,m.default)(a,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,i.addNewlines&&(s+=i.addNewlines(e,t)||0);var p=w.needsWhitespaceAfter;e&&(p=w.needsWhitespaceBefore),p(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var i=e.loc&&e.loc.start.column;if(i){var n=new RegExp("\\n\\s{1,"+i+"}","g");r=r.replace(n,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,l.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;this._printComment(s)}},e}();t.default=B;for(var R=[r(2552),r(2546),r(2551),r(2545),r(2549),r(2550),r(1054),r(2547),r(2544),r(2548)],L=0;L<R.length;L++){var M=R[L];(0,o.default)(B.prototype,M)}e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(39),s=i(n),a=r(11),o=i(a),u=r(2),l=i(u),p=r(2490),c=i(p),f=function(){function e(t,r){var i=this;(0,l.default)(this,e),this._opts=t,this._map=new c.default.SourceMapGenerator({file:t.sourceMapTarget,sourceRoot:t.sourceRoot}),"string"==typeof r?this._map.setSourceContent(t.sourceFileName,r):"object"===("undefined"==typeof r?"undefined":(0,o.default)(r))&&(0,s.default)(r).forEach(function(e){i._map.setSourceContent(e,r[e])})}return e.prototype.get=function(){return this._map.toJSON()},e.prototype.mark=function(e,t,r,i,n,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===i||(this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=i,this._map.addMapping({name:n,generated:{line:e,column:t},source:null==r?null:s||this._opts.sourceFileName,original:null==r?null:{line:r,column:i}}))},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2),s=i(n),a=function(){function e(t){(0,s.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.start-e.start},0,i.length);if(n>=0){for(;n&&e.start===i[n-1].start;)--n;t=i[n-1],r=i[n]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.end-e.end},0,i.length);if(n>=0){for(;n&&e.end===i[n-1].end;)--n;t=i[n],r=i[n+1],","===r.type.label&&(r=i[n+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,i=t.loc.start.line,n=0,s=r;s<i;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,n++);return n},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var i=t+r>>>1,n=e(this.tokens[i]);return n<0?this._findToken(e,i+1,r):n>0?this._findToken(e,t,i):0===n?i:-1},e}();t.default=a,e.exports=t.default},[6461,366,17,1,51],[6462,51,1055,261],[6463,261],[6464,261],[6465,261],[6467,261,2559,2560,2562,2564,2565,2561],[6468,261],[6469,261],[6470,51],[6472,51],[6474,1,1627,51,1055],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=s.node,u=a.expression;if(l.isMemberExpression(u)){var p=s.scope.maybeGenerateMemoised(u.object),c=void 0,f=[];p?(c=p,f.push(l.assignmentExpression("=",p,u.object))):c=u.object,f.push(l.callExpression(l.memberExpression(l.memberExpression(c,u.property,u.computLine truncated
|
||||
t.addComments=n},[6587,19,376],[6588,18],[6589,379,19],[6590,19,377,18],[6592,19,2695,18],[6593,19,18],[6594,2694,18],[6595,379,19,1075,18],[6596,46,19,18],function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("body"===e.key&&t.isArrowFunctionExpression())return e.replaceWith(e.scope.buildUndefinedNode()),!0},function(e,t){var r=!1;if(r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0}]},[6598,379,19,702,2697,377,18],[6599,19,2698],[6600,19,2704,376,377,2717,18],[6603,46,1657,18],[6604,379,1084,19,1656,1074,18,2756],[6605,2716,2715,2705],[6606,2707,2706,2710,2708,2712],2491,function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},[6607,2709],1615,[6608,2711],1615,function(e,t,r){(function(t){"use strict";var r=t.argv,i=r.indexOf("--"),n=function(e){e="--"+e;var t=r.indexOf(e);return t!==-1&&(i===-1||t<i)};e.exports=function(){return"FORCE_COLOR"in t.env||!(n("no-color")||n("no-colors")||n("color=false"))&&(!!(n("color")||n("colors")||n("color=true")||n("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(10))},function(e,t){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function i(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){return i(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:i,isIterationStatement:r,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:s}}()},[6609,1658],[6610,2713,1658,2714],function(e,t){e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},[6475,108,2725,2724,2722,2720,2723,2721,2719,109,1659,703,2726,2727],2531,[6544,108],[6545,378,19,109,108,579],[6479,704,108],[6546,19,109,108,579],[6547,46,268,108,704],[6548,19,378,109,108,466],[6549,109,108,466],[6550,109,108],[6551,2728,109,703,108,579,466],2541,[6554,46,268,704,703,109],[6611,2731],[6612,2732],function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms"Line truncated
|
||||
function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){function r(e,t){return e.add(t),e}e.exports=r},1902,1602,2458,[6741,1230,800],[6742,3725,3731,1228,3733,3744,3751,3752,3755,3757,3766,3767,3768,399,3796,1891,497,800],[6743,497],[6744,3732,399],[6746,1234,1891,3772,497,1892],function(e,t){function r(e){return i(Object(e))}var i=Object.keys;e.exports=r},1951,function(e,t){function r(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}e.exports=r},[6747,1886,799],[6748,399,3790],function(e,t){function r(e){return e&&e.Object===Object?e:null}e.exports=r},function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},[6750,1229],[6751,3728,1887,3783],function(e,t){function r(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;e.exports=r},[6752,3729,1887,3784],[6753,1886],[6754,1229],2467,[6756,1230,1890],[6757,205],[6758,3769,3798],[6759,3736,1890,800],[6760,3739],[6764,3721,1884,3723,3724,3727,1892],function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},[6765,3742,1893,399,1231,3770,1235,1894,3791],[6766,797],function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},[6767,797],[6768,797],[6769,797],[6770,3740,1893,399,1235,1894],function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,n=i.hasOwnProperty;e.exports=r},[6771,1229,3745,3746,3747,3748,3749,3750],[6772,3735,1889,1232],[6773,1233,798,1231,497],[6774,399,799],function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},[6775,3753],function(e,t){function r(){this.__data__=[]}e.exports=r},[6776,795],[6777,795],[6778,795],[6779,795],[6780,3722,794,1884],[6781,796],[6782,796],[6783,796],[6784,796],1960,830,[6787,794],function(e,t){function r(e){return this.__data__.delete(e)}e.exports=r},function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},[6788,794,1885],[6789,3797,3804],[6790,799],[6791,1228,1230,3754,798,1232,800],[6792,3734],[6793,1888,3759],[6796,798,1236],[6797,205,3800],[6800,1885],[6500,3730,3802],function(e,t){function r(){return[]}e.exports=r},function(e,t){function r(){return!1}e.exports=r},[6501,3803],[6502,3801],[6503,1234,497,799],[6801,3741],[6583,6,13,400,9],[6586,6,9,400],2688,[6587,6,611],[6588,9],[6589,88,6],[6590,6,400,9],[6592,6,3814,9],[6593,6,9],[6594,3813,9],[6804,1242],[6596,13,6,9],2698,[6598,88,6,801,3816,400,9],[6599,6,3817],[6600,6,3823,611,400,3836,9],[6603,13,1897,9],[6806,1896,1238,3929],[6605,3835,3834,3824],[6606,3826,3825,3829,3827,3831],2491,2707,[6607,3828],1615,[6608,3830],1615,2712,2713,[6609,1898],[6610,3832,1898,3833],2716,[6475,133,3844,3843,3841,3839,3842,3840,3838,134,1899,802,3845,3846],2531,[6544,133],[6545,136,6,134,133,612],[6479,803,133],[6546,6,134,133,612],[6547,13,80,133,803],[6548,6,136,134,133,498],[6549,134,133,498],[6727,134,133],[6551,3847,134,802,133,612,498],2541,[6554,13,80,803,802,134],[6611,3850],[6612,3851],2732,[6613,6281],456,[6728,499,135],[6729,3898,3899,3900,3901,3902],[6732,3915,3916,3917,3918,3919],[6733,499,135],[6807,135],[6734,499,135],[6735,804,3922,3923,3924,3925,3926],[6737,135],[6738,499,135],3728,3729,1602,1603,2458,[6808,810],[6741,806,614],[6742,3860,3865,1239,3869,3884,3891,3892,3894,3896,3904,3905,3906,811,3933,1908,500,614],[6743,500],[6744,3867,811],[6745,1905],[6494,3903],[6746,1243,1908,3908,500,1910],3738,[6809,3858,3909],1951,function(e,t){function r(e,t){var r="";if(!e||t<1||t>i)return r;do t%2&&(r+=e),t=n(t/2),t&&(e+=e);while(t);return r}var i=9007199254740991,n=Math.floor;e.exports=r},3740,[6747,1901,1913],[6810,3866],3743,3744,[6750,1240],[6751,3863,1903,3920],3747,[6752,3864,1903,3921],[6753,1901],[6754,1240],2467,[6756,806,1906],[6757,135],[6759,3872,1906,614],[6760,3878],[6764,3854,1900,3857,3859,3862,1910],3758,[6766,809],3761,[6767,809],[6768,809],[6769,809],2581,3766,[6771,1240,3885,3886,3887,3888,3889,3890],[6772,3871,1905,808],3771,[6775,3893],function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},3773,[6776,805],[6777,805],[6778,805],[6779,805],[6780,3855,804,1900],[6781,807],[6782,807],[6783,807],[6784,807],1960,830,[6787,804],3786,3787,3788,[6788,804,3856],[6791,1239,806,1904,613,808,614],[6811,806,1904,3934],[6812,3870],[6813,1902,3868,3928,1914],[6794,3932],[6796,613,1244],[6797,135,3937],[6815,3877,1907,1241,808],[6816,3879,1909,1245,3940],3799,3800,[6501,3939],[6503,1243,500,1913],[6801,3881],[6817,3882,614],[6668,3949],[6670,3951],[6674,3955],[6676,3956],[6677,3958],[6506,1266,1932,3981],[6683,57],[6684,3983],[6685,3984,57],[6686,3985,57],[6687,1265,57],[6688,3986,57],[6689,3987,57],[6690,3988,57],[6691,1265,57],[6692,1265,1931,3990,3991,57],[6693,1932,1266,1264],[6694,193Line truncated
|
||||
var X=(0,o.default)(q.node.value);"string"!==X&&"number"!==X||(W=q.node.value,G=W[H.node.name])}}if(G){var J=i.get("arguments").map(r);if(!n)return;return G.apply(W,J)}}t(i)}}var n=!0,s=void 0,a=new c.default,u=r(this);return n||(u=void 0),{confident:n,deopt:s,value:u}}t.__esModule=!0;var a=r(11),o=i(a),u=r(1),l=i(u),p=r(448),c=i(p);t.evaluateTruthy=n,t.evaluate=s;var f=["String","Number","Math"],h=["random"]}).call(t,function(){return this}())},[6867,417],[6869,4650],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=h.unionTypeAnnotation(i);var n=[],s=a(r,e,n),o=l(e,t);if(o&&!function(){var e=a(r,o.ifStatement);s=s.filter(function(t){return e.indexOf(t)<0}),i.push(o.typeAnnotation)}(),s.length){s=s.concat(n);for(var u=s,p=Array.isArray(u),f=0,u=p?u:(0,c.default)(u);;){var d;if(p){if(f>=u.length)break;d=u[f++]}else{if(f=u.next(),f.done)break;d=f.value}var y=d;i.push(y.getTypeAnnotation())}}if(i.length)return h.createUnionTypeAnnotation(i)}function a(e,t,r){var i=e.constantViolations.slice();return i.unshift(e.path),i.filter(function(e){e=e.resolve();var i=e._guessExecutionStatusRelativeTo(t);return r&&"function"===i&&r.push(e),"before"===i})}function o(e,t){var r=t.node.operator,i=t.get("right").resolve(),n=t.get("left").resolve(),s=void 0;if(n.isIdentifier({name:e})?s=i:i.isIdentifier({name:e})&&(s=n),s)return"==="===r?s.getTypeAnnotation():h.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?h.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(n.isUnaryExpression({operator:"typeof"})?(a=n,o=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,o=n),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:e}))return h.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function u(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var r=u(e);if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var p=o(t,a);p&&s.push(p)}}while(n.length);return s.length?{typeAnnotation:h.createUnionTypeAnnotation(s),ifStatement:r}:l(r,t)}}t.__esModule=!0;var p=r(1),c=n(p);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:s(this,e.name):"undefined"===e.name?h.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?h.numberTypeAnnotation():void("arguments"===e.name)}};var f=r(3),h=i(f);e.exports=t.default},[6870,4649],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(C.isIdentifier(a)){if(!r(a.name))return!1}else if(C.isLiteral(a)){if(!r(a.value))return!1}else{if(C.isMemberExpression(a)){if(a.computed&&!C.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!C.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function a(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(){return this.scope.isStatic(this.node)}function u(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function p(e){return C.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function f(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?C.isBlockStatement(e):!!this.isBlockStatement()&&C.isExpression(e))}function h(e){var t=this,r=!0;do{var i=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return!this.parentPath.isLabeledStatement()&&!C.isBlockStatement(this.container)&&(0,w.default)(C.STATEMENT_OR_BLOCK_KEYS,this.key)}function y(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var i=r.path,n=i.parentPath;return!!n.isImportDeclaration()&&(n.node.source.value===e&&(!t||(!(!i.isImportDefaultSpecifier()||"default"!==t)||(!(!i.isImportNamespaceSpecifier()||"*"!==t)||!(!i.isImportSpecifier()||i.node.imported.name!==t)))))}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function
Line truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",i(e,t)),e.replaceWith(n.noop())}function i(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var n=e.types;return{inherits:r(698),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",i(e.get("typeAnnotation"))),e.replaceWith(n.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},Function:{exit:function(e){var t=e.node;t.params.forEach(function(e){return e.optional=!1})}},"ExportNamedDeclaration|Flow":function(e){var r=e.node,i=e.parent;n.isExportNamedDeclaration(r)&&!n.isFlow(r.declaration)||t(e,i)},ImportDeclaration:function(e){var r=e.node,i=e.parent;n.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,i)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},[6505,5505],[6506,5533,5532,5530],2607,2608,[6508,1490,5526,5525],[6509,2264,545],[6510,5506],[6513,544,1484,5510,660],[6515,544],[6516,959,2267,2265],[6517,2264],[6518,5518,2269,2270,660,545],2445,1090,[6520,958,5519,2266,1488,2265,5512],[6522,1487,958,5522,959],[6523,960,5527,1488],[6524,960,1490,5508,1488],[6525,5521,2266],[6526,660],[6530,1489,1485],[6531,1489],[6533,1489],[6534,1485],[6535,1486],[6537,5509,545,961,1484],[6538,958,5529,1484],[6539,5507,5516,961,1490,2268],[6540,5524,2268],[6541,5531,544,660,961,545],function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5536),s=i(n);t.default=function(e){function t(e){return n.isLiteral(n.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return n.isMemberExpression(t)&&n.isLiteral(n.toComputedKey(t,t.property),{value:"__proto__"})}function i(e,t,r){return n.expressionStatement(n.callExpression(r.addHelper("defaults"),[t,e.right]))}var n=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(n.expressionStatement(n.assignmentExpression("=",o,a))),s.push(i(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;n.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(i(s,s.left.object,t))},ObjectExpression:function(e,r){for(var i=void 0,a=e.node,u=a.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;t(f)&&(i=f.value,(0,o.default)(a.properties,f))}if(i){var h=[n.objectExpression([]),i];a.properties.length&&h.push(a),e.replaceWith(n.callExpression(r.addHelper("extends"),h))}}}}};var a=r(5577),o=i(a);e.exports=t.default},[6505,5537],[6506,5565,5564,5562],2607,2608,[6508,1497,5558,5557],[6509,2273,547],[6510,5538],[6513,546,1491,5542,661],[6515,546],[6516,963,2276,2274],[6517,2273],[6518,5550,2278,2279,661,547],2445,1090,[6520,962,5551,2275,1495,2274,5544],[6522,1494,962,5554,963],[6523,964,5559,1495],[6524,964,1497,5540,1495],[6525,5553,2275],[6526,661],[6530,1496,1492],[6531,1496],[6533,1496],[6534,1492],[6535,1493],[6537,5541,547,965,1491],[6538,962,5561,1491],[6539,5539,5548,965,1497,2277],[6540,5556,2277],[6541,5563,546,661,965,547],1902,1603,[6494,5573],2577,[6495,5567,5568,5569,5571,5572],2579,2467,2581,[6496,2282],373,[6497,5575],[6498,5578,5579],[6499,5570],[6500,5566,5581],[6501,5582],[6502,5580],[6503,5574,2282,5576],function(e,t){"use strict";t.__esModule=!0,t.default=function(){var e={enter:function(e,t){var r=function(){t.isImmutable=!1,e.stop()};return e.isJSXClosingElement()?void e.skip():e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node})?r():void(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable()||r())}};return{visitor:{JSXElement:function(t){if(!t.node._hoisted){var r={isImmutable:!0};t.traverse(e,r),r.isImmutable?t.hoist():t.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5585),s=i(n);t.default=function(e){function t(e){for(var t=0;t<e.lengtLine truncated
|
||||
}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var i=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(i)return i;e=t.path}var n=e.getAncestry();if(n.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=n.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var p=n[o-1],c=s[u-1];if(!p||!c)return"before";if(p.listKey&&p.container===c.container)return p.key>c.key?"before":"after";var f=C.VISITOR_KEYS[p.type].indexOf(p.key),h=C.VISITOR_KEYS[c.type].indexOf(c.key);return f>h?"before":"after"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var i=r.referencePaths,n=i,s=Array.isArray(n),a=0,n=s?n:(0,T.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,p=i,c=Array.isArray(p),f=0,p=c?p:(0,T.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h,y=!!d.find(function(e){return e.node===t.node});if(!y){var v=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==v)return}else l=v}}return l}}function x(e,t){return this._resolve(e,t)||this}function E(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var i=this.scope.getBinding(this.node.name);if(!i)return;if(!i.constant)return;if("module"===i.kind)return;if(i.path!==this){var n=function(){var n=i.path.resolve(e,t);return r.find(function(e){return e.node===n.node})?{v:void 0}:{v:n}}();if("object"===("undefined"==typeof n?"undefined":(0,S.default)(n)))return n.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!C.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,p=Array.isArray(l),c=0,l=p?l:(0,T.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;if(h.isProperty()){var d=h.get("key"),y=h.isnt("computed")&&d.isIdentifier({name:a});if(y=y||d.isLiteral({value:a}))return h.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var v=o.get("elements"),m=v[a];if(m)return m.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var A=r(11),S=n(A),_=r(1),T=n(_);t.matchesPattern=s,t.has=a,t.isStatic=o,t.isnt=u,t.equals=l,t.isNodeType=p,t.canHaveVariableDeclarationOrExpression=c,t.canSwapBetweenExpressionAndStatement=f,t.isCompletionRecord=h,t.isStatementOrBlock=d,t.referencesImport=y,t.getSource=v,t.willIMaybeExecuteBefore=m,t._guessExecutionStatusRelativeTo=g,t._guessExecutionStatusRelativeToDifferentFunctions=b,t.resolve=x,t._resolve=E;var P=r(1566),w=n(P),k=r(3),C=i(k);t.is=a},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=n(s),o=r(1),u=n(o),l=r(3),p=i(l),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!l.react.isCompatTag(e.node.name)){var r=e.scope.getBinding(e.node.name);if(r&&r===t.scope.getBinding(e.node.name))if(r.constant)t.bindings[e.node.name]=r;else for(var i=r.constantViolations,n=Array.isArray(i),s=0,i=n?i:(0,u.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;t.breakOnScopePaths=t.breakOnScopePaths.concat(o.getAncestry())}}}},f=function(){function e(t,r){(0,a.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();if(e)return e.path.getStatementParent()},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kinLine truncated
|
||||
case a.types._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case a.types.name:return this.parseIdentifier(!0);case a.types.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case a.types.braceL:return this.parseObj(!0);default:this.unexpected()}},p.parseBindingList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(a.types.comma),t&&this.match(a.types.comma))i.push(null);else{if(r&&this.eat(e))break;if(this.match(a.types.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var s=[];this.match(a.types.at);)s.push(this.parseDecorator());var o=this.parseMaybeDefault();s.length&&(o.decorators=s),this.parseAssignableListItemTypes(o),i.push(this.parseMaybeDefault(o.start,o.loc.start,o))}return i},p.parseAssignableListItemTypes=function(e){return e},p.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(a.types.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},p.checkLVal=function(e,t,r){switch(e.type){case"Identifier":if(this.state.strict&&(l.reservedWords.strictBind(e.name)||l.reservedWords.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":var n=!0,a=!1,o=void 0;try{for(var u,p=(0,s.default)(e.properties);!(n=(u=p.next()).done);n=!0){var c=u.value;"ObjectProperty"===c.type&&(c=c.value),this.checkLVal(c,t,r)}}catch(e){a=!0,o=e}finally{try{!n&&p.return&&p.return()}finally{if(a)throw o}}break;case"ArrayPattern":var f=!0,h=!1,d=void 0;try{for(var y,v=(0,s.default)(e.elements);!(f=(y=v.next()).done);f=!0){var m=y.value;m&&this.checkLVal(m,t,r)}}catch(e){h=!0,d=e}finally{try{!f&&v.return&&v.return()}finally{if(h)throw d}}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestProperty":case"RestElement":this.checkLVal(e.argument,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},[6481,2,47,179,1018],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var n=r(1),s=i(n),a=r(16),o=i(a),u=r(180),l=r(179),p=i(l),c=r(564),f=p.default.prototype;f.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,u.types.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var h={kind:"loop"},d={kind:"switch"};f.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start),n=this.input.slice(t.start,t.end),s=r.value=n.slice(1,-1);return this.addExtra(r,"raw",n),this.addExtra(r,"rawValue",s),i.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(i,"Directive",e.end,e.loc.end)},f.parseStatement=function(e,t){this.match(u.types.at)&&this.parseDecorators(!0);var r=this.state.type,i=this.startNode();switch(r){case u.types._break:case u.types._continue:return this.parseBreakContinueStatement(i,r.keyword);case u.types._debugger:return this.parseDebuggerStatement(i);case u.types._do:return this.parseDoStatement(i);case u.types._for:return this.parseForStatement(i);case u.types._function:return e||this.unexpected(),this.parseFunctionStatement(i);case u.types._class:return e||this.unexpected(),this.takeDecorators(i),this.parseClass(i,!0);case u.types._if:return this.parseIfStatement(i);case u.types._return:return this.parseReturnStatement(i);case u.types._switch:return this.parseSwitchStatement(i);case u.types._throw:return this.parseThrowStatement(i);case u.types._try:return this.parseTryStatement(i);case u.types._let:case u.types._const:e||this.unexpected();case u.types._var:return this.parseVarStatement(i,r);case u.types._while:return this.parseWhileStatement(i);case u.types._with:return this.parseWithStatement(i);case u.types.braceL:return this.parseBlock();case u.types.semi:return this.parseEmptyStatement(i);case u.types._export:case u.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===u.types._import?this.parseImport(i):this.parseExport(i);case u.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(u.types._function)&&!this.canInsertSemicolon())return this.expect(u.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===u.types.name&&"Line truncated
|
||||
return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},u.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},u.flowParseTypeAlias=function(e){return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(n.types.eq,!0),this.semicolon(),this.finishNode(e,"TypeAlias")},u.flowParseTypeParameter=function(){var e=this.startNode(),t=void 0;this.match(n.types.plusMin)&&("+"===this.state.value?t="plus":"-"===this.state.value&&(t="minus"),this.eat(n.types.plusMin));var r=this.flowParseTypeAnnotatableIdentifier(!1,!1);return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(n.types.eq)&&(this.eat(n.types.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},u.flowParseTypeParameterDeclaration=function(){var e=this.startNode();e.params=[],this.isRelational("<")||this.match(n.types.jsxTagStart)?this.next():this.unexpected();do e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(n.types.comma);while(!this.isRelational(">"));return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},u.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(n.types.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},u.flowParseObjectPropertyKey=function(){return this.match(n.types.num)||this.match(n.types.string)?this.parseExprAtom():this.parseIdentifier(!0)},u.flowParseObjectTypeIndexer=function(e,t){return e.static=t,this.expect(n.types.bracketL),e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser(),this.expect(n.types.bracketR),e.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},u.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(n.types.parenL);this.match(n.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(n.types.parenR)||this.expect(n.types.comma);return this.eat(n.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(n.types.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},u.flowParseObjectTypeMethod=function(e,t,r,i){var n=this.startNodeAt(e,t);return n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),n.static=r,n.key=i,n.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(n,"ObjectTypeProperty")},u.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},u.flowParseObjectType=function(e){var t=this.startNode(),r=void 0,i=void 0,s=void 0;for(t.callProperties=[],t.properties=[],t.indexers=[],this.expect(n.types.braceL);!this.match(n.types.braceR);){var a=!1,o=this.state.start,u=this.state.startLoc;r=this.startNode(),e&&this.isContextual("static")&&(this.next(),s=!0),this.match(n.types.bracketL)?t.indexers.push(this.flowParseObjectTypeIndexer(r,s)):this.match(n.types.parenL)||this.isRelational("<")?t.callProperties.push(this.flowParseObjectTypeCallProperty(r,e)):(i=s&&this.match(n.types.colon)?this.parseIdentifier():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(n.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,s,i)):(this.eat(n.types.question)&&(a=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=a,r.static=s,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(n.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},u.flowObjectTypeSemicolon=function(){this.eat(n.types.semi)||this.eat(n.types.comma)||this.match(n.types.braceR)||this.unexpected()},u.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(n.types.dot);){var s=this.startNodeAt(e,t);s.qualification=i.id,s.id=this.parseIdentifier(),i.id=this.finishNode(s,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},u.flowParseTypeofType=function(){var e=this.startNode();return this.expect(n.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},u.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(n.types.bracketL);this.state.pos<this.input.leLine truncated
|
||||
t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t){e.exports={_args:[[{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},"C:\\src\\babel-standalone"]],_from:"babel-core@6.14.0",_id:"babel-core@6.14.0",_inCache:!0,_installable:!0,_location:"/babel-core",_nodeVersion:"5.11.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/babel-core-6.14.0.tgz_1472082048405_0.022966341115534306"},_npmUser:{email:"hi@henryzoo.com",name:"hzoo"},_npmVersion:"3.10.6",_phantomChildren:{"babel-code-frame":"6.11.0","babel-messages":"6.8.0","babel-runtime":"6.9.2",debug:"2.2.0",esutils:"2.0.2",globals:"8.18.0",invariant:"2.2.1",lodash:"4.14.1","to-fast-properties":"1.0.2"},_requested:{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},_requiredBy:["#DEV:/","/babel-plugin-transform-regenerator","/babel-register"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz",_shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",_shrinkwrap:null,_spec:"babel-core@6.14.0",_where:"C:\\src\\babel-standalone",author:{email:"sebmck@gmail.com",name:"Sebastian McKenzie"},dependencies:{"babel-code-frame":"^6.8.0","babel-generator":"^6.14.0","babel-helpers":"^6.8.0","babel-messages":"^6.8.0","babel-register":"^6.14.0","babel-runtime":"^6.9.1","babel-template":"^6.14.0","babel-traverse":"^6.14.0","babel-types":"^6.14.0",babylon:"^6.9.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.4.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-exists":"^1.0.0","path-is-absolute":"^1.0.0",private:"^0.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.9.0","babel-helper-transform-fixture-test-runner":"^6.13.2","babel-polyfill":"^6.13.0"},directories:{},dist:{shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],license:"MIT",maintainers:[{email:"amjad.masad@gmail.com",name:"amasad"},{email:"hi@henryzoo.com",name:"hzoo"},{email:"npm-public@jessemccarthy.net",name:"jmm"},{email:"loganfsmyth@gmail.com",name:"loganfsmyth"},{email:"sebmck@gmail.com",name:"sebmck"},{email:"me@thejameskyle.com",name:"thejameskyle"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.14.0"}},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,AnimationEvent:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBuLine truncated
|
||||
if(e!==t){if(!u(t)&&!p(t))var d=c(t);s(d||t,function(s,u){if(d&&(u=s,s=t[u]),l(s))h||(h=new n),o(e,t,u,r,i,f,h);else{var p=f?f(e[u],s,u+"",e,t,h):void 0;void 0===p&&(p=s),a(e,u,p)}})}}var n=r(1028),s=r(1602),a=r(2460),o=r(6326),u=r(76),l=r(103),p=r(1614),c=r(1043);e.exports=i},function(e,t,r){function i(e,t,r,i,y,v,m){var g=e[r],b=t[r],x=m.get(b);if(x)return void n(e,r,x);var E=v?v(g,b,r+"",e,t,m):void 0,A=void 0===E;A&&(E=b,u(b)||h(b)?u(g)?E=g:l(g)?E=a(g):(A=!1,E=s(b,!0)):f(b)||o(b)?o(g)?E=d(g):!c(g)||i&&p(g)?(A=!1,E=s(b,!0)):E=g:A=!1),A&&(m.set(b,E),y(E,b,i,v,m),m.delete(b)),n(e,r,E)}var n=r(2460),s=r(1032),a=r(2467),o=r(1041),u=r(76),l=r(2481),p=r(682),c=r(103),f=r(254),h=r(1614),d=r(6414);e.exports=i},function(e,t,r){function i(e,t,r){var i=-1;t=n(t.length?t:[p],u(s));var c=a(e,function(e,r,s){var a=n(t,function(t){return t(e)});return{criteria:a,index:++i,value:e}});return o(c,function(e,t){return l(e,t,r)})}var n=r(1603),s=r(566),a=r(2464),o=r(6331),u=r(1609),l=r(6346),p=r(2480);e.exports=i},[6845,2462],3879,function(e,t){function r(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(n);++i<n;)s[i]=e[i+t];return s}e.exports=r},function(e,t){function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},3740,[6846,2455,6302,6303,6335,6351,1039],[6810,1603],4086,function(e,t,r){function i(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}var n=r(6330);e.exports=i},function(e,t,r){function i(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}var n=r(1606);e.exports=i},3744,[6750,1610],[6751,6300,2459,2476],3747,[6752,6301,2459,1039],[6753,1029],[6754,1610],function(e,t,r){function i(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e===e,a=n(e),o=void 0!==t,u=null===t,l=t===t,p=n(t);if(!u&&!p&&!a&&e>t||a&&o&&l&&!u&&!p||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!p&&e<t||p&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var n=r(683);e.exports=i},function(e,t,r){function i(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l){if(i>=u)return l;var p=r[i];return l*("desc"==p?-1:1)}}return e.index-t.index}var n=r(6345);e.exports=i},[6756,567,2471],[6757,186],[6847,252],4099,function(e,t,r){var i=r(2454),n=r(6406),s=r(1039),a=1/0,o=i&&1/s(new i([,-0]))[1]==a?function(e){return new i(e)}:n;e.exports=o},function(e,t,r){function i(e,t,r,i,n,S,T){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!i(new s(e),new s(t)));case f:case h:case v:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var P=u;case g:var w=S&c;if(P||(P=l),e.size!=t.size&&!w)return!1;var k=T.get(e);if(k)return k==t;S|=p,T.set(e,t);var C=o(P(e),P(t),i,n,S,T);return T.delete(e),C;case x:if(_)return _.call(e)==_.call(t)}return!1}var n=r(1029),s=r(2456),a=r(570),o=r(2469),u=r(2476),l=r(1039),p=1,c=2,f="[object Boolean]",h="[object Date]",d="[object Error]",y="[object Map]",v="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",S=n?n.prototype:void 0,_=S?S.valueOf:void 0;e.exports=i},function(e,t,r){function i(e,t,r,i,o,u){var l=o&a,p=s(e),c=p.length,f=s(t),h=f.length;if(c!=h&&!l)return!1;for(var d=c;d--;){var y=p[d];if(!(l?y in t:n(t,y)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var g=l;++d<c;){y=p[d];var b=e[y],x=t[y];if(i)var E=l?i(x,b,y,t,e,u):i(b,x,y,e,t,u);if(!(void 0===E?b===x||r(b,x,i,o,u):E)){m=!1;break}g||(g="constructor"==y)}if(m&&!g){var A=e.constructor,S=t.constructor;A!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof S&&S instanceof S)&&(m=!1)}return u.delete(e),u.delete(t),m}var n=r(1605),s=r(256),a=2;e.exports=i},[6759,6312,2471,256],[6760,2465],[6852,2475,256],3758,[6766,1038],3761,[6767,1038],[6768,1038],[6769,1038],3766,[6771,1610,6339,6340,6341,6342,6343,6344],[6772,6308,1611,681],function(e,t,r){function i(e){return a(e)||s(e)||!!(o&&e&&e[o])}var n=r(1029),s=r(1041),a=r(76),o=n?n.isConcatSpreadable:void 0;e.exports=i},3771,[6775,6348],3909,3773,[6776,1031],[6777,1031],[6778,1031],[6779,1031],[6780,6296,1027,1600],[6781,1034],[6782,1034],[6783,1034],[6784,1034],4130,4131,[6787,1027],3786,3787,3788,function(e,t,r){function i(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!s||i.length<o-1)return i.push([e,t]),this;r=this.__data__=new a(i)}return r.set(e,t),this}var n=r(1027),s=r(1600),a=r(1601),o=200;e.exports=i},function(e,t){function r(e){return e.match(x)}var i="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",o="["+i+"]",u="["+n+s+"]",l="\\ud83c[\\udffb-\\udfff]",p="(?:"+u+"|"+l+")",c="[^"+i+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",y=p+"?",v="["+a+"]?Line truncated
|
||||
r(e,u,p));r(e,u+1,p);var c=u+1;n(e,t,s,c-1),n(e,t,c+1,a)}}t.quickSort=function(e,t){n(e,t,0,e.length-1)}},function(e,t,r){function i(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new n(t)}function n(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sources"),n=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),p=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(n.map(String),!0),this._sources=l.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=p}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=n.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),n=o.getArg(t,"column");if(r<s.line||r===s.line&&n<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:n+1},consumer:new i(o.getArg(e,"map"))}})}var o=r(686),u=r(6428),l=r(2487).ArraySet,p=r(2488),c=r(6430).quickSort;i.fromSourceMap=function(e){return n.fromSourceMap(e)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},i.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(e,t,r){var n,s=t||null,a=r||i.GENERATED_ORDER;switch(a){case i.GENERATED_ORDER:n=this._generatedMappings;break;case i.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;n.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},i.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var i=[],n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(n>=0){var s=this._originalMappings[n];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n]}return i},t.SourceMapConsumer=i,n.prototype=Object.create(i.prototype),n.prototype.consumer=i,n.fromSourceMap=function(e){var t=Object.create(n.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),i=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],f=0,h=a.length;f<h;f++){var d=a[f],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=i.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=r.indexOf(d.name)),p.push(y)),u.push(y)}return c(t.__originalMappings,o.compareByOriginalPositions),t},n.prototype._version=3,Object.defineProperty(n.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){rLine truncated
|
||||
return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function p(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function c(e){return x.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function f(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function h(e,t){var r=this,i=this.node,n=i[e];return Array.isArray(n)?n.map(function(s,a){return x.default.get({listKey:e,parentPath:r,parent:i,container:n,key:a}).setContext(t)}):x.default.get({parentPath:this,parent:i,container:i,key:e}).setContext(t)}function d(e,t){for(var r=this,i=e,n=Array.isArray(i),s=0,i=n?i:(0,g.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function y(e){return A.getBindingIdentifiers(this.node,e)}function v(e){return A.getOuterBindingIdentifiers(this.node,e)}t.__esModule=!0;var m=r(i),g=o(m);t.getStatementParent=u,t.getOpposite=l,t.getCompletionRecords=p,t.getSibling=c,t.get=f,t._getKey=h,t._getPattern=d,t.getBindingIdentifiers=y,t.getOuterBindingIdentifiers=v;var b=r(n),x=o(b),E=r(s),A=a(E)},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h,d,y,v,m,g,b,x){"use strict";function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var S=r(i),_=A(S),T=r(n),P=A(T),w=r(s),k=E(w),C=r(371),D=A(C),O=r(456),N=A(O),I=r(a),F=A(I),B=r(78),R=A(B),L=r(o),M=A(L),j=r(u),V=E(j),U=r(l),Y=(0,D.default)("babel"),K=function(){function e(t,r){(0,P.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,i=t.parentPath,n=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&i&&(r=i.hub),(0,N.default)(n,"To get a node path the parent needs to exist");var u=s[o],l=U.path.get(n)||[];U.path.has(n)||U.path.set(n,l);for(var p=void 0,c=0;c<l.length;c++){var f=l[c];if(f.node===u){p=f;break}}return p||(p=new e(r,n),l.push(p)),p.setup(i,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new M.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,F.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){V.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){Y.enabled&&Y(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=K,(0,R.default)(K.prototype,r(p)),(0,R.default)(K.prototype,r(c)),(0,R.default)(K.prototype,r(f)),(0,R.default)(K.prototype,r(h)),(0,R.default)(K.prototype,r(d)),(0,R.default)(K.prototype,r(y)),(0,R.default)(K.prototype,r(v)),(0,R.default)(K.prototype,r(m)),(0,R.default)(K.prototype,r(g)),(0,R.default)(K.prototype,r(b)),(0,R.default)(K.prototype,r(x));for(var W=function(){if(q){if(H>=G.length)return"break";X=G[H++]}else{if(H=G.next(),H.done)return"break";X=H.value}var e=X,t="is"+e;K.prototype[t]=function(e){return V[t](this.node,e)},K.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},G=V.TYPES,q=Array.isArray(G),H=0,G=q?G:(0,_.default)(G);;){var X,J=W();if("break"===J)break}var $=function(e){if("_"===e[0])return"continue";V.TYPES.indexOf(e)<0&&V.TYPES.push(e);var t=k[e];K.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var z in k){$(z)}e.exports=t.default},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}fLine truncated
|
||||
this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.indexOf(e)===-1&&this.constantViolations.push(e)},e.prototype.reference=function(e){this.referencePaths.indexOf(e)===-1&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=o,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){for(var i=U.scope.get(e.node)||[],n=i,s=Array.isArray(n),a=0,n=s?n:(0,A.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}i.push(r),U.scope.has(e.node)||U.scope.set(e.node,i)}t.__esModule=!0;var y=r(i),v=h(y),m=r(n),g=h(m),b=r(s),x=h(b),E=r(a),A=h(E),S=r(50),_=h(S),T=r(459),P=h(T),w=r(o),k=h(w),C=r(u),D=h(C),O=r(457),N=h(O),I=r(20),F=f(I),B=r(l),R=h(B),L=r(455),M=h(L),j=r(p),V=f(j),U=r(c),Y=0,K={For:function(e){for(var t=V.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,A.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,i=t.declaration;if(V.isClassDeclaration(i)||V.isFunctionDeclaration(i)){var n=i.id;if(!n)return;var s=r.getBinding(n.name);s&&s.reference(e)}else if(V.isVariableDeclaration(i))for(var a=i.declarations,o=Array.isArray(a),u=0,a=o?a:(0,A.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l,c=V.getBindingIdentifiers(p);for(var f in c){var h=r.getBinding(f);h&&h.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,A.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},W=0,G=function(){function e(t,r){if((0,x.default)(this,e),r&&r.block===t.node)return r;var i=d(t,r,this);return i?i:(this.uid=W++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,void(this.path=t))}return e.prototype.traverse=function(e,t,r){(0,D.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return V.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=V.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;V.isAssignmentExpression(e)?r=e.left:V.isVariableDeclarator(e)?r=e.id:(V.isObjectProperty(r)||V.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(V.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,A.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.doneLine truncated
|
||||
fields:{id:{validate:(0,c.assertNodeType)("Identifier")},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","FunctionLine truncated
|
||||
W.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;delete e[s]}return e}function D(e,t){return O(e,t),N(e,t),I(e,t),e}function O(e,t){F("trailingComments",e,t)}function N(e,t){F("leadingComments",e,t)}function I(e,t){F("innerComments",e,t)}function F(e,t,r){t&&r&&(t[e]=(0,le.default)((0,ie.default)([].concat(t[e],r[e]))))}function B(e,t){if(!e||!t)return e;for(var r=he.INHERIT_KEYS.optional,i=Array.isArray(r),n=0,r=i?r:(0,W.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=he.INHERIT_KEYS.force,l=Array.isArray(u),p=0,u=l?u:(0,W.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=t[f]}return he.inheritsComments(e,t),e}function R(e){if(!L(e))throw new TypeError("Not a valid node "+(e&&e.type))}function L(e){return!(!e||!pe.VISITOR_KEYS[e.type])}function M(e,t,r){if(e){var i=he.VISITOR_KEYS[e.type];if(i){r=r||{},t(e,r);for(var n=i,s=Array.isArray(n),a=0,n=s?n:(0,W.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;M(d,t,r)}else M(l,t,r)}}}}function j(e,t){t=t||{};for(var r=t.preserveComments?me:ge,i=r,n=Array.isArray(i),s=0,i=n?i:(0,W.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,Y.default)(e),p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;e[d]=null}}function V(e,t){return M(e,j,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var U=r(i),Y=v(U),K=r(n),W=v(K),G=r(s),q=v(G),H=r(a),X=v(H),J=r(o);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:functionLine truncated
|
||||
e.key=this.parseMaybeAssign(),this.expect(h.types.bracketR),e.key):(e.computed=!1,e.key=this.match(h.types.num)||this.match(h.types.string)?this.parseExprAtom():this.parseIdentifier(!0))},m.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},m.parseMethod=function(e,t,r){var i=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(h.types.parenL),e.params=this.parseBindingList(h.types.parenR),e.generator=t,this.parseFunctionBody(e),this.state.inMethod=i,e},m.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},m.parseFunctionBody=function(e,t){var r=t&&!this.match(h.types.braceL),i=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var n=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=n,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=i;var o=this.state.strict,u=!1,l=!1;if(t&&(o=!0),!r&&e.body.directives.length){var c=!0,d=!1,y=void 0;try{for(var v,m=(0,f.default)(e.body.directives);!(c=(v=m.next()).done);c=!0){var g=v.value;if("use strict"===g.value.value){l=!0,o=!0,u=!0;break}}}catch(e){d=!0,y=e}finally{try{!c&&m.return&&m.return()}finally{if(d)throw y}}}if(l&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),o){var b=(0,p.default)(null),x=this.state.strict;u&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0);var E=!0,A=!1,S=void 0;try{for(var _,T=(0,f.default)(e.params);!(E=(_=T.next()).done);E=!0){var P=_.value;this.checkLVal(P,!0,b)}}catch(e){A=!0,S=e}finally{try{!E&&T.return&&T.return()}finally{if(A)throw S}}this.state.strict=x}},m.parseExprList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(h.types.comma),this.eat(e))break;i.push(this.parseExprListItem(t,r))}return i},m.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(h.types.comma)?null:this.match(h.types.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem)},m.parseIdentifier=function(e){var t=this.startNode();return this.match(h.types.name)?(!e&&this.state.strict&&v.reservedWords.strict(this.state.value)&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},m.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(h.types.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},m.parseYield=function(){var e=this.startNode();return this.next(),this.match(h.types.semi)||this.canInsertSemicolon()||!this.match(h.types.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.types.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=void 0;var h=r(i),d=f(h),y=r(n),v=f(y),m=r(s),g=f(m),b=r(a),x=f(b),E=r(o),A=f(E),S=r(u),_=f(S),T=r(l),P=r(p),w=r(c),k=f(w),C=(t.plugins={},function(e){function r(e,t){(0,g.default)(this,r),e=(0,P.getOptions)(e);var i=(0,A.default)(this,(0,v.default)(r).call(this,e,t));return i.options=e,i.inModule="module"===i.options.sourceType,i.isReservedWord=T.reservedWords[6],i.input=t,i.plugins=i.loadPlugins(i.options.plugins),i.filename=e.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return(0,_.default)(r,e),(0,x.default)(r,[{key:"hasPlugin",value:function(e){return!(!this.plugins["*"]&&!this.plugins[e])}},{key:"extend",value:function(e,t){this[e]=t(this[e])}},{key:"loadPlugins",value:function(e){var r={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow"));var i=!0,n=!1,s=void 0;try{for(var a,o=(0,d.default)(e);!(i=(a=o.next()).done);i=!0){var u=a.value;if(!r[u]){r[u]=!0;var l=t.plugins[u];l&&l(this)}}}catch(e){n=!0,s=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw s}}return r}},{key:"parse",value:function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)}}]),r}(k.default));t.default=C},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var a=r(i),o=r(n),u=s(o),l=u.default.prototype;l.raise=function(e,t){var r=(0,a.getLineInfo)(this.input,e);t+=" ("+r.line+"Line truncated
|
||||
var a=this.state.clone();try{return e.call(this,t,r,i,n)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,i,n)}}),e.extend("parseParenItem",function(e){return function(t,r,i){if(t=e.call(this,t,r,i),this.eat(o.types.question)&&(t.optional=!0),this.match(o.types.colon)){var n=this.startNodeAt(r,i);return n.expression=t,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(o.types.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(o.types.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r):e.call(this,t,r)}}),e.extend("toAssignableList",function(e){return function(t,r){for(var i=0;i<t.length;i++){var n=t[i];n&&"TypeCastExpression"===n.type&&(t[i]=this.typeCastToParameter(n))}return e.call(this,t,r)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var i=this.startNode(),n=e.call(this,t,r);return this.match(o.types.colon)?(i._exprListItem=!0,i.expression=n,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")):n}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return this.match(o.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,i){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(t,r,i),e.body.push(this.finishNode(t,"ClassMethod"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var i=t.implements=[];do{var n=this.startNode();n.id=this.parseIdentifier(),this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,i.push(this.finishNode(n,"ClassImplements"))}while(this.eat(o.types.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(o.types.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(o.types.question)&&(e.optional=!0),this.match(o.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(o.types._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var i=this.lookahead();(i.type===o.types.name&&"from"!==i.value||i.type===o.types.braceL||i.type===o.types.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(o.types.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){return this.match(o.types.colon)&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parLine truncated
|
||||
}},{key:"nextToken",value:function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(g.types.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())}},{key:"readToken",value:function(e){return(0,m.isIdentifierStart)(e)||92===e?this.readWord():this.getTokenFromCode(e)}},{key:"fullCharCodeAtPos",value:function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888}},{key:"pushComment",value:function(e,t,r,i,n,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:i,loc:new x.SourceLocation(n,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))}},{key:"skipBlockComment",value:function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);r===-1&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,E.lineBreakG.lastIndex=t;for(var i=void 0;(i=E.lineBreakG.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())}},{key:"skipLineComment",value:function(e){for(var t=this.state.pos,r=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())}},{key:"skipSpace",value:function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&E.nonASCIIwhitespace.test(String.fromCharCode(e))))break e;++this.state.pos}}}},{key:"finishToken",value:function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(g.types.ellipsis)):(++this.state.pos,this.finishToken(g.types.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.slash,1)}},{key:"readToken_mult_modulo",value:function(e){var t=42===e?g.types.star:g.types.modulo,r=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(r++,i=this.input.charCodeAt(this.state.pos+2),t=g.types.exponent),61===i&&(r++,t=g.types.assign),this.finishOp(t,r)}},{key:"readToken_pipe_amp",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?g.types.logicalOR:g.types.logicalAND,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(124===e?g.types.bitwiseOR:g.types.bitwiseAND,1)}},{key:"readToken_caret",value:function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.bitwiseXOR,1)}},{key:"readToken_plus_min",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&E.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.types.incDec,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(g.types.plusMin,1)}},{key:"readToken_lt_gt",value:function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(g.types.assign,r+1):this.finishOp(g.types.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(g.types.relational,r))}},{key:"readToken_eq_excl",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(g.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(g.types.arrow)):this.finishOp(Line truncated
|
||||
}}},function(e,t,r,i){var n=r(i),s=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?s(e+t,0):a(e,t)}},function(e,t,r,i,n){var s=r(i),a=r(n);e.exports=function(e){return s(a(e))}},function(e,t,r,i){var n=r(i),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},function(e,t,r,i){var n=r(i);e.exports=function(e){return Object(n(e))}},function(e,t,r,i){var n=r(i);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r,i,n,s){var a=r(i)("wks"),o=r(n),u=r(s).Symbol,l="function"==typeof u,p=e.exports=function(e){return a[e]||(a[e]=l&&u[e]||(l?u:o)("Symbol."+e))};p.store=a},function(e,t,r,i,n,s,a){var o=r(i),u=r(n)("iterator"),l=r(s);e.exports=r(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||l[o(e)]}},function(e,t,r,i,n,s){var a=r(i),o=r(n);e.exports=r(s).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},function(e,t,r,i,n,s,a,o){"use strict";var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=r(o)(Array,"Array",function(e,t){this._t=c(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,r):"values"==t?l(0,e[r]):l(0,[r,e[r]])},"values"),p.Arguments=p.Array,u("keys"),u("values"),u("entries")},function(e,t,r,i,n){"use strict";var s=r(i)(!0);r(n)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=s(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r,i,n,s,a,o){r(i);for(var u=r(n),l=r(s),p=r(a),c=r(o)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d=f[h],y=u[d],v=y&&y.prototype;v&&!v[c]&&l(v,c,d),p[d]=p.Array}},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=e.node,i=r.body;r.async=!1;var n=y.functionExpression(null,[],y.blockStatement(i.body),!0);n.shadow=!0,i.body=[y.returnStatement(y.callExpression(y.callExpression(t,[n]),[]))]}function l(e,t){var r=e.node,i=e.isFunctionDeclaration(),n=r.id,s=v;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!i&&n&&(s=m),r.async=!1,r.generator=!0,r.id=null,i&&(r.type="FunctionExpression");var a=y.callExpression(t,[r]),o=s({NAME:n,FUNCTION:a,PARAMS:r.params.map(function(){return e.scope.generateUidIdentifier("x")})}).expression;if(i){var u=y.variableDeclaration("let",[y.variableDeclarator(y.identifier(n.name),y.callExpression(o,[]))]);u._blockHoist=!0,e.replaceWith(u)}else{var l=o.body.body[1].argument;n||(0,c.default)({node:l,parent:e.parent,scope:e.scope}),!l||l.id||r.params.length?e.replaceWith(y.callExpression(o,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t){var r=e.node;if(!r.generator)return e.traverse(g),e.isClassMethod()||e.isObjectMethod()?u(e,t):l(e,t)};var p=r(i),c=o(p),f=r(n),h=o(f),d=r(s),y=a(d),v=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n return function NAME(PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n"),m=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n function NAME(PARAMS) {\n return ref.apply(this, arguments);\n }\n return NAME;\n })\n"),g={ArrowFunctionExpression:function(e){e.node.async||e.arrowFunctionToShadowed()},AwaitExpression:function(e){var t=e.node;t.type="YieldExpression"}};e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w]Line truncated
|
||||
case h.types._return:return this.parseReturnStatement(i);case h.types._switch:return this.parseSwitchStatement(i);case h.types._throw:return this.parseThrowStatement(i);case h.types._try:return this.parseTryStatement(i);case h.types._let:case h.types._const:e||this.unexpected();case h.types._var:return this.parseVarStatement(i,r);case h.types._while:return this.parseWhileStatement(i);case h.types._with:return this.parseWithStatement(i);case h.types.braceL:return this.parseBlock();case h.types.semi:return this.parseEmptyStatement(i);case h.types._export:case h.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===h.types._import?this.parseImport(i):this.parseExport(i);case h.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(h.types._function)&&!this.canInsertSemicolon())return this.expect(h.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===h.types.name&&"Identifier"===a.type&&this.eat(h.types.colon)?this.parseLabeledStatement(i,s,a):this.parseExpressionStatement(i,a)},m.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},m.parseDecorators=function(e){for(;this.match(h.types.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(h.types._export)||this.match(h.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},m.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},m.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(h.types.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var n=this.state.labels[i];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(r||"loop"===n.kind))break;if(e.label&&r)break}}return i===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},m.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},m.parseDoStatement=function(e){return this.next(),this.state.labels.push(g),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(h.types._while),e.test=this.parseParenExpression(),this.eat(h.types.semi),this.finishNode(e,"DoWhileStatement")},m.parseForStatement=function(e){this.next(),this.state.labels.push(g);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(h.types.parenL),this.match(h.types.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(h.types._var)||this.match(h.types._let)||this.match(h.types._const)){var r=this.startNode(),i=this.state.type;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!this.match(h.types._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var n={start:0},s=this.parseExpression(!0,n);return this.match(h.types._in)||this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.parseForIn(e,s,t)):(n.start&&this.unexpected(n.start),t&&this.unexpected(),this.parseFor(e,s))},m.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},m.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(h.types._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},m.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},m.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.types.braceL),this.state.labels.push(b);for(var t,r=void 0;!this.match(h.types.braceR);)if(this.match(h.types._case)||this.match(h.types._default)){var i=this.match(h.types._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),i?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(h.types.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop()Line truncated
|
||||
this.isRelational("<")||this.match(a.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,n,i)):(this.eat(a.types.question)&&(s=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=s,r.static=n,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(a.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},l.flowObjectTypeSemicolon=function(){this.eat(a.types.semi)||this.eat(a.types.comma)||this.match(a.types.braceR)||this.unexpected()},l.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(a.types.dot);){var n=this.startNodeAt(e,t);n.qualification=i.id,n.id=this.parseIdentifier(),i.id=this.finishNode(n,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},l.flowParseTypeofType=function(){var e=this.startNode();return this.expect(a.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},l.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(a.types.bracketL);this.state.pos<this.input.length&&!this.match(a.types.bracketR)&&(e.types.push(this.flowParseType()),!this.match(a.types.bracketR));)this.expect(a.types.comma);return this.expect(a.types.bracketR),this.finishNode(e,"TupleTypeAnnotation")},l.flowParseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdentifier(),this.eat(a.types.question)&&(e=!0),t.optional=e,t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeParam")},l.flowParseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.match(a.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(a.types.parenR)||this.expect(a.types.comma);return this.eat(a.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},l.flowIdentToTypeAnnotation=function(e,t,r,i){switch(i.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,i)}},l.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),i=void 0,n=void 0,s=!1;switch(this.state.type){case a.types.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case a.types.braceL:return this.flowParseObjectType();case a.types.bracketL:return this.flowParseTupleType();case a.types.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(a.types.parenL),i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");case a.types.parenL:if(this.next(),!this.match(a.types.parenR)&&!this.match(a.types.ellipsis))if(this.match(a.types.name)){var o=this.lookahead().type;s=o!==a.types.question&&o!==a.types.colon}else s=!0;return s?(n=this.flowParseType(),this.expect(a.types.parenR),this.eat(a.types.arrow)&&this.raise(r,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation"));case a.types.string:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"StringLiteralTypeAnnotation");case a.types._true:case a.types._false:return r.value=this.match(a.types._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case a.types.num:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case a.types._null:return r.value=this.match(a.types._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case a.types._this:return r.value=this.match(a.types._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},l.flowParsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flowParsePrimaryType();return this.matLine truncated
|
||||
this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[d.types.b_stat],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this}},{key:"curPosition",value:function(){return new h.Position(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(t){var r=new e;for(var i in this){var n=this[i];t&&"context"!==i||!Array.isArray(n)||(n=n.slice()),r[i]=n}return r}}]),e}();t.default=v},function(e,t,r,i){function n(e,t,r){for(var i=-1,n=s(t),a=n.length;++i<a;){var o=n[i],u=e[o],l=r(u,t[o],o,e,t);(l===l?l===u:u!==u)&&(void 0!==u||o in e)||(e[o]=l)}return e}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null==t?e:a(t,o(t),e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s,a,o,u,l,p,c){function f(e,t,r,i,n,s,a){var o;if(r&&(o=n?r(e,i,n):r(e)),void 0!==o)return o;if(!E(e))return e;var u=x(e);if(u){if(o=m(e),!t)return h(e,o)}else{var l=H.call(e),p=l==w;if(l!=D&&l!=A&&(!p||n))return G[l]?g(e,l,t):n?e:{};if(o=b(p?{}:e),!t)return y(o,e)}s||(s=[]),a||(a=[]);for(var c=s.length;c--;)if(s[c]==e)return a[c];return s.push(e),a.push(o),(u?d:v)(e,function(i,n){o[n]=f(i,t,r,n,e,s,a)}),o}var h=r(i),d=r(n),y=r(s),v=r(a),m=r(o),g=r(u),b=r(l),x=r(p),E=r(c),A="[object Arguments]",S="[object Array]",_="[object Boolean]",T="[object Date]",P="[object Error]",w="[object Function]",k="[object Map]",C="[object Number]",D="[object Object]",O="[object RegExp]",N="[object Set]",I="[object String]",F="[object WeakMap]",B="[object ArrayBuffer]",R="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",K="[object Uint16Array]",W="[object Uint32Array]",G={};G[A]=G[S]=G[B]=G[_]=G[T]=G[R]=G[L]=G[M]=G[j]=G[V]=G[C]=G[D]=G[O]=G[I]=G[U]=G[Y]=G[K]=G[W]=!0,G[P]=G[w]=G[k]=G[N]=G[F]=!1;var q=Object.prototype,H=q.toString;e.exports=f},function(e,t,r,i){var n=r(i),s=n();e.exports=s},function(e,t,r,i,n){function s(e,t){return a(e,t,o)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e,t,r){if(null!=e){void 0!==r&&r in s(e)&&(t=[r]);for(var i=0,n=t.length;null!=e&&i<n;)e=e[t[i++]];return i&&i==n?e:void 0}}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){if("function"!=typeof e)return s;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,i,n){return e.call(t,r,i,n)};case 4:return function(r,i,n,s){return e.call(t,r,i,n,s)};case 5:return function(r,i,n,s,a){return e.call(t,r,i,n,s,a)}}return function(){return e.apply(t,arguments)}}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(e){return l(function(t,r){var i=-1,n=null==t?0:r.length,s=n>2?r[n-2]:void 0,a=n>2?r[2]:void 0,l=n>1?r[n-1]:void 0;for("function"==typeof s?(s=o(s,l,5),n-=2):(s="function"==typeof l?l:void 0,n-=s?1:0),a&&u(r[0],r[1],a)&&(s=n<3?void 0:s,n=1);++i<n;){var p=r[i];p&&e(t,p,s)}return t})}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return function(t,r,i){for(var n=s(t),a=i(t),o=a.length,u=e?o:-1;e?u--:++u<o;){var l=a[u];if(r(n[l],l,n)===!1)break}return t}}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n("length");e.exports=s},function(e,t,r,i){function n(e,t){var r=null==e?void 0:e[t];return s(r)?r:void 0}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){var i=e.constructor;switch(t){case c:return s(e);case a:case o:return new i((+e));case f:case h:case d:case y:case v:case m:case g:case b:case x:var n=e.buffer;return new i(r?s(n):n,e.byteOffset,e.length);case u:case p:return new i(e);case l:var A=new i(e.source,E.exec(e));A.lastIndex=e.lastIndex}return A}var s=r(i),a="[object Boolean]",o="[object Date]",u="[object Number]",l="[object RegExp]",p="[object String]",c="[object ArrayBuffer]",f="[object Float32Array]",h="[object Float64Array]",d="[object Int8Array]",y="[object Int16Array]",v="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",E=/\w*$/;e.exports=n},function(e,t,r,i,n){function s(e){return null!=e&&o(a(e))}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s){function a(e,t,r){if(!l(r))return!1;var i=typeof t;if("number"==i?o(r)&&u(t,r.length):"string"==i&&t in r){var n=r[t];return e===e?e===n:n!==n}return!1}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e,t){var r=typeof e;if("string"==r&&l.test(e)||"number"==r)return!0;if(a(e))return!1;var i=!u.test(e);return i||null!=t&&e in o(t)}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i,n,s,a,o){function u(e){for(var t=h(e),r=t.length,i=r&&e.length,n=!!i&&f(i)&&(p(e)||l(e)),s=-1,a=[];++s<r;){var o=t[s];(n&&c(o,i)||y.call(e,o))&&a.push(o)}return a}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Object.prototype,y=d.hasOwnProperty;e.exports=u},function(e,t,r,i){function n(e){return s(e)?e:Object(e)}Line truncated
|
||||
if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var o=l(t,a);o&&s.push(o)}}while(n.length);return s.length?{typeAnnotation:y.createUnionTypeAnnotation(s),ifStatement:r}:c(r,t)}}t.__esModule=!0;var f=r(i),h=a(f);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:o(this,e.name):"undefined"===e.name?y.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?y.numberTypeAnnotation():void("arguments"===e.name)}};var d=r(n),y=s(d);e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function u(e){return e.typeAnnotation}function l(e){if(this.get("callee").isIdentifier())return N.genericTypeAnnotation(e.callee)}function p(){return N.stringTypeAnnotation()}function c(e){var t=e.operator;return"void"===t?N.voidTypeAnnotation():N.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?N.numberTypeAnnotation():N.STRING_UNARY_OPERATORS.indexOf(t)>=0?N.stringTypeAnnotation():N.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?N.booleanTypeAnnotation():void 0}function f(e){var t=e.operator;if(N.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return N.numberTypeAnnotation();if(N.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return N.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),i=this.get("left");return i.isBaseType("number")&&r.isBaseType("number")?N.numberTypeAnnotation():i.isBaseType("string")||r.isBaseType("string")?N.stringTypeAnnotation():N.unionTypeAnnotation([N.stringTypeAnnotation(),N.numberTypeAnnotation()])}}function h(){return N.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function d(){return N.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function y(){return this.get("expressions").pop().getTypeAnnotation()}function v(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;if("++"===t||"--"===t)return N.numberTypeAnnotation()}function g(){return N.stringTypeAnnotation()}function b(){return N.numberTypeAnnotation()}function x(){return N.booleanTypeAnnotation()}function E(){return N.nullLiteralTypeAnnotation()}function A(){return N.genericTypeAnnotation(N.identifier("RegExp"))}function S(){return N.genericTypeAnnotation(N.identifier("Object"))}function _(){return N.genericTypeAnnotation(N.identifier("Array"))}function T(){return _()}function P(){return N.genericTypeAnnotation(N.identifier("Function"))}function w(){return C(this.get("callee"))}function k(){return C(this.get("tag"))}function C(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?N.genericTypeAnnotation(N.identifier("AsyncIterator")):N.genericTypeAnnotation(N.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.Class=t.Function=t.Identifier=void 0;var D=r(i);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return a(D).default}}),t.VariableDeclarator=o,t.TypeCastExpression=u,t.NewExpression=l,t.TemplateLiteral=p,t.UnaryExpression=c,t.BinaryExpression=f,t.LogicalExpression=h,t.ConditionalExpression=d,t.SequenceExpression=y,t.AssignmentExpression=v,t.UpdateExpression=m,t.StringLiteral=g,t.NumericLiteral=b,t.BooleanLiteral=x,t.NullLiteral=E,t.RegExpLiteral=A,t.ObjectExpression=S,t.ArrayExpression=_,t.RestElement=T,t.CallExpression=w,t.TaggedTemplateExpression=k;var O=r(n),N=s(O);u.validParent=!0,T.validParent=!0,t.Function=P,t.Class=P},function(e,t,r,i,n,s,a){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(I.isIdentifier(a)){if(!r(a.name))return!1}else if(I.isLiteral(a)){if(!r(a.value))return!1}else{if(I.isMemberExpression(a)){if(a.computed&&!I.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!I.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function p(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function c(){return this.scope.isStatic(this.node)}function f(e){return!this.has(e)}function h(e,t){return this.node[e]===t}function d(e){return I.isType(this.type,e)}function y(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function v(e){return!("body"!==thiLine truncated
|
||||
this.registerBinding(e,u)}else{var l=this.getProgramParent(),p=t.getBindingIdentifiers(!0);for(var c in p)for(var f=p[c],h=Array.isArray(f),d=0,f=h?f:(0,w.default)(f);;){var y;if(h){if(d>=f.length)break;y=f[d++]}else{if(d=f.next(),d.done)break;y=d.value}var v=y,m=this.getOwnBinding(c);if(m){if(m.identifier===v)continue;this.checkBlockScopedCollisions(m,e,c,v)}m&&m.path.isFlow()&&(m=null),l.references[c]=!0,this.bindings[c]=new U.default({identifier:v,existing:m,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(G.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(G.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(G.isClassBody(e)){for(var i=e.body,n=Array.isArray(i),s=0,i=n?i:(0,w.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(G.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(G.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if(!this.isPure(f,t))return!1}return!0}if(G.isObjectExpression(e)){for(var h=e.properties,d=Array.isArray(h),y=0,h=d?h:(0,w.default)(h);;){var v;if(d){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var m=v;if(!this.isPure(m,t))return!1}return!0}return G.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):G.isClassProperty(e)||G.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):G.isUnaryExpression(e)?this.isPure(e.argument,t):G.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){H++,this._crawl(),H--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,S.default)(null),this.bindings=(0,S.default)(null),this.globals=(0,S.default)(null),this.uids=(0,S.default)(null),this.data=(0,S.default)(null),e.isLoop())for(var t=G.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,w.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("param",f)}e.isCatchClause()&&this.registerBinding("let",e);var h=this.getProgramParent();if(!h.crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(X,d),this.crawling=!1;for(var y=d.assignments,v=Array.isArray(y),m=0,y=v?y:(0,w.default)(y);;){var g;if(v){if(m>=y.length)break;g=y[m++]}else{if(m=y.next(),m.done)break;g=m.value}var b=g,x=b.getBindingIdentifiers(),E=void 0;for(var A in x)b.scope.getBinding(A)||(E=E||b.scope.getProgramParent(),E.addGlobal(x[A]));b.scope.registerConstantViolation(b)}for(var _=d.references,T=Array.isArray(_),P=0,_=T?_:(0,w.default)(_);;){var k;if(T){if(P>=_.length)break;k=_[P++]}else{if(P=_.next(),P.done)break;k=P.value}var C=k,D=C.scope.getBinding(C.node.name);D?D.reference(C):C.scope.getProgramParent().addGlobal(C.node)}for(var O=d.constantViolations,N=Array.isArray(O),I=0,O=N?O:(0,w.default)(O);;){var F;if(N){if(I>=O.length)break;F=O[I++]}else{if(I=O.next(),I.done)break;F=I.value}var B=F;B.scope.registerConstantViolation(B)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(G.ensureBlock(t.node),t=t.get("body"));var r=e.unique,i=e.kind||"var",n=null==e._blockHoist?2:e._blockHoist,s="declaration:"+i+":"+n,a=!r&&t.getData(s);if(!a){var o=G.variableDeclaration(i,[]);o._generated=!0,o._blockHoist=n;var u=t.unshiftContainer("body",[o]);a=u[0],r||t.setData(s,a)}var l=G.variableDeclarator(e.id,e.init);a.node.declarations.push(l),this.registerBinding(i,a.get("declarations").pop())},e.Line truncated
|
||||
},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,f.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?Line truncated
|
||||
}function Y(e){return!(!e||!pe.VISITOR_KEYS[e.type])}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var K=r(i),W=E(K),G=r(n),q=E(G),H=r(s),X=E(H),J=r(a);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return J.NOT_LOCAL_BINDING}}),t.is=S,t.isType=_,t.validate=T,t.shallowEqual=P,t.appendToMemberExpression=w,t.prependToMemberExpression=k,t.ensureBlock=C,t.clone=D,t.cloneWithoutLoc=O,t.cloneDeep=N,t.buildMatchMemberExpression=I,t.removeComments=F,t.inheritsComments=B,t.inheritTrailingComments=R,t.inheritLeadingComments=L,t.inheritInnerComments=M,t.inherits=V,t.assertNode=U,t.isNode=Y;var $=r(o);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return $.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return $.getOuterBindingIdentifiers}});var z=r(u);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return z.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return z.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return z.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return z.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return z.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return z.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return z.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return z.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return z.isImmutable}});var Q=r(l);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return Q.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return Q.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return Q.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return Q.toIdentifier}}),Object.defineProperty(t,"Line truncated
|
||||
R(R.S+R.F*!ge,"Symbol",{for:function(e){return F(de,e+="")?de[e]:de[e]=oe(e)},keyFor:function(e){if(Se(e))return q(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){xe=!0},useSimple:function(){xe=!1}}),R(R.S+R.F*!ge,"Object",{create:Pe,defineProperty:_e,defineProperties:Te,getOwnPropertyDescriptor:ke,getOwnPropertyNames:Ce,getOwnPropertySymbols:De}),ue&&R(R.S+R.F*(!ge||j(function(){var e=oe();return"[null]"!=le([e])||"{}"!=le({a:e})||"{}"!=le(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Se(e)){for(var t,r,i=[e],n=1;arguments.length>n;)i.push(arguments[n++]);return t=i[1],"function"==typeof t&&(r=t),!r&&X(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!Se(t))return t}),i[1]=t,le.apply(ue,i)}}}),oe[pe][fe]||r(N)(oe[pe],fe,oe[pe].valueOf),U(oe,"Symbol"),U(Math,"Math",!0),U(I.JSON,"JSON",!0)},function(e,t,r,i,n,s,a,o,u,l,p){"use strict";var c,f=r(i)(0),h=r(n),d=r(s),y=r(a),v=r(o),m=r(u),g=(r(l),d.getWeak),b=Object.isExtensible,x=v.ufstore,E={},A=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},S={get:function(e){if(m(e)){var t=g(e);return t===!0?x(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return v.def(this,e,t)}},_=e.exports=r(p)("WeakMap",A,S,v,!0,!0);7!=(new _).set((Object.freeze||Object)(E),7).get(E)&&(c=v.getConstructor(A),y(c.prototype,S),d.NEED=!0,f(["delete","has","get","set"],function(e){var t=_.prototype,r=t[e];h(t,e,function(t,i){if(m(t)&&!b(t)){this._f||(this._f=new c);var n=this._f[e](t,i);return"set"==e?this:n}return r.call(this,t,i)})}))},function(e,t,r,i){r(i)("asyncIterator")},function(e,t,r,i){r(i)("observable")},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w])if((0,x.default)(t[0],r.name))i=t[0][r.name];else if("$"===r.name[0]){var n=+r.name.slice(1);t[n]&&(i=t[n])}null===i&&e.remove(),i&&(i[k]=!0,e.replaceInline(i))},exit:function(e){var t=e.node;t.loc||A.default.clearNode(t)}};e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){return e.expression.typeAnnotation=e.typeAnnotation,e.expression}e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(a.types.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(a.types.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(a.types._class)||this.match(a.types.name)||this.match(a.types._function)||this.match(a.types._var))return this.flowParseDeclare(t)}else if(this.match(a.types.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t,r,i){var n=this.state.potentialArrowAt=r;if(this.match(a.types.colon)){var s=this.startNodeAt(t,r);if(s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),i&&!this.match(a.types.arrow)&&this.unexpected(),n&&this.eat(a.types.arrow)){var o="SequenceExpression"===e.type?e.expressions:[e],u=this.parseArrowExpression(this.startNodeAt(t,r),o);return u.returnType=s.typeAnnotation,u}return this.finishNode(s,"TypeCastExpression")}return e}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return fLine truncated
|
||||
var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(l.test(e)||!u.test(e)||null!=t&&e in Object(t))}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i){function n(e){return!!a&&a in e}var s=r(i),a=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():o.call(t,r,1),!0}var s=r(i),a=Array.prototype,o=a.splice;e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);return r<0?void 0:t[r][1]}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this.__data__,e)>-1}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){var r=this.__data__,i=s(r,e);return i<0?r.push([e,t]):r[i][1]=t,this}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(){this.__data__={hash:new o,map:new(l||u),string:new o}}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return s(this,e).delete(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).get(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).has(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){return s(this,e).set(e,t),this}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n(Object,"create");e.exports=s},function(e,t,r,i){(function(t){var n=r(i),s=n("object"==typeof t&&t),a=n("object"==typeof self&&self),o=n("object"==typeof this&&this),u=s||a||o||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t,r,i){function n(){this.__data__=new s}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){var r=this.__data__;return r instanceof a&&r.__data__.length==u&&(r=this.__data__=new o(r.__data__)),r.set(e,t),this}var a=r(i),o=r(n),u=200;e.exports=s},function(e,t,r,i,n){var s=r(i),a=r(n),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,u=/\\(\\)?/g,l=s(function(e){var t=[];return a(e).replace(o,function(e,r,i,n){t.push(i?n.replace(u,"$1"):r||e)}),t});e.exports=l},function(e,t,r,i){function n(e){if("string"==typeof e||s(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var s=r(i),a=1/0;e.exports=n},function(e,t,r,i,n,s,a,o,u){var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=r(u),y=Object.prototype,v=y.hasOwnProperty,m=y.propertyIsEnumerable,g=!m.call({valueOf:1},"valueOf"),b=c(function(e,t){if(g||h(t)||f(t))return void p(t,d(t),e);for(var r in t)v.call(t,r)&&l(e,r,t[r])});e.exports=b},function(e,t,r,i){function n(e){return s(e,!0,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null!=e&&o(e,t,a)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e){return s(e)&&u.call(e,"callee")&&(!p.call(e,"callee")||l.call(e)==a)}var s=r(i),a="[object Arguments]",o=Object.prototype,u=o.hasOwnProperty,l=o.toString,p=o.propertyIsEnumerable;e.exports=n},function(e,t,r,i,n,s){function a(e){return null!=e&&l(o(e))&&!u(e)}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e){return o(e)&&a(e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n){(function(e){var s=r(i),a=r(n),o="object"==typeof t&&t,u=o&&"object"==typeof e&&e,l=u&&u.exports===o,p=l?s.Buffer:void 0,c=p?function(e){return e instanceof p}:a;e.exports=c}).call(t,r(27)(e))},function(e,t,r,i,n){function s(e){return"string"==typeof e||!a(e)&&o(e)&&p.call(e)==u}var a=r(i),o=r(n),u="[object String]",l=Object.prototype,p=l.toString;e.exports=s},function(e,t,r,i,n,s,a,o,u){function l(e){var t=y(e);if(!t&&!h(e))return c(e);var r=f(e),i=!!r,n=r||[],s=n.length;for(var a in e)!p(e,a)||i&&("length"==a||d(a,s))||t&&"constructor"==a||n.push(a);return n}var p=r(i),c=r(n),f=r(s),h=r(a),d=r(o),y=r(u);e.exports=l},function(e,t,r,i){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a),a};return r.cache=new(n.Cache||s),r}var s=r(i),a="Expected a function";n.Cache=s,e.exports=n},function(e,t,r,i){function n(e){return null==e?"":s(e)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h){"use strict";function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function y(e){return e&&e.__esModule?e:{default:e}}function v(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(D.get("traverseNeedsParent",e.type));k.explode(t),v.node(e,t,r,i,n)}}function m(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var g=r(1915),b=y(g),x=r(6),E=y(x),A=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return y(A).default}});var S=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){retLine truncated
|
||||
if(k=P.next(),k.done)break;D=k.value}var N=D;e[N]?m(e[N],A):e[N]=A}else m(e,A)}}}for(var I in e)if(!v(I)){var F=e[I],B=C.FLIPPED_ALIAS_KEYS[I],R=C.DEPRECATED_KEYS[I];if(R&&(console.trace("Visitor defined for "+I+" but it has been renamed to "+R),B=[R]),B){delete e[I];for(var L=B,M=Array.isArray(L),j=0,L=M?L:(0,S.default)(L);;){var V;if(M){if(j>=L.length)break;V=L[j++]}else{if(j=L.next(),j.done)break;V=j.value}var U=V,Y=e[U];Y?m(Y,F):e[U]=(0,O.default)(F)}}}for(var K in e)v(K)||d(e[K]);return e}function l(e){if(!e._verified){if("function"==typeof e)throw new Error(w.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||p(t,e[t]),!v(t)){if(C.TYPES.indexOf(t)<0)throw new Error(w.get("traverseVerifyNodeType",t));var r=e[t];if("object"===("undefined"==typeof r?"undefined":(0,b.default)(r)))for(var i in r){if("enter"!==i&&"exit"!==i)throw new Error(w.get("traverseVerifyVisitorProperty",t,i));p(t+"."+i,r[i])}}e._verified=!0}}function p(e,t){for(var r=[].concat(t),i=r,n=Array.isArray(i),s=0,i=n?i:(0,S.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+("undefined"==typeof o?"undefined":(0,b.default)(o)))}}function c(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r={},i=0;i<e.length;i++){var n=e[i],s=t[i];u(n);for(var a in n){var o=n[a];s&&(o=f(o,s));var l=r[a]=r[a]||{};m(l,o)}}return r}function f(e,t){var r={};for(var i in e){var n=e[i];Array.isArray(n)&&(n=n.map(function(e){var r=function(r){return e.call(t,r,t)};return r.toString=function(){return e.toString()},r}),r[i]=n)}return r}function h(e){for(var t in e)if(!v(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function d(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function y(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function v(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function m(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var g=r(88),b=o(g),x=r(616),E=o(x),A=r(6),S=o(A);t.explode=u,t.verify=l,t.merge=c;var _=r(i),T=a(_),P=r(n),w=a(P),k=r(9),C=a(k),D=r(s),O=o(D)},function(e,t,r,i){var n=r(i),s=n.Reflect;e.exports=s},function(e,t,r,i){function n(e,t,r,i){return void 0===e||s(e,a[r])&&!o.call(i,r)?t:e}var s=r(i),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r,i,n){function s(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var a=r(i),o=r(n),u=Object.prototype,l=a?a.enumerate:void 0,p=u.propertyIsEnumerable;l&&!p.call({valueOf:1},"valueOf")&&(s=function(e){return o(l(e))}),e.exports=s},function(e,t,r,i){function n(e,t){return s(t,function(t){return e[t]})}var s=r(i);e.exports=n},function(e,t,r,i,n,s){var a=r(i),o=r(n),u=r(s),l=o(function(e,t,r,i){a(t,u(t),e,i)});e.exports=l},function(e,t,r,i){function n(e){return s(e,!1,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a){var o=r(i),u=r(n),l=r(s),p=r(a),c=p(function(e){return e.push(void 0,u),o(l,void 0,e)});e.exports=c},function(e,t,r,i,n,s,a,o){function u(e,t,r,i){e=p(e)?e:h(e),r=r&&!i?f(r):0;var n=e.length;return r<0&&(r=d(n+r,0)),c(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&l(e,t,r)>-1}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Math.max;e.exports=u},function(e,t,r,i,n,s,a){function o(e){for(var t=-1,r=c(e),i=u(e),n=i.length,s=l(e),a=!!s,o=s||[],f=o.length;++t<n;){var d=i[t];a&&("length"==d||p(d,f))||"constructor"==d&&(r||!h.call(e,d))||o.push(d)}return o}var u=r(i),l=r(n),p=r(s),c=r(a),f=Object.prototype,h=f.hasOwnProperty;e.exports=o},function(e,t,r,i,n,s,a){function o(e,t,r){return t=(r?l(e,t,r):void 0===t)?1:p(t),u(c(e),t)}var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=o},function(e,t,r,i,n){function s(e){return e?a(e,o(e)):[]}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,a.default)(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}()},function(e,t,r,i,n,s){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(i),u=a(o),l=r(n),p=a(l),c=r(s),f=a(c);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,f.default)(t)));e.prototype=(0,p.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.default?(0,u.default)(e,t):e.__proto__=t)}},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(e,t){if(!e)throw neLine truncated
|
||||
default:!1},argument:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,a.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")}}}),(0,a.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,a.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}}),(0,a.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,a.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,a.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,a.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,a.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("ObLine truncated
|
||||
o.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var u=a;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(d&&e.length>=1e3&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=y,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c,f){"use strict";function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(C.get("traverseNeedsParent",e.type));w.explode(t),y.node(e,t,r,i,n)}}function v(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var m=r(248),g=d(m),b=r(1),x=d(b),E=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return d(E).default}});var A=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return d(A).default}});var S=r(s);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return d(S).default}}),t.default=y;var _=r(a),T=d(_),P=r(o),w=h(P),k=r(20),C=h(k),D=r(u),O=d(D),N=r(3),I=h(N),F=r(l),B=h(F);t.visitors=w,y.visitors=w,y.verify=w.verify,y.explode=w.explode,y.NodePath=r(p),y.Scope=r(c),y.Hub=r(f),y.cheap=function(e,t){if(e){var r=I.VISITOR_KEYS[e.type];if(r){t(e);for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,x.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a,u=e[o];if(Array.isArray(u))for(var l=u,p=Array.isArray(l),c=0,l=p?l:(0,x.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;y.cheap(h,t)}else y.cheap(u,t)}}}},y.node=function(e,t,r,i,n,s){var a=I.VISITOR_KEYS[e.type];if(a)for(var o=new T.default(r,t,i,n),u=a,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if((!s||!s[f])&&o.visit(e,f))return}};var R=I.COMMENT_KEYS.concat(["tokens","comments","start","end","loc","raw","rawValue"]);y.clearNode=function(e){for(var t=R,r=Array.isArray(t),i=0,t=r?t:(0,x.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;null!=e[s]&&(e[s]=void 0)}for(var a in e)"_"===a[0]&&null!=e[a]&&(e[a]=void 0);B.path.delete(e);for(var o=(0,g.default)(e),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=null}},y.removeProperties=function(e){return y.cheap(e,y.clearNode),e},y.hasType=function(e,t,r,i){if((0,O.default)(i,e.type))return!1;if(e.type===r)return!0;var n={has:!1,type:r};return y(e,{blacklist:i,enter:v},t,n),n.has},y.clearCache=function(){B.clear()},y.copyCache=function(e,t){B.path.has(e)&&B.path.set(t,B.path.get(e))}},function(e,t,r,i){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function o(e){var t=this;do if(e(t))return t;while(t=t.parentPath);return null}function u(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function l(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function p(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var i=void 0,n=g.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,v.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,p=l[t+1];if(i)if(p.listKey&&i.listKey===p.listKey&&p.key<i.key)i=p;else{var c=n.indexOf(i.parentKey),f=n.indexOf(p.parentKey);c>f&&(i=p)}else i=p}return i})}function c(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var i=1/0,n=void 0,s=void 0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<i&&(i=t.length),t}),o=a[0];e:for(var u=0;u<i;u++){for(var l=o[u],p=a,c=Array.isArray(p),f=0,p=c?p:(0,v.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;if(d[u]!==l)break e}n=u,s=l}if(s)return t?t(s,n,a):s;throw new Error("Couldn't find intersection")}function f(){var e=this,t=[];do t.push(e);while(e=e.parentPath);reLine truncated
|
||||
},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return M.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=M.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;M.isAssignmentExpression(e)?r=e.left:M.isVariableDeclarator(e)?r=e.id:(M.isObjectProperty(r)||M.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(M.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,x.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;e(o)}else t.declaration&&e(t.declaration);else if(M.isModuleSpecifier(t))e(t.local);else if(M.isMemberExpression(t))e(t.object),e(t.property);else if(M.isIdentifier(t))i.push(t.name);else if(M.isLiteral(t))i.push(t.value);else if(M.isCallExpression(t))e(t.callee);else if(M.isObjectExpression(t)||M.isObjectPattern(t))for(var u=t.properties,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e(f.key||f.argument)}};n(r);var s=i.join("$");return s=s.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(s.slice(0,20))},e.prototype.isStatic=function(e){if(M.isThisExpression(e)||M.isSuper(e))return!0;if(M.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,i){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var n=!1;if(n||(n="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),n||(n="param"===e.kind&&("let"===t||"const"===t)),n)throw this.hub.file.buildCodeFrameError(i,N.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var i=this.getBinding(e);if(i)return t=t||this.generateUidIdentifier(e).name,new P.default(i,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,i){e[t]&&(e[r]=i,e[t]=null)},e.prototype.dump=function(){var e=(0,_.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var i=t.bindings[r];console.log(" -",r,{constant:i.constant,references:i.references,violations:i.constantViolations.length,kind:i.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(M.isIdentifier(e)){var i=this.getBinding(e.name);if(i&&i.constant&&i.path.isGenericType("Array"))return e}if(M.isArrayExpression(e))return e;if(M.isIdentifier(e,{name:"arguments"}))return M.callExpression(M.memberExpression(M.memberExpression(M.memberExpression(M.identifier("Array"),M.identifier("prototype")),M.identifier("slice")),M.identifier("call")),[e]);var n="toArray",s=[e];return t===!0?n="toConsumableArray":t&&(s.push(M.numericLiteral(t)),n="slicedToArray"),M.callExpression(r.addHelper(n),s)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerBinding("label",e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,x.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("module",f)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?M.unaryExpression("void",M.numericLiteral(0),!0):M.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var i=this.getBinding(r);i&&i.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?t:arguments[2];if(!e)throw new ReferenceError("no `kind`Line truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
var patient = {};
|
||||
|
||||
$.getJSON("data/patient.json", (data) => {
|
||||
patient = Patient(data);
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
function simulation() {
|
||||
var v;
|
||||
var s;
|
||||
var fuel;
|
||||
var schub = false;
|
||||
|
||||
setStartValues(50000, -1000, 10000);
|
||||
|
||||
function switchon() {
|
||||
schub = true;
|
||||
update();
|
||||
checkGameOver();
|
||||
}
|
||||
|
||||
function switchoff() {
|
||||
schub = false;
|
||||
update();
|
||||
checkGameOver();
|
||||
}
|
||||
|
||||
function a() {
|
||||
if (schub == false || fuel <= 0)
|
||||
return -1.63;
|
||||
else {
|
||||
fuel = fuel - 100;
|
||||
return -1.63 + 12;
|
||||
}
|
||||
}
|
||||
|
||||
function showValues() {
|
||||
$("#height").html("Höhe: " + s + " m");
|
||||
$("#speed").html("Geschwindigkeit: " + v + " m/s");
|
||||
$("#fuel").html("Teibstoffvorrat: " + fuel + " l");
|
||||
}
|
||||
|
||||
|
||||
function update() {
|
||||
v = v + a();
|
||||
s = s + v;
|
||||
showValues();
|
||||
}
|
||||
|
||||
function checkGameOver() {
|
||||
if (s <= 0) {
|
||||
if (v < -10)
|
||||
alert("Fehlschlag");
|
||||
else
|
||||
alert("Erfolgreich");
|
||||
|
||||
setStartValues(50000, -1000, 10000);
|
||||
showValues();
|
||||
}
|
||||
}
|
||||
|
||||
function setStartValues(height, velocity, Newfuel) {
|
||||
v = velocity;
|
||||
s = height;
|
||||
fuel = Newfuel;
|
||||
}
|
||||
|
||||
$('#content').html("<h2>Mondlandung</h2>");
|
||||
$("#content").append("<div class='menu'>Hauptmenü</div>")
|
||||
$("#content").append("<div id='height'>Höhe: </div>");
|
||||
$("#content").append("<div id='speed'>Geschwindikgiet: </div>");
|
||||
$("#content").append("<div id='fuel'>Treibstoffvorrat: </div>");
|
||||
$("#content").append("<button id='energy' class='btn-style'>Triebwerk an</button>");
|
||||
$("#content").append("<button id='no-energy' class='btn-style'>Triebwerk aus</button>");
|
||||
|
||||
|
||||
|
||||
$("#energy").click(switchon);
|
||||
$("#no-energy").click(switchoff);
|
||||
|
||||
showValues();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),i=e[t[0]];return function(e,t,n){i.apply(this,[e,t,n].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function s(e){var t=(e.presets||[]).map(function(e){var t=n(x,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===d(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=h({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return h({},e,{presets:t,plugins:r})}function a(e,t){return v.transform(e,s(t))}function o(e,t,r){return v.transformFromAst(e,t,s(r))}function u(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function l(e){Object.keys(e).forEach(function(t){return u(t,e[t])})}function p(e,t){x.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),x[e]=t}function c(e){Object.keys(e).forEach(function(t){return p(t,e[t])})}function f(){window.removeEventListener("DOMContentLoaded",E)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.availablePresets=t.availablePlugins=void 0;var h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.transform=a,t.transformFromAst=o,t.registerPlugin=u,t.registerPlugins=l,t.registerPreset=p,t.registerPresets=c,t.disableScriptTags=f;var y=r(2492),v=i(y),m=r(2604),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},x=t.availablePresets={};l({"check-es2015-constants":r(692),"external-helpers-2":r(2635),"syntax-async-functions":r(697),"syntax-async-generators":r(2636),"syntax-class-constructor-call":r(1643),"syntax-class-properties":r(1644),"syntax-decorators":r(1064),"syntax-do-expressions":r(1645),"syntax-exponentiation-operator":r(1646),"syntax-export-extensions":r(1647),"syntax-flow":r(698),"syntax-function-bind":r(1648),"syntax-function-sent":r(2637),"syntax-jsx":r(1065),"syntax-object-rest-spread":r(1649),"syntax-trailing-function-commas":r(1066),"transform-async-functions":r(2638),"transform-async-to-generator":r(1067),"transform-async-to-module-method":r(2884),"transform-class-constructor-call":r(1760),"transform-class-properties":r(1800),"transform-decorators":r(1841),"transform-decorators-legacy":r(3353).default,"transform-do-expressions":r(1842),"transform-es2015-arrow-functions":r(768),"transform-es2015-block-scoped-functions":r(769),"transform-es2015-block-scoping":r(774),"transform-es2015-classes":r(777),"transform-es2015-computed-properties":r(780),"transform-es2015-destructuring":r(785),"transform-es2015-duplicate-keys":r(1227),"transform-es2015-for-of":r(790),"transform-es2015-function-name":r(791),"transform-es2015-instanceof":r(4165),"transform-es2015-literals":r(836),"transform-es2015-modules-amd":r(1279),"transform-es2015-modules-commonjs":r(852),"transform-es2015-modules-systemjs":r(2013),"transform-es2015-modules-umd":r(2020),"transform-es2015-object-super":r(858),"transform-es2015-parameters":r(876),"transform-es2015-shorthand-properties":r(878),"transform-es2015-spread":r(893),"transform-es2015-sticky-regex":r(898),"transform-es2015-template-literals":r(913),"transform-es2015-typeof-symbol":r(918),"transform-es2015-unicode-regex":r(924),"transform-es3-member-expression-literals":r(5092),"transform-es3-property-literals":r(5093),"transform-es5-property-mutators":r(5094),"transform-eval":r(5326),"transform-exponentiation-operator":r(1456),"transform-export-extensions":r(2260),"transform-flow-comments":r(5501),"transform-flow-strip-types":r(2261),"transform-function-bind":r(2262),"transform-jscript":r(5502),"transform-object-assign":r(5503),"transform-object-rest-spread":r(2263),"transform-object-set-prototype-of-to-assign":r(5534)Line truncated
|
||||
var h=r(1),d=n(h),y=r(17),v=n(y),m=r(11),g=n(m);t.assertEach=a,t.assertOneOf=o,t.assertNodeType=u,t.assertNodeOrValueType=l,t.assertValueType=p,t.chain=c,t.default=f;var b=r(3),x=i(b),E=t.VISITOR_KEYS={},A=t.ALIAS_KEYS={},S=t.NODE_FIELDS={},_=t.BUILDER_KEYS={},T=t.DEPRECATED_KEYS={},P={}},190,[6514,184,1023,181],[6611,6264],function(e,t){function r(e){for(var t=-1,r=e?e.length:0,i=0,n=[];++t<r;){var s=e[t];s&&(n[i++]=s)}return n}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},[6862,6333],[6446,1,2,1621,259,1051,15,689,2503,2509,2517,2507,2506,2512,2505,2516,2515,2508,2504],[6585,2834,19,377,1073,1655,2686,2703,1074,1075,18,702,377,1073,1655],[6591,19,46,1656,2730,2734,376,1666,1073,18,702,2687,2693,2701,2691,2690,2696,2689,2700,2699,2692,2688],[6669,2842],[6682,2837,1683],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},[6532,1089,1087],[6591,5,12,1707,2976,2980,585,1717,1108,7,720,2933,2939,2947,2937,2936,2942,2935,2946,2945,2938,2934],380,[6532,1121,1119],[6591,5,12,1738,3115,3119,476,1757,1136,7,732,3075,3081,3089,3079,3078,3084,3077,3088,3087,3080,3076],285,[6682,3185,1144],380,[6532,1149,1147],[6585,3181,28,391,1163,1776,3235,3252,1164,1166,29,746,391,1163,1776],[6591,28,67,1777,3266,3270,390,1172,1163,29,746,3236,3242,3250,3240,3239,3245,3238,3249,3248,3241,3237],[6682,3360,1801],380,[6532,1178,1176],[6585,3356,40,396,1192,1817,3410,3427,1193,1195,30,761,396,1192,1817],[6591,40,68,1818,3441,3445,395,1201,1192,30,761,3411,3417,3425,3415,3414,3420,3413,3424,3423,3416,3412],[6446,1,2,1853,487,1209,21,775,3561,3567,3575,3565,3564,3570,3563,3574,3573,3566,3562],[6446,1,2,1860,489,1211,22,778,3604,3610,3618,3608,3607,3613,3606,3617,3616,3609,3605],141,[6803,1896,3849,3853,611,3927,1237,801,3806,3812,3820,3810,3809,3815,3808,3819,3818,3811,3807],380,[6532,1253,1251],[6803,1935,4044,4048,502,4138,1268,818,4004,4010,4018,4008,4007,4013,4006,4017,4016,4009,4005],373,[6682,4172,1967],380,[6532,1285,1283],[6585,4168,41,409,1299,1983,4222,4239,1300,1302,31,845,409,1299,1983],[6591,41,69,1984,4253,4257,408,1308,1299,31,845,4223,4229,4237,4227,4226,4232,4225,4236,4235,4228,4224],[6446,1,2,2008,624,1309,23,853,4342,4348,4356,4346,4345,4351,4344,4355,4354,4347,4343],[6821,4389,1313],[6446,32,70,2015,627,1314,33,856,4395,4401,4409,4399,4398,4404,4397,4408,4407,4400,4396],[6591,34,59,2022,4481,4485,513,2032,1316,24,860,4438,4444,4452,4442,4441,4447,4440,4451,4450,4443,4439],[6682,4589,1327],380,[6532,1332,1330],[6868,2064,635,78,1346,877,4642,4648,4656,4646,4645,4651,4644,4655,4654,4647,4643],[6682,4666,4664],380,[6532,1352,1350],[6591,42,71,2083,4767,4771,519,2102,1367,35,887,4727,4733,4741,4731,4730,4736,4729,4740,4739,4732,4728],285,[6682,4872,4870],380,[6532,1386,1384],[6591,43,72,2131,4973,4977,525,2150,1401,25,907,4933,4939,4947,4937,4936,4942,4935,4946,4945,4938,4934],285,183,[6591,4,14,2174,5156,5160,648,937,1424,8,927,5113,5119,5127,5117,5116,5122,5115,5126,5125,5118,5114],[6591,4,14,2180,5216,5220,535,937,1427,8,930,5176,5182,5190,5180,5179,5185,5178,5189,5188,5181,5177],380,[6532,1442,1440],[6591,44,73,2223,5381,5385,540,2242,1458,26,944,5341,5347,5355,5345,5344,5350,5343,5354,5353,5346,5342],285,[6682,5452,5450],380,[6532,1470,1468],[6591,45,74,2295,5669,5673,550,2313,1506,36,970,5629,5635,5643,5633,5632,5638,5631,5642,5641,5634,5630],285,[6682,5740,5738],380,[6532,1519,1517],[6591,38,75,2334,5844,5848,554,2352,1534,37,984,5804,5810,5818,5808,5807,5813,5806,5817,5816,5809,5805],285,[6682,5915,5913],380,[6532,1547,1545],function(e,t,r){e.exports={default:r(2428),__esModule:!0}},[6864,450,1562,2380,5990,6007,1566,1e3,450,1562,2380],[6868,2381,449,6081,1562,1e3,5991,5997,6005,5995,5994,6e3,5993,6004,6003,5996,5992],103,373,380,[6532,1585,1019],[6613,6292],function(e,t,r){"use strict";var i=function(e,t,r,i,n,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,i,n,s,a,o],p=0;u=new Error(t.replace(/%s/g,function(){return l[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=i},function(e,t,r){var i=r(2457),n=r(6305),s=r(6390),a=r(1607),o=a(function(e){return e.push(void 0,n),i(s,void 0,e)});e.exports=o},[6793,1605,2473],[6816,6329,1612,571,684],function(e,t){"use strict";function r(e){return 10===e||13===e||8232===e||8233===e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNewLine=r;var i=t.lineBreak=/\r\n?|\n|\u2028|\u2029/;t.lineBreakG=new RegExp(i.source,"g"),t.nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/},183,[6536,1641,1642,461],460,[6575,1654,578,1069],83,460,83,285,[6525,1695,1088],460,[6575,1705,584,1104],83,460,83,[6525,1730,1120],[6585,1718,5,385,1136,1737,3074,3091,1137,1138,7,732,385,1136,1737],460,[6580,736,1140,85,3166],[6525,1770,1148],460,[6580,749,1169,86,3339],[6525,1811,1177],460,[6580,764,1198,87,3514],183,[6536,1850,1851,485],[6440,1,397,1209,18Line truncated
|
||||
(0,u.default)(this,t);var n=(0,p.default)(this,e.call(this));return n.initialized=!1,n.raw=(0,A.default)({},r),n.key=n.take("name")||i,n.manipulateOptions=n.take("manipulateOptions"),n.post=n.take("post"),n.pre=n.take("pre"),n.visitor=n.normaliseVisitor((0,_.default)(n.take("visitor"))||{}),n}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var s=r,o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var p=l;if(p){var c=p.apply(this,i);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=x.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(v.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=T,r=Array.isArray(t),i=0,t=r?t:(0,a.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return x.default.explode(e),e},t}(g.default);t.default=P,e.exports=t.default},[6437,558],[6490,2,460],[6491,1628,559,3],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2605),s=i(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var i in r.bindings){var n=r.bindings[i];if("const"===n.kind||"module"===n.kind)for(var a=n.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l;throw p.buildCodeFrameError(t.get("readOnly",i))}}}}}},e.exports=t.default},[6507,1059],[6511,1637],190,581,function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},[6552,46,107,463],[6490,46,463],function(e,t){function r(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?n:t,e>-1&&e%1==0&&e<t}var i=/^\d+$/,n=9007199254740991;e.exports=r},[6582,2838],[6552,46,109,466],[6490,46,466],265,[6575,1664,580,705],[6580,1664,1076,467,2754],[6565,2823],[6580,708,1081,83,2819],[6667,2840],[6510,2852],[6706,716,191,190,272,380],function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},[6527,272,190,110],function(e,t){var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},[6552,12,112,470],[6490,12,470],701,[6582,1720],[6552,12,114,473],[6490,12,473],265,[6575,1715,587,723],[6580,1715,1111,474,3e3],[6510,3031],[6706,731,195,194,276,383],713,714,[6527,276,194,116],716,[6582,1720],[6552,12,118,477],[6490,12,477],[6561,1759],[6565,3169],[6568,1140,1141,85],[6667,3190],[6679,3180],[6510,3202],[6706,745,200,199,283,388],713,714,[6527,283,199,119],716,[6582,3186],[6552,67,121,480],[6490,67,480],[6565,3343],701,[6568,1169,750,86],[6574,1169,286],[6667,3365],[6679,3355],[6510,3377],[6706,760,204,203,291,393],713,714,[6527,291,203,123],716,[6582,3361],[6552,68,125,483],[6490,68,483],[6565,3518],701,[6568,1198,765,87],[6574,1198,294],function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var i=e.node;if(i.shadow)return;i.shadow={this:!1},i.type="FunctionExpression";var n=t.thisExpression();n._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),n]))),e.replaceWith(t.callExpression(t.memberExpression(i,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(3528),s=i(n);t.default=function(e){function t(e,t){for(var i=t.get(e),n=i,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u,p=l.node;if(l.isFunctionDeclaration()){var c=r.variableDeclaration("let",[r.variableDeclarator(p.id,r.toExpression(p))]);c._blockHoist=2,p.id=null,l.replaceWith(c)}}}var r=e.types;return{visitoLine truncated
|
||||
p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;r=A(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name,i=this.exports[r];if(i&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=m.assignmentExpression(e.node.operator[0]+"=",t.node,m.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var s=[];s.push(n);var a=void 0;a="--"===e.node.operator?"+":"-",s.push(m.binaryExpression(a,t.node,m.numericLiteral(1)));for(var o=e.replaceWithMultiple(m.sequenceExpression(s)),u=o,l=Array.isArray(u),c=0,u=l?u:(0,p.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var h=f;this.requeueInParent(h)}}}}};return{inherits:r(2373),visitor:{ThisExpression:function(e,t){this.ranCommonJS||t.opts.allowTopLevelThis===!0||e.findParent(function(e){return!e.is("shadow")&&_.indexOf(e.type)>=0})||e.replaceWith(m.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var i=T[t];if(i)return i;var n=e.scope.generateUidIdentifier((0,h.basename)(t,(0,h.extname)(t))),s=m.variableDeclaration("var",[m.variableDeclarator(n,g(m.stringLiteral(t)).expression)]);return f[t]&&(s.loc=f[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),T[t]=n}function i(e,t,r){var i=e[t]||[];e[t]=i.concat(r)}this.ranCommonJS=!0;var n=!!this.opts.strict,s=e.scope;s.rename("module"),s.rename("exports"),s.rename("require");for(var o=!1,l=!1,c=e.get("body"),f=(0,u.default)(null),d=(0,u.default)(null),y=(0,u.default)(null),v=[],_=(0,u.default)(null),T=(0,u.default)(null),P=!1,w=c,k=Array.isArray(w),C=0,w=k?w:(0,p.default)(w);;){var D;if(k){if(C>=w.length)break;D=w[C++]}else{if(C=w.next(),C.done)break;D=C.value}var O=D;if(O.isExportDeclaration()){o=!0;for(var N=[].concat(O.get("declaration"),O.get("specifiers")),I=N,F=Array.isArray(I),B=0,I=F?I:(0,p.default)(I);;){var R;if(F){if(B>=I.length)break;R=I[B++]}else{if(B=I.next(),B.done)break;R=B.value}var L=R,M=L.getBindingIdentifiers();if(M.__esModule)throw L.buildCodeFrameError('Illegal export "__esModule"')}}if(O.isImportDeclaration()){var j;l=!0;var V=O.node.source.value,U=f[V]||{specifiers:[],maxBlockHoist:0,loc:O.node.loc};(j=U.specifiers).push.apply(j,O.node.specifiers),"number"==typeof O.node._blockHoist&&(U.maxBlockHoist=Math.max(O.node._blockHoist,U.maxBlockHoist)),f[V]=U,O.remove()}else if(O.isExportDefaultDeclaration()){if(P)throw O.buildCodeFrameError("Only one default export allowed per module.");var Y=O.get("declaration");if(Y.isFunctionDeclaration()){var K=Y.node.id,W=m.identifier("default");K?(i(d,K.name,W),v.push(A(W,K)),O.replaceWith(Y.node)):(v.push(A(W,m.toExpression(Y.node))),O.remove())}else if(Y.isClassDeclaration()){var G=Y.node.id,q=m.identifier("default");G?(i(d,G.name,q),O.replaceWithMultiple([Y.node,A(q,G)])):O.replaceWith(A(q,m.toExpression(Y.node)))}else O.replaceWith(A(m.identifier("default"),Y.node)),O.parentPath.requeue(O.get("expression.left"));P=!0}else if(O.isExportNamedDeclaration()){var H=O.get("declaration");if(H.node){if(H.isFunctionDeclaration()){var X=H.node.id;i(d,X.name,X),v.push(A(X,X)),O.replaceWith(H.node)}else if(H.isClassDeclaration()){var J=H.node.id;i(d,J.name,J),O.replaceWithMultiple([H.node,A(J,J)]),y[J.name]=!0}else if(H.isVariableDeclaration()){for(var $=H.get("declarations"),z=$,Q=Array.isArray(z),Z=0,z=Q?z:(0,p.default)(z);;){var ee;if(Q){if(Z>=z.length)break;ee=z[Z++]}else{if(Z=z.next(),Z.done)break;ee=Z.value}var te=ee,re=te.get("id"),ie=te.get("init");ie.node||ie.replaceWith(m.identifier("undefined")),re.isIdentifier()&&(i(d,re.node.name,re.node),ie.replaceWith(A(re.node,ie.node).expression),y[re.node.name]=!0)}O.replaceWith(H.node)}continue}var ne=O.get("specifiers"),se=[],ae=O.node.source;if(ae)for(var oe=r(ae.value,O.node._blockHoist),ue=ne,le=Array.isArray(ue),pe=0,ue=le?ue:(0,p.default)(ue);;){var ce;if(le){if(pe>=ue.length)break;ce=ue[pe++]}else{if(pe=ue.next(),pe.done)break;ce=pe.value}var fe=ce;fe.isExportNamespaceSpecifier()||fe.isExportDefaultSpecifier()||fe.isExportSpecifier()&&("default"===fe.node.local.name?v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(m.callExpression(this.addHelper("interopRequireDefault"),[oe]),fe.node.local))):v.push(x(m.stringLiteral(fe.node.exported.name),m.memberExpression(oe,fe.node.local))),y[fe.node.exported.name]=!0)}else for(var he=ne,de=Array.isArray(he),ye=0,he=de?he:(0,p.default)(he);;){var ve;if(de){if(ye>=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var me=ve;me.isExportSpecifier()&&(i(d,me.node.local.name,me.node.exported),y[me.node.exported.name]=!0,se.push(A(me.node.exported,me.node.local)))}O.replaceWithMultiple(se)}else if(O.isExportAllDeclaration()){var ge=S({OBJECT:r(O.node.source.value,O.node._blockHoist)});ge.loc=O.node.loc,v.push(ge),Line truncated
|
||||
if(null!=r){var i=l.default[t];if(i&&i.alias&&(i=l.default[i.alias]),i){var n=o[i.type];n&&(r=n(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=s;var a=r(1048),o=n(a),u=r(572),l=i(u);t.config=l.default},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return!!e}function a(e){return c.booleanify(e)}function o(e){return c.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=s,t.booleanString=a,t.list=o;var u=r(2486),l=n(u),p=r(1050),c=i(p);t.filename=l.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){var r=t||n.EXTENSIONS,i=C.default.extname(e);return(0,S.default)(r,i)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(y.default).join("|"),"i")),"string"==typeof e){e=(0,O.default)(e),((0,m.default)(e,"./")||(0,m.default)(e,"*/"))&&(e=e.slice(2)),(0,m.default)(e,"**/")&&(e=e.slice(3));var t=E.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,w.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?(0,b.default)(e)?o([e],t):(0,T.default)(e)?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];if(e=(0,O.default)(e),r){for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,f.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(p(o,e))return!1}return!0}if(t.length)for(var u=t,l=Array.isArray(u),c=0,u=l?u:(0,f.default)(u);;){var h;if(l){if(c>=u.length)break;h=u[c++]}else{if(c=u.next(),c.done)break;h=c.value}var d=h;if(p(d,e))return!0}return!1}function p(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var c=r(1),f=i(c),h=r(48);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return h.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return h.inspect}}),t.canCompile=n,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var d=r(6392),y=i(d),v=r(6409),m=i(v),g=r(2482),b=i(g),x=r(6416),E=i(x),A=r(50),S=i(A),_=r(82),T=i(_),P=r(255),w=i(P),k=r(187),C=i(k),D=r(2486),O=i(D);n.EXTENSIONS=[".js",".jsx",".es6",".es"]},[6457,39,16,2,1,2518,259,1622,15,689],[6460,367],[6475,104,2538,2537,2535,2533,2536,2534,2532,105,1624,574,2539,2540],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function a(e){this.token("..."),this.print(e.argument,e)}function o(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function u(e){this.printJoin(e.decorators,e),this._method(e)}function l(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(b.isAssignmentPattern(eLine truncated
|
||||
t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},[6543,1683,2679,2682,2683,376,2642,18],[6553,268,46,577,107,699,700,463,2654],[6556,2661,1072],[6561,2685],[6565,2681],[6584,46],[6597,18],[6601,46],function(e,t){!function(){"use strict";function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function i(e){return e>=48&&e<=55}function n(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&h.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return e<128?d[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?y[e]:f.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:c.NonAsciiIdentifierStart.test(a(e))}function p(e){return e<128?y[e]:c.NonAsciiIdentifierPart.test(a(e))}var c,f,h,d,y,v;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\Line truncated
|
||||
var K;if(U){if(Y>=V.length)break;K=V[Y++]}else{if(Y=V.next(),Y.done)break;K=Y.value}var W=K;W.remove()}y.length&&(e.isClassExpression()?(e.scope.push({id:v}),e.replaceWith(t.assignmentExpression("=",v,e.node))):(e.node.id||(e.node.id=v),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(y))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){var r=t.get("body"),i=r.get("body");i.some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(691),o=i(a);e.exports=t.default},[6675,3374],1580,[6512,204,202],[6701,755,3388,3387,201,1186,1814],[6516,288,393,1803],[6703,1175],[6519,1179,289,1182,290,203,599,3389,759,1810,123],[6708,757,758,394,1187,203,1805,288],[6710,1811,1177],[6523,203,600,1183],[6524,203,394,3379,1183],[6711,289,56,393],[6712,290],[6537,3382,123,599,56],685,[6540,3396,1807],[6584,68],[6597,30],[6601,68],1658,[6636,598,30],1658,[6475,124,3471,3470,3468,3466,3469,3467,3465,125,1824,762,3472,3473],[6553,754,68,601,125,762,763,483,3475],1784,1660,1669,[6556,3486,484],[6557,3481,1827,1828,1831,3511,3512,3513,126,87],[6558,3502],[6559,1830,484],[6615,3510],[6645,3489,87,294],1674,1794,[6660,87],[6617,1829,602,766],[6618,294],[6581,767,126,765,293,87],1681,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(16),s=i(n),a=r(1),o=i(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function i(e,r,i){var n=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var h;if(p){if(c>=l.length)break;h=l[c++]}else{if(c=l.next(),c.done)break;h=c.value}var d=h;n.push(f({CLASS_REF:r,DECORATOR:d}))}}for(var y=(0,s.default)(null),v=e.get("body.body"),m=Array.isArray(v),g=0,v=m?v:(0,o.default)(v);;){var b;if(m){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var x=b,E=x.node.decorators;if(E){var A=u.toKeyAlias(x.node);y[A]=y[A]||[],y[A].push(x.node),x.remove()}}for(var S in y)var _=y[S];return n}function n(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;if(s.decorators)return!0}}else if(e.isObjectExpression())for(var a=e.node.properties,u=Array.isArray(a),l=0,a=u?a:(0,o.default)(a);;){var p;if(u){if(l>=a.length)break;p=a[l++]}else{if(l=a.next(),l.done)break;p=l.value}var c=p;if(c.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(1064),visitor:{ClassExpression:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(i(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(n(e)){a(e),(0,c.default)(e);var t=e.node.id,r=[];r=r.concat(i(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){n(e)&&a(e)}}}};var u=r(559),l=i(u),p=r(2572),c=i(p),f=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(1645),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},1086,[6512,1204,485],1088,380,[6519,3541,3535,3547,603,772,773,3539,1849,3544,486],714,[6527,1205,772,486],[6529,485],716,[6439,2],[6452,21],[6456,2],[6473,16,21],[6475,127,3596,3595,3593,3591,3594,3592,3590,128,1857,604,3597,3598],[6487,47,2,605,128,604,776,488,3600],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(1),a=n(s),o=r(2),u=n(o),l=r(489),p=r(2591),c=n(p),f=r(1630),h=n(f),d=r(2571),y=i(d),v=r(3602),m=n(v),g=r(22),b=i(g),x=(0,m.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:fuLine truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,n){var s=e.specifiers[0];if(i.isExportNamespaceSpecifier(s)||i.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=n.generateUidIdentifier(a.exported.name),u=void 0;u=i.isExportNamespaceSpecifier(a)?i.importNamespaceSpecifier(o):i.importDefaultSpecifier(o),r.push(i.importDeclaration([u],e.source)),r.push(i.exportNamedDeclaration(null,[i.exportSpecifier(o,a.exported)])),t(e,r,n)}}var i=e.types;return{inherits:r(1647),visitor:{ExportNamedDeclaration:function(e){var r=e.node,i=e.scope,n=[];t(r,n,i),n.length&&(r.specifiers.length>=1&&n.push(r),e.replaceWithMultiple(n))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(1),s=i(n);t.default=function(e){var t=e.types,i="@flow";return{inherits:r(698),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,n=r,a=Array.isArray(n),o=0,n=a?n:(0,s.default)(n);;){var u;if(a){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u;l.value.indexOf(i)>=0&&(l.value=l.value.replace(i,""),l.value.replace(/\*/g,"").trim()||(l.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){var i=t.params[r];i.optional=!1}},TypeCastExpression:function(e){var r=e.node;do r=r.expression;while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function i(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function n(e,r){var n=i(e,r);if(n)return n;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(1648),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,i=t.callee;if(s.isBindExpression(i)){var a=n(i,r);t.callee=s.memberExpression(i.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){var t=e.node,r=e.scope,i=n(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[i]))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5504),s=i(n);t.default=function(e){function t(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var a;if(r){if(n>=t.length)break;a=t[n++]}else{if(n=t.next(),n.done)break;a=n.value}var o=a;if(i.isSpreadProperty(o))return!0}return!1}var i=e.types;return{inherits:r(1649),visitor:{ObjectExpression:function(e,r){function n(){o.length&&(a.push(i.objectExpression(o)),o=[])}if(t(e.node)){for(var a=[],o=[],u=e.node.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;i.isSpreadProperty(f)?(n(),a.push(f.argument)):o.push(f)}n(),i.isObjectExpression(a[0])||a.unshift(i.objectExpression([])),e.replaceWith(i.callExpression(r.addHelper("extends"),a))}}}}},e.exports=t.default},1086,[6512,1486,544],1088,380,[6519,5517,5511,5523,660,960,961,5515,2270,5520,545],714,[6527,1487,960,545],[6529,544],716,1086,[6512,1493,546],1088,380,[6519,5549,5543,5555,661,964,965,5547,2279,5552,547],714,[6527,1494,964,547],[6529,546],716,103,function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,n=!0,s=0;s<r.length;s++){var a=r[s],o=i.toComputedKey(a);if(i.isLiteral(o,{value:"displayName"})){n=!1;break}}n&&r.unshift(i.objectProperty(i.identifier("displayName"),i.stringLiteral(e)))}function r(e){if(!e||!i.isCallExpression(e))return!1;if(!n(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!i.isObjectExpression(r)}var i=e.types,n=i.buildMatchMemberExpression("React.createClass");return{visitor:{ExportDefaultDeclaration:function(e,i){var n=e.node;if(r(n.declaration)){var a=i.file.opts.basename;"index"===a&&(a=s.default.basename(s.default.dirname(i.file.opts.filename))),t(a,n.declaration)}},CallExpression:function(e){var n=e.node;if(r(n)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(i.isMemberExpression(s)&&(s=s.property),i.isIdentifier(s)&&t(s.name,n))}}}}};var n=r(187),s=i(n);e.exports=t.default},1086,[6512,1500,548],1088,380,[6519,5598,5592,5604,662,968,969,5596,2290,5601,549],714,[6527,1501,968,54Line truncated
|
||||
if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(r,"Invalid regular expression flag")}return this.finishToken(p.types.regexp,{pattern:n,flags:s})}},{key:"readInt",value:function(e,t){for(var r=this.state.pos,i=0,n=0,s=null==t?1/0:t;n<s;++n){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0,o>=e)break;++this.state.pos,i=i*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:i}},{key:"readRadixNumber",value:function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(p.types.num,t)}},{key:"readNumber",value:function(e){var t=this.state.pos,r=!1,i=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.state.pos);46===n&&(++this.state.pos,this.readInt(10),r=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||(n=this.input.charCodeAt(++this.state.pos),43!==n&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),(0,l.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var s=this.input.slice(t,this.state.pos),a=void 0;return r?a=parseFloat(s):i&&1!==s.length?/[89]/.test(s)||this.state.strict?this.raise(t,"Invalid number"):a=parseInt(s,8):a=parseInt(s,10),this.finishToken(p.types.num,a)}},{key:"readCodePoint",value:function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t}},{key:"readString",value:function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):((0,h.isNewLine)(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(p.types.string,t)}},{key:"readTmplToken",value:function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(p.types.template)?36===r?(this.state.pos+=2,this.finishToken(p.types.dollarBraceL)):(++this.state.pos,this.finishToken(p.types.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(p.types.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if((0,h.isNewLine)(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return n(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),i>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(i)}return String.fromCharCode(t)}}},{key:"readHexChar",value:function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r}},{key:"readWord1",value:function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if((0,l.isIdentifierChar)(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var s=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint();(t?l.isIdentifierStart:l.isIdentifierChar)(a,!0)||this.raise(s,"Invalid Unicode escape"),e+=n(a),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)}},{keyLine truncated
|
||||
},E="0000",A=function(e,t){var r=String(e);return r.length<t?(E+r).slice(-t):r},S=function(e){return Number(e).toString(16).toUpperCase()},_=[].slice,T=function(e){for(var t,r=-1,i=e.length,n=i-1,s=[],a=!0,o=0;++r<i;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=n){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},P=function(e,t){for(var r,i,n=0,s=e.length;n<s;){if(r=e[n],i=e[n+1],t>=r&&t<i)return t==r?i==r+1?(e.splice(n,2),e):(e[n]=t+1,e):t==i-1?(e[n+1]=t,e):(e.splice(n,2,r,t,t+1,i),e);n+=2}return e},w=function(e,t,r){if(r<t)throw Error(u.rangeOrder);for(var i,n,s=0;s<e.length;){if(i=e[s],n=e[s+1]-1,i>r)return e;if(t<=i&&r>=n)e.splice(s,2);else{if(t>=i&&r<n)return t==i?(e[s]=r+1,e[s+1]=n+1,e):(e.splice(s,2,i,t,r+1,n+1),e);if(t>=i&&t<=n)e[s+1]=t;else if(r>=i&&r<=n)return e[s]=r+1,e;s+=2}}return e},k=function(e,t){var r,i,n=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(u.codePointRange);for(;n<a;){if(r=e[n],i=e[n+1],t>=r&&t<i)return e;if(t==r-1)return e[n]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==i)return t+1==e[n+2]?(e.splice(n,4,r,e[n+3]),e):(e[n+1]=t+1,e);s=n,n+=2}return e.push(t,t+1),e},C=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?k(s,r):O(s,r,i),n+=2;return s},D=function(e,t){for(var r,i,n=0,s=e.slice(),a=t.length;n<a;)r=t[n],i=t[n+1]-1,s=r==i?P(s,r):w(s,r,i),n+=2;return s},O=function(e,t,r){if(r<t)throw Error(u.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(u.codePointRange);for(var i,n,s=0,a=!1,o=e.length;s<o;){if(i=e[s],n=e[s+1],a){if(i==r+1)return e.splice(s-1,2),e;if(i>r)return e;i>=t&&i<=r&&(n>t&&n-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(i==r+1)return e[s]=t,e;if(i>r)return e.splice(s,0,t,r+1),e;if(t>=i&&t<n&&r+1<=n)return e;t>=i&&t<n||n==t?(e[s+1]=r+1,a=!0):t<=i&&r+1>=n&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},N=function(e,t){var r=0,i=e.length,n=e[r],s=e[i-1];if(i>=2&&(t<n||t>s))return!1;for(;r<i;){if(n=e[r],s=e[r+1],t>=n&&t<s)return!0;r+=2}return!1},I=function(e,t){for(var r,i=0,n=t.length,s=[];i<n;)r=t[i],N(e,r)&&s.push(r),++i;return T(s)},F=function(e){return!e.length},B=function(e){return 2==e.length&&e[0]+1==e[1]},R=function(e){for(var t,r,i=0,n=[],s=e.length;i<s;){for(t=e[i],r=e[i+1];t<r;)n.push(t),++t;i+=2}return n},L=Math.floor,M=function(e){return parseInt(L((e-65536)/1024)+l,10)},j=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+V(e):e>=32&&e<=126?V(e):e<=255?"\\x"+A(S(e),2):"\\u"+A(S(e),4)},Y=function(e){return e<=65535?U(e):"\\u{"+e.toString(16).toUpperCase()+"}"},K=function(e){var t,r=e.length,i=e.charCodeAt(0);return i>=l&&i<=p&&r>1?(t=e.charCodeAt(1),1024*(i-l)+t-c+65536):i},W=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return U(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?U(t):t+1==r?U(t)+U(r):U(t)+"-"+U(r),n+=2;return"["+i+"]"},G=function(e){var t,r,i="",n=0,s=e.length;if(B(e))return Y(e[0]);for(;n<s;)t=e[n],r=e[n+1]-1,i+=t==r?Y(t):t+1==r?Y(t)+Y(r):Y(t)+"-"+Y(r),n+=2;return"["+i+"]"},q=function(e){for(var t,r,i=[],n=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<l?(r<l&&s.push(t,r+1),r>=l&&r<=p&&(s.push(t,l),i.push(l,r+1)),r>=c&&r<=f&&(s.push(t,l),i.push(l,p+1),n.push(c,r+1)),r>f&&(s.push(t,l),i.push(l,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=l&&t<=p?(r>=l&&r<=p&&i.push(t,r+1),r>=c&&r<=f&&(i.push(t,p+1),n.push(c,r+1)),r>f&&(i.push(t,p+1),n.push(c,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>=c&&t<=f?(r>=c&&r<=f&&n.push(t,r+1),r>f&&(n.push(t,f+1),r<=65535?s.push(f+1,r+1):(s.push(f+1,65536),a.push(65536,r+1)))):t>f&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:i,loneLowSurrogates:n,bmp:s,astral:a}},H=function(e){for(var t,r,i,n,s,a,o=[],u=[],l=!1,p=-1,c=e.length;++p<c;)if(t=e[p],r=e[p+1]){for(i=t[0],n=t[1],s=r[0],a=r[1],u=n;s&&i[0]==s[0]&&i[1]==s[1];)u=B(a)?k(u,a[0]):O(u,a[0],a[1]-1),++p,t=e[p],i=t[0],n=t[1],r=e[p+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([i,l?u:n]),l=!1}else o.push(t);return X(o)},X=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var i=e[t],n=i[1],s=n[0],a=n[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],p=u[1];s==l&&a==p&&(B(o[0])?i[0]=k(i[0],o[0][0]):i[0]=O(i[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},J=function(e){if(!e.length)return[];for(var t,r,i,n,s,a,o=0,u=0,l=0,p=[],h=e.length;o<h;){t=e[o],r=e[o+1]-1,i=M(t),n=j(t),s=M(r),a=j(r);var d=n==c,y=a==f,v=!1;i==s||d&&y?(p.push([[i,s+1],[n,a+1]]),v=!0):p.push([[i,i+1],[n,f+1]]),!v&&i+1<s&&(y?(p.push([[i+1,s+1],[c,a+1]]),v=!0):p.push([[i+1,s],[c,f+1]])),v||p.push([[s,s+1],[c,a+1]]),u=i,l=s,o+=2}return H(p)},$=function(e){var t=[];return m(e,function(e){var r=e[0],i=e[1];t.push(W(r)+W(i))}),t.join("|")},z=fuLine truncated
|
||||
t.Noop=a,t.Directive=o;var u=r(1054);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function n(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=i,t.ClassProperty=n,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function a(e){this.word("do"),this.space(),this.print(e.body,e)}function o(e){this.token("("),this.print(e.expression,e),this.token(")")}function u(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function l(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function p(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||k.isCallExpression(t,{callee:e})||k.isMemberExpression(t)||k.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function f(){this.word("this")}function h(){this.word("super")}function d(e){this.token("@"),this.print(e.expression,e),this.newline()}function y(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function v(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=y,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function m(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function g(){this.semicolon(!0)}function b(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!D.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function S(e){if(this.print(e.object,e),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;k.isLiteral(e.property)&&(0,P.default)(e.property.value)&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function _(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=s,t.DoExpression=a,t.ParenthesizedExpression=o,t.UpdateExpression=u,t.ConditionalExpression=l,t.NewExpression=p,t.SequenceExpression=c,t.ThisExpression=f,t.Super=h,t.Decorator=d,t.CallExpression=v,t.EmptyStatement=g,t.ExpressionStatement=b,t.AssignmentPattern=x,t.AssignmentExpression=E,t.BindExpression=A,t.MemberExpression=S,t.MetaProperty=_;var T=r(253),P=n(T),w=r(51),k=i(w),C=r(1626),D=i(C);t.YieldExpression=m("yield"),t.AwaitExpression=m("await");t.BinaryExpression=E,t.LogicalExpression=E},function(e,t,r){"use strict";function i(){this.word("any")}function n(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("bool")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("Line truncated
|
||||
if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,m.default)(a,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&n.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,i.addNewlines&&(s+=i.addNewlines(e,t)||0);var p=w.needsWhitespaceAfter;e&&(p=w.needsWhitespaceBefore),p(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var i=e.loc&&e.loc.start.column;if(i){var n=new RegExp("\\n\\s{1,"+i+"}","g");r=r.replace(n,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,l.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;this._printComment(s)}},e}();t.default=B;for(var R=[r(2552),r(2546),r(2551),r(2545),r(2549),r(2550),r(1054),r(2547),r(2544),r(2548)],L=0;L<R.length;L++){var M=R[L];(0,o.default)(B.prototype,M)}e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(39),s=i(n),a=r(11),o=i(a),u=r(2),l=i(u),p=r(2490),c=i(p),f=function(){function e(t,r){var i=this;(0,l.default)(this,e),this._opts=t,this._map=new c.default.SourceMapGenerator({file:t.sourceMapTarget,sourceRoot:t.sourceRoot}),"string"==typeof r?this._map.setSourceContent(t.sourceFileName,r):"object"===("undefined"==typeof r?"undefined":(0,o.default)(r))&&(0,s.default)(r).forEach(function(e){i._map.setSourceContent(e,r[e])})}return e.prototype.get=function(){return this._map.toJSON()},e.prototype.mark=function(e,t,r,i,n,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===i||(this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=i,this._map.addMapping({name:n,generated:{line:e,column:t},source:null==r?null:s||this._opts.sourceFileName,original:null==r?null:{line:r,column:i}}))},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(2),s=i(n),a=function(){function e(t){(0,s.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.start-e.start},0,i.length);if(n>=0){for(;n&&e.start===i[n-1].start;)--n;t=i[n-1],r=i[n]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,i=this.tokens,n=this._findToken(function(t){return t.end-e.end},0,i.length);if(n>=0){for(;n&&e.end===i[n-1].end;)--n;t=i[n],r=i[n+1],","===r.type.label&&(r=i[n+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,i=t.loc.start.line,n=0,s=r;s<i;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,n++);return n},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var i=t+r>>>1,n=e(this.tokens[i]);return n<0?this._findToken(e,i+1,r):n>0?this._findToken(e,t,i):0===n?i:-1},e}();t.default=a,e.exports=t.default},[6461,366,17,1,51],[6462,51,1055,261],[6463,261],[6464,261],[6465,261],[6467,261,2559,2560,2562,2564,2565,2561],[6468,261],[6469,261],[6470,51],[6472,51],[6474,1,1627,51,1055],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=s.node,u=a.expression;if(l.isMemberExpression(u)){var p=s.scope.maybeGenerateMemoised(u.object),c=void 0,f=[];p?(c=p,f.push(l.assignmentExpression("=",p,u.object))):c=u.object,f.push(l.callExpression(l.memberExpression(l.memberExpression(c,u.property,u.computLine truncated
|
||||
t.addComments=n},[6587,19,376],[6588,18],[6589,379,19],[6590,19,377,18],[6592,19,2695,18],[6593,19,18],[6594,2694,18],[6595,379,19,1075,18],[6596,46,19,18],function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("body"===e.key&&t.isArrowFunctionExpression())return e.replaceWith(e.scope.buildUndefinedNode()),!0},function(e,t){var r=!1;if(r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0}]},[6598,379,19,702,2697,377,18],[6599,19,2698],[6600,19,2704,376,377,2717,18],[6603,46,1657,18],[6604,379,1084,19,1656,1074,18,2756],[6605,2716,2715,2705],[6606,2707,2706,2710,2708,2712],2491,function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},[6607,2709],1615,[6608,2711],1615,function(e,t,r){(function(t){"use strict";var r=t.argv,i=r.indexOf("--"),n=function(e){e="--"+e;var t=r.indexOf(e);return t!==-1&&(i===-1||t<i)};e.exports=function(){return"FORCE_COLOR"in t.env||!(n("no-color")||n("no-colors")||n("color=false"))&&(!!(n("color")||n("colors")||n("color=true")||n("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(10))},function(e,t){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function i(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){return i(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:i,isIterationStatement:r,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:s}}()},[6609,1658],[6610,2713,1658,2714],function(e,t){e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},[6475,108,2725,2724,2722,2720,2723,2721,2719,109,1659,703,2726,2727],2531,[6544,108],[6545,378,19,109,108,579],[6479,704,108],[6546,19,109,108,579],[6547,46,268,108,704],[6548,19,378,109,108,466],[6549,109,108,466],[6550,109,108],[6551,2728,109,703,108,579,466],2541,[6554,46,268,704,703,109],[6611,2731],[6612,2732],function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms"Line truncated
|
||||
function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){function r(e,t){return e.add(t),e}e.exports=r},1902,1602,2458,[6741,1230,800],[6742,3725,3731,1228,3733,3744,3751,3752,3755,3757,3766,3767,3768,399,3796,1891,497,800],[6743,497],[6744,3732,399],[6746,1234,1891,3772,497,1892],function(e,t){function r(e){return i(Object(e))}var i=Object.keys;e.exports=r},1951,function(e,t){function r(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}e.exports=r},[6747,1886,799],[6748,399,3790],function(e,t){function r(e){return e&&e.Object===Object?e:null}e.exports=r},function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},[6750,1229],[6751,3728,1887,3783],function(e,t){function r(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;e.exports=r},[6752,3729,1887,3784],[6753,1886],[6754,1229],2467,[6756,1230,1890],[6757,205],[6758,3769,3798],[6759,3736,1890,800],[6760,3739],[6764,3721,1884,3723,3724,3727,1892],function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},[6765,3742,1893,399,1231,3770,1235,1894,3791],[6766,797],function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},[6767,797],[6768,797],[6769,797],[6770,3740,1893,399,1235,1894],function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,n=i.hasOwnProperty;e.exports=r},[6771,1229,3745,3746,3747,3748,3749,3750],[6772,3735,1889,1232],[6773,1233,798,1231,497],[6774,399,799],function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},[6775,3753],function(e,t){function r(){this.__data__=[]}e.exports=r},[6776,795],[6777,795],[6778,795],[6779,795],[6780,3722,794,1884],[6781,796],[6782,796],[6783,796],[6784,796],1960,830,[6787,794],function(e,t){function r(e){return this.__data__.delete(e)}e.exports=r},function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},[6788,794,1885],[6789,3797,3804],[6790,799],[6791,1228,1230,3754,798,1232,800],[6792,3734],[6793,1888,3759],[6796,798,1236],[6797,205,3800],[6800,1885],[6500,3730,3802],function(e,t){function r(){return[]}e.exports=r},function(e,t){function r(){return!1}e.exports=r},[6501,3803],[6502,3801],[6503,1234,497,799],[6801,3741],[6583,6,13,400,9],[6586,6,9,400],2688,[6587,6,611],[6588,9],[6589,88,6],[6590,6,400,9],[6592,6,3814,9],[6593,6,9],[6594,3813,9],[6804,1242],[6596,13,6,9],2698,[6598,88,6,801,3816,400,9],[6599,6,3817],[6600,6,3823,611,400,3836,9],[6603,13,1897,9],[6806,1896,1238,3929],[6605,3835,3834,3824],[6606,3826,3825,3829,3827,3831],2491,2707,[6607,3828],1615,[6608,3830],1615,2712,2713,[6609,1898],[6610,3832,1898,3833],2716,[6475,133,3844,3843,3841,3839,3842,3840,3838,134,1899,802,3845,3846],2531,[6544,133],[6545,136,6,134,133,612],[6479,803,133],[6546,6,134,133,612],[6547,13,80,133,803],[6548,6,136,134,133,498],[6549,134,133,498],[6727,134,133],[6551,3847,134,802,133,612,498],2541,[6554,13,80,803,802,134],[6611,3850],[6612,3851],2732,[6613,6281],456,[6728,499,135],[6729,3898,3899,3900,3901,3902],[6732,3915,3916,3917,3918,3919],[6733,499,135],[6807,135],[6734,499,135],[6735,804,3922,3923,3924,3925,3926],[6737,135],[6738,499,135],3728,3729,1602,1603,2458,[6808,810],[6741,806,614],[6742,3860,3865,1239,3869,3884,3891,3892,3894,3896,3904,3905,3906,811,3933,1908,500,614],[6743,500],[6744,3867,811],[6745,1905],[6494,3903],[6746,1243,1908,3908,500,1910],3738,[6809,3858,3909],1951,function(e,t){function r(e,t){var r="";if(!e||t<1||t>i)return r;do t%2&&(r+=e),t=n(t/2),t&&(e+=e);while(t);return r}var i=9007199254740991,n=Math.floor;e.exports=r},3740,[6747,1901,1913],[6810,3866],3743,3744,[6750,1240],[6751,3863,1903,3920],3747,[6752,3864,1903,3921],[6753,1901],[6754,1240],2467,[6756,806,1906],[6757,135],[6759,3872,1906,614],[6760,3878],[6764,3854,1900,3857,3859,3862,1910],3758,[6766,809],3761,[6767,809],[6768,809],[6769,809],2581,3766,[6771,1240,3885,3886,3887,3888,3889,3890],[6772,3871,1905,808],3771,[6775,3893],function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},3773,[6776,805],[6777,805],[6778,805],[6779,805],[6780,3855,804,1900],[6781,807],[6782,807],[6783,807],[6784,807],1960,830,[6787,804],3786,3787,3788,[6788,804,3856],[6791,1239,806,1904,613,808,614],[6811,806,1904,3934],[6812,3870],[6813,1902,3868,3928,1914],[6794,3932],[6796,613,1244],[6797,135,3937],[6815,3877,1907,1241,808],[6816,3879,1909,1245,3940],3799,3800,[6501,3939],[6503,1243,500,1913],[6801,3881],[6817,3882,614],[6668,3949],[6670,3951],[6674,3955],[6676,3956],[6677,3958],[6506,1266,1932,3981],[6683,57],[6684,3983],[6685,3984,57],[6686,3985,57],[6687,1265,57],[6688,3986,57],[6689,3987,57],[6690,3988,57],[6691,1265,57],[6692,1265,1931,3990,3991,57],[6693,1932,1266,1264],[6694,193Line truncated
|
||||
var X=(0,o.default)(q.node.value);"string"!==X&&"number"!==X||(W=q.node.value,G=W[H.node.name])}}if(G){var J=i.get("arguments").map(r);if(!n)return;return G.apply(W,J)}}t(i)}}var n=!0,s=void 0,a=new c.default,u=r(this);return n||(u=void 0),{confident:n,deopt:s,value:u}}t.__esModule=!0;var a=r(11),o=i(a),u=r(1),l=i(u),p=r(448),c=i(p);t.evaluateTruthy=n,t.evaluate=s;var f=["String","Number","Math"],h=["random"]}).call(t,function(){return this}())},[6867,417],[6869,4650],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=h.unionTypeAnnotation(i);var n=[],s=a(r,e,n),o=l(e,t);if(o&&!function(){var e=a(r,o.ifStatement);s=s.filter(function(t){return e.indexOf(t)<0}),i.push(o.typeAnnotation)}(),s.length){s=s.concat(n);for(var u=s,p=Array.isArray(u),f=0,u=p?u:(0,c.default)(u);;){var d;if(p){if(f>=u.length)break;d=u[f++]}else{if(f=u.next(),f.done)break;d=f.value}var y=d;i.push(y.getTypeAnnotation())}}if(i.length)return h.createUnionTypeAnnotation(i)}function a(e,t,r){var i=e.constantViolations.slice();return i.unshift(e.path),i.filter(function(e){e=e.resolve();var i=e._guessExecutionStatusRelativeTo(t);return r&&"function"===i&&r.push(e),"before"===i})}function o(e,t){var r=t.node.operator,i=t.get("right").resolve(),n=t.get("left").resolve(),s=void 0;if(n.isIdentifier({name:e})?s=i:i.isIdentifier({name:e})&&(s=n),s)return"==="===r?s.getTypeAnnotation():h.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?h.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(n.isUnaryExpression({operator:"typeof"})?(a=n,o=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,o=n),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:e}))return h.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function u(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var r=u(e);if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var p=o(t,a);p&&s.push(p)}}while(n.length);return s.length?{typeAnnotation:h.createUnionTypeAnnotation(s),ifStatement:r}:l(r,t)}}t.__esModule=!0;var p=r(1),c=n(p);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:s(this,e.name):"undefined"===e.name?h.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?h.numberTypeAnnotation():void("arguments"===e.name)}};var f=r(3),h=i(f);e.exports=t.default},[6870,4649],function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(C.isIdentifier(a)){if(!r(a.name))return!1}else if(C.isLiteral(a)){if(!r(a.value))return!1}else{if(C.isMemberExpression(a)){if(a.computed&&!C.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!C.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function a(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(){return this.scope.isStatic(this.node)}function u(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function p(e){return C.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function f(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?C.isBlockStatement(e):!!this.isBlockStatement()&&C.isExpression(e))}function h(e){var t=this,r=!0;do{var i=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return!this.parentPath.isLabeledStatement()&&!C.isBlockStatement(this.container)&&(0,w.default)(C.STATEMENT_OR_BLOCK_KEYS,this.key)}function y(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var i=r.path,n=i.parentPath;return!!n.isImportDeclaration()&&(n.node.source.value===e&&(!t||(!(!i.isImportDefaultSpecifier()||"default"!==t)||(!(!i.isImportNamespaceSpecifier()||"*"!==t)||!(!i.isImportSpecifier()||i.node.imported.name!==t)))))}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function
Line truncated
|
||||
"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",i(e,t)),e.replaceWith(n.noop())}function i(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var n=e.types;return{inherits:r(698),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",i(e.get("typeAnnotation"))),e.replaceWith(n.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},Function:{exit:function(e){var t=e.node;t.params.forEach(function(e){return e.optional=!1})}},"ExportNamedDeclaration|Flow":function(e){var r=e.node,i=e.parent;n.isExportNamedDeclaration(r)&&!n.isFlow(r.declaration)||t(e,i)},ImportDeclaration:function(e){var r=e.node,i=e.parent;n.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,i)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},[6505,5505],[6506,5533,5532,5530],2607,2608,[6508,1490,5526,5525],[6509,2264,545],[6510,5506],[6513,544,1484,5510,660],[6515,544],[6516,959,2267,2265],[6517,2264],[6518,5518,2269,2270,660,545],2445,1090,[6520,958,5519,2266,1488,2265,5512],[6522,1487,958,5522,959],[6523,960,5527,1488],[6524,960,1490,5508,1488],[6525,5521,2266],[6526,660],[6530,1489,1485],[6531,1489],[6533,1489],[6534,1485],[6535,1486],[6537,5509,545,961,1484],[6538,958,5529,1484],[6539,5507,5516,961,1490,2268],[6540,5524,2268],[6541,5531,544,660,961,545],function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5536),s=i(n);t.default=function(e){function t(e){return n.isLiteral(n.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return n.isMemberExpression(t)&&n.isLiteral(n.toComputedKey(t,t.property),{value:"__proto__"})}function i(e,t,r){return n.expressionStatement(n.callExpression(r.addHelper("defaults"),[t,e.right]))}var n=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(n.expressionStatement(n.assignmentExpression("=",o,a))),s.push(i(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;n.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(i(s,s.left.object,t))},ObjectExpression:function(e,r){for(var i=void 0,a=e.node,u=a.properties,l=Array.isArray(u),p=0,u=l?u:(0,s.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;t(f)&&(i=f.value,(0,o.default)(a.properties,f))}if(i){var h=[n.objectExpression([]),i];a.properties.length&&h.push(a),e.replaceWith(n.callExpression(r.addHelper("extends"),h))}}}}};var a=r(5577),o=i(a);e.exports=t.default},[6505,5537],[6506,5565,5564,5562],2607,2608,[6508,1497,5558,5557],[6509,2273,547],[6510,5538],[6513,546,1491,5542,661],[6515,546],[6516,963,2276,2274],[6517,2273],[6518,5550,2278,2279,661,547],2445,1090,[6520,962,5551,2275,1495,2274,5544],[6522,1494,962,5554,963],[6523,964,5559,1495],[6524,964,1497,5540,1495],[6525,5553,2275],[6526,661],[6530,1496,1492],[6531,1496],[6533,1496],[6534,1492],[6535,1493],[6537,5541,547,965,1491],[6538,962,5561,1491],[6539,5539,5548,965,1497,2277],[6540,5556,2277],[6541,5563,546,661,965,547],1902,1603,[6494,5573],2577,[6495,5567,5568,5569,5571,5572],2579,2467,2581,[6496,2282],373,[6497,5575],[6498,5578,5579],[6499,5570],[6500,5566,5581],[6501,5582],[6502,5580],[6503,5574,2282,5576],function(e,t){"use strict";t.__esModule=!0,t.default=function(){var e={enter:function(e,t){var r=function(){t.isImmutable=!1,e.stop()};return e.isJSXClosingElement()?void e.skip():e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node})?r():void(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable()||r())}};return{visitor:{JSXElement:function(t){if(!t.node._hoisted){var r={isImmutable:!0};t.traverse(e,r),r.isImmutable?t.hoist():t.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(5585),s=i(n);t.default=function(e){function t(e){for(var t=0;t<e.lengtLine truncated
|
||||
}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function m(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var i=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(i)return i;e=t.path}var n=e.getAncestry();if(n.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=n.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var p=n[o-1],c=s[u-1];if(!p||!c)return"before";if(p.listKey&&p.container===c.container)return p.key>c.key?"before":"after";var f=C.VISITOR_KEYS[p.type].indexOf(p.key),h=C.VISITOR_KEYS[c.type].indexOf(c.key);return f>h?"before":"after"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var i=r.referencePaths,n=i,s=Array.isArray(n),a=0,n=s?n:(0,T.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,p=i,c=Array.isArray(p),f=0,p=c?p:(0,T.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h,y=!!d.find(function(e){return e.node===t.node});if(!y){var v=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==v)return}else l=v}}return l}}function x(e,t){return this._resolve(e,t)||this}function E(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var i=this.scope.getBinding(this.node.name);if(!i)return;if(!i.constant)return;if("module"===i.kind)return;if(i.path!==this){var n=function(){var n=i.path.resolve(e,t);return r.find(function(e){return e.node===n.node})?{v:void 0}:{v:n}}();if("object"===("undefined"==typeof n?"undefined":(0,S.default)(n)))return n.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!C.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,p=Array.isArray(l),c=0,l=p?l:(0,T.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;if(h.isProperty()){var d=h.get("key"),y=h.isnt("computed")&&d.isIdentifier({name:a});if(y=y||d.isLiteral({value:a}))return h.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var v=o.get("elements"),m=v[a];if(m)return m.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var A=r(11),S=n(A),_=r(1),T=n(_);t.matchesPattern=s,t.has=a,t.isStatic=o,t.isnt=u,t.equals=l,t.isNodeType=p,t.canHaveVariableDeclarationOrExpression=c,t.canSwapBetweenExpressionAndStatement=f,t.isCompletionRecord=h,t.isStatementOrBlock=d,t.referencesImport=y,t.getSource=v,t.willIMaybeExecuteBefore=m,t._guessExecutionStatusRelativeTo=g,t._guessExecutionStatusRelativeToDifferentFunctions=b,t.resolve=x,t._resolve=E;var P=r(1566),w=n(P),k=r(3),C=i(k);t.is=a},function(e,t,r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=n(s),o=r(1),u=n(o),l=r(3),p=i(l),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!l.react.isCompatTag(e.node.name)){var r=e.scope.getBinding(e.node.name);if(r&&r===t.scope.getBinding(e.node.name))if(r.constant)t.bindings[e.node.name]=r;else for(var i=r.constantViolations,n=Array.isArray(i),s=0,i=n?i:(0,u.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;t.breakOnScopePaths=t.breakOnScopePaths.concat(o.getAncestry())}}}},f=function(){function e(t,r){(0,a.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();if(e)return e.path.getStatementParent()},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kinLine truncated
|
||||
case a.types._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case a.types.name:return this.parseIdentifier(!0);case a.types.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case a.types.braceL:return this.parseObj(!0);default:this.unexpected()}},p.parseBindingList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(a.types.comma),t&&this.match(a.types.comma))i.push(null);else{if(r&&this.eat(e))break;if(this.match(a.types.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var s=[];this.match(a.types.at);)s.push(this.parseDecorator());var o=this.parseMaybeDefault();s.length&&(o.decorators=s),this.parseAssignableListItemTypes(o),i.push(this.parseMaybeDefault(o.start,o.loc.start,o))}return i},p.parseAssignableListItemTypes=function(e){return e},p.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(a.types.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},p.checkLVal=function(e,t,r){switch(e.type){case"Identifier":if(this.state.strict&&(l.reservedWords.strictBind(e.name)||l.reservedWords.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":var n=!0,a=!1,o=void 0;try{for(var u,p=(0,s.default)(e.properties);!(n=(u=p.next()).done);n=!0){var c=u.value;"ObjectProperty"===c.type&&(c=c.value),this.checkLVal(c,t,r)}}catch(e){a=!0,o=e}finally{try{!n&&p.return&&p.return()}finally{if(a)throw o}}break;case"ArrayPattern":var f=!0,h=!1,d=void 0;try{for(var y,v=(0,s.default)(e.elements);!(f=(y=v.next()).done);f=!0){var m=y.value;m&&this.checkLVal(m,t,r)}}catch(e){h=!0,d=e}finally{try{!f&&v.return&&v.return()}finally{if(h)throw d}}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestProperty":case"RestElement":this.checkLVal(e.argument,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},[6481,2,47,179,1018],function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var n=r(1),s=i(n),a=r(16),o=i(a),u=r(180),l=r(179),p=i(l),c=r(564),f=p.default.prototype;f.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,u.types.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var h={kind:"loop"},d={kind:"switch"};f.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start),n=this.input.slice(t.start,t.end),s=r.value=n.slice(1,-1);return this.addExtra(r,"raw",n),this.addExtra(r,"rawValue",s),i.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(i,"Directive",e.end,e.loc.end)},f.parseStatement=function(e,t){this.match(u.types.at)&&this.parseDecorators(!0);var r=this.state.type,i=this.startNode();switch(r){case u.types._break:case u.types._continue:return this.parseBreakContinueStatement(i,r.keyword);case u.types._debugger:return this.parseDebuggerStatement(i);case u.types._do:return this.parseDoStatement(i);case u.types._for:return this.parseForStatement(i);case u.types._function:return e||this.unexpected(),this.parseFunctionStatement(i);case u.types._class:return e||this.unexpected(),this.takeDecorators(i),this.parseClass(i,!0);case u.types._if:return this.parseIfStatement(i);case u.types._return:return this.parseReturnStatement(i);case u.types._switch:return this.parseSwitchStatement(i);case u.types._throw:return this.parseThrowStatement(i);case u.types._try:return this.parseTryStatement(i);case u.types._let:case u.types._const:e||this.unexpected();case u.types._var:return this.parseVarStatement(i,r);case u.types._while:return this.parseWhileStatement(i);case u.types._with:return this.parseWithStatement(i);case u.types.braceL:return this.parseBlock();case u.types.semi:return this.parseEmptyStatement(i);case u.types._export:case u.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===u.types._import?this.parseImport(i):this.parseExport(i);case u.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(u.types._function)&&!this.canInsertSemicolon())return this.expect(u.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===u.types.name&&"Line truncated
|
||||
return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},u.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},u.flowParseTypeAlias=function(e){return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(n.types.eq,!0),this.semicolon(),this.finishNode(e,"TypeAlias")},u.flowParseTypeParameter=function(){var e=this.startNode(),t=void 0;this.match(n.types.plusMin)&&("+"===this.state.value?t="plus":"-"===this.state.value&&(t="minus"),this.eat(n.types.plusMin));var r=this.flowParseTypeAnnotatableIdentifier(!1,!1);return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(n.types.eq)&&(this.eat(n.types.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},u.flowParseTypeParameterDeclaration=function(){var e=this.startNode();e.params=[],this.isRelational("<")||this.match(n.types.jsxTagStart)?this.next():this.unexpected();do e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(n.types.comma);while(!this.isRelational(">"));return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},u.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(n.types.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},u.flowParseObjectPropertyKey=function(){return this.match(n.types.num)||this.match(n.types.string)?this.parseExprAtom():this.parseIdentifier(!0)},u.flowParseObjectTypeIndexer=function(e,t){return e.static=t,this.expect(n.types.bracketL),e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser(),this.expect(n.types.bracketR),e.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},u.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(n.types.parenL);this.match(n.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(n.types.parenR)||this.expect(n.types.comma);return this.eat(n.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(n.types.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},u.flowParseObjectTypeMethod=function(e,t,r,i){var n=this.startNodeAt(e,t);return n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),n.static=r,n.key=i,n.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(n,"ObjectTypeProperty")},u.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},u.flowParseObjectType=function(e){var t=this.startNode(),r=void 0,i=void 0,s=void 0;for(t.callProperties=[],t.properties=[],t.indexers=[],this.expect(n.types.braceL);!this.match(n.types.braceR);){var a=!1,o=this.state.start,u=this.state.startLoc;r=this.startNode(),e&&this.isContextual("static")&&(this.next(),s=!0),this.match(n.types.bracketL)?t.indexers.push(this.flowParseObjectTypeIndexer(r,s)):this.match(n.types.parenL)||this.isRelational("<")?t.callProperties.push(this.flowParseObjectTypeCallProperty(r,e)):(i=s&&this.match(n.types.colon)?this.parseIdentifier():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(n.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,s,i)):(this.eat(n.types.question)&&(a=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=a,r.static=s,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(n.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},u.flowObjectTypeSemicolon=function(){this.eat(n.types.semi)||this.eat(n.types.comma)||this.match(n.types.braceR)||this.unexpected()},u.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(n.types.dot);){var s=this.startNodeAt(e,t);s.qualification=i.id,s.id=this.parseIdentifier(),i.id=this.finishNode(s,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},u.flowParseTypeofType=function(){var e=this.startNode();return this.expect(n.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},u.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(n.types.bracketL);this.state.pos<this.input.leLine truncated
|
||||
t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t){e.exports={_args:[[{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},"C:\\src\\babel-standalone"]],_from:"babel-core@6.14.0",_id:"babel-core@6.14.0",_inCache:!0,_installable:!0,_location:"/babel-core",_nodeVersion:"5.11.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/babel-core-6.14.0.tgz_1472082048405_0.022966341115534306"},_npmUser:{email:"hi@henryzoo.com",name:"hzoo"},_npmVersion:"3.10.6",_phantomChildren:{"babel-code-frame":"6.11.0","babel-messages":"6.8.0","babel-runtime":"6.9.2",debug:"2.2.0",esutils:"2.0.2",globals:"8.18.0",invariant:"2.2.1",lodash:"4.14.1","to-fast-properties":"1.0.2"},_requested:{name:"babel-core",raw:"babel-core@6.14.0",rawSpec:"6.14.0",scope:null,spec:"6.14.0",type:"version"},_requiredBy:["#DEV:/","/babel-plugin-transform-regenerator","/babel-register"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz",_shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",_shrinkwrap:null,_spec:"babel-core@6.14.0",_where:"C:\\src\\babel-standalone",author:{email:"sebmck@gmail.com",name:"Sebastian McKenzie"},dependencies:{"babel-code-frame":"^6.8.0","babel-generator":"^6.14.0","babel-helpers":"^6.8.0","babel-messages":"^6.8.0","babel-register":"^6.14.0","babel-runtime":"^6.9.1","babel-template":"^6.14.0","babel-traverse":"^6.14.0","babel-types":"^6.14.0",babylon:"^6.9.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.4.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-exists":"^1.0.0","path-is-absolute":"^1.0.0",private:"^0.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.9.0","babel-helper-transform-fixture-test-runner":"^6.13.2","babel-polyfill":"^6.13.0"},directories:{},dist:{shasum:"c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.14.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],license:"MIT",maintainers:[{email:"amjad.masad@gmail.com",name:"amasad"},{email:"hi@henryzoo.com",name:"hzoo"},{email:"npm-public@jessemccarthy.net",name:"jmm"},{email:"loganfsmyth@gmail.com",name:"loganfsmyth"},{email:"sebmck@gmail.com",name:"sebmck"},{email:"me@thejameskyle.com",name:"thejameskyle"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.14.0"}},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,AnimationEvent:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBuLine truncated
|
||||
if(e!==t){if(!u(t)&&!p(t))var d=c(t);s(d||t,function(s,u){if(d&&(u=s,s=t[u]),l(s))h||(h=new n),o(e,t,u,r,i,f,h);else{var p=f?f(e[u],s,u+"",e,t,h):void 0;void 0===p&&(p=s),a(e,u,p)}})}}var n=r(1028),s=r(1602),a=r(2460),o=r(6326),u=r(76),l=r(103),p=r(1614),c=r(1043);e.exports=i},function(e,t,r){function i(e,t,r,i,y,v,m){var g=e[r],b=t[r],x=m.get(b);if(x)return void n(e,r,x);var E=v?v(g,b,r+"",e,t,m):void 0,A=void 0===E;A&&(E=b,u(b)||h(b)?u(g)?E=g:l(g)?E=a(g):(A=!1,E=s(b,!0)):f(b)||o(b)?o(g)?E=d(g):!c(g)||i&&p(g)?(A=!1,E=s(b,!0)):E=g:A=!1),A&&(m.set(b,E),y(E,b,i,v,m),m.delete(b)),n(e,r,E)}var n=r(2460),s=r(1032),a=r(2467),o=r(1041),u=r(76),l=r(2481),p=r(682),c=r(103),f=r(254),h=r(1614),d=r(6414);e.exports=i},function(e,t,r){function i(e,t,r){var i=-1;t=n(t.length?t:[p],u(s));var c=a(e,function(e,r,s){var a=n(t,function(t){return t(e)});return{criteria:a,index:++i,value:e}});return o(c,function(e,t){return l(e,t,r)})}var n=r(1603),s=r(566),a=r(2464),o=r(6331),u=r(1609),l=r(6346),p=r(2480);e.exports=i},[6845,2462],3879,function(e,t){function r(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(n);++i<n;)s[i]=e[i+t];return s}e.exports=r},function(e,t){function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},3740,[6846,2455,6302,6303,6335,6351,1039],[6810,1603],4086,function(e,t,r){function i(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}var n=r(6330);e.exports=i},function(e,t,r){function i(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}var n=r(1606);e.exports=i},3744,[6750,1610],[6751,6300,2459,2476],3747,[6752,6301,2459,1039],[6753,1029],[6754,1610],function(e,t,r){function i(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e===e,a=n(e),o=void 0!==t,u=null===t,l=t===t,p=n(t);if(!u&&!p&&!a&&e>t||a&&o&&l&&!u&&!p||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!p&&e<t||p&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var n=r(683);e.exports=i},function(e,t,r){function i(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l){if(i>=u)return l;var p=r[i];return l*("desc"==p?-1:1)}}return e.index-t.index}var n=r(6345);e.exports=i},[6756,567,2471],[6757,186],[6847,252],4099,function(e,t,r){var i=r(2454),n=r(6406),s=r(1039),a=1/0,o=i&&1/s(new i([,-0]))[1]==a?function(e){return new i(e)}:n;e.exports=o},function(e,t,r){function i(e,t,r,i,n,S,T){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!i(new s(e),new s(t)));case f:case h:case v:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var P=u;case g:var w=S&c;if(P||(P=l),e.size!=t.size&&!w)return!1;var k=T.get(e);if(k)return k==t;S|=p,T.set(e,t);var C=o(P(e),P(t),i,n,S,T);return T.delete(e),C;case x:if(_)return _.call(e)==_.call(t)}return!1}var n=r(1029),s=r(2456),a=r(570),o=r(2469),u=r(2476),l=r(1039),p=1,c=2,f="[object Boolean]",h="[object Date]",d="[object Error]",y="[object Map]",v="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",S=n?n.prototype:void 0,_=S?S.valueOf:void 0;e.exports=i},function(e,t,r){function i(e,t,r,i,o,u){var l=o&a,p=s(e),c=p.length,f=s(t),h=f.length;if(c!=h&&!l)return!1;for(var d=c;d--;){var y=p[d];if(!(l?y in t:n(t,y)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var g=l;++d<c;){y=p[d];var b=e[y],x=t[y];if(i)var E=l?i(x,b,y,t,e,u):i(b,x,y,e,t,u);if(!(void 0===E?b===x||r(b,x,i,o,u):E)){m=!1;break}g||(g="constructor"==y)}if(m&&!g){var A=e.constructor,S=t.constructor;A!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof S&&S instanceof S)&&(m=!1)}return u.delete(e),u.delete(t),m}var n=r(1605),s=r(256),a=2;e.exports=i},[6759,6312,2471,256],[6760,2465],[6852,2475,256],3758,[6766,1038],3761,[6767,1038],[6768,1038],[6769,1038],3766,[6771,1610,6339,6340,6341,6342,6343,6344],[6772,6308,1611,681],function(e,t,r){function i(e){return a(e)||s(e)||!!(o&&e&&e[o])}var n=r(1029),s=r(1041),a=r(76),o=n?n.isConcatSpreadable:void 0;e.exports=i},3771,[6775,6348],3909,3773,[6776,1031],[6777,1031],[6778,1031],[6779,1031],[6780,6296,1027,1600],[6781,1034],[6782,1034],[6783,1034],[6784,1034],4130,4131,[6787,1027],3786,3787,3788,function(e,t,r){function i(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!s||i.length<o-1)return i.push([e,t]),this;r=this.__data__=new a(i)}return r.set(e,t),this}var n=r(1027),s=r(1600),a=r(1601),o=200;e.exports=i},function(e,t){function r(e){return e.match(x)}var i="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",o="["+i+"]",u="["+n+s+"]",l="\\ud83c[\\udffb-\\udfff]",p="(?:"+u+"|"+l+")",c="[^"+i+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",y=p+"?",v="["+a+"]?Line truncated
|
||||
r(e,u,p));r(e,u+1,p);var c=u+1;n(e,t,s,c-1),n(e,t,c+1,a)}}t.quickSort=function(e,t){n(e,t,0,e.length-1)}},function(e,t,r){function i(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new n(t)}function n(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sources"),n=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),p=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(n.map(String),!0),this._sources=l.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=p}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=n.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),n=o.getArg(t,"column");if(r<s.line||r===s.line&&n<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:n+1},consumer:new i(o.getArg(e,"map"))}})}var o=r(686),u=r(6428),l=r(2487).ArraySet,p=r(2488),c=r(6430).quickSort;i.fromSourceMap=function(e){return n.fromSourceMap(e)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},i.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(e,t,r){var n,s=t||null,a=r||i.GENERATED_ORDER;switch(a){case i.GENERATED_ORDER:n=this._generatedMappings;break;case i.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;n.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},i.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var i=[],n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(n>=0){var s=this._originalMappings[n];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)i.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++n]}return i},t.SourceMapConsumer=i,n.prototype=Object.create(i.prototype),n.prototype.consumer=i,n.fromSourceMap=function(e){var t=Object.create(n.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),i=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],f=0,h=a.length;f<h;f++){var d=a[f],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=i.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=r.indexOf(d.name)),p.push(y)),u.push(y)}return c(t.__originalMappings,o.compareByOriginalPositions),t},n.prototype._version=3,Object.defineProperty(n.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){rLine truncated
|
||||
return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function p(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function c(e){return x.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function f(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function h(e,t){var r=this,i=this.node,n=i[e];return Array.isArray(n)?n.map(function(s,a){return x.default.get({listKey:e,parentPath:r,parent:i,container:n,key:a}).setContext(t)}):x.default.get({parentPath:this,parent:i,container:i,key:e}).setContext(t)}function d(e,t){for(var r=this,i=e,n=Array.isArray(i),s=0,i=n?i:(0,g.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function y(e){return A.getBindingIdentifiers(this.node,e)}function v(e){return A.getOuterBindingIdentifiers(this.node,e)}t.__esModule=!0;var m=r(i),g=o(m);t.getStatementParent=u,t.getOpposite=l,t.getCompletionRecords=p,t.getSibling=c,t.get=f,t._getKey=h,t._getPattern=d,t.getBindingIdentifiers=y,t.getOuterBindingIdentifiers=v;var b=r(n),x=o(b),E=r(s),A=a(E)},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h,d,y,v,m,g,b,x){"use strict";function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var S=r(i),_=A(S),T=r(n),P=A(T),w=r(s),k=E(w),C=r(371),D=A(C),O=r(456),N=A(O),I=r(a),F=A(I),B=r(78),R=A(B),L=r(o),M=A(L),j=r(u),V=E(j),U=r(l),Y=(0,D.default)("babel"),K=function(){function e(t,r){(0,P.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,i=t.parentPath,n=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&i&&(r=i.hub),(0,N.default)(n,"To get a node path the parent needs to exist");var u=s[o],l=U.path.get(n)||[];U.path.has(n)||U.path.set(n,l);for(var p=void 0,c=0;c<l.length;c++){var f=l[c];if(f.node===u){p=f;break}}return p||(p=new e(r,n),l.push(p)),p.setup(i,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new M.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,F.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){V.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){Y.enabled&&Y(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=K,(0,R.default)(K.prototype,r(p)),(0,R.default)(K.prototype,r(c)),(0,R.default)(K.prototype,r(f)),(0,R.default)(K.prototype,r(h)),(0,R.default)(K.prototype,r(d)),(0,R.default)(K.prototype,r(y)),(0,R.default)(K.prototype,r(v)),(0,R.default)(K.prototype,r(m)),(0,R.default)(K.prototype,r(g)),(0,R.default)(K.prototype,r(b)),(0,R.default)(K.prototype,r(x));for(var W=function(){if(q){if(H>=G.length)return"break";X=G[H++]}else{if(H=G.next(),H.done)return"break";X=H.value}var e=X,t="is"+e;K.prototype[t]=function(e){return V[t](this.node,e)},K.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},G=V.TYPES,q=Array.isArray(G),H=0,G=q?G:(0,_.default)(G);;){var X,J=W();if("break"===J)break}var $=function(e){if("_"===e[0])return"continue";V.TYPES.indexOf(e)<0&&V.TYPES.push(e);var t=k[e];K.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var z in k){$(z)}e.exports=t.default},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}fLine truncated
|
||||
this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.indexOf(e)===-1&&this.constantViolations.push(e)},e.prototype.reference=function(e){this.referencePaths.indexOf(e)===-1&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=o,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){for(var i=U.scope.get(e.node)||[],n=i,s=Array.isArray(n),a=0,n=s?n:(0,A.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}i.push(r),U.scope.has(e.node)||U.scope.set(e.node,i)}t.__esModule=!0;var y=r(i),v=h(y),m=r(n),g=h(m),b=r(s),x=h(b),E=r(a),A=h(E),S=r(50),_=h(S),T=r(459),P=h(T),w=r(o),k=h(w),C=r(u),D=h(C),O=r(457),N=h(O),I=r(20),F=f(I),B=r(l),R=h(B),L=r(455),M=h(L),j=r(p),V=f(j),U=r(c),Y=0,K={For:function(e){for(var t=V.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,A.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,i=t.declaration;if(V.isClassDeclaration(i)||V.isFunctionDeclaration(i)){var n=i.id;if(!n)return;var s=r.getBinding(n.name);s&&s.reference(e)}else if(V.isVariableDeclaration(i))for(var a=i.declarations,o=Array.isArray(a),u=0,a=o?a:(0,A.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l,c=V.getBindingIdentifiers(p);for(var f in c){var h=r.getBinding(f);h&&h.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,A.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},W=0,G=function(){function e(t,r){if((0,x.default)(this,e),r&&r.block===t.node)return r;var i=d(t,r,this);return i?i:(this.uid=W++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,void(this.path=t))}return e.prototype.traverse=function(e,t,r){(0,D.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return V.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=V.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;V.isAssignmentExpression(e)?r=e.left:V.isVariableDeclarator(e)?r=e.id:(V.isObjectProperty(r)||V.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(V.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,A.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.doneLine truncated
|
||||
fields:{id:{validate:(0,c.assertNodeType)("Identifier")},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","FunctionLine truncated
|
||||
W.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;delete e[s]}return e}function D(e,t){return O(e,t),N(e,t),I(e,t),e}function O(e,t){F("trailingComments",e,t)}function N(e,t){F("leadingComments",e,t)}function I(e,t){F("innerComments",e,t)}function F(e,t,r){t&&r&&(t[e]=(0,le.default)((0,ie.default)([].concat(t[e],r[e]))))}function B(e,t){if(!e||!t)return e;for(var r=he.INHERIT_KEYS.optional,i=Array.isArray(r),n=0,r=i?r:(0,W.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=he.INHERIT_KEYS.force,l=Array.isArray(u),p=0,u=l?u:(0,W.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=t[f]}return he.inheritsComments(e,t),e}function R(e){if(!L(e))throw new TypeError("Not a valid node "+(e&&e.type))}function L(e){return!(!e||!pe.VISITOR_KEYS[e.type])}function M(e,t,r){if(e){var i=he.VISITOR_KEYS[e.type];if(i){r=r||{},t(e,r);for(var n=i,s=Array.isArray(n),a=0,n=s?n:(0,W.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;M(d,t,r)}else M(l,t,r)}}}}function j(e,t){t=t||{};for(var r=t.preserveComments?me:ge,i=r,n=Array.isArray(i),s=0,i=n?i:(0,W.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,Y.default)(e),p=l,c=Array.isArray(p),f=0,p=c?p:(0,W.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;e[d]=null}}function V(e,t){return M(e,j,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var U=r(i),Y=v(U),K=r(n),W=v(K),G=r(s),q=v(G),H=r(a),X=v(H),J=r(o);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:functionLine truncated
|
||||
e.key=this.parseMaybeAssign(),this.expect(h.types.bracketR),e.key):(e.computed=!1,e.key=this.match(h.types.num)||this.match(h.types.string)?this.parseExprAtom():this.parseIdentifier(!0))},m.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},m.parseMethod=function(e,t,r){var i=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(h.types.parenL),e.params=this.parseBindingList(h.types.parenR),e.generator=t,this.parseFunctionBody(e),this.state.inMethod=i,e},m.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},m.parseFunctionBody=function(e,t){var r=t&&!this.match(h.types.braceL),i=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var n=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=n,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=i;var o=this.state.strict,u=!1,l=!1;if(t&&(o=!0),!r&&e.body.directives.length){var c=!0,d=!1,y=void 0;try{for(var v,m=(0,f.default)(e.body.directives);!(c=(v=m.next()).done);c=!0){var g=v.value;if("use strict"===g.value.value){l=!0,o=!0,u=!0;break}}}catch(e){d=!0,y=e}finally{try{!c&&m.return&&m.return()}finally{if(d)throw y}}}if(l&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),o){var b=(0,p.default)(null),x=this.state.strict;u&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0);var E=!0,A=!1,S=void 0;try{for(var _,T=(0,f.default)(e.params);!(E=(_=T.next()).done);E=!0){var P=_.value;this.checkLVal(P,!0,b)}}catch(e){A=!0,S=e}finally{try{!E&&T.return&&T.return()}finally{if(A)throw S}}this.state.strict=x}},m.parseExprList=function(e,t,r){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(h.types.comma),this.eat(e))break;i.push(this.parseExprListItem(t,r))}return i},m.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(h.types.comma)?null:this.match(h.types.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem)},m.parseIdentifier=function(e){var t=this.startNode();return this.match(h.types.name)?(!e&&this.state.strict&&v.reservedWords.strict(this.state.value)&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},m.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(h.types.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},m.parseYield=function(){var e=this.startNode();return this.next(),this.match(h.types.semi)||this.canInsertSemicolon()||!this.match(h.types.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.types.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}},function(e,t,r,i,n,s,a,o,u,l,p,c){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=void 0;var h=r(i),d=f(h),y=r(n),v=f(y),m=r(s),g=f(m),b=r(a),x=f(b),E=r(o),A=f(E),S=r(u),_=f(S),T=r(l),P=r(p),w=r(c),k=f(w),C=(t.plugins={},function(e){function r(e,t){(0,g.default)(this,r),e=(0,P.getOptions)(e);var i=(0,A.default)(this,(0,v.default)(r).call(this,e,t));return i.options=e,i.inModule="module"===i.options.sourceType,i.isReservedWord=T.reservedWords[6],i.input=t,i.plugins=i.loadPlugins(i.options.plugins),i.filename=e.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return(0,_.default)(r,e),(0,x.default)(r,[{key:"hasPlugin",value:function(e){return!(!this.plugins["*"]&&!this.plugins[e])}},{key:"extend",value:function(e,t){this[e]=t(this[e])}},{key:"loadPlugins",value:function(e){var r={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow"));var i=!0,n=!1,s=void 0;try{for(var a,o=(0,d.default)(e);!(i=(a=o.next()).done);i=!0){var u=a.value;if(!r[u]){r[u]=!0;var l=t.plugins[u];l&&l(this)}}}catch(e){n=!0,s=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw s}}return r}},{key:"parse",value:function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)}}]),r}(k.default));t.default=C},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var a=r(i),o=r(n),u=s(o),l=u.default.prototype;l.raise=function(e,t){var r=(0,a.getLineInfo)(this.input,e);t+=" ("+r.line+"Line truncated
|
||||
var a=this.state.clone();try{return e.call(this,t,r,i,n)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,i,n)}}),e.extend("parseParenItem",function(e){return function(t,r,i){if(t=e.call(this,t,r,i),this.eat(o.types.question)&&(t.optional=!0),this.match(o.types.colon)){var n=this.startNodeAt(r,i);return n.expression=t,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(o.types.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(o.types.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r):e.call(this,t,r)}}),e.extend("toAssignableList",function(e){return function(t,r){for(var i=0;i<t.length;i++){var n=t[i];n&&"TypeCastExpression"===n.type&&(t[i]=this.typeCastToParameter(n))}return e.call(this,t,r)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var i=this.startNode(),n=e.call(this,t,r);return this.match(o.types.colon)?(i._exprListItem=!0,i.expression=n,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")):n}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return this.match(o.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,i){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(t,r,i),e.body.push(this.finishNode(t,"ClassMethod"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var i=t.implements=[];do{var n=this.startNode();n.id=this.parseIdentifier(),this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,i.push(this.finishNode(n,"ClassImplements"))}while(this.eat(o.types.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(o.types.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(o.types.question)&&(e.optional=!0),this.match(o.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(o.types._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var i=this.lookahead();(i.type===o.types.name&&"from"!==i.value||i.type===o.types.braceL||i.type===o.types.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(o.types.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){return this.match(o.types.colon)&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(o.types.colon)||e.call(this)}}),e.extend("parLine truncated
|
||||
}},{key:"nextToken",value:function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(g.types.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())}},{key:"readToken",value:function(e){return(0,m.isIdentifierStart)(e)||92===e?this.readWord():this.getTokenFromCode(e)}},{key:"fullCharCodeAtPos",value:function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888}},{key:"pushComment",value:function(e,t,r,i,n,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:i,loc:new x.SourceLocation(n,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))}},{key:"skipBlockComment",value:function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);r===-1&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,E.lineBreakG.lastIndex=t;for(var i=void 0;(i=E.lineBreakG.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())}},{key:"skipLineComment",value:function(e){for(var t=this.state.pos,r=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())}},{key:"skipSpace",value:function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&E.nonASCIIwhitespace.test(String.fromCharCode(e))))break e;++this.state.pos}}}},{key:"finishToken",value:function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(g.types.ellipsis)):(++this.state.pos,this.finishToken(g.types.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.slash,1)}},{key:"readToken_mult_modulo",value:function(e){var t=42===e?g.types.star:g.types.modulo,r=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(r++,i=this.input.charCodeAt(this.state.pos+2),t=g.types.exponent),61===i&&(r++,t=g.types.assign),this.finishOp(t,r)}},{key:"readToken_pipe_amp",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?g.types.logicalOR:g.types.logicalAND,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(124===e?g.types.bitwiseOR:g.types.bitwiseAND,1)}},{key:"readToken_caret",value:function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(g.types.assign,2):this.finishOp(g.types.bitwiseXOR,1)}},{key:"readToken_plus_min",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&E.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.types.incDec,2):61===t?this.finishOp(g.types.assign,2):this.finishOp(g.types.plusMin,1)}},{key:"readToken_lt_gt",value:function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(g.types.assign,r+1):this.finishOp(g.types.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(g.types.relational,r))}},{key:"readToken_eq_excl",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(g.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(g.types.arrow)):this.finishOp(Line truncated
|
||||
}}},function(e,t,r,i){var n=r(i),s=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?s(e+t,0):a(e,t)}},function(e,t,r,i,n){var s=r(i),a=r(n);e.exports=function(e){return s(a(e))}},function(e,t,r,i){var n=r(i),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},function(e,t,r,i){var n=r(i);e.exports=function(e){return Object(n(e))}},function(e,t,r,i){var n=r(i);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r,i,n,s){var a=r(i)("wks"),o=r(n),u=r(s).Symbol,l="function"==typeof u,p=e.exports=function(e){return a[e]||(a[e]=l&&u[e]||(l?u:o)("Symbol."+e))};p.store=a},function(e,t,r,i,n,s,a){var o=r(i),u=r(n)("iterator"),l=r(s);e.exports=r(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||l[o(e)]}},function(e,t,r,i,n,s){var a=r(i),o=r(n);e.exports=r(s).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},function(e,t,r,i,n,s,a,o){"use strict";var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=r(o)(Array,"Array",function(e,t){this._t=c(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,r):"values"==t?l(0,e[r]):l(0,[r,e[r]])},"values"),p.Arguments=p.Array,u("keys"),u("values"),u("entries")},function(e,t,r,i,n){"use strict";var s=r(i)(!0);r(n)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=s(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r,i,n,s,a,o){r(i);for(var u=r(n),l=r(s),p=r(a),c=r(o)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d=f[h],y=u[d],v=y&&y.prototype;v&&!v[c]&&l(v,c,d),p[d]=p.Array}},function(e,t,r,i,n,s){"use strict";function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=e.node,i=r.body;r.async=!1;var n=y.functionExpression(null,[],y.blockStatement(i.body),!0);n.shadow=!0,i.body=[y.returnStatement(y.callExpression(y.callExpression(t,[n]),[]))]}function l(e,t){var r=e.node,i=e.isFunctionDeclaration(),n=r.id,s=v;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!i&&n&&(s=m),r.async=!1,r.generator=!0,r.id=null,i&&(r.type="FunctionExpression");var a=y.callExpression(t,[r]),o=s({NAME:n,FUNCTION:a,PARAMS:r.params.map(function(){return e.scope.generateUidIdentifier("x")})}).expression;if(i){var u=y.variableDeclaration("let",[y.variableDeclarator(y.identifier(n.name),y.callExpression(o,[]))]);u._blockHoist=!0,e.replaceWith(u)}else{var l=o.body.body[1].argument;n||(0,c.default)({node:l,parent:e.parent,scope:e.scope}),!l||l.id||r.params.length?e.replaceWith(y.callExpression(o,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t){var r=e.node;if(!r.generator)return e.traverse(g),e.isClassMethod()||e.isObjectMethod()?u(e,t):l(e,t)};var p=r(i),c=o(p),f=r(n),h=o(f),d=r(s),y=a(d),v=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n return function NAME(PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n"),m=(0,h.default)("\n (() => {\n var ref = FUNCTION;\n function NAME(PARAMS) {\n return ref.apply(this, arguments);\n }\n return NAME;\n })\n"),g={ArrowFunctionExpression:function(e){e.node.async||e.arrowFunctionToShadowed()},AwaitExpression:function(e){var t=e.node;t.type="YieldExpression"}};e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w]Line truncated
|
||||
case h.types._return:return this.parseReturnStatement(i);case h.types._switch:return this.parseSwitchStatement(i);case h.types._throw:return this.parseThrowStatement(i);case h.types._try:return this.parseTryStatement(i);case h.types._let:case h.types._const:e||this.unexpected();case h.types._var:return this.parseVarStatement(i,r);case h.types._while:return this.parseWhileStatement(i);case h.types._with:return this.parseWithStatement(i);case h.types.braceL:return this.parseBlock();case h.types.semi:return this.parseEmptyStatement(i);case h.types._export:case h.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===h.types._import?this.parseImport(i):this.parseExport(i);case h.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var n=this.state.clone();if(this.next(),this.match(h.types._function)&&!this.canInsertSemicolon())return this.expect(h.types._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var s=this.state.value,a=this.parseExpression();return r===h.types.name&&"Identifier"===a.type&&this.eat(h.types.colon)?this.parseLabeledStatement(i,s,a):this.parseExpressionStatement(i,a)},m.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},m.parseDecorators=function(e){for(;this.match(h.types.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(h.types._export)||this.match(h.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},m.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},m.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(h.types.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var n=this.state.labels[i];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(r||"loop"===n.kind))break;if(e.label&&r)break}}return i===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},m.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},m.parseDoStatement=function(e){return this.next(),this.state.labels.push(g),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(h.types._while),e.test=this.parseParenExpression(),this.eat(h.types.semi),this.finishNode(e,"DoWhileStatement")},m.parseForStatement=function(e){this.next(),this.state.labels.push(g);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(h.types.parenL),this.match(h.types.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(h.types._var)||this.match(h.types._let)||this.match(h.types._const)){var r=this.startNode(),i=this.state.type;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!this.match(h.types._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var n={start:0},s=this.parseExpression(!0,n);return this.match(h.types._in)||this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.parseForIn(e,s,t)):(n.start&&this.unexpected(n.start),t&&this.unexpected(),this.parseFor(e,s))},m.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},m.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(h.types._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},m.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},m.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.types.braceL),this.state.labels.push(b);for(var t,r=void 0;!this.match(h.types.braceR);)if(this.match(h.types._case)||this.match(h.types._default)){var i=this.match(h.types._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),i?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(h.types.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop()Line truncated
|
||||
this.isRelational("<")||this.match(a.types.parenL)?t.properties.push(this.flowParseObjectTypeMethod(o,u,n,i)):(this.eat(a.types.question)&&(s=!0),r.key=i,r.value=this.flowParseTypeInitialiser(),r.optional=s,r.static=n,this.flowObjectTypeSemicolon(),t.properties.push(this.finishNode(r,"ObjectTypeProperty"))))}return this.expect(a.types.braceR),this.finishNode(t,"ObjectTypeAnnotation")},l.flowObjectTypeSemicolon=function(){this.eat(a.types.semi)||this.eat(a.types.comma)||this.match(a.types.braceR)||this.unexpected()},l.flowParseGenericType=function(e,t,r){var i=this.startNodeAt(e,t);for(i.typeParameters=null,i.id=r;this.eat(a.types.dot);){var n=this.startNodeAt(e,t);n.qualification=i.id,n.id=this.parseIdentifier(),i.id=this.finishNode(n,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},l.flowParseTypeofType=function(){var e=this.startNode();return this.expect(a.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},l.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(a.types.bracketL);this.state.pos<this.input.length&&!this.match(a.types.bracketR)&&(e.types.push(this.flowParseType()),!this.match(a.types.bracketR));)this.expect(a.types.comma);return this.expect(a.types.bracketR),this.finishNode(e,"TupleTypeAnnotation")},l.flowParseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdentifier(),this.eat(a.types.question)&&(e=!0),t.optional=e,t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeParam")},l.flowParseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.match(a.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(a.types.parenR)||this.expect(a.types.comma);return this.eat(a.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},l.flowIdentToTypeAnnotation=function(e,t,r,i){switch(i.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,i)}},l.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),i=void 0,n=void 0,s=!1;switch(this.state.type){case a.types.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case a.types.braceL:return this.flowParseObjectType();case a.types.bracketL:return this.flowParseTupleType();case a.types.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(a.types.parenL),i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");case a.types.parenL:if(this.next(),!this.match(a.types.parenR)&&!this.match(a.types.ellipsis))if(this.match(a.types.name)){var o=this.lookahead().type;s=o!==a.types.question&&o!==a.types.colon}else s=!0;return s?(n=this.flowParseType(),this.expect(a.types.parenR),this.eat(a.types.arrow)&&this.raise(r,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(i=this.flowParseFunctionTypeParams(),r.params=i.params,r.rest=i.rest,this.expect(a.types.parenR),this.expect(a.types.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation"));case a.types.string:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"StringLiteralTypeAnnotation");case a.types._true:case a.types._false:return r.value=this.match(a.types._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case a.types.num:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case a.types._null:return r.value=this.match(a.types._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case a.types._this:return r.value=this.match(a.types._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},l.flowParsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flowParsePrimaryType();return this.matLine truncated
|
||||
this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[d.types.b_stat],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this}},{key:"curPosition",value:function(){return new h.Position(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(t){var r=new e;for(var i in this){var n=this[i];t&&"context"!==i||!Array.isArray(n)||(n=n.slice()),r[i]=n}return r}}]),e}();t.default=v},function(e,t,r,i){function n(e,t,r){for(var i=-1,n=s(t),a=n.length;++i<a;){var o=n[i],u=e[o],l=r(u,t[o],o,e,t);(l===l?l===u:u!==u)&&(void 0!==u||o in e)||(e[o]=l)}return e}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null==t?e:a(t,o(t),e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s,a,o,u,l,p,c){function f(e,t,r,i,n,s,a){var o;if(r&&(o=n?r(e,i,n):r(e)),void 0!==o)return o;if(!E(e))return e;var u=x(e);if(u){if(o=m(e),!t)return h(e,o)}else{var l=H.call(e),p=l==w;if(l!=D&&l!=A&&(!p||n))return G[l]?g(e,l,t):n?e:{};if(o=b(p?{}:e),!t)return y(o,e)}s||(s=[]),a||(a=[]);for(var c=s.length;c--;)if(s[c]==e)return a[c];return s.push(e),a.push(o),(u?d:v)(e,function(i,n){o[n]=f(i,t,r,n,e,s,a)}),o}var h=r(i),d=r(n),y=r(s),v=r(a),m=r(o),g=r(u),b=r(l),x=r(p),E=r(c),A="[object Arguments]",S="[object Array]",_="[object Boolean]",T="[object Date]",P="[object Error]",w="[object Function]",k="[object Map]",C="[object Number]",D="[object Object]",O="[object RegExp]",N="[object Set]",I="[object String]",F="[object WeakMap]",B="[object ArrayBuffer]",R="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",K="[object Uint16Array]",W="[object Uint32Array]",G={};G[A]=G[S]=G[B]=G[_]=G[T]=G[R]=G[L]=G[M]=G[j]=G[V]=G[C]=G[D]=G[O]=G[I]=G[U]=G[Y]=G[K]=G[W]=!0,G[P]=G[w]=G[k]=G[N]=G[F]=!1;var q=Object.prototype,H=q.toString;e.exports=f},function(e,t,r,i){var n=r(i),s=n();e.exports=s},function(e,t,r,i,n){function s(e,t){return a(e,t,o)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e,t,r){if(null!=e){void 0!==r&&r in s(e)&&(t=[r]);for(var i=0,n=t.length;null!=e&&i<n;)e=e[t[i++]];return i&&i==n?e:void 0}}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){if("function"!=typeof e)return s;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,i,n){return e.call(t,r,i,n)};case 4:return function(r,i,n,s){return e.call(t,r,i,n,s)};case 5:return function(r,i,n,s,a){return e.call(t,r,i,n,s,a)}}return function(){return e.apply(t,arguments)}}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(e){return l(function(t,r){var i=-1,n=null==t?0:r.length,s=n>2?r[n-2]:void 0,a=n>2?r[2]:void 0,l=n>1?r[n-1]:void 0;for("function"==typeof s?(s=o(s,l,5),n-=2):(s="function"==typeof l?l:void 0,n-=s?1:0),a&&u(r[0],r[1],a)&&(s=n<3?void 0:s,n=1);++i<n;){var p=r[i];p&&e(t,p,s)}return t})}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return function(t,r,i){for(var n=s(t),a=i(t),o=a.length,u=e?o:-1;e?u--:++u<o;){var l=a[u];if(r(n[l],l,n)===!1)break}return t}}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n("length");e.exports=s},function(e,t,r,i){function n(e,t){var r=null==e?void 0:e[t];return s(r)?r:void 0}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t,r){var i=e.constructor;switch(t){case c:return s(e);case a:case o:return new i((+e));case f:case h:case d:case y:case v:case m:case g:case b:case x:var n=e.buffer;return new i(r?s(n):n,e.byteOffset,e.length);case u:case p:return new i(e);case l:var A=new i(e.source,E.exec(e));A.lastIndex=e.lastIndex}return A}var s=r(i),a="[object Boolean]",o="[object Date]",u="[object Number]",l="[object RegExp]",p="[object String]",c="[object ArrayBuffer]",f="[object Float32Array]",h="[object Float64Array]",d="[object Int8Array]",y="[object Int16Array]",v="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",E=/\w*$/;e.exports=n},function(e,t,r,i,n){function s(e){return null!=e&&o(a(e))}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n,s){function a(e,t,r){if(!l(r))return!1;var i=typeof t;if("number"==i?o(r)&&u(t,r.length):"string"==i&&t in r){var n=r[t];return e===e?e===n:n!==n}return!1}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e,t){var r=typeof e;if("string"==r&&l.test(e)||"number"==r)return!0;if(a(e))return!1;var i=!u.test(e);return i||null!=t&&e in o(t)}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i,n,s,a,o){function u(e){for(var t=h(e),r=t.length,i=r&&e.length,n=!!i&&f(i)&&(p(e)||l(e)),s=-1,a=[];++s<r;){var o=t[s];(n&&c(o,i)||y.call(e,o))&&a.push(o)}return a}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Object.prototype,y=d.hasOwnProperty;e.exports=u},function(e,t,r,i){function n(e){return s(e)?e:Object(e)}Line truncated
|
||||
if(r){var i=r.get("test"),n=[i],s=[];do{var a=n.shift().resolve();if(a.isLogicalExpression()&&(n.push(a.get("left")),n.push(a.get("right"))),a.isBinaryExpression()){var o=l(t,a);o&&s.push(o)}}while(n.length);return s.length?{typeAnnotation:y.createUnionTypeAnnotation(s),ifStatement:r}:c(r,t)}}t.__esModule=!0;var f=r(i),h=a(f);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:o(this,e.name):"undefined"===e.name?y.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?y.numberTypeAnnotation():void("arguments"===e.name)}};var d=r(n),y=s(d);e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function u(e){return e.typeAnnotation}function l(e){if(this.get("callee").isIdentifier())return N.genericTypeAnnotation(e.callee)}function p(){return N.stringTypeAnnotation()}function c(e){var t=e.operator;return"void"===t?N.voidTypeAnnotation():N.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?N.numberTypeAnnotation():N.STRING_UNARY_OPERATORS.indexOf(t)>=0?N.stringTypeAnnotation():N.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?N.booleanTypeAnnotation():void 0}function f(e){var t=e.operator;if(N.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return N.numberTypeAnnotation();if(N.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return N.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),i=this.get("left");return i.isBaseType("number")&&r.isBaseType("number")?N.numberTypeAnnotation():i.isBaseType("string")||r.isBaseType("string")?N.stringTypeAnnotation():N.unionTypeAnnotation([N.stringTypeAnnotation(),N.numberTypeAnnotation()])}}function h(){return N.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function d(){return N.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function y(){return this.get("expressions").pop().getTypeAnnotation()}function v(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;if("++"===t||"--"===t)return N.numberTypeAnnotation()}function g(){return N.stringTypeAnnotation()}function b(){return N.numberTypeAnnotation()}function x(){return N.booleanTypeAnnotation()}function E(){return N.nullLiteralTypeAnnotation()}function A(){return N.genericTypeAnnotation(N.identifier("RegExp"))}function S(){return N.genericTypeAnnotation(N.identifier("Object"))}function _(){return N.genericTypeAnnotation(N.identifier("Array"))}function T(){return _()}function P(){return N.genericTypeAnnotation(N.identifier("Function"))}function w(){return C(this.get("callee"))}function k(){return C(this.get("tag"))}function C(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?N.genericTypeAnnotation(N.identifier("AsyncIterator")):N.genericTypeAnnotation(N.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.Class=t.Function=t.Identifier=void 0;var D=r(i);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return a(D).default}}),t.VariableDeclarator=o,t.TypeCastExpression=u,t.NewExpression=l,t.TemplateLiteral=p,t.UnaryExpression=c,t.BinaryExpression=f,t.LogicalExpression=h,t.ConditionalExpression=d,t.SequenceExpression=y,t.AssignmentExpression=v,t.UpdateExpression=m,t.StringLiteral=g,t.NumericLiteral=b,t.BooleanLiteral=x,t.NullLiteral=E,t.RegExpLiteral=A,t.ObjectExpression=S,t.ArrayExpression=_,t.RestElement=T,t.CallExpression=w,t.TaggedTemplateExpression=k;var O=r(n),N=s(O);u.validParent=!0,T.validParent=!0,t.Function=P,t.Class=P},function(e,t,r,i,n,s,a){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){function r(e){var t=i[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var i=e.split("."),n=[this.node],s=0;n.length;){var a=n.shift();if(t&&s===i.length)return!0;if(I.isIdentifier(a)){if(!r(a.name))return!1}else if(I.isLiteral(a)){if(!r(a.value))return!1}else{if(I.isMemberExpression(a)){if(a.computed&&!I.isLiteral(a.property))return!1;n.unshift(a.property),n.unshift(a.object);continue}if(!I.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>i.length)return!1}return s===i.length}function p(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function c(){return this.scope.isStatic(this.node)}function f(e){return!this.has(e)}function h(e,t){return this.node[e]===t}function d(e){return I.isType(this.type,e)}function y(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function v(e){return!("body"!==thiLine truncated
|
||||
this.registerBinding(e,u)}else{var l=this.getProgramParent(),p=t.getBindingIdentifiers(!0);for(var c in p)for(var f=p[c],h=Array.isArray(f),d=0,f=h?f:(0,w.default)(f);;){var y;if(h){if(d>=f.length)break;y=f[d++]}else{if(d=f.next(),d.done)break;y=d.value}var v=y,m=this.getOwnBinding(c);if(m){if(m.identifier===v)continue;this.checkBlockScopedCollisions(m,e,c,v)}m&&m.path.isFlow()&&(m=null),l.references[c]=!0,this.bindings[c]=new U.default({identifier:v,existing:m,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(G.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(G.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(G.isClassBody(e)){for(var i=e.body,n=Array.isArray(i),s=0,i=n?i:(0,w.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(G.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(G.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if(!this.isPure(f,t))return!1}return!0}if(G.isObjectExpression(e)){for(var h=e.properties,d=Array.isArray(h),y=0,h=d?h:(0,w.default)(h);;){var v;if(d){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var m=v;if(!this.isPure(m,t))return!1}return!0}return G.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):G.isClassProperty(e)||G.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):G.isUnaryExpression(e)?this.isPure(e.argument,t):G.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){H++,this._crawl(),H--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,S.default)(null),this.bindings=(0,S.default)(null),this.globals=(0,S.default)(null),this.uids=(0,S.default)(null),this.data=(0,S.default)(null),e.isLoop())for(var t=G.FOR_INIT_KEYS,r=Array.isArray(t),i=0,t=r?t:(0,w.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[G.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,w.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("param",f)}e.isCatchClause()&&this.registerBinding("let",e);var h=this.getProgramParent();if(!h.crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(X,d),this.crawling=!1;for(var y=d.assignments,v=Array.isArray(y),m=0,y=v?y:(0,w.default)(y);;){var g;if(v){if(m>=y.length)break;g=y[m++]}else{if(m=y.next(),m.done)break;g=m.value}var b=g,x=b.getBindingIdentifiers(),E=void 0;for(var A in x)b.scope.getBinding(A)||(E=E||b.scope.getProgramParent(),E.addGlobal(x[A]));b.scope.registerConstantViolation(b)}for(var _=d.references,T=Array.isArray(_),P=0,_=T?_:(0,w.default)(_);;){var k;if(T){if(P>=_.length)break;k=_[P++]}else{if(P=_.next(),P.done)break;k=P.value}var C=k,D=C.scope.getBinding(C.node.name);D?D.reference(C):C.scope.getProgramParent().addGlobal(C.node)}for(var O=d.constantViolations,N=Array.isArray(O),I=0,O=N?O:(0,w.default)(O);;){var F;if(N){if(I>=O.length)break;F=O[I++]}else{if(I=O.next(),I.done)break;F=I.value}var B=F;B.scope.registerConstantViolation(B)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(G.ensureBlock(t.node),t=t.get("body"));var r=e.unique,i=e.kind||"var",n=null==e._blockHoist?2:e._blockHoist,s="declaration:"+i+":"+n,a=!r&&t.getData(s);if(!a){var o=G.variableDeclaration(i,[]);o._generated=!0,o._blockHoist=n;var u=t.unshiftContainer("body",[o]);a=u[0],r||t.setData(s,a)}var l=G.variableDeclarator(e.id,e.init);a.node.declarations.push(l),this.registerBinding(i,a.get("declarations").pop())},e.Line truncated
|
||||
},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,f.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("LVal")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}}}),(0,f.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!l.isValidIdentifier(r)}}}}),(0,f.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),(0,f.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,f.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:(0,c.assertValueType)("string"),default:""}}}),(0,f.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:c.assertOneOf.apply(void 0,p.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),(0,f.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(e,t,r){var i=e.computed?"Expression":"Identifier";(0,c.assertNodeType)(i)(e,t,r)}},computed:{default:!1}}}),(0,f.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,c.assertNodeType)("Expression")},arguments:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","SpreadElement")))}}}),(0,f.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Directive"))),default:[]},body:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,f.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,f.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];c.assertNodeType.apply(void 0,i)(e,t,r)}},decorators:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Decorator")))},body:{validate:(0,c.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,c.assertValueType)("boolean")},async:{default:!1,validate:(0,c.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,f.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,c.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var i=e.computed?Line truncated
|
||||
}function Y(e){return!(!e||!pe.VISITOR_KEYS[e.type])}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var K=r(i),W=E(K),G=r(n),q=E(G),H=r(s),X=E(H),J=r(a);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return J.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return J.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return J.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return J.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return J.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return J.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return J.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return J.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return J.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return J.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return J.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return J.NOT_LOCAL_BINDING}}),t.is=S,t.isType=_,t.validate=T,t.shallowEqual=P,t.appendToMemberExpression=w,t.prependToMemberExpression=k,t.ensureBlock=C,t.clone=D,t.cloneWithoutLoc=O,t.cloneDeep=N,t.buildMatchMemberExpression=I,t.removeComments=F,t.inheritsComments=B,t.inheritTrailingComments=R,t.inheritLeadingComments=L,t.inheritInnerComments=M,t.inherits=V,t.assertNode=U,t.isNode=Y;var $=r(o);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return $.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return $.getOuterBindingIdentifiers}});var z=r(u);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return z.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return z.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return z.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return z.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return z.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return z.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return z.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return z.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return z.isImmutable}});var Q=r(l);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return Q.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return Q.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return Q.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return Q.toIdentifier}}),Object.defineProperty(t,"Line truncated
|
||||
R(R.S+R.F*!ge,"Symbol",{for:function(e){return F(de,e+="")?de[e]:de[e]=oe(e)},keyFor:function(e){if(Se(e))return q(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){xe=!0},useSimple:function(){xe=!1}}),R(R.S+R.F*!ge,"Object",{create:Pe,defineProperty:_e,defineProperties:Te,getOwnPropertyDescriptor:ke,getOwnPropertyNames:Ce,getOwnPropertySymbols:De}),ue&&R(R.S+R.F*(!ge||j(function(){var e=oe();return"[null]"!=le([e])||"{}"!=le({a:e})||"{}"!=le(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Se(e)){for(var t,r,i=[e],n=1;arguments.length>n;)i.push(arguments[n++]);return t=i[1],"function"==typeof t&&(r=t),!r&&X(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!Se(t))return t}),i[1]=t,le.apply(ue,i)}}}),oe[pe][fe]||r(N)(oe[pe],fe,oe[pe].valueOf),U(oe,"Symbol"),U(Math,"Math",!0),U(I.JSON,"JSON",!0)},function(e,t,r,i,n,s,a,o,u,l,p){"use strict";var c,f=r(i)(0),h=r(n),d=r(s),y=r(a),v=r(o),m=r(u),g=(r(l),d.getWeak),b=Object.isExtensible,x=v.ufstore,E={},A=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},S={get:function(e){if(m(e)){var t=g(e);return t===!0?x(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return v.def(this,e,t)}},_=e.exports=r(p)("WeakMap",A,S,v,!0,!0);7!=(new _).set((Object.freeze||Object)(E),7).get(E)&&(c=v.getConstructor(A),y(c.prototype,S),d.NEED=!0,f(["delete","has","get","set"],function(e){var t=_.prototype,r=t[e];h(t,e,function(t,i){if(m(t)&&!b(t)){this._f||(this._f=new c);var n=this._f[e](t,i);return"set"==e?this:n}return r.call(this,t,i)})}))},function(e,t,r,i){r(i)("asyncIterator")},function(e,t,r,i){r(i)("observable")},function(e,t,r,i,n,s,a,o,u,l){"use strict";function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){e=(0,v.default)(e);var r=e,i=r.program;return t.length&&(0,A.default)(e,C,null,t),i.body.length>1?i.body:i.body[0]}t.__esModule=!0;var h=r(i),d=c(h);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}var i=function(){var n=void 0;try{n=_.parse(e,(0,g.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0},t)),n=A.default.removeProperties(n),A.default.cheap(n,function(e){e[w]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return i=function(){return n},n};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(i(),t)}};var y=r(n),v=c(y),m=r(s),g=c(m),b=r(a),x=c(b),E=r(o),A=c(E),S=r(u),_=p(S),T=r(l),P=p(T),w="_fromTemplate",k=(0,d.default)(),C={noScope:!0,enter:function(e,t){var r=e.node;if(r[k])return e.skip();P.isExpressionStatement(r)&&(r=r.expression);var i=void 0;if(P.isIdentifier(r)&&r[w])if((0,x.default)(t[0],r.name))i=t[0][r.name];else if("$"===r.name[0]){var n=+r.name.slice(1);t[n]&&(i=t[n])}null===i&&e.remove(),i&&(i[k]=!0,e.replaceInline(i))},exit:function(e){var t=e.node;t.loc||A.default.clearNode(t)}};e.exports=t.default},function(e,t,r,i,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){return e.expression.typeAnnotation=e.typeAnnotation,e.expression}e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(a.types.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(a.types.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(a.types._class)||this.match(a.types.name)||this.match(a.types._function)||this.match(a.types._var))return this.flowParseDeclare(t)}else if(this.match(a.types.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t,r,i){var n=this.state.potentialArrowAt=r;if(this.match(a.types.colon)){var s=this.startNodeAt(t,r);if(s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),i&&!this.match(a.types.arrow)&&this.unexpected(),n&&this.eat(a.types.arrow)){var o="SequenceExpression"===e.type?e.expressions:[e],u=this.parseArrowExpression(this.startNodeAt(t,r),o);return u.returnType=s.typeAnnotation,u}return this.finishNode(s,"TypeCastExpression")}return e}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return fLine truncated
|
||||
var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(l.test(e)||!u.test(e)||null!=t&&e in Object(t))}var a=r(i),o=r(n),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=s},function(e,t,r,i){function n(e){return!!a&&a in e}var s=r(i),a=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():o.call(t,r,1),!0}var s=r(i),a=Array.prototype,o=a.splice;e.exports=n},function(e,t,r,i){function n(e){var t=this.__data__,r=s(t,e);return r<0?void 0:t[r][1]}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this.__data__,e)>-1}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){var r=this.__data__,i=s(r,e);return i<0?r.push([e,t]):r[i][1]=t,this}var s=r(i);e.exports=n},function(e,t,r,i,n,s){function a(){this.__data__={hash:new o,map:new(l||u),string:new o}}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i){function n(e){return s(this,e).delete(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).get(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e){return s(this,e).has(e)}var s=r(i);e.exports=n},function(e,t,r,i){function n(e,t){return s(this,e).set(e,t),this}var s=r(i);e.exports=n},function(e,t,r,i){var n=r(i),s=n(Object,"create");e.exports=s},function(e,t,r,i){(function(t){var n=r(i),s=n("object"==typeof t&&t),a=n("object"==typeof self&&self),o=n("object"==typeof this&&this),u=s||a||o||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t,r,i){function n(){this.__data__=new s}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){var r=this.__data__;return r instanceof a&&r.__data__.length==u&&(r=this.__data__=new o(r.__data__)),r.set(e,t),this}var a=r(i),o=r(n),u=200;e.exports=s},function(e,t,r,i,n){var s=r(i),a=r(n),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,u=/\\(\\)?/g,l=s(function(e){var t=[];return a(e).replace(o,function(e,r,i,n){t.push(i?n.replace(u,"$1"):r||e)}),t});e.exports=l},function(e,t,r,i){function n(e){if("string"==typeof e||s(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var s=r(i),a=1/0;e.exports=n},function(e,t,r,i,n,s,a,o,u){var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=r(u),y=Object.prototype,v=y.hasOwnProperty,m=y.propertyIsEnumerable,g=!m.call({valueOf:1},"valueOf"),b=c(function(e,t){if(g||h(t)||f(t))return void p(t,d(t),e);for(var r in t)v.call(t,r)&&l(e,r,t[r])});e.exports=b},function(e,t,r,i){function n(e){return s(e,!0,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n){function s(e,t){return null!=e&&o(e,t,a)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){function n(e){return s(e)&&u.call(e,"callee")&&(!p.call(e,"callee")||l.call(e)==a)}var s=r(i),a="[object Arguments]",o=Object.prototype,u=o.hasOwnProperty,l=o.toString,p=o.propertyIsEnumerable;e.exports=n},function(e,t,r,i,n,s){function a(e){return null!=e&&l(o(e))&&!u(e)}var o=r(i),u=r(n),l=r(s);e.exports=a},function(e,t,r,i,n){function s(e){return o(e)&&a(e)}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i,n){(function(e){var s=r(i),a=r(n),o="object"==typeof t&&t,u=o&&"object"==typeof e&&e,l=u&&u.exports===o,p=l?s.Buffer:void 0,c=p?function(e){return e instanceof p}:a;e.exports=c}).call(t,r(27)(e))},function(e,t,r,i,n){function s(e){return"string"==typeof e||!a(e)&&o(e)&&p.call(e)==u}var a=r(i),o=r(n),u="[object String]",l=Object.prototype,p=l.toString;e.exports=s},function(e,t,r,i,n,s,a,o,u){function l(e){var t=y(e);if(!t&&!h(e))return c(e);var r=f(e),i=!!r,n=r||[],s=n.length;for(var a in e)!p(e,a)||i&&("length"==a||d(a,s))||t&&"constructor"==a||n.push(a);return n}var p=r(i),c=r(n),f=r(s),h=r(a),d=r(o),y=r(u);e.exports=l},function(e,t,r,i){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a),a};return r.cache=new(n.Cache||s),r}var s=r(i),a="Expected a function";n.Cache=s,e.exports=n},function(e,t,r,i){function n(e){return null==e?"":s(e)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a,o,u,l,p,c,f,h){"use strict";function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function y(e){return e&&e.__esModule?e:{default:e}}function v(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(D.get("traverseNeedsParent",e.type));k.explode(t),v.node(e,t,r,i,n)}}function m(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var g=r(1915),b=y(g),x=r(6),E=y(x),A=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return y(A).default}});var S=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){retLine truncated
|
||||
if(k=P.next(),k.done)break;D=k.value}var N=D;e[N]?m(e[N],A):e[N]=A}else m(e,A)}}}for(var I in e)if(!v(I)){var F=e[I],B=C.FLIPPED_ALIAS_KEYS[I],R=C.DEPRECATED_KEYS[I];if(R&&(console.trace("Visitor defined for "+I+" but it has been renamed to "+R),B=[R]),B){delete e[I];for(var L=B,M=Array.isArray(L),j=0,L=M?L:(0,S.default)(L);;){var V;if(M){if(j>=L.length)break;V=L[j++]}else{if(j=L.next(),j.done)break;V=j.value}var U=V,Y=e[U];Y?m(Y,F):e[U]=(0,O.default)(F)}}}for(var K in e)v(K)||d(e[K]);return e}function l(e){if(!e._verified){if("function"==typeof e)throw new Error(w.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||p(t,e[t]),!v(t)){if(C.TYPES.indexOf(t)<0)throw new Error(w.get("traverseVerifyNodeType",t));var r=e[t];if("object"===("undefined"==typeof r?"undefined":(0,b.default)(r)))for(var i in r){if("enter"!==i&&"exit"!==i)throw new Error(w.get("traverseVerifyVisitorProperty",t,i));p(t+"."+i,r[i])}}e._verified=!0}}function p(e,t){for(var r=[].concat(t),i=r,n=Array.isArray(i),s=0,i=n?i:(0,S.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+("undefined"==typeof o?"undefined":(0,b.default)(o)))}}function c(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r={},i=0;i<e.length;i++){var n=e[i],s=t[i];u(n);for(var a in n){var o=n[a];s&&(o=f(o,s));var l=r[a]=r[a]||{};m(l,o)}}return r}function f(e,t){var r={};for(var i in e){var n=e[i];Array.isArray(n)&&(n=n.map(function(e){var r=function(r){return e.call(t,r,t)};return r.toString=function(){return e.toString()},r}),r[i]=n)}return r}function h(e){for(var t in e)if(!v(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function d(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function y(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function v(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function m(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var g=r(88),b=o(g),x=r(616),E=o(x),A=r(6),S=o(A);t.explode=u,t.verify=l,t.merge=c;var _=r(i),T=a(_),P=r(n),w=a(P),k=r(9),C=a(k),D=r(s),O=o(D)},function(e,t,r,i){var n=r(i),s=n.Reflect;e.exports=s},function(e,t,r,i){function n(e,t,r,i){return void 0===e||s(e,a[r])&&!o.call(i,r)?t:e}var s=r(i),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r,i,n){function s(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var a=r(i),o=r(n),u=Object.prototype,l=a?a.enumerate:void 0,p=u.propertyIsEnumerable;l&&!p.call({valueOf:1},"valueOf")&&(s=function(e){return o(l(e))}),e.exports=s},function(e,t,r,i){function n(e,t){return s(t,function(t){return e[t]})}var s=r(i);e.exports=n},function(e,t,r,i,n,s){var a=r(i),o=r(n),u=r(s),l=o(function(e,t,r,i){a(t,u(t),e,i)});e.exports=l},function(e,t,r,i){function n(e){return s(e,!1,!0)}var s=r(i);e.exports=n},function(e,t,r,i,n,s,a){var o=r(i),u=r(n),l=r(s),p=r(a),c=p(function(e){return e.push(void 0,u),o(l,void 0,e)});e.exports=c},function(e,t,r,i,n,s,a,o){function u(e,t,r,i){e=p(e)?e:h(e),r=r&&!i?f(r):0;var n=e.length;return r<0&&(r=d(n+r,0)),c(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&l(e,t,r)>-1}var l=r(i),p=r(n),c=r(s),f=r(a),h=r(o),d=Math.max;e.exports=u},function(e,t,r,i,n,s,a){function o(e){for(var t=-1,r=c(e),i=u(e),n=i.length,s=l(e),a=!!s,o=s||[],f=o.length;++t<n;){var d=i[t];a&&("length"==d||p(d,f))||"constructor"==d&&(r||!h.call(e,d))||o.push(d)}return o}var u=r(i),l=r(n),p=r(s),c=r(a),f=Object.prototype,h=f.hasOwnProperty;e.exports=o},function(e,t,r,i,n,s,a){function o(e,t,r){return t=(r?l(e,t,r):void 0===t)?1:p(t),u(c(e),t)}var u=r(i),l=r(n),p=r(s),c=r(a);e.exports=o},function(e,t,r,i,n){function s(e){return e?a(e,o(e)):[]}var a=r(i),o=r(n);e.exports=s},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,a.default)(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}()},function(e,t,r,i,n,s){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(i),u=a(o),l=r(n),p=a(l),c=r(s),f=a(c);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,f.default)(t)));e.prototype=(0,p.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.default?(0,u.default)(e,t):e.__proto__=t)}},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(i),a=n(s);t.default=function(e,t){if(!e)throw neLine truncated
|
||||
default:!1},argument:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,a.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}}),(0,a.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")}}}),(0,a.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}})},function(e,t,r,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=r(i),a=n(s);(0,a.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,a.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}}),(0,a.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,a.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,a.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,a.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,a.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,a.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,a.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,a.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,a.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,a.default)("ObLine truncated
|
||||
o.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var u=a;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(d&&e.length>=1e3&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,p=Array.isArray(l),c=0,l=p?l:(0,o.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=y,e.exports=t.default},function(e,t,r,i,n,s,a,o,u,l,p,c,f){"use strict";function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r,i,n){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(C.get("traverseNeedsParent",e.type));w.explode(t),y.node(e,t,r,i,n)}}function v(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var m=r(248),g=d(m),b=r(1),x=d(b),E=r(i);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return d(E).default}});var A=r(n);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return d(A).default}});var S=r(s);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return d(S).default}}),t.default=y;var _=r(a),T=d(_),P=r(o),w=h(P),k=r(20),C=h(k),D=r(u),O=d(D),N=r(3),I=h(N),F=r(l),B=h(F);t.visitors=w,y.visitors=w,y.verify=w.verify,y.explode=w.explode,y.NodePath=r(p),y.Scope=r(c),y.Hub=r(f),y.cheap=function(e,t){if(e){var r=I.VISITOR_KEYS[e.type];if(r){t(e);for(var i=r,n=Array.isArray(i),s=0,i=n?i:(0,x.default)(i);;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var o=a,u=e[o];if(Array.isArray(u))for(var l=u,p=Array.isArray(l),c=0,l=p?l:(0,x.default)(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;y.cheap(h,t)}else y.cheap(u,t)}}}},y.node=function(e,t,r,i,n,s){var a=I.VISITOR_KEYS[e.type];if(a)for(var o=new T.default(r,t,i,n),u=a,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;if((!s||!s[f])&&o.visit(e,f))return}};var R=I.COMMENT_KEYS.concat(["tokens","comments","start","end","loc","raw","rawValue"]);y.clearNode=function(e){for(var t=R,r=Array.isArray(t),i=0,t=r?t:(0,x.default)(t);;){var n;if(r){if(i>=t.length)break;n=t[i++]}else{if(i=t.next(),i.done)break;n=i.value}var s=n;null!=e[s]&&(e[s]=void 0)}for(var a in e)"_"===a[0]&&null!=e[a]&&(e[a]=void 0);B.path.delete(e);for(var o=(0,g.default)(e),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e[f]=null}},y.removeProperties=function(e){return y.cheap(e,y.clearNode),e},y.hasType=function(e,t,r,i){if((0,O.default)(i,e.type))return!1;if(e.type===r)return!0;var n={has:!1,type:r};return y(e,{blacklist:i,enter:v},t,n),n.has},y.clearCache=function(){B.clear()},y.copyCache=function(e,t){B.path.has(e)&&B.path.set(t,B.path.get(e))}},function(e,t,r,i){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function o(e){var t=this;do if(e(t))return t;while(t=t.parentPath);return null}function u(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function l(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function p(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var i=void 0,n=g.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,v.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,p=l[t+1];if(i)if(p.listKey&&i.listKey===p.listKey&&p.key<i.key)i=p;else{var c=n.indexOf(i.parentKey),f=n.indexOf(p.parentKey);c>f&&(i=p)}else i=p}return i})}function c(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var i=1/0,n=void 0,s=void 0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<i&&(i=t.length),t}),o=a[0];e:for(var u=0;u<i;u++){for(var l=o[u],p=a,c=Array.isArray(p),f=0,p=c?p:(0,v.default)(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;if(d[u]!==l)break e}n=u,s=l}if(s)return t?t(s,n,a):s;throw new Error("Couldn't find intersection")}function f(){var e=this,t=[];do t.push(e);while(e=e.parentPath);reLine truncated
|
||||
},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];return M.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0];e=M.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var i=this.getProgramParent();return i.references[t]=!0,i.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;M.isAssignmentExpression(e)?r=e.left:M.isVariableDeclarator(e)?r=e.id:(M.isObjectProperty(r)||M.isObjectMethod(r))&&(r=r.key);var i=[],n=function e(t){if(M.isModuleDeclaration(t))if(t.source)e(t.source);else if(t.specifiers&&t.specifiers.length)for(var r=t.specifiers,n=Array.isArray(r),s=0,r=n?r:(0,x.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;e(o)}else t.declaration&&e(t.declaration);else if(M.isModuleSpecifier(t))e(t.local);else if(M.isMemberExpression(t))e(t.object),e(t.property);else if(M.isIdentifier(t))i.push(t.name);else if(M.isLiteral(t))i.push(t.value);else if(M.isCallExpression(t))e(t.callee);else if(M.isObjectExpression(t)||M.isObjectPattern(t))for(var u=t.properties,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;e(f.key||f.argument)}};n(r);var s=i.join("$");return s=s.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(s.slice(0,20))},e.prototype.isStatic=function(e){if(M.isThisExpression(e)||M.isSuper(e))return!0;if(M.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,i){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var n=!1;if(n||(n="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),n||(n="param"===e.kind&&("let"===t||"const"===t)),n)throw this.hub.file.buildCodeFrameError(i,N.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var i=this.getBinding(e);if(i)return t=t||this.generateUidIdentifier(e).name,new P.default(i,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,i){e[t]&&(e[r]=i,e[t]=null)},e.prototype.dump=function(){var e=(0,_.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var i=t.bindings[r];console.log(" -",r,{constant:i.constant,references:i.references,violations:i.constantViolations.length,kind:i.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(M.isIdentifier(e)){var i=this.getBinding(e.name);if(i&&i.constant&&i.path.isGenericType("Array"))return e}if(M.isArrayExpression(e))return e;if(M.isIdentifier(e,{name:"arguments"}))return M.callExpression(M.memberExpression(M.memberExpression(M.memberExpression(M.identifier("Array"),M.identifier("prototype")),M.identifier("slice")),M.identifier("call")),[e]);var n="toArray",s=[e];return t===!0?n="toConsumableArray":t&&(s.push(M.numericLiteral(t)),n="slicedToArray"),M.callExpression(r.addHelper(n),s)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerBinding("label",e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,i=Array.isArray(r),n=0,r=i?r:(0,x.default)(r);;){var s;if(i){if(n>=r.length)break;s=r[n++]}else{if(n=r.next(),n.done)break;s=n.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,x.default)(u);;){var c;if(l){if(p>=u.length)break;c=u[p++]}else{if(p=u.next(),p.done)break;c=p.value}var f=c;this.registerBinding("module",f)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?M.unaryExpression("void",M.numericLiteral(0),!0):M.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var i=this.getBinding(r);i&&i.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?t:arguments[2];if(!e)throw new ReferenceError("no `kind`Line truncated
|
||||
+17232
File diff suppressed because it is too large.
Load diff
+1741
File diff suppressed because it is too large.
Load diff
+19
@@ -0,0 +1,19 @@
|
||||
class DateMessage extends React.Component
|
||||
{
|
||||
currentDateString(int_format){
|
||||
const options = {year: 'numeric', month: '2-digit', day: '2-digit'};
|
||||
return (new Intl.DateTimeFormat(int_format, options)).format(Date.now());
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div className="container">
|
||||
<div className="cal-xs-12">
|
||||
<span className="pull-right">
|
||||
{this.currentDateString(this.props.format)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(<DateMessage format="de-DE"/>, document.getElementById('date'));
|
||||
@@ -0,0 +1,41 @@
|
||||
var filesystem = require('fs');
|
||||
var patients = [];
|
||||
|
||||
filesystem.readFile('../data/patientlist.json', 'utf8', (err, data) => {
|
||||
if (err)
|
||||
return console.log(err);
|
||||
|
||||
patients = JSON.parse(data);
|
||||
console.log("Anzahl eingelesner Patienten: " + patients.length);
|
||||
});
|
||||
|
||||
function writePatients() {
|
||||
filesystem.writeFile('../data/patientlist.json', JSON.stringify(patients), function (err) {
|
||||
if (err)
|
||||
return console.log(err);
|
||||
console.log("Anzahl geschriebener Patienten: " + patients.length);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.readAll = function () {
|
||||
return patients;
|
||||
}
|
||||
|
||||
module.exports.read = function (id) {
|
||||
return patients.find(function (element) {
|
||||
return (element.id == id);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.update = function (id, patient) {
|
||||
var count = 0;
|
||||
patients = patients.map(function (element) {
|
||||
if (element.id == id) {
|
||||
count++;
|
||||
return patient;
|
||||
} else
|
||||
return element;
|
||||
});
|
||||
writePatients();
|
||||
return count;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
var express = require('express');
|
||||
var bodyParser = require('body-parser');
|
||||
var app = express();
|
||||
var api = require('./patient.js');
|
||||
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.get('/', (request, response) => {
|
||||
console.log("Anfrage erhalten");
|
||||
response.send("Hello World");
|
||||
})
|
||||
|
||||
app.get('/patients', (req, res) => {
|
||||
res.json(api.readAll());
|
||||
});
|
||||
|
||||
app.get('/patients/:id', (req, res) => {
|
||||
var patient = api.read(req.params.id);
|
||||
if (patient)
|
||||
res.json(patient);
|
||||
else
|
||||
res.sendStatus(404);
|
||||
})
|
||||
|
||||
app.post('/patients', (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
app.put('/patients/:id', (req, res) => {
|
||||
var count = api.update(req.params.id, req.body);
|
||||
res.json({ "count": count });
|
||||
});
|
||||
|
||||
app.delete('/patients/:id', (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("MDT5/2 Server");
|
||||
})
|
||||
@@ -0,0 +1,45 @@
|
||||
<div class="row">
|
||||
<h2 class="col-xs-12 page-header">
|
||||
Patientenverwaltung
|
||||
<small>Ein Demoprojekt</small>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/html5.png" alt="HTML5 LOGO" />
|
||||
<h4>HTML5</h4>
|
||||
<p>Strukturierte Inhalte für den Browser</p>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/css3.png" alt="CSS3 LOGO" />
|
||||
<h4>CSS3</h4>
|
||||
<p>Flexibles Design und Layout</p>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/bootstrap.png" alt="Bootstrap" />
|
||||
<h4>Bootstrap3</h4>
|
||||
<p>Responsive und schick</p>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/jQuery.png" alt="JQuery LOGO" />
|
||||
<h4>JQuery</h4>
|
||||
<p>Zugriff auf das DOM</p>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/react.png" alt="REACT LOGO" />
|
||||
<h4>REACT</h4>
|
||||
<p>Building User Interfaces</p>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 text-center">
|
||||
<img class="img-circle img-responsive img-center"
|
||||
src="img/js.png" alt="JavaScript" />
|
||||
<h4>JavaScript</h4>
|
||||
<p>Die Programmiersprache im Browser</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<span class="navbar-brand" href="#" onclick="simulation()">
|
||||
Patientenverwaltung
|
||||
</span>
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menu">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="menu" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="#" onclick="$('#content').load('templates/PatientDetailsTemplate.html')">Patient</a></li>
|
||||
<li><a href="#" onclick="$('#content').load('templates/AboutTemplate.html')">Info</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,45 @@
|
||||
<div class="row">
|
||||
<h2 class="col-xs-12 page-header">
|
||||
Patientenverwaltung
|
||||
<span id="patient-name">Patientenname</span>
|
||||
</h2>
|
||||
<script type="text/javascript">
|
||||
$("#patient-name").html(patient.lastname())
|
||||
</script>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6 class="col-xs-6">
|
||||
Geschlecht
|
||||
</h6>
|
||||
<h6 class="col-xs-6" id="patient-gender"></h6>
|
||||
<script type="text/javascript">
|
||||
$("#patient-gender").html(patient.gender())
|
||||
</script>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6 class="col-xs-6">
|
||||
Geburtsdatum
|
||||
</h6>
|
||||
<h6 class="col-xs-6" id="patient-date">Geburtsdatum</h6>
|
||||
<script type="text/javascript">
|
||||
$("#patient-date").html(patient.date())
|
||||
</script>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6 class="col-xs-6">
|
||||
Wohnort:
|
||||
</h6>
|
||||
<h6 class="col-xs-6" id="patient-home">Patientenname</h6>
|
||||
<script type="text/javascript">
|
||||
$("#patient-home").html(patient.home())
|
||||
</script>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6 class="col-xs-6">
|
||||
Land:
|
||||
</h6>
|
||||
<h6 class="col-xs-6" id="patient-country">Land:</h6>
|
||||
<script type="text/javascript">
|
||||
$("#patient-country").html(patient.country())
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
app.use(function (req, res, next) {
|
||||
|
||||
// Website you wish to allow to connect
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
// Request methods you wish to allow
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
|
||||
|
||||
// Request headers you wish to allow
|
||||
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
|
||||
|
||||
// Set to true if you need the website to include cookies in the requests sent
|
||||
// to the API (e.g. in case you use sessions)
|
||||
res.setHeader('Access-Control-Allow-Credentials', false);
|
||||
|
||||
// Pass to next layer of middleware
|
||||
next();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
node node_modules\http-server\bin\http-server
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../ecstatic/lib/ecstatic.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../ecstatic/lib/ecstatic.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\ecstatic\lib\ecstatic.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\ecstatic\lib\ecstatic.js" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../he/bin/he" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../he/bin/he" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\he\bin\he" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\he\bin\he" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../http-server/bin/http-server" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../http-server/bin/http-server" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\http-server\bin\http-server" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\http-server\bin\http-server" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../http-server/bin/http-server" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../http-server/bin/http-server" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\http-server\bin\http-server" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\http-server\bin\http-server" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../mime/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../mime/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\mime\cli.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\mime\cli.js" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../opener/opener.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../opener/opener.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\opener\opener.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\opener\opener.js" %*
|
||||
)
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
1.3.7 / 2019-04-29
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.6.2
|
||||
- Fix sorting charset, encoding, and language with extra parameters
|
||||
|
||||
1.3.6 / 2019-04-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.24
|
||||
- deps: mime-db@~1.40.0
|
||||
|
||||
1.3.5 / 2018-02-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.18
|
||||
- deps: mime-db@~1.33.0
|
||||
|
||||
1.3.4 / 2017-08-22
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.16
|
||||
- deps: mime-db@~1.29.0
|
||||
|
||||
1.3.3 / 2016-05-02
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.11
|
||||
- deps: mime-db@~1.23.0
|
||||
* deps: negotiator@0.6.1
|
||||
- perf: improve `Accept` parsing speed
|
||||
- perf: improve `Accept-Charset` parsing speed
|
||||
- perf: improve `Accept-Encoding` parsing speed
|
||||
- perf: improve `Accept-Language` parsing speed
|
||||
|
||||
1.3.2 / 2016-03-08
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.10
|
||||
- Fix extension of `application/dash+xml`
|
||||
- Update primary extension for `audio/mp4`
|
||||
- deps: mime-db@~1.22.0
|
||||
|
||||
1.3.1 / 2016-01-19
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.9
|
||||
- deps: mime-db@~1.21.0
|
||||
|
||||
1.3.0 / 2015-09-29
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.7
|
||||
- deps: mime-db@~1.19.0
|
||||
* deps: negotiator@0.6.0
|
||||
- Fix including type extensions in parameters in `Accept` parsing
|
||||
- Fix parsing `Accept` parameters with quoted equals
|
||||
- Fix parsing `Accept` parameters with quoted semicolons
|
||||
- Lazy-load modules from main entry point
|
||||
- perf: delay type concatenation until needed
|
||||
- perf: enable strict mode
|
||||
- perf: hoist regular expressions
|
||||
- perf: remove closures getting spec properties
|
||||
- perf: remove a closure from media type parsing
|
||||
- perf: remove property delete from media type parsing
|
||||
|
||||
1.2.13 / 2015-09-06
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.6
|
||||
- deps: mime-db@~1.18.0
|
||||
|
||||
1.2.12 / 2015-07-30
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.4
|
||||
- deps: mime-db@~1.16.0
|
||||
|
||||
1.2.11 / 2015-07-16
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.3
|
||||
- deps: mime-db@~1.15.0
|
||||
|
||||
1.2.10 / 2015-07-01
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.2
|
||||
- deps: mime-db@~1.14.0
|
||||
|
||||
1.2.9 / 2015-06-08
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.1
|
||||
- perf: fix deopt during mapping
|
||||
|
||||
1.2.8 / 2015-06-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.0
|
||||
- deps: mime-db@~1.13.0
|
||||
* perf: avoid argument reassignment & argument slice
|
||||
* perf: avoid negotiator recursive construction
|
||||
* perf: enable strict mode
|
||||
* perf: remove unnecessary bitwise operator
|
||||
|
||||
1.2.7 / 2015-05-10
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.3
|
||||
- Fix media type parameter matching to be case-insensitive
|
||||
|
||||
1.2.6 / 2015-05-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.11
|
||||
- deps: mime-db@~1.9.1
|
||||
* deps: negotiator@0.5.2
|
||||
- Fix comparing media types with quoted values
|
||||
- Fix splitting media types with quoted commas
|
||||
|
||||
1.2.5 / 2015-03-13
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.10
|
||||
- deps: mime-db@~1.8.0
|
||||
|
||||
1.2.4 / 2015-02-14
|
||||
==================
|
||||
|
||||
* Support Node.js 0.6
|
||||
* deps: mime-types@~2.0.9
|
||||
- deps: mime-db@~1.7.0
|
||||
* deps: negotiator@0.5.1
|
||||
- Fix preference sorting to be stable for long acceptable lists
|
||||
|
||||
1.2.3 / 2015-01-31
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.8
|
||||
- deps: mime-db@~1.6.0
|
||||
|
||||
1.2.2 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.7
|
||||
- deps: mime-db@~1.5.0
|
||||
|
||||
1.2.1 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.5
|
||||
- deps: mime-db@~1.3.1
|
||||
|
||||
1.2.0 / 2014-12-19
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.0
|
||||
- Fix list return order when large accepted list
|
||||
- Fix missing identity encoding when q=0 exists
|
||||
- Remove dynamic building of Negotiator class
|
||||
|
||||
1.1.4 / 2014-12-10
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.4
|
||||
- deps: mime-db@~1.3.0
|
||||
|
||||
1.1.3 / 2014-11-09
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.3
|
||||
- deps: mime-db@~1.2.0
|
||||
|
||||
1.1.2 / 2014-10-14
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.9
|
||||
- Fix error when media type has invalid parameter
|
||||
|
||||
1.1.1 / 2014-09-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.2
|
||||
- deps: mime-db@~1.1.0
|
||||
* deps: negotiator@0.4.8
|
||||
- Fix all negotiations to be case-insensitive
|
||||
- Stable sort preferences of same quality according to client order
|
||||
|
||||
1.1.0 / 2014-09-02
|
||||
==================
|
||||
|
||||
* update `mime-types`
|
||||
|
||||
1.0.7 / 2014-07-04
|
||||
==================
|
||||
|
||||
* Fix wrong type returned from `type` when match after unknown extension
|
||||
|
||||
1.0.6 / 2014-06-24
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.7
|
||||
|
||||
1.0.5 / 2014-06-20
|
||||
==================
|
||||
|
||||
* fix crash when unknown extension given
|
||||
|
||||
1.0.4 / 2014-06-19
|
||||
==================
|
||||
|
||||
* use `mime-types`
|
||||
|
||||
1.0.3 / 2014-06-11
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.6
|
||||
- Order by specificity when quality is the same
|
||||
|
||||
1.0.2 / 2014-05-29
|
||||
==================
|
||||
|
||||
* Fix interpretation when header not in request
|
||||
* deps: pin negotiator@0.4.5
|
||||
|
||||
1.0.1 / 2014-01-18
|
||||
==================
|
||||
|
||||
* Identity encoding isn't always acceptable
|
||||
* deps: negotiator@~0.4.0
|
||||
|
||||
1.0.0 / 2013-12-27
|
||||
==================
|
||||
|
||||
* Genesis
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
# accepts
|
||||
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
|
||||
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
|
||||
|
||||
In addition to negotiator, it allows:
|
||||
|
||||
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
|
||||
as well as `('text/html', 'application/json')`.
|
||||
- Allows type shorthands such as `json`.
|
||||
- Returns `false` when no types match
|
||||
- Treats non-existent headers as `*`
|
||||
|
||||
## Installation
|
||||
|
||||
This is a [Node.js](https://nodejs.org/en/) module available through the
|
||||
[npm registry](https://www.npmjs.com/). Installation is done using the
|
||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
||||
|
||||
```sh
|
||||
$ npm install accepts
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
```
|
||||
|
||||
### accepts(req)
|
||||
|
||||
Create a new `Accepts` object for the given `req`.
|
||||
|
||||
#### .charset(charsets)
|
||||
|
||||
Return the first accepted charset. If nothing in `charsets` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .charsets()
|
||||
|
||||
Return the charsets that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .encoding(encodings)
|
||||
|
||||
Return the first accepted encoding. If nothing in `encodings` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .encodings()
|
||||
|
||||
Return the encodings that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .language(languages)
|
||||
|
||||
Return the first accepted language. If nothing in `languages` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .languages()
|
||||
|
||||
Return the languages that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .type(types)
|
||||
|
||||
Return the first accepted type (and it is returned as the same text as what
|
||||
appears in the `types` array). If nothing in `types` is accepted, then `false`
|
||||
is returned.
|
||||
|
||||
The `types` array can contain full MIME types or file extensions. Any value
|
||||
that is not a full MIME types is passed to `require('mime-types').lookup`.
|
||||
|
||||
#### .types()
|
||||
|
||||
Return the types that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple type negotiation
|
||||
|
||||
This simple example shows how to use `accepts` to return a different typed
|
||||
respond body based on what the client wants to accept. The server lists it's
|
||||
preferences in order and will get back the best match between the client and
|
||||
server.
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
var http = require('http')
|
||||
|
||||
function app (req, res) {
|
||||
var accept = accepts(req)
|
||||
|
||||
// the order of this list is significant; should be server preferred order
|
||||
switch (accept.type(['json', 'html'])) {
|
||||
case 'json':
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.write('{"hello":"world!"}')
|
||||
break
|
||||
case 'html':
|
||||
res.setHeader('Content-Type', 'text/html')
|
||||
res.write('<b>hello, world!</b>')
|
||||
break
|
||||
default:
|
||||
// the fallback is text/plain, so no need to specify it above
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
res.write('hello, world!')
|
||||
break
|
||||
}
|
||||
|
||||
res.end()
|
||||
}
|
||||
|
||||
http.createServer(app).listen(3000)
|
||||
```
|
||||
|
||||
You can test this out with the cURL program:
|
||||
```sh
|
||||
curl -I -H'Accept: text/html' http://localhost:3000/
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
|
||||
[node-version-image]: https://badgen.net/npm/node/accepts
|
||||
[node-version-url]: https://nodejs.org/en/download
|
||||
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
|
||||
[npm-url]: https://npmjs.org/package/accepts
|
||||
[npm-version-image]: https://badgen.net/npm/v/accepts
|
||||
[travis-image]: https://badgen.net/travis/jshttp/accepts/master
|
||||
[travis-url]: https://travis-ci.org/jshttp/accepts
|
||||
+238
@@ -0,0 +1,238 @@
|
||||
/*!
|
||||
* accepts
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var Negotiator = require('negotiator')
|
||||
var mime = require('mime-types')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = Accepts
|
||||
|
||||
/**
|
||||
* Create a new Accepts object for the given req.
|
||||
*
|
||||
* @param {object} req
|
||||
* @public
|
||||
*/
|
||||
|
||||
function Accepts (req) {
|
||||
if (!(this instanceof Accepts)) {
|
||||
return new Accepts(req)
|
||||
}
|
||||
|
||||
this.headers = req.headers
|
||||
this.negotiator = new Negotiator(req)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given `type(s)` is acceptable, returning
|
||||
* the best match when true, otherwise `undefined`, in which
|
||||
* case you should respond with 406 "Not Acceptable".
|
||||
*
|
||||
* The `type` value may be a single mime type string
|
||||
* such as "application/json", the extension name
|
||||
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
|
||||
* or array is given the _best_ match, if any is returned.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* // Accept: text/html
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
* this.types('text/html');
|
||||
* // => "text/html"
|
||||
* this.types('json', 'text');
|
||||
* // => "json"
|
||||
* this.types('application/json');
|
||||
* // => "application/json"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('image/png');
|
||||
* this.types('png');
|
||||
* // => undefined
|
||||
*
|
||||
* // Accept: text/*;q=.5, application/json
|
||||
* this.types(['html', 'json']);
|
||||
* this.types('html', 'json');
|
||||
* // => "json"
|
||||
*
|
||||
* @param {String|Array} types...
|
||||
* @return {String|Array|Boolean}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.type =
|
||||
Accepts.prototype.types = function (types_) {
|
||||
var types = types_
|
||||
|
||||
// support flattened arguments
|
||||
if (types && !Array.isArray(types)) {
|
||||
types = new Array(arguments.length)
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
types[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no types, return all requested types
|
||||
if (!types || types.length === 0) {
|
||||
return this.negotiator.mediaTypes()
|
||||
}
|
||||
|
||||
// no accept header, return first given type
|
||||
if (!this.headers.accept) {
|
||||
return types[0]
|
||||
}
|
||||
|
||||
var mimes = types.map(extToMime)
|
||||
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
|
||||
var first = accepts[0]
|
||||
|
||||
return first
|
||||
? types[mimes.indexOf(first)]
|
||||
: false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted encodings or best fit based on `encodings`.
|
||||
*
|
||||
* Given `Accept-Encoding: gzip, deflate`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['gzip', 'deflate']
|
||||
*
|
||||
* @param {String|Array} encodings...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.encoding =
|
||||
Accepts.prototype.encodings = function (encodings_) {
|
||||
var encodings = encodings_
|
||||
|
||||
// support flattened arguments
|
||||
if (encodings && !Array.isArray(encodings)) {
|
||||
encodings = new Array(arguments.length)
|
||||
for (var i = 0; i < encodings.length; i++) {
|
||||
encodings[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no encodings, return all requested encodings
|
||||
if (!encodings || encodings.length === 0) {
|
||||
return this.negotiator.encodings()
|
||||
}
|
||||
|
||||
return this.negotiator.encodings(encodings)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted charsets or best fit based on `charsets`.
|
||||
*
|
||||
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['utf-8', 'utf-7', 'iso-8859-1']
|
||||
*
|
||||
* @param {String|Array} charsets...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.charset =
|
||||
Accepts.prototype.charsets = function (charsets_) {
|
||||
var charsets = charsets_
|
||||
|
||||
// support flattened arguments
|
||||
if (charsets && !Array.isArray(charsets)) {
|
||||
charsets = new Array(arguments.length)
|
||||
for (var i = 0; i < charsets.length; i++) {
|
||||
charsets[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no charsets, return all requested charsets
|
||||
if (!charsets || charsets.length === 0) {
|
||||
return this.negotiator.charsets()
|
||||
}
|
||||
|
||||
return this.negotiator.charsets(charsets)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted languages or best fit based on `langs`.
|
||||
*
|
||||
* Given `Accept-Language: en;q=0.8, es, pt`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['es', 'pt', 'en']
|
||||
*
|
||||
* @param {String|Array} langs...
|
||||
* @return {Array|String}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.lang =
|
||||
Accepts.prototype.langs =
|
||||
Accepts.prototype.language =
|
||||
Accepts.prototype.languages = function (languages_) {
|
||||
var languages = languages_
|
||||
|
||||
// support flattened arguments
|
||||
if (languages && !Array.isArray(languages)) {
|
||||
languages = new Array(arguments.length)
|
||||
for (var i = 0; i < languages.length; i++) {
|
||||
languages[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no languages, return all requested languages
|
||||
if (!languages || languages.length === 0) {
|
||||
return this.negotiator.languages()
|
||||
}
|
||||
|
||||
return this.negotiator.languages(languages)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert extnames to mime.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function extToMime (type) {
|
||||
return type.indexOf('/') === -1
|
||||
? mime.lookup(type)
|
||||
: type
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mime is valid.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function validMime (type) {
|
||||
return typeof type === 'string'
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"_from": "accepts@~1.3.7",
|
||||
"_id": "accepts@1.3.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
|
||||
"_location": "/accepts",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "accepts@~1.3.7",
|
||||
"name": "accepts",
|
||||
"escapedName": "accepts",
|
||||
"rawSpec": "~1.3.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~1.3.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/express"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
||||
"_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
|
||||
"_spec": "accepts@~1.3.7",
|
||||
"_where": "C:\\Users\\ittnerpa60944\\source\\repos\\MDTWebApp\\code\\code\\node_modules\\express",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/accepts/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"mime-types": "~2.1.24",
|
||||
"negotiator": "0.6.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Higher-level content negotiation",
|
||||
"devDependencies": {
|
||||
"deep-equal": "1.0.1",
|
||||
"eslint": "5.16.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.17.2",
|
||||
"eslint-plugin-markdown": "1.0.0",
|
||||
"eslint-plugin-node": "8.0.1",
|
||||
"eslint-plugin-promise": "4.1.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"mocha": "6.1.4",
|
||||
"nyc": "14.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"HISTORY.md",
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jshttp/accepts#readme",
|
||||
"keywords": [
|
||||
"content",
|
||||
"negotiation",
|
||||
"accept",
|
||||
"accepts"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "accepts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jshttp/accepts.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --plugin markdown --ext js,md .",
|
||||
"test": "mocha --reporter spec --check-leaks --bail test/",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
||||
"test-travis": "nyc --reporter=text npm test"
|
||||
},
|
||||
"version": "1.3.7"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
# Array Flatten
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![NPM downloads][downloads-image]][downloads-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
> Flatten an array of nested arrays into a single flat array. Accepts an optional depth.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install array-flatten --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var flatten = require('array-flatten')
|
||||
|
||||
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
|
||||
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
|
||||
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
|
||||
//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
|
||||
|
||||
(function () {
|
||||
flatten(arguments) //=> [1, 2, 3]
|
||||
})(1, [2, 3])
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/array-flatten
|
||||
[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/array-flatten
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/array-flatten
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Expose `arrayFlatten`.
|
||||
*/
|
||||
module.exports = arrayFlatten
|
||||
|
||||
/**
|
||||
* Recursive flatten function with depth.
|
||||
*
|
||||
* @param {Array} array
|
||||
* @param {Array} result
|
||||
* @param {Number} depth
|
||||
* @return {Array}
|
||||
*/
|
||||
function flattenWithDepth (array, result, depth) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var value = array[i]
|
||||
|
||||
if (depth > 0 && Array.isArray(value)) {
|
||||
flattenWithDepth(value, result, depth - 1)
|
||||
} else {
|
||||
result.push(value)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive flatten function. Omitting depth is slightly faster.
|
||||
*
|
||||
* @param {Array} array
|
||||
* @param {Array} result
|
||||
* @return {Array}
|
||||
*/
|
||||
function flattenForever (array, result) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var value = array[i]
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
flattenForever(value, result)
|
||||
} else {
|
||||
result.push(value)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten an array, with the ability to define a depth.
|
||||
*
|
||||
* @param {Array} array
|
||||
* @param {Number} depth
|
||||
* @return {Array}
|
||||
*/
|
||||
function arrayFlatten (array, depth) {
|
||||
if (depth == null) {
|
||||
return flattenForever(array, [])
|
||||
}
|
||||
|
||||
return flattenWithDepth(array, [], depth)
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"_from": "array-flatten@1.1.1",
|
||||
"_id": "array-flatten@1.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
|
||||
"_location": "/array-flatten",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "array-flatten@1.1.1",
|
||||
"name": "array-flatten",
|
||||
"escapedName": "array-flatten",
|
||||
"rawSpec": "1.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/express"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||
"_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
|
||||
"_spec": "array-flatten@1.1.1",
|
||||
"_where": "C:\\Users\\ittnerpa60944\\source\\repos\\MDTWebApp\\code\\code\\node_modules\\express",
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/array-flatten/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Flatten an array of nested arrays into a single flat array",
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.3.13",
|
||||
"mocha": "^2.2.4",
|
||||
"pre-commit": "^1.0.7",
|
||||
"standard": "^3.7.3"
|
||||
},
|
||||
"files": [
|
||||
"array-flatten.js",
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://github.com/blakeembrey/array-flatten",
|
||||
"keywords": [
|
||||
"array",
|
||||
"flatten",
|
||||
"arguments",
|
||||
"depth"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "array-flatten.js",
|
||||
"name": "array-flatten",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/blakeembrey/array-flatten.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "istanbul cover _mocha -- -R spec"
|
||||
},
|
||||
"version": "1.1.1"
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
# v1.5.2
|
||||
- Allow using `"consructor"` as an argument in `memoize` (#998)
|
||||
- Give a better error messsage when `auto` dependency checking fails (#994)
|
||||
- Various doc updates (#936, #956, #979, #1002)
|
||||
|
||||
# v1.5.1
|
||||
- Fix issue with `pause` in `queue` with concurrency enabled (#946)
|
||||
- `while` and `until` now pass the final result to callback (#963)
|
||||
- `auto` will properly handle concurrency when there is no callback (#966)
|
||||
- `auto` will now properly stop execution when an error occurs (#988, #993)
|
||||
- Various doc fixes (#971, #980)
|
||||
|
||||
# v1.5.0
|
||||
|
||||
- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
|
||||
- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
|
||||
- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637)
|
||||
- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891)
|
||||
- Various code simplifications (#896, #904)
|
||||
- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
|
||||
|
||||
# v1.4.2
|
||||
|
||||
- Ensure coverage files don't get published on npm (#879)
|
||||
|
||||
# v1.4.1
|
||||
|
||||
- Add in overlooked `detectLimit` method (#866)
|
||||
- Removed unnecessary files from npm releases (#861)
|
||||
- Removed usage of a reserved word to prevent :boom: in older environments (#870)
|
||||
|
||||
# v1.4.0
|
||||
|
||||
- `asyncify` now supports promises (#840)
|
||||
- Added `Limit` versions of `filter` and `reject` (#836)
|
||||
- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
|
||||
- `some`, `every` and `detect` now short circuit early (#828, #829)
|
||||
- Improve detection of the global object (#804), enabling use in WebWorkers
|
||||
- `whilst` now called with arguments from iterator (#823)
|
||||
- `during` now gets called with arguments from iterator (#824)
|
||||
- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
|
||||
|
||||
|
||||
# v1.3.0
|
||||
|
||||
New Features:
|
||||
- Added `constant`
|
||||
- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
|
||||
- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
|
||||
- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
|
||||
- `async` should work better in Web Workers due to better `root` detection (#804)
|
||||
- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
|
||||
- Various internal updates (#786, #801, #802, #803)
|
||||
- Various doc fixes (#790, #794)
|
||||
|
||||
Bug Fixes:
|
||||
- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
|
||||
|
||||
|
||||
# v1.2.1
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
|
||||
|
||||
|
||||
# v1.2.0
|
||||
|
||||
New Features:
|
||||
|
||||
- Added `timesLimit` (#743)
|
||||
- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
|
||||
|
||||
|
||||
# v1.1.1
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
|
||||
|
||||
|
||||
# v1.1.0
|
||||
|
||||
New Features:
|
||||
|
||||
- `cargo` now supports all of the same methods and event callbacks as `queue`.
|
||||
- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
|
||||
- Optimized `map`, `eachOf`, and `waterfall` families of functions
|
||||
- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
|
||||
- The callback is now optional for the composed results of `compose` and `seq`. (#618)
|
||||
- Reduced file size by 4kb, (minified version by 1kb)
|
||||
- Added code coverage through `nyc` and `coveralls` (#768)
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
- `forever` will no longer stack overflow with a synchronous iterator (#622)
|
||||
- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
|
||||
- Always pass `null` in callbacks when there is no error (#439)
|
||||
- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
|
||||
- `each` and family will properly handle an empty array (#578)
|
||||
- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
|
||||
- `queue` will throw if a non-function is passed to `q.push()` (#593)
|
||||
- Doc fixes (#629, #766)
|
||||
|
||||
|
||||
# v1.0.0
|
||||
|
||||
No known breaking changes, we are simply complying with semver from here on out.
|
||||
|
||||
Changes:
|
||||
|
||||
- Start using a changelog!
|
||||
- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
|
||||
- Detect deadlocks in `auto` (#663)
|
||||
- Better support for require.js (#527)
|
||||
- Throw if queue created with concurrency `0` (#714)
|
||||
- Fix unneeded iteration in `queue.resume()` (#758)
|
||||
- Guard against timer mocking overriding `setImmediate` (#609 #611)
|
||||
- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
|
||||
- Use single noop function internally (#546)
|
||||
- Optimize internal `_each`, `_map` and `_keys` functions.
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2010-2014 Caolan McMahon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+1877
File diff suppressed because it is too large.
Load diff
+1265
File diff suppressed because it is too large.
Load diff
+2
@@ -0,0 +1,2 @@
|
||||
!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(P.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(P.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function j(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function I(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?P.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void P.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){for(;!s.paused&&f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)P.setImmediate(s.process)}}};return s}function x(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?P.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,P={},C="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=C&&(q=C.async),P.noConflict=function(){return C.async=q,P};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return tLine truncated
|
||||
//# sourceMappingURL=dist/async.min.map
|
||||
+1265
File diff suppressed because it is too large.
Load diff
+113
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"_from": "async@^1.5.2",
|
||||
"_id": "async@1.5.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
||||
"_location": "/async",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "async@^1.5.2",
|
||||
"name": "async",
|
||||
"escapedName": "async",
|
||||
"rawSpec": "^1.5.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.5.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/portfinder"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"_shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
|
||||
"_spec": "async@^1.5.2",
|
||||
"_where": "C:\\Users\\ittnerpa60944\\source\\repos\\MDTWebApp\\code\\code\\node_modules\\portfinder",
|
||||
"author": {
|
||||
"name": "Caolan McMahon"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/caolan/async/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Higher-order functions and common patterns for asynchronous code",
|
||||
"devDependencies": {
|
||||
"benchmark": "github:bestiejs/benchmark.js",
|
||||
"bluebird": "^2.9.32",
|
||||
"chai": "^3.1.0",
|
||||
"coveralls": "^2.11.2",
|
||||
"es6-promise": "^2.3.0",
|
||||
"jscs": "^1.13.1",
|
||||
"jshint": "~2.8.0",
|
||||
"karma": "^0.13.2",
|
||||
"karma-browserify": "^4.2.1",
|
||||
"karma-firefox-launcher": "^0.1.6",
|
||||
"karma-mocha": "^0.2.0",
|
||||
"karma-mocha-reporter": "^1.0.2",
|
||||
"lodash": "^3.9.0",
|
||||
"mkdirp": "~0.5.1",
|
||||
"mocha": "^2.2.5",
|
||||
"native-promise-only": "^0.8.0-a",
|
||||
"nodeunit": ">0.0.0",
|
||||
"nyc": "^2.1.0",
|
||||
"rsvp": "^3.0.18",
|
||||
"semver": "^4.3.6",
|
||||
"uglify-js": "~2.4.0",
|
||||
"xyz": "^0.5.0",
|
||||
"yargs": "~3.9.1"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"dist/async.js",
|
||||
"dist/async.min.js"
|
||||
],
|
||||
"homepage": "https://github.com/caolan/async#readme",
|
||||
"jam": {
|
||||
"main": "lib/async.js",
|
||||
"include": [
|
||||
"lib/async.js",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"categories": [
|
||||
"Utilities"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"async",
|
||||
"callback",
|
||||
"utility",
|
||||
"module"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/async.js",
|
||||
"name": "async",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/caolan/async.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
||||
"lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
|
||||
"mocha-browser-test": "karma start",
|
||||
"mocha-node-test": "mocha mocha_test/",
|
||||
"mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
|
||||
"nodeunit-test": "nodeunit test/test-async.js",
|
||||
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test"
|
||||
},
|
||||
"spm": {
|
||||
"main": "lib/async.js"
|
||||
},
|
||||
"version": "1.5.2",
|
||||
"volo": {
|
||||
"main": "lib/async.js",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
}
|
||||
+609
@@ -0,0 +1,609 @@
|
||||
1.19.0 / 2019-04-25
|
||||
===================
|
||||
|
||||
* deps: bytes@3.1.0
|
||||
- Add petabyte (`pb`) support
|
||||
* deps: http-errors@1.7.2
|
||||
- Set constructor name when possible
|
||||
- deps: setprototypeof@1.1.1
|
||||
- deps: statuses@'>= 1.5.0 < 2'
|
||||
* deps: iconv-lite@0.4.24
|
||||
- Added encoding MIK
|
||||
* deps: qs@6.7.0
|
||||
- Fix parsing array brackets after index
|
||||
* deps: raw-body@2.4.0
|
||||
- deps: bytes@3.1.0
|
||||
- deps: http-errors@1.7.2
|
||||
- deps: iconv-lite@0.4.24
|
||||
* deps: type-is@~1.6.17
|
||||
- deps: mime-types@~2.1.24
|
||||
- perf: prevent internal `throw` on invalid type
|
||||
|
||||
1.18.3 / 2018-05-14
|
||||
===================
|
||||
|
||||
* Fix stack trace for strict json parse error
|
||||
* deps: depd@~1.1.2
|
||||
- perf: remove argument reassignment
|
||||
* deps: http-errors@~1.6.3
|
||||
- deps: depd@~1.1.2
|
||||
- deps: setprototypeof@1.1.0
|
||||
- deps: statuses@'>= 1.3.1 < 2'
|
||||
* deps: iconv-lite@0.4.23
|
||||
- Fix loading encoding with year appended
|
||||
- Fix deprecation warnings on Node.js 10+
|
||||
* deps: qs@6.5.2
|
||||
* deps: raw-body@2.3.3
|
||||
- deps: http-errors@1.6.3
|
||||
- deps: iconv-lite@0.4.23
|
||||
* deps: type-is@~1.6.16
|
||||
- deps: mime-types@~2.1.18
|
||||
|
||||
1.18.2 / 2017-09-22
|
||||
===================
|
||||
|
||||
* deps: debug@2.6.9
|
||||
* perf: remove argument reassignment
|
||||
|
||||
1.18.1 / 2017-09-12
|
||||
===================
|
||||
|
||||
* deps: content-type@~1.0.4
|
||||
- perf: remove argument reassignment
|
||||
- perf: skip parameter parsing when no parameters
|
||||
* deps: iconv-lite@0.4.19
|
||||
- Fix ISO-8859-1 regression
|
||||
- Update Windows-1255
|
||||
* deps: qs@6.5.1
|
||||
- Fix parsing & compacting very deep objects
|
||||
* deps: raw-body@2.3.2
|
||||
- deps: iconv-lite@0.4.19
|
||||
|
||||
1.18.0 / 2017-09-08
|
||||
===================
|
||||
|
||||
* Fix JSON strict violation error to match native parse error
|
||||
* Include the `body` property on verify errors
|
||||
* Include the `type` property on all generated errors
|
||||
* Use `http-errors` to set status code on errors
|
||||
* deps: bytes@3.0.0
|
||||
* deps: debug@2.6.8
|
||||
* deps: depd@~1.1.1
|
||||
- Remove unnecessary `Buffer` loading
|
||||
* deps: http-errors@~1.6.2
|
||||
- deps: depd@1.1.1
|
||||
* deps: iconv-lite@0.4.18
|
||||
- Add support for React Native
|
||||
- Add a warning if not loaded as utf-8
|
||||
- Fix CESU-8 decoding in Node.js 8
|
||||
- Improve speed of ISO-8859-1 encoding
|
||||
* deps: qs@6.5.0
|
||||
* deps: raw-body@2.3.1
|
||||
- Use `http-errors` for standard emitted errors
|
||||
- deps: bytes@3.0.0
|
||||
- deps: iconv-lite@0.4.18
|
||||
- perf: skip buffer decoding on overage chunk
|
||||
* perf: prevent internal `throw` when missing charset
|
||||
|
||||
1.17.2 / 2017-05-17
|
||||
===================
|
||||
|
||||
* deps: debug@2.6.7
|
||||
- Fix `DEBUG_MAX_ARRAY_LENGTH`
|
||||
- deps: ms@2.0.0
|
||||
* deps: type-is@~1.6.15
|
||||
- deps: mime-types@~2.1.15
|
||||
|
||||
1.17.1 / 2017-03-06
|
||||
===================
|
||||
|
||||
* deps: qs@6.4.0
|
||||
- Fix regression parsing keys starting with `[`
|
||||
|
||||
1.17.0 / 2017-03-01
|
||||
===================
|
||||
|
||||
* deps: http-errors@~1.6.1
|
||||
- Make `message` property enumerable for `HttpError`s
|
||||
- deps: setprototypeof@1.0.3
|
||||
* deps: qs@6.3.1
|
||||
- Fix compacting nested arrays
|
||||
|
||||
1.16.1 / 2017-02-10
|
||||
===================
|
||||
|
||||
* deps: debug@2.6.1
|
||||
- Fix deprecation messages in WebStorm and other editors
|
||||
- Undeprecate `DEBUG_FD` set to `1` or `2`
|
||||
|
||||
1.16.0 / 2017-01-17
|
||||
===================
|
||||
|
||||
* deps: debug@2.6.0
|
||||
- Allow colors in workers
|
||||
- Deprecated `DEBUG_FD` environment variable
|
||||
- Fix error when running under React Native
|
||||
- Use same color for same namespace
|
||||
- deps: ms@0.7.2
|
||||
* deps: http-errors@~1.5.1
|
||||
- deps: inherits@2.0.3
|
||||
- deps: setprototypeof@1.0.2
|
||||
- deps: statuses@'>= 1.3.1 < 2'
|
||||
* deps: iconv-lite@0.4.15
|
||||
- Added encoding MS-31J
|
||||
- Added encoding MS-932
|
||||
- Added encoding MS-936
|
||||
- Added encoding MS-949
|
||||
- Added encoding MS-950
|
||||
- Fix GBK/GB18030 handling of Euro character
|
||||
* deps: qs@6.2.1
|
||||
- Fix array parsing from skipping empty values
|
||||
* deps: raw-body@~2.2.0
|
||||
- deps: iconv-lite@0.4.15
|
||||
* deps: type-is@~1.6.14
|
||||
- deps: mime-types@~2.1.13
|
||||
|
||||
1.15.2 / 2016-06-19
|
||||
===================
|
||||
|
||||
* deps: bytes@2.4.0
|
||||
* deps: content-type@~1.0.2
|
||||
- perf: enable strict mode
|
||||
* deps: http-errors@~1.5.0
|
||||
- Use `setprototypeof` module to replace `__proto__` setting
|
||||
- deps: statuses@'>= 1.3.0 < 2'
|
||||
- perf: enable strict mode
|
||||
* deps: qs@6.2.0
|
||||
* deps: raw-body@~2.1.7
|
||||
- deps: bytes@2.4.0
|
||||
- perf: remove double-cleanup on happy path
|
||||
* deps: type-is@~1.6.13
|
||||
- deps: mime-types@~2.1.11
|
||||
|
||||
1.15.1 / 2016-05-05
|
||||
===================
|
||||
|
||||
* deps: bytes@2.3.0
|
||||
- Drop partial bytes on all parsed units
|
||||
- Fix parsing byte string that looks like hex
|
||||
* deps: raw-body@~2.1.6
|
||||
- deps: bytes@2.3.0
|
||||
* deps: type-is@~1.6.12
|
||||
- deps: mime-types@~2.1.10
|
||||
|
||||
1.15.0 / 2016-02-10
|
||||
===================
|
||||
|
||||
* deps: http-errors@~1.4.0
|
||||
- Add `HttpError` export, for `err instanceof createError.HttpError`
|
||||
- deps: inherits@2.0.1
|
||||
- deps: statuses@'>= 1.2.1 < 2'
|
||||
* deps: qs@6.1.0
|
||||
* deps: type-is@~1.6.11
|
||||
- deps: mime-types@~2.1.9
|
||||
|
||||
1.14.2 / 2015-12-16
|
||||
===================
|
||||
|
||||
* deps: bytes@2.2.0
|
||||
* deps: iconv-lite@0.4.13
|
||||
* deps: qs@5.2.0
|
||||
* deps: raw-body@~2.1.5
|
||||
- deps: bytes@2.2.0
|
||||
- deps: iconv-lite@0.4.13
|
||||
* deps: type-is@~1.6.10
|
||||
- deps: mime-types@~2.1.8
|
||||
|
||||
1.14.1 / 2015-09-27
|
||||
===================
|
||||
|
||||
* Fix issue where invalid charset results in 400 when `verify` used
|
||||
* deps: iconv-lite@0.4.12
|
||||
- Fix CESU-8 decoding in Node.js 4.x
|
||||
* deps: raw-body@~2.1.4
|
||||
- Fix masking critical errors from `iconv-lite`
|
||||
- deps: iconv-lite@0.4.12
|
||||
* deps: type-is@~1.6.9
|
||||
- deps: mime-types@~2.1.7
|
||||
|
||||
1.14.0 / 2015-09-16
|
||||
===================
|
||||
|
||||
* Fix JSON strict parse error to match syntax errors
|
||||
* Provide static `require` analysis in `urlencoded` parser
|
||||
* deps: depd@~1.1.0
|
||||
- Support web browser loading
|
||||
* deps: qs@5.1.0
|
||||
* deps: raw-body@~2.1.3
|
||||
- Fix sync callback when attaching data listener causes sync read
|
||||
* deps: type-is@~1.6.8
|
||||
- Fix type error when given invalid type to match against
|
||||
- deps: mime-types@~2.1.6
|
||||
|
||||
1.13.3 / 2015-07-31
|
||||
===================
|
||||
|
||||
* deps: type-is@~1.6.6
|
||||
- deps: mime-types@~2.1.4
|
||||
|
||||
1.13.2 / 2015-07-05
|
||||
===================
|
||||
|
||||
* deps: iconv-lite@0.4.11
|
||||
* deps: qs@4.0.0
|
||||
- Fix dropping parameters like `hasOwnProperty`
|
||||
- Fix user-visible incompatibilities from 3.1.0
|
||||
- Fix various parsing edge cases
|
||||
* deps: raw-body@~2.1.2
|
||||
- Fix error stack traces to skip `makeError`
|
||||
- deps: iconv-lite@0.4.11
|
||||
* deps: type-is@~1.6.4
|
||||
- deps: mime-types@~2.1.2
|
||||
- perf: enable strict mode
|
||||
- perf: remove argument reassignment
|
||||
|
||||
1.13.1 / 2015-06-16
|
||||
===================
|
||||
|
||||
* deps: qs@2.4.2
|
||||
- Downgraded from 3.1.0 because of user-visible incompatibilities
|
||||
|
||||
1.13.0 / 2015-06-14
|
||||
===================
|
||||
|
||||
* Add `statusCode` property on `Error`s, in addition to `status`
|
||||
* Change `type` default to `application/json` for JSON parser
|
||||
* Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser
|
||||
* Provide static `require` analysis
|
||||
* Use the `http-errors` module to generate errors
|
||||
* deps: bytes@2.1.0
|
||||
- Slight optimizations
|
||||
* deps: iconv-lite@0.4.10
|
||||
- The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
|
||||
- Leading BOM is now removed when decoding
|
||||
* deps: on-finished@~2.3.0
|
||||
- Add defined behavior for HTTP `CONNECT` requests
|
||||
- Add defined behavior for HTTP `Upgrade` requests
|
||||
- deps: ee-first@1.1.1
|
||||
* deps: qs@3.1.0
|
||||
- Fix dropping parameters like `hasOwnProperty`
|
||||
- Fix various parsing edge cases
|
||||
- Parsed object now has `null` prototype
|
||||
* deps: raw-body@~2.1.1
|
||||
- Use `unpipe` module for unpiping requests
|
||||
- deps: iconv-lite@0.4.10
|
||||
* deps: type-is@~1.6.3
|
||||
- deps: mime-types@~2.1.1
|
||||
- perf: reduce try block size
|
||||
- perf: remove bitwise operations
|
||||
* perf: enable strict mode
|
||||
* perf: remove argument reassignment
|
||||
* perf: remove delete call
|
||||
|
||||
1.12.4 / 2015-05-10
|
||||
===================
|
||||
|
||||
* deps: debug@~2.2.0
|
||||
* deps: qs@2.4.2
|
||||
- Fix allowing parameters like `constructor`
|
||||
* deps: on-finished@~2.2.1
|
||||
* deps: raw-body@~2.0.1
|
||||
- Fix a false-positive when unpiping in Node.js 0.8
|
||||
- deps: bytes@2.0.1
|
||||
* deps: type-is@~1.6.2
|
||||
- deps: mime-types@~2.0.11
|
||||
|
||||
1.12.3 / 2015-04-15
|
||||
===================
|
||||
|
||||
* Slight efficiency improvement when not debugging
|
||||
* deps: depd@~1.0.1
|
||||
* deps: iconv-lite@0.4.8
|
||||
- Add encoding alias UNICODE-1-1-UTF-7
|
||||
* deps: raw-body@1.3.4
|
||||
- Fix hanging callback if request aborts during read
|
||||
- deps: iconv-lite@0.4.8
|
||||
|
||||
1.12.2 / 2015-03-16
|
||||
===================
|
||||
|
||||
* deps: qs@2.4.1
|
||||
- Fix error when parameter `hasOwnProperty` is present
|
||||
|
||||
1.12.1 / 2015-03-15
|
||||
===================
|
||||
|
||||
* deps: debug@~2.1.3
|
||||
- Fix high intensity foreground color for bold
|
||||
- deps: ms@0.7.0
|
||||
* deps: type-is@~1.6.1
|
||||
- deps: mime-types@~2.0.10
|
||||
|
||||
1.12.0 / 2015-02-13
|
||||
===================
|
||||
|
||||
* add `debug` messages
|
||||
* accept a function for the `type` option
|
||||
* use `content-type` to parse `Content-Type` headers
|
||||
* deps: iconv-lite@0.4.7
|
||||
- Gracefully support enumerables on `Object.prototype`
|
||||
* deps: raw-body@1.3.3
|
||||
- deps: iconv-lite@0.4.7
|
||||
* deps: type-is@~1.6.0
|
||||
- fix argument reassignment
|
||||
- fix false-positives in `hasBody` `Transfer-Encoding` check
|
||||
- support wildcard for both type and subtype (`*/*`)
|
||||
- deps: mime-types@~2.0.9
|
||||
|
||||
1.11.0 / 2015-01-30
|
||||
===================
|
||||
|
||||
* make internal `extended: true` depth limit infinity
|
||||
* deps: type-is@~1.5.6
|
||||
- deps: mime-types@~2.0.8
|
||||
|
||||
1.10.2 / 2015-01-20
|
||||
===================
|
||||
|
||||
* deps: iconv-lite@0.4.6
|
||||
- Fix rare aliases of single-byte encodings
|
||||
* deps: raw-body@1.3.2
|
||||
- deps: iconv-lite@0.4.6
|
||||
|
||||
1.10.1 / 2015-01-01
|
||||
===================
|
||||
|
||||
* deps: on-finished@~2.2.0
|
||||
* deps: type-is@~1.5.5
|
||||
- deps: mime-types@~2.0.7
|
||||
|
||||
1.10.0 / 2014-12-02
|
||||
===================
|
||||
|
||||
* make internal `extended: true` array limit dynamic
|
||||
|
||||
1.9.3 / 2014-11-21
|
||||
==================
|
||||
|
||||
* deps: iconv-lite@0.4.5
|
||||
- Fix Windows-31J and X-SJIS encoding support
|
||||
* deps: qs@2.3.3
|
||||
- Fix `arrayLimit` behavior
|
||||
* deps: raw-body@1.3.1
|
||||
- deps: iconv-lite@0.4.5
|
||||
* deps: type-is@~1.5.3
|
||||
- deps: mime-types@~2.0.3
|
||||
|
||||
1.9.2 / 2014-10-27
|
||||
==================
|
||||
|
||||
* deps: qs@2.3.2
|
||||
- Fix parsing of mixed objects and values
|
||||
|
||||
1.9.1 / 2014-10-22
|
||||
==================
|
||||
|
||||
* deps: on-finished@~2.1.1
|
||||
- Fix handling of pipelined requests
|
||||
* deps: qs@2.3.0
|
||||
- Fix parsing of mixed implicit and explicit arrays
|
||||
* deps: type-is@~1.5.2
|
||||
- deps: mime-types@~2.0.2
|
||||
|
||||
1.9.0 / 2014-09-24
|
||||
==================
|
||||
|
||||
* include the charset in "unsupported charset" error message
|
||||
* include the encoding in "unsupported content encoding" error message
|
||||
* deps: depd@~1.0.0
|
||||
|
||||
1.8.4 / 2014-09-23
|
||||
==================
|
||||
|
||||
* fix content encoding to be case-insensitive
|
||||
|
||||
1.8.3 / 2014-09-19
|
||||
==================
|
||||
|
||||
* deps: qs@2.2.4
|
||||
- Fix issue with object keys starting with numbers truncated
|
||||
|
||||
1.8.2 / 2014-09-15
|
||||
==================
|
||||
|
||||
* deps: depd@0.4.5
|
||||
|
||||
1.8.1 / 2014-09-07
|
||||
==================
|
||||
|
||||
* deps: media-typer@0.3.0
|
||||
* deps: type-is@~1.5.1
|
||||
|
||||
1.8.0 / 2014-09-05
|
||||
==================
|
||||
|
||||
* make empty-body-handling consistent between chunked requests
|
||||
- empty `json` produces `{}`
|
||||
- empty `raw` produces `new Buffer(0)`
|
||||
- empty `text` produces `''`
|
||||
- empty `urlencoded` produces `{}`
|
||||
* deps: qs@2.2.3
|
||||
- Fix issue where first empty value in array is discarded
|
||||
* deps: type-is@~1.5.0
|
||||
- fix `hasbody` to be true for `content-length: 0`
|
||||
|
||||
1.7.0 / 2014-09-01
|
||||
==================
|
||||
|
||||
* add `parameterLimit` option to `urlencoded` parser
|
||||
* change `urlencoded` extended array limit to 100
|
||||
* respond with 413 when over `parameterLimit` in `urlencoded`
|
||||
|
||||
1.6.7 / 2014-08-29
|
||||
==================
|
||||
|
||||
* deps: qs@2.2.2
|
||||
- Remove unnecessary cloning
|
||||
|
||||
1.6.6 / 2014-08-27
|
||||
==================
|
||||
|
||||
* deps: qs@2.2.0
|
||||
- Array parsing fix
|
||||
- Performance improvements
|
||||
|
||||
1.6.5 / 2014-08-16
|
||||
==================
|
||||
|
||||
* deps: on-finished@2.1.0
|
||||
|
||||
1.6.4 / 2014-08-14
|
||||
==================
|
||||
|
||||
* deps: qs@1.2.2
|
||||
|
||||
1.6.3 / 2014-08-10
|
||||
==================
|
||||
|
||||
* deps: qs@1.2.1
|
||||
|
||||
1.6.2 / 2014-08-07
|
||||
==================
|
||||
|
||||
* deps: qs@1.2.0
|
||||
- Fix parsing array of objects
|
||||
|
||||
1.6.1 / 2014-08-06
|
||||
==================
|
||||
|
||||
* deps: qs@1.1.0
|
||||
- Accept urlencoded square brackets
|
||||
- Accept empty values in implicit array notation
|
||||
|
||||
1.6.0 / 2014-08-05
|
||||
==================
|
||||
|
||||
* deps: qs@1.0.2
|
||||
- Complete rewrite
|
||||
- Limits array length to 20
|
||||
- Limits object depth to 5
|
||||
- Limits parameters to 1,000
|
||||
|
||||
1.5.2 / 2014-07-27
|
||||
==================
|
||||
|
||||
* deps: depd@0.4.4
|
||||
- Work-around v8 generating empty stack traces
|
||||
|
||||
1.5.1 / 2014-07-26
|
||||
==================
|
||||
|
||||
* deps: depd@0.4.3
|
||||
- Fix exception when global `Error.stackTraceLimit` is too low
|
||||
|
||||
1.5.0 / 2014-07-20
|
||||
==================
|
||||
|
||||
* deps: depd@0.4.2
|
||||
- Add `TRACE_DEPRECATION` environment variable
|
||||
- Remove non-standard grey color from color output
|
||||
- Support `--no-deprecation` argument
|
||||
- Support `--trace-deprecation` argument
|
||||
* deps: iconv-lite@0.4.4
|
||||
- Added encoding UTF-7
|
||||
* deps: raw-body@1.3.0
|
||||
- deps: iconv-lite@0.4.4
|
||||
- Added encoding UTF-7
|
||||
- Fix `Cannot switch to old mode now` error on Node.js 0.10+
|
||||
* deps: type-is@~1.3.2
|
||||
|
||||
1.4.3 / 2014-06-19
|
||||
==================
|
||||
|
||||
* deps: type-is@1.3.1
|
||||
- fix global variable leak
|
||||
|
||||
1.4.2 / 2014-06-19
|
||||
==================
|
||||
|
||||
* deps: type-is@1.3.0
|
||||
- improve type parsing
|
||||
|
||||
1.4.1 / 2014-06-19
|
||||
==================
|
||||
|
||||
* fix urlencoded extended deprecation message
|
||||
|
||||
1.4.0 / 2014-06-19
|
||||
==================
|
||||
|
||||
* add `text` parser
|
||||
* add `raw` parser
|
||||
* check accepted charset in content-type (accepts utf-8)
|
||||
* check accepted encoding in content-encoding (accepts identity)
|
||||
* deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed
|
||||
* deprecate `urlencoded()` without provided `extended` option
|
||||
* lazy-load urlencoded parsers
|
||||
* parsers split into files for reduced mem usage
|
||||
* support gzip and deflate bodies
|
||||
- set `inflate: false` to turn off
|
||||
* deps: raw-body@1.2.2
|
||||
- Support all encodings from `iconv-lite`
|
||||
|
||||
1.3.1 / 2014-06-11
|
||||
==================
|
||||
|
||||
* deps: type-is@1.2.1
|
||||
- Switch dependency from mime to mime-types@1.0.0
|
||||
|
||||
1.3.0 / 2014-05-31
|
||||
==================
|
||||
|
||||
* add `extended` option to urlencoded parser
|
||||
|
||||
1.2.2 / 2014-05-27
|
||||
==================
|
||||
|
||||
* deps: raw-body@1.1.6
|
||||
- assert stream encoding on node.js 0.8
|
||||
- assert stream encoding on node.js < 0.10.6
|
||||
- deps: bytes@1
|
||||
|
||||
1.2.1 / 2014-05-26
|
||||
==================
|
||||
|
||||
* invoke `next(err)` after request fully read
|
||||
- prevents hung responses and socket hang ups
|
||||
|
||||
1.2.0 / 2014-05-11
|
||||
==================
|
||||
|
||||
* add `verify` option
|
||||
* deps: type-is@1.2.0
|
||||
- support suffix matching
|
||||
|
||||
1.1.2 / 2014-05-11
|
||||
==================
|
||||
|
||||
* improve json parser speed
|
||||
|
||||
1.1.1 / 2014-05-11
|
||||
==================
|
||||
|
||||
* fix repeated limit parsing with every request
|
||||
|
||||
1.1.0 / 2014-05-10
|
||||
==================
|
||||
|
||||
* add `type` option
|
||||
* deps: pin for safety and consistency
|
||||
|
||||
1.0.2 / 2014-04-14
|
||||
==================
|
||||
|
||||
* use `type-is` module
|
||||
|
||||
1.0.1 / 2014-03-20
|
||||
==================
|
||||
|
||||
* lower default limits to 100kb
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+443
@@ -0,0 +1,443 @@
|
||||
# body-parser
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Node.js body parsing middleware.
|
||||
|
||||
Parse incoming request bodies in a middleware before your handlers, available
|
||||
under the `req.body` property.
|
||||
|
||||
**Note** As `req.body`'s shape is based on user-controlled input, all
|
||||
properties and values in this object are untrusted and should be validated
|
||||
before trusting. For example, `req.body.foo.toString()` may fail in multiple
|
||||
ways, for example the `foo` property may not be there or may not be a string,
|
||||
and `toString` may not be a function and instead a string or other user input.
|
||||
|
||||
[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/).
|
||||
|
||||
_This does not handle multipart bodies_, due to their complex and typically
|
||||
large nature. For multipart bodies, you may be interested in the following
|
||||
modules:
|
||||
|
||||
* [busboy](https://www.npmjs.org/package/busboy#readme) and
|
||||
[connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
|
||||
* [multiparty](https://www.npmjs.org/package/multiparty#readme) and
|
||||
[connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
|
||||
* [formidable](https://www.npmjs.org/package/formidable#readme)
|
||||
* [multer](https://www.npmjs.org/package/multer#readme)
|
||||
|
||||
This module provides the following parsers:
|
||||
|
||||
* [JSON body parser](#bodyparserjsonoptions)
|
||||
* [Raw body parser](#bodyparserrawoptions)
|
||||
* [Text body parser](#bodyparsertextoptions)
|
||||
* [URL-encoded form body parser](#bodyparserurlencodedoptions)
|
||||
|
||||
Other body parsers you might be interested in:
|
||||
|
||||
- [body](https://www.npmjs.org/package/body#readme)
|
||||
- [co-body](https://www.npmjs.org/package/co-body#readme)
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install body-parser
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
|
||||
```js
|
||||
var bodyParser = require('body-parser')
|
||||
```
|
||||
|
||||
The `bodyParser` object exposes various factories to create middlewares. All
|
||||
middlewares will populate the `req.body` property with the parsed body when
|
||||
the `Content-Type` request header matches the `type` option, or an empty
|
||||
object (`{}`) if there was no body to parse, the `Content-Type` was not matched,
|
||||
or an error occurred.
|
||||
|
||||
The various errors returned by this module are described in the
|
||||
[errors section](#errors).
|
||||
|
||||
### bodyParser.json([options])
|
||||
|
||||
Returns middleware that only parses `json` and only looks at requests where
|
||||
the `Content-Type` header matches the `type` option. This parser accepts any
|
||||
Unicode encoding of the body and supports automatic inflation of `gzip` and
|
||||
`deflate` encodings.
|
||||
|
||||
A new `body` object containing the parsed data is populated on the `request`
|
||||
object after the middleware (i.e. `req.body`).
|
||||
|
||||
#### Options
|
||||
|
||||
The `json` function takes an optional `options` object that may contain any of
|
||||
the following keys:
|
||||
|
||||
##### inflate
|
||||
|
||||
When set to `true`, then deflated (compressed) bodies will be inflated; when
|
||||
`false`, deflated bodies are rejected. Defaults to `true`.
|
||||
|
||||
##### limit
|
||||
|
||||
Controls the maximum request body size. If this is a number, then the value
|
||||
specifies the number of bytes; if it is a string, the value is passed to the
|
||||
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
|
||||
to `'100kb'`.
|
||||
|
||||
##### reviver
|
||||
|
||||
The `reviver` option is passed directly to `JSON.parse` as the second
|
||||
argument. You can find more information on this argument
|
||||
[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
|
||||
|
||||
##### strict
|
||||
|
||||
When set to `true`, will only accept arrays and objects; when `false` will
|
||||
accept anything `JSON.parse` accepts. Defaults to `true`.
|
||||
|
||||
##### type
|
||||
|
||||
The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a string, array of strings, or a function. If not a
|
||||
function, `type` option is passed directly to the
|
||||
[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
|
||||
be an extension name (like `json`), a mime type (like `application/json`), or
|
||||
a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type`
|
||||
option is called as `fn(req)` and the request is parsed if it returns a truthy
|
||||
value. Defaults to `application/json`.
|
||||
|
||||
##### verify
|
||||
|
||||
The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
|
||||
where `buf` is a `Buffer` of the raw request body and `encoding` is the
|
||||
encoding of the request. The parsing can be aborted by throwing an error.
|
||||
|
||||
### bodyParser.raw([options])
|
||||
|
||||
Returns middleware that parses all bodies as a `Buffer` and only looks at
|
||||
requests where the `Content-Type` header matches the `type` option. This
|
||||
parser supports automatic inflation of `gzip` and `deflate` encodings.
|
||||
|
||||
A new `body` object containing the parsed data is populated on the `request`
|
||||
object after the middleware (i.e. `req.body`). This will be a `Buffer` object
|
||||
of the body.
|
||||
|
||||
#### Options
|
||||
|
||||
The `raw` function takes an optional `options` object that may contain any of
|
||||
the following keys:
|
||||
|
||||
##### inflate
|
||||
|
||||
When set to `true`, then deflated (compressed) bodies will be inflated; when
|
||||
`false`, deflated bodies are rejected. Defaults to `true`.
|
||||
|
||||
##### limit
|
||||
|
||||
Controls the maximum request body size. If this is a number, then the value
|
||||
specifies the number of bytes; if it is a string, the value is passed to the
|
||||
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
|
||||
to `'100kb'`.
|
||||
|
||||
##### type
|
||||
|
||||
The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a string, array of strings, or a function.
|
||||
If not a function, `type` option is passed directly to the
|
||||
[type-is](https://www.npmjs.org/package/type-is#readme) library and this
|
||||
can be an extension name (like `bin`), a mime type (like
|
||||
`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
|
||||
`application/*`). If a function, the `type` option is called as `fn(req)`
|
||||
and the request is parsed if it returns a truthy value. Defaults to
|
||||
`application/octet-stream`.
|
||||
|
||||
##### verify
|
||||
|
||||
The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
|
||||
where `buf` is a `Buffer` of the raw request body and `encoding` is the
|
||||
encoding of the request. The parsing can be aborted by throwing an error.
|
||||
|
||||
### bodyParser.text([options])
|
||||
|
||||
Returns middleware that parses all bodies as a string and only looks at
|
||||
requests where the `Content-Type` header matches the `type` option. This
|
||||
parser supports automatic inflation of `gzip` and `deflate` encodings.
|
||||
|
||||
A new `body` string containing the parsed data is populated on the `request`
|
||||
object after the middleware (i.e. `req.body`). This will be a string of the
|
||||
body.
|
||||
|
||||
#### Options
|
||||
|
||||
The `text` function takes an optional `options` object that may contain any of
|
||||
the following keys:
|
||||
|
||||
##### defaultCharset
|
||||
|
||||
Specify the default character set for the text content if the charset is not
|
||||
specified in the `Content-Type` header of the request. Defaults to `utf-8`.
|
||||
|
||||
##### inflate
|
||||
|
||||
When set to `true`, then deflated (compressed) bodies will be inflated; when
|
||||
`false`, deflated bodies are rejected. Defaults to `true`.
|
||||
|
||||
##### limit
|
||||
|
||||
Controls the maximum request body size. If this is a number, then the value
|
||||
specifies the number of bytes; if it is a string, the value is passed to the
|
||||
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
|
||||
to `'100kb'`.
|
||||
|
||||
##### type
|
||||
|
||||
The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a string, array of strings, or a function. If not
|
||||
a function, `type` option is passed directly to the
|
||||
[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
|
||||
be an extension name (like `txt`), a mime type (like `text/plain`), or a mime
|
||||
type with a wildcard (like `*/*` or `text/*`). If a function, the `type`
|
||||
option is called as `fn(req)` and the request is parsed if it returns a
|
||||
truthy value. Defaults to `text/plain`.
|
||||
|
||||
##### verify
|
||||
|
||||
The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
|
||||
where `buf` is a `Buffer` of the raw request body and `encoding` is the
|
||||
encoding of the request. The parsing can be aborted by throwing an error.
|
||||
|
||||
### bodyParser.urlencoded([options])
|
||||
|
||||
Returns middleware that only parses `urlencoded` bodies and only looks at
|
||||
requests where the `Content-Type` header matches the `type` option. This
|
||||
parser accepts only UTF-8 encoding of the body and supports automatic
|
||||
inflation of `gzip` and `deflate` encodings.
|
||||
|
||||
A new `body` object containing the parsed data is populated on the `request`
|
||||
object after the middleware (i.e. `req.body`). This object will contain
|
||||
key-value pairs, where the value can be a string or array (when `extended` is
|
||||
`false`), or any type (when `extended` is `true`).
|
||||
|
||||
#### Options
|
||||
|
||||
The `urlencoded` function takes an optional `options` object that may contain
|
||||
any of the following keys:
|
||||
|
||||
##### extended
|
||||
|
||||
The `extended` option allows to choose between parsing the URL-encoded data
|
||||
with the `querystring` library (when `false`) or the `qs` library (when
|
||||
`true`). The "extended" syntax allows for rich objects and arrays to be
|
||||
encoded into the URL-encoded format, allowing for a JSON-like experience
|
||||
with URL-encoded. For more information, please
|
||||
[see the qs library](https://www.npmjs.org/package/qs#readme).
|
||||
|
||||
Defaults to `true`, but using the default has been deprecated. Please
|
||||
research into the difference between `qs` and `querystring` and choose the
|
||||
appropriate setting.
|
||||
|
||||
##### inflate
|
||||
|
||||
When set to `true`, then deflated (compressed) bodies will be inflated; when
|
||||
`false`, deflated bodies are rejected. Defaults to `true`.
|
||||
|
||||
##### limit
|
||||
|
||||
Controls the maximum request body size. If this is a number, then the value
|
||||
specifies the number of bytes; if it is a string, the value is passed to the
|
||||
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
|
||||
to `'100kb'`.
|
||||
|
||||
##### parameterLimit
|
||||
|
||||
The `parameterLimit` option controls the maximum number of parameters that
|
||||
are allowed in the URL-encoded data. If a request contains more parameters
|
||||
than this value, a 413 will be returned to the client. Defaults to `1000`.
|
||||
|
||||
##### type
|
||||
|
||||
The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a string, array of strings, or a function. If not
|
||||
a function, `type` option is passed directly to the
|
||||
[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
|
||||
be an extension name (like `urlencoded`), a mime type (like
|
||||
`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
|
||||
`*/x-www-form-urlencoded`). If a function, the `type` option is called as
|
||||
`fn(req)` and the request is parsed if it returns a truthy value. Defaults
|
||||
to `application/x-www-form-urlencoded`.
|
||||
|
||||
##### verify
|
||||
|
||||
The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
|
||||
where `buf` is a `Buffer` of the raw request body and `encoding` is the
|
||||
encoding of the request. The parsing can be aborted by throwing an error.
|
||||
|
||||
## Errors
|
||||
|
||||
The middlewares provided by this module create errors depending on the error
|
||||
condition during parsing. The errors will typically have a `status`/`statusCode`
|
||||
property that contains the suggested HTTP response code, an `expose` property
|
||||
to determine if the `message` property should be displayed to the client, a
|
||||
`type` property to determine the type of error without matching against the
|
||||
`message`, and a `body` property containing the read body, if available.
|
||||
|
||||
The following are the common errors emitted, though any error can come through
|
||||
for various reasons.
|
||||
|
||||
### content encoding unsupported
|
||||
|
||||
This error will occur when the request had a `Content-Encoding` header that
|
||||
contained an encoding but the "inflation" option was set to `false`. The
|
||||
`status` property is set to `415`, the `type` property is set to
|
||||
`'encoding.unsupported'`, and the `charset` property will be set to the
|
||||
encoding that is unsupported.
|
||||
|
||||
### request aborted
|
||||
|
||||
This error will occur when the request is aborted by the client before reading
|
||||
the body has finished. The `received` property will be set to the number of
|
||||
bytes received before the request was aborted and the `expected` property is
|
||||
set to the number of expected bytes. The `status` property is set to `400`
|
||||
and `type` property is set to `'request.aborted'`.
|
||||
|
||||
### request entity too large
|
||||
|
||||
This error will occur when the request body's size is larger than the "limit"
|
||||
option. The `limit` property will be set to the byte limit and the `length`
|
||||
property will be set to the request body's length. The `status` property is
|
||||
set to `413` and the `type` property is set to `'entity.too.large'`.
|
||||
|
||||
### request size did not match content length
|
||||
|
||||
This error will occur when the request's length did not match the length from
|
||||
the `Content-Length` header. This typically occurs when the request is malformed,
|
||||
typically when the `Content-Length` header was calculated based on characters
|
||||
instead of bytes. The `status` property is set to `400` and the `type` property
|
||||
is set to `'request.size.invalid'`.
|
||||
|
||||
### stream encoding should not be set
|
||||
|
||||
This error will occur when something called the `req.setEncoding` method prior
|
||||
to this middleware. This module operates directly on bytes only and you cannot
|
||||
call `req.setEncoding` when using this module. The `status` property is set to
|
||||
`500` and the `type` property is set to `'stream.encoding.set'`.
|
||||
|
||||
### too many parameters
|
||||
|
||||
This error will occur when the content of the request exceeds the configured
|
||||
`parameterLimit` for the `urlencoded` parser. The `status` property is set to
|
||||
`413` and the `type` property is set to `'parameters.too.many'`.
|
||||
|
||||
### unsupported charset "BOGUS"
|
||||
|
||||
This error will occur when the request had a charset parameter in the
|
||||
`Content-Type` header, but the `iconv-lite` module does not support it OR the
|
||||
parser does not support it. The charset is contained in the message as well
|
||||
as in the `charset` property. The `status` property is set to `415`, the
|
||||
`type` property is set to `'charset.unsupported'`, and the `charset` property
|
||||
is set to the charset that is unsupported.
|
||||
|
||||
### unsupported content encoding "bogus"
|
||||
|
||||
This error will occur when the request had a `Content-Encoding` header that
|
||||
contained an unsupported encoding. The encoding is contained in the message
|
||||
as well as in the `encoding` property. The `status` property is set to `415`,
|
||||
the `type` property is set to `'encoding.unsupported'`, and the `encoding`
|
||||
property is set to the encoding that is unsupported.
|
||||
|
||||
## Examples
|
||||
|
||||
### Express/Connect top-level generic
|
||||
|
||||
This example demonstrates adding a generic JSON and URL-encoded parser as a
|
||||
top-level middleware, which will parse the bodies of all incoming requests.
|
||||
This is the simplest setup.
|
||||
|
||||
```js
|
||||
var express = require('express')
|
||||
var bodyParser = require('body-parser')
|
||||
|
||||
var app = express()
|
||||
|
||||
// parse application/x-www-form-urlencoded
|
||||
app.use(bodyParser.urlencoded({ extended: false }))
|
||||
|
||||
// parse application/json
|
||||
app.use(bodyParser.json())
|
||||
|
||||
app.use(function (req, res) {
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
res.write('you posted:\n')
|
||||
res.end(JSON.stringify(req.body, null, 2))
|
||||
})
|
||||
```
|
||||
|
||||
### Express route-specific
|
||||
|
||||
This example demonstrates adding body parsers specifically to the routes that
|
||||
need them. In general, this is the most recommended way to use body-parser with
|
||||
Express.
|
||||
|
||||
```js
|
||||
var express = require('express')
|
||||
var bodyParser = require('body-parser')
|
||||
|
||||
var app = express()
|
||||
|
||||
// create application/json parser
|
||||
var jsonParser = bodyParser.json()
|
||||
|
||||
// create application/x-www-form-urlencoded parser
|
||||
var urlencodedParser = bodyParser.urlencoded({ extended: false })
|
||||
|
||||
// POST /login gets urlencoded bodies
|
||||
app.post('/login', urlencodedParser, function (req, res) {
|
||||
res.send('welcome, ' + req.body.username)
|
||||
})
|
||||
|
||||
// POST /api/users gets JSON bodies
|
||||
app.post('/api/users', jsonParser, function (req, res) {
|
||||
// create user in req.body
|
||||
})
|
||||
```
|
||||
|
||||
### Change accepted type for parsers
|
||||
|
||||
All the parsers accept a `type` option which allows you to change the
|
||||
`Content-Type` that the middleware will parse.
|
||||
|
||||
```js
|
||||
var express = require('express')
|
||||
var bodyParser = require('body-parser')
|
||||
|
||||
var app = express()
|
||||
|
||||
// parse various different custom JSON types as JSON
|
||||
app.use(bodyParser.json({ type: 'application/*+json' }))
|
||||
|
||||
// parse some custom thing into a Buffer
|
||||
app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
|
||||
|
||||
// parse an HTML body into a string
|
||||
app.use(bodyParser.text({ type: 'text/html' }))
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/body-parser.svg
|
||||
[npm-url]: https://npmjs.org/package/body-parser
|
||||
[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg
|
||||
[travis-url]: https://travis-ci.org/expressjs/body-parser
|
||||
[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
|
||||
[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
|
||||
[downloads-url]: https://npmjs.org/package/body-parser
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var deprecate = require('depd')('body-parser')
|
||||
|
||||
/**
|
||||
* Cache of loaded parsers.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var parsers = Object.create(null)
|
||||
|
||||
/**
|
||||
* @typedef Parsers
|
||||
* @type {function}
|
||||
* @property {function} json
|
||||
* @property {function} raw
|
||||
* @property {function} text
|
||||
* @property {function} urlencoded
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @type {Parsers}
|
||||
*/
|
||||
|
||||
exports = module.exports = deprecate.function(bodyParser,
|
||||
'bodyParser: use individual json/urlencoded middlewares')
|
||||
|
||||
/**
|
||||
* JSON parser.
|
||||
* @public
|
||||
*/
|
||||
|
||||
Object.defineProperty(exports, 'json', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: createParserGetter('json')
|
||||
})
|
||||
|
||||
/**
|
||||
* Raw parser.
|
||||
* @public
|
||||
*/
|
||||
|
||||
Object.defineProperty(exports, 'raw', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: createParserGetter('raw')
|
||||
})
|
||||
|
||||
/**
|
||||
* Text parser.
|
||||
* @public
|
||||
*/
|
||||
|
||||
Object.defineProperty(exports, 'text', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: createParserGetter('text')
|
||||
})
|
||||
|
||||
/**
|
||||
* URL-encoded parser.
|
||||
* @public
|
||||
*/
|
||||
|
||||
Object.defineProperty(exports, 'urlencoded', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: createParserGetter('urlencoded')
|
||||
})
|
||||
|
||||
/**
|
||||
* Create a middleware to parse json and urlencoded bodies.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @return {function}
|
||||
* @deprecated
|
||||
* @public
|
||||
*/
|
||||
|
||||
function bodyParser (options) {
|
||||
var opts = {}
|
||||
|
||||
// exclude type option
|
||||
if (options) {
|
||||
for (var prop in options) {
|
||||
if (prop !== 'type') {
|
||||
opts[prop] = options[prop]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var _urlencoded = exports.urlencoded(opts)
|
||||
var _json = exports.json(opts)
|
||||
|
||||
return function bodyParser (req, res, next) {
|
||||
_json(req, res, function (err) {
|
||||
if (err) return next(err)
|
||||
_urlencoded(req, res, next)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a getter for loading a parser.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function createParserGetter (name) {
|
||||
return function get () {
|
||||
return loadParser(name)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a parser module.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function loadParser (parserName) {
|
||||
var parser = parsers[parserName]
|
||||
|
||||
if (parser !== undefined) {
|
||||
return parser
|
||||
}
|
||||
|
||||
// this uses a switch for static require analysis
|
||||
switch (parserName) {
|
||||
case 'json':
|
||||
parser = require('./lib/types/json')
|
||||
break
|
||||
case 'raw':
|
||||
parser = require('./lib/types/raw')
|
||||
break
|
||||
case 'text':
|
||||
parser = require('./lib/types/text')
|
||||
break
|
||||
case 'urlencoded':
|
||||
parser = require('./lib/types/urlencoded')
|
||||
break
|
||||
}
|
||||
|
||||
// store to prevent invoking require()
|
||||
return (parsers[parserName] = parser)
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var createError = require('http-errors')
|
||||
var getBody = require('raw-body')
|
||||
var iconv = require('iconv-lite')
|
||||
var onFinished = require('on-finished')
|
||||
var zlib = require('zlib')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = read
|
||||
|
||||
/**
|
||||
* Read a request into a buffer and parse.
|
||||
*
|
||||
* @param {object} req
|
||||
* @param {object} res
|
||||
* @param {function} next
|
||||
* @param {function} parse
|
||||
* @param {function} debug
|
||||
* @param {object} options
|
||||
* @private
|
||||
*/
|
||||
|
||||
function read (req, res, next, parse, debug, options) {
|
||||
var length
|
||||
var opts = options
|
||||
var stream
|
||||
|
||||
// flag as parsed
|
||||
req._body = true
|
||||
|
||||
// read options
|
||||
var encoding = opts.encoding !== null
|
||||
? opts.encoding
|
||||
: null
|
||||
var verify = opts.verify
|
||||
|
||||
try {
|
||||
// get the content stream
|
||||
stream = contentstream(req, debug, opts.inflate)
|
||||
length = stream.length
|
||||
stream.length = undefined
|
||||
} catch (err) {
|
||||
return next(err)
|
||||
}
|
||||
|
||||
// set raw-body options
|
||||
opts.length = length
|
||||
opts.encoding = verify
|
||||
? null
|
||||
: encoding
|
||||
|
||||
// assert charset is supported
|
||||
if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
|
||||
return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
||||
charset: encoding.toLowerCase(),
|
||||
type: 'charset.unsupported'
|
||||
}))
|
||||
}
|
||||
|
||||
// read body
|
||||
debug('read body')
|
||||
getBody(stream, opts, function (error, body) {
|
||||
if (error) {
|
||||
var _error
|
||||
|
||||
if (error.type === 'encoding.unsupported') {
|
||||
// echo back charset
|
||||
_error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
||||
charset: encoding.toLowerCase(),
|
||||
type: 'charset.unsupported'
|
||||
})
|
||||
} else {
|
||||
// set status code on error
|
||||
_error = createError(400, error)
|
||||
}
|
||||
|
||||
// read off entire request
|
||||
stream.resume()
|
||||
onFinished(req, function onfinished () {
|
||||
next(createError(400, _error))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// verify
|
||||
if (verify) {
|
||||
try {
|
||||
debug('verify body')
|
||||
verify(req, res, body, encoding)
|
||||
} catch (err) {
|
||||
next(createError(403, err, {
|
||||
body: body,
|
||||
type: err.type || 'entity.verify.failed'
|
||||
}))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// parse
|
||||
var str = body
|
||||
try {
|
||||
debug('parse body')
|
||||
str = typeof body !== 'string' && encoding !== null
|
||||
? iconv.decode(body, encoding)
|
||||
: body
|
||||
req.body = parse(str)
|
||||
} catch (err) {
|
||||
next(createError(400, err, {
|
||||
body: str,
|
||||
type: err.type || 'entity.parse.failed'
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
next()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content stream of the request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @param {function} debug
|
||||
* @param {boolean} [inflate=true]
|
||||
* @return {object}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function contentstream (req, debug, inflate) {
|
||||
var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
|
||||
var length = req.headers['content-length']
|
||||
var stream
|
||||
|
||||
debug('content-encoding "%s"', encoding)
|
||||
|
||||
if (inflate === false && encoding !== 'identity') {
|
||||
throw createError(415, 'content encoding unsupported', {
|
||||
encoding: encoding,
|
||||
type: 'encoding.unsupported'
|
||||
})
|
||||
}
|
||||
|
||||
switch (encoding) {
|
||||
case 'deflate':
|
||||
stream = zlib.createInflate()
|
||||
debug('inflate body')
|
||||
req.pipe(stream)
|
||||
break
|
||||
case 'gzip':
|
||||
stream = zlib.createGunzip()
|
||||
debug('gunzip body')
|
||||
req.pipe(stream)
|
||||
break
|
||||
case 'identity':
|
||||
stream = req
|
||||
stream.length = length
|
||||
break
|
||||
default:
|
||||
throw createError(415, 'unsupported content encoding "' + encoding + '"', {
|
||||
encoding: encoding,
|
||||
type: 'encoding.unsupported'
|
||||
})
|
||||
}
|
||||
|
||||
return stream
|
||||
}
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var bytes = require('bytes')
|
||||
var contentType = require('content-type')
|
||||
var createError = require('http-errors')
|
||||
var debug = require('debug')('body-parser:json')
|
||||
var read = require('../read')
|
||||
var typeis = require('type-is')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = json
|
||||
|
||||
/**
|
||||
* RegExp to match the first non-space in a string.
|
||||
*
|
||||
* Allowed whitespace is defined in RFC 7159:
|
||||
*
|
||||
* ws = *(
|
||||
* %x20 / ; Space
|
||||
* %x09 / ; Horizontal tab
|
||||
* %x0A / ; Line feed or New line
|
||||
* %x0D ) ; Carriage return
|
||||
*/
|
||||
|
||||
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex
|
||||
|
||||
/**
|
||||
* Create a middleware to parse JSON bodies.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @return {function}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function json (options) {
|
||||
var opts = options || {}
|
||||
|
||||
var limit = typeof opts.limit !== 'number'
|
||||
? bytes.parse(opts.limit || '100kb')
|
||||
: opts.limit
|
||||
var inflate = opts.inflate !== false
|
||||
var reviver = opts.reviver
|
||||
var strict = opts.strict !== false
|
||||
var type = opts.type || 'application/json'
|
||||
var verify = opts.verify || false
|
||||
|
||||
if (verify !== false && typeof verify !== 'function') {
|
||||
throw new TypeError('option verify must be function')
|
||||
}
|
||||
|
||||
// create the appropriate type checking function
|
||||
var shouldParse = typeof type !== 'function'
|
||||
? typeChecker(type)
|
||||
: type
|
||||
|
||||
function parse (body) {
|
||||
if (body.length === 0) {
|
||||
// special-case empty json body, as it's a common client-side mistake
|
||||
// TODO: maybe make this configurable or part of "strict" option
|
||||
return {}
|
||||
}
|
||||
|
||||
if (strict) {
|
||||
var first = firstchar(body)
|
||||
|
||||
if (first !== '{' && first !== '[') {
|
||||
debug('strict violation')
|
||||
throw createStrictSyntaxError(body, first)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
debug('parse json')
|
||||
return JSON.parse(body, reviver)
|
||||
} catch (e) {
|
||||
throw normalizeJsonSyntaxError(e, {
|
||||
message: e.message,
|
||||
stack: e.stack
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return function jsonParser (req, res, next) {
|
||||
if (req._body) {
|
||||
debug('body already parsed')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
req.body = req.body || {}
|
||||
|
||||
// skip requests without bodies
|
||||
if (!typeis.hasBody(req)) {
|
||||
debug('skip empty body')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
debug('content-type %j', req.headers['content-type'])
|
||||
|
||||
// determine if request should be parsed
|
||||
if (!shouldParse(req)) {
|
||||
debug('skip parsing')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// assert charset per RFC 7159 sec 8.1
|
||||
var charset = getCharset(req) || 'utf-8'
|
||||
if (charset.substr(0, 4) !== 'utf-') {
|
||||
debug('invalid charset')
|
||||
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
|
||||
charset: charset,
|
||||
type: 'charset.unsupported'
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
// read
|
||||
read(req, res, next, parse, debug, {
|
||||
encoding: charset,
|
||||
inflate: inflate,
|
||||
limit: limit,
|
||||
verify: verify
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create strict violation syntax error matching native error.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {string} char
|
||||
* @return {Error}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function createStrictSyntaxError (str, char) {
|
||||
var index = str.indexOf(char)
|
||||
var partial = str.substring(0, index) + '#'
|
||||
|
||||
try {
|
||||
JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
|
||||
} catch (e) {
|
||||
return normalizeJsonSyntaxError(e, {
|
||||
message: e.message.replace('#', char),
|
||||
stack: e.stack
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the first non-whitespace character in a string.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {function}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function firstchar (str) {
|
||||
return FIRST_CHAR_REGEXP.exec(str)[1]
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the charset of a request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function getCharset (req) {
|
||||
try {
|
||||
return (contentType.parse(req).parameters.charset || '').toLowerCase()
|
||||
} catch (e) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize a SyntaxError for JSON.parse.
|
||||
*
|
||||
* @param {SyntaxError} error
|
||||
* @param {object} obj
|
||||
* @return {SyntaxError}
|
||||
*/
|
||||
|
||||
function normalizeJsonSyntaxError (error, obj) {
|
||||
var keys = Object.getOwnPropertyNames(error)
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i]
|
||||
if (key !== 'stack' && key !== 'message') {
|
||||
delete error[key]
|
||||
}
|
||||
}
|
||||
|
||||
// replace stack before message for Node.js 0.10 and below
|
||||
error.stack = obj.stack.replace(error.message, obj.message)
|
||||
error.message = obj.message
|
||||
|
||||
return error
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the simple type checker.
|
||||
*
|
||||
* @param {string} type
|
||||
* @return {function}
|
||||
*/
|
||||
|
||||
function typeChecker (type) {
|
||||
return function checkType (req) {
|
||||
return Boolean(typeis(req, type))
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var bytes = require('bytes')
|
||||
var debug = require('debug')('body-parser:raw')
|
||||
var read = require('../read')
|
||||
var typeis = require('type-is')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = raw
|
||||
|
||||
/**
|
||||
* Create a middleware to parse raw bodies.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @return {function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function raw (options) {
|
||||
var opts = options || {}
|
||||
|
||||
var inflate = opts.inflate !== false
|
||||
var limit = typeof opts.limit !== 'number'
|
||||
? bytes.parse(opts.limit || '100kb')
|
||||
: opts.limit
|
||||
var type = opts.type || 'application/octet-stream'
|
||||
var verify = opts.verify || false
|
||||
|
||||
if (verify !== false && typeof verify !== 'function') {
|
||||
throw new TypeError('option verify must be function')
|
||||
}
|
||||
|
||||
// create the appropriate type checking function
|
||||
var shouldParse = typeof type !== 'function'
|
||||
? typeChecker(type)
|
||||
: type
|
||||
|
||||
function parse (buf) {
|
||||
return buf
|
||||
}
|
||||
|
||||
return function rawParser (req, res, next) {
|
||||
if (req._body) {
|
||||
debug('body already parsed')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
req.body = req.body || {}
|
||||
|
||||
// skip requests without bodies
|
||||
if (!typeis.hasBody(req)) {
|
||||
debug('skip empty body')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
debug('content-type %j', req.headers['content-type'])
|
||||
|
||||
// determine if request should be parsed
|
||||
if (!shouldParse(req)) {
|
||||
debug('skip parsing')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// read
|
||||
read(req, res, next, parse, debug, {
|
||||
encoding: null,
|
||||
inflate: inflate,
|
||||
limit: limit,
|
||||
verify: verify
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the simple type checker.
|
||||
*
|
||||
* @param {string} type
|
||||
* @return {function}
|
||||
*/
|
||||
|
||||
function typeChecker (type) {
|
||||
return function checkType (req) {
|
||||
return Boolean(typeis(req, type))
|
||||
}
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var bytes = require('bytes')
|
||||
var contentType = require('content-type')
|
||||
var debug = require('debug')('body-parser:text')
|
||||
var read = require('../read')
|
||||
var typeis = require('type-is')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = text
|
||||
|
||||
/**
|
||||
* Create a middleware to parse text bodies.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @return {function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function text (options) {
|
||||
var opts = options || {}
|
||||
|
||||
var defaultCharset = opts.defaultCharset || 'utf-8'
|
||||
var inflate = opts.inflate !== false
|
||||
var limit = typeof opts.limit !== 'number'
|
||||
? bytes.parse(opts.limit || '100kb')
|
||||
: opts.limit
|
||||
var type = opts.type || 'text/plain'
|
||||
var verify = opts.verify || false
|
||||
|
||||
if (verify !== false && typeof verify !== 'function') {
|
||||
throw new TypeError('option verify must be function')
|
||||
}
|
||||
|
||||
// create the appropriate type checking function
|
||||
var shouldParse = typeof type !== 'function'
|
||||
? typeChecker(type)
|
||||
: type
|
||||
|
||||
function parse (buf) {
|
||||
return buf
|
||||
}
|
||||
|
||||
return function textParser (req, res, next) {
|
||||
if (req._body) {
|
||||
debug('body already parsed')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
req.body = req.body || {}
|
||||
|
||||
// skip requests without bodies
|
||||
if (!typeis.hasBody(req)) {
|
||||
debug('skip empty body')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
debug('content-type %j', req.headers['content-type'])
|
||||
|
||||
// determine if request should be parsed
|
||||
if (!shouldParse(req)) {
|
||||
debug('skip parsing')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// get charset
|
||||
var charset = getCharset(req) || defaultCharset
|
||||
|
||||
// read
|
||||
read(req, res, next, parse, debug, {
|
||||
encoding: charset,
|
||||
inflate: inflate,
|
||||
limit: limit,
|
||||
verify: verify
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the charset of a request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function getCharset (req) {
|
||||
try {
|
||||
return (contentType.parse(req).parameters.charset || '').toLowerCase()
|
||||
} catch (e) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the simple type checker.
|
||||
*
|
||||
* @param {string} type
|
||||
* @return {function}
|
||||
*/
|
||||
|
||||
function typeChecker (type) {
|
||||
return function checkType (req) {
|
||||
return Boolean(typeis(req, type))
|
||||
}
|
||||
}
|
||||
+284
@@ -0,0 +1,284 @@
|
||||
/*!
|
||||
* body-parser
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var bytes = require('bytes')
|
||||
var contentType = require('content-type')
|
||||
var createError = require('http-errors')
|
||||
var debug = require('debug')('body-parser:urlencoded')
|
||||
var deprecate = require('depd')('body-parser')
|
||||
var read = require('../read')
|
||||
var typeis = require('type-is')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = urlencoded
|
||||
|
||||
/**
|
||||
* Cache of parser modules.
|
||||
*/
|
||||
|
||||
var parsers = Object.create(null)
|
||||
|
||||
/**
|
||||
* Create a middleware to parse urlencoded bodies.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @return {function}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function urlencoded (options) {
|
||||
var opts = options || {}
|
||||
|
||||
// notice because option default will flip in next major
|
||||
if (opts.extended === undefined) {
|
||||
deprecate('undefined extended: provide extended option')
|
||||
}
|
||||
|
||||
var extended = opts.extended !== false
|
||||
var inflate = opts.inflate !== false
|
||||
var limit = typeof opts.limit !== 'number'
|
||||
? bytes.parse(opts.limit || '100kb')
|
||||
: opts.limit
|
||||
var type = opts.type || 'application/x-www-form-urlencoded'
|
||||
var verify = opts.verify || false
|
||||
|
||||
if (verify !== false && typeof verify !== 'function') {
|
||||
throw new TypeError('option verify must be function')
|
||||
}
|
||||
|
||||
// create the appropriate query parser
|
||||
var queryparse = extended
|
||||
? extendedparser(opts)
|
||||
: simpleparser(opts)
|
||||
|
||||
// create the appropriate type checking function
|
||||
var shouldParse = typeof type !== 'function'
|
||||
? typeChecker(type)
|
||||
: type
|
||||
|
||||
function parse (body) {
|
||||
return body.length
|
||||
? queryparse(body)
|
||||
: {}
|
||||
}
|
||||
|
||||
return function urlencodedParser (req, res, next) {
|
||||
if (req._body) {
|
||||
debug('body already parsed')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
req.body = req.body || {}
|
||||
|
||||
// skip requests without bodies
|
||||
if (!typeis.hasBody(req)) {
|
||||
debug('skip empty body')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
debug('content-type %j', req.headers['content-type'])
|
||||
|
||||
// determine if request should be parsed
|
||||
if (!shouldParse(req)) {
|
||||
debug('skip parsing')
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// assert charset
|
||||
var charset = getCharset(req) || 'utf-8'
|
||||
if (charset !== 'utf-8') {
|
||||
debug('invalid charset')
|
||||
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
|
||||
charset: charset,
|
||||
type: 'charset.unsupported'
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
// read
|
||||
read(req, res, next, parse, debug, {
|
||||
debug: debug,
|
||||
encoding: charset,
|
||||
inflate: inflate,
|
||||
limit: limit,
|
||||
verify: verify
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the extended query parser.
|
||||
*
|
||||
* @param {object} options
|
||||
*/
|
||||
|
||||
function extendedparser (options) {
|
||||
var parameterLimit = options.parameterLimit !== undefined
|
||||
? options.parameterLimit
|
||||
: 1000
|
||||
var parse = parser('qs')
|
||||
|
||||
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
||||
throw new TypeError('option parameterLimit must be a positive number')
|
||||
}
|
||||
|
||||
if (isFinite(parameterLimit)) {
|
||||
parameterLimit = parameterLimit | 0
|
||||
}
|
||||
|
||||
return function queryparse (body) {
|
||||
var paramCount = parameterCount(body, parameterLimit)
|
||||
|
||||
if (paramCount === undefined) {
|
||||
debug('too many parameters')
|
||||
throw createError(413, 'too many parameters', {
|
||||
type: 'parameters.too.many'
|
||||
})
|
||||
}
|
||||
|
||||
var arrayLimit = Math.max(100, paramCount)
|
||||
|
||||
debug('parse extended urlencoding')
|
||||
return parse(body, {
|
||||
allowPrototypes: true,
|
||||
arrayLimit: arrayLimit,
|
||||
depth: Infinity,
|
||||
parameterLimit: parameterLimit
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the charset of a request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function getCharset (req) {
|
||||
try {
|
||||
return (contentType.parse(req).parameters.charset || '').toLowerCase()
|
||||
} catch (e) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the number of parameters, stopping once limit reached
|
||||
*
|
||||
* @param {string} body
|
||||
* @param {number} limit
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function parameterCount (body, limit) {
|
||||
var count = 0
|
||||
var index = 0
|
||||
|
||||
while ((index = body.indexOf('&', index)) !== -1) {
|
||||
count++
|
||||
index++
|
||||
|
||||
if (count === limit) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parser for module name dynamically.
|
||||
*
|
||||
* @param {string} name
|
||||
* @return {function}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function parser (name) {
|
||||
var mod = parsers[name]
|
||||
|
||||
if (mod !== undefined) {
|
||||
return mod.parse
|
||||
}
|
||||
|
||||
// this uses a switch for static require analysis
|
||||
switch (name) {
|
||||
case 'qs':
|
||||
mod = require('qs')
|
||||
break
|
||||
case 'querystring':
|
||||
mod = require('querystring')
|
||||
break
|
||||
}
|
||||
|
||||
// store to prevent invoking require()
|
||||
parsers[name] = mod
|
||||
|
||||
return mod.parse
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the simple query parser.
|
||||
*
|
||||
* @param {object} options
|
||||
*/
|
||||
|
||||
function simpleparser (options) {
|
||||
var parameterLimit = options.parameterLimit !== undefined
|
||||
? options.parameterLimit
|
||||
: 1000
|
||||
var parse = parser('querystring')
|
||||
|
||||
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
||||
throw new TypeError('option parameterLimit must be a positive number')
|
||||
}
|
||||
|
||||
if (isFinite(parameterLimit)) {
|
||||
parameterLimit = parameterLimit | 0
|
||||
}
|
||||
|
||||
return function queryparse (body) {
|
||||
var paramCount = parameterCount(body, parameterLimit)
|
||||
|
||||
if (paramCount === undefined) {
|
||||
debug('too many parameters')
|
||||
throw createError(413, 'too many parameters', {
|
||||
type: 'parameters.too.many'
|
||||
})
|
||||
}
|
||||
|
||||
debug('parse urlencoding')
|
||||
return parse(body, undefined, undefined, { maxKeys: parameterLimit })
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the simple type checker.
|
||||
*
|
||||
* @param {string} type
|
||||
* @return {function}
|
||||
*/
|
||||
|
||||
function typeChecker (type) {
|
||||
return function checkType (req) {
|
||||
return Boolean(typeis(req, type))
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0,
|
||||
"no-empty": [1, { "allowEmptyCatch": true }]
|
||||
},
|
||||
"extends": "eslint:recommended"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
support
|
||||
test
|
||||
examples
|
||||
example
|
||||
*.sock
|
||||
dist
|
||||
yarn.lock
|
||||
coverage
|
||||
bower.json
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
- "5"
|
||||
- "4"
|
||||
|
||||
install:
|
||||
- make node_modules
|
||||
|
||||
script:
|
||||
- make lint
|
||||
- make test
|
||||
- make coveralls
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
|
||||
2.6.9 / 2017-09-22
|
||||
==================
|
||||
|
||||
* remove ReDoS regexp in %o formatter (#504)
|
||||
|
||||
2.6.8 / 2017-05-18
|
||||
==================
|
||||
|
||||
* Fix: Check for undefined on browser globals (#462, @marbemac)
|
||||
|
||||
2.6.7 / 2017-05-16
|
||||
==================
|
||||
|
||||
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
|
||||
* Fix: Inline extend function in node implementation (#452, @dougwilson)
|
||||
* Docs: Fix typo (#455, @msasad)
|
||||
|
||||
2.6.5 / 2017-04-27
|
||||
==================
|
||||
|
||||
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
|
||||
* Misc: clean up browser reference checks (#447, @thebigredgeek)
|
||||
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
|
||||
|
||||
|
||||
2.6.4 / 2017-04-20
|
||||
==================
|
||||
|
||||
* Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
|
||||
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
|
||||
* Misc: update "ms" to v0.7.3 (@tootallnate)
|
||||
|
||||
2.6.3 / 2017-03-13
|
||||
==================
|
||||
|
||||
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
|
||||
* Docs: Changelog fix (@thebigredgeek)
|
||||
|
||||
2.6.2 / 2017-03-10
|
||||
==================
|
||||
|
||||
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
|
||||
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
|
||||
* Docs: Add Slackin invite badge (@tootallnate)
|
||||
|
||||
2.6.1 / 2017-02-10
|
||||
==================
|
||||
|
||||
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
|
||||
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
|
||||
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
|
||||
* Fix: Namespaces would not disable once enabled (#409, @musikov)
|
||||
|
||||
2.6.0 / 2016-12-28
|
||||
==================
|
||||
|
||||
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
|
||||
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
|
||||
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
|
||||
|
||||
2.5.2 / 2016-12-25
|
||||
==================
|
||||
|
||||
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
|
||||
* Docs: fixed README typo (#391, @lurch)
|
||||
* Docs: added notice about v3 api discussion (@thebigredgeek)
|
||||
|
||||
2.5.1 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: babel-core compatibility
|
||||
|
||||
2.5.0 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: wrong reference in bower file (@thebigredgeek)
|
||||
* Fix: webworker compatibility (@thebigredgeek)
|
||||
* Fix: output formatting issue (#388, @kribblo)
|
||||
* Fix: babel-loader compatibility (#383, @escwald)
|
||||
* Misc: removed built asset from repo and publications (@thebigredgeek)
|
||||
* Misc: moved source files to /src (#378, @yamikuronue)
|
||||
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
|
||||
* Test: coveralls integration (#378, @yamikuronue)
|
||||
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
|
||||
|
||||
2.4.5 / 2016-12-17
|
||||
==================
|
||||
|
||||
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
|
||||
* Fix: custom log function (#379, @hsiliev)
|
||||
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
|
||||
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
|
||||
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
|
||||
|
||||
2.4.4 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
|
||||
|
||||
2.4.3 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: navigation.userAgent error for react native (#364, @escwald)
|
||||
|
||||
2.4.2 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: browser colors (#367, @tootallnate)
|
||||
* Misc: travis ci integration (@thebigredgeek)
|
||||
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
|
||||
|
||||
2.4.1 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: typo that broke the package (#356)
|
||||
|
||||
2.4.0 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
|
||||
* Fix: revert "handle regex special characters" (@tootallnate)
|
||||
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
|
||||
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
|
||||
* Improvement: allow colors in workers (#335, @botverse)
|
||||
* Improvement: use same color for same namespace. (#338, @lchenay)
|
||||
|
||||
2.3.3 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
|
||||
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
|
||||
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
|
||||
|
||||
2.3.2 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: be super-safe in index.js as well (@TooTallNate)
|
||||
* Fix: should check whether process exists (Tom Newby)
|
||||
|
||||
2.3.1 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Added electron compatibility (#324, @paulcbetts)
|
||||
* Improvement: Added performance optimizations (@tootallnate)
|
||||
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
|
||||
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
|
||||
|
||||
2.3.0 / 2016-11-07
|
||||
==================
|
||||
|
||||
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
|
||||
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
|
||||
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
|
||||
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
|
||||
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
|
||||
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
|
||||
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
|
||||
* Readme: fix USE_COLORS to DEBUG_COLORS
|
||||
* Readme: Doc fixes for format string sugar (#269, @mlucool)
|
||||
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
|
||||
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
|
||||
* Readme: better docs for browser support (#224, @matthewmueller)
|
||||
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
|
||||
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
|
||||
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
|
||||
* Misc: Updated contributors (@thebigredgeek)
|
||||
|
||||
2.2.0 / 2015-05-09
|
||||
==================
|
||||
|
||||
* package: update "ms" to v0.7.1 (#202, @dougwilson)
|
||||
* README: add logging to file example (#193, @DanielOchoa)
|
||||
* README: fixed a typo (#191, @amir-s)
|
||||
* browser: expose `storage` (#190, @stephenmathieson)
|
||||
* Makefile: add a `distclean` target (#189, @stephenmathieson)
|
||||
|
||||
2.1.3 / 2015-03-13
|
||||
==================
|
||||
|
||||
* Updated stdout/stderr example (#186)
|
||||
* Updated example/stdout.js to match debug current behaviour
|
||||
* Renamed example/stderr.js to stdout.js
|
||||
* Update Readme.md (#184)
|
||||
* replace high intensity foreground color for bold (#182, #183)
|
||||
|
||||
2.1.2 / 2015-03-01
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* update "ms" to v0.7.0
|
||||
* package: update "browserify" to v9.0.3
|
||||
* component: fix "ms.js" repo location
|
||||
* changed bower package name
|
||||
* updated documentation about using debug in a browser
|
||||
* fix: security error on safari (#167, #168, @yields)
|
||||
|
||||
2.1.1 / 2014-12-29
|
||||
==================
|
||||
|
||||
* browser: use `typeof` to check for `console` existence
|
||||
* browser: check for `console.log` truthiness (fix IE 8/9)
|
||||
* browser: add support for Chrome apps
|
||||
* Readme: added Windows usage remarks
|
||||
* Add `bower.json` to properly support bower install
|
||||
|
||||
2.1.0 / 2014-10-15
|
||||
==================
|
||||
|
||||
* node: implement `DEBUG_FD` env variable support
|
||||
* package: update "browserify" to v6.1.0
|
||||
* package: add "license" field to package.json (#135, @panuhorsmalahti)
|
||||
|
||||
2.0.0 / 2014-09-01
|
||||
==================
|
||||
|
||||
* package: update "browserify" to v5.11.0
|
||||
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
|
||||
|
||||
1.0.4 / 2014-07-15
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* example: remove `console.info()` log usage
|
||||
* example: add "Content-Type" UTF-8 header to browser example
|
||||
* browser: place %c marker after the space character
|
||||
* browser: reset the "content" color via `color: inherit`
|
||||
* browser: add colors support for Firefox >= v31
|
||||
* debug: prefer an instance `log()` function over the global one (#119)
|
||||
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
|
||||
|
||||
1.0.3 / 2014-07-09
|
||||
==================
|
||||
|
||||
* Add support for multiple wildcards in namespaces (#122, @seegno)
|
||||
* browser: fix lint
|
||||
|
||||
1.0.2 / 2014-06-10
|
||||
==================
|
||||
|
||||
* browser: update color palette (#113, @gscottolson)
|
||||
* common: make console logging function configurable (#108, @timoxley)
|
||||
* node: fix %o colors on old node <= 0.8.x
|
||||
* Makefile: find node path using shell/which (#109, @timoxley)
|
||||
|
||||
1.0.1 / 2014-06-06
|
||||
==================
|
||||
|
||||
* browser: use `removeItem()` to clear localStorage
|
||||
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
|
||||
* package: add "contributors" section
|
||||
* node: fix comment typo
|
||||
* README: list authors
|
||||
|
||||
1.0.0 / 2014-06-04
|
||||
==================
|
||||
|
||||
* make ms diff be global, not be scope
|
||||
* debug: ignore empty strings in enable()
|
||||
* node: make DEBUG_COLORS able to disable coloring
|
||||
* *: export the `colors` array
|
||||
* npmignore: don't publish the `dist` dir
|
||||
* Makefile: refactor to use browserify
|
||||
* package: add "browserify" as a dev dependency
|
||||
* Readme: add Web Inspector Colors section
|
||||
* node: reset terminal color for the debug content
|
||||
* node: map "%o" to `util.inspect()`
|
||||
* browser: map "%j" to `JSON.stringify()`
|
||||
* debug: add custom "formatters"
|
||||
* debug: use "ms" module for humanizing the diff
|
||||
* Readme: add "bash" syntax highlighting
|
||||
* browser: add Firebug color support
|
||||
* browser: add colors for WebKit browsers
|
||||
* node: apply log to `console`
|
||||
* rewrite: abstract common logic for Node & browsers
|
||||
* add .jshintrc file
|
||||
|
||||
0.8.1 / 2014-04-14
|
||||
==================
|
||||
|
||||
* package: re-add the "component" section
|
||||
|
||||
0.8.0 / 2014-03-30
|
||||
==================
|
||||
|
||||
* add `enable()` method for nodejs. Closes #27
|
||||
* change from stderr to stdout
|
||||
* remove unnecessary index.js file
|
||||
|
||||
0.7.4 / 2013-11-13
|
||||
==================
|
||||
|
||||
* remove "browserify" key from package.json (fixes something in browserify)
|
||||
|
||||
0.7.3 / 2013-10-30
|
||||
==================
|
||||
|
||||
* fix: catch localStorage security error when cookies are blocked (Chrome)
|
||||
* add debug(err) support. Closes #46
|
||||
* add .browser prop to package.json. Closes #42
|
||||
|
||||
0.7.2 / 2013-02-06
|
||||
==================
|
||||
|
||||
* fix package.json
|
||||
* fix: Mobile Safari (private mode) is broken with debug
|
||||
* fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
|
||||
|
||||
0.7.1 / 2013-02-05
|
||||
==================
|
||||
|
||||
* add repository URL to package.json
|
||||
* add DEBUG_COLORED to force colored output
|
||||
* add browserify support
|
||||
* fix component. Closes #24
|
||||
|
||||
0.7.0 / 2012-05-04
|
||||
==================
|
||||
|
||||
* Added .component to package.json
|
||||
* Added debug.component.js build
|
||||
|
||||
0.6.0 / 2012-03-16
|
||||
==================
|
||||
|
||||
* Added support for "-" prefix in DEBUG [Vinay Pulim]
|
||||
* Added `.enabled` flag to the node version [TooTallNate]
|
||||
|
||||
0.5.0 / 2012-02-02
|
||||
==================
|
||||
|
||||
* Added: humanize diffs. Closes #8
|
||||
* Added `debug.disable()` to the CS variant
|
||||
* Removed padding. Closes #10
|
||||
* Fixed: persist client-side variant again. Closes #9
|
||||
|
||||
0.4.0 / 2012-02-01
|
||||
==================
|
||||
|
||||
* Added browser variant support for older browsers [TooTallNate]
|
||||
* Added `debug.enable('project:*')` to browser variant [TooTallNate]
|
||||
* Added padding to diff (moved it to the right)
|
||||
|
||||
0.3.0 / 2012-01-26
|
||||
==================
|
||||
|
||||
* Added millisecond diff when isatty, otherwise UTC string
|
||||
|
||||
0.2.0 / 2012-01-22
|
||||
==================
|
||||
|
||||
* Added wildcard support
|
||||
|
||||
0.1.0 / 2011-12-02
|
||||
==================
|
||||
|
||||
* Added: remove colors unless stderr isatty [TooTallNate]
|
||||
|
||||
0.0.1 / 2010-01-03
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
|
||||
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
|
||||
|
||||
# BIN directory
|
||||
BIN := $(THIS_DIR)/node_modules/.bin
|
||||
|
||||
# Path
|
||||
PATH := node_modules/.bin:$(PATH)
|
||||
SHELL := /bin/bash
|
||||
|
||||
# applications
|
||||
NODE ?= $(shell which node)
|
||||
YARN ?= $(shell which yarn)
|
||||
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
|
||||
BROWSERIFY ?= $(NODE) $(BIN)/browserify
|
||||
|
||||
.FORCE:
|
||||
|
||||
install: node_modules
|
||||
|
||||
node_modules: package.json
|
||||
@NODE_ENV= $(PKG) install
|
||||
@touch node_modules
|
||||
|
||||
lint: .FORCE
|
||||
eslint browser.js debug.js index.js node.js
|
||||
|
||||
test-node: .FORCE
|
||||
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
|
||||
|
||||
test-browser: .FORCE
|
||||
mkdir -p dist
|
||||
|
||||
@$(BROWSERIFY) \
|
||||
--standalone debug \
|
||||
. > dist/debug.js
|
||||
|
||||
karma start --single-run
|
||||
rimraf dist
|
||||
|
||||
test: .FORCE
|
||||
concurrently \
|
||||
"make test-node" \
|
||||
"make test-browser"
|
||||
|
||||
coveralls:
|
||||
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
.PHONY: all install clean distclean
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
# debug
|
||||
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
|
||||
|
||||
A tiny node.js debugging utility modelled after node core's debugging technique.
|
||||
|
||||
**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install debug
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
|
||||
|
||||
Example _app.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug')('http')
|
||||
, http = require('http')
|
||||
, name = 'My App';
|
||||
|
||||
// fake app
|
||||
|
||||
debug('booting %s', name);
|
||||
|
||||
http.createServer(function(req, res){
|
||||
debug(req.method + ' ' + req.url);
|
||||
res.end('hello\n');
|
||||
}).listen(3000, function(){
|
||||
debug('listening');
|
||||
});
|
||||
|
||||
// fake worker of some kind
|
||||
|
||||
require('./worker');
|
||||
```
|
||||
|
||||
Example _worker.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug')('worker');
|
||||
|
||||
setInterval(function(){
|
||||
debug('doing some work');
|
||||
}, 1000);
|
||||
```
|
||||
|
||||
The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
#### Windows note
|
||||
|
||||
On Windows the environment variable is set using the `set` command.
|
||||
|
||||
```cmd
|
||||
set DEBUG=*,-not_this
|
||||
```
|
||||
|
||||
Note that PowerShell uses different syntax to set environment variables.
|
||||
|
||||
```cmd
|
||||
$env:DEBUG = "*,-not_this"
|
||||
```
|
||||
|
||||
Then, run the program to be debugged as usual.
|
||||
|
||||
## Millisecond diff
|
||||
|
||||
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
|
||||
|
||||

|
||||
|
||||
When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
|
||||
|
||||

|
||||
|
||||
## Conventions
|
||||
|
||||
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
|
||||
|
||||
## Wildcards
|
||||
|
||||
The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
|
||||
|
||||
You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
|
||||
|
||||
## Environment Variables
|
||||
|
||||
When running through Node.js, you can set a few environment variables that will
|
||||
change the behavior of the debug logging:
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------|-------------------------------------------------|
|
||||
| `DEBUG` | Enables/disables specific debugging namespaces. |
|
||||
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
|
||||
| `DEBUG_DEPTH` | Object inspection depth. |
|
||||
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
|
||||
|
||||
|
||||
__Note:__ The environment variables beginning with `DEBUG_` end up being
|
||||
converted into an Options object that gets used with `%o`/`%O` formatters.
|
||||
See the Node.js documentation for
|
||||
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
|
||||
for the complete list.
|
||||
|
||||
## Formatters
|
||||
|
||||
|
||||
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
|
||||
|
||||
| Formatter | Representation |
|
||||
|-----------|----------------|
|
||||
| `%O` | Pretty-print an Object on multiple lines. |
|
||||
| `%o` | Pretty-print an Object all on a single line. |
|
||||
| `%s` | String. |
|
||||
| `%d` | Number (both integer and float). |
|
||||
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
|
||||
| `%%` | Single percent sign ('%'). This does not consume an argument. |
|
||||
|
||||
### Custom formatters
|
||||
|
||||
You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
|
||||
|
||||
```js
|
||||
const createDebug = require('debug')
|
||||
createDebug.formatters.h = (v) => {
|
||||
return v.toString('hex')
|
||||
}
|
||||
|
||||
// …elsewhere
|
||||
const debug = createDebug('foo')
|
||||
debug('this is hex: %h', new Buffer('hello world'))
|
||||
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
|
||||
```
|
||||
|
||||
## Browser support
|
||||
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
|
||||
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
|
||||
if you don't want to build it yourself.
|
||||
|
||||
Debug's enable state is currently persisted by `localStorage`.
|
||||
Consider the situation shown below where you have `worker:a` and `worker:b`,
|
||||
and wish to debug both. You can enable this using `localStorage.debug`:
|
||||
|
||||
```js
|
||||
localStorage.debug = 'worker:*'
|
||||
```
|
||||
|
||||
And then refresh the page.
|
||||
|
||||
```js
|
||||
a = debug('worker:a');
|
||||
b = debug('worker:b');
|
||||
|
||||
setInterval(function(){
|
||||
a('doing some work');
|
||||
}, 1000);
|
||||
|
||||
setInterval(function(){
|
||||
b('doing some work');
|
||||
}, 1200);
|
||||
```
|
||||
|
||||
#### Web Inspector Colors
|
||||
|
||||
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
|
||||
option. These are WebKit web inspectors, Firefox ([since version
|
||||
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
|
||||
and the Firebug plugin for Firefox (any version).
|
||||
|
||||
Colored output looks something like:
|
||||
|
||||

|
||||
|
||||
|
||||
## Output streams
|
||||
|
||||
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
|
||||
|
||||
Example _stdout.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug');
|
||||
var error = debug('app:error');
|
||||
|
||||
// by default stderr is used
|
||||
error('goes to stderr!');
|
||||
|
||||
var log = debug('app:log');
|
||||
// set this namespace to log via console.log
|
||||
log.log = console.log.bind(console); // don't forget to bind to console!
|
||||
log('goes to stdout');
|
||||
error('still goes to stderr!');
|
||||
|
||||
// set all output to go via console.info
|
||||
// overrides all per-namespace log settings
|
||||
debug.log = console.info.bind(console);
|
||||
error('now goes to stdout via console.info');
|
||||
log('still goes to stdout, but via console.info now');
|
||||
```
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
- TJ Holowaychuk
|
||||
- Nathan Rajlich
|
||||
- Andrew Rhyne
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
|
||||
|
||||
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"repo": "visionmedia/debug",
|
||||
"description": "small debugging utility",
|
||||
"version": "2.6.9",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"main": "src/browser.js",
|
||||
"scripts": [
|
||||
"src/browser.js",
|
||||
"src/debug.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"rauchg/ms.js": "0.7.1"
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// Karma configuration
|
||||
// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: '',
|
||||
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['mocha', 'chai', 'sinon'],
|
||||
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'dist/debug.js',
|
||||
'test/*spec.js'
|
||||
],
|
||||
|
||||
|
||||
// list of files to exclude
|
||||
exclude: [
|
||||
'src/node.js'
|
||||
],
|
||||
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress'],
|
||||
|
||||
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true,
|
||||
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: ['PhantomJS'],
|
||||
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity
|
||||
})
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
module.exports = require('./src/node');
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"_from": "debug@2.6.9",
|
||||
"_id": "debug@2.6.9",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"_location": "/body-parser/debug",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "debug@2.6.9",
|
||||
"name": "debug",
|
||||
"escapedName": "debug",
|
||||
"rawSpec": "2.6.9",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.6.9"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/body-parser"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
|
||||
"_spec": "debug@2.6.9",
|
||||
"_where": "C:\\Users\\ittnerpa60944\\source\\repos\\MDTWebApp\\code\\code\\node_modules\\body-parser",
|
||||
"author": {
|
||||
"name": "TJ Holowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
},
|
||||
"browser": "./src/browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/visionmedia/debug/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"component": {
|
||||
"scripts": {
|
||||
"debug/index.js": "browser.js",
|
||||
"debug/debug.js": "debug.js"
|
||||
}
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Nathan Rajlich",
|
||||
"email": "nathan@tootallnate.net",
|
||||
"url": "http://n8.io"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Rhyne",
|
||||
"email": "rhyneandrew@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "small debugging utility",
|
||||
"devDependencies": {
|
||||
"browserify": "9.0.3",
|
||||
"chai": "^3.5.0",
|
||||
"concurrently": "^3.1.0",
|
||||
"coveralls": "^2.11.15",
|
||||
"eslint": "^3.12.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"karma": "^1.3.0",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"mocha": "^3.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"sinon": "^1.17.6",
|
||||
"sinon-chai": "^2.8.0"
|
||||
},
|
||||
"homepage": "https://github.com/visionmedia/debug#readme",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./src/index.js",
|
||||
"name": "debug",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/visionmedia/debug.git"
|
||||
},
|
||||
"version": "2.6.9"
|
||||
}
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = require('./debug');
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = 'undefined' != typeof chrome
|
||||
&& 'undefined' != typeof chrome.storage
|
||||
? chrome.storage.local
|
||||
: localstorage();
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [
|
||||
'lightseagreen',
|
||||
'forestgreen',
|
||||
'goldenrod',
|
||||
'dodgerblue',
|
||||
'darkorchid',
|
||||
'crimson'
|
||||
];
|
||||
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
|
||||
function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
||||
// is firebug? http://stackoverflow.com/a/398120/376773
|
||||
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
||||
// is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
||||
// double check webkit in userAgent just in case we are in a worker
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
||||
}
|
||||
|
||||
/**
|
||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
||||
*/
|
||||
|
||||
exports.formatters.j = function(v) {
|
||||
try {
|
||||
return JSON.stringify(v);
|
||||
} catch (err) {
|
||||
return '[UnexpectedJSONParseError]: ' + err.message;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Colorize log arguments if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function formatArgs(args) {
|
||||
var useColors = this.useColors;
|
||||
|
||||
args[0] = (useColors ? '%c' : '')
|
||||
+ this.namespace
|
||||
+ (useColors ? ' %c' : ' ')
|
||||
+ args[0]
|
||||
+ (useColors ? '%c ' : ' ')
|
||||
+ '+' + exports.humanize(this.diff);
|
||||
|
||||
if (!useColors) return;
|
||||
|
||||
var c = 'color: ' + this.color;
|
||||
args.splice(1, 0, c, 'color: inherit')
|
||||
|
||||
// the final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
// figure out the correct index to insert the CSS into
|
||||
var index = 0;
|
||||
var lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
||||
if ('%%' === match) return;
|
||||
index++;
|
||||
if ('%c' === match) {
|
||||
// we only are interested in the *last* %c
|
||||
// (the user may have provided their own)
|
||||
lastC = index;
|
||||
}
|
||||
});
|
||||
|
||||
args.splice(lastC, 0, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `console.log()` when available.
|
||||
* No-op when `console.log` is not a "function".
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function log() {
|
||||
// this hackery is required for IE8/9, where
|
||||
// the `console.log` function doesn't have 'apply'
|
||||
return 'object' === typeof console
|
||||
&& console.log
|
||||
&& Function.prototype.apply.call(console.log, console, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function save(namespaces) {
|
||||
try {
|
||||
if (null == namespaces) {
|
||||
exports.storage.removeItem('debug');
|
||||
} else {
|
||||
exports.storage.debug = namespaces;
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function load() {
|
||||
var r;
|
||||
try {
|
||||
r = exports.storage.debug;
|
||||
} catch(e) {}
|
||||
|
||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||
r = process.env.DEBUG;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable namespaces listed in `localStorage.debug` initially.
|
||||
*/
|
||||
|
||||
exports.enable(load());
|
||||
|
||||
/**
|
||||
* Localstorage attempts to return the localstorage.
|
||||
*
|
||||
* This is necessary because safari throws
|
||||
* when a user disables cookies/localstorage
|
||||
* and you attempt to access it.
|
||||
*
|
||||
* @return {LocalStorage}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function localstorage() {
|
||||
try {
|
||||
return window.localStorage;
|
||||
} catch (e) {}
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
|
||||
/**
|
||||
* This is the common logic for both the Node.js and web browser
|
||||
* implementations of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
|
||||
exports.coerce = coerce;
|
||||
exports.disable = disable;
|
||||
exports.enable = enable;
|
||||
exports.enabled = enabled;
|
||||
exports.humanize = require('ms');
|
||||
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
*/
|
||||
|
||||
exports.names = [];
|
||||
exports.skips = [];
|
||||
|
||||
/**
|
||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||
*
|
||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||
*/
|
||||
|
||||
exports.formatters = {};
|
||||
|
||||
/**
|
||||
* Previous log timestamp.
|
||||
*/
|
||||
|
||||
var prevTime;
|
||||
|
||||
/**
|
||||
* Select a color.
|
||||
* @param {String} namespace
|
||||
* @return {Number}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function selectColor(namespace) {
|
||||
var hash = 0, i;
|
||||
|
||||
for (i in namespace) {
|
||||
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
|
||||
return exports.colors[Math.abs(hash) % exports.colors.length];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a debugger with the given `namespace`.
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function createDebug(namespace) {
|
||||
|
||||
function debug() {
|
||||
// disabled?
|
||||
if (!debug.enabled) return;
|
||||
|
||||
var self = debug;
|
||||
|
||||
// set `diff` timestamp
|
||||
var curr = +new Date();
|
||||
var ms = curr - (prevTime || curr);
|
||||
self.diff = ms;
|
||||
self.prev = prevTime;
|
||||
self.curr = curr;
|
||||
prevTime = curr;
|
||||
|
||||
// turn the `arguments` into a proper Array
|
||||
var args = new Array(arguments.length);
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
args[0] = exports.coerce(args[0]);
|
||||
|
||||
if ('string' !== typeof args[0]) {
|
||||
// anything else let's inspect with %O
|
||||
args.unshift('%O');
|
||||
}
|
||||
|
||||
// apply any `formatters` transformations
|
||||
var index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
||||
// if we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') return match;
|
||||
index++;
|
||||
var formatter = exports.formatters[format];
|
||||
if ('function' === typeof formatter) {
|
||||
var val = args[index];
|
||||
match = formatter.call(self, val);
|
||||
|
||||
// now we need to remove `args[index]` since it's inlined in the `format`
|
||||
args.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
// apply env-specific formatting (colors, etc.)
|
||||
exports.formatArgs.call(self, args);
|
||||
|
||||
var logFn = debug.log || exports.log || console.log.bind(console);
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.enabled = exports.enabled(namespace);
|
||||
debug.useColors = exports.useColors();
|
||||
debug.color = selectColor(namespace);
|
||||
|
||||
// env-specific initialization logic for debug instances
|
||||
if ('function' === typeof exports.init) {
|
||||
exports.init(debug);
|
||||
}
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables a debug mode by namespaces. This can include modes
|
||||
* separated by a colon and wildcards.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function enable(namespaces) {
|
||||
exports.save(namespaces);
|
||||
|
||||
exports.names = [];
|
||||
exports.skips = [];
|
||||
|
||||
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
||||
var len = split.length;
|
||||
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (!split[i]) continue; // ignore empty strings
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
if (namespaces[0] === '-') {
|
||||
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
||||
} else {
|
||||
exports.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function disable() {
|
||||
exports.enable('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function enabled(name) {
|
||||
var i, len;
|
||||
for (i = 0, len = exports.skips.length; i < len; i++) {
|
||||
if (exports.skips[i].test(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (i = 0, len = exports.names.length; i < len; i++) {
|
||||
if (exports.names[i].test(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Coerce `val`.
|
||||
*
|
||||
* @param {Mixed} val
|
||||
* @return {Mixed}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function coerce(val) {
|
||||
if (val instanceof Error) return val.stack || val.message;
|
||||
return val;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Detect Electron renderer process, which is node, but we should
|
||||
* treat as a browser.
|
||||
*/
|
||||
|
||||
if (typeof process !== 'undefined' && process.type === 'renderer') {
|
||||
module.exports = require('./browser.js');
|
||||
} else {
|
||||
module.exports = require('./node.js');
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
module.exports = inspectorLog;
|
||||
|
||||
// black hole
|
||||
const nullStream = new (require('stream').Writable)();
|
||||
nullStream._write = () => {};
|
||||
|
||||
/**
|
||||
* Outputs a `console.log()` to the Node.js Inspector console *only*.
|
||||
*/
|
||||
function inspectorLog() {
|
||||
const stdout = console._stdout;
|
||||
console._stdout = nullStream;
|
||||
console.log.apply(console, arguments);
|
||||
console._stdout = stdout;
|
||||
}
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var tty = require('tty');
|
||||
var util = require('util');
|
||||
|
||||
/**
|
||||
* This is the Node.js implementation of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = require('./debug');
|
||||
exports.init = init;
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [6, 2, 3, 4, 5, 1];
|
||||
|
||||
/**
|
||||
* Build up the default `inspectOpts` object from the environment variables.
|
||||
*
|
||||
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
||||
*/
|
||||
|
||||
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
|
||||
return /^debug_/i.test(key);
|
||||
}).reduce(function (obj, key) {
|
||||
// camel-case
|
||||
var prop = key
|
||||
.substring(6)
|
||||
.toLowerCase()
|
||||
.replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
|
||||
|
||||
// coerce string value into JS value
|
||||
var val = process.env[key];
|
||||
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
||||
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
||||
else if (val === 'null') val = null;
|
||||
else val = Number(val);
|
||||
|
||||
obj[prop] = val;
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
/**
|
||||
* The file descriptor to write the `debug()` calls to.
|
||||
* Set the `DEBUG_FD` env variable to override with another value. i.e.:
|
||||
*
|
||||
* $ DEBUG_FD=3 node script.js 3>debug.log
|
||||
*/
|
||||
|
||||
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
|
||||
|
||||
if (1 !== fd && 2 !== fd) {
|
||||
util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
|
||||
}
|
||||
|
||||
var stream = 1 === fd ? process.stdout :
|
||||
2 === fd ? process.stderr :
|
||||
createWritableStdioStream(fd);
|
||||
|
||||
/**
|
||||
* Is stdout a TTY? Colored output is enabled when `true`.
|
||||
*/
|
||||
|
||||
function useColors() {
|
||||
return 'colors' in exports.inspectOpts
|
||||
? Boolean(exports.inspectOpts.colors)
|
||||
: tty.isatty(fd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map %o to `util.inspect()`, all on a single line.
|
||||
*/
|
||||
|
||||
exports.formatters.o = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts)
|
||||
.split('\n').map(function(str) {
|
||||
return str.trim()
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* Map %o to `util.inspect()`, allowing multiple lines if needed.
|
||||
*/
|
||||
|
||||
exports.formatters.O = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds ANSI color escape codes if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function formatArgs(args) {
|
||||
var name = this.namespace;
|
||||
var useColors = this.useColors;
|
||||
|
||||
if (useColors) {
|
||||
var c = this.color;
|
||||
var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
|
||||
|
||||
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
||||
args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
|
||||
} else {
|
||||
args[0] = new Date().toUTCString()
|
||||
+ ' ' + name + ' ' + args[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `util.format()` with the specified arguments and writes to `stream`.
|
||||
*/
|
||||
|
||||
function log() {
|
||||
return stream.write(util.format.apply(util, arguments) + '\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function save(namespaces) {
|
||||
if (null == namespaces) {
|
||||
// If you set a process.env field to null or undefined, it gets cast to the
|
||||
// string 'null' or 'undefined'. Just delete instead.
|
||||
delete process.env.DEBUG;
|
||||
} else {
|
||||
process.env.DEBUG = namespaces;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function load() {
|
||||
return process.env.DEBUG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from `node/src/node.js`.
|
||||
*
|
||||
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
||||
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
||||
*/
|
||||
|
||||
function createWritableStdioStream (fd) {
|
||||
var stream;
|
||||
var tty_wrap = process.binding('tty_wrap');
|
||||
|
||||
// Note stream._type is used for test-module-load-list.js
|
||||
|
||||
switch (tty_wrap.guessHandleType(fd)) {
|
||||
case 'TTY':
|
||||
stream = new tty.WriteStream(fd);
|
||||
stream._type = 'tty';
|
||||
|
||||
// Hack to have stream not keep the event loop alive.
|
||||
// See https://github.com/joyent/node/issues/1726
|
||||
if (stream._handle && stream._handle.unref) {
|
||||
stream._handle.unref();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'FILE':
|
||||
var fs = require('fs');
|
||||
stream = new fs.SyncWriteStream(fd, { autoClose: false });
|
||||
stream._type = 'fs';
|
||||
break;
|
||||
|
||||
case 'PIPE':
|
||||
case 'TCP':
|
||||
var net = require('net');
|
||||
stream = new net.Socket({
|
||||
fd: fd,
|
||||
readable: false,
|
||||
writable: true
|
||||
});
|
||||
|
||||
// FIXME Should probably have an option in net.Socket to create a
|
||||
// stream from an existing fd which is writable only. But for now
|
||||
// we'll just add this hack and set the `readable` member to false.
|
||||
// Test: ./node test/fixtures/echo.js < /etc/passwd
|
||||
stream.readable = false;
|
||||
stream.read = null;
|
||||
stream._type = 'pipe';
|
||||
|
||||
// FIXME Hack to have stream not keep the event loop alive.
|
||||
// See https://github.com/joyent/node/issues/1726
|
||||
if (stream._handle && stream._handle.unref) {
|
||||
stream._handle.unref();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Probably an error on in uv_guess_handle()
|
||||
throw new Error('Implement me. Unknown stream file type!');
|
||||
}
|
||||
|
||||
// For supporting legacy API we put the FD here.
|
||||
stream.fd = fd;
|
||||
|
||||
stream._isStdio = true;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init logic for `debug` instances.
|
||||
*
|
||||
* Create a new `inspectOpts` object in case `useColors` is set
|
||||
* differently for a particular `debug` instance.
|
||||
*/
|
||||
|
||||
function init (debug) {
|
||||
debug.inspectOpts = {};
|
||||
|
||||
var keys = Object.keys(exports.inspectOpts);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable namespaces listed in `process.env.DEBUG` initially.
|
||||
*/
|
||||
|
||||
exports.enable(load());
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* Helpers.
|
||||
*/
|
||||
|
||||
var s = 1000;
|
||||
var m = s * 60;
|
||||
var h = m * 60;
|
||||
var d = h * 24;
|
||||
var y = d * 365.25;
|
||||
|
||||
/**
|
||||
* Parse or format the given `val`.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `long` verbose formatting [false]
|
||||
*
|
||||
* @param {String|Number} val
|
||||
* @param {Object} [options]
|
||||
* @throws {Error} throw an error if val is not a non-empty string or a number
|
||||
* @return {String|Number}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function(val, options) {
|
||||
options = options || {};
|
||||
var type = typeof val;
|
||||
if (type === 'string' && val.length > 0) {
|
||||
return parse(val);
|
||||
} else if (type === 'number' && isNaN(val) === false) {
|
||||
return options.long ? fmtLong(val) : fmtShort(val);
|
||||
}
|
||||
throw new Error(
|
||||
'val is not a non-empty string or a valid number. val=' +
|
||||
JSON.stringify(val)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse the given `str` and return milliseconds.
|
||||
*
|
||||
* @param {String} str
|
||||
* @return {Number}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function parse(str) {
|
||||
str = String(str);
|
||||
if (str.length > 100) {
|
||||
return;
|
||||
}
|
||||
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
||||
str
|
||||
);
|
||||
if (!match) {
|
||||
return;
|
||||
}
|
||||
var n = parseFloat(match[1]);
|
||||
var type = (match[2] || 'ms').toLowerCase();
|
||||
switch (type) {
|
||||
case 'years':
|
||||
case 'year':
|
||||
case 'yrs':
|
||||
case 'yr':
|
||||
case 'y':
|
||||
return n * y;
|
||||
case 'days':
|
||||
case 'day':
|
||||
case 'd':
|
||||
return n * d;
|
||||
case 'hours':
|
||||
case 'hour':
|
||||
case 'hrs':
|
||||
case 'hr':
|
||||
case 'h':
|
||||
return n * h;
|
||||
case 'minutes':
|
||||
case 'minute':
|
||||
case 'mins':
|
||||
case 'min':
|
||||
case 'm':
|
||||
return n * m;
|
||||
case 'seconds':
|
||||
case 'second':
|
||||
case 'secs':
|
||||
case 'sec':
|
||||
case 's':
|
||||
return n * s;
|
||||
case 'milliseconds':
|
||||
case 'millisecond':
|
||||
case 'msecs':
|
||||
case 'msec':
|
||||
case 'ms':
|
||||
return n;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Short format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function fmtShort(ms) {
|
||||
if (ms >= d) {
|
||||
return Math.round(ms / d) + 'd';
|
||||
}
|
||||
if (ms >= h) {
|
||||
return Math.round(ms / h) + 'h';
|
||||
}
|
||||
if (ms >= m) {
|
||||
return Math.round(ms / m) + 'm';
|
||||
}
|
||||
if (ms >= s) {
|
||||
return Math.round(ms / s) + 's';
|
||||
}
|
||||
return ms + 'ms';
|
||||
}
|
||||
|
||||
/**
|
||||
* Long format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function fmtLong(ms) {
|
||||
return plural(ms, d, 'day') ||
|
||||
plural(ms, h, 'hour') ||
|
||||
plural(ms, m, 'minute') ||
|
||||
plural(ms, s, 'second') ||
|
||||
ms + ' ms';
|
||||
}
|
||||
|
||||
/**
|
||||
* Pluralization helper.
|
||||
*/
|
||||
|
||||
function plural(ms, n, name) {
|
||||
if (ms < n) {
|
||||
return;
|
||||
}
|
||||
if (ms < n * 1.5) {
|
||||
return Math.floor(ms / n) + ' ' + name;
|
||||
}
|
||||
return Math.ceil(ms / n) + ' ' + name + 's';
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Zeit, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"_from": "ms@2.0.0",
|
||||
"_id": "ms@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"_location": "/body-parser/ms",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ms@2.0.0",
|
||||
"name": "ms",
|
||||
"escapedName": "ms",
|
||||
"rawSpec": "2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/body-parser/debug"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
|
||||
"_spec": "ms@2.0.0",
|
||||
"_where": "C:\\Users\\ittnerpa60944\\source\\repos\\MDTWebApp\\code\\code\\node_modules\\body-parser\\node_modules\\debug",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zeit/ms/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Tiny milisecond conversion utility",
|
||||
"devDependencies": {
|
||||
"eslint": "3.19.0",
|
||||
"expect.js": "0.3.1",
|
||||
"husky": "0.13.3",
|
||||
"lint-staged": "3.4.1",
|
||||
"mocha": "3.4.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "eslint:recommended",
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/zeit/ms#readme",
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"npm run lint",
|
||||
"prettier --single-quote --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "./index",
|
||||
"name": "ms",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zeit/ms.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint lib/* bin/*",
|
||||
"precommit": "lint-staged",
|
||||
"test": "mocha tests.js"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
# ms
|
||||
|
||||
[](https://travis-ci.org/zeit/ms)
|
||||
[](https://zeit.chat/)
|
||||
|
||||
Use this package to easily convert various time formats to milliseconds.
|
||||
|
||||
## Examples
|
||||
|
||||
```js
|
||||
ms('2 days') // 172800000
|
||||
ms('1d') // 86400000
|
||||
ms('10h') // 36000000
|
||||
ms('2.5 hrs') // 9000000
|
||||
ms('2h') // 7200000
|
||||
ms('1m') // 60000
|
||||
ms('5s') // 5000
|
||||
ms('1y') // 31557600000
|
||||
ms('100') // 100
|
||||
```
|
||||
|
||||
### Convert from milliseconds
|
||||
|
||||
```js
|
||||
ms(60000) // "1m"
|
||||
ms(2 * 60000) // "2m"
|
||||
ms(ms('10 hours')) // "10h"
|
||||
```
|
||||
|
||||
### Time format written-out
|
||||
|
||||
```js
|
||||
ms(60000, { long: true }) // "1 minute"
|
||||
ms(2 * 60000, { long: true }) // "2 minutes"
|
||||
ms(ms('10 hours'), { long: true }) // "10 hours"
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Works both in [node](https://nodejs.org) and in the browser.
|
||||
- If a number is supplied to `ms`, a string with a unit is returned.
|
||||
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
|
||||
- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
|
||||
|
||||
## Caught a bug?
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
||||
2. Link the package to the global module directory: `npm link`
|
||||
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
|
||||
|
||||
As always, you can run the tests using: `npm test`
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 160
|
||||
|
||||
[test/*]
|
||||
max_line_length = off
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
|
||||
[*.json]
|
||||
max_line_length = off
|
||||
|
||||
[Makefile]
|
||||
max_line_length = off
|
||||
|
||||
[CHANGELOG.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[LICENSE]
|
||||
indent_size = 2
|
||||
max_line_length = off
|
||||
+1
@@ -0,0 +1 @@
|
||||
dist
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"complexity": 0,
|
||||
"consistent-return": 1,
|
||||
"func-name-matching": 0,
|
||||
"id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
|
||||
"indent": [2, 4],
|
||||
"max-lines-per-function": [2, { "max": 150 }],
|
||||
"max-params": [2, 14],
|
||||
"max-statements": [2, 52],
|
||||
"multiline-comment-style": 0,
|
||||
"no-continue": 1,
|
||||
"no-magic-numbers": 0,
|
||||
"no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
|
||||
"operator-linebreak": [2, "before"],
|
||||
}
|
||||
}
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
## **6.7.0**
|
||||
- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219)
|
||||
- [Fix] correctly parse nested arrays (#212)
|
||||
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source
|
||||
- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty`
|
||||
- [Refactor] `utils`: `isBuffer`: small tweak; add tests
|
||||
- [Refactor] use cached `Array.isArray`
|
||||
- [Refactor] `parse`/`stringify`: make a function to normalize the options
|
||||
- [Refactor] `utils`: reduce observable [[Get]]s
|
||||
- [Refactor] `stringify`/`utils`: cache `Array.isArray`
|
||||
- [Tests] always use `String(x)` over `x.toString()`
|
||||
- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
|
||||
- [Tests] temporarily allow coverage to fail
|
||||
|
||||
## **6.6.0**
|
||||
- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268)
|
||||
- [New] move two-value combine to a `utils` function (#189)
|
||||
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
|
||||
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260)
|
||||
- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1`
|
||||
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
|
||||
- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
|
||||
- [Refactor] `parse`: only need to reassign the var once
|
||||
- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults
|
||||
- [Refactor] add missing defaults
|
||||
- [Refactor] `parse`: one less `concat` call
|
||||
- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting
|
||||
- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape`
|
||||
- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS
|
||||
|
||||
## **6.5.2**
|
||||
- [Fix] use `safer-buffer` instead of `Buffer` constructor
|
||||
- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
|
||||
- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify`
|
||||
|
||||
## **6.5.1**
|
||||
- [Fix] Fix parsing & compacting very deep objects (#224)
|
||||
- [Refactor] name utils functions
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
|
||||
- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node
|
||||
- [Tests] Use precise dist for Node.js 0.6 runtime (#225)
|
||||
- [Tests] make 0.6 required, now that it’s passing
|
||||
- [Tests] on `node` `v8.2`; fix npm on node 0.6
|
||||
|
||||
## **6.5.0**
|
||||
- [New] add `utils.assign`
|
||||
- [New] pass default encoder/decoder to custom encoder/decoder functions (#206)
|
||||
- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213)
|
||||
- [Fix] Handle stringifying empty objects with addQueryPrefix (#217)
|
||||
- [Fix] do not mutate `options` argument (#207)
|
||||
- [Refactor] `parse`: cache index to reuse in else statement (#182)
|
||||
- [Docs] add various badges to readme (#208)
|
||||
- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape`
|
||||
- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
|
||||
- [Tests] add `editorconfig-tools`
|
||||
|
||||
## **6.4.0**
|
||||
- [New] `qs.stringify`: add `encodeValuesOnly` option
|
||||
- [Fix] follow `allowPrototypes` option during merge (#201, #201)
|
||||
- [Fix] support keys starting with brackets (#202, #200)
|
||||
- [Fix] chmod a-x
|
||||
- [Dev Deps] update `eslint`
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
|
||||
- [eslint] reduce warnings
|
||||
|
||||
## **6.3.2**
|
||||
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
|
||||
- [Dev Deps] update `eslint`
|
||||
- [Fix] chmod a-x
|
||||
- [Fix] support keys starting with brackets (#202, #200)
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
|
||||
|
||||
## **6.3.1**
|
||||
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
|
||||
- [Tests] on all node minors; improve test matrix
|
||||
- [Docs] document stringify option `allowDots` (#195)
|
||||
- [Docs] add empty object and array values example (#195)
|
||||
- [Docs] Fix minor inconsistency/typo (#192)
|
||||
- [Docs] document stringify option `sort` (#191)
|
||||
- [Refactor] `stringify`: throw faster with an invalid encoder
|
||||
- [Refactor] remove unnecessary escapes (#184)
|
||||
- Remove contributing.md, since `qs` is no longer part of `hapi` (#183)
|
||||
|
||||
## **6.3.0**
|
||||
- [New] Add support for RFC 1738 (#174, #173)
|
||||
- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
|
||||
- [Fix] ensure `utils.merge` handles merging two arrays
|
||||
- [Refactor] only constructors should be capitalized
|
||||
- [Refactor] capitalized var names are for constructors only
|
||||
- [Refactor] avoid using a sparse array
|
||||
- [Robustness] `formats`: cache `String#replace`
|
||||
- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
|
||||
- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
|
||||
- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
|
||||
- [Tests] skip Object.create tests when null objects are not available
|
||||
- [Tests] Turn on eslint for test files (#175)
|
||||
|
||||
## **6.2.3**
|
||||
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
|
||||
- [Fix] chmod a-x
|
||||
- [Fix] support keys starting with brackets (#202, #200)
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
|
||||
|
||||
## **6.2.2**
|
||||
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
|
||||
|
||||
## **6.2.1**
|
||||
- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
|
||||
- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
|
||||
- [Tests] remove `parallelshell` since it does not reliably report failures
|
||||
- [Tests] up to `node` `v6.3`, `v5.12`
|
||||
- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
|
||||
|
||||
## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
|
||||
- [New] pass Buffers to the encoder/decoder directly (#161)
|
||||
- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
|
||||
- [Fix] fix compacting of nested sparse arrays (#150)
|
||||
|
||||
## **6.1.2
|
||||
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
|
||||
- [Fix] chmod a-x
|
||||
- [Fix] support keys starting with brackets (#202, #200)
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
|
||||
|
||||
## **6.1.1**
|
||||
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
|
||||
|
||||
## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
|
||||
- [New] allowDots option for `stringify` (#151)
|
||||
- [Fix] "sort" option should work at a depth of 3 or more (#151)
|
||||
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
|
||||
|
||||
## **6.0.4**
|
||||
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
|
||||
- [Fix] chmod a-x
|
||||
- [Fix] support keys starting with brackets (#202, #200)
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
|
||||
|
||||
## **6.0.3**
|
||||
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
|
||||
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
|
||||
|
||||
## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
|
||||
- Revert ES6 requirement and restore support for node down to v0.8.
|
||||
|
||||
## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
|
||||
- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
|
||||
|
||||
## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
|
||||
- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
|
||||
|
||||
## **5.2.1**
|
||||
- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
|
||||
|
||||
## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
|
||||
- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
|
||||
|
||||
## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
|
||||
- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
|
||||
- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
|
||||
|
||||
## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
|
||||
- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
|
||||
- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
|
||||
|
||||
## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
|
||||
- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
|
||||
|
||||
## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
|
||||
- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
|
||||
|
||||
## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
|
||||
- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
|
||||
- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
|
||||
- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
|
||||
- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
|
||||
- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
|
||||
- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
|
||||
- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
|
||||
- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
|
||||
- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
|
||||
- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
|
||||
|
||||
## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
|
||||
- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
|
||||
|
||||
## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
|
||||
- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
|
||||
|
||||
## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
|
||||
- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
|
||||
- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
|
||||
|
||||
## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
|
||||
- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
|
||||
|
||||
## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
|
||||
- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
|
||||
|
||||
## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
|
||||
- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
|
||||
|
||||
## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
|
||||
- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
|
||||
- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
|
||||
- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
|
||||
|
||||
## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
|
||||
- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
|
||||
|
||||
## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
|
||||
- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
|
||||
- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
|
||||
|
||||
## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
|
||||
- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
|
||||
- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
|
||||
- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
|
||||
|
||||
## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
|
||||
- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
|
||||
- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
|
||||
|
||||
## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
|
||||
- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
|
||||
- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
|
||||
- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
|
||||
- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
|
||||
|
||||
## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
|
||||
- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
|
||||
|
||||
## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
|
||||
- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
|
||||
- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
|
||||
- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
|
||||
|
||||
## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
|
||||
- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
|
||||
|
||||
## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
|
||||
- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
|
||||
- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
|
||||
|
||||
## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
|
||||
- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
|
||||
- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
|
||||
|
||||
## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
|
||||
- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
|
||||
- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
|
||||
- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
|
||||
|
||||
## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
|
||||
- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
Copyright (c) 2014 Nathan LaFreniere and other contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* The names of any contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
* * *
|
||||
|
||||
The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
|
||||
+570
@@ -0,0 +1,570 @@
|
||||
# qs <sup>[![Version Badge][2]][1]</sup>
|
||||
|
||||
[![Build Status][3]][4]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][11]][1]
|
||||
|
||||
A querystring parsing and stringifying library with some added security.
|
||||
|
||||
Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
|
||||
|
||||
The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var qs = require('qs');
|
||||
var assert = require('assert');
|
||||
|
||||
var obj = qs.parse('a=c');
|
||||
assert.deepEqual(obj, { a: 'c' });
|
||||
|
||||
var str = qs.stringify(obj);
|
||||
assert.equal(str, 'a=c');
|
||||
```
|
||||
|
||||
### Parsing Objects
|
||||
|
||||
[](#preventEval)
|
||||
```javascript
|
||||
qs.parse(string, [options]);
|
||||
```
|
||||
|
||||
**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
|
||||
For example, the string `'foo[bar]=baz'` converts to:
|
||||
|
||||
```javascript
|
||||
assert.deepEqual(qs.parse('foo[bar]=baz'), {
|
||||
foo: {
|
||||
bar: 'baz'
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
|
||||
|
||||
```javascript
|
||||
var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
|
||||
assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
|
||||
```
|
||||
|
||||
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
|
||||
|
||||
```javascript
|
||||
var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });
|
||||
assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });
|
||||
```
|
||||
|
||||
URI encoded strings work too:
|
||||
|
||||
```javascript
|
||||
assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
|
||||
a: { b: 'c' }
|
||||
});
|
||||
```
|
||||
|
||||
You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
|
||||
|
||||
```javascript
|
||||
assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
|
||||
foo: {
|
||||
bar: {
|
||||
baz: 'foobarbaz'
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
|
||||
`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
|
||||
|
||||
```javascript
|
||||
var expected = {
|
||||
a: {
|
||||
b: {
|
||||
c: {
|
||||
d: {
|
||||
e: {
|
||||
f: {
|
||||
'[g][h][i]': 'j'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var string = 'a[b][c][d][e][f][g][h][i]=j';
|
||||
assert.deepEqual(qs.parse(string), expected);
|
||||
```
|
||||
|
||||
This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:
|
||||
|
||||
```javascript
|
||||
var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
|
||||
assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });
|
||||
```
|
||||
|
||||
The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
|
||||
|
||||
For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
|
||||
|
||||
```javascript
|
||||
var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
|
||||
assert.deepEqual(limited, { a: 'b' });
|
||||
```
|
||||
|
||||
To bypass the leading question mark, use `ignoreQueryPrefix`:
|
||||
|
||||
```javascript
|
||||
var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });
|
||||
assert.deepEqual(prefixed, { a: 'b', c: 'd' });
|
||||
```
|
||||
|
||||
An optional delimiter can also be passed:
|
||||
|
||||
```javascript
|
||||
var delimited = qs.parse('a=b;c=d', { delimiter: ';' });
|
||||
assert.deepEqual(delimited, { a: 'b', c: 'd' });
|
||||
```
|
||||
|
||||
Delimiters can be a regular expression too:
|
||||
|
||||
```javascript
|
||||
var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
|
||||
assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });
|
||||
```
|
||||
|
||||
Option `allowDots` can be used to enable dot notation:
|
||||
|
||||
```javascript
|
||||
var withDots = qs.parse('a.b=c', { allowDots: true });
|
||||
assert.deepEqual(withDots, { a: { b: 'c' } });
|
||||
```
|
||||
|
||||
If you have to deal with legacy browsers or services, there's
|
||||
also support for decoding percent-encoded octets as iso-8859-1:
|
||||
|
||||
```javascript
|
||||
var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' });
|
||||
assert.deepEqual(oldCharset, { a: '§' });
|
||||
```
|
||||
|
||||
Some services add an initial `utf8=✓` value to forms so that old
|
||||
Internet Explorer versions are more likely to submit the form as
|
||||
utf-8. Additionally, the server can check the value against wrong
|
||||
encodings of the checkmark character and detect that a query string
|
||||
or `application/x-www-form-urlencoded` body was *not* sent as
|
||||
utf-8, eg. if the form had an `accept-charset` parameter or the
|
||||
containing page had a different character set.
|
||||
|
||||
**qs** supports this mechanism via the `charsetSentinel` option.
|
||||
If specified, the `utf8` parameter will be omitted from the
|
||||
returned object. It will be used to switch to `iso-8859-1`/`utf-8`
|
||||
mode depending on how the checkmark is encoded.
|
||||
|
||||
**Important**: When you specify both the `charset` option and the
|
||||
`charsetSentinel` option, the `charset` will be overridden when
|
||||
the request contains a `utf8` parameter from which the actual
|
||||
charset can be deduced. In that sense the `charset` will behave
|
||||
as the default charset rather than the authoritative charset.
|
||||
|
||||
```javascript
|
||||
var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', {
|
||||
charset: 'iso-8859-1',
|
||||
charsetSentinel: true
|
||||
});
|
||||
assert.deepEqual(detectedAsUtf8, { a: 'ø' });
|
||||
|
||||
// Browsers encode the checkmark as ✓ when submitting as iso-8859-1:
|
||||
var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', {
|
||||
charset: 'utf-8',
|
||||
charsetSentinel: true
|
||||
});
|
||||
assert.deepEqual(detectedAsIso8859_1, { a: 'ø' });
|
||||
```
|
||||
|
||||
If you want to decode the `&#...;` syntax to the actual character,
|
||||
you can specify the `interpretNumericEntities` option as well:
|
||||
|
||||
```javascript
|
||||
var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', {
|
||||
charset: 'iso-8859-1',
|
||||
interpretNumericEntities: true
|
||||
});
|
||||
assert.deepEqual(detectedAsIso8859_1, { a: '☺' });
|
||||
```
|
||||
|
||||
It also works when the charset has been detected in `charsetSentinel`
|
||||
mode.
|
||||
|
||||
### Parsing Arrays
|
||||
|
||||
**qs** can also parse arrays using a similar `[]` notation:
|
||||
|
||||
```javascript
|
||||
var withArray = qs.parse('a[]=b&a[]=c');
|
||||
assert.deepEqual(withArray, { a: ['b', 'c'] });
|
||||
```
|
||||
|
||||
You may specify an index as well:
|
||||
|
||||
```javascript
|
||||
var withIndexes = qs.parse('a[1]=c&a[0]=b');
|
||||
assert.deepEqual(withIndexes, { a: ['b', 'c'] });
|
||||
```
|
||||
|
||||
Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
|
||||
to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
|
||||
their order:
|
||||
|
||||
```javascript
|
||||
var noSparse = qs.parse('a[1]=b&a[15]=c');
|
||||
assert.deepEqual(noSparse, { a: ['b', 'c'] });
|
||||
```
|
||||
|
||||
Note that an empty string is also a value, and will be preserved:
|
||||
|
||||
```javascript
|
||||
var withEmptyString = qs.parse('a[]=&a[]=b');
|
||||
assert.deepEqual(withEmptyString, { a: ['', 'b'] });
|
||||
|
||||
var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
|
||||
assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
|
||||
```
|
||||
|
||||
**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
|
||||
instead be converted to an object with the index as the key. This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
|
||||
|
||||
```javascript
|
||||
var withMaxIndex = qs.parse('a[100]=b');
|
||||
assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
|
||||
```
|
||||
|
||||
This limit can be overridden by passing an `arrayLimit` option:
|
||||
|
||||
```javascript
|
||||
var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
|
||||
assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
|
||||
```
|
||||
|
||||
To disable array parsing entirely, set `parseArrays` to `false`.
|
||||
|
||||
```javascript
|
||||
var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
|
||||
assert.deepEqual(noParsingArrays, { a: { '0': 'b' } });
|
||||
```
|
||||
|
||||
If you mix notations, **qs** will merge the two items into an object:
|
||||
|
||||
```javascript
|
||||
var mixedNotation = qs.parse('a[0]=b&a[b]=c');
|
||||
assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });
|
||||
```
|
||||
|
||||
You can also create arrays of objects:
|
||||
|
||||
```javascript
|
||||
var arraysOfObjects = qs.parse('a[][b]=c');
|
||||
assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });
|
||||
```
|
||||
|
||||
Some people use comma to join array, **qs** can parse it:
|
||||
```javascript
|
||||
var arraysOfObjects = qs.parse('a=b,c', { comma: true })
|
||||
assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] })
|
||||
```
|
||||
(_this cannot convert nested objects, such as `a={b:1},{c:d}`_)
|
||||
|
||||
### Stringifying
|
||||
|
||||
[](#preventEval)
|
||||
```javascript
|
||||
qs.stringify(object, [options]);
|
||||
```
|
||||
|
||||
When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: 'b' }), 'a=b');
|
||||
assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
|
||||
```
|
||||
|
||||
This encoding can be disabled by setting the `encode` option to `false`:
|
||||
|
||||
```javascript
|
||||
var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
|
||||
assert.equal(unencoded, 'a[b]=c');
|
||||
```
|
||||
|
||||
Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
|
||||
```javascript
|
||||
var encodedValues = qs.stringify(
|
||||
{ a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
|
||||
{ encodeValuesOnly: true }
|
||||
);
|
||||
assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
|
||||
```
|
||||
|
||||
This encoding can also be replaced by a custom encoding method set as `encoder` option:
|
||||
|
||||
```javascript
|
||||
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
|
||||
// Passed in values `a`, `b`, `c`
|
||||
return // Return encoded string
|
||||
}})
|
||||
```
|
||||
|
||||
_(Note: the `encoder` option does not apply if `encode` is `false`)_
|
||||
|
||||
Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
|
||||
|
||||
```javascript
|
||||
var decoded = qs.parse('x=z', { decoder: function (str) {
|
||||
// Passed in values `x`, `z`
|
||||
return // Return decoded string
|
||||
}})
|
||||
```
|
||||
|
||||
Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
|
||||
|
||||
When arrays are stringified, by default they are given explicit indices:
|
||||
|
||||
```javascript
|
||||
qs.stringify({ a: ['b', 'c', 'd'] });
|
||||
// 'a[0]=b&a[1]=c&a[2]=d'
|
||||
```
|
||||
|
||||
You may override this by setting the `indices` option to `false`:
|
||||
|
||||
```javascript
|
||||
qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
|
||||
// 'a=b&a=c&a=d'
|
||||
```
|
||||
|
||||
You may use the `arrayFormat` option to specify the format of the output array:
|
||||
|
||||
```javascript
|
||||
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
|
||||
// 'a[0]=b&a[1]=c'
|
||||
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
|
||||
// 'a[]=b&a[]=c'
|
||||
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
|
||||
// 'a=b&a=c'
|
||||
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' })
|
||||
// 'a=b,c'
|
||||
```
|
||||
|
||||
When objects are stringified, by default they use bracket notation:
|
||||
|
||||
```javascript
|
||||
qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
|
||||
// 'a[b][c]=d&a[b][e]=f'
|
||||
```
|
||||
|
||||
You may override this to use dot notation by setting the `allowDots` option to `true`:
|
||||
|
||||
```javascript
|
||||
qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
|
||||
// 'a.b.c=d&a.b.e=f'
|
||||
```
|
||||
|
||||
Empty strings and null values will omit the value, but the equals sign (=) remains in place:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: '' }), 'a=');
|
||||
```
|
||||
|
||||
Key with no values (such as an empty object or array) will return nothing:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: [] }), '');
|
||||
assert.equal(qs.stringify({ a: {} }), '');
|
||||
assert.equal(qs.stringify({ a: [{}] }), '');
|
||||
assert.equal(qs.stringify({ a: { b: []} }), '');
|
||||
assert.equal(qs.stringify({ a: { b: {}} }), '');
|
||||
```
|
||||
|
||||
Properties that are set to `undefined` will be omitted entirely:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
|
||||
```
|
||||
|
||||
The query string may optionally be prepended with a question mark:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
|
||||
```
|
||||
|
||||
The delimiter may be overridden with stringify as well:
|
||||
|
||||
```javascript
|
||||
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
|
||||
```
|
||||
|
||||
If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
|
||||
|
||||
```javascript
|
||||
var date = new Date(7);
|
||||
assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
|
||||
assert.equal(
|
||||
qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
|
||||
'a=7'
|
||||
);
|
||||
```
|
||||
|
||||
You may use the `sort` option to affect the order of parameter keys:
|
||||
|
||||
```javascript
|
||||
function alphabeticalSort(a, b) {
|
||||
return a.localeCompare(b);
|
||||
}
|
||||
assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
|
||||
```
|
||||
|
||||
Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
|
||||
If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you
|
||||
pass an array, it will be used to select properties and array indices for stringification:
|
||||
|
||||
```javascript
|
||||
function filterFunc(prefix, value) {
|
||||
if (prefix == 'b') {
|
||||
// Return an `undefined` value to omit a property.
|
||||
return;
|
||||
}
|
||||
if (prefix == 'e[f]') {
|
||||
return value.getTime();
|
||||
}
|
||||
if (prefix == 'e[g][0]') {
|
||||
return value * 2;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
|
||||
// 'a=b&c=d&e[f]=123&e[g][0]=4'
|
||||
qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });
|
||||
// 'a=b&e=f'
|
||||
qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });
|
||||
// 'a[0]=b&a[2]=d'
|
||||
```
|
||||
|
||||
### Handling of `null` values
|
||||
|
||||
By default, `null` values are treated like empty strings:
|
||||
|
||||
```javascript
|
||||
var withNull = qs.stringify({ a: null, b: '' });
|
||||
assert.equal(withNull, 'a=&b=');
|
||||
```
|
||||
|
||||
Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings.
|
||||
|
||||
```javascript
|
||||
var equalsInsensitive = qs.parse('a&b=');
|
||||
assert.deepEqual(equalsInsensitive, { a: '', b: '' });
|
||||
```
|
||||
|
||||
To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`
|
||||
values have no `=` sign:
|
||||
|
||||
```javascript
|
||||
var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
|
||||
assert.equal(strictNull, 'a&b=');
|
||||
```
|
||||
|
||||
To parse values without `=` back to `null` use the `strictNullHandling` flag:
|
||||
|
||||
```javascript
|
||||
var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
|
||||
assert.deepEqual(parsedStrictNull, { a: null, b: '' });
|
||||
```
|
||||
|
||||
To completely skip rendering keys with `null` values, use the `skipNulls` flag:
|
||||
|
||||
```javascript
|
||||
var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
|
||||
assert.equal(nullsSkipped, 'a=b');
|
||||
```
|
||||
|
||||
If you're communicating with legacy systems, you can switch to `iso-8859-1`
|
||||
using the `charset` option:
|
||||
|
||||
```javascript
|
||||
var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' });
|
||||
assert.equal(iso, '%E6=%E6');
|
||||
```
|
||||
|
||||
Characters that don't exist in `iso-8859-1` will be converted to numeric
|
||||
entities, similar to what browsers do:
|
||||
|
||||
```javascript
|
||||
var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' });
|
||||
assert.equal(numeric, 'a=%26%239786%3B');
|
||||
```
|
||||
|
||||
You can use the `charsetSentinel` option to announce the character by
|
||||
including an `utf8=✓` parameter with the proper encoding if the checkmark,
|
||||
similar to what Ruby on Rails and others do when submitting forms.
|
||||
|
||||
```javascript
|
||||
var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true });
|
||||
assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA');
|
||||
|
||||
var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' });
|
||||
assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6');
|
||||
```
|
||||
|
||||
### Dealing with special character sets
|
||||
|
||||
By default the encoding and decoding of characters is done in `utf-8`,
|
||||
and `iso-8859-1` support is also built in via the `charset` parameter.
|
||||
|
||||
If you wish to encode querystrings to a different character set (i.e.
|
||||
[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
|
||||
[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
|
||||
|
||||
```javascript
|
||||
var encoder = require('qs-iconv/encoder')('shift_jis');
|
||||
var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
|
||||
assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
|
||||
```
|
||||
|
||||
This also works for decoding of query strings:
|
||||
|
||||
```javascript
|
||||
var decoder = require('qs-iconv/decoder')('shift_jis');
|
||||
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
|
||||
assert.deepEqual(obj, { a: 'こんにちは!' });
|
||||
```
|
||||
|
||||
### RFC 3986 and RFC 1738 space encoding
|
||||
|
||||
RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
|
||||
In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
|
||||
|
||||
```
|
||||
assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
|
||||
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
|
||||
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
|
||||
```
|
||||
|
||||
[1]: https://npmjs.org/package/qs
|
||||
[2]: http://versionbadg.es/ljharb/qs.svg
|
||||
[3]: https://api.travis-ci.org/ljharb/qs.svg
|
||||
[4]: https://travis-ci.org/ljharb/qs
|
||||
[5]: https://david-dm.org/ljharb/qs.svg
|
||||
[6]: https://david-dm.org/ljharb/qs
|
||||
[7]: https://david-dm.org/ljharb/qs/dev-status.svg
|
||||
[8]: https://david-dm.org/ljharb/qs?type=dev
|
||||
[9]: https://ci.testling.com/ljharb/qs.png
|
||||
[10]: https://ci.testling.com/ljharb/qs
|
||||
[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/qs.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/qs.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=qs
|
||||
Loaded 100 of 800 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user