UNPKG

11.6 kBJavaScriptView Raw
1// modules are defined as an array
2// [ module function, map of requires ]
3//
4// map of requires is short require name -> numeric require
5//
6// anything defined in a previous bundle is accessed via the
7// orig method which is the require for previous bundles
8parcelRequire = (function (modules, cache, entry, globalName) {
9 // Save the require from previous bundle to this closure if any
10 var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11 var nodeRequire = typeof require === 'function' && require;
12
13 function newRequire(name, jumped) {
14 if (!cache[name]) {
15 if (!modules[name]) {
16 // if we cannot find the module within our internal map or
17 // cache jump to the current global require ie. the last bundle
18 // that was added to the page.
19 var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20 if (!jumped && currentRequire) {
21 return currentRequire(name, true);
22 }
23
24 // If there are other bundles on this page the require from the
25 // previous one is saved to 'previousRequire'. Repeat this as
26 // many times as there are bundles until the module is found or
27 // we exhaust the require chain.
28 if (previousRequire) {
29 return previousRequire(name, true);
30 }
31
32 // Try the node require function if it exists.
33 if (nodeRequire && typeof name === 'string') {
34 return nodeRequire(name);
35 }
36
37 var err = new Error('Cannot find module \'' + name + '\'');
38 err.code = 'MODULE_NOT_FOUND';
39 throw err;
40 }
41
42 localRequire.resolve = resolve;
43 localRequire.cache = {};
44
45 var module = cache[name] = new newRequire.Module(name);
46
47 modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48 }
49
50 return cache[name].exports;
51
52 function localRequire(x){
53 return newRequire(localRequire.resolve(x));
54 }
55
56 function resolve(x){
57 return modules[name][1][x] || x;
58 }
59 }
60
61 function Module(moduleName) {
62 this.id = moduleName;
63 this.bundle = newRequire;
64 this.exports = {};
65 }
66
67 newRequire.isParcelRequire = true;
68 newRequire.Module = Module;
69 newRequire.modules = modules;
70 newRequire.cache = cache;
71 newRequire.parent = previousRequire;
72 newRequire.register = function (id, exports) {
73 modules[id] = [function (require, module) {
74 module.exports = exports;
75 }, {}];
76 };
77
78 var error;
79 for (var i = 0; i < entry.length; i++) {
80 try {
81 newRequire(entry[i]);
82 } catch (e) {
83 // Save first error but execute all entries
84 if (!error) {
85 error = e;
86 }
87 }
88 }
89
90 if (entry.length) {
91 // Expose entry point to Node, AMD or browser globals
92 // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93 var mainExports = newRequire(entry[entry.length - 1]);
94
95 // CommonJS
96 if (typeof exports === "object" && typeof module !== "undefined") {
97 module.exports = mainExports;
98
99 // RequireJS
100 } else if (typeof define === "function" && define.amd) {
101 define(function () {
102 return mainExports;
103 });
104
105 // <script>
106 } else if (globalName) {
107 this[globalName] = mainExports;
108 }
109 }
110
111 // Override the current require with this new one
112 parcelRequire = newRequire;
113
114 if (error) {
115 // throw error from earlier, _after updating parcelRequire_
116 throw error;
117 }
118
119 return newRequire;
120})({"../../node_modules/parcel/src/builtins/bundle-url.js":[function(require,module,exports) {
121var bundleURL = null;
122
123function getBundleURLCached() {
124 if (!bundleURL) {
125 bundleURL = getBundleURL();
126 }
127
128 return bundleURL;
129}
130
131function getBundleURL() {
132 // Attempt to find the URL of the current script and use that as the base URL
133 try {
134 throw new Error();
135 } catch (err) {
136 var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);
137
138 if (matches) {
139 return getBaseURL(matches[0]);
140 }
141 }
142
143 return '/';
144}
145
146function getBaseURL(url) {
147 return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
148}
149
150exports.getBundleURL = getBundleURLCached;
151exports.getBaseURL = getBaseURL;
152},{}],"../../node_modules/parcel/src/builtins/css-loader.js":[function(require,module,exports) {
153var bundle = require('./bundle-url');
154
155function updateLink(link) {
156 var newLink = link.cloneNode();
157
158 newLink.onload = function () {
159 link.remove();
160 };
161
162 newLink.href = link.href.split('?')[0] + '?' + Date.now();
163 link.parentNode.insertBefore(newLink, link.nextSibling);
164}
165
166var cssTimeout = null;
167
168function reloadCSS() {
169 if (cssTimeout) {
170 return;
171 }
172
173 cssTimeout = setTimeout(function () {
174 var links = document.querySelectorAll('link[rel="stylesheet"]');
175
176 for (var i = 0; i < links.length; i++) {
177 if (bundle.getBaseURL(links[i].href) === bundle.getBundleURL()) {
178 updateLink(links[i]);
179 }
180 }
181
182 cssTimeout = null;
183 }, 50);
184}
185
186module.exports = reloadCSS;
187},{"./bundle-url":"../../node_modules/parcel/src/builtins/bundle-url.js"}],"../../iconfont/material-icons.css":[function(require,module,exports) {
188var reloadCSS = require('_css_loader');
189
190module.hot.dispose(reloadCSS);
191module.hot.accept(reloadCSS);
192},{"./MaterialIcons-Regular.eot":[["MaterialIcons-Regular.c8094aff.eot","../../iconfont/MaterialIcons-Regular.eot"],"../../iconfont/MaterialIcons-Regular.eot"],"./MaterialIcons-Regular.woff2":[["MaterialIcons-Regular.8ff618c0.woff2","../../iconfont/MaterialIcons-Regular.woff2"],"../../iconfont/MaterialIcons-Regular.woff2"],"./MaterialIcons-Regular.woff":[["MaterialIcons-Regular.cd75ad20.woff","../../iconfont/MaterialIcons-Regular.woff"],"../../iconfont/MaterialIcons-Regular.woff"],"./MaterialIcons-Regular.ttf":[["MaterialIcons-Regular.21ef9fea.ttf","../../iconfont/MaterialIcons-Regular.ttf"],"../../iconfont/MaterialIcons-Regular.ttf"],"_css_loader":"../../node_modules/parcel/src/builtins/css-loader.js"}],"../../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
193var global = arguments[3];
194var OVERLAY_ID = '__parcel__error__overlay__';
195var OldModule = module.bundle.Module;
196
197function Module(moduleName) {
198 OldModule.call(this, moduleName);
199 this.hot = {
200 data: module.bundle.hotData,
201 _acceptCallbacks: [],
202 _disposeCallbacks: [],
203 accept: function (fn) {
204 this._acceptCallbacks.push(fn || function () {});
205 },
206 dispose: function (fn) {
207 this._disposeCallbacks.push(fn);
208 }
209 };
210 module.bundle.hotData = null;
211}
212
213module.bundle.Module = Module;
214var checkedAssets, assetsToAccept;
215var parent = module.bundle.parent;
216
217if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
218 var hostname = "" || location.hostname;
219 var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
220 var ws = new WebSocket(protocol + '://' + hostname + ':' + "59026" + '/');
221
222 ws.onmessage = function (event) {
223 checkedAssets = {};
224 assetsToAccept = [];
225 var data = JSON.parse(event.data);
226
227 if (data.type === 'update') {
228 var handled = false;
229 data.assets.forEach(function (asset) {
230 if (!asset.isNew) {
231 var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
232
233 if (didAccept) {
234 handled = true;
235 }
236 }
237 }); // Enable HMR for CSS by default.
238
239 handled = handled || data.assets.every(function (asset) {
240 return asset.type === 'css' && asset.generated.js;
241 });
242
243 if (handled) {
244 console.clear();
245 data.assets.forEach(function (asset) {
246 hmrApply(global.parcelRequire, asset);
247 });
248 assetsToAccept.forEach(function (v) {
249 hmrAcceptRun(v[0], v[1]);
250 });
251 } else if (location.reload) {
252 // `location` global exists in a web worker context but lacks `.reload()` function.
253 location.reload();
254 }
255 }
256
257 if (data.type === 'reload') {
258 ws.close();
259
260 ws.onclose = function () {
261 location.reload();
262 };
263 }
264
265 if (data.type === 'error-resolved') {
266 console.log('[parcel] ✨ Error resolved');
267 removeErrorOverlay();
268 }
269
270 if (data.type === 'error') {
271 console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
272 removeErrorOverlay();
273 var overlay = createErrorOverlay(data);
274 document.body.appendChild(overlay);
275 }
276 };
277}
278
279function removeErrorOverlay() {
280 var overlay = document.getElementById(OVERLAY_ID);
281
282 if (overlay) {
283 overlay.remove();
284 }
285}
286
287function createErrorOverlay(data) {
288 var overlay = document.createElement('div');
289 overlay.id = OVERLAY_ID; // html encode message and stack trace
290
291 var message = document.createElement('div');
292 var stackTrace = document.createElement('pre');
293 message.innerText = data.error.message;
294 stackTrace.innerText = data.error.stack;
295 overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
296 return overlay;
297}
298
299function getParents(bundle, id) {
300 var modules = bundle.modules;
301
302 if (!modules) {
303 return [];
304 }
305
306 var parents = [];
307 var k, d, dep;
308
309 for (k in modules) {
310 for (d in modules[k][1]) {
311 dep = modules[k][1][d];
312
313 if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
314 parents.push(k);
315 }
316 }
317 }
318
319 if (bundle.parent) {
320 parents = parents.concat(getParents(bundle.parent, id));
321 }
322
323 return parents;
324}
325
326function hmrApply(bundle, asset) {
327 var modules = bundle.modules;
328
329 if (!modules) {
330 return;
331 }
332
333 if (modules[asset.id] || !bundle.parent) {
334 var fn = new Function('require', 'module', 'exports', asset.generated.js);
335 asset.isNew = !modules[asset.id];
336 modules[asset.id] = [fn, asset.deps];
337 } else if (bundle.parent) {
338 hmrApply(bundle.parent, asset);
339 }
340}
341
342function hmrAcceptCheck(bundle, id) {
343 var modules = bundle.modules;
344
345 if (!modules) {
346 return;
347 }
348
349 if (!modules[id] && bundle.parent) {
350 return hmrAcceptCheck(bundle.parent, id);
351 }
352
353 if (checkedAssets[id]) {
354 return;
355 }
356
357 checkedAssets[id] = true;
358 var cached = bundle.cache[id];
359 assetsToAccept.push([bundle, id]);
360
361 if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
362 return true;
363 }
364
365 return getParents(global.parcelRequire, id).some(function (id) {
366 return hmrAcceptCheck(global.parcelRequire, id);
367 });
368}
369
370function hmrAcceptRun(bundle, id) {
371 var cached = bundle.cache[id];
372 bundle.hotData = {};
373
374 if (cached) {
375 cached.hot.data = bundle.hotData;
376 }
377
378 if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
379 cached.hot._disposeCallbacks.forEach(function (cb) {
380 cb(bundle.hotData);
381 });
382 }
383
384 delete bundle.cache[id];
385 bundle(id);
386 cached = bundle.cache[id];
387
388 if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
389 cached.hot._acceptCallbacks.forEach(function (cb) {
390 cb();
391 });
392
393 return true;
394 }
395}
396},{}]},{},["../../node_modules/parcel/src/builtins/hmr-runtime.js"], null)
397//# sourceMappingURL=/material-icons.c4f663a0.js.map
\No newline at end of file