diff --git a/README.md b/README.md index 0342edd5..bacb09f0 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ go run main.go serve | :--------: | :----------: | :----------: | ------------------------------------------------------------ | | 阿里云 | √ | √ | 可签发在阿里云注册的域名;可部署到阿里云 OSS、CDN | | 腾讯云 | √ | √ | 可签发在腾讯云注册的域名;可部署到腾讯云 CDN | -| 华为云 | √ | | 可签发在华为云注册的域名 | +| 华为云 | √ | √ | 可签发在华为云注册的域名;可部署到华为云 CDN | | 七牛云 | | √ | 可部署到七牛云 CDN | | AWS | √ | | 可签发在 AWS Route53 托管的域名 | | CloudFlare | √ | | 可签发在 CloudFlare 注册的域名;CloudFlare 服务自带 SSL 证书 | diff --git a/README_EN.md b/README_EN.md index 28477022..85625fed 100644 --- a/README_EN.md +++ b/README_EN.md @@ -75,7 +75,7 @@ password:1234567890 | :-----------: | :----------: | :--------: | ------------------------------------------------------------------------------------------- | | Alibaba Cloud | √ | √ | Supports domains registered on Alibaba Cloud; supports deployment to Alibaba Cloud OSS, CDN | | Tencent Cloud | √ | √ | Supports domains registered on Tencent Cloud; supports deployment to Tencent Cloud CDN | -| Huawei Cloud | √ | | Supports domains registered on Huawei Cloud | +| Huawei Cloud | √ | √ | Supports domains registered on Huawei; supports deployment to Huawei Cloud CDN | | Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN | | AWS | √ | | Supports domains managed on AWS Route53 | | CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates | diff --git a/go.mod b/go.mod index f862f99a..7604d1e9 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible github.com/go-acme/lego/v4 v4.19.2 github.com/gojek/heimdall/v7 v7.0.3 + github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114 github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61 github.com/nikoksr/notify v1.0.0 github.com/pkg/sftp v1.13.6 @@ -46,7 +47,6 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/internal/deployer/deployer.go b/internal/deployer/deployer.go index 9385778c..7bd0c1f9 100644 --- a/internal/deployer/deployer.go +++ b/internal/deployer/deployer.go @@ -15,15 +15,16 @@ import ( ) const ( - targetAliyunOSS = "aliyun-oss" - targetAliyunCDN = "aliyun-cdn" - targetAliyunESA = "aliyun-dcdn" - targetTencentCDN = "tencent-cdn" - targetQiniuCdn = "qiniu-cdn" - targetLocal = "local" - targetSSH = "ssh" - targetWebhook = "webhook" - targetK8sSecret = "k8s-secret" + targetAliyunOSS = "aliyun-oss" + targetAliyunCDN = "aliyun-cdn" + targetAliyunESA = "aliyun-dcdn" + targetTencentCDN = "tencent-cdn" + targetHuaweiCloudCDN = "huaweicloud-cdn" + targetQiniuCdn = "qiniu-cdn" + targetLocal = "local" + targetSSH = "ssh" + targetWebhook = "webhook" + targetK8sSecret = "k8s-secret" ) type DeployerOption struct { @@ -104,6 +105,8 @@ func getWithDeployConfig(record *models.Record, cert *applicant.Certificate, dep return NewAliyunESADeployer(option) case targetTencentCDN: return NewTencentCDNDeployer(option) + case targetHuaweiCloudCDN: + return NewHuaweiCloudCDNDeployer(option) case targetQiniuCdn: return NewQiniuCDNDeployer(option) case targetLocal: diff --git a/internal/deployer/huaweicloud_cdn.go b/internal/deployer/huaweicloud_cdn.go new file mode 100644 index 00000000..a5d0c7f5 --- /dev/null +++ b/internal/deployer/huaweicloud_cdn.go @@ -0,0 +1,150 @@ +package deployer + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" + cdn "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2" + cdnModel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2/model" + cdnRegion "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2/region" + + "certimate/internal/domain" + "certimate/internal/utils/rand" +) + +type HuaweiCloudCDNDeployer struct { + option *DeployerOption + infos []string +} + +func NewHuaweiCloudCDNDeployer(option *DeployerOption) (Deployer, error) { + return &HuaweiCloudCDNDeployer{ + option: option, + infos: make([]string, 0), + }, nil +} + +func (d *HuaweiCloudCDNDeployer) GetID() string { + return fmt.Sprintf("%s-%s", d.option.AceessRecord.GetString("name"), d.option.AceessRecord.Id) +} + +func (d *HuaweiCloudCDNDeployer) GetInfo() []string { + return d.infos +} + +func (d *HuaweiCloudCDNDeployer) Deploy(ctx context.Context) error { + access := &domain.HuaweiCloudAccess{} + if err := json.Unmarshal([]byte(d.option.Access), access); err != nil { + return err + } + + client, err := d.createClient(access) + if err != nil { + return err + } + + d.infos = append(d.infos, toStr("HuaweiCloudCdnClient 创建成功", nil)) + + // 查询加速域名配置 + showDomainFullConfigReq := &cdnModel.ShowDomainFullConfigRequest{ + DomainName: getDeployString(d.option.DeployConfig, "domain"), + } + showDomainFullConfigResp, err := client.ShowDomainFullConfig(showDomainFullConfigReq) + if err != nil { + return err + } + + d.infos = append(d.infos, toStr("已查询到加速域名配置", showDomainFullConfigResp)) + + // 更新加速域名配置 + certName := fmt.Sprintf("%s-%s", d.option.DomainId, rand.RandStr(12)) + updateDomainMultiCertificatesReq := &cdnModel.UpdateDomainMultiCertificatesRequest{ + Body: &cdnModel.UpdateDomainMultiCertificatesRequestBody{ + Https: mergeHuaweiCloudCDNConfig(showDomainFullConfigResp.Configs, &cdnModel.UpdateDomainMultiCertificatesRequestBodyContent{ + DomainName: getDeployString(d.option.DeployConfig, "domain"), + HttpsSwitch: 1, + CertName: &certName, + Certificate: &d.option.Certificate.Certificate, + PrivateKey: &d.option.Certificate.PrivateKey, + }), + }, + } + updateDomainMultiCertificatesResp, err := client.UpdateDomainMultiCertificates(updateDomainMultiCertificatesReq) + if err != nil { + return err + } + + d.infos = append(d.infos, toStr("已更新加速域名配置", updateDomainMultiCertificatesResp)) + + return nil +} + +func (d *HuaweiCloudCDNDeployer) createClient(access *domain.HuaweiCloudAccess) (*cdn.CdnClient, error) { + auth, err := global.NewCredentialsBuilder(). + WithAk(access.AccessKeyId). + WithSk(access.SecretAccessKey). + SafeBuild() + if err != nil { + return nil, err + } + + region, err := cdnRegion.SafeValueOf(access.Region) + if err != nil { + return nil, err + } + + hcClient, err := cdn.CdnClientBuilder(). + WithRegion(region). + WithCredential(auth). + SafeBuild() + if err != nil { + return nil, err + } + + client := cdn.NewCdnClient(hcClient) + return client, nil +} + +func mergeHuaweiCloudCDNConfig(src *cdnModel.ConfigsGetBody, dest *cdnModel.UpdateDomainMultiCertificatesRequestBodyContent) *cdnModel.UpdateDomainMultiCertificatesRequestBodyContent { + if src == nil { + return dest + } + + // 华为云 API 中不传的字段表示使用默认值、而非保留原值,因此这里需要把原配置中的参数重新赋值回去 + // 而且蛋疼的是查询接口返回的数据结构和更新接口传入的参数结构不一致,需要做很多转化 + // REF: https://support.huaweicloud.com/api-cdn/ShowDomainFullConfig.html + // REF: https://support.huaweicloud.com/api-cdn/UpdateDomainMultiCertificates.html + + if *src.OriginProtocol == "follow" { + accessOriginWay := int32(1) + dest.AccessOriginWay = &accessOriginWay + } else if *src.OriginProtocol == "http" { + accessOriginWay := int32(2) + dest.AccessOriginWay = &accessOriginWay + } else if *src.OriginProtocol == "https" { + accessOriginWay := int32(3) + dest.AccessOriginWay = &accessOriginWay + } + + if src.ForceRedirect != nil { + dest.ForceRedirectConfig = &cdnModel.ForceRedirect{} + + if src.ForceRedirect.Status == "on" { + dest.ForceRedirectConfig.Switch = 1 + dest.ForceRedirectConfig.RedirectType = src.ForceRedirect.Type + } else { + dest.ForceRedirectConfig.Switch = 0 + } + } + + if src.Https != nil { + if *src.Https.Http2Status == "on" { + http2 := int32(1) + dest.Http2 = &http2 + } + } + + return dest +} diff --git a/ui/dist/assets/index-C9KsIpHj.js b/ui/dist/assets/index-tBXwi-8W.js similarity index 52% rename from ui/dist/assets/index-C9KsIpHj.js rename to ui/dist/assets/index-tBXwi-8W.js index 4b9ffa14..cfa37889 100644 --- a/ui/dist/assets/index-C9KsIpHj.js +++ b/ui/dist/assets/index-tBXwi-8W.js @@ -1,4 +1,4 @@ -var vP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qH=vP((u9,Ed)=>{function v_(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x_={exports:{}},Vf={},w_={exports:{}},nt={};/** +var EP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var p9=EP((P9,Nd)=>{function __(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S_={exports:{}},Bf={},k_={exports:{}},nt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var vP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qH=vP((u9,Ed) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gc=Symbol.for("react.element"),xP=Symbol.for("react.portal"),wP=Symbol.for("react.fragment"),bP=Symbol.for("react.strict_mode"),_P=Symbol.for("react.profiler"),SP=Symbol.for("react.provider"),kP=Symbol.for("react.context"),CP=Symbol.for("react.forward_ref"),jP=Symbol.for("react.suspense"),EP=Symbol.for("react.memo"),NP=Symbol.for("react.lazy"),u0=Symbol.iterator;function TP(e){return e===null||typeof e!="object"?null:(e=u0&&e[u0]||e["@@iterator"],typeof e=="function"?e:null)}var b_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},__=Object.assign,S_={};function Xa(e,t,n){this.props=e,this.context=t,this.refs=S_,this.updater=n||b_}Xa.prototype.isReactComponent={};Xa.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Xa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function k_(){}k_.prototype=Xa.prototype;function oy(e,t,n){this.props=e,this.context=t,this.refs=S_,this.updater=n||b_}var iy=oy.prototype=new k_;iy.constructor=oy;__(iy,Xa.prototype);iy.isPureReactComponent=!0;var d0=Array.isArray,C_=Object.prototype.hasOwnProperty,ay={current:null},j_={key:!0,ref:!0,__self:!0,__source:!0};function E_(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)C_.call(t,r)&&!j_.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1()=>(t||e((t={exports:{}}).exports,t),t.exports);var qH=vP((u9,Ed) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var OP=y,IP=Symbol.for("react.element"),MP=Symbol.for("react.fragment"),LP=Object.prototype.hasOwnProperty,zP=OP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FP={key:!0,ref:!0,__self:!0,__source:!0};function P_(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)LP.call(t,r)&&!FP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:IP,type:e,key:o,ref:i,props:s,_owner:zP.current}}Vf.Fragment=MP;Vf.jsx=P_;Vf.jsxs=P_;x_.exports=Vf;var a=x_.exports,xp={},R_={exports:{}},Jn={},A_={exports:{}},D_={};/** + */var BP=g,WP=Symbol.for("react.element"),HP=Symbol.for("react.fragment"),KP=Object.prototype.hasOwnProperty,YP=BP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,GP={key:!0,ref:!0,__self:!0,__source:!0};function O_(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)KP.call(t,r)&&!GP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:WP,type:e,key:o,ref:i,props:s,_owner:YP.current}}Bf.Fragment=HP;Bf.jsx=O_;Bf.jsxs=O_;S_.exports=Bf;var a=S_.exports,xp={},I_={exports:{}},Jn={},M_={exports:{}},L_={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var vP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qH=vP((u9,Ed) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(W,I){var X=W.length;W.push(I);e:for(;0>>1,B=W[$];if(0>>1;$s(ie,X))Ies(xe,ie)?(W[$]=xe,W[Ie]=X,$=Ie):(W[$]=ie,W[oe]=X,$=oe);else if(Ies(xe,X))W[$]=xe,W[Ie]=X,$=Ie;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,p&&(p=!1,g(R),R=-1),m=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!Z());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var ve=!0;else{var oe=n(u);oe!==null&&F(_,oe.startTime-I),ve=!1}return ve}finally{f=null,h=X,m=!1}}var j=!1,T=null,R=-1,A=5,O=-1;function Z(){return!(e.unstable_now()-OW||125$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(p?(g(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(C))),W},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(D_);A_.exports=D_;var $P=A_.exports;/** + */(function(e){function t(W,I){var X=W.length;W.push(I);e:for(;0>>1,B=W[$];if(0>>1;$s(ie,X))Ies(xe,ie)?(W[$]=xe,W[Ie]=X,$=Ie):(W[$]=ie,W[oe]=X,$=oe);else if(Ies(xe,X))W[$]=xe,W[Ie]=X,$=Ie;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,p&&(p=!1,y(R),R=-1),m=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!G());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var ve=!0;else{var oe=n(u);oe!==null&&F(_,oe.startTime-I),ve=!1}return ve}finally{f=null,h=X,m=!1}}var j=!1,T=null,R=-1,A=5,O=-1;function G(){return!(e.unstable_now()-OW||125$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(p?(y(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(C))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(L_);M_.exports=L_;var ZP=M_.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var vP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qH=vP((u9,Ed) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var UP=y,Gn=$P;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wp=Object.prototype.hasOwnProperty,VP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h0={},m0={};function BP(e){return wp.call(m0,e)?!0:wp.call(h0,e)?!1:VP.test(e)?m0[e]=!0:(h0[e]=!0,!1)}function WP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function HP(e,t,n,r){if(t===null||typeof t>"u"||WP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var cy=/[\-:]([a-z])/g;function uy(e){return e[1].toUpperCase()}"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(cy,uy);cn[t]=new jn(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(cy,uy);cn[t]=new jn(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(cy,uy);cn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function dy(e,t,n,r){var s=cn.hasOwnProperty(t)?cn[t]:null;(s!==null?s.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wp=Object.prototype.hasOwnProperty,XP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y0={},v0={};function QP(e){return wp.call(v0,e)?!0:wp.call(y0,e)?!1:XP.test(e)?v0[e]=!0:(y0[e]=!0,!1)}function JP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eR(e,t,n,r){if(t===null||typeof t>"u"||JP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var cy=/[\-:]([a-z])/g;function uy(e){return e[1].toUpperCase()}"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(cy,uy);cn[t]=new jn(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(cy,uy);cn[t]=new jn(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(cy,uy);cn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function dy(e,t,n,r){var s=cn.hasOwnProperty(t)?cn[t]:null;(s!==null?s.type!==0:r||!(2l||s[i]!==o[l]){var c=` -`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{gm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Il(e):""}function KP(e){switch(e.tag){case 5:return Il(e.type);case 16:return Il("Lazy");case 13:return Il("Suspense");case 19:return Il("SuspenseList");case 0:case 2:case 15:return e=ym(e.type,!1),e;case 11:return e=ym(e.type.render,!1),e;case 1:return e=ym(e.type,!0),e;default:return""}}function kp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ta:return"Fragment";case ea:return"Portal";case bp:return"Profiler";case fy:return"StrictMode";case _p:return"Suspense";case Sp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M_:return(e.displayName||"Context")+".Consumer";case I_:return(e._context.displayName||"Context")+".Provider";case hy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case my:return t=e.displayName||null,t!==null?t:kp(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return kp(e(t))}catch{}}return null}function YP(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=t.render,e=e.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 kp(t);case 8:return t===fy?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function z_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ZP(e){var t=z_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=ZP(e))}function F_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=z_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Cp(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function g0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $_(e,t){t=t.checked,t!=null&&dy(e,"checked",t,!1)}function jp(e,t){$_(e,t);var n=jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ep(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ep(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function y0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ep(e,t,n){(t!=="number"||Nd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ml=Array.isArray;function xa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wl={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},GP=["Webkit","ms","Moz","O"];Object.keys(Wl).forEach(function(e){GP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wl[t]=Wl[e]})});function W_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wl.hasOwnProperty(e)&&Wl[e]?(""+t).trim():t+"px"}function H_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=W_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var qP=Lt({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 Pp(e,t){if(t){if(qP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function Rp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ap=null;function py(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dp=null,wa=null,ba=null;function w0(e){if(e=Qc(e)){if(typeof Dp!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Yf(t),Dp(e.stateNode,e.type,t))}}function K_(e){wa?ba?ba.push(e):ba=[e]:wa=e}function Y_(){if(wa){var e=wa,t=ba;if(ba=wa=null,w0(e),t)for(e=0;e>>=0,e===0?32:31-(aR(e)/lR|0)|0}var Pu=64,Ru=4194304;function Ll(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ad(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~s;l!==0?r=Ll(l):(o&=i,o!==0&&(r=Ll(o)))}else i=n&~s,i!==0?r=Ll(i):o!==0&&(r=Ll(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ar(t),e[t]=n}function fR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Kl),T0=" ",P0=!1;function h1(e,t){switch(e){case"keyup":return $R.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function VR(e,t){switch(e){case"compositionend":return m1(t);case"keypress":return t.which!==32?null:(P0=!0,T0);case"textInput":return e=t.data,e===T0&&P0?null:e;default:return null}}function BR(e,t){if(na)return e==="compositionend"||!Sy&&h1(e,t)?(e=d1(),ad=wy=co=null,na=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=O0(n)}}function v1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?v1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x1(){for(var e=window,t=Nd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nd(e.document)}return t}function ky(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QR(e){var t=x1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&v1(n.ownerDocument.documentElement,n)){if(r!==null&&ky(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=I0(n,o);var i=I0(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ra=null,Fp=null,Zl=null,$p=!1;function M0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$p||ra==null||ra!==Nd(r)||(r=ra,"selectionStart"in r&&ky(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zl&&dc(Zl,r)||(Zl=r,r=Id(Fp,"onSelect"),0ia||(e.current=Kp[ia],Kp[ia]=null,ia--)}function bt(e,t){ia++,Kp[ia]=e.current,e.current=t}var Eo={},gn=Lo(Eo),On=Lo(!1),ci=Eo;function Ia(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function In(e){return e=e.childContextTypes,e!=null}function Ld(){Ct(On),Ct(gn)}function B0(e,t,n){if(gn.current!==Eo)throw Error(le(168));bt(gn,t),bt(On,n)}function N1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(le(108,YP(e)||"Unknown",s));return Lt({},n,r)}function zd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,ci=gn.current,bt(gn,e),bt(On,On.current),!0}function W0(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=N1(e,t,ci),r.__reactInternalMemoizedMergedChildContext=e,Ct(On),Ct(gn),bt(gn,e)):Ct(On),bt(On,n)}var ks=null,Zf=!1,Rm=!1;function T1(e){ks===null?ks=[e]:ks.push(e)}function uA(e){Zf=!0,T1(e)}function zo(){if(!Rm&&ks!==null){Rm=!0;var e=0,t=gt;try{var n=ks;for(gt=1;e>=i,s-=i,Cs=1<<32-Ar(t)+s|n<R?(A=T,T=null):A=T.sibling;var O=h(g,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(g,T),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O,T=A}if(R===b.length)return n(g,T),Rt&&Bo(g,R),C;if(T===null){for(;RR?(A=T,T=null):A=T.sibling;var Z=h(g,T,O.value,_);if(Z===null){T===null&&(T=A);break}e&&T&&Z.alternate===null&&t(g,T),v=o(Z,v,R),j===null?C=Z:j.sibling=Z,j=Z,T=A}if(O.done)return n(g,T),Rt&&Bo(g,R),C;if(T===null){for(;!O.done;R++,O=b.next())O=f(g,O.value,_),O!==null&&(v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return Rt&&Bo(g,R),C}for(T=r(g,T);!O.done;R++,O=b.next())O=m(T,g,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return e&&T.forEach(function(N){return t(g,N)}),Rt&&Bo(g,R),C}function w(g,v,b,_){if(typeof b=="object"&&b!==null&&b.type===ta&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===ta){if(j.tag===7){n(g,j.sibling),v=s(j,b.props.children),v.return=g,g=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&Y0(C)===j.type){n(g,j.sibling),v=s(j,b.props),v.ref=bl(g,j,b),v.return=g,g=v;break e}n(g,j);break}else t(g,j);j=j.sibling}b.type===ta?(v=ri(b.props.children,g.mode,_,b.key),v.return=g,g=v):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=bl(g,v,b),_.return=g,g=_)}return i(g);case ea:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Fm(b,g.mode,_),v.return=g,g=v}return i(g);case so:return j=b._init,w(g,v,j(b._payload),_)}if(Ml(b))return x(g,v,b,_);if(gl(b))return p(g,v,b,_);zu(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=zm(b,g.mode,_),v.return=g,g=v),i(g)):n(g,v)}return w}var La=D1(!0),O1=D1(!1),Ud=Lo(null),Vd=null,ca=null,Ny=null;function Ty(){Ny=ca=Vd=null}function Py(e){var t=Ud.current;Ct(Ud),e._currentValue=t}function Gp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){Vd=e,Ny=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(An=!0),e.firstContext=null)}function hr(e){var t=e._currentValue;if(Ny!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(Vd===null)throw Error(le(308));ca=e,Vd.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var Zo=null;function Ry(e){Zo===null?Zo=[e]:Zo.push(e)}function I1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ry(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ms(e,r)}function Ms(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function Ay(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M1(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 Ts(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ms(e,n)}return s=r.interleaved,s===null?(t.next=t,Ry(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ms(e,n)}function cd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yy(e,n)}}function Z0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bd(e,t,n,r){var s=e.updateQueue;oo=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,l=o;do{var h=l.lane,m=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,p=l;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Lt({},f,h);break e;case 2:oo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);fi|=i,e.lanes=i,e.memoizedState=f}}function G0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Dm.transition;Dm.transition={};try{e(!1),t()}finally{gt=n,Dm.transition=r}}function J1(){return mr().memoizedState}function mA(e,t,n){var r=bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eS(e))tS(t,n);else if(n=I1(e,t,n,r),n!==null){var s=Sn();Dr(n,e,r,s),nS(n,t,r)}}function pA(e,t,n){var r=bo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eS(e))tS(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,Ir(l,i)){var c=t.interleaved;c===null?(s.next=s,Ry(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=I1(e,t,s,r),n!==null&&(s=Sn(),Dr(n,e,r,s),nS(n,t,r))}}function eS(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function tS(e,t){Gl=Hd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yy(e,n)}}var Kd={readContext:hr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},gA={readContext:hr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:hr,useEffect:X0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dd(4194308,4,Z1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dd(4194308,4,e,t)},useInsertionEffect:function(e,t){return dd(4,2,e,t)},useMemo:function(e,t){var n=Yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yr();return t=n!==void 0?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=mA.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:q0,useDebugValue:$y,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=q0(!1),t=e[0];return e=hA.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,s=Yr();if(Rt){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),rn===null)throw Error(le(349));di&30||$1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,X0(V1.bind(null,r,o,e),[e]),r.flags|=2048,xc(9,U1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Yr(),t=rn.identifierPrefix;if(Rt){var n=js,r=Cs;n=(r&~(1<<32-Ar(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yc++,0")&&(c=c.replace("",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{gm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Il(e):""}function tR(e){switch(e.tag){case 5:return Il(e.type);case 16:return Il("Lazy");case 13:return Il("Suspense");case 19:return Il("SuspenseList");case 0:case 2:case 15:return e=ym(e.type,!1),e;case 11:return e=ym(e.type.render,!1),e;case 1:return e=ym(e.type,!0),e;default:return""}}function kp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ta:return"Fragment";case ea:return"Portal";case bp:return"Profiler";case fy:return"StrictMode";case _p:return"Suspense";case Sp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $_:return(e.displayName||"Context")+".Consumer";case F_:return(e._context.displayName||"Context")+".Provider";case hy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case my:return t=e.displayName||null,t!==null?t:kp(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return kp(e(t))}catch{}}return null}function nR(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=t.render,e=e.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 kp(t);case 8:return t===fy?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rR(e){var t=V_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=rR(e))}function B_(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,e!==n?(t.setValue(e),!0):!1}function Td(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Cp(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function W_(e,t){t=t.checked,t!=null&&dy(e,"checked",t,!1)}function jp(e,t){W_(e,t);var n=jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ep(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ep(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function b0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ep(e,t,n){(t!=="number"||Td(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ml=Array.isArray;function xa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wl={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},sR=["Webkit","ms","Moz","O"];Object.keys(Wl).forEach(function(e){sR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wl[t]=Wl[e]})});function G_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wl.hasOwnProperty(e)&&Wl[e]?(""+t).trim():t+"px"}function Z_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=G_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var oR=Lt({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 Pp(e,t){if(t){if(oR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function Rp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ap=null;function py(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dp=null,wa=null,ba=null;function k0(e){if(e=Qc(e)){if(typeof Dp!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Gf(t),Dp(e.stateNode,e.type,t))}}function q_(e){wa?ba?ba.push(e):ba=[e]:wa=e}function X_(){if(wa){var e=wa,t=ba;if(ba=wa=null,k0(e),t)for(e=0;e>>=0,e===0?32:31-(gR(e)/yR|0)|0}var Pu=64,Ru=4194304;function Ll(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~s;l!==0?r=Ll(l):(o&=i,o!==0&&(r=Ll(o)))}else i=n&~s,i!==0?r=Ll(i):o!==0&&(r=Ll(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ar(t),e[t]=n}function bR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Kl),D0=" ",O0=!1;function y1(e,t){switch(e){case"keyup":return ZR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function XR(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(O0=!0,D0);case"textInput":return e=t.data,e===D0&&O0?null:e;default:return null}}function QR(e,t){if(na)return e==="compositionend"||!Sy&&y1(e,t)?(e=p1(),ld=wy=co=null,na=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=z0(n)}}function _1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Td();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Td(e.document)}return t}function ky(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function aA(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_1(n.ownerDocument.documentElement,n)){if(r!==null&&ky(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=F0(n,o);var i=F0(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ra=null,Fp=null,Gl=null,$p=!1;function $0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$p||ra==null||ra!==Td(r)||(r=ra,"selectionStart"in r&&ky(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gl&&dc(Gl,r)||(Gl=r,r=Md(Fp,"onSelect"),0ia||(e.current=Kp[ia],Kp[ia]=null,ia--)}function bt(e,t){ia++,Kp[ia]=e.current,e.current=t}var Eo={},gn=Lo(Eo),On=Lo(!1),ci=Eo;function Ia(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function In(e){return e=e.childContextTypes,e!=null}function zd(){Ct(On),Ct(gn)}function Y0(e,t,n){if(gn.current!==Eo)throw Error(le(168));bt(gn,t),bt(On,n)}function A1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(le(108,nR(e)||"Unknown",s));return Lt({},n,r)}function Fd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,ci=gn.current,bt(gn,e),bt(On,On.current),!0}function G0(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=A1(e,t,ci),r.__reactInternalMemoizedMergedChildContext=e,Ct(On),Ct(gn),bt(gn,e)):Ct(On),bt(On,n)}var ks=null,Zf=!1,Rm=!1;function D1(e){ks===null?ks=[e]:ks.push(e)}function xA(e){Zf=!0,D1(e)}function zo(){if(!Rm&&ks!==null){Rm=!0;var e=0,t=gt;try{var n=ks;for(gt=1;e>=i,s-=i,Cs=1<<32-Ar(t)+s|n<R?(A=T,T=null):A=T.sibling;var O=h(y,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(y,T),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O,T=A}if(R===b.length)return n(y,T),Rt&&Bo(y,R),C;if(T===null){for(;RR?(A=T,T=null):A=T.sibling;var G=h(y,T,O.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(y,T),v=o(G,v,R),j===null?C=G:j.sibling=G,j=G,T=A}if(O.done)return n(y,T),Rt&&Bo(y,R),C;if(T===null){for(;!O.done;R++,O=b.next())O=f(y,O.value,_),O!==null&&(v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return Rt&&Bo(y,R),C}for(T=r(y,T);!O.done;R++,O=b.next())O=m(T,y,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return e&&T.forEach(function(N){return t(y,N)}),Rt&&Bo(y,R),C}function w(y,v,b,_){if(typeof b=="object"&&b!==null&&b.type===ta&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===ta){if(j.tag===7){n(y,j.sibling),v=s(j,b.props.children),v.return=y,y=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&X0(C)===j.type){n(y,j.sibling),v=s(j,b.props),v.ref=bl(y,j,b),v.return=y,y=v;break e}n(y,j);break}else t(y,j);j=j.sibling}b.type===ta?(v=ri(b.props.children,y.mode,_,b.key),v.return=y,y=v):(_=gd(b.type,b.key,b.props,null,y.mode,_),_.ref=bl(y,v,b),_.return=y,y=_)}return i(y);case ea:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=s(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=Fm(b,y.mode,_),v.return=y,y=v}return i(y);case so:return j=b._init,w(y,v,j(b._payload),_)}if(Ml(b))return x(y,v,b,_);if(gl(b))return p(y,v,b,_);zu(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=s(v,b),v.return=y,y=v):(n(y,v),v=zm(b,y.mode,_),v.return=y,y=v),i(y)):n(y,v)}return w}var La=L1(!0),z1=L1(!1),Vd=Lo(null),Bd=null,ca=null,Ny=null;function Ty(){Ny=ca=Bd=null}function Py(e){var t=Vd.current;Ct(Vd),e._currentValue=t}function Zp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){Bd=e,Ny=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(An=!0),e.firstContext=null)}function hr(e){var t=e._currentValue;if(Ny!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(Bd===null)throw Error(le(308));ca=e,Bd.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var Go=null;function Ry(e){Go===null?Go=[e]:Go.push(e)}function F1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ry(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ms(e,r)}function Ms(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function Ay(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $1(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 Ts(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ms(e,n)}return s=r.interleaved,s===null?(t.next=t,Ry(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ms(e,n)}function ud(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yy(e,n)}}function Q0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wd(e,t,n,r){var s=e.updateQueue;oo=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,l=o;do{var h=l.lane,m=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,p=l;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Lt({},f,h);break e;case 2:oo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);fi|=i,e.lanes=i,e.memoizedState=f}}function J0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Dm.transition;Dm.transition={};try{e(!1),t()}finally{gt=n,Dm.transition=r}}function rS(){return mr().memoizedState}function SA(e,t,n){var r=bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sS(e))oS(t,n);else if(n=F1(e,t,n,r),n!==null){var s=Sn();Dr(n,e,r,s),iS(n,t,r)}}function kA(e,t,n){var r=bo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sS(e))oS(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,Ir(l,i)){var c=t.interleaved;c===null?(s.next=s,Ry(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=F1(e,t,s,r),n!==null&&(s=Sn(),Dr(n,e,r,s),iS(n,t,r))}}function sS(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function oS(e,t){Zl=Kd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yy(e,n)}}var Yd={readContext:hr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},CA={readContext:hr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:hr,useEffect:tw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fd(4194308,4,Q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fd(4194308,4,e,t)},useInsertionEffect:function(e,t){return fd(4,2,e,t)},useMemo:function(e,t){var n=Yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yr();return t=n!==void 0?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=SA.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:ew,useDebugValue:$y,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=ew(!1),t=e[0];return e=_A.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,s=Yr();if(Rt){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),sn===null)throw Error(le(349));di&30||W1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,tw(K1.bind(null,r,o,e),[e]),r.flags|=2048,xc(9,H1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Yr(),t=sn.identifierPrefix;if(Rt){var n=js,r=Cs;n=(r&~(1<<32-Ar(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zr]=t,e[mc]=r,fS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Rp(n,r),n){case"dialog":kt("cancel",e),kt("close",e),s=r;break;case"iframe":case"object":case"embed":kt("load",e),s=r;break;case"video":case"audio":for(s=0;s$a&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Rt)return hn(t),null}else 2*Vt()-o.renderingStartTime>$a&&n!==1073741824&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,n=Ot.current,bt(Ot,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Ky(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$n&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function kA(e,t){switch(jy(t),t.tag){case 1:return In(t.type)&&Ld(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),Ct(On),Ct(gn),Iy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oy(t),null;case 13:if(Ct(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Ot),null;case 4:return za(),null;case 10:return Py(t.type._context),null;case 22:case 23:return Ky(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,CA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ft(e,t,r)}else n.current=null}function sg(e,t,n){try{n()}catch(r){Ft(e,t,r)}}var lw=!1;function jA(e,t){if(Up=Dd,e=x1(),ky(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(l=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vp={focusedElem:e,selectionRange:n},Dd=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var p=x.memoizedProps,w=x.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:Sr(t.type,p),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(_){Ft(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=lw,lw=!1,x}function ql(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&sg(t,n,o)}s=s.next}while(s!==r)}}function Xf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 og(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pS(e){var t=e.alternate;t!==null&&(e.alternate=null,pS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zr],delete t[mc],delete t[Hp],delete t[lA],delete t[cA])),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 gS(e){return e.tag===5||e.tag===3||e.tag===4}function cw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ig(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Md));else if(r!==4&&(e=e.child,e!==null))for(ig(e,t,n),e=e.sibling;e!==null;)ig(e,t,n),e=e.sibling}function ag(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}var an=null,kr=!1;function Js(e,t,n){for(n=n.child;n!==null;)yS(e,t,n),n=n.sibling}function yS(e,t,n){if(ts&&typeof ts.onCommitFiberUnmount=="function")try{ts.onCommitFiberUnmount(Bf,n)}catch{}switch(n.tag){case 5:mn||ua(n,t);case 6:var r=an,s=kr;an=null,Js(e,t,n),an=r,kr=s,an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):an.removeChild(n.stateNode));break;case 18:an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?Pm(e.parentNode,n):e.nodeType===1&&Pm(e,n),cc(e)):Pm(an,n.stateNode));break;case 4:r=an,s=kr,an=n.stateNode.containerInfo,kr=!0,Js(e,t,n),an=r,kr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&sg(n,t,i),s=s.next}while(s!==r)}Js(e,t,n);break;case 1:if(!mn&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ft(n,t,l)}Js(e,t,n);break;case 21:Js(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Js(e,t,n),mn=r):Js(e,t,n);break;default:Js(e,t,n)}}function uw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CA),t.forEach(function(r){var s=IA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function _r(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=Vt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NA(r/1960))-r,10e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,Gd=0,ut&6)throw Error(le(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cVt()-Wy?ni(e,0):By|=n),Mn(e,t)}function CS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Ms(e,t),e!==null&&(qc(e,t,n),Mn(e,n))}function OA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),CS(e,n)}function IA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),CS(e,n)}var jS;jS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)An=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return An=!1,_A(e,t,n);An=!!(e.flags&131072)}else An=!1,Rt&&t.flags&1048576&&P1(t,$d,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fd(e,t),e=t.pendingProps;var s=Ia(t,gn.current);Sa(t,n),s=Ly(null,t,r,e,s,n);var o=zy();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,In(r)?(o=!0,zd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ay(t),s.updater=qf,t.stateNode=s,s._reactInternals=t,Xp(t,r,e,n),t=eg(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&Cy(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=LA(r),e=Sr(r,e),s){case 0:t=Jp(null,t,r,e,n);break e;case 1:t=ow(null,t,r,e,n);break e;case 11:t=rw(null,t,r,e,n);break e;case 14:t=sw(null,t,r,Sr(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),Jp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),ow(e,t,r,s,n);case 3:e:{if(cS(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,s=o.element,M1(e,t),Bd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Fa(Error(le(423)),t),t=iw(e,t,r,n,s);break e}else if(r!==s){s=Fa(Error(le(424)),t),t=iw(e,t,r,n,s);break e}else for(Bn=vo(t.stateNode.containerInfo.firstChild),Wn=t,Rt=!0,jr=null,n=O1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ma(),r===s){t=Ls(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return L1(t),e===null&&Zp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Bp(r,s)?i=null:o!==null&&Bp(r,o)&&(t.flags|=32),lS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Zp(t),null;case 13:return uS(e,t,n);case 4:return Dy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),rw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Ud,r._currentValue),r._currentValue=i,o!==null)if(Ir(o.value,i)){if(o.children===s.children&&!On.current){t=Ls(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ts(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gp(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(le(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Gp(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sa(t,n),s=hr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=Sr(r,t.pendingProps),s=Sr(r.type,s),sw(e,t,r,s,n);case 15:return iS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),fd(e,t),t.tag=1,In(r)?(e=!0,zd(t)):e=!1,Sa(t,n),rS(t,r,s),Xp(t,r,s,n),eg(null,t,r,!0,e,n);case 19:return dS(e,t,n);case 22:return aS(e,t,n)}throw Error(le(156,t.tag))};function ES(e,t){return e1(e,t)}function MA(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 lr(e,t,n,r){return new MA(e,t,n,r)}function Zy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LA(e){if(typeof e=="function")return Zy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hy)return 11;if(e===my)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=lr(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Zy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ta:return ri(n.children,s,o,t);case fy:i=8,s|=8;break;case bp:return e=lr(12,n,t,s|2),e.elementType=bp,e.lanes=o,e;case _p:return e=lr(13,n,t,s),e.elementType=_p,e.lanes=o,e;case Sp:return e=lr(19,n,t,s),e.elementType=Sp,e.lanes=o,e;case L_:return Jf(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I_:i=10;break e;case M_:i=9;break e;case hy:i=11;break e;case my:i=14;break e;case so:i=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=lr(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ri(e,t,n,r){return e=lr(7,e,r,t),e.lanes=n,e}function Jf(e,t,n,r){return e=lr(22,e,r,t),e.elementType=L_,e.lanes=n,e.stateNode={isHidden:!1},e}function zm(e,t,n){return e=lr(6,e,null,t),e.lanes=n,e}function Fm(e,t,n){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zA(e,t,n,r,s){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=xm(0),this.expirationTimes=xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Gy(e,t,n,r,s,o,i,l,c){return e=new zA(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=lr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ay(o),e}function FA(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RS)}catch(e){console.error(e)}}RS(),R_.exports=Jn;var Bs=R_.exports;const AS=Uf(Bs),WA=v_({__proto__:null,default:AS},[Bs]);var vw=Bs;xp.createRoot=vw.createRoot,xp.hydrateRoot=vw.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Mm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var NA=typeof WeakMap=="function"?WeakMap:Map;function lS(e,t,n){n=Ts(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zd||(Zd=!0,lg=r),Qp(e,t)},n}function cS(e,t,n){n=Ts(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Qp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Qp(e,t),typeof r!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function sw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new NA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=VA.bind(null,e,t,n),t.then(e,e))}function ow(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function iw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ts(-1,1),t.tag=2,xo(n,t,1))),n.lanes|=1),e)}var TA=Vs.ReactCurrentOwner,An=!1;function bn(e,t,n,r){t.child=e===null?z1(t,null,n,r):La(t,e.child,n,r)}function aw(e,t,n,r,s){n=n.render;var o=t.ref;return Sa(t,s),r=Ly(e,t,n,r,o,s),n=zy(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ls(e,t,s)):(Rt&&n&&Cy(t),t.flags|=1,bn(e,t,r,s),t.child)}function lw(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Gy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,uS(e,t,o,r,s)):(e=gd(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:dc,n(i,r)&&e.ref===t.ref)return Ls(e,t,s)}return t.flags|=1,e=_o(o,r),e.ref=t.ref,e.return=t,t.child=e}function uS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(dc(o,r)&&e.ref===t.ref)if(An=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(An=!0);else return t.lanes=e.lanes,Ls(e,t,s)}return Jp(e,t,n,r,s)}function dS(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(da,Vn),Vn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(da,Vn),Vn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(da,Vn),Vn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(da,Vn),Vn|=r;return bn(e,t,s,n),t.child}function fS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jp(e,t,n,r,s){var o=In(n)?ci:gn.current;return o=Ia(t,o),Sa(t,s),n=Ly(e,t,n,r,o,s),r=zy(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ls(e,t,s)):(Rt&&r&&Cy(t),t.flags|=1,bn(e,t,n,s),t.child)}function cw(e,t,n,r,s){if(In(n)){var o=!0;Fd(t)}else o=!1;if(Sa(t,s),t.stateNode===null)hd(e,t),aS(t,n,r),Xp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=hr(u):(u=In(n)?ci:gn.current,u=Ia(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&rw(t,i,r,u),oo=!1;var h=t.memoizedState;i.state=h,Wd(t,r,i,s),c=t.memoizedState,l!==r||h!==c||On.current||oo?(typeof d=="function"&&(qp(t,n,d,r),c=t.memoizedState),(l=oo||nw(t,n,l,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$1(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Sr(t.type,l),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=hr(c):(c=In(n)?ci:gn.current,c=Ia(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||h!==c)&&rw(t,i,r,c),oo=!1,h=t.memoizedState,i.state=h,Wd(t,r,i,s);var x=t.memoizedState;l!==f||h!==x||On.current||oo?(typeof m=="function"&&(qp(t,n,m,r),x=t.memoizedState),(u=oo||nw(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return eg(e,t,n,r,o,s)}function eg(e,t,n,r,s,o){fS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&G0(t,n,!1),Ls(e,t,o);r=t.stateNode,TA.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=La(t,e.child,null,o),t.child=La(t,null,l,o)):bn(e,t,l,o),t.memoizedState=r.state,s&&G0(t,n,!0),t.child}function hS(e){var t=e.stateNode;t.pendingContext?Y0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Y0(e,t.context,!1),Dy(e,t.containerInfo)}function uw(e,t,n,r,s){return Ma(),Ey(s),t.flags|=256,bn(e,t,n,r),t.child}var tg={dehydrated:null,treeContext:null,retryLane:0};function ng(e){return{baseLanes:e,cachePool:null,transitions:null}}function mS(e,t,n){var r=t.pendingProps,s=Ot.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Ot,s&1),e===null)return Gp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=eh(i,r,0,null),e=ri(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ng(n),t.memoizedState=tg,e):Uy(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return PA(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_o(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=_o(l,o):(o=ri(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?ng(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=tg,r}return o=e.child,e=o.sibling,r=_o(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Uy(e,t){return t=eh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&Ey(r),La(t,e.child,null,n),e=Uy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PA(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Mm(Error(le(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=eh({mode:"visible",children:r.children},s,0,null),o=ri(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&La(t,e.child,null,i),t.child.memoizedState=ng(i),t.memoizedState=tg,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(le(419)),r=Mm(o,r,void 0),Fu(e,t,i,r)}if(l=(i&e.childLanes)!==0,An||l){if(r=sn,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Ms(e,s),Dr(r,e,s,-1))}return Yy(),r=Mm(Error(le(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=BA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Hn=vo(s.nextSibling),Kn=t,Rt=!0,jr=null,e!==null&&(or[ir++]=Cs,or[ir++]=js,or[ir++]=ui,Cs=e.id,js=e.overflow,ui=t),t=Uy(t,r.children),t.flags|=4096,t)}function dw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zp(e.return,t,n)}function Lm(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function pS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(bn(e,t,r.children,n),r=Ot.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dw(e,n,t);else if(e.tag===19)dw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bt(Ot,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Hd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Lm(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Hd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Lm(t,!0,n,null,o);break;case"together":Lm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ls(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(le(153));if(t.child!==null){for(e=t.child,n=_o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function RA(e,t,n){switch(t.tag){case 3:hS(t),Ma();break;case 5:U1(t);break;case 1:In(t.type)&&Fd(t);break;case 4:Dy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Vd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Ot,Ot.current&1),t.flags|=128,null):n&t.child.childLanes?mS(e,t,n):(bt(Ot,Ot.current&1),e=Ls(e,t,n),e!==null?e.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Ot,Ot.current),r)break;return null;case 22:case 23:return t.lanes=0,dS(e,t,n)}return Ls(e,t,n)}var gS,rg,yS,vS;gS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};rg=function(){};yS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Zo(ns.current);var o=null;switch(n){case"input":s=Cp(e,s),r=Cp(e,r),o=[];break;case"select":s=Lt({},s,{value:void 0}),r=Lt({},r,{value:void 0}),o=[];break;case"textarea":s=Np(e,s),r=Np(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ld)}Pp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(sc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(sc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&kt("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};vS=function(e,t,n,r){n!==r&&(t.flags|=4)};function _l(e,t){if(!Rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function AA(e,t,n){var r=t.pendingProps;switch(jy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(t),null;case 1:return In(t.type)&&zd(),hn(t),null;case 3:return r=t.stateNode,za(),Ct(On),Ct(gn),Iy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jr!==null&&(dg(jr),jr=null))),rg(e,t),hn(t),null;case 5:Oy(t);var s=Zo(gc.current);if(n=t.type,e!==null&&t.stateNode!=null)yS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(le(166));return hn(t),null}if(e=Zo(ns.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Gr]=t,r[mc]=o,e=(t.mode&1)!==0,n){case"dialog":kt("cancel",r),kt("close",r);break;case"iframe":case"object":case"embed":kt("load",r);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Gr]=t,e[mc]=r,gS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Rp(n,r),n){case"dialog":kt("cancel",e),kt("close",e),s=r;break;case"iframe":case"object":case"embed":kt("load",e),s=r;break;case"video":case"audio":for(s=0;s$a&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304)}else{if(!r)if(e=Hd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Rt)return hn(t),null}else 2*Vt()-o.renderingStartTime>$a&&n!==1073741824&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,n=Ot.current,bt(Ot,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Ky(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function DA(e,t){switch(jy(t),t.tag){case 1:return In(t.type)&&zd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),Ct(On),Ct(gn),Iy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oy(t),null;case 13:if(Ct(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Ot),null;case 4:return za(),null;case 10:return Py(t.type._context),null;case 22:case 23:return Ky(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,OA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ft(e,t,r)}else n.current=null}function sg(e,t,n){try{n()}catch(r){Ft(e,t,r)}}var fw=!1;function IA(e,t){if(Up=Od,e=S1(),ky(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(l=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vp={focusedElem:e,selectionRange:n},Od=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var p=x.memoizedProps,w=x.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?p:Sr(t.type,p),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(_){Ft(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=fw,fw=!1,x}function ql(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&sg(t,n,o)}s=s.next}while(s!==r)}}function Qf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 og(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xS(e){var t=e.alternate;t!==null&&(e.alternate=null,xS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gr],delete t[mc],delete t[Hp],delete t[yA],delete t[vA])),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 wS(e){return e.tag===5||e.tag===3||e.tag===4}function hw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ig(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ld));else if(r!==4&&(e=e.child,e!==null))for(ig(e,t,n),e=e.sibling;e!==null;)ig(e,t,n),e=e.sibling}function ag(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}var an=null,kr=!1;function Js(e,t,n){for(n=n.child;n!==null;)bS(e,t,n),n=n.sibling}function bS(e,t,n){if(ts&&typeof ts.onCommitFiberUnmount=="function")try{ts.onCommitFiberUnmount(Wf,n)}catch{}switch(n.tag){case 5:mn||ua(n,t);case 6:var r=an,s=kr;an=null,Js(e,t,n),an=r,kr=s,an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):an.removeChild(n.stateNode));break;case 18:an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?Pm(e.parentNode,n):e.nodeType===1&&Pm(e,n),cc(e)):Pm(an,n.stateNode));break;case 4:r=an,s=kr,an=n.stateNode.containerInfo,kr=!0,Js(e,t,n),an=r,kr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&sg(n,t,i),s=s.next}while(s!==r)}Js(e,t,n);break;case 1:if(!mn&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ft(n,t,l)}Js(e,t,n);break;case 21:Js(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Js(e,t,n),mn=r):Js(e,t,n);break;default:Js(e,t,n)}}function mw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OA),t.forEach(function(r){var s=WA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function _r(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=Vt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*LA(r/1960))-r,10e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,qd=0,ut&6)throw Error(le(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cVt()-Wy?ni(e,0):By|=n),Mn(e,t)}function TS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Ms(e,t),e!==null&&(qc(e,t,n),Mn(e,n))}function BA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),TS(e,n)}function WA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),TS(e,n)}var PS;PS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)An=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return An=!1,RA(e,t,n);An=!!(e.flags&131072)}else An=!1,Rt&&t.flags&1048576&&O1(t,Ud,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hd(e,t),e=t.pendingProps;var s=Ia(t,gn.current);Sa(t,n),s=Ly(null,t,r,e,s,n);var o=zy();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,In(r)?(o=!0,Fd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ay(t),s.updater=Xf,t.stateNode=s,s._reactInternals=t,Xp(t,r,e,n),t=eg(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&Cy(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=KA(r),e=Sr(r,e),s){case 0:t=Jp(null,t,r,e,n);break e;case 1:t=cw(null,t,r,e,n);break e;case 11:t=aw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,Sr(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),Jp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),cw(e,t,r,s,n);case 3:e:{if(hS(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,s=o.element,$1(e,t),Wd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Fa(Error(le(423)),t),t=uw(e,t,r,n,s);break e}else if(r!==s){s=Fa(Error(le(424)),t),t=uw(e,t,r,n,s);break e}else for(Hn=vo(t.stateNode.containerInfo.firstChild),Kn=t,Rt=!0,jr=null,n=z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ma(),r===s){t=Ls(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return U1(t),e===null&&Gp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Bp(r,s)?i=null:o!==null&&Bp(r,o)&&(t.flags|=32),fS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Gp(t),null;case 13:return mS(e,t,n);case 4:return Dy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),aw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Vd,r._currentValue),r._currentValue=i,o!==null)if(Ir(o.value,i)){if(o.children===s.children&&!On.current){t=Ls(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ts(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zp(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(le(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Zp(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sa(t,n),s=hr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=Sr(r,t.pendingProps),s=Sr(r.type,s),lw(e,t,r,s,n);case 15:return uS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),hd(e,t),t.tag=1,In(r)?(e=!0,Fd(t)):e=!1,Sa(t,n),aS(t,r,s),Xp(t,r,s,n),eg(null,t,r,!0,e,n);case 19:return pS(e,t,n);case 22:return dS(e,t,n)}throw Error(le(156,t.tag))};function RS(e,t){return s1(e,t)}function HA(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 lr(e,t,n,r){return new HA(e,t,n,r)}function Gy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KA(e){if(typeof e=="function")return Gy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hy)return 11;if(e===my)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=lr(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Gy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ta:return ri(n.children,s,o,t);case fy:i=8,s|=8;break;case bp:return e=lr(12,n,t,s|2),e.elementType=bp,e.lanes=o,e;case _p:return e=lr(13,n,t,s),e.elementType=_p,e.lanes=o,e;case Sp:return e=lr(19,n,t,s),e.elementType=Sp,e.lanes=o,e;case U_:return eh(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F_:i=10;break e;case $_:i=9;break e;case hy:i=11;break e;case my:i=14;break e;case so:i=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=lr(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ri(e,t,n,r){return e=lr(7,e,r,t),e.lanes=n,e}function eh(e,t,n,r){return e=lr(22,e,r,t),e.elementType=U_,e.lanes=n,e.stateNode={isHidden:!1},e}function zm(e,t,n){return e=lr(6,e,null,t),e.lanes=n,e}function Fm(e,t,n){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YA(e,t,n,r,s){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=xm(0),this.expirationTimes=xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Zy(e,t,n,r,s,o,i,l,c){return e=new YA(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=lr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ay(o),e}function GA(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(IS)}catch(e){console.error(e)}}IS(),I_.exports=Jn;var Bs=I_.exports;const MS=Vf(Bs),JA=__({__proto__:null,default:MS},[Bs]);var _w=Bs;xp.createRoot=_w.createRoot,xp.hydrateRoot=_w.hydrateRoot;/** * @remix-run/router v1.18.0 * * Copyright (c) Remix Software Inc. @@ -46,9 +46,9 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function KA(){return Math.random().toString(36).substr(2,8)}function ww(e,t){return{usr:e.state,key:e.key,idx:t}}function bc(e,t,n,r){return n===void 0&&(n=null),Dt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:n,key:t&&t.key||r||KA()})}function pi(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 Ws(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 YA(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,l=Wt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Dt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Wt.Pop;let w=d(),g=w==null?null:w-u;u=w,c&&c({action:l,location:p.location,delta:g})}function h(w,g){l=Wt.Push;let v=bc(p.location,w,g);n&&n(v,w),u=d()+1;let b=ww(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:l,location:p.location,delta:1})}function m(w,g){l=Wt.Replace;let v=bc(p.location,w,g);n&&n(v,w),u=d();let b=ww(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:l,location:p.location,delta:0})}function x(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:pi(w);return v=v.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let p={get action(){return l},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(xw,f),c=w,()=>{s.removeEventListener(xw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let g=x(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const ZA=new Set(["lazy","caseSensitive","path","id","index","children"]);function GA(e){return e.index===!0}function _c(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],l=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),GA(s)){let c=Dt({},s,t(s),{id:l});return r[l]=c,c}else{let c=Dt({},s,t(s),{id:l,children:void 0});return r[l]=c,s.children&&(c.children=_c(s.children,t,i,r)),c}})}function Ko(e,t,n){return n===void 0&&(n="/"),gd(e,t,n,!1)}function gd(e,t,n,r){let s=typeof t=="string"?Ws(t):t,o=el(s.pathname||"/",n);if(o==null)return null;let i=DS(e);XA(i);let l=null;for(let c=0;l==null&&c{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ps([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),DS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:sD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of OS(o.path))s(o,i,c)}),t}function OS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=OS(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function XA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:oD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const QA=/^:[\w-]+$/,JA=3,eD=2,tD=1,nD=10,rD=-2,bw=e=>e==="*";function sD(e,t){let n=e.split("/"),r=n.length;return n.some(bw)&&(r+=rD),t&&(r+=eD),n.filter(s=>!bw(s)).reduce((s,o)=>s+(QA.test(o)?JA:o===""?tD:nD),r)}function oD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function iD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let l=0;l{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=l[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=l[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function aD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mi(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function lD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mi(!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 el(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 cD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ws(e):e;return{pathname:n?n.startsWith("/")?n:uD(n,t):t,search:fD(r),hash:hD(s)}}function uD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function $m(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 IS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sh(e,t){let n=IS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ws(e):(s=Dt({},e),tt(!s.pathname||!s.pathname.includes("?"),$m("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),$m("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),$m("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=cD(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ps=e=>e.join("/").replace(/\/\/+/g,"/"),dD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Jy{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ih(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MS=["post","put","patch","delete"],mD=new Set(MS),pD=["get",...MS],gD=new Set(pD),yD=new Set([301,302,303,307,308]),vD=new Set([307,308]),Um={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),LS="remix-router-transitions";function bD(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=wD;let o={},i=_c(e.routes,s,void 0,o),l,c=e.basename||"/",u=e.unstable_dataStrategy||jD,d=e.unstable_patchRoutesOnMiss,f=Dt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,g=e.hydrationData!=null,v=Ko(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Aw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&hm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=v.findIndex(Ce=>H[Ce.route.id]!==void 0);_=v.slice(0,ne+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:Um,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Wt.Pop,R=!1,A,O=!1,Z=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,ve=new Map,oe=new Set,ie=new Map,Ie=new Map,xe=new Map,ke=!1;function Te(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(ke){ke=!1;return}mi(Ie.size===0||ne!=null,"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 Ce=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(Ce&&ne!=null){ke=!0,e.history.go(ne*-1),Ii(Ce,{state:"blocked",location:q,proceed(){Ii(Ce,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let De=new Map(j.blockers);De.set(Ce,kl),Ae({blockers:De})}});return}return G(H,q)}),n){FD(t,Z);let V=()=>$D(t,Z);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||G(Wt.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Kt(H)),j.blockers.forEach((V,H)=>xu(H))}function Me(V){return m.add(V),()=>m.delete(V)}function Ae(V,H){H===void 0&&(H={}),j=Dt({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((Ce,De)=>{Ce.state==="idle"&&(oe.has(De)?ne.push(De):q.push(De))}),[...m].forEach(Ce=>Ce(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(Ce=>j.fetchers.delete(Ce)),ne.forEach(Ce=>Kt(Ce)))}function st(V,H,q){var ne,Ce;let{flushSync:De}=q===void 0?{}:q,We=j.actionData!=null&&j.navigation.formMethod!=null&&Cr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,pe;H.actionData?Object.keys(H.actionData).length>0?pe=H.actionData:pe=null:We?pe=j.actionData:pe=null;let qe=H.loaderData?Pw(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,kl)));let $e=R===!0||j.navigation.formMethod!=null&&Cr(j.navigation.formMethod)&&((Ce=V.state)==null?void 0:Ce._isRedirect)!==!0;l&&(i=l,l=void 0),z||T===Wt.Pop||(T===Wt.Push?e.history.push(V,V.state):T===Wt.Replace&&e.history.replace(V,V.state));let yt;if(T===Wt.Pop){let pt=Z.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:Z.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(O){let pt=Z.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),Z.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Ae(Dt({},H,{actionData:pe,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:Um,revalidation:"idle",restoreScrollPosition:l0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:De===!0}),T=Wt.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=fg(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:Ce,error:De}=Sw(f.v7_normalizeFormMethod,!1,q,H),We=j.location,pe=bc(j.location,ne,H&&H.state);pe=Dt({},pe,e.history.encodeLocation(pe));let qe=H&&H.replace!=null?H.replace:void 0,ze=Wt.Push;qe===!0?ze=Wt.Replace:qe===!1||Ce!=null&&Cr(Ce.formMethod)&&Ce.formAction===j.location.pathname+j.location.search&&(ze=Wt.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:We,nextLocation:pe,historyAction:ze});if(pt){Ii(pt,{state:"blocked",location:pe,proceed(){Ii(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,kl),Ae({blockers:xt})}});return}return await G(ze,pe,{submission:Ce,pendingError:De,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ye(),Ae({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){G(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}G(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function G(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,mP(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let ne=l||i,Ce=q&&q.overrideNavigation,De=Ko(ne,H,c),We=(q&&q.flushSync)===!0,pe=hm(De,ne,H.pathname);if(pe.active&&pe.matches&&(De=pe.matches),!De){let{error:ht,notFoundMatches:on,route:Bt}=Mi(H.pathname);st(H,{matches:on,loaderData:{},errors:{[Bt.id]:ht}},{flushSync:We});return}if(j.initialized&&!S&&AD(j.location,H)&&!(q&&q.submission&&Cr(q.submission.formMethod))){st(H,{matches:De},{flushSync:We});return}A=new AbortController;let qe=Ui(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[fa(De).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&Cr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,De,pe.active,{replace:q.replace,flushSync:We});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[on,Bt]=ht.pendingActionResult;if(Un(Bt)&&ih(Bt.error)&&Bt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[on]:Bt.error}});return}}De=ht.matches||De,ze=ht.pendingActionResult,Ce=Vm(H,q.submission),We=!1,pe.active=!1,qe=Ui(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,De,pe.active,Ce,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,We,ze);$e||(A=null,st(H,Dt({matches:yt||De},Rw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,ne,Ce,De){De===void 0&&(De={}),Ye();let We=LD(H,q);if(Ae({navigation:We},{flushSync:De.flushSync===!0}),Ce){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Wr(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Mi(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let pe,qe=Fl(ne,H);if(!qe.route.action&&!qe.route.lazy)pe={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(pe=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(Xo(pe)){let ze;return De&&De.replace!=null?ze=De.replace:ze=Ew(pe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,pe,{submission:q,replace:ze}),{shortCircuited:!0}}if(qo(pe))throw xn(400,{type:"defer-action"});if(Un(pe)){let ze=fa(ne,qe.route.id);return(De&&De.replace)!==!0&&(T=Wt.Push),{matches:ne,pendingActionResult:[ze.route.id,pe]}}return{matches:ne,pendingActionResult:[qe.route.id,pe]}}async function k(V,H,q,ne,Ce,De,We,pe,qe,ze,$e){let yt=Ce||Vm(H,De),pt=De||We||Iw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let zt=P($e);Ae(Dt({navigation:yt},zt!==void 0?{actionData:zt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:zt,error:Ln}=Wr(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[zt]:Ln}}}else if(Je.matches)q=Je.matches;else{let{error:zt,notFoundMatches:Ln,route:Tt}=Mi(H.pathname);return{matches:Ln,loaderData:{},errors:{[Tt.id]:zt}}}}let ht=l||i,[on,Bt]=kw(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,ht,c,$e);if(Xs(Je=>!(q&&q.some(zt=>zt.route.id===Je))||on&&on.some(zt=>zt.route.id===Je)),I=++W,on.length===0&&Bt.length===0){let Je=ps();return st(H,Dt({matches:q,loaderData:{},errors:$e&&Un($e[1])?{[$e[0]]:$e[1].error}:null},Rw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let zt=P($e);zt!==void 0&&(Je.actionData=zt)}Bt.length>0&&(Je.fetchers=M(Bt)),Ae(Je,{flushSync:ze})}Bt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let pl=()=>Bt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",pl);let{loaderResults:Qs,fetcherResults:Li}=await be(j.matches,q,on,Bt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",pl),Bt.forEach(Je=>F.delete(Je.key));let zi=Dw([...Qs,...Li]);if(zi){if(zi.idx>=on.length){let Je=Bt[zi.idx-on.length].key;$.add(Je)}return await Q(V,zi.result,{replace:pe}),{shortCircuited:!0}}let{loaderData:Fi,errors:Hr}=Tw(j,q,on,Qs,$e,Bt,Li,ie);ie.forEach((Je,zt)=>{Je.subscribe(Ln=>{(Ln||Je.done)&&ie.delete(zt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[zt]=Je;return!on.some(Ln=>Ln.route.id===zt)}).forEach(Je=>{let[zt,Ln]=Je;Hr=Object.assign(Hr||{},{[zt]:Ln})});let _u=ps(),Su=sr(I),ku=_u||Su||Bt.length>0;return Dt({matches:q,loaderData:Fi,errors:Hr},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!Un(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=Cl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function Y(V,H,q,ne){if(r)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.");F.has(V)&&ct(V);let Ce=(ne&&ne.unstable_flushSync)===!0,De=l||i,We=fg(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),pe=Ko(De,We,c),qe=hm(pe,De,We);if(qe.active&&qe.matches&&(pe=qe.matches),!pe){Nt(V,H,xn(404,{pathname:We}),{flushSync:Ce});return}let{path:ze,submission:$e,error:yt}=Sw(f.v7_normalizeFormMethod,!0,We,ne);if(yt){Nt(V,H,yt,{flushSync:Ce});return}let pt=Fl(pe,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&Cr($e.formMethod)){L(V,H,ze,pt,pe,qe.active,Ce,$e);return}B.set(V,{routeId:H,path:ze}),K(V,H,ze,pt,pe,qe.active,Ce,$e)}async function L(V,H,q,ne,Ce,De,We,pe){Ye(),B.delete(V);function qe(Tt){if(!Tt.route.action&&!Tt.route.lazy){let gs=xn(405,{method:pe.formMethod,pathname:q,routeId:H});return Nt(V,H,gs,{flushSync:We}),!0}return!1}if(!De&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,zD(pe,ze),{flushSync:We});let $e=new AbortController,yt=Ui(e.history,q,$e.signal,pe);if(De){let Tt=await bu(Ce,q,yt.signal);if(Tt.type==="aborted")return;if(Tt.type==="error"){let{error:gs}=Wr(q,Tt);Nt(V,H,gs,{flushSync:We});return}else if(Tt.matches){if(Ce=Tt.matches,ne=Fl(Ce,q),qe(ne))return}else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],Ce))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&oe.has(V)){if(Xo(ht)||Un(ht)){Ue(V,no(void 0));return}}else{if(Xo(ht))if(F.delete(V),I>pt){Ue(V,no(void 0));return}else return $.add(V),Ue(V,Cl(pe)),Q(yt,ht,{fetcherSubmission:pe});if(Un(ht)){Nt(V,H,ht.error);return}}if(qo(ht))throw xn(400,{type:"defer-action"});let on=j.navigation.location||j.location,Bt=Ui(e.history,on,$e.signal),pl=l||i,Qs=j.navigation.state!=="idle"?Ko(pl,j.navigation.location,c):j.matches;tt(Qs,"Didn't find any matches after fetcher action");let Li=++W;X.set(V,Li);let zi=Cl(pe,ht.data);j.fetchers.set(V,zi);let[Fi,Hr]=kw(e.history,j,Qs,pe,on,!1,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,pl,c,[ne.route.id,ht]);Hr.filter(Tt=>Tt.key!==V).forEach(Tt=>{let gs=Tt.key,c0=j.fetchers.get(gs),yP=Cl(void 0,c0?c0.data:void 0);j.fetchers.set(gs,yP),F.has(gs)&&ct(gs),Tt.controller&&F.set(gs,Tt.controller)}),Ae({fetchers:new Map(j.fetchers)});let _u=()=>Hr.forEach(Tt=>ct(Tt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await be(j.matches,Qs,Fi,Hr,Bt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Hr.forEach(Tt=>F.delete(Tt.key));let Je=Dw([...Su,...ku]);if(Je){if(Je.idx>=Fi.length){let Tt=Hr[Je.idx-Fi.length].key;$.add(Tt)}return Q(Bt,Je.result)}let{loaderData:zt,errors:Ln}=Tw(j,j.matches,Fi,Su,void 0,Hr,ku,ie);if(j.fetchers.has(V)){let Tt=no(ht.data);j.fetchers.set(V,Tt)}sr(Li),j.navigation.state==="loading"&&Li>I?(tt(T,"Expected pending action"),A&&A.abort(),st(j.navigation.location,{matches:Qs,loaderData:zt,errors:Ln,fetchers:new Map(j.fetchers)})):(Ae({errors:Ln,loaderData:Pw(j.loaderData,zt,Qs,Ln),fetchers:new Map(j.fetchers)}),S=!1)}async function K(V,H,q,ne,Ce,De,We,pe){let qe=j.fetchers.get(V);Ue(V,Cl(pe,qe?qe.data:void 0),{flushSync:We});let ze=new AbortController,$e=Ui(e.history,q,ze.signal);if(De){let ht=await bu(Ce,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:on}=Wr(q,ht);Nt(V,H,on,{flushSync:We});return}else if(ht.matches)Ce=ht.matches,ne=Fl(Ce,q);else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],Ce))[0];if(qo(xt)&&(xt=await VS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(oe.has(V)){Ue(V,no(void 0));return}if(Xo(xt))if(I>yt){Ue(V,no(void 0));return}else{$.add(V),await Q($e,xt);return}if(Un(xt)){Nt(V,H,xt.error);return}tt(!qo(xt),"Unhandled fetcher deferred data"),Ue(V,no(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:Ce,replace:De}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let We=H.response.headers.get("Location");tt(We,"Expected a Location header on the redirect Response"),We=Ew(We,new URL(V.url),c);let pe=bc(j.location,We,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(ev.test(We)){const ht=e.history.createURL(We);xt=ht.origin!==t.location.origin||el(ht.pathname,c)==null}if(xt){De?t.location.replace(We):t.location.assign(We);return}}A=null;let qe=De===!0?Wt.Replace:Wt.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!Ce&&ze&&$e&&yt&&(ne=Iw(j.navigation));let pt=ne||Ce;if(vD.has(H.response.status)&&pt&&Cr(pt.formMethod))await G(qe,pe,{submission:Dt({},pt,{formAction:We}),preventScrollReset:R});else{let xt=Vm(pe,ne);await G(qe,pe,{overrideNavigation:xt,fetcherSubmission:Ce,preventScrollReset:R})}}async function te(V,H,q,ne){try{let Ce=await ED(u,V,H,q,ne,o,s);return await Promise.all(Ce.map((De,We)=>{if(OD(De)){let pe=De.result;return{type:wt.redirect,response:PD(pe,H,q[We].route.id,ne,c,f.v7_relativeSplatPath)}}return TD(De)}))}catch(Ce){return q.map(()=>({type:wt.error,error:Ce}))}}async function be(V,H,q,ne,Ce){let[De,...We]=await Promise.all([q.length?te("loader",Ce,q,H):[],...ne.map(pe=>{if(pe.matches&&pe.match&&pe.controller){let qe=Ui(e.history,pe.path,pe.controller.signal);return te("loader",qe,[pe.match],pe.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:pe.path})})})]);return await Promise.all([Ow(V,q,De,De.map(()=>Ce.signal),!1,j.loaderData),Ow(V,ne.map(pe=>pe.match),We,ne.map(pe=>pe.controller?pe.controller.signal:null),!0)]),{loaderResults:De,fetcherResults:We}}function Ye(){S=!0,U.push(...Xs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Ae({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Nt(V,H,q,ne){ne===void 0&&(ne={});let Ce=fa(j.matches,H);Kt(V),Ae({errors:{[Ce.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function rr(V){return f.v7_fetcherPersist&&(ve.set(V,(ve.get(V)||0)+1),oe.has(V)&&oe.delete(V)),j.fetchers.get(V)||xD}function Kt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),oe.delete(V),j.fetchers.delete(V)}function hs(V){if(f.v7_fetcherPersist){let H=(ve.get(V)||0)-1;H<=0?(ve.delete(V),oe.add(V)):ve.set(V,H)}else Kt(V);Ae({fetchers:new Map(j.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function ms(V){for(let H of V){let q=rr(H),ne=no(q.data);j.fetchers.set(H,ne)}}function ps(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return ms(V),H}function sr(V){let H=[];for(let[q,ne]of X)if(ne0}function vu(V,H){let q=j.blockers.get(V)||kl;return Ie.get(V)!==H&&Ie.set(V,H),q}function xu(V){j.blockers.delete(V),Ie.delete(V)}function Ii(V,H){let q=j.blockers.get(V)||kl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Ae({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Ie.size===0)return;Ie.size>1&&mi(!1,"A router only supports one blocker at a time");let Ce=Array.from(Ie.entries()),[De,We]=Ce[Ce.length-1],pe=j.blockers.get(De);if(!(pe&&pe.state==="proceeding")&&We({currentLocation:H,nextLocation:q,historyAction:ne}))return De}function Mi(V){let H=xn(404,{pathname:V}),q=l||i,{matches:ne,route:Ce}=Aw(q);return Xs(),{notFoundMatches:ne,route:Ce,error:H}}function Wr(V,H){return{boundaryId:fa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Xs(V){let H=[];return ie.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),ie.delete(ne))}),H}function hP(V,H,q){if(x=V,w=H,p=q||null,!g&&j.navigation===Um){g=!0;let ne=l0(j.location,j.matches);ne!=null&&Ae({restoreScrollPosition:ne})}return()=>{x=null,w=null,p=null}}function a0(V,H){return p&&p(V,H.map(ne=>qA(ne,j.loaderData)))||V.key}function mP(V,H){if(x&&w){let q=a0(V,H);x[q]=w()}}function l0(V,H){if(x){let q=a0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function hm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:gd(H,q,c,!0)}}else return{active:!0,matches:gd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,Ce=ne.length>0?ne[ne.length-1].route:null;for(;;){let De=l==null,We=l||i;try{await CD(d,H,ne,We,o,s,xe,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{De&&(i=[...i])}if(q.aborted)return{type:"aborted"};let pe=Ko(We,H,c),qe=!1;if(pe){let $e=pe[pe.length-1].route;if($e.index)return{type:"success",matches:pe};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:pe}}let ze=gd(We,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?pe:null};if(ne=ze,Ce=ne[ne.length-1].route,Ce.path==="*")return{type:"success",matches:ne}}}function pP(V){o={},l=_c(V,s,void 0,o)}function gP(V,H){let q=l==null;FS(V,H,l||i,o,s),q&&(i=[...i],Ae({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Te,subscribe:Me,enableScrollRestoration:hP,navigate:E,fetch:Y,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:rr,deleteFetcher:hs,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:gP,_internalFetchControllers:F,_internalActiveDeferreds:ie,_internalSetRoutes:pP},C}function _D(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function fg(e,t,n,r,s,o,i,l){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=oh(s||".",sh(c,o),el(e.pathname,n)||e.pathname,l==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!tv(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ps([n,d.pathname])),pi(d)}function Sw(e,t,n,r){if(!r||!_D(r))return{path:n};if(r.formMethod&&!MD(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=$S(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Cr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,x)=>{let[p,w]=x;return""+m+p+"="+w+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Cr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=hg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=hg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Nw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Nw(c)}catch{return s()}let d={formMethod:i,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Cr(d.formMethod))return{path:n,submission:d};let f=Ws(n);return t&&f.search&&tv(f.search)&&c.append("index",""),f.search="?"+c,{path:pi(f),submission:d}}function SD(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function kw(e,t,n,r,s,o,i,l,c,u,d,f,h,m,x,p){let w=p?Un(p[1])?p[1].error:p[1].data:void 0,g=e.createURL(t.location),v=e.createURL(s),b=p&&Un(p[1])?p[0]:void 0,_=b?SD(n,b):n,C=p?p[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,O)=>{let{route:Z}=A;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(o)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(kD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return Cw(A,Dt({currentUrl:g,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:l||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||zS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let Z=Ko(m,A.path,x);if(!Z){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Fl(Z,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=l:S=Cw(z,Dt({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:l})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:Z,match:z,controller:new AbortController})}),[T,R]}function kD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function zS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Cw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function CD(e,t,n,r,s,o,i,l){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{l.aborted||FS(d,f,r,s,o)}}),i.set(c,u)),u&&DD(u)&&await u}finally{i.delete(c)}}function FS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let l=_c(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...l):i.children=l}else{let i=_c(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function jw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";mi(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!ZA.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,Dt({},t(s),{lazy:void 0}))}function jD(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ED(e,t,n,r,s,o,i,l){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return Dt({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?ND(t,n,f,o,i,x,l):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:l});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function ND(e,t,n,r,s,o,i){let l,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(m=>{f=m}),jw(n.route,s,r)]);if(f!==void 0)throw f;l=h}else if(await jw(n.route,s,r),d=n.route[e],d)l=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)l=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(l.result!==void 0,"You defined "+(e==="action"?"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(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function TD(e){let{result:t,type:n,status:r}=e;if(US(t)){let i;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(l){return{type:wt.error,error:l}}return n===wt.error?{type:wt.error,error:new Jy(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ih(t)?t.status:r};if(ID(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function PD(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ev.test(i)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=fg(new URL(t.url),l,s,!0,i,o),e.headers.set("Location",i)}return e}function Ew(e,t,n){if(ev.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=el(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ui(e,t,n,r){let s=e.createURL($S(t)).toString(),o={signal:n};if(r&&Cr(r.formMethod)){let{formMethod:i,formEncType:l}=r;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=hg(r.formData):o.body=r.formData}return new Request(s,o)}function hg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Nw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function RD(e,t,n,r,s,o){let i={},l=null,c,u=!1,d={},f=r&&Un(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!Xo(h),"Cannot handle redirect results in processLoaderData"),Un(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),l=l||{};{let w=fa(e,x);l[w.route.id]==null&&(l[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ih(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else qo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(l={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:d}}function Tw(e,t,n,r,s,o,i,l){let{loaderData:c,errors:u}=RD(t,n,r,s,l);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Aw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",c='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Jy(e||500,l,new Error(c),!0)}function Dw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Xo(n))return{result:n,idx:t}}}function $S(e){let t=typeof e=="string"?Ws(e):e;return pi(Dt({},t,{hash:""}))}function AD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function DD(e){return typeof e=="object"&&e!=null&&"then"in e}function OD(e){return US(e.result)&&yD.has(e.result.status)}function qo(e){return e.type===wt.deferred}function Un(e){return e.type===wt.error}function Xo(e){return(e&&e.type)===wt.redirect}function ID(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function US(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function MD(e){return gD.has(e.toLowerCase())}function Cr(e){return mD.has(e.toLowerCase())}async function Ow(e,t,n,r,s,o){for(let i=0;if.route.id===c.route.id),d=u!=null&&!zS(u,c)&&(o&&o[c.route.id])!==void 0;if(qo(l)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await VS(l,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function VS(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function tv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Fl(e,t){let n=typeof t=="string"?Ws(t).search:t.search;if(e[e.length-1].route.index&&tv(n||""))return e[e.length-1];let r=IS(e);return r[r.length-1]}function Iw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Vm(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 LD(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}}function Cl(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 zD(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}}function no(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 FD(e,t){try{let n=e.sessionStorage.getItem(LS);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function $D(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(LS,JSON.stringify(n))}catch(r){mi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tD(){return Math.random().toString(36).substr(2,8)}function kw(e,t){return{usr:e.state,key:e.key,idx:t}}function bc(e,t,n,r){return n===void 0&&(n=null),Dt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:n,key:t&&t.key||r||tD()})}function pi(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 Ws(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 nD(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,l=Ht.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Dt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Ht.Pop;let w=d(),y=w==null?null:w-u;u=w,c&&c({action:l,location:p.location,delta:y})}function h(w,y){l=Ht.Push;let v=bc(p.location,w,y);n&&n(v,w),u=d()+1;let b=kw(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:l,location:p.location,delta:1})}function m(w,y){l=Ht.Replace;let v=bc(p.location,w,y);n&&n(v,w),u=d();let b=kw(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:l,location:p.location,delta:0})}function x(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:pi(w);return v=v.replace(/ $/,"%20"),tt(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let p={get action(){return l},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Sw,f),c=w,()=>{s.removeEventListener(Sw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let y=x(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const rD=new Set(["lazy","caseSensitive","path","id","index","children"]);function sD(e){return e.index===!0}function _c(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],l=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),sD(s)){let c=Dt({},s,t(s),{id:l});return r[l]=c,c}else{let c=Dt({},s,t(s),{id:l,children:void 0});return r[l]=c,s.children&&(c.children=_c(s.children,t,i,r)),c}})}function Ko(e,t,n){return n===void 0&&(n="/"),yd(e,t,n,!1)}function yd(e,t,n,r){let s=typeof t=="string"?Ws(t):t,o=el(s.pathname||"/",n);if(o==null)return null;let i=LS(e);iD(i);let l=null;for(let c=0;l==null&&c{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ps([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),LS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:hD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of zS(o.path))s(o,i,c)}),t}function zS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=zS(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function iD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aD=/^:[\w-]+$/,lD=3,cD=2,uD=1,dD=10,fD=-2,Cw=e=>e==="*";function hD(e,t){let n=e.split("/"),r=n.length;return n.some(Cw)&&(r+=fD),t&&(r+=cD),n.filter(s=>!Cw(s)).reduce((s,o)=>s+(aD.test(o)?lD:o===""?uD:dD),r)}function mD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function pD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let l=0;l{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=l[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=l[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function gD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mi(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function yD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mi(!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 el(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 vD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ws(e):e;return{pathname:n?n.startsWith("/")?n:xD(n,t):t,search:bD(r),hash:_D(s)}}function xD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function $m(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 FS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function oh(e,t){let n=FS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ih(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ws(e):(s=Dt({},e),tt(!s.pathname||!s.pathname.includes("?"),$m("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),$m("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),$m("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=vD(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ps=e=>e.join("/").replace(/\/\/+/g,"/"),wD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_D=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Jy{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ah(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $S=["post","put","patch","delete"],SD=new Set($S),kD=["get",...$S],CD=new Set(kD),jD=new Set([301,302,303,307,308]),ED=new Set([307,308]),Um={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ND={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,TD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),US="remix-router-transitions";function PD(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=TD;let o={},i=_c(e.routes,s,void 0,o),l,c=e.basename||"/",u=e.unstable_dataStrategy||ID,d=e.unstable_patchRoutesOnMiss,f=Dt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,y=e.hydrationData!=null,v=Ko(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Mw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&hm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=v.findIndex(Ce=>H[Ce.route.id]!==void 0);_=v.slice(0,ne+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:Um,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Ht.Pop,R=!1,A,O=!1,G=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,ve=new Map,oe=new Set,ie=new Map,Ie=new Map,xe=new Map,ke=!1;function Pe(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(ke){ke=!1;return}mi(Ie.size===0||ne!=null,"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 Ce=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(Ce&&ne!=null){ke=!0,e.history.go(ne*-1),Ii(Ce,{state:"blocked",location:q,proceed(){Ii(Ce,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let De=new Map(j.blockers);De.set(Ce,kl),Ae({blockers:De})}});return}return Z(H,q)}),n){GD(t,G);let V=()=>ZD(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||Z(Ht.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Yt(H)),j.blockers.forEach((V,H)=>xu(H))}function Me(V){return m.add(V),()=>m.delete(V)}function Ae(V,H){H===void 0&&(H={}),j=Dt({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((Ce,De)=>{Ce.state==="idle"&&(oe.has(De)?ne.push(De):q.push(De))}),[...m].forEach(Ce=>Ce(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(Ce=>j.fetchers.delete(Ce)),ne.forEach(Ce=>Yt(Ce)))}function st(V,H,q){var ne,Ce;let{flushSync:De}=q===void 0?{}:q,We=j.actionData!=null&&j.navigation.formMethod!=null&&Cr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,pe;H.actionData?Object.keys(H.actionData).length>0?pe=H.actionData:pe=null:We?pe=j.actionData:pe=null;let qe=H.loaderData?Ow(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,kl)));let $e=R===!0||j.navigation.formMethod!=null&&Cr(j.navigation.formMethod)&&((Ce=V.state)==null?void 0:Ce._isRedirect)!==!0;l&&(i=l,l=void 0),z||T===Ht.Pop||(T===Ht.Push?e.history.push(V,V.state):T===Ht.Replace&&e.history.replace(V,V.state));let yt;if(T===Ht.Pop){let pt=G.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(O){let pt=G.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),G.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Ae(Dt({},H,{actionData:pe,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:Um,revalidation:"idle",restoreScrollPosition:f0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:De===!0}),T=Ht.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=fg(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:Ce,error:De}=Ew(f.v7_normalizeFormMethod,!1,q,H),We=j.location,pe=bc(j.location,ne,H&&H.state);pe=Dt({},pe,e.history.encodeLocation(pe));let qe=H&&H.replace!=null?H.replace:void 0,ze=Ht.Push;qe===!0?ze=Ht.Replace:qe===!1||Ce!=null&&Cr(Ce.formMethod)&&Ce.formAction===j.location.pathname+j.location.search&&(ze=Ht.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:We,nextLocation:pe,historyAction:ze});if(pt){Ii(pt,{state:"blocked",location:pe,proceed(){Ii(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,kl),Ae({blockers:xt})}});return}return await Z(ze,pe,{submission:Ce,pendingError:De,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ge(),Ae({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){Z(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}Z(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,SP(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let ne=l||i,Ce=q&&q.overrideNavigation,De=Ko(ne,H,c),We=(q&&q.flushSync)===!0,pe=hm(De,ne,H.pathname);if(pe.active&&pe.matches&&(De=pe.matches),!De){let{error:ht,notFoundMatches:on,route:Wt}=Mi(H.pathname);st(H,{matches:on,loaderData:{},errors:{[Wt.id]:ht}},{flushSync:We});return}if(j.initialized&&!S&&UD(j.location,H)&&!(q&&q.submission&&Cr(q.submission.formMethod))){st(H,{matches:De},{flushSync:We});return}A=new AbortController;let qe=Ui(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[fa(De).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&Cr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,De,pe.active,{replace:q.replace,flushSync:We});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[on,Wt]=ht.pendingActionResult;if(Bn(Wt)&&ah(Wt.error)&&Wt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[on]:Wt.error}});return}}De=ht.matches||De,ze=ht.pendingActionResult,Ce=Vm(H,q.submission),We=!1,pe.active=!1,qe=Ui(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,De,pe.active,Ce,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,We,ze);$e||(A=null,st(H,Dt({matches:yt||De},Iw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,ne,Ce,De){De===void 0&&(De={}),Ge();let We=KD(H,q);if(Ae({navigation:We},{flushSync:De.flushSync===!0}),Ce){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Wr(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Mi(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let pe,qe=Fl(ne,H);if(!qe.route.action&&!qe.route.lazy)pe={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(pe=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(Xo(pe)){let ze;return De&&De.replace!=null?ze=De.replace:ze=Rw(pe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,pe,{submission:q,replace:ze}),{shortCircuited:!0}}if(qo(pe))throw xn(400,{type:"defer-action"});if(Bn(pe)){let ze=fa(ne,qe.route.id);return(De&&De.replace)!==!0&&(T=Ht.Push),{matches:ne,pendingActionResult:[ze.route.id,pe]}}return{matches:ne,pendingActionResult:[qe.route.id,pe]}}async function k(V,H,q,ne,Ce,De,We,pe,qe,ze,$e){let yt=Ce||Vm(H,De),pt=De||We||Fw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let zt=P($e);Ae(Dt({navigation:yt},zt!==void 0?{actionData:zt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:zt,error:Fn}=Wr(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[zt]:Fn}}}else if(Je.matches)q=Je.matches;else{let{error:zt,notFoundMatches:Fn,route:Tt}=Mi(H.pathname);return{matches:Fn,loaderData:{},errors:{[Tt.id]:zt}}}}let ht=l||i,[on,Wt]=Nw(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,ht,c,$e);if(Xs(Je=>!(q&&q.some(zt=>zt.route.id===Je))||on&&on.some(zt=>zt.route.id===Je)),I=++W,on.length===0&&Wt.length===0){let Je=ps();return st(H,Dt({matches:q,loaderData:{},errors:$e&&Bn($e[1])?{[$e[0]]:$e[1].error}:null},Iw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let zt=P($e);zt!==void 0&&(Je.actionData=zt)}Wt.length>0&&(Je.fetchers=M(Wt)),Ae(Je,{flushSync:ze})}Wt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let pl=()=>Wt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",pl);let{loaderResults:Qs,fetcherResults:Li}=await be(j.matches,q,on,Wt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",pl),Wt.forEach(Je=>F.delete(Je.key));let zi=Lw([...Qs,...Li]);if(zi){if(zi.idx>=on.length){let Je=Wt[zi.idx-on.length].key;$.add(Je)}return await Q(V,zi.result,{replace:pe}),{shortCircuited:!0}}let{loaderData:Fi,errors:Hr}=Dw(j,q,on,Qs,$e,Wt,Li,ie);ie.forEach((Je,zt)=>{Je.subscribe(Fn=>{(Fn||Je.done)&&ie.delete(zt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[zt]=Je;return!on.some(Fn=>Fn.route.id===zt)}).forEach(Je=>{let[zt,Fn]=Je;Hr=Object.assign(Hr||{},{[zt]:Fn})});let _u=ps(),Su=sr(I),ku=_u||Su||Wt.length>0;return Dt({matches:q,loaderData:Fi,errors:Hr},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!Bn(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=Cl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function Y(V,H,q,ne){if(r)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.");F.has(V)&&ct(V);let Ce=(ne&&ne.unstable_flushSync)===!0,De=l||i,We=fg(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),pe=Ko(De,We,c),qe=hm(pe,De,We);if(qe.active&&qe.matches&&(pe=qe.matches),!pe){Nt(V,H,xn(404,{pathname:We}),{flushSync:Ce});return}let{path:ze,submission:$e,error:yt}=Ew(f.v7_normalizeFormMethod,!0,We,ne);if(yt){Nt(V,H,yt,{flushSync:Ce});return}let pt=Fl(pe,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&Cr($e.formMethod)){L(V,H,ze,pt,pe,qe.active,Ce,$e);return}B.set(V,{routeId:H,path:ze}),K(V,H,ze,pt,pe,qe.active,Ce,$e)}async function L(V,H,q,ne,Ce,De,We,pe){Ge(),B.delete(V);function qe(Tt){if(!Tt.route.action&&!Tt.route.lazy){let gs=xn(405,{method:pe.formMethod,pathname:q,routeId:H});return Nt(V,H,gs,{flushSync:We}),!0}return!1}if(!De&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,YD(pe,ze),{flushSync:We});let $e=new AbortController,yt=Ui(e.history,q,$e.signal,pe);if(De){let Tt=await bu(Ce,q,yt.signal);if(Tt.type==="aborted")return;if(Tt.type==="error"){let{error:gs}=Wr(q,Tt);Nt(V,H,gs,{flushSync:We});return}else if(Tt.matches){if(Ce=Tt.matches,ne=Fl(Ce,q),qe(ne))return}else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],Ce))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&oe.has(V)){if(Xo(ht)||Bn(ht)){Ue(V,no(void 0));return}}else{if(Xo(ht))if(F.delete(V),I>pt){Ue(V,no(void 0));return}else return $.add(V),Ue(V,Cl(pe)),Q(yt,ht,{fetcherSubmission:pe});if(Bn(ht)){Nt(V,H,ht.error);return}}if(qo(ht))throw xn(400,{type:"defer-action"});let on=j.navigation.location||j.location,Wt=Ui(e.history,on,$e.signal),pl=l||i,Qs=j.navigation.state!=="idle"?Ko(pl,j.navigation.location,c):j.matches;tt(Qs,"Didn't find any matches after fetcher action");let Li=++W;X.set(V,Li);let zi=Cl(pe,ht.data);j.fetchers.set(V,zi);let[Fi,Hr]=Nw(e.history,j,Qs,pe,on,!1,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,pl,c,[ne.route.id,ht]);Hr.filter(Tt=>Tt.key!==V).forEach(Tt=>{let gs=Tt.key,h0=j.fetchers.get(gs),jP=Cl(void 0,h0?h0.data:void 0);j.fetchers.set(gs,jP),F.has(gs)&&ct(gs),Tt.controller&&F.set(gs,Tt.controller)}),Ae({fetchers:new Map(j.fetchers)});let _u=()=>Hr.forEach(Tt=>ct(Tt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await be(j.matches,Qs,Fi,Hr,Wt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Hr.forEach(Tt=>F.delete(Tt.key));let Je=Lw([...Su,...ku]);if(Je){if(Je.idx>=Fi.length){let Tt=Hr[Je.idx-Fi.length].key;$.add(Tt)}return Q(Wt,Je.result)}let{loaderData:zt,errors:Fn}=Dw(j,j.matches,Fi,Su,void 0,Hr,ku,ie);if(j.fetchers.has(V)){let Tt=no(ht.data);j.fetchers.set(V,Tt)}sr(Li),j.navigation.state==="loading"&&Li>I?(tt(T,"Expected pending action"),A&&A.abort(),st(j.navigation.location,{matches:Qs,loaderData:zt,errors:Fn,fetchers:new Map(j.fetchers)})):(Ae({errors:Fn,loaderData:Ow(j.loaderData,zt,Qs,Fn),fetchers:new Map(j.fetchers)}),S=!1)}async function K(V,H,q,ne,Ce,De,We,pe){let qe=j.fetchers.get(V);Ue(V,Cl(pe,qe?qe.data:void 0),{flushSync:We});let ze=new AbortController,$e=Ui(e.history,q,ze.signal);if(De){let ht=await bu(Ce,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:on}=Wr(q,ht);Nt(V,H,on,{flushSync:We});return}else if(ht.matches)Ce=ht.matches,ne=Fl(Ce,q);else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],Ce))[0];if(qo(xt)&&(xt=await KS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(oe.has(V)){Ue(V,no(void 0));return}if(Xo(xt))if(I>yt){Ue(V,no(void 0));return}else{$.add(V),await Q($e,xt);return}if(Bn(xt)){Nt(V,H,xt.error);return}tt(!qo(xt),"Unhandled fetcher deferred data"),Ue(V,no(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:Ce,replace:De}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let We=H.response.headers.get("Location");tt(We,"Expected a Location header on the redirect Response"),We=Rw(We,new URL(V.url),c);let pe=bc(j.location,We,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(ev.test(We)){const ht=e.history.createURL(We);xt=ht.origin!==t.location.origin||el(ht.pathname,c)==null}if(xt){De?t.location.replace(We):t.location.assign(We);return}}A=null;let qe=De===!0?Ht.Replace:Ht.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!Ce&&ze&&$e&&yt&&(ne=Fw(j.navigation));let pt=ne||Ce;if(ED.has(H.response.status)&&pt&&Cr(pt.formMethod))await Z(qe,pe,{submission:Dt({},pt,{formAction:We}),preventScrollReset:R});else{let xt=Vm(pe,ne);await Z(qe,pe,{overrideNavigation:xt,fetcherSubmission:Ce,preventScrollReset:R})}}async function te(V,H,q,ne){try{let Ce=await MD(u,V,H,q,ne,o,s);return await Promise.all(Ce.map((De,We)=>{if(BD(De)){let pe=De.result;return{type:wt.redirect,response:FD(pe,H,q[We].route.id,ne,c,f.v7_relativeSplatPath)}}return zD(De)}))}catch(Ce){return q.map(()=>({type:wt.error,error:Ce}))}}async function be(V,H,q,ne,Ce){let[De,...We]=await Promise.all([q.length?te("loader",Ce,q,H):[],...ne.map(pe=>{if(pe.matches&&pe.match&&pe.controller){let qe=Ui(e.history,pe.path,pe.controller.signal);return te("loader",qe,[pe.match],pe.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:pe.path})})})]);return await Promise.all([zw(V,q,De,De.map(()=>Ce.signal),!1,j.loaderData),zw(V,ne.map(pe=>pe.match),We,ne.map(pe=>pe.controller?pe.controller.signal:null),!0)]),{loaderResults:De,fetcherResults:We}}function Ge(){S=!0,U.push(...Xs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Ae({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Nt(V,H,q,ne){ne===void 0&&(ne={});let Ce=fa(j.matches,H);Yt(V),Ae({errors:{[Ce.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function rr(V){return f.v7_fetcherPersist&&(ve.set(V,(ve.get(V)||0)+1),oe.has(V)&&oe.delete(V)),j.fetchers.get(V)||ND}function Yt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),oe.delete(V),j.fetchers.delete(V)}function hs(V){if(f.v7_fetcherPersist){let H=(ve.get(V)||0)-1;H<=0?(ve.delete(V),oe.add(V)):ve.set(V,H)}else Yt(V);Ae({fetchers:new Map(j.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function ms(V){for(let H of V){let q=rr(H),ne=no(q.data);j.fetchers.set(H,ne)}}function ps(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return ms(V),H}function sr(V){let H=[];for(let[q,ne]of X)if(ne0}function vu(V,H){let q=j.blockers.get(V)||kl;return Ie.get(V)!==H&&Ie.set(V,H),q}function xu(V){j.blockers.delete(V),Ie.delete(V)}function Ii(V,H){let q=j.blockers.get(V)||kl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Ae({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Ie.size===0)return;Ie.size>1&&mi(!1,"A router only supports one blocker at a time");let Ce=Array.from(Ie.entries()),[De,We]=Ce[Ce.length-1],pe=j.blockers.get(De);if(!(pe&&pe.state==="proceeding")&&We({currentLocation:H,nextLocation:q,historyAction:ne}))return De}function Mi(V){let H=xn(404,{pathname:V}),q=l||i,{matches:ne,route:Ce}=Mw(q);return Xs(),{notFoundMatches:ne,route:Ce,error:H}}function Wr(V,H){return{boundaryId:fa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Xs(V){let H=[];return ie.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),ie.delete(ne))}),H}function _P(V,H,q){if(x=V,w=H,p=q||null,!y&&j.navigation===Um){y=!0;let ne=f0(j.location,j.matches);ne!=null&&Ae({restoreScrollPosition:ne})}return()=>{x=null,w=null,p=null}}function d0(V,H){return p&&p(V,H.map(ne=>oD(ne,j.loaderData)))||V.key}function SP(V,H){if(x&&w){let q=d0(V,H);x[q]=w()}}function f0(V,H){if(x){let q=d0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function hm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:yd(H,q,c,!0)}}else return{active:!0,matches:yd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,Ce=ne.length>0?ne[ne.length-1].route:null;for(;;){let De=l==null,We=l||i;try{await OD(d,H,ne,We,o,s,xe,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{De&&(i=[...i])}if(q.aborted)return{type:"aborted"};let pe=Ko(We,H,c),qe=!1;if(pe){let $e=pe[pe.length-1].route;if($e.index)return{type:"success",matches:pe};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:pe}}let ze=yd(We,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?pe:null};if(ne=ze,Ce=ne[ne.length-1].route,Ce.path==="*")return{type:"success",matches:ne}}}function kP(V){o={},l=_c(V,s,void 0,o)}function CP(V,H){let q=l==null;BS(V,H,l||i,o,s),q&&(i=[...i],Ae({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Pe,subscribe:Me,enableScrollRestoration:_P,navigate:E,fetch:Y,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:rr,deleteFetcher:hs,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:CP,_internalFetchControllers:F,_internalActiveDeferreds:ie,_internalSetRoutes:kP},C}function RD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function fg(e,t,n,r,s,o,i,l){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=ih(s||".",oh(c,o),el(e.pathname,n)||e.pathname,l==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!tv(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ps([n,d.pathname])),pi(d)}function Ew(e,t,n,r){if(!r||!RD(r))return{path:n};if(r.formMethod&&!HD(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=WS(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Cr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,x)=>{let[p,w]=x;return""+m+p+"="+w+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Cr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=hg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=hg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Aw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Aw(c)}catch{return s()}let d={formMethod:i,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Cr(d.formMethod))return{path:n,submission:d};let f=Ws(n);return t&&f.search&&tv(f.search)&&c.append("index",""),f.search="?"+c,{path:pi(f),submission:d}}function AD(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Nw(e,t,n,r,s,o,i,l,c,u,d,f,h,m,x,p){let w=p?Bn(p[1])?p[1].error:p[1].data:void 0,y=e.createURL(t.location),v=e.createURL(s),b=p&&Bn(p[1])?p[0]:void 0,_=b?AD(n,b):n,C=p?p[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,O)=>{let{route:G}=A;if(G.lazy)return!0;if(G.loader==null)return!1;if(o)return typeof G.loader!="function"||G.loader.hydrate?!0:t.loaderData[G.id]===void 0&&(!t.errors||t.errors[G.id]===void 0);if(DD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return Tw(A,Dt({currentUrl:y,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:l||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||VS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let G=Ko(m,A.path,x);if(!G){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Fl(G,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=l:S=Tw(z,Dt({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:l})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:G,match:z,controller:new AbortController})}),[T,R]}function DD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function VS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Tw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function OD(e,t,n,r,s,o,i,l){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{l.aborted||BS(d,f,r,s,o)}}),i.set(c,u)),u&&VD(u)&&await u}finally{i.delete(c)}}function BS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let l=_c(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...l):i.children=l}else{let i=_c(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Pw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";mi(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!rD.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,Dt({},t(s),{lazy:void 0}))}function ID(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function MD(e,t,n,r,s,o,i,l){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return Dt({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?LD(t,n,f,o,i,x,l):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:l});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function LD(e,t,n,r,s,o,i){let l,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(m=>{f=m}),Pw(n.route,s,r)]);if(f!==void 0)throw f;l=h}else if(await Pw(n.route,s,r),d=n.route[e],d)l=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)l=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(l.result!==void 0,"You defined "+(e==="action"?"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(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function zD(e){let{result:t,type:n,status:r}=e;if(HS(t)){let i;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(l){return{type:wt.error,error:l}}return n===wt.error?{type:wt.error,error:new Jy(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ah(t)?t.status:r};if(WD(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function FD(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ev.test(i)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=fg(new URL(t.url),l,s,!0,i,o),e.headers.set("Location",i)}return e}function Rw(e,t,n){if(ev.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=el(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ui(e,t,n,r){let s=e.createURL(WS(t)).toString(),o={signal:n};if(r&&Cr(r.formMethod)){let{formMethod:i,formEncType:l}=r;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=hg(r.formData):o.body=r.formData}return new Request(s,o)}function hg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Aw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $D(e,t,n,r,s,o){let i={},l=null,c,u=!1,d={},f=r&&Bn(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!Xo(h),"Cannot handle redirect results in processLoaderData"),Bn(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),l=l||{};{let w=fa(e,x);l[w.route.id]==null&&(l[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ah(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else qo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(l={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:d}}function Dw(e,t,n,r,s,o,i,l){let{loaderData:c,errors:u}=$D(t,n,r,s,l);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Mw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",c='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Jy(e||500,l,new Error(c),!0)}function Lw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Xo(n))return{result:n,idx:t}}}function WS(e){let t=typeof e=="string"?Ws(e):e;return pi(Dt({},t,{hash:""}))}function UD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function VD(e){return typeof e=="object"&&e!=null&&"then"in e}function BD(e){return HS(e.result)&&jD.has(e.result.status)}function qo(e){return e.type===wt.deferred}function Bn(e){return e.type===wt.error}function Xo(e){return(e&&e.type)===wt.redirect}function WD(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function HS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function HD(e){return CD.has(e.toLowerCase())}function Cr(e){return SD.has(e.toLowerCase())}async function zw(e,t,n,r,s,o){for(let i=0;if.route.id===c.route.id),d=u!=null&&!VS(u,c)&&(o&&o[c.route.id])!==void 0;if(qo(l)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await KS(l,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function KS(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function tv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Fl(e,t){let n=typeof t=="string"?Ws(t).search:t.search;if(e[e.length-1].route.index&&tv(n||""))return e[e.length-1];let r=FS(e);return r[r.length-1]}function Fw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Vm(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 KD(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}}function Cl(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 YD(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}}function no(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 GD(e,t){try{let n=e.sessionStorage.getItem(US);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function ZD(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(US,JSON.stringify(n))}catch(r){mi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.25.1 * * Copyright (c) Remix Software Inc. @@ -57,7 +57,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Qd(){return Qd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=oh(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ps([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const BD=y.createContext(null);function WD(e){let t=y.useContext(Hs).outlet;return t&&y.createElement(BD.Provider,{value:e},t)}function KS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Fo),{matches:s}=y.useContext(Hs),{pathname:o}=Ur(),i=JSON.stringify(sh(s,r.v7_relativeSplatPath));return y.useMemo(()=>oh(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function HD(e,t,n,r){tl()||tt(!1);let{navigator:s}=y.useContext(Fo),{matches:o}=y.useContext(Hs),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Ur(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Ko(e,{pathname:h});return qD(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},l,p.params),pathname:Ps([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ps([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function KD(){let e=eO(),t=ih(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,null)}const YD=y.createElement(KD,null);class ZD extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Hs.Provider,{value:this.props.routeContext},y.createElement(WS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GD(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(ah);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Hs.Provider,{value:t},r)}function qD(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let m,x=!1,p=null,w=null;n&&(m=l&&f.route.id?l[f.route.id]:void 0,p=f.route.errorElement||YD,c&&(u<0&&h===0?(nO("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=y.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,y.createElement(GD,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(ZD,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var YS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(YS||{}),Jd=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}(Jd||{});function XD(e){let t=y.useContext(ah);return t||tt(!1),t}function QD(e){let t=y.useContext(BS);return t||tt(!1),t}function JD(e){let t=y.useContext(Hs);return t||tt(!1),t}function ZS(e){let t=JD(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function eO(){var e;let t=y.useContext(WS),n=QD(Jd.UseRouteError),r=ZS(Jd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function tO(){let{router:e}=XD(YS.UseNavigateStable),t=ZS(Jd.UseNavigateStable),n=y.useRef(!1);return HS(()=>{n.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Qd({fromRouteId:t},o)))},[e,t])}const Mw={};function nO(e,t,n){Mw[e]||(Mw[e]=!0)}function GS(e){let{to:t,replace:n,state:r,relative:s}=e;tl()||tt(!1);let{future:o,static:i}=y.useContext(Fo),{matches:l}=y.useContext(Hs),{pathname:c}=Ur(),u=tr(),d=oh(t,sh(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function rv(e){return WD(e.context)}function rO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:l}=e;tl()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:o,static:i,future:Qd({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof r=="string"&&(r=Ws(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=y.useMemo(()=>{let w=el(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:y.createElement(Fo.Provider,{value:u},y.createElement(nv.Provider,{children:n,value:p}))}new Promise(()=>{});function sO(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=ih(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ps([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const QD=g.createContext(null);function JD(e){let t=g.useContext(Hs).outlet;return t&&g.createElement(QD.Provider,{value:e},t)}function qS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Fo),{matches:s}=g.useContext(Hs),{pathname:o}=Ur(),i=JSON.stringify(oh(s,r.v7_relativeSplatPath));return g.useMemo(()=>ih(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function eO(e,t,n,r){tl()||tt(!1);let{navigator:s}=g.useContext(Fo),{matches:o}=g.useContext(Hs),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Ur(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Ko(e,{pathname:h});return oO(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},l,p.params),pathname:Ps([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ps([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function tO(){let e=cO(),t=ah(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const nO=g.createElement(tO,null);class rO extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(Hs.Provider,{value:this.props.routeContext},g.createElement(GS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sO(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(lh);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Hs.Provider,{value:t},r)}function oO(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let m,x=!1,p=null,w=null;n&&(m=l&&f.route.id?l[f.route.id]:void 0,p=f.route.errorElement||nO,c&&(u<0&&h===0?(dO("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,g.createElement(sO,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(rO,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var XS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(XS||{}),ef=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}(ef||{});function iO(e){let t=g.useContext(lh);return t||tt(!1),t}function aO(e){let t=g.useContext(YS);return t||tt(!1),t}function lO(e){let t=g.useContext(Hs);return t||tt(!1),t}function QS(e){let t=lO(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function cO(){var e;let t=g.useContext(GS),n=aO(ef.UseRouteError),r=QS(ef.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function uO(){let{router:e}=iO(XS.UseNavigateStable),t=QS(ef.UseNavigateStable),n=g.useRef(!1);return ZS(()=>{n.current=!0}),g.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Jd({fromRouteId:t},o)))},[e,t])}const $w={};function dO(e,t,n){$w[e]||($w[e]=!0)}function JS(e){let{to:t,replace:n,state:r,relative:s}=e;tl()||tt(!1);let{future:o,static:i}=g.useContext(Fo),{matches:l}=g.useContext(Hs),{pathname:c}=Ur(),u=tr(),d=ih(t,oh(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function rv(e){return JD(e.context)}function fO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ht.Pop,navigator:o,static:i=!1,future:l}=e;tl()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:o,static:i,future:Jd({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof r=="string"&&(r=Ws(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=g.useMemo(()=>{let w=el(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:g.createElement(Fo.Provider,{value:u},g.createElement(nv.Provider,{children:n,value:p}))}new Promise(()=>{});function hO(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.25.1 * * Copyright (c) Remix Software Inc. @@ -66,47 +66,47 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function iO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aO(e,t){return e.button===0&&(!t||t==="_self")&&!iO(e)}function mg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||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(s=>[n,s]):[[n,r]])},[]))}function lO(e,t){let n=mg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const cO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],uO="6";try{window.__reactRouterVersion=uO}catch{}function dO(e,t){return bD({basename:void 0,future:Sc({},void 0,{v7_prependBasename:!0}),history:HA({window:void 0}),hydrationData:fO(),routes:e,mapRouteProperties:sO,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function fO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sc({},t,{errors:hO(t.errors)})),t}function hO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Jy(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const mO=y.createContext({isTransitioning:!1}),pO=y.createContext(new Map),gO="startTransition",Lw=T_[gO],yO="flushSync",zw=WA[yO];function vO(e){Lw?Lw(e):e()}function jl(e){zw?zw(e):e()}class xO{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function wO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=y.useState(n.state),[i,l]=y.useState(),[c,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[h,m]=y.useState(),[x,p]=y.useState(),w=y.useRef(new Map),{v7_startTransition:g}=r||{},v=y.useCallback(R=>{g?vO(R):R()},[g]),b=y.useCallback((R,A)=>{let{deletedFetchers:O,unstable_flushSync:Z,unstable_viewTransitionOpts:N}=A;O.forEach(S=>w.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){Z?jl(()=>o(R)):v(()=>o(R));return}if(Z){jl(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{jl(()=>o(R))});S.finished.finally(()=>{jl(()=>{f(void 0),m(void 0),l(void 0),u({isTransitioning:!1})})}),jl(()=>m(S));return}h?(d&&d.resolve(),h.skipTransition(),p({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(l(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,v]);y.useLayoutEffect(()=>n.subscribe(b),[n,b]),y.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new xO)},[c]),y.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,O=n.window.document.startViewTransition(async()=>{v(()=>o(R)),await A});O.finished.finally(()=>{f(void 0),m(void 0),l(void 0),u({isTransitioning:!1})}),m(O)}},[v,i,d,n.window]),y.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),y.useEffect(()=>{!c.isTransitioning&&x&&(l(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),p(void 0))},[c.isTransitioning,x]),y.useEffect(()=>{},[]);let _=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,O)=>n.navigate(R,{state:A,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,A,O)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",j=y.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(ah.Provider,{value:j},y.createElement(BS.Provider,{value:s},y.createElement(pO.Provider,{value:w.current},y.createElement(mO.Provider,{value:c},y.createElement(rO,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?y.createElement(bO,{routes:n.routes,future:n.future,state:s}):t))))),null)}const bO=y.memo(_O);function _O(e){let{routes:t,future:n,state:r}=e;return HD(t,void 0,r,n)}const SO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=oO(t,cO),{basename:m}=y.useContext(Fo),x,p=!1;if(typeof u=="string"&&kO.test(u)&&(x=u,SO))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=el(_.pathname,m);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:p=!0}catch{}let w=UD(u,{relative:s}),g=CO(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||g(b)}return y.createElement("a",Sc({},h,{href:x||w,onClick:p||o?r:v,ref:n,target:c}))});var Fw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fw||(Fw={}));var $w;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($w||($w={}));function CO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=tr(),u=Ur(),d=KS(e,{relative:i});return y.useCallback(f=>{if(aO(f,n)){f.preventDefault();let h=r!==void 0?r:pi(u)===pi(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l})}},[u,c,d,r,s,n,e,o,i,l])}function jO(e){let t=y.useRef(mg(e)),n=y.useRef(!1),r=Ur(),s=y.useMemo(()=>lO(r.search,n.current?null:t.current),[r.search]),o=tr(),i=y.useCallback((l,c)=>{const u=mg(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var EO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const NO=Uf(EO);var TO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Uw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(NO[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(TO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),l=[i,""];i.indexOf("=")>-1&&(l=i.split("=")),t.attrs[l[0]]=l[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var PO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,RO=/^\s*$/,AO=Object.create(null);function qS(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(qS,"")+"";case"comment":return e+""}}var DO={parse:function(e,t){t||(t={}),t.components||(t.components=AO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var l=e.indexOf("<");r.push({type:"text",content:l===-1?e:e.substring(0,l)})}return e.replace(PO,function(c,u){if(i){if(c!=="")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(zO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),l=[i,""];i.indexOf("=")>-1&&(l=i.split("=")),t.attrs[l[0]]=l[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var FO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,$O=/^\s*$/,UO=Object.create(null);function ek(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(ek,"")+"";case"comment":return e+""}}var VO={parse:function(e,t){t||(t={}),t.components||(t.components=UO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var l=e.indexOf("<");r.push({type:"text",content:l===-1?e:e.substring(0,l)})}return e.replace(FO,function(c,u){if(i){if(c!=="")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("