diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index e37fd15..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: deploy -on: - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 12.x - uses: actions/setup-node@v2 - with: - node-version: '12.x' - registry-url: 'https://registry.npmjs.org' - - - name: build - run: | - yarn - yarn build - env: - NEXT_PUBLIC_FUNCTION_URL: ${{ secrets.NEXT_PUBLIC_FUNCTION_URL }} - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - branch: gh-pages # The branch the action should deploy to. - folder: out # The folder the action should deploy. diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e553e1f..0000000 --- a/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -*.swp - -**/target -**/pkg -pages/api diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ + diff --git a/404.html b/404.html new file mode 100644 index 0000000..2320b48 --- /dev/null +++ b/404.html @@ -0,0 +1 @@ +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 07c86b3..0000000 --- a/README.md +++ /dev/null @@ -1,126 +0,0 @@ -## [Demo for image processing](https://second-state.github.io/aws-lambda-wasm-runtime/) | [Demo for tensorflow](https://robnanarivo.github.io/aws-lambda-wasm-runtime/) - -This project is aimed to demonstrate how to implement a Serverless Functions working with WebAssembly in AWS Lambda, using our [WasmEdge runtime](https://github.com/WasmEdge/WasmEdge). Docker is also required for this demo. - -![](docs/images/service_arch.png) - -The [main branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/main) showcases an image processing function, and the [tensorflow branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/tensorflow) showcases an AI inference function. Both written in simple Rust and runs in the [WasmEdge runtime](https://github.com/WasmEdge/WasmEdge) for WebAssembly. - -## Function Overview - -The Serverless Functions endpoint is located at [api/hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/hello.js) to meet the requirement of AWS Lambda. AWS Lambda requires a [function handler](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html) as the entry point for various events. - -The only function in [api/hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/hello.js) is `grayscale`, which transforms a colored image into a grayscale image. It receives a PNG file and pass it as STDIN stream to a spawned child process. The child process runs using the [WasmEdge](https://github.com/WasmEdge/WasmEdge) command. - -File `api/functions/image-grayscale/src/main.rs` implements the grayscaling logic. You can build it with the Rust `cargo` command with the `-target wasm32-wasi` option to get the [grayscale.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/grayscale.wasm) file. - -We define custom build in [api/pre.sh](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/pre.sh) which is called in package.json to download the [WasmEdge command](https://github.com/WasmEdge/WasmEdge/releases/tag/0.8.2). - -![](docs/images/aws-lambda-wasmedge-runtime.gif) - -## Deploy - -### Create An Image Repository on Amazon ECR - -Go to your Amazon [Elastic Container Registry](https://console.aws.amazon.com/ecr/repositories) (ECR) and create a new image repository. Note that you need to set the visibility settings to **Private** in order to use the image to create a serverless function on AWS Lambda. - -![](docs/images/1.repo.png) - -### Build Your Docker Image Locally - -We have everything we need to build a docker image in the [api/](https://github.com/second-state/aws-lambda-wasm-runtime/tree/main/api) folder. - -- [grayscale.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/grayscale.wasm) is the WebAssembly function that turns a colored picture into black and white. grayscale.wasm is compiled from [main.rs](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/functions/image-grayscale/src/main.rs) in [api/functions/image-grayscale/src](https://github.com/second-state/aws-lambda-wasm-runtime/tree/main/api/functions/image-grayscale/src), written in Rust. - -- [hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/hello.js) is the handler function that passes data of the HTTP request to the grayscale function and runs it. This is required by AWS Lambda. - -- [pre.sh](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/pre.sh) is the shell script that installs the WasmEdge runtime and all its dependencies. pre.sh is executed while building the Docker image. - -To build the image, make sure the [Dockerfile](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/Dockerfile) we provided is in the api/ folder and run - -``` -$ cd api -$ docker build -t aws_lambda_grayscale . -``` - -### Push Your Image to ECR Repository - -You can follow the instructions provided by your ECR repository to push the image. Note that [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) is required in this step. - -![](docs/images/2.push.png) - -### Create A Serverless Function from Repository Image - -Now go to [AWS Lambda Console](https://console.aws.amazon.com/lambda/home) and create a new serverless function. Choose to create a function from **container image**. Put in the name of your function and your container image URL. You can browse images from your private repositories on Amazon ECR or simply paste the container image URL. - -![](docs/images/3.function.png) - -### Set Up An API Trigger for Your Serverless Function - -After creating your function, we need to set up a trigger for your function. A trigger simply defines how your function is called. In this demo we want to call our function through HTTP request, so we will create an API as the trigger. - -Click **Add trigger**. - -![](docs/images/4.trigger.png) - -Choose **API Gateway** as trigger type. For API type, choose **REST API**. For Security, choose **Open**. - -![](docs/images/5.api.png) - -Once we have created our API, we see that an API endpoint is now available. This is the URL we can use to call our serverless function. - -![](docs/images/6.link.png) - -### Enable CORS - -Finally, if we want to call our function within a browser, we need to enable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). To do so, we need to click the linked text **grayscale-API** next to API Gateway to enter the Amazon API Gateway console. - -In the API Gateway console, click **Actions** and choose **Enable CORS**. - -![](docs/images/7.CORS1.png) - -Default options should be enough for our demo. - -![](docs/images/8.CORS2.png) - -### Troubleshooting - -If you find that your serverless function always returns `internal server error`, if might be due to that the default timeout interval is too short for our function to execute. The default timeout interval is 3 seconds for any AWS Lambda function. You may increase the timeout interval to give enough time for the serverless function to execute. Setting **Timeout** to 30 seconds should be more than enough. - -![](docs/images/9.troubleshoot.png) - -## Set Up the Front-End - -This demo provides a simple front-end UI made by [Next.js](https://nextjs.org). It is a static web page deployed through GitHub pages. To set up this static page, all you need to do is add your serverless function endpoint URL to Secrets in the Settings page under the name `NEXT_PUBLIC_FUNCTION_URL`, as shown below. - -![](docs/images/10.page.png) - -We use GitHub Actions to generate pages, so the workflow in [.github/workflows/deploy.yml](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/.github/workflows/deploy.yml) (which builds the front-end page) is triggered every time you commit your changes. - -**Caveats:** - -- If you have forked this repository and wish to enable this auto-build feature, you need to manually allow actions to run under the Actions tab in Settings, since by default GitHub Actions are not trigger in forked repositories. - -- If you are building the `gh-pages` branch for the first time, please add an empty file with the name `.nojekyll` in `gh-pages` after the branch is built. Doing so prevents some of your web resources from being ignored by GitHub while presenting your page. - -## Create Your Own Function and Deploy - -[grayscale.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/grayscale.wasm) is built with `cargo` as follows: - -``` -$ cd api/functions/image-grayscale/ -$ cargo build --release --target wasm32-wasi -$ cp target/wasm32-wasi/release/grayscale.wasm ../../ -``` - -You can write your own Rust code and build your own WebAssembly function in a similar way. Don't forget to specify how your function should be called in [api/hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/main/api/hello.js). Follow the same steps in this demo to deploy your function to AWS Lambda. - -Congrats! You have created your own serverless function! - -## Learn More - -To learn more about WasmEdge, take a look at the following resources: - -- WasmEdge's Github [repo](https://github.com/WasmEdge/WasmEdge) -- WasmEdge [Tutorials](https://wasmedge.org/#tutorials) -- Check out [Second State's repositories](https://github.com/second-state) for more demos, as well as resources on Rust and Wasm diff --git a/_next/static/chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.97886666aeed49fa65b3.js b/_next/static/chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.97886666aeed49fa65b3.js new file mode 100644 index 0000000..57ac2d9 --- /dev/null +++ b/_next/static/chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.97886666aeed49fa65b3.js @@ -0,0 +1 @@ +(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[2],{"/jkW":function(t,e,r){"use strict";e.__esModule=!0,e.isDynamicRoute=function(t){return n.test(t)};var n=/\/\[[^/]+?\](?=\/|$)/},"0Bsm":function(t,e,r){"use strict";var n=r("TqRt");e.__esModule=!0,e.default=function(t){function e(e){return o.default.createElement(t,Object.assign({router:(0,a.useRouter)()},e))}e.getInitialProps=t.getInitialProps,e.origGetInitialProps=t.origGetInitialProps,!1;return e};var o=n(r("q1tI")),a=r("nOHt")},"0G5g":function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},"284h":function(t,e,r){var n=r("cDf5");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},"3WeD":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},Nh2W:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("TqRt");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("Lab5"));var s=r("0G5g");function u(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,s.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"/_next/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return u(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return u(r,l,a(n.mark((function a(){var s,u,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return s=n.sent,u=s.scripts,c=s.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(u.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,s.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},Qetd:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function S(t){return(t=k(t))===b||t.startsWith(b+"/")}function E(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,u.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===k(t)?t.substring(1):t):t}(t,b)}function R(t){return(t=t.slice(b.length)).startsWith("/")||(t="/".concat(t)),t}function L(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&S(r.pathname)}catch(n){return!1}}function C(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var s=Object.keys(a);return s.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,s=r.optional,u="[".concat(o?"...":"").concat(t,"]");return s&&(u="".concat(e?"":"/","[").concat(u,"]")),o&&!Array.isArray(e)&&(e=[e]),(s||t in i)&&(n=n.replace(u,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:s,result:n}}function O(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function I(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!L(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var s=(0,v.searchParamsToUrlQuery)(a.searchParams),c=C(a.pathname,a.pathname,s),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:O(s,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function T(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function j(t,e,r){var n=I(t.pathname,e,!0),o=s(n,2),a=o[0],i=o[1],u=(0,h.getLocationOrigin)(),c=a.startsWith(u),l=i&&i.startsWith(u);a=T(a),i=i?T(i):i;var f=c?a:E(a),p=r?T(I(t.pathname,r)):i||a;return{url:f,as:l?p:E(p)}}function A(t,e){var r=(0,u.removePathTrailingSlash)((0,l.denormalizePagePath)(t));return"/404"===r||"/_error"===r?t:(e.includes(r)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(r))return t=e,!0})),(0,u.removePathTrailingSlash)(t))}var D=Symbol("SSG_DATA_NOT_FOUND");function M(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return M(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:D};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function N(t,e){return M(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var U=function(){function t(e,r,n,o){var i=this,s=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,_=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var s=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&s===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var u=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:E(u),query:c}),(0,h.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:s,err:y,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var x=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=x?e:n,this.basePath=b,this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(x||self.location.search)),this.isPreview=!!_,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:E(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,s){var l,f,v,y,w,b,_,k,I,T,M,N,U,W,q,F,G,B,V,X,H,z,J,$,Y,Q,Z,K,tt,et,rt,nt,ot,at;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(L(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=E(x(S(a)?R(a):a,i.locale,this.defaultLocale)),w=P(S(a)?R(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),_=b.pathname,k=b.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return I=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:T=e.sent,T.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if(this.urlIsNew(w)||f||(r="replaceState"),M=a,"/_error"!==(_=_?(0,u.removePathTrailingSlash)(R(_)):_)&&(b.pathname=A(_,I),b.pathname!==_&&(_=b.pathname,o=(0,h.formatWithValidation)(b))),N=(0,u.removePathTrailingSlash)(_),L(a)){e.next=60;break}e.next=58;break;case 58:return window.location.href=a,e.abrupt("return",!1);case 60:if(M=P(R(M),this.locale),!(0,p.isDynamicRoute)(N)){e.next=76;break}if(U=(0,d.parseRelativeUrl)(M),W=U.pathname,q=(0,g.getRouteRegex)(N),F=(0,m.getRouteMatcher)(q)(W),B=(G=N===W)?C(N,W,k):{},F&&(!G||B.result)){e.next=75;break}if(!((V=Object.keys(q.groups).filter((function(t){return!k[t]}))).length>0)){e.next=73;break}throw new Error((G?"The provided `href` (".concat(o,") value is missing query values (").concat(V.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(W,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://nextjs.org/docs/messages/".concat(G?"href-interpolation-failed":"incompatible-href-as"));case 73:e.next=76;break;case 75:G?a=(0,h.formatWithValidation)(Object.assign({},U,{pathname:B.result,query:O(k,B.params)})):Object.assign(k,F);case 76:return t.events.emit("routeChangeStart",a,y),e.prev=77,e.next=80,this.getRouteInfo(N,_,k,a,M,y);case 80:if(z=e.sent,$=(J=z).error,Y=J.props,Q=J.__N_SSG,Z=J.__N_SSP,!Q&&!Z||!Y){e.next=107;break}if(!Y.pageProps||!Y.pageProps.__N_REDIRECT){e.next=93;break}if(!(K=Y.pageProps.__N_REDIRECT).startsWith("/")){e.next=91;break}if((tt=(0,d.parseRelativeUrl)(K)).pathname=A(tt.pathname,I),!I.includes(tt.pathname)){e.next=91;break}return et=j(this,K,K),rt=et.url,nt=et.as,e.abrupt("return",this.change(r,rt,nt,i));case 91:return window.location.href=K,e.abrupt("return",new Promise((function(){})));case 93:if(this.isPreview=!!Y.__N_PREVIEW,Y.notFound!==D){e.next=107;break}return e.prev=95,e.next=98,this.fetchComponent("/404");case 98:ot="/404",e.next=104;break;case 101:e.prev=101,e.t1=e.catch(95),ot="/_error";case 104:return e.next=106,this.getRouteInfo(ot,ot,k,a,M,{shallow:!1});case 106:z=e.sent;case 107:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),at=i.shallow&&this.route===N,i._h&&"/_error"===_&&500===(null==(X=self.__NEXT_DATA__.props)||null==(H=X.pageProps)?void 0:H.statusCode)&&null!=Y&&Y.pageProps&&(Y.pageProps.statusCode=500),e.next=114,this.set(N,_,k,w,z,s||(at||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 114:if(!$){e.next=117;break}throw t.events.emit("routeChangeError",$,w,y),$;case 117:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 122:if(e.prev=122,e.t2=e.catch(77),!e.t2.cancelled){e.next=126;break}return e.abrupt("return",!1);case 126:throw e.t2;case 127:case"end":return e.stop()}}),e,this,[[36,46],[77,122],[95,101]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,s,u){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!u){e.next=6;break}throw t.events.emit("routeChangeError",r,i,s),window.location.href=i,_();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,s,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,s){var u,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,u=this.components[e],!s.shallow||!u||this.route!==e){t.next=4;break}return t.abrupt("return",u);case 4:if(!(c=u&&"initial"in u?void 0:u)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,s));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=s(e,2),n=r[0],o=r[1],a=t.split("#"),i=s(a,2),u=i[0],c=i[1];return!(!c||n!==u||o!==c)||n===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=s(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,s,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:s=t.sent,c=r,t.next=19;break;case 12:f=t.sent,l=f.__rewrites,p=(0,y.default)(E(x(r,this.locale)),s,l,a.query,(function(t){return A(t,s)}),this.locales),c=P(R(p.asPath),this.locale),p.matchedPage&&p.resolvedHref&&(i=p.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a)),t.next=21;break;case 19:a.pathname=A(a.pathname,s),a.pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a));case 21:v=(0,u.removePathTrailingSlash)(i),t.next=24;break;case 24:return t.next=26,Promise.all([this.pageLoader._isSsg(v).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,c,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](v)]);case 26:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):N(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=N(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",_(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=U,U.events=(0,f.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!u(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=new URL((0,n.getLocationOrigin)()),a=e?new URL(e,r):r,i=new URL(t,a),s=i.pathname,u=i.searchParams,c=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(t));return{pathname:s,query:(0,o.searchParamsToUrlQuery)(u),search:c,hash:l,href:f.slice(r.origin.length)}};var n=r("g/15"),o=r("3WeD")},ls82:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return O()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=S(i,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(C([])));_&&_!==r&&n.call(_,a)&&(w=_);var x=g.prototype=y.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,s){var u=l(t[o],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){o=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function o(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=w},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,l=e[r];if(!(void 0!==l&&0C(o,n))void 0!==i&&0>C(i,o)?(e[r]=i,e[u]=n,r=u):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==i&&0>C(i,n)))break e;e[r]=i,e[u]=n,r=u}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],N=[],T=1,L=null,z=3,O=!1,R=!1,M=!1;function I(e){for(var t=_(N);null!==t;){if(null===t.callback)x(N);else{if(!(t.startTime<=e))break;x(N),t.sortIndex=t.expirationTime,E(P,t)}t=_(N)}}function F(e){if(M=!1,I(e),!R)if(null!==_(P))R=!0,r(D);else{var t=_(N);null!==t&&l(F,t.startTime-e)}}function D(e,n){R=!1,M&&(M=!1,a()),O=!0;var r=z;try{for(I(n),L=_(P);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=L.callback;if("function"===typeof o){L.callback=null,z=L.priorityLevel;var u=o(L.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?L.callback=u:L===_(P)&&x(P),I(n)}else x(P);L=_(P)}if(null!==L)var i=!0;else{var s=_(N);null!==s&&l(F,s.startTime-n),i=!1}return i}finally{L=null,z=r,O=!1}}var U=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||O||(R=!0,r(D))},t.unstable_getCurrentPriorityLevel=function(){return z},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(z){case 1:case 2:case 3:var t=3;break;default:t=z}var n=z;z=t;try{return e()}finally{z=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=z;z=e;try{return t()}finally{z=n}},t.unstable_scheduleCallback=function(e,n,o){var u=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0u?(e.sortIndex=o,E(N,e),null===_(P)&&e===_(N)&&(M?a():M=!0,l(F,o-u))):(e.sortIndex=i,E(P,e),R||O||(R=!0,r(D))),e},t.unstable_wrapCallback=function(e){var t=z;return function(){var n=z;z=t;try{return e.apply(this,arguments)}finally{z=n}}}},"0x2o":function(e,t,n){"use strict";n("Qetd");var r=n("q1tI"),l=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;l=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,a={},s=null,c=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)u.call(t,r)&&!i.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:l,type:e,key:s,ref:c,props:a,_owner:o.current}}t.jsx=s,t.jsxs=s},QCnb:function(e,t,n){"use strict";e.exports=n("+wdc")},i8i4:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n("yl30")},nKUr:function(e,t,n){"use strict";e.exports=n("0x2o")},q1tI:function(e,t,n){"use strict";e.exports=n("viRO")},viRO:function(e,t,n){"use strict";var r=n("Qetd"),l=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,u=60110,i=60112;t.Suspense=60113;var s=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;l=f("react.element"),a=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),u=f("react.context"),i=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n