-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-15eb77a1dd6adbf658fc.js
More file actions
7565 lines (6146 loc) · 333 KB
/
app-15eb77a1dd6adbf658fc.js
File metadata and controls
7565 lines (6146 loc) · 333 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],[
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(120);
} else {}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(38);
__webpack_require__(36);
var plugins = __webpack_require__(105);
var _require$publicLoader = __webpack_require__(2).publicLoader,
getResourcesForPathname = _require$publicLoader.getResourcesForPathname,
getResourcesForPathnameSync = _require$publicLoader.getResourcesForPathnameSync,
getResourceURLsForPathname = _require$publicLoader.getResourceURLsForPathname;
exports.apiRunner = function (api, args, defaultReturn, argTransform) {
if (args === void 0) {
args = {};
}
// Hooks for gatsby-cypress's API handler
if (undefined) {
if (window.___apiHandler) {
window.___apiHandler(api);
} else if (window.___resolvedAPIs) {
window.___resolvedAPIs.push(api);
} else {
window.___resolvedAPIs = [api];
}
}
var results = plugins.map(function (plugin) {
if (!plugin.plugin[api]) {
return undefined;
}
args.getResourcesForPathnameSync = getResourcesForPathnameSync;
args.getResourcesForPathname = getResourcesForPathname;
args.getResourceURLsForPathname = getResourceURLsForPathname;
var result = plugin.plugin[api](args, plugin.options);
if (result && argTransform) {
args = argTransform({
args: args,
result: result,
plugin: plugin
});
}
return result;
}); // Filter out undefined results.
results = results.filter(function (result) {
return typeof result !== "undefined";
});
if (results.length > 0) {
return results;
} else if (defaultReturn) {
return [defaultReturn];
} else {
return [];
}
};
exports.apiRunnerAsync = function (api, args, defaultReturn) {
return plugins.reduce(function (previous, next) {
return next.plugin[api] ? previous.then(function () {
return next.plugin[api](args, next.options);
}) : previous;
}, Promise.resolve());
};
/***/ }),
/* 2 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es7.array.includes.js
var es7_array_includes = __webpack_require__(107);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.string.includes.js
var es6_string_includes = __webpack_require__(108);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.regexp.replace.js
var es6_regexp_replace = __webpack_require__(45);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.array.find.js
var es6_array_find = __webpack_require__(111);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__(74);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__(55);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.string.iterator.js
var es6_string_iterator = __webpack_require__(75);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.promise.js
var es6_promise = __webpack_require__(38);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.object.to-string.js
var es6_object_to_string = __webpack_require__(36);
// EXTERNAL MODULE: ./node_modules/gatsby/node_modules/core-js/modules/es6.regexp.split.js
var es6_regexp_split = __webpack_require__(119);
// EXTERNAL MODULE: ./node_modules/@reach/router/lib/utils.js
var utils = __webpack_require__(24);
// CONCATENATED MODULE: ./.cache/strip-prefix.js
/**
* Remove a prefix from a string. Return the input string if the given prefix
* isn't found.
*/
/* harmony default export */ var strip_prefix = (function (str, prefix) {
if (prefix === void 0) {
prefix = "";
}
if (str.substr(0, prefix.length) === prefix) return str.slice(prefix.length);
return str;
});
// CONCATENATED MODULE: ./.cache/find-page.js
// TODO add tests especially for handling prefixed links.
var pageCache = {};
/* harmony default export */ var find_page = (function (pages, pathPrefix) {
if (pathPrefix === void 0) {
pathPrefix = "";
}
return function (rawPathname) {
var pathname = decodeURIComponent(rawPathname); // Remove the pathPrefix from the pathname.
var trimmedPathname = strip_prefix(pathname, pathPrefix); // Remove any hashfragment
if (trimmedPathname.split("#").length > 1) {
trimmedPathname = trimmedPathname.split("#").slice(0, -1).join("");
} // Remove search query
if (trimmedPathname.split("?").length > 1) {
trimmedPathname = trimmedPathname.split("?").slice(0, -1).join("");
}
if (pageCache[trimmedPathname]) {
return pageCache[trimmedPathname];
}
var foundPage; // Array.prototype.find is not supported in IE so we use this somewhat odd
// work around.
pages.some(function (page) {
var pathToMatch = page.matchPath ? page.matchPath : page.path;
if (Object(utils["match"])(pathToMatch, trimmedPathname)) {
foundPage = page;
pageCache[trimmedPathname] = page;
return true;
} // Finally, try and match request with default document.
if (Object(utils["match"])(page.path + "index.html", trimmedPathname)) {
foundPage = page;
pageCache[trimmedPathname] = page;
return true;
}
return false;
});
return foundPage;
};
});
// EXTERNAL MODULE: ./.cache/emitter.js + 1 modules
var emitter = __webpack_require__(10);
// CONCATENATED MODULE: ./.cache/prefetch.js
var support = function support(feature) {
if (typeof document === "undefined") {
return false;
}
var fakeLink = document.createElement("link");
try {
if (fakeLink.relList && typeof fakeLink.relList.supports === "function") {
return fakeLink.relList.supports(feature);
}
} catch (err) {
return false;
}
return false;
};
var linkPrefetchStrategy = function linkPrefetchStrategy(url) {
return new Promise(function (resolve, reject) {
if (typeof document === "undefined") {
reject();
return;
}
var link = document.createElement("link");
link.setAttribute("rel", "prefetch");
link.setAttribute("href", url);
link.onload = resolve;
link.onerror = reject;
var parentElement = document.getElementsByTagName("head")[0] || document.getElementsByName("script")[0].parentNode;
parentElement.appendChild(link);
});
};
var xhrPrefetchStrategy = function xhrPrefetchStrategy(url) {
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.withCredentials = true;
req.onload = function () {
if (req.status === 200) {
resolve();
} else {
reject();
}
};
req.send(null);
});
};
var supportedPrefetchStrategy = support("prefetch") ? linkPrefetchStrategy : xhrPrefetchStrategy;
var preFetched = {};
var prefetch = function prefetch(url) {
return new Promise(function (resolve) {
if (preFetched[url]) {
resolve();
return;
}
supportedPrefetchStrategy(url).then(function () {
resolve();
preFetched[url] = true;
}).catch(function () {}); // 404s are logged to the console anyway
});
};
/* harmony default export */ var _cache_prefetch = (prefetch);
// CONCATENATED MODULE: ./.cache/loader.js
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "postInitialRenderWork", function() { return postInitialRenderWork; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setApiRunnerForLoader", function() { return setApiRunnerForLoader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publicLoader", function() { return publicLoader; });
var preferDefault = function preferDefault(m) {
return m && m.default || m;
};
var devGetPageData;
var inInitialRender = true;
var hasFetched = Object.create(null);
var syncRequires = {};
var asyncRequires = {};
var jsonDataPaths = {};
var fetchHistory = [];
var fetchingPageResourceMapPromise = null;
var fetchedPageResourceMap = false;
/**
* Indicate if pages manifest is loaded
* - in production it is split to separate "pages-manifest" chunk that need to be lazy loaded,
* - in development it is part of single "common" chunk and is available from the start.
*/
var hasPageResourceMap = "production" !== "production";
var apiRunner;
var failedPaths = {};
var MAX_HISTORY = 5;
var jsonPromiseStore = {};
if (false) {}
/**
* Fetch resource map (pages data and paths to json files with results of
* queries)
*/
var fetchPageResourceMap = function fetchPageResourceMap() {
if (!fetchingPageResourceMapPromise) {
fetchingPageResourceMapPromise = new Promise(function (resolve) {
asyncRequires.data().then(function (_ref) {
var pages = _ref.pages,
dataPaths = _ref.dataPaths;
// TODO — expose proper way to access this data from plugins.
// Need to come up with an API for plugins to access
// site info.
window.___dataPaths = dataPaths;
queue.addPagesArray(pages);
queue.addDataPaths(dataPaths);
hasPageResourceMap = true;
resolve(fetchedPageResourceMap = true);
}).catch(function (e) {
console.warn("Failed to fetch pages manifest. Gatsby will reload on next navigation."); // failed to grab pages metadata
// for now let's just resolve this - on navigation this will cause missing resources
// and will trigger page reload and then it will retry
// this can happen with service worker updates when webpack manifest points to old
// chunk that no longer exists on server
resolve(fetchedPageResourceMap = true);
});
});
}
return fetchingPageResourceMapPromise;
};
var createJsonURL = function createJsonURL(jsonName) {
return "/face-api.js" + "/static/d/" + jsonName + ".json";
};
var createComponentUrls = function createComponentUrls(componentChunkName) {
return window.___chunkMapping[componentChunkName].map(function (chunk) {
return "/face-api.js" + chunk;
});
};
var fetchResource = function fetchResource(resourceName) {
// Find resource
var resourceFunction;
if (resourceName.slice(0, 12) === "component---") {
resourceFunction = asyncRequires.components[resourceName];
} else {
if (resourceName in jsonPromiseStore) {
resourceFunction = function resourceFunction() {
return jsonPromiseStore[resourceName];
};
} else {
resourceFunction = function resourceFunction() {
var fetchPromise = new Promise(function (resolve, reject) {
var url = createJsonURL(jsonDataPaths[resourceName]);
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.withCredentials = true;
req.onreadystatechange = function () {
if (req.readyState == 4) {
if (req.status === 200) {
resolve(JSON.parse(req.responseText));
} else {
delete jsonPromiseStore[resourceName];
reject();
}
}
};
req.send(null);
});
jsonPromiseStore[resourceName] = fetchPromise;
return fetchPromise;
};
}
} // Download the resource
hasFetched[resourceName] = true;
return new Promise(function (resolve) {
var fetchPromise = resourceFunction();
var failed = false;
return fetchPromise.catch(function () {
failed = true;
}).then(function (component) {
fetchHistory.push({
resource: resourceName,
succeeded: !failed
});
fetchHistory = fetchHistory.slice(-MAX_HISTORY);
resolve(component);
});
});
};
var loader_prefetchResource = function prefetchResource(resourceName) {
if (resourceName.slice(0, 12) === "component---") {
return Promise.all(createComponentUrls(resourceName).map(function (url) {
return _cache_prefetch(url);
}));
} else {
var url = createJsonURL(jsonDataPaths[resourceName]);
return _cache_prefetch(url);
}
};
var getResourceModule = function getResourceModule(resourceName) {
return fetchResource(resourceName).then(preferDefault);
};
var appearsOnLine = function appearsOnLine() {
var isOnLine = navigator.onLine;
if (typeof isOnLine === "boolean") {
return isOnLine;
} // If no navigator.onLine support assume onLine if any of last N fetches succeeded
var succeededFetch = fetchHistory.find(function (entry) {
return entry.succeeded;
});
return !!succeededFetch;
};
var handleResourceLoadError = function handleResourceLoadError(path, message) {
if (!failedPaths[path]) {
failedPaths[path] = message;
}
if (appearsOnLine() && window.location.pathname.replace(/\/$/g, "") !== path.replace(/\/$/g, "")) {
window.location.pathname = path;
}
};
var onPrefetchPathname = function onPrefetchPathname(pathname) {
if (!prefetchTriggered[pathname]) {
apiRunner("onPrefetchPathname", {
pathname: pathname
});
prefetchTriggered[pathname] = true;
}
};
var onPostPrefetchPathname = function onPostPrefetchPathname(pathname) {
if (!prefetchCompleted[pathname]) {
apiRunner("onPostPrefetchPathname", {
pathname: pathname
});
prefetchCompleted[pathname] = true;
}
};
/**
* Check if we should fallback to resources for 404 page if resources for a page are not found
*
* We can't do that when we don't have full pages manifest - we don't know if page exist or not if we don't have it.
* We also can't do that on initial render / mount in case we just can't load resources needed for first page.
* Not falling back to 404 resources will cause "EnsureResources" component to handle scenarios like this with
* potential reload
* @param {string} path Path to a page
*/
var shouldFallbackTo404Resources = function shouldFallbackTo404Resources(path) {
return (hasPageResourceMap || inInitialRender) && path !== "/404.html";
}; // Note we're not actively using the path data atm. There
// could be future optimizations however around trying to ensure
// we load all resources for likely-to-be-visited paths.
// let pathArray = []
// let pathCount = {}
var findPage;
var pathScriptsCache = {};
var prefetchTriggered = {};
var prefetchCompleted = {};
var disableCorePrefetching = false;
var queue = {
addPagesArray: function addPagesArray(newPages) {
findPage = find_page(newPages, "/face-api.js");
},
addDevRequires: function addDevRequires(devRequires) {
syncRequires = devRequires;
},
addProdRequires: function addProdRequires(prodRequires) {
asyncRequires = prodRequires;
},
addDataPaths: function addDataPaths(dataPaths) {
jsonDataPaths = dataPaths;
},
// Hovering on a link is a very strong indication the user is going to
// click on it soon so let's start prefetching resources for this
// pathname.
hovering: function hovering(path) {
queue.getResourcesForPathname(path);
},
enqueue: function enqueue(path) {
if (!apiRunner) console.error("Run setApiRunnerForLoader() before enqueing paths"); // Skip prefetching if we know user is on slow or constrained connection
if ("connection" in navigator) {
if ((navigator.connection.effectiveType || "").includes("2g")) {
return false;
}
if (navigator.connection.saveData) {
return false;
}
} // Tell plugins with custom prefetching logic that they should start
// prefetching this path.
onPrefetchPathname(path); // If a plugin has disabled core prefetching, stop now.
if (disableCorePrefetching.some(function (a) {
return a;
})) {
return false;
} // Check if the page exists.
var page = findPage(path); // In production, we lazy load page metadata. If that
// hasn't been fetched yet, start fetching it now.
if ( true && !page && !fetchedPageResourceMap) {
// If page wasn't found check and we didn't fetch resources map for
// all pages, wait for fetch to complete and try find page again
return fetchPageResourceMap().then(function () {
return queue.enqueue(path);
});
}
if (!page) {
return false;
}
if (false) {} // Prefetch resources.
if (true) {
Promise.all([loader_prefetchResource(page.jsonName), loader_prefetchResource(page.componentChunkName)]).then(function () {
// Tell plugins the path has been successfully prefetched
onPostPrefetchPathname(path);
});
}
return true;
},
getPage: function getPage(pathname) {
return findPage(pathname);
},
getResourceURLsForPathname: function getResourceURLsForPathname(path) {
var page = findPage(path);
if (page) {
return [].concat(createComponentUrls(page.componentChunkName), [createJsonURL(jsonDataPaths[page.jsonName])]);
} else {
return null;
}
},
getResourcesForPathnameSync: function getResourcesForPathnameSync(path) {
var page = findPage(path);
if (page) {
return pathScriptsCache[page.path];
} else if (shouldFallbackTo404Resources(path)) {
return queue.getResourcesForPathnameSync("/404.html");
} else {
return null;
}
},
// Get resources (code/data) for a path. Fetches metdata first
// if necessary and then the code/data bundles. Used for prefetching
// and getting resources for page changes.
getResourcesForPathname: function getResourcesForPathname(path) {
return new Promise(function (resolve, reject) {
// Production code path
if (failedPaths[path]) {
handleResourceLoadError(path, "Previously detected load failure for \"" + path + "\"");
reject();
return;
}
var page = findPage(path); // In production, we lazy load page metadata. If that
// hasn't been fetched yet, start fetching it now.
if (!page && !fetchedPageResourceMap && "production" === "production") {
// If page wasn't found check and we didn't fetch resources map for
// all pages, wait for fetch to complete and try to get resources again
fetchPageResourceMap().then(function () {
return resolve(queue.getResourcesForPathname(path));
});
return;
}
if (!page) {
if (shouldFallbackTo404Resources(path)) {
console.log("A page wasn't found for \"" + path + "\""); // Preload the custom 404 page
resolve(queue.getResourcesForPathname("/404.html"));
return;
}
resolve();
return;
} // Use the path from the page so the pathScriptsCache uses
// the normalized path.
path = page.path; // Check if it's in the cache already.
if (pathScriptsCache[path]) {
emitter["a" /* default */].emit("onPostLoadPageResources", {
page: page,
pageResources: pathScriptsCache[path]
});
resolve(pathScriptsCache[path]);
return;
} // Nope, we need to load resource(s)
emitter["a" /* default */].emit("onPreLoadPageResources", {
path: path
}); // In development we know the code is loaded already
// so we just return with it immediately.
if (false) { var pageResources; } else {
Promise.all([getResourceModule(page.componentChunkName), getResourceModule(page.jsonName)]).then(function (_ref2) {
var component = _ref2[0],
json = _ref2[1];
if (!(component && json)) {
resolve(null);
return;
}
var pageResources = {
component: component,
json: json,
page: page
};
pageResources.page.jsonURL = createJsonURL(jsonDataPaths[page.jsonName]);
pathScriptsCache[path] = pageResources;
resolve(pageResources);
emitter["a" /* default */].emit("onPostLoadPageResources", {
page: page,
pageResources: pageResources
}); // Tell plugins the path has been successfully prefetched
onPostPrefetchPathname(path);
});
}
});
}
};
var postInitialRenderWork = function postInitialRenderWork() {
inInitialRender = false;
if (true) {
// We got all resources needed for first mount,
// we can fetch resources for all pages.
fetchPageResourceMap();
}
};
var setApiRunnerForLoader = function setApiRunnerForLoader(runner) {
apiRunner = runner;
disableCorePrefetching = apiRunner("disableCorePrefetching");
};
var publicLoader = {
getResourcesForPathname: queue.getResourcesForPathname,
getResourceURLsForPathname: queue.getResourceURLsForPathname,
getResourcesForPathnameSync: queue.getResourcesForPathnameSync
};
/* harmony default export */ var loader = __webpack_exports__["default"] = (queue);
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(46)('wks');
var uid = __webpack_require__(41);
var Symbol = __webpack_require__(6).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(125)();
}
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(11);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 6 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/* 7 */
/***/ (function(module, exports) {
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
module.exports = _inheritsLoose;
/***/ }),
/* 8 */
/***/ (function(module, exports) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (false) {}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ }),
/* 10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/mitt/dist/mitt.es.js
//
// An event handler can take an optional event argument
// and should not return a value
// An array of all currently registered event handlers for a type
// A map of event types and their corresponding event handlers.
/** Mitt: Tiny (~200b) functional event emitter / pubsub.
* @name mitt
* @returns {Mitt}
*/
function mitt(all ) {
all = all || Object.create(null);
return {
/**
* Register an event handler for the given type.
*
* @param {String} type Type of event to listen for, or `"*"` for all events
* @param {Function} handler Function to call in response to given event
* @memberOf mitt
*/
on: function on(type , handler ) {
(all[type] || (all[type] = [])).push(handler);
},
/**
* Remove an event handler for the given type.
*
* @param {String} type Type of event to unregister `handler` from, or `"*"`
* @param {Function} handler Handler function to remove
* @memberOf mitt
*/
off: function off(type , handler ) {
if (all[type]) {
all[type].splice(all[type].indexOf(handler) >>> 0, 1);
}
},
/**
* Invoke all handlers for the given type.
* If present, `"*"` handlers are invoked after type-matched handlers.
*
* @param {String} type The event type to invoke
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
* @memberOf mitt
*/
emit: function emit(type , evt ) {
(all[type] || []).slice().map(function (handler) { handler(evt); });
(all['*'] || []).slice().map(function (handler) { handler(type, evt); });
}
};
}
/* harmony default export */ var mitt_es = (mitt);
//# sourceMappingURL=mitt.es.js.map
// CONCATENATED MODULE: ./.cache/emitter.js
var emitter = mitt_es();
/* harmony default export */ var _cache_emitter = __webpack_exports__["a"] = (emitter);
/***/ }),
/* 11 */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(6);
var core = __webpack_require__(21);
var hide = __webpack_require__(13);
var redefine = __webpack_require__(14);
var ctx = __webpack_require__(20);
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(25);
var createDesc = __webpack_require__(56);
module.exports = __webpack_require__(18) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(6);
var hide = __webpack_require__(13);
var has = __webpack_require__(26);
var SRC = __webpack_require__(41)('src');
var $toString = __webpack_require__(94);
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(21).inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);