UNPKG

fa-toolkit

Version:

a devtool for fast app

1 lines 11.2 kB
"use strict";var _0x33e7ad=_0x1223;function _0x1223(t,r){var e=_0x8266();return(_0x1223=function(t,r){return e[t-=276]})(t,r)}function _typeof(t){var e=_0x1223;return(_typeof="function"==typeof Symbol&&e(312)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&r(301)==typeof Symbol&&t[r(303)]===Symbol&&t!==Symbol[r(370)]?r(312):typeof t})(t)}function _regeneratorRuntime(){var f=_0x1223;_regeneratorRuntime=function(){return u};var u={},t=Object[f(370)],c=t[f(343)],h=Object.defineProperty||function(t,r,e){t[r]=e.value},r=f(301)==typeof Symbol?Symbol:{},i=r[f(390)]||f(318),e=r[f(287)]||f(351),n=r[f(286)]||f(387);function o(t,r,e){return Object[f(284)](t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var i,a,u,s,c,o=f,r=r&&r.prototype instanceof p?r:p,r=Object.create(r[o(370)]),n=new w(n||[]);return h(r,o(373),{value:(i=t,a=e,u=n,c=(s=f)(334),function(t,r){var e=s;if(e(375)===c)throw new Error(e(394));if(e(381)===c){if(e(366)===t)throw r;return I()}for(u[e(332)]=t,u[e(324)]=r;;){var n=u[e(330)];if(n){var o=function t(r,e){var n=f,o=e.method,i=r[n(390)][o];if(void 0===i)return e[n(330)]=null,"throw"===o&&r[n(390)].return&&(e[n(332)]=n(335),e.arg=void 0,t(r,e),n(366)===e[n(332)])||n(335)!==o&&(e[n(332)]=n(366),e[n(324)]=new TypeError(n(293)+o+"' method")),v;i=l(i,r[n(390)],e[n(324)]);if(n(366)===i[n(337)])return e[n(332)]="throw",e[n(324)]=i.arg,e[n(330)]=null,v;var i=i[n(324)];return i?i[n(300)]?(e[r[n(305)]]=i[n(278)],e.next=r.nextLoc,n(335)!==e[n(332)]&&(e[n(332)]=n(341),e.arg=void 0),e[n(330)]=null,v):i:(e.method=n(366),e[n(324)]=new TypeError("iterator result is not an object"),e[n(330)]=null,v)}(n,u);if(o){if(o===v)continue;return o}}if(e(341)===u[e(332)])u.sent=u[e(295)]=u[e(324)];else if(e(366)===u.method){if(e(334)===c)throw c="completed",u.arg;u[e(349)](u[e(324)])}else"return"===u[e(332)]&&u[e(316)]("return",u[e(324)]);c=e(375);o=l(i,a,u);if(e(285)===o[e(337)]){if(c=u[e(300)]?e(381):e(358),o.arg===v)continue;return{value:o[e(324)],done:u[e(300)]}}e(366)===o[e(337)]&&(c=e(381),u[e(332)]=e(366),u.arg=o.arg)}})}),r}function l(t,r,e){var n=f;try{return{type:n(285),arg:t[n(282)](r,e)}}catch(t){return{type:n(366),arg:t}}}u.wrap=s;var v={};function p(){}function a(){}function y(){}var d={};o(d,i,function(){return this});r=Object[f(319)],r=r&&r(r(S([])));r&&r!==t&&c.call(r,i)&&(d=r);var m=y.prototype=p[f(370)]=Object.create(d);function _(t){["next",f(366),"return"].forEach(function(r){o(t,r,function(t){return this[_0x1223(373)](r,t)})})}function g(u,s){var r,o=f;h(this,o(373),{value:function(e,n){function t(){return new s(function(t,r){!function r(t,e,n,o){var i=_0x1223,t=l(u[t],u,e);if("throw"!==t[i(337)]){var a=t.arg,e=a[i(278)];return e&&i(346)==_typeof(e)&&c.call(e,i(336))?s[i(279)](e.__await)[i(392)](function(t){r(i(341),t,n,o)},function(t){r(i(366),t,n,o)}):s[i(279)](e).then(function(t){a.value=t,n(a)},function(t){return r(i(366),t,n,o)})}o(t.arg)}(e,n,t,r)})}return r=r?r[o(392)](t,t):t()}})}function x(t){var r=f,e={tryLoc:t[0]};1 in t&&(e[r(382)]=t[1]),2 in t&&(e[r(369)]=t[2],e.afterLoc=t[3]),this[r(380)][r(313)](e)}function b(t){var r=f,e=t[r(296)]||{};e[r(337)]=r(285),delete e[r(324)],t[r(296)]=e}function w(t){var r=f;this.tryEntries=[{tryLoc:r(353)}],t.forEach(x,this),this[r(315)](!0)}function S(e){var n=f;if(e){var t=e[i];if(t)return t[n(282)](e);if(n(301)==typeof e[n(341)])return e;if(!isNaN(e[n(362)])){var o=-1,t=function t(){for(var r=n;++o<e[r(362)];)if(c[r(282)](e,o))return t[r(278)]=e[o],t[r(300)]=!1,t;return t[r(278)]=void 0,t[r(300)]=!0,t};return t[n(341)]=t}}return{next:I}}function I(){return{value:void 0,done:!0}}return a[f(370)]=y,h(m,f(303),{value:y,configurable:!0}),h(y,"constructor",{value:a,configurable:!0}),a.displayName=o(y,n,f(368)),u[f(340)]=function(t){var r=f,t="function"==typeof t&&t.constructor;return!!t&&(t===a||r(368)===(t[r(298)]||t.name))},u[f(393)]=function(t){var r=f;return Object.setPrototypeOf?Object[r(307)](t,y):(t[r(352)]=y,o(t,n,"GeneratorFunction")),t.prototype=Object[r(302)](m),t},u[f(389)]=function(t){return{__await:t}},_(g[f(370)]),o(g[f(370)],e,function(){return this}),u[f(344)]=g,u[f(329)]=function(t,r,e,n,o){var i=f;void 0===o&&(o=Promise);var a=new g(s(t,r,e,n),o);return u[i(340)](r)?a:a[i(341)]()[i(392)](function(t){var r=i;return t[r(300)]?t.value:a[r(341)]()})},_(m),o(m,n,f(374)),o(m,i,function(){return this}),o(m,f(321),function(){return f(386)}),u[f(326)]=function(t){var r,n=f,o=Object(t),i=[];for(r in o)i[n(313)](r);return i.reverse(),function t(){for(var r=n;i[r(362)];){var e=i[r(378)]();if(e in o)return t[r(278)]=e,t[r(300)]=!1,t}return t[r(300)]=!0,t}},u.values=S,w[f(370)]={constructor:w,reset:function(t){var r=f;if(this[r(280)]=0,this[r(341)]=0,this[r(277)]=this[r(295)]=void 0,this[r(300)]=!1,this[r(330)]=null,this[r(332)]=r(341),this.arg=void 0,this[r(380)][r(320)](b),!t)for(var e in this)"t"===e[r(283)](0)&&c[r(282)](this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){var t=f;this[t(300)]=!0;var r=this[t(380)][0].completion;if(t(366)===r[t(337)])throw r.arg;return this[t(276)]},dispatchException:function(n){var o=f;if(this[o(300)])throw n;var i=this;function t(t,r){var e=o;return a[e(337)]=e(366),a[e(324)]=n,i[e(341)]=t,r&&(i[e(332)]=e(341),i[e(324)]=void 0),!!r}for(var r=this[o(380)][o(362)]-1;0<=r;--r){var e=this.tryEntries[r],a=e[o(296)];if(o(353)===e[o(383)])return t(o(331));if(e.tryLoc<=this[o(280)]){var u=c[o(282)](e,o(382)),s=c.call(e,o(369));if(u&&s){if(this[o(280)]<e.catchLoc)return t(e.catchLoc,!0);if(this[o(280)]<e[o(369)])return t(e.finallyLoc)}else if(u){if(this.prev<e[o(382)])return t(e.catchLoc,!0)}else{if(!s)throw new Error(o(364));if(this[o(280)]<e[o(369)])return t(e[o(369)])}}}},abrupt:function(t,r){for(var e=f,n=this[e(380)][e(362)]-1;0<=n;--n){var o=this.tryEntries[n];if(o[e(383)]<=this[e(280)]&&c[e(282)](o,e(369))&&this[e(280)]<o[e(369)]){var i=o;break}}var a=(i=i&&(e(327)===t||"continue"===t)&&i[e(383)]<=r&&r<=i[e(369)]?null:i)?i[e(296)]:{};return a.type=t,a.arg=r,i?(this[e(332)]=e(341),this[e(341)]=i[e(369)],v):this[e(384)](a)},complete:function(t,r){var e=f;if(e(366)===t.type)throw t[e(324)];return e(327)===t[e(337)]||e(289)===t[e(337)]?this.next=t[e(324)]:"return"===t[e(337)]?(this.rval=this[e(324)]=t[e(324)],this.method="return",this[e(341)]=e(331)):e(285)===t[e(337)]&&r&&(this[e(341)]=r),v},finish:function(t){for(var r=f,e=this[r(380)][r(362)]-1;0<=e;--e){var n=this[r(380)][e];if(n[r(369)]===t)return this[r(384)](n[r(296)],n[r(355)]),b(n),v}},catch:function(t){for(var r=f,e=this[r(380)][r(362)]-1;0<=e;--e){var n=this[r(380)][e];if(n.tryLoc===t){var o,i=n[r(296)];return r(366)===i[r(337)]&&(o=i[r(324)],b(n)),o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){var n=f;return this[n(330)]={iterator:S(t),resultName:r,nextLoc:e},n(341)===this[n(332)]&&(this[n(324)]=void 0),v}},u}function asyncGeneratorStep(t,r,e,n,o,i,a){var u=_0x1223;try{var s=t[i](a),c=s[u(278)]}catch(t){return void e(t)}s[u(300)]?r(c):Promise[u(279)](c).then(n,o)}function _asyncToGenerator(s){return function(){var t=this,u=arguments;return new Promise(function(r,e){var n=_0x1223,o=s[n(308)](t,u);function i(t){asyncGeneratorStep(o,r,e,i,a,n(341),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,"throw",t)}i(void 0)})}}!function(){for(var t=_0x1223,r=_0x8266();;)try{if(104906==-parseInt(t(361))+-parseInt(t(317))/2+-parseInt(t(297))/3+parseInt(t(325))/4*(-parseInt(t(367))/5)+parseInt(t(348))/6+parseInt(t(377))/7*(-parseInt(t(292))/8)+parseInt(t(356))/9)break;r.push(r.shift())}catch(t){r.push(r.shift())}}();var _utils=require(_0x33e7ad(347)),_parser=require(_0x33e7ad(338)),path=require(_0x33e7ad(342)),loaderUtils=require(_0x33e7ad(314));function _0x8266(){var t=["afterLoc","2018943uGlpCN","cssList.push(_EXTRA_CSS_IMPORT_","suspendedYield","resourcePath","versionNum","29524xCTRTA","length","module.exports = mergeCss(cssList);","try statement without catch or finally","context","throw","429610kTmxdQ","GeneratorFunction","finallyLoc","prototype","cacheable","test","_invoke","Generator","executing","makeLoaderString","2198kOIGFP","pop","logWarn","tryEntries","completed","catchLoc","tryLoc","complete","var mergeCss = require","[object Generator]","@@toStringTag","options","awrap","iterator","jsVm","then","mark","Generator is already running","stop","_currentContext","rval","sent","value","resolve","prev","concat","call","charAt","defineProperty","normal","toStringTag","asyncIterator","stringifyRequest","continue","catch","ERROR: Style parsing error: ","248ADWDxU","The iterator does not provide a '","replace","_sent","completion","30006WIMjyP","displayName","\n ","done","function","create","constructor","wrap","resultName","join","setPrototypeOf","apply","parseQuery","query","cssList.push(","symbol","push","loader-utils","reset","abrupt","382952uegyqv","@@iterator","getPrototypeOf","forEach","toString","log","style","arg","4IOahSx","keys","break","genImportsPath","async","delegate","end","method","module.exports=","suspendedStart","return","__await","type","./parser"," = require(","isGeneratorFunction","next","path","hasOwnProperty","AsyncIterator","source","object","./utils","1243422FYtTUL","dispatchException","var _EXTRA_CSS_IMPORT_","@@asyncIterator","__proto__","root","parsed"];return(_0x8266=function(){return t})()}function handleParseStyleError(e,t){var n=_0x33e7ad;t&&0<t[n(362)]?t[n(320)](function(t){var r=n;_utils[r(379)](e,[{reason:r(291)[r(281)](t.reason,".")+r(299)[r(281)](t[r(345)])}])}):_utils.logWarn(e,[{reason:n(291)[n(281)](t)}])}function handleCommonImports(t,r,e,n){return _handleCommonImports[_0x33e7ad(308)](this,arguments)}function _handleCommonImports(){var n=_0x33e7ad;return(_handleCommonImports=_asyncToGenerator(_regeneratorRuntime()[n(393)](function t(o,r,e,i){var a,u=n;return _regeneratorRuntime()[u(304)](function(t){for(var n=u;;)switch(t[n(280)]=t[n(341)]){case 0:(a=["var cssList = [];"])[n(313)](n(385)+"(".concat(loaderUtils[n(288)](o,"!".concat(path.resolve(__dirname,"./style/css-merge"))),")")),r[n(320)](function(t,r){var e=n,t=loaderUtils[e(288)](o,"!!"[e(281)](_utils[e(376)](e(323),{source:1}),"!")[e(281)](t));a.push(e(350)[e(281)](r,e(339))[e(281)](t,");")),a.push(e(357)[e(281)](r,");"))}),a[n(313)](n(311)[n(281)](e,")")),a.push(n(363)),i(null,a[n(306)]("\n"));case 6:case n(331):return t[n(395)]()}},t)})))[n(308)](this,arguments)}module.exports=function(t,r,e){var n=_0x33e7ad,o=this;this[n(371)]&&this[n(371)]();var i=this[n(329)](),a=this[n(359)],u=this[n(388)][n(360)],s=this.options.widgetPathsList,c=loaderUtils[n(309)](this[n(310)]||"?")[n(391)];global._enableJsVm=c,global[n(396)]=path.basename(this[n(365)]);var f=[],h=t[n(294)](/\/\*[\s\S]*?\*\//g,"");_utils[n(328)](h,this[n(359)],function(t,r){var e=n;/\.css$/[e(372)](r)&&(h=h[e(294)](t,"")),f.push(r),o.addDependency(r)}),_parser.parseStyle({code:h,query:{resourcePath:a},versionNum:u,widgetPathsList:s,loaderContext:this}).then(function(t){var r=n,e=t[r(354)],t=t[r(322)];if(t&&t[r(362)]&&_utils[r(379)](o,t),f[r(362)])return handleCommonImports(o,f,e,i);i(null,r(333)[r(281)](e))})[n(290)](function(t){handleParseStyleError(o,t),i(null,"{}")})};