)\n }\n }\n\n return function (obj, opts) {\n let path = ''\n const data = obj || {}\n const options = opts || {}\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (let i = 0; i \u003C tokens.length; i++) {\n const token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n const value = data[token.name || 'pathMatch']\n let segment\n\n if (value == null) {\n if (token.optional) {\n \u002F\u002F Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (let j = 0; j \u003C value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n\u002F**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n *\u002F\nfunction escapeString(str) {\n return str.replace(\u002F([.+*?=^!:${}()[\\]|\u002F\\\\])\u002Fg, '\\\\$1')\n}\n\n\u002F**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n *\u002F\nfunction escapeGroup(group) {\n return group.replace(\u002F([=!:$\u002F()])\u002Fg, '\\\\$1')\n}\n\n\u002F**\n * Format given url, append query to url query string\n *\n * @param {string} url\n * @param {string} query\n * @return {string}\n *\u002F\nfunction formatUrl(url, query) {\n let protocol\n const index = url.indexOf(':\u002F\u002F')\n if (index !== -1) {\n protocol = url.substring(0, index)\n url = url.substring(index + 3)\n } else if (url.startsWith('\u002F\u002F')) {\n url = url.substring(2)\n }\n\n let parts = url.split('\u002F')\n let result = (protocol ? protocol + ':\u002F\u002F' : '\u002F\u002F') + parts.shift()\n\n let path = parts.filter(Boolean).join('\u002F')\n let hash\n parts = path.split('#')\n if (parts.length === 2) {\n path = parts[0]\n hash = parts[1]\n }\n\n result += path ? '\u002F' + path : ''\n\n if (query && JSON.stringify(query) !== '{}') {\n result += (url.split('?').length === 2 ? '&' : '?') + formatQuery(query)\n }\n result += hash ? '#' + hash : ''\n\n return result\n}\n\n\u002F**\n * Transform data object to query string\n *\n * @param {object} query\n * @return {string}\n *\u002F\nfunction formatQuery(query) {\n return Object.keys(query).sort().map((key) =\u003E {\n const val = query[key]\n if (val == null) {\n return ''\n }\n if (Array.isArray(val)) {\n return val.slice().map(val2 =\u003E [key, '=', val2].join('')).join('&')\n }\n return key + '=' + val\n }).filter(Boolean).join('&')\n}\n","directory_shortid":"XZFhGXi7","id":"3f28cc02-0feb-43fb-b06f-a8fdbaa5142d","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"-qWUwq1LY4","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"utils.js","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"import Vue from 'vue'\nimport Router from 'vue-router'\nimport { interopDefault } from '.\u002Futils'\n\nconst _2c63f1a1 = () =\u003E interopDefault(import('..\u002Fpages\u002Findex.vue' \u002F* webpackChunkName: \"pages\u002Findex\" *\u002F))\n\nVue.use(Router)\n\nif (process.client) {\n if ('scrollRestoration' in window.history) {\n window.history.scrollRestoration = 'manual'\n\n \u002F\u002F reset scrollRestoration to auto when leaving page, allowing page reload\n \u002F\u002F and back-navigation from other pages to use the browser to restore the\n \u002F\u002F scrolling position.\n window.addEventListener('beforeunload', () =\u003E {\n window.history.scrollRestoration = 'auto'\n })\n\n \u002F\u002F Setting scrollRestoration to manual again when returning to this page.\n window.addEventListener('load', () =\u003E {\n window.history.scrollRestoration = 'manual'\n })\n }\n}\nconst scrollBehavior = function (to, from, savedPosition) {\n \u002F\u002F if the returned position is falsy or an empty object,\n \u002F\u002F will retain current scroll position.\n let position = false\n\n \u002F\u002F if no children detected and scrollToTop is not explicitly disabled\n if (\n to.matched.length \u003C 2 &&\n to.matched.every(r =\u003E r.components.default.options.scrollToTop !== false)\n ) {\n \u002F\u002F scroll to the top of the page\n position = { x: 0, y: 0 }\n } else if (to.matched.some(r =\u003E r.components.default.options.scrollToTop)) {\n \u002F\u002F if one of the children has scrollToTop option set to true\n position = { x: 0, y: 0 }\n }\n\n \u002F\u002F savedPosition is only available for popstate navigations (back button)\n if (savedPosition) {\n position = savedPosition\n }\n\n return new Promise((resolve) =\u003E {\n \u002F\u002F wait for the out transition to complete (if necessary)\n window.$nuxt.$once('triggerScroll', () =\u003E {\n \u002F\u002F coords will be used if no selector is provided,\n \u002F\u002F or if the selector didn't match any element.\n if (to.hash) {\n let hash = to.hash\n \u002F\u002F CSS.escape() is not supported with IE and Edge.\n if (typeof window.CSS !== 'undefined' && typeof window.CSS.escape !== 'undefined') {\n hash = '#' + window.CSS.escape(hash.substr(1))\n }\n try {\n if (document.querySelector(hash)) {\n \u002F\u002F scroll to anchor by returning the selector\n position = { selector: hash }\n }\n } catch (e) {\n console.warn('Failed to save scroll position. Please add CSS.escape() polyfill (https:\u002F\u002Fgithub.com\u002Fmathiasbynens\u002FCSS.escape).')\n }\n }\n resolve(position)\n })\n })\n}\n\nexport function createRouter() {\n return new Router({\n mode: 'history',\n base: decodeURI('\u002F'),\n linkActiveClass: 'nuxt-link-active',\n linkExactActiveClass: 'nuxt-link-exact-active',\n scrollBehavior,\n\n routes: [{\n path: \"\u002F\",\n component: _2c63f1a1,\n name: \"index\"\n }],\n\n fallback: false\n })\n}\n","directory_shortid":"XZFhGXi7","id":"9088830a-a72f-4eca-a8cf-63788147323e","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"ajpN8Q9rq4","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"router.js","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"const middleware = {}\n\nexport default middleware\n","directory_shortid":"XZFhGXi7","id":"69f1b853-f2d9-4f35-9e72-cf6f018b64d8","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"hQDuzmsdSE","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"middleware.js","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"\u003Cstyle\u003E\n#nuxt-loading {\n visibility: hidden;\n opacity: 0;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n animation: nuxtLoadingIn 10s ease;\n -webkit-animation: nuxtLoadingIn 10s ease;\n animation-fill-mode: forwards;\n overflow: hidden;\n}\n\n@keyframes nuxtLoadingIn {\n 0% {\n visibility: hidden;\n opacity: 0;\n }\n 20% {\n visibility: visible;\n opacity: 0;\n }\n 100% {\n visibility: visible;\n opacity: 1;\n }\n}\n\n@-webkit-keyframes nuxtLoadingIn {\n 0% {\n visibility: hidden;\n opacity: 0;\n }\n 20% {\n visibility: visible;\n opacity: 0;\n }\n 100% {\n visibility: visible;\n opacity: 1;\n }\n}\n\n#nuxt-loading\u003Ediv,\n#nuxt-loading\u003Ediv:after {\n border-radius: 50%;\n width: 5rem;\n height: 5rem;\n}\n\n#nuxt-loading\u003Ediv {\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n border: .5rem solid #F5F5F5;\n border-left: .5rem solid #D3D3D3;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: nuxtLoading 1.1s infinite linear;\n animation: nuxtLoading 1.1s infinite linear;\n}\n\n#nuxt-loading.error\u003Ediv {\n border-left: .5rem solid #ff4500;\n animation-duration: 5s;\n}\n\n@-webkit-keyframes nuxtLoading {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes nuxtLoading {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\u003C\u002Fstyle\u003E\n\n\u003Cscript\u003E\nwindow.addEventListener('error', function () {\n var e = document.getElementById('nuxt-loading');\n if (e) e.className += ' error';\n});\n\u003C\u002Fscript\u003E\n\n\u003Cdiv id=\"nuxt-loading\" aria-live=\"polite\" role=\"status\"\u003E\u003Cdiv\u003ELoading...\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\n\n\u003C!-- https:\u002F\u002Fprojects.lukehaas.me\u002Fcss-loaders --\u003E\n","directory_shortid":"XZFhGXi7","id":"9b471c07-ce81-4a82-9eab-c3c87bc7d261","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"B5FOhtibKW","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"loading.html","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"import Vue from 'vue'\nimport Meta from 'vue-meta'\nimport { createRouter } from '.\u002Frouter.js'\nimport NoSsr from '.\u002Fcomponents\u002Fno-ssr.js'\nimport NuxtChild from '.\u002Fcomponents\u002Fnuxt-child.js'\nimport NuxtError from '.\u002Fcomponents\u002Fnuxt-error.vue'\nimport Nuxt from '.\u002Fcomponents\u002Fnuxt.js'\nimport App from '.\u002FApp.js'\nimport { setContext, getLocation, getRouteData, normalizeError } from '.\u002Futils'\n\n\u002F* Plugins *\u002F\n\nimport nuxt_plugin_eventbus_2faefc80 from 'nuxt_plugin_eventbus_2faefc80' \u002F\u002F Source: ..\u002Fplugins\u002Fevent-bus.js (mode: 'all')\nimport nuxt_plugin_ticker_6b9263f7 from 'nuxt_plugin_ticker_6b9263f7' \u002F\u002F Source: ..\u002Fplugins\u002Fticker.js (mode: 'client')\nimport nuxt_plugin_resize_20be4be6 from 'nuxt_plugin_resize_20be4be6' \u002F\u002F Source: ..\u002Fplugins\u002Fresize.js (mode: 'client')\n\n\u002F\u002F Component: \u003CNoSsr\u003E\nVue.component(NoSsr.name, NoSsr)\n\n\u002F\u002F Component: \u003CNuxtChild\u003E\nVue.component(NuxtChild.name, NuxtChild)\nVue.component('NChild', NuxtChild)\n\n\u002F\u002F Component NuxtLink is imported in server.js or client.js\n\n\u002F\u002F Component: \u003CNuxt\u003E`\nVue.component(Nuxt.name, Nuxt)\n\n\u002F\u002F vue-meta configuration\nVue.use(Meta, {\n keyName: 'head', \u002F\u002F the component option name that vue-meta looks for meta info on.\n attribute: 'data-n-head', \u002F\u002F the attribute name vue-meta adds to the tags it observes\n ssrAttribute: 'data-n-head-ssr', \u002F\u002F the attribute name that lets vue-meta know that meta info has already been server-rendered\n tagIDKeyName: 'hid' \u002F\u002F the property name that vue-meta uses to determine whether to overwrite or append a tag\n})\n\nconst defaultTransition = {\"name\":\"page\",\"mode\":\"out-in\",\"appear\":false,\"appearClass\":\"appear\",\"appearActiveClass\":\"appear-active\",\"appearToClass\":\"appear-to\"}\n\nasync function createApp(ssrContext) {\n const router = await createRouter(ssrContext)\n\n \u002F\u002F Create Root instance\n\n \u002F\u002F here we inject the router and store to all child components,\n \u002F\u002F making them available everywhere as `this.$router` and `this.$store`.\n const app = {\n router,\n\n nuxt: {\n defaultTransition,\n transitions: [ defaultTransition ],\n setTransitions(transitions) {\n if (!Array.isArray(transitions)) {\n transitions = [ transitions ]\n }\n transitions = transitions.map((transition) =\u003E {\n if (!transition) {\n transition = defaultTransition\n } else if (typeof transition === 'string') {\n transition = Object.assign({}, defaultTransition, { name: transition })\n } else {\n transition = Object.assign({}, defaultTransition, transition)\n }\n return transition\n })\n this.$options.nuxt.transitions = transitions\n return transitions\n },\n err: null,\n dateErr: null,\n error(err) {\n err = err || null\n app.context._errored = !!err\n err = err ? normalizeError(err) : null\n const nuxt = this.nuxt || this.$options.nuxt\n nuxt.dateErr = Date.now()\n nuxt.err = err\n \u002F\u002F Used in src\u002Fserver.js\n if (ssrContext) ssrContext.nuxt.error = err\n return err\n }\n },\n ...App\n }\n\n const next = ssrContext ? ssrContext.next : location =\u003E app.router.push(location)\n \u002F\u002F Resolve route\n let route\n if (ssrContext) {\n route = router.resolve(ssrContext.url).route\n } else {\n const path = getLocation(router.options.base)\n route = router.resolve(path).route\n }\n\n \u002F\u002F Set context to app.context\n await setContext(app, {\n route,\n next,\n error: app.nuxt.error.bind(app),\n\n payload: ssrContext ? ssrContext.payload : undefined,\n req: ssrContext ? ssrContext.req : undefined,\n res: ssrContext ? ssrContext.res : undefined,\n beforeRenderFns: ssrContext ? ssrContext.beforeRenderFns : undefined,\n ssrContext\n })\n\n const inject = function (key, value) {\n if (!key) throw new Error('inject(key, value) has no key provided')\n if (typeof value === 'undefined') throw new Error('inject(key, value) has no value provided')\n key = '
+ key\n \u002F\u002F Add into app\n app[key] = value\n\n \u002F\u002F Check if plugin not already installed\n const installKey = '__nuxt_' + key + '_installed__'\n if (Vue[installKey]) return\n Vue[installKey] = true\n \u002F\u002F Call Vue.use() to install the plugin into vm\n Vue.use(() =\u003E {\n if (!Vue.prototype.hasOwnProperty(key)) {\n Object.defineProperty(Vue.prototype, key, {\n get() {\n return this.$root.$options[key]\n }\n })\n }\n })\n }\n\n \u002F\u002F Plugin execution\n\n if (typeof nuxt_plugin_eventbus_2faefc80 === 'function') {\n await nuxt_plugin_eventbus_2faefc80(app.context, inject)\n }\n\n if (process.client && typeof nuxt_plugin_ticker_6b9263f7 === 'function') {\n await nuxt_plugin_ticker_6b9263f7(app.context, inject)\n }\n\n if (process.client && typeof nuxt_plugin_resize_20be4be6 === 'function') {\n await nuxt_plugin_resize_20be4be6(app.context, inject)\n }\n\n \u002F\u002F If server-side, wait for async component to be resolved first\n if (process.server && ssrContext && ssrContext.url) {\n await new Promise((resolve, reject) =\u003E {\n router.push(ssrContext.url, resolve, () =\u003E {\n \u002F\u002F navigated to a different route in router guard\n const unregister = router.afterEach(async (to, from, next) =\u003E {\n ssrContext.url = to.fullPath\n app.context.route = await getRouteData(to)\n app.context.params = to.params || {}\n app.context.query = to.query || {}\n unregister()\n resolve()\n })\n })\n })\n }\n\n return {\n app,\n\n router\n }\n}\n\nexport { createApp, NuxtError }\n","directory_shortid":"XZFhGXi7","id":"f6a2cc99-9384-4acf-9fdd-cd21118761a4","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"-LkZrq7YgI","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"index.js","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"\u002F\u002F This file is intentionally left empty for noop aliases\n","directory_shortid":"XZFhGXi7","id":"170311a1-7777-42fb-a2ee-f9f26e346dcb","inserted_at":"2019-12-18T23:23:26","is_binary":false,"shortid":"6qTE-skFyV","source_id":"9eefa43b-c2b7-4411-aeef-299523ffe9a1","title":"empty.js","updated_at":"2019-12-18T23:23:26","upload_id":null},{"code":"import Vue from 'vue'\nimport fetch from 'unfetch'\nimport middleware from '.\u002Fmiddleware.js'\nimport {\n applyAsyncData,\n sanitizeComponent,\n resolveRouteComponents,\n getMatchedComponents,\n getMatchedComponentsInstances,\n flatMapComponents,\n setContext,\n middlewareSeries,\n promisify,\n getLocation,\n compile,\n getQueryDiff,\n globalHandleError\n} from '.\u002Futils.js'\nimport { createApp, NuxtError } from '.\u002Findex.js'\nimport NuxtLink from '.\u002Fcomponents\u002Fnuxt-link.client.js' \u002F\u002F should be included after .\u002Findex.js\n\n\u002F\u002F Component: \u003CNuxtLink\u003E\nVue.component(NuxtLink.name, NuxtLink)\nVue.component('NLink', NuxtLink)\n\nif (!global.fetch) { global.fetch = fetch }\n\n\u002F\u002F Global shared references\nlet _lastPaths = []\nlet app\nlet router\n\n\u002F\u002F Try to rehydrate SSR data from window\nconst NUXT = window.__NUXT__ || {}\n\nObject.assign(Vue.config, {\"silent\":false,\"performance\":true})\n\n\u002F\u002F Setup global Vue error handler\nif (!Vue.config.$nuxt) {\n const defaultErrorHandler = Vue.config.errorHandler\n Vue.config.errorHandler = (err, vm, info, ...rest) =\u003E {\n \u002F\u002F Call other handler if exist\n let handled = null\n if (typeof defaultErrorHandler === 'function') {\n handled = defaultErrorHandler(err, vm, info, ...rest)\n }\n if (handled === true) {\n return handled\n }\n\n if (vm && vm.$root) {\n const nuxtApp = Object.keys(Vue.config.$nuxt)\n .find(nuxtInstance =\u003E vm.$root[nuxtInstance])\n\n \u002F\u002F Show Nuxt Error Page\n if (nuxtApp && vm.$root[nuxtApp].error && info !== 'render function') {\n vm.$root[nuxtApp].error(err)\n }\n }\n\n if (typeof defaultErrorHandler === 'function') {\n return handled\n }\n\n \u002F\u002F Log to console\n if (process.env.NODE_ENV !== 'production') {\n console.error(err)\n } else {\n console.error(err.message || err)\n }\n }\n Vue.config.$nuxt = {}\n}\nVue.config.$nuxt.$nuxt = true\n\nconst errorHandler = Vue.config.errorHandler || console.error\n\n\u002F\u002F Create and mount App\ncreateApp()\n .then(mountApp)\n .catch((err) =\u003E {\n const wrapperError = new Error(err)\n wrapperError.message = '[nuxt] Error while mounting app: ' + wrapperError.message\n errorHandler(wrapperError)\n })\n\nfunction componentOption(component, key, ...args) {\n if (!component || !component.options || !component.options[key]) {\n return {}\n }\n const option = component.options[key]\n if (typeof option === 'function') {\n return option(...args)\n }\n return option\n}\n\nfunction mapTransitions(Components, to, from) {\n const componentTransitions = (component) =\u003E {\n const transition = componentOption(component, 'transition', to, from) || {}\n return (typeof transition === 'string' ? { name: transition } : transition)\n }\n\n return Components.map((Component) =\u003E {\n \u002F\u002F Clone original object to prevent overrides\n const transitions = Object.assign({}, componentTransitions(Component))\n\n \u002F\u002F Combine transitions & prefer `leave` transitions of 'from' route\n if (from && from.matched.length && from.matched[0].components.default) {\n const fromTransitions = componentTransitions(from.matched[0].components.default)\n Object.keys(fromTransitions)\n .filter(key =\u003E fromTransitions[key] && key.toLowerCase().includes('leave'))\n .forEach((key) =\u003E { transitions[key] = fromTransitions[key] })\n }\n\n return transitions\n })\n}\n\nasync function loadAsyncComponents(to, from, next) {\n \u002F\u002F Check if route path changed (this._pathChanged), only if the page is not an error (for validate())\n this._pathChanged = !!app.nuxt.err || from.path !== to.path\n this._queryChanged = JSON.stringify(to.query) !== JSON.stringify(from.query)\n this._diffQuery = (this._queryChanged ? getQueryDiff(to.query, from.query) : [])\n\n try {\n const Components = await resolveRouteComponents(to)\n\n \u002F\u002F Call next()\n next()\n } catch (error) {\n const err = error || {}\n const statusCode = err.statusCode || err.status || (err.response && err.response.status) || 500\n const message = err.message || ''\n\n \u002F\u002F Handle chunk loading errors\n \u002F\u002F This may be due to a new deployment or a network problem\n if (\u002F^Loading( CSS)? chunk (\\d)+ failed\\.\u002F.test(message)) {\n window.location.reload(true \u002F* skip cache *\u002F)\n return \u002F\u002F prevent error page blinking for user\n }\n\n this.error({ statusCode, message })\n this.$nuxt.$emit('routeChanged', to, from, err)\n next()\n }\n}\n\nfunction applySSRData(Component, ssrData) {\n if (NUXT.serverRendered && ssrData) {\n applyAsyncData(Component, ssrData)\n }\n Component._Ctor = Component\n return Component\n}\n\n\u002F\u002F Get matched components\nfunction resolveComponents(router) {\n const path = getLocation(router.options.base, router.options.mode)\n\n return flatMapComponents(router.match(path), async (Component, _, match, key, index) =\u003E {\n \u002F\u002F If component is not resolved yet, resolve it\n if (typeof Component === 'function' && !Component.options) {\n Component = await Component()\n }\n \u002F\u002F Sanitize it and save it\n const _Component = applySSRData(sanitizeComponent(Component), NUXT.data ? NUXT.data[index] : null)\n match.components[key] = _Component\n return _Component\n })\n}\n\nfunction callMiddleware(Components, context, layout) {\n let midd = []\n let unknownMiddleware = false\n\n \u002F\u002F If layout is undefined, only call global middleware\n if (typeof layout !== 'undefined') {\n midd = [] \u002F\u002F Exclude global middleware if layout defined (already called before)\n layout = sanitizeComponent(layout)\n if (layout.options.middleware) {\n midd = midd.concat(layout.options.middleware)\n }\n Components.forEach((Component) =\u003E {\n if (Component.options.middleware) {\n midd = midd.concat(Component.options.middleware)\n }\n })\n }\n\n midd = midd.map((name) =\u003E {\n if (typeof name === 'function') return name\n if (typeof middleware[name] !== 'function') {\n unknownMiddleware = true\n this.error({ statusCode: 500, message: 'Unknown middleware ' + name })\n }\n return middleware[name]\n })\n\n if (unknownMiddleware) return\n return middlewareSeries(midd, context)\n}\n\nasync function render(to, from, next) {\n if (this._pathChanged === false && this._queryChanged === false) return next()\n \u002F\u002F Handle first render on SPA mode\n if (to === from) _lastPaths = []\n else {\n const fromMatches = []\n _lastPaths = getMatchedComponents(from, fromMatches).map((Component, i) =\u003E {\n return compile(from.matched[fromMatches[i]].path)(from.params)\n })\n }\n\n \u002F\u002F nextCalled is true when redirected\n let nextCalled = false\n const _next = (path) =\u003E {\n if (nextCalled) return\n nextCalled = true\n next(path)\n }\n\n \u002F\u002F Update context\n await setContext(app, {\n route: to,\n from,\n next: _next.bind(this)\n })\n this._dateLastError = app.nuxt.dateErr\n this._hadError = !!app.nuxt.err\n\n \u002F\u002F Get route's matched components\n const matches = []\n const Components = getMatchedComponents(to, matches)\n\n \u002F\u002F If no Components matched, generate 404\n if (!Components.length) {\n \u002F\u002F Default layout\n await callMiddleware.call(this, Components, app.context)\n if (nextCalled) return\n \u002F\u002F Load layout for error page\n const layout = await this.loadLayout(\n typeof NuxtError.layout === 'function'\n ? NuxtError.layout(app.context)\n : NuxtError.layout\n )\n await callMiddleware.call(this, Components, app.context, layout)\n if (nextCalled) return\n \u002F\u002F Show error page\n app.context.error({ statusCode: 404, message: `This page could not be found` })\n return next()\n }\n\n \u002F\u002F Update ._data and other properties if hot reloaded\n Components.forEach((Component) =\u003E {\n if (Component._Ctor && Component._Ctor.options) {\n Component.options.asyncData = Component._Ctor.options.asyncData\n Component.options.fetch = Component._Ctor.options.fetch\n }\n })\n\n \u002F\u002F Apply transitions\n this.setTransitions(mapTransitions(Components, to, from))\n\n try {\n \u002F\u002F Call middleware\n await callMiddleware.call(this, Components, app.context)\n if (nextCalled) return\n if (app.context._errored) return next()\n\n \u002F\u002F Set layout\n let layout = Components[0].options.layout\n if (typeof layout === 'function') {\n layout = layout(app.context)\n }\n layout = await this.loadLayout(layout)\n\n \u002F\u002F Call middleware for layout\n await callMiddleware.call(this, Components, app.context, layout)\n if (nextCalled) return\n if (app.context._errored) return next()\n\n \u002F\u002F Call .validate()\n let isValid = true\n try {\n for (const Component of Components) {\n if (typeof Component.options.validate !== 'function') {\n continue\n }\n\n isValid = await Component.options.validate(app.context)\n\n if (!isValid) {\n break\n }\n }\n } catch (validationError) {\n \u002F\u002F ...If .validate(