mirror of
https://github.com/koodiklinikka/koodiklinikka.github.io.git
synced 2026-01-26 03:34:09 +00:00
1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[3],{"/jkW":function(t,e,r){"use strict";e.__esModule=!0,e.isDynamicRoute=function(t){return n.test(t)};var n=/\/\[[^/]+?\](?=\/|$)/},"0Bsm":function(t,e,r){"use strict";var n=r("TqRt");e.__esModule=!0,e.default=function(t){function e(e){return a.default.createElement(t,Object.assign({router:(0,o.useRouter)()},e))}e.getInitialProps=t.getInitialProps,e.origGetInitialProps=t.origGetInitialProps,!1;return e};var a=n(r("q1tI")),o=r("nOHt")},"284h":function(t,e,r){var n=r("cDf5");function a(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},"3WeD":function(t,e,r){"use strict";var n=r("J4zp");e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],o=r[1];Array.isArray(o)?o.forEach((function(t){return e.append(a,t)})):e.set(a,o)})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.forEach((function(e){Array.from(e.keys()).forEach((function(e){return t.delete(e)})),e.forEach((function(e,r){return t.append(r,e)}))})),t}},"6D7l":function(t,e,r){"use strict";e.__esModule=!0,e.formatUrl=function(t){var e=t.auth,r=t.hostname,a=t.protocol||"",i=t.pathname||"",s=t.hash||"",u=t.query||"",c=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?c=e+t.host:r&&(c=e+(~r.indexOf(":")?"[".concat(r,"]"):r),t.port&&(c+=":"+t.port));u&&"object"===typeof u&&(u=String(n.urlQueryToSearchParams(u)));var h=t.search||u&&"?".concat(u)||"";a&&":"!==a.substr(-1)&&(a+=":");t.slashes||(!a||o.test(a))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c="");s&&"#"!==s[0]&&(s="#"+s);h&&"?"!==h[0]&&(h="?"+h);return i=i.replace(/[?#]/g,encodeURIComponent),h=h.replace("#","%23"),"".concat(a).concat(c).concat(i).concat(h).concat(s)};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=n?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=t[o]}r.default=t,e&&e.set(t,r);return r}(r("3WeD"));function a(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}var o=/https?|ftp|gopher|file/},J4zp:function(t,e,r){var n=r("wTVA"),a=r("m0LI"),o=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||a(t,e)||o(t,e)||i()}},S3md:function(t,e,r){},"X24+":function(t,e,r){"use strict";function n(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t}e.__esModule=!0,e.removePathTrailingSlash=n,e.normalizePathTrailingSlash=void 0;var a=n;e.normalizePathTrailingSlash=a},YTqd:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteRegex=function(t){var e=(t.replace(/\/$/,"")||"/").slice(1).split("/"),r={},n=1,a=e.map((function(t){if(t.startsWith("[")&&t.endsWith("]")){var e=function(t){var e=t.startsWith("[")&&t.endsWith("]");e&&(t=t.slice(1,-1));var r=t.startsWith("...");r&&(t=t.slice(3));return{key:t,repeat:r,optional:e}}(t.slice(1,-1)),a=e.key,o=e.optional,i=e.repeat;return r[a]={pos:n++,repeat:i,optional:o},i?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return"/".concat(t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"))})).join("");0;return{re:new RegExp("^".concat(a,"(?:/)?$")),groups:r}}},b48C:function(t,e){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}},dZ6Y:function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){var t=Object.create(null);return{on:function(e,r){(t[e]||(t[e]=[])).push(r)},off:function(e,r){t[e]&&t[e].splice(t[e].indexOf(r)>>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t[e]||[]).slice().map((function(t){t.apply(void 0,n)}))}}}},elyg:function(t,e,r){"use strict";var n=r("J4zp"),a=r("o0o1"),o=r("yXPU"),i=r("lwsE"),s=r("W8MJ");e.__esModule=!0,e.hasBasePath=b,e.addBasePath=w,e.delBasePath=_,e.isLocalURL=S,e.resolveHref=P,e.markLoadingError=x,e.default=void 0;var u=r("X24+"),c=r("wkBG"),h=g(r("dZ6Y")),l=r("g/15"),f=r("/jkW"),p=r("hS4m"),d=r("3WeD"),v=(g(r("S3md")),r("gguc")),y=r("YTqd");function g(t){return t&&t.__esModule?t:{default:t}}function m(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function b(t){return""===t||t.startsWith("/")}function w(t){return t}function _(t){return t.slice("".length)||"/"}function S(t){if(t.startsWith("/"))return!0;try{var e=(0,l.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&b(r.pathname)}catch(n){return!1}}function P(t,e){var r=new URL(t,"http://n"),n="string"===typeof e?e:(0,l.formatWithValidation)(e);try{var a=new URL(n,r);return a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname),a.origin===r.origin?a.href.slice(a.origin.length):a.href}catch(o){return n}}var k=Symbol("PAGE_LOAD_ERROR");function x(t){return Object.defineProperty(t,k,{})}function R(t,e,r){return{url:P(t.pathname,e),as:r?P(t.pathname,r):r}}function C(t,e){return function t(e,r){return fetch(e,{credentials:"same-origin"}).then((function(n){if(!n.ok){if(r>1&&n.status>=500)return t(e,r-1);throw new Error("Failed to load static props")}return n.json()}))}(t,e?3:1).catch((function(t){throw e||x(t),t}))}var E=function(){function t(e,r,n,a){var o=this,s=a.initialProps,c=a.pageLoader,h=a.App,d=a.wrapApp,v=a.Component,y=a.initialStyleSheets,g=a.err,m=a.subscription,b=a.isFallback;i(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,a=e.options,i=(0,p.parseRelativeUrl)(r).pathname;o.isSsr&&n===o.asPath&&i===o.pathname||o._bps&&!o._bps(e)||o.change("replaceState",r,n,Object.assign({},a,{shallow:a.shallow&&o._shallow}))}}else{var s=o.pathname,u=o.query;o.changeState("replaceState",(0,l.formatWithValidation)({pathname:s,query:u}),(0,l.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,styleSheets:y,props:s,err:g,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:h,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r,this.asPath=(0,f.isDynamicRoute)(e)&&__NEXT_DATA__.autoExport?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=d,this.isSsr=!0,this.isFallback=b,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,l.formatWithValidation)({pathname:e,query:r}),(0,l.getURL)()),window.addEventListener("popstate",this.onPopState)}return s(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=R(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=R(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(a.mark((function e(r,n,o,i){var s,c,h,g,m,w,P,k,x,R,C,E,O,I,j,L,A,T;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S(n)){e.next=3;break}return window.location.href=n,e.abrupt("return",!1);case 3:if(i._h||(this.isSsr=!1),l.ST&&performance.mark("routeChange"),this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute),s=b(o)?_(o):o,this._inFlightRoute=o,i._h||!this.onlyAHashChange(s)){e.next=16;break}return this.asPath=s,t.events.emit("hashChangeStart",o),this.changeState(r,n,o,i),this.scrollToHash(s),this.notify(this.components[this.route]),t.events.emit("hashChangeComplete",o),e.abrupt("return",!0);case 16:return e.next=18,this.pageLoader.getPageList();case 18:return c=e.sent,e.next=21,this.pageLoader.promisedBuildManifest;case 21:if(h=e.sent,h.__rewrites,g=(0,p.parseRelativeUrl)(n),w=(m=g).pathname,P=m.searchParams,(g=this._resolveHref(g,c)).pathname!==w&&(w=g.pathname,n=(0,l.formatWithValidation)(g)),k=(0,d.searchParamsToUrlQuery)(P),w=w?(0,u.removePathTrailingSlash)(_(w)):w,this.urlIsNew(s)||(r="replaceState"),x=(0,u.removePathTrailingSlash)(w),R=i.shallow,C=void 0!==R&&R,E=_(E=o),!(0,f.isDynamicRoute)(x)){e.next=47;break}if(O=(0,p.parseRelativeUrl)(E),I=O.pathname,j=(0,y.getRouteRegex)(x),L=(0,v.getRouteMatcher)(j)(I)){e.next=46;break}if(!(Object.keys(j.groups).filter((function(t){return!k[t]})).length>0)){e.next=44;break}throw new Error("The provided `as` value (".concat(I,") is incompatible with the `href` value (").concat(x,"). ")+"Read more: https://err.sh/vercel/next.js/incompatible-href-as");case 44:e.next=47;break;case 46:Object.assign(k,L);case 47:return t.events.emit("routeChangeStart",o),e.prev=48,e.next=51,this.getRouteInfo(x,w,k,o,C);case 51:return A=e.sent,T=A.error,t.events.emit("beforeHistoryChange",o),this.changeState(r,n,o,i),e.next=58,this.set(x,w,k,s,A).catch((function(t){if(!t.cancelled)throw t;T=T||t}));case 58:if(!T){e.next=61;break}throw t.events.emit("routeChangeError",T,s),T;case 61:return t.events.emit("routeChangeComplete",o),e.abrupt("return",!0);case 66:if(e.prev=66,e.t0=e.catch(48),!e.t0.cancelled){e.next=70;break}return e.abrupt("return",!1);case 70:throw e.t0;case 71:case"end":return e.stop()}}),e,this,[[48,66]])})));return function(t,r,n,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,l.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(a.mark((function e(r,n,o,i,s){var u,c,h,l;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(k in r)&&!s){e.next=6;break}throw t.events.emit("routeChangeError",r,i),window.location.href=i,m();case 6:return e.prev=6,e.next=9,this.fetchComponent("/_error");case 9:return u=e.sent,c=u.page,h=u.styleSheets,l={Component:c,styleSheets:h,err:r,error:r},e.prev=13,e.next=16,this.getInitialProps(c,{err:r,pathname:n,query:o});case 16:l.props=e.sent,e.next=23;break;case 19:e.prev=19,e.t0=e.catch(13),console.error("Error in error page `getInitialProps`: ",e.t0),l.props={};case 23:return e.abrupt("return",l);case 26:return e.prev=26,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,n,o,i,!0));case 29:case"end":return e.stop()}}),e,this,[[6,26],[13,19]])})));return function(t,r,n,a,o){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(a.mark((function t(e,r,n,o){var i,s,u,c,h,f,p,d,v=this,y=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=y.length>4&&void 0!==y[4]&&y[4],t.prev=1,s=this.components[e],!i||!s||this.route!==e){t.next=5;break}return t.abrupt("return",s);case 5:if(!s){t.next=9;break}t.t0=s,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:u=t.t0,c=u.Component,h=u.__N_SSG,f=u.__N_SSP,t.next=18;break;case 18:return(h||f)&&(p=this.pageLoader.getDataHref((0,l.formatWithValidation)({pathname:r,query:n}),_(o),h)),t.next=21,this._getData((function(){return h?v._getStaticData(p):f?v._getServerData(p):v.getInitialProps(c,{pathname:r,query:n,asPath:o})}));case 21:return d=t.sent,u.props=d,this.components[e]=u,t.abrupt("return",u);case 27:return t.prev=27,t.t1=t.catch(1),t.abrupt("return",this.handleRouteInfoError(t.t1,r,n,o));case 30:case"end":return t.stop()}}),t,this,[[1,27]])})));return function(e,r,n,a){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=n(e,2),a=r[0],o=r[1],i=t.split("#"),s=n(i,2),u=s[0],c=s[1];return!(!c||a!==u||o!==c)||a===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=n(e,2)[1];if(""!==r){var a=document.getElementById(r);if(a)a.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"_resolveHref",value:function(t,e){var r=t.pathname,n=(0,c.denormalizePagePath)(_(r));return"/404"===n||"/_error"===n||e.includes(n)||e.some((function(e){if((0,f.isDynamicRoute)(e)&&(0,y.getRouteRegex)(e).re.test(n))return t.pathname=e,!0})),t}},{key:"prefetch",value:function(){var t=o(a.mark((function t(e){var r,n,o,i,s,c,h=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=h.length>1&&void 0!==h[1]?h[1]:e,n=h.length>2&&void 0!==h[2]?h[2]:{},o=(0,p.parseRelativeUrl)(e),i=o.pathname,t.next=6,this.pageLoader.getPageList();case 6:s=t.sent,(o=this._resolveHref(o,s)).pathname!==i&&(i=o.pathname,e=(0,l.formatWithValidation)(o)),t.next=11;break;case 11:return c=(0,u.removePathTrailingSlash)(i),t.next=14,Promise.all([this.pageLoader.prefetchData(e,r),this.pageLoader[n.priority?"loadPage":"prefetch"](c)]);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(a.mark((function t(e){var r,n,o,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,n=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(o=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return n===this.clc&&(this.clc=null),t.abrupt("return",o);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var a=new Error("Loading initial props cancelled");throw a.cancelled=!0,a}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdc[r]?Promise.resolve(this.sdc[r]):C(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){return C(t,this.isSsr)}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,l.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e){this.clc&&(t.events.emit("routeChangeError",m(),e),this.clc(),this.clc=null)}},{key:"notify",value:function(t){return this.sub(t,this.components["/_app"].Component)}}]),t}();e.default=E,E.events=(0,h.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),a=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,o.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var o=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return h.apply(this,arguments)}function h(){return(h=a(n.mark((function t(e,r){var a,o,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(a=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(o=t.sent,!a||!u(a)){t.next=17;break}return t.abrupt("return",o);case 17:if(o){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(o,'" instead.'),new Error(i);case 20:return t.abrupt("return",o);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var l="undefined"!==typeof performance;e.SP=l;var f=l&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=f},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var a=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},o={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(o[t]=~i.indexOf("/")?i.split("/").map((function(t){return a(t)})):e.repeat?[a(i)]:a(i))})),o}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=e?new URL(e,a):a,n=new URL(t,r),o=n.pathname,i=n.searchParams,s=n.search,u=n.hash,c=n.href,h=n.origin,l=n.protocol;if(h!==a.origin||"http:"!==l&&"https:"!==l)throw new Error("invariant: invalid relative URL");return{pathname:o,searchParams:i,search:s,hash:u,href:c.slice(a.origin.length)}};var n=r("g/15"),a=new URL((0,n.getLocationOrigin)())},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){a=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function a(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var i=r("284h"),s=r("TqRt");e.__esModule=!0,e.useRouter=function(){return u.default.useContext(h.RouterContext)},e.makePublicRouterInstance=function(t){var e,r=t,n={},o=a(p);try{for(o.s();!(e=o.n()).done;){var i=e.value;"object"!==typeof r[i]?n[i]=r[i]:n[i]=Object.assign({},r[i])}}catch(s){o.e(s)}finally{o.f()}return n.events=c.default.events,d.forEach((function(t){n[t]=function(){return r[t].apply(r,arguments)}})),n},e.createRouter=e.withRouter=e.default=void 0;var u=s(r("q1tI")),c=i(r("elyg"));e.Router=c.default,e.NextRouter=c.NextRouter;var h=r("qOIg"),l=s(r("0Bsm"));e.withRouter=l.default;var f={router:null,readyCallbacks:[],ready:function(t){if(this.router)return t();this.readyCallbacks.push(t)}},p=["pathname","route","query","asPath","components","isFallback","basePath"],d=["push","replace","reload","back","prefetch","beforePopState"];function v(){if(!f.router){throw new Error('No router instance found.\nYou should only use "next/router" inside the client side of your app.\n')}return f.router}Object.defineProperty(f,"events",{get:function(){return c.default.events}}),p.forEach((function(t){Object.defineProperty(f,t,{get:function(){return v()[t]}})})),d.forEach((function(t){f[t]=function(){var e=v();return e[t].apply(e,arguments)}})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((function(t){f.ready((function(){c.default.events.on(t,(function(){var e="on".concat(t.charAt(0).toUpperCase()).concat(t.substring(1)),r=f;if(r[e])try{r[e].apply(r,arguments)}catch(n){console.error("Error when running the Router event: ".concat(e)),console.error("".concat(n.message,"\n").concat(n.stack))}}))}))}));var y=f;e.default=y;e.createRouter=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return f.router=n(c.default,e),f.readyCallbacks.forEach((function(t){return t()})),f.readyCallbacks=[],f.router}},qOIg:function(t,e,r){"use strict";var n;e.__esModule=!0,e.RouterContext=void 0;var a=((n=r("q1tI"))&&n.__esModule?n:{default:n}).default.createContext(null);e.RouterContext=a},sXyB:function(t,e,r){var n=r("SksO"),a=r("b48C");function o(e,r,i){return a()?t.exports=o=Reflect.construct:t.exports=o=function(t,e,r){var a=[null];a.push.apply(a,e);var o=new(Function.bind.apply(t,a));return r&&n(o,r.prototype),o},o.apply(null,arguments)}t.exports=o},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},wkBG:function(t,e,r){"use strict";function n(t){return t.replace(/\\/g,"/")}e.__esModule=!0,e.normalizePathSep=n,e.denormalizePagePath=function(t){(t=n(t)).startsWith("/index/")?t=t.slice(6):"/index"===t&&(t="/");return t}},wkBT:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(t,e){function r(t,e,r,n,a,o,i){try{var s=t[o](i),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,a)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(a,o){var i=t.apply(e,n);function s(t){r(i,a,o,s,u,"next",t)}function u(t){r(i,a,o,s,u,"throw",t)}s(void 0)}))}}}}]); |