@repdf/preview 0.0.26 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +47 -226
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/build-manifest.json +20 -20
- package/dist/preview/.next/cache/.tsbuildinfo +1 -1
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +1 -1
- package/dist/preview/.next/react-loadable-manifest.json +2 -2
- package/dist/preview/.next/required-server-files.json +1 -1
- package/dist/preview/.next/routes-manifest.json +1 -1
- package/dist/preview/.next/server/chunks/204.js +1 -0
- package/dist/preview/.next/server/chunks/{76.js → 239.js} +3 -3
- package/dist/preview/.next/server/chunks/{992.js → 865.js} +1 -1
- package/dist/preview/.next/server/chunks/975.js +4 -0
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/component.js +2 -2
- package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js +80 -15
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
- package/dist/preview/.next/server/pages/en/404.html +1 -1
- package/dist/preview/.next/server/pages/en/500.html +1 -1
- package/dist/preview/.next/server/pages/en/test.html +1 -1
- package/dist/preview/.next/server/pages/index.js +2 -2
- package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
- package/dist/preview/.next/server/pages/test.js.nft.json +1 -1
- package/dist/preview/.next/server/webpack-api-runtime.js +1 -1
- package/dist/preview/.next/static/5z2iPZdTII6-Np4gQSrnp/_buildManifest.js +1 -0
- package/dist/preview/.next/static/chunks/64-33135d2a0b032c99.js +1 -0
- package/dist/preview/.next/static/chunks/main-32f0addb06a02100.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_app-c139bcbf1257ade3.js +181 -0
- package/dist/preview/.next/static/chunks/pages/_error-0577f827b4afb66a.js +1 -0
- package/dist/preview/.next/static/chunks/pages/{index-7e306d1513d09a1a.js → index-59cca326edb25e5b.js} +1 -1
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-f29a966b14996f21.js +1 -0
- package/dist/preview/.next/static/chunks/pages/{test-6c9d6a5f356c21ea.js → test-1b0ec700afcdd64b.js} +1 -1
- package/dist/preview/.next/static/chunks/webpack-0b5d8249fb15f5f3.js +1 -0
- package/dist/preview/.next/static/css/3beae5d5e23b91e8.css +3 -0
- package/dist/preview/.next/trace +17 -16
- package/package.json +35 -42
- package/LICENCE +0 -21
- package/dist/preview/.next/server/chunks/370.js +0 -1
- package/dist/preview/.next/server/chunks/476.js +0 -1
- package/dist/preview/.next/server/chunks/515.js +0 -1
- package/dist/preview/.next/server/chunks/787.js +0 -4
- package/dist/preview/.next/server/chunks/81.js +0 -1
- package/dist/preview/.next/static/LNcYnH-Jcg6T9ie5z-a_o/_buildManifest.js +0 -1
- package/dist/preview/.next/static/chunks/138-c24eca17d1ad2527.js +0 -1
- package/dist/preview/.next/static/chunks/main-58cc12cfc6868a7a.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_app-0f9241fc03d167e5.js +0 -8
- package/dist/preview/.next/static/chunks/pages/_error-4ad10ca9d415501b.js +0 -1
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-54953a42a234e88f.js +0 -1
- package/dist/preview/.next/static/chunks/webpack-b8f8d6679aaa5f42.js +0 -1
- package/dist/preview/.next/static/css/e697c978240c2fce.css +0 -3
- /package/dist/preview/.next/static/{LNcYnH-Jcg6T9ie5z-a_o → 5z2iPZdTII6-Np4gQSrnp}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={};e.id=254,e.ids=[254,888,660],e.modules={3183:(e,t)=>{"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},9969:(e,t)=>{"use strict";Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},587:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>h,getServerSideProps:()=>f,getStaticPaths:()=>p,getStaticProps:()=>d,reportWebVitals:()=>g,routeModule:()=>b,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>x,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>v});var n=r(7169),i=r(2056),o=r(9969),s=r(5494),l=r(6520),u=r(5993),c=e([l,u]);[l,u]=c.then?(await c)():c;let h=(0,o.l)(u,"default"),d=(0,o.l)(u,"getStaticProps"),p=(0,o.l)(u,"getStaticPaths"),f=(0,o.l)(u,"getServerSideProps"),m=(0,o.l)(u,"config"),g=(0,o.l)(u,"reportWebVitals"),v=(0,o.l)(u,"unstable_getStaticProps"),y=(0,o.l)(u,"unstable_getStaticPaths"),_=(0,o.l)(u,"unstable_getStaticParams"),P=(0,o.l)(u,"unstable_getServerProps"),x=(0,o.l)(u,"unstable_getServerSideProps"),b=new n.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/preview/[...relTemplatePath]",pathname:"/preview/[...relTemplatePath]",bundlePath:"",filename:""},components:{App:l.default,Document:s.default},userland:u});a()}catch(e){a(e)}})},8148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION:function(){return a},FLIGHT_PARAMETERS:function(){return l},NEXT_DID_POSTPONE_HEADER:function(){return c},NEXT_ROUTER_PREFETCH_HEADER:function(){return i},NEXT_ROUTER_STATE_TREE:function(){return n},NEXT_RSC_UNION_QUERY:function(){return u},NEXT_URL:function(){return o},RSC_CONTENT_TYPE_HEADER:function(){return s},RSC_HEADER:function(){return r}});let r="RSC",a="Next-Action",n="Next-Router-State-Tree",i="Next-Router-Prefetch",o="Next-Url",s="text/x-component",l=[[r],[n],[i]],u="_rsc",c="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3619:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DOMAttributeNames:function(){return a},default:function(){return o},isEqualNode:function(){return i}});let a={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function n(e){let{type:t,props:r}=e,n=document.createElement(t);for(let e in r){if(!r.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===r[e])continue;let i=a[e]||e.toLowerCase();"script"===t&&("async"===i||"defer"===i||"noModule"===i)?n[i]=!!r[e]:n.setAttribute(i,r[e])}let{children:i,dangerouslySetInnerHTML:o}=r;return o?n.innerHTML=o.__html||"":i&&(n.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):""),n}function i(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){let a=t.cloneNode(!0);return a.setAttribute("nonce",""),a.nonce=r,r===e.nonce&&e.isEqualNode(a)}}return e.isEqualNode(t)}function o(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let a=t.title?t.title[0]:null,n="";if(a){let{children:e}=a.props;n="string"==typeof e?e:Array.isArray(e)?e.join(""):""}n!==document.title&&(document.title=n),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],a=r.querySelector("meta[name=next-head-count]"),o=Number(a.content),s=[];for(let t=0,r=a.previousElementSibling;t<o;t++,r=(null==r?void 0:r.previousElementSibling)||null){var l;(null==r?void 0:null==(l=r.tagName)?void 0:l.toLowerCase())===e&&s.push(r)}let u=t.map(n).filter(e=>{for(let t=0,r=s.length;t<r;t++)if(i(s[t],e))return s.splice(t,1),!1;return!0});s.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),u.forEach(e=>r.insertBefore(e,a)),a.content=(o-s.length+u.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},865:(e,t,r)=>{"use strict";function a(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return a}}),r(4573),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}});let a=r(9013);function n(e,t){{let{pathname:r}=(0,a.parsePath)(e),n=r.toLowerCase(),i=null==t?void 0:t.toLowerCase();return t&&(n.startsWith("/"+i+"/")||n==="/"+i)?(r.length===t.length+1?"/":"")+e.slice(t.length+1):e}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return p},isAssetError:function(){return u},markAssetError:function(){return l}}),r(5157),r(4359);let a=r(9100),n=r(4899),i=r(3183);function o(e,t,r){let a,n=t.get(e);if(n)return"future"in n?n.future:Promise.resolve(n);let i=new Promise(e=>{a=e});return t.set(e,n={resolve:a,future:i}),r?r().then(e=>(a(e),e)).catch(r=>{throw t.delete(e),r}):i}let s=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,s,{})}function u(e){return e&&s in e}let c=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),h=()=>(0,i.getDeploymentIdQueryOrEmptyString)();function d(e,t,r){return new Promise((a,i)=>{let o=!1;e.then(e=>{o=!0,a(e)}).catch(i),(0,n.requestIdleCallback)(()=>setTimeout(()=>{o||i(r)},t))})}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):d(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,l(Error("Failed to load client build manifest")))}function f(e,t){return p().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let n=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:n.filter(e=>e.endsWith(".js")).map(e=>(0,a.__unsafeCreateTrustedScriptURL)(e)+h()),css:n.filter(e=>e.endsWith(".css")).map(e=>e+h())}})}function m(e){let t=new Map,r=new Map,a=new Map,i=new Map;function s(e){{var t;let a=r.get(e.toString());return a||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),a=new Promise((r,a)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>a(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),a))}}function u(e){let t=a.get(e);return t||a.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>o(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let a=t.get(e);a&&"resolve"in a?r&&(t.set(e,r),a.resolve(r)):(r?t.set(e,r):t.delete(e),i.delete(e))})},loadRoute(r,a){return o(r,i,()=>{let n;return d(f(e,r).then(e=>{let{scripts:a,css:n}=e;return Promise.all([t.has(r)?[]:Promise.all(a.map(s)),Promise.all(n.map(u))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,a=Object.assign({styles:r},t);return"error"in t?t:a}).catch(e=>{if(a)throw e;return{error:e}}).finally(()=>null==n?void 0:n())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():f(e,t).then(e=>Promise.all(c?e.scripts.map(e=>{var t,r,a;return t=e.toString(),r="script",new Promise((e,n)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();a=document.createElement("link"),r&&(a.as=r),a.rel="prefetch",a.crossOrigin=void 0,a.onload=e,a.onerror=()=>n(l(Error("Failed to prefetch: "+t))),a.href=t,document.head.appendChild(a)})}):[])).then(()=>{(0,n.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return i.default},createRouter:function(){return m},default:function(){return p},makePublicRouterInstance:function(){return g},useRouter:function(){return f},withRouter:function(){return l.default}});let a=r(5157),n=a._(r(6689)),i=a._(r(6630)),o=r(7777),s=a._(r(8342)),l=a._(r(5808)),u={router:null,readyCallbacks:[],ready(e){if(this.router)return e()}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],h=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>i.default.events}),c.forEach(e=>{Object.defineProperty(u,e,{get:()=>d()[e]})}),h.forEach(e=>{u[e]=function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];return d()[e](...r)}}),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach(e=>{u.ready(()=>{i.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];let n="on"+e.charAt(0).toUpperCase()+e.substring(1);if(u[n])try{u[n](...r)}catch(e){console.error("Error when running the Router event: "+n),console.error((0,s.default)(e)?e.message+"\n"+e.stack:e+"")}})})});let p=u;function f(){let e=n.default.useContext(o.RouterContext);if(!e)throw Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");return e}function m(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return u.router=new i.default(...t),u.readyCallbacks.forEach(e=>e()),u.readyCallbacks=[],u.router}function g(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=i.default.events,h.forEach(r=>{t[r]=function(){for(var t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return e[r](...a)}}),t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return _},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return v}});let a=r(5157),n=r(8301),i=r(997),o=a._(r(6405)),s=n._(r(6689)),l=r(9258),u=r(3619),c=r(4899),h=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],f=e=>{if(o.default.preinit){e.forEach(e=>{o.default.preinit(e,{as:"style"})});return}},m=e=>{let{src:t,id:r,onLoad:a=()=>{},onReady:n=null,dangerouslySetInnerHTML:i,children:o="",strategy:s="afterInteractive",onError:l,stylesheets:c}=e,m=r||t;if(m&&d.has(m))return;if(h.has(t)){d.add(m),h.get(t).then(a,l);return}let g=()=>{n&&n(),d.add(m)},v=document.createElement("script"),y=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),a&&a.call(this,t),g()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,a]of(i?(v.innerHTML=i.__html||"",g()):o?(v.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):"",g()):t&&(v.src=t,h.set(t,y)),Object.entries(e))){if(void 0===a||p.includes(r))continue;let e=u.DOMAttributeNames[r]||r.toLowerCase();v.setAttribute(e,a)}"worker"===s&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",s),c&&f(c),document.body.appendChild(v)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function v(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function y(e){let{id:t,src:r="",onLoad:a=()=>{},onReady:n=null,strategy:u="afterInteractive",onError:h,stylesheets:p,...f}=e,{updateScripts:g,scripts:v,getIsSsr:y,appDir:_,nonce:P}=(0,s.useContext)(l.HeadManagerContext),x=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||r;x.current||(n&&e&&d.has(e)&&n(),x.current=!0)},[n,t,r]);let b=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{!b.current&&("afterInteractive"===u?m(e):"lazyOnload"===u&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),b.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(g?(v[u]=(v[u]||[]).concat([{id:t,src:r,onLoad:a,onReady:n,onError:h,...f}]),g(v)):y&&y()?d.add(t||r):y&&!y()&&m(e)),_){if(p&&p.forEach(e=>{o.default.preinit(e,{as:"style"})}),"beforeInteractive"===u)return r?(o.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:P,crossOrigin:f.crossOrigin}:{as:"script",nonce:P,crossOrigin:f.crossOrigin}),(0,i.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...f,id:t}])+")"}})):(f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...f,id:t}])+")"}}));"afterInteractive"===u&&r&&o.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:P,crossOrigin:f.crossOrigin}:{as:"script",nonce:P,crossOrigin:f.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let _=y;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9100:(e,t)=>{"use strict";let r;function a(e){return(null==r?void 0:r.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return a}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),r(5157);let a=r(997);r(6689);let n=r(7835);function i(e){function t(t){return(0,a.jsx)(e,{router:(0,n.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return a}});class a{static from(e,t){void 0===t&&(t=1e-4);let r=new a(e.length,t);for(let t of e)r.add(t);return r}export(){let e={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};if(this.errorRate<1e-4){let t=JSON.stringify(e),a=r(7138).sync(t);a>1024&&console.warn("Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate "+this.errorRate+" resulted in size "+t.length+" bytes, "+a+" bytes (gzip)")}return e}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let a=function(e){let t=0;for(let r=0;r<e.length;r++)t=Math.imul(t^e.charCodeAt(r),1540483477),t^=t>>>13,t=Math.imul(t,1540483477);return t>>>0}(""+e+r)%this.numBits;t.push(a)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},5605:(e,t)=>{"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,a=Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];(e[t]||[]).slice().map(e=>{e(...a)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},6630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return W},default:function(){return $},matchesMiddleware:function(){return I}});let a=r(5157),n=r(8301),i=r(8249),o=r(4491),s=r(7095),l=n._(r(8342)),u=r(9671),c=r(2149),h=a._(r(5605)),d=r(4121),p=r(1452),f=r(1005);r(5165);let m=r(7893),g=r(3715),v=r(8727),y=r(2067),_=r(9013),P=r(7872),x=r(4144),b=r(865),w=r(6230),S=r(4573),j=r(3302),E=r(7720),R=r(5603),A=r(8961),O=r(287),C=r(7069);r(2267);let T=r(518),L=r(7286),N=r(4876);function M(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function I(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,_.parsePath)(e.asPath),a=(0,S.hasBasePath)(r)?(0,b.removeBasePath)(r):r,n=(0,w.addBasePath)((0,P.addLocale)(a,e.locale));return t.some(e=>new RegExp(e.regexp).test(n))}function k(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function D(e,t,r){let[a,n]=(0,j.resolveHref)(e,t,!0),i=(0,d.getLocationOrigin)(),o=a.startsWith(i),s=n&&n.startsWith(i);a=k(a),n=n?k(n):n;let l=o?a:(0,w.addBasePath)(a),u=r?k((0,j.resolveHref)(e,r)):n||a;return{url:l,as:s?u:(0,w.addBasePath)(u)}}function H(e,t){let r=(0,i.removeTrailingSlash)((0,u.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,g.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,i.removeTrailingSlash)(e))}async function B(e){if(!await I(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let a={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!1},n=t.headers.get("x-nextjs-rewrite"),s=n||t.headers.get("x-nextjs-matched-path"),l=t.headers.get("x-matched-path");if(!l||s||l.includes("__next_data_catchall")||l.includes("/_error")||l.includes("/404")||(s=l),s){if(s.startsWith("/")){let t=(0,f.parseRelativeUrl)(s),l=(0,R.getNextPathnameInfo)(t.pathname,{nextConfig:a,parseData:!0}),u=(0,i.removeTrailingSlash)(l.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,o.getClientBuildManifest)()]).then(i=>{let[o,{__rewrites:s}]=i,h=(0,P.addLocale)(l.pathname,l.locale);if((0,p.isDynamicRoute)(h)||!n&&o.includes((0,c.normalizeLocalePath)((0,b.removeBasePath)(h),r.router.locales).pathname)){let r=(0,R.getNextPathnameInfo)((0,f.parseRelativeUrl)(e).pathname,{nextConfig:a,parseData:!0});h=(0,w.addBasePath)(r.pathname),t.pathname=h}if(!o.includes(u)){let e=H(u,o);e!==u&&(u=e)}let d=o.includes(u)?u:H((0,c.normalizeLocalePath)((0,b.removeBasePath)(t.pathname),r.router.locales).pathname,o);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,g.getRouteRegex)(d))(h);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,_.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,A.formatNextPathnameInfo)({...(0,R.getNextPathnameInfo)(t.pathname,{nextConfig:a,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let u=t.headers.get("x-nextjs-redirect");if(u){if(u.startsWith("/")){let e=(0,_.parsePath)(u),t=(0,A.formatNextPathnameInfo)({...(0,R.getNextPathnameInfo)(e.pathname,{nextConfig:a,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:u})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let U=Symbol("SSG_DATA_NOT_FOUND");function q(e){try{return JSON.parse(e)}catch(e){return null}}function F(e){let{dataHref:t,inflightCache:r,isPrefetch:a,hasMiddleware:n,isServerRender:i,parseJSON:s,persistCache:l,isBackground:u,unstable_skipClientCache:c}=e,{href:h}=new URL(t,window.location.href),d=e=>{var u;return(function e(t,r,a){return fetch(t,{credentials:"same-origin",method:a.method||"GET",headers:Object.assign({},a.headers,{"x-nextjs-data":"1"})}).then(n=>!n.ok&&r>1&&n.status>=500?e(t,r-1,a):n)})(t,i?3:1,{headers:Object.assign({},a?{purpose:"prefetch"}:{},a&&n?{"x-middleware-prefetch":"1"}:{}),method:null!=(u=null==e?void 0:e.method)?u:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:h}:r.text().then(e=>{if(!r.ok){if(n&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:h};if(404===r.status){var a;if(null==(a=q(e))?void 0:a.notFound)return{dataHref:t,json:{notFound:U},response:r,text:e,cacheKey:h}}let s=Error("Failed to load static props");throw i||(0,o.markAssetError)(s),s}return{dataHref:t,json:s?q(e):null,response:r,text:e,cacheKey:h}})).then(e=>(l&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[h],e)).catch(e=>{throw c||delete r[h],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,o.markAssetError)(e),e})};return c&&l?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[h]=Promise.resolve(e)),e)):void 0!==r[h]?r[h]:r[h]=d(u?{method:"HEAD"}:{})}function W(){return Math.random().toString(36).slice(2,10)}function z(e){let{url:t,router:r}=e;if(t===(0,w.addBasePath)((0,P.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let G=e=>{let{route:t,router:r}=e,a=!1,n=r.clc=()=>{a=!0};return()=>{if(a){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}n===r.clc&&(r.clc=null)}};class ${reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,a){{let l=!1,u=!1;for(let c of[e,t])if(c){let t=(0,i.removeTrailingSlash)(new URL(c,"http://n").pathname),h=(0,w.addBasePath)((0,P.addLocale)(t,r||this.locale));if(t!==(0,i.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var n,o,s;for(let e of(l=l||!!(null==(n=this._bfl_s)?void 0:n.contains(t))||!!(null==(o=this._bfl_s)?void 0:o.contains(h)),[t,h])){let t=e.split("/");for(let e=0;!u&&e<t.length+1;e++){let r=t.slice(0,e).join("/");if(r&&(null==(s=this._bfl_d)?void 0:s.contains(r))){u=!0;break}}}if(l||u){if(a)return!0;return z({url:(0,w.addBasePath)((0,P.addLocale)(e,r||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}}}}return!1}async change(e,t,r,a,n){var u,h,j,E,R,A,N,k,B,q;let F,W;if(!(0,C.isLocalURL)(t))return z({url:t,router:this}),!1;let G=1===a._h;G||a.shallow||await this._bfl(r,void 0,a.locale);let Q=G||a._shouldResolveHref||(0,_.parsePath)(t).pathname===(0,_.parsePath)(r).pathname,V={...this.state},X=!0!==this.isReady;this.isReady=!0;let J=this.isSsr;if(G||(this.isSsr=!1),G&&this.clc)return!1;let K=V.locale;{V.locale=!1===a.locale?this.defaultLocale:a.locale||V.locale,void 0===a.locale&&(a.locale=V.locale);let e=(0,f.parseRelativeUrl)((0,S.hasBasePath)(r)?(0,b.removeBasePath)(r):r),n=(0,c.normalizeLocalePath)(e.pathname,this.locales);n.detectedLocale&&(V.locale=n.detectedLocale,e.pathname=(0,w.addBasePath)(e.pathname),r=(0,v.formatWithValidation)(e),t=(0,w.addBasePath)((0,c.normalizeLocalePath)((0,S.hasBasePath)(t)?(0,b.removeBasePath)(t):t,this.locales).pathname));let i=!1;(null==(h=this.locales)?void 0:h.includes(V.locale))||(e.pathname=(0,P.addLocale)(e.pathname,V.locale),z({url:(0,v.formatWithValidation)(e),router:this}),i=!0);let o=(0,y.detectDomainLocale)(this.domainLocales,void 0,V.locale);if(!i&&o&&this.isLocaleDomain&&self.location.hostname!==o.domain){let e=(0,b.removeBasePath)(r);z({url:"http"+(o.http?"":"s")+"://"+o.domain+(0,w.addBasePath)((V.locale===o.defaultLocale?"":"/"+V.locale)+("/"===e?"":e)||"/"),router:this}),i=!0}if(i)return new Promise(()=>{})}d.ST&&performance.mark("routeChange");let{shallow:Y=!1,scroll:Z=!0}=a,ee={shallow:Y};this._inFlightRoute&&this.clc&&(J||$.events.emit("routeChangeError",M(),this._inFlightRoute,ee),this.clc(),this.clc=null),r=(0,w.addBasePath)((0,P.addLocale)((0,S.hasBasePath)(r)?(0,b.removeBasePath)(r):r,a.locale,this.defaultLocale));let et=(0,x.removeLocale)((0,S.hasBasePath)(r)?(0,b.removeBasePath)(r):r,V.locale);this._inFlightRoute=r;let er=K!==V.locale;if(!G&&this.onlyAHashChange(et)&&!er){V.asPath=et,$.events.emit("hashChangeStart",r,ee),this.changeState(e,t,r,{...a,scroll:!1}),Z&&this.scrollToHash(et);try{await this.set(V,this.components[V.route],null)}catch(e){throw(0,l.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,et,ee),e}return $.events.emit("hashChangeComplete",r,ee),!0}let ea=(0,f.parseRelativeUrl)(t),{pathname:en,query:ei}=ea;try{[F,{__rewrites:W}]=await Promise.all([this.pageLoader.getPageList(),(0,o.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return z({url:r,router:this}),!1}this.urlIsNew(et)||er||(e="replaceState");let eo=r;en=en?(0,i.removeTrailingSlash)((0,b.removeBasePath)(en)):en;let es=(0,i.removeTrailingSlash)(en),el=r.startsWith("/")&&(0,f.parseRelativeUrl)(r).pathname;if(null==(u=this.components[en])?void 0:u.__appRouter)return z({url:r,router:this}),new Promise(()=>{});let eu=!!(el&&es!==el&&(!(0,p.isDynamicRoute)(es)||!(0,m.getRouteMatcher)((0,g.getRouteRegex)(es))(el))),ec=!a.shallow&&await I({asPath:r,locale:V.locale,router:this});if(G&&ec&&(Q=!1),Q&&"/_error"!==en&&(a._shouldResolveHref=!0,ea.pathname=H(en,F),ea.pathname===en||(en=ea.pathname,ea.pathname=(0,w.addBasePath)(en),ec||(t=(0,v.formatWithValidation)(ea)))),!(0,C.isLocalURL)(r))return z({url:r,router:this}),!1;eo=(0,x.removeLocale)((0,b.removeBasePath)(eo),V.locale),es=(0,i.removeTrailingSlash)(en);let eh=!1;if((0,p.isDynamicRoute)(es)){let e=(0,f.parseRelativeUrl)(eo),a=e.pathname,n=(0,g.getRouteRegex)(es);eh=(0,m.getRouteMatcher)(n)(a);let i=es===a,o=i?(0,L.interpolateAs)(es,a,ei):{};if(eh&&(!i||o.result))i?r=(0,v.formatWithValidation)(Object.assign({},e,{pathname:o.result,query:(0,T.omit)(ei,o.params)})):Object.assign(ei,eh);else{let e=Object.keys(n.groups).filter(e=>!ei[e]&&!n.groups[e].optional);if(e.length>0&&!ec)throw Error((i?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+a+") is incompatible with the `href` value ("+es+"). ")+"Read more: https://nextjs.org/docs/messages/"+(i?"href-interpolation-failed":"incompatible-href-as"))}}G||$.events.emit("routeChangeStart",r,ee);let ed="/404"===this.pathname||"/_error"===this.pathname;try{let i=await this.getRouteInfo({route:es,pathname:en,query:ei,as:r,resolvedAs:eo,routeProps:ee,locale:V.locale,isPreview:V.isPreview,hasMiddleware:ec,unstable_skipClientCache:a.unstable_skipClientCache,isQueryUpdating:G&&!this.isFallback,isMiddlewareRewrite:eu});if(G||a.shallow||await this._bfl(r,"resolvedAs"in i?i.resolvedAs:void 0,V.locale),"route"in i&&ec){es=en=i.route||es,ee.shallow||(ei=Object.assign({},i.query||{},ei));let e=(0,S.hasBasePath)(ea.pathname)?(0,b.removeBasePath)(ea.pathname):ea.pathname;if(eh&&en!==e&&Object.keys(eh).forEach(e=>{eh&&ei[e]===eh[e]&&delete ei[e]}),(0,p.isDynamicRoute)(en)){let e=!ee.shallow&&i.resolvedAs?i.resolvedAs:(0,w.addBasePath)((0,P.addLocale)(new URL(r,location.href).pathname,V.locale),!0);(0,S.hasBasePath)(e)&&(e=(0,b.removeBasePath)(e));{let t=(0,c.normalizeLocalePath)(e,this.locales);V.locale=t.detectedLocale||V.locale,e=t.pathname}let t=(0,g.getRouteRegex)(en),a=(0,m.getRouteMatcher)(t)(new URL(e,location.href).pathname);a&&Object.assign(ei,a)}}if("type"in i){if("redirect-internal"===i.type)return this.change(e,i.newUrl,i.newAs,a);return z({url:i.destination,router:this}),new Promise(()=>{})}let o=i.Component;if(o&&o.unstable_scriptLoader&&[].concat(o.unstable_scriptLoader()).forEach(e=>{(0,s.handleClientScriptLoad)(e.props)}),(i.__N_SSG||i.__N_SSP)&&i.props){if(i.props.pageProps&&i.props.pageProps.__N_REDIRECT){a.locale=!1;let t=i.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==i.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,f.parseRelativeUrl)(t);r.pathname=H(r.pathname,F);let{url:n,as:i}=D(this,t,t);return this.change(e,n,i,a)}return z({url:t,router:this}),new Promise(()=>{})}if(V.isPreview=!!i.props.__N_PREVIEW,i.props.notFound===U){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(i=await this.getRouteInfo({route:e,pathname:e,query:ei,as:r,resolvedAs:eo,routeProps:{shallow:!1},locale:V.locale,isPreview:V.isPreview,isNotFound:!0}),"type"in i)throw Error("Unexpected middleware effect on /404")}}G&&"/_error"===this.pathname&&(null==(E=self.__NEXT_DATA__.props)?void 0:null==(j=E.pageProps)?void 0:j.statusCode)===500&&(null==(R=i.props)?void 0:R.pageProps)&&(i.props.pageProps.statusCode=500);let u=a.shallow&&V.route===(null!=(A=i.route)?A:es),h=null!=(N=a.scroll)?N:!G&&!u,d=null!=n?n:h?{x:0,y:0}:null,v={...V,route:es,pathname:en,query:ei,asPath:et,isFallback:!1};if(G&&ed){if(i=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:ei,as:r,resolvedAs:eo,routeProps:{shallow:!1},locale:V.locale,isPreview:V.isPreview,isQueryUpdating:G&&!this.isFallback}),"type"in i)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(B=self.__NEXT_DATA__.props)?void 0:null==(k=B.pageProps)?void 0:k.statusCode)===500&&(null==(q=i.props)?void 0:q.pageProps)&&(i.props.pageProps.statusCode=500);try{await this.set(v,i,d)}catch(e){throw(0,l.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,et,ee),e}return!0}if($.events.emit("beforeHistoryChange",r,ee),this.changeState(e,t,r,a),!(G&&!d&&!X&&!er&&(0,O.compareRouterStates)(v,this.state))){try{await this.set(v,i,d)}catch(e){if(e.cancelled)i.error=i.error||e;else throw e}if(i.error)throw G||$.events.emit("routeChangeError",i.error,et,ee),i.error;V.locale&&(document.documentElement.lang=V.locale),G||$.events.emit("routeChangeComplete",r,ee),h&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,l.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,a){void 0===a&&(a={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=a.shallow,window.history[e]({url:t,as:r,options:a,__N:!0,key:this._key="pushState"!==e?this._key:W()},"",r))}async handleRouteInfoError(e,t,r,a,n,i){if(console.error(e),e.cancelled)throw e;if((0,o.isAssetError)(e)||i)throw $.events.emit("routeChangeError",e,a,n),z({url:a,router:this}),M();try{let a;let{page:n,styleSheets:i}=await this.fetchComponent("/_error"),o={props:a,Component:n,styleSheets:i,err:e,error:e};if(!o.props)try{o.props=await this.getInitialProps(n,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),o.props={}}return o}catch(e){return this.handleRouteInfoError((0,l.default)(e)?e:Error(e+""),t,r,a,n,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:a,as:n,resolvedAs:o,routeProps:s,locale:u,hasMiddleware:h,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:f,isMiddlewareRewrite:m,isNotFound:g}=e,y=t;try{var _,P,x,w;let e=this.components[y];if(s.shallow&&e&&this.route===y)return e;let t=G({route:y,router:this});h&&(e=void 0);let l=!e||"initial"in e?void 0:e,S={dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:r,query:a}),skipInterpolation:!0,asPath:g?"/404":o,locale:u}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:f?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:f},j=f&&!m?null:await B({fetchData:()=>F(S),asPath:g?"/404":o,locale:u,router:this}).catch(e=>{if(f)return null;throw e});if(j&&("/_error"===r||"/404"===r)&&(j.effect=void 0),f&&(j?j.json=self.__NEXT_DATA__.props:j={json:self.__NEXT_DATA__.props}),t(),(null==j?void 0:null==(_=j.effect)?void 0:_.type)==="redirect-internal"||(null==j?void 0:null==(P=j.effect)?void 0:P.type)==="redirect-external")return j.effect;if((null==j?void 0:null==(x=j.effect)?void 0:x.type)==="rewrite"){let t=(0,i.removeTrailingSlash)(j.effect.resolvedHref),n=await this.pageLoader.getPageList();if((!f||n.includes(t))&&(y=t,r=j.effect.resolvedHref,a={...a,...j.effect.parsedAs.query},o=(0,b.removeBasePath)((0,c.normalizeLocalePath)(j.effect.parsedAs.pathname,this.locales).pathname),e=this.components[y],s.shallow&&e&&this.route===y&&!h))return{...e,route:y}}if((0,E.isAPIRoute)(y))return z({url:n,router:this}),new Promise(()=>{});let R=l||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),A=null==j?void 0:null==(w=j.response)?void 0:w.headers.get("x-middleware-skip"),O=R.__N_SSG||R.__N_SSP;A&&(null==j?void 0:j.dataHref)&&delete this.sdc[j.dataHref];let{props:C,cacheKey:T}=await this._getData(async()=>{if(O){if((null==j?void 0:j.json)&&!A)return{cacheKey:j.cacheKey,props:j.json};let e=(null==j?void 0:j.dataHref)?j.dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:r,query:a}),asPath:o,locale:u}),t=await F({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:A?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(R.Component,{pathname:r,query:a,asPath:n,locale:u,locales:this.locales,defaultLocale:this.defaultLocale})}});return R.__N_SSP&&S.dataHref&&T&&delete this.sdc[T],this.isPreview||!R.__N_SSG||f||F(Object.assign({},S,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),C.pageProps=Object.assign({},C.pageProps),R.props=C,R.route=y,R.query=a,R.resolvedAs=o,this.components[y]=R,R}catch(e){return this.handleRouteInfoError((0,l.getProperError)(e),r,a,n,s)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[a,n]=e.split("#",2);return!!n&&t===a&&r===n||t===a&&r!==n}scrollToHash(e){let[,t=""]=e.split("#",2);(0,N.handleSmoothScroll)(()=>{if(""===t||"top"===t){window.scrollTo(0,0);return}let e=decodeURIComponent(t),r=document.getElementById(e);if(r){r.scrollIntoView();return}let a=document.getElementsByName(e)[0];a&&a.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){void 0===t&&(t=e),void 0===r&&(r={});let a=(0,f.parseRelativeUrl)(e),n=a.pathname,{pathname:o,query:s}=a,l=o;if(!1===r.locale){o=(0,c.normalizeLocalePath)(o,this.locales).pathname,a.pathname=o,e=(0,v.formatWithValidation)(a);let n=(0,f.parseRelativeUrl)(t),i=(0,c.normalizeLocalePath)(n.pathname,this.locales);n.pathname=i.pathname,r.locale=i.detectedLocale||this.defaultLocale,t=(0,v.formatWithValidation)(n)}let u=await this.pageLoader.getPageList(),h=t,d=void 0!==r.locale?r.locale||void 0:this.locale,y=await I({asPath:t,locale:d,router:this});a.pathname=H(a.pathname,u),(0,p.isDynamicRoute)(a.pathname)&&(o=a.pathname,a.pathname=o,Object.assign(s,(0,m.getRouteMatcher)((0,g.getRouteRegex)(a.pathname))((0,_.parsePath)(t).pathname)||{}),y||(e=(0,v.formatWithValidation)(a)));let P=await B({fetchData:()=>F({dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:l,query:s}),skipInterpolation:!0,asPath:h,locale:d}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:d,router:this});if((null==P?void 0:P.effect.type)==="rewrite"&&(a.pathname=P.effect.resolvedHref,o=P.effect.resolvedHref,s={...s,...P.effect.parsedAs.query},h=P.effect.parsedAs.pathname,e=(0,v.formatWithValidation)(a)),(null==P?void 0:P.effect.type)==="redirect-external")return;let x=(0,i.removeTrailingSlash)(o);await this._bfl(t,h,r.locale,!0)&&(this.components[n]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(x).then(t=>!!t&&F({dataHref:(null==P?void 0:P.json)?null==P?void 0:P.dataHref:this.pageLoader.getDataHref({href:e,asPath:h,locale:d}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](x)])}async fetchComponent(e){let t=G({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return F({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],a=this._wrapApp(r);return t.AppTree=a,(0,d.loadGetInitialProps)(r,{AppTree:a,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,a,{initialProps:n,pageLoader:o,App:s,wrapApp:l,Component:u,err:c,subscription:h,isFallback:m,locale:g,locales:_,defaultLocale:P,domainLocales:x,isPreview:b}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=W(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let a=e.state;if(!a){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,v.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),(0,d.getURL)());return}if(a.__NA){window.location.reload();return}if(!a.__N||r&&this.locale===a.options.locale&&a.as===this.asPath)return;let{url:n,as:i,options:o,key:s}=a;this._key=s;let{pathname:l}=(0,f.parseRelativeUrl)(n);(!this.isSsr||i!==(0,w.addBasePath)(this.asPath)||l!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(a))&&this.change("replaceState",n,i,Object.assign({},o,{shallow:o.shallow&&this._shallow,locale:o.locale||this.defaultLocale,_h:0}),t)};let S=(0,i.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[S]={Component:u,initial:!0,props:n,err:c,__N_SSG:n&&n.__N_SSG,__N_SSP:n&&n.__N_SSP}),this.components["/_app"]={Component:s,styleSheets:[]};{let{BloomFilter:e}=r(3260),t={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]},a={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==a?void 0:a.numHashes)&&(this._bfl_d=new e(a.numItems,a.errorRate),this._bfl_d.import(a))}this.events=$.events,this.pageLoader=o;let j=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.basePath="",this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!j&&!self.location.search),this.locales=_,this.defaultLocale=P,this.domainLocales=x,this.isLocaleDomain=!!(0,y.detectDomainLocale)(x,self.location.hostname),this.state={route:S,pathname:e,query:t,asPath:j?e:a,isPreview:!!b,locale:g,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1)}}$.events=(0,h.default)()},1434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return n}});let a=r(9013);function n(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=(0,a.parsePath)(e);return""+r+t+n+i}},287:(e,t)=>{"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let a=r.length;a--;){let n=r[a];if("query"===n){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let a=r.length;a--;){let n=r[a];if(!t.query.hasOwnProperty(n)||e.query[n]!==t.query[n])return!1}}else if(!t.hasOwnProperty(n)||e[n]!==t[n])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},8961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});let a=r(8249),n=r(650),i=r(1434),o=r(4507);function s(e){let t=(0,o.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,a.removeTrailingSlash)(t)),e.buildId&&(t=(0,i.addPathSuffix)((0,n.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,n.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,i.addPathSuffix)(t,"/"):(0,a.removeTrailingSlash)(t)}},4359:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},5603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});let a=r(2149),n=r(4317),i=r(9724);function o(e,t){var r,o;let{basePath:s,i18n:l,trailingSlash:u}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):u};s&&(0,i.pathHasPrefix)(c.pathname,s)&&(c.pathname=(0,n.removePathPrefix)(c.pathname,s),c.basePath=s);let h=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];c.buildId=r,h="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=h)}if(l){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,a.normalizeLocalePath)(c.pathname,l.locales);c.locale=e.detectedLocale,c.pathname=null!=(o=e.pathname)?o:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(h):(0,a.normalizeLocalePath)(h,l.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},4876:(e,t)=>{"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,a=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=a}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},2267:(e,t)=>{"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},1005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return n}}),r(4121);let a=r(115);function n(e,t){let r=new URL("http://n"),n=t?new URL(t,r):e.startsWith(".")?new URL("http://n"):r,{pathname:i,searchParams:o,search:s,hash:l,href:u,origin:c}=new URL(e,n);if(c!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,a.searchParamsToUrlQuery)(o),search:s,hash:l,href:u.slice(r.origin.length)}}},7551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseUrl",{enumerable:!0,get:function(){return i}});let a=r(115),n=r(1005);function i(e){if(e.startsWith("/"))return(0,n.parseRelativeUrl)(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:(0,a.searchParamsToUrlQuery)(t.searchParams),search:t.search}}},3390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPathMatch",{enumerable:!0,get:function(){return n}});let a=r(6028);function n(e,t){let r=[],n=(0,a.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof(null==t?void 0:t.sensitive)&&t.sensitive,strict:null==t?void 0:t.strict}),i=(0,a.regexpToFunction)((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,a)=>{if("string"!=typeof e)return!1;let n=i(e);if(!n)return!1;if(null==t?void 0:t.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete n.params[e.name];return{...a,...n.params}}}},9169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{compileNonPath:function(){return h},matchHas:function(){return c},prepareDestination:function(){return d}});let a=r(6028),n=r(8200),i=r(7551),o=r(6760),s=r(8148),l=r(9277);function u(e){return e.replace(/__ESC_COLON_/gi,":")}function c(e,t,r,a){void 0===r&&(r=[]),void 0===a&&(a=[]);let n={},i=r=>{let a;let i=r.key;switch(r.type){case"header":i=i.toLowerCase(),a=e.headers[i];break;case"cookie":a="cookies"in e?e.cookies[r.key]:(0,l.getCookieParser)(e.headers)()[r.key];break;case"query":a=t[i];break;case"host":{let{host:t}=(null==e?void 0:e.headers)||{};a=null==t?void 0:t.split(":",1)[0].toLowerCase()}}if(!r.value&&a)return n[function(e){let t="";for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);(a>64&&a<91||a>96&&a<123)&&(t+=e[r])}return t}(i)]=a,!0;if(a){let e=RegExp("^"+r.value+"$"),t=Array.isArray(a)?a.slice(-1)[0].match(e):a.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{n[e]=t.groups[e]}):"host"===r.type&&t[0]&&(n.host=t[0])),!0}return!1};return!!r.every(e=>i(e))&&!a.some(e=>i(e))&&n}function h(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(":"+r)&&(e=e.replace(RegExp(":"+r+"\\*","g"),":"+r+"--ESCAPED_PARAM_ASTERISKS").replace(RegExp(":"+r+"\\?","g"),":"+r+"--ESCAPED_PARAM_QUESTION").replace(RegExp(":"+r+"\\+","g"),":"+r+"--ESCAPED_PARAM_PLUS").replace(RegExp(":"+r+"(?!\\w)","g"),"--ESCAPED_PARAM_COLON"+r));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),(0,a.compile)("/"+e,{validate:!1})(t).slice(1)}function d(e){let t;let r=Object.assign({},e.query);delete r.__nextLocale,delete r.__nextDefaultLocale,delete r.__nextDataReq,delete r.__nextInferredLocaleFromDefault,delete r[s.NEXT_RSC_UNION_QUERY];let l=e.destination;for(let t of Object.keys({...e.params,...r}))l=l.replace(RegExp(":"+(0,n.escapeStringRegexp)(t),"g"),"__ESC_COLON_"+t);let c=(0,i.parseUrl)(l),d=c.query,p=u(""+c.pathname+(c.hash||"")),f=u(c.hostname||""),m=[],g=[];(0,a.pathToRegexp)(p,m),(0,a.pathToRegexp)(f,g);let v=[];m.forEach(e=>v.push(e.name)),g.forEach(e=>v.push(e.name));let y=(0,a.compile)(p,{validate:!1}),_=(0,a.compile)(f,{validate:!1});for(let[t,r]of Object.entries(d))Array.isArray(r)?d[t]=r.map(t=>h(u(t),e.params)):"string"==typeof r&&(d[t]=h(u(r),e.params));let P=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!P.some(e=>v.includes(e)))for(let t of P)t in d||(d[t]=e.params[t]);if((0,o.isInterceptionRouteAppPath)(p))for(let t of p.split("/")){let r=o.INTERCEPTION_ROUTE_MARKERS.find(e=>t.startsWith(e));if(r){e.params["0"]=r;break}}try{let[r,a]=(t=y(e.params)).split("#",2);c.hostname=_(e.params),c.pathname=r,c.hash=(a?"#":"")+(a||""),delete c.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return c.query={...r,...c.query},{newUrl:t,destQuery:d,parsedDestination:c}}},4317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return n}});let a=r(9724);function n(e,t){if(!(0,a.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},5165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let a=r(3390),n=r(9169),i=r(8249),o=r(2149),s=r(865),l=r(1005);function u(e,t,r,u,c,h){let d,p=!1,f=!1,m=(0,l.parseRelativeUrl)(e),g=(0,i.removeTrailingSlash)((0,o.normalizeLocalePath)((0,s.removeBasePath)(m.pathname),h).pathname),v=r=>{let l=(0,a.getPathMatch)(r.source+"",{removeUnnamedParams:!0,strict:!0})(m.pathname);if((r.has||r.missing)&&l){let e=(0,n.matchHas)({headers:{host:document.location.hostname,"user-agent":navigator.userAgent},cookies:document.cookie.split("; ").reduce((e,t)=>{let[r,...a]=t.split("=");return e[r]=a.join("="),e},{})},m.query,r.has,r.missing);e?Object.assign(l,e):l=!1}if(l){if(!r.destination)return f=!0,!0;let a=(0,n.prepareDestination)({appendParamsToQuery:!0,destination:r.destination,params:l,query:u});if(m=a.parsedDestination,e=a.newUrl,Object.assign(u,a.parsedDestination.query),g=(0,i.removeTrailingSlash)((0,o.normalizeLocalePath)((0,s.removeBasePath)(e),h).pathname),t.includes(g))return p=!0,d=g,!0;if((d=c(g))!==e&&t.includes(d))return p=!0,!0}},y=!1;for(let e=0;e<r.beforeFiles.length;e++)v(r.beforeFiles[e]);if(!(p=t.includes(g))){if(!y){for(let e=0;e<r.afterFiles.length;e++)if(v(r.afterFiles[e])){y=!0;break}}if(y||(d=c(g),y=p=t.includes(d)),!y){for(let e=0;e<r.fallback.length;e++)if(v(r.fallback[e])){y=!0;break}}}return{asPath:e,parsedAs:m,matchedPage:p,resolvedHref:d,externalDest:f}}},2338:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{_:()=>s});var n=r(997),i=r(5053),o=e([i]);function s({children:e}){let{data:t,isLoading:r}=i.h.core.templateCheck.useQuery({relTemplatePath:"test.txt"});return n.jsx(n.Fragment,{children:e})}i=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},1759:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{Z:()=>s});var n=r(997),i=r(1278),o=e([i]);function s({children:e}){return(0,n.jsxs)("div",{className:"grid grid-cols-12",children:[n.jsx("div",{className:"col-span-2",children:n.jsx(i.Y,{})}),n.jsx("div",{className:"col-span-10",children:e})]})}i=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},1278:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{Y:()=>p});var n=r(997),i=r(6593),o=r(9213),s=r(6698),l=r.n(s),u=r(7636),c=r(5053),h=r(6024),d=e([i,c,h]);function p(){let{data:e}=c.h.core.pdfTemplates.useQuery();return(0,n.jsxs)("div",{className:"h-full min-h-screen border-r p-4 relative",children:[n.jsx(l(),{href:"/",children:n.jsx("h1",{className:"text-2xl font-bold",children:"rePDF"})}),(0,n.jsxs)("div",{className:"mt-5 flex flex-col gap-2",children:[e&&(0,n.jsxs)(n.Fragment,{children:[e.topLevel.map(e=>n.jsx(l(),{href:`/preview/${e.relTemplatePath}`,className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName)),e.subFolders.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[n.jsx(o.Z,{className:"w-4 h-4"}),n.jsx("p",{className:"",children:e.name})]}),n.jsx("ul",{children:e.pdfTemplates.map(e=>n.jsx(l(),{href:`/preview/${e.relTemplatePath}`,className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName))})]},e.name))]}),n.jsx("div",{className:"fixed bottom-4 left-0 p-4 text-sm",children:n.jsx(f,{})})]})]})}function f(){let{lastMessage:e,readyState:t}=(0,h.d)(),r=u.ReadyState[t];return(0,n.jsxs)("div",{className:(0,i.default)("text-xs rounded-lg bg-gray-300 p-2",{"bg-red-500":t===u.ReadyState.CLOSED,"bg-green-500":t===u.ReadyState.OPEN}),children:["Live Preview: ",r]})}[i,c,h]=d.then?(await d)():d,a()}catch(e){a(e)}})},6024:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{J:()=>d,d:()=>h});var n=r(997),i=r(5053),o=r(6689),s=r(7636),l=r.n(s);r(6462);var u=e([i]);function c(){return""}i=(u.then?(await u)():u)[0];let p=(0,o.createContext)(null);function h(){let e=(0,o.useContext)(p);if(null===e)throw Error("useWebSocketContext must be used within a WebSocketProvider");return e}function d({children:e}){i.h.useUtils();let[t,r]=(0,o.useState)(c);console.log("connecting to ws at:",t);let{lastMessage:a,readyState:s}=l()(t,{shouldReconnect:()=>!!t});return n.jsx(p.Provider,{value:{lastMessage:a,readyState:s},children:e})}a()}catch(e){a(e)}})},4331:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{A:()=>l});var n=r(997),i=r(7096),o=r(5053),s=e([o]);function l({relTemplatePath:e}){let{data:t,isLoading:r}=o.h.core.fileContents.useQuery({relTemplatePath:e});return r?n.jsx("div",{children:"Loading..."}):t?n.jsx("div",{children:n.jsx(i.Highlight,{theme:i.themes.shadesOfPurple,code:t,language:"tsx",children:({className:e,style:t,tokens:r,getLineProps:a,getTokenProps:i})=>n.jsx("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:"100%"},children:r.map((e,t)=>(0,n.jsxs)("div",{...a({line:e}),style:{display:"flex"},children:[n.jsx("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:t+1}),n.jsx("span",{style:{flex:1,overflow:"hidden"},children:e.map((e,t)=>n.jsx("span",{...i({token:e}),style:{...i({token:e}).style,wordBreak:"break-all",whiteSpace:"pre-wrap"}},t))})]},t))})})}):n.jsx("div",{children:"Error"})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},9769:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{I:()=>l});var n=r(997),i=r(6689),o=r(5053),s=e([o]);function l({relTemplatePath:e,previewPropGroup:t}){let{data:r}=o.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[a,s]=(0,i.useState)(!0),[l,u]=(0,i.useState)(`/api/component?relativeTemplatePath=${e}&previewPropGroup=${t??""}`);return(0,n.jsxs)("div",{className:"relative h-full w-full",children:[a&&n.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:n.jsx("p",{children:"Rendering Component..."})}),l&&n.jsx("iframe",{src:l,className:"h-full w-full border-none",onLoad:()=>s(!1)})]})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},5228:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{u:()=>l});var n=r(997),i=r(7096),o=r(5053),s=e([o]);function l({relTemplatePath:e}){let{data:t,isLoading:r}=o.h.core.renderedHtml.useQuery({relTemplatePath:e});return r?n.jsx("div",{children:"Loading..."}):t?n.jsx("div",{children:n.jsx(i.Highlight,{theme:i.themes.shadesOfPurple,code:t,language:"tsx",children:({className:e,style:t,tokens:r,getLineProps:a,getTokenProps:i})=>n.jsx("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:r.map((e,t)=>(0,n.jsxs)("div",{...a({line:e}),style:{display:"flex"},children:[n.jsx("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:t+1}),n.jsx("span",{children:e.map((e,t)=>n.jsx("span",{...i({token:e})},t))})]},t))})})}):n.jsx("div",{children:"Error"})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},2755:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{I:()=>l});var n=r(997),i=r(6689),o=r(5053),s=e([o]);function l({relTemplatePath:e,previewPropGroup:t}){let{data:r}=o.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[a,s]=(0,i.useState)(!0),[l,u]=(0,i.useState)(`/api/pdf?relativeTemplatePath=${e}&previewPropGroup=${t??""}`);return(0,n.jsxs)("div",{className:"relative h-full w-full",children:[a&&n.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:n.jsx("p",{children:"Rendering PDF..."})}),n.jsx("iframe",{src:l,width:"100%",height:"100%",title:"PDF Preview",onLoad:()=>s(!1)},r)]})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},6462:(e,t,r)=>{"use strict";let a=require("pino");r.n(a)()({transport:{target:"pino-pretty"},level:"debug"})},6520:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>c});var n=r(997),i=r(9063),o=r(5053);r(4012);var s=r(1759),l=r(6024),u=e([i,o,s,l]);[i,o,s,l]=u.then?(await u)():u;let c=o.h.withTRPC(({Component:e,pageProps:t})=>(0,n.jsxs)(n.Fragment,{children:[n.jsx(l.J,{children:n.jsx(s.Z,{children:n.jsx(e,{...t})})}),n.jsx(i.ReactQueryDevtools,{initialIsOpen:!1})]}));a()}catch(e){a(e)}})},5494:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var a=r(997),n=r(76);function i(){return(0,a.jsxs)(n.Html,{lang:"en",children:[(0,a.jsxs)(n.Head,{children:[a.jsx("link",{rel:"icon",href:"/favicon.ico",sizes:"any"}),a.jsx("link",{rel:"icon",href:"/favicon-16x16.png",type:"image/png",sizes:"16x16"}),a.jsx("link",{rel:"icon",href:"/favicon-32x32.png",type:"image/png",sizes:"32x32"})]}),(0,a.jsxs)("body",{children:[a.jsx(n.Main,{}),a.jsx(n.NextScript,{})]})]})}},5993:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>v,getServerSideProps:()=>y});var n=r(997),i=r(6593),o=r(968),s=r.n(o),l=r(433);r(6689);var u=r(2338),c=r(4331),h=r(9769),d=r(5228),p=r(2755),f=r(5053),m=e([i,u,c,h,d,p,f]);function g({relTemplatePath:e}){let t=(0,l.useRouter)(),{data:r}=f.h.core.templateDetails.useQuery({relTemplatePath:e}),a=t.query.previewPropGroup?parseInt(t.query.previewPropGroup,10):void 0;return r&&0!==r.previewPropChoices.length?n.jsx(n.Fragment,{children:n.jsx("select",{className:"rounded-md border border-gray-300 p-2",onChange:e=>{let r=parseInt(e.target.value);t.push({query:{...t.query,previewPropGroup:r}})},value:a,children:r.previewPropChoices.map((e,t)=>(0,n.jsxs)("option",{value:t,children:["Prop Group ",t+1]},t))})}):null}function v({templateName:e,relTemplatePath:t}){let r=(0,l.useRouter)(),a=r.query.view,o=e=>{r.push({query:{...r.query,view:e}})};return(0,n.jsxs)(n.Fragment,{children:[n.jsx(s(),{children:n.jsx("title",{children:"Preview PDF - rePDF"})}),(0,n.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between bg-gray-200 p-4",children:[(0,n.jsxs)("div",{children:[n.jsx("p",{children:e}),n.jsx("p",{className:"text-sm text-gray-500",children:e!==t?t:""})]}),n.jsx("div",{children:n.jsx(g,{relTemplatePath:t})}),n.jsx("div",{children:(0,n.jsxs)("ul",{className:"flex",children:[n.jsx("li",{className:(0,i.default)("rounded-l bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","code"===a&&"bg-gray-400 text-white"),onClick:()=>o("code"),children:"Code"}),n.jsx("li",{className:(0,i.default)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","component"===a&&"bg-gray-400 text-white"),onClick:()=>o("component"),children:"Component"}),n.jsx("li",{className:(0,i.default)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","pdf"===a&&"bg-gray-400 text-white"),onClick:()=>o("pdf"),children:"PDF"}),n.jsx("li",{className:(0,i.default)("rounded-r bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","html"===a&&"bg-gray-400 text-white"),onClick:()=>o("html"),children:"HTML"})]})})]}),n.jsx("div",{className:"flex-grow",children:(0,n.jsxs)(u._,{children:["code"===a&&n.jsx(c.A,{relTemplatePath:t}),(null===a||"component"===a)&&n.jsx(h.I,{relTemplatePath:t,previewPropGroup:r.query.previewPropGroup}),"html"===a&&n.jsx(d.u,{relTemplatePath:t}),"pdf"===a&&n.jsx(p.I,{relTemplatePath:t,previewPropGroup:r.query.previewPropGroup})]})})]})]})}[i,u,c,h,d,p,f]=m.then?(await m)():m;let y=async e=>{let{view:t,relTemplatePath:r}=e.query,a=Array.isArray(r)?r.join("/"):r,n=Array.isArray(r)?r[r.length-1]:r;if(!a||!n)throw Error("using template path server side without template path");return{props:{view:(Array.isArray(t)?t[0]:t)??null,templateName:n,relTemplatePath:a}}};a()}catch(e){a(e)}})},5053:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{h:()=>u});var n=r(272),i=r(7455),o=r(3020),s=e([n,i,o]);[n,i,o]=s.then?(await s)():s;let l=()=>`http://localhost:${process.env.PORT??3e3}`,u=(0,i.createTRPCNext)({config:()=>({links:[(0,n.loggerLink)({enabled:e=>"down"===e.direction&&e.result instanceof Error}),(0,n.httpBatchLink)({transformer:o.default,url:`${l()}/api/trpc`})]}),ssr:!1,transformer:o.default});a()}catch(e){a(e)}})},2158:e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var n={},i=t.split(a),o=(r||{}).decode||e,s=0;s<i.length;s++){var l=i[s],u=l.indexOf("=");if(!(u<0)){var c=l.substr(0,u).trim(),h=l.substr(++u,l.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),void 0==n[c]&&(n[c]=function(e,t){try{return t(e)}catch(t){return e}}(h,o))}}return n},t.serialize=function(e,t,a){var i=a||{},o=i.encode||r;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!n.test(e))throw TypeError("argument name is invalid");var s=o(t);if(s&&!n.test(s))throw TypeError("argument val is invalid");var l=e+"="+s;if(null!=i.maxAge){var u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(i.domain){if(!n.test(i.domain))throw TypeError("option domain is invalid");l+="; Domain="+i.domain}if(i.path){if(!n.test(i.path))throw TypeError("option path is invalid");l+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(l+="; HttpOnly"),i.secure&&(l+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,a=/; */,n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},7138:(e,t,r)=>{(()=>{var t={154:(e,t,r)=>{var a=r(781),n=["write","end","destroy"],i=["resume","pause"],o=["data","close"],s=Array.prototype.slice;function l(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r)}e.exports=function(e,t){var r=new a,u=!1;return l(n,function(t){r[t]=function(){return e[t].apply(e,arguments)}}),l(i,function(e){r[e]=function(){r.emit(e);var a=t[e];if(a)return a.apply(t,arguments);t.emit(e)}}),l(o,function(e){t.on(e,function(){var t=s.call(arguments);t.unshift(e),r.emit.apply(r,t)})}),t.on("end",function(){if(!u){u=!0;var e=s.call(arguments);e.unshift("end"),r.emit.apply(r,e)}}),e.on("drain",function(){r.emit("drain")}),e.on("error",c),t.on("error",c),r.writable=e.writable,r.readable=t.readable,r;function c(e){r.emit("error",e)}}},349:(e,t,r)=>{"use strict";let a=r(147),n=r(781),i=r(796),o=r(154),s=r(530),l=e=>Object.assign({level:9},e);e.exports=(e,t)=>e?s(i.gzip)(e,l(t)).then(e=>e.length).catch(e=>0):Promise.resolve(0),e.exports.sync=(e,t)=>i.gzipSync(e,l(t)).length,e.exports.stream=e=>{let t=new n.PassThrough,r=new n.PassThrough,a=o(t,r),s=0,u=i.createGzip(l(e)).on("data",e=>{s+=e.length}).on("error",()=>{a.gzipSize=0}).on("end",()=>{a.gzipSize=s,a.emit("gzip-size",s),r.end()});return t.pipe(u),t.pipe(r,{end:!1}),a},e.exports.file=(t,r)=>new Promise((n,i)=>{let o=a.createReadStream(t);o.on("error",i);let s=o.pipe(e.exports.stream(r));s.on("error",i),s.on("gzip-size",n)}),e.exports.fileSync=(t,r)=>e.exports.sync(a.readFileSync(t),r)},530:e=>{"use strict";let t=(e,t)=>function(...r){return new t.promiseModule((a,n)=>{t.multiArgs?r.push((...e)=>{t.errorFirst?e[0]?n(e):(e.shift(),a(e)):a(e)}):t.errorFirst?r.push((e,t)=>{e?n(e):a(t)}):r.push(a),e.apply(this,r)})};e.exports=(e,r)=>{let a;r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);let n=typeof e;if(!(null!==e&&("object"===n||"function"===n)))throw TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":n}\``);let i=e=>{let t=t=>"string"==typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};for(let o in a="function"===n?function(...a){return r.excludeMain?e(...a):t(e,r).apply(this,a)}:Object.create(Object.getPrototypeOf(e)),e){let n=e[o];a[o]="function"==typeof n&&i(o)?t(n,r):n}return a}},147:e=>{"use strict";e.exports=r(2048)},781:e=>{"use strict";e.exports=r(6162)},796:e=>{"use strict";e.exports=r(1568)}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var i=a[e]={exports:{}},o=!0;try{t[e](i,i.exports,n),o=!1}finally{o&&delete a[e]}return i.exports}n.ab=__dirname+"/";var i=n(349);e.exports=i})()},4012:()=>{},6028:(e,t)=>{"use strict";function r(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var a=e[r];if("*"===a||"+"===a||"?"===a){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===a){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===a){t.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===a){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===a){for(var n="",i=r+1;i<e.length;){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){n+=e[i++];continue}break}if(!n)throw TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:n}),r=i;continue}if("("===a){var s=1,l="",i=r+1;if("?"===e[i])throw TypeError('Pattern cannot start with "?" at '+i);for(;i<e.length;){if("\\"===e[i]){l+=e[i++]+e[i++];continue}if(")"===e[i]){if(0==--s){i++;break}}else if("("===e[i]&&(s++,"?"!==e[i+1]))throw TypeError("Capturing groups are not allowed at "+i);l+=e[i++]}if(s)throw TypeError("Unbalanced pattern at "+r);if(!l)throw TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:l}),r=i;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),a=t.prefixes,n=void 0===a?"./":a,o="[^"+i(t.delimiter||"/#?")+"]+?",s=[],l=0,u=0,c="",h=function(e){if(u<r.length&&r[u].type===e)return r[u++].value},d=function(e){var t=h(e);if(void 0!==t)return t;var a=r[u];throw TypeError("Unexpected "+a.type+" at "+a.index+", expected "+e)},p=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};u<r.length;){var f=h("CHAR"),m=h("NAME"),g=h("PATTERN");if(m||g){var v=f||"";-1===n.indexOf(v)&&(c+=v,v=""),c&&(s.push(c),c=""),s.push({name:m||l++,prefix:v,suffix:"",pattern:g||o,modifier:h("MODIFIER")||""});continue}var y=f||h("ESCAPED_CHAR");if(y){c+=y;continue}if(c&&(s.push(c),c=""),h("OPEN")){var v=p(),_=h("NAME")||"",P=h("PATTERN")||"",x=p();d("CLOSE"),s.push({name:_||(P?l++:""),pattern:_&&!P?o:P,prefix:v,suffix:x,modifier:h("MODIFIER")||""});continue}d("END")}return s}function a(e,t){void 0===t&&(t={});var r=o(t),a=t.encode,n=void 0===a?function(e){return e}:a,i=t.validate,s=void 0===i||i,l=e.map(function(e){if("object"==typeof e)return RegExp("^(?:"+e.pattern+")$",r)});return function(t){for(var r="",a=0;a<e.length;a++){var i=e[a];if("string"==typeof i){r+=i;continue}var o=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(o)){if(!c)throw TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===o.length){if(u)continue;throw TypeError('Expected "'+i.name+'" to not be empty')}for(var h=0;h<o.length;h++){var d=n(o[h],i);if(s&&!l[a].test(d))throw TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+d+'"');r+=i.prefix+d+i.suffix}continue}if("string"==typeof o||"number"==typeof o){var d=n(String(o),i);if(s&&!l[a].test(d))throw TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+d+'"');r+=i.prefix+d+i.suffix;continue}if(!u){var p=c?"an array":"a string";throw TypeError('Expected "'+i.name+'" to be '+p)}}return r}}function n(e,t,r){void 0===r&&(r={});var a=r.decode,n=void 0===a?function(e){return e}:a;return function(r){var a=e.exec(r);if(!a)return!1;for(var i=a[0],o=a.index,s=Object.create(null),l=1;l<a.length;l++)!function(e){if(void 0!==a[e]){var r=t[e-1];"*"===r.modifier||"+"===r.modifier?s[r.name]=a[e].split(r.prefix+r.suffix).map(function(e){return n(e,r)}):s[r.name]=n(a[e],r)}}(l);return{path:i,index:o,params:s}}}function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function s(e,t,r){void 0===r&&(r={});for(var a=r.strict,n=void 0!==a&&a,s=r.start,l=r.end,u=r.encode,c=void 0===u?function(e){return e}:u,h="["+i(r.endsWith||"")+"]|$",d="["+i(r.delimiter||"/#?")+"]",p=void 0===s||s?"^":"",f=0;f<e.length;f++){var m=e[f];if("string"==typeof m)p+=i(c(m));else{var g=i(c(m.prefix)),v=i(c(m.suffix));if(m.pattern){if(t&&t.push(m),g||v){if("+"===m.modifier||"*"===m.modifier){var y="*"===m.modifier?"?":"";p+="(?:"+g+"((?:"+m.pattern+")(?:"+v+g+"(?:"+m.pattern+"))*)"+v+")"+y}else p+="(?:"+g+"("+m.pattern+")"+v+")"+m.modifier}else p+="("+m.pattern+")"+m.modifier}else p+="(?:"+g+v+")"+m.modifier}}if(void 0===l||l)n||(p+=d+"?"),p+=r.endsWith?"(?="+h+")":"$";else{var _=e[e.length-1],P="string"==typeof _?d.indexOf(_[_.length-1])>-1:void 0===_;n||(p+="(?:"+d+"(?="+h+"))?"),P||(p+="(?="+d+"|"+h+")")}return new RegExp(p,o(r))}function l(e,t,a){return e instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var a=0;a<r.length;a++)t.push({name:a,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?RegExp("(?:"+e.map(function(e){return l(e,t,a).source}).join("|")+")",o(a)):s(r(e,a),t,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=r,t.compile=function(e,t){return a(r(e,t),t)},t.tokensToFunction=a,t.match=function(e,t){var r=[];return n(l(e,r,t),r,t)},t.regexpToFunction=n,t.tokensToRegexp=s,t.pathToRegexp=l},7720:(e,t)=>{"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},9277:(e,t,r)=>{"use strict";function a(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:a}=r(2158);return a(Array.isArray(t)?t.join("; "):t)}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getCookieParser",{enumerable:!0,get:function(){return a}})},2056:(e,t)=>{"use strict";var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},9258:(e,t,r)=>{"use strict";e.exports=r(7169).vendored.contexts.HeadManagerContext},433:(e,t,r)=>{e.exports=r(7835)},2785:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{"use strict";e.exports=require("next/head")},7096:e=>{"use strict";e.exports=require("prism-react-renderer")},6689:e=>{"use strict";e.exports=require("react")},6405:e=>{"use strict";e.exports=require("react-dom")},7636:e=>{"use strict";e.exports=require("react-use-websocket")},997:e=>{"use strict";e.exports=require("react/jsx-runtime")},2048:e=>{"use strict";e.exports=require("fs")},5315:e=>{"use strict";e.exports=require("path")},6162:e=>{"use strict";e.exports=require("stream")},1568:e=>{"use strict";e.exports=require("zlib")},9063:e=>{"use strict";e.exports=import("@tanstack/react-query-devtools")},272:e=>{"use strict";e.exports=import("@trpc/client")},7455:e=>{"use strict";e.exports=import("@trpc/next")},6593:e=>{"use strict";e.exports=import("clsx")},3020:e=>{"use strict";e.exports=import("superjson")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[992,76,515],()=>r(587));module.exports=a})();
|
|
1
|
+
(()=>{var e={};e.id=254,e.ids=[254,888,660],e.modules={2382:(e,t)=>{"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},18:(e,t)=>{"use strict";Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},1185:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>h,getServerSideProps:()=>f,getStaticPaths:()=>p,getStaticProps:()=>d,reportWebVitals:()=>g,routeModule:()=>x,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>v});var n=r(83),i=r(4058),o=r(18),s=r(5652),l=r(8417),u=r(5463),c=e([l,u]);[l,u]=c.then?(await c)():c;let h=(0,o.l)(u,"default"),d=(0,o.l)(u,"getStaticProps"),p=(0,o.l)(u,"getStaticPaths"),f=(0,o.l)(u,"getServerSideProps"),m=(0,o.l)(u,"config"),g=(0,o.l)(u,"reportWebVitals"),v=(0,o.l)(u,"unstable_getStaticProps"),y=(0,o.l)(u,"unstable_getStaticPaths"),_=(0,o.l)(u,"unstable_getStaticParams"),P=(0,o.l)(u,"unstable_getServerProps"),b=(0,o.l)(u,"unstable_getServerSideProps"),x=new n.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/preview/[...relTemplatePath]",pathname:"/preview/[...relTemplatePath]",bundlePath:"",filename:""},components:{App:l.default,Document:s.default},userland:u});a()}catch(e){a(e)}})},1369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION:function(){return a},FLIGHT_PARAMETERS:function(){return l},NEXT_DID_POSTPONE_HEADER:function(){return c},NEXT_ROUTER_PREFETCH_HEADER:function(){return i},NEXT_ROUTER_STATE_TREE:function(){return n},NEXT_RSC_UNION_QUERY:function(){return u},NEXT_URL:function(){return o},RSC_CONTENT_TYPE_HEADER:function(){return s},RSC_HEADER:function(){return r}});let r="RSC",a="Next-Action",n="Next-Router-State-Tree",i="Next-Router-Prefetch",o="Next-Url",s="text/x-component",l=[[r],[n],[i]],u="_rsc",c="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7621:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DOMAttributeNames:function(){return a},default:function(){return o},isEqualNode:function(){return i}});let a={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function n(e){let{type:t,props:r}=e,n=document.createElement(t);for(let e in r){if(!r.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===r[e])continue;let i=a[e]||e.toLowerCase();"script"===t&&("async"===i||"defer"===i||"noModule"===i)?n[i]=!!r[e]:n.setAttribute(i,r[e])}let{children:i,dangerouslySetInnerHTML:o}=r;return o?n.innerHTML=o.__html||"":i&&(n.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):""),n}function i(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){let a=t.cloneNode(!0);return a.setAttribute("nonce",""),a.nonce=r,r===e.nonce&&e.isEqualNode(a)}}return e.isEqualNode(t)}function o(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let a=t.title?t.title[0]:null,n="";if(a){let{children:e}=a.props;n="string"==typeof e?e:Array.isArray(e)?e.join(""):""}n!==document.title&&(document.title=n),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],a=r.querySelector("meta[name=next-head-count]"),o=Number(a.content),s=[];for(let t=0,r=a.previousElementSibling;t<o;t++,r=(null==r?void 0:r.previousElementSibling)||null){var l;(null==r?void 0:null==(l=r.tagName)?void 0:l.toLowerCase())===e&&s.push(r)}let u=t.map(n).filter(e=>{for(let t=0,r=s.length;t<r;t++)if(i(s[t],e))return s.splice(t,1),!1;return!0});s.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),u.forEach(e=>r.insertBefore(e,a)),a.content=(o-s.length+u.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2305:(e,t,r)=>{"use strict";function a(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return a}}),r(9490),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}});let a=r(3943);function n(e,t){{let{pathname:r}=(0,a.parsePath)(e),n=r.toLowerCase(),i=null==t?void 0:t.toLowerCase();return t&&(n.startsWith("/"+i+"/")||n==="/"+i)?(r.length===t.length+1?"/":"")+e.slice(t.length+1):e}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return p},isAssetError:function(){return u},markAssetError:function(){return l}}),r(5157),r(386);let a=r(4788),n=r(7909),i=r(2382);function o(e,t,r){let a,n=t.get(e);if(n)return"future"in n?n.future:Promise.resolve(n);let i=new Promise(e=>{a=e});return t.set(e,n={resolve:a,future:i}),r?r().then(e=>(a(e),e)).catch(r=>{throw t.delete(e),r}):i}let s=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,s,{})}function u(e){return e&&s in e}let c=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),h=()=>(0,i.getDeploymentIdQueryOrEmptyString)();function d(e,t,r){return new Promise((a,i)=>{let o=!1;e.then(e=>{o=!0,a(e)}).catch(i),(0,n.requestIdleCallback)(()=>setTimeout(()=>{o||i(r)},t))})}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):d(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,l(Error("Failed to load client build manifest")))}function f(e,t){return p().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let n=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:n.filter(e=>e.endsWith(".js")).map(e=>(0,a.__unsafeCreateTrustedScriptURL)(e)+h()),css:n.filter(e=>e.endsWith(".css")).map(e=>e+h())}})}function m(e){let t=new Map,r=new Map,a=new Map,i=new Map;function s(e){{var t;let a=r.get(e.toString());return a||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),a=new Promise((r,a)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>a(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),a))}}function u(e){let t=a.get(e);return t||a.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>o(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let a=t.get(e);a&&"resolve"in a?r&&(t.set(e,r),a.resolve(r)):(r?t.set(e,r):t.delete(e),i.delete(e))})},loadRoute(r,a){return o(r,i,()=>{let n;return d(f(e,r).then(e=>{let{scripts:a,css:n}=e;return Promise.all([t.has(r)?[]:Promise.all(a.map(s)),Promise.all(n.map(u))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,a=Object.assign({styles:r},t);return"error"in t?t:a}).catch(e=>{if(a)throw e;return{error:e}}).finally(()=>null==n?void 0:n())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():f(e,t).then(e=>Promise.all(c?e.scripts.map(e=>{var t,r,a;return t=e.toString(),r="script",new Promise((e,n)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();a=document.createElement("link"),r&&(a.as=r),a.rel="prefetch",a.crossOrigin=void 0,a.onload=e,a.onerror=()=>n(l(Error("Failed to prefetch: "+t))),a.href=t,document.head.appendChild(a)})}):[])).then(()=>{(0,n.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5724:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return i.default},createRouter:function(){return m},default:function(){return p},makePublicRouterInstance:function(){return g},useRouter:function(){return f},withRouter:function(){return l.default}});let a=r(5157),n=a._(r(6689)),i=a._(r(9686)),o=r(1588),s=a._(r(4253)),l=a._(r(1390)),u={router:null,readyCallbacks:[],ready(e){if(this.router)return e()}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],h=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>i.default.events}),c.forEach(e=>{Object.defineProperty(u,e,{get:()=>d()[e]})}),h.forEach(e=>{u[e]=function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];return d()[e](...r)}}),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach(e=>{u.ready(()=>{i.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];let n="on"+e.charAt(0).toUpperCase()+e.substring(1);if(u[n])try{u[n](...r)}catch(e){console.error("Error when running the Router event: "+n),console.error((0,s.default)(e)?e.message+"\n"+e.stack:e+"")}})})});let p=u;function f(){let e=n.default.useContext(o.RouterContext);if(!e)throw Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");return e}function m(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return u.router=new i.default(...t),u.readyCallbacks.forEach(e=>e()),u.readyCallbacks=[],u.router}function g(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=i.default.events,h.forEach(r=>{t[r]=function(){for(var t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return e[r](...a)}}),t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3785:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return _},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return v}});let a=r(5157),n=r(8301),i=r(997),o=a._(r(6405)),s=n._(r(6689)),l=r(1031),u=r(7621),c=r(7909),h=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],f=e=>{if(o.default.preinit){e.forEach(e=>{o.default.preinit(e,{as:"style"})});return}},m=e=>{let{src:t,id:r,onLoad:a=()=>{},onReady:n=null,dangerouslySetInnerHTML:i,children:o="",strategy:s="afterInteractive",onError:l,stylesheets:c}=e,m=r||t;if(m&&d.has(m))return;if(h.has(t)){d.add(m),h.get(t).then(a,l);return}let g=()=>{n&&n(),d.add(m)},v=document.createElement("script"),y=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),a&&a.call(this,t),g()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,a]of(i?(v.innerHTML=i.__html||"",g()):o?(v.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):"",g()):t&&(v.src=t,h.set(t,y)),Object.entries(e))){if(void 0===a||p.includes(r))continue;let e=u.DOMAttributeNames[r]||r.toLowerCase();v.setAttribute(e,a)}"worker"===s&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",s),c&&f(c),document.body.appendChild(v)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function v(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function y(e){let{id:t,src:r="",onLoad:a=()=>{},onReady:n=null,strategy:u="afterInteractive",onError:h,stylesheets:p,...f}=e,{updateScripts:g,scripts:v,getIsSsr:y,appDir:_,nonce:P}=(0,s.useContext)(l.HeadManagerContext),b=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||r;b.current||(n&&e&&d.has(e)&&n(),b.current=!0)},[n,t,r]);let x=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{!x.current&&("afterInteractive"===u?m(e):"lazyOnload"===u&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),x.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(g?(v[u]=(v[u]||[]).concat([{id:t,src:r,onLoad:a,onReady:n,onError:h,...f}]),g(v)):y&&y()?d.add(t||r):y&&!y()&&m(e)),_){if(p&&p.forEach(e=>{o.default.preinit(e,{as:"style"})}),"beforeInteractive"===u)return r?(o.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:P,crossOrigin:f.crossOrigin}:{as:"script",nonce:P,crossOrigin:f.crossOrigin}),(0,i.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...f,id:t}])+")"}})):(f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...f,id:t}])+")"}}));"afterInteractive"===u&&r&&o.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:P,crossOrigin:f.crossOrigin}:{as:"script",nonce:P,crossOrigin:f.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let _=y;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4788:(e,t)=>{"use strict";let r;function a(e){return(null==r?void 0:r.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return a}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),r(5157);let a=r(997);r(6689);let n=r(5724);function i(e){function t(t){return(0,a.jsx)(e,{router:(0,n.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return a}});class a{static from(e,t){void 0===t&&(t=1e-4);let r=new a(e.length,t);for(let t of e)r.add(t);return r}export(){let e={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};if(this.errorRate<1e-4){let t=JSON.stringify(e),a=r(1527).sync(t);a>1024&&console.warn("Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate "+this.errorRate+" resulted in size "+t.length+" bytes, "+a+" bytes (gzip)")}return e}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let a=function(e){let t=0;for(let r=0;r<e.length;r++)t=Math.imul(t^e.charCodeAt(r),1540483477),t^=t>>>13,t=Math.imul(t,1540483477);return t>>>0}(""+e+r)%this.numBits;t.push(a)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},3935:(e,t)=>{"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,a=Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];(e[t]||[]).slice().map(e=>{e(...a)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},9686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return W},default:function(){return $},matchesMiddleware:function(){return I}});let a=r(5157),n=r(8301),i=r(8323),o=r(7208),s=r(3785),l=n._(r(4253)),u=r(7882),c=r(3197),h=a._(r(3935)),d=r(9974),p=r(5611),f=r(2364);r(7810);let m=r(6400),g=r(5477),v=r(686),y=r(2130),_=r(3943),P=r(4174),b=r(1803),x=r(2305),w=r(5401),j=r(9490),S=r(839),E=r(5366),R=r(1724),A=r(4569),O=r(5299),C=r(5016);r(9563);let T=r(947),L=r(1655),N=r(2345);function M(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function I(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,_.parsePath)(e.asPath),a=(0,j.hasBasePath)(r)?(0,x.removeBasePath)(r):r,n=(0,w.addBasePath)((0,P.addLocale)(a,e.locale));return t.some(e=>new RegExp(e.regexp).test(n))}function k(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function D(e,t,r){let[a,n]=(0,S.resolveHref)(e,t,!0),i=(0,d.getLocationOrigin)(),o=a.startsWith(i),s=n&&n.startsWith(i);a=k(a),n=n?k(n):n;let l=o?a:(0,w.addBasePath)(a),u=r?k((0,S.resolveHref)(e,r)):n||a;return{url:l,as:s?u:(0,w.addBasePath)(u)}}function H(e,t){let r=(0,i.removeTrailingSlash)((0,u.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,g.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,i.removeTrailingSlash)(e))}async function B(e){if(!await I(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let a={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!1},n=t.headers.get("x-nextjs-rewrite"),s=n||t.headers.get("x-nextjs-matched-path"),l=t.headers.get("x-matched-path");if(!l||s||l.includes("__next_data_catchall")||l.includes("/_error")||l.includes("/404")||(s=l),s){if(s.startsWith("/")){let t=(0,f.parseRelativeUrl)(s),l=(0,R.getNextPathnameInfo)(t.pathname,{nextConfig:a,parseData:!0}),u=(0,i.removeTrailingSlash)(l.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,o.getClientBuildManifest)()]).then(i=>{let[o,{__rewrites:s}]=i,h=(0,P.addLocale)(l.pathname,l.locale);if((0,p.isDynamicRoute)(h)||!n&&o.includes((0,c.normalizeLocalePath)((0,x.removeBasePath)(h),r.router.locales).pathname)){let r=(0,R.getNextPathnameInfo)((0,f.parseRelativeUrl)(e).pathname,{nextConfig:a,parseData:!0});h=(0,w.addBasePath)(r.pathname),t.pathname=h}if(!o.includes(u)){let e=H(u,o);e!==u&&(u=e)}let d=o.includes(u)?u:H((0,c.normalizeLocalePath)((0,x.removeBasePath)(t.pathname),r.router.locales).pathname,o);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,g.getRouteRegex)(d))(h);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,_.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,A.formatNextPathnameInfo)({...(0,R.getNextPathnameInfo)(t.pathname,{nextConfig:a,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let u=t.headers.get("x-nextjs-redirect");if(u){if(u.startsWith("/")){let e=(0,_.parsePath)(u),t=(0,A.formatNextPathnameInfo)({...(0,R.getNextPathnameInfo)(e.pathname,{nextConfig:a,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:u})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let U=Symbol("SSG_DATA_NOT_FOUND");function q(e){try{return JSON.parse(e)}catch(e){return null}}function F(e){let{dataHref:t,inflightCache:r,isPrefetch:a,hasMiddleware:n,isServerRender:i,parseJSON:s,persistCache:l,isBackground:u,unstable_skipClientCache:c}=e,{href:h}=new URL(t,window.location.href),d=e=>{var u;return(function e(t,r,a){return fetch(t,{credentials:"same-origin",method:a.method||"GET",headers:Object.assign({},a.headers,{"x-nextjs-data":"1"})}).then(n=>!n.ok&&r>1&&n.status>=500?e(t,r-1,a):n)})(t,i?3:1,{headers:Object.assign({},a?{purpose:"prefetch"}:{},a&&n?{"x-middleware-prefetch":"1"}:{}),method:null!=(u=null==e?void 0:e.method)?u:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:h}:r.text().then(e=>{if(!r.ok){if(n&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:h};if(404===r.status){var a;if(null==(a=q(e))?void 0:a.notFound)return{dataHref:t,json:{notFound:U},response:r,text:e,cacheKey:h}}let s=Error("Failed to load static props");throw i||(0,o.markAssetError)(s),s}return{dataHref:t,json:s?q(e):null,response:r,text:e,cacheKey:h}})).then(e=>(l&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[h],e)).catch(e=>{throw c||delete r[h],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,o.markAssetError)(e),e})};return c&&l?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[h]=Promise.resolve(e)),e)):void 0!==r[h]?r[h]:r[h]=d(u?{method:"HEAD"}:{})}function W(){return Math.random().toString(36).slice(2,10)}function z(e){let{url:t,router:r}=e;if(t===(0,w.addBasePath)((0,P.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let G=e=>{let{route:t,router:r}=e,a=!1,n=r.clc=()=>{a=!0};return()=>{if(a){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}n===r.clc&&(r.clc=null)}};class ${reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,a){{let l=!1,u=!1;for(let c of[e,t])if(c){let t=(0,i.removeTrailingSlash)(new URL(c,"http://n").pathname),h=(0,w.addBasePath)((0,P.addLocale)(t,r||this.locale));if(t!==(0,i.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var n,o,s;for(let e of(l=l||!!(null==(n=this._bfl_s)?void 0:n.contains(t))||!!(null==(o=this._bfl_s)?void 0:o.contains(h)),[t,h])){let t=e.split("/");for(let e=0;!u&&e<t.length+1;e++){let r=t.slice(0,e).join("/");if(r&&(null==(s=this._bfl_d)?void 0:s.contains(r))){u=!0;break}}}if(l||u){if(a)return!0;return z({url:(0,w.addBasePath)((0,P.addLocale)(e,r||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}}}}return!1}async change(e,t,r,a,n){var u,h,S,E,R,A,N,k,B,q;let F,W;if(!(0,C.isLocalURL)(t))return z({url:t,router:this}),!1;let G=1===a._h;G||a.shallow||await this._bfl(r,void 0,a.locale);let Q=G||a._shouldResolveHref||(0,_.parsePath)(t).pathname===(0,_.parsePath)(r).pathname,V={...this.state},X=!0!==this.isReady;this.isReady=!0;let K=this.isSsr;if(G||(this.isSsr=!1),G&&this.clc)return!1;let J=V.locale;{V.locale=!1===a.locale?this.defaultLocale:a.locale||V.locale,void 0===a.locale&&(a.locale=V.locale);let e=(0,f.parseRelativeUrl)((0,j.hasBasePath)(r)?(0,x.removeBasePath)(r):r),n=(0,c.normalizeLocalePath)(e.pathname,this.locales);n.detectedLocale&&(V.locale=n.detectedLocale,e.pathname=(0,w.addBasePath)(e.pathname),r=(0,v.formatWithValidation)(e),t=(0,w.addBasePath)((0,c.normalizeLocalePath)((0,j.hasBasePath)(t)?(0,x.removeBasePath)(t):t,this.locales).pathname));let i=!1;(null==(h=this.locales)?void 0:h.includes(V.locale))||(e.pathname=(0,P.addLocale)(e.pathname,V.locale),z({url:(0,v.formatWithValidation)(e),router:this}),i=!0);let o=(0,y.detectDomainLocale)(this.domainLocales,void 0,V.locale);if(!i&&o&&this.isLocaleDomain&&self.location.hostname!==o.domain){let e=(0,x.removeBasePath)(r);z({url:"http"+(o.http?"":"s")+"://"+o.domain+(0,w.addBasePath)((V.locale===o.defaultLocale?"":"/"+V.locale)+("/"===e?"":e)||"/"),router:this}),i=!0}if(i)return new Promise(()=>{})}d.ST&&performance.mark("routeChange");let{shallow:Y=!1,scroll:Z=!0}=a,ee={shallow:Y};this._inFlightRoute&&this.clc&&(K||$.events.emit("routeChangeError",M(),this._inFlightRoute,ee),this.clc(),this.clc=null),r=(0,w.addBasePath)((0,P.addLocale)((0,j.hasBasePath)(r)?(0,x.removeBasePath)(r):r,a.locale,this.defaultLocale));let et=(0,b.removeLocale)((0,j.hasBasePath)(r)?(0,x.removeBasePath)(r):r,V.locale);this._inFlightRoute=r;let er=J!==V.locale;if(!G&&this.onlyAHashChange(et)&&!er){V.asPath=et,$.events.emit("hashChangeStart",r,ee),this.changeState(e,t,r,{...a,scroll:!1}),Z&&this.scrollToHash(et);try{await this.set(V,this.components[V.route],null)}catch(e){throw(0,l.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,et,ee),e}return $.events.emit("hashChangeComplete",r,ee),!0}let ea=(0,f.parseRelativeUrl)(t),{pathname:en,query:ei}=ea;try{[F,{__rewrites:W}]=await Promise.all([this.pageLoader.getPageList(),(0,o.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return z({url:r,router:this}),!1}this.urlIsNew(et)||er||(e="replaceState");let eo=r;en=en?(0,i.removeTrailingSlash)((0,x.removeBasePath)(en)):en;let es=(0,i.removeTrailingSlash)(en),el=r.startsWith("/")&&(0,f.parseRelativeUrl)(r).pathname;if(null==(u=this.components[en])?void 0:u.__appRouter)return z({url:r,router:this}),new Promise(()=>{});let eu=!!(el&&es!==el&&(!(0,p.isDynamicRoute)(es)||!(0,m.getRouteMatcher)((0,g.getRouteRegex)(es))(el))),ec=!a.shallow&&await I({asPath:r,locale:V.locale,router:this});if(G&&ec&&(Q=!1),Q&&"/_error"!==en&&(a._shouldResolveHref=!0,ea.pathname=H(en,F),ea.pathname===en||(en=ea.pathname,ea.pathname=(0,w.addBasePath)(en),ec||(t=(0,v.formatWithValidation)(ea)))),!(0,C.isLocalURL)(r))return z({url:r,router:this}),!1;eo=(0,b.removeLocale)((0,x.removeBasePath)(eo),V.locale),es=(0,i.removeTrailingSlash)(en);let eh=!1;if((0,p.isDynamicRoute)(es)){let e=(0,f.parseRelativeUrl)(eo),a=e.pathname,n=(0,g.getRouteRegex)(es);eh=(0,m.getRouteMatcher)(n)(a);let i=es===a,o=i?(0,L.interpolateAs)(es,a,ei):{};if(eh&&(!i||o.result))i?r=(0,v.formatWithValidation)(Object.assign({},e,{pathname:o.result,query:(0,T.omit)(ei,o.params)})):Object.assign(ei,eh);else{let e=Object.keys(n.groups).filter(e=>!ei[e]&&!n.groups[e].optional);if(e.length>0&&!ec)throw Error((i?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+a+") is incompatible with the `href` value ("+es+"). ")+"Read more: https://nextjs.org/docs/messages/"+(i?"href-interpolation-failed":"incompatible-href-as"))}}G||$.events.emit("routeChangeStart",r,ee);let ed="/404"===this.pathname||"/_error"===this.pathname;try{let i=await this.getRouteInfo({route:es,pathname:en,query:ei,as:r,resolvedAs:eo,routeProps:ee,locale:V.locale,isPreview:V.isPreview,hasMiddleware:ec,unstable_skipClientCache:a.unstable_skipClientCache,isQueryUpdating:G&&!this.isFallback,isMiddlewareRewrite:eu});if(G||a.shallow||await this._bfl(r,"resolvedAs"in i?i.resolvedAs:void 0,V.locale),"route"in i&&ec){es=en=i.route||es,ee.shallow||(ei=Object.assign({},i.query||{},ei));let e=(0,j.hasBasePath)(ea.pathname)?(0,x.removeBasePath)(ea.pathname):ea.pathname;if(eh&&en!==e&&Object.keys(eh).forEach(e=>{eh&&ei[e]===eh[e]&&delete ei[e]}),(0,p.isDynamicRoute)(en)){let e=!ee.shallow&&i.resolvedAs?i.resolvedAs:(0,w.addBasePath)((0,P.addLocale)(new URL(r,location.href).pathname,V.locale),!0);(0,j.hasBasePath)(e)&&(e=(0,x.removeBasePath)(e));{let t=(0,c.normalizeLocalePath)(e,this.locales);V.locale=t.detectedLocale||V.locale,e=t.pathname}let t=(0,g.getRouteRegex)(en),a=(0,m.getRouteMatcher)(t)(new URL(e,location.href).pathname);a&&Object.assign(ei,a)}}if("type"in i){if("redirect-internal"===i.type)return this.change(e,i.newUrl,i.newAs,a);return z({url:i.destination,router:this}),new Promise(()=>{})}let o=i.Component;if(o&&o.unstable_scriptLoader&&[].concat(o.unstable_scriptLoader()).forEach(e=>{(0,s.handleClientScriptLoad)(e.props)}),(i.__N_SSG||i.__N_SSP)&&i.props){if(i.props.pageProps&&i.props.pageProps.__N_REDIRECT){a.locale=!1;let t=i.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==i.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,f.parseRelativeUrl)(t);r.pathname=H(r.pathname,F);let{url:n,as:i}=D(this,t,t);return this.change(e,n,i,a)}return z({url:t,router:this}),new Promise(()=>{})}if(V.isPreview=!!i.props.__N_PREVIEW,i.props.notFound===U){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(i=await this.getRouteInfo({route:e,pathname:e,query:ei,as:r,resolvedAs:eo,routeProps:{shallow:!1},locale:V.locale,isPreview:V.isPreview,isNotFound:!0}),"type"in i)throw Error("Unexpected middleware effect on /404")}}G&&"/_error"===this.pathname&&(null==(E=self.__NEXT_DATA__.props)?void 0:null==(S=E.pageProps)?void 0:S.statusCode)===500&&(null==(R=i.props)?void 0:R.pageProps)&&(i.props.pageProps.statusCode=500);let u=a.shallow&&V.route===(null!=(A=i.route)?A:es),h=null!=(N=a.scroll)?N:!G&&!u,d=null!=n?n:h?{x:0,y:0}:null,v={...V,route:es,pathname:en,query:ei,asPath:et,isFallback:!1};if(G&&ed){if(i=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:ei,as:r,resolvedAs:eo,routeProps:{shallow:!1},locale:V.locale,isPreview:V.isPreview,isQueryUpdating:G&&!this.isFallback}),"type"in i)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(B=self.__NEXT_DATA__.props)?void 0:null==(k=B.pageProps)?void 0:k.statusCode)===500&&(null==(q=i.props)?void 0:q.pageProps)&&(i.props.pageProps.statusCode=500);try{await this.set(v,i,d)}catch(e){throw(0,l.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,et,ee),e}return!0}if($.events.emit("beforeHistoryChange",r,ee),this.changeState(e,t,r,a),!(G&&!d&&!X&&!er&&(0,O.compareRouterStates)(v,this.state))){try{await this.set(v,i,d)}catch(e){if(e.cancelled)i.error=i.error||e;else throw e}if(i.error)throw G||$.events.emit("routeChangeError",i.error,et,ee),i.error;V.locale&&(document.documentElement.lang=V.locale),G||$.events.emit("routeChangeComplete",r,ee),h&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,l.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,a){void 0===a&&(a={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=a.shallow,window.history[e]({url:t,as:r,options:a,__N:!0,key:this._key="pushState"!==e?this._key:W()},"",r))}async handleRouteInfoError(e,t,r,a,n,i){if(console.error(e),e.cancelled)throw e;if((0,o.isAssetError)(e)||i)throw $.events.emit("routeChangeError",e,a,n),z({url:a,router:this}),M();try{let a;let{page:n,styleSheets:i}=await this.fetchComponent("/_error"),o={props:a,Component:n,styleSheets:i,err:e,error:e};if(!o.props)try{o.props=await this.getInitialProps(n,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),o.props={}}return o}catch(e){return this.handleRouteInfoError((0,l.default)(e)?e:Error(e+""),t,r,a,n,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:a,as:n,resolvedAs:o,routeProps:s,locale:u,hasMiddleware:h,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:f,isMiddlewareRewrite:m,isNotFound:g}=e,y=t;try{var _,P,b,w;let e=this.components[y];if(s.shallow&&e&&this.route===y)return e;let t=G({route:y,router:this});h&&(e=void 0);let l=!e||"initial"in e?void 0:e,j={dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:r,query:a}),skipInterpolation:!0,asPath:g?"/404":o,locale:u}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:f?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:f},S=f&&!m?null:await B({fetchData:()=>F(j),asPath:g?"/404":o,locale:u,router:this}).catch(e=>{if(f)return null;throw e});if(S&&("/_error"===r||"/404"===r)&&(S.effect=void 0),f&&(S?S.json=self.__NEXT_DATA__.props:S={json:self.__NEXT_DATA__.props}),t(),(null==S?void 0:null==(_=S.effect)?void 0:_.type)==="redirect-internal"||(null==S?void 0:null==(P=S.effect)?void 0:P.type)==="redirect-external")return S.effect;if((null==S?void 0:null==(b=S.effect)?void 0:b.type)==="rewrite"){let t=(0,i.removeTrailingSlash)(S.effect.resolvedHref),n=await this.pageLoader.getPageList();if((!f||n.includes(t))&&(y=t,r=S.effect.resolvedHref,a={...a,...S.effect.parsedAs.query},o=(0,x.removeBasePath)((0,c.normalizeLocalePath)(S.effect.parsedAs.pathname,this.locales).pathname),e=this.components[y],s.shallow&&e&&this.route===y&&!h))return{...e,route:y}}if((0,E.isAPIRoute)(y))return z({url:n,router:this}),new Promise(()=>{});let R=l||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),A=null==S?void 0:null==(w=S.response)?void 0:w.headers.get("x-middleware-skip"),O=R.__N_SSG||R.__N_SSP;A&&(null==S?void 0:S.dataHref)&&delete this.sdc[S.dataHref];let{props:C,cacheKey:T}=await this._getData(async()=>{if(O){if((null==S?void 0:S.json)&&!A)return{cacheKey:S.cacheKey,props:S.json};let e=(null==S?void 0:S.dataHref)?S.dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:r,query:a}),asPath:o,locale:u}),t=await F({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:A?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(R.Component,{pathname:r,query:a,asPath:n,locale:u,locales:this.locales,defaultLocale:this.defaultLocale})}});return R.__N_SSP&&j.dataHref&&T&&delete this.sdc[T],this.isPreview||!R.__N_SSG||f||F(Object.assign({},j,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),C.pageProps=Object.assign({},C.pageProps),R.props=C,R.route=y,R.query=a,R.resolvedAs=o,this.components[y]=R,R}catch(e){return this.handleRouteInfoError((0,l.getProperError)(e),r,a,n,s)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[a,n]=e.split("#",2);return!!n&&t===a&&r===n||t===a&&r!==n}scrollToHash(e){let[,t=""]=e.split("#",2);(0,N.handleSmoothScroll)(()=>{if(""===t||"top"===t){window.scrollTo(0,0);return}let e=decodeURIComponent(t),r=document.getElementById(e);if(r){r.scrollIntoView();return}let a=document.getElementsByName(e)[0];a&&a.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){void 0===t&&(t=e),void 0===r&&(r={});let a=(0,f.parseRelativeUrl)(e),n=a.pathname,{pathname:o,query:s}=a,l=o;if(!1===r.locale){o=(0,c.normalizeLocalePath)(o,this.locales).pathname,a.pathname=o,e=(0,v.formatWithValidation)(a);let n=(0,f.parseRelativeUrl)(t),i=(0,c.normalizeLocalePath)(n.pathname,this.locales);n.pathname=i.pathname,r.locale=i.detectedLocale||this.defaultLocale,t=(0,v.formatWithValidation)(n)}let u=await this.pageLoader.getPageList(),h=t,d=void 0!==r.locale?r.locale||void 0:this.locale,y=await I({asPath:t,locale:d,router:this});a.pathname=H(a.pathname,u),(0,p.isDynamicRoute)(a.pathname)&&(o=a.pathname,a.pathname=o,Object.assign(s,(0,m.getRouteMatcher)((0,g.getRouteRegex)(a.pathname))((0,_.parsePath)(t).pathname)||{}),y||(e=(0,v.formatWithValidation)(a)));let P=await B({fetchData:()=>F({dataHref:this.pageLoader.getDataHref({href:(0,v.formatWithValidation)({pathname:l,query:s}),skipInterpolation:!0,asPath:h,locale:d}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:d,router:this});if((null==P?void 0:P.effect.type)==="rewrite"&&(a.pathname=P.effect.resolvedHref,o=P.effect.resolvedHref,s={...s,...P.effect.parsedAs.query},h=P.effect.parsedAs.pathname,e=(0,v.formatWithValidation)(a)),(null==P?void 0:P.effect.type)==="redirect-external")return;let b=(0,i.removeTrailingSlash)(o);await this._bfl(t,h,r.locale,!0)&&(this.components[n]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(b).then(t=>!!t&&F({dataHref:(null==P?void 0:P.json)?null==P?void 0:P.dataHref:this.pageLoader.getDataHref({href:e,asPath:h,locale:d}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](b)])}async fetchComponent(e){let t=G({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return F({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],a=this._wrapApp(r);return t.AppTree=a,(0,d.loadGetInitialProps)(r,{AppTree:a,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,a,{initialProps:n,pageLoader:o,App:s,wrapApp:l,Component:u,err:c,subscription:h,isFallback:m,locale:g,locales:_,defaultLocale:P,domainLocales:b,isPreview:x}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=W(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let a=e.state;if(!a){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,v.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),(0,d.getURL)());return}if(a.__NA){window.location.reload();return}if(!a.__N||r&&this.locale===a.options.locale&&a.as===this.asPath)return;let{url:n,as:i,options:o,key:s}=a;this._key=s;let{pathname:l}=(0,f.parseRelativeUrl)(n);(!this.isSsr||i!==(0,w.addBasePath)(this.asPath)||l!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(a))&&this.change("replaceState",n,i,Object.assign({},o,{shallow:o.shallow&&this._shallow,locale:o.locale||this.defaultLocale,_h:0}),t)};let j=(0,i.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[j]={Component:u,initial:!0,props:n,err:c,__N_SSG:n&&n.__N_SSG,__N_SSP:n&&n.__N_SSP}),this.components["/_app"]={Component:s,styleSheets:[]};{let{BloomFilter:e}=r(7845),t={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]},a={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==a?void 0:a.numHashes)&&(this._bfl_d=new e(a.numItems,a.errorRate),this._bfl_d.import(a))}this.events=$.events,this.pageLoader=o;let S=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.basePath="",this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!S&&!self.location.search),this.locales=_,this.defaultLocale=P,this.domainLocales=b,this.isLocaleDomain=!!(0,y.detectDomainLocale)(b,self.location.hostname),this.state={route:j,pathname:e,query:t,asPath:S?e:a,isPreview:!!x,locale:g,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1)}}$.events=(0,h.default)()},5961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return n}});let a=r(3943);function n(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=(0,a.parsePath)(e);return""+r+t+n+i}},5299:(e,t)=>{"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let a=r.length;a--;){let n=r[a];if("query"===n){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let a=r.length;a--;){let n=r[a];if(!t.query.hasOwnProperty(n)||e.query[n]!==t.query[n])return!1}}else if(!t.hasOwnProperty(n)||e[n]!==t[n])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},4569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});let a=r(8323),n=r(3902),i=r(5961),o=r(8360);function s(e){let t=(0,o.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,a.removeTrailingSlash)(t)),e.buildId&&(t=(0,i.addPathSuffix)((0,n.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,n.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,i.addPathSuffix)(t,"/"):(0,a.removeTrailingSlash)(t)}},386:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},1724:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});let a=r(3197),n=r(5597),i=r(8822);function o(e,t){var r,o;let{basePath:s,i18n:l,trailingSlash:u}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):u};s&&(0,i.pathHasPrefix)(c.pathname,s)&&(c.pathname=(0,n.removePathPrefix)(c.pathname,s),c.basePath=s);let h=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];c.buildId=r,h="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=h)}if(l){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,a.normalizeLocalePath)(c.pathname,l.locales);c.locale=e.detectedLocale,c.pathname=null!=(o=e.pathname)?o:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(h):(0,a.normalizeLocalePath)(h,l.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},2345:(e,t)=>{"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,a=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=a}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},9563:(e,t)=>{"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},2364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return n}}),r(9974);let a=r(1202);function n(e,t){let r=new URL("http://n"),n=t?new URL(t,r):e.startsWith(".")?new URL("http://n"):r,{pathname:i,searchParams:o,search:s,hash:l,href:u,origin:c}=new URL(e,n);if(c!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,a.searchParamsToUrlQuery)(o),search:s,hash:l,href:u.slice(r.origin.length)}}},6831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseUrl",{enumerable:!0,get:function(){return i}});let a=r(1202),n=r(2364);function i(e){if(e.startsWith("/"))return(0,n.parseRelativeUrl)(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:(0,a.searchParamsToUrlQuery)(t.searchParams),search:t.search}}},3001:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPathMatch",{enumerable:!0,get:function(){return n}});let a=r(945);function n(e,t){let r=[],n=(0,a.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof(null==t?void 0:t.sensitive)&&t.sensitive,strict:null==t?void 0:t.strict}),i=(0,a.regexpToFunction)((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,a)=>{if("string"!=typeof e)return!1;let n=i(e);if(!n)return!1;if(null==t?void 0:t.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete n.params[e.name];return{...a,...n.params}}}},3851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{compileNonPath:function(){return h},matchHas:function(){return c},prepareDestination:function(){return d}});let a=r(945),n=r(8328),i=r(6831),o=r(8791),s=r(1369),l=r(8973);function u(e){return e.replace(/__ESC_COLON_/gi,":")}function c(e,t,r,a){void 0===r&&(r=[]),void 0===a&&(a=[]);let n={},i=r=>{let a;let i=r.key;switch(r.type){case"header":i=i.toLowerCase(),a=e.headers[i];break;case"cookie":a="cookies"in e?e.cookies[r.key]:(0,l.getCookieParser)(e.headers)()[r.key];break;case"query":a=t[i];break;case"host":{let{host:t}=(null==e?void 0:e.headers)||{};a=null==t?void 0:t.split(":",1)[0].toLowerCase()}}if(!r.value&&a)return n[function(e){let t="";for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);(a>64&&a<91||a>96&&a<123)&&(t+=e[r])}return t}(i)]=a,!0;if(a){let e=RegExp("^"+r.value+"$"),t=Array.isArray(a)?a.slice(-1)[0].match(e):a.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{n[e]=t.groups[e]}):"host"===r.type&&t[0]&&(n.host=t[0])),!0}return!1};return!!r.every(e=>i(e))&&!a.some(e=>i(e))&&n}function h(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(":"+r)&&(e=e.replace(RegExp(":"+r+"\\*","g"),":"+r+"--ESCAPED_PARAM_ASTERISKS").replace(RegExp(":"+r+"\\?","g"),":"+r+"--ESCAPED_PARAM_QUESTION").replace(RegExp(":"+r+"\\+","g"),":"+r+"--ESCAPED_PARAM_PLUS").replace(RegExp(":"+r+"(?!\\w)","g"),"--ESCAPED_PARAM_COLON"+r));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),(0,a.compile)("/"+e,{validate:!1})(t).slice(1)}function d(e){let t;let r=Object.assign({},e.query);delete r.__nextLocale,delete r.__nextDefaultLocale,delete r.__nextDataReq,delete r.__nextInferredLocaleFromDefault,delete r[s.NEXT_RSC_UNION_QUERY];let l=e.destination;for(let t of Object.keys({...e.params,...r}))l=l.replace(RegExp(":"+(0,n.escapeStringRegexp)(t),"g"),"__ESC_COLON_"+t);let c=(0,i.parseUrl)(l),d=c.query,p=u(""+c.pathname+(c.hash||"")),f=u(c.hostname||""),m=[],g=[];(0,a.pathToRegexp)(p,m),(0,a.pathToRegexp)(f,g);let v=[];m.forEach(e=>v.push(e.name)),g.forEach(e=>v.push(e.name));let y=(0,a.compile)(p,{validate:!1}),_=(0,a.compile)(f,{validate:!1});for(let[t,r]of Object.entries(d))Array.isArray(r)?d[t]=r.map(t=>h(u(t),e.params)):"string"==typeof r&&(d[t]=h(u(r),e.params));let P=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!P.some(e=>v.includes(e)))for(let t of P)t in d||(d[t]=e.params[t]);if((0,o.isInterceptionRouteAppPath)(p))for(let t of p.split("/")){let r=o.INTERCEPTION_ROUTE_MARKERS.find(e=>t.startsWith(e));if(r){e.params["0"]=r;break}}try{let[r,a]=(t=y(e.params)).split("#",2);c.hostname=_(e.params),c.pathname=r,c.hash=(a?"#":"")+(a||""),delete c.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return c.query={...r,...c.query},{newUrl:t,destQuery:d,parsedDestination:c}}},5597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return n}});let a=r(8822);function n(e,t){if(!(0,a.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},7810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let a=r(3001),n=r(3851),i=r(8323),o=r(3197),s=r(2305),l=r(2364);function u(e,t,r,u,c,h){let d,p=!1,f=!1,m=(0,l.parseRelativeUrl)(e),g=(0,i.removeTrailingSlash)((0,o.normalizeLocalePath)((0,s.removeBasePath)(m.pathname),h).pathname),v=r=>{let l=(0,a.getPathMatch)(r.source+"",{removeUnnamedParams:!0,strict:!0})(m.pathname);if((r.has||r.missing)&&l){let e=(0,n.matchHas)({headers:{host:document.location.hostname,"user-agent":navigator.userAgent},cookies:document.cookie.split("; ").reduce((e,t)=>{let[r,...a]=t.split("=");return e[r]=a.join("="),e},{})},m.query,r.has,r.missing);e?Object.assign(l,e):l=!1}if(l){if(!r.destination)return f=!0,!0;let a=(0,n.prepareDestination)({appendParamsToQuery:!0,destination:r.destination,params:l,query:u});if(m=a.parsedDestination,e=a.newUrl,Object.assign(u,a.parsedDestination.query),g=(0,i.removeTrailingSlash)((0,o.normalizeLocalePath)((0,s.removeBasePath)(e),h).pathname),t.includes(g))return p=!0,d=g,!0;if((d=c(g))!==e&&t.includes(d))return p=!0,!0}},y=!1;for(let e=0;e<r.beforeFiles.length;e++)v(r.beforeFiles[e]);if(!(p=t.includes(g))){if(!y){for(let e=0;e<r.afterFiles.length;e++)if(v(r.afterFiles[e])){y=!0;break}}if(y||(d=c(g),y=p=t.includes(d)),!y){for(let e=0;e<r.fallback.length;e++)if(v(r.fallback[e])){y=!0;break}}}return{asPath:e,parsedAs:m,matchedPage:p,resolvedHref:d,externalDest:f}}},3693:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{_:()=>s});var n=r(997),i=r(9128),o=e([i]);function s({children:e}){let{data:t,isLoading:r}=i.h.core.templateCheck.useQuery({relTemplatePath:"test.txt"});return n.jsx(n.Fragment,{children:e})}i=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},6848:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{Z:()=>s});var n=r(997),i=r(1461),o=e([i]);function s({children:e}){return(0,n.jsxs)("div",{className:"grid grid-cols-12",children:[n.jsx("div",{className:"col-span-2",children:n.jsx(i.Y,{})}),n.jsx("div",{className:"col-span-10",children:e})]})}i=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},1461:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{Y:()=>d});var n=r(997),i=r(6593),o=r(9357),s=r(6370),l=r.n(s),u=r(9128),c=r(6689),h=e([i,u]);function d(){let{data:e}=u.h.core.pdfTemplates.useQuery();return(0,n.jsxs)("div",{className:"h-full min-h-screen border-r p-4 relative",children:[n.jsx(l(),{href:"/",children:n.jsx("h1",{className:"text-2xl font-bold",children:"rePDF"})}),(0,n.jsxs)("div",{className:"mt-5 flex flex-col gap-2",children:[e&&(0,n.jsxs)(n.Fragment,{children:[e.topLevel.map(e=>n.jsx(l(),{href:`/preview/${e.relTemplatePath}`,className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName)),e.subFolders.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[n.jsx(o.Z,{className:"w-4 h-4"}),n.jsx("p",{className:"",children:e.name})]}),n.jsx("ul",{children:e.pdfTemplates.map(e=>n.jsx(l(),{href:`/preview/${e.relTemplatePath}`,className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName))})]},e.name))]}),n.jsx("div",{className:"fixed bottom-4 left-0 p-4 text-sm",children:n.jsx(p,{})})]})]})}function p(){let e=u.h.useUtils(),[t,r]=(0,c.useState)(null),{data:a}=u.h.watcher.heartbeat.useSubscription(void 0,{onData:e=>{r(e.timestamp)}}),{data:o}=u.h.watcher.fileChange.useSubscription(void 0,{onData:t=>{e.core.invalidate()}});return n.jsx("div",{className:(0,i.default)("text-xs rounded-lg bg-gray-300 p-2 bg-opacity-30",{"bg-gray-500":!t,"bg-green-500":!!t}),children:"Live Preview"})}[i,u]=h.then?(await h)():h,a()}catch(e){a(e)}})},2545:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{A:()=>l});var n=r(997),i=r(7096),o=r(9128),s=e([o]);function l({relTemplatePath:e}){let{data:t,isLoading:r}=o.h.core.fileContents.useQuery({relTemplatePath:e});return r?n.jsx("div",{children:"Loading..."}):t?n.jsx("div",{children:n.jsx(i.Highlight,{theme:i.themes.shadesOfPurple,code:t,language:"tsx",children:({className:e,style:t,tokens:r,getLineProps:a,getTokenProps:i})=>n.jsx("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:"100%"},children:r.map((e,t)=>(0,n.jsxs)("div",{...a({line:e}),style:{display:"flex"},children:[n.jsx("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:t+1}),n.jsx("span",{style:{flex:1,overflow:"hidden"},children:e.map((e,t)=>n.jsx("span",{...i({token:e}),style:{...i({token:e}).style,wordBreak:"break-all",whiteSpace:"pre-wrap"}},t))})]},t))})})}):n.jsx("div",{children:"Error"})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},3400:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{I:()=>l});var n=r(997),i=r(6689),o=r(9128),s=e([o]);function l({relTemplatePath:e,previewPropGroup:t}){let{data:r}=o.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[a,s]=(0,i.useState)(!0),[l,u]=(0,i.useState)(`/api/component?relativeTemplatePath=${e}&previewPropGroup=${t??""}`);return(0,n.jsxs)("div",{className:"relative h-full w-full",children:[a&&n.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:n.jsx("p",{children:"Rendering Component..."})}),l&&n.jsx("iframe",{src:l,className:"h-full w-full border-none",onLoad:()=>s(!1)})]})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},9682:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{u:()=>l});var n=r(997),i=r(7096),o=r(9128),s=e([o]);function l({relTemplatePath:e}){let{data:t,isLoading:r}=o.h.core.renderedHtml.useQuery({relTemplatePath:e});return r?n.jsx("div",{children:"Loading..."}):t?n.jsx("div",{children:n.jsx(i.Highlight,{theme:i.themes.shadesOfPurple,code:t,language:"tsx",children:({className:e,style:t,tokens:r,getLineProps:a,getTokenProps:i})=>n.jsx("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:r.map((e,t)=>(0,n.jsxs)("div",{...a({line:e}),style:{display:"flex"},children:[n.jsx("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:t+1}),n.jsx("span",{children:e.map((e,t)=>n.jsx("span",{...i({token:e})},t))})]},t))})})}):n.jsx("div",{children:"Error"})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},9125:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{I:()=>l});var n=r(997),i=r(6689),o=r(9128),s=e([o]);function l({relTemplatePath:e,previewPropGroup:t}){let{data:r}=o.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[a,s]=(0,i.useState)(!0),[l,u]=(0,i.useState)(`/api/pdf?relativeTemplatePath=${e}&previewPropGroup=${t??""}`);return(0,n.jsxs)("div",{className:"relative h-full w-full",children:[a&&n.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:n.jsx("p",{children:"Rendering PDF..."})}),n.jsx("iframe",{src:l,width:"100%",height:"100%",title:"PDF Preview",onLoad:()=>s(!1)},r)]})}o=(s.then?(await s)():s)[0],a()}catch(e){a(e)}})},8417:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>c});var n=r(997),i=r(9063),o=r(9128),s=r(6201);r(7531);var l=r(6848),u=e([i,o,s,l]);[i,o,s,l]=u.then?(await u)():u;let c=o.h.withTRPC(({Component:e,pageProps:t})=>(0,n.jsxs)(n.Fragment,{children:[n.jsx(l.Z,{children:n.jsx(e,{...t})}),n.jsx(s.Toaster,{}),n.jsx(i.ReactQueryDevtools,{initialIsOpen:!1})]}));a()}catch(e){a(e)}})},5652:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var a=r(997),n=r(5239);function i(){return(0,a.jsxs)(n.Html,{lang:"en",children:[(0,a.jsxs)(n.Head,{children:[a.jsx("link",{rel:"icon",href:"/favicon.ico",sizes:"any"}),a.jsx("link",{rel:"icon",href:"/favicon-16x16.png",type:"image/png",sizes:"16x16"}),a.jsx("link",{rel:"icon",href:"/favicon-32x32.png",type:"image/png",sizes:"32x32"})]}),(0,a.jsxs)("body",{children:[a.jsx(n.Main,{}),a.jsx(n.NextScript,{})]})]})}},5463:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>v,getServerSideProps:()=>y});var n=r(997),i=r(6593),o=r(968),s=r.n(o),l=r(6226);r(6689);var u=r(3693),c=r(2545),h=r(3400),d=r(9682),p=r(9125),f=r(9128),m=e([i,u,c,h,d,p,f]);function g({relTemplatePath:e}){let t=(0,l.useRouter)(),{data:r}=f.h.core.templateDetails.useQuery({relTemplatePath:e}),a=t.query.previewPropGroup?parseInt(t.query.previewPropGroup,10):void 0;return r&&0!==r.previewPropChoices.length?n.jsx(n.Fragment,{children:n.jsx("select",{className:"rounded-md border border-gray-300 p-2",onChange:e=>{let r=parseInt(e.target.value);t.push({query:{...t.query,previewPropGroup:r}})},value:a,children:r.previewPropChoices.map((e,t)=>(0,n.jsxs)("option",{value:t,children:["Prop Group ",t+1]},t))})}):null}function v({templateName:e,relTemplatePath:t}){let r=(0,l.useRouter)(),a=r.query.view,o=e=>{r.push({query:{...r.query,view:e}})};return(0,n.jsxs)(n.Fragment,{children:[n.jsx(s(),{children:n.jsx("title",{children:"Preview PDF - rePDF"})}),(0,n.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between bg-gray-200 p-4",children:[(0,n.jsxs)("div",{children:[n.jsx("p",{children:e}),n.jsx("p",{className:"text-sm text-gray-500",children:e!==t?t:""})]}),n.jsx("div",{children:n.jsx(g,{relTemplatePath:t})}),n.jsx("div",{children:(0,n.jsxs)("ul",{className:"flex",children:[n.jsx("li",{className:(0,i.default)("rounded-l bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","code"===a&&"bg-gray-400 text-white"),onClick:()=>o("code"),children:"Code"}),n.jsx("li",{className:(0,i.default)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","component"===a&&"bg-gray-400 text-white"),onClick:()=>o("component"),children:"Component"}),n.jsx("li",{className:(0,i.default)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","pdf"===a&&"bg-gray-400 text-white"),onClick:()=>o("pdf"),children:"PDF"}),n.jsx("li",{className:(0,i.default)("rounded-r bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","html"===a&&"bg-gray-400 text-white"),onClick:()=>o("html"),children:"HTML"})]})})]}),n.jsx("div",{className:"flex-grow",children:(0,n.jsxs)(u._,{children:["code"===a&&n.jsx(c.A,{relTemplatePath:t}),(null===a||"component"===a)&&n.jsx(h.I,{relTemplatePath:t,previewPropGroup:r.query.previewPropGroup}),"html"===a&&n.jsx(d.u,{relTemplatePath:t}),"pdf"===a&&n.jsx(p.I,{relTemplatePath:t,previewPropGroup:r.query.previewPropGroup})]})})]})]})}[i,u,c,h,d,p,f]=m.then?(await m)():m;let y=async e=>{let{view:t,relTemplatePath:r}=e.query,a=Array.isArray(r)?r.join("/"):r,n=Array.isArray(r)?r[r.length-1]:r;if(!a||!n)throw Error("using template path server side without template path");return{props:{view:(Array.isArray(t)?t[0]:t)??null,templateName:n,relTemplatePath:a}}};a()}catch(e){a(e)}})},9128:(e,t,r)=>{"use strict";r.a(e,async(e,a)=>{try{r.d(t,{h:()=>u});var n=r(272),i=r(7455),o=r(3020),s=e([n,i,o]);[n,i,o]=s.then?(await s)():s;let l=()=>`http://localhost:${process.env.PORT??3e3}`,u=(0,i.createTRPCNext)({config:()=>({links:[(0,n.loggerLink)({enabled:e=>"down"===e.direction&&e.result instanceof Error}),(0,n.splitLink)({condition:e=>"subscription"===e.type,true:(0,n.unstable_httpSubscriptionLink)({url:`${l()}/api/trpc`,transformer:o.default}),false:(0,n.httpBatchLink)({transformer:o.default,url:`${l()}/api/trpc`})})]}),ssr:!1,transformer:o.default});a()}catch(e){a(e)}})},2046:e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var n={},i=t.split(a),o=(r||{}).decode||e,s=0;s<i.length;s++){var l=i[s],u=l.indexOf("=");if(!(u<0)){var c=l.substr(0,u).trim(),h=l.substr(++u,l.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),void 0==n[c]&&(n[c]=function(e,t){try{return t(e)}catch(t){return e}}(h,o))}}return n},t.serialize=function(e,t,a){var i=a||{},o=i.encode||r;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!n.test(e))throw TypeError("argument name is invalid");var s=o(t);if(s&&!n.test(s))throw TypeError("argument val is invalid");var l=e+"="+s;if(null!=i.maxAge){var u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(i.domain){if(!n.test(i.domain))throw TypeError("option domain is invalid");l+="; Domain="+i.domain}if(i.path){if(!n.test(i.path))throw TypeError("option path is invalid");l+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(l+="; HttpOnly"),i.secure&&(l+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,a=/; */,n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},1527:(e,t,r)=>{(()=>{var t={154:(e,t,r)=>{var a=r(781),n=["write","end","destroy"],i=["resume","pause"],o=["data","close"],s=Array.prototype.slice;function l(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r)}e.exports=function(e,t){var r=new a,u=!1;return l(n,function(t){r[t]=function(){return e[t].apply(e,arguments)}}),l(i,function(e){r[e]=function(){r.emit(e);var a=t[e];if(a)return a.apply(t,arguments);t.emit(e)}}),l(o,function(e){t.on(e,function(){var t=s.call(arguments);t.unshift(e),r.emit.apply(r,t)})}),t.on("end",function(){if(!u){u=!0;var e=s.call(arguments);e.unshift("end"),r.emit.apply(r,e)}}),e.on("drain",function(){r.emit("drain")}),e.on("error",c),t.on("error",c),r.writable=e.writable,r.readable=t.readable,r;function c(e){r.emit("error",e)}}},349:(e,t,r)=>{"use strict";let a=r(147),n=r(781),i=r(796),o=r(154),s=r(530),l=e=>Object.assign({level:9},e);e.exports=(e,t)=>e?s(i.gzip)(e,l(t)).then(e=>e.length).catch(e=>0):Promise.resolve(0),e.exports.sync=(e,t)=>i.gzipSync(e,l(t)).length,e.exports.stream=e=>{let t=new n.PassThrough,r=new n.PassThrough,a=o(t,r),s=0,u=i.createGzip(l(e)).on("data",e=>{s+=e.length}).on("error",()=>{a.gzipSize=0}).on("end",()=>{a.gzipSize=s,a.emit("gzip-size",s),r.end()});return t.pipe(u),t.pipe(r,{end:!1}),a},e.exports.file=(t,r)=>new Promise((n,i)=>{let o=a.createReadStream(t);o.on("error",i);let s=o.pipe(e.exports.stream(r));s.on("error",i),s.on("gzip-size",n)}),e.exports.fileSync=(t,r)=>e.exports.sync(a.readFileSync(t),r)},530:e=>{"use strict";let t=(e,t)=>function(...r){return new t.promiseModule((a,n)=>{t.multiArgs?r.push((...e)=>{t.errorFirst?e[0]?n(e):(e.shift(),a(e)):a(e)}):t.errorFirst?r.push((e,t)=>{e?n(e):a(t)}):r.push(a),e.apply(this,r)})};e.exports=(e,r)=>{let a;r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);let n=typeof e;if(!(null!==e&&("object"===n||"function"===n)))throw TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":n}\``);let i=e=>{let t=t=>"string"==typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};for(let o in a="function"===n?function(...a){return r.excludeMain?e(...a):t(e,r).apply(this,a)}:Object.create(Object.getPrototypeOf(e)),e){let n=e[o];a[o]="function"==typeof n&&i(o)?t(n,r):n}return a}},147:e=>{"use strict";e.exports=r(2048)},781:e=>{"use strict";e.exports=r(6162)},796:e=>{"use strict";e.exports=r(1568)}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var i=a[e]={exports:{}},o=!0;try{t[e](i,i.exports,n),o=!1}finally{o&&delete a[e]}return i.exports}n.ab=__dirname+"/";var i=n(349);e.exports=i})()},7531:()=>{},945:(e,t)=>{"use strict";function r(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var a=e[r];if("*"===a||"+"===a||"?"===a){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===a){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===a){t.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===a){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===a){for(var n="",i=r+1;i<e.length;){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){n+=e[i++];continue}break}if(!n)throw TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:n}),r=i;continue}if("("===a){var s=1,l="",i=r+1;if("?"===e[i])throw TypeError('Pattern cannot start with "?" at '+i);for(;i<e.length;){if("\\"===e[i]){l+=e[i++]+e[i++];continue}if(")"===e[i]){if(0==--s){i++;break}}else if("("===e[i]&&(s++,"?"!==e[i+1]))throw TypeError("Capturing groups are not allowed at "+i);l+=e[i++]}if(s)throw TypeError("Unbalanced pattern at "+r);if(!l)throw TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:l}),r=i;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),a=t.prefixes,n=void 0===a?"./":a,o="[^"+i(t.delimiter||"/#?")+"]+?",s=[],l=0,u=0,c="",h=function(e){if(u<r.length&&r[u].type===e)return r[u++].value},d=function(e){var t=h(e);if(void 0!==t)return t;var a=r[u];throw TypeError("Unexpected "+a.type+" at "+a.index+", expected "+e)},p=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};u<r.length;){var f=h("CHAR"),m=h("NAME"),g=h("PATTERN");if(m||g){var v=f||"";-1===n.indexOf(v)&&(c+=v,v=""),c&&(s.push(c),c=""),s.push({name:m||l++,prefix:v,suffix:"",pattern:g||o,modifier:h("MODIFIER")||""});continue}var y=f||h("ESCAPED_CHAR");if(y){c+=y;continue}if(c&&(s.push(c),c=""),h("OPEN")){var v=p(),_=h("NAME")||"",P=h("PATTERN")||"",b=p();d("CLOSE"),s.push({name:_||(P?l++:""),pattern:_&&!P?o:P,prefix:v,suffix:b,modifier:h("MODIFIER")||""});continue}d("END")}return s}function a(e,t){void 0===t&&(t={});var r=o(t),a=t.encode,n=void 0===a?function(e){return e}:a,i=t.validate,s=void 0===i||i,l=e.map(function(e){if("object"==typeof e)return RegExp("^(?:"+e.pattern+")$",r)});return function(t){for(var r="",a=0;a<e.length;a++){var i=e[a];if("string"==typeof i){r+=i;continue}var o=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(o)){if(!c)throw TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===o.length){if(u)continue;throw TypeError('Expected "'+i.name+'" to not be empty')}for(var h=0;h<o.length;h++){var d=n(o[h],i);if(s&&!l[a].test(d))throw TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+d+'"');r+=i.prefix+d+i.suffix}continue}if("string"==typeof o||"number"==typeof o){var d=n(String(o),i);if(s&&!l[a].test(d))throw TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+d+'"');r+=i.prefix+d+i.suffix;continue}if(!u){var p=c?"an array":"a string";throw TypeError('Expected "'+i.name+'" to be '+p)}}return r}}function n(e,t,r){void 0===r&&(r={});var a=r.decode,n=void 0===a?function(e){return e}:a;return function(r){var a=e.exec(r);if(!a)return!1;for(var i=a[0],o=a.index,s=Object.create(null),l=1;l<a.length;l++)!function(e){if(void 0!==a[e]){var r=t[e-1];"*"===r.modifier||"+"===r.modifier?s[r.name]=a[e].split(r.prefix+r.suffix).map(function(e){return n(e,r)}):s[r.name]=n(a[e],r)}}(l);return{path:i,index:o,params:s}}}function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function s(e,t,r){void 0===r&&(r={});for(var a=r.strict,n=void 0!==a&&a,s=r.start,l=r.end,u=r.encode,c=void 0===u?function(e){return e}:u,h="["+i(r.endsWith||"")+"]|$",d="["+i(r.delimiter||"/#?")+"]",p=void 0===s||s?"^":"",f=0;f<e.length;f++){var m=e[f];if("string"==typeof m)p+=i(c(m));else{var g=i(c(m.prefix)),v=i(c(m.suffix));if(m.pattern){if(t&&t.push(m),g||v){if("+"===m.modifier||"*"===m.modifier){var y="*"===m.modifier?"?":"";p+="(?:"+g+"((?:"+m.pattern+")(?:"+v+g+"(?:"+m.pattern+"))*)"+v+")"+y}else p+="(?:"+g+"("+m.pattern+")"+v+")"+m.modifier}else p+="("+m.pattern+")"+m.modifier}else p+="(?:"+g+v+")"+m.modifier}}if(void 0===l||l)n||(p+=d+"?"),p+=r.endsWith?"(?="+h+")":"$";else{var _=e[e.length-1],P="string"==typeof _?d.indexOf(_[_.length-1])>-1:void 0===_;n||(p+="(?:"+d+"(?="+h+"))?"),P||(p+="(?="+d+"|"+h+")")}return new RegExp(p,o(r))}function l(e,t,a){return e instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var a=0;a<r.length;a++)t.push({name:a,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?RegExp("(?:"+e.map(function(e){return l(e,t,a).source}).join("|")+")",o(a)):s(r(e,a),t,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=r,t.compile=function(e,t){return a(r(e,t),t)},t.tokensToFunction=a,t.match=function(e,t){var r=[];return n(l(e,r,t),r,t)},t.regexpToFunction=n,t.tokensToRegexp=s,t.pathToRegexp=l},5366:(e,t)=>{"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},8973:(e,t,r)=>{"use strict";function a(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:a}=r(2046);return a(Array.isArray(t)?t.join("; "):t)}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getCookieParser",{enumerable:!0,get:function(){return a}})},4058:(e,t)=>{"use strict";var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1031:(e,t,r)=>{"use strict";e.exports=r(83).vendored.contexts.HeadManagerContext},6226:(e,t,r)=>{e.exports=r(5724)},2785:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{"use strict";e.exports=require("next/head")},7096:e=>{"use strict";e.exports=require("prism-react-renderer")},6689:e=>{"use strict";e.exports=require("react")},6405:e=>{"use strict";e.exports=require("react-dom")},997:e=>{"use strict";e.exports=require("react/jsx-runtime")},2048:e=>{"use strict";e.exports=require("fs")},5315:e=>{"use strict";e.exports=require("path")},6162:e=>{"use strict";e.exports=require("stream")},1568:e=>{"use strict";e.exports=require("zlib")},9063:e=>{"use strict";e.exports=import("@tanstack/react-query-devtools")},272:e=>{"use strict";e.exports=import("@trpc/client")},7455:e=>{"use strict";e.exports=import("@trpc/next")},6593:e=>{"use strict";e.exports=import("clsx")},6201:e=>{"use strict";e.exports=import("react-hot-toast")},3020:e=>{"use strict";e.exports=import("superjson")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[865,239,204],()=>r(1185));module.exports=a})();
|