diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 13e42bb..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "extends": "./node_modules/gts/",
- "rules": {
- "node/no-unpublished-require": ["error", {
- "allowModules": ["html-webpack-plugin", "mini-css-extract-plugin", "workbox-webpack-plugin"]
- }]
- },
- "plugins": ["react", "@typescript-eslint", "prettier"],
- "settings": {
- "react": {
- "version": "detect"
- }
- }
-}
diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml
new file mode 100644
index 0000000..3ac11b4
--- /dev/null
+++ b/.github/workflows/build-tests.yml
@@ -0,0 +1,29 @@
+# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
+
+name: build-tests
+
+on:
+ pull_request:
+ branches: [ "main" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [20.x]
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'npm'
+ - run: npm ci
+ - run: npm run build --if-present
+ - run: npm test
diff --git a/.github/workflows/workflow-action.yml b/.github/workflows/workflow-action.yml
new file mode 100644
index 0000000..86424b8
--- /dev/null
+++ b/.github/workflows/workflow-action.yml
@@ -0,0 +1,44 @@
+# This is a basic workflow to help you get started with Actions
+
+name: CI Workflow
+
+# Controls when the workflow will run
+on: workflow_dispatch
+ # Triggers the workflow on push or pull request events but only for the "dev" branch
+ # push:
+ # branches: [ "dev" ]
+ # pull_request:
+ # branches: [ "dev" ]
+
+ # Allows you to run this workflow manually from the Actions tab
+ # workflow_dispatch: workflow_dispatch
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ first-job:
+ runs-on: ubuntu-latest
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Runs a single command using the runners shell
+ - name: Print greeting
+ run: |
+ echo "Hello World!"
+ echo "Second line!
+ - name: Print goodbye
+ run: echo "Done - goodbye!"
+
+ # This workflow contains a single job called "build"
+ # build:
+ # # The type of runner that the job will run on
+ # runs-on: ubuntu-latest
+
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ # - uses: actions/checkout@v4
+
+
+ # # Runs a set of commands using the runners shell
+ # - name: Run a multi-line script
+ # run: |
+ # echo Add other actions to build,
+ # echo test, and deploy your project.
diff --git a/README.md b/README.md
index fa32788..ab20ba0 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,62 @@
-# 🚀 Welcome to your new awesome project!
+
-This project has been created using **webpack-cli**, you can now run
+# 🚀 Welcome to flake guard!
+### [Website](https://flake-guard.com/) [Npm*](https://flake-guard.com/) [Articles*](https://flake-guard.com/)
+
+
+
+
+
+
+
-```
-npm run build
-```
+
-or
+### Flake-Guard is a free, open-source tool that allows developers to run Jest tests to automatically detect, report, and manage flaky tests in software development.
+---
+*flaky test
+: a test that sometimes passes and sometimes fails for the same code, often due to nondeterministic factors like timing issues, network variability, or reliance on external systems.*
-```
-yarn build
-```
+**By identifying and handling these inconsistent tests, Flake-Guard helps maintain test reliability.**
+
+# DEMO SECTION WITH VIDEO
+
+### end of demo section
+---
+# Getting Started
+Installation:
+```npm i flake-guard```
+
+Installation as dev dependency:
+```npm i flake-guard --save-dev```
+
+To run FlakeGuard, simply execute the command
+```npx flake-guard ```
+. *change `` to the name of the test file that you want to examine.
+
+👁️FlakeGuard will analyze your E2E tests for flakiness by executing multiple test runs and analyzing the results. _The default number of test runs is 10_, but this can be adjusted as described below.
+
+In general, there is a time versus accuracy tradeoff. More test executions increase accuracy but reduce speed.
+
+## Configuration:
+To adjust FlakeGuard configuration variables, you can create a file in the root directory of your project called
+fg.config.json
+. Below are the defaults, which can be overridden in your local 'fg.config.json' file.
+
+# [Flake-guard.com](https://Flake-guard.com)
+## Tracked Dashboard Metrics
+
+
+
+
+## Contribution Guidelines
+---
+# Authors
+| Name (First, Last) | Connect with us |
+| ------------- |:-------------:|
+| Ashley Hannigan | [LinkedIn](https://www.linkedin.com/in/ashley-hannigan-88-/) `,` [Github](https://github.com/ashhannigan)
+| Brendan Xiong | [LinkedIn](https://www.linkedin.com/in/brendanxiong/) `,` [Github](https://github.com/brendanxiong)
+| Tommy Martinez | [LinkedIn](https://www.linkedin.com/in/tommy-martinez/) `,` [Github](https://github.com/tmm150)
+| Paloma Reynolds | [LinkedIn](https://www.linkedin.com/in/palomareynolds/)`,` [Github](https://github.com/palomareynolds)
+| Will Suto | [LinkedIn](https://www.linkedin.com/in/willsuto/) `,` [Github](https://github.com/willsuto)
-to bundle your application
diff --git a/dist/index.html b/dist/index.html
deleted file mode 100644
index 721a7a4..0000000
--- a/dist/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-Webpack App
\ No newline at end of file
diff --git a/dist/main.js b/dist/main.js
deleted file mode 100644
index 6ae8716..0000000
--- a/dist/main.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see main.js.LICENSE.txt */
-(()=>{var e,t,n,r,i={4603:(e,t,n)=>{"use strict";e.exports=n(3853)},1244:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){return(0,r.useState)(null)}},3713:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);const i=function(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e}),[e]),t}},7895:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),i=n(3713);function o(e){const t=(0,i.A)(e);return(0,r.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}},7876:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),i=n(7895);function o(e,t,n,o=!1){const s=(0,i.A)(n);(0,r.useEffect)((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,s,o),()=>n.removeEventListener(t,s,o)}),[e])}},8342:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){const[,e]=(0,r.useReducer)((e=>!e),!1);return e}},1706:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const i=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,o="undefined"!=typeof document||i?r.useLayoutEffect:r.useEffect},3804:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const i=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,o=function(e,t){return(0,r.useMemo)((()=>function(e,t){const n=i(e),r=i(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])}},8880:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){const e=(0,r.useRef)(!0),t=(0,r.useRef)((()=>e.current));return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}},4103:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(e){const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>{t.current=e})),t.current}},2571:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),i=(n(1244),n(3713),n(7895));n(7876),n(8880),n(4103),n(1706),new WeakMap;var o=n(5753),s=n(4848);const a=["onKeyDown"],l=r.forwardRef(((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,a);const[l]=(0,o.Am)(Object.assign({tagName:"a"},r)),c=(0,i.A)((e=>{l.onKeyDown(e),null==n||n(e)}));return(u=r.href)&&"#"!==u.trim()&&"button"!==r.role?(0,s.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,s.jsx)("a",Object.assign({ref:t},r,l,{onKeyDown:c}));var u}));l.displayName="Anchor";const c=l},5753:(e,t,n)=>{"use strict";n.d(t,{Am:()=>s,Ay:()=>l});var r=n(6540),i=n(4848);const o=["as","disabled"];function s({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:s,tabIndex:a=0,type:l}){e||(e=null!=n||null!=r||null!=i?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=r=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&r.preventDefault(),t?r.stopPropagation():null==s||s(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=o?o:"button",disabled:void 0,tabIndex:t?void 0:a,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?i:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const a=r.forwardRef(((e,t)=>{let{as:n,disabled:r}=e,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,o);const[l,{tagName:c}]=s(Object.assign({tagName:n,disabled:r},a));return(0,i.jsx)(c,Object.assign({},a,l,{ref:t}))}));a.displayName="Button";const l=a},5182:(e,t,n)=>{"use strict";n.d(t,{sE:()=>o,y:()=>s});const r="data-rr-ui-",i="rrUi";function o(e){return`${r}${e}`}function s(e){return`${i}${e}`}},9409:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=n(6540).createContext(null);r.displayName="NavContext";const i=r},2671:(e,t,n)=>{"use strict";n.d(t,{A:()=>p,M:()=>h});var r=n(6540),i=n(7895),o=n(9409),s=n(1406),a=n(5753),l=n(5182),c=n(7395),u=n(4848);const d=["as","active","eventKey"];function h({key:e,onClick:t,active:n,id:a,role:u,disabled:d}){const h=(0,r.useContext)(s.A),f=(0,r.useContext)(o.A),p=(0,r.useContext)(c.A);let g=n;const m={role:u};if(f){u||"tablist"!==f.role||(m.role="tab");const t=f.getControllerId(null!=e?e:null),r=f.getControlledId(null!=e?e:null);m[(0,l.sE)("event-key")]=e,m.id=t||a,g=null==n&&null!=e?f.activeKey===e:n,!g&&(null!=p&&p.unmountOnExit||null!=p&&p.mountOnEnter)||(m["aria-controls"]=r)}return"tab"===m.role&&(m["aria-selected"]=g,g||(m.tabIndex=-1),d&&(m.tabIndex=-1,m["aria-disabled"]=!0)),m.onClick=(0,i.A)((n=>{d||(null==t||t(n),null!=e&&h&&!n.isPropagationStopped()&&h(e,n))})),[m,{isActive:g}]}const f=r.forwardRef(((e,t)=>{let{as:n=a.Ay,active:r,eventKey:i}=e,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,d);const[c,f]=h(Object.assign({key:(0,s.u)(i,o.href),active:r},o));return c[(0,l.sE)("active")]=f.isActive,(0,u.jsx)(n,Object.assign({},o,c,{ref:t}))}));f.displayName="NavItem";const p=f},1406:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,u:()=>i});var r=n(6540);const i=(e,t=null)=>null!=e?String(e):t||null,o=r.createContext(null)},7395:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(6540).createContext(null)},2810:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6540),i=n(7828);const o=(0,r.createContext)(i.A?window:void 0);function s(){return(0,r.useContext)(o)}o.Provider},907:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Headers:()=>s,Request:()=>a,Response:()=>l,default:()=>o,fetch:()=>i});var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("unable to locate global object")}();const i=r.fetch,o=r.fetch.bind(r),s=r.Headers,a=r.Request,l=r.Response},6191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AuthAdminApi:()=>_t,AuthApiError:()=>$e,AuthClient:()=>wt,AuthError:()=>ze,AuthImplicitGrantRedirectError:()=>Qe,AuthInvalidCredentialsError:()=>Ke,AuthInvalidTokenResponseError:()=>qe,AuthPKCEGrantCodeExchangeError:()=>Ye,AuthRetryableFetchError:()=>Ge,AuthSessionMissingError:()=>Ve,AuthUnknownError:()=>We,AuthWeakPasswordError:()=>Xe,CustomAuthError:()=>He,FunctionRegion:()=>a,FunctionsError:()=>r,FunctionsFetchError:()=>i,FunctionsHttpError:()=>s,FunctionsRelayError:()=>o,GoTrueAdminApi:()=>ut,GoTrueClient:()=>At,NavigatorLockAcquireTimeoutError:()=>gt,REALTIME_CHANNEL_STATES:()=>$,REALTIME_LISTEN_TYPES:()=>z,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:()=>F,REALTIME_PRESENCE_LISTEN_EVENTS:()=>x,REALTIME_SUBSCRIBE_STATES:()=>B,RealtimeChannel:()=>U,RealtimeClient:()=>V,RealtimePresence:()=>C,SupabaseClient:()=>kt,createClient:()=>Et,isAuthApiError:()=>Ue,isAuthError:()=>Be,isAuthRetryableFetchError:()=>Je,isAuthWeakPasswordError:()=>Ze,lockInternals:()=>ft,navigatorLock:()=>mt});class r extends Error{constructor(e,t="FunctionsError",n){super(e),this.name=t,this.context=n}}class i extends r{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class o extends r{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class s extends r{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var a;!function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"}(a||(a={}));class l{constructor(e,{headers:t={},customFetch:r,region:i=a.Any}={}){this.url=e,this.headers=t,this.region=i,this.fetch=(e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)})(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var n,r,a,l,c;return r=this,a=void 0,c=function*(){try{const{headers:r,method:a,body:l}=t;let c,u={},{region:d}=t;d||(d=this.region),d&&"any"!==d&&(u["x-region"]=d),l&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&("undefined"!=typeof Blob&&l instanceof Blob||l instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",c=l):"string"==typeof l?(u["Content-Type"]="text/plain",c=l):"undefined"!=typeof FormData&&l instanceof FormData?c=l:(u["Content-Type"]="application/json",c=JSON.stringify(l)));const h=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),r),body:c}).catch((e=>{throw new i(e)})),f=h.headers.get("x-relay-error");if(f&&"true"===f)throw new o(h);if(!h.ok)throw new s(h);let p,g=(null!==(n=h.headers.get("Content-Type"))&&void 0!==n?n:"text/plain").split(";")[0].trim();return p="application/json"===g?yield h.json():"application/octet-stream"===g?yield h.blob():"text/event-stream"===g?h:"multipart/form-data"===g?yield h.formData():yield h.text(),{data:p,error:null}}catch(e){return{data:null,error:e}}},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof l?r:new l((function(e){e(r)}))).then(n,i)}o((c=c.apply(r,a||[])).next())}))}}var c=n(907);class u extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class d{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=c.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((async e=>{var t,n,r;let i=null,o=null,s=null,a=e.status,l=e.statusText;if(e.ok){if("HEAD"!==this.method){const t=await e.text();""===t||(o="text/csv"===this.headers.Accept||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}const r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),c=null===(n=e.headers.get("content-range"))||void 0===n?void 0:n.split("/");r&&c&&c.length>1&&(s=parseInt(c[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(i={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,s=null,a=406,l="Not Acceptable"):o=1===o.length?o[0]:null)}else{const t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(o=[],i=null,a=200,l="OK")}catch(n){404===e.status&&""===t?(a=204,l="No Content"):i={message:t}}if(i&&this.isMaybeSingle&&(null===(r=null==i?void 0:i.details)||void 0===r?void 0:r.includes("0 rows"))&&(i=null,a=200,l="OK"),i&&this.shouldThrowOnError)throw new u(i)}return{error:i,data:o,count:s,status:a,statusText:l}}));return this.shouldThrowOnError||(n=n.catch((e=>{var t,n,r;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(n=null==e?void 0:e.stack)&&void 0!==n?n:""}`,hint:"",code:`${null!==(r=null==e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}}))),n.then(e,t)}}class h extends d{select(e){let t=!1;const n=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e))).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const o=i?`${i}.order`:"order",s=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${s?`${s},`:""}${e}.${t?"asc":"desc"}${void 0===n?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=void 0===n?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=void 0===r?"offset":`${r}.offset`,o=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var s;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(s=this.headers.Accept)&&void 0!==s?s:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class f extends h{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map((e=>"string"==typeof e&&new RegExp("[,()]").test(e)?`"${e}"`:`${e}`)).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let i="";"plain"===r?i="pl":"phrase"===r?i="ph":"websearch"===r&&(i="w");const o=void 0===n?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach((([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)})),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}}class p{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=t,this.schema=n,this.fetch=r}select(e,{head:t=!1,count:n}={}){const r=t?"HEAD":"GET";let i=!1;const o=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!i?"":('"'===e&&(i=!i),e))).join("");return this.url.searchParams.set("select",o),n&&(this.headers.Prefer=`count=${n}`),new f({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:n=!0}={}){const r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),n||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){const o=[`resolution=${n?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),i||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new f({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new f({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const g={"X-Client-Info":"postgrest-js/1.15.2"};class m{constructor(e,{headers:t={},schema:n,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},g),t),this.schemaName=n,this.fetch=r}from(e){const t=new URL(`${this.url}/${e}`);return new p(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new m(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let o;const s=new URL(`${this.url}/rpc/${e}`);let a;n||r?(o=n?"HEAD":"GET",Object.entries(t).filter((([e,t])=>void 0!==t)).map((([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`])).forEach((([e,t])=>{s.searchParams.append(e,t)}))):(o="POST",a=t);const l=Object.assign({},this.headers);return i&&(l.Prefer=`count=${i}`),new f({method:o,url:s,headers:l,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const b={"X-Client-Info":"realtime-js/2.9.5"};var y,v,A,_,w,x,k;!function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(y||(y={})),function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"}(v||(v={})),function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"}(A||(A={})),function(e){e.websocket="websocket"}(_||(_={})),function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"}(w||(w={}));class E{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}}class S{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t("string"==typeof e?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,t,n)}_decodeBroadcast(e,t,n){const r=t.getUint8(1),i=t.getUint8(2);let o=this.HEADER_LENGTH+2;const s=n.decode(e.slice(o,o+r));o+=r;const a=n.decode(e.slice(o,o+i));return o+=i,{ref:null,topic:s,event:a,payload:JSON.parse(n.decode(e.slice(o,e.byteLength)))}}}class O{constructor(e,t,n={},r=1e4){this.channel=e,this.event=t,this.payload=n,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var n;return this._hasReceived(e)&&t(null===(n=this.receivedResp)||void 0===n?void 0:n.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},(e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}!function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"}(x||(x={}));class C{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},(e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=C.syncState(this.state,e,t,n),this.pendingDiffs.forEach((e=>{this.state=C.syncDiff(this.state,e,t,n)})),this.pendingDiffs=[],r()})),this.channel._on(n.diff,{},(e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=C.syncDiff(this.state,e,t,n),r())})),this.onJoin(((e,t,n)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:n})})),this.onLeave(((e,t,n)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:n})})),this.onSync((()=>{this.channel._trigger("presence",{event:"sync"})}))}static syncState(e,t,n,r){const i=this.cloneDeep(e),o=this.transformState(t),s={},a={};return this.map(i,((e,t)=>{o[e]||(a[e]=t)})),this.map(o,((e,t)=>{const n=i[e];if(n){const r=t.map((e=>e.presence_ref)),i=n.map((e=>e.presence_ref)),o=t.filter((e=>i.indexOf(e.presence_ref)<0)),l=n.filter((e=>r.indexOf(e.presence_ref)<0));o.length>0&&(s[e]=o),l.length>0&&(a[e]=l)}else s[e]=t})),this.syncDiff(i,{joins:s,leaves:a},n,r)}static syncDiff(e,t,n,r){const{joins:i,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return n||(n=()=>{}),r||(r=()=>{}),this.map(i,((t,r)=>{var i;const o=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(r),o.length>0){const n=e[t].map((e=>e.presence_ref)),r=o.filter((e=>n.indexOf(e.presence_ref)<0));e[t].unshift(...r)}n(t,o,r)})),this.map(o,((t,n)=>{let i=e[t];if(!i)return;const o=n.map((e=>e.presence_ref));i=i.filter((e=>o.indexOf(e.presence_ref)<0)),e[t]=i,r(t,i,n),0===i.length&&delete e[t]})),e}static map(e,t){return Object.getOwnPropertyNames(e).map((n=>t(n,e[n])))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return t[n]="metas"in r?r.metas.map((e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))):r,t}),{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}!function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"}(k||(k={}));const T=(e,t,n={})=>{var r;const i=null!==(r=n.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce(((n,r)=>(n[r]=P(r,e,t,i),n)),{})},P=(e,t,n,r)=>{const i=t.find((t=>t.name===e)),o=null==i?void 0:i.type,s=n[e];return o&&!r.includes(o)?R(o,s):j(s)},R=(e,t)=>{if("_"===e.charAt(0)){const n=e.slice(1,e.length);return N(t,n)}switch(e){case k.bool:return M(t);case k.float4:case k.float8:case k.int2:case k.int4:case k.int8:case k.numeric:case k.oid:return D(t);case k.json:case k.jsonb:return L(t);case k.timestamp:return I(t);case k.abstime:case k.date:case k.daterange:case k.int4range:case k.int8range:case k.money:case k.reltime:case k.text:case k.time:case k.timestamptz:case k.timetz:case k.tsrange:case k.tstzrange:default:return j(t)}},j=e=>e,M=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},D=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},L=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},N=(e,t)=>{if("string"!=typeof e)return e;const n=e.length-1,r=e[n];if("{"===e[0]&&"}"===r){let r;const i=e.slice(1,n);try{r=JSON.parse("["+i+"]")}catch(e){r=i?i.split(","):[]}return r.map((e=>R(t,e)))}return e},I=e=>"string"==typeof e?e.replace(" ","T"):e;var F,z,B;!function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(F||(F={})),function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"}(z||(z={})),function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"}(B||(B={}));const $=v;class U{constructor(e,t={config:{}},n){this.topic=e,this.params=t,this.socket=n,this.bindings={},this.state=v.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},t.config),this.timeout=this.socket.timeout,this.joinPush=new O(this,A.join,this.params,this.timeout),this.rejoinTimer=new E((()=>this._rejoinUntilConnected()),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(()=>{this.state=v.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this._onClose((()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=v.closed,this.socket._remove(this)})),this._onError((e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=v.errored,this.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=v.errored,this.rejoinTimer.scheduleTimeout())})),this._on(A.reply,{},((e,t)=>{this._trigger(this._replyEventName(t),e)})),this.presence=new C(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,t=this.timeout){var n,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:o}}=this.params;this._onError((t=>e&&e("CHANNEL_ERROR",t))),this._onClose((()=>e&&e("CLOSED")));const s={},a={broadcast:i,presence:o,postgres_changes:null!==(r=null===(n=this.bindings.postgres_changes)||void 0===n?void 0:n.map((e=>e.filter)))&&void 0!==r?r:[]};this.socket.accessToken&&(s.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:a},s)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",(({postgres_changes:t})=>{var n;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),void 0!==t){const r=this.bindings.postgres_changes,i=null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0,o=[];for(let n=0;n{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(t).join(", ")||"error")))})).receive("timeout",(()=>{e&&e("TIMED_OUT")}))}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,n){return this._on(e,t,n)}async send(e,t={}){var n,r;if(this._canPush()||"broadcast"!==e.type)return new Promise((n=>{var r,i,o;const s=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(o=null===(i=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===i?void 0:i.broadcast)||void 0===o?void 0:o.ack)||n("ok"),s.receive("ok",(()=>n("ok"))),s.receive("error",(()=>n("error"))),s.receive("timeout",(()=>n("timed out")))}));{const{event:i,payload:o}=e,s={method:"POST",headers:{apikey:null!==(n=this.socket.apiKey)&&void 0!==n?n:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,s,null!==(r=t.timeout)&&void 0!==r?r:this.timeout)).ok?"ok":"error"}catch(e){return"AbortError"===e.name?"timed out":"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=v.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(A.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise((n=>{const r=new O(this,A.leave,{},e);r.receive("ok",(()=>{t(),n("ok")})).receive("timeout",(()=>{t(),n("timed out")})).receive("error",(()=>{n("error")})),r.send(),this._canPush()||r.trigger("ok",{})}))}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,t,n){const r=new AbortController,i=setTimeout((()=>r.abort()),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),o}_push(e,t,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new O(this,e,t,n);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,n){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,n){var r,i;const o=e.toLocaleLowerCase(),{close:s,error:a,leave:l,join:c}=A;if(n&&[s,a,l,c].indexOf(o)>=0&&n!==this._joinRef())return;let u=this._onMessage(o,t,n);if(t&&!u)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter((e=>{var t,n,r;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(r=null===(n=e.filter)||void 0===n?void 0:n.event)||void 0===r?void 0:r.toLocaleLowerCase())===o})).map((e=>e.callback(u,n))):null===(i=this.bindings[o])||void 0===i||i.filter((e=>{var n,r,i,s,a,l;if(["broadcast","presence","postgres_changes"].includes(o)){if("id"in e){const o=e.id,s=null===(n=e.filter)||void 0===n?void 0:n.event;return o&&(null===(r=t.ids)||void 0===r?void 0:r.includes(o))&&("*"===s||(null==s?void 0:s.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const n=null===(a=null===(s=null==e?void 0:e.filter)||void 0===s?void 0:s.event)||void 0===a?void 0:a.toLocaleLowerCase();return"*"===n||n===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===o})).map((e=>{if("object"==typeof u&&"ids"in u){const e=u.data,{schema:t,table:n,commit_timestamp:r,type:i,errors:o}=e,s={schema:t,table:n,commit_timestamp:r,eventType:i,new:{},old:{},errors:o};u=Object.assign(Object.assign({},s),this._getPayloadRecords(e))}e.callback(u,n)}))}_isClosed(){return this.state===v.closed}_isJoined(){return this.state===v.joined}_isJoining(){return this.state===v.joining}_isLeaving(){return this.state===v.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,n){const r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:n};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){const n=e.toLocaleLowerCase();return this.bindings[n]=this.bindings[n].filter((e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===n&&U.isEqual(e.filter,t))})),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(A.close,{},e)}_onError(e){this._on(A.error,{},(t=>e(t)))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=v.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=T(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=T(e.columns,e.old_record)),t}}const W=()=>{},H="undefined"!=typeof WebSocket;class V{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=b,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=W,this.conn=null,this.sendBuffer=[],this.serializer=new S,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},this.endPoint=`${e}/${_.websocket}`,(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const i=null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new E((async()=>{this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!this.conn)if(this.transport)this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});else{if(H)return this.conn=new WebSocket(this._endPointURL()),void this.setupConnection();this.conn=new q(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),n.e(591).then(n.t.bind(n,1591,23)).then((({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()}))}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map((e=>e.unsubscribe())));return this.disconnect(),e}log(e,t,n){this.logger(e,t,n)}connectionState(){switch(this.conn&&this.conn.readyState){case y.connecting:return w.Connecting;case y.open:return w.Open;case y.closing:return w.Closing;default:return w.Closed}}isConnected(){return this.connectionState()===w.Open}channel(e,t={config:{}}){const n=new U(`realtime:${e}`,t,this);return this.channels.push(n),n}push(e){const{topic:t,event:n,payload:r,ref:i}=e,o=()=>{this.encode(e,(e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)}))};this.log("push",`${t} ${n} (${i})`,r),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach((t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(A.access_token,{access_token:e})}))}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t._isJoined()||t._isJoining())));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter((t=>t._joinRef()!==e._joinRef()))}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}_onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:n,payload:r,ref:i}=e;(i&&i===this.pendingHeartbeatRef||n===(null==r?void 0:r.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${n} ${i&&"("+i+")"||""}`,r),this.channels.filter((e=>e._isMember(t))).forEach((e=>e._trigger(n,r,i))),this.stateChangeCallbacks.message.forEach((t=>t(e)))}))}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((()=>this._sendHeartbeat()),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach((e=>e()))}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((t=>t(e)))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach((t=>t(e)))}_triggerChanError(){this.channels.forEach((e=>e._trigger(A.error)))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const n=e.match(/\?/)?"&":"?";return`${e}${n}${new URLSearchParams(t)}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void(null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout"));this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class q{constructor(e,t,n){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=y.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=n.close}}class K extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Q(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class Y extends K{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class G extends K{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}const J=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)};var X=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Z=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ee=(e,t)=>X(void 0,void 0,void 0,(function*(){const r=yield(i=void 0,o=void 0,s=void 0,a=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(n.bind(n,907))).Response:Response},new(s||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}l((a=a.apply(i,o||[])).next())})));var i,o,s,a;e instanceof r?e.json().then((n=>{t(new Y(Z(n),e.status||500))})).catch((e=>{t(new G(Z(e),e))})):t(new G(Z(e),e))})),te=(e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function ne(e,t,n,r,i,o){return X(this,void 0,void 0,(function*(){return new Promise(((s,a)=>{e(n,te(t,r,i,o)).then((e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()})).then((e=>s(e))).catch((e=>ee(e,a)))}))}))}function re(e,t,n,r){return X(this,void 0,void 0,(function*(){return ne(e,"GET",t,n,r)}))}function ie(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"POST",t,r,i,n)}))}function oe(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"DELETE",t,r,i,n)}))}var se=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const ae={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},le={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ce{constructor(e,t={},n,r){this.url=e,this.headers=t,this.bucketId=n,this.fetch=J(r)}uploadOrUpdate(e,t,n,r){return se(this,void 0,void 0,(function*(){try{let i;const o=Object.assign(Object.assign({},le),r),s=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(o.upsert)});"undefined"!=typeof Blob&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),i.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(i=n,i.append("cacheControl",o.cacheControl)):(i=n,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType);const a=this._removeEmptyFolders(t),l=this._getFinalPath(a),c=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:i,headers:s},(null==o?void 0:o.duplex)?{duplex:o.duplex}:{})),u=yield c.json();return c.ok?{data:{path:a,id:u.Id,fullPath:u.Key},error:null}:{data:null,error:u}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}upload(e,t,n){return se(this,void 0,void 0,(function*(){return this.uploadOrUpdate("POST",e,t,n)}))}uploadToSignedUrl(e,t,n,r){return se(this,void 0,void 0,(function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),s=new URL(this.url+`/object/upload/sign/${o}`);s.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:le.upsert},r),o=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&n instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(e=n,e.append("cacheControl",t.cacheControl)):(e=n,o["cache-control"]=`max-age=${t.cacheControl}`,o["content-type"]=t.contentType);const a=yield this.fetch(s.toString(),{method:"PUT",body:e,headers:o}),l=yield a.json();return a.ok?{data:{path:i,fullPath:l.Key},error:null}:{data:null,error:l}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}createSignedUploadUrl(e){return se(this,void 0,void 0,(function*(){try{let t=this._getFinalPath(e);const n=yield ie(this.fetch,`${this.url}/object/upload/sign/${t}`,{},{headers:this.headers}),r=new URL(this.url+n.url),i=r.searchParams.get("token");if(!i)throw new K("No token returned by API");return{data:{signedUrl:r.toString(),path:e,token:i},error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}update(e,t,n){return se(this,void 0,void 0,(function*(){return this.uploadOrUpdate("PUT",e,t,n)}))}move(e,t){return se(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}copy(e,t){return se(this,void 0,void 0,(function*(){try{return{data:{path:(yield ie(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers})).Key},error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}createSignedUrl(e,t,n){return se(this,void 0,void 0,(function*(){try{let r=this._getFinalPath(e),i=yield ie(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null==n?void 0:n.transform)?{transform:n.transform}:{}),{headers:this.headers});const o=(null==n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}createSignedUrls(e,t,n){return se(this,void 0,void 0,(function*(){try{const r=yield ie(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return{data:r.map((e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null}))),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}download(e,t){return se(this,void 0,void 0,(function*(){const n=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=r?`?${r}`:"";try{const t=this._getFinalPath(e),r=yield re(this.fetch,`${this.url}/${n}/${t}${i}`,{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&r.push(i);const o=void 0!==(null==t?void 0:t.transform)?"render/image":"object",s=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==s&&r.push(s);let a=r.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${a}`)}}}remove(e){return se(this,void 0,void 0,(function*(){try{return{data:yield oe(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}list(e,t,n){return se(this,void 0,void 0,(function*(){try{const r=Object.assign(Object.assign(Object.assign({},ae),t),{prefix:e||""});return{data:yield ie(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const ue={"X-Client-Info":"storage-js/2.5.5"};var de=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class he{constructor(e,t={},n){this.url=e,this.headers=Object.assign(Object.assign({},ue),t),this.fetch=J(n)}listBuckets(){return de(this,void 0,void 0,(function*(){try{return{data:yield re(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}getBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield re(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}createBucket(e,t={public:!1}){return de(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}updateBucket(e,t){return de(this,void 0,void 0,(function*(){try{const n=yield function(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"PUT",t,r,undefined,n)}))}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers});return{data:n,error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}emptyBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}deleteBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield oe(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}}class fe extends he{constructor(e,t={},n){super(e,t,n)}from(e){return new ce(this.url,this.headers,e,this.fetch)}}let pe="";pe="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";const ge={headers:{"X-Client-Info":`supabase-js-${pe}/2.43.4`}},me={schema:"public"},be={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ye={};const ve=e=>{let t;return t=e||("undefined"==typeof fetch?c.default:fetch),(...e)=>t(...e)},Ae=(e,t,n)=>{const r=ve(n),i="undefined"==typeof Headers?c.Headers:Headers;return(n,o)=>{return s=void 0,a=void 0,c=function*(){var s;const a=null!==(s=yield t())&&void 0!==s?s:e;let l=new i(null==o?void 0:o.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${a}`),r(n,Object.assign(Object.assign({},o),{headers:l}))},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{i(c.next(e))}catch(e){t(e)}}function r(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((c=c.apply(s,a||[])).next())}));var s,a,l,c}},_e="2.64.2",we={"X-Client-Info":`gotrue-js/${_e}`},xe="X-Supabase-Api-Version",ke={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Ee=()=>"undefined"!=typeof document,Se={tested:!1,writable:!1},Oe=()=>{if(!Ee())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(Se.tested)return Se.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Se.tested=!0,Se.writable=!0}catch(e){Se.tested=!0,Se.writable=!1}return Se.writable};function Ce(e){const t={},n=new URL(e);if(n.hash&&"#"===n.hash[0])try{new URLSearchParams(n.hash.substring(1)).forEach(((e,n)=>{t[n]=e}))}catch(e){}return n.searchParams.forEach(((e,n)=>{t[n]=e})),t}const Te=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},Pe=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,Re=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},je=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return n}},Me=async(e,t)=>{await e.removeItem(t)};class De{constructor(){this.promise=new De.promiseConstructor(((e,t)=>{this.resolve=e,this.reject=t}))}}function Le(e){const t=e.split(".");if(3!==t.length)throw new Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const n=t[1];return JSON.parse(function(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n,r,i,o,s,a,l,c="",u=0;for(e=e.replace("-","+").replace("_","/");u>4,r=(15&s)<<4|a>>2,i=(3&a)<<6|l,c+=String.fromCharCode(n),64!=a&&0!=r&&(c+=String.fromCharCode(r)),64!=l&&0!=i&&(c+=String.fromCharCode(i));return c}(n))}function Ne(e){return("0"+e.toString(16)).substr(-2)}async function Ie(e,t,n=!1){const r=function(){const e=new Uint32Array(56);if("undefined"==typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let n="";for(let r=0;r<56;r++)n+=e.charAt(Math.floor(Math.random()*t));return n}return crypto.getRandomValues(e),Array.from(e,Ne).join("")}();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await Re(e,`${t}-code-verifier`,i);const o=await async function(e){if("undefined"==typeof crypto||void 0===crypto.subtle||"undefined"==typeof TextEncoder)return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const t=await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(n);return Array.from(r).map((e=>String.fromCharCode(e))).join("")}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(r);return[o,r===o?"plain":"s256"]}De.promiseConstructor=Promise;const Fe=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class ze extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=n}}function Be(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class $e extends ze{constructor(e,t,n){super(e,t,n),this.name="AuthApiError",this.status=t,this.code=n}}function Ue(e){return Be(e)&&"AuthApiError"===e.name}class We extends ze{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class He extends ze{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}}class Ve extends He{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class qe extends He{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ke extends He{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Qe extends He{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ye extends He{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ge extends He{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Je(e){return Be(e)&&"AuthRetryableFetchError"===e.name}class Xe extends He{constructor(e,t,n){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=n}}function Ze(e){return Be(e)&&"AuthWeakPasswordError"===e.name}const et=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),tt=[502,503,504];async function nt(e){var t;if(!Pe(e))throw new Ge(et(e),0);if(tt.includes(e.status))throw new Ge(et(e),e.status);let n,r;try{n=await e.json()}catch(e){throw new We(et(e),e)}const i=function(e){const t=e.headers.get(xe);if(!t)return null;if(!t.match(Fe))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=ke["2024-01-01"].timestamp&&"object"==typeof n&&n&&"string"==typeof n.code?r=n.code:"object"==typeof n&&n&&"string"==typeof n.error_code&&(r=n.error_code),r){if("weak_password"===r)throw new Xe(et(n),e.status,(null===(t=n.weak_password)||void 0===t?void 0:t.reasons)||[])}else if("object"==typeof n&&n&&"object"==typeof n.weak_password&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0))throw new Xe(et(n),e.status,n.weak_password.reasons);throw new $e(et(n),e.status||500,r)}async function rt(e,t,n,r){var i;const o=Object.assign({},null==r?void 0:r.headers);o[xe]||(o[xe]=ke["2024-01-01"].name),(null==r?void 0:r.jwt)&&(o.Authorization=`Bearer ${r.jwt}`);const s=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(s.redirect_to=r.redirectTo);const a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await async function(e,t,n,r,i,o){const s=((e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))})(t,r,{},o);let a;try{a=await e(n,Object.assign({},s))}catch(e){throw console.error(e),new Ge(et(e),0)}if(a.ok||await nt(a),null==r?void 0:r.noResolveJson)return a;try{return await a.json()}catch(e){await nt(e)}}(e,t,n+a,{headers:o,noResolveJson:null==r?void 0:r.noResolveJson},0,null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(l):{data:Object.assign({},l),error:null}}function it(e){var t;let n=null;var r;return function(e){return e.access_token&&e.refresh_token&&e.expires_in}(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r))),{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function ot(e){const t=it(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0)&&(t.data.weak_password=e.weak_password),t}function st(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function at(e){return{data:e,error:null}}function lt(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=e,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&(h.forEach((e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),n=JSON.parse(e.split(";")[1].split("=")[1]);l[`${n}Page`]=t})),l.total=parseInt(d)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(e){if(Be(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){try{return await rt(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:st})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){try{return await rt(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:st})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){try{return await rt(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:st})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){try{const{data:t,error:n}=await rt(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _deleteFactor(e){try{return{data:await rt(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(Be(e))return{data:null,error:e};throw e}}}const dt={getItem:e=>Oe()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Oe()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Oe()&&globalThis.localStorage.removeItem(e)}};function ht(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const ft={debug:!!(globalThis&&Oe()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class pt extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class gt extends pt{}async function mt(e,t,n){ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout((()=>{r.abort(),ft.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)}),t),await globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},(async r=>{if(!r){if(0===t)throw ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new gt(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ft.debug)try{const e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null," "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await n()}finally{ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}))}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();const bt={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:we,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},yt=3e4;async function vt(e,t,n){return await n()}class At{constructor(e){var t,n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=At.nextInstanceID,At.nextInstanceID+=1,this.instanceID>0&&Ee()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},bt),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new ut({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=Te(r.fetch),this.lock=r.lock||vt,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:Ee()&&(null===(t=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=mt:this.lock=vt,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:Oe()?this.storage=dt:(this.memoryStorage={},this.storage=ht(this.memoryStorage)):(this.memoryStorage={},this.storage=ht(this.memoryStorage)),Ee()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",(async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${_e}) ${(new Date).toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,(async()=>await this._initialize())))()),await this.initializePromise}async _initialize(){try{const e=!!Ee()&&await this._isPKCEFlow();if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:n}=await this._getSessionFromURL(e);if(n)return this._debug("#_initialize()","error detecting session from URL",n),"Identity is already linked"===(null==n?void 0:n.message)||"Identity is already linked to another user"===(null==n?void 0:n.message)||await this._removeSession(),{error:n};const{session:r,redirectType:i}=t;return this._debug("#_initialize()","detected session in URL",r,"redirect type",i),await this._saveSession(r),setTimeout((async()=>{"recovery"===i?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)}),0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return Be(e)?{error:e}:{error:new We("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,n,r;try{await this._removeSession();const i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(n=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==n?n:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:it}),{data:o,error:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,n,r;try{let i;if(await this._removeSession(),"email"in e){const{email:n,password:r,options:o}=e;let s=null,a=null;"pkce"===this.flowType&&([s,a]=await Ie(this.storage,this.storageKey)),i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==o?void 0:o.emailRedirectTo,body:{email:n,password:r,data:null!==(t=null==o?void 0:o.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken},code_challenge:s,code_challenge_method:a},xform:it})}else{if(!("phone"in e))throw new Ke("You must provide either an email or phone number and a password");{const{phone:t,password:o,options:s}=e;i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:o,data:null!==(n=null==s?void 0:s.data)&&void 0!==n?n:{},channel:null!==(r=null==s?void 0:s.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:it})}}const{data:o,error:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if(await this._removeSession(),"email"in e){const{email:n,password:r,options:i}=e;t=await rt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ot})}else{if(!("phone"in e))throw new Ke("You must provide either an email or phone number and a password");{const{phone:n,password:r,options:i}=e;t=await rt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ot})}}const{data:n,error:r}=t;return r?{data:{user:null,session:null},error:r}:n&&n.session&&n.user?(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r}):{data:{user:null,session:null},error:new qe}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,n,r,i;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,(async()=>this._exchangeCodeForSession(e)))}async _exchangeCodeForSession(e){const t=await je(this.storage,`${this.storageKey}-code-verifier`),[n,r]=(null!=t?t:"").split("/"),{data:i,error:o}=await rt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:it});return await Me(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:i&&i.session&&i.user?(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:null!=r?r:null}),error:o}):{data:{user:null,session:null,redirectType:null},error:new qe}}async signInWithIdToken(e){await this._removeSession();try{const{options:t,provider:n,token:r,access_token:i,nonce:o}=e,s=await rt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:it}),{data:a,error:l}=s;return l?{data:{user:null,session:null},error:l}:a&&a.session&&a.user?(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:a,error:l}):{data:{user:null,session:null},error:new qe}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,n,r,i,o;try{if(await this._removeSession(),"email"in e){const{email:r,options:i}=e;let o=null,s=null;"pkce"===this.flowType&&([o,s]=await Ie(this.storage,this.storageKey));const{error:a}=await rt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{},create_user:null===(n=null==i?void 0:i.shouldCreateUser)||void 0===n||n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:o,code_challenge_method:s},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){const{phone:t,options:n}=e,{data:s,error:a}=await rt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null==n?void 0:n.data)&&void 0!==r?r:{},create_user:null===(i=null==n?void 0:n.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==n?void 0:n.captchaToken},channel:null!==(o=null==n?void 0:n.channel)&&void 0!==o?o:"sms"}});return{data:{user:null,session:null,messageId:null==s?void 0:s.message_id},error:a}}throw new Ke("You must provide either an email or phone number.")}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,n;try{let r,i;"email_change"!==e.type&&"phone_change"!==e.type&&await this._removeSession(),"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(n=e.options)||void 0===n?void 0:n.captchaToken);const{data:o,error:s}=await rt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:it});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const a=o.session,l=o.user;return(null==a?void 0:a.access_token)&&(await this._saveSession(a),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,n,r;try{await this._removeSession();let i=null,o=null;return"pkce"===this.flowType&&([i,o]=await Ie(this.storage,this.storageKey)),await rt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==n?n:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:at})}catch(e){if(Be(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._reauthenticate()))}async _reauthenticate(){try{return await this._useSession((async e=>{const{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new Ve;const{error:r}=await rt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}}))}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{"email_change"!=e.type&&"phone_change"!=e.type&&await this._removeSession();const t=`${this.url}/resend`;if("email"in e){const{email:n,type:r,options:i}=e,{error:o}=await rt(this.fetch,"POST",t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}if("phone"in e){const{phone:n,type:r,options:i}=e,{data:o,error:s}=await rt(this.fetch,"POST",t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:s}}throw new Ke("You must provide either an email or phone number and a type")}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,(async()=>this._useSession((async e=>e))))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch(e){}})()),n}return await this.lock(`lock:${this.storageKey}`,e,(async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){const e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=await je(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=!!e.expires_at&&e.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.storage.isServer){const t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,n,r)=>(t||"user"!==n||console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(e,n,r))})}return{data:{session:e},error:null}}const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,(async()=>await this._getUser())))}async _getUser(e){try{return e?await rt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:st}):await this._useSession((async e=>{var t,n,r;const{data:i,error:o}=e;if(o)throw o;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await rt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0,xform:st}):{data:{user:null},error:new Ve}}))}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._updateUser(e,t)))}async _updateUser(e,t={}){try{return await this._useSession((async n=>{const{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new Ve;const o=r.session;let s=null,a=null;"pkce"===this.flowType&&null!=e.email&&([s,a]=await Ie(this.storage,this.storageKey));const{data:l,error:c}=await rt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:a}),jwt:o.access_token,xform:st});if(c)throw c;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}}))}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}_decodeJWT(e){return Le(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._setSession(e)))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Ve;const t=Date.now()/1e3;let n=t,r=!0,i=null;const o=Le(e.access_token);if(o.exp&&(n=o.exp,r=n<=t),r){const{session:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return{data:{user:null,session:null},error:n};if(!t)return{data:{user:null,session:null},error:null};i=t}else{const{data:r,error:o}=await this._getUser(e.access_token);if(o)throw o;i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(e){if(Be(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._refreshSession(e)))}async _refreshSession(e){try{return await this._useSession((async t=>{var n;if(!e){const{data:r,error:i}=t;if(i)throw i;e=null!==(n=r.session)&&void 0!==n?n:void 0}if(!(null==e?void 0:e.refresh_token))throw new Ve;const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}}))}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e){try{if(!Ee())throw new Qe("No browser detected.");if("implicit"===this.flowType&&!this._isImplicitGrantFlow())throw new Qe("Not a valid implicit grant flow url.");if("pkce"==this.flowType&&!e)throw new Ye("Not a valid PKCE flow url.");const t=Ce(window.location.href);if(e){if(!t.code)throw new Ye("No code detected.");const{data:e,error:n}=await this._exchangeCodeForSession(t.code);if(n)throw n;const r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:e.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new Qe(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:o,expires_in:s,expires_at:a,token_type:l}=t;if(!(i&&s&&o&&l))throw new Qe("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(s);let d=c+u;a&&(d=parseInt(a));const h=d-c;1e3*h<=yt&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${u}s`);const f=d-u;c-f>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",f,d,c):c-f<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",f,d,c);const{data:p,error:g}=await this._getUser(i);if(g)throw g;const m={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:o,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:m,redirectType:t.type},error:null}}catch(e){if(Be(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantFlow(){const e=Ce(window.location.href);return!(!Ee()||!e.access_token&&!e.error_description)}async _isPKCEFlow(){const e=Ce(window.location.href),t=await je(this.storage,`${this.storageKey}-code-verifier`);return!(!e.code||!t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._signOut(e)))}async _signOut({scope:e}={scope:"global"}){return await this._useSession((async t=>{var n;const{data:r,error:i}=t;if(i)return{error:i};const o=null===(n=r.session)||void 0===n?void 0:n.access_token;if(o){const{error:t}=await this.admin.signOut(o,e);if(t&&(!Ue(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(await this._removeSession(),await Me(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}}))}onAuthStateChange(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),n={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,await this._acquireLock(-1,(async()=>{this._emitInitialSession(t)}))})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession((async t=>{var n,r;try{const{data:{session:r},error:i}=t;if(i)throw i;await(null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await(null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}}))}async resetPasswordForEmail(e,t={}){let n=null,r=null;"pkce"===this.flowType&&([n,r]=await Ie(this.storage,this.storageKey,!0));try{return await rt(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(Be(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{const{data:t,error:n}=await this.getUser();if(n)throw n;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(Be(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{const{data:n,error:r}=await this._useSession((async t=>{var n,r,i,o,s;const{data:a,error:l}=t;if(l)throw l;const c=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(n=e.options)||void 0===n?void 0:n.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await rt(this.fetch,"GET",c,{headers:this.headers,jwt:null!==(s=null===(o=a.session)||void 0===o?void 0:o.access_token)&&void 0!==s?s:void 0})}));if(r)throw r;return Ee()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null==n?void 0:n.url),{data:{provider:e.provider,url:null==n?void 0:n.url},error:null}}catch(t){if(Be(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession((async t=>{var n,r;const{data:i,error:o}=t;if(o)throw o;return await rt(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const i=Date.now();return await(n=async n=>(n>0&&await async function(e){return await new Promise((t=>{setTimeout((()=>t(null)),e)}))}(200*Math.pow(2,n-1)),this._debug(t,"refreshing attempt",n),await rt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:it})),r=(e,t)=>{const n=200*Math.pow(2,e);return t&&Je(t)&&Date.now()+n-i{(async()=>{for(let i=0;i<1/0;i++)try{const t=await n(i);if(!r(i,null))return void e(t)}catch(e){if(!r(i,e))return void t(e)}})()})))}catch(e){if(this._debug(t,"error",e),Be(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}var n,r}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",n),Ee()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e;const t="#_recoverAndRefresh()";this._debug(t,"begin");try{const n=await je(this.storage,this.storageKey);if(this._debug(t,"session from storage",n),!this._isValidSession(n))return this._debug(t,"session is not valid"),void(null!==n&&await this._removeSession());const r=Math.round(Date.now()/1e3),i=(null!==(e=n.expires_at)&&void 0!==e?e:1/0){try{await n.callback(e,t)}catch(e){r.push(e)}}));if(await Promise.all(i),r.length>0){for(let e=0;ethis._autoRefreshTokenTick()),yt);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout((async()=>{await this.initializePromise,await this._autoRefreshTokenTick()}),0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,(async()=>{try{const e=Date.now();try{return await this._useSession((async t=>{const{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const r=Math.floor((1e3*n.expires_at-e)/yt);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)}))}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(!(e.isAcquireTimeout||e instanceof pt))throw e;this._debug("auto refresh token tick lock not available")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ee()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,(async()=>{"visible"===document.visibilityState?await this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")})))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){const r=[`provider=${encodeURIComponent(t)}`];if((null==n?void 0:n.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),(null==n?void 0:n.scopes)&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),"pkce"===this.flowType){const[e,t]=await Ie(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(n.toString())}if(null==n?void 0:n.queryParams){const e=new URLSearchParams(n.queryParams);r.push(e.toString())}return(null==n?void 0:n.skipBrowserRedirect)&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;return i?{data:null,error:i}:await rt(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession((async t=>{var n,r;const{data:i,error:o}=t;if(o)return{data:null,error:o};const{data:s,error:a}=await rt(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:null===(n=null==i?void 0:i.session)||void 0===n?void 0:n.access_token});return a?{data:null,error:a}:((null===(r=null==s?void 0:s.totp)||void 0===r?void 0:r.qr_code)&&(s.totp.qr_code=`data:image/svg+xml;utf-8,${s.totp.qr_code}`),{data:s,error:null})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;if(i)return{data:null,error:i};const{data:o,error:s}=await rt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token});return s?{data:null,error:s}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:s})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}))}async _challenge(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;return i?{data:null,error:i}:await rt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}))}async _challengeAndVerify(e){const{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const n=(null==e?void 0:e.factors)||[],r=n.filter((e=>"totp"===e.factor_type&&"verified"===e.status));return{data:{all:n,totp:r},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,(async()=>await this._useSession((async e=>{var t,n;const{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(r.access_token);let s=null;o.aal&&(s=o.aal);let a=s;return(null!==(n=null===(t=r.user.factors)||void 0===t?void 0:t.filter((e=>"verified"===e.status)))&&void 0!==n?n:[]).length>0&&(a="aal2"),{data:{currentLevel:s,nextLevel:a,currentAuthenticationMethods:o.amr||[]},error:null}}))))}}At.nextInstanceID=0;const _t=ut,wt=At;class xt extends wt{constructor(e){super(e)}}class kt{constructor(e,t,n){var r,i,o;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const s=e.replace(/\/$/,"");this.realtimeUrl=`${s}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${s}/auth/v1`,this.storageUrl=`${s}/storage/v1`,this.functionsUrl=`${s}/functions/v1`;const a=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,l=function(e,t){const{db:n,auth:r,realtime:i,global:o}=e,{db:s,auth:a,realtime:l,global:c}=t;return{db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},a),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},c),o)}}(null!=n?n:{},{db:me,realtime:ye,auth:Object.assign(Object.assign({},be),{storageKey:a}),global:ge});this.storageKey=null!==(r=l.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},this.auth=this._initSupabaseAuthClient(null!==(o=l.auth)&&void 0!==o?o:{},this.headers,l.global.fetch),this.fetch=Ae(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},l.realtime)),this.rest=new m(`${s}/rest/v1`,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new l(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new fe(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t,n,r,i,o;return n=this,r=void 0,o=function*(){const{data:n}=yield this.auth.getSession();return null!==(t=null===(e=n.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null},new((i=void 0)||(i=Promise))((function(e,t){function s(e){try{l(o.next(e))}catch(e){t(e)}}function a(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}l((o=o.apply(n,r||[])).next())}))}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,storageKey:i,flowType:o,debug:s},a,l){var c;const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new xt({url:this.authUrl,headers:Object.assign(Object.assign({},u),a),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,flowType:o,debug:s,fetch:l,hasCustomAuthorizationHeader:null!==(c="Authorization"in this.headers)&&void 0!==c&&c})}_initRealtimeClient(e){return new V(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange(((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)}))}_handleTokenChanged(e,t,n){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===n?"SIGNED_OUT"===e&&(this.realtime.setAuth(this.supabaseKey),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):(this.realtime.setAuth(null!=n?n:null),this.changedAccessToken=n)}}const Et=(e,t,n)=>new kt(e,t,n)},8736:function(e){e.exports=function(){"use strict";const e=new Map,t={set(t,n,r){e.has(t)||e.set(t,new Map);const i=e.get(t);i.has(n)||0===i.size?i.set(n,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const r=e.get(t);r.delete(n),0===r.size&&e.delete(t)}},n="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),i=e=>{e.dispatchEvent(new Event(n))},o=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),s=e=>o(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,a=e=>{if(!o(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},l=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),c=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?c(e.parentNode):null},u=()=>{},d=e=>{e.offsetHeight},h=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,g=e=>{var t;t=()=>{const t=h();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of f)e()})),f.push(t)):t()},m=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,b=(e,t,r=!0)=>{if(!r)return void m(e);const o=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let s=!1;const a=({target:r})=>{r===t&&(s=!0,t.removeEventListener(n,a),m(e))};t.addEventListener(n,a),setTimeout((()=>{s||i(t)}),o)},y=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},v=/[^.]*(?=\..*)\.|.*/,A=/\..*/,_=/::\d+$/,w={};let x=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},E=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function S(e,t){return t&&`${t}::${x++}`||e.uidEvent||x++}function O(e){const t=S(e);return e.uidEvent=t,w[t]=w[t]||{},w[t]}function C(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function T(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=M(e);return E.has(o)||(o=e),[r,i,o]}function P(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=T(t,n,r);if(t in k){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=O(e),c=l[a]||(l[a]={}),u=C(c,s,o?n:null);if(u)return void(u.oneOff=u.oneOff&&i);const d=S(s,t.replace(v,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return L(i,{delegateTarget:s}),r.oneOff&&D.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return L(r,{delegateTarget:e}),n.oneOff&&D.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function R(e,t,n,r,i){const o=C(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function j(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&R(e,t,n,s.callable,s.delegationSelector)}function M(e){return e=e.replace(A,""),k[e]||e}const D={on(e,t,n,r){P(e,t,n,r,!1)},one(e,t,n,r){P(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=T(t,n,r),a=s!==t,l=O(e),c=l[s]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))j(e,l,n,t.slice(1));for(const[n,r]of Object.entries(c)){const i=n.replace(_,"");a&&!t.includes(i)||R(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(c).length)return;R(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=h();let i=null,o=!0,s=!0,a=!1;t!==M(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=L(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function L(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function N(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function I(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const F={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${I(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${I(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=N(e.dataset[r])}return t},getDataAttribute:(e,t)=>N(e.getAttribute(`data-bs-${I(t)}`))};class z{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=o(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...o(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const t=e[r],s=o(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${i}".`)}var n}}class B extends z{constructor(e,n){super(),(e=s(e))&&(this._element=e,this._config=this._getConfig(n),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),D.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){b(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(s(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const $=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>r(e))).join(","):null},U={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!l(e)&&a(e)))},getSelectorFromElement(e){const t=$(e);return t&&U.findOne(t)?t:null},getElementFromSelector(e){const t=$(e);return t?U.findOne(t):null},getMultipleElementsFromSelector(e){const t=$(e);return t?U.find(t):[]}},W=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;D.on(document,n,`[data-bs-dismiss="${r}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),l(this))return;const i=U.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))},H=".bs.alert",V=`close${H}`,q=`closed${H}`;class K extends B{static get NAME(){return"alert"}close(){if(D.trigger(this._element,V).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),D.trigger(this._element,q),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=K.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}W(K,"close"),g(K);const Q='[data-bs-toggle="button"]';class Y extends B{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=Y.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}D.on(document,"click.bs.button.data-api",Q,(e=>{e.preventDefault();const t=e.target.closest(Q);Y.getOrCreateInstance(t).toggle()})),g(Y);const G=".bs.swipe",J=`touchstart${G}`,X=`touchmove${G}`,Z=`touchend${G}`,ee=`pointerdown${G}`,te=`pointerup${G}`,ne={endCallback:null,leftCallback:null,rightCallback:null},re={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ie extends z{constructor(e,t){super(),this._element=e,e&&ie.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ne}static get DefaultType(){return re}static get NAME(){return"swipe"}dispose(){D.off(this._element,G)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),m(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&m(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(D.on(this._element,ee,(e=>this._start(e))),D.on(this._element,te,(e=>this._end(e))),this._element.classList.add("pointer-event")):(D.on(this._element,J,(e=>this._start(e))),D.on(this._element,X,(e=>this._move(e))),D.on(this._element,Z,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const oe=".bs.carousel",se=".data-api",ae="next",le="prev",ce="left",ue="right",de=`slide${oe}`,he=`slid${oe}`,fe=`keydown${oe}`,pe=`mouseenter${oe}`,ge=`mouseleave${oe}`,me=`dragstart${oe}`,be=`load${oe}${se}`,ye=`click${oe}${se}`,ve="carousel",Ae="active",_e=".active",we=".carousel-item",xe=_e+we,ke={ArrowLeft:ue,ArrowRight:ce},Ee={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Oe extends B{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ve&&this.cycle()}static get Default(){return Ee}static get DefaultType(){return Se}static get NAME(){return"carousel"}next(){this._slide(ae)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(le)}pause(){this._isSliding&&i(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?D.one(this._element,he,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void D.one(this._element,he,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?ae:le;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&D.on(this._element,fe,(e=>this._keydown(e))),"hover"===this._config.pause&&(D.on(this._element,pe,(()=>this.pause())),D.on(this._element,ge,(()=>this._maybeEnableCycle()))),this._config.touch&&ie.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of U.find(".carousel-item img",this._element))D.on(e,me,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(ce)),rightCallback:()=>this._slide(this._directionToOrder(ue)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new ie(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ke[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=U.findOne(_e,this._indicatorsElement);t.classList.remove(Ae),t.removeAttribute("aria-current");const n=U.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Ae),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===ae,i=t||y(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>D.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(de).defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",c=r?"carousel-item-next":"carousel-item-prev";i.classList.add(c),d(i),n.classList.add(l),i.classList.add(l),this._queueCallback((()=>{i.classList.remove(l,c),i.classList.add(Ae),n.classList.remove(Ae,c,l),this._isSliding=!1,s(he)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return U.findOne(xe,this._element)}_getItems(){return U.find(we,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return p()?e===ce?le:ae:e===ce?ae:le}_orderToDirection(e){return p()?e===le?ce:ue:e===le?ue:ce}static jQueryInterface(e){return this.each((function(){const t=Oe.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}D.on(document,ye,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=U.getElementFromSelector(this);if(!t||!t.classList.contains(ve))return;e.preventDefault();const n=Oe.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),D.on(window,be,(()=>{const e=U.find('[data-bs-ride="carousel"]');for(const t of e)Oe.getOrCreateInstance(t)})),g(Oe);const Ce=".bs.collapse",Te=`show${Ce}`,Pe=`shown${Ce}`,Re=`hide${Ce}`,je=`hidden${Ce}`,Me=`click${Ce}.data-api`,De="show",Le="collapse",Ne="collapsing",Ie=`:scope .${Le} .${Le}`,Fe='[data-bs-toggle="collapse"]',ze={parent:null,toggle:!0},Be={parent:"(null|element)",toggle:"boolean"};class $e extends B{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=U.find(Fe);for(const e of n){const t=U.getSelectorFromElement(e),n=U.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ze}static get DefaultType(){return Be}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>$e.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(D.trigger(this._element,Te).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(Le),this._element.classList.add(Ne),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ne),this._element.classList.add(Le,De),this._element.style[t]="",D.trigger(this._element,Pe)}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(D.trigger(this._element,Re).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,d(this._element),this._element.classList.add(Ne),this._element.classList.remove(Le,De);for(const e of this._triggerArray){const t=U.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ne),this._element.classList.add(Le),D.trigger(this._element,je)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(De)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=s(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Fe);for(const t of e){const e=U.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=U.find(Ie,this._config.parent);return U.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=$e.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}D.on(document,Me,Fe,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of U.getMultipleElementsFromSelector(this))$e.getOrCreateInstance(e,{toggle:!1}).toggle()})),g($e);var Ue="top",We="bottom",He="right",Ve="left",qe="auto",Ke=[Ue,We,He,Ve],Qe="start",Ye="end",Ge="clippingParents",Je="viewport",Xe="popper",Ze="reference",et=Ke.reduce((function(e,t){return e.concat([t+"-"+Qe,t+"-"+Ye])}),[]),tt=[].concat(Ke,[qe]).reduce((function(e,t){return e.concat([t,t+"-"+Qe,t+"-"+Ye])}),[]),nt="beforeRead",rt="read",it="afterRead",ot="beforeMain",st="main",at="afterMain",lt="beforeWrite",ct="write",ut="afterWrite",dt=[nt,rt,it,ot,st,at,lt,ct,ut];function ht(e){return e?(e.nodeName||"").toLowerCase():null}function ft(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pt(e){return e instanceof ft(e).Element||e instanceof Element}function gt(e){return e instanceof ft(e).HTMLElement||e instanceof HTMLElement}function mt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ft(e).ShadowRoot||e instanceof ShadowRoot)}const bt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];gt(i)&&ht(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});gt(r)&&ht(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function yt(e){return e.split("-")[0]}var vt=Math.max,At=Math.min,_t=Math.round;function wt(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function xt(){return!/^((?!chrome|android).)*safari/i.test(wt())}function kt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&>(e)&&(i=e.offsetWidth>0&&_t(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_t(r.height)/e.offsetHeight||1);var s=(pt(e)?ft(e):window).visualViewport,a=!xt()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Et(e){var t=kt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function St(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&mt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ot(e){return ft(e).getComputedStyle(e)}function Ct(e){return["table","td","th"].indexOf(ht(e))>=0}function Tt(e){return((pt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pt(e){return"html"===ht(e)?e:e.assignedSlot||e.parentNode||(mt(e)?e.host:null)||Tt(e)}function Rt(e){return gt(e)&&"fixed"!==Ot(e).position?e.offsetParent:null}function jt(e){for(var t=ft(e),n=Rt(e);n&&Ct(n)&&"static"===Ot(n).position;)n=Rt(n);return n&&("html"===ht(n)||"body"===ht(n)&&"static"===Ot(n).position)?t:n||function(e){var t=/firefox/i.test(wt());if(/Trident/i.test(wt())&>(e)&&"fixed"===Ot(e).position)return null;var n=Pt(e);for(mt(n)&&(n=n.host);gt(n)&&["html","body"].indexOf(ht(n))<0;){var r=Ot(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Mt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dt(e,t,n){return vt(e,At(t,n))}function Lt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Nt(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const It={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=yt(n.placement),l=Mt(a),c=[Ve,He].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return Lt("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Nt(e,Ke))}(i.padding,n),d=Et(o),h="y"===l?Ue:Ve,f="y"===l?We:He,p=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],m=jt(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,v=u[h],A=b-d[c]-u[f],_=b/2-d[c]/2+y,w=Dt(v,_,A),x=l;n.modifiersData[r]=((t={})[x]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&St(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ft(e){return e.split("-")[1]}var zt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bt(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,g=void 0===p?0:p,m="function"==typeof u?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=Ve,A=Ue,_=window;if(c){var w=jt(n),x="clientHeight",k="clientWidth";w===ft(n)&&"static"!==Ot(w=Tt(n)).position&&"absolute"===a&&(x="scrollHeight",k="scrollWidth"),(i===Ue||(i===Ve||i===He)&&o===Ye)&&(A=We,g-=(d&&w===_&&_.visualViewport?_.visualViewport.height:w[x])-r.height,g*=l?1:-1),i!==Ve&&(i!==Ue&&i!==We||o!==Ye)||(v=He,f-=(d&&w===_&&_.visualViewport?_.visualViewport.width:w[k])-r.width,f*=l?1:-1)}var E,S=Object.assign({position:a},c&&zt),O=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_t(n*i)/i||0,y:_t(r*i)/i||0}}({x:f,y:g},ft(n)):{x:f,y:g};return f=O.x,g=O.y,l?Object.assign({},S,((E={})[A]=y?"0":"",E[v]=b?"0":"",E.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",E)):Object.assign({},S,((t={})[A]=y?g+"px":"",t[v]=b?f+"px":"",t.transform="",t))}const $t={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:yt(t.placement),variation:Ft(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Bt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Bt(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Ut={passive:!0};const Wt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=ft(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ut)})),a&&l.addEventListener("resize",n.update,Ut),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ut)})),a&&l.removeEventListener("resize",n.update,Ut)}},data:{}};var Ht={left:"right",right:"left",bottom:"top",top:"bottom"};function Vt(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ht[e]}))}var qt={start:"end",end:"start"};function Kt(e){return e.replace(/start|end/g,(function(e){return qt[e]}))}function Qt(e){var t=ft(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yt(e){return kt(Tt(e)).left+Qt(e).scrollLeft}function Gt(e){var t=Ot(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Jt(e){return["html","body","#document"].indexOf(ht(e))>=0?e.ownerDocument.body:gt(e)&&Gt(e)?e:Jt(Pt(e))}function Xt(e,t){var n;void 0===t&&(t=[]);var r=Jt(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ft(r),s=i?[o].concat(o.visualViewport||[],Gt(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Xt(Pt(s)))}function Zt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function en(e,t,n){return t===Je?Zt(function(e,t){var n=ft(e),r=Tt(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=xt();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Yt(e),y:l}}(e,n)):pt(t)?function(e,t){var n=kt(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Zt(function(e){var t,n=Tt(e),r=Qt(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=vt(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vt(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Yt(e),l=-r.scrollTop;return"rtl"===Ot(i||n).direction&&(a+=vt(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Tt(e)))}function tn(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?yt(i):null,s=i?Ft(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Ue:t={x:a,y:n.y-r.height};break;case We:t={x:a,y:n.y+n.height};break;case He:t={x:n.x+n.width,y:l};break;case Ve:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Mt(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Qe:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Ye:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function nn(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?Ge:a,c=n.rootBoundary,u=void 0===c?Je:c,d=n.elementContext,h=void 0===d?Xe:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,b=Lt("number"!=typeof m?m:Nt(m,Ke)),y=h===Xe?Ze:Xe,v=e.rects.popper,A=e.elements[p?y:h],_=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=Xt(Pt(e)),n=["absolute","fixed"].indexOf(Ot(e).position)>=0&>(e)?jt(e):e;return pt(n)?t.filter((function(e){return pt(e)&&St(e,n)&&"body"!==ht(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=en(e,n,r);return t.top=vt(i.top,t.top),t.right=At(i.right,t.right),t.bottom=At(i.bottom,t.bottom),t.left=vt(i.left,t.left),t}),en(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(pt(A)?A:A.contextElement||Tt(e.elements.popper),l,u,s),w=kt(e.elements.reference),x=tn({reference:w,element:v,strategy:"absolute",placement:i}),k=Zt(Object.assign({},v,x)),E=h===Xe?k:w,S={top:_.top-E.top+b.top,bottom:E.bottom-_.bottom+b.bottom,left:_.left-E.left+b.left,right:E.right-_.right+b.right},O=e.modifiersData.offset;if(h===Xe&&O){var C=O[i];Object.keys(S).forEach((function(e){var t=[He,We].indexOf(e)>=0?1:-1,n=[Ue,We].indexOf(e)>=0?"y":"x";S[e]+=C[n]*t}))}return S}const rn={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,b=yt(m),y=l||(b!==m&&p?function(e){if(yt(e)===qe)return[];var t=Vt(e);return[Kt(e),t,Kt(t)]}(m):[Vt(m)]),v=[m].concat(y).reduce((function(e,n){return e.concat(yt(n)===qe?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?tt:l,u=Ft(r),d=u?a?et:et.filter((function(e){return Ft(e)===u})):Ke,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=nn(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[yt(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),A=t.rects.reference,_=t.rects.popper,w=new Map,x=!0,k=v[0],E=0;E=0,P=T?"width":"height",R=nn(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),j=T?C?He:Ve:C?We:Ue;A[P]>_[P]&&(j=Vt(j));var M=Vt(j),D=[];if(o&&D.push(R[O]<=0),a&&D.push(R[j]<=0,R[M]<=0),D.every((function(e){return e}))){k=S,x=!1;break}w.set(S,D)}if(x)for(var L=function(e){var t=v.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},N=p?3:1;N>0&&"break"!==L(N);N--);t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function on(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sn(e){return[Ue,He,We,Ve].some((function(t){return e[t]>=0}))}const an={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=nn(t,{elementContext:"reference"}),a=nn(t,{altBoundary:!0}),l=on(s,r),c=on(a,i,o),u=sn(l),d=sn(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},ln={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=tt.reduce((function(e,n){return e[n]=function(e,t,n){var r=yt(e),i=[Ve,Ue].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Ve,He].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},cn={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=tn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},un={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,m=nn(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=yt(t.placement),y=Ft(t.placement),v=!y,A=Mt(b),_="x"===A?"y":"x",w=t.modifiersData.popperOffsets,x=t.rects.reference,k=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(w){if(o){var T,P="y"===A?Ue:Ve,R="y"===A?We:He,j="y"===A?"height":"width",M=w[A],D=M+m[P],L=M-m[R],N=f?-k[j]/2:0,I=y===Qe?x[j]:k[j],F=y===Qe?-k[j]:-x[j],z=t.elements.arrow,B=f&&z?Et(z):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=$[P],W=$[R],H=Dt(0,x[j],B[j]),V=v?x[j]/2-N-H-U-S.mainAxis:I-H-U-S.mainAxis,q=v?-x[j]/2+N+H+W+S.mainAxis:F+H+W+S.mainAxis,K=t.elements.arrow&&jt(t.elements.arrow),Q=K?"y"===A?K.clientTop||0:K.clientLeft||0:0,Y=null!=(T=null==O?void 0:O[A])?T:0,G=M+q-Y,J=Dt(f?At(D,M+V-Y-Q):D,M,f?vt(L,G):L);w[A]=J,C[A]=J-M}if(a){var X,Z="x"===A?Ue:Ve,ee="x"===A?We:He,te=w[_],ne="y"===_?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[Ue,Ve].indexOf(b),se=null!=(X=null==O?void 0:O[_])?X:0,ae=oe?re:te-x[ne]-k[ne]-se+S.altAxis,le=oe?te+x[ne]+k[ne]-se-S.altAxis:ie,ce=f&&oe?function(e,t,n){var r=Dt(e,t,n);return r>n?n:r}(ae,te,le):Dt(f?ae:re,te,f?le:ie);w[_]=ce,C[_]=ce-te}t.modifiersData[r]=C}},requiresIfExists:["offset"]};function dn(e,t,n){void 0===n&&(n=!1);var r,i,o=gt(t),s=gt(t)&&function(e){var t=e.getBoundingClientRect(),n=_t(t.width)/e.offsetWidth||1,r=_t(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=Tt(t),l=kt(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==ht(t)||Gt(a))&&(c=(r=t)!==ft(r)&>(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Qt(r)),gt(t)?((u=kt(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=Yt(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function hn(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var fn={placement:"bottom",modifiers:[],strategy:"absolute"};function pn(){for(var e=arguments.length,t=new Array(e),n=0;nNumber.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...m(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>a(e)));n.length&&y(n,t,e===kn,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Hn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=U.find(Dn);for(const n of t){const t=Hn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[xn,kn].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(Mn)?this:U.prev(this,Mn)[0]||U.next(this,Mn)[0]||U.findOne(Mn,e.delegateTarget.parentNode),o=Hn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}D.on(document,Pn,Mn,Hn.dataApiKeydownHandler),D.on(document,Pn,Ln,Hn.dataApiKeydownHandler),D.on(document,Tn,Hn.clearMenus),D.on(document,Rn,Hn.clearMenus),D.on(document,Tn,Mn,(function(e){e.preventDefault(),Hn.getOrCreateInstance(this).toggle()})),g(Hn);const Vn="backdrop",qn="show",Kn=`mousedown.bs.${Vn}`,Qn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Yn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Gn extends z{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Qn}static get DefaultType(){return Yn}static get NAME(){return Vn}show(e){if(!this._config.isVisible)return void m(e);this._append();const t=this._getElement();this._config.isAnimated&&d(t),t.classList.add(qn),this._emulateAnimation((()=>{m(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(qn),this._emulateAnimation((()=>{this.dispose(),m(e)}))):m(e)}dispose(){this._isAppended&&(D.off(this._element,Kn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=s(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),D.on(e,Kn,(()=>{m(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){b(e,this._getElement(),this._config.isAnimated)}}const Jn=".bs.focustrap",Xn=`focusin${Jn}`,Zn=`keydown.tab${Jn}`,er="backward",tr={autofocus:!0,trapElement:null},nr={autofocus:"boolean",trapElement:"element"};class rr extends z{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),D.off(document,Jn),D.on(document,Xn,(e=>this._handleFocusin(e))),D.on(document,Zn,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,D.off(document,Jn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=U.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===er?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?er:"forward")}}const ir=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",or=".sticky-top",sr="padding-right",ar="margin-right";class lr{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,sr,(t=>t+e)),this._setElementAttributes(ir,sr,(t=>t+e)),this._setElementAttributes(or,ar,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,sr),this._resetElementAttributes(ir,sr),this._resetElementAttributes(or,ar)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&F.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=F.getDataAttribute(e,t);null!==n?(F.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(o(e))t(e);else for(const n of U.find(e,this._element))t(n)}}const cr=".bs.modal",ur=`hide${cr}`,dr=`hidePrevented${cr}`,hr=`hidden${cr}`,fr=`show${cr}`,pr=`shown${cr}`,gr=`resize${cr}`,mr=`click.dismiss${cr}`,br=`mousedown.dismiss${cr}`,yr=`keydown.dismiss${cr}`,vr=`click${cr}.data-api`,Ar="modal-open",_r="show",wr="modal-static",xr={backdrop:!0,focus:!0,keyboard:!0},kr={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Er extends B{constructor(e,t){super(e,t),this._dialog=U.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new lr,this._addEventListeners()}static get Default(){return xr}static get DefaultType(){return kr}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||D.trigger(this._element,fr,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ar),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(D.trigger(this._element,ur).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(_r),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){D.off(window,cr),D.off(this._dialog,cr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Gn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new rr({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=U.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),d(this._element),this._element.classList.add(_r),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,D.trigger(this._element,pr,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){D.on(this._element,yr,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),D.on(window,gr,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),D.on(this._element,br,(e=>{D.one(this._element,mr,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ar),this._resetAdjustments(),this._scrollBar.reset(),D.trigger(this._element,hr)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(D.trigger(this._element,dr).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(wr)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(wr),this._queueCallback((()=>{this._element.classList.remove(wr),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=p()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=p()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Er.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}D.on(document,vr,'[data-bs-toggle="modal"]',(function(e){const t=U.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),D.one(t,fr,(e=>{e.defaultPrevented||D.one(t,hr,(()=>{a(this)&&this.focus()}))}));const n=U.findOne(".modal.show");n&&Er.getInstance(n).hide(),Er.getOrCreateInstance(t).toggle(this)})),W(Er),g(Er);const Sr=".bs.offcanvas",Or=".data-api",Cr=`load${Sr}${Or}`,Tr="show",Pr="showing",Rr="hiding",jr=".offcanvas.show",Mr=`show${Sr}`,Dr=`shown${Sr}`,Lr=`hide${Sr}`,Nr=`hidePrevented${Sr}`,Ir=`hidden${Sr}`,Fr=`resize${Sr}`,zr=`click${Sr}${Or}`,Br=`keydown.dismiss${Sr}`,$r={backdrop:!0,keyboard:!0,scroll:!1},Ur={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Wr extends B{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return $r}static get DefaultType(){return Ur}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||D.trigger(this._element,Mr,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new lr).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Pr),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Tr),this._element.classList.remove(Pr),D.trigger(this._element,Dr,{relatedTarget:e})}),this._element,!0))}hide(){this._isShown&&(D.trigger(this._element,Lr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Rr),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Tr,Rr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new lr).reset(),D.trigger(this._element,Ir)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Gn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():D.trigger(this._element,Nr)}:null})}_initializeFocusTrap(){return new rr({trapElement:this._element})}_addEventListeners(){D.on(this._element,Br,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():D.trigger(this._element,Nr))}))}static jQueryInterface(e){return this.each((function(){const t=Wr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}D.on(document,zr,'[data-bs-toggle="offcanvas"]',(function(e){const t=U.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),l(this))return;D.one(t,Ir,(()=>{a(this)&&this.focus()}));const n=U.findOne(jr);n&&n!==t&&Wr.getInstance(n).hide(),Wr.getOrCreateInstance(t).toggle(this)})),D.on(window,Cr,(()=>{for(const e of U.find(jr))Wr.getOrCreateInstance(e).show()})),D.on(window,Fr,(()=>{for(const e of U.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Wr.getOrCreateInstance(e).hide()})),W(Wr),g(Wr);const Hr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Vr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),qr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Kr=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Vr.has(n)||Boolean(qr.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},Qr={allowList:Hr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},Yr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Gr={entry:"(string|element|function|null)",selector:"(string|element)"};class Jr extends z{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Qr}static get DefaultType(){return Yr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},Gr)}_setContent(e,t,n){const r=U.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?o(t)?this._putElementInTemplate(s(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)Kr(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return m(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const Xr=new Set(["sanitize","allowList","sanitizeFn"]),Zr="fade",ei="show",ti=".modal",ni="hide.bs.modal",ri="hover",ii="focus",oi={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},si={allowList:Hr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'
',title:"",trigger:"hover focus"},ai={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class li extends B{constructor(e,t){if(void 0===vn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return si}static get DefaultType(){return ai}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),D.off(this._element.closest(ti),ni,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=D.trigger(this._element,this.constructor.eventName("show")),t=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),D.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ei),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))D.on(e,"mouseover",u);this._queueCallback((()=>{D.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!D.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ei),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))D.off(e,"mouseover",u);this._activeTrigger.click=!1,this._activeTrigger[ii]=!1,this._activeTrigger[ri]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),D.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Zr,ei),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Zr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Jr({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Zr)}_isShown(){return this.tip&&this.tip.classList.contains(ei)}_createPopper(e){const t=m(this._config.placement,[this,e,this._element]),n=oi[t.toUpperCase()];return yn(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return m(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...m(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)D.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===ri?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===ri?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");D.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?ii:ri]=!0,t._enter()})),D.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?ii:ri]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},D.on(this._element.closest(ti),ni,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=F.getDataAttributes(this._element);for(const e of Object.keys(t))Xr.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:s(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=li.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}g(li);const ci={...li.Default,content:"",offset:[0,8],placement:"right",template:'
',trigger:"click"},ui={...li.DefaultType,content:"(null|string|element|function)"};class di extends li{static get Default(){return ci}static get DefaultType(){return ui}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=di.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}g(di);const hi=".bs.scrollspy",fi=`activate${hi}`,pi=`click${hi}`,gi=`load${hi}.data-api`,mi="active",bi="[href]",yi=".nav-link",vi=`${yi}, .nav-item > ${yi}, .list-group-item`,Ai={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},_i={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class wi extends B{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ai}static get DefaultType(){return _i}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=s(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(D.off(this._config.target,pi),D.on(this._config.target,pi,bi,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=U.find(bi,this._config.target);for(const t of e){if(!t.hash||l(t))continue;const e=U.findOne(decodeURI(t.hash),this._element);a(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(mi),this._activateParents(e),D.trigger(this._element,fi,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))U.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(mi);else for(const t of U.parents(e,".nav, .list-group"))for(const e of U.prev(t,vi))e.classList.add(mi)}_clearActiveClass(e){e.classList.remove(mi);const t=U.find(`${bi}.${mi}`,e);for(const e of t)e.classList.remove(mi)}static jQueryInterface(e){return this.each((function(){const t=wi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}D.on(window,gi,(()=>{for(const e of U.find('[data-bs-spy="scroll"]'))wi.getOrCreateInstance(e)})),g(wi);const xi=".bs.tab",ki=`hide${xi}`,Ei=`hidden${xi}`,Si=`show${xi}`,Oi=`shown${xi}`,Ci=`click${xi}`,Ti=`keydown${xi}`,Pi=`load${xi}`,Ri="ArrowLeft",ji="ArrowRight",Mi="ArrowUp",Di="ArrowDown",Li="Home",Ni="End",Ii="active",Fi="fade",zi="show",Bi=".dropdown-toggle",$i=`:not(${Bi})`,Ui='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Wi=`.nav-link${$i}, .list-group-item${$i}, [role="tab"]${$i}, ${Ui}`,Hi=`.${Ii}[data-bs-toggle="tab"], .${Ii}[data-bs-toggle="pill"], .${Ii}[data-bs-toggle="list"]`;class Vi extends B{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),D.on(this._element,Ti,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?D.trigger(t,ki,{relatedTarget:e}):null;D.trigger(e,Si,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(Ii),this._activate(U.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),D.trigger(e,Oi,{relatedTarget:t})):e.classList.add(zi)}),e,e.classList.contains(Fi)))}_deactivate(e,t){e&&(e.classList.remove(Ii),e.blur(),this._deactivate(U.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),D.trigger(e,Ei,{relatedTarget:t})):e.classList.remove(zi)}),e,e.classList.contains(Fi)))}_keydown(e){if(![Ri,ji,Mi,Di,Li,Ni].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!l(e)));let n;if([Li,Ni].includes(e.key))n=t[e.key===Li?0:t.length-1];else{const r=[ji,Di].includes(e.key);n=y(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Vi.getOrCreateInstance(n).show())}_getChildren(){return U.find(Wi,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=U.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=U.findOne(e,n);i&&i.classList.toggle(r,t)};r(Bi,Ii),r(".dropdown-menu",zi),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Ii)}_getInnerElement(e){return e.matches(Wi)?e:U.findOne(Wi,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Vi.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}D.on(document,Ci,Ui,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),l(this)||Vi.getOrCreateInstance(this).show()})),D.on(window,Pi,(()=>{for(const e of U.find(Hi))Vi.getOrCreateInstance(e)})),g(Vi);const qi=".bs.toast",Ki=`mouseover${qi}`,Qi=`mouseout${qi}`,Yi=`focusin${qi}`,Gi=`focusout${qi}`,Ji=`hide${qi}`,Xi=`hidden${qi}`,Zi=`show${qi}`,eo=`shown${qi}`,to="hide",no="show",ro="showing",io={animation:"boolean",autohide:"boolean",delay:"number"},oo={animation:!0,autohide:!0,delay:5e3};class so extends B{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return oo}static get DefaultType(){return io}static get NAME(){return"toast"}show(){D.trigger(this._element,Zi).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(to),d(this._element),this._element.classList.add(no,ro),this._queueCallback((()=>{this._element.classList.remove(ro),D.trigger(this._element,eo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(D.trigger(this._element,Ji).defaultPrevented||(this._element.classList.add(ro),this._queueCallback((()=>{this._element.classList.add(to),this._element.classList.remove(ro,no),D.trigger(this._element,Xi)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(no),super.dispose()}isShown(){return this._element.classList.contains(no)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){D.on(this._element,Ki,(e=>this._onInteraction(e,!0))),D.on(this._element,Qi,(e=>this._onInteraction(e,!1))),D.on(this._element,Yi,(e=>this._onInteraction(e,!0))),D.on(this._element,Gi,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=so.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return W(so),g(so),{Alert:K,Button:Y,Carousel:Oe,Collapse:$e,Dropdown:Hn,Modal:Er,Offcanvas:Wr,Popover:di,ScrollSpy:wi,Tab:Vi,Toast:so,Tooltip:li}}()},8394:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(7828),i=!1,o=!1;try{var s={get passive(){return i=!0},get once(){return o=i=!0}};r.A&&(window.addEventListener("test",s,s),window.removeEventListener("test",s,!0))}catch(e){}const a=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!o){var s=r.once,a=r.capture,l=n;!o&&s&&(l=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=l),e.addEventListener(t,l,i?r:a)}e.addEventListener(t,n,r)}},7828:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=!("undefined"==typeof window||!window.document||!window.document.createElement)},6406:(e,t,n)=>{"use strict";function r(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.d(t,{A:()=>r})},9763:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8394);const i=function(e,t,n,i){return(0,r.Ay)(e,t,n,i),function(){!function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}(e,t,n,i)}}},1625:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},5003:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=Function.prototype.bind.call(Function.prototype.call,[].slice);function i(e,t){return r(e.querySelectorAll(t))}},124:e=>{"use strict";var t,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{Immer:()=>Y,applyPatches:()=>se,castDraft:()=>ce,castImmutable:()=>ue,createDraft:()=>ae,current:()=>J,enableMapSet:()=>ee,enablePatches:()=>Z,finishDraft:()=>le,freeze:()=>S,immerable:()=>l,isDraft:()=>h,isDraftable:()=>f,nothing:()=>a,original:()=>m,produce:()=>ne,produceWithPatches:()=>re,setAutoFreeze:()=>ie,setUseStrictShallowCopy:()=>oe}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))!o.call(e,s)&&undefined!==s&&n(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(n({},"__esModule",{value:!0}),t));var a=Symbol.for("immer-nothing"),l=Symbol.for("immer-draftable"),c=Symbol.for("immer-state");function u(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var d=Object.getPrototypeOf;function h(e){return!!e&&!!e[c]}function f(e){return!!e&&(g(e)||Array.isArray(e)||!!e[l]||!!e.constructor?.[l]||w(e)||x(e))}var p=Object.prototype.constructor.toString();function g(e){if(!e||"object"!=typeof e)return!1;let t=d(e);if(null===t)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===p}function m(e){return h(e)||u(15),e[c].t}function b(e,t){0===y(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function y(e){let t=e[c];return t?t.o:Array.isArray(e)?1:w(e)?2:x(e)?3:0}function v(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t){return 2===y(e)?e.get(t):e[t]}function _(e,t,n){let r=y(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function w(e){return e instanceof Map}function x(e){return e instanceof Set}function k(e){return e.e||e.t}function E(e,t){if(w(e))return new Map(e);if(x(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=g(e);if(!0===t||"class_only"===t&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[c];let n=Reflect.ownKeys(t);for(let r=0;r1&&(e.set=e.add=e.clear=e.delete=O),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>S(t,!0)))),e}function O(){u(2)}function C(e){return Object.isFrozen(e)}var T,P={};function R(e){let t=P[e];return t||u(0),t}function j(e,t){P[e]||(P[e]=t)}function M(){return T}function D(e,t){t&&(R("Patches"),e.f=[],e.h=[],e.b=t)}function L(e){N(e),e.a.forEach(F),e.a=null}function N(e){e===T&&(T=e.i)}function I(e){return T=function(e,t){return{a:[],i:e,p:t,P:!0,d:0}}(T,e)}function F(e){let t=e[c];0===t.o||1===t.o?t.x():t.m=!0}function z(e,t){t.d=t.a.length;let n=t.a[0];return void 0!==e&&e!==n?(n[c].s&&(L(t),u(4)),f(e)&&(e=B(t,e),t.i||U(t,e)),t.f&&R("Patches").T(n[c].t,e,t.f,t.h)):e=B(t,n,[]),L(t),t.f&&t.b(t.f,t.h),e!==a?e:void 0}function B(e,t,n){if(C(t))return t;let r=t[c];if(!r)return b(t,((i,o)=>$(e,r,t,i,o,n))),t;if(r.n!==e)return t;if(!r.s)return U(e,r.t,!0),r.t;if(!r.c){r.c=!0,r.n.d--;let t=r.e,i=t,o=!1;3===r.o&&(i=new Set(t),t.clear(),o=!0),b(i,((i,s)=>$(e,r,t,i,s,n,o))),U(e,t,!1),n&&e.f&&R("Patches").g(r,n,e.f,e.h)}return r.e}function $(e,t,n,r,i,o,s){if(h(i)){let s=B(e,i,o&&t&&3!==t.o&&!v(t.r,r)?o.concat(r):void 0);if(_(n,r,s),!h(s))return;e.P=!1}else s&&n.add(i);if(f(i)&&!C(i)){if(!e.p.y&&e.d<1)return;B(e,i),(!t||!t.n.i)&&"symbol"!=typeof r&&Object.prototype.propertyIsEnumerable.call(n,r)&&U(e,i)}}function U(e,t,n=!1){!e.i&&e.p.y&&e.P&&S(t,n)}var W={get(e,t){if(t===c)return e;let n=k(e);if(!v(n,t))return function(e,t,n){let r=q(t,n);return r?"value"in r?r.value:r.get?.call(e.u):void 0}(e,n,t);let r=n[t];return e.c||!f(r)?r:r===V(e.t,t)?(Q(e),e.e[t]=G(r,e)):r},has:(e,t)=>t in k(e),ownKeys:e=>Reflect.ownKeys(k(e)),set(e,t,n){let r=q(k(e),t);if(r?.set)return r.set.call(e.u,n),!0;if(!e.s){let r=V(k(e),t),i=r?.[c];if(i&&i.t===n)return e.e[t]=n,e.r[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||v(e.t,t)))return!0;Q(e),K(e)}return e.e[t]===n&&(void 0!==n||t in e.e)||Number.isNaN(n)&&Number.isNaN(e.e[t])||(e.e[t]=n,e.r[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==V(e.t,t)||t in e.t?(e.r[t]=!1,Q(e),K(e)):delete e.r[t],e.e&&delete e.e[t],!0),getOwnPropertyDescriptor(e,t){let n=k(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.o||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){u(11)},getPrototypeOf:e=>d(e.t),setPrototypeOf(){u(12)}},H={};function V(e,t){let n=e[c];return(n?k(n):e)[t]}function q(e,t){if(!(t in e))return;let n=d(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=d(n)}}function K(e){e.s||(e.s=!0,e.i&&K(e.i))}function Q(e){e.e||(e.e=E(e.t,e.n.p.S))}b(W,((e,t)=>{H[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var Y=class{constructor(e){this.y=!0,this.S=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,(e=>t.call(this,e,...i)))}}let r;if("function"!=typeof t&&u(6),void 0!==n&&"function"!=typeof n&&u(7),f(e)){let i=I(this),o=G(e,void 0),s=!0;try{r=t(o),s=!1}finally{s?L(i):N(i)}return D(i,n),z(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===a&&(r=void 0),this.y&&S(r,!0),n){let t=[],i=[];R("Patches").T(e,r,t,i),n(t,i)}return r}u(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){f(e)||u(8),h(e)&&(e=J(e));let t=I(this),n=G(e,void 0);return n[c].l=!0,N(t),n}finishDraft(e,t){let n=e&&e[c];(!n||!n.l)&&u(9);let{n:r}=n;return D(r,t),z(void 0,r)}setAutoFreeze(e){this.y=e}setUseStrictShallowCopy(e){this.S=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=R("Patches").A;return h(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function G(e,t){let n=w(e)?R("MapSet").I(e,t):x(e)?R("MapSet").D(e,t):function(e,t){let n=Array.isArray(e),r={o:n?1:0,n:t?t.n:M(),s:!1,c:!1,r:{},i:t,t:e,u:null,e:null,x:null,l:!1},i=r,o=W;n&&(i=[r],o=H);let{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.u=a,r.x=s,a}(e,t);return(t?t.n:M()).a.push(n),n}function J(e){return h(e)||u(10),X(e)}function X(e){if(!f(e)||C(e))return e;let t,n=e[c];if(n){if(!n.s)return n.t;n.c=!0,t=E(e,n.n.p.S)}else t=E(e,!0);return b(t,((e,n)=>{_(t,e,X(n))})),n&&(n.c=!1),t}function Z(){let e="replace",t="add",n="remove";function r(e){if(!f(e))return e;if(Array.isArray(e))return e.map(r);if(w(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(x(e))return new Set(Array.from(e).map(r));let t=Object.create(d(e));for(let n in e)t[n]=r(e[n]);return v(e,l)&&(t[l]=e[l]),t}function i(e){return h(e)?r(e):e}j("Patches",{A:function(i,o){return o.forEach((o=>{let{path:s,op:a}=o,l=i;for(let e=0;e{let d=A(l,r),h=A(c,r),f=u?v(l,r)?e:t:n;if(d===h&&f===e)return;let p=o.concat(r);s.push(f===n?{op:f,path:p}:{op:f,path:p,value:h}),a.push(f===t?{op:n,path:p}:f===n?{op:t,path:p,value:i(d)}:{op:e,path:p,value:i(d)})}))}(r,o,s,a);case 1:return function(r,o,s,a){let{t:l,r:c}=r,u=r.e;u.length{if(!a.has(e)){let s=r.concat([l]);i.push({op:n,path:s,value:e}),o.unshift({op:t,path:s,value:e})}l++})),l=0,a.forEach((e=>{if(!s.has(e)){let s=r.concat([l]);i.push({op:t,path:s,value:e}),o.unshift({op:n,path:s,value:e})}l++}))}(r,o,s,a)}},T:function(t,n,r,i){r.push({op:e,path:[],value:n===a?void 0:n}),i.push({op:e,path:[],value:t})}})}function ee(){class e extends Map{constructor(e,t){super(),this[c]={o:2,i:t,n:t?t.n:M(),s:!1,c:!1,e:void 0,r:void 0,t:e,u:this,l:!1,m:!1}}get size(){return k(this[c]).size}has(e){return k(this[c]).has(e)}set(e,n){let r=this[c];return i(r),(!k(r).has(e)||k(r).get(e)!==n)&&(t(r),K(r),r.r.set(e,!0),r.e.set(e,n),r.r.set(e,!0)),this}delete(e){if(!this.has(e))return!1;let n=this[c];return i(n),t(n),K(n),n.t.has(e)?n.r.set(e,!1):n.r.delete(e),n.e.delete(e),!0}clear(){let e=this[c];i(e),k(e).size&&(t(e),K(e),e.r=new Map,b(e.t,(t=>{e.r.set(t,!1)})),e.e.clear())}forEach(e,t){k(this[c]).forEach(((n,r,i)=>{e.call(t,this.get(r),r,this)}))}get(e){let n=this[c];i(n);let r=k(n).get(e);if(n.c||!f(r)||r!==n.t.get(e))return r;let o=G(r,n);return t(n),n.e.set(e,o),o}keys(){return k(this[c]).keys()}values(){let e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){let e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let t=e.next();if(t.done)return t;let n=this.get(t.value);return{done:!1,value:[t.value,n]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.e||(e.r=new Map,e.e=new Map(e.t))}class n extends Set{constructor(e,t){super(),this[c]={o:3,i:t,n:t?t.n:M(),s:!1,c:!1,e:void 0,t:e,u:this,a:new Map,m:!1,l:!1}}get size(){return k(this[c]).size}has(e){let t=this[c];return i(t),t.e?!!(t.e.has(e)||t.a.has(e)&&t.e.has(t.a.get(e))):t.t.has(e)}add(e){let t=this[c];return i(t),this.has(e)||(r(t),K(t),t.e.add(e)),this}delete(e){if(!this.has(e))return!1;let t=this[c];return i(t),r(t),K(t),t.e.delete(e)||!!t.a.has(e)&&t.e.delete(t.a.get(e))}clear(){let e=this[c];i(e),k(e).size&&(r(e),K(e),e.e.clear())}values(){let e=this[c];return i(e),r(e),e.e.values()}entries(){let e=this[c];return i(e),r(e),e.e.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){let n=this.values(),r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}}function r(e){e.e||(e.e=new Set,e.t.forEach((t=>{if(f(t)){let n=G(t,e);e.a.set(t,n),e.e.add(n)}else e.e.add(t)})))}function i(e){e.m&&u(3,JSON.stringify(k(e)))}j("MapSet",{I:function(t,n){return new e(t,n)},D:function(e,t){return new n(e,t)}})}var te=new Y,ne=te.produce,re=te.produceWithPatches.bind(te),ie=te.setAutoFreeze.bind(te),oe=te.setUseStrictShallowCopy.bind(te),se=te.applyPatches.bind(te),ae=te.createDraft.bind(te),le=te.finishDraft.bind(te);function ce(e){return e}function ue(e){return e}},9407:(e,t,n)=>{"use strict";e.exports=n(124)},311:e=>{"use strict";e.exports=function(e,t,n,r,i,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},6425:(e,t,n)=>{"use strict";n.r(t)},1728:(e,t,n)=>{"use strict";n.r(t)},9512:(e,t,n)=>{"use strict";n.r(t)},9920:(e,t,n)=>{"use strict";n.r(t)},2816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,o,s){var a=i||"<>",l=s||r;if(null==n[r])return t?new Error("Required "+o+" `"+l+"` was not specified in `"+a+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d{"use strict";var r=n(6925);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3048:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(6942),i=n.n(r),o=n(6540),s=n(6519),a=n(4848);const l=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},l)=>{const c=(0,s.oU)(e,"container"),u="string"==typeof t?`-${t}`:"-fluid";return(0,a.jsx)(n,{ref:l,...o,className:i()(r,t?`${c}${u}`:c)})}));l.displayName="Container";const c=l},9018:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r=n(6942),i=n.n(r),o=(n(2816),n(6540)),s=n(6266),a=n(5003),l=n(8342),c=n(3804),u=n(9409),d=n(1406),h=n(7395),f=n(5182),p=n(2671),g=n(4848);const m=["as","onSelect","activeKey","role","onKeyDown"],b=()=>{},y=(0,f.sE)("event-key"),v=o.forwardRef(((e,t)=>{let{as:n="div",onSelect:r,activeKey:i,role:s,onKeyDown:p}=e,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,m);const A=(0,l.A)(),_=(0,o.useRef)(!1),w=(0,o.useContext)(d.A),x=(0,o.useContext)(h.A);let k,E;x&&(s=s||"tablist",i=x.activeKey,k=x.getControlledId,E=x.getControllerId);const S=(0,o.useRef)(null),O=e=>{const t=S.current;if(!t)return null;const n=(0,a.A)(t,`[${y}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const i=n.indexOf(r);if(-1===i)return null;let o=i+e;return o>=n.length&&(o=0),o<0&&(o=n.length-1),n[o]},C=(e,t)=>{null!=e&&(null==r||r(e,t),null==w||w(e,t))};(0,o.useEffect)((()=>{if(S.current&&_.current){const e=S.current.querySelector(`[${y}][aria-selected=true]`);null==e||e.focus()}_.current=!1}));const T=(0,c.A)(t,S);return(0,g.jsx)(d.A.Provider,{value:C,children:(0,g.jsx)(u.A.Provider,{value:{role:s,activeKey:(0,d.u)(i),getControlledId:k||b,getControllerId:E||b},children:(0,g.jsx)(n,Object.assign({},v,{onKeyDown:e=>{if(null==p||p(e),!x)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=O(-1);break;case"ArrowRight":case"ArrowDown":t=O(1);break;default:return}t&&(e.preventDefault(),C(t.dataset[(0,f.y)("EventKey")]||null,e),_.current=!0,A())},ref:T,role:s}))})})}));v.displayName="Nav";const A=Object.assign(v,{Item:p.A});var _=n(6519),w=n(4778);const x=o.createContext(null);x.displayName="CardHeaderContext";const k=x,E=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=(0,_.oU)(t,"nav-item"),(0,g.jsx)(n,{ref:o,className:i()(e,t),...r}))));E.displayName="NavItem";const S=E;var O=n(3558);const C=o.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:r,variant:a,fill:l=!1,justify:c=!1,navbar:u,navbarScroll:d,className:h,activeKey:f,...p}=(0,s.Zw)(e,{activeKey:"onSelect"}),m=(0,_.oU)(r,"nav");let b,y,v=!1;const x=(0,o.useContext)(w.A),E=(0,o.useContext)(k);return x?(b=x.bsPrefix,v=null==u||u):E&&({cardHeaderBsPrefix:y}=E),(0,g.jsx)(A,{as:n,ref:t,activeKey:f,className:i()(h,{[m]:!v,[`${b}-nav`]:v,[`${b}-nav-scroll`]:v&&d,[`${y}-${a}`]:!!y,[`${m}-${a}`]:!!a,[`${m}-fill`]:l,[`${m}-justified`]:c}),...p})}));C.displayName="Nav";const T=Object.assign(C,{Item:S,Link:O.A})},9949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Qt});var r=n(6942),i=n.n(r),o=n(6540),s=n(6519),a=n(5003),l=n(8394);var c=n(4103),u=n(8342),d=n(7876),h=n(7895);const f=o.createContext(null);var p=n(1244),g=Object.prototype.hasOwnProperty;function m(e,t,n){for(n of e.keys())if(b(n,t))return n}function b(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&b(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((i=r)&&"object"==typeof i&&!(i=m(t,i)))return!1;if(!t.has(i))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((i=r[0])&&"object"==typeof i&&!(i=m(t,i)))return!1;if(!b(r[1],t.get(i)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(g.call(e,n)&&++r&&!g.call(t,n))return!1;if(!(n in t)||!b(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var y=n(8880);function v(e){return e.split("-")[0]}function A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){return e instanceof A(e).Element||e instanceof Element}function w(e){return e instanceof A(e).HTMLElement||e instanceof HTMLElement}function x(e){return"undefined"!=typeof ShadowRoot&&(e instanceof A(e).ShadowRoot||e instanceof ShadowRoot)}var k=Math.max,E=Math.min,S=Math.round;function O(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function C(){return!/^((?!chrome|android).)*safari/i.test(O())}function T(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&w(e)&&(i=e.offsetWidth>0&&S(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&S(r.height)/e.offsetHeight||1);var s=(_(e)?A(e):window).visualViewport,a=!C()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function P(e){var t=T(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function R(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(e){return e?(e.nodeName||"").toLowerCase():null}function M(e){return A(e).getComputedStyle(e)}function D(e){return["table","td","th"].indexOf(j(e))>=0}function L(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function N(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(x(e)?e.host:null)||L(e)}function I(e){return w(e)&&"fixed"!==M(e).position?e.offsetParent:null}function F(e){for(var t=A(e),n=I(e);n&&D(n)&&"static"===M(n).position;)n=I(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===M(n).position)?t:n||function(e){var t=/firefox/i.test(O());if(/Trident/i.test(O())&&w(e)&&"fixed"===M(e).position)return null;var n=N(e);for(x(n)&&(n=n.host);w(n)&&["html","body"].indexOf(j(n))<0;){var r=M(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function B(e,t,n){return k(e,E(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function U(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var W="top",H="bottom",V="right",q="left",K="auto",Q=[W,H,V,q],Y="start",G="end",J="viewport",X="popper",Z=Q.reduce((function(e,t){return e.concat([t+"-"+Y,t+"-"+G])}),[]),ee=[].concat(Q,[K]).reduce((function(e,t){return e.concat([t,t+"-"+Y,t+"-"+G])}),[]),te=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ne(e){return e.split("-")[1]}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,g=void 0===p?0:p,m="function"==typeof u?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=q,_=W,w=window;if(c){var x=F(n),k="clientHeight",E="clientWidth";x===A(n)&&"static"!==M(x=L(n)).position&&"absolute"===a&&(k="scrollHeight",E="scrollWidth"),(i===W||(i===q||i===V)&&o===G)&&(_=H,g-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,g*=l?1:-1),i!==q&&(i!==W&&i!==H||o!==G)||(v=V,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-r.width,f*=l?1:-1)}var O,C=Object.assign({position:a},c&&re),T=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:S(n*i)/i||0,y:S(r*i)/i||0}}({x:f,y:g},A(n)):{x:f,y:g};return f=T.x,g=T.y,l?Object.assign({},C,((O={})[_]=y?"0":"",O[v]=b?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",O)):Object.assign({},C,((t={})[_]=y?g+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var oe={passive:!0},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e){var t=A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return T(L(e)).left+ue(e).scrollLeft}function he(e){var t=M(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:w(e)&&he(e)?e:fe(N(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=A(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe(N(s)))}function ge(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===J?ge(function(e,t){var n=A(e),r=L(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=C();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):_(t)?function(e,t){var n=T(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ge(function(e){var t,n=L(e),r=ue(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=k(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=k(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===M(i||n).direction&&(a+=k(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(L(e)))}function be(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?v(i):null,s=i?ne(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case W:t={x:a,y:n.y-r.height};break;case H:t={x:a,y:n.y+n.height};break;case V:t={x:n.x+n.width,y:l};break;case q:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?z(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Y:t[c]=t[c]-(n[u]/2-r[u]/2);break;case G:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?"clippingParents":a,c=n.rootBoundary,u=void 0===c?J:c,d=n.elementContext,h=void 0===d?X:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,b=$("number"!=typeof m?m:U(m,Q)),y=h===X?"reference":X,v=e.rects.popper,A=e.elements[p?y:h],x=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe(N(e)),n=["absolute","fixed"].indexOf(M(e).position)>=0&&w(e)?F(e):e;return _(n)?t.filter((function(e){return _(e)&&R(e,n)&&"body"!==j(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=me(e,n,r);return t.top=k(i.top,t.top),t.right=E(i.right,t.right),t.bottom=E(i.bottom,t.bottom),t.left=k(i.left,t.left),t}),me(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_(A)?A:A.contextElement||L(e.elements.popper),l,u,s),S=T(e.elements.reference),O=be({reference:S,element:v,strategy:"absolute",placement:i}),C=ge(Object.assign({},v,O)),P=h===X?C:S,D={top:x.top-P.top+b.top,bottom:P.bottom-x.bottom+b.bottom,left:x.left-P.left+b.left,right:P.right-x.right+b.right},I=e.modifiersData.offset;if(h===X&&I){var z=I[i];Object.keys(D).forEach((function(e){var t=[V,H].indexOf(e)>=0?1:-1,n=[W,H].indexOf(e)>=0?"y":"x";D[e]+=z[n]*t}))}return D}function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ae(e){return[W,V,H,q].some((function(t){return e[t]>=0}))}function _e(e,t,n){void 0===n&&(n=!1);var r,i,o=w(t),s=w(t)&&function(e){var t=e.getBoundingClientRect(),n=S(t.width)/e.offsetWidth||1,r=S(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=L(t),l=T(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==j(t)||he(a))&&(c=(r=t)!==A(r)&&w(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ue(r)),w(t)?((u=T(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=de(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function we(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var xe={placement:"bottom",modifiers:[],strategy:"absolute"};function ke(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[q,V].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,b=v(m),y=l||(b!==m&&p?function(e){if(v(e)===K)return[];var t=ae(e);return[ce(e),t,ce(t)]}(m):[ae(m)]),A=[m].concat(y).reduce((function(e,n){return e.concat(v(n)===K?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?ee:l,u=ne(r),d=u?a?Z:Z.filter((function(e){return ne(e)===u})):Q,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[v(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),_=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,E=A[0],S=0;S=0,R=P?"width":"height",j=ye(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),M=P?T?V:q:T?H:W;_[R]>w[R]&&(M=ae(M));var D=ae(M),L=[];if(o&&L.push(j[C]<=0),a&&L.push(j[M]<=0,j[D]<=0),L.every((function(e){return e}))){E=O,k=!1;break}x.set(O,L)}if(k)for(var N=function(e){var t=A.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},I=p?3:1;I>0&&"break"!==N(I);I--);t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,m=ye(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=v(t.placement),y=ne(t.placement),A=!y,_=z(b),w="x"===_?"y":"x",x=t.modifiersData.popperOffsets,S=t.rects.reference,O=t.rects.popper,C="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,T="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(x){if(o){var M,D="y"===_?W:q,L="y"===_?H:V,N="y"===_?"height":"width",I=x[_],$=I+m[D],U=I-m[L],K=f?-O[N]/2:0,Q=y===Y?S[N]:O[N],G=y===Y?-O[N]:-S[N],J=t.elements.arrow,X=f&&J?P(J):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[D],te=Z[L],re=B(0,S[N],X[N]),ie=A?S[N]/2-K-re-ee-T.mainAxis:Q-re-ee-T.mainAxis,oe=A?-S[N]/2+K+re+te+T.mainAxis:G+re+te+T.mainAxis,se=t.elements.arrow&&F(t.elements.arrow),ae=se?"y"===_?se.clientTop||0:se.clientLeft||0:0,le=null!=(M=null==R?void 0:R[_])?M:0,ce=I+oe-le,ue=B(f?E($,I+ie-le-ae):$,I,f?k(U,ce):U);x[_]=ue,j[_]=ue-I}if(a){var de,he="x"===_?W:q,fe="x"===_?H:V,pe=x[w],ge="y"===w?"height":"width",me=pe+m[he],be=pe-m[fe],ve=-1!==[W,q].indexOf(b),Ae=null!=(de=null==R?void 0:R[w])?de:0,_e=ve?me:pe-S[ge]-O[ge]-Ae+T.altAxis,we=ve?pe+S[ge]+O[ge]-Ae-T.altAxis:be,xe=f&&ve?function(e,t,n){var r=B(e,t,n);return r>n?n:r}(_e,pe,we):B(f?_e:me,pe,f?we:be);x[w]=xe,j[w]=xe-pe}t.modifiersData[r]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=v(n.placement),l=z(a),c=[q,V].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:U(e,Q))}(i.padding,n),d=P(o),h="y"===l?W:q,f="y"===l?H:V,p=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],m=F(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,A=u[h],_=b-d[c]-u[f],w=b/2-d[c]/2+y,x=B(A,w,_),k=l;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&R(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}),Se=["enabled","placement","strategy","modifiers"],Oe={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ce={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const e=(t.getAttribute("aria-describedby")||"").split(",").filter((e=>e.trim()!==n.id));e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===i&&"setAttribute"in r){const e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},Te=[],Pe=function(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:s="absolute",modifiers:a=Te}=n,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(n,Se);const c=(0,o.useRef)(a),u=(0,o.useRef)(),d=(0,o.useCallback)((()=>{var e;null==(e=u.current)||e.update()}),[]),h=(0,o.useCallback)((()=>{var e;null==(e=u.current)||e.forceUpdate()}),[]),[f,p]=function(e){const t=(0,y.A)();return[e[0],(0,o.useCallback)((n=>{if(t())return e[1](n)}),[t,e[1]])]}((0,o.useState)({placement:i,update:d,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),g=(0,o.useMemo)((()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{const t={},n={};Object.keys(e.elements).forEach((r=>{t[r]=e.styles[r],n[r]=e.attributes[r]})),p({state:e,styles:t,attributes:n,update:d,forceUpdate:h,placement:e.placement})}})),[d,h,p]),m=(0,o.useMemo)((()=>(b(c.current,a)||(c.current=a),c.current)),[a]);return(0,o.useEffect)((()=>{u.current&&r&&u.current.setOptions({placement:i,strategy:s,modifiers:[...m,g,Oe]})}),[s,i,g,r,m]),(0,o.useEffect)((()=>{if(r&&null!=e&&null!=t)return u.current=Ee(e,t,Object.assign({},l,{placement:i,strategy:s,modifiers:[...m,Ce,g]})),()=>{null!=u.current&&(u.current.destroy(),u.current=void 0,p((e=>Object.assign({},e,{attributes:{},styles:{popper:{}}}))))}}),[r,e,t]),f};var Re=n(6406),je=n(9763),Me=n(1625),De=n(9771),Le=n.n(De);const Ne=()=>{},Ie=e=>e&&("current"in e?e.current:e),Fe={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},ze=function(e,t=Ne,{disabled:n,clickTrigger:r="click"}={}){const i=(0,o.useRef)(!1),s=(0,o.useRef)(!1),a=(0,o.useCallback)((t=>{const n=Ie(e);var r;Le()(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!n||!!((r=t).metaKey||r.altKey||r.ctrlKey||r.shiftKey)||!function(e){return 0===e.button}(t)||!!(0,Re.A)(n,t.target)||s.current,s.current=!1}),[e]),l=(0,h.A)((t=>{const n=Ie(e);n&&(0,Re.A)(n,t.target)&&(s.current=!0)})),c=(0,h.A)((e=>{i.current||t(e)}));(0,o.useEffect)((()=>{var t,i;if(n||null==e)return;const o=(0,Me.A)(Ie(e)),s=o.defaultView||window;let u=null!=(t=s.event)?t:null==(i=s.parent)?void 0:i.event,d=null;Fe[r]&&(d=(0,je.A)(o,Fe[r],l,!0));const h=(0,je.A)(o,r,a,!0),f=(0,je.A)(o,r,(e=>{e!==u?c(e):u=void 0}));let p=[];return"ontouchstart"in o.documentElement&&(p=[].slice.call(o.body.children).map((e=>(0,je.A)(e,"mousemove",Ne)))),()=>{null==d||d(),h(),f(),p.forEach((e=>e()))}}),[e,n,r,a,l,c])};function Be(e={}){return Array.isArray(e)?e:Object.keys(e).map((t=>(e[t].name=t,e[t])))}var $e=n(4848);const Ue=["children","usePopper"],We=()=>{};function He(e={}){const t=(0,o.useContext)(f),[n,r]=(0,p.A)(),i=(0,o.useRef)(!1),{flip:s,offset:a,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:h=!0,usePopper:g=!!t}=e,m=null==(null==t?void 0:t.show)?!!e.show:t.show;m&&!i.current&&(i.current=!0);const{placement:b,setMenu:y,menuElement:v,toggleElement:A}=t||{},_=Pe(A,v,function({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:s,arrowElement:a,popperConfig:l={}}){var c,u,d,h,f;const p=function(e){const t={};return Array.isArray(e)?(null==e||e.forEach((e=>{t[e.name]=e})),t):e||t}(l.modifiers);return Object.assign({},l,{placement:n,enabled:e,strategy:o?"fixed":l.strategy,modifiers:Be(Object.assign({},p,{eventListeners:{enabled:t,options:null==(c=p.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:s?Object.assign({padding:s},null==(u=p.preventOverflow)?void 0:u.options):null==(d=p.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(h=p.offset)?void 0:h.options)},arrow:Object.assign({},p.arrow,{enabled:!!a,options:Object.assign({},null==(f=p.arrow)?void 0:f.options,{element:a})}),flip:Object.assign({enabled:!!r},p.flip)}))})}({placement:u||b||"bottom-start",enabled:g,enableEvents:null==h?m:h,offset:a,flip:s,fixed:c,arrowElement:n,popperConfig:d})),w=Object.assign({ref:y||We,"aria-labelledby":null==A?void 0:A.id},_.attributes.popper,{style:_.styles.popper}),x={show:m,placement:b,hasShown:i.current,toggle:null==t?void 0:t.toggle,popper:g?_:null,arrowProps:g?Object.assign({ref:r},_.attributes.arrow,{style:_.styles.arrow}):{}};return ze(v,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:l,disabled:!m}),[w,x]}function Ve(e){let{children:t,usePopper:n=!0}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Ue);const[i,o]=He(Object.assign({},r,{usePopper:n}));return(0,$e.jsx)($e.Fragment,{children:t(i,o)})}Ve.displayName="DropdownMenu";const qe=Ve,Ke={prefix:String(Math.round(1e10*Math.random())),current:0},Qe=o.createContext(Ke),Ye=o.createContext(!1);let Ge=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Je=new WeakMap;const Xe="function"==typeof o.useId?function(e){let t=o.useId(),[n]=(0,o.useState)("function"==typeof o.useSyncExternalStore?o.useSyncExternalStore(tt,Ze,et):(0,o.useContext)(Ye));return e||`${n?"react-aria":`react-aria${Ke.prefix}`}-${t}`}:function(e){let t=(0,o.useContext)(Qe);t!==Ke||Ge||console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=function(e=!1){let t=(0,o.useContext)(Qe),n=(0,o.useRef)(null);if(null===n.current&&!e){var r,i;let e=null===(i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i||null===(r=i.ReactCurrentOwner)||void 0===r?void 0:r.current;if(e){let n=Je.get(e);null==n?Je.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,Je.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function Ze(){return!1}function et(){return!0}function tt(e){return()=>{}}const nt=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},rt=()=>{};function it(){const e=Xe(),{show:t=!1,toggle:n=rt,setToggle:r,menuElement:i}=(0,o.useContext)(f)||{},s=(0,o.useCallback)((e=>{n(!t,e)}),[t,n]),a={id:e,ref:r||rt,onClick:s,"aria-expanded":!!t};return i&&nt(i)&&(a["aria-haspopup"]=!0),[a,{show:t,toggle:n}]}function ot({children:e}){const[t,n]=it();return(0,$e.jsx)($e.Fragment,{children:e(t,n)})}ot.displayName="DropdownToggle";const st=ot;var at=n(1406),lt=n(9409),ct=n(5753),ut=n(5182);const dt=["eventKey","disabled","onClick","active","as"];function ht({key:e,href:t,active:n,disabled:r,onClick:i}){const s=(0,o.useContext)(at.A),a=(0,o.useContext)(lt.A),{activeKey:l}=a||{},c=(0,at.u)(e,t),u=null==n&&null!=e?(0,at.u)(l)===c:n;return[{onClick:(0,h.A)((e=>{r||(null==i||i(e),s&&!e.isPropagationStopped()&&s(c,e))})),"aria-disabled":r||void 0,"aria-selected":u,[(0,ut.sE)("dropdown-item")]:""},{isActive:u}]}const ft=o.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:s=ct.Ay}=e,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,dt);const[l]=ht({key:n,href:a.href,disabled:r,onClick:i,active:o});return(0,$e.jsx)(s,Object.assign({},a,{ref:t},l))}));ft.displayName="DropdownItem";const pt=ft;var gt=n(2810);function mt(){const e=(0,u.A)(),t=(0,o.useRef)(null),n=(0,o.useCallback)((n=>{t.current=n,e()}),[e]);return[t,n]}function bt({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${(0,ut.sE)("dropdown-item")}]`,focusFirstItemOnShow:s,placement:u="bottom-start",children:p}){const g=(0,gt.A)(),[m,b]=function(e,t,n){const r=(0,o.useRef)(void 0!==e),[i,s]=(0,o.useState)(t),a=void 0!==e,l=r.current;return r.current=a,!a&&l&&i!==t&&s(t),[a?e:i,(0,o.useCallback)(((...e)=>{const[t,...r]=e;let i=null==n?void 0:n(t,...r);return s(t),i}),[n])]}(t,e,r),[y,v]=mt(),A=y.current,[_,w]=mt(),x=_.current,k=(0,c.A)(m),E=(0,o.useRef)(null),S=(0,o.useRef)(!1),O=(0,o.useContext)(at.A),C=(0,o.useCallback)(((e,t,n=(null==t?void 0:t.type))=>{b(e,{originalEvent:t,source:n})}),[b]),T=(0,h.A)(((e,t)=>{null==n||n(e,t),C(!1,t,"select"),t.isPropagationStopped()||null==O||O(e,t)})),P=(0,o.useMemo)((()=>({toggle:C,placement:u,show:m,menuElement:A,toggleElement:x,setMenu:v,setToggle:w})),[C,u,m,A,x,v,w]);A&&k&&!m&&(S.current=A.contains(A.ownerDocument.activeElement));const R=(0,h.A)((()=>{x&&x.focus&&x.focus()})),j=(0,h.A)((()=>{const e=E.current;let t=s;if(null==t&&(t=!(!y.current||!nt(y.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=(0,a.A)(y.current,i)[0];n&&n.focus&&n.focus()}));(0,o.useEffect)((()=>{m?j():S.current&&(S.current=!1,R())}),[m,S,R,j]),(0,o.useEffect)((()=>{E.current=null}));const M=(e,t)=>{if(!y.current)return null;const n=(0,a.A)(y.current,i);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return(0,d.A)((0,o.useCallback)((()=>g.document),[g]),"keydown",(e=>{var t,n;const{key:r}=e,i=e.target,o=null==(t=y.current)?void 0:t.contains(i),s=null==(n=_.current)?void 0:n.contains(i);if(/input|textarea/i.test(i.tagName)&&(" "===r||"Escape"!==r&&o||"Escape"===r&&"search"===i.type))return;if(!o&&!s)return;if(!("Tab"!==r||y.current&&m))return;E.current=e.type;const a={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=M(i,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),m){const e=M(i,1);e&&e.focus&&e.focus()}else b(!0,a);return;case"Tab":(0,l.Ay)(i.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=y.current)&&t.contains(e.target)||b(!1,a)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),b(!1,a)}})),(0,$e.jsx)(at.A.Provider,{value:T,children:(0,$e.jsx)(f.Provider,{value:P,children:p})})}bt.displayName="Dropdown",bt.Menu=qe,bt.Toggle=st,bt.Item=pt;const yt=bt;var vt=n(6266);const At=o.createContext({});At.displayName="DropdownContext";const _t=At,wt=o.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},a)=>(t=(0,s.oU)(t,"dropdown-divider"),(0,$e.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));wt.displayName="DropdownDivider";const xt=wt,kt=o.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},a)=>(t=(0,s.oU)(t,"dropdown-header"),(0,$e.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));kt.displayName="DropdownHeader";const Et=kt;var St=n(2571);const Ot=o.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:a,as:l=St.A,...c},u)=>{const d=(0,s.oU)(e,"dropdown-item"),[h,f]=ht({key:n,href:c.href,disabled:r,onClick:o,active:a});return(0,$e.jsx)(l,{...c,...h,ref:u,className:i()(t,d,f.isActive&&"active",r&&"disabled")})}));Ot.displayName="DropdownItem";const Ct=Ot,Tt=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=(0,s.oU)(t,"dropdown-item-text"),(0,$e.jsx)(n,{ref:o,className:i()(e,t),...r}))));Tt.displayName="DropdownItemText";const Pt=Tt;var Rt=n(1706),jt=n(3804);const Mt=o.createContext(null);Mt.displayName="InputGroupContext";const Dt=Mt;var Lt=n(4778);function Nt(e,t){return e}function It(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}n(311);const Ft=o.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:l,renderOnMount:c,as:u="div",popperConfig:d,variant:h,...f},p)=>{let g=!1;const m=(0,o.useContext)(Lt.A),b=(0,s.oU)(e,"dropdown-menu"),{align:y,drop:v,isRTL:A}=(0,o.useContext)(_t);n=n||y;const _=(0,o.useContext)(Dt),w=[];if(n)if("object"==typeof n){const e=Object.keys(n);if(e.length){const t=e[0],r=n[t];g="start"===r,w.push(`${b}-${t}-${r}`)}}else"end"===n&&(g=!0);const x=It(g,v,A),[k,{hasShown:E,popper:S,show:O,toggle:C}]=He({flip:a,rootCloseEvent:r,show:l,usePopper:!m&&0===w.length,offset:[0,2],popperConfig:d,placement:x});if(k.ref=(0,jt.A)(Nt(p),k.ref),(0,Rt.A)((()=>{O&&(null==S||S.update())}),[O]),!E&&!c&&!_)return null;"string"!=typeof u&&(k.show=O,k.close=()=>null==C?void 0:C(!1),k.align=n);let T=f.style;return null!=S&&S.placement&&(T={...f.style,...k.style},f["x-placement"]=S.placement),(0,$e.jsx)(u,{...f,...k,style:T,...(w.length||m)&&{"data-bs-popper":"static"},className:i()(t,b,O&&"show",g&&`${b}-end`,h&&`${b}-${h}`,...w)})}));Ft.displayName="DropdownMenu";const zt=Ft,Bt=o.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:a=!1,className:l,...c},u)=>{const d=(0,s.oU)(t,"btn"),[h,{tagName:f}]=(0,ct.Am)({tagName:e,disabled:a,...c}),p=f;return(0,$e.jsx)(p,{...h,...c,ref:u,disabled:a,className:i()(l,d,o&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,c.href&&a&&"disabled")})}));Bt.displayName="Button";const $t=Bt,Ut=o.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=$t,...l},c)=>{const u=(0,s.oU)(e,"dropdown-toggle"),d=(0,o.useContext)(f);void 0!==r&&(l.bsPrefix=r);const[h]=it();return h.ref=(0,jt.A)(h.ref,Nt(c)),(0,$e.jsx)(a,{className:i()(n,u,t&&`${u}-split`,(null==d?void 0:d.show)&&"show"),...h,...l})}));Ut.displayName="DropdownToggle";const Wt=Ut,Ht=o.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:l,align:c="start",onSelect:u,onToggle:d,focusFirstItemOnShow:f,as:p="div",navbar:g,autoClose:m=!0,...b}=(0,vt.Zw)(e,{show:"onToggle"}),y=(0,o.useContext)(Dt),v=(0,s.oU)(n,"dropdown"),A=(0,s.Wz)(),_=(0,h.A)(((e,t)=>{var n,r,i;(null==(n=t.originalEvent)||null==(r=n.target)?void 0:r.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),i=t.source,(!1===m?"click"===i:"inside"===m?"rootClose"!==i:"outside"!==m||"select"!==i)&&(null==d||d(e,t)))})),w=It("end"===c,r,A),x=(0,o.useMemo)((()=>({align:c,drop:r,isRTL:A})),[c,r,A]),k={down:v,"down-centered":`${v}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,$e.jsx)(_t.Provider,{value:x,children:(0,$e.jsx)(yt,{placement:w,show:a,onSelect:u,onToggle:_,focusFirstItemOnShow:f,itemSelector:`.${v}-item:not(.disabled):not(:disabled)`,children:y?b.children:(0,$e.jsx)(p,{...b,ref:t,className:i()(l,a&&"show",k[r])})})})}));Ht.displayName="Dropdown";const Vt=Object.assign(Ht,{Toggle:Wt,Menu:zt,Item:Ct,ItemText:Pt,Divider:xt,Header:Et});var qt=n(3558);const Kt=o.forwardRef((({id:e,title:t,children:n,bsPrefix:r,className:o,rootCloseEvent:a,menuRole:l,disabled:c,active:u,renderMenuOnMount:d,menuVariant:h,...f},p)=>{const g=(0,s.oU)(void 0,"nav-item");return(0,$e.jsxs)(Vt,{ref:p,...f,className:i()(o,g),children:[(0,$e.jsx)(Vt.Toggle,{id:e,eventKey:null,active:u,disabled:c,childBsPrefix:r,as:qt.A,children:t}),(0,$e.jsx)(Vt.Menu,{role:l,renderOnMount:d,rootCloseEvent:a,variant:h,children:n})]})}));Kt.displayName="NavDropdown";const Qt=Object.assign(Kt,{Item:Vt.Item,ItemText:Vt.ItemText,Divider:Vt.Divider,Header:Vt.Header})},3558:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(6942),i=n.n(r),o=n(6540),s=n(2571),a=n(2671),l=n(1406),c=n(6519),u=n(4848);const d=o.forwardRef((({bsPrefix:e,className:t,as:n=s.A,active:r,eventKey:o,disabled:d=!1,...h},f)=>{e=(0,c.oU)(e,"nav-link");const[p,g]=(0,a.M)({key:(0,l.u)(o,h.href),active:r,disabled:d,...h});return(0,u.jsx)(n,{...h,...p,ref:f,disabled:d,className:i()(t,e,d&&"disabled",g.isActive&&"active")})}));d.displayName="NavLink";const h=d},2627:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>nt});var r=n(6942),i=n.n(r),o=n(6540),s=n(1406),a=n(6266),l=n(6519),c=n(4848);const u=o.forwardRef((({bsPrefix:e,className:t,as:n,...r},o)=>{e=(0,l.oU)(e,"navbar-brand");const s=n||(r.href?"a":"span");return(0,c.jsx)(s,{...r,ref:o,className:i()(t,e)})}));u.displayName="NavbarBrand";const d=u;var h=n(1625);var f=/([A-Z])/g,p=/^ms-/;function g(e){return function(e){return e.replace(f,"-$1").toLowerCase()}(e).replace(p,"-ms-")}var m=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const b=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(g(t))||function(e,t){return function(e){var t=(0,h.A)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(g(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?function(e){return!(!e||!m.test(e))}(i)?r+=i+"("+o+") ":n+=g(i)+": "+o+";":e.style.removeProperty(g(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};var y=n(8587);function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var A=n(961);const _=o.createContext(null);var w="unmounted",x="exited",k="entering",E="entered",S="exiting",O=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=x,r.appearStatus=k):i=E:i=t.unmountOnExit||t.mountOnEnter?w:x,r.state={status:i},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===w?{status:x}:null};var i=r.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==k&&n!==E&&(t=k):n!==k&&n!==E||(t=S)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===k){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:A.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===x&&this.setState({status:w})},i.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[A.findDOMNode(this),r],o=i[0],s=i[1],a=this.getTimeouts(),l=r?a.appear:a.enter;e||n?(this.props.onEnter(o,s),this.safeSetState({status:k},(function(){t.props.onEntering(o,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:E},(function(){t.props.onEntered(o,s)}))}))}))):this.safeSetState({status:E},(function(){t.props.onEntered(o)}))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:A.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:S},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:x},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:x},(function(){e.props.onExited(r)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:A.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===w)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,y.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(_.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},r}(o.Component);function C(){}O.contextType=_,O.propTypes={},O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:C,onEntering:C,onEntered:C,onExit:C,onExiting:C,onExited:C},O.UNMOUNTED=w,O.EXITED=x,O.ENTERING=k,O.ENTERED=E,O.EXITING=S;const T=O;var P=n(9763);function R(e,t,n,r){var i,o;null==n&&(o=-1===(i=b(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var s=function(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent("transitionend",n,r),e.dispatchEvent(i)}}(e,0,!0)}),t+n),o=(0,P.A)(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}(e,n,r),a=(0,P.A)(e,"transitionend",t);return function(){s(),a()}}function j(e,t){const n=b(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function M(e,t){const n=j(e,"transitionDuration"),r=j(e,"transitionDelay"),i=R(e,(n=>{n.target===e&&(i(),t(n))}),n+r)}const D=function(...e){return e.filter((e=>null!=e)).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)};function L(e){e.offsetHeight}var N=n(3804);const I=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:a,children:l,childRef:u,...d},h)=>{const f=(0,o.useRef)(null),p=(0,N.A)(f,u),g=e=>{var t;p((t=e)&&"setState"in t?A.findDOMNode(t):null!=t?t:null)},m=e=>t=>{e&&f.current&&e(f.current,t)},b=(0,o.useCallback)(m(e),[e]),y=(0,o.useCallback)(m(t),[t]),v=(0,o.useCallback)(m(n),[n]),_=(0,o.useCallback)(m(r),[r]),w=(0,o.useCallback)(m(i),[i]),x=(0,o.useCallback)(m(s),[s]),k=(0,o.useCallback)(m(a),[a]);return(0,c.jsx)(T,{ref:h,...d,onEnter:b,onEntered:v,onEntering:y,onExit:_,onExited:x,onExiting:w,addEndListener:k,nodeRef:f,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:g}):o.cloneElement(l,{ref:g})})})),F={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function z(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=F[e];return n+parseInt(b(t,r[0]),10)+parseInt(b(t,r[1]),10)}const B={[x]:"collapse",[S]:"collapsing",[k]:"collapsing",[E]:"collapse show"},$=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:s,className:a,children:l,dimension:u="height",in:d=!1,timeout:h=300,mountOnEnter:f=!1,unmountOnExit:p=!1,appear:g=!1,getDimensionValue:m=z,...b},y)=>{const v="function"==typeof u?u():u,A=(0,o.useMemo)((()=>D((e=>{e.style[v]="0"}),e)),[v,e]),_=(0,o.useMemo)((()=>D((e=>{const t=`scroll${v[0].toUpperCase()}${v.slice(1)}`;e.style[v]=`${e[t]}px`}),t)),[v,t]),w=(0,o.useMemo)((()=>D((e=>{e.style[v]=null}),n)),[v,n]),x=(0,o.useMemo)((()=>D((e=>{e.style[v]=`${m(v,e)}px`,L(e)}),r)),[r,m,v]),k=(0,o.useMemo)((()=>D((e=>{e.style[v]=null}),s)),[v,s]);return(0,c.jsx)(I,{ref:y,addEndListener:M,...b,"aria-expanded":b.role?d:null,onEnter:A,onEntering:_,onEntered:w,onExit:x,onExiting:k,childRef:l.ref,in:d,timeout:h,mountOnEnter:f,unmountOnExit:p,appear:g,children:(e,t)=>o.cloneElement(l,{...t,className:i()(a,l.props.className,B[e],"width"===v&&"collapse-horizontal")})})})),U=$;var W=n(4778);const H=o.forwardRef((({children:e,bsPrefix:t,...n},r)=>{t=(0,l.oU)(t,"navbar-collapse");const i=(0,o.useContext)(W.A);return(0,c.jsx)(U,{in:!(!i||!i.expanded),...n,children:(0,c.jsx)("div",{ref:r,className:t,children:e})})}));H.displayName="NavbarCollapse";const V=H;var q=n(7895);const K=o.forwardRef((({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:s="button",onClick:a,...u},d)=>{e=(0,l.oU)(e,"navbar-toggler");const{onToggle:h,expanded:f}=(0,o.useContext)(W.A)||{},p=(0,q.A)((e=>{a&&a(e),h&&h()}));return"button"===s&&(u.type="button"),(0,c.jsx)(s,{...u,ref:d,onClick:p,"aria-label":r,className:i()(t,e,!f&&"collapsed"),children:n||(0,c.jsx)("span",{className:`${e}-icon`})})}));K.displayName="NavbarToggle";const Q=K;var Y=n(1706);const G=new WeakMap,J=(e,t)=>{if(!e||!t)return;const n=G.get(t)||new Map;G.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function X(e,t=("undefined"==typeof window?void 0:window)){const n=J(e,t),[r,i]=(0,o.useState)((()=>!!n&&n.matches));return(0,Y.A)((()=>{let n=J(e,t);if(!n)return i(!1);let r=G.get(t);const o=()=>{i(n.matches)};return n.refCount++,n.addListener(o),o(),()=>{n.removeListener(o),n.refCount--,n.refCount<=0&&(null==r||r.delete(n.media)),n=void 0}}),[e]),r}const Z=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}return function(r,i,s){let a;return"object"==typeof r?(a=r,s=i,i=!0):(i=i||!0,a={[r]:i}),X((0,o.useMemo)((()=>Object.entries(a).reduce(((r,[i,o])=>("up"!==o&&!0!==o||(r=n(r,function(t){let n=e[t];return"number"==typeof n&&(n=`${n}px`),`(min-width: ${n})`}(i))),"down"!==o&&!0!==o||(r=n(r,function(n){const r=function(e){return t[Math.min(t.indexOf(e)+1,t.length-1)]}(n);let i=e[r];return i="number"==typeof i?i-.2+"px":`calc(${i} - 0.2px)`,`(max-width: ${i})`}(i))),r)),"")),[JSON.stringify(a)]),s)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function ee(e){void 0===e&&(e=(0,h.A)());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}var te=n(6406),ne=n(7828),re=n(8880);var ie=n(4103);const oe=(0,n(5182).sE)("modal-open"),se=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(b(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(oe,""),b(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(oe),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}};var ae=n(2810);const le=(e,t)=>ne.A?null==e?(t||(0,h.A)()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null,ce=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const s=(0,o.useRef)(null),a=(0,o.useRef)(t),l=(0,q.A)(n);(0,o.useEffect)((()=>{t?a.current=!0:l(s.current)}),[t,l]);const c=(0,N.A)(s,e.ref),u=(0,o.cloneElement)(e,{ref:c});return t?u:i||!a.current&&r?null:u},ue=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];const de=["component"],he=o.forwardRef(((e,t)=>{let{component:n}=e;const r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:s,onExited:a,addEndListener:l,children:c}=e,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,ue);const{major:d}=function(){const e=o.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}(),h=d>=19?c.props.ref:c.ref,f=(0,o.useRef)(null),p=(0,N.A)(f,"function"==typeof c?null:h),g=e=>t=>{e&&f.current&&e(f.current,t)},m=(0,o.useCallback)(g(t),[t]),b=(0,o.useCallback)(g(n),[n]),y=(0,o.useCallback)(g(r),[r]),v=(0,o.useCallback)(g(i),[i]),A=(0,o.useCallback)(g(s),[s]),_=(0,o.useCallback)(g(a),[a]),w=(0,o.useCallback)(g(l),[l]);return Object.assign({},u,{nodeRef:f},t&&{onEnter:m},n&&{onEntering:b},r&&{onEntered:y},i&&{onExit:v},s&&{onExiting:A},a&&{onExited:_},l&&{addEndListener:w},{children:"function"==typeof c?(e,t)=>c(e,Object.assign({},t,{ref:p})):(0,o.cloneElement)(c,{ref:p})})}(function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,de));return(0,c.jsx)(n,Object.assign({ref:t},r))}));function fe({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[s,a]=(0,o.useState)(!t);t&&s&&a(!1);const l=function({in:e,onTransition:t}){const n=(0,o.useRef)(null),r=(0,o.useRef)(!0),i=(0,q.A)(t);return(0,Y.A)((()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}}),[e,i]),(0,Y.A)((()=>(r.current=!1,()=>{r.current=!0})),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then((()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(a(!0),null==n||n(e.element)))}),(t=>{throw e.in||a(!0),t}))}}),c=(0,N.A)(l,e.ref);return s&&!t?null:(0,o.cloneElement)(e,{ref:c})}function pe(e,t,n){return e?(0,c.jsx)(he,Object.assign({},n,{component:e})):t?(0,c.jsx)(fe,Object.assign({},n,{transition:t})):(0,c.jsx)(ce,Object.assign({},n))}const ge=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let me;const be=(0,o.forwardRef)(((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:s,children:a,backdrop:l=!0,keyboard:u=!0,onBackdropClick:d,onEscapeKeyDown:h,transition:f,runTransition:p,backdropTransition:g,runBackdropTransition:m,autoFocus:b=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:_,renderDialog:w,renderBackdrop:x=(e=>(0,c.jsx)("div",Object.assign({},e))),manager:k,container:E,onShow:S,onHide:O=(()=>{}),onExit:C,onExited:T,onExiting:R,onEnter:j,onEntering:M,onEntered:D}=e,L=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,ge);const N=(0,ae.A)(),I=function(e,t){const n=(0,ae.A)(),[r,i]=(0,o.useState)((()=>le(e,null==n?void 0:n.document)));if(!r){const t=le(e);t&&i(t)}return(0,o.useEffect)((()=>{}),[t,r]),(0,o.useEffect)((()=>{const t=le(e);t!==r&&i(t)}),[e,r]),r}(E),F=function(e){const t=(0,ae.A)(),n=e||function(e){return me||(me=new se({ownerDocument:null==e?void 0:e.document})),me}(t),r=(0,o.useRef)({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:(0,o.useCallback)((e=>{r.current.dialog=e}),[]),setBackdropRef:(0,o.useCallback)((e=>{r.current.backdrop=e}),[])})}(k),z=(0,re.A)(),B=(0,ie.A)(n),[$,U]=(0,o.useState)(!n),W=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(()=>F),[F]),ne.A&&!B&&n&&(W.current=ee(null==N?void 0:N.document)),n&&$&&U(!1);const H=(0,q.A)((()=>{if(F.add(),J.current=(0,P.A)(document,"keydown",Y),G.current=(0,P.A)(document,"focus",(()=>setTimeout(K)),!0),S&&S(),b){var e,t;const n=ee(null!=(e=null==(t=F.dialog)?void 0:t.ownerDocument)?e:null==N?void 0:N.document);F.dialog&&n&&!(0,te.A)(F.dialog,n)&&(W.current=n,F.dialog.focus())}})),V=(0,q.A)((()=>{var e;F.remove(),null==J.current||J.current(),null==G.current||G.current(),v&&(null==(e=W.current)||null==e.focus||e.focus(_),W.current=null)}));(0,o.useEffect)((()=>{n&&I&&H()}),[n,I,H]),(0,o.useEffect)((()=>{$&&V()}),[$,V]),function(e){const t=function(e){const t=(0,o.useRef)(e);return t.current=e,t}(e);(0,o.useEffect)((()=>()=>t.current()),[])}((()=>{V()}));const K=(0,q.A)((()=>{if(!y||!z()||!F.isTopModal())return;const e=ee(null==N?void 0:N.document);F.dialog&&e&&!(0,te.A)(F.dialog,e)&&F.dialog.focus()})),Q=(0,q.A)((e=>{e.target===e.currentTarget&&(null==d||d(e),!0===l&&O())})),Y=(0,q.A)((e=>{u&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&F.isTopModal()&&(null==h||h(e),e.defaultPrevented||O())})),G=(0,o.useRef)(),J=(0,o.useRef)();if(!I)return null;const X=Object.assign({role:r,ref:F.setDialogRef,"aria-modal":"dialog"===r||void 0},L,{style:s,className:i,tabIndex:-1});let Z=w?w(X):(0,c.jsx)("div",Object.assign({},X,{children:o.cloneElement(a,{role:"document"})}));Z=pe(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:C,onExiting:R,onExited:(...e)=>{U(!0),null==T||T(...e)},onEnter:j,onEntering:M,onEntered:D,children:Z});let oe=null;return l&&(oe=x({ref:F.setBackdropRef,onClick:Q}),oe=pe(g,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:oe})),(0,c.jsx)(c.Fragment,{children:A.createPortal((0,c.jsxs)(c.Fragment,{children:[oe,Z]}),I)})}));be.displayName="Modal";const ye=Object.assign(be,{Manager:se}),ve={[k]:"show",[E]:"show"},Ae=o.forwardRef((({className:e,children:t,transitionClasses:n={},onEnter:r,...s},a)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...s},u=(0,o.useCallback)(((e,t)=>{L(e),null==r||r(e,t)}),[r]);return(0,c.jsx)(I,{ref:a,addEndListener:M,...l,onEnter:u,childRef:t.ref,children:(r,s)=>o.cloneElement(t,{...s,className:i()("fade",e,t.props.className,ve[r],n[r])})})}));Ae.displayName="Fade";const _e=Ae,we=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=(0,l.oU)(t,"offcanvas-body"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));we.displayName="OffcanvasBody";const xe=we,ke={[k]:"show",[E]:"show"},Ee=o.forwardRef((({bsPrefix:e,className:t,children:n,in:r=!1,mountOnEnter:s=!1,unmountOnExit:a=!1,appear:u=!1,...d},h)=>(e=(0,l.oU)(e,"offcanvas"),(0,c.jsx)(I,{ref:h,addEndListener:M,in:r,mountOnEnter:s,unmountOnExit:a,appear:u,...d,childRef:n.ref,children:(r,s)=>o.cloneElement(n,{...s,className:i()(t,n.props.className,(r===k||r===S)&&`${e}-toggling`,ke[r])})}))));Ee.displayName="OffcanvasToggling";const Se=Ee,Oe=o.createContext({onHide(){}});var Ce=n(5556),Te=n.n(Ce);const Pe={"aria-label":Te().string,onClick:Te().func,variant:Te().oneOf(["white"])},Re=o.forwardRef((({className:e,variant:t,"aria-label":n="Close",...r},o)=>(0,c.jsx)("button",{ref:o,type:"button",className:i()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r})));Re.displayName="CloseButton",Re.propTypes=Pe;const je=Re,Me=o.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...s},a)=>{const l=(0,o.useContext)(Oe),u=(0,q.A)((()=>{null==l||l.onHide(),null==r||r()}));return(0,c.jsxs)("div",{ref:a,...s,children:[i,n&&(0,c.jsx)(je,{"aria-label":e,variant:t,onClick:u})]})})),De=o.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=(0,l.oU)(e,"offcanvas-header"),(0,c.jsx)(Me,{ref:s,...o,className:i()(t,e),closeLabel:n,closeButton:r}))));De.displayName="OffcanvasHeader";const Le=De,Ne=("h5",o.forwardRef(((e,t)=>(0,c.jsx)("div",{...e,ref:t,className:i()(e.className,"h5")}))));const Ie=o.forwardRef((({className:e,bsPrefix:t,as:n=Ne,...r},o)=>(t=(0,l.oU)(t,"offcanvas-title"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ie.displayName="OffcanvasTitle";const Fe=Ie;var ze=n(5003);function Be(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ue=".sticky-top",We=".navbar-toggler";class He extends se{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,b(t,{[e]:`${parseFloat(b(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],b(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();if(function(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}(t,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";(0,ze.A)(t,$e).forEach((t=>this.adjustAndStore(n,t,e.scrollBarWidth))),(0,ze.A)(t,Ue).forEach((t=>this.adjustAndStore(r,t,-e.scrollBarWidth))),(0,ze.A)(t,We).forEach((t=>this.adjustAndStore(r,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();!function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Be(e.className,t):e.setAttribute("class",Be(e.className&&e.className.baseVal||"",t))}(t,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";(0,ze.A)(t,$e).forEach((e=>this.restore(n,e))),(0,ze.A)(t,Ue).forEach((e=>this.restore(r,e))),(0,ze.A)(t,We).forEach((e=>this.restore(r,e)))}}let Ve;const qe=He;function Ke(e){return(0,c.jsx)(Se,{...e})}function Qe(e){return(0,c.jsx)(_e,{...e})}const Ye=o.forwardRef((({bsPrefix:e,className:t,children:n,"aria-labelledby":r,placement:s="start",responsive:a,show:u=!1,backdrop:d=!0,keyboard:h=!0,scroll:f=!1,onEscapeKeyDown:p,onShow:g,onHide:m,container:b,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:A=!0,restoreFocusOptions:_,onEntered:w,onExit:x,onExiting:k,onEnter:E,onEntering:S,onExited:O,backdropClassName:C,manager:T,renderStaticNode:P=!1,...R},j)=>{const M=(0,o.useRef)();e=(0,l.oU)(e,"offcanvas");const{onToggle:D}=(0,o.useContext)(W.A)||{},[L,N]=(0,o.useState)(!1),I=Z(a||"xs","up");(0,o.useEffect)((()=>{N(a?u&&!I:u)}),[u,a,I]);const F=(0,q.A)((()=>{null==D||D(),null==m||m()})),z=(0,o.useMemo)((()=>({onHide:F})),[F]),B=(0,o.useCallback)((t=>(0,c.jsx)("div",{...t,className:i()(`${e}-backdrop`,C)})),[C,e]),$=o=>(0,c.jsx)("div",{...o,...R,className:i()(t,a?`${e}-${a}`:e,`${e}-${s}`),"aria-labelledby":r,children:n});return(0,c.jsxs)(c.Fragment,{children:[!L&&(a||P)&&$({}),(0,c.jsx)(Oe.Provider,{value:z,children:(0,c.jsx)(ye,{show:L,ref:j,backdrop:d,container:b,keyboard:h,autoFocus:y,enforceFocus:v&&!f,restoreFocus:A,restoreFocusOptions:_,onEscapeKeyDown:p,onShow:g,onHide:F,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==E||E(e,...t)},onEntering:S,onEntered:w,onExit:x,onExiting:k,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==O||O(...t)},manager:T||(f?(M.current||(M.current=new qe({handleContainerOverflow:!1})),M.current):(Ve||(Ve=new He(undefined)),Ve)),transition:Ke,backdropTransition:Qe,renderBackdrop:B,renderDialog:$})})]})}));Ye.displayName="Offcanvas";const Ge=Object.assign(Ye,{Body:xe,Header:Le,Title:Fe}),Je=o.forwardRef(((e,t)=>{const n=(0,o.useContext)(W.A);return(0,c.jsx)(Ge,{ref:t,show:!(null==n||!n.expanded),...e,renderStaticNode:!0})}));Je.displayName="NavbarOffcanvas";const Xe=Je,Ze=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=(0,l.oU)(t,"navbar-text"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ze.displayName="NavbarText";const et=Ze,tt=o.forwardRef(((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:u="light",bg:d,fixed:h,sticky:f,className:p,as:g="nav",expanded:m,onToggle:b,onSelect:y,collapseOnSelect:v=!1,...A}=(0,a.Zw)(e,{expanded:"onToggle"}),_=(0,l.oU)(n,"navbar"),w=(0,o.useCallback)(((...e)=>{null==y||y(...e),v&&m&&(null==b||b(!1))}),[y,v,m,b]);void 0===A.role&&"nav"!==g&&(A.role="navigation");let x=`${_}-expand`;"string"==typeof r&&(x=`${x}-${r}`);const k=(0,o.useMemo)((()=>({onToggle:()=>null==b?void 0:b(!m),bsPrefix:_,expanded:!!m,expand:r})),[_,m,r,b]);return(0,c.jsx)(W.A.Provider,{value:k,children:(0,c.jsx)(s.A.Provider,{value:w,children:(0,c.jsx)(g,{ref:t,...A,className:i()(p,_,r&&x,u&&`${_}-${u}`,d&&`bg-${d}`,f&&`sticky-${f}`,h&&`fixed-${h}`)})})})}));tt.displayName="Navbar";const nt=Object.assign(tt,{Brand:d,Collapse:V,Offcanvas:Xe,Text:et,Toggle:Q})},4778:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=n(6540).createContext(null);r.displayName="NavbarContext";const i=r},6519:(e,t,n)=>{"use strict";n.d(t,{Wz:()=>l,oU:()=>a});var r=n(6540);n(4848);const i=r.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:o,Provider:s}=i;function a(e,t){const{prefixes:n}=(0,r.useContext)(i);return e||n[t]||t}function l(){const{dir:e}=(0,r.useContext)(i);return"rtl"===e}},2551:(e,t,n)=>{"use strict";var r=n(6540),i=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),O=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),j=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var M=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=D&&e[D]||e["@@iterator"])?e:null}var N,I=Object.assign;function F(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function $(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return B(e.type,!1);case 11:return B(e.type.render,!1);case 1:return B(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case w:return"Portal";case E:return"Profiler";case k:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function G(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var be=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(be[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ae=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,xe=null,ke=null;function Ee(e){if(e=vi(e)){if("function"!=typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=_i(t),we(e.stateNode,e.type,t))}}function Se(e){xe?ke?ke.push(e):ke=[e]:xe=e}function Oe(){if(xe){var e=xe,t=ke;if(ke=xe=null,Ee(e),t)for(e=0;e>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!=(o&=s)&&(r=dt(o))}else 0!=(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function bt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<=Ln),Fn=String.fromCharCode(32),zn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){Se(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Qn(e){Fr(e,0)}function Yn(e){if(K(Ai(e)))return e}function Gn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Xn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"==typeof er.oninput}Xn=Zn}else Xn=!1;Jn=Xn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var s=ur(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,mr=null,br=null,yr=null,vr=!1;function Ar(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==mr||mr!==Q(r)||(r="selectionStart"in(r=mr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=qr(br,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},xr={},kr={};function Er(e){if(xr[e])return xr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return xr[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Sr=Er("animationend"),Or=Er("animationiteration"),Cr=Er("animationstart"),Tr=Er("transitionend"),Pr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jr(e,t){Pr.set(e,t),l(t,[e])}for(var Mr=0;Mrxi||(e.current=wi[xi],wi[xi]=null,xi--)}function Si(e,t){xi++,wi[xi]=e.current,e.current=t}var Oi={},Ci=ki(Oi),Ti=ki(!1),Pi=Oi;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Oi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ji(e){return null!=e.childContextTypes}function Mi(){Ei(Ti),Ei(Ci)}function Di(e,t,n){if(Ci.current!==Oi)throw Error(o(168));Si(Ci,t),Si(Ti,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return I({},n,r)}function Ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oi,Pi=Ci.current,Si(Ci,e),Si(Ti,Ti.current),!0}function Ii(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Li(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Ei(Ti),Ei(Ci),Si(Ci,e)):Ei(Ti),Si(Ti,n)}var Fi=null,zi=!1,Bi=!1;function $i(e){null===Fi?Fi=[e]:Fi.push(e)}function Ui(){if(!Bi&&null!==Fi){Bi=!0;var e=0,t=vt;try{var n=Fi;for(vt=1;e>=s,i-=s,Gi=1<<32-st(t)+i|n<g?(m=d,d=null):m=d.sibling;var b=f(i,d,a[g],l);if(null===b){null===d&&(d=m);break}e&&d&&null===b.alternate&&t(i,d),o=s(b,o,g),null===u?c=b:u.sibling=b,u=b,d=m}if(g===a.length)return n(i,d),io&&Xi(i,g),c;if(null===d){for(;gm?(b=g,g=null):b=g.sibling;var v=f(i,g,y.value,c);if(null===v){null===g&&(g=b);break}e&&g&&null===v.alternate&&t(i,g),a=s(v,a,m),null===d?u=v:d.sibling=v,d=v,g=b}if(y.done)return n(i,g),io&&Xi(i,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(i,y.value,c))&&(a=s(y,a,m),null===d?u=y:d.sibling=y,d=y);return io&&Xi(i,m),u}for(g=r(i,g);!y.done;m++,y=l.next())null!==(y=p(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),a=s(y,a,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach((function(e){return t(i,e)})),io&&Xi(i,m),u}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===x&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===x){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===j&&vo(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=bo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===x?((o=Lc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Dc(s.type,s.key,s.props,null,r.mode,l)).ref=bo(r,o,s),l.return=r,r=l)}return a(r);case w:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Fc(s,r.mode,l)).return=r,r=o}return a(r);case j:return e(r,o,(u=s._init)(s._payload),l)}if(te(s))return g(r,o,s,l);if(L(s))return m(r,o,s,l);yo(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Ic(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var _o=Ao(!0),wo=Ao(!1),xo=ki(null),ko=null,Eo=null,So=null;function Oo(){So=Eo=ko=null}function Co(e){var t=xo.current;Ei(xo),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Po(e,t){ko=e,So=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(va=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(So!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===ko)throw Error(o(308));Eo=e,ko.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var jo=null;function Mo(e){null===jo?jo=[e]:jo.push(e)}function Do(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Mo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Lo(e,r)}function Lo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var No=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Cl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Lo(e,n)}return null===(i=r.interleaved)?(t.next=t,Mo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Lo(e,n)}function $o(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;No=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l)}if(null!==o){var d=i.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,f=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(h=t,f=n,g.tag){case 1:if("function"==typeof(p=g.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(f,d,h):p))break e;d=I({},d,h);break e;case 2:No=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Nl|=s,e.lanes=s,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;tn?n:4,e(!0);var r=os.transition;os.transition={};try{e(!1),t()}finally{vt=n,os.transition=r}}function qs(){return vs().memoizedState}function Ks(e,t,n){var r=tc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ys(e)?Gs(t,n):null!==(n=Do(e,t,n,r))&&(nc(n,e,r,ec()),Js(n,t,r))}function Qs(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ys(e))Gs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(i.next=i,Mo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Do(e,t,i,r))&&(nc(n,e,r,i=ec()),Js(n,t,r))}}function Ys(e){var t=e.alternate;return e===as||null!==t&&t===as}function Gs(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Js(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Xs={readContext:Ro,useCallback:ps,useContext:ps,useEffect:ps,useImperativeHandle:ps,useInsertionEffect:ps,useLayoutEffect:ps,useMemo:ps,useReducer:ps,useRef:ps,useState:ps,useDebugValue:ps,useDeferredValue:ps,useTransition:ps,useMutableSource:ps,useSyncExternalStore:ps,useId:ps,unstable_isNewReconciler:!1},Zs={readContext:Ro,useCallback:function(e,t){return ys().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ms(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ms(4,2,e,t)},useMemo:function(e,t){var n=ys();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ys();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ks.bind(null,as,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ys().memoizedState=e},useState:Ps,useDebugValue:$s,useDeferredValue:function(e){return ys().memoizedState=e},useTransition:function(){var e=Ps(!1),t=e[0];return e=Vs.bind(null,e[1]),ys().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=as,i=ys();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Tl)throw Error(o(349));30&ss||Es(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ls(Os.bind(null,r,s,e),[e]),r.flags|=2048,Rs(9,Ss.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ys(),t=Tl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Gi&~(1<<32-st(Gi)-1)).toString(32)+n),0<(n=hs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Ro,useCallback:Us,useContext:Ro,useEffect:Ns,useImperativeHandle:Bs,useInsertionEffect:Is,useLayoutEffect:Fs,useMemo:Ws,useReducer:_s,useRef:js,useState:function(){return _s(As)},useDebugValue:$s,useDeferredValue:function(e){return Hs(vs(),ls.memoizedState,e)},useTransition:function(){return[_s(As)[0],vs().memoizedState]},useMutableSource:xs,useSyncExternalStore:ks,useId:qs,unstable_isNewReconciler:!1},ta={readContext:Ro,useCallback:Us,useContext:Ro,useEffect:Ns,useImperativeHandle:Bs,useInsertionEffect:Is,useLayoutEffect:Fs,useMemo:Ws,useReducer:ws,useRef:js,useState:function(){return ws(As)},useDebugValue:$s,useDeferredValue:function(e){var t=vs();return null===ls?t.memoizedState=e:Hs(t,ls.memoizedState,e)},useTransition:function(){return[ws(As)[0],vs().memoizedState]},useMutableSource:xs,useSyncExternalStore:ks,useId:qs,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ra(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=zo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),$o(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=zo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),$o(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=zo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Bo(e,i,r))&&(nc(t,e,r,n),$o(t,e,r))}};function oa(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,o))}function sa(e,t,n){var r=!1,i=Oi,o=t.contextType;return"object"==typeof o&&null!==o?o=Ro(o):(i=ji(t)?Pi:Ci.current,o=(r=null!=(r=t.contextTypes))?Ri(e,i):Oi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function aa(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function la(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Io(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Ro(o):(o=ji(t)?Pi:Ci.current,i.context=Ri(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(ra(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ia.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var ha="function"==typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=zo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),da(0,t)},n}function pa(e,t,n){(n=zo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ha;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ba(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=zo(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e)}var ya=A.ReactCurrentOwner,va=!1;function Aa(e,t,n,r){t.child=null===e?wo(t,null,n,r):_o(t,e.child,n,r)}function _a(e,t,n,r,i){n=n.render;var o=t.ref;return Po(t,i),r=ms(e,t,n,r,o,i),n=bs(),null===e||va?(io&&n&&eo(t),t.flags|=1,Aa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function wa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||jc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xa(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Mc(o,r)).ref=t.ref,e.return=t,t.child=e}function xa(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(va=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);131072&e.flags&&(va=!0)}}return Sa(e,t,n,r,i)}function ka(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(Ml,jl),jl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Si(Ml,jl),jl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(Ml,jl),jl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Si(Ml,jl),jl|=r;return Aa(e,t,i,n),t.child}function Ea(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Sa(e,t,n,r,i){var o=ji(n)?Pi:Ci.current;return o=Ri(t,o),Po(t,i),n=ms(e,t,n,r,o,i),r=bs(),null===e||va?(io&&r&&eo(t),t.flags|=1,Aa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Oa(e,t,n,r,i){if(ji(n)){var o=!0;Ni(t)}else o=!1;if(Po(t,i),null===t.stateNode)Wa(e,t),sa(t,n,r),la(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;c="object"==typeof c&&null!==c?Ro(c):Ri(t,c=ji(n)?Pi:Ci.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&aa(t,s,r,c),No=!1;var h=t.memoizedState;s.state=h,Wo(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Ti.current||No?("function"==typeof u&&(ra(t,n,u,r),l=t.memoizedState),(a=No||oa(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Fo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),s.props=c,d=t.pendingProps,h=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Ro(l):Ri(t,l=ji(n)?Pi:Ci.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&aa(t,s,r,l),No=!1,h=t.memoizedState,s.state=h,Wo(t,r,s,i);var p=t.memoizedState;a!==d||h!==p||Ti.current||No?("function"==typeof f&&(ra(t,n,f,r),p=t.memoizedState),(c=No||oa(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ca(e,t,n,r,o,i)}function Ca(e,t,n,r,i,o){Ea(e,t);var s=!!(128&t.flags);if(!r&&!s)return i&&Ii(t,n,!1),Ha(e,t,o);r=t.stateNode,ya.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,a,o)):Aa(e,t,a,o),t.memoizedState=r.state,i&&Ii(t,n,!0),t.child}function Ta(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),Go(e,t.containerInfo)}function Pa(e,t,n,r,i){return po(),go(i),t.flags|=256,Aa(e,t,n,r),t.child}var Ra,ja,Ma,Da,La={dehydrated:null,treeContext:null,retryLane:0};function Na(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ia(e,t,n){var r,i=t.pendingProps,s=es.current,a=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Si(es,1&s),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},1&i||null===a?a=Nc(l,i,0,null):(a.childLanes=0,a.pendingProps=l),e=Lc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Na(n),t.memoizedState=La,e):Fa(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,za(e,t,a,r=ua(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Nc({mode:"visible",children:r.children},i,0,null),(s=Lc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,1&t.mode&&_o(t,e.child,null,a),t.child.memoizedState=Na(a),t.memoizedState=La,s);if(!(1&t.mode))return za(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,za(e,t,a,r=ua(s=Error(o(419)),r,void 0))}if(l=!!(a&e.childLanes),va||l){if(null!==(r=Tl)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|a)?0:i)&&i!==s.retryLane&&(s.retryLane=i,Lo(e,i),nc(r,e,i,-1))}return gc(),za(e,t,a,r=ua(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Ki[Qi++]=Gi,Ki[Qi++]=Ji,Ki[Qi++]=Yi,Gi=e.id,Ji=e.overflow,Yi=t),(t=Fa(t,r.children)).flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 1&l||t.child===s?(i=Mc(s,c)).subtreeFlags=14680064&s.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null),null!==r?a=Mc(r,a):(a=Lc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Na(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=La,i}return e=(a=e.child).sibling,i=Mc(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fa(e,t){return(t=Nc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function za(e,t,n,r){return null!==r&&go(r),_o(t,e.child,null,n),(e=Fa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ba(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function $a(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ua(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Aa(e,t,r.children,n),2&(r=es.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ba(e,n,t);else if(19===e.tag)Ba(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Si(es,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$a(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ts(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$a(t,!0,n,null,o);break;case"together":$a(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Wa(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Mc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ka(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(t),null;case 1:case 17:return ji(t.type)&&Mi(),qa(t),null;case 3:return r=t.stateNode,Jo(),Ei(Ti),Ei(Ci),rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),ja(e,t),qa(t),null;case 5:Zo(t);var i=Yo(Qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ma(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return qa(t),null}if(e=Yo(qo.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hi]=t,r[fi]=s,e=!!(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;iUl&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ts(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Va(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return qa(t),null}else 2*Je()-s.renderingStartTime>Ul&&1073741824!==n&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=es.current,Si(es,r?1&n|2:1&n),t):(qa(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&jl)&&(qa(t),6&t.subtreeFlags&&(t.flags|=8192)):qa(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Qa(e,t){switch(to(t),t.tag){case 1:return ji(t.type)&&Mi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),Ei(Ti),Ei(Ci),rs(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(Ei(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ei(es),null;case 4:return Jo(),null;case 10:return Co(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ja=function(){},Ma=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(qo.current);var o,s=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),s=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Zr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&zr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Da=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ya=!1,Ga=!1,Ja="function"==typeof WeakSet?WeakSet:Set,Xa=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){kc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){kc(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[gi],delete t[mi],delete t[bi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ga||Za(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Ga&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(2&o||4&o)&&el(n,t,s),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Ga&&(Za(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){kc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ga=(r=Ga)||null!==n.memoizedState,hl(e,t,n),Ga=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kl(r/1960))-r)){e.timeoutHandle=ri(_c.bind(null,e,Bl,Wl),r);break}_c(e,Bl,Wl);break;default:throw Error(o(329))}}}return rc(e,Je()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Bl,Bl=n,null!==t&&sc(t)),e}function sc(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function ac(e,t){for(t&=~Fl,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Ql)var r=!1;else{if(e=Ql,Ql=null,Yl=0,6&Cl)throw Error(o(331));var i=Cl;for(Cl|=4,Xa=e.current;null!==Xa;){var s=Xa,a=s.child;if(16&Xa.flags){var l=s.deletions;if(null!==l){for(var c=0;cJe()-$l?hc(e,0):Fl|=n),rc(e,t)}function Sc(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=ec();null!==(e=Lo(e,t))&&(bt(e,t,n),rc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sc(e,n)}function Cc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Sc(e,n)}function Tc(e,t){return Ke(e,t)}function Pc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rc(e,t,n,r){return new Pc(e,t,n,r)}function jc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mc(e,t){var n=e.alternate;return null===n?((n=Rc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dc(e,t,n,r,i,s){var a=2;if(r=e,"function"==typeof e)jc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case x:return Lc(n.children,i,s,t);case k:a=8,i|=8;break;case E:return(e=Rc(12,n,t,2|i)).elementType=E,e.lanes=s,e;case T:return(e=Rc(13,n,t,i)).elementType=T,e.lanes=s,e;case P:return(e=Rc(19,n,t,i)).elementType=P,e.lanes=s,e;case M:return Nc(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:a=10;break e;case O:a=9;break e;case C:a=11;break e;case R:a=14;break e;case j:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Rc(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Lc(e,t,n,r){return(e=Rc(7,e,r,t)).lanes=n,e}function Nc(e,t,n,r){return(e=Rc(22,e,r,t)).elementType=M,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return(e=Rc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,i,o,s,a,l){return e=new zc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Rc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Io(o),e}function $c(e){if(!e)return Oi;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ji(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(ji(n))return Li(e,n,t)}return t}function Uc(e,t,n,r,i,o,s,a,l){return(e=Bc(n,r,!0,e,0,o,0,a,l)).context=$c(null),n=e.current,(o=zo(r=ec(),i=tc(n))).callback=null!=t?t:null,Bo(n,o,i),e.current.lanes=i,bt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),s=tc(i);return n=$c(n),null===t.context?t.context=n:t.pendingContext=n,(t=zo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(i,t,s))&&(nc(e,i,s,o),$o(e,i,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n{"use strict";var r=n(961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},961:(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(e){console.error(e)}}(),e.exports=n(2551)},3729:(e,t,n)=>{"use strict";e.exports=n(7372)},2648:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AbortedDeferredError:()=>G,Await:()=>Qt,BrowserRouter:()=>Tn,Form:()=>Nn,HashRouter:()=>Pn,Link:()=>Dn,MemoryRouter:()=>Ut,NavLink:()=>Ln,Navigate:()=>Wt,NavigationType:()=>r,Outlet:()=>Ht,Route:()=>Vt,Router:()=>qt,RouterProvider:()=>On,Routes:()=>Kt,ScrollRestoration:()=>In,UNSAFE_DataRouterContext:()=>Je,UNSAFE_DataRouterStateContext:()=>Xe,UNSAFE_ErrorResponseImpl:()=>ne,UNSAFE_FetchersContext:()=>_n,UNSAFE_LocationContext:()=>tt,UNSAFE_NavigationContext:()=>et,UNSAFE_RouteContext:()=>nt,UNSAFE_ViewTransitionContext:()=>An,UNSAFE_useRouteId:()=>Ct,UNSAFE_useScrollRestoration:()=>Xn,createBrowserRouter:()=>mn,createHashRouter:()=>bn,createMemoryRouter:()=>nn,createPath:()=>b,createRoutesFromChildren:()=>Zt,createRoutesFromElements:()=>Zt,createSearchParams:()=>cn,defer:()=>Z,generatePath:()=>N,isRouteErrorResponse:()=>re,json:()=>Y,matchPath:()=>I,matchRoutes:()=>x,parsePath:()=>y,redirect:()=>ee,redirectDocument:()=>te,renderMatches:()=>en,resolvePath:()=>B,unstable_HistoryRouter:()=>Rn,unstable_usePrompt:()=>er,unstable_useViewTransitionState:()=>tr,useActionData:()=>Dt,useAsyncError:()=>It,useAsyncValue:()=>Nt,useBeforeUnload:()=>Zn,useBlocker:()=>zt,useFetcher:()=>Qn,useFetchers:()=>Yn,useFormAction:()=>Kn,useHref:()=>it,useInRouterContext:()=>ot,useLinkClickHandler:()=>Un,useLoaderData:()=>jt,useLocation:()=>st,useMatch:()=>lt,useMatches:()=>Rt,useNavigate:()=>ut,useNavigation:()=>Tt,useNavigationType:()=>at,useOutlet:()=>ft,useOutletContext:()=>ht,useParams:()=>pt,useResolvedPath:()=>gt,useRevalidator:()=>Pt,useRouteError:()=>Lt,useRouteLoaderData:()=>Mt,useRoutes:()=>mt,useSearchParams:()=>Wn,useSubmit:()=>qn});var r,i=n(6540),o=n.t(i,2),s=n(961),a=n.t(s,2);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;td(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let s=c(null==i?t.length-1:i),a=r.Pop,l=null;function c(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[s]}function d(e,n,r){void 0===n&&(n=null);let i=m(t?u().pathname:"/",e,n,r);return p("/"===i.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),i}function h(e){return"string"==typeof e?e:b(e)}return{get index(){return s},get action(){return a},get location(){return u()},createHref:h,createURL:e=>new URL(h(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?y(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a=r.Push;let i=d(e,n);s+=1,t.splice(s,t.length,i),o&&l&&l({action:a,location:i,delta:1})},replace(e,n){a=r.Replace;let i=d(e,n);t[s]=i,o&&l&&l({action:a,location:i,delta:0})},go(e){a=r.Pop;let n=c(s+e),i=t[n];s=n,l&&l({action:a,location:i,delta:e})},listen:e=>(l=e,()=>{l=null})}}function d(e){return void 0===e&&(e={}),v((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return m("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:b(t)}),null,e)}function h(e){return void 0===e&&(e={}),v((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=y(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),m("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:b(t))}),(function(e,t){p("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function f(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function g(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n,r){return void 0===n&&(n=null),l({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function b(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function y(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function v(e,t,n,i){void 0===i&&(i={});let{window:o=document.defaultView,v5Compat:s=!1}=i,a=o.history,u=r.Pop,d=null,h=p();function p(){return(a.state||{idx:null}).idx}function y(){u=r.Pop;let e=p(),t=null==e?null:e-h;h=e,d&&d({action:u,location:A.location,delta:t})}function v(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:b(e);return n=n.replace(/ $/,"%20"),f(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==h&&(h=0,a.replaceState(l({},a.state,{idx:h}),""));let A={get action(){return u},get location(){return e(o,a)},listen(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(c,y),d=e,()=>{o.removeEventListener(c,y),d=null}},createHref:e=>t(o,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){u=r.Push;let i=m(A.location,e,t);n&&n(i,e),h=p()+1;let l=g(i,h),c=A.createHref(i);try{a.pushState(l,"",c)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(c)}s&&d&&d({action:u,location:A.location,delta:1})},replace:function(e,t){u=r.Replace;let i=m(A.location,e,t);n&&n(i,e),h=p();let o=g(i,h),l=A.createHref(i);a.replaceState(o,"",l),s&&d&&d({action:u,location:A.location,delta:0})},go:e=>a.go(e)};return A}var A;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(A||(A={}));const _=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map(((e,i)=>{let o=[...n,i],s="string"==typeof e.id?e.id:o.join("-");if(f(!0!==e.index||!e.children,"Cannot specify children on an index route"),f(!r[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=l({},e,t(e),{id:s});return r[s]=n,n}{let n=l({},e,t(e),{id:s,children:void 0});return r[s]=n,e.children&&(n.children=w(e.children,t,o,r)),n}}))}function x(e,t,n){void 0===n&&(n="/");let r=z(("string"==typeof t?y(t):t).pathname||"/",n);if(null==r)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let e=0;null==o&&e{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(f(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=V([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(f(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),E(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:D(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of S(e.path))i(e,t,n);else i(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=S(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const O=/^:[\w-]+$/,C=3,T=2,P=1,R=10,j=-2,M=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(M)&&(r+=j),t&&(r+=T),n.filter((e=>!M(e))).reduce(((e,t)=>e+(O.test(t)?C:""===t?P:R)),r)}function L(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let e=0;enull==e?"":"string"==typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e)return i(t["*"]);const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,n]=o;let r=t[e];return f("?"===n||null!=r,'Missing ":'+e+'" param'),i(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function I(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),p("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function F(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function B(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?y(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:K(r),hash:Q(i)}}function $(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function U(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function W(e,t){let n=U(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function H(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=y(e):(i=l({},e),f(!i.pathname||!i.pathname.includes("?"),$("?","pathname","search",i)),f(!i.pathname||!i.pathname.includes("#"),$("#","pathname","hash",i)),f(!i.search||!i.search.includes("#"),$("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=B(i,o),u=a&&"/"!==a&&a.endsWith("/"),d=(s||"."===a)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}const V=e=>e.join("/").replace(/\/\/+/g,"/"),q=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),K=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Y=function(e,t){void 0===t&&(t={});let n="number"==typeof t?{status:t}:t,r=new Headers(n.headers);return r.has("Content-Type")||r.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),l({},n,{headers:r}))};class G extends Error{}class J{constructor(e,t){let n;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],f(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>n=t)),this.controller=new AbortController;let r=()=>n(new G("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r),this.controller.signal.addEventListener("abort",r),this.data=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(n,e,void 0,t)),(t=>this.onSettle(n,e,t)));return n.catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof G)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===n&&void 0===r){let n=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return void 0===r?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach((n=>n(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),t=await new Promise((t=>{this.subscribe((r=>{e.removeEventListener("abort",n),(r||this.done)&&t(r)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return f(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:X(r)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function X(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const Z=function(e,t){return void 0===t&&(t={}),new J(e,"number"==typeof t?{status:t}:t)},ee=function(e,t){void 0===t&&(t=302);let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let r=new Headers(n.headers);return r.set("Location",e),new Response(null,l({},n,{headers:r}))},te=(e,t)=>{let n=ee(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n};class ne{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function re(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ie=["post","put","patch","delete"],oe=new Set(ie),se=["get",...ie],ae=new Set(se),le=new Set([301,302,303,307,308]),ce=new Set([307,308]),ue={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},de={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},he={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ge="remix-router-transitions";function me(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,i=!n;let o;if(f(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=pe;let s,a,c={},u=w(e.routes,o,void 0,c),d=e.basename||"/",h=e.unstable_dataStrategy||xe,g=l({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),b=null,y=new Set,v=null,_=null,E=null,S=null!=e.hydrationData,O=x(u,e.history.location,d),C=null;if(null==O){let t=De(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Me(u);O=n,C={[r.id]:t}}let T,P=O.some((e=>e.route.lazy)),R=O.some((e=>e.route.loader));if(P)a=!1;else if(R)if(g.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=e=>!e.route.loader||("function"!=typeof e.route.loader||!0!==e.route.loader.hydrate)&&(t&&void 0!==t[e.route.id]||n&&void 0!==n[e.route.id]);if(n){let e=O.findIndex((e=>void 0!==n[e.route.id]));a=O.slice(0,e+1).every(r)}else a=O.every(r)}else a=null!=e.hydrationData;else a=!0;let j,M={historyAction:e.history.action,location:e.history.location,matches:O,initialized:a,navigation:ue,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},D=r.Pop,L=!1,N=!1,I=new Map,F=null,B=!1,$=!1,U=[],W=[],H=new Map,V=0,q=-1,K=new Map,Q=new Set,Y=new Map,G=new Map,J=new Set,X=new Map,Z=new Map,ee=!1;function te(e,t){void 0===t&&(t={}),M=l({},M,e);let n=[],r=[];g.v7_fetcherPersist&&M.fetchers.forEach(((e,t)=>{"idle"===e.state&&(J.has(t)?r.push(t):n.push(t))})),[...y].forEach((e=>e(M,{deletedFetchers:r,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),g.v7_fetcherPersist&&(n.forEach((e=>M.fetchers.delete(e))),r.forEach((e=>Ne(e))))}function ie(t,n,i){var o,a;let c,{flushSync:d}=void 0===i?{}:i,h=null!=M.actionData&&null!=M.navigation.formMethod&&$e(M.navigation.formMethod)&&"loading"===M.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);c=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:h?M.actionData:null;let f=n.loaderData?Pe(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,p=M.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,he))));let g,m=!0===L||null!=M.navigation.formMethod&&$e(M.navigation.formMethod)&&!0!==(null==(a=t.state)?void 0:a._isRedirect);if(s&&(u=s,s=void 0),B||D===r.Pop||(D===r.Push?e.history.push(t,t.state):D===r.Replace&&e.history.replace(t,t.state)),D===r.Pop){let e=I.get(M.location.pathname);e&&e.has(t.pathname)?g={currentLocation:M.location,nextLocation:t}:I.has(t.pathname)&&(g={currentLocation:t,nextLocation:M.location})}else if(N){let e=I.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),I.set(M.location.pathname,e)),g={currentLocation:M.location,nextLocation:t}}te(l({},n,{actionData:c,loaderData:f,historyAction:D,location:t,initialized:!0,navigation:ue,revalidation:"idle",restoreScrollPosition:it(t,n.matches||M.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:g,flushSync:!0===d}),D=r.Pop,L=!1,N=!1,B=!1,$=!1,U=[],W=[]}async function oe(t,n,i){j&&j.abort(),j=null,D=t,B=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(v&&E){let n=rt(e,t);v[n]=E()}}(M.location,M.matches),L=!0===(i&&i.preventScrollReset),N=!0===(i&&i.enableViewTransition);let o=s||u,a=i&&i.overrideNavigation,c=x(o,n,d),h=!0===(i&&i.flushSync);if(!c){let e=De(404,{pathname:n.pathname}),{matches:t,route:r}=Me(o);return nt(),void ie(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:h})}if(M.initialized&&!$&&(f=M.location,p=n,f.pathname===p.pathname&&f.search===p.search&&(""===f.hash?""!==p.hash:f.hash===p.hash||""!==p.hash))&&!(i&&i.submission&&$e(i.submission.formMethod)))return void ie(n,{matches:c},{flushSync:h});var f,p;j=new AbortController;let m,b=Se(e.history,n,j.signal,i&&i.submission);if(i&&i.pendingError)m=[je(c).route.id,{type:A.error,error:i.pendingError}];else if(i&&i.submission&&$e(i.submission.formMethod)){let t=await async function(e,t,n,i,o){void 0===o&&(o={}),Ae();let s,a=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,n);te({navigation:a},{flushSync:!0===o.flushSync});let l=Ve(i,t);if(l.route.action||l.route.lazy){if(s=(await ae("action",e,[l],i))[0],e.signal.aborted)return{shortCircuited:!0}}else s={type:A.error,error:De(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})};if(ze(s)){let t;return t=o&&null!=o.replace?o.replace:Ee(s.response.headers.get("Location"),new URL(e.url),d)===M.location.pathname+M.location.search,await se(e,s,{submission:n,replace:t}),{shortCircuited:!0}}if(Ie(s))throw De(400,{type:"defer-action"});if(Fe(s)){let e=je(i,l.route.id);return!0!==(o&&o.replace)&&(D=r.Push),{pendingActionResult:[e.route.id,s]}}return{pendingActionResult:[l.route.id,s]}}(b,n,i.submission,c,{replace:i.replace,flushSync:h});if(t.shortCircuited)return;m=t.pendingActionResult,a=Ke(n,i.submission),h=!1,b=Se(e.history,b.url,b.signal)}let{shortCircuited:y,loaderData:_,errors:w}=await async function(t,n,r,i,o,a,c,h,f,p){let m=i||Ke(n,o),b=o||a||qe(m),y=s||u,[v,A]=ve(e.history,M,r,b,n,g.v7_partialHydration&&!0===h,g.unstable_skipActionErrorRevalidation,$,U,W,J,Y,Q,y,d,p);if(nt((e=>!(r&&r.some((t=>t.route.id===e)))||v&&v.some((t=>t.route.id===e)))),q=++V,0===v.length&&0===A.length){let e=Je();return ie(n,l({matches:r,loaderData:{},errors:p&&Fe(p[1])?{[p[0]]:p[1].error}:null},Re(p),e?{fetchers:new Map(M.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(!(B||g.v7_partialHydration&&h)){let e;A.forEach((e=>{let t=M.fetchers.get(e.key),n=Qe(void 0,t?t.data:void 0);M.fetchers.set(e.key,n)})),p&&!Fe(p[1])?e={[p[0]]:p[1].data}:M.actionData&&(e=0===Object.keys(M.actionData).length?null:M.actionData),te(l({navigation:m},void 0!==e?{actionData:e}:{},A.length>0?{fetchers:new Map(M.fetchers)}:{}),{flushSync:f})}A.forEach((e=>{H.has(e.key)&&He(e.key),e.controller&&H.set(e.key,e.controller)}));let _=()=>A.forEach((e=>He(e.key)));j&&j.signal.addEventListener("abort",_);let{loaderResults:w,fetcherResults:x}=await me(M.matches,r,v,A,t);if(t.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",_),A.forEach((e=>H.delete(e.key)));let k=Le([...w,...x]);if(k){if(k.idx>=v.length){let e=A[k.idx-v.length].key;Q.add(e)}return await se(t,k.result,{replace:c}),{shortCircuited:!0}}let{loaderData:E,errors:S}=Te(M,r,v,w,p,A,x,X);X.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&X.delete(t)}))})),g.v7_partialHydration&&h&&M.errors&&Object.entries(M.errors).filter((e=>{let[t]=e;return!v.some((e=>e.route.id===t))})).forEach((e=>{let[t,n]=e;S=Object.assign(S||{},{[t]:n})}));let O=Je(),C=Xe(q),T=O||C||A.length>0;return l({loaderData:E,errors:S},T?{fetchers:new Map(M.fetchers)}:{})}(b,n,c,a,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&!0===i.initialHydration,h,m);y||(j=null,ie(n,l({matches:c},Re(m),{loaderData:_,errors:w})))}async function se(i,o,s){let{submission:a,fetcherSubmission:c,replace:u}=void 0===s?{}:s;o.response.headers.has("X-Remix-Revalidate")&&($=!0);let h=o.response.headers.get("Location");f(h,"Expected a Location header on the redirect Response"),h=Ee(h,new URL(i.url),d);let p=m(M.location,h,{_isRedirect:!0});if(n){let n=!1;if(o.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(fe.test(h)){const r=e.history.createURL(h);n=r.origin!==t.location.origin||null==z(r.pathname,d)}if(n)return void(u?t.location.replace(h):t.location.assign(h))}j=null;let g=!0===u?r.Replace:r.Push,{formMethod:b,formAction:y,formEncType:v}=M.navigation;!a&&!c&&b&&y&&v&&(a=qe(M.navigation));let A=a||c;if(ce.has(o.response.status)&&A&&$e(A.formMethod))await oe(g,p,{submission:l({},A,{formAction:h}),preventScrollReset:L});else{let e=Ke(p,a);await oe(g,p,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:L})}}async function ae(e,t,n,r){try{let i=await async function(e,t,n,r,i,o,s,a){let c=r.reduce(((e,t)=>e.add(t.route.id)),new Set),u=new Set,d=await e({matches:i.map((e=>{let r=c.has(e.route.id);return l({},e,{shouldLoad:r,resolve:i=>(u.add(e.route.id),r?async function(e,t,n,r,i,o,s){let a,l,c=r=>{let i,a=new Promise(((e,t)=>i=t));l=()=>i(),t.signal.addEventListener("abort",l);let c,u=i=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:s},...void 0!==i?[i]:[]);return c=o?o((e=>u(e))):(async()=>{try{return{type:"data",result:await u()}}catch(e){return{type:"error",result:e}}})(),Promise.race([c,a])};try{let o=n.route[e];if(n.route.lazy)if(o){let e,[t]=await Promise.all([c(o).catch((t=>{e=t})),we(n.route,i,r)]);if(void 0!==e)throw e;a=t}else{if(await we(n.route,i,r),o=n.route[e],!o){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw De(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:A.data,result:void 0}}a=await c(o)}else{if(!o){let e=new URL(t.url);throw De(404,{pathname:e.pathname+e.search})}a=await c(o)}f(void 0!==a.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:A.error,result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return a}(t,n,e,o,s,i,a):Promise.resolve({type:A.data,result:void 0}))})})),request:n,params:i[0].params,context:a});return i.forEach((e=>f(u.has(e.route.id),'`match.resolve()` was not called for route id "'+e.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.'))),d.filter(((e,t)=>c.has(i[t].route.id)))}(h,e,t,n,r,c,o);return await Promise.all(i.map(((e,i)=>{if(function(e){return Be(e.result)&&le.has(e.result.status)}(e)){let o=e.result;return{type:A.redirect,response:ke(o,t,n[i].route.id,r,d,g.v7_relativeSplatPath)}}return async function(e){let{result:t,type:n,status:r}=e;if(Be(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:A.error,error:e}}return n===A.error?{type:A.error,error:new ne(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:A.data,data:e,statusCode:t.status,headers:t.headers}}return n===A.error?{type:A.error,error:t,statusCode:re(t)?t.status:r}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:A.deferred,deferredData:t,statusCode:null==(i=t.init)?void 0:i.status,headers:(null==(o=t.init)?void 0:o.headers)&&new Headers(t.init.headers)}:{type:A.data,data:t,statusCode:r};var i,o}(e)})))}catch(e){return n.map((()=>({type:A.error,error:e})))}}async function me(t,n,r,i,o){let[s,...a]=await Promise.all([r.length?ae("loader",o,r,n):[],...i.map((t=>t.matches&&t.match&&t.controller?ae("loader",Se(e.history,t.path,t.controller.signal),[t.match],t.matches).then((e=>e[0])):Promise.resolve({type:A.error,error:De(404,{pathname:t.path})})))]);return await Promise.all([Ue(t,r,s,s.map((()=>o.signal)),!1,M.loaderData),Ue(t,i.map((e=>e.match)),a,i.map((e=>e.controller?e.controller.signal:null)),!0)]),{loaderResults:s,fetcherResults:a}}function Ae(){$=!0,U.push(...nt()),Y.forEach(((e,t)=>{H.has(t)&&(W.push(t),He(t))}))}function _e(e,t,n){void 0===n&&(n={}),M.fetchers.set(e,t),te({fetchers:new Map(M.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Oe(e,t,n,r){void 0===r&&(r={});let i=je(M.matches,t);Ne(e),te({errors:{[i.route.id]:n},fetchers:new Map(M.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Ce(e){return g.v7_fetcherPersist&&(G.set(e,(G.get(e)||0)+1),J.has(e)&&J.delete(e)),M.fetchers.get(e)||de}function Ne(e){let t=M.fetchers.get(e);!H.has(e)||t&&"loading"===t.state&&K.has(e)||He(e),Y.delete(e),K.delete(e),Q.delete(e),J.delete(e),M.fetchers.delete(e)}function He(e){let t=H.get(e);f(t,"Expected fetch controller: "+e),t.abort(),H.delete(e)}function Ge(e){for(let t of e){let e=Ye(Ce(t).data);M.fetchers.set(t,e)}}function Je(){let e=[],t=!1;for(let n of Q){let r=M.fetchers.get(n);f(r,"Expected fetcher: "+n),"loading"===r.state&&(Q.delete(n),e.push(n),t=!0)}return Ge(e),t}function Xe(e){let t=[];for(let[n,r]of K)if(r0}function Ze(e){M.blockers.delete(e),Z.delete(e)}function et(e,t){let n=M.blockers.get(e)||he;f("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(M.blockers);r.set(e,t),te({blockers:r})}function tt(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===Z.size)return;Z.size>1&&p(!1,"A router only supports one blocker at a time");let i=Array.from(Z.entries()),[o,s]=i[i.length-1],a=M.blockers.get(o);return a&&"proceeding"===a.state?void 0:s({currentLocation:t,nextLocation:n,historyAction:r})?o:void 0}function nt(e){let t=[];return X.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),X.delete(r))})),t}function rt(e,t){return _&&_(e,t.map((e=>k(e,M.loaderData))))||e.key}function it(e,t){if(v){let n=rt(e,t),r=v[n];if("number"==typeof r)return r}return null}return T={get basename(){return d},get future(){return g},get state(){return M},get routes(){return u},get window(){return t},initialize:function(){if(b=e.history.listen((t=>{let{action:n,location:r,delta:i}=t;if(ee)return void(ee=!1);p(0===Z.size||null!=i,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=tt({currentLocation:M.location,nextLocation:r,historyAction:n});return o&&null!=i?(ee=!0,e.history.go(-1*i),void et(o,{state:"blocked",location:r,proceed(){et(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(i)},reset(){let e=new Map(M.blockers);e.set(o,he),te({blockers:e})}})):oe(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ge);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,I);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ge,JSON.stringify(n))}catch(e){p(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,I);t.addEventListener("pagehide",e),F=()=>t.removeEventListener("pagehide",e)}return M.initialized||oe(r.Pop,M.location,{initialHydration:!0}),T},subscribe:function(e){return y.add(e),()=>y.delete(e)},enableScrollRestoration:function(e,t,n){if(v=e,E=t,_=n||null,!S&&M.navigation===ue){S=!0;let e=it(M.location,M.matches);null!=e&&te({restoreScrollPosition:e})}return()=>{v=null,E=null,_=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let o=be(M.location,M.matches,d,g.v7_prependBasename,n,g.v7_relativeSplatPath,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:s,submission:a,error:c}=ye(g.v7_normalizeFormMethod,!1,o,i),u=M.location,h=m(M.location,s,i&&i.state);h=l({},h,e.history.encodeLocation(h));let f=i&&null!=i.replace?i.replace:void 0,p=r.Push;!0===f?p=r.Replace:!1===f||null!=a&&$e(a.formMethod)&&a.formAction===M.location.pathname+M.location.search&&(p=r.Replace);let b=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,y=!0===(i&&i.unstable_flushSync),v=tt({currentLocation:u,nextLocation:h,historyAction:p});if(!v)return await oe(p,h,{submission:a,pendingError:c,preventScrollReset:b,replace:i&&i.replace,enableViewTransition:i&&i.unstable_viewTransition,flushSync:y});et(v,{state:"blocked",location:h,proceed(){et(v,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),t(n,i)},reset(){let e=new Map(M.blockers);e.set(v,he),te({blockers:e})}})},fetch:function(t,n,r,o){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(t)&&He(t);let a=!0===(o&&o.unstable_flushSync),l=s||u,c=be(M.location,M.matches,d,g.v7_prependBasename,r,g.v7_relativeSplatPath,n,null==o?void 0:o.relative),h=x(l,c,d);if(!h)return void Oe(t,n,De(404,{pathname:c}),{flushSync:a});let{path:p,submission:m,error:b}=ye(g.v7_normalizeFormMethod,!0,c,o);if(b)return void Oe(t,n,b,{flushSync:a});let y=Ve(h,p);L=!0===(o&&o.preventScrollReset),m&&$e(m.formMethod)?async function(t,n,r,i,o,a,l){if(Ae(),Y.delete(t),!i.route.action&&!i.route.lazy){let e=De(405,{method:l.formMethod,pathname:r,routeId:n});return void Oe(t,n,e,{flushSync:a})}let c=M.fetchers.get(t);_e(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(l,c),{flushSync:a});let h=new AbortController,p=Se(e.history,r,h.signal,l);H.set(t,h);let m=V,b=(await ae("action",p,[i],o))[0];if(p.signal.aborted)return void(H.get(t)===h&&H.delete(t));if(g.v7_fetcherPersist&&J.has(t)){if(ze(b)||Fe(b))return void _e(t,Ye(void 0))}else{if(ze(b))return H.delete(t),q>m?void _e(t,Ye(void 0)):(Q.add(t),_e(t,Qe(l)),se(p,b,{fetcherSubmission:l}));if(Fe(b))return void Oe(t,n,b.error)}if(Ie(b))throw De(400,{type:"defer-action"});let y=M.navigation.location||M.location,v=Se(e.history,y,h.signal),A=s||u,_="idle"!==M.navigation.state?x(A,M.navigation.location,d):M.matches;f(_,"Didn't find any matches after fetcher action");let w=++V;K.set(t,w);let k=Qe(l,b.data);M.fetchers.set(t,k);let[E,S]=ve(e.history,M,_,l,y,!1,g.unstable_skipActionErrorRevalidation,$,U,W,J,Y,Q,A,d,[i.route.id,b]);S.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=M.fetchers.get(t),r=Qe(void 0,n?n.data:void 0);M.fetchers.set(t,r),H.has(t)&&He(t),e.controller&&H.set(t,e.controller)})),te({fetchers:new Map(M.fetchers)});let O=()=>S.forEach((e=>He(e.key)));h.signal.addEventListener("abort",O);let{loaderResults:C,fetcherResults:T}=await me(M.matches,_,E,S,v);if(h.signal.aborted)return;h.signal.removeEventListener("abort",O),K.delete(t),H.delete(t),S.forEach((e=>H.delete(e.key)));let P=Le([...C,...T]);if(P){if(P.idx>=E.length){let e=S[P.idx-E.length].key;Q.add(e)}return se(v,P.result)}let{loaderData:R,errors:L}=Te(M,M.matches,E,C,void 0,S,T,X);if(M.fetchers.has(t)){let e=Ye(b.data);M.fetchers.set(t,e)}Xe(w),"loading"===M.navigation.state&&w>q?(f(D,"Expected pending action"),j&&j.abort(),ie(M.navigation.location,{matches:_,loaderData:R,errors:L,fetchers:new Map(M.fetchers)})):(te({errors:L,loaderData:Pe(M.loaderData,R,_,L),fetchers:new Map(M.fetchers)}),$=!1)}(t,n,p,y,h,a,m):(Y.set(t,{routeId:n,path:p}),async function(t,n,r,i,o,s,a){let l=M.fetchers.get(t);_e(t,Qe(a,l?l.data:void 0),{flushSync:s});let c=new AbortController,u=Se(e.history,r,c.signal);H.set(t,c);let d=V,h=(await ae("loader",u,[i],o))[0];if(Ie(h)&&(h=await We(h,u.signal,!0)||h),H.get(t)===c&&H.delete(t),!u.signal.aborted){if(!J.has(t))return ze(h)?q>d?void _e(t,Ye(void 0)):(Q.add(t),void await se(u,h)):void(Fe(h)?Oe(t,n,h.error):(f(!Ie(h),"Unhandled fetcher deferred data"),_e(t,Ye(h.data))));_e(t,Ye(void 0))}}(t,n,p,y,h,a,m))},revalidate:function(){Ae(),te({revalidation:"loading"}),"submitting"!==M.navigation.state&&("idle"!==M.navigation.state?oe(D||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation}):oe(M.historyAction,M.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ce,deleteFetcher:function(e){if(g.v7_fetcherPersist){let t=(G.get(e)||0)-1;t<=0?(G.delete(e),J.add(e)):G.set(e,t)}else Ne(e);te({fetchers:new Map(M.fetchers)})},dispose:function(){b&&b(),F&&F(),y.clear(),j&&j.abort(),M.fetchers.forEach(((e,t)=>Ne(t))),M.blockers.forEach(((e,t)=>Ze(t)))},getBlocker:function(e,t){let n=M.blockers.get(e)||he;return Z.get(e)!==t&&Z.set(e,t),n},deleteBlocker:Ze,_internalFetchControllers:H,_internalActiveDeferreds:X,_internalSetRoutes:function(e){c={},s=w(e,o,void 0,c)}},T}function be(e,t,n,r,i,o,s,a){let l,c;if(s){l=[];for(let e of t)if(l.push(e),e.route.id===s){c=e;break}}else l=t,c=t[t.length-1];let u=H(i||".",W(l,o),z(e.pathname,n)||e.pathname,"path"===a);return null==i&&(u.search=e.search,u.hash=e.hash),null!=i&&""!==i&&"."!==i||!c||!c.route.index||He(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(u.pathname="/"===u.pathname?n:V([n,u.pathname])),b(u)}function ye(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&(i=r.formMethod,!ae.has(i.toLowerCase())))return{path:n,error:De(405,{method:r.formMethod})};var i;let o,s,a=()=>({path:n,error:De(400,{type:"invalid-body"})}),l=r.formMethod||"get",c=e?l.toUpperCase():l.toLowerCase(),u=Ne(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!$e(c))return a();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:c,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!$e(c))return a();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:c,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return a()}}}if(f("function"==typeof FormData,"FormData is not available in this environment"),r.formData)o=Oe(r.formData),s=r.formData;else if(r.body instanceof FormData)o=Oe(r.body),s=r.body;else if(r.body instanceof URLSearchParams)o=r.body,s=Ce(o);else if(null==r.body)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(r.body),s=Ce(o)}catch(e){return a()}let d={formMethod:c,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if($e(d.formMethod))return{path:n,submission:d};let h=y(n);return t&&h.search&&He(h.search)&&o.append("index",""),h.search="?"+o,{path:b(h),submission:d}}function ve(e,t,n,r,i,o,s,a,c,u,d,h,f,p,g,m){let b=m?Fe(m[1])?m[1].error:m[1].data:void 0,y=e.createURL(t.location),v=e.createURL(i),A=m&&Fe(m[1])?m[0]:void 0,_=A?function(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}(n,A):n,w=m?m[1].statusCode:void 0,k=s&&w&&w>=400,E=_.filter(((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(null==i.loader)return!1;if(o)return!("function"==typeof i.loader&&!i.loader.hydrate&&(void 0!==t.loaderData[i.id]||t.errors&&void 0!==t.errors[i.id]));if(function(e,t,n){let r=!t||n.route.id!==t.route.id,i=void 0===e[n.route.id];return r||i}(t.loaderData,t.matches[n],e)||c.some((t=>t===e.route.id)))return!0;let s=t.matches[n],u=e;return _e(e,l({currentUrl:y,currentParams:s.params,nextUrl:v,nextParams:u.params},r,{actionResult:b,unstable_actionStatus:w,defaultShouldRevalidate:!k&&(a||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||Ae(s,u))}))})),S=[];return h.forEach(((e,i)=>{if(o||!n.some((t=>t.route.id===e.routeId))||d.has(i))return;let s=x(p,e.path,g);if(!s)return void S.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(i),h=Ve(s,e.path),m=!1;m=!f.has(i)&&(!!u.includes(i)||(c&&"idle"!==c.state&&void 0===c.data?a:_e(h,l({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:b,unstable_actionStatus:w,defaultShouldRevalidate:!k&&a})))),m&&S.push({key:i,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[E,S]}function Ae(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function _e(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}async function we(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];f(i,"No route found in manifest");let o={};for(let e in r){let t=void 0!==i[e]&&"hasErrorBoundary"!==e;p(!t,'Route "'+i.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||_.has(e)||(o[e]=r[e])}Object.assign(i,o),Object.assign(i,l({},t(i),{lazy:void 0}))}function xe(e){return Promise.all(e.matches.map((e=>e.resolve())))}function ke(e,t,n,r,i,o){let s=e.headers.get("Location");if(f(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!fe.test(s)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);s=be(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function Ee(e,t,n){if(fe.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=null!=z(i.pathname,n);if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Se(e,t,n,r){let i=e.createURL(Ne(t)).toString(),o={signal:n};if(r&&$e(r.formMethod)){let{formMethod:e,formEncType:t}=r;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(r.json)):"text/plain"===t?o.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?o.body=Oe(r.formData):o.body=r.formData}return new Request(i,o)}function Oe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Ce(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Te(e,t,n,r,i,o,s,a){let{loaderData:c,errors:u}=function(e,t,n,r,i,o){let s,a={},l=null,c=!1,u={},d=r&&Fe(r[1])?r[1].error:void 0;return n.forEach(((n,r)=>{let h=t[r].route.id;if(f(!ze(n),"Cannot handle redirect results in processLoaderData"),Fe(n)){let t=n.error;if(void 0!==d&&(t=d,d=void 0),l=l||{},o)l[h]=t;else{let n=je(e,h);null==l[n.route.id]&&(l[n.route.id]=t)}a[h]=void 0,c||(c=!0,s=re(n.error)?n.error.status:500),n.headers&&(u[h]=n.headers)}else Ie(n)?(i.set(h,n.deferredData),a[h]=n.deferredData.data,null==n.statusCode||200===n.statusCode||c||(s=n.statusCode),n.headers&&(u[h]=n.headers)):(a[h]=n.data,n.statusCode&&200!==n.statusCode&&!c&&(s=n.statusCode),n.headers&&(u[h]=n.headers))})),void 0!==d&&r&&(l={[r[0]]:d},a[r[0]]=void 0),{loaderData:a,errors:l,statusCode:s||200,loaderHeaders:u}}(t,n,r,i,a,!1);for(let t=0;te.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Me(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function De(e,t){let{pathname:n,routeId:r,method:i,type:o}=void 0===t?{}:t,s="Unknown Server Error",a="Unknown @remix-run/router error";return 400===e?(s="Bad Request",i&&n&&r?a="You made a "+i+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===o?a="defer() is not supported in actions":"invalid-body"===o&&(a="Unable to encode submission body")):403===e?(s="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",a='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",i&&n&&r?a="You made a "+i.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':i&&(a='Invalid request method "'+i.toUpperCase()+'"')),new ne(e||500,s,new Error(a),!0)}function Le(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ze(n))return{result:n,idx:t}}}function Ne(e){return b(l({},"string"==typeof e?y(e):e,{hash:""}))}function Ie(e){return e.type===A.deferred}function Fe(e){return e.type===A.error}function ze(e){return(e&&e.type)===A.redirect}function Be(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function $e(e){return oe.has(e.toLowerCase())}async function Ue(e,t,n,r,i,o){for(let s=0;se.route.id===l.route.id)),u=null!=c&&!Ae(c,l)&&void 0!==(o&&o[l.route.id]);if(Ie(a)&&(i||u)){let e=r[s];f(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await We(a,e,i).then((e=>{e&&(n[s]=e||n[s])}))}}}async function We(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:A.data,data:e.deferredData.unwrappedData}}catch(e){return{type:A.error,error:e}}return{type:A.data,data:e.deferredData.data}}}function He(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Ve(e,t){let n="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&He(n||""))return e[e.length-1];let r=U(e);return r[r.length-1]}function qe(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(t&&n&&r)return null!=i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i}:null!=o?{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0}:void 0!==s?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}:void 0}function Ke(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qe(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ye(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ge(){return Ge=Object.assign?Object.assign.bind():function(e){for(var t=1;tI(e,t)),[t,e])}function ct(e){i.useContext(et).static||i.useLayoutEffect(e)}function ut(){let{isDataRoute:e}=i.useContext(nt);return e?function(){let{router:e}=Et(xt.UseNavigateStable),t=Ot(kt.UseNavigateStable),n=i.useRef(!1);return ct((()=>{n.current=!0})),i.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Ge({fromRouteId:t},i)))}),[e,t])}():function(){ot()||f(!1);let e=i.useContext(Je),{basename:t,future:n,navigator:r}=i.useContext(et),{matches:o}=i.useContext(nt),{pathname:s}=st(),a=JSON.stringify(W(o,n.v7_relativeSplatPath)),l=i.useRef(!1);return ct((()=>{l.current=!0})),i.useCallback((function(n,i){if(void 0===i&&(i={}),!l.current)return;if("number"==typeof n)return void r.go(n);let o=H(n,JSON.parse(a),s,"path"===i.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:V([t,o.pathname])),(i.replace?r.replace:r.push)(o,i.state,i)}),[t,r,a,s,e])}()}const dt=i.createContext(null);function ht(){return i.useContext(dt)}function ft(e){let t=i.useContext(nt).outlet;return t?i.createElement(dt.Provider,{value:e},t):t}function pt(){let{matches:e}=i.useContext(nt),t=e[e.length-1];return t?t.params:{}}function gt(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=i.useContext(et),{matches:o}=i.useContext(nt),{pathname:s}=st(),a=JSON.stringify(W(o,r.v7_relativeSplatPath));return i.useMemo((()=>H(e,JSON.parse(a),s,"path"===n)),[e,a,s,n])}function mt(e,t){return bt(e,t)}function bt(e,t,n,o){ot()||f(!1);let{navigator:s}=i.useContext(et),{matches:a}=i.useContext(nt),l=a[a.length-1],c=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let d,h=st();if(t){var p;let e="string"==typeof t?y(t):t;"/"===u||(null==(p=e.pathname)?void 0:p.startsWith(u))||f(!1),d=e}else d=h;let g=d.pathname||"/",m=g;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=x(e,{pathname:m}),v=wt(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:V([u,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:V([u,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,n,o);return t&&v?i.createElement(tt.Provider,{value:{location:Ge({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:r.Pop}},v):v}function yt(){let e=Lt(),t=re(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:r},n):null,null)}const vt=i.createElement(yt,null);class At extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(nt.Provider,{value:this.props.routeContext},i.createElement(rt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _t(e){let{routeContext:t,match:n,children:r}=e,o=i.useContext(Je);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(nt.Provider,{value:t},r)}function wt(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let a=e,l=null==(o=n)?void 0:o.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||f(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((e,r,o)=>{let s,d=!1,h=null,f=null;var p;n&&(s=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||vt,c&&(u<0&&0===o?(Bt[p="route-fallback"]||(Bt[p]=!0),d=!0,f=null):u===o&&(d=!0,f=r.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,o+1)),m=()=>{let t;return t=s?h:d?f:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(_t,{match:r,routeContext:{outlet:e,matches:g,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(At,{location:n.location,revalidation:n.revalidation,component:h,error:s,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()}),null)}var xt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xt||{}),kt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(kt||{});function Et(e){let t=i.useContext(Je);return t||f(!1),t}function St(e){let t=i.useContext(Xe);return t||f(!1),t}function Ot(e){let t=function(e){let t=i.useContext(nt);return t||f(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||f(!1),n.route.id}function Ct(){return Ot(kt.UseRouteId)}function Tt(){return St(kt.UseNavigation).navigation}function Pt(){let e=Et(xt.UseRevalidator),t=St(kt.UseRevalidator);return i.useMemo((()=>({revalidate:e.router.revalidate,state:t.revalidation})),[e.router.revalidate,t.revalidation])}function Rt(){let{matches:e,loaderData:t}=St(kt.UseMatches);return i.useMemo((()=>e.map((e=>k(e,t)))),[e,t])}function jt(){let e=St(kt.UseLoaderData),t=Ot(kt.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function Mt(e){return St(kt.UseRouteLoaderData).loaderData[e]}function Dt(){let e=St(kt.UseActionData),t=Ot(kt.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Lt(){var e;let t=i.useContext(rt),n=St(kt.UseRouteError),r=Ot(kt.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}function Nt(){let e=i.useContext(Ze);return null==e?void 0:e._data}function It(){let e=i.useContext(Ze);return null==e?void 0:e._error}let Ft=0;function zt(e){let{router:t,basename:n}=Et(xt.UseBlocker),r=St(kt.UseBlocker),[o,s]=i.useState(""),a=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:i,historyAction:o}=t;return e({currentLocation:Ge({},r,{pathname:z(r.pathname,n)||r.pathname}),nextLocation:Ge({},i,{pathname:z(i.pathname,n)||i.pathname}),historyAction:o})}),[n,e]);return i.useEffect((()=>{let e=String(++Ft);return s(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,a)}),[t,o,a]),o&&r.blockers.has(o)?r.blockers.get(o):he}const Bt={},$t=o.startTransition;function Ut(e){let{basename:t,children:n,initialEntries:r,initialIndex:o,future:s}=e,a=i.useRef();null==a.current&&(a.current=u({initialEntries:r,initialIndex:o,v5Compat:!0}));let l=a.current,[c,d]=i.useState({action:l.action,location:l.location}),{v7_startTransition:h}=s||{},f=i.useCallback((e=>{h&&$t?$t((()=>d(e))):d(e)}),[d,h]);return i.useLayoutEffect((()=>l.listen(f)),[l,f]),i.createElement(qt,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:l,future:s})}function Wt(e){let{to:t,replace:n,state:r,relative:o}=e;ot()||f(!1);let{future:s,static:a}=i.useContext(et),{matches:l}=i.useContext(nt),{pathname:c}=st(),u=ut(),d=H(t,W(l,s.v7_relativeSplatPath),c,"path"===o),h=JSON.stringify(d);return i.useEffect((()=>u(JSON.parse(h),{replace:n,state:r,relative:o})),[u,h,o,n,r]),null}function Ht(e){return ft(e.context)}function Vt(e){f(!1)}function qt(e){let{basename:t="/",children:n=null,location:o,navigationType:s=r.Pop,navigator:a,static:l=!1,future:c}=e;ot()&&f(!1);let u=t.replace(/^\/*/,"/"),d=i.useMemo((()=>({basename:u,navigator:a,static:l,future:Ge({v7_relativeSplatPath:!1},c)})),[u,c,a,l]);"string"==typeof o&&(o=y(o));let{pathname:h="/",search:p="",hash:g="",state:m=null,key:b="default"}=o,v=i.useMemo((()=>{let e=z(h,u);return null==e?null:{location:{pathname:e,search:p,hash:g,state:m,key:b},navigationType:s}}),[u,h,p,g,m,b,s]);return null==v?null:i.createElement(et.Provider,{value:d},i.createElement(tt.Provider,{children:n,value:v}))}function Kt(e){let{children:t,location:n}=e;return mt(Zt(t),n)}function Qt(e){let{children:t,errorElement:n,resolve:r}=e;return i.createElement(Jt,{resolve:r,errorElement:n},i.createElement(Xt,null,t))}var Yt=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Yt||{});const Gt=new Promise((()=>{}));class Jt extends i.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(" caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,o=Yt.pending;if(n instanceof Promise)if(this.state.error){o=Yt.error;let e=this.state.error;r=Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,o="_error"in r?Yt.error:"_data"in r?Yt.success:Yt.pending):(o=Yt.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else o=Yt.success,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(o===Yt.error&&r._error instanceof G)throw Gt;if(o===Yt.error&&!t)throw r._error;if(o===Yt.error)return i.createElement(Ze.Provider,{value:r,children:t});if(o===Yt.success)return i.createElement(Ze.Provider,{value:r,children:e});throw r}}function Xt(e){let{children:t}=e,n=Nt(),r="function"==typeof t?t(n):t;return i.createElement(i.Fragment,null,r)}function Zt(e,t){void 0===t&&(t=[]);let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,Zt(e.props.children,o));e.type!==Vt&&f(!1),e.props.index&&e.props.children&&f(!1);let s={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=Zt(e.props.children,o)),n.push(s)})),n}function en(e){return wt(e)}function tn(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function nn(e,t){return me({basename:null==t?void 0:t.basename,future:Ge({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:u({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:tn,unstable_dataStrategy:null==t?void 0:t.unstable_dataStrategy}).initialize()}function rn(){return rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const sn="get",an="application/x-www-form-urlencoded";function ln(e){return null!=e&&"string"==typeof e.tagName}function cn(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}let un=null;const dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hn(e){return null==e||dn.has(e)?e:null}const fn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],pn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],gn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function mn(e,t){return me({basename:null==t?void 0:t.basename,future:rn({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:d({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||yn(),routes:e,mapRouteProperties:tn,unstable_dataStrategy:null==t?void 0:t.unstable_dataStrategy,window:null==t?void 0:t.window}).initialize()}function bn(e,t){return me({basename:null==t?void 0:t.basename,future:rn({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:h({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||yn(),routes:e,mapRouteProperties:tn,unstable_dataStrategy:null==t?void 0:t.unstable_dataStrategy,window:null==t?void 0:t.window}).initialize()}function yn(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=rn({},t,{errors:vn(t.errors)})),t}function vn(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new ne(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let i=new t(r.message);i.stack="",n[e]=i}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}const An=i.createContext({isTransitioning:!1}),_n=i.createContext(new Map),wn=o.startTransition,xn=a.flushSync,kn=o.useId;function En(e){xn?xn(e):e()}class Sn{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function On(e){let{fallbackElement:t,router:n,future:r}=e,[o,s]=i.useState(n.state),[a,l]=i.useState(),[c,u]=i.useState({isTransitioning:!1}),[d,h]=i.useState(),[f,p]=i.useState(),[g,m]=i.useState(),b=i.useRef(new Map),{v7_startTransition:y}=r||{},v=i.useCallback((e=>{y?function(e){wn?wn(e):e()}(e):e()}),[y]),A=i.useCallback(((e,t)=>{let{deletedFetchers:r,unstable_flushSync:i,unstable_viewTransitionOpts:o}=t;r.forEach((e=>b.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&b.current.set(t,e.data)}));let a=null==n.window||null==n.window.document||"function"!=typeof n.window.document.startViewTransition;if(o&&!a){if(i){En((()=>{f&&(d&&d.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}));let t=n.window.document.startViewTransition((()=>{En((()=>s(e)))}));return t.finished.finally((()=>{En((()=>{h(void 0),p(void 0),l(void 0),u({isTransitioning:!1})}))})),void En((()=>p(t)))}f?(d&&d.resolve(),f.skipTransition(),m({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(l(e),u({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else i?En((()=>s(e))):v((()=>s(e)))}),[n.window,f,d,b,v]);i.useLayoutEffect((()=>n.subscribe(A)),[n,A]),i.useEffect((()=>{c.isTransitioning&&!c.flushSync&&h(new Sn)}),[c]),i.useEffect((()=>{if(d&&a&&n.window){let e=a,t=d.promise,r=n.window.document.startViewTransition((async()=>{v((()=>s(e))),await t}));r.finished.finally((()=>{h(void 0),p(void 0),l(void 0),u({isTransitioning:!1})})),p(r)}}),[v,a,d,n.window]),i.useEffect((()=>{d&&a&&o.location.key===a.location.key&&d.resolve()}),[d,f,o.location,a]),i.useEffect((()=>{!c.isTransitioning&&g&&(l(g.state),u({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))}),[c.isTransitioning,g]),i.useEffect((()=>{}),[]);let _=i.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),w=n.basename||"/",x=i.useMemo((()=>({router:n,navigator:_,static:!1,basename:w})),[n,_,w]);return i.createElement(i.Fragment,null,i.createElement(Je.Provider,{value:x},i.createElement(Xe.Provider,{value:o},i.createElement(_n.Provider,{value:b.current},i.createElement(An.Provider,{value:c},i.createElement(qt,{basename:w,location:o.location,navigationType:o.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?i.createElement(Cn,{routes:n.routes,future:n.future,state:o}):t))))),null)}function Cn(e){let{routes:t,future:n,state:r}=e;return bt(t,void 0,r,n)}function Tn(e){let{basename:t,children:n,future:r,window:o}=e,s=i.useRef();null==s.current&&(s.current=d({window:o,v5Compat:!0}));let a=s.current,[l,c]=i.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},h=i.useCallback((e=>{u&&wn?wn((()=>c(e))):c(e)}),[c,u]);return i.useLayoutEffect((()=>a.listen(h)),[a,h]),i.createElement(qt,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}function Pn(e){let{basename:t,children:n,future:r,window:o}=e,s=i.useRef();null==s.current&&(s.current=h({window:o,v5Compat:!0}));let a=s.current,[l,c]=i.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=i.useCallback((e=>{u&&wn?wn((()=>c(e))):c(e)}),[c,u]);return i.useLayoutEffect((()=>a.listen(d)),[a,d]),i.createElement(qt,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}function Rn(e){let{basename:t,children:n,future:r,history:o}=e,[s,a]=i.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},c=i.useCallback((e=>{l&&wn?wn((()=>a(e))):a(e)}),[a,l]);return i.useLayoutEffect((()=>o.listen(c)),[o,c]),i.createElement(qt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const jn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Mn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=i.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=on(e,fn),{basename:p}=i.useContext(et),g=!1;if("string"==typeof u&&Mn.test(u)&&(n=u,jn))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=z(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:g=!0}catch(e){}let m=it(u,{relative:o}),b=Un(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return i.createElement("a",rn({},f,{href:n||m,onClick:g||s?r:function(e){r&&r(e),e.defaultPrevented||b(e)},ref:t,target:c}))})),Ln=i.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=e,d=on(e,pn),h=gt(l,{relative:d.relative}),f=st(),p=i.useContext(Xe),{navigator:g,basename:m}=i.useContext(et),b=null!=p&&tr(h)&&!0===c,y=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,v=f.pathname,A=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),A=A?A.toLowerCase():null,y=y.toLowerCase()),A&&m&&(A=z(A,m)||A);const _="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,x=v===y||!s&&v.startsWith(y)&&"/"===v.charAt(_),k=null!=A&&(A===y||!s&&A.startsWith(y)&&"/"===A.charAt(y.length)),E={isActive:x,isPending:k,isTransitioning:b},S=x?n:void 0;w="function"==typeof o?o(E):[o,x?"active":null,k?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let O="function"==typeof a?a(E):a;return i.createElement(Dn,rn({},d,{"aria-current":S,className:w,ref:t,style:O,to:l,unstable_viewTransition:c}),"function"==typeof u?u(E):u)})),Nn=i.forwardRef(((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:s,state:a,method:l=sn,action:c,onSubmit:u,relative:d,preventScrollReset:h,unstable_viewTransition:f}=e,p=on(e,gn),g=qn(),m=Kn(c,{relative:d}),b="get"===l.toLowerCase()?"get":"post";return i.createElement("form",rn({ref:t,method:b,action:m,onSubmit:o?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,i=(null==t?void 0:t.getAttribute("formmethod"))||l;g(t||e.currentTarget,{fetcherKey:n,method:i,navigate:r,replace:s,state:a,relative:d,preventScrollReset:h,unstable_viewTransition:f})}},p))}));function In(e){let{getKey:t,storageKey:n}=e;return Xn({getKey:t,storageKey:n}),null}var Fn,zn;function Bn(e){let t=i.useContext(Je);return t||f(!1),t}function $n(e){let t=i.useContext(Xe);return t||f(!1),t}function Un(e,t){let{target:n,replace:r,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l}=void 0===t?{}:t,c=ut(),u=st(),d=gt(e,{relative:a});return i.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:b(u)===b(d);c(e,{replace:n,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l})}}),[u,c,d,r,o,n,e,s,a,l])}function Wn(e){let t=i.useRef(cn(e)),n=i.useRef(!1),r=st(),o=i.useMemo((()=>function(e,t){let n=cn(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),s=ut(),a=i.useCallback(((e,t)=>{const r=cn("function"==typeof e?e(o):e);n.current=!0,s("?"+r,t)}),[s,o]);return[o,a]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fn||(Fn={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(zn||(zn={}));let Hn=0,Vn=()=>"__"+String(++Hn)+"__";function qn(){let{router:e}=Bn(Fn.UseSubmit),{basename:t}=i.useContext(et),n=Ct();return i.useCallback((function(r,i){void 0===i&&(i={}),function(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();let{action:o,method:s,encType:a,formData:l,body:c}=function(e,t){let n,r,i,o,s;if(ln(a=e)&&"form"===a.tagName.toLowerCase()){let s=e.getAttribute("action");r=s?z(s,t):null,n=e.getAttribute("method")||sn,i=hn(e.getAttribute("enctype"))||an,o=new FormData(e)}else if(function(e){return ln(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ln(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a