-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-c4dc43f2d172540dda50.js
2 lines (2 loc) · 17.4 KB
/
app-c4dc43f2d172540dda50.js
1
2
webpackJsonp([0xd2a57dc1d883],{134:function(e,n){"use strict";function t(e,n,t){var o=a.map(function(t){if(t.plugin[e]){var o=t.plugin[e](n,t.options);return o}});return o=o.filter(function(e){return"undefined"!=typeof e}),o.length>0?o:t?[t]:[]}function o(e,n,t){return a.reduce(function(t,o){return o.plugin[e]?t.then(function(){return o.plugin[e](n,o.options)}):t},Promise.resolve())}n.__esModule=!0,n.apiRunner=t,n.apiRunnerAsync=o;var a=[]},209:function(e,n,t){"use strict";n.components={"component---src-pages-404-js":t(334),"component---src-pages-challenge-js":t(335),"component---src-pages-index-js":t(336)},n.json={"layout-index.json":t(337),"404.json":t(338),"challenge.json":t(340),"index.json":t(341),"404-html.json":t(339)},n.layouts={"layout---index":t(333)}},210:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function a(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function u(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}n.__esModule=!0;var i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c=t(3),s=o(c),l=t(1),f=o(l),d=t(170),p=o(d),h=t(119),g=o(h),m=t(134),v=t(382),R=o(v),y=function(e){var n=e.children;return s.default.createElement("div",null,n())},_=function(e){function n(t){a(this,n);var o=r(this,e.call(this)),u=t.location;return p.default.getPage(u.pathname)||(u=i({},u,{pathname:"/404.html"})),o.state={location:u,pageResources:p.default.getResourcesForPathname(u.pathname)},o}return u(n,e),n.prototype.componentWillReceiveProps=function(e){var n=this;if(this.state.location.pathname!==e.location.pathname){var t=p.default.getResourcesForPathname(e.location.pathname);if(t)this.setState({location:e.location,pageResources:t});else{var o=e.location;p.default.getPage(o.pathname)||(o=i({},o,{pathname:"/404.html"})),p.default.getResourcesForPathname(o.pathname,function(e){n.setState({location:o,pageResources:e})})}}},n.prototype.componentDidMount=function(){var e=this;g.default.on("onPostLoadPageResources",function(n){p.default.getPage(e.state.location.pathname)&&n.page.path===p.default.getPage(e.state.location.pathname).path&&e.setState({pageResources:n.pageResources})})},n.prototype.shouldComponentUpdate=function(e,n){return!n.pageResources||(!(this.state.pageResources||!n.pageResources)||(this.state.pageResources.component!==n.pageResources.component||(this.state.pageResources.json!==n.pageResources.json||(!(this.state.location.key===n.location.key||!n.pageResources.page||!n.pageResources.page.matchPath&&!n.pageResources.page.path)||(0,R.default)(this,e,n)))))},n.prototype.render=function(){var e=(0,m.apiRunner)("replaceComponentRenderer",{props:i({},this.props,{pageResources:this.state.pageResources}),loader:d.publicLoader}),n=e[0];return this.props.page?this.state.pageResources?n||(0,c.createElement)(this.state.pageResources.component,i({key:this.props.location.pathname},this.props,this.state.pageResources.json)):null:this.props.layout?n||(0,c.createElement)(this.state.pageResources&&this.state.pageResources.layout?this.state.pageResources.layout:y,i({key:this.state.pageResources&&this.state.pageResources.layout?this.state.pageResources.layout:"DefaultLayout"},this.props)):null},n}(s.default.Component);_.propTypes={page:f.default.bool,layout:f.default.bool,location:f.default.object},n.default=_,e.exports=n.default},119:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var a=t(355),r=o(a),u=(0,r.default)();e.exports=u},211:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var a=t(133),r=t(171),u=o(r),i={};e.exports=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(t){var o=decodeURIComponent(t),r=(0,u.default)(o,n);if(r.split("#").length>1&&(r=r.split("#").slice(0,-1).join("")),r.split("?").length>1&&(r=r.split("?").slice(0,-1).join("")),i[r])return i[r];var c=void 0;return e.some(function(e){if(e.matchPath){if((0,a.matchPath)(r,{path:e.path})||(0,a.matchPath)(r,{path:e.matchPath}))return c=e,i[r]=e,!0}else{if((0,a.matchPath)(r,{path:e.path,exact:!0}))return c=e,i[r]=e,!0;if((0,a.matchPath)(r,{path:e.path+"index.html"}))return c=e,i[r]=e,!0}return!1}),c}}},212:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var a=t(162),r=o(a),u=t(134),i=(0,u.apiRunner)("replaceHistory"),c=i[0],s=c||(0,r.default)();e.exports=s},339:function(e,n,t){t(33),e.exports=function(e){return t.e(0xa2868bfb69fc,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(349)})})}},338:function(e,n,t){t(33),e.exports=function(e){return t.e(0xe70826b53c04,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(350)})})}},340:function(e,n,t){t(33),e.exports=function(e){return t.e(0xe2f5861422e4,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(351)})})}},341:function(e,n,t){t(33),e.exports=function(e){return t.e(0x81b8806e4260,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(352)})})}},337:function(e,n,t){t(33),e.exports=function(e){return t.e(60335399758886,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(165)})})}},333:function(e,n,t){t(33),e.exports=function(e){return t.e(0x67ef26645b2a,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(213)})})}},170:function(e,n,t){(function(e){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}n.__esModule=!0,n.publicLoader=void 0;var a=t(3),r=(o(a),t(211)),u=o(r),i=t(119),c=o(i),s=t(171),l=o(s),f=void 0,d={},p={},h={},g={},m={},v=[],R=[],y={},_="",P=[],w={},x=function(e){return e&&e.default||e},j=void 0,E=!0,b=[],C={},N={},k=5;j=t(214)({getNextQueuedResources:function(){return P.slice(-1)[0]},createResourceDownload:function(e){S(e,function(){P=P.filter(function(n){return n!==e}),j.onResourcedFinished(e)})}}),c.default.on("onPreLoadPageResources",function(e){j.onPreLoadPageResources(e)}),c.default.on("onPostLoadPageResources",function(e){j.onPostLoadPageResources(e)});var O=function(e,n){return w[e]>w[n]?1:w[e]<w[n]?-1:0},L=function(e,n){return y[e]>y[n]?1:y[e]<y[n]?-1:0},S=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(g[n])e.nextTick(function(){t(null,g[n])});else{var o=void 0;o="component---"===n.slice(0,12)?p.components[n]:"layout---"===n.slice(0,9)?p.layouts[n]:p.json[n],o(function(e,o){g[n]=o,b.push({resource:n,succeeded:!e}),N[n]||(N[n]=e),b=b.slice(-k),t(e,o)})}},A=function(n,t){m[n]?e.nextTick(function(){t(null,m[n])}):N[n]?e.nextTick(function(){t(N[n])}):S(n,function(e,o){if(e)t(e);else{var a=x(o());m[n]=a,t(e,a)}})},D=function(){var e=navigator.onLine;if("boolean"==typeof e)return e;var n=b.find(function(e){return e.succeeded});return!!n},T=function(e,n){console.log(n),C[e]||(C[e]=n),D()&&window.location.pathname.replace(/\/$/g,"")!==e.replace(/\/$/g,"")&&(window.location.pathname=e)},M=1,U={empty:function(){R=[],y={},w={},P=[],v=[],_=""},addPagesArray:function(e){v=e,f=(0,u.default)(e,_)},addDevRequires:function(e){d=e},addProdRequires:function(e){p=e},dequeue:function(){return R.pop()},enqueue:function(e){var n=(0,l.default)(e,_);if(!v.some(function(e){return e.path===n}))return!1;var t=1/M;M+=1,y[n]?y[n]+=1:y[n]=1,U.has(n)||R.unshift(n),R.sort(L);var o=f(n);return o.jsonName&&(w[o.jsonName]?w[o.jsonName]+=1+t:w[o.jsonName]=1+t,P.indexOf(o.jsonName)!==-1||g[o.jsonName]||P.unshift(o.jsonName)),o.componentChunkName&&(w[o.componentChunkName]?w[o.componentChunkName]+=1+t:w[o.componentChunkName]=1+t,P.indexOf(o.componentChunkName)!==-1||g[o.jsonName]||P.unshift(o.componentChunkName)),P.sort(O),j.onNewResourcesAdded(),!0},getResources:function(){return{resourcesArray:P,resourcesCount:w}},getPages:function(){return{pathArray:R,pathCount:y}},getPage:function(e){return f(e)},has:function(e){return R.some(function(n){return n===e})},getResourcesForPathname:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};E&&navigator&&navigator.serviceWorker&&navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&(f(n)||navigator.serviceWorker.getRegistrations().then(function(e){if(e.length){for(var n=e,t=Array.isArray(n),o=0,n=t?n:n[Symbol.iterator]();;){var a;if(t){if(o>=n.length)break;a=n[o++]}else{if(o=n.next(),o.done)break;a=o.value}var r=a;r.unregister()}window.location.reload()}})),E=!1;if(C[n])return T(n,'Previously detected load failure for "'+n+'"'),t();var o=f(n);if(!o)return T(n,"A page wasn't found for \""+n+'"'),t();if(n=o.path,h[n])return e.nextTick(function(){t(h[n]),c.default.emit("onPostLoadPageResources",{page:o,pageResources:h[n]})}),h[n];c.default.emit("onPreLoadPageResources",{path:n});var a=void 0,r=void 0,u=void 0,i=function(){if(a&&r&&(!o.layoutComponentChunkName||u)){h[n]={component:a,json:r,layout:u,page:o};var e={component:a,json:r,layout:u,page:o};t(e),c.default.emit("onPostLoadPageResources",{page:o,pageResources:e})}};return A(o.componentChunkName,function(e,n){e&&T(o.path,"Loading the component for "+o.path+" failed"),a=n,i()}),A(o.jsonName,function(e,n){e&&T(o.path,"Loading the JSON for "+o.path+" failed"),r=n,i()}),void(o.layoutComponentChunkName&&A(o.layout,function(e,n){e&&T(o.path,"Loading the Layout for "+o.path+" failed"),u=n,i()}))},peek:function(e){return R.slice(-1)[0]},length:function(){return R.length},indexOf:function(e){return R.length-R.indexOf(e)-1}};n.publicLoader={getResourcesForPathname:U.getResourcesForPathname};n.default=U}).call(n,t(118))},353:function(e,n){e.exports=[{componentChunkName:"component---src-pages-404-js",layout:"layout---index",layoutComponentChunkName:"component---src-layouts-index-js",jsonName:"404.json",path:"/404/"},{componentChunkName:"component---src-pages-challenge-js",layout:"layout---index",layoutComponentChunkName:"component---src-layouts-index-js",jsonName:"challenge.json",path:"/challenge/"},{componentChunkName:"component---src-pages-index-js",layout:"layout---index",layoutComponentChunkName:"component---src-layouts-index-js",jsonName:"index.json",path:"/"},{componentChunkName:"component---src-pages-404-js",layout:"layout---index",layoutComponentChunkName:"component---src-layouts-index-js",jsonName:"404-html.json",path:"/404.html"}]},214:function(e,n){"use strict";e.exports=function(e){var n=e.getNextQueuedResources,t=e.createResourceDownload,o=[],a=[],r=function(){var e=n();e&&(a.push(e),t(e))},u=function(e){switch(e.type){case"RESOURCE_FINISHED":a=a.filter(function(n){return n!==e.payload});break;case"ON_PRE_LOAD_PAGE_RESOURCES":o.push(e.payload.path);break;case"ON_POST_LOAD_PAGE_RESOURCES":o=o.filter(function(n){return n!==e.payload.page.path});break;case"ON_NEW_RESOURCES_ADDED":}setTimeout(function(){0===a.length&&0===o.length&&r()},0)};return{onResourcedFinished:function(e){u({type:"RESOURCE_FINISHED",payload:e})},onPreLoadPageResources:function(e){u({type:"ON_PRE_LOAD_PAGE_RESOURCES",payload:e})},onPostLoadPageResources:function(e){u({type:"ON_POST_LOAD_PAGE_RESOURCES",payload:e})},onNewResourcesAdded:function(){u({type:"ON_NEW_RESOURCES_ADDED"})},getState:function(){return{pagesLoading:o,resourcesDownloading:a}},empty:function(){o=[],a=[]}}}},0:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},r=t(134),u=t(3),i=o(u),c=t(201),s=o(c),l=t(133),f=t(347),d=t(321),p=o(d),h=t(164),g=t(212),m=o(g),v=t(119),R=o(v),y=t(353),_=o(y),P=t(354),w=o(P),x=t(210),j=o(x),E=t(209),b=o(E),C=t(170),N=o(C);t(236),window.___history=m.default,window.___emitter=R.default,N.default.addPagesArray(_.default),N.default.addProdRequires(b.default),window.asyncRequires=b.default,window.___loader=N.default,window.matchPath=l.matchPath;var k=w.default.reduce(function(e,n){return e[n.fromPath]=n,e},{}),O=function(e){var n=k[e];return null!=n&&(m.default.replace(n.toPath),!0)};O(window.location.pathname),(0,r.apiRunnerAsync)("onClientEntry").then(function(){function e(e){window.___history&&c!==!1||(window.___history=e,c=!0,e.listen(function(e,n){O(e.pathname)||setTimeout(function(){(0,r.apiRunner)("onRouteUpdate",{location:e,action:n})},0)}))}function n(e,n){var t=n.location.pathname,o=(0,r.apiRunner)("shouldUpdateScroll",{prevRouterProps:e,pathname:t});if(o.length>0)return o[0];if(e){var a=e.location.pathname;if(a===t)return!1}return!0}(0,r.apiRunner)("registerServiceWorker").length>0&&t(215);var o=function(e){function n(e){e.page.path===N.default.getPage(o).path&&(R.default.off("onPostLoadPageResources",n),clearTimeout(u),window.___history.push(t))}var t=(0,h.createLocation)(e,null,null,m.default.location),o=t.pathname,a=k[o];a&&(o=a.toPath);var r=window.location;if(r.pathname!==t.pathname||r.search!==t.search||r.hash!==t.hash){var u=setTimeout(function(){R.default.off("onPostLoadPageResources",n),R.default.emit("onDelayedLoadPageResources",{pathname:o}),window.___history.push(t)},1e3);N.default.getResourcesForPathname(o)?(clearTimeout(u),window.___history.push(t)):R.default.on("onPostLoadPageResources",n)}};window.___navigateTo=o,(0,r.apiRunner)("onRouteUpdate",{location:m.default.location,action:m.default.action});var c=!1,d=(0,r.apiRunner)("replaceRouterComponent",{history:m.default})[0],g=function(e){var n=e.children;return i.default.createElement(l.Router,{history:m.default},n)},v=(0,l.withRouter)(j.default);N.default.getResourcesForPathname(window.location.pathname,function(){var t=function(){return(0,u.createElement)(d?d:g,null,(0,u.createElement)(f.ScrollContext,{shouldUpdateScroll:n},(0,u.createElement)(v,{layout:!0,children:function(n){return(0,u.createElement)(l.Route,{render:function(t){e(t.history);var o=n?n:t;return N.default.getPage(o.location.pathname)?(0,u.createElement)(j.default,a({page:!0},o)):(0,u.createElement)(j.default,{page:!0,location:{pathname:"/404.html"}})}})}})))},o=(0,r.apiRunner)("wrapRootComponent",{Root:t},t)[0];(0,p.default)(function(){return s.default.render(i.default.createElement(o,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,function(){(0,r.apiRunner)("onInitialClientRender")})})})})},354:function(e,n){e.exports=[]},215:function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var a=t(119),r=o(a),u="/";"serviceWorker"in navigator&&navigator.serviceWorker.register(u+"sw.js").then(function(e){e.addEventListener("updatefound",function(){var n=e.installing;console.log("installingWorker",n),n.addEventListener("statechange",function(){switch(n.state){case"installed":navigator.serviceWorker.controller?window.location.reload():(console.log("Content is now available offline!"),r.default.emit("sw:installed"));break;case"redundant":console.error("The installing service worker became redundant.")}})})}).catch(function(e){console.error("Error during service worker registration:",e)})},171:function(e,n){"use strict";n.__esModule=!0,n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.substr(0,n.length)===n?e.slice(n.length):e},e.exports=n.default},321:function(e,n,t){!function(n,t){e.exports=t()}("domready",function(){var e,n=[],t=document,o=t.documentElement.doScroll,a="DOMContentLoaded",r=(o?/^loaded|^c/:/^loaded|^i|^c/).test(t.readyState);return r||t.addEventListener(a,e=function(){for(t.removeEventListener(a,e),r=1;e=n.shift();)e()}),function(e){r?setTimeout(e,0):n.push(e)}})},33:function(e,n,t){"use strict";function o(){function e(e){var n=o.lastChild;return"SCRIPT"!==n.tagName?void("undefined"!=typeof console&&console.warn&&console.warn("Script is not a script",n)):void(n.onload=n.onerror=function(){n.onload=n.onerror=null,setTimeout(e,0)})}var n,o=document.querySelector("head"),a=t.e,r=t.s;t.e=function(o,u){var i=!1,c=!0,s=function(e){u&&(u(t,e),u=null)};return!r&&n&&n[o]?void s(!0):(a(o,function(){i||(i=!0,c?setTimeout(function(){s()}):s())}),void(i||(c=!1,e(function(){i||(i=!0,r?r[o]=void 0:(n||(n={}),n[o]=!0),s(!0))}))))}}o()},355:function(e,n){function t(e){return e=e||Object.create(null),{on:function(n,t){(e[n]||(e[n]=[])).push(t)},off:function(n,t){e[n]&&e[n].splice(e[n].indexOf(t)>>>0,1)},emit:function(n,t){(e[n]||[]).slice().map(function(e){e(t)}),(e["*"]||[]).slice().map(function(e){e(n,t)})}}}e.exports=t},382:function(e,n){"use strict";function t(e,n){for(var t in e)if(!(t in n))return!0;for(var o in n)if(e[o]!==n[o])return!0;return!1}n.__esModule=!0,n.default=function(e,n,o){return t(e.props,n)||t(e.state,o)},e.exports=n.default},334:function(e,n,t){t(33),e.exports=function(e){return t.e(0x9427c64ab85d,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(221)})})}},335:function(e,n,t){t(33),e.exports=function(e){return t.e(95570949031736,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(222)})})}},336:function(e,n,t){t(33),e.exports=function(e){return t.e(35783957827783,function(n,o){o?(console.log("bundle loading error",o),e(!0)):e(null,function(){return t(223)})})}}});
//# sourceMappingURL=app-c4dc43f2d172540dda50.js.map