rem.ed2dc596.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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
  8. // eslint-disable-next-line no-global-assign
  9. parcelRequire = (function (modules, cache, entry, globalName) {
  10. // Save the require from previous bundle to this closure if any
  11. var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
  12. var nodeRequire = typeof require === 'function' && require;
  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. // If there are other bundles on this page the require from the
  24. // previous one is saved to 'previousRequire'. Repeat this as
  25. // many times as there are bundles until the module is found or
  26. // we exhaust the require chain.
  27. if (previousRequire) {
  28. return previousRequire(name, true);
  29. }
  30. // Try the node require function if it exists.
  31. if (nodeRequire && typeof name === 'string') {
  32. return nodeRequire(name);
  33. }
  34. var err = new Error('Cannot find module \'' + name + '\'');
  35. err.code = 'MODULE_NOT_FOUND';
  36. throw err;
  37. }
  38. localRequire.resolve = resolve;
  39. var module = cache[name] = new newRequire.Module(name);
  40. modules[name][0].call(module.exports, localRequire, module, module.exports, this);
  41. }
  42. return cache[name].exports;
  43. function localRequire(x){
  44. return newRequire(localRequire.resolve(x));
  45. }
  46. function resolve(x){
  47. return modules[name][1][x] || x;
  48. }
  49. }
  50. function Module(moduleName) {
  51. this.id = moduleName;
  52. this.bundle = newRequire;
  53. this.exports = {};
  54. }
  55. newRequire.isParcelRequire = true;
  56. newRequire.Module = Module;
  57. newRequire.modules = modules;
  58. newRequire.cache = cache;
  59. newRequire.parent = previousRequire;
  60. for (var i = 0; i < entry.length; i++) {
  61. newRequire(entry[i]);
  62. }
  63. if (entry.length) {
  64. // Expose entry point to Node, AMD or browser globals
  65. // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
  66. var mainExports = newRequire(entry[entry.length - 1]);
  67. // CommonJS
  68. if (typeof exports === "object" && typeof module !== "undefined") {
  69. module.exports = mainExports;
  70. // RequireJS
  71. } else if (typeof define === "function" && define.amd) {
  72. define(function () {
  73. return mainExports;
  74. });
  75. // <script>
  76. } else if (globalName) {
  77. this[globalName] = mainExports;
  78. }
  79. }
  80. // Override the current require with this new one
  81. return newRequire;
  82. })({32:[function(require,module,exports) {
  83. !function (d, a) {
  84. var e = d.documentElement,
  85. c = "orientationchange" in window ? "orientationchange" : "resize",
  86. v = function v() {
  87. var f = e.clientWidth;f && (e.style.fontSize = 20 * (f / 320) + "px");
  88. };d.addEventListener && (a.addEventListener(c, v, !1), d.addEventListener("DOMContentLoaded", v, !1));
  89. }(document, window);
  90. },{}],150:[function(require,module,exports) {
  91. var global = arguments[3];
  92. var OVERLAY_ID = '__parcel__error__overlay__';
  93. var OldModule = module.bundle.Module;
  94. function Module(moduleName) {
  95. OldModule.call(this, moduleName);
  96. this.hot = {
  97. data: module.bundle.hotData,
  98. _acceptCallbacks: [],
  99. _disposeCallbacks: [],
  100. accept: function (fn) {
  101. this._acceptCallbacks.push(fn || function () {});
  102. },
  103. dispose: function (fn) {
  104. this._disposeCallbacks.push(fn);
  105. }
  106. };
  107. module.bundle.hotData = null;
  108. }
  109. module.bundle.Module = Module;
  110. var parent = module.bundle.parent;
  111. if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
  112. var hostname = '' || location.hostname;
  113. var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
  114. var ws = new WebSocket(protocol + '://' + hostname + ':' + '52930' + '/');
  115. ws.onmessage = function (event) {
  116. var data = JSON.parse(event.data);
  117. if (data.type === 'update') {
  118. data.assets.forEach(function (asset) {
  119. hmrApply(global.parcelRequire, asset);
  120. });
  121. data.assets.forEach(function (asset) {
  122. if (!asset.isNew) {
  123. hmrAccept(global.parcelRequire, asset.id);
  124. }
  125. });
  126. // Clear the console after HMR
  127. console.clear();
  128. }
  129. if (data.type === 'reload') {
  130. ws.close();
  131. ws.onclose = function () {
  132. location.reload();
  133. };
  134. }
  135. if (data.type === 'error-resolved') {
  136. console.log('[parcel] ✨ Error resolved');
  137. removeErrorOverlay();
  138. }
  139. if (data.type === 'error') {
  140. console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
  141. removeErrorOverlay();
  142. var overlay = createErrorOverlay(data);
  143. document.body.appendChild(overlay);
  144. }
  145. };
  146. }
  147. function removeErrorOverlay() {
  148. var overlay = document.getElementById(OVERLAY_ID);
  149. if (overlay) {
  150. overlay.remove();
  151. }
  152. }
  153. function createErrorOverlay(data) {
  154. var overlay = document.createElement('div');
  155. overlay.id = OVERLAY_ID;
  156. // html encode message and stack trace
  157. var message = document.createElement('div');
  158. var stackTrace = document.createElement('pre');
  159. message.innerText = data.error.message;
  160. stackTrace.innerText = data.error.stack;
  161. 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>';
  162. return overlay;
  163. }
  164. function getParents(bundle, id) {
  165. var modules = bundle.modules;
  166. if (!modules) {
  167. return [];
  168. }
  169. var parents = [];
  170. var k, d, dep;
  171. for (k in modules) {
  172. for (d in modules[k][1]) {
  173. dep = modules[k][1][d];
  174. if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
  175. parents.push(+k);
  176. }
  177. }
  178. }
  179. if (bundle.parent) {
  180. parents = parents.concat(getParents(bundle.parent, id));
  181. }
  182. return parents;
  183. }
  184. function hmrApply(bundle, asset) {
  185. var modules = bundle.modules;
  186. if (!modules) {
  187. return;
  188. }
  189. if (modules[asset.id] || !bundle.parent) {
  190. var fn = new Function('require', 'module', 'exports', asset.generated.js);
  191. asset.isNew = !modules[asset.id];
  192. modules[asset.id] = [fn, asset.deps];
  193. } else if (bundle.parent) {
  194. hmrApply(bundle.parent, asset);
  195. }
  196. }
  197. function hmrAccept(bundle, id) {
  198. var modules = bundle.modules;
  199. if (!modules) {
  200. return;
  201. }
  202. if (!modules[id] && bundle.parent) {
  203. return hmrAccept(bundle.parent, id);
  204. }
  205. var cached = bundle.cache[id];
  206. bundle.hotData = {};
  207. if (cached) {
  208. cached.hot.data = bundle.hotData;
  209. }
  210. if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
  211. cached.hot._disposeCallbacks.forEach(function (cb) {
  212. cb(bundle.hotData);
  213. });
  214. }
  215. delete bundle.cache[id];
  216. bundle(id);
  217. cached = bundle.cache[id];
  218. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  219. cached.hot._acceptCallbacks.forEach(function (cb) {
  220. cb();
  221. });
  222. return true;
  223. }
  224. return getParents(global.parcelRequire, id).some(function (id) {
  225. return hmrAccept(global.parcelRequire, id);
  226. });
  227. }
  228. },{}]},{},[150,32], null)
  229. //# sourceMappingURL=/rem.ed2dc596.map