123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else {
- var a = factory();
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
- }
- })(global, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // object to store loaded chunks
- /******/ // "0" means "already loaded"
- /******/ var installedChunks = {
- /******/ 0: 0
- /******/ };
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/ // The chunk loading function for additional chunks
- /******/ // Since all referenced chunks are already included
- /******/ // in this file, this function is empty here.
- /******/ __webpack_require__.e = function requireEnsure() {
- /******/ return Promise.resolve();
- /******/ };
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "/";
- /******/
- /******/ // uncaught error handler for webpack runtime
- /******/ __webpack_require__.oe = function(err) {
- /******/ process.nextTick(function() {
- /******/ throw err; // catch this error by using import().catch()
- /******/ });
- /******/ };
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 22);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports) {
- module.exports = require("react");
- /***/ }),
- /* 1 */
- /***/ (function(module, exports) {
- module.exports = require("path");
- /***/ }),
- /* 2 */
- /***/ (function(module, exports) {
- module.exports = require("babel-plugin-universal-import/universalImport");
- /***/ }),
- /* 3 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var _reach_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
- /* harmony import */ var _reach_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reach_router__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _reach_router__WEBPACK_IMPORTED_MODULE_0__["Link"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _reach_router__WEBPACK_IMPORTED_MODULE_0__["Router"]; });
- /***/ }),
- /* 4 */
- /***/ (function(module, exports) {
- module.exports = require("react-static");
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(module) {
- var _typeof = __webpack_require__(9);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.setHasBabelPlugin = exports.ReportChunks = exports.MODULE_IDS = exports.CHUNK_NAMES = undefined;
- var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- var _createClass = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
- var _requireUniversalModule = __webpack_require__(28);
- Object.defineProperty(exports, 'CHUNK_NAMES', {
- enumerable: true,
- get: function get() {
- return _requireUniversalModule.CHUNK_NAMES;
- }
- });
- Object.defineProperty(exports, 'MODULE_IDS', {
- enumerable: true,
- get: function get() {
- return _requireUniversalModule.MODULE_IDS;
- }
- });
- var _reportChunks = __webpack_require__(30);
- Object.defineProperty(exports, 'ReportChunks', {
- enumerable: true,
- get: function get() {
- return _interopRequireDefault(_reportChunks)["default"];
- }
- });
- exports["default"] = universal;
- var _react = __webpack_require__(0);
- var _react2 = _interopRequireDefault(_react);
- var _propTypes = __webpack_require__(13);
- var _propTypes2 = _interopRequireDefault(_propTypes);
- var _hoistNonReactStatics = __webpack_require__(14);
- var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
- var _vm = __webpack_require__(31);
- var _requireUniversalModule2 = _interopRequireDefault(_requireUniversalModule);
- var _utils = __webpack_require__(10);
- var _helpers = __webpack_require__(32);
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
- return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
- }
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
- }
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
- }
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) {
- if (keys.indexOf(i) >= 0) continue;
- if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
- target[i] = obj[i];
- }
- return target;
- }
- var hasBabelPlugin = false;
- var isHMR = function isHMR() {
- return (// $FlowIgnore
- module.hot && (false)
- );
- };
- var setHasBabelPlugin = exports.setHasBabelPlugin = function setHasBabelPlugin() {
- hasBabelPlugin = true;
- };
- function universal(asyncModule) {
- var _class, _temp;
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var userRender = opts.render,
- _opts$loading = opts.loading,
- Loading = _opts$loading === undefined ? _utils.DefaultLoading : _opts$loading,
- _opts$error = opts.error,
- Err = _opts$error === undefined ? _utils.DefaultError : _opts$error,
- _opts$minDelay = opts.minDelay,
- minDelay = _opts$minDelay === undefined ? 0 : _opts$minDelay,
- _opts$alwaysDelay = opts.alwaysDelay,
- alwaysDelay = _opts$alwaysDelay === undefined ? false : _opts$alwaysDelay,
- _opts$testBabelPlugin = opts.testBabelPlugin,
- testBabelPlugin = _opts$testBabelPlugin === undefined ? false : _opts$testBabelPlugin,
- _opts$loadingTransiti = opts.loadingTransition,
- loadingTransition = _opts$loadingTransiti === undefined ? true : _opts$loadingTransiti,
- options = _objectWithoutProperties(opts, ['render', 'loading', 'error', 'minDelay', 'alwaysDelay', 'testBabelPlugin', 'loadingTransition']);
- var renderFunc = userRender || (0, _utils.createDefaultRender)(Loading, Err);
- var isDynamic = hasBabelPlugin || testBabelPlugin;
- options.isDynamic = isDynamic;
- options.usesBabelPlugin = hasBabelPlugin;
- options.modCache = {};
- options.promCache = {};
- return _temp = _class = function (_React$Component) {
- _inherits(UniversalComponent, _React$Component);
- _createClass(UniversalComponent, [{
- key: 'requireAsyncInner',
- value: function requireAsyncInner(requireAsync, props, state, context, isMount) {
- var _this2 = this;
- if (!state.mod && loadingTransition) {
- this.update({
- mod: null,
- props: props
- }); // display `loading` during componentWillReceiveProps
- }
- var time = new Date();
- requireAsync(props, context).then(function (mod) {
- var state = {
- mod: mod,
- props: props,
- context: context
- };
- var timeLapsed = new Date() - time;
- if (timeLapsed < minDelay) {
- var extraDelay = minDelay - timeLapsed;
- return setTimeout(function () {
- return _this2.update(state, isMount);
- }, extraDelay);
- }
- _this2.update(state, isMount);
- })["catch"](function (error) {
- return _this2.update({
- error: error,
- props: props,
- context: context
- });
- });
- }
- }, {
- key: 'handleBefore',
- value: function handleBefore(isMount, isSync) {
- var isServer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- if (this.props.onBefore) {
- var onBefore = this.props.onBefore;
- var info = {
- isMount: isMount,
- isSync: isSync,
- isServer: isServer
- };
- onBefore(info);
- }
- }
- }, {
- key: 'handleAfter',
- value: function handleAfter(state, isMount, isSync, isServer) {
- var mod = state.mod,
- error = state.error;
- if (mod && !error) {
- (0, _hoistNonReactStatics2["default"])(UniversalComponent, mod, {
- preload: true,
- preloadWeak: true
- });
- if (this.props.onAfter) {
- var onAfter = this.props.onAfter;
- var info = {
- isMount: isMount,
- isSync: isSync,
- isServer: isServer
- };
- onAfter(info, mod);
- }
- } else if (error && this.props.onError) {
- this.props.onError(error);
- }
- this.setState(state);
- } // $FlowFixMe
- }, {
- key: 'init',
- value: function init(props, context) {
- var _req = (0, _requireUniversalModule2["default"])(asyncModule, options, props),
- addModule = _req.addModule,
- requireSync = _req.requireSync,
- requireAsync = _req.requireAsync,
- asyncOnly = _req.asyncOnly;
- var mod = void 0;
- try {
- mod = requireSync(props, context);
- } catch (error) {
- return (0, _helpers.__update)(props, {
- error: error,
- props: props,
- context: context
- }, this._initialized);
- }
- this._asyncOnly = asyncOnly;
- var chunkName = addModule(props); // record the module for SSR flushing :)
- if (context.report) {
- context.report(chunkName);
- }
- if (mod || _utils.isServer) {
- this.handleBefore(true, true, _utils.isServer);
- return (0, _helpers.__update)(props, {
- asyncOnly: asyncOnly,
- props: props,
- mod: mod,
- context: context
- }, this._initialized, true, true, _utils.isServer);
- }
- this.handleBefore(true, false);
- this.requireAsyncInner(requireAsync, props, {
- props: props,
- asyncOnly: asyncOnly,
- mod: mod,
- context: context
- }, context, true);
- return {
- mod: mod,
- asyncOnly: asyncOnly,
- context: context,
- props: props
- };
- }
- }], [{
- key: 'preload',
- /* eslint-enable react/sort-comp */
- value: function preload(props) {
- var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- props = props || {};
- var _req2 = (0, _requireUniversalModule2["default"])(asyncModule, options, props),
- requireAsync = _req2.requireAsync,
- requireSync = _req2.requireSync;
- var mod = void 0;
- try {
- mod = requireSync(props, context);
- } catch (error) {
- return Promise.reject(error);
- }
- return Promise.resolve().then(function () {
- if (mod) return mod;
- return requireAsync(props, context);
- }).then(function (mod) {
- (0, _hoistNonReactStatics2["default"])(UniversalComponent, mod, {
- preload: true,
- preloadWeak: true
- });
- return mod;
- });
- }
- /* eslint-disable react/sort-comp */
- }, {
- key: 'preloadWeak',
- value: function preloadWeak(props) {
- var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- props = props || {};
- var _req3 = (0, _requireUniversalModule2["default"])(asyncModule, options, props),
- requireSync = _req3.requireSync;
- var mod = requireSync(props, context);
- if (mod) {
- (0, _hoistNonReactStatics2["default"])(UniversalComponent, mod, {
- preload: true,
- preloadWeak: true
- });
- }
- return mod;
- }
- }]);
- function UniversalComponent(props, context) {
- _classCallCheck(this, UniversalComponent);
- var _this = _possibleConstructorReturn(this, (UniversalComponent.__proto__ || Object.getPrototypeOf(UniversalComponent)).call(this, props, context));
- _this.update = function (state) {
- var isMount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var isSync = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var isServer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- if (!_this._initialized) return;
- if (!state.error) state.error = null;
- _this.handleAfter(state, isMount, isSync, isServer);
- };
- _this.state = _this.init(_this.props, _this.context); // $FlowFixMe
- _this.state.error = null;
- return _this;
- }
- _createClass(UniversalComponent, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this._initialized = true;
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate(prevProps) {
- var _this3 = this;
- if (isDynamic || this._asyncOnly) {
- var _req4 = (0, _requireUniversalModule2["default"])(asyncModule, options, this.props, prevProps),
- requireSync = _req4.requireSync,
- requireAsync = _req4.requireAsync,
- shouldUpdate = _req4.shouldUpdate;
- if (shouldUpdate(this.props, prevProps)) {
- var mod = void 0;
- try {
- mod = requireSync(this.props, this.context);
- } catch (error) {
- return this.update({
- error: error
- });
- }
- this.handleBefore(false, !!mod);
- if (!mod) {
- return this.requireAsyncInner(requireAsync, this.props, {
- mod: mod
- });
- }
- var state = {
- mod: mod
- };
- if (alwaysDelay) {
- if (loadingTransition) this.update({
- mod: null
- }); // display `loading` during componentWillReceiveProps
- setTimeout(function () {
- return _this3.update(state, false, true);
- }, minDelay);
- return;
- }
- this.update(state, false, true);
- }
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this._initialized = false;
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- isLoading = _props.isLoading,
- userError = _props.error,
- props = _objectWithoutProperties(_props, ['isLoading', 'error']);
- var _state = this.state,
- mod = _state.mod,
- error = _state.error;
- return renderFunc(props, mod, isLoading, userError || error);
- }
- }], [{
- key: 'getDerivedStateFromProps',
- value: function getDerivedStateFromProps(nextProps, currentState) {
- var _req5 = (0, _requireUniversalModule2["default"])(asyncModule, options, nextProps, currentState.props),
- requireSync = _req5.requireSync,
- shouldUpdate = _req5.shouldUpdate;
- if (isHMR() && shouldUpdate(currentState.props, nextProps)) {
- var mod = requireSync(nextProps, currentState.context);
- return _extends({}, currentState, {
- mod: mod
- });
- }
- return null;
- }
- }]);
- return UniversalComponent;
- }(_react2["default"].Component), _class.contextTypes = {
- store: _propTypes2["default"].object,
- report: _propTypes2["default"].func
- }, _temp;
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)(module)))
- /***/ }),
- /* 6 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _utils = __webpack_require__(10);
- var requireById = function requireById(id) {
- if (!(0, _utils.isWebpack)() && typeof id === 'string') {
- return __webpack_require__(29)("" + id);
- }
- return __webpack_require__('' + id);
- };
- exports["default"] = requireById;
- /***/ }),
- /* 7 */
- /***/ (function(module, exports) {
- module.exports = require("@reach/router");
- /***/ }),
- /* 8 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXTERNAL MODULE: external "react"
- var external_react_ = __webpack_require__(0);
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
- // EXTERNAL MODULE: external "react-static"
- var external_react_static_ = __webpack_require__(4);
- // EXTERNAL MODULE: /var/www/strong/src/components/Router.js
- var Router = __webpack_require__(3);
- // CONCATENATED MODULE: /var/www/strong/src/containers/Dynamic.js
- /* harmony default export */ var Dynamic = (function () {
- return /*#__PURE__*/external_react_default.a.createElement("div", null, "This is a dynamic page! It will not be statically exported, but is available at runtime");
- });
- // EXTERNAL MODULE: /var/www/strong/src/app.css
- var app = __webpack_require__(41);
- // CONCATENATED MODULE: /var/www/strong/src/App.js
- //
- // Any routes that start with 'dynamic' will be treated as non-static routes
- Object(external_react_static_["addPrefetchExcludes"])(['dynamic']);
- function App() {
- return /*#__PURE__*/external_react_default.a.createElement(external_react_static_["Root"], null, /*#__PURE__*/external_react_default.a.createElement("nav", null, /*#__PURE__*/external_react_default.a.createElement(Router["a" /* Link */], {
- to: "/"
- }, "Home"), /*#__PURE__*/external_react_default.a.createElement(Router["a" /* Link */], {
- to: "/about"
- }, "About"), /*#__PURE__*/external_react_default.a.createElement(Router["a" /* Link */], {
- to: "/blog"
- }, "Blog"), /*#__PURE__*/external_react_default.a.createElement(Router["a" /* Link */], {
- to: "/dynamic"
- }, "Dynamic")), /*#__PURE__*/external_react_default.a.createElement("div", {
- className: "content"
- }, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Suspense, {
- fallback: /*#__PURE__*/external_react_default.a.createElement("em", null, "Loading...")
- }, /*#__PURE__*/external_react_default.a.createElement(Router["b" /* Router */], null, /*#__PURE__*/external_react_default.a.createElement(Dynamic, {
- path: "dynamic"
- }), /*#__PURE__*/external_react_default.a.createElement(external_react_static_["Routes"], {
- path: "*"
- })))));
- }
- /* harmony default export */ var src_App = __webpack_exports__["a"] = (App);
- /***/ }),
- /* 9 */
- /***/ (function(module, exports) {
- module.exports = require("@babel/runtime/helpers/typeof");
- /***/ }),
- /* 10 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _typeof2 = __webpack_require__(9);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.cacheProm = exports.loadFromPromiseCache = exports.cacheExport = exports.loadFromCache = exports.callForString = exports.createDefaultRender = exports.createElement = exports.findExport = exports.resolveExport = exports.tryRequire = exports.DefaultError = exports.DefaultLoading = exports.babelInterop = exports.isWebpack = exports.isServer = exports.isTest = undefined;
- var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
- return _typeof2(obj);
- } : function (obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
- };
- var _react = __webpack_require__(0);
- var React = _interopRequireWildcard(_react);
- var _requireById = __webpack_require__(6);
- var _requireById2 = _interopRequireDefault(_requireById);
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- function _interopRequireWildcard(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
- }
- }
- newObj["default"] = obj;
- return newObj;
- }
- }
- var isTest = exports.isTest = "production" === 'test';
- var isServer = exports.isServer = !(typeof window !== 'undefined' && window.document && window.document.createElement);
- var isWebpack = exports.isWebpack = function isWebpack() {
- return typeof __webpack_require__ !== 'undefined';
- };
- var babelInterop = exports.babelInterop = function babelInterop(mod) {
- return mod && (typeof mod === 'undefined' ? 'undefined' : _typeof(mod)) === 'object' && mod.__esModule ? mod["default"] : mod;
- };
- var DefaultLoading = exports.DefaultLoading = function DefaultLoading() {
- return React.createElement('div', null, 'Loading...');
- };
- var DefaultError = exports.DefaultError = function DefaultError(_ref) {
- var error = _ref.error;
- return React.createElement('div', null, 'Error: ', error && error.message);
- };
- var tryRequire = exports.tryRequire = function tryRequire(id) {
- try {
- return (0, _requireById2["default"])(id);
- } catch (err) {
- // warn if there was an error while requiring the chunk during development
- // this can sometimes lead the server to render the loading component.
- if (false) {}
- }
- return null;
- };
- var resolveExport = exports.resolveExport = function resolveExport(mod, key, onLoad, chunkName, props, context, modCache) {
- var isSync = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
- var exp = findExport(mod, key);
- if (onLoad && mod) {
- var _isServer = typeof window === 'undefined';
- var info = {
- isServer: _isServer,
- isSync: isSync
- };
- onLoad(mod, info, props, context);
- }
- if (chunkName && exp) cacheExport(exp, chunkName, props, modCache);
- return exp;
- };
- var findExport = exports.findExport = function findExport(mod, key) {
- if (typeof key === 'function') {
- return key(mod);
- } else if (key === null) {
- return mod;
- }
- return mod && (typeof mod === 'undefined' ? 'undefined' : _typeof(mod)) === 'object' && key ? mod[key] : babelInterop(mod);
- };
- var createElement = exports.createElement = function createElement(Component, props) {
- return React.isValidElement(Component) ? React.cloneElement(Component, props) : React.createElement(Component, props);
- };
- var createDefaultRender = exports.createDefaultRender = function createDefaultRender(Loading, Err) {
- return function (props, mod, isLoading, error) {
- if (isLoading) {
- return createElement(Loading, props);
- } else if (error) {
- return createElement(Err, _extends({}, props, {
- error: error
- }));
- } else if (mod) {
- // primary usage (for async import loading + errors):
- return createElement(mod, props);
- }
- return createElement(Loading, props);
- };
- };
- var callForString = exports.callForString = function callForString(strFun, props) {
- return typeof strFun === 'function' ? strFun(props) : strFun;
- };
- var loadFromCache = exports.loadFromCache = function loadFromCache(chunkName, props, modCache) {
- return !isServer && modCache[callForString(chunkName, props)];
- };
- var cacheExport = exports.cacheExport = function cacheExport(exp, chunkName, props, modCache) {
- return modCache[callForString(chunkName, props)] = exp;
- };
- var loadFromPromiseCache = exports.loadFromPromiseCache = function loadFromPromiseCache(chunkName, props, promisecache) {
- return promisecache[callForString(chunkName, props)];
- };
- var cacheProm = exports.cacheProm = function cacheProm(pr, chunkName, props, promisecache) {
- return promisecache[callForString(chunkName, props)] = pr;
- };
- /***/ }),
- /* 11 */
- /***/ (function(module, exports) {
- module.exports = require("react-dom");
- /***/ }),
- /* 12 */
- /***/ (function(module, exports) {
- module.exports = require("/var/www/strong/node_modules/react-static/lib/browser");
- /***/ }),
- /* 13 */
- /***/ (function(module, exports) {
- module.exports = require("prop-types");
- /***/ }),
- /* 14 */
- /***/ (function(module, exports) {
- module.exports = require("hoist-non-react-statics");
- /***/ }),
- /* 15 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony default export */ __webpack_exports__["default"] = (function () {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h1", null, "404 - Oh no's! We couldn't find that page :("));
- });
- /***/ }),
- /* 16 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony default export */ __webpack_exports__["default"] = (function () {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", null, "React Static is a progressive static site generator for React."));
- });
- /***/ }),
- /* 17 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Blog; });
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react_static__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
- /* harmony import */ var react_static__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_static__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var components_Router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
- //
- function Blog() {
- var _useRouteData = Object(react_static__WEBPACK_IMPORTED_MODULE_1__["useRouteData"])(),
- posts = _useRouteData.posts;
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h1", null, "It's blog time."), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
- href: "#bottom",
- id: "top"
- }, "Scroll to bottom!")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br", null), "All Posts:", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", null, posts.map(function (post) {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", {
- key: post.id
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(components_Router__WEBPACK_IMPORTED_MODULE_2__[/* Link */ "a"], {
- to: "/blog/post/".concat(post.id, "/")
- }, post.title));
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
- href: "#top",
- id: "bottom"
- }, "Scroll to top!"));
- }
- /***/ }),
- /* 18 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony default export */ __webpack_exports__["default"] = (function () {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
- style: {
- textAlign: 'center'
- }
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h1", null, "Welcome to React-Static"));
- });
- /***/ }),
- /* 19 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Post; });
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react_static__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
- /* harmony import */ var react_static__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_static__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var components_Router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
- //
- function Post() {
- var _useRouteData = Object(react_static__WEBPACK_IMPORTED_MODULE_1__["useRouteData"])(),
- post = _useRouteData.post;
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(components_Router__WEBPACK_IMPORTED_MODULE_2__[/* Link */ "a"], {
- to: "/blog/"
- }, '<', " Back"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, post.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", null, post.body));
- }
- /***/ }),
- /* 20 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = void 0;
- var _react = _interopRequireDefault(__webpack_require__(0));
- var _reactStatic = __webpack_require__(4);
- var _router = __webpack_require__(7);
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends.apply(this, arguments);
- }
- function _objectWithoutProperties(source, excluded) {
- if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
- if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
- for (i = 0; i < sourceSymbolKeys.length; i++) {
- key = sourceSymbolKeys[i];
- if (excluded.indexOf(key) >= 0) continue;
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
- target[key] = source[key];
- }
- }
- return target;
- }
- function _objectWithoutPropertiesLoose(source, excluded) {
- if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
- for (i = 0; i < sourceKeys.length; i++) {
- key = sourceKeys[i];
- if (excluded.indexOf(key) >= 0) continue;
- target[key] = source[key];
- }
- return target;
- }
- var _default = function _default(_ref) {
- var _ref$RouterProps = _ref.RouterProps,
- userRouterProps = _ref$RouterProps === void 0 ? {} : _ref$RouterProps;
- return {
- Root: function Root(PreviousRoot) {
- return function (_ref2) {
- var children = _ref2.children,
- rest = _objectWithoutProperties(_ref2, ["children"]);
- var basepath = (0, _reactStatic.useBasepath)();
- var staticInfo = (0, _reactStatic.useStaticInfo)();
- var RouteHandler = function RouteHandler(props) {
- return _react["default"].createElement(PreviousRoot, _extends({}, rest, props), children);
- };
- var renderedChildren = // Place a top-level router inside the root
- // This will give proper context to Link and other reach components
- _react["default"].createElement(_router.Router, _extends({}, basepath ? {
- basepath: basepath
- } : {}, userRouterProps), _react["default"].createElement(RouteHandler, {
- path: "/*"
- })); // If we're in SSR, use a manual server location
- return typeof document === 'undefined' ? _react["default"].createElement(_router.ServerLocation, {
- url: (0, _reactStatic.makePathAbsolute)("".concat(basepath, "/").concat(staticInfo.path))
- }, renderedChildren) : renderedChildren;
- };
- },
- Routes: function Routes(PreviousRoutes) {
- return function (props) {
- return (// Wrap Routes in location
- _react["default"].createElement(_router.Location, null, function (location) {
- return _react["default"].createElement(PreviousRoutes, _extends({
- path: "/*"
- }, props, {
- location: location
- }));
- })
- );
- };
- }
- };
- };
- exports["default"] = _default;
- /***/ }),
- /* 21 */
- /***/ (function(module, exports) {
- module.exports = require("react-hot-loader");
- /***/ }),
- /* 22 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(23);
- __webpack_require__(25);
- module.exports = __webpack_require__(33);
- /***/ }),
- /* 23 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* eslint-disable import/no-dynamic-require */
- var plugins = __webpack_require__(24)["default"];
- var _require = __webpack_require__(12),
- registerPlugins = _require.registerPlugins;
- registerPlugins(plugins);
- if (false) {}
- /***/ }),
- /* 24 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _react_static_root_node_modules_react_static_plugin_reach_router_browser_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
- /* harmony import */ var _react_static_root_node_modules_react_static_plugin_reach_router_browser_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react_static_root_node_modules_react_static_plugin_reach_router_browser_api_js__WEBPACK_IMPORTED_MODULE_0__);
- // Imports
- // Plugins
- var plugins = [{
- location: "__react_static_root__/node_modules/react-static-plugin-source-filesystem",
- plugins: [],
- hooks: {}
- }, {
- location: "__react_static_root__/node_modules/react-static-plugin-reach-router",
- plugins: [],
- hooks: _react_static_root_node_modules_react_static_plugin_reach_router_browser_api_js__WEBPACK_IMPORTED_MODULE_0___default()({})
- }, {
- location: "__react_static_root__/node_modules/react-static-plugin-sitemap/dist",
- plugins: [],
- hooks: {}
- }, {
- location: "__react_static_root__/",
- plugins: [],
- hooks: {}
- }]; // Export em!
- /* harmony default export */ __webpack_exports__["default"] = (plugins);
- /***/ }),
- /* 25 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* eslint-disable import/no-dynamic-require */
- var _require = __webpack_require__(12),
- registerTemplates = _require.registerTemplates;
- var _require2 = __webpack_require__(26),
- templates = _require2["default"],
- notFoundTemplate = _require2.notFoundTemplate;
- registerTemplates(templates, notFoundTemplate);
- if (false) {}
- /***/ }),
- /* 26 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* WEBPACK VAR INJECTION */(function(__dirname) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "notFoundTemplate", function() { return notFoundTemplate; });
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
- /* harmony import */ var babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var react_universal_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
- /* harmony import */ var react_universal_component__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_universal_component__WEBPACK_IMPORTED_MODULE_3__);
- Object(react_universal_component__WEBPACK_IMPORTED_MODULE_3__["setHasBabelPlugin"])();
- var universalOptions = {
- loading: function loading() {
- return null;
- },
- error: function error(props) {
- console.error(props.error);
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", null, "An error occurred loading this page's template. More information is available in the console.");
- },
- ignoreBabelRename: true
- };
- var t_0 = react_universal_component__WEBPACK_IMPORTED_MODULE_3___default()(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default()({
- id: "__react_static_root__/src/pages/404.js",
- load: function load() {
- return Promise.all([Promise.resolve(/* import() | __react_static_root__/src/pages/404 */).then(__webpack_require__.bind(null, 15))]).then(function (proms) {
- return proms[0];
- });
- },
- path: function path() {
- return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(__dirname, '__react_static_root__/src/pages/404.js');
- },
- resolve: function resolve() {
- return /*require.resolve*/(15);
- },
- chunkName: function chunkName() {
- return "__react_static_root__/src/pages/404";
- }
- }), universalOptions);
- t_0.template = '__react_static_root__/src/pages/404.js';
- var t_1 = react_universal_component__WEBPACK_IMPORTED_MODULE_3___default()(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default()({
- id: "__react_static_root__/src/pages/about.js",
- load: function load() {
- return Promise.all([Promise.resolve(/* import() | __react_static_root__/src/pages/about */).then(__webpack_require__.bind(null, 16))]).then(function (proms) {
- return proms[0];
- });
- },
- path: function path() {
- return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(__dirname, '__react_static_root__/src/pages/about.js');
- },
- resolve: function resolve() {
- return /*require.resolve*/(16);
- },
- chunkName: function chunkName() {
- return "__react_static_root__/src/pages/about";
- }
- }), universalOptions);
- t_1.template = '__react_static_root__/src/pages/about.js';
- var t_2 = react_universal_component__WEBPACK_IMPORTED_MODULE_3___default()(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default()({
- id: "__react_static_root__/src/pages/blog.js",
- load: function load() {
- return Promise.all([Promise.resolve(/* import() | __react_static_root__/src/pages/blog */).then(__webpack_require__.bind(null, 17))]).then(function (proms) {
- return proms[0];
- });
- },
- path: function path() {
- return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(__dirname, '__react_static_root__/src/pages/blog.js');
- },
- resolve: function resolve() {
- return /*require.resolve*/(17);
- },
- chunkName: function chunkName() {
- return "__react_static_root__/src/pages/blog";
- }
- }), universalOptions);
- t_2.template = '__react_static_root__/src/pages/blog.js';
- var t_3 = react_universal_component__WEBPACK_IMPORTED_MODULE_3___default()(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default()({
- id: "__react_static_root__/src/pages/index.js",
- load: function load() {
- return Promise.all([Promise.resolve(/* import() | __react_static_root__/src/pages/index */).then(__webpack_require__.bind(null, 18))]).then(function (proms) {
- return proms[0];
- });
- },
- path: function path() {
- return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(__dirname, '__react_static_root__/src/pages/index.js');
- },
- resolve: function resolve() {
- return /*require.resolve*/(18);
- },
- chunkName: function chunkName() {
- return "__react_static_root__/src/pages/index";
- }
- }), universalOptions);
- t_3.template = '__react_static_root__/src/pages/index.js';
- var t_4 = react_universal_component__WEBPACK_IMPORTED_MODULE_3___default()(babel_plugin_universal_import_universalImport__WEBPACK_IMPORTED_MODULE_1___default()({
- id: "__react_static_root__/src/containers/Post",
- load: function load() {
- return Promise.all([Promise.resolve(/* import() | __react_static_root__/src/containers/Post */).then(__webpack_require__.bind(null, 19))]).then(function (proms) {
- return proms[0];
- });
- },
- path: function path() {
- return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(__dirname, '__react_static_root__/src/containers/Post');
- },
- resolve: function resolve() {
- return /*require.resolve*/(19);
- },
- chunkName: function chunkName() {
- return "__react_static_root__/src/containers/Post";
- }
- }), universalOptions);
- t_4.template = '__react_static_root__/src/containers/Post'; // Template Map
- /* harmony default export */ __webpack_exports__["default"] = ({
- '__react_static_root__/src/pages/404.js': t_0,
- '__react_static_root__/src/pages/about.js': t_1,
- '__react_static_root__/src/pages/blog.js': t_2,
- '__react_static_root__/src/pages/index.js': t_3,
- '__react_static_root__/src/containers/Post': t_4
- }); // Not Found Template
- var notFoundTemplate = "__react_static_root__/src/pages/404.js";
- /* WEBPACK VAR INJECTION */}.call(this, "/"))
- /***/ }),
- /* 27 */
- /***/ (function(module, exports) {
- module.exports = function (module) {
- if (!module.webpackPolyfill) {
- module.deprecate = function () {};
- module.paths = []; // module.parent = undefined by default
- if (!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function get() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function get() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /* 28 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.clearChunks = exports.flushModuleIds = exports.flushChunkNames = exports.MODULE_IDS = exports.CHUNK_NAMES = undefined;
- var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- exports["default"] = requireUniversalModule;
- var _utils = __webpack_require__(10);
- var CHUNK_NAMES = exports.CHUNK_NAMES = new Set();
- var MODULE_IDS = exports.MODULE_IDS = new Set();
- function requireUniversalModule(universalConfig, options, props, prevProps) {
- var key = options.key,
- _options$timeout = options.timeout,
- timeout = _options$timeout === undefined ? 15000 : _options$timeout,
- onLoad = options.onLoad,
- onError = options.onError,
- isDynamic = options.isDynamic,
- modCache = options.modCache,
- promCache = options.promCache,
- usesBabelPlugin = options.usesBabelPlugin;
- var config = getConfig(isDynamic, universalConfig, options, props);
- var chunkName = config.chunkName,
- path = config.path,
- resolve = config.resolve,
- load = config.load;
- var asyncOnly = !path && !resolve || typeof chunkName === 'function';
- var requireSync = function requireSync(props, context) {
- var exp = (0, _utils.loadFromCache)(chunkName, props, modCache);
- if (!exp) {
- var mod = void 0;
- if (!(0, _utils.isWebpack)() && path) {
- var modulePath = (0, _utils.callForString)(path, props) || '';
- mod = (0, _utils.tryRequire)(modulePath);
- } else if ((0, _utils.isWebpack)() && resolve) {
- var weakId = (0, _utils.callForString)(resolve, props);
- if (__webpack_require__.m[weakId]) {
- mod = (0, _utils.tryRequire)(weakId);
- }
- }
- if (mod) {
- exp = (0, _utils.resolveExport)(mod, key, onLoad, chunkName, props, context, modCache, true);
- }
- }
- return exp;
- };
- var requireAsync = function requireAsync(props, context) {
- var exp = (0, _utils.loadFromCache)(chunkName, props, modCache);
- if (exp) return Promise.resolve(exp);
- var cachedPromise = (0, _utils.loadFromPromiseCache)(chunkName, props, promCache);
- if (cachedPromise) return cachedPromise;
- var prom = new Promise(function (res, rej) {
- var reject = function reject(error) {
- error = error || new Error('timeout exceeded');
- clearTimeout(timer);
- if (onError) {
- var _isServer = typeof window === 'undefined';
- var info = {
- isServer: _isServer
- };
- onError(error, info);
- }
- rej(error);
- }; // const timer = timeout && setTimeout(reject, timeout)
- var timer = timeout && setTimeout(reject, timeout);
- var resolve = function resolve(mod) {
- clearTimeout(timer);
- var exp = (0, _utils.resolveExport)(mod, key, onLoad, chunkName, props, context, modCache);
- if (exp) return res(exp);
- reject(new Error('export not found'));
- };
- var request = load(props, {
- resolve: resolve,
- reject: reject
- }); // if load doesn't return a promise, it must call resolveImport
- // itself. Most common is the promise implementation below.
- if (!request || typeof request.then !== 'function') return;
- request.then(resolve)["catch"](reject);
- });
- (0, _utils.cacheProm)(prom, chunkName, props, promCache);
- return prom;
- };
- var addModule = function addModule(props) {
- if (_utils.isServer || _utils.isTest) {
- if (chunkName) {
- var name = (0, _utils.callForString)(chunkName, props);
- if (usesBabelPlugin) {
- // if ignoreBabelRename is true, don't apply regex
- var shouldKeepName = options && !!options.ignoreBabelRename;
- if (!shouldKeepName) {
- name = name.replace(/\//g, '-');
- }
- }
- if (name) CHUNK_NAMES.add(name);
- if (!_utils.isTest) return name; // makes tests way smaller to run both kinds
- }
- if ((0, _utils.isWebpack)()) {
- var weakId = (0, _utils.callForString)(resolve, props);
- if (weakId) MODULE_IDS.add(weakId);
- return weakId;
- }
- if (!(0, _utils.isWebpack)()) {
- var modulePath = (0, _utils.callForString)(path, props);
- if (modulePath) MODULE_IDS.add(modulePath);
- return modulePath;
- }
- }
- };
- var shouldUpdate = function shouldUpdate(next, prev) {
- var cacheKey = (0, _utils.callForString)(chunkName, next);
- var config = getConfig(isDynamic, universalConfig, options, prev);
- var prevCacheKey = (0, _utils.callForString)(config.chunkName, prev);
- return cacheKey !== prevCacheKey;
- };
- return {
- requireSync: requireSync,
- requireAsync: requireAsync,
- addModule: addModule,
- shouldUpdate: shouldUpdate,
- asyncOnly: asyncOnly
- };
- }
- var flushChunkNames = exports.flushChunkNames = function flushChunkNames() {
- var chunks = Array.from(CHUNK_NAMES);
- CHUNK_NAMES.clear();
- return chunks;
- };
- var flushModuleIds = exports.flushModuleIds = function flushModuleIds() {
- var ids = Array.from(MODULE_IDS);
- MODULE_IDS.clear();
- return ids;
- };
- var clearChunks = exports.clearChunks = function clearChunks() {
- CHUNK_NAMES.clear();
- MODULE_IDS.clear();
- };
- var getConfig = function getConfig(isDynamic, universalConfig, options, props) {
- if (isDynamic) {
- var resultingConfig = typeof universalConfig === 'function' ? universalConfig(props) : universalConfig;
- if (options) {
- resultingConfig = _extends({}, resultingConfig, options);
- }
- return resultingConfig;
- }
- var load = typeof universalConfig === 'function' ? universalConfig : // $FlowIssue
- function () {
- return universalConfig;
- };
- return {
- file: 'default',
- id: options.id || 'default',
- chunkName: options.chunkName || 'default',
- resolve: options.resolve || '',
- path: options.path || '',
- load: load,
- ignoreBabelRename: true
- };
- };
- /***/ }),
- /* 29 */
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- ".": 6,
- "./": 6,
- "./index": 6,
- "./index.js": 6
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = 29;
- /***/ }),
- /* 30 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _typeof = __webpack_require__(9);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _createClass = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
- var _react = __webpack_require__(0);
- var _react2 = _interopRequireDefault(_react);
- var _propTypes = __webpack_require__(13);
- var _propTypes2 = _interopRequireDefault(_propTypes);
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
- return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
- }
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
- }
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
- }
- var ReportChunks = function (_React$Component) {
- _inherits(ReportChunks, _React$Component);
- function ReportChunks() {
- _classCallCheck(this, ReportChunks);
- return _possibleConstructorReturn(this, (ReportChunks.__proto__ || Object.getPrototypeOf(ReportChunks)).apply(this, arguments));
- }
- _createClass(ReportChunks, [{
- key: 'getChildContext',
- value: function getChildContext() {
- return {
- report: this.props.report
- };
- }
- }, {
- key: 'render',
- value: function render() {
- return _react2["default"].Children.only(this.props.children);
- }
- }]);
- return ReportChunks;
- }(_react2["default"].Component);
- ReportChunks.propTypes = {
- report: _propTypes2["default"].func.isRequired
- };
- ReportChunks.childContextTypes = {
- report: _propTypes2["default"].func.isRequired
- };
- exports["default"] = ReportChunks;
- /***/ }),
- /* 31 */
- /***/ (function(module, exports) {
- module.exports = require("vm");
- /***/ }),
- /* 32 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.__handleAfter = exports.__update = undefined;
- var _hoistNonReactStatics = __webpack_require__(14);
- var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
- var _index = __webpack_require__(5);
- var _index2 = _interopRequireDefault(_index);
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- var __update = exports.__update = function __update(props, state, isInitialized) {
- var isMount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- var isSync = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
- var isServer = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
- if (!isInitialized) return state;
- if (!state.error) {
- state.error = null;
- }
- return __handleAfter(props, state, isMount, isSync, isServer);
- };
- /* eslint class-methods-use-this: ["error", { "exceptMethods": ["__handleAfter"] }] */
- var __handleAfter = exports.__handleAfter = function __handleAfter(props, state, isMount, isSync, isServer) {
- var mod = state.mod,
- error = state.error;
- if (mod && !error) {
- (0, _hoistNonReactStatics2["default"])(_index2["default"], mod, {
- preload: true,
- preloadWeak: true
- });
- if (props.onAfter) {
- var onAfter = props.onAfter;
- var info = {
- isMount: isMount,
- isSync: isSync,
- isServer: isServer
- };
- onAfter(info, mod);
- }
- } else if (error && props.onError) {
- props.onError(error);
- }
- return state;
- };
- /***/ }),
- /* 33 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireWildcard = __webpack_require__(34);
- var _interopRequireDefault = __webpack_require__(35);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = void 0;
- var _extends2 = _interopRequireDefault(__webpack_require__(36));
- var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(37));
- var React = _interopRequireWildcard(__webpack_require__(0));
- var _useStaticInfo = __webpack_require__(38);
- /* eslint-disable import/no-dynamic-require */
- var OriginalSuspense = React.Suspense;
- function Suspense(_ref) {
- var key = _ref.key,
- children = _ref.children,
- rest = (0, _objectWithoutProperties2["default"])(_ref, ["key", "children"]);
- return typeof document !== 'undefined' ? React.createElement(OriginalSuspense, (0, _extends2["default"])({
- key: key
- }, rest), children) : React.createElement(React.Fragment, {
- key: key
- }, children);
- } // Override the suspense module to be our own
- React.Suspense = Suspense;
- React["default"].Suspense = Suspense;
- var App = __webpack_require__(39)["default"];
- var _default = function _default(staticInfo) {
- return function (props) {
- return React.createElement(_useStaticInfo.staticInfoContext.Provider, {
- value: staticInfo
- }, React.createElement(App, props));
- };
- };
- exports["default"] = _default;
- /***/ }),
- /* 34 */
- /***/ (function(module, exports) {
- module.exports = require("@babel/runtime/helpers/interopRequireWildcard");
- /***/ }),
- /* 35 */
- /***/ (function(module, exports) {
- module.exports = require("@babel/runtime/helpers/interopRequireDefault");
- /***/ }),
- /* 36 */
- /***/ (function(module, exports) {
- module.exports = require("@babel/runtime/helpers/extends");
- /***/ }),
- /* 37 */
- /***/ (function(module, exports) {
- module.exports = require("@babel/runtime/helpers/objectWithoutProperties");
- /***/ }),
- /* 38 */
- /***/ (function(module, exports) {
- module.exports = require("/var/www/strong/node_modules/react-static/lib/browser/hooks/useStaticInfo");
- /***/ }),
- /* 39 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_hot_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
- /* harmony import */ var react_hot_loader__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_hot_loader__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _App__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
- // Your top level component
- // Export your top level component as JSX (for static rendering)
- /* harmony default export */ __webpack_exports__["default"] = (_App__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]); // Render your app
- if (typeof document !== 'undefined') {
- var target = document.getElementById('root');
- var renderMethod = target.hasChildNodes() ? react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.hydrate : react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render;
- var render = function render(Comp) {
- renderMethod( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_hot_loader__WEBPACK_IMPORTED_MODULE_2__["AppContainer"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Comp, null)), target);
- }; // Render!
- render(_App__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]); // Hot Module Replacement
- if (module && module.hot) {
- module.hot.accept('./App', function () {
- render(_App__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]);
- });
- }
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(40)(module)))
- /***/ }),
- /* 40 */
- /***/ (function(module, exports) {
- module.exports = function (originalModule) {
- if (!originalModule.webpackPolyfill) {
- var module = Object.create(originalModule); // module.parent = undefined by default
- if (!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function get() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function get() {
- return module.i;
- }
- });
- Object.defineProperty(module, "exports", {
- enumerable: true
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /* 41 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(42)(false);
- // Module
- exports.push([module.i, "* {\n scroll-behavior: smooth;\n}\n\nbody {\n font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue',\n Helvetica, Arial, 'Lucida Grande', sans-serif;\n font-weight: 300;\n font-size: 16px;\n margin: 0;\n padding: 0;\n}\n\na {\n text-decoration: none;\n color: #108db8;\n font-weight: bold;\n}\n\nimg {\n max-width: 100%;\n}\n\nnav {\n width: 100%;\n background: #108db8;\n}\n\nnav a {\n color: white;\n padding: 1rem;\n display: inline-block;\n}\n\n.content {\n padding: 1rem;\n}\n", ""]);
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function (useSourceMap) {
- var list = []; // return the list of modules as css string
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
- if (item[2]) {
- return '@media ' + item[2] + '{' + content + '}';
- } else {
- return content;
- }
- }).join('');
- }; // import a list of modules into the list
- list.i = function (modules, mediaQuery) {
- if (typeof modules === 'string') {
- modules = [[null, modules, '']];
- }
- var alreadyImportedModules = {};
- for (var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if (id != null) {
- alreadyImportedModules[id] = true;
- }
- }
- for (i = 0; i < modules.length; i++) {
- var item = modules[i]; // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if (item[0] == null || !alreadyImportedModules[item[0]]) {
- if (mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if (mediaQuery) {
- item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
- if (!cssMapping) {
- return content;
- }
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
- return [content].join('\n');
- } // Adapted from convert-source-map (MIT)
- function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
- }
- /***/ })
- /******/ ]);
- });
|