@decocms/mesh 1.0.0-alpha.29 → 1.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{alert-dialog-C2AXRAdI.js → alert-dialog-lT7fjsnS.js} +1 -1
- package/dist/client/assets/{auth-BjEJS-ti.js → auth-B4DV4YJb.js} +1 -1
- package/dist/client/assets/{auth-catchall-BRoDHrkX.js → auth-catchall-BXXli3-E.js} +1 -1
- package/dist/client/assets/{avatar-CCRBpJ2S.js → avatar-DrbrX3Fb.js} +1 -1
- package/dist/client/assets/{badge-DVddOuDf.js → badge-Sw-5Fjm_.js} +1 -1
- package/dist/client/assets/{button-BKI-GQNs.js → button-De8TtfIc.js} +1 -1
- package/dist/client/assets/{card-CQxotwMu.js → card-Clgs1Ler.js} +1 -1
- package/dist/client/assets/{checkbox-DXOKpcZ0.js → checkbox-BZTG8MjG.js} +1 -1
- package/dist/client/assets/{circle-alert-CI4aNANz.js → circle-alert-Bo6PdNJA.js} +1 -1
- package/dist/client/assets/{collection-detail-CHNCFwGn.js → collection-detail-bCm7IhzQ.js} +1 -1
- package/dist/client/assets/{collection-display-button-DiJzMYDw.js → collection-display-button-CANVxM78.js} +1 -1
- package/dist/client/assets/{collection-header-B74HL_BQ.js → collection-header-DWpT3ZvE.js} +1 -1
- package/dist/client/assets/{collection-page-Gju8NROn.js → collection-page-BDYpmZx2.js} +1 -1
- package/dist/client/assets/{collection-search-5_31uFQu.js → collection-search-7dvS8CPU.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cexc-Pdz.js → collection-table-wrapper-DFImlrAn.js} +1 -1
- package/dist/client/assets/{connection-card-FqjC5vzz.js → connection-card-Dgd2qOAx.js} +1 -1
- package/dist/client/assets/{connection-detail-DlM4urTK.js → connection-detail-B5XIo4jJ.js} +1 -1
- package/dist/client/assets/{connections-Bfcj96aB.js → connections-DgVq2Zi4.js} +1 -1
- package/dist/client/assets/{core-DK4y5D2y.js → core-6UZH86ZU.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CtVmaemS.js → create-organization-dialog-DpintAfW.js} +1 -1
- package/dist/client/assets/{dialog-CcAczAty.js → dialog-CcWkQ3-q.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CtyYPfMS.js → dropdown-menu-BMBTO1aI.js} +1 -1
- package/dist/client/assets/{empty-state-BdQaURkL.js → empty-state-WuOT2hFn.js} +1 -1
- package/dist/client/assets/{error-boundary-BqkazxGZ.js → error-boundary-Sj1-czrQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BmRyJSV5.js → extract-connection-data-q7cQAIMM.js} +1 -1
- package/dist/client/assets/{form-BCzESr64.js → form-CTTDgzck.js} +1 -1
- package/dist/client/assets/{gateway-detail-rUxOHblZ.js → gateway-detail-DrTM5RUx.js} +1 -1
- package/dist/client/assets/{gateways-BYaK85gs.js → gateways-C0TCQRt5.js} +1 -1
- package/dist/client/assets/{home-BwRicK_C.js → home-Dy-_EeTf.js} +1 -1
- package/dist/client/assets/{icon-BH0uQy8Q.js → icon-Dk9j-Z4d.js} +1 -1
- package/dist/client/assets/{index-mSyA_igj.js → index-BSuuYE7a.js} +1 -1
- package/dist/client/assets/index-DIXLDBVl.js +118 -0
- package/dist/client/assets/{index-BZMMgVHQ.js → index-Dss36SHE.js} +1 -1
- package/dist/client/assets/{index-DDv8XLKp.js → index-GY3GXADp.js} +1 -1
- package/dist/client/assets/{input-DQSvL_aO.js → input-ByJBGfq3.js} +1 -1
- package/dist/client/assets/json-B2EH3aa6.js +1 -0
- package/dist/client/assets/{layout-tP8VoWYn.js → layout-DRBUzMK7.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-D1A1Guv4.js → lazy-highlighter-BZ3JTPPT.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DCgXaWMK.js → localstorage-keys-CrXjwcSZ.js} +1 -1
- package/dist/client/assets/{login-DBR5FdH6.js → login-baVguqcM.js} +1 -1
- package/dist/client/assets/{mcp-oauth-v_MhlTn1.js → mcp-oauth-Chn8Vl6o.js} +1 -1
- package/dist/client/assets/{members-Bhg2_ZSs.js → members-BL6-e_ID.js} +1 -1
- package/dist/client/assets/{monitoring-DAnTyFbi.js → monitoring-DSGI33MK.js} +1 -1
- package/dist/client/assets/{oauth-callback-K0vVKfJt.js → oauth-callback-BxWJgxm-.js} +1 -1
- package/dist/client/assets/{page-D0nieAd7.js → page-D0r-m9VX.js} +1 -1
- package/dist/client/assets/{popover-tnkyq1hU.js → popover-C_H6Z3YS.js} +1 -1
- package/dist/client/assets/prism-light-CKU-zSUS.js +1 -0
- package/dist/client/assets/{resource-tabs-C38lAnf7.js → resource-tabs-Dptn276z.js} +1 -1
- package/dist/client/assets/{schema-C7-hKK0j.js → schema-iWDGcZfv.js} +1 -1
- package/dist/client/assets/{select-8hQIWu_F.js → select-KKeuY_8A.js} +1 -1
- package/dist/client/assets/{settings-BENyycRE.js → settings-DOQRUeGN.js} +1 -1
- package/dist/client/assets/{shell-layout-DwQEFltw.js → shell-layout-DxFvs5RE.js} +3 -3
- package/dist/client/assets/{spinner-B_7PKdEi.js → spinner-C5mTiECQ.js} +1 -1
- package/dist/client/assets/{store-CdN9wtZc.js → store-BsHJOv3r.js} +1 -1
- package/dist/client/assets/{store-app-detail-AyYeHK1f.js → store-app-detail-D8K1UJ66.js} +1 -1
- package/dist/client/assets/{switch-C9-Lpl_K.js → switch-BN3gNP3v.js} +1 -1
- package/dist/client/assets/{textarea-CRdkZ0U2.js → textarea-DYrEFGVo.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CFgzaLQt.js → tool-set-selector-BU0xXwDF.js} +1 -1
- package/dist/client/assets/{tooltip-B5bMdg-c.js → tooltip-ZzCYSPeH.js} +1 -1
- package/dist/client/assets/{types-kRP4yG2G.js → types-DndJPAWa.js} +3 -3
- package/dist/client/assets/{upload-DyNO--Od.js → upload-CsXE0eHm.js} +1 -1
- package/dist/client/assets/{use-binding-n0fop-6Q.js → use-binding-CIVQUW9t.js} +1 -1
- package/dist/client/assets/{use-connection-DFfxu6G-.js → use-connection-CgusccPZ.js} +1 -1
- package/dist/client/assets/{use-gateway-BbEXVBzn.js → use-gateway-iwW9W997.js} +1 -1
- package/dist/client/assets/{use-list-state-ByAtqeJl.js → use-list-state-B2svGg01.js} +1 -1
- package/dist/client/assets/{use-mcp-DfzSXo3r.js → use-mcp-ByPLvFZj.js} +1 -1
- package/dist/client/assets/{use-members-B2rKjk7L.js → use-members-dzf6tzsH.js} +1 -1
- package/dist/client/assets/{use-mobile-DvP3RV8-.js → use-mobile-BqnROvZt.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CX0knSqQ.js → use-organization-settings-DYa2j-qu.js} +1 -1
- package/dist/client/assets/{use-tool-call-Ck95V-cD.js → use-tool-call-CFjw03Kh.js} +1 -1
- package/dist/client/assets/useQuery-B5H-PpIX.js +1 -0
- package/dist/client/assets/utils-Ny57I_y6.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/index-B__VUTR3.js +0 -118
- package/dist/client/assets/json-Br4edP4H.js +0 -1
- package/dist/client/assets/prism-light-gejq_KnN.js +0 -1
- package/dist/client/assets/useQuery-DSEkiaNM.js +0 -1
- package/dist/client/assets/utils-wGs-tBy0.js +0 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-baVguqcM.js","assets/button-De8TtfIc.js","assets/utils-Ny57I_y6.js","assets/input-ByJBGfq3.js","assets/shell-layout-DxFvs5RE.js","assets/empty-state-WuOT2hFn.js","assets/use-connection-CgusccPZ.js","assets/icon-Dk9j-Z4d.js","assets/tooltip-ZzCYSPeH.js","assets/use-gateway-iwW9W997.js","assets/use-binding-CIVQUW9t.js","assets/auth-B4DV4YJb.js","assets/localstorage-keys-CrXjwcSZ.js","assets/useQuery-B5H-PpIX.js","assets/select-KKeuY_8A.js","assets/use-mobile-BqnROvZt.js","assets/textarea-DYrEFGVo.js","assets/connection-card-Dgd2qOAx.js","assets/card-Clgs1Ler.js","assets/error-boundary-Sj1-czrQ.js","assets/dialog-CcWkQ3-q.js","assets/use-organization-settings-DYa2j-qu.js","assets/create-organization-dialog-DpintAfW.js","assets/alert-dialog-lT7fjsnS.js","assets/form-CTTDgzck.js","assets/spinner-C5mTiECQ.js","assets/popover-C_H6Z3YS.js","assets/avatar-DrbrX3Fb.js","assets/dropdown-menu-BMBTO1aI.js","assets/home-Dy-_EeTf.js","assets/page-D0r-m9VX.js","assets/collection-header-DWpT3ZvE.js","assets/collection-display-button-CANVxM78.js","assets/collection-page-BDYpmZx2.js","assets/use-tool-call-CFjw03Kh.js","assets/types-DndJPAWa.js","assets/index-Dss36SHE.js","assets/badge-Sw-5Fjm_.js","assets/page-BZV40eAE.css","assets/members-BL6-e_ID.js","assets/collection-search-7dvS8CPU.js","assets/collection-table-wrapper-DFImlrAn.js","assets/tool-set-selector-BU0xXwDF.js","assets/checkbox-BZTG8MjG.js","assets/use-members-dzf6tzsH.js","assets/well-known-mcp-Dg77mwx9.js","assets/switch-BN3gNP3v.js","assets/connections-DgVq2Zi4.js","assets/schema-iWDGcZfv.js","assets/use-list-state-B2svGg01.js","assets/generate-id-Dyweu44Y.js","assets/settings-DOQRUeGN.js","assets/upload-CsXE0eHm.js","assets/monitoring-DSGI33MK.js","assets/index-GY3GXADp.js","assets/store-BsHJOv3r.js","assets/slugify-CEUa2lfQ.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-D8K1UJ66.js","assets/resource-tabs-Dptn276z.js","assets/layout-DRBUzMK7.js","assets/resource-tabs-CSRUKxnt.css","assets/use-mcp-ByPLvFZj.js","assets/extract-connection-data-q7cQAIMM.js","assets/connection-detail-B5XIo4jJ.js","assets/index-BSuuYE7a.js","assets/mcp-oauth-Chn8Vl6o.js","assets/formatDistanceToNow-Ctx6mZEP.js","assets/collection-detail-bCm7IhzQ.js","assets/circle-alert-Bo6PdNJA.js","assets/gateways-C0TCQRt5.js","assets/gateway-detail-DrTM5RUx.js","assets/oauth-callback-BxWJgxm-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function fC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const hC="modulepreload",pC=function(e){return"/"+e},g_={},Dn=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=u(n.map(h=>{if(h=pC(h),h in g_)return;g_[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":hC,g||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),g)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var IB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function No(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Vl={};var v_;function mC(){if(v_)return Vl;v_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return Vl.Fragment=t,Vl.jsx=n,Vl.jsxs=n,Vl}var y_;function gC(){return y_||(y_=1,rm.exports=mC()),rm.exports}var b=gC(),am={exports:{}},Fl={},im={exports:{}},om={};var b_;function vC(){return b_||(b_=1,(function(e){function t(P,V){var $=P.length;P.push(V);e:for(;0<$;){var re=$-1>>>1,ve=P[re];if(0<o(ve,V))P[re]=V,P[$]=ve,$=re;else break e}}function n(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var V=P[0],$=P.pop();if($!==V){P[0]=$;e:for(var re=0,ve=P.length,k=ve>>>1;re<k;){var Z=2*(re+1)-1,ee=P[Z],oe=Z+1,pe=P[oe];if(0>o(ee,$))oe<ve&&0>o(pe,ee)?(P[re]=pe,P[oe]=$,re=oe):(P[re]=ee,P[Z]=$,re=Z);else if(oe<ve&&0>o(pe,$))P[re]=pe,P[oe]=$,re=oe;else break e}}return V}function o(P,V){var $=P.sortIndex-V.sortIndex;return $!==0?$:P.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var V=n(h);V!==null;){if(V.callback===null)a(h);else if(V.startTime<=P)a(h),V.sortIndex=V.expirationTime,t(f,V);else break;V=n(h)}}function I(P){if(w=!1,O(P),!S)if(n(f)!==null)S=!0,L||(L=!0,W());else{var V=n(h);V!==null&&ie(I,V.startTime-P)}}var L=!1,N=-1,D=5,U=-1;function Q(){return T?!0:!(e.unstable_now()-U<D)}function G(){if(T=!1,L){var P=e.unstable_now();U=P;var V=!0;try{e:{S=!1,w&&(w=!1,A(N),N=-1),_=!0;var $=y;try{t:{for(O(P),p=n(f);p!==null&&!(p.expirationTime>P&&Q());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ve=re(p.expirationTime<=P);if(P=e.unstable_now(),typeof ve=="function"){p.callback=ve,O(P),V=!0;break t}p===n(f)&&a(f),O(P)}else a(f);p=n(f)}if(p!==null)V=!0;else{var k=n(h);k!==null&&ie(I,k.startTime-P),V=!1}}break e}finally{p=null,y=$,_=!1}V=void 0}}finally{V?W():L=!1}}}var W;if(typeof C=="function")W=function(){C(G)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,ne=j.port2;j.port1.onmessage=G,W=function(){ne.postMessage(null)}}else W=function(){R(G,0)};function ie(P,V){N=R(function(){P(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var V=3;break;default:V=y}var $=y;y=V;try{return P()}finally{y=$}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(P,V){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var $=y;y=P;try{return V()}finally{y=$}},e.unstable_scheduleCallback=function(P,V,$){var re=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?re+$:re):$=re,P){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=$+ve,P={id:g++,callback:V,priorityLevel:P,startTime:$,expirationTime:ve,sortIndex:-1},$>re?(P.sortIndex=$,t(h,P),n(f)===null&&P===n(h)&&(w?(A(N),N=-1):w=!0,ie(I,$-re))):(P.sortIndex=ve,t(f,P),S||_||(S=!0,L||(L=!0,W()))),P},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(P){var V=y;return function(){var $=y;y=V;try{return P.apply(this,arguments)}finally{y=$}}}})(om)),om}var __;function yC(){return __||(__=1,im.exports=vC()),im.exports}var sm={exports:{}},Ge={};var E_;function bC(){if(E_)return Ge;E_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function R(k,Z,ee){this.props=k,this.context=Z,this.refs=T,this.updater=ee||S}R.prototype.isReactComponent={},R.prototype.setState=function(k,Z){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,Z,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(k,Z,ee){this.props=k,this.context=Z,this.refs=T,this.updater=ee||S}var O=C.prototype=new A;O.constructor=C,w(O,R.prototype),O.isPureReactComponent=!0;var I=Array.isArray;function L(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(k,Z,ee){var oe=ee.ref;return{$$typeof:e,type:k,key:Z,ref:oe!==void 0?oe:null,props:ee}}function Q(k,Z){return U(k.type,Z,k.props)}function G(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function W(k){var Z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return Z[ee]})}var j=/\/+/g;function ne(k,Z){return typeof k=="object"&&k!==null&&k.key!=null?W(""+k.key):Z.toString(36)}function ie(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(Z){k.status==="pending"&&(k.status="fulfilled",k.value=Z)},function(Z){k.status==="pending"&&(k.status="rejected",k.reason=Z)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function P(k,Z,ee,oe,pe){var be=typeof k;(be==="undefined"||be==="boolean")&&(k=null);var ye=!1;if(k===null)ye=!0;else switch(be){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(k.$$typeof){case e:case t:ye=!0;break;case g:return ye=k._init,P(ye(k._payload),Z,ee,oe,pe)}}if(ye)return pe=pe(k),ye=oe===""?"."+ne(k,0):oe,I(pe)?(ee="",ye!=null&&(ee=ye.replace(j,"$&/")+"/"),P(pe,Z,ee,"",function(ke){return ke})):pe!=null&&(G(pe)&&(pe=Q(pe,ee+(pe.key==null||k&&k.key===pe.key?"":(""+pe.key).replace(j,"$&/")+"/")+ye)),Z.push(pe)),1;ye=0;var Se=oe===""?".":oe+":";if(I(k))for(var Pe=0;Pe<k.length;Pe++)oe=k[Pe],be=Se+ne(oe,Pe),ye+=P(oe,Z,ee,be,pe);else if(Pe=_(k),typeof Pe=="function")for(k=Pe.call(k),Pe=0;!(oe=k.next()).done;)oe=oe.value,be=Se+ne(oe,Pe++),ye+=P(oe,Z,ee,be,pe);else if(be==="object"){if(typeof k.then=="function")return P(ie(k),Z,ee,oe,pe);throw Z=String(k),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ye}function V(k,Z,ee){if(k==null)return k;var oe=[],pe=0;return P(k,oe,"","",function(be){return Z.call(ee,be,pe++)}),oe}function $(k){if(k._status===-1){var Z=k._result;Z=Z(),Z.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=Z)}if(k._status===1)return k._result.default;throw k._result}var re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ve={map:V,forEach:function(k,Z,ee){V(k,function(){Z.apply(this,arguments)},ee)},count:function(k){var Z=0;return V(k,function(){Z++}),Z},toArray:function(k){return V(k,function(Z){return Z})||[]},only:function(k){if(!G(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ge.Activity=p,Ge.Children=ve,Ge.Component=R,Ge.Fragment=n,Ge.Profiler=o,Ge.PureComponent=C,Ge.StrictMode=a,Ge.Suspense=f,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(k){return N.H.useMemoCache(k)}},Ge.cache=function(k){return function(){return k.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(k,Z,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var oe=w({},k.props),pe=k.key;if(Z!=null)for(be in Z.key!==void 0&&(pe=""+Z.key),Z)!D.call(Z,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&Z.ref===void 0||(oe[be]=Z[be]);var be=arguments.length-2;if(be===1)oe.children=ee;else if(1<be){for(var ye=Array(be),Se=0;Se<be;Se++)ye[Se]=arguments[Se+2];oe.children=ye}return U(k.type,pe,oe)},Ge.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},Ge.createElement=function(k,Z,ee){var oe,pe={},be=null;if(Z!=null)for(oe in Z.key!==void 0&&(be=""+Z.key),Z)D.call(Z,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(pe[oe]=Z[oe]);var ye=arguments.length-2;if(ye===1)pe.children=ee;else if(1<ye){for(var Se=Array(ye),Pe=0;Pe<ye;Pe++)Se[Pe]=arguments[Pe+2];pe.children=Se}if(k&&k.defaultProps)for(oe in ye=k.defaultProps,ye)pe[oe]===void 0&&(pe[oe]=ye[oe]);return U(k,be,pe)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(k){return{$$typeof:d,render:k}},Ge.isValidElement=G,Ge.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:$}},Ge.memo=function(k,Z){return{$$typeof:h,type:k,compare:Z===void 0?null:Z}},Ge.startTransition=function(k){var Z=N.T,ee={};N.T=ee;try{var oe=k(),pe=N.S;pe!==null&&pe(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,re)}catch(be){re(be)}finally{Z!==null&&ee.types!==null&&(Z.types=ee.types),N.T=Z}},Ge.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ge.use=function(k){return N.H.use(k)},Ge.useActionState=function(k,Z,ee){return N.H.useActionState(k,Z,ee)},Ge.useCallback=function(k,Z){return N.H.useCallback(k,Z)},Ge.useContext=function(k){return N.H.useContext(k)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(k,Z){return N.H.useDeferredValue(k,Z)},Ge.useEffect=function(k,Z){return N.H.useEffect(k,Z)},Ge.useEffectEvent=function(k){return N.H.useEffectEvent(k)},Ge.useId=function(){return N.H.useId()},Ge.useImperativeHandle=function(k,Z,ee){return N.H.useImperativeHandle(k,Z,ee)},Ge.useInsertionEffect=function(k,Z){return N.H.useInsertionEffect(k,Z)},Ge.useLayoutEffect=function(k,Z){return N.H.useLayoutEffect(k,Z)},Ge.useMemo=function(k,Z){return N.H.useMemo(k,Z)},Ge.useOptimistic=function(k,Z){return N.H.useOptimistic(k,Z)},Ge.useReducer=function(k,Z,ee){return N.H.useReducer(k,Z,ee)},Ge.useRef=function(k){return N.H.useRef(k)},Ge.useState=function(k){return N.H.useState(k)},Ge.useSyncExternalStore=function(k,Z,ee){return N.H.useSyncExternalStore(k,Z,ee)},Ge.useTransition=function(){return N.H.useTransition()},Ge.version="19.2.3",Ge}var S_;function $i(){return S_||(S_=1,sm.exports=bC()),sm.exports}var lm={exports:{}},In={};var w_;function _C(){if(w_)return In;w_=1;var e=$i();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return In.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,In.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,g)},In.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},In.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},In.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},In.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&a.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},In.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},In.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},In.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},In.requestFormReset=function(f){a.d.r(f)},In.unstable_batchedUpdates=function(f,h){return f(h)},In.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},In.useFormStatus=function(){return u.H.useHostTransitionStatus()},In.version="19.2.3",In}var x_;function dw(){if(x_)return lm.exports;x_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lm.exports=_C(),lm.exports}var R_;function EC(){if(R_)return Fl;R_=1;var e=yC(),t=$i(),n=dw();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===c)return f(m),i;v=v.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=v;else{for(var x=!1,M=m.child;M;){if(M===s){x=!0,s=m,c=v;break}if(M===c){x=!0,c=m,s=v;break}M=M.sibling}if(!x){for(M=v.child;M;){if(M===s){x=!0,s=v,c=m;break}if(M===c){x=!0,c=v,s=m;break}M=M.sibling}if(!x)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function W(r){return r===null||typeof r!="object"?null:(r=G&&r[G]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function ne(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return i=r.displayName||null,i!==null?i:ne(r.type)||"Memo";case D:i=r._payload,r=r._init;try{return ne(r(i))}catch{}}return null}var ie=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},re=[],ve=-1;function k(r){return{current:r}}function Z(r){0>ve||(r.current=re[ve],re[ve]=null,ve--)}function ee(r,i){ve++,re[ve]=r.current,r.current=i}var oe=k(null),pe=k(null),be=k(null),ye=k(null);function Se(r,i){switch(ee(be,i),ee(pe,r),ee(oe,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Bb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Bb(i),r=zb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Z(oe),ee(oe,r)}function Pe(){Z(oe),Z(pe),Z(be)}function ke(r){r.memoizedState!==null&&ee(ye,r);var i=oe.current,s=zb(i,r.type);i!==s&&(ee(pe,r),ee(oe,s))}function Ee(r){pe.current===r&&(Z(oe),Z(pe)),ye.current===r&&(Z(ye),jl._currentValue=$)}var ze,Pt;function ge(r){if(ze===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);ze=i&&i[1]||"",Pt=-1<s.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+ze+r+Pt}var me=!1;function Re(r,i){if(!r||me)return"";me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var te=ae}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(ae){te=ae}r.call(ue.prototype)}}else{try{throw Error()}catch(ae){te=ae}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),x=v[0],M=v[1];if(x&&M){var z=x.split(`
|
|
5
|
+
`),J=M.split(`
|
|
6
|
+
`);for(m=c=0;c<z.length&&!z[c].includes("DetermineComponentFrameRoot");)c++;for(;m<J.length&&!J[m].includes("DetermineComponentFrameRoot");)m++;if(c===z.length||m===J.length)for(c=z.length-1,m=J.length-1;1<=c&&0<=m&&z[c]!==J[m];)m--;for(;1<=c&&0<=m;c--,m--)if(z[c]!==J[m]){if(c!==1||m!==1)do if(c--,m--,0>m||z[c]!==J[m]){var se=`
|
|
7
|
+
`+z[c].replace(" at new "," at ");return r.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",r.displayName)),se}while(1<=c&&0<=m);break}}}finally{me=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?ge(s):""}function Ue(r,i){switch(r.tag){case 26:case 27:case 5:return ge(r.type);case 16:return ge("Lazy");case 13:return r.child!==i&&i!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Re(r.type,!1);case 11:return Re(r.type.render,!1);case 1:return Re(r.type,!0);case 31:return ge("Activity");default:return""}}function it(r){try{var i="",s=null;do i+=Ue(r,s),s=r,r=r.return;while(r);return i}catch(c){return`
|
|
8
|
+
Error generating stack: `+c.message+`
|
|
9
|
+
`+c.stack}}var He=Object.prototype.hasOwnProperty,tt=e.unstable_scheduleCallback,B=e.unstable_cancelCallback,q=e.unstable_shouldYield,Y=e.unstable_requestPaint,ce=e.unstable_now,he=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,$e=e.unstable_NormalPriority,nt=e.unstable_LowPriority,Tt=e.unstable_IdlePriority,nr=e.log,Mt=e.unstable_setDisableYieldValue,Kt=null,It=null;function sn(r){if(typeof nr=="function"&&Mt(r),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(Kt,r)}catch{}}var Wt=Math.clz32?Math.clz32:Ie,ei=Math.log,Ra=Math.LN2;function Ie(r){return r>>>=0,r===0?32:31-(ei(r)/Ra|0)|0}var ot=256,dt=262144,Qe=4194304;function ht(r){var i=r&42;if(i!==0)return i;switch(r&-r){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ne(r,i,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,v=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var M=c&134217727;return M!==0?(c=M&~v,c!==0?m=ht(c):(x&=M,x!==0?m=ht(x):s||(s=M&~r,s!==0&&(m=ht(s))))):(M=c&~v,M!==0?m=ht(M):x!==0?m=ht(x):s||(s=c&~r,s!==0&&(m=ht(s)))),m===0?0:i!==0&&i!==m&&(i&v)===0&&(v=m&-m,s=i&-i,v>=s||v===32&&(s&4194048)!==0)?i:m}function Xe(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function At(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32: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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function St(){var r=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),r}function Mn(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function pt(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Nt(r,i,s,c,m,v){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var M=r.entanglements,z=r.expirationTimes,J=r.hiddenUpdates;for(s=x&~s;0<s;){var se=31-Wt(s),ue=1<<se;M[se]=0,z[se]=-1;var te=J[se];if(te!==null)for(J[se]=null,se=0;se<te.length;se++){var ae=te[se];ae!==null&&(ae.lane&=-536870913)}s&=~ue}c!==0&&_r(r,c,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(x&~i))}function _r(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-Wt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function En(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var c=31-Wt(s),m=1<<c;m&i|r[c]&i&&(r[c]|=i),s&=~m}}function Vn(r,i){var s=i&-i;return s=(s&42)!==0?1:ko(s),(s&(r.suspendedLanes|i))!==0?0:s}function ko(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Yf(){var r=V.p;return r!==0?r:(r=window.event,r===void 0?32:c_(r.type))}function R0(r,i){var s=V.p;try{return V.p=r,i()}finally{V.p=s}}var ti=Math.random().toString(36).slice(2),Sn="__reactFiber$"+ti,Fn="__reactProps$"+ti,jo="__reactContainer$"+ti,Kf="__reactEvents$"+ti,tT="__reactListeners$"+ti,nT="__reactHandles$"+ti,O0="__reactResources$"+ti,Xs="__reactMarker$"+ti;function Wf(r){delete r[Sn],delete r[Fn],delete r[Kf],delete r[tT],delete r[nT]}function Uo(r){var i=r[Sn];if(i)return i;for(var s=r.parentNode;s;){if(i=s[jo]||s[Sn]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=Yb(r);r!==null;){if(s=r[Sn])return s;r=Yb(r)}return i}r=s,s=r.parentNode}return null}function Bo(r){if(r=r[Sn]||r[jo]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Js(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function zo(r){var i=r[O0];return i||(i=r[O0]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function pn(r){r[Xs]=!0}var T0=new Set,A0={};function qi(r,i){Vo(r,i),Vo(r+"Capture",i)}function Vo(r,i){for(A0[r]=i,r=0;r<i.length;r++)T0.add(i[r])}var rT=RegExp("^[: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]*$"),C0={},M0={};function aT(r){return He.call(M0,r)?!0:He.call(C0,r)?!1:rT.test(r)?M0[r]=!0:(C0[r]=!0,!1)}function zc(r,i,s){if(aT(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function Vc(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Oa(r,i,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+c)}}function Er(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function I0(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function iT(r,i,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,v=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,v.call(this,x)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Zf(r){if(!r._valueTracker){var i=I0(r)?"checked":"value";r._valueTracker=iT(r,i,""+r[i])}}function N0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=I0(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function Fc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var oT=/[\n"\\]/g;function Sr(r){return r.replace(oT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Qf(r,i,s,c,m,v,x,M){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),i!=null?x==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Er(i)):r.value!==""+Er(i)&&(r.value=""+Er(i)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),i!=null?Xf(r,x,Er(i)):s!=null?Xf(r,x,Er(s)):c!=null&&r.removeAttribute("value"),m==null&&v!=null&&(r.defaultChecked=!!v),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+Er(M):r.removeAttribute("name")}function D0(r,i,s,c,m,v,x,M){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Zf(r);return}s=s!=null?""+Er(s):"",i=i!=null?""+Er(i):s,M||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=M?r.checked:!!c,r.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),Zf(r)}function Xf(r,i,s){i==="number"&&Fc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Fo(r,i,s,c){if(r=r.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=i.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Er(s),i=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function L0(r,i,s){if(i!=null&&(i=""+Er(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Er(s):""}function P0(r,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(ie(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Er(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),Zf(r)}function Ho(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var sT=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function k0(r,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,s):typeof s!="number"||s===0||sT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function j0(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&k0(r,m,c)}else for(var v in i)i.hasOwnProperty(v)&&k0(r,v,i[v])}function Jf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 lT=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cT=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Hc(r){return cT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ta(){}var eh=null;function th(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var $o=null,Go=null;function U0(r){var i=Bo(r);if(i&&(r=i.stateNode)){var s=r[Fn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Qf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Sr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[Fn]||null;if(!m)throw Error(a(90));Qf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===r.form&&N0(c)}break e;case"textarea":L0(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Fo(r,!!s.multiple,i,!1)}}}var nh=!1;function B0(r,i,s){if(nh)return r(i,s);nh=!0;try{var c=r(i);return c}finally{if(nh=!1,($o!==null||Go!==null)&&(Mu(),$o&&(i=$o,r=Go,Go=$o=null,U0(i),r)))for(i=0;i<r.length;i++)U0(r[i])}}function el(r,i){var s=r.stateNode;if(s===null)return null;var c=s[Fn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rh=!1;if(Aa)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){rh=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{rh=!1}var ni=null,ah=null,$c=null;function z0(){if($c)return $c;var r,i=ah,s=i.length,c,m="value"in ni?ni.value:ni.textContent,v=m.length;for(r=0;r<s&&i[r]===m[r];r++);var x=s-r;for(c=1;c<=x&&i[s-c]===m[v-c];c++);return $c=m.slice(r,1<c?1-c:void 0)}function Gc(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function qc(){return!0}function V0(){return!1}function Hn(r){function i(s,c,m,v,x){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?qc:V0,this.isPropagationStopped=V0,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),i}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yc=Hn(Yi),nl=p({},Yi,{view:0,detail:0}),uT=Hn(nl),ih,oh,rl,Kc=p({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lh,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==rl&&(rl&&r.type==="mousemove"?(ih=r.screenX-rl.screenX,oh=r.screenY-rl.screenY):oh=ih=0,rl=r),ih)},movementY:function(r){return"movementY"in r?r.movementY:oh}}),F0=Hn(Kc),dT=p({},Kc,{dataTransfer:0}),fT=Hn(dT),hT=p({},nl,{relatedTarget:0}),sh=Hn(hT),pT=p({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),mT=Hn(pT),gT=p({},Yi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),vT=Hn(gT),yT=p({},Yi,{data:0}),H0=Hn(yT),bT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_T={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ET={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ST(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ET[r])?!!i[r]:!1}function lh(){return ST}var wT=p({},nl,{key:function(r){if(r.key){var i=bT[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Gc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?_T[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lh,charCode:function(r){return r.type==="keypress"?Gc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Gc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),xT=Hn(wT),RT=p({},Kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$0=Hn(RT),OT=p({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lh}),TT=Hn(OT),AT=p({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),CT=Hn(AT),MT=p({},Kc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),IT=Hn(MT),NT=p({},Yi,{newState:0,oldState:0}),DT=Hn(NT),LT=[9,13,27,32],ch=Aa&&"CompositionEvent"in window,al=null;Aa&&"documentMode"in document&&(al=document.documentMode);var PT=Aa&&"TextEvent"in window&&!al,G0=Aa&&(!ch||al&&8<al&&11>=al),q0=" ",Y0=!1;function K0(r,i){switch(r){case"keyup":return LT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var qo=!1;function kT(r,i){switch(r){case"compositionend":return W0(i);case"keypress":return i.which!==32?null:(Y0=!0,q0);case"textInput":return r=i.data,r===q0&&Y0?null:r;default:return null}}function jT(r,i){if(qo)return r==="compositionend"||!ch&&K0(r,i)?(r=z0(),$c=ah=ni=null,qo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return G0&&i.locale!=="ko"?null:i.data;default:return null}}var UT={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Z0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!UT[r.type]:i==="textarea"}function Q0(r,i,s,c){$o?Go?Go.push(c):Go=[c]:$o=c,i=ju(i,"onChange"),0<i.length&&(s=new Yc("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var il=null,ol=null;function BT(r){Db(r,0)}function Wc(r){var i=Js(r);if(N0(i))return r}function X0(r,i){if(r==="change")return i}var J0=!1;if(Aa){var uh;if(Aa){var dh="oninput"in document;if(!dh){var ey=document.createElement("div");ey.setAttribute("oninput","return;"),dh=typeof ey.oninput=="function"}uh=dh}else uh=!1;J0=uh&&(!document.documentMode||9<document.documentMode)}function ty(){il&&(il.detachEvent("onpropertychange",ny),ol=il=null)}function ny(r){if(r.propertyName==="value"&&Wc(ol)){var i=[];Q0(i,ol,r,th(r)),B0(BT,i)}}function zT(r,i,s){r==="focusin"?(ty(),il=i,ol=s,il.attachEvent("onpropertychange",ny)):r==="focusout"&&ty()}function VT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wc(ol)}function FT(r,i){if(r==="click")return Wc(i)}function HT(r,i){if(r==="input"||r==="change")return Wc(i)}function $T(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var rr=typeof Object.is=="function"?Object.is:$T;function sl(r,i){if(rr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!He.call(i,m)||!rr(r[m],i[m]))return!1}return!0}function ry(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ay(r,i){var s=ry(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=i&&c>=i)return{node:s,offset:i-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ry(s)}}function iy(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?iy(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function oy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Fc(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=Fc(r.document)}return i}function fh(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var GT=Aa&&"documentMode"in document&&11>=document.documentMode,Yo=null,hh=null,ll=null,ph=!1;function sy(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ph||Yo==null||Yo!==Fc(c)||(c=Yo,"selectionStart"in c&&fh(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ll&&sl(ll,c)||(ll=c,c=ju(hh,"onSelect"),0<c.length&&(i=new Yc("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Yo)))}function Ki(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var Ko={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},mh={},ly={};Aa&&(ly=document.createElement("div").style,"AnimationEvent"in window||(delete Ko.animationend.animation,delete Ko.animationiteration.animation,delete Ko.animationstart.animation),"TransitionEvent"in window||delete Ko.transitionend.transition);function Wi(r){if(mh[r])return mh[r];if(!Ko[r])return r;var i=Ko[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in ly)return mh[r]=i[s];return r}var cy=Wi("animationend"),uy=Wi("animationiteration"),dy=Wi("animationstart"),qT=Wi("transitionrun"),YT=Wi("transitionstart"),KT=Wi("transitioncancel"),fy=Wi("transitionend"),hy=new Map,gh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");gh.push("scrollEnd");function Vr(r,i){hy.set(r,i),qi(i,[r])}var Zc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},wr=[],Wo=0,vh=0;function Qc(){for(var r=Wo,i=vh=Wo=0;i<r;){var s=wr[i];wr[i++]=null;var c=wr[i];wr[i++]=null;var m=wr[i];wr[i++]=null;var v=wr[i];if(wr[i++]=null,c!==null&&m!==null){var x=c.pending;x===null?m.next=m:(m.next=x.next,x.next=m),c.pending=m}v!==0&&py(s,m,v)}}function Xc(r,i,s,c){wr[Wo++]=r,wr[Wo++]=i,wr[Wo++]=s,wr[Wo++]=c,vh|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function yh(r,i,s,c){return Xc(r,i,s,c),Jc(r)}function Zi(r,i){return Xc(r,null,null,i),Jc(r)}function py(r,i,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,v=r.return;v!==null;)v.childLanes|=s,c=v.alternate,c!==null&&(c.childLanes|=s),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(m=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,m&&i!==null&&(m=31-Wt(s),r=v.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=s|536870912),v):null}function Jc(r){if(50<Ml)throw Ml=0,Tp=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Zo={};function WT(r,i,s,c){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,i,s,c){return new WT(r,i,s,c)}function bh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ca(r,i){var s=r.alternate;return s===null?(s=ar(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function my(r,i){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function eu(r,i,s,c,m,v){var x=0;if(c=r,typeof r=="function")bh(r)&&(x=1);else if(typeof r=="string")x=eC(r,s,oe.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=ar(31,s,i,m),r.elementType=U,r.lanes=v,r;case w:return Qi(s.children,m,v,i);case T:x=8,m|=24;break;case R:return r=ar(12,s,i,m|2),r.elementType=R,r.lanes=v,r;case I:return r=ar(13,s,i,m),r.elementType=I,r.lanes=v,r;case L:return r=ar(19,s,i,m),r.elementType=L,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:x=10;break e;case A:x=9;break e;case O:x=11;break e;case N:x=14;break e;case D:x=16,c=null;break e}x=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=ar(x,s,i,m),i.elementType=r,i.type=c,i.lanes=v,i}function Qi(r,i,s,c){return r=ar(7,r,c,i),r.lanes=s,r}function _h(r,i,s){return r=ar(6,r,null,i),r.lanes=s,r}function gy(r){var i=ar(18,null,null,0);return i.stateNode=r,i}function Eh(r,i,s){return i=ar(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var vy=new WeakMap;function xr(r,i){if(typeof r=="object"&&r!==null){var s=vy.get(r);return s!==void 0?s:(i={value:r,source:i,stack:it(i)},vy.set(r,i),i)}return{value:r,source:i,stack:it(i)}}var Qo=[],Xo=0,tu=null,cl=0,Rr=[],Or=0,ri=null,na=1,ra="";function Ma(r,i){Qo[Xo++]=cl,Qo[Xo++]=tu,tu=r,cl=i}function yy(r,i,s){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,ri=r;var c=na;r=ra;var m=32-Wt(c)-1;c&=~(1<<m),s+=1;var v=32-Wt(i)+m;if(30<v){var x=m-m%5;v=(c&(1<<x)-1).toString(32),c>>=x,m-=x,na=1<<32-Wt(i)+m|s<<m|c,ra=v+r}else na=1<<v|s<<m|c,ra=r}function Sh(r){r.return!==null&&(Ma(r,1),yy(r,1,0))}function wh(r){for(;r===tu;)tu=Qo[--Xo],Qo[Xo]=null,cl=Qo[--Xo],Qo[Xo]=null;for(;r===ri;)ri=Rr[--Or],Rr[Or]=null,ra=Rr[--Or],Rr[Or]=null,na=Rr[--Or],Rr[Or]=null}function by(r,i){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,na=i.id,ra=i.overflow,ri=r}var wn=null,Dt=null,ut=!1,ai=null,Tr=!1,xh=Error(a(519));function ii(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ul(xr(i,r)),xh}function _y(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[Sn]=r,i[Fn]=c,s){case"dialog":at("cancel",i),at("close",i);break;case"iframe":case"object":case"embed":at("load",i);break;case"video":case"audio":for(s=0;s<Nl.length;s++)at(Nl[s],i);break;case"source":at("error",i);break;case"img":case"image":case"link":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"input":at("invalid",i),D0(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":at("invalid",i);break;case"textarea":at("invalid",i),P0(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||jb(i.textContent,s)?(c.popover!=null&&(at("beforetoggle",i),at("toggle",i)),c.onScroll!=null&&at("scroll",i),c.onScrollEnd!=null&&at("scrollend",i),c.onClick!=null&&(i.onclick=Ta),i=!0):i=!1,i||ii(r,!0)}function Ey(r){for(wn=r.return;wn;)switch(wn.tag){case 5:case 31:case 13:Tr=!1;return;case 27:case 3:Tr=!0;return;default:wn=wn.return}}function Jo(r){if(r!==wn)return!1;if(!ut)return Ey(r),ut=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Fp(r.type,r.memoizedProps)),s=!s),s&&Dt&&ii(r),Ey(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=qb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=qb(r)}else i===27?(i=Dt,bi(r.type)?(r=Yp,Yp=null,Dt=r):Dt=i):Dt=wn?Cr(r.stateNode.nextSibling):null;return!0}function Xi(){Dt=wn=null,ut=!1}function Rh(){var r=ai;return r!==null&&(Yn===null?Yn=r:Yn.push.apply(Yn,r),ai=null),r}function ul(r){ai===null?ai=[r]:ai.push(r)}var Oh=k(null),Ji=null,Ia=null;function oi(r,i,s){ee(Oh,i._currentValue),i._currentValue=s}function Na(r){r._currentValue=Oh.current,Z(Oh)}function Th(r,i,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===s)break;r=r.return}}function Ah(r,i,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var v=m.dependencies;if(v!==null){var x=m.child;v=v.firstContext;e:for(;v!==null;){var M=v;v=m;for(var z=0;z<i.length;z++)if(M.context===i[z]){v.lanes|=s,M=v.alternate,M!==null&&(M.lanes|=s),Th(v.return,s,r),c||(x=null);break e}v=M.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(a(341));x.lanes|=s,v=x.alternate,v!==null&&(v.lanes|=s),Th(x,s,r),x=null}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===r){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}}function es(r,i,s,c){r=null;for(var m=i,v=!1;m!==null;){if(!v){if((m.flags&524288)!==0)v=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(a(387));if(x=x.memoizedProps,x!==null){var M=m.type;rr(m.pendingProps.value,x.value)||(r!==null?r.push(M):r=[M])}}else if(m===ye.current){if(x=m.alternate,x===null)throw Error(a(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(jl):r=[jl])}m=m.return}r!==null&&Ah(i,r,s,c),i.flags|=262144}function nu(r){for(r=r.firstContext;r!==null;){if(!rr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function eo(r){Ji=r,Ia=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function xn(r){return Sy(Ji,r)}function ru(r,i){return Ji===null&&eo(r),Sy(r,i)}function Sy(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ia===null){if(r===null)throw Error(a(308));Ia=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Ia=Ia.next=i;return s}var ZT=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},QT=e.unstable_scheduleCallback,XT=e.unstable_NormalPriority,Zt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new ZT,data:new Map,refCount:0}}function dl(r){r.refCount--,r.refCount===0&&QT(XT,function(){r.controller.abort()})}var fl=null,Mh=0,ts=0,ns=null;function JT(r,i){if(fl===null){var s=fl=[];Mh=0,ts=Dp(),ns={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Mh++,i.then(wy,wy),i}function wy(){if(--Mh===0&&fl!==null){ns!==null&&(ns.status="fulfilled");var r=fl;fl=null,ts=0,ns=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function eA(r,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var xy=P.S;P.S=function(r,i){sb=ce(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&JT(r,i),xy!==null&&xy(r,i)};var to=k(null);function Ih(){var r=to.current;return r!==null?r:Ct.pooledCache}function au(r,i){i===null?ee(to,to.current):ee(to,i.pool)}function Ry(){var r=Ih();return r===null?null:{parent:Zt._currentValue,pool:r}}var rs=Error(a(460)),Nh=Error(a(474)),iu=Error(a(542)),ou={then:function(){}};function Oy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Ty(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(Ta,Ta),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Cy(r),r;default:if(typeof i.status=="string")i.then(Ta,Ta);else{if(r=Ct,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Cy(r),r}throw ro=i,rs}}function no(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ro=s,rs):s}}var ro=null;function Ay(){if(ro===null)throw Error(a(459));var r=ro;return ro=null,r}function Cy(r){if(r===rs||r===iu)throw Error(a(483))}var as=null,hl=0;function su(r){var i=hl;return hl+=1,as===null&&(as=[]),Ty(as,r,i)}function pl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function lu(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function My(r){function i(K,H){if(r){var X=K.deletions;X===null?(K.deletions=[H],K.flags|=16):X.push(H)}}function s(K,H){if(!r)return null;for(;H!==null;)i(K,H),H=H.sibling;return null}function c(K){for(var H=new Map;K!==null;)K.key!==null?H.set(K.key,K):H.set(K.index,K),K=K.sibling;return H}function m(K,H){return K=Ca(K,H),K.index=0,K.sibling=null,K}function v(K,H,X){return K.index=X,r?(X=K.alternate,X!==null?(X=X.index,X<H?(K.flags|=67108866,H):X):(K.flags|=67108866,H)):(K.flags|=1048576,H)}function x(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,H,X,le){return H===null||H.tag!==6?(H=_h(X,K.mode,le),H.return=K,H):(H=m(H,X),H.return=K,H)}function z(K,H,X,le){var je=X.type;return je===w?se(K,H,X.props.children,le,X.key):H!==null&&(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===D&&no(je)===H.type)?(H=m(H,X.props),pl(H,X),H.return=K,H):(H=eu(X.type,X.key,X.props,null,K.mode,le),pl(H,X),H.return=K,H)}function J(K,H,X,le){return H===null||H.tag!==4||H.stateNode.containerInfo!==X.containerInfo||H.stateNode.implementation!==X.implementation?(H=Eh(X,K.mode,le),H.return=K,H):(H=m(H,X.children||[]),H.return=K,H)}function se(K,H,X,le,je){return H===null||H.tag!==7?(H=Qi(X,K.mode,le,je),H.return=K,H):(H=m(H,X),H.return=K,H)}function ue(K,H,X){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=_h(""+H,K.mode,X),H.return=K,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return X=eu(H.type,H.key,H.props,null,K.mode,X),pl(X,H),X.return=K,X;case S:return H=Eh(H,K.mode,X),H.return=K,H;case D:return H=no(H),ue(K,H,X)}if(ie(H)||W(H))return H=Qi(H,K.mode,X,null),H.return=K,H;if(typeof H.then=="function")return ue(K,su(H),X);if(H.$$typeof===C)return ue(K,ru(K,H),X);lu(K,H)}return null}function te(K,H,X,le){var je=H!==null?H.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return je!==null?null:M(K,H,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===je?z(K,H,X,le):null;case S:return X.key===je?J(K,H,X,le):null;case D:return X=no(X),te(K,H,X,le)}if(ie(X)||W(X))return je!==null?null:se(K,H,X,le,null);if(typeof X.then=="function")return te(K,H,su(X),le);if(X.$$typeof===C)return te(K,H,ru(K,X),le);lu(K,X)}return null}function ae(K,H,X,le,je){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return K=K.get(X)||null,M(H,K,""+le,je);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case _:return K=K.get(le.key===null?X:le.key)||null,z(H,K,le,je);case S:return K=K.get(le.key===null?X:le.key)||null,J(H,K,le,je);case D:return le=no(le),ae(K,H,X,le,je)}if(ie(le)||W(le))return K=K.get(X)||null,se(H,K,le,je,null);if(typeof le.then=="function")return ae(K,H,X,su(le),je);if(le.$$typeof===C)return ae(K,H,X,ru(H,le),je);lu(H,le)}return null}function Ae(K,H,X,le){for(var je=null,mt=null,De=H,Ye=H=0,lt=null;De!==null&&Ye<X.length;Ye++){De.index>Ye?(lt=De,De=null):lt=De.sibling;var gt=te(K,De,X[Ye],le);if(gt===null){De===null&&(De=lt);break}r&&De&>.alternate===null&&i(K,De),H=v(gt,H,Ye),mt===null?je=gt:mt.sibling=gt,mt=gt,De=lt}if(Ye===X.length)return s(K,De),ut&&Ma(K,Ye),je;if(De===null){for(;Ye<X.length;Ye++)De=ue(K,X[Ye],le),De!==null&&(H=v(De,H,Ye),mt===null?je=De:mt.sibling=De,mt=De);return ut&&Ma(K,Ye),je}for(De=c(De);Ye<X.length;Ye++)lt=ae(De,K,Ye,X[Ye],le),lt!==null&&(r&<.alternate!==null&&De.delete(lt.key===null?Ye:lt.key),H=v(lt,H,Ye),mt===null?je=lt:mt.sibling=lt,mt=lt);return r&&De.forEach(function(xi){return i(K,xi)}),ut&&Ma(K,Ye),je}function Be(K,H,X,le){if(X==null)throw Error(a(151));for(var je=null,mt=null,De=H,Ye=H=0,lt=null,gt=X.next();De!==null&&!gt.done;Ye++,gt=X.next()){De.index>Ye?(lt=De,De=null):lt=De.sibling;var xi=te(K,De,gt.value,le);if(xi===null){De===null&&(De=lt);break}r&&De&&xi.alternate===null&&i(K,De),H=v(xi,H,Ye),mt===null?je=xi:mt.sibling=xi,mt=xi,De=lt}if(gt.done)return s(K,De),ut&&Ma(K,Ye),je;if(De===null){for(;!gt.done;Ye++,gt=X.next())gt=ue(K,gt.value,le),gt!==null&&(H=v(gt,H,Ye),mt===null?je=gt:mt.sibling=gt,mt=gt);return ut&&Ma(K,Ye),je}for(De=c(De);!gt.done;Ye++,gt=X.next())gt=ae(De,K,Ye,gt.value,le),gt!==null&&(r&>.alternate!==null&&De.delete(gt.key===null?Ye:gt.key),H=v(gt,H,Ye),mt===null?je=gt:mt.sibling=gt,mt=gt);return r&&De.forEach(function(dC){return i(K,dC)}),ut&&Ma(K,Ye),je}function Rt(K,H,X,le){if(typeof X=="object"&&X!==null&&X.type===w&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var je=X.key;H!==null;){if(H.key===je){if(je=X.type,je===w){if(H.tag===7){s(K,H.sibling),le=m(H,X.props.children),le.return=K,K=le;break e}}else if(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===D&&no(je)===H.type){s(K,H.sibling),le=m(H,X.props),pl(le,X),le.return=K,K=le;break e}s(K,H);break}else i(K,H);H=H.sibling}X.type===w?(le=Qi(X.props.children,K.mode,le,X.key),le.return=K,K=le):(le=eu(X.type,X.key,X.props,null,K.mode,le),pl(le,X),le.return=K,K=le)}return x(K);case S:e:{for(je=X.key;H!==null;){if(H.key===je)if(H.tag===4&&H.stateNode.containerInfo===X.containerInfo&&H.stateNode.implementation===X.implementation){s(K,H.sibling),le=m(H,X.children||[]),le.return=K,K=le;break e}else{s(K,H);break}else i(K,H);H=H.sibling}le=Eh(X,K.mode,le),le.return=K,K=le}return x(K);case D:return X=no(X),Rt(K,H,X,le)}if(ie(X))return Ae(K,H,X,le);if(W(X)){if(je=W(X),typeof je!="function")throw Error(a(150));return X=je.call(X),Be(K,H,X,le)}if(typeof X.then=="function")return Rt(K,H,su(X),le);if(X.$$typeof===C)return Rt(K,H,ru(K,X),le);lu(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,H!==null&&H.tag===6?(s(K,H.sibling),le=m(H,X),le.return=K,K=le):(s(K,H),le=_h(X,K.mode,le),le.return=K,K=le),x(K)):s(K,H)}return function(K,H,X,le){try{hl=0;var je=Rt(K,H,X,le);return as=null,je}catch(De){if(De===rs||De===iu)throw De;var mt=ar(29,De,null,K.mode);return mt.lanes=le,mt.return=K,mt}}}var ao=My(!0),Iy=My(!1),si=!1;function Dh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function li(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ci(r,i,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(vt&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Jc(r),py(r,null,s),i}return Xc(r,c,i,s),Jc(r)}function ml(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,En(r,s)}}function Ph(r,i){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?m=v=x:v=v.next=x,s=s.next}while(s!==null);v===null?m=v=i:v=v.next=i}else m=v=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var kh=!1;function gl(){if(kh){var r=ns;if(r!==null)throw r}}function vl(r,i,s,c){kh=!1;var m=r.updateQueue;si=!1;var v=m.firstBaseUpdate,x=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var z=M,J=z.next;z.next=null,x===null?v=J:x.next=J,x=z;var se=r.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==x&&(M===null?se.firstBaseUpdate=J:M.next=J,se.lastBaseUpdate=z))}if(v!==null){var ue=m.baseState;x=0,se=J=z=null,M=v;do{var te=M.lane&-536870913,ae=te!==M.lane;if(ae?(st&te)===te:(c&te)===te){te!==0&&te===ts&&(kh=!0),se!==null&&(se=se.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Ae=r,Be=M;te=i;var Rt=s;switch(Be.tag){case 1:if(Ae=Be.payload,typeof Ae=="function"){ue=Ae.call(Rt,ue,te);break e}ue=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Be.payload,te=typeof Ae=="function"?Ae.call(Rt,ue,te):Ae,te==null)break e;ue=p({},ue,te);break e;case 2:si=!0}}te=M.callback,te!==null&&(r.flags|=64,ae&&(r.flags|=8192),ae=m.callbacks,ae===null?m.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},se===null?(J=se=ae,z=ue):se=se.next=ae,x|=te;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,m.lastBaseUpdate=ae,m.shared.pending=null}}while(!0);se===null&&(z=ue),m.baseState=z,m.firstBaseUpdate=J,m.lastBaseUpdate=se,v===null&&(m.shared.lanes=0),pi|=x,r.lanes=x,r.memoizedState=ue}}function Ny(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Dy(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Ny(s[r],i)}var is=k(null),cu=k(0);function Ly(r,i){r=Va,ee(cu,r),ee(is,i),Va=r|i.baseLanes}function jh(){ee(cu,Va),ee(is,is.current)}function Uh(){Va=cu.current,Z(is),Z(cu)}var ir=k(null),Ar=null;function ui(r){var i=r.alternate;ee(Ht,Ht.current&1),ee(ir,r),Ar===null&&(i===null||is.current!==null||i.memoizedState!==null)&&(Ar=r)}function Bh(r){ee(Ht,Ht.current),ee(ir,r),Ar===null&&(Ar=r)}function Py(r){r.tag===22?(ee(Ht,Ht.current),ee(ir,r),Ar===null&&(Ar=r)):di()}function di(){ee(Ht,Ht.current),ee(ir,ir.current)}function or(r){Z(ir),Ar===r&&(Ar=null),Z(Ht)}var Ht=k(0);function uu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Gp(s)||qp(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Da=0,qe=null,wt=null,Qt=null,du=!1,os=!1,io=!1,fu=0,yl=0,ss=null,tA=0;function zt(){throw Error(a(321))}function zh(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!rr(r[s],i[s]))return!1;return!0}function Vh(r,i,s,c,m,v){return Da=v,qe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=r===null||r.memoizedState===null?y1:np,io=!1,v=s(c,m),io=!1,os&&(v=jy(i,s,c,m)),ky(r),v}function ky(r){P.H=El;var i=wt!==null&&wt.next!==null;if(Da=0,Qt=wt=qe=null,du=!1,yl=0,ss=null,i)throw Error(a(300));r===null||Xt||(r=r.dependencies,r!==null&&nu(r)&&(Xt=!0))}function jy(r,i,s,c){qe=r;var m=0;do{if(os&&(ss=null),yl=0,os=!1,25<=m)throw Error(a(301));if(m+=1,Qt=wt=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}P.H=b1,v=i(s,c)}while(os);return v}function nA(){var r=P.H,i=r.useState()[0];return i=typeof i.then=="function"?bl(i):i,r=r.useState()[0],(wt!==null?wt.memoizedState:null)!==r&&(qe.flags|=1024),i}function Fh(){var r=fu!==0;return fu=0,r}function Hh(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function $h(r){if(du){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}du=!1}Da=0,Qt=wt=qe=null,os=!1,yl=fu=0,ss=null}function jn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?qe.memoizedState=Qt=r:Qt=Qt.next=r,Qt}function $t(){if(wt===null){var r=qe.alternate;r=r!==null?r.memoizedState:null}else r=wt.next;var i=Qt===null?qe.memoizedState:Qt.next;if(i!==null)Qt=i,wt=r;else{if(r===null)throw qe.alternate===null?Error(a(467)):Error(a(310));wt=r,r={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Qt===null?qe.memoizedState=Qt=r:Qt=Qt.next=r}return Qt}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(r){var i=yl;return yl+=1,ss===null&&(ss=[]),r=Ty(ss,r,i),i=qe,(Qt===null?i.memoizedState:Qt.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?y1:np),r}function pu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return bl(r);if(r.$$typeof===C)return xn(r)}throw Error(a(438,String(r)))}function Gh(r){var i=null,s=qe.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=qe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=hu(),qe.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),c=0;c<r;c++)s[c]=Q;return i.index++,s}function La(r,i){return typeof i=="function"?i(r):i}function mu(r){var i=$t();return qh(i,wt,r)}function qh(r,i,s){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=r.baseQueue,v=c.pending;if(v!==null){if(m!==null){var x=m.next;m.next=v.next,v.next=x}i.baseQueue=m=v,c.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{i=m.next;var M=x=null,z=null,J=i,se=!1;do{var ue=J.lane&-536870913;if(ue!==J.lane?(st&ue)===ue:(Da&ue)===ue){var te=J.revertLane;if(te===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ue===ts&&(se=!0);else if((Da&te)===te){J=J.next,te===ts&&(se=!0);continue}else ue={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(M=z=ue,x=v):z=z.next=ue,qe.lanes|=te,pi|=te;ue=J.action,io&&s(v,ue),v=J.hasEagerState?J.eagerState:s(v,ue)}else te={lane:ue,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(M=z=te,x=v):z=z.next=te,qe.lanes|=ue,pi|=ue;J=J.next}while(J!==null&&J!==i);if(z===null?x=v:z.next=M,!rr(v,r.memoizedState)&&(Xt=!0,se&&(s=ns,s!==null)))throw s;r.memoizedState=v,r.baseState=x,r.baseQueue=z,c.lastRenderedState=v}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Yh(r){var i=$t(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,v=i.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do v=r(v,x.action),x=x.next;while(x!==m);rr(v,i.memoizedState)||(Xt=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),s.lastRenderedState=v}return[v,c]}function Uy(r,i,s){var c=qe,m=$t(),v=ut;if(v){if(s===void 0)throw Error(a(407));s=s()}else s=i();var x=!rr((wt||m).memoizedState,s);if(x&&(m.memoizedState=s,Xt=!0),m=m.queue,Zh(Vy.bind(null,c,m,r),[r]),m.getSnapshot!==i||x||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,ls(9,{destroy:void 0},zy.bind(null,c,m,s,i),null),Ct===null)throw Error(a(349));v||(Da&127)!==0||By(c,i,s)}return s}function By(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=qe.updateQueue,i===null?(i=hu(),qe.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function zy(r,i,s,c){i.value=s,i.getSnapshot=c,Fy(i)&&Hy(r)}function Vy(r,i,s){return s(function(){Fy(i)&&Hy(r)})}function Fy(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!rr(r,s)}catch{return!0}}function Hy(r){var i=Zi(r,2);i!==null&&Kn(i,r,2)}function Kh(r){var i=jn();if(typeof r=="function"){var s=r;if(r=s(),io){sn(!0);try{s()}finally{sn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:r},i}function $y(r,i,s,c){return r.baseState=s,qh(r,wt,typeof c=="function"?c:La)}function rA(r,i,s,c,m){if(yu(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){v.listeners.push(x)}};P.T!==null?s(!0):v.isTransition=!1,c(v),s=i.pending,s===null?(v.next=i.pending=v,Gy(i,v)):(v.next=s.next,i.pending=s.next=v)}}function Gy(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var v=P.T,x={};P.T=x;try{var M=s(m,c),z=P.S;z!==null&&z(x,M),qy(r,i,M)}catch(J){Wh(r,i,J)}finally{v!==null&&x.types!==null&&(v.types=x.types),P.T=v}}else try{v=s(m,c),qy(r,i,v)}catch(J){Wh(r,i,J)}}function qy(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){Yy(r,i,c)},function(c){return Wh(r,i,c)}):Yy(r,i,s)}function Yy(r,i,s){i.status="fulfilled",i.value=s,Ky(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,Gy(r,s)))}function Wh(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Ky(i),i=i.next;while(i!==c)}r.action=null}function Ky(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Wy(r,i){return i}function Zy(r,i){if(ut){var s=Ct.formState;if(s!==null){e:{var c=qe;if(ut){if(Dt){t:{for(var m=Dt,v=Tr;m.nodeType!==8;){if(!v){m=null;break t}if(m=Cr(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){Dt=Cr(m.nextSibling),c=m.data==="F!";break e}}ii(c)}c=!1}c&&(i=s[0])}}return s=jn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wy,lastRenderedState:i},s.queue=c,s=m1.bind(null,qe,c),c.dispatch=s,c=Kh(!1),v=tp.bind(null,qe,!1,c.queue),c=jn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=rA.bind(null,qe,m,v,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Qy(r){var i=$t();return Xy(i,wt,r)}function Xy(r,i,s){if(i=qh(r,i,Wy)[0],r=mu(La)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=bl(i)}catch(x){throw x===rs?iu:x}else c=i;i=$t();var m=i.queue,v=m.dispatch;return s!==i.memoizedState&&(qe.flags|=2048,ls(9,{destroy:void 0},aA.bind(null,m,s),null)),[c,v,r]}function aA(r,i){r.action=i}function Jy(r){var i=$t(),s=wt;if(s!==null)return Xy(i,s,r);$t(),i=i.memoizedState,s=$t();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function ls(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=qe.updateQueue,i===null&&(i=hu(),qe.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,i.lastEffect=r),r}function e1(){return $t().memoizedState}function gu(r,i,s,c){var m=jn();qe.flags|=r,m.memoizedState=ls(1|i,{destroy:void 0},s,c===void 0?null:c)}function vu(r,i,s,c){var m=$t();c=c===void 0?null:c;var v=m.memoizedState.inst;wt!==null&&c!==null&&zh(c,wt.memoizedState.deps)?m.memoizedState=ls(i,v,s,c):(qe.flags|=r,m.memoizedState=ls(1|i,v,s,c))}function t1(r,i){gu(8390656,8,r,i)}function Zh(r,i){vu(2048,8,r,i)}function iA(r){qe.flags|=4;var i=qe.updateQueue;if(i===null)i=hu(),qe.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function n1(r){var i=$t().memoizedState;return iA({ref:i,nextImpl:r}),function(){if((vt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function r1(r,i){return vu(4,2,r,i)}function a1(r,i){return vu(4,4,r,i)}function i1(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function o1(r,i,s){s=s!=null?s.concat([r]):null,vu(4,4,i1.bind(null,i,r),s)}function Qh(){}function s1(r,i){var s=$t();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&zh(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function l1(r,i){var s=$t();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&zh(i,c[1]))return c[0];if(c=r(),io){sn(!0);try{r()}finally{sn(!1)}}return s.memoizedState=[c,i],c}function Xh(r,i,s){return s===void 0||(Da&1073741824)!==0&&(st&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=cb(),qe.lanes|=r,pi|=r,s)}function c1(r,i,s,c){return rr(s,i)?s:is.current!==null?(r=Xh(r,s,c),rr(r,i)||(Xt=!0),r):(Da&42)===0||(Da&1073741824)!==0&&(st&261930)===0?(Xt=!0,r.memoizedState=s):(r=cb(),qe.lanes|=r,pi|=r,i)}function u1(r,i,s,c,m){var v=V.p;V.p=v!==0&&8>v?v:8;var x=P.T,M={};P.T=M,tp(r,!1,i,s);try{var z=m(),J=P.S;if(J!==null&&J(M,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var se=eA(z,c);_l(r,i,se,cr(r))}else _l(r,i,c,cr(r))}catch(ue){_l(r,i,{then:function(){},status:"rejected",reason:ue},cr())}finally{V.p=v,x!==null&&M.types!==null&&(x.types=M.types),P.T=x}}function oA(){}function Jh(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=d1(r).queue;u1(r,m,i,$,s===null?oA:function(){return f1(r),s(c)})}function d1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:$},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function f1(r){var i=d1(r);i.next===null&&(i=r.alternate.memoizedState),_l(r,i.next.queue,{},cr())}function ep(){return xn(jl)}function h1(){return $t().memoizedState}function p1(){return $t().memoizedState}function sA(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=cr();r=li(s);var c=ci(i,r,s);c!==null&&(Kn(c,i,s),ml(c,i,s)),i={cache:Ch()},r.payload=i;return}i=i.return}}function lA(r,i,s){var c=cr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yu(r)?g1(i,s):(s=yh(r,i,s,c),s!==null&&(Kn(s,r,c),v1(s,i,c)))}function m1(r,i,s){var c=cr();_l(r,i,s,c)}function _l(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(yu(r))g1(i,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var x=i.lastRenderedState,M=v(x,s);if(m.hasEagerState=!0,m.eagerState=M,rr(M,x))return Xc(r,i,m,0),Ct===null&&Qc(),!1}catch{}if(s=yh(r,i,m,c),s!==null)return Kn(s,r,c),v1(s,i,c),!0}return!1}function tp(r,i,s,c){if(c={lane:2,revertLane:Dp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},yu(r)){if(i)throw Error(a(479))}else i=yh(r,s,c,2),i!==null&&Kn(i,r,2)}function yu(r){var i=r.alternate;return r===qe||i!==null&&i===qe}function g1(r,i){os=du=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function v1(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,En(r,s)}}var El={readContext:xn,use:pu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};El.useEffectEvent=zt;var y1={readContext:xn,use:pu,useCallback:function(r,i){return jn().memoizedState=[r,i===void 0?null:i],r},useContext:xn,useEffect:t1,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,gu(4194308,4,i1.bind(null,i,r),s)},useLayoutEffect:function(r,i){return gu(4194308,4,r,i)},useInsertionEffect:function(r,i){gu(4,2,r,i)},useMemo:function(r,i){var s=jn();i=i===void 0?null:i;var c=r();if(io){sn(!0);try{r()}finally{sn(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=jn();if(s!==void 0){var m=s(i);if(io){sn(!0);try{s(i)}finally{sn(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=lA.bind(null,qe,r),[c.memoizedState,r]},useRef:function(r){var i=jn();return r={current:r},i.memoizedState=r},useState:function(r){r=Kh(r);var i=r.queue,s=m1.bind(null,qe,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:Qh,useDeferredValue:function(r,i){var s=jn();return Xh(s,r,i)},useTransition:function(){var r=Kh(!1);return r=u1.bind(null,qe,r.queue,!0,!1),jn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=qe,m=jn();if(ut){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Ct===null)throw Error(a(349));(st&127)!==0||By(c,i,s)}m.memoizedState=s;var v={value:s,getSnapshot:i};return m.queue=v,t1(Vy.bind(null,c,v,r),[r]),c.flags|=2048,ls(9,{destroy:void 0},zy.bind(null,c,v,s,i),null),s},useId:function(){var r=jn(),i=Ct.identifierPrefix;if(ut){var s=ra,c=na;s=(c&~(1<<32-Wt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=fu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=tA++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:ep,useFormState:Zy,useActionState:Zy,useOptimistic:function(r){var i=jn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=tp.bind(null,qe,!0,s),s.dispatch=i,[r,i]},useMemoCache:Gh,useCacheRefresh:function(){return jn().memoizedState=sA.bind(null,qe)},useEffectEvent:function(r){var i=jn(),s={impl:r};return i.memoizedState=s,function(){if((vt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},np={readContext:xn,use:pu,useCallback:s1,useContext:xn,useEffect:Zh,useImperativeHandle:o1,useInsertionEffect:r1,useLayoutEffect:a1,useMemo:l1,useReducer:mu,useRef:e1,useState:function(){return mu(La)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=$t();return c1(s,wt.memoizedState,r,i)},useTransition:function(){var r=mu(La)[0],i=$t().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:Uy,useId:h1,useHostTransitionStatus:ep,useFormState:Qy,useActionState:Qy,useOptimistic:function(r,i){var s=$t();return $y(s,wt,r,i)},useMemoCache:Gh,useCacheRefresh:p1};np.useEffectEvent=n1;var b1={readContext:xn,use:pu,useCallback:s1,useContext:xn,useEffect:Zh,useImperativeHandle:o1,useInsertionEffect:r1,useLayoutEffect:a1,useMemo:l1,useReducer:Yh,useRef:e1,useState:function(){return Yh(La)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=$t();return wt===null?Xh(s,r,i):c1(s,wt.memoizedState,r,i)},useTransition:function(){var r=Yh(La)[0],i=$t().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:Uy,useId:h1,useHostTransitionStatus:ep,useFormState:Jy,useActionState:Jy,useOptimistic:function(r,i){var s=$t();return wt!==null?$y(s,wt,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:Gh,useCacheRefresh:p1};b1.useEffectEvent=n1;function rp(r,i,s,c){i=r.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var ap={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=cr(),c=li(s);c.tag=2,i!=null&&(c.callback=i),i=ci(r,c,s),i!==null&&(Kn(i,r,s),ml(i,r,s))}};function _1(r,i,s,c,m,v,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,v,x):i.prototype&&i.prototype.isPureReactComponent?!sl(s,c)||!sl(m,v):!0}function E1(r,i,s,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==r&&ap.enqueueReplaceState(i,i.state,null)}function oo(r,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(r=r.defaultProps){s===i&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function S1(r){Zc(r)}function w1(r){console.error(r)}function x1(r){Zc(r)}function bu(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function R1(r,i,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ip(r,i,s){return s=li(s),s.tag=3,s.payload={element:null},s.callback=function(){bu(r,i)},s}function O1(r){return r=li(r),r.tag=3,r}function T1(r,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var v=c.value;r.payload=function(){return m(v)},r.callback=function(){R1(i,s,c)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){R1(i,s,c),typeof m!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var M=c.stack;this.componentDidCatch(c.value,{componentStack:M!==null?M:""})})}function cA(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&es(i,s,m,!0),s=ir.current,s!==null){switch(s.tag){case 31:case 13:return Ar===null?Iu():s.alternate===null&&Vt===0&&(Vt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Mp(r,c,m)),!1;case 22:return s.flags|=65536,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Mp(r,c,m)),!1}throw Error(a(435,s.tag))}return Mp(r,c,m),Iu(),!1}if(ut)return i=ir.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==xh&&(r=Error(a(422),{cause:c}),ul(xr(r,s)))):(c!==xh&&(i=Error(a(423),{cause:c}),ul(xr(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=xr(c,s),m=ip(r.stateNode,c,m),Ph(r,m),Vt!==4&&(Vt=2)),!1;var v=Error(a(520),{cause:c});if(v=xr(v,s),Cl===null?Cl=[v]:Cl.push(v),Vt!==4&&(Vt=2),i===null)return!0;c=xr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=ip(s.stateNode,c,r),Ph(s,r),!1;case 1:if(i=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(mi===null||!mi.has(v))))return s.flags|=65536,m&=-m,s.lanes|=m,m=O1(m),T1(m,r,s,c),Ph(s,m),!1}s=s.return}while(s!==null);return!1}var op=Error(a(461)),Xt=!1;function Rn(r,i,s,c){i.child=r===null?Iy(i,null,s,c):ao(i,r.child,s,c)}function A1(r,i,s,c,m){s=s.render;var v=i.ref;if("ref"in c){var x={};for(var M in c)M!=="ref"&&(x[M]=c[M])}else x=c;return eo(i),c=Vh(r,i,s,x,v,m),M=Fh(),r!==null&&!Xt?(Hh(r,i,m),Pa(r,i,m)):(ut&&M&&Sh(i),i.flags|=1,Rn(r,i,c,m),i.child)}function C1(r,i,s,c,m){if(r===null){var v=s.type;return typeof v=="function"&&!bh(v)&&v.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=v,M1(r,i,v,c,m)):(r=eu(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!pp(r,m)){var x=v.memoizedProps;if(s=s.compare,s=s!==null?s:sl,s(x,c)&&r.ref===i.ref)return Pa(r,i,m)}return i.flags|=1,r=Ca(v,c),r.ref=i.ref,r.return=i,i.child=r}function M1(r,i,s,c,m){if(r!==null){var v=r.memoizedProps;if(sl(v,c)&&r.ref===i.ref)if(Xt=!1,i.pendingProps=c=v,pp(r,m))(r.flags&131072)!==0&&(Xt=!0);else return i.lanes=r.lanes,Pa(r,i,m)}return sp(r,i,s,c,m)}function I1(r,i,s,c){var m=c.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~v}else c=0,i.child=null;return N1(r,i,v,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&au(i,v!==null?v.cachePool:null),v!==null?Ly(i,v):jh(),Py(i);else return c=i.lanes=536870912,N1(r,i,v!==null?v.baseLanes|s:s,s,c)}else v!==null?(au(i,v.cachePool),Ly(i,v),di(),i.memoizedState=null):(r!==null&&au(i,null),jh(),di());return Rn(r,i,m,s),i.child}function Sl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function N1(r,i,s,c,m){var v=Ih();return v=v===null?null:{parent:Zt._currentValue,pool:v},i.memoizedState={baseLanes:s,cachePool:v},r!==null&&au(i,null),jh(),Py(i),r!==null&&es(r,i,c,!0),i.childLanes=m,null}function _u(r,i){return i=Su({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function D1(r,i,s){return ao(i,r.child,null,s),r=_u(i,i.pendingProps),r.flags|=2,or(i),i.memoizedState=null,r}function uA(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(ut){if(c.mode==="hidden")return r=_u(i,c),i.lanes=536870912,Sl(null,r);if(Bh(i),(r=Dt)?(r=Gb(r,Tr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=gy(r),s.return=i,i.child=s,wn=i,Dt=null)):r=null,r===null)throw ii(i);return i.lanes=536870912,null}return _u(i,c)}var v=r.memoizedState;if(v!==null){var x=v.dehydrated;if(Bh(i),m)if(i.flags&256)i.flags&=-257,i=D1(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Xt||es(r,i,s,!1),m=(s&r.childLanes)!==0,Xt||m){if(c=Ct,c!==null&&(x=Vn(c,s),x!==0&&x!==v.retryLane))throw v.retryLane=x,Zi(r,x),Kn(c,r,x),op;Iu(),i=D1(r,i,s)}else r=v.treeContext,Dt=Cr(x.nextSibling),wn=i,ut=!0,ai=null,Tr=!1,r!==null&&by(i,r),i=_u(i,c),i.flags|=4096;return i}return r=Ca(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Eu(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function sp(r,i,s,c,m){return eo(i),s=Vh(r,i,s,c,void 0,m),c=Fh(),r!==null&&!Xt?(Hh(r,i,m),Pa(r,i,m)):(ut&&c&&Sh(i),i.flags|=1,Rn(r,i,s,m),i.child)}function L1(r,i,s,c,m,v){return eo(i),i.updateQueue=null,s=jy(i,c,s,m),ky(r),c=Fh(),r!==null&&!Xt?(Hh(r,i,v),Pa(r,i,v)):(ut&&c&&Sh(i),i.flags|=1,Rn(r,i,s,v),i.child)}function P1(r,i,s,c,m){if(eo(i),i.stateNode===null){var v=Zo,x=s.contextType;typeof x=="object"&&x!==null&&(v=xn(x)),v=new s(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ap,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},Dh(i),x=s.contextType,v.context=typeof x=="object"&&x!==null?xn(x):Zo,v.state=i.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(rp(i,s,x,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(x=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),x!==v.state&&ap.enqueueReplaceState(v,v.state,null),vl(i,c,v,m),gl(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){v=i.stateNode;var M=i.memoizedProps,z=oo(s,M);v.props=z;var J=v.context,se=s.contextType;x=Zo,typeof se=="object"&&se!==null&&(x=xn(se));var ue=s.getDerivedStateFromProps;se=typeof ue=="function"||typeof v.getSnapshotBeforeUpdate=="function",M=i.pendingProps!==M,se||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(M||J!==x)&&E1(i,v,c,x),si=!1;var te=i.memoizedState;v.state=te,vl(i,c,v,m),gl(),J=i.memoizedState,M||te!==J||si?(typeof ue=="function"&&(rp(i,s,ue,c),J=i.memoizedState),(z=si||_1(i,s,z,c,te,J,x))?(se||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=J),v.props=c,v.state=J,v.context=x,c=z):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,Lh(r,i),x=i.memoizedProps,se=oo(s,x),v.props=se,ue=i.pendingProps,te=v.context,J=s.contextType,z=Zo,typeof J=="object"&&J!==null&&(z=xn(J)),M=s.getDerivedStateFromProps,(J=typeof M=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(x!==ue||te!==z)&&E1(i,v,c,z),si=!1,te=i.memoizedState,v.state=te,vl(i,c,v,m),gl();var ae=i.memoizedState;x!==ue||te!==ae||si||r!==null&&r.dependencies!==null&&nu(r.dependencies)?(typeof M=="function"&&(rp(i,s,M,c),ae=i.memoizedState),(se=si||_1(i,s,se,c,te,ae,z)||r!==null&&r.dependencies!==null&&nu(r.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,ae,z),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,ae,z)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ae),v.props=c,v.state=ae,v.context=z,c=se):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(i.flags|=1024),c=!1)}return v=c,Eu(r,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&c?(i.child=ao(i,r.child,null,m),i.child=ao(i,null,s,m)):Rn(r,i,s,m),i.memoizedState=v.state,r=i.child):r=Pa(r,i,m),r}function k1(r,i,s,c){return Xi(),i.flags|=256,Rn(r,i,s,c),i.child}var lp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cp(r){return{baseLanes:r,cachePool:Ry()}}function up(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=lr),r}function j1(r,i,s){var c=i.pendingProps,m=!1,v=(i.flags&128)!==0,x;if((x=v)||(x=r!==null&&r.memoizedState===null?!1:(Ht.current&2)!==0),x&&(m=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,r===null){if(ut){if(m?ui(i):di(),(r=Dt)?(r=Gb(r,Tr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=gy(r),s.return=i,i.child=s,wn=i,Dt=null)):r=null,r===null)throw ii(i);return qp(r)?i.lanes=32:i.lanes=536870912,null}var M=c.children;return c=c.fallback,m?(di(),m=i.mode,M=Su({mode:"hidden",children:M},m),c=Qi(c,m,s,null),M.return=i,c.return=i,M.sibling=c,i.child=M,c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(null,c)):(ui(i),dp(i,M))}var z=r.memoizedState;if(z!==null&&(M=z.dehydrated,M!==null)){if(v)i.flags&256?(ui(i),i.flags&=-257,i=fp(r,i,s)):i.memoizedState!==null?(di(),i.child=r.child,i.flags|=128,i=null):(di(),M=c.fallback,m=i.mode,c=Su({mode:"visible",children:c.children},m),M=Qi(M,m,s,null),M.flags|=2,c.return=i,M.return=i,c.sibling=M,i.child=c,ao(i,r.child,null,s),c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,i=Sl(null,c));else if(ui(i),qp(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var J=x.dgst;x=J,c=Error(a(419)),c.stack="",c.digest=x,ul({value:c,source:null,stack:null}),i=fp(r,i,s)}else if(Xt||es(r,i,s,!1),x=(s&r.childLanes)!==0,Xt||x){if(x=Ct,x!==null&&(c=Vn(x,s),c!==0&&c!==z.retryLane))throw z.retryLane=c,Zi(r,c),Kn(x,r,c),op;Gp(M)||Iu(),i=fp(r,i,s)}else Gp(M)?(i.flags|=192,i.child=r.child,i=null):(r=z.treeContext,Dt=Cr(M.nextSibling),wn=i,ut=!0,ai=null,Tr=!1,r!==null&&by(i,r),i=dp(i,c.children),i.flags|=4096);return i}return m?(di(),M=c.fallback,m=i.mode,z=r.child,J=z.sibling,c=Ca(z,{mode:"hidden",children:c.children}),c.subtreeFlags=z.subtreeFlags&65011712,J!==null?M=Ca(J,M):(M=Qi(M,m,s,null),M.flags|=2),M.return=i,c.return=i,c.sibling=M,i.child=c,Sl(null,c),c=i.child,M=r.child.memoizedState,M===null?M=cp(s):(m=M.cachePool,m!==null?(z=Zt._currentValue,m=m.parent!==z?{parent:z,pool:z}:m):m=Ry(),M={baseLanes:M.baseLanes|s,cachePool:m}),c.memoizedState=M,c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(r.child,c)):(ui(i),s=r.child,r=s.sibling,s=Ca(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,r!==null&&(x=i.deletions,x===null?(i.deletions=[r],i.flags|=16):x.push(r)),i.child=s,i.memoizedState=null,s)}function dp(r,i){return i=Su({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Su(r,i){return r=ar(22,r,null,i),r.lanes=0,r}function fp(r,i,s){return ao(i,r.child,null,s),r=dp(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function U1(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Th(r.return,i,s)}function hp(r,i,s,c,m,v){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:v}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=s,x.tailMode=m,x.treeForkCount=v)}function B1(r,i,s){var c=i.pendingProps,m=c.revealOrder,v=c.tail;c=c.children;var x=Ht.current,M=(x&2)!==0;if(M?(x=x&1|2,i.flags|=128):x&=1,ee(Ht,x),Rn(r,i,c,s),c=ut?cl:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&U1(r,s,i);else if(r.tag===19)U1(r,s,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)r=s.alternate,r!==null&&uu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),hp(i,!1,m,s,v,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&uu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}hp(i,!0,s,null,v,c);break;case"together":hp(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Pa(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),pi|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(es(r,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,s=Ca(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Ca(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function pp(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&nu(r)))}function dA(r,i,s){switch(i.tag){case 3:Se(i,i.stateNode.containerInfo),oi(i,Zt,r.memoizedState.cache),Xi();break;case 27:case 5:ke(i);break;case 4:Se(i,i.stateNode.containerInfo);break;case 10:oi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Bh(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ui(i),i.flags|=128,null):(s&i.child.childLanes)!==0?j1(r,i,s):(ui(i),r=Pa(r,i,s),r!==null?r.sibling:null);ui(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(es(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return B1(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ee(Ht,Ht.current),c)break;return null;case 22:return i.lanes=0,I1(r,i,s,i.pendingProps);case 24:oi(i,Zt,r.memoizedState.cache)}return Pa(r,i,s)}function z1(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Xt=!0;else{if(!pp(r,s)&&(i.flags&128)===0)return Xt=!1,dA(r,i,s);Xt=(r.flags&131072)!==0}else Xt=!1,ut&&(i.flags&1048576)!==0&&yy(i,cl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=no(i.elementType),i.type=r,typeof r=="function")bh(r)?(c=oo(r,c),i.tag=1,i=P1(null,i,r,c,s)):(i.tag=0,i=sp(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===O){i.tag=11,i=A1(null,i,r,c,s);break e}else if(m===N){i.tag=14,i=C1(null,i,r,c,s);break e}}throw i=ne(r)||r,Error(a(306,i,""))}}return i;case 0:return sp(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=oo(c,i.pendingProps),P1(r,i,c,m,s);case 3:e:{if(Se(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var v=i.memoizedState;m=v.element,Lh(r,i),vl(i,c,null,s);var x=i.memoizedState;if(c=x.cache,oi(i,Zt,c),c!==v.cache&&Ah(i,[Zt],s,!0),gl(),c=x.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=k1(r,i,c,s);break e}else if(c!==m){m=xr(Error(a(424)),i),ul(m),i=k1(r,i,c,s);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Dt=Cr(r.firstChild),wn=i,ut=!0,ai=null,Tr=!0,s=Iy(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xi(),c===m){i=Pa(r,i,s);break e}Rn(r,i,c,s)}i=i.child}return i;case 26:return Eu(r,i),r===null?(s=Qb(i.type,null,i.pendingProps,null))?i.memoizedState=s:ut||(s=i.type,r=i.pendingProps,c=Uu(be.current).createElement(s),c[Sn]=i,c[Fn]=r,On(c,s,r),pn(c),i.stateNode=c):i.memoizedState=Qb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return ke(i),r===null&&ut&&(c=i.stateNode=Kb(i.type,i.pendingProps,be.current),wn=i,Tr=!0,m=Dt,bi(i.type)?(Yp=m,Dt=Cr(c.firstChild)):Dt=m),Rn(r,i,i.pendingProps.children,s),Eu(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&ut&&((m=c=Dt)&&(c=VA(c,i.type,i.pendingProps,Tr),c!==null?(i.stateNode=c,wn=i,Dt=Cr(c.firstChild),Tr=!1,m=!0):m=!1),m||ii(i)),ke(i),m=i.type,v=i.pendingProps,x=r!==null?r.memoizedProps:null,c=v.children,Fp(m,v)?c=null:x!==null&&Fp(m,x)&&(i.flags|=32),i.memoizedState!==null&&(m=Vh(r,i,nA,null,null,s),jl._currentValue=m),Eu(r,i),Rn(r,i,c,s),i.child;case 6:return r===null&&ut&&((r=s=Dt)&&(s=FA(s,i.pendingProps,Tr),s!==null?(i.stateNode=s,wn=i,Dt=null,r=!0):r=!1),r||ii(i)),null;case 13:return j1(r,i,s);case 4:return Se(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ao(i,null,c,s):Rn(r,i,c,s),i.child;case 11:return A1(r,i,i.type,i.pendingProps,s);case 7:return Rn(r,i,i.pendingProps,s),i.child;case 8:return Rn(r,i,i.pendingProps.children,s),i.child;case 12:return Rn(r,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,oi(i,i.type,c.value),Rn(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,eo(i),m=xn(m),c=c(m),i.flags|=1,Rn(r,i,c,s),i.child;case 14:return C1(r,i,i.type,i.pendingProps,s);case 15:return M1(r,i,i.type,i.pendingProps,s);case 19:return B1(r,i,s);case 31:return uA(r,i,s);case 22:return I1(r,i,s,i.pendingProps);case 24:return eo(i),c=xn(Zt),r===null?(m=Ih(),m===null&&(m=Ct,v=Ch(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=s),m=v),i.memoizedState={parent:c,cache:m},Dh(i),oi(i,Zt,m)):((r.lanes&s)!==0&&(Lh(r,i),vl(i,null,null,s),gl()),m=r.memoizedState,v=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),oi(i,Zt,c)):(c=v.cache,oi(i,Zt,c),c!==m.cache&&Ah(i,[Zt],s,!0))),Rn(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function ka(r){r.flags|=4}function mp(r,i,s,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(hb())r.flags|=8192;else throw ro=ou,Nh}else r.flags&=-16777217}function V1(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!n_(i))if(hb())r.flags|=8192;else throw ro=ou,Nh}function wu(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?St():536870912,r.lanes|=i,fs|=i)}function wl(r,i){if(!ut)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Lt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(i)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,i}function fA(r,i,s){var c=i.pendingProps;switch(wh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(i),null;case 1:return Lt(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Na(Zt),Pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Jo(i)?ka(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Rh())),Lt(i),null;case 26:var m=i.type,v=i.memoizedState;return r===null?(ka(i),v!==null?(Lt(i),V1(i,v)):(Lt(i),mp(i,m,null,c,s))):v?v!==r.memoizedState?(ka(i),Lt(i),V1(i,v)):(Lt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&ka(i),Lt(i),mp(i,m,r,c,s)),null;case 27:if(Ee(i),s=be.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}r=oe.current,Jo(i)?_y(i):(r=Kb(m,c,s),i.stateNode=r,ka(i))}return Lt(i),null;case 5:if(Ee(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}if(v=oe.current,Jo(i))_y(i);else{var x=Uu(be.current);switch(v){case 1:v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":v=x.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?x.createElement("select",{is:c.is}):x.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?x.createElement(m,{is:c.is}):x.createElement(m)}}v[Sn]=i,v[Fn]=c;e:for(x=i.child;x!==null;){if(x.tag===5||x.tag===6)v.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=v;e:switch(On(v,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&ka(i)}}return Lt(i),mp(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=be.current,Jo(i)){if(r=i.stateNode,s=i.memoizedProps,c=null,m=wn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[Sn]=i,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||jb(r.nodeValue,s)),r||ii(i,!0)}else r=Uu(r).createTextNode(c),r[Sn]=i,i.stateNode=r}return Lt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Jo(i),s!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Sn]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),r=!1}else s=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(or(i),i):(or(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Lt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Jo(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Sn]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),m=!1}else m=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(or(i),i):(or(i),null)}return or(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==m&&(c.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),wu(i,i.updateQueue),Lt(i),null);case 4:return Pe(),r===null&&jp(i.stateNode.containerInfo),Lt(i),null;case 10:return Na(i.type),Lt(i),null;case 19:if(Z(Ht),c=i.memoizedState,c===null)return Lt(i),null;if(m=(i.flags&128)!==0,v=c.rendering,v===null)if(m)wl(c,!1);else{if(Vt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=uu(r),v!==null){for(i.flags|=128,wl(c,!1),r=v.updateQueue,i.updateQueue=r,wu(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)my(s,r),s=s.sibling;return ee(Ht,Ht.current&1|2),ut&&Ma(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&ce()>Au&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304)}else{if(!m)if(r=uu(v),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,wu(i,r),wl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!ut)return Lt(i),null}else 2*ce()-c.renderingStartTime>Au&&s!==536870912&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304);c.isBackwards?(v.sibling=i.child,i.child=v):(r=c.last,r!==null?r.sibling=v:i.child=v,c.last=v)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=ce(),r.sibling=null,s=Ht.current,ee(Ht,m?s&1|2:s&1),ut&&Ma(i,c.treeForkCount),r):(Lt(i),null);case 22:case 23:return or(i),Uh(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Lt(i),i.subtreeFlags&6&&(i.flags|=8192)):Lt(i),s=i.updateQueue,s!==null&&wu(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),r!==null&&Z(to),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Na(Zt),Lt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function hA(r,i){switch(wh(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Na(Zt),Pe(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Ee(i),null;case 31:if(i.memoizedState!==null){if(or(i),i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(or(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Z(Ht),null;case 4:return Pe(),null;case 10:return Na(i.type),null;case 22:case 23:return or(i),Uh(),r!==null&&Z(to),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Na(Zt),null;case 25:return null;default:return null}}function F1(r,i){switch(wh(i),i.tag){case 3:Na(Zt),Pe();break;case 26:case 27:case 5:Ee(i);break;case 4:Pe();break;case 31:i.memoizedState!==null&&or(i);break;case 13:or(i);break;case 19:Z(Ht);break;case 10:Na(i.type);break;case 22:case 23:or(i),Uh(),r!==null&&Z(to);break;case 24:Na(Zt)}}function xl(r,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var v=s.create,x=s.inst;c=v(),x.destroy=c}s=s.next}while(s!==m)}}catch(M){_t(i,i.return,M)}}function fi(r,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var v=m.next;c=v;do{if((c.tag&r)===r){var x=c.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,m=i;var z=s,J=M;try{J()}catch(se){_t(m,z,se)}}}c=c.next}while(c!==v)}}catch(se){_t(i,i.return,se)}}function H1(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{Dy(i,s)}catch(c){_t(r,r.return,c)}}}function $1(r,i,s){s.props=oo(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){_t(r,i,c)}}function Rl(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){_t(r,i,m)}}function aa(r,i){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){_t(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){_t(r,i,m)}else s.current=null}function G1(r){var i=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){_t(r,r.return,m)}}function gp(r,i,s){try{var c=r.stateNode;PA(c,r.type,s,i),c[Fn]=i}catch(m){_t(r,r.return,m)}}function q1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&bi(r.type)||r.tag===4}function vp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||q1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&bi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function yp(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Ta));else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(yp(r,i,s),r=r.sibling;r!==null;)yp(r,i,s),r=r.sibling}function xu(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(xu(r,i,s),r=r.sibling;r!==null;)xu(r,i,s),r=r.sibling}function Y1(r){var i=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);On(i,c,s),i[Sn]=r,i[Fn]=s}catch(v){_t(r,r.return,v)}}var ja=!1,Jt=!1,bp=!1,K1=typeof WeakSet=="function"?WeakSet:Set,mn=null;function pA(r,i){if(r=r.containerInfo,zp=Gu,r=oy(r),fh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var x=0,M=-1,z=-1,J=0,se=0,ue=r,te=null;t:for(;;){for(var ae;ue!==s||m!==0&&ue.nodeType!==3||(M=x+m),ue!==v||c!==0&&ue.nodeType!==3||(z=x+c),ue.nodeType===3&&(x+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)te=ue,ue=ae;for(;;){if(ue===r)break t;if(te===s&&++J===m&&(M=x),te===v&&++se===c&&(z=x),(ae=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=ae}s=M===-1||z===-1?null:{start:M,end:z}}else s=null}s=s||{start:0,end:0}}else s=null;for(Vp={focusedElem:r,selectionRange:s},Gu=!1,mn=i;mn!==null;)if(i=mn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,mn=r;else for(;mn!==null;){switch(i=mn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,s=i,m=v.memoizedProps,v=v.memoizedState,c=s.stateNode;try{var Ae=oo(s.type,m);r=c.getSnapshotBeforeUpdate(Ae,v),c.__reactInternalSnapshotBeforeUpdate=r}catch(Be){_t(s,s.return,Be)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)$p(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":$p(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,mn=r;break}mn=i.return}}function W1(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Ba(r,s),c&4&&xl(5,s);break;case 1:if(Ba(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(x){_t(s,s.return,x)}else{var m=oo(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(x){_t(s,s.return,x)}}c&64&&H1(s),c&512&&Rl(s,s.return);break;case 3:if(Ba(r,s),c&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Dy(r,i)}catch(x){_t(s,s.return,x)}}break;case 27:i===null&&c&4&&Y1(s);case 26:case 5:Ba(r,s),i===null&&c&4&&G1(s),c&512&&Rl(s,s.return);break;case 12:Ba(r,s);break;case 31:Ba(r,s),c&4&&X1(r,s);break;case 13:Ba(r,s),c&4&&J1(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=wA.bind(null,s),HA(r,s))));break;case 22:if(c=s.memoizedState!==null||ja,!c){i=i!==null&&i.memoizedState!==null||Jt,m=ja;var v=Jt;ja=c,(Jt=i)&&!v?za(r,s,(s.subtreeFlags&8772)!==0):Ba(r,s),ja=m,Jt=v}break;case 30:break;default:Ba(r,s)}}function Z1(r){var i=r.alternate;i!==null&&(r.alternate=null,Z1(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Wf(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var kt=null,$n=!1;function Ua(r,i,s){for(s=s.child;s!==null;)Q1(r,i,s),s=s.sibling}function Q1(r,i,s){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Kt,s)}catch{}switch(s.tag){case 26:Jt||aa(s,i),Ua(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Jt||aa(s,i);var c=kt,m=$n;bi(s.type)&&(kt=s.stateNode,$n=!1),Ua(r,i,s),Ll(s.stateNode),kt=c,$n=m;break;case 5:Jt||aa(s,i);case 6:if(c=kt,m=$n,kt=null,Ua(r,i,s),kt=c,$n=m,kt!==null)if($n)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(s.stateNode)}catch(v){_t(s,i,v)}else try{kt.removeChild(s.stateNode)}catch(v){_t(s,i,v)}break;case 18:kt!==null&&($n?(r=kt,Hb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),_s(r)):Hb(kt,s.stateNode));break;case 4:c=kt,m=$n,kt=s.stateNode.containerInfo,$n=!0,Ua(r,i,s),kt=c,$n=m;break;case 0:case 11:case 14:case 15:fi(2,s,i),Jt||fi(4,s,i),Ua(r,i,s);break;case 1:Jt||(aa(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&$1(s,i,c)),Ua(r,i,s);break;case 21:Ua(r,i,s);break;case 22:Jt=(c=Jt)||s.memoizedState!==null,Ua(r,i,s),Jt=c;break;default:Ua(r,i,s)}}function X1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{_s(r)}catch(s){_t(i,i.return,s)}}}function J1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{_s(r)}catch(s){_t(i,i.return,s)}}function mA(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new K1),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new K1),i;default:throw Error(a(435,r.tag))}}function Ru(r,i){var s=mA(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=xA.bind(null,r,c);c.then(m,m)}})}function Gn(r,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],v=r,x=i,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(bi(M.type)){kt=M.stateNode,$n=!1;break e}break;case 5:kt=M.stateNode,$n=!1;break e;case 3:case 4:kt=M.stateNode.containerInfo,$n=!0;break e}M=M.return}if(kt===null)throw Error(a(160));Q1(v,x,m),kt=null,$n=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)eb(i,r),i=i.sibling}var Fr=null;function eb(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Gn(i,r),qn(r),c&4&&(fi(3,r,r.return),xl(3,r),fi(5,r,r.return));break;case 1:Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),c&64&&ja&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Fr;if(Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),c&4){var v=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Xs]||v[Sn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(c),m.head.insertBefore(v,m.querySelector("head > title"))),On(v,c,s),v[Sn]=r,pn(v),c=v;break e;case"link":var x=e_("link","href",m).get(c+(s.href||""));if(x){for(var M=0;M<x.length;M++)if(v=x[M],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(M,1);break t}}v=m.createElement(c),On(v,c,s),m.head.appendChild(v);break;case"meta":if(x=e_("meta","content",m).get(c+(s.content||""))){for(M=0;M<x.length;M++)if(v=x[M],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(M,1);break t}}v=m.createElement(c),On(v,c,s),m.head.appendChild(v);break;default:throw Error(a(468,c))}v[Sn]=r,pn(v),c=v}r.stateNode=c}else t_(m,r.type,r.stateNode);else r.stateNode=Jb(m,c,r.memoizedProps);else v!==c?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,c===null?t_(m,r.type,r.stateNode):Jb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&gp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),s!==null&&c&4&&gp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),r.flags&32){m=r.stateNode;try{Ho(m,"")}catch(Ae){_t(r,r.return,Ae)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,gp(r,m,s!==null?s.memoizedProps:m)),c&1024&&(bp=!0);break;case 6:if(Gn(i,r),qn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(Ae){_t(r,r.return,Ae)}}break;case 3:if(Vu=null,m=Fr,Fr=Bu(i.containerInfo),Gn(i,r),Fr=m,qn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{_s(i.containerInfo)}catch(Ae){_t(r,r.return,Ae)}bp&&(bp=!1,tb(r));break;case 4:c=Fr,Fr=Bu(r.stateNode.containerInfo),Gn(i,r),qn(r),Fr=c;break;case 12:Gn(i,r),qn(r);break;case 31:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 13:Gn(i,r),qn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Tu=ce()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 22:m=r.memoizedState!==null;var z=s!==null&&s.memoizedState!==null,J=ja,se=Jt;if(ja=J||m,Jt=se||z,Gn(i,r),Jt=se,ja=J,qn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||z||ja||Jt||so(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){z=s=i;try{if(v=z.stateNode,m)x=v.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=z.stateNode;var ue=z.memoizedProps.style,te=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;M.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Ae){_t(z,z.return,Ae)}}}else if(i.tag===6){if(s===null){z=i;try{z.stateNode.nodeValue=m?"":z.memoizedProps}catch(Ae){_t(z,z.return,Ae)}}}else if(i.tag===18){if(s===null){z=i;try{var ae=z.stateNode;m?$b(ae,!0):$b(z.stateNode,!1)}catch(Ae){_t(z,z.return,Ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ru(r,s))));break;case 19:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 30:break;case 21:break;default:Gn(i,r),qn(r)}}function qn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(q1(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,v=vp(r);xu(r,v,m);break;case 5:var x=s.stateNode;s.flags&32&&(Ho(x,""),s.flags&=-33);var M=vp(r);xu(r,M,x);break;case 3:case 4:var z=s.stateNode.containerInfo,J=vp(r);yp(r,J,z);break;default:throw Error(a(161))}}catch(se){_t(r,r.return,se)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function tb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;tb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ba(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)W1(r,i.alternate,i),i=i.sibling}function so(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:fi(4,i,i.return),so(i);break;case 1:aa(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&$1(i,i.return,s),so(i);break;case 27:Ll(i.stateNode);case 26:case 5:aa(i,i.return),so(i);break;case 22:i.memoizedState===null&&so(i);break;case 30:so(i);break;default:so(i)}r=r.sibling}}function za(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,v=i,x=v.flags;switch(v.tag){case 0:case 11:case 15:za(m,v,s),xl(4,v);break;case 1:if(za(m,v,s),c=v,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(J){_t(c,c.return,J)}if(c=v,m=c.updateQueue,m!==null){var M=c.stateNode;try{var z=m.shared.hiddenCallbacks;if(z!==null)for(m.shared.hiddenCallbacks=null,m=0;m<z.length;m++)Ny(z[m],M)}catch(J){_t(c,c.return,J)}}s&&x&64&&H1(v),Rl(v,v.return);break;case 27:Y1(v);case 26:case 5:za(m,v,s),s&&c===null&&x&4&&G1(v),Rl(v,v.return);break;case 12:za(m,v,s);break;case 31:za(m,v,s),s&&x&4&&X1(m,v);break;case 13:za(m,v,s),s&&x&4&&J1(m,v);break;case 22:v.memoizedState===null&&za(m,v,s),Rl(v,v.return);break;case 30:break;default:za(m,v,s)}i=i.sibling}}function _p(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&dl(s))}function Ep(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r))}function Hr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nb(r,i,s,c),i=i.sibling}function nb(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Hr(r,i,s,c),m&2048&&xl(9,i);break;case 1:Hr(r,i,s,c);break;case 3:Hr(r,i,s,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r)));break;case 12:if(m&2048){Hr(r,i,s,c),r=i.stateNode;try{var v=i.memoizedProps,x=v.id,M=v.onPostCommit;typeof M=="function"&&M(x,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(z){_t(i,i.return,z)}}else Hr(r,i,s,c);break;case 31:Hr(r,i,s,c);break;case 13:Hr(r,i,s,c);break;case 23:break;case 22:v=i.stateNode,x=i.alternate,i.memoizedState!==null?v._visibility&2?Hr(r,i,s,c):Ol(r,i):v._visibility&2?Hr(r,i,s,c):(v._visibility|=2,cs(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&_p(x,i);break;case 24:Hr(r,i,s,c),m&2048&&Ep(i.alternate,i);break;default:Hr(r,i,s,c)}}function cs(r,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,x=i,M=s,z=c,J=x.flags;switch(x.tag){case 0:case 11:case 15:cs(v,x,M,z,m),xl(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?cs(v,x,M,z,m):Ol(v,x):(se._visibility|=2,cs(v,x,M,z,m)),m&&J&2048&&_p(x.alternate,x);break;case 24:cs(v,x,M,z,m),m&&J&2048&&Ep(x.alternate,x);break;default:cs(v,x,M,z,m)}i=i.sibling}}function Ol(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,c=i,m=c.flags;switch(c.tag){case 22:Ol(s,c),m&2048&&_p(c.alternate,c);break;case 24:Ol(s,c),m&2048&&Ep(c.alternate,c);break;default:Ol(s,c)}i=i.sibling}}var Tl=8192;function us(r,i,s){if(r.subtreeFlags&Tl)for(r=r.child;r!==null;)rb(r,i,s),r=r.sibling}function rb(r,i,s){switch(r.tag){case 26:us(r,i,s),r.flags&Tl&&r.memoizedState!==null&&tC(s,Fr,r.memoizedState,r.memoizedProps);break;case 5:us(r,i,s);break;case 3:case 4:var c=Fr;Fr=Bu(r.stateNode.containerInfo),us(r,i,s),Fr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Tl,Tl=16777216,us(r,i,s),Tl=c):us(r,i,s));break;default:us(r,i,s)}}function ab(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Al(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];mn=c,ob(c,r)}ab(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ib(r),r=r.sibling}function ib(r){switch(r.tag){case 0:case 11:case 15:Al(r),r.flags&2048&&fi(9,r,r.return);break;case 3:Al(r);break;case 12:Al(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Ou(r)):Al(r);break;default:Al(r)}}function Ou(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];mn=c,ob(c,r)}ab(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:fi(8,i,i.return),Ou(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Ou(i));break;default:Ou(i)}r=r.sibling}}function ob(r,i){for(;mn!==null;){var s=mn;switch(s.tag){case 0:case 11:case 15:fi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:dl(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,mn=c;else e:for(s=r;mn!==null;){c=mn;var m=c.sibling,v=c.return;if(Z1(c),c===s){mn=null;break e}if(m!==null){m.return=v,mn=m;break e}mn=v}}}var gA={getCacheForType:function(r){var i=xn(Zt),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return xn(Zt).controller.signal}},vA=typeof WeakMap=="function"?WeakMap:Map,vt=0,Ct=null,rt=null,st=0,bt=0,sr=null,hi=!1,ds=!1,Sp=!1,Va=0,Vt=0,pi=0,lo=0,wp=0,lr=0,fs=0,Cl=null,Yn=null,xp=!1,Tu=0,sb=0,Au=1/0,Cu=null,mi=null,ln=0,gi=null,hs=null,Fa=0,Rp=0,Op=null,lb=null,Ml=0,Tp=null;function cr(){return(vt&2)!==0&&st!==0?st&-st:P.T!==null?Dp():Yf()}function cb(){if(lr===0)if((st&536870912)===0||ut){var r=dt;dt<<=1,(dt&3932160)===0&&(dt=262144),lr=r}else lr=536870912;return r=ir.current,r!==null&&(r.flags|=32),lr}function Kn(r,i,s){(r===Ct&&(bt===2||bt===9)||r.cancelPendingCommit!==null)&&(ps(r,0),vi(r,st,lr,!1)),pt(r,s),((vt&2)===0||r!==Ct)&&(r===Ct&&((vt&2)===0&&(lo|=s),Vt===4&&vi(r,st,lr,!1)),ia(r))}function ub(r,i,s){if((vt&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||Xe(r,i),m=c?_A(r,i):Cp(r,i,!0),v=c;do{if(m===0){ds&&!c&&vi(r,i,0,!1);break}else{if(s=r.current.alternate,v&&!yA(s)){m=Cp(r,i,!1),v=!1;continue}if(m===2){if(v=i,r.errorRecoveryDisabledLanes&v)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;e:{var M=r;m=Cl;var z=M.current.memoizedState.isDehydrated;if(z&&(ps(M,x).flags|=256),x=Cp(M,x,!1),x!==2){if(Sp&&!z){M.errorRecoveryDisabledLanes|=v,lo|=v,m=4;break e}v=Yn,Yn=m,v!==null&&(Yn===null?Yn=v:Yn.push.apply(Yn,v))}m=x}if(v=!1,m!==2)continue}}if(m===1){ps(r,0),vi(r,i,0,!0);break}e:{switch(c=r,v=m,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:vi(c,i,lr,!hi);break e;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=Tu+300-ce(),10<m)){if(vi(c,i,lr,!hi),Ne(c,0,!0)!==0)break e;Fa=i,c.timeoutHandle=Vb(db.bind(null,c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,"Throttled",-0,0),m);break e}db(c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,null,-0,0)}}break}while(!0);ia(r)}function db(r,i,s,c,m,v,x,M,z,J,se,ue,te,ae){if(r.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},rb(i,v,ue);var Ae=(v&62914560)===v?Tu-ce():(v&4194048)===v?sb-ce():0;if(Ae=nC(ue,Ae),Ae!==null){Fa=v,r.cancelPendingCommit=Ae(bb.bind(null,r,i,v,s,c,m,x,M,z,se,ue,null,te,ae)),vi(r,v,x,!J);return}}bb(r,i,v,s,c,m,x,M,z)}function yA(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],v=m.getSnapshot;m=m.value;try{if(!rr(v(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function vi(r,i,s,c){i&=~wp,i&=~lo,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var v=31-Wt(m),x=1<<v;c[v]=-1,m&=~x}s!==0&&_r(r,s,i)}function Mu(){return(vt&6)===0?(Il(0),!1):!0}function Ap(){if(rt!==null){if(bt===0)var r=rt.return;else r=rt,Ia=Ji=null,$h(r),as=null,hl=0,r=rt;for(;r!==null;)F1(r.alternate,r),r=r.return;rt=null}}function ps(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,UA(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Fa=0,Ap(),Ct=r,rt=s=Ca(r.current,null),st=i,bt=0,sr=null,hi=!1,ds=Xe(r,i),Sp=!1,fs=lr=wp=lo=pi=Vt=0,Yn=Cl=null,xp=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-Wt(c),v=1<<m;i|=r[m],c&=~v}return Va=i,Qc(),s}function fb(r,i){qe=null,P.H=El,i===rs||i===iu?(i=Ay(),bt=3):i===Nh?(i=Ay(),bt=4):bt=i===op?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,sr=i,rt===null&&(Vt=1,bu(r,xr(i,r.current)))}function hb(){var r=ir.current;return r===null?!0:(st&4194048)===st?Ar===null:(st&62914560)===st||(st&536870912)!==0?r===Ar:!1}function pb(){var r=P.H;return P.H=El,r===null?El:r}function mb(){var r=P.A;return P.A=gA,r}function Iu(){Vt=4,hi||(st&4194048)!==st&&ir.current!==null||(ds=!0),(pi&134217727)===0&&(lo&134217727)===0||Ct===null||vi(Ct,st,lr,!1)}function Cp(r,i,s){var c=vt;vt|=2;var m=pb(),v=mb();(Ct!==r||st!==i)&&(Cu=null,ps(r,i)),i=!1;var x=Vt;e:do try{if(bt!==0&&rt!==null){var M=rt,z=sr;switch(bt){case 8:Ap(),x=6;break e;case 3:case 2:case 9:case 6:ir.current===null&&(i=!0);var J=bt;if(bt=0,sr=null,ms(r,M,z,J),s&&ds){x=0;break e}break;default:J=bt,bt=0,sr=null,ms(r,M,z,J)}}bA(),x=Vt;break}catch(se){fb(r,se)}while(!0);return i&&r.shellSuspendCounter++,Ia=Ji=null,vt=c,P.H=m,P.A=v,rt===null&&(Ct=null,st=0,Qc()),x}function bA(){for(;rt!==null;)gb(rt)}function _A(r,i){var s=vt;vt|=2;var c=pb(),m=mb();Ct!==r||st!==i?(Cu=null,Au=ce()+500,ps(r,i)):ds=Xe(r,i);e:do try{if(bt!==0&&rt!==null){i=rt;var v=sr;t:switch(bt){case 1:bt=0,sr=null,ms(r,i,v,1);break;case 2:case 9:if(Oy(v)){bt=0,sr=null,vb(i);break}i=function(){bt!==2&&bt!==9||Ct!==r||(bt=7),ia(r)},v.then(i,i);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:Oy(v)?(bt=0,sr=null,vb(i)):(bt=0,sr=null,ms(r,i,v,7));break;case 5:var x=null;switch(rt.tag){case 26:x=rt.memoizedState;case 5:case 27:var M=rt;if(x?n_(x):M.stateNode.complete){bt=0,sr=null;var z=M.sibling;if(z!==null)rt=z;else{var J=M.return;J!==null?(rt=J,Nu(J)):rt=null}break t}}bt=0,sr=null,ms(r,i,v,5);break;case 6:bt=0,sr=null,ms(r,i,v,6);break;case 8:Ap(),Vt=6;break e;default:throw Error(a(462))}}EA();break}catch(se){fb(r,se)}while(!0);return Ia=Ji=null,P.H=c,P.A=m,vt=s,rt!==null?0:(Ct=null,st=0,Qc(),Vt)}function EA(){for(;rt!==null&&!q();)gb(rt)}function gb(r){var i=z1(r.alternate,r,Va);r.memoizedProps=r.pendingProps,i===null?Nu(r):rt=i}function vb(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=L1(s,i,i.pendingProps,i.type,void 0,st);break;case 11:i=L1(s,i,i.pendingProps,i.type.render,i.ref,st);break;case 5:$h(i);default:F1(s,i),i=rt=my(i,Va),i=z1(s,i,Va)}r.memoizedProps=r.pendingProps,i===null?Nu(r):rt=i}function ms(r,i,s,c){Ia=Ji=null,$h(i),as=null,hl=0;var m=i.return;try{if(cA(r,m,i,s,st)){Vt=1,bu(r,xr(s,r.current)),rt=null;return}}catch(v){if(m!==null)throw rt=m,v;Vt=1,bu(r,xr(s,r.current)),rt=null;return}i.flags&32768?(ut||c===1?r=!0:ds||(st&536870912)!==0?r=!1:(hi=r=!0,(c===2||c===9||c===3||c===6)&&(c=ir.current,c!==null&&c.tag===13&&(c.flags|=16384))),yb(i,r)):Nu(i)}function Nu(r){var i=r;do{if((i.flags&32768)!==0){yb(i,hi);return}r=i.return;var s=fA(i.alternate,i,Va);if(s!==null){rt=s;return}if(i=i.sibling,i!==null){rt=i;return}rt=i=r}while(i!==null);Vt===0&&(Vt=5)}function yb(r,i){do{var s=hA(r.alternate,r);if(s!==null){s.flags&=32767,rt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){rt=r;return}rt=r=s}while(r!==null);Vt=6,rt=null}function bb(r,i,s,c,m,v,x,M,z){r.cancelPendingCommit=null;do Du();while(ln!==0);if((vt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=vh,Nt(r,s,v,x,M,z),r===Ct&&(rt=Ct=null,st=0),hs=i,gi=r,Fa=s,Rp=v,Op=m,lb=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,RA($e,function(){return xb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=V.p,V.p=2,x=vt,vt|=4;try{pA(r,i,s)}finally{vt=x,V.p=m,P.T=c}}ln=1,_b(),Eb(),Sb()}}function _b(){if(ln===1){ln=0;var r=gi,i=hs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=V.p;V.p=2;var m=vt;vt|=4;try{eb(i,r);var v=Vp,x=oy(r.containerInfo),M=v.focusedElem,z=v.selectionRange;if(x!==M&&M&&M.ownerDocument&&iy(M.ownerDocument.documentElement,M)){if(z!==null&&fh(M)){var J=z.start,se=z.end;if(se===void 0&&(se=J),"selectionStart"in M)M.selectionStart=J,M.selectionEnd=Math.min(se,M.value.length);else{var ue=M.ownerDocument||document,te=ue&&ue.defaultView||window;if(te.getSelection){var ae=te.getSelection(),Ae=M.textContent.length,Be=Math.min(z.start,Ae),Rt=z.end===void 0?Be:Math.min(z.end,Ae);!ae.extend&&Be>Rt&&(x=Rt,Rt=Be,Be=x);var K=ay(M,Be),H=ay(M,Rt);if(K&&H&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var X=ue.createRange();X.setStart(K.node,K.offset),ae.removeAllRanges(),Be>Rt?(ae.addRange(X),ae.extend(H.node,H.offset)):(X.setEnd(H.node,H.offset),ae.addRange(X))}}}}for(ue=[],ae=M;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ue.length;M++){var le=ue[M];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Gu=!!zp,Vp=zp=null}finally{vt=m,V.p=c,P.T=s}}r.current=i,ln=2}}function Eb(){if(ln===2){ln=0;var r=gi,i=hs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=V.p;V.p=2;var m=vt;vt|=4;try{W1(r,i.alternate,i)}finally{vt=m,V.p=c,P.T=s}}ln=3}}function Sb(){if(ln===4||ln===3){ln=0,Y();var r=gi,i=hs,s=Fa,c=lb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ln=5:(ln=0,hs=gi=null,wb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(mi=null),zr(s),i=i.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Kt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=P.T,m=V.p,V.p=2,P.T=null;try{for(var v=r.onRecoverableError,x=0;x<c.length;x++){var M=c[x];v(M.value,{componentStack:M.stack})}}finally{P.T=i,V.p=m}}(Fa&3)!==0&&Du(),ia(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Tp?Ml++:(Ml=0,Tp=r):Ml=0,Il(0)}}function wb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,dl(i)))}function Du(){return _b(),Eb(),Sb(),xb()}function xb(){if(ln!==5)return!1;var r=gi,i=Rp;Rp=0;var s=zr(Fa),c=P.T,m=V.p;try{V.p=32>s?32:s,P.T=null,s=Op,Op=null;var v=gi,x=Fa;if(ln=0,hs=gi=null,Fa=0,(vt&6)!==0)throw Error(a(331));var M=vt;if(vt|=4,ib(v.current),nb(v,v.current,x,s),vt=M,Il(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{V.p=m,P.T=c,wb(r,i)}}function Rb(r,i,s){i=xr(s,i),i=ip(r.stateNode,i,2),r=ci(r,i,2),r!==null&&(pt(r,2),ia(r))}function _t(r,i,s){if(r.tag===3)Rb(r,r,s);else for(;i!==null;){if(i.tag===3){Rb(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mi===null||!mi.has(c))){r=xr(s,r),s=O1(2),c=ci(i,s,2),c!==null&&(T1(s,c,i,r),pt(c,2),ia(c));break}}i=i.return}}function Mp(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new vA;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(Sp=!0,m.add(s),r=SA.bind(null,r,i,s),i.then(r,r))}function SA(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Ct===r&&(st&s)===s&&(Vt===4||Vt===3&&(st&62914560)===st&&300>ce()-Tu?(vt&2)===0&&ps(r,0):wp|=s,fs===st&&(fs=0)),ia(r)}function Ob(r,i){i===0&&(i=St()),r=Zi(r,i),r!==null&&(pt(r,i),ia(r))}function wA(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),Ob(r,s)}function xA(r,i){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),Ob(r,s)}function RA(r,i){return tt(r,i)}var Lu=null,gs=null,Ip=!1,Pu=!1,Np=!1,yi=0;function ia(r){r!==gs&&r.next===null&&(gs===null?Lu=gs=r:gs=gs.next=r),Pu=!0,Ip||(Ip=!0,TA())}function Il(r,i){if(!Np&&Pu){Np=!0;do for(var s=!1,c=Lu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var v=0;else{var x=c.suspendedLanes,M=c.pingedLanes;v=(1<<31-Wt(42|r)+1)-1,v&=m&~(x&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,Mb(c,v))}else v=st,v=Ne(c,c===Ct?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||Xe(c,v)||(s=!0,Mb(c,v));c=c.next}while(s);Np=!1}}function OA(){Tb()}function Tb(){Pu=Ip=!1;var r=0;yi!==0&&jA()&&(r=yi);for(var i=ce(),s=null,c=Lu;c!==null;){var m=c.next,v=Ab(c,i);v===0?(c.next=null,s===null?Lu=m:s.next=m,m===null&&(gs=s)):(s=c,(r!==0||(v&3)!==0)&&(Pu=!0)),c=m}ln!==0&&ln!==5||Il(r),yi!==0&&(yi=0)}function Ab(r,i){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var x=31-Wt(v),M=1<<x,z=m[x];z===-1?((M&s)===0||(M&c)!==0)&&(m[x]=At(M,i)):z<=i&&(r.expiredLanes|=M),v&=~M}if(i=Ct,s=st,s=Ne(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===i&&(bt===2||bt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&B(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Xe(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&B(c),zr(s)){case 2:case 8:s=xe;break;case 32:s=$e;break;case 268435456:s=Tt;break;default:s=$e}return c=Cb.bind(null,r),s=tt(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&B(c),r.callbackPriority=2,r.callbackNode=null,2}function Cb(r,i){if(ln!==0&&ln!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Du()&&r.callbackNode!==s)return null;var c=st;return c=Ne(r,r===Ct?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(ub(r,c,i),Ab(r,ce()),r.callbackNode!=null&&r.callbackNode===s?Cb.bind(null,r):null)}function Mb(r,i){if(Du())return null;ub(r,i,!0)}function TA(){BA(function(){(vt&6)!==0?tt(fe,OA):Tb()})}function Dp(){if(yi===0){var r=ts;r===0&&(r=ot,ot<<=1,(ot&261888)===0&&(ot=256)),yi=r}return yi}function Ib(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Hc(""+r)}function Nb(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function AA(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var v=Ib((m[Fn]||null).action),x=c.submitter;x&&(i=(i=x[Fn]||null)?Ib(i.formAction):x.getAttribute("formAction"),i!==null&&(v=i,x=null));var M=new Yc("action","action",null,c,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(yi!==0){var z=x?Nb(m,x):new FormData(m);Jh(s,{pending:!0,data:z,method:m.method,action:v},null,z)}}else typeof v=="function"&&(M.preventDefault(),z=x?Nb(m,x):new FormData(m),Jh(s,{pending:!0,data:z,method:m.method,action:v},v,z))},currentTarget:m}]})}}for(var Lp=0;Lp<gh.length;Lp++){var Pp=gh[Lp],CA=Pp.toLowerCase(),MA=Pp[0].toUpperCase()+Pp.slice(1);Vr(CA,"on"+MA)}Vr(cy,"onAnimationEnd"),Vr(uy,"onAnimationIteration"),Vr(dy,"onAnimationStart"),Vr("dblclick","onDoubleClick"),Vr("focusin","onFocus"),Vr("focusout","onBlur"),Vr(qT,"onTransitionRun"),Vr(YT,"onTransitionStart"),Vr(KT,"onTransitionCancel"),Vr(fy,"onTransitionEnd"),Vo("onMouseEnter",["mouseout","mouseover"]),Vo("onMouseLeave",["mouseout","mouseover"]),Vo("onPointerEnter",["pointerout","pointerover"]),Vo("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Nl));function Db(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var v=void 0;if(i)for(var x=c.length-1;0<=x;x--){var M=c[x],z=M.instance,J=M.currentTarget;if(M=M.listener,z!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(se){Zc(se)}m.currentTarget=null,v=z}else for(x=0;x<c.length;x++){if(M=c[x],z=M.instance,J=M.currentTarget,M=M.listener,z!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(se){Zc(se)}m.currentTarget=null,v=z}}}}function at(r,i){var s=i[Kf];s===void 0&&(s=i[Kf]=new Set);var c=r+"__bubble";s.has(c)||(Lb(i,r,2,!1),s.add(c))}function kp(r,i,s){var c=0;i&&(c|=4),Lb(s,r,c,i)}var ku="_reactListening"+Math.random().toString(36).slice(2);function jp(r){if(!r[ku]){r[ku]=!0,T0.forEach(function(s){s!=="selectionchange"&&(IA.has(s)||kp(s,!1,r),kp(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ku]||(i[ku]=!0,kp("selectionchange",!1,i))}}function Lb(r,i,s,c){switch(c_(i)){case 2:var m=iC;break;case 8:m=oC;break;default:m=Xp}s=m.bind(null,i,s,r),m=void 0,!rh||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,s,{capture:!0,passive:m}):r.addEventListener(i,s,!0):m!==void 0?r.addEventListener(i,s,{passive:m}):r.addEventListener(i,s,!1)}function Up(r,i,s,c,m){var v=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var M=c.stateNode.containerInfo;if(M===m)break;if(x===4)for(x=c.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;M!==null;){if(x=Uo(M),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){c=v=x;continue e}M=M.parentNode}}c=c.return}B0(function(){var J=v,se=th(s),ue=[];e:{var te=hy.get(r);if(te!==void 0){var ae=Yc,Ae=r;switch(r){case"keypress":if(Gc(s)===0)break e;case"keydown":case"keyup":ae=xT;break;case"focusin":Ae="focus",ae=sh;break;case"focusout":Ae="blur",ae=sh;break;case"beforeblur":case"afterblur":ae=sh;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=F0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=fT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=TT;break;case cy:case uy:case dy:ae=mT;break;case fy:ae=CT;break;case"scroll":case"scrollend":ae=uT;break;case"wheel":ae=IT;break;case"copy":case"cut":case"paste":ae=vT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=$0;break;case"toggle":case"beforetoggle":ae=DT}var Be=(i&4)!==0,Rt=!Be&&(r==="scroll"||r==="scrollend"),K=Be?te!==null?te+"Capture":null:te;Be=[];for(var H=J,X;H!==null;){var le=H;if(X=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||X===null||K===null||(le=el(H,K),le!=null&&Be.push(Dl(H,le,X))),Rt)break;H=H.return}0<Be.length&&(te=new ae(te,Ae,null,s,se),ue.push({event:te,listeners:Be}))}}if((i&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",ae=r==="mouseout"||r==="pointerout",te&&s!==eh&&(Ae=s.relatedTarget||s.fromElement)&&(Uo(Ae)||Ae[jo]))break e;if((ae||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(Ae=s.relatedTarget||s.toElement,ae=J,Ae=Ae?Uo(Ae):null,Ae!==null&&(Rt=l(Ae),Be=Ae.tag,Ae!==Rt||Be!==5&&Be!==27&&Be!==6)&&(Ae=null)):(ae=null,Ae=J),ae!==Ae)){if(Be=F0,le="onMouseLeave",K="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(Be=$0,le="onPointerLeave",K="onPointerEnter",H="pointer"),Rt=ae==null?te:Js(ae),X=Ae==null?te:Js(Ae),te=new Be(le,H+"leave",ae,s,se),te.target=Rt,te.relatedTarget=X,le=null,Uo(se)===J&&(Be=new Be(K,H+"enter",Ae,s,se),Be.target=X,Be.relatedTarget=Rt,le=Be),Rt=le,ae&&Ae)t:{for(Be=NA,K=ae,H=Ae,X=0,le=K;le;le=Be(le))X++;le=0;for(var je=H;je;je=Be(je))le++;for(;0<X-le;)K=Be(K),X--;for(;0<le-X;)H=Be(H),le--;for(;X--;){if(K===H||H!==null&&K===H.alternate){Be=K;break t}K=Be(K),H=Be(H)}Be=null}else Be=null;ae!==null&&Pb(ue,te,ae,Be,!1),Ae!==null&&Rt!==null&&Pb(ue,Rt,Ae,Be,!0)}}e:{if(te=J?Js(J):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var mt=X0;else if(Z0(te))if(J0)mt=HT;else{mt=VT;var De=zT}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Jf(J.elementType)&&(mt=X0):mt=FT;if(mt&&(mt=mt(r,J))){Q0(ue,mt,s,se);break e}De&&De(r,te,J),r==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&Xf(te,"number",te.value)}switch(De=J?Js(J):window,r){case"focusin":(Z0(De)||De.contentEditable==="true")&&(Yo=De,hh=J,ll=null);break;case"focusout":ll=hh=Yo=null;break;case"mousedown":ph=!0;break;case"contextmenu":case"mouseup":case"dragend":ph=!1,sy(ue,s,se);break;case"selectionchange":if(GT)break;case"keydown":case"keyup":sy(ue,s,se)}var Ye;if(ch)e:{switch(r){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else qo?K0(r,s)&&(lt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(lt="onCompositionStart");lt&&(G0&&s.locale!=="ko"&&(qo||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&qo&&(Ye=z0()):(ni=se,ah="value"in ni?ni.value:ni.textContent,qo=!0)),De=ju(J,lt),0<De.length&&(lt=new H0(lt,r,null,s,se),ue.push({event:lt,listeners:De}),Ye?lt.data=Ye:(Ye=W0(s),Ye!==null&&(lt.data=Ye)))),(Ye=PT?kT(r,s):jT(r,s))&&(lt=ju(J,"onBeforeInput"),0<lt.length&&(De=new H0("onBeforeInput","beforeinput",null,s,se),ue.push({event:De,listeners:lt}),De.data=Ye)),AA(ue,r,J,s,se)}Db(ue,i)})}function Dl(r,i,s){return{instance:r,listener:i,currentTarget:s}}function ju(r,i){for(var s=i+"Capture",c=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=el(r,s),m!=null&&c.unshift(Dl(r,m,v)),m=el(r,i),m!=null&&c.push(Dl(r,m,v))),r.tag===3)return c;r=r.return}return[]}function NA(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Pb(r,i,s,c,m){for(var v=i._reactName,x=[];s!==null&&s!==c;){var M=s,z=M.alternate,J=M.stateNode;if(M=M.tag,z!==null&&z===c)break;M!==5&&M!==26&&M!==27||J===null||(z=J,m?(J=el(s,v),J!=null&&x.unshift(Dl(s,J,z))):m||(J=el(s,v),J!=null&&x.push(Dl(s,J,z)))),s=s.return}x.length!==0&&r.push({event:i,listeners:x})}var DA=/\r\n?/g,LA=/\u0000|\uFFFD/g;function kb(r){return(typeof r=="string"?r:""+r).replace(DA,`
|
|
10
|
+
`).replace(LA,"")}function jb(r,i){return i=kb(i),kb(r)===i}function xt(r,i,s,c,m,v){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ho(r,""+c);break;case"className":Vc(r,"class",c);break;case"tabIndex":Vc(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Vc(r,s,c);break;case"style":j0(r,c,v);break;case"data":if(i!=="object"){Vc(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(s==="formAction"?(i!=="input"&&xt(r,i,"name",m.name,m,null),xt(r,i,"formEncType",m.formEncType,m,null),xt(r,i,"formMethod",m.formMethod,m,null),xt(r,i,"formTarget",m.formTarget,m,null)):(xt(r,i,"encType",m.encType,m,null),xt(r,i,"method",m.method,m,null),xt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Ta);break;case"onScroll":c!=null&&at("scroll",r);break;case"onScrollEnd":c!=null&&at("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Hc(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":at("beforetoggle",r),at("toggle",r),zc(r,"popover",c);break;case"xlinkActuate":Oa(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Oa(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Oa(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Oa(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Oa(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Oa(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zc(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=lT.get(s)||s,zc(r,s,c))}}function Bp(r,i,s,c,m,v){switch(s){case"style":j0(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&Ho(r,""+c);break;case"onScroll":c!=null&&at("scroll",r);break;case"onScrollEnd":c!=null&&at("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!A0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),v=r[Fn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):zc(r,s,c)}}}function On(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",r),at("load",r);var c=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var x=s[v];if(x!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:xt(r,i,v,x,s,null)}}m&&xt(r,i,"srcSet",s.srcSet,s,null),c&&xt(r,i,"src",s.src,s,null);return;case"input":at("invalid",r);var M=v=x=m=null,z=null,J=null;for(c in s)if(s.hasOwnProperty(c)){var se=s[c];if(se!=null)switch(c){case"name":m=se;break;case"type":x=se;break;case"checked":z=se;break;case"defaultChecked":J=se;break;case"value":v=se;break;case"defaultValue":M=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:xt(r,i,c,se,s,null)}}D0(r,v,M,z,J,x,m,!1);return;case"select":at("invalid",r),c=x=v=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":v=M;break;case"defaultValue":x=M;break;case"multiple":c=M;default:xt(r,i,m,M,s,null)}i=v,s=x,r.multiple=!!c,i!=null?Fo(r,!!c,i,!1):s!=null&&Fo(r,!!c,s,!0);return;case"textarea":at("invalid",r),v=m=c=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":c=M;break;case"defaultValue":m=M;break;case"children":v=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:xt(r,i,x,M,s,null)}P0(r,c,m,v);return;case"option":for(z in s)s.hasOwnProperty(z)&&(c=s[z],c!=null)&&(z==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":xt(r,i,z,c,s,null));return;case"dialog":at("beforetoggle",r),at("toggle",r),at("cancel",r),at("close",r);break;case"iframe":case"object":at("load",r);break;case"video":case"audio":for(c=0;c<Nl.length;c++)at(Nl[c],r);break;case"image":at("error",r),at("load",r);break;case"details":at("toggle",r);break;case"embed":case"source":case"link":at("error",r),at("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in s)if(s.hasOwnProperty(J)&&(c=s[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:xt(r,i,J,c,s,null)}return;default:if(Jf(i)){for(se in s)s.hasOwnProperty(se)&&(c=s[se],c!==void 0&&Bp(r,i,se,c,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null&&xt(r,i,M,c,s,null))}function PA(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,x=null,M=null,z=null,J=null,se=null;for(ae in s){var ue=s[ae];if(s.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":z=ue;default:c.hasOwnProperty(ae)||xt(r,i,ae,null,c,ue)}}for(var te in c){var ae=c[te];if(ue=s[te],c.hasOwnProperty(te)&&(ae!=null||ue!=null))switch(te){case"type":v=ae;break;case"name":m=ae;break;case"checked":J=ae;break;case"defaultChecked":se=ae;break;case"value":x=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(a(137,i));break;default:ae!==ue&&xt(r,i,te,ae,c,ue)}}Qf(r,x,M,z,J,se,v,m);return;case"select":ae=x=M=te=null;for(v in s)if(z=s[v],s.hasOwnProperty(v)&&z!=null)switch(v){case"value":break;case"multiple":ae=z;default:c.hasOwnProperty(v)||xt(r,i,v,null,c,z)}for(m in c)if(v=c[m],z=s[m],c.hasOwnProperty(m)&&(v!=null||z!=null))switch(m){case"value":te=v;break;case"defaultValue":M=v;break;case"multiple":x=v;default:v!==z&&xt(r,i,m,v,c,z)}i=M,s=x,c=ae,te!=null?Fo(r,!!s,te,!1):!!c!=!!s&&(i!=null?Fo(r,!!s,i,!0):Fo(r,!!s,s?[]:"",!1));return;case"textarea":ae=te=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!c.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:xt(r,i,M,null,c,m)}for(x in c)if(m=c[x],v=s[x],c.hasOwnProperty(x)&&(m!=null||v!=null))switch(x){case"value":te=m;break;case"defaultValue":ae=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&xt(r,i,x,m,c,v)}L0(r,te,ae);return;case"option":for(var Ae in s)te=s[Ae],s.hasOwnProperty(Ae)&&te!=null&&!c.hasOwnProperty(Ae)&&(Ae==="selected"?r.selected=!1:xt(r,i,Ae,null,c,te));for(z in c)te=c[z],ae=s[z],c.hasOwnProperty(z)&&te!==ae&&(te!=null||ae!=null)&&(z==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":xt(r,i,z,te,c,ae));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Be in s)te=s[Be],s.hasOwnProperty(Be)&&te!=null&&!c.hasOwnProperty(Be)&&xt(r,i,Be,null,c,te);for(J in c)if(te=c[J],ae=s[J],c.hasOwnProperty(J)&&te!==ae&&(te!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(a(137,i));break;default:xt(r,i,J,te,c,ae)}return;default:if(Jf(i)){for(var Rt in s)te=s[Rt],s.hasOwnProperty(Rt)&&te!==void 0&&!c.hasOwnProperty(Rt)&&Bp(r,i,Rt,void 0,c,te);for(se in c)te=c[se],ae=s[se],!c.hasOwnProperty(se)||te===ae||te===void 0&&ae===void 0||Bp(r,i,se,te,c,ae);return}}for(var K in s)te=s[K],s.hasOwnProperty(K)&&te!=null&&!c.hasOwnProperty(K)&&xt(r,i,K,null,c,te);for(ue in c)te=c[ue],ae=s[ue],!c.hasOwnProperty(ue)||te===ae||te==null&&ae==null||xt(r,i,ue,te,c,ae)}function Ub(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],v=m.transferSize,x=m.initiatorType,M=m.duration;if(v&&M&&Ub(x)){for(x=0,M=m.responseEnd,c+=1;c<s.length;c++){var z=s[c],J=z.startTime;if(J>M)break;var se=z.transferSize,ue=z.initiatorType;se&&Ub(ue)&&(z=z.responseEnd,x+=se*(z<M?1:(M-J)/(z-J)))}if(--c,i+=8*(v+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var zp=null,Vp=null;function Uu(r){return r.nodeType===9?r:r.ownerDocument}function Bb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Fp(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Hp=null;function jA(){var r=window.event;return r&&r.type==="popstate"?r===Hp?!1:(Hp=r,!0):(Hp=null,!1)}var Vb=typeof setTimeout=="function"?setTimeout:void 0,UA=typeof clearTimeout=="function"?clearTimeout:void 0,Fb=typeof Promise=="function"?Promise:void 0,BA=typeof queueMicrotask=="function"?queueMicrotask:typeof Fb<"u"?function(r){return Fb.resolve(null).then(r).catch(zA)}:Vb;function zA(r){setTimeout(function(){throw r})}function bi(r){return r==="head"}function Hb(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),_s(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ll(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ll(s);for(var v=s.firstChild;v;){var x=v.nextSibling,M=v.nodeName;v[Xs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=x}}else s==="body"&&Ll(r.ownerDocument.body);s=m}while(s);_s(i)}function $b(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function $p(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$p(s),Wf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function VA(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Xs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Cr(r.nextSibling),r===null)break}return null}function FA(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Cr(r.nextSibling),r===null))return null;return r}function Gb(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Cr(r.nextSibling),r===null))return null;return r}function Gp(r){return r.data==="$?"||r.data==="$~"}function qp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function HA(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Cr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Yp=null;function qb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Cr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function Yb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Kb(r,i,s){switch(i=Uu(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ll(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Wf(r)}var Mr=new Map,Wb=new Set;function Bu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ha=V.d;V.d={f:$A,r:GA,D:qA,C:YA,L:KA,m:WA,X:QA,S:ZA,M:XA};function $A(){var r=Ha.f(),i=Mu();return r||i}function GA(r){var i=Bo(r);i!==null&&i.tag===5&&i.type==="form"?f1(i):Ha.r(r)}var vs=typeof document>"u"?null:document;function Zb(r,i,s){var c=vs;if(c&&typeof i=="string"&&i){var m=Sr(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Wb.has(m)||(Wb.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),On(i,"link",r),pn(i),c.head.appendChild(i)))}}function qA(r){Ha.D(r),Zb("dns-prefetch",r,null)}function YA(r,i){Ha.C(r,i),Zb("preconnect",r,i)}function KA(r,i,s){Ha.L(r,i,s);var c=vs;if(c&&r&&i){var m='link[rel="preload"][as="'+Sr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Sr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Sr(s.imageSizes)+'"]')):m+='[href="'+Sr(r)+'"]';var v=m;switch(i){case"style":v=ys(r);break;case"script":v=bs(r)}Mr.has(v)||(r=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Mr.set(v,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Pl(v))||i==="script"&&c.querySelector(kl(v))||(i=c.createElement("link"),On(i,"link",r),pn(i),c.head.appendChild(i)))}}function WA(r,i){Ha.m(r,i);var s=vs;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Sr(c)+'"][href="'+Sr(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=bs(r)}if(!Mr.has(v)&&(r=p({rel:"modulepreload",href:r},i),Mr.set(v,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(kl(v)))return}c=s.createElement("link"),On(c,"link",r),pn(c),s.head.appendChild(c)}}}function ZA(r,i,s){Ha.S(r,i,s);var c=vs;if(c&&r){var m=zo(c).hoistableStyles,v=ys(r);i=i||"default";var x=m.get(v);if(!x){var M={loading:0,preload:null};if(x=c.querySelector(Pl(v)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Mr.get(v))&&Kp(r,s);var z=x=c.createElement("link");pn(z),On(z,"link",r),z._p=new Promise(function(J,se){z.onload=J,z.onerror=se}),z.addEventListener("load",function(){M.loading|=1}),z.addEventListener("error",function(){M.loading|=2}),M.loading|=4,zu(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(v,x)}}}function QA(r,i){Ha.X(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),pn(v),On(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function XA(r,i){Ha.M(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0,type:"module"},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),pn(v),On(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Qb(r,i,s,c){var m=(m=be.current)?Bu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ys(s.href),s=zo(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ys(s.href);var v=zo(m).hoistableStyles,x=v.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,x),(v=m.querySelector(Pl(r)))&&!v._p&&(x.instance=v,x.state.loading=5),Mr.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Mr.set(r,s),v||JA(m,r,s,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bs(s),s=zo(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ys(r){return'href="'+Sr(r)+'"'}function Pl(r){return'link[rel="stylesheet"]['+r+"]"}function Xb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function JA(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),On(i,"link",s),pn(i),r.head.appendChild(i))}function bs(r){return'[src="'+Sr(r)+'"]'}function kl(r){return"script[async]"+r}function Jb(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Sr(s.href)+'"]');if(c)return i.instance=c,pn(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),pn(c),On(c,"style",m),zu(c,s.precedence,r),i.instance=c;case"stylesheet":m=ys(s.href);var v=r.querySelector(Pl(m));if(v)return i.state.loading|=4,i.instance=v,pn(v),v;c=Xb(s),(m=Mr.get(m))&&Kp(c,m),v=(r.ownerDocument||r).createElement("link"),pn(v);var x=v;return x._p=new Promise(function(M,z){x.onload=M,x.onerror=z}),On(v,"link",c),i.state.loading|=4,zu(v,s.precedence,r),i.instance=v;case"script":return v=bs(s.src),(m=r.querySelector(kl(v)))?(i.instance=m,pn(m),m):(c=s,(m=Mr.get(v))&&(c=p({},s),Wp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),pn(m),On(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,zu(c,s.precedence,r));return i.instance}function zu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,x=0;x<c.length;x++){var M=c[x];if(M.dataset.precedence===i)v=M;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function Kp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Wp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Vu=null;function e_(r,i,s){if(Vu===null){var c=new Map,m=Vu=new Map;m.set(s,c)}else m=Vu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Xs]||v[Sn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var x=v.getAttribute(i)||"";x=r+x;var M=c.get(x);M?M.push(v):c.set(x,[v])}}return c}function t_(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function eC(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function n_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function tC(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ys(c.href),v=i.querySelector(Pl(m));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Fu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,pn(v);return}v=i.ownerDocument||i,c=Xb(c),(m=Mr.get(m))&&Kp(c,m),v=v.createElement("link"),pn(v);var x=v;x._p=new Promise(function(M,z){x.onload=M,x.onerror=z}),On(v,"link",c),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Fu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Zp=0;function nC(r,i){return r.stylesheets&&r.count===0&&$u(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Zp===0&&(Zp=62500*kA());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Zp?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hu=null;function $u(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hu=new Map,i.forEach(rC,r),Hu=null,Fu.call(r))}function rC(r,i){if(!(i.state.loading&4)){var s=Hu.get(r);if(s)var c=s.get(null);else{s=new Map,Hu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var x=m[v];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),c=x)}c&&s.set(null,c)}m=i.instance,x=m.getAttribute("data-precedence"),v=s.get(x)||c,v===c&&s.set(null,m),s.set(x,m),this.count++,c=Fu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var jl={$$typeof:C,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function aC(r,i,s,c,m,v,x,M,z){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function r_(r,i,s,c,m,v,x,M,z,J,se,ue){return r=new aC(r,i,s,x,z,J,se,ue,M),i=1,v===!0&&(i|=24),v=ar(3,null,null,i),r.current=v,v.stateNode=r,i=Ch(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:i},Dh(v),r}function a_(r){return r?(r=Zo,r):Zo}function i_(r,i,s,c,m,v){m=a_(m),c.context===null?c.context=m:c.pendingContext=m,c=li(i),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=ci(r,c,i),s!==null&&(Kn(s,r,i),ml(s,r,i))}function o_(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function Qp(r,i){o_(r,i),(r=r.alternate)&&o_(r,i)}function s_(r){if(r.tag===13||r.tag===31){var i=Zi(r,67108864);i!==null&&Kn(i,r,67108864),Qp(r,67108864)}}function l_(r){if(r.tag===13||r.tag===31){var i=cr();i=ko(i);var s=Zi(r,i);s!==null&&Kn(s,r,i),Qp(r,i)}}var Gu=!0;function iC(r,i,s,c){var m=P.T;P.T=null;var v=V.p;try{V.p=2,Xp(r,i,s,c)}finally{V.p=v,P.T=m}}function oC(r,i,s,c){var m=P.T;P.T=null;var v=V.p;try{V.p=8,Xp(r,i,s,c)}finally{V.p=v,P.T=m}}function Xp(r,i,s,c){if(Gu){var m=Jp(c);if(m===null)Up(r,i,c,qu,s),u_(r,c);else if(lC(m,r,i,s,c))c.stopPropagation();else if(u_(r,c),i&4&&-1<sC.indexOf(r)){for(;m!==null;){var v=Bo(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var x=ht(v.pendingLanes);if(x!==0){var M=v;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var z=1<<31-Wt(x);M.entanglements[1]|=z,x&=~z}ia(v),(vt&6)===0&&(Au=ce()+500,Il(0))}}break;case 31:case 13:M=Zi(v,2),M!==null&&Kn(M,v,2),Mu(),Qp(v,2)}if(v=Jp(c),v===null&&Up(r,i,c,qu,s),v===m)break;m=v}m!==null&&c.stopPropagation()}else Up(r,i,c,null,s)}}function Jp(r){return r=th(r),em(r)}var qu=null;function em(r){if(qu=null,r=Uo(r),r!==null){var i=l(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=u(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return qu=r,null}function c_(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(he()){case fe:return 2;case xe:return 8;case $e:case nt:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var tm=!1,_i=null,Ei=null,Si=null,Ul=new Map,Bl=new Map,wi=[],sC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function u_(r,i){switch(r){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ul.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(i.pointerId)}}function zl(r,i,s,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},i!==null&&(i=Bo(i),i!==null&&s_(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function lC(r,i,s,c,m){switch(i){case"focusin":return _i=zl(_i,r,i,s,c,m),!0;case"dragenter":return Ei=zl(Ei,r,i,s,c,m),!0;case"mouseover":return Si=zl(Si,r,i,s,c,m),!0;case"pointerover":var v=m.pointerId;return Ul.set(v,zl(Ul.get(v)||null,r,i,s,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Bl.set(v,zl(Bl.get(v)||null,r,i,s,c,m)),!0}return!1}function d_(r){var i=Uo(r.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){r.blockedOn=i,R0(r.priority,function(){l_(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,R0(r.priority,function(){l_(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Yu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Jp(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);eh=c,s.target.dispatchEvent(c),eh=null}else return i=Bo(s),i!==null&&s_(i),r.blockedOn=s,!1;i.shift()}return!0}function f_(r,i,s){Yu(r)&&s.delete(i)}function cC(){tm=!1,_i!==null&&Yu(_i)&&(_i=null),Ei!==null&&Yu(Ei)&&(Ei=null),Si!==null&&Yu(Si)&&(Si=null),Ul.forEach(f_),Bl.forEach(f_)}function Ku(r,i){r.blockedOn===i&&(r.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cC)))}var Wu=null;function h_(r){Wu!==r&&(Wu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===r&&(Wu=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(em(c||s)===null)continue;break}var v=Bo(s);v!==null&&(r.splice(i,3),i-=3,Jh(v,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function _s(r){function i(z){return Ku(z,r)}_i!==null&&Ku(_i,r),Ei!==null&&Ku(Ei,r),Si!==null&&Ku(Si,r),Ul.forEach(i),Bl.forEach(i);for(var s=0;s<wi.length;s++){var c=wi[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<wi.length&&(s=wi[0],s.blockedOn===null);)d_(s),s.blockedOn===null&&wi.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],v=s[c+1],x=m[Fn]||null;if(typeof v=="function")x||h_(s);else if(x){var M=null;if(v&&v.hasAttribute("formAction")){if(m=v,x=v[Fn]||null)M=x.formAction;else if(em(m)!==null)continue}else M=x.action;typeof M=="function"?s[c+1]=M:(s.splice(c,3),c-=3),h_(s)}}}function p_(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function nm(r){this._internalRoot=r}Zu.prototype.render=nm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=cr();i_(s,c,r,i,null,null)},Zu.prototype.unmount=nm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;i_(r.current,2,null,r,null,null),Mu(),i[jo]=null}};function Zu(r){this._internalRoot=r}Zu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Yf();r={blockedOn:null,target:r,priority:i};for(var s=0;s<wi.length&&i!==0&&i<wi[s].priority;s++);wi.splice(s,0,r),s===0&&d_(r)}};var m_=t.version;if(m_!=="19.2.3")throw Error(a(527,m_,"19.2.3"));V.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var uC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Kt=Qu.inject(uC),It=Qu}catch{}}return Fl.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=S1,v=w1,x=x1;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=r_(r,1,!1,null,null,s,c,null,m,v,x,p_),r[jo]=i.current,jp(r),new nm(i)},Fl.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",v=S1,x=w1,M=x1,z=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(z=s.formState)),i=r_(r,1,!0,i,s??null,c,m,z,v,x,M,p_),i.context=a_(null),s=i.current,c=cr(),c=ko(c),m=li(c),m.callback=null,ci(s,m,c),s=c,i.current.lanes=s,pt(i,s),ia(i),r[jo]=i.current,jp(r),new Zu(i)},Fl.version="19.2.3",Fl}var O_;function SC(){if(O_)return am.exports;O_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),am.exports=EC(),am.exports}var wC=SC(),E=$i();const F=No(E),cv=fC({__proto__:null,default:F},[E]);var cm={exports:{}},um={};var T_;function xC(){if(T_)return um;T_=1;var e=$i().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return um.c=function(t){return e.H.useMemoCache(t)},um}var A_;function RC(){return A_||(A_=1,cm.exports=xC()),cm.exports}var Sf=RC(),Rc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},OC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TC=class{#e=OC;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},mo=new TC;function AC(e){setTimeout(e,0)}var Eo=typeof window>"u"||"Deno"in globalThis;function Xn(){}function CC(e,t){return typeof e=="function"?e(t):e}function gg(e){return typeof e=="number"&&e>=0&&e!==1/0}function fw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pi(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function C_(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==uv(u,t.options))return!1}else if(!hc(t.queryKey,u))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function M_(e,t){const{exact:n,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(fc(t.options.mutationKey)!==fc(l))return!1}else if(!hc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function uv(e,t){return(t?.queryKeyHashFn||fc)(e)}function fc(e){return JSON.stringify(e,(t,n)=>yg(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function hc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hc(e[n],t[n])):!1}var MC=Object.prototype.hasOwnProperty;function hw(e,t){if(e===t)return e;const n=I_(e)&&I_(t);if(!n&&!(yg(e)&&yg(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,d=n?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<o:MC.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=hw(p,y);d[g]=_,_===p&&f++}return o===u&&f===o?e:d}function vg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function I_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yg(e){if(!N_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!N_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function N_(e){return Object.prototype.toString.call(e)==="[object Object]"}function IC(e){return new Promise(t=>{mo.setTimeout(t,e)})}function bg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?hw(e,t):t}function NC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function DC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var dv=Symbol();function pw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LC(e,t){return typeof e=="function"?e(...t):!!e}var PC=class extends Rc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},fv=new PC;function _g(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var kC=AC;function jC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},o=kC;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var Tn=jC(),UC=class extends Rc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Dd=new UC;function BC(e){return Math.min(1e3*2**e,3e4)}function mw(e){return(e??"online")==="online"?Dd.isOnline():!0}var Eg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gw(e){let t=!1,n=0,a;const o=_g(),l=()=>o.status!=="pending",u=w=>{if(!l()){const T=new Eg(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>fv.isFocused()&&(e.networkMode==="always"||Dd.isOnline())&&e.canRun(),g=()=>mw(e.networkMode)&&e.canRun(),p=w=>{l()||(a?.(),o.resolve(w))},y=w=>{l()||(a?.(),o.reject(w))},_=()=>new Promise(w=>{a=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(l())return;const A=e.retry??(Eo?0:3),C=e.retryDelay??BC,O=typeof C=="function"?C(n,R):C,I=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!I){y(R);return}n++,e.onFail?.(n,R),IC(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),o)}}var vw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gg(this.gcTime)&&(this.#e=mo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo?1/0:300*1e3))}clearGcTimeout(){this.#e&&(mo.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends vw{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=L_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=L_(this.options);t.data!==void 0&&(this.setState(D_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bg(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!fw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const d=pw(this.options,t),h=(()=>{const g={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#o=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=gw({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Eg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Eg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...yw(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...D_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Tn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function yw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function D_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function L_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var VC=class extends Rc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=_g(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),P_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!vg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&k_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||Pi(this.options.staleTime,this.#t)!==Pi(t.staleTime,this.#t))&&this.#g();const o=this.#v();a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return HC(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#_();const e=Pi(this.options.staleTime,this.#t);if(Eo||this.#a.isStale||!gg(e))return;const n=fw(this.#a.dataUpdatedAt,e)+1;this.#c=mo.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Eo||Lr(this.options.enabled,this.#t)===!1||!gg(this.#l)||this.#l===0)&&(this.#u=mo.setInterval(()=>{(this.options.refetchIntervalInBackground||fv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(mo.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(mo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#a,l=this.#r,u=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),U=!D&&P_(e,t),Q=D&&k_(e,n,t,a);(U||Q)&&(g={...g,...yw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=g;y=g.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let D;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=o.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",y=bg(o?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(o&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=bg(o?.data,y,t),this.#f=y,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,y=this.#f,S=Date.now(),w="error");const R=g.fetchStatus==="fetching",A=w==="pending",C=w==="error",O=A&&R,I=y!==void 0,N={status:w,fetchStatus:g.fetchStatus,isPending:A,isSuccess:w==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:g.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:C&&!I,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&I,isStale:hv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=G=>{N.status==="error"?G.reject(N.error):N.data!==void 0&&G.resolve(N.data)},U=()=>{const G=this.#o=N.promise=_g();D(G)},Q=this.#o;switch(Q.status){case"pending":e.queryHash===n.queryHash&&D(Q);break;case"fulfilled":(N.status==="error"||N.data!==Q.value)&&U();break;case"rejected":(N.status!=="error"||N.error!==Q.reason)&&U();break}}return N}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),vg(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const l=new Set(o??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(u=>{const d=u;return this.#a[d]!==e[d]&&l.has(d)})};this.#w({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(e){Tn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function FC(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function P_(e,t){return FC(e,t)||e.state.data!==void 0&&Sg(e,t,t.refetchOnMount)}function Sg(e,t,n){if(Lr(t.enabled,e)!==!1&&Pi(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&hv(e,t)}return!1}function k_(e,t,n,a){return(e!==t||Lr(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&hv(e,n)}function hv(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Pi(t.staleTime,e))}function HC(e,t){return!vg(e.getCurrentResult(),t)}function j_(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=pw(t.options,t.fetchOptions),_=async(S,w,T)=>{if(g)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,I=T?DC:NC;return{pages:I(S.pages,C,O),pageParams:I(S.pageParams,w,O)}};if(o&&l.length){const S=o==="backward",w=S?bw:wg,T={pages:l,pageParams:u},R=w(a,T);d=await _(T,R,S)}else{const S=e??l.length;do{const w=f===0?u[0]??a.initialPageParam:wg(a,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function wg(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function bw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function NB(e,t){return t?wg(e,t)!=null:!1}function DB(e,t){return!t||!e.getPreviousPageParam?!1:bw(e,t)!=null}var $C=class extends vw{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||GC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=gw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error:l})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Tn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function GC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new $C({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Xu(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Xu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Xu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Tn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>M_(t,n))}findAll(e={}){return this.getAll().filter(t=>M_(e,t))}notify(e){Tn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Tn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Xn))))}};function Xu(e){return e.options.scope?.id}var YC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??uv(a,t);let l=this.get(o);return l||(l=new zC({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Tn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>C_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>C_(e,n)):t}notify(e){Tn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},KC=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new YC,this.#t=e.mutationCache||new qC,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=fv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Dd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=CC(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Tn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Tn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Tn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Tn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Xn).catch(Xn)}invalidateQueries(e,t={}){return Tn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Tn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Xn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=j_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=j_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(fc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{hc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{hc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=uv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},_w=E.createContext(void 0),WC=e=>{const t=E.useContext(_w);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(_w.Provider,{value:e,children:t})),Ew=E.createContext(!1),QC=()=>E.useContext(Ew);Ew.Provider;function XC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JC=E.createContext(XC()),e4=()=>E.useContext(JC),t4=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n4=e=>{E.useEffect(()=>{e.clearReset()},[e])},r4=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||LC(n,[e.error,a])),a4=(e,t)=>t.state.data===void 0,i4=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,s4=(e,t)=>e?.suspense&&t.isPending,U_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l4(e,t,n){const a=QC(),o=e4(),l=WC(n),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",i4(u),t4(u,o),n4(o);const d=!l.getQueryCache().get(u.queryHash),[f]=E.useState(()=>new t(l,u)),h=f.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(p=>{const y=g?f.subscribe(Tn.batchCalls(p)):Xn;return f.updateResult(),y},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),E.useEffect(()=>{f.setOptions(u)},[u,f]),s4(u,h))throw U_(u,f,o);if(r4({result:h,errorResetBoundary:o,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Eo&&o4(h,a)&&(d?U_(u,f,o):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Xn).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?h:f.trackResult(h)}function c4(e,t){return l4({...e,enabled:!0,suspense:!0,throwOnError:a4,placeholderData:void 0},VC,t)}const u4={authConfig:()=>["authConfig"],threads:e=>["threads",e],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collectionItem:(e,t,n)=>["collection-item",e,t,n],collectionListPrefix:(e,t)=>["collection-list",e,t],collectionList:(e,t,n)=>["collection-list",e,t,n],collectionListInfinitePrefix:(e,t)=>["collection-list-infinite",e,t],collectionListInfinite:(e,t,n)=>["collection-list-infinite",e,t,n],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e]},Sw=E.createContext(void 0);async function d4(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function f4(e){const t=Sf.c(4),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:u4.authConfig(),queryFn:d4,staleTime:1/0},t[0]=a):a=t[0];const{data:o}=c4(a);let l;return t[1]!==o||t[2]!==n?(l=b.jsx(Sw.Provider,{value:o,children:n}),t[1]=o,t[2]=n,t[3]=l):l=t[3],l}function LB(){const e=E.useContext(Sw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const xg=new WeakMap,h4=new WeakMap,Ld={current:[]};let dm=!1,ic=0;const tc=new Set,Ju=new Map;function ww(e){for(const t of e){if(Ld.current.includes(t))continue;Ld.current.push(t),t.recompute();const n=h4.get(t);if(n)for(const a of n){const o=xg.get(a);o?.length&&ww(o)}}}function p4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function m4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function xw(e){if(ic>0&&!Ju.has(e)&&Ju.set(e,e.prevState),tc.add(e),!(ic>0)&&!dm)try{for(dm=!0;tc.size>0;){const t=Array.from(tc);tc.clear();for(const n of t){const a=Ju.get(n)??n.prevState;n.prevState=a,p4(n)}for(const n of t){const a=xg.get(n);a&&(Ld.current.push(n),ww(a))}for(const n of t){const a=xg.get(n);if(a)for(const o of a)m4(o)}}}finally{dm=!1,Ld.current=[],Ju.clear()}}function oc(e){ic++;try{e()}finally{if(ic--,ic===0){const t=tc.values().next().value;t&&xw(t)}}}function g4(e){return typeof e=="function"}class v4{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var o,l;this.listeners.add(a);const u=(l=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:l.call(o,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):g4(t)?this.state=t(this.prevState):this.state=t,(o=(a=this.options)==null?void 0:a.onUpdate)==null||o.call(a),xw(this)}}const ki="__TSR_index",B_="popstate",z_="beforeunload";function y4(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const g=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&p)for(const y of g){const _=Pd(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const h=t.state[ki];d=V_(h+1,d),l({task:()=>{e.pushState(u,d),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const h=t.state[ki];d=V_(h,d),l({task:()=>{e.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function V_(e,t){t||(t={});const n=pv();return{...t,key:n,__TSR_key:n,[ki]:e}}function b4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=D=>o=D,d=(D=>D),f=(()=>Pd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=pv();t.history.replaceState({[ki]:0,key:D,__TSR_key:D},"")}let h=f(),g,p=!1,y=!1,_=!1,S=!1;const w=()=>h;let T,R;const A=()=>{T&&(N._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),N._ignoreSubscribers=!1,T=void 0,R=void 0,g=void 0)},C=(D,U,Q)=>{const G=d(U);R||(g=h),h=Pd(U,Q),T={href:G,state:Q,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),N.notify({type:D})},I=async()=>{if(y){y=!1;return}const D=f(),U=D.state[ki]-h.state[ki],Q=U===1,G=U===-1,W=!Q&&!G||p;p=!1;const j=W?"GO":G?"BACK":"FORWARD",ne=W?{type:"GO",index:U}:{type:G?"BACK":"FORWARD"};if(_)_=!1;else{const ie=l();if(typeof document<"u"&&ie.length){for(const P of ie)if(await P.blockerFn({currentLocation:h,nextLocation:D,action:j})){y=!0,t.history.go(1),N.notify(ne);return}}}h=f(),N.notify(ne)},L=D=>{if(S){S=!1;return}let U=!1;const Q=l();if(typeof document<"u"&&Q.length)for(const G of Q){const W=G.enableBeforeUnload??!0;if(W===!0){U=!0;break}if(typeof W=="function"&&W()===!0){U=!0;break}}if(U)return D.preventDefault(),D.returnValue=""},N=y4({getLocation:w,getLength:()=>t.history.length,pushState:(D,U)=>C("push",D,U),replaceState:(D,U)=>C("replace",D,U),back:D=>(D&&(_=!0),S=!0,t.history.back()),forward:D=>{D&&(_=!0),S=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>d(D),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(z_,L,{capture:!0}),t.removeEventListener(B_,I)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(z_,L,{capture:!0}),t.addEventListener(B_,I),t.history.pushState=function(...D){const U=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),U},t.history.replaceState=function(...D){const U=a.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),U},N}function Pd(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),o=pv();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[ki]:0,key:o,__TSR_key:o}}}function pv(){return(Math.random()+1).toString(36).substring(7)}function kd(e){return e[e.length-1]}function _4(e){return typeof e=="function"}function Di(e,t){return _4(e)?e(t):e}const E4=Object.prototype.hasOwnProperty;function Dr(e,t){if(e===t)return e;const n=t,a=$_(e)&&$_(n);if(!a&&!(jd(e)&&jd(n)))return n;const o=a?e:F_(e);if(!o)return n;const l=a?n:F_(n);if(!l)return n;const u=o.length,d=l.length,f=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=a?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(a?g<u:E4.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Dr(y,_);f[p]=S,S===y&&h++}return u===d&&h===u?e:f}function F_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const a=Object.getOwnPropertySymbols(e);for(const o of a){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function jd(e){if(!H_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!H_(n)||!n.hasOwnProperty("isPrototypeOf"))}function H_(e){return Object.prototype.toString.call(e)==="[object Object]"}function $_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yo(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!yo(e[a],t[a],n))return!1;return!0}if(jd(e)&&jd(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!yo(e[u],t[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!yo(e[u],t[u],n)))return!1;return o===l}return!1}function zs(e){let t,n;const a=new Promise((o,l)=>{t=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function S4(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function ji(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function G_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function q_(e,t){if(!e)return e;const n=/%25|%5C/gi;let a=0,o="",l;for(;(l=n.exec(e))!==null;)o+=G_(e.slice(a,l.index))+l[0],a=n.lastIndex;return o+G_(a?e.slice(a):e)}var w4="Invariant failed";function Ka(e,t){if(!e)throw new Error(w4)}function Ud(e){const t=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,a=void 0}}}const Vs=0,So=1,wo=2,pc=3,Ds=4,x4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,R4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,O4=/^([^{]*)\{\$\}([^}]*)$/;function mv(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=Vs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const h=e.length;return n[0]=wo,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=So,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=l.match(O4);if(u){const g=u[1].length;return n[0]=wo,n[1]=t+g,n[2]=t+g+1,n[3]=t+g+2,n[4]=t+g+3,n[5]=e.length,n}const d=l.match(R4);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=pc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=o-p.length,n[5]=o,n}const f=l.match(x4);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=So,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=o-p.length,n[5]=o,n}return n[0]=Vs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function wf(e,t,n,a,o,l,u){u?.(n);let d=a;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=mv(f,d,t);let _;const S=d,w=y[5];switch(d=w+1,l++,y[0]){case Vs:{const R=f.substring(y[2],y[3]);if(g){const A=o.static?.get(R);if(A)_=A;else{o.static??=new Map;const C=Ps(n.fullPath??n.from);C.parent=o,C.depth=l,_=C,o.static.set(R,C)}}else{const A=R.toLowerCase(),C=o.staticInsensitive?.get(A);if(C)_=C;else{o.staticInsensitive??=new Map;const O=Ps(n.fullPath??n.from);O.parent=o,O.depth=l,_=O,o.staticInsensitive.set(A,O)}}break}case So:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,I=A?C?A:A.toLowerCase():void 0,L=o.dynamic?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===I);if(L)_=L;else{const N=hm(So,n.fullPath??n.from,C,O,I);_=N,N.depth=l,N.parent=o,o.dynamic??=[],o.dynamic.push(N)}break}case pc:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,I=A?C?A:A.toLowerCase():void 0,L=o.optional?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===I);if(L)_=L;else{const N=hm(pc,n.fullPath??n.from,C,O,I);_=N,N.parent=o,N.depth=l,o.optional??=[],o.optional.push(N)}break}case wo:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,I=A?C?A:A.toLowerCase():void 0,L=hm(wo,n.fullPath??n.from,C,O,I);_=L,L.parent=o,L.depth=l,o.wildcard??=[],o.wildcard.push(L)}}o=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ps(n.fullPath??n.from);y.kind=Ds,y.parent=o,l++,y.depth=l,o.index=y,o=y}p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)wf(e,t,f,d,o,l,u)}function fm(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function po(e){if(e.static)for(const t of e.static.values())po(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())po(t);if(e.dynamic?.length){e.dynamic.sort(fm);for(const t of e.dynamic)po(t)}if(e.optional?.length){e.optional.sort(fm);for(const t of e.optional)po(t)}if(e.wildcard?.length){e.wildcard.sort(fm);for(const t of e.wildcard)po(t)}}function Ps(e){return{kind:Vs,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function hm(e,t,n,a,o){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:a,suffix:o}}function T4(e,t){const n=Ps("/"),a=new Uint16Array(6);for(const o of e)wf(!1,a,o,1,n,0);po(n),t.masksTree=n,t.flatCache=Ud(1e3)}function A4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=gv(e,t.masksTree);return t.flatCache.set(e,a),a}function C4(e,t,n,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=Ps("/");const d=new Uint16Array(6);wf(t,d,{from:e},1,u,0),o.singleCache.set(l,u)}return gv(a,u,n)}function M4(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";const l=gv(e,t.segmentTree,n);return l&&(l.branch=L4(l.route)),t.matchCache.set(a,l),l}function I4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function N4(e,t=!1,n){const a=Ps(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return wf(t,o,e,1,a,0,h=>{if(n?.(h,d),Ka(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=I4(h.fullPath);(!u[g]||h.fullPath.endsWith("/"))&&(u[g]=h)}d++}),po(a),{processedTree:{segmentTree:a,singleCache:Ud(1e3),matchCache:Ud(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function gv(e,t,n=!1){const a=e.split("/"),o=k4(e,a,t,n);if(!o)return null;const l=D4(e,a,o);return"**"in o&&(l["**"]=o["**"]),{route:o.node.route,params:l}}function D4(e,t,n){const a=P4(n.node);let o=null;const l={};for(let u=0,d=0,f=0;d<a.length;u++,d++,f++){const h=a[d],g=t[u],p=f;if(g&&(f+=g.length),h.kind===So){o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),R=g.substring(_,g.length-w);l[T]=decodeURIComponent(R)}else{const w=y.substring(1);l[w]=decodeURIComponent(g)}}else if(h.kind===pc){if(n.skipped&1<<d){u--;continue}o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?g.substring(_,g.length-S):g;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===wo){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return l}function L4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function P4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function k4(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!kd(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,g=null;for(;d.length;){const p=d.pop();let{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:R,optionals:A}=p;a&&y.route&&y.kind!==Ds&&Hl(h,p)&&(h=p);const C=_===u;if(C&&(y.route&&!l&&Hl(g,p)&&(g=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let I;if(C&&y.index){const L={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:R,optionals:A};if(T===u&&!R&&!A&&!S)return L;Hl(g,L)&&(g=L)}if(y.wildcard&&Hl(f,p))for(const L of y.wildcard){const{prefix:N,suffix:D}=L;if(!(N&&(C||!(L.caseSensitive?O:I??=O.toLowerCase()).startsWith(N)))){if(D){if(C)continue;const U=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?U:U.toLowerCase())!==D)continue}f={node:L,index:u,skipped:S,depth:w,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<w,N=w+1;for(let D=y.optional.length-1;D>=0;D--){const U=y.optional[D];d.push({node:U,index:_,skipped:L,depth:N,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const U=y.optional[D],{prefix:Q,suffix:G}=U;if(Q||G){const W=U.caseSensitive?O:I??=O.toLowerCase();if(Q&&!W.startsWith(Q)||G&&!W.endsWith(G))continue}d.push({node:U,index:_+1,skipped:S,depth:N,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const N=y.dynamic[L],{prefix:D,suffix:U}=N;if(D||U){const Q=N.caseSensitive?O:I??=O.toLowerCase();if(D&&!Q.startsWith(D)||U&&!Q.endsWith(U))continue}d.push({node:N,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(I??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:R,optionals:A})}if(!C&&y.static){const L=y.static.get(O);L&&d.push({node:L,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:R,optionals:A})}}if(g&&f)return Hl(f,g)?g:f;if(g)return g;if(f)return f;if(a&&h){let p=h.index;for(let _=0;_<h.index;_++)p+=t[_].length;const y=p===e.length?"/":e.slice(p);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(y)}}return null}function Hl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function xd(e){return vv(e.filter(t=>t!==void 0).join("/"))}function vv(e){return e.replace(/\/{2,}/g,"/")}function Rw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Ow(e){return bo(Rw(e))}function Bd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function j4(e,t,n){return Bd(e,n)===Bd(t,n)}function U4({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const p=a.get(u);if(p)return p}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&kd(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(kd(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));let f,h="";for(let p=0;p<d.length;p++){p>0&&(h+="/");const y=d[p];if(!y)continue;f=mv(y,0,f);const _=f[0];if(_===Vs){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),R=y.substring(f[2],f[3]);_===So?h+=w||T?`${w}{$${R}}${T}`:`$${R}`:_===wo?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${R}}${T}`}h=vv(h);const g=h||"/";return u&&a&&a.set(u,g),g}function pm(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?encodeURI(a):B4(a,n)}function mm({path:e,params:t,decodeCharMap:n}){let a=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const l=e.length;let u=0,d,f="";for(;u<l;){const g=u;d=mv(e,g,d);const p=d[5];if(u=p+1,g===p)continue;const y=d[0];if(y===Vs){f+="/"+e.substring(g,p);continue}if(y===wo){const _=t._splat;o._splat=_,o["*"]=_;const S=e.substring(g,d[1]),w=e.substring(d[4],p);if(!_){a=!0,(S||w)&&(f+="/"+S+w);continue}const T=pm("_splat",t,n);f+="/"+S+T+w;continue}if(y===So){const _=e.substring(d[2],d[3]);!a&&!(_ in t)&&(a=!0),o[_]=t[_];const S=e.substring(g,d[1]),w=e.substring(d[4],p),T=pm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===pc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;o[_]=S;const w=e.substring(g,d[1]),T=e.substring(d[4],p),R=pm(_,t,n)??"";f+="/"+w+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function B4(e,t){let n=encodeURIComponent(e);if(t)for(const[a,o]of t)n=n.replaceAll(a,o);return n}function yr(e){return!!e?.isNotFound}function z4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zd="tsr-scroll-restoration-v1_3",V4=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function F4(){const e=z4();if(!e)return null;const t=e.getItem(zd);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=Di(a,n)||n,e.setItem(zd,JSON.stringify(n)))}}const ed=F4(),Rg=e=>e.state.__TSR_key||e.href;function H4(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Vd=!1;function Tw({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:o,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=u[d];Vd=!0;e:{if(a&&f&&Object.keys(f).length>0){for(const p in f){const y=f[p];if(p==="window")window.scrollTo({top:y.scrollY,left:y.scrollX,behavior:n});else if(p){const _=document.querySelector(p);_&&(_.scrollLeft=y.scrollX,_.scrollTop=y.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const y=document.getElementById(h);y&&y.scrollIntoView(p)}break e}const g={top:0,left:0,behavior:n};if(window.scrollTo(g),o)for(const p of o){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}Vd=!1}function $4(e,t){if(!ed&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ed))return;e.isScrollRestorationSetup=!0,Vd=!1;const a=e.options.getScrollRestorationKey||Rg;window.history.scrollRestoration="manual";const o=l=>{if(Vd||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?u=`[data-scroll-restoration-id="${f}"]`:u=H4(l.target)}const d=a(e.state.location);ed.set(f=>{const h=f[d]||={},g=h[u]||={};if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const p=document.querySelector(u);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",V4(o,100),!0),e.subscribe("onRendered",l=>{const u=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Tw({storageKey:zd,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ed.set(d=>(d[u]||={},d)))})}function G4(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function q4(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function gm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Y4(e){const t=new URLSearchParams(e),n={};for(const[a,o]of t.entries()){const l=n[a];l==null?n[a]=gm(o):Array.isArray(l)?l.push(gm(o)):n[a]=[l,gm(o)]}return n}const K4=Z4(JSON.parse),W4=Q4(JSON.stringify,JSON.parse);function Z4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Y4(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function Q4(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=q4(o,a);return l?`?${l}`:""}}const fr="__root__";function X4(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function kr(e){return e instanceof Response&&!!e.options}const Rd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),yv=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Aw=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Ka(n.options.notFoundComponent);const a=e.matches.find(o=>o.routeId===n.id);Ka(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Aw(e,t))},Li=(e,t,n)=>{if(!(!kr(n)&&!yr(n))){if(kr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=kr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:a,isFetching:!1,error:n})),yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw kr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Aw(e,n),n)}},Cw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},$l=(e,t,n,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Li(e,e.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,Li(e,e.router.getMatch(o),n)}e.updateMatch(o,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},J4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){o.ssr=a.id===fr;return}if(u?.ssr===!1){o.ssr=!1;return}const d=_=>_===!0&&u?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){o.ssr=d(f);return}if(typeof a.options.ssr!="function"){o.ssr=d(a.options.ssr);return}const{search:h,params:g}=o,p={search:td(h,o.searchError),params:td(g,o.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:td(_.search,_.searchError),params:td(_.params,_.paramsError),ssr:_.ssr}))},y=a.options.ssr(p);if(ji(y))return y.then(_=>{o.ssr=d(_??f)});o.ssr=d(y??f)},Mw=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!xf(e,t)&&(n.options.loader||n.options.beforeLoad||Dw(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{Rd(e)},o);a._nonReactive.pendingTimeout=u}},e3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Mw(e,t,n,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Li(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},t3=(e,t,n,a)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=zs(()=>{l?.resolve()});const{paramsError:u,searchError:d}=o;u&&$l(e,n,u,"PARSE_PARAMS"),d&&$l(e,n,d,"VALIDATE_SEARCH"),Mw(e,t,a,o);const f=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let p=!1;const y=()=>{p||(p=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:f})))},_=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){oc(()=>{y(),_()});return}o._nonReactive.beforeLoadPromise=zs();const S={...yv(e,n,!1),...o.__routeContext},{search:w,params:T,cause:R}=o,A=xf(e,t),C={search:w,abortController:f,params:T,preload:A,context:S,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},O=L=>{if(L===void 0){oc(()=>{y(),_()});return}(kr(L)||yr(L))&&(y(),$l(e,n,L,"BEFORE_LOAD")),oc(()=>{y(),e.updateMatch(t,N=>({...N,__beforeLoadContext:L})),_()})};let I;try{if(I=a.options.beforeLoad(C),ji(I))return y(),I.catch(L=>{$l(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),$l(e,n,L,"BEFORE_LOAD")}O(I)},n3=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>{if(e.router.isServer){const f=J4(e,n,t,o);if(ji(f))return f.then(d)}return d()},u=()=>t3(e,n,t,o),d=()=>{if(Cw(e,n))return;const f=e3(e,n,o);return ji(f)?f.then(u):u()};return l()},r3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:u,styles:p}})},Iw=(e,t,n,a)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:d,cause:f}=e.router.getMatch(t),h=yv(e,n),g=xf(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:a,...e.router.options.additionalContext}},Y_=async(e,t,n,a)=>{try{const o=e.router.getMatch(t);try{(!e.router.isServer||o.ssr===!0)&&Nw(a);const l=a.options.loader?.(Iw(e,t,n,a)),u=a.options.loader&&ji(l);if((u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),a.options.loader){const h=u?await l:l;Li(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;const d=o._nonReactive.minPendingPromise;d&&await d,yr(l)&&await a.options.notFoundComponent?.preload?.(),Li(e,e.router.getMatch(t),l);try{a.options.onError?.(l)}catch(f){u=f,Li(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:u,status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Li(e,l,o)}},a3=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let o=!1,l=!1;const u=e.router.looseRoutesById[a],d=()=>{e.updateMatch(n,g=>({...g,context:yv(e,t)}))};if(Cw(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const g=e.router.getMatch(n);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload)return g;await g._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Li(e,p,y)}else{const p=Date.now()-g.updatedAt,y=xf(e,n),_=y?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,w=typeof S=="function"?S(Iw(e,n,t,u)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=zs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;o=A==="success"&&(C||(w??p>_)),y&&u.options.preload===!1||(o&&!e.sync?(l=!0,(async()=>{try{await Y_(e,n,t,u),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){kr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||o&&e.sync)&&await Y_(e,n,t,u))}}const f=e.router.getMatch(n);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0,l||d();const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function K_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rd(t);try{for(let d=0;d<t.matches.length;d++){const f=n3(t,d);ji(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(a3(t,d));const o=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of o){if(kr(d))throw d;!l&&yr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=r3(t,f,g);if(p){const y=await p;t.updateMatch(f,_=>({..._,...y}))}}catch(p){console.error(`Error executing head for route ${h}:`,p)}}if(l)throw l;const u=Rd(t);ji(u)&&await u}catch(n){if(yr(n)&&!t.preload){const a=Rd(t);throw ji(a)&&await a,n}if(kr(n))throw n}return t.matches}async function Nw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of Lw){const o=e.options[a]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function td(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Dw(e){for(const t of Lw)if(e.options[t]?.preload)return!0;return!1}const Lw=["component","errorComponent","pendingComponent","notFoundComponent"];function i3(e){return{input:({url:t})=>{for(const n of e)t=Pw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=kw(e[n],t);return t}}}function o3(e){const t=Ow(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=xd(["/",t,u.pathname]),u)}}function Pw(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function kw(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function _o(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,o=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:o,hashChanged:l}}class s3{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(y=>[encodeURIComponent(y),y])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=b4())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new v4(c3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),$4(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||o!==f||u!==h){this.basepath=f;const y=[];Ow(f)!==""&&y.push(o3({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:i3(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:a,processedTree:o}=N4(this.routeTree,this.options.caseSensitive,(u,d)=>{u.init({originalIndex:d})});this.options.routeMasks&&T4(this.options.routeMasks,o),this.routesById=n,this.routesByPath=a,this.processedTree=o;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Pw(this.rewrite,g),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);return p.search=_,{href:p.href.replace(p.origin,""),publicHref:f,url:p,pathname:q_(p.pathname),searchStr:_,search:Dr(a?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Dr(a?.state,h)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathCache=Ud(1e3),this.resolvePathWithBase=(n,a)=>U4({base:n,to:vv(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>u3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(u,{_buildLocation:!0}),f=kd(d);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,g=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(g,`${l.to}`):this.resolvePathWithBase(g,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Di(l.params,y)),w=mm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(Q=>this.looseRoutesById[Q.routeId]);if(Object.keys(S).length>0)for(const Q of T){const G=Q.options.params?.stringify??Q.options.stringifyParams;G&&Object.assign(S,G(S))}const R=n.leaveParams?_:q_(mm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const Q={};T.forEach(G=>{if(G.options.validateSearch)try{Object.assign(Q,Og(G.options.validateSearch,{...Q,...A}))}catch{}}),A=Q}A=d3({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Dr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?u.hash:l.hash?Di(l.hash,u.hash):void 0,I=O?`#${O}`:"";let L=l.state===!0?u.state:l.state?Di(l.state,u.state):{};L=Dr(u.state,L);const N=`${R}${C}${I}`,D=new URL(N,this.origin),U=kw(this.rewrite,D);return{publicHref:U.pathname+U.search+U.hash,href:N,url:U,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let f=u?a(u):void 0;if(!f){const h={};if(this.options.routeMasks){const g=A4(d.pathname,this.processedTree);if(g){Object.assign(h,g.params);const{from:p,params:y,..._}=g.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Di(y,h));u={from:n.from,..._,params:S},f=a(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const h=yo(o.state,this.latestLocation.state);return f.forEach(g=>{delete o.state[g]}),h},u=bo(this.latestLocation.href)===bo(o.href),d=this.commitLocationPromise;if(this.commitLocationPromise=zs(()=>{d?.resolve()}),u&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=o;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Pd(d,{__TSR_index:n?p:p+1});f.to=y.pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const g=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(!o||!l&&!d){const h=this.buildLocation({to:n,...u});o=o??h.url.href,l=l??h.url.href}const f=!d&&l?l:o;if(!u.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const p of g)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==a.publicHref||a.url.origin!==this.origin){const o=this.getParsedLocationHref(a);throw X4({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let a,o,l;for(l=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",..._o({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",..._o({resolvedLocation:h,location:f})}),await K_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=[],p=[],y=[];oc(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return g=S.filter(T=>!w.some(R=>R.id===T.id)),p=w.filter(T=>!S.some(R=>R.id===T.id)),y=w.filter(T=>S.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...g.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[g,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){kr(f)?(a=f,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):yr(f)&&(o=f),this.__store.setState(h=>({...h,statusCode:a?a.status:o?404:h.matches.some(g=>g.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,d=typeof a.types=="function"?a.types(_o({resolvedLocation:u,location:l})):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";o&&this.__store.setState(l=>({...l,[o]:l[o]?.map(u=>u.id===n?a(u):u)}))})},this.getMatch=n=>{const a=o=>o.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(a),cachedMatches:o.cachedMatches.map(a),pendingMatches:o.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let a=n.url.href;return this.origin&&n.url.origin===this.origin&&(a=a.replace(this.origin,"")||"/"),a},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=a.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!a(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const l=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Nw,this.preloadRoute=async n=>{const a=this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);oc(()=>{o.forEach(d=>{u.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return o=await K_({router:this,matches:o,location:a,preload:!0,updateMatch:(d,f)=>{l.has(d)?o=o.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),o}catch(d){if(kr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:a});yr(d)||console.error(d);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.state.status!=="pending")return!1;const d=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=C4(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!yo(f.params,n.params,{partial:!0})?!1:a?.includeSearch??!0?yo(d.search,l.search,{partial:!0})?f.params:!1:f.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??W4,parseSearch:t.parseSearch??K4}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const a=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l}=a;let{matchedRoutes:u}=a,d=!1;(o?o.path!=="/"&&l["**"]:bo(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=u.length-1;p>=0;p--){const y=u[p];if(y.children)return y.id}return fr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((p,y)=>{const _=h[y-1],[S,w,T]=(()=>{const j=_?.search??t.search,ne=_?._strictSearch??void 0;try{const ie=Og(p.options.validateSearch,{...j})??void 0;return[{...j,...ie},{...ne,...ie},void 0]}catch(ie){let P=ie;if(ie instanceof Fd||(P=new Fd(ie.message,{cause:ie})),n?.throwOnError)throw P;return[j,{},P]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=mm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),I=p.id+C+A,L=this.getMatch(I),N=this.state.matches.find(j=>j.routeId===p.id),D=L?._strictParams??O;let U;if(!L){const j=p.options.params?.parse??p.options.parseParams;if(j)try{Object.assign(D,j(D))}catch(ne){if(yr(ne)||kr(ne)?U=ne:U=new l3(ne.message,{cause:ne}),n?.throwOnError)throw U}}Object.assign(l,D);const Q=N?"stay":"enter";let G;if(L)G={...L,cause:Q,params:N?Dr(N.params,l):l,_strictParams:D,search:Dr(N?N.search:L.search,S),_strictSearch:w};else{const j=p.options.loader||p.options.beforeLoad||p.lazyFn||Dw(p)?"pending":"success";G={id:I,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:N?Dr(N.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:N?Dr(N.search,S):S,_strictSearch:w,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:U,__routeContext:void 0,_nonReactive:{loadPromise:zs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Q,loaderDeps:N?Dr(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(G.globalNotFound=f===p.id),G.searchError=T;const W=g(_);G.context={...W,...G.__routeContext,...G.__beforeLoadContext},h.push(G)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const w=h[y-1],T=g(w);if(_.options.context){const R={deps:p.loaderDeps,params:p.params,context:T??{},location:t,navigate:A=>this.navigate({...A,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:h};p.__routeContext=_.options.context(R)??void 0}p.context={...T,...p.__routeContext,...p.__beforeLoadContext}}}),h}}class Fd extends Error{}class l3 extends Error{}function c3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Og(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Fd("Async validation not supported");if(n.issues)throw new Fd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function u3({pathname:e,routesById:t,processedTree:n}){const a={},o=bo(e);let l;const u=M4(o,n,!0);return u&&(l=u.route,Object.assign(a,u.params)),{matchedRoutes:u?.branch||[t[fr]],routeParams:a,foundRoute:l}}function d3({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const o=n.reduce((d,f)=>{const h=[];if("search"in f.options)f.options.search?.middlewares&&h.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const g=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(g)}if(a&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,...Og(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Di(t.search,d):{};o.push(l);const u=(d,f)=>{if(d>=o.length)return f;const h=o[d];return h({search:f,next:p=>u(d+1,p)})};return u(0,e)}const f3="Error preloading route! ☝️";class jw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,o=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||Ka(!1);let l=o?fr:a?.path;l&&l!=="/"&&(l=Rw(l));const u=a?.id||l;let d=o?fr:xd([this.parentRoute.id===fr?"":this.parentRoute.id,u]);l===fr&&(l="/"),d!==fr&&(d=xd(["/",d]));const f=d===fr?"/":xd([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=f,this._to=f},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class h3 extends jw{constructor(t){super(t)}}function bv(e){const t=e.errorComponent??Rf;return b.jsx(p3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?E.createElement(t,{error:n,reset:a}):e.children})}class p3 extends E.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Rf({error:e}){const[t,n]=E.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function m3({children:e,fallback:t=null}){return g3()?b.jsx(F.Fragment,{children:e}):b.jsx(F.Fragment,{children:t})}function g3(){return F.useSyncExternalStore(v3,()=>!0,()=>!1)}function v3(){return()=>{}}var vm={exports:{}},ym={},bm={exports:{}},_m={};var W_;function y3(){if(W_)return _m;W_=1;var e=$i();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(p,y){var _=y(),S=a({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),o(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),u(_),_}function f(p){var y=p.getSnapshot;p=p.value;try{var _=y();return!n(p,_)}catch{return!0}}function h(p,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return _m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,_m}var Z_;function Uw(){return Z_||(Z_=1,bm.exports=y3()),bm.exports}var Q_;function b3(){if(Q_)return ym;Q_=1;var e=$i(),t=Uw();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ym.useSyncExternalStoreWithSelector=function(h,g,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&w.hasValue){var N=w.value;if(_(N,L))return O=N}return O=L}if(N=O,a(C,L))return N;var D=y(L);return _!==void 0&&_(N,D)?(C=L,N):(C=L,O=D)}var A=!1,C,O,I=p===void 0?null:p;return[function(){return R(g())},I===null?void 0:function(){return R(I())}]},[g,p,y,_]);var T=o(h,S[0],S[1]);return u(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},ym}var X_;function _3(){return X_||(X_=1,vm.exports=b3()),vm.exports}var Bw=_3();const PB=No(Bw);function E3(e,t=a=>a,n={}){const a=n.equal??S3;return Bw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function S3(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,o]of e)if(!t.has(a)||!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=J_(e);if(n.length!==J_(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function J_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Em=E.createContext(null);function zw(){return typeof document>"u"?Em:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Em,Em)}function tr(e){const t=E.useContext(zw());return e?.warn,t}function er(e){const t=tr({warn:e?.router===void 0}),n=e?.router||t,a=E.useRef(void 0);return E3(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Dr(a.current,e.select(o));return a.current=l,l}return e.select(o)}return o})}const Of=E.createContext(void 0),w3=E.createContext(void 0);function va(e){const t=E.useContext(e.from?w3:Of);return er({select:a=>{const o=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Ka(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function _v(e){return va({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ev(e){const{select:t,...n}=e;return va({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function Sv(e){return va({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function wv(e){return va({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const nc=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Sm(e){const t=E.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function x3(e,t,n={},a={}){E.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function R3(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function Oc(e){const t=tr();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function kB(e){const t=tr(),n=Oc(),a=E.useRef(null);return nc(()=>{a.current!==e&&(n(e),a.current=e)},[t,e,n]),null}var Tf=dw();const Vw=No(Tf);function O3(e,t){const n=tr(),[a,o]=E.useState(!1),l=E.useRef(!1),u=R3(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:I,className:L,onClick:N,onFocus:D,onMouseEnter:U,onMouseLeave:Q,onTouchStart:G,ignoreBlocker:W,params:j,search:ne,hash:ie,state:P,mask:V,reloadDocument:$,unsafeRelative:re,from:ve,_fromLocation:k,...Z}=e,ee=er({select:Y=>Y.location.search,structuralSharing:!0}),oe=e.from,pe=E.useMemo(()=>({...e,from:oe}),[n,ee,oe,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),be=E.useMemo(()=>n.buildLocation({...pe}),[n,pe]),ye=E.useMemo(()=>{if(O)return;let Y=be.maskedLocation?be.maskedLocation.url.href:be.url.href,ce=!1;return n.origin&&(Y.startsWith(n.origin)?Y=n.history.createHref(Y.replace(n.origin,""))||"/":ce=!0),{href:Y,external:ce}},[O,be.maskedLocation,be.url,n.origin,n.history]),Se=E.useMemo(()=>{if(ye?.external)return ye.href;try{return new URL(g),g}catch{}},[g,ye]),Pe=e.reloadDocument||Se?!1:p??n.options.defaultPreload,ke=y??n.options.defaultPreloadDelay??0,Ee=er({select:Y=>{if(Se)return!1;if(h?.exact){if(!j4(Y.location.pathname,be.pathname,n.basepath))return!1}else{const ce=Bd(Y.location.pathname,n.basepath),he=Bd(be.pathname,n.basepath);if(!(ce.startsWith(he)&&(ce.length===he.length||ce[he.length]==="/")))return!1}return(h?.includeSearch??!0)&&!yo(Y.location.search,be.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Y.location.hash===be.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...pe}).catch(Y=>{console.warn(Y),console.warn(f3)})},[n,pe]),Pt=E.useCallback(Y=>{Y?.isIntersecting&&ze()},[ze]);x3(u,Pt,I3,{disabled:!!O||Pe!=="viewport"}),E.useEffect(()=>{l.current||!O&&Pe==="render"&&(ze(),l.current=!0)},[O,ze,Pe]);const ge=Y=>{const ce=Y.currentTarget.getAttribute("target"),he=C!==void 0?C:ce;if(!O&&!N3(Y)&&!Y.defaultPrevented&&(!he||he==="_self")&&Y.button===0){Y.preventDefault(),Tf.flushSync(()=>{o(!0)});const fe=n.subscribe("onResolved",()=>{fe(),o(!1)});n.navigate({...pe,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:R,ignoreBlocker:W})}};if(Se)return{...Z,ref:u,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...I&&{style:I},...L&&{className:L},...N&&{onClick:N},...D&&{onFocus:D},...U&&{onMouseEnter:U},...Q&&{onMouseLeave:Q},...G&&{onTouchStart:G}};const me=Y=>{O||Pe&&ze()},Re=me,Ue=Y=>{if(!(O||!Pe))if(!ke)ze();else{const ce=Y.target;if(Gl.has(ce))return;const he=setTimeout(()=>{Gl.delete(ce),ze()},ke);Gl.set(ce,he)}},it=Y=>{if(O||!Pe||!ke)return;const ce=Y.target,he=Gl.get(ce);he&&(clearTimeout(he),Gl.delete(ce))},He=Ee?Di(d,{})??T3:wm,tt=Ee?wm:Di(f,{})??wm,B=[L,He.className,tt.className].filter(Boolean).join(" "),q=(I||He.style||tt.style)&&{...I,...He.style,...tt.style};return{...Z,...He,...tt,href:ye?.href,ref:u,onClick:ql([N,ge]),onFocus:ql([D,me]),onMouseEnter:ql([U,Ue]),onMouseLeave:ql([Q,it]),onTouchStart:ql([G,Re]),disabled:!!O,target:C,...q&&{style:q},...B&&{className:B},...O&&A3,...Ee&&C3,...a&&M3}}const wm={},T3={className:"active"},A3={role:"link","aria-disabled":!0},C3={"data-status":"active","aria-current":"page"},M3={"data-transitioning":"transitioning"},Gl=new WeakMap,I3={rootMargin:"100px"},ql=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},xv=E.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,ref:l,...u}=O3(a,t),d=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;return n===void 0&&delete u.disabled,E.createElement(n||"a",{...u,ref:l},d)});function N3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class D3 extends jw{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ev({...n,from:this.id}),this.useLoaderData=n=>_v({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=F.forwardRef((n,a)=>b.jsx(xv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function An(e){return new D3(e)}class L3 extends h3{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ev({...n,from:this.id}),this.useLoaderData=n=>_v({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=F.forwardRef((n,a)=>b.jsx(xv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function P3(e){return new L3(e)}function eE(e){return typeof e=="object"?new tE(e,{silent:!0}).createRoute(e):new tE(e,{silent:!0}).createRoute}class tE{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const o=An(a);return o.isRoot=!1,o},this.silent=n?.silent}}class nE{constructor(t){this.useMatch=n=>va({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({from:this.options.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Ev({...n,from:this.options.id}),this.useLoaderData=n=>_v({...n,from:this.options.id}),this.useNavigate=()=>{const n=tr();return Oc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function rE(e){return typeof e=="object"?new nE(e):t=>new nE({id:e,...t})}function Ln(e,t){let n,a,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,a=f.default}).catch(f=>{if(o=f,S4(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)throw u();return E.createElement(a,h)};return d.preload=u,d}function k3(){const e=tr(),t=E.useRef({router:e,mounted:!1}),[n,a]=E.useState(!1),{hasPendingMatches:o,isLoading:l}=er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),u=Sm(l),d=l||n||o,f=Sm(d),h=l||o,g=Sm(h);return e.startTransition=p=>{a(!0),E.startTransition(()=>{p(),a(!1)})},E.useEffect(()=>{const p=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return bo(e.latestLocation.publicHref)!==bo(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),nc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),nc(()=>{u&&!l&&e.emit({type:"onLoad",..._o(e.state)})},[u,e,l]),nc(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",..._o(e.state)})},[h,g,e]),nc(()=>{if(f&&!d){const p=_o(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&G4(e)}},[d,f,e]),null}function j3(e){const t=er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(bv,{getResetKey:()=>t,onCatch:(n,a)=>{if(yr(n))e.onCatch?.(n,a);else throw n},errorComponent:({error:n})=>{if(yr(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return b.jsx("p",{children:"Not Found"})}function Ms(e){return b.jsx(b.Fragment,{children:e.children})}function Fw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(U3,{})}function B3({children:e}){const t=tr();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=tr();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Rg)(e.latestLocation),a=n!==Rg(e.latestLocation)?n:void 0,o={storageKey:zd,shouldScrollRestoration:!0};return a&&(o.key=a),b.jsx(B3,{children:`(${Tw.toString()})(${JSON.stringify(o)})`})}const Hw=E.memo(function({matchId:t}){const n=tr(),a=er({select:R=>{const A=R.matches.find(C=>C.id===t);return Ka(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),o=n.routesById[a.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,d=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,h=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?E.Suspense:Ms,y=d?bv:Ms,_=h?j3:Ms,S=er({select:R=>R.loadedAt}),w=er({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=o.isRoot?o.options.shellComponent??Ms:Ms;return b.jsxs(T,{children:[b.jsx(Of.Provider,{value:t,children:b.jsx(p,{fallback:u,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||Rf,onCatch:(R,A)=>{if(yr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==a.routeId||!R.routeId&&!o.isRoot)throw R;return E.createElement(h,R)},children:g||a._displayPending?b.jsx(m3,{fallback:u,children:b.jsx(aE,{matchId:t})}):b.jsx(aE,{matchId:t})})})})}),w===fr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(V3,{}),b.jsx(z3,{})]}):null]})});function V3(){const e=tr(),t=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",..._o(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const aE=E.memo(function({matchId:t}){const n=tr(),{match:a,key:o,routeId:l}=er({select:f=>{const h=f.matches.find(S=>S.id===t),g=h.routeId,y=(n.routesById[g].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:g,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:g,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],d=E.useMemo(()=>{const f=u.options.component??n.options.defaultComponent;return f?b.jsx(f,{},o):b.jsx($w,{})},[o,u.options.component,n.options.defaultComponent]);if(a._displayPending)throw n.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw n.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const f=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=zs();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return Ka(yr(a.error)),Fw(n,u,a.error);if(a.status==="redirected")throw Ka(kr(a.error)),n.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error"){if(n.isServer){const f=(u.options.errorComponent??n.options.defaultErrorComponent)||Rf;return b.jsx(f,{error:a.error,reset:void 0,info:{componentStack:""}})}throw a.error}return d}),$w=E.memo(function(){const t=tr(),n=E.useContext(Of),a=er({select:h=>h.matches.find(g=>g.id===n)?.routeId}),o=t.routesById[a],l=er({select:h=>{const p=h.matches.find(y=>y.id===n);return Ka(p),p.globalNotFound}}),u=er({select:h=>{const g=h.matches,p=g.findIndex(y=>y.id===n);return g[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return Fw(t,o,void 0);if(!u)return null;const f=b.jsx(Hw,{matchId:u});return a===fr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function F3(){const e=tr(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,a=n?b.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?Ms:E.Suspense,l=b.jsxs(o,{fallback:a,children:[!e.isServer&&b.jsx(k3,{}),b.jsx(H3,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function H3(){const e=tr(),t=er({select:o=>o.matches[0]?.id}),n=er({select:o=>o.loadedAt}),a=t?b.jsx(Hw,{matchId:t}):null;return b.jsx(Of.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(bv,{getResetKey:()=>n,errorComponent:Rf,onCatch:o=>{o.message||o.toString()},children:a})})}const $3=e=>new G3(e);class G3 extends s3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=eE,globalThis.createLazyFileRoute=rE):typeof window<"u"&&(window.createFileRoute=eE,window.createLazyFileRoute=rE);function q3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=zw(),o=b.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:o}):o}function Y3({router:e,...t}){return b.jsx(q3,{router:e,...t,children:b.jsx(F3,{})})}var K3={},iE={};const Od=Object.create(null),Yl=e=>K3||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Od:globalThis),Pr=new Proxy(Od,{get(e,t){return Yl()[t]??Od[t]},has(e,t){return t in Yl()||t in Od},set(e,t,n){const a=Yl(!0);return a[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Yl(!0);return delete n[t],!0},ownKeys(){const e=Yl(!0);return Object.keys(e)}});function en(e,t){return typeof process<"u"&&iE?iE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Kl=1,vn=4,ca=8,pr=24,oE={eterm:vn,cons25:vn,console:vn,cygwin:vn,dtterm:vn,gnome:vn,hurd:vn,jfbterm:vn,konsole:vn,kterm:vn,mlterm:vn,mosh:pr,putty:vn,st:vn,"rxvt-unicode-24bit":pr,terminator:pr,"xterm-kitty":pr},W3=new Map(Object.entries({APPVEYOR:ca,BUILDKITE:ca,CIRCLECI:pr,DRONE:ca,GITEA_ACTIONS:pr,GITHUB_ACTIONS:pr,GITLAB_CI:ca,TRAVIS:ca})),Z3=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Q3(){if(en("FORCE_COLOR")!==void 0)switch(en("FORCE_COLOR")){case"":case"1":case"true":return vn;case"2":return ca;case"3":return pr;default:return Kl}if(en("NODE_DISABLE_COLORS")!==void 0&&en("NODE_DISABLE_COLORS")!==""||en("NO_COLOR")!==void 0&&en("NO_COLOR")!==""||en("TERM")==="dumb")return Kl;if(en("TMUX"))return pr;if("TF_BUILD"in Pr&&"AGENT_NAME"in Pr)return vn;if("CI"in Pr){for(const{0:e,1:t}of W3)if(e in Pr)return t;return en("CI_NAME")==="codeship"?ca:Kl}if("TEAMCITY_VERSION"in Pr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(en("TEAMCITY_VERSION"))!==null?vn:Kl;switch(en("TERM_PROGRAM")){case"iTerm.app":return!en("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(en("TERM_PROGRAM_VERSION"))!==null?ca:pr;case"HyperTerm":case"MacTerm":return pr;case"Apple_Terminal":return ca}if(en("COLORTERM")==="truecolor"||en("COLORTERM")==="24bit")return pr;if(en("TERM")){if(/truecolor/.exec(en("TERM"))!==null)return pr;if(/^xterm-256/.exec(en("TERM"))!==null)return ca;const e=en("TERM").toLowerCase();if(oE[e])return oE[e];if(Z3.some(t=>t.exec(e)!==null))return vn}return en("COLORTERM")?vn:Kl}const ua={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},Tg=["debug","info","success","warn","error"];function X3(e,t){return Tg.indexOf(t)>=Tg.indexOf(e)}const J3={info:ua.fg.blue,success:ua.fg.green,warn:ua.fg.yellow,error:ua.fg.red,debug:ua.fg.magenta},e5=(e,t,n)=>{const a=new Date().toISOString();return n?`${ua.dim}${a}${ua.reset} ${J3[e]}${e.toUpperCase()}${ua.reset} ${ua.bright}[Better Auth]:${ua.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},t5=e=>{const t="error",n=Q3()!==1,a=(o,l,u=[])=>{if(!X3(t,o))return;const d=e5(o,l,n);{o==="error"?console.error(d,...u):o==="warn"?console.warn(d,...u):console.log(d,...u);return}};return{...Object.fromEntries(Tg.map(o=>[o,(...[l,...u])=>a(o,l,u)])),get level(){return t}}};t5();var sc=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function n5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function r5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new sc(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof sc?t:new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function xm(e,t="/api/auth"){if(r5(e),n5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function a5(e,t,n,a,o){if(e)return xm(e,t);{const l=Pr.BETTER_AUTH_URL||Pr.NEXT_PUBLIC_BETTER_AUTH_URL||Pr.PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_AUTH_URL||(Pr.BASE_URL!=="/"?Pr.BASE_URL:void 0);if(l)return xm(l,t)}if(typeof window<"u"&&window.location)return xm(window.location.origin,t)}const i5={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},o5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,sE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},s5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function l5(e){return e instanceof Date&&!isNaN(e.getTime())}function c5(e){const t=s5.exec(e);if(!t)return null;const[,n,a,o,l,u,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(a,10)-1,parseInt(o,10),parseInt(l,10),parseInt(u,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(g,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return l5(y)?y:null}function u5(e,t={}){const{strict:n=!1,warnings:a=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const u=e.trim();if(u.length>0&&u[0]==='"'&&u.endsWith('"')&&!u.slice(1,-1).includes('"'))return u.slice(1,-1);const d=u.toLowerCase();if(d.length<=9&&d in sE)return sE[d];if(!o5.test(u)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(i5).some(([f,h])=>{const g=h.test(u);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(u,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=c5(g);if(p)return p}return o?o(h,g):g})}catch(f){if(n)throw f;return e}}function d5(e,t={strict:!0}){return u5(e,t)}let $r=[],Ri=0;const nd=4,go=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(a){return n.lc=t.push(a),()=>{for(let l=Ri+nd;l<$r.length;)$r[l]===a?$r.splice(l,nd):l+=nd;let o=t.indexOf(a);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(a,o){let l=!$r.length;for(let u of t)$r.push(u,n.value,a,o);if(l){for(Ri=0;Ri<$r.length;Ri+=nd)$r[Ri]($r[Ri+1],$r[Ri+2],$r[Ri+3]);$r.length=0}},off(){},set(a){let o=n.value;o!==a&&(n.value=a,n.notify(o))},subscribe(a){let o=n.listen(a);return a(n.value),o},value:e};return n},f5=5,rd=6,ad=10;let h5=(e,t,n,a)=>(e.events=e.events||{},e.events[n+ad]||(e.events[n+ad]=a(o=>{e.events[n].reduceRight((l,u)=>(u(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+ad](),delete e.events[n+ad])}),p5=1e3,Gw=(e,t)=>h5(e,a=>{let o=t(a);o&&e.events[rd].push(o)},f5,a=>{let o=e.listen;e.listen=(...u)=>(!e.lc&&!e.active&&(e.active=!0,a()),o(...u));let l=e.off;return e.events[rd]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let u of e.events[rd])u();e.events[rd]=[]}},p5)},()=>{e.listen=o,e.off=l}});function m5(e,t,n){let a=new Set(t).add(void 0);return e.listen((o,l,u)=>{a.has(u)&&n(o,l,u)})}var g5=Object.defineProperty,v5=Object.defineProperties,y5=Object.getOwnPropertyDescriptors,lE=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,cE=(e,t,n)=>t in e?g5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))b5.call(t,n)&&cE(e,n,t[n]);if(lE)for(var n of lE(t))_5.call(t,n)&&cE(e,n,t[n]);return e},la=(e,t)=>v5(e,y5(t)),E5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},S5=async(e,t)=>{var n,a,o,l,u,d;let f=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:f,hooks:h};for(const g of t?.plugins||[]){if(g.init){const p=await((n=g.init)==null?void 0:n.call(g,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),h.onResponse.push((o=g.hooks)==null?void 0:o.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((u=g.hooks)==null?void 0:u.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},uE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},w5=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function x5(e){if(typeof e=="number")return new uE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new uE(e);case"exponential":return new w5(e);default:throw new Error("Invalid retry strategy")}}var R5=async e=>{const t={},n=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await n(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const a=n(e.auth.username),o=n(e.auth.password);if(!a||!o)return t;t.authorization=`Basic ${btoa(`${a}:${o}`)}`}else if(e.auth.type==="Custom"){const a=n(e.auth.value);if(!a)return t;t.authorization=`${n(e.auth.prefix)} ${a}`}}return t},O5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function T5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return O5.test(a)?"json":n.has(a)||a.startsWith("text/")?"text":"blob"}function A5(e){try{return JSON.parse(e),!0}catch{return!1}}function qw(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function dE(e){try{return JSON.parse(e)}catch{return e}}function fE(e){return typeof e=="function"}function C5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&fE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&fE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function M5(e){const t=new Headers(e?.headers),n=await R5(e);for(const[a,o]of Object.entries(n||{}))t.set(a,o);if(!t.has("content-type")){const a=I5(e?.body);a&&t.set("content-type",a)}return t}function I5(e){return qw(e)?"application/json":null}function N5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(qw(e.body)&&!t.has("content-type")){for(const[n,a]of Object.entries(e?.body))a instanceof Date&&(e.body[n]=a.toISOString());return JSON.stringify(e.body)}return e.body}function D5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return Kw.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function L5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var P5=class Yw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Yw.prototype)}};async function Td(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new P5(n.issues);return n.value}var Kw=["get","post","put","patch","delete"],k5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var a,o,l,u;const d=((o=(a=e.plugins)==null?void 0:a.find(f=>{var h;return(h=f.schema)!=null&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(d){let f=t;(l=d.config)!=null&&l.prefix&&f.startsWith(d.config.prefix)&&(f=f.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(u=d.config)!=null&&u.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=la(Yr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=la(Yr({},g),{body:h.input?await Td(h.input,n?.body):n?.body,params:h.params?await Td(h.params,n?.params):n?.params,query:h.query?await Td(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),j5=e=>{async function t(n,a){const o=la(Yr(Yr({},e),a),{plugins:[...e?.plugins||[],k5(e||{})]});if(e?.catchAllError)try{return await Ag(n,o)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await Ag(n,o)}return t};function U5(e,t){let{baseURL:n,params:a,query:o}=t||{query:{},params:{},baseURL:""},l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];Kw.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[u,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(o||{}))y!=null&&f.set(p,String(y));if(a)if(Array.isArray(a)){const p=u.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=a[y];u=u.replace(_,S)}}else for(const[p,y]of Object.entries(a))u=u.replace(`:${p}`,String(y));u=u.split("/").map(encodeURIComponent).join("/"),u.startsWith("/")&&(u=u.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${u}${h}`,l):`${l}${u}${h}`}var Ag=async(e,t)=>{var n,a,o,l,u,d,f,h;const{hooks:g,url:p,options:y}=await S5(e,t),_=C5(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=U5(p,y),R=N5(y),A=await M5(y),C=D5(p,y);let O=la(Yr({},y),{url:T,headers:A,body:R,method:C,signal:w});for(const j of g.onRequest)if(j){const ne=await j(O);ne instanceof Object&&(O=ne)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:I}=L5(y,S);let L=await _(O.url,O);I();const N={response:L,request:O};for(const j of g.onResponse)if(j){const ne=await j(la(Yr({},N),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?L.clone():L}));ne instanceof Response?L=ne:ne instanceof Object&&(L=ne.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ne=T5(L),ie={data:"",response:L,request:O};if(ne==="json"||ne==="text"){const P=await L.text(),$=await((l=O.jsonParser)!=null?l:dE)(P);ie.data=$}else ie.data=await L[ne]();O?.output&&O.output&&!O.disableValidation&&(ie.data=await Td(O.output,ie.data));for(const P of g.onSuccess)P&&await P(la(Yr({},ie),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?L.clone():L}));return t?.throw?ie.data:{data:ie.data,error:null}}const D=(d=t?.jsonParser)!=null?d:dE,U=await L.text(),Q=A5(U),G=Q?await D(U):null,W={response:L,responseText:U,request:O,error:la(Yr({},G),{status:L.status,statusText:L.statusText})};for(const j of g.onError)j&&await j(la(Yr({},W),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const j=x5(t.retry),ne=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(ne,L)){for(const P of g.onRetry)P&&await P(N);const ie=j.getDelay(ne);return await new Promise(P=>setTimeout(P,ie)),await Ag(e,la(Yr({},t),{retryAttempt:ne+1}))}}if(t?.throw)throw new E5(L.status,L.statusText,Q?G:U);return{data:null,error:la(Yr({},G),{status:L.status,statusText:L.statusText})}};const Rm=Symbol.for("better-auth:broadcast-channel"),B5=()=>Math.floor(Date.now()/1e3);var z5=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:B5()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(a=>a(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Om(e="better-auth.message"){return globalThis[Rm]||(globalThis[Rm]=new z5(e)),globalThis[Rm]}const Tm=Symbol.for("better-auth:focus-manager");var V5=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function hE(){return globalThis[Tm]||(globalThis[Tm]=new V5),globalThis[Tm]}const Am=Symbol.for("better-auth:online-manager");var F5=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Cm(){return globalThis[Am]||(globalThis[Am]=new F5),globalThis[Am]}const H5=()=>typeof window>"u",Ls=(e,t,n,a)=>{const o=go({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof a=="function"?a({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):a;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){o.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onSuccess?.(g)},async onError(g){const{request:p}=g,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(o.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=o.get();o.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{o.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let u=!1;for(const d of e)d.subscribe(async()=>{H5()||(u?await l():Gw(o,()=>{const f=setTimeout(async()=>{u||(await l(),u=!0)},0);return()=>{o.off(),d.off(),clearTimeout(f)}}))});return o},Es=()=>Math.floor(Date.now()/1e3),$5=5;function G5(e){const{sessionAtom:t,sessionSignal:n,$fetch:a,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,u=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Cm().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=Es(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=Es(),a("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=Es(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&Es()-f.lastSessionRequest<$5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=Es()),f.lastSync=Es(),n.set(!n.get()))},p=A=>{Om().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=Om().subscribe(()=>{g({event:"storage"})})},S=()=>{u&&(f.unsubscribeFocus=hE().subscribe(()=>{g({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Cm().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),Om().setup(),hE().setup(),Cm().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cachedSession=void 0},triggerRefetch:g,broadcastSessionUpdate:p}}const q5={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Y5(e,t){const n=go(!1),a=Ls(n,"/get-session",e,{method:"GET"});return Gw(a,()=>{const o=G5({sessionAtom:a,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:a,$sessionSignal:n}}const K5=(e,t)=>{const n="credentials"in Request.prototype,a=a5(e?.baseURL,e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:u,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=j5({baseURL:a,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?d5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[q5],...o]}),{$sessionSignal:y,session:_}=Y5(p,e),S=e?.plugins||[];let w={},T={$sessionSignal:y,session:_},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of S)O.getAtoms&&Object.assign(T,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&A.push(...O.atomListeners);const C={notify:O=>{T[O].set(!T[O].get())},listen:(O,I)=>{T[O].subscribe(I)},atoms:T};for(const O of S)O.getActions&&Object.assign(w,O.getActions?.(p,C,e));return{get baseURL(){return a},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function W5(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Z5(e,t,n){const a=t[e],{fetchOptions:o,query:l,...u}=n||{};return a||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function Q5(e,t,n,a,o){function l(u=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...u,f];let g=e;for(const p of h)if(g&&typeof g=="object"&&p in g)g=g[p];else{g=void 0;break}return typeof g=="function"||W5(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+u.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},R=Z5(g,n,p);return await t(g,{...T,body:R==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!o||T.disableSignal)return;const C=o.filter(O=>O.matcher(g));if(C.length)for(const O of C){const I=a[O.signal];if(!I)return;const L=I.get();setTimeout(()=>{I.set(!L)},10)}}})}})}return l()}function X5(e,t={}){let n=E.useRef(e.get());const{keys:a,deps:o=[e,a]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),a?.length?m5(e,a,f):e.listen(f)},o),u=()=>n.current;return E.useSyncExternalStore(l,u,u)}function J5(e){return`use${eM(e)}`}function eM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ww(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:a,$fetch:o,$store:l,atomListeners:u}=K5(e);let d={};for(const[f,h]of Object.entries(a))d[J5(f)]=()=>X5(h);return Q5({...n,...d,$fetch:o,$store:l},o,t,a,u)}function tM(e){return{authorize(t,n="AND"){let a=!1;for(const[o,l]of Object.entries(t)){const u=e[o];if(!u)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(l))a=l.every(d=>u.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?a=d.actions.some(f=>u.includes(f)):a=d.actions.every(f=>u.includes(f))}else throw new sc("Invalid access control request");if(a&&n==="OR")return{success:a};if(!a&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function Zw(e){return{newRole(t){return tM(t)},statements:e}}const nM={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},Qw=Zw(nM),Xw=Qw.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),Jw=Qw.newRole({user:[],session:[]}),rM={admin:Xw,user:Jw},aM=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||rM;for(const a of t)if(n[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},iM={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Rv=Zw(iM),ex=Rv.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),tx=Rv.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),nx=Rv.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),oM={admin:ex,owner:tx,member:nx},sM=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),a=e.options.creatorRole||"owner",o=n.includes(a),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const u of n)if(t[u]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},lM=e=>({id:"two-factor",$InferServerPlugin:{},atomListeners:[{matcher:t=>t.startsWith("/two-factor/"),signal:"$sessionSignal"}],pathMethods:{"/two-factor/disable":"POST","/two-factor/enable":"POST","/two-factor/send-otp":"POST","/two-factor/generate-backup-codes":"POST"},fetchPlugins:[{id:"two-factor",name:"two-factor",hooks:{async onSuccess(t){t.data?.twoFactorRedirect}}}]}),cM=e=>{const t={admin:Xw,user:Jw,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>aM({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},uM=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),dM=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),fM=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),hM=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),rx=()=>({id:"magic-link",$InferServerPlugin:{}}),pM=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let co=null;function pE(){return typeof window<"u"&&"IdentityCredential"in window}const mM=e=>({id:"one-tap",fetchPlugins:[{id:"fedcm-signout-handle",name:"FedCM Sign-Out Handler",hooks:{async onResponse(t){t.request.url.toString().includes("/sign-out")&&(e.promptOptions?.fedCM===!1||!pE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(a,o)=>{if(co&&!co.signal.aborted){console.warn("A Google One Tap request is already in progress. Please wait.");return}if(typeof window>"u"||!window.document){console.warn("Google One Tap is only available in browser environments");return}async function l(p){await t("/one-tap/callback",{method:"POST",body:{idToken:p},...a?.fetchOptions,...o}),(!a?.fetchOptions&&!o||a?.callbackURL)&&(window.location.href=a?.callbackURL??"/")}const{autoSelect:u,cancelOnTapOutside:d,context:f}=a??{},h=f??e.context??"signin",g={fedCM:async()=>{try{const p=await navigator.credentials.get({identity:{context:h,providers:[{configURL:"https://accounts.google.com/gsi/fedcm.json",clientId:e.clientId,nonce:a?.nonce}]},mediation:u?"optional":"required",signal:co?.signal});if(!p?.token){a?.onPromptNotification?.(void 0);return}try{await l(p.token);return}catch(y){throw console.error("Error during FedCM callback:",y),y}}catch(p){if(p?.code&&(p.code===19||p.code===20)){a?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,w=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async R=>{_=!0;try{await l(R.credential),p()}catch(A){console.error("Error during One Tap callback:",A),y(A)}},auto_select:u,cancel_on_tap_outside:d,context:h,ux_mode:a?.uxMode||"popup",nonce:a?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A)}})};T(0)})};co&&co?.abort(),co=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!pE()?"oneTap":"fedCM";p==="oneTap"&&await gM(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{co=null}}}),getAtoms(t){return{}}}),gM=()=>new Promise(e=>{if(window.googleScriptInitialized){e();return}const t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.onload=()=>{window.googleScriptInitialized=!0,e()},document.head.appendChild(t)}),vM=e=>sM(e,e.options.roles||oM),ax=e=>{const t=go(!1),n=go(!1),a=go(!1),o=go(!1),l={admin:ex,member:nx,owner:tx,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(u,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>vM({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:u=>{const d=Ls(t,"/organization/list",u,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:a,$activeMemberRoleSignal:o,activeOrganization:Ls([n],"/organization/get-full-organization",u,()=>({method:"GET"})),listOrganizations:d,activeMember:Ls([a],"/organization/get-active-member",u,{method:"GET"}),activeMemberRole:Ls([o],"/organization/get-active-member-role",u,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(u){return u==="/organization/create"||u==="/organization/delete"||u==="/organization/update"},signal:"$listOrg"},{matcher(u){return u.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(u){return u.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},yM=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),bM=e=>({id:"sso-client",$InferServerPlugin:{}}),_M=Ww({plugins:[ax({}),cM(),bM(),rx()]});function ix(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ix(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ox(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ix(e))&&(a&&(a+=" "),a+=t);return a}const EM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},SM=(e,t)=>({classGroupId:e,validator:t}),sx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hd="-",mE=[],wM="arbitrary..",xM=e=>{const t=OM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return RM(u);const d=u.split(Hd),f=d[0]===""&&d.length>1?1:0;return lx(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?EM(h,f):f:h||mE}return n[u]||mE}}},lx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const h=lx(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(Hd):e.slice(t).join(Hd),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},RM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?wM+a:void 0})(),OM=e=>{const{theme:t,classGroups:n}=e;return TM(n,t)},TM=(e,t)=>{const n=sx();for(const a in e){const o=e[a];Ov(o,n,a,t)}return n},Ov=(e,t,n,a)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];AM(u,t,n,a)}},AM=(e,t,n,a)=>{if(typeof e=="string"){CM(e,t,n);return}if(typeof e=="function"){MM(e,t,n,a);return}IM(e,t,n,a)},CM=(e,t,n)=>{const a=e===""?t:cx(t,e);a.classGroupId=n},MM=(e,t,n,a)=>{if(NM(e)){Ov(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(SM(n,e))},IM=(e,t,n,a)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,f]=o[u];Ov(f,cx(t,d),n,a)}},cx=(e,t)=>{let n=e;const a=t.split(Hd),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=sx(),n.nextPart.set(u,d)),n=d}return n},NM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Cg="!",gE=":",LM=[],vE=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),PM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const l=[];let u=0,d=0,f=0,h;const g=o.length;for(let w=0;w<g;w++){const T=o[w];if(u===0&&d===0){if(T===gE){l.push(o.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?u++:T==="]"?u--:T==="("?d++:T===")"&&d--}const p=l.length===0?o:o.slice(f);let y=p,_=!1;p.endsWith(Cg)?(y=p.slice(0,-1),_=!0):p.startsWith(Cg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return vE(l,_,y,S)};if(t){const o=t+gE,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):vE(LM,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},kM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},jM=e=>({cache:DM(e.cacheSize),parseClassName:PM(e),sortModifiers:kM(e),...xM(e)}),UM=/\s+/,BM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(UM);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(g);if(p){f=g+(f.length>0?" "+f:f);continue}let T=!!w,R=a(T?S.substring(0,w):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=a(S),!R){f=g+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+Cg:A,O=C+R;if(u.indexOf(O)>-1)continue;u.push(O);const I=o(R,T);for(let L=0;L<I.length;++L){const N=I[L];u.push(C+N)}f=g+(f.length>0?" "+f:f)}return f},zM=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=ux(n))&&(o&&(o+=" "),o+=a);return o},ux=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=ux(e[a]))&&(n&&(n+=" "),n+=t);return n},VM=(e,...t)=>{let n,a,o,l;const u=f=>{const h=t.reduce((g,p)=>p(g),e());return n=jM(h),a=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=BM(f,n);return o(f,g),g};return l=u,(...f)=>l(zM(...f))},FM=[],cn=e=>{const t=n=>n[e]||FM;return t.isThemeGetter=!0,t},dx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+\/\d+$/,$M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>HM.test(e),Je=e=>!!e&&!Number.isNaN(Number(e)),Oi=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Je(e.slice(0,-1)),$a=e=>$M.test(e),WM=()=>!0,ZM=e=>GM.test(e)&&!qM.test(e),hx=()=>!1,QM=e=>YM.test(e),XM=e=>KM.test(e),JM=e=>!Ce(e)&&!Me(e),eI=e=>qs(e,gx,hx),Ce=e=>dx.test(e),uo=e=>qs(e,vx,ZM),Im=e=>qs(e,iI,Je),yE=e=>qs(e,px,hx),tI=e=>qs(e,mx,XM),id=e=>qs(e,yx,QM),Me=e=>fx.test(e),Wl=e=>Ys(e,vx),nI=e=>Ys(e,oI),bE=e=>Ys(e,px),rI=e=>Ys(e,gx),aI=e=>Ys(e,mx),od=e=>Ys(e,yx,!0),qs=(e,t,n)=>{const a=dx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ys=(e,t,n=!1)=>{const a=fx.exec(e);return a?a[1]?t(a[1]):n:!1},px=e=>e==="position"||e==="percentage",mx=e=>e==="image"||e==="url",gx=e=>e==="length"||e==="size"||e==="bg-size",vx=e=>e==="length",iI=e=>e==="number",oI=e=>e==="family-name",yx=e=>e==="shadow",sI=()=>{const e=cn("color"),t=cn("font"),n=cn("text"),a=cn("font-weight"),o=cn("tracking"),l=cn("leading"),u=cn("breakpoint"),d=cn("container"),f=cn("spacing"),h=cn("radius"),g=cn("shadow"),p=cn("inset-shadow"),y=cn("text-shadow"),_=cn("drop-shadow"),S=cn("blur"),w=cn("perspective"),T=cn("aspect"),R=cn("ease"),A=cn("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...O(),Me,Ce],L=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Me,Ce,f],U=()=>[Ss,"full","auto",...D()],Q=()=>[Oi,"none","subgrid",Me,Ce],G=()=>["auto",{span:["full",Oi,Me,Ce]},Oi,Me,Ce],W=()=>[Oi,"auto",Me,Ce],j=()=>["auto","min","max","fr",Me,Ce],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],V=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],$=()=>[e,Me,Ce],re=()=>[...O(),bE,yE,{position:[Me,Ce]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",rI,eI,{size:[Me,Ce]}],Z=()=>[Mm,Wl,uo],ee=()=>["","none","full",h,Me,Ce],oe=()=>["",Je,Wl,uo],pe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Je,Mm,bE,yE],Se=()=>["","none",S,Me,Ce],Pe=()=>["none",Je,Me,Ce],ke=()=>["none",Je,Me,Ce],Ee=()=>[Je,Me,Ce],ze=()=>[Ss,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$a],breakpoint:[$a],color:[WM],container:[$a],"drop-shadow":[$a],ease:["in","out","in-out"],font:[JM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$a],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$a],shadow:[$a],spacing:["px",Je],text:[$a],"text-shadow":[$a],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ce,Me,T]}],container:["container"],columns:[{columns:[Je,Ce,Me,d]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[Oi,"auto",Me,Ce]}],basis:[{basis:[Ss,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Je,Ss,"auto","initial","none",Ce]}],grow:[{grow:["",Je,Me,Ce]}],shrink:[{shrink:["",Je,Me,Ce]}],order:[{order:[Oi,"first","last","none",Me,Ce]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[d,"screen",...V()]}],"min-w":[{"min-w":[d,"screen","none",...V()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,Wl,uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Me,Im]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mm,Ce]}],"font-family":[{font:[nI,Ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Me,Ce]}],"line-clamp":[{"line-clamp":[Je,"none",Me,Im]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",Me,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Je,"from-font","auto",Me,uo]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Je,"auto",Me,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oi,Me,Ce],radial:["",Me,Ce],conic:[Oi,Me,Ce]},aI,tI]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Je,Me,Ce]}],"outline-w":[{outline:["",Je,Wl,uo]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",g,od,id]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",p,od,id]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Je,uo]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",y,od,id]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Je,Me,Ce]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[Me,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Ce]}],filter:[{filter:["","none",Me,Ce]}],blur:[{blur:Se()}],brightness:[{brightness:[Je,Me,Ce]}],contrast:[{contrast:[Je,Me,Ce]}],"drop-shadow":[{"drop-shadow":["","none",_,od,id]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Je,Me,Ce]}],"hue-rotate":[{"hue-rotate":[Je,Me,Ce]}],invert:[{invert:["",Je,Me,Ce]}],saturate:[{saturate:[Je,Me,Ce]}],sepia:[{sepia:["",Je,Me,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Ce]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Je,Me,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Je,Me,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Je,Me,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Je,Me,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Je,Me,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Je,Me,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Je,Me,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Je,Me,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Je,"initial",Me,Ce]}],ease:[{ease:["linear","initial",R,Me,Ce]}],delay:[{delay:[Je,Me,Ce]}],animate:[{animate:["none",A,Me,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Me,Ce]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[Me,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,Ce]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Je,Wl,uo,Im]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},lI=VM(sI);var ft;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=a,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(ft||(ft={}));var _E;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_E||(_E={}));const Te=ft.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mi=e=>{switch(typeof e){case"undefined":return Te.undefined;case"string":return Te.string;case"number":return Number.isNaN(e)?Te.nan:Te.number;case"boolean":return Te.boolean;case"function":return Te.function;case"bigint":return Te.bigint;case"symbol":return Te.symbol;case"object":return Array.isArray(e)?Te.array:e===null?Te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Te.promise:typeof Map<"u"&&e instanceof Map?Te.map:typeof Set<"u"&&e instanceof Set?Te.set:typeof Date<"u"&&e instanceof Date?Te.date:Te.object;default:return Te.unknown}},_e=ft.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Wa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(this),a}static assert(t){if(!(t instanceof Wa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ft.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Wa.create=e=>new Wa(e);const Mg=(e,t)=>{let n;switch(e.code){case _e.invalid_type:e.received===Te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case _e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ft.jsonStringifyReplacer)}`;break;case _e.unrecognized_keys:n=`Unrecognized key(s) in object: ${ft.joinValues(e.keys,", ")}`;break;case _e.invalid_union:n="Invalid input";break;case _e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ft.joinValues(e.options)}`;break;case _e.invalid_enum_value:n=`Invalid enum value. Expected ${ft.joinValues(e.options)}, received '${e.received}'`;break;case _e.invalid_arguments:n="Invalid function arguments";break;case _e.invalid_return_type:n="Invalid function return type";break;case _e.invalid_date:n="Invalid date";break;case _e.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ft.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case _e.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case _e.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case _e.custom:n="Invalid input";break;case _e.invalid_intersection_types:n="Intersection results could not be merged";break;case _e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case _e.not_finite:n="Number must be finite";break;default:n=t.defaultError,ft.assertNever(e)}return{message:n}};let cI=Mg;function uI(){return cI}const dI=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...o,path:l,message:d}};function Oe(e,t){const n=uI(),a=dI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Mg?void 0:Mg].filter(o=>!!o)});e.common.issues.push(a)}class zn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return Ve;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return zn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return Ve;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:t.value,value:a}}}const Ve=Object.freeze({status:"aborted"}),rc=e=>({status:"dirty",value:e}),Ur=e=>({status:"valid",value:e}),EE=e=>e.status==="aborted",SE=e=>e.status==="dirty",Fs=e=>e.status==="valid",$d=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Le||(Le={}));class ya{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const wE=(e,t)=>{if(Fs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Wa(e.common.issues);return this._error=n,this._error}}};function We(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:o}}class ct{get description(){return this._def.description}_getType(t){return Mi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new zn,ctx:{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($d(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parseSync({data:t,path:a.path,parent:a});return wE(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Fs(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Fs(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await($d(o)?o:Promise.resolve(o));return wE(a,l)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),d=()=>l.addIssue({code:_e.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Vi({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ya.create(this,this._def)}nullable(){return Ao.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return Jd.create(this,this._def)}or(t){return Kd.create([this,t],this._def)}and(t){return Wd.create(this,t,this._def)}transform(t){return new Vi({...We(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ef({...We(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new Sx({typeName:Fe.ZodBranded,type:this,...We(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tf({...We(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Av.create(this,t)}readonly(){return nf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const fI=/^c[^\s-]{8,}$/i,hI=/^[0-9a-z]+$/,pI=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mI=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gI=/^[a-z0-9_-]{21}$/i,vI=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_I="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Nm;const EI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,SI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,wI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,OI=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TI=new RegExp(`^${bx}$`);function _x(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function AI(e){return new RegExp(`^${_x(e)}$`)}function CI(e){let t=`${bx}T${_x(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function MI(e,t){return!!((t==="v4"||!t)&&EI.test(e)||(t==="v6"||!t)&&wI.test(e))}function II(e,t){if(!vI.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function NI(e,t){return!!((t==="v4"||!t)&&SI.test(e)||(t==="v6"||!t)&&xI.test(e))}class ha extends ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Te.string){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Te.string,received:l.parsedType}),Ve}const a=new zn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(t,o),u?Oe(o,{code:_e.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&Oe(o,{code:_e.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")bI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"email",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")Nm||(Nm=new RegExp(_I,"u")),Nm.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"emoji",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")mI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"uuid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")gI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"nanoid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")fI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cuid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")hI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cuid2",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")pI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"ulid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Oe(o,{validation:"url",code:_e.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"regex",code:_e.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?CI(l).test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?TI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?AI(l).test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?yI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"duration",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?MI(t.data,l.version)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"ip",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?II(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"jwt",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?NI(t.data,l.version)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cidr",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?RI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"base64",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?OI.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"base64url",code:_e.invalid_string,message:l.message}),a.dirty()):ft.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:_e.invalid_string,...Le.errToObj(a)})}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Le.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new ha({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ha.create=e=>new ha({checks:[],typeName:Fe.ZodString,coerce:e?.coerce??!1,...We(e)});function DI(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class xo extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Te.number){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Te.number,received:l.parsedType}),Ve}let a;const o=new zn;for(const l of this._def.checks)l.kind==="int"?ft.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?DI(t.data,l.value)!==0&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_finite,message:l.message}),o.dirty()):ft.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,a,o){return new xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Le.toString(o)}]})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ft.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xo.create=e=>new xo({checks:[],typeName:Fe.ZodNumber,coerce:e?.coerce||!1,...We(e)});class Ro extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Te.bigint)return this._getInvalidInput(t);let a;const o=new zn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):ft.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Oe(n,{code:_e.invalid_type,expected:Te.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,a,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Le.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>new Ro({checks:[],typeName:Fe.ZodBigInt,coerce:e?.coerce??!1,...We(e)});class Gd extends ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Te.boolean){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.boolean,received:a.parsedType}),Ve}return Ur(t.data)}}Gd.create=e=>new Gd({typeName:Fe.ZodBoolean,coerce:e?.coerce||!1,...We(e)});class Hs extends ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Te.date){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Te.date,received:l.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_date}),Ve}const a=new zn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):ft.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Hs.create=e=>new Hs({checks:[],coerce:e?.coerce||!1,typeName:Fe.ZodDate,...We(e)});class xE extends ct{_parse(t){if(this._getType(t)!==Te.symbol){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.symbol,received:a.parsedType}),Ve}return Ur(t.data)}}xE.create=e=>new xE({typeName:Fe.ZodSymbol,...We(e)});class qd extends ct{_parse(t){if(this._getType(t)!==Te.undefined){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.undefined,received:a.parsedType}),Ve}return Ur(t.data)}}qd.create=e=>new qd({typeName:Fe.ZodUndefined,...We(e)});class Yd extends ct{_parse(t){if(this._getType(t)!==Te.null){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.null,received:a.parsedType}),Ve}return Ur(t.data)}}Yd.create=e=>new Yd({typeName:Fe.ZodNull,...We(e)});class mc extends ct{constructor(){super(...arguments),this._any=!0}_parse(t){return Ur(t.data)}}mc.create=e=>new mc({typeName:Fe.ZodAny,...We(e)});class Ig extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ur(t.data)}}Ig.create=e=>new Ig({typeName:Fe.ZodUnknown,...We(e)});class zi extends ct{_parse(t){const n=this._getOrReturnCtx(t);return Oe(n,{code:_e.invalid_type,expected:Te.never,received:n.parsedType}),Ve}}zi.create=e=>new zi({typeName:Fe.ZodNever,...We(e)});class RE extends ct{_parse(t){if(this._getType(t)!==Te.undefined){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.void,received:a.parsedType}),Ve}return Ur(t.data)}}RE.create=e=>new RE({typeName:Fe.ZodVoid,...We(e)});class ma extends ct{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==Te.array)return Oe(n,{code:_e.invalid_type,expected:Te.array,received:n.parsedType}),Ve;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(Oe(n,{code:u?_e.too_big:_e.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Oe(n,{code:_e.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Oe(n,{code:_e.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new ya(n,u,n.path,d)))).then(u=>zn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new ya(n,u,n.path,d)));return zn.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...We(t)});function Is(e){if(e instanceof rn){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Ya.create(Is(a))}return new rn({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:Is(e.element)}):e instanceof Ya?Ya.create(Is(e.unwrap())):e instanceof Ao?Ao.create(Is(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Is(t))):e}class rn extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ft.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Te.object){const h=this._getOrReturnCtx(t);return Oe(h,{code:_e.invalid_type,expected:Te.object,received:h.parsedType}),Ve}const{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof zi&&this._def.unknownKeys==="strip"))for(const h in o.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=l[h],p=o.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ya(o,p,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof zi){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(h==="strict")d.length>0&&(Oe(o,{code:_e.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const p=o.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ya(o,p,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const p=await g.key,y=await g.value;h.push({key:p,value:y,alwaysSet:g.alwaysSet})}return h}).then(h=>zn.mergeObjectSync(a,h)):zn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new rn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new rn({...this._def,unknownKeys:"strip"})}passthrough(){return new rn({...this._def,unknownKeys:"passthrough"})}extend(t){return new rn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rn({...this._def,catchall:t})}pick(t){const n={};for(const a of ft.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new rn({...this._def,shape:()=>n})}omit(t){const n={};for(const a of ft.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new rn({...this._def,shape:()=>n})}deepPartial(){return Is(this)}partial(t){const n={};for(const a of ft.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new rn({...this._def,shape:()=>n})}required(t){const n={};for(const a of ft.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof Ya;)l=l._def.innerType;n[a]=l}return new rn({...this._def,shape:()=>n})}keyof(){return Ex(ft.objectKeys(this.shape))}}rn.create=(e,t)=>new rn({shape:()=>e,unknownKeys:"strip",catchall:zi.create(),typeName:Fe.ZodObject,...We(t)});rn.strictCreate=(e,t)=>new rn({shape:()=>e,unknownKeys:"strict",catchall:zi.create(),typeName:Fe.ZodObject,...We(t)});rn.lazycreate=(e,t)=>new rn({shape:e,unknownKeys:"strip",catchall:zi.create(),typeName:Fe.ZodObject,...We(t)});class Kd extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Wa(d.ctx.common.issues));return Oe(n,{code:_e.invalid_union,unionErrors:u}),Ve}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(f=>new Wa(f));return Oe(n,{code:_e.invalid_union,unionErrors:d}),Ve}}get options(){return this._def.options}}Kd.create=(e,t)=>new Kd({options:e,typeName:Fe.ZodUnion,...We(t)});const qa=e=>e instanceof Qd?qa(e.schema):e instanceof Vi?qa(e.innerType()):e instanceof Xd?[e.value]:e instanceof To?e.options:e instanceof Dg?ft.objectValues(e.enum):e instanceof ef?qa(e._def.innerType):e instanceof qd?[void 0]:e instanceof Yd?[null]:e instanceof Ya?[void 0,...qa(e.unwrap())]:e instanceof Ao?[null,...qa(e.unwrap())]:e instanceof Sx||e instanceof nf?qa(e.unwrap()):e instanceof tf?qa(e._def.innerType):[];class Tv extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Te.object)return Oe(n,{code:_e.invalid_type,expected:Te.object,received:n.parsedType}),Ve;const a=this.discriminator,o=n.data[a],l=this.optionsMap.get(o);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(Oe(n,{code:_e.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const o=new Map;for(const l of n){const u=qa(l.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(o.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);o.set(d,l)}}return new Tv({typeName:Fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...We(a)})}}function Ng(e,t){const n=Mi(e),a=Mi(t);if(e===t)return{valid:!0,data:e};if(n===Te.object&&a===Te.object){const o=ft.objectKeys(t),l=ft.objectKeys(e).filter(d=>o.indexOf(d)!==-1),u={...e,...t};for(const d of l){const f=Ng(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===Te.array&&a===Te.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],d=t[l],f=Ng(u,d);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===Te.date&&a===Te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Wd extends ct{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(l,u)=>{if(EE(l)||EE(u))return Ve;const d=Ng(l.value,u.value);return d.valid?((SE(l)||SE(u))&&n.dirty(),{status:n.value,value:d.data}):(Oe(a,{code:_e.invalid_intersection_types}),Ve)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wd.create=(e,t,n)=>new Wd({left:e,right:t,typeName:Fe.ZodIntersection,...We(n)});class Oo extends ct{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Te.array)return Oe(a,{code:_e.invalid_type,expected:Te.array,received:a.parsedType}),Ve;if(a.data.length<this._def.items.length)return Oe(a,{code:_e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&a.data.length>this._def.items.length&&(Oe(a,{code:_e.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ya(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>zn.mergeArray(n,u)):zn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:Fe.ZodTuple,rest:null,...We(t)})};class Zd extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Te.object)return Oe(a,{code:_e.invalid_type,expected:Te.object,received:a.parsedType}),Ve;const o=[],l=this._def.keyType,u=this._def.valueType;for(const d in a.data)o.push({key:l._parse(new ya(a,d,a.path,d)),value:u._parse(new ya(a,a.data[d],a.path,d)),alwaysSet:d in a.data});return a.common.async?zn.mergeObjectAsync(n,o):zn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof ct?new Zd({keyType:t,valueType:n,typeName:Fe.ZodRecord,...We(a)}):new Zd({keyType:ha.create(),valueType:t,typeName:Fe.ZodRecord,...We(n)})}}class OE extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Te.map)return Oe(a,{code:_e.invalid_type,expected:Te.map,received:a.parsedType}),Ve;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:o._parse(new ya(a,d,a.path,[h,"key"])),value:l._parse(new ya(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return Ve;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return Ve;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}OE.create=(e,t,n)=>new OE({valueType:t,keyType:e,typeName:Fe.ZodMap,...We(n)});class gc extends ct{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Te.set)return Oe(a,{code:_e.invalid_type,expected:Te.set,received:a.parsedType}),Ve;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(Oe(a,{code:_e.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(Oe(a,{code:_e.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return Ve;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>l._parse(new ya(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new gc({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new gc({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gc.create=(e,t)=>new gc({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...We(t)});class Qd extends ct{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Qd.create=(e,t)=>new Qd({getter:e,typeName:Fe.ZodLazy,...We(t)});class Xd extends ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Oe(n,{received:n.data,code:_e.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xd.create=(e,t)=>new Xd({value:e,typeName:Fe.ZodLiteral,...We(t)});function Ex(e,t){return new To({values:e,typeName:Fe.ZodEnum,...We(t)})}class To extends ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return Oe(n,{expected:ft.joinValues(a),received:n.parsedType,code:_e.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return Oe(n,{received:n.data,code:_e.invalid_enum_value,options:a}),Ve}return Ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return To.create(t,{...this._def,...n})}exclude(t,n=this._def){return To.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}To.create=Ex;class Dg extends ct{_parse(t){const n=ft.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Te.string&&a.parsedType!==Te.number){const o=ft.objectValues(n);return Oe(a,{expected:ft.joinValues(o),received:a.parsedType,code:_e.invalid_type}),Ve}if(this._cache||(this._cache=new Set(ft.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=ft.objectValues(n);return Oe(a,{received:a.data,code:_e.invalid_enum_value,options:o}),Ve}return Ur(t.data)}get enum(){return this._def.values}}Dg.create=(e,t)=>new Dg({values:e,typeName:Fe.ZodNativeEnum,...We(t)});class Jd extends ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Te.promise&&n.common.async===!1)return Oe(n,{code:_e.invalid_type,expected:Te.promise,received:n.parsedType}),Ve;const a=n.parsedType===Te.promise?n.data:Promise.resolve(n.data);return Ur(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jd.create=(e,t)=>new Jd({type:e,typeName:Fe.ZodPromise,...We(t)});class Vi extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{Oe(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Ve;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?Ve:f.status==="dirty"||n.value==="dirty"?rc(f.value):f});{if(n.value==="aborted")return Ve;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Ve:d.status==="dirty"||n.value==="dirty"?rc(d.value):d}}if(o.type==="refinement"){const u=d=>{const f=o.refinement(d,l);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Ve:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Ve:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Fs(u))return Ve;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Fs(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):Ve);ft.assertNever(o)}}Vi.create=(e,t,n)=>new Vi({schema:e,typeName:Fe.ZodEffects,effect:t,...We(n)});Vi.createWithPreprocess=(e,t,n)=>new Vi({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...We(n)});class Ya extends ct{_parse(t){return this._getType(t)===Te.undefined?Ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ya.create=(e,t)=>new Ya({innerType:e,typeName:Fe.ZodOptional,...We(t)});class Ao extends ct{_parse(t){return this._getType(t)===Te.null?Ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:Fe.ZodNullable,...We(t)});class ef extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Te.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...We(t)});class tf extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return $d(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Wa(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Wa(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...We(t)});class TE extends ct{_parse(t){if(this._getType(t)!==Te.nan){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Te.nan,received:a.parsedType}),Ve}return{status:"valid",value:t.data}}}TE.create=e=>new TE({typeName:Fe.ZodNaN,...We(e)});class Sx extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Av extends ct{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?Ve:l.status==="dirty"?(n.dirty(),rc(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Av({in:t,out:n,typeName:Fe.ZodPipeline})}}class nf extends ct{_parse(t){const n=this._def.innerType._parse(t),a=o=>(Fs(o)&&(o.value=Object.freeze(o.value)),o);return $d(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}nf.create=(e,t)=>new nf({innerType:e,typeName:Fe.ZodReadonly,...We(t)});function AE(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function LI(e,t={},n){return e?mc.create().superRefine((a,o)=>{const l=e(a);if(l instanceof Promise)return l.then(u=>{if(!u){const d=AE(t,a),f=d.fatal??n??!0;o.addIssue({code:"custom",...d,fatal:f})}});if(!l){const u=AE(t,a),d=u.fatal??n??!0;o.addIssue({code:"custom",...u,fatal:d})}}):mc.create()}var Fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));const jB=(e,t={message:`Input not instance of ${e.name}`})=>LI(n=>n instanceof e,t),et=ha.create,wx=xo.create;Ro.create;const Cv=Gd.create,UB=Hs.create,BB=qd.create,zB=Yd.create,VB=mc.create,FB=Ig.create,HB=zi.create,CE=ma.create,Pn=rn.create,$B=Kd.create,GB=Tv.create,qB=Wd.create;Oo.create;const YB=Zd.create,Ks=Qd.create,KB=Xd.create,Mv=To.create;Jd.create;const WB=Ya.create;Ao.create;const PI=Vi.createWithPreprocess,Dm={string:(e=>ha.create({...e,coerce:!0})),number:(e=>xo.create({...e,coerce:!0})),boolean:(e=>Gd.create({...e,coerce:!0})),bigint:(e=>Ro.create({...e,coerce:!0})),date:(e=>Hs.create({...e,coerce:!0}))},ZB=Ve;function de(...e){return lI(ox(e))}function kI(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Ut({error:e,localization:t,localizeErrors:n=!0}){var a;const o="Request failed";if(!n)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function Do(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Lg(e,t){for(const n in e)if(e[n]===t)return n}function vc(e,t){let n=et().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var jI={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},UI={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},BI={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},zI={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},VI={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},FI={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},HI={...VI,...FI},$I={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},GI={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},qI={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},YI={INVALID_SESSION_TOKEN:"Invalid session token"},KI={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},WI={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},ZI={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},QI={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},XI={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},JI={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},e6={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},t6={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...zI,...jI,...UI,...BI,...HI,...$I,...GI,...qI,...YI,...KI,...WI,...ZI,...QI,...XI,...JI,...e6},n6={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ME={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},IE={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function r6(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const a6=e=>{switch(e){case"success":return s6;case"info":return c6;case"warning":return l6;case"error":return u6;default:return null}},i6=Array(12).fill(0),o6=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},i6.map((n,a)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),s6=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),l6=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),c6=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),u6=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),d6=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),f6=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Pg=1;class h6{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Pg++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:a}),{...f,...t,id:l,dismissible:d,title:a}):f):this.addToast({title:a,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,u;const d=o.then(async h=>{if(u=["resolve",h],F.isValidElement(h))l=!1,this.create({id:a,type:"default",message:h});else if(m6(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:y,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof g=="object"&&!F.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>u[0]==="reject"?g(u[1]):h(u[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,n)=>{const a=n?.id||Pg++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qn=new h6,p6=(e,t)=>{const n=t?.id||Pg++;return Qn.addToast({title:e,...t,id:n}),n},m6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",g6=p6,v6=()=>Qn.toasts,y6=()=>Qn.getActiveToasts(),NE=Object.assign(g6,{success:Qn.success,info:Qn.info,warning:Qn.warning,error:Qn.error,custom:Qn.custom,message:Qn.message,promise:Qn.promise,dismiss:Qn.dismiss,loading:Qn.loading},{getHistory:v6,getToasts:y6});r6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sd(e){return e.label!==void 0}const b6=3,_6="24px",E6="16px",DE=4e3,S6=356,w6=14,x6=45,R6=200;function oa(...e){return e.filter(Boolean).join(" ")}function O6(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const T6=e=>{var t,n,a,o,l,u,d,f,h;const{invert:g,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:R,toasts:A,expanded:C,removeToast:O,defaultRichColors:I,closeButton:L,style:N,cancelButtonStyle:D,actionButtonStyle:U,className:Q="",descriptionClassName:G="",duration:W,position:j,gap:ne,expandByDefault:ie,classNames:P,icons:V,closeButtonAriaLabel:$="Close toast"}=e,[re,ve]=F.useState(null),[k,Z]=F.useState(null),[ee,oe]=F.useState(!1),[pe,be]=F.useState(!1),[ye,Se]=F.useState(!1),[Pe,ke]=F.useState(!1),[Ee,ze]=F.useState(!1),[Pt,ge]=F.useState(0),[me,Re]=F.useState(0),Ue=F.useRef(p.duration||W||DE),it=F.useRef(null),He=F.useRef(null),tt=R===0,B=R+1<=w,q=p.type,Y=p.dismissible!==!1,ce=p.className||"",he=p.descriptionClassName||"",fe=F.useMemo(()=>T.findIndex(Ne=>Ne.toastId===p.id)||0,[T,p.id]),xe=F.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:L},[p.closeButton,L]),$e=F.useMemo(()=>p.duration||W||DE,[p.duration,W]),nt=F.useRef(0),Tt=F.useRef(0),nr=F.useRef(0),Mt=F.useRef(null),[Kt,It]=j.split("-"),sn=F.useMemo(()=>T.reduce((Ne,Xe,At)=>At>=fe?Ne:Ne+Xe.height,0),[T,fe]),Wt=f6(),ei=p.invert||g,Ra=q==="loading";Tt.current=F.useMemo(()=>fe*ne+sn,[fe,sn]),F.useEffect(()=>{Ue.current=$e},[$e]),F.useEffect(()=>{oe(!0)},[]),F.useEffect(()=>{const Ne=He.current;if(Ne){const Xe=Ne.getBoundingClientRect().height;return Re(Xe),S(At=>[{toastId:p.id,height:Xe,position:p.position},...At]),()=>S(At=>At.filter(St=>St.toastId!==p.id))}},[S,p.id]),F.useLayoutEffect(()=>{if(!ee)return;const Ne=He.current,Xe=Ne.style.height;Ne.style.height="auto";const At=Ne.getBoundingClientRect().height;Ne.style.height=Xe,Re(At),S(St=>St.find(pt=>pt.toastId===p.id)?St.map(pt=>pt.toastId===p.id?{...pt,height:At}:pt):[{toastId:p.id,height:At,position:p.position},...St])},[ee,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Ie=F.useCallback(()=>{be(!0),ge(Tt.current),S(Ne=>Ne.filter(Xe=>Xe.toastId!==p.id)),setTimeout(()=>{O(p)},R6)},[p,O,S,Tt]);F.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return C||_||Wt?(()=>{if(nr.current<nt.current){const St=new Date().getTime()-nt.current;Ue.current=Ue.current-St}nr.current=new Date().getTime()})():Ue.current!==1/0&&(nt.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ie()},Ue.current)),()=>clearTimeout(Ne)},[C,_,p,q,Wt,Ie]),F.useEffect(()=>{p.delete&&(Ie(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ie,p.delete]);function ot(){var Ne;if(V?.loading){var Xe;return F.createElement("div",{className:oa(P?.loader,p==null||(Xe=p.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":q==="loading"},V.loading)}return F.createElement(o6,{className:oa(P?.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:q==="loading"})}const dt=p.icon||V?.[q]||a6(q);var Qe,ht;return F.createElement("li",{tabIndex:0,ref:He,className:oa(Q,ce,P?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,P?.default,P?.[q],p==null||(n=p.classNames)==null?void 0:n[q]),"data-sonner-toast":"","data-rich-colors":(Qe=p.richColors)!=null?Qe:I,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":ee,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":pe,"data-visible":B,"data-y-position":Kt,"data-x-position":It,"data-index":R,"data-front":tt,"data-swiping":ye,"data-dismissible":Y,"data-type":q,"data-invert":ei,"data-swipe-out":Pe,"data-swipe-direction":k,"data-expanded":!!(C||ie&&ee),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${pe?Pt:Tt.current}px`,"--initial-height":ie?"auto":`${me}px`,...N,...p.style},onDragEnd:()=>{Se(!1),ve(null),Mt.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ra||!Y||(it.current=new Date,ge(Tt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Se(!0),Mt.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,Xe,At;if(Pe||!Y)return;Mt.current=null;const St=Number(((Ne=He.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((Xe=He.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pt=new Date().getTime()-((At=it.current)==null?void 0:At.getTime()),Nt=re==="x"?St:Mn,_r=Math.abs(Nt)/pt;if(Math.abs(Nt)>=x6||_r>.11){ge(Tt.current),p.onDismiss==null||p.onDismiss.call(p,p),Z(re==="x"?St>0?"right":"left":Mn>0?"down":"up"),Ie(),ke(!0);return}else{var En,Vn;(En=He.current)==null||En.style.setProperty("--swipe-amount-x","0px"),(Vn=He.current)==null||Vn.style.setProperty("--swipe-amount-y","0px")}ze(!1),Se(!1),ve(null)},onPointerMove:Ne=>{var Xe,At,St;if(!Mt.current||!Y||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;const pt=Ne.clientY-Mt.current.y,Nt=Ne.clientX-Mt.current.x;var _r;const En=(_r=e.swipeDirections)!=null?_r:O6(j);!re&&(Math.abs(Nt)>1||Math.abs(pt)>1)&&ve(Math.abs(Nt)>Math.abs(pt)?"x":"y");let Vn={x:0,y:0};const ko=zr=>1/(1.5+Math.abs(zr)/20);if(re==="y"){if(En.includes("top")||En.includes("bottom"))if(En.includes("top")&&pt<0||En.includes("bottom")&&pt>0)Vn.y=pt;else{const zr=pt*ko(pt);Vn.y=Math.abs(zr)<Math.abs(pt)?zr:pt}}else if(re==="x"&&(En.includes("left")||En.includes("right")))if(En.includes("left")&&Nt<0||En.includes("right")&&Nt>0)Vn.x=Nt;else{const zr=Nt*ko(Nt);Vn.x=Math.abs(zr)<Math.abs(Nt)?zr:Nt}(Math.abs(Vn.x)>0||Math.abs(Vn.y)>0)&&ze(!0),(At=He.current)==null||At.style.setProperty("--swipe-amount-x",`${Vn.x}px`),(St=He.current)==null||St.style.setProperty("--swipe-amount-y",`${Vn.y}px`)}},xe&&!p.jsx&&q!=="loading"?F.createElement("button",{"aria-label":$,"data-disabled":Ra,"data-close-button":!0,onClick:Ra||!Y?()=>{}:()=>{Ie(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(P?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(ht=V?.close)!=null?ht:d6):null,(q||p.icon||p.promise)&&p.icon!==null&&(V?.[q]!==null||p.icon)?F.createElement("div",{"data-icon":"",className:oa(P?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ot():null,p.type!=="loading"?dt:null):null,F.createElement("div",{"data-content":"",className:oa(P?.content,p==null||(l=p.classNames)==null?void 0:l.content)},F.createElement("div",{"data-title":"",className:oa(P?.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:oa(G,he,P?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&sd(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Ne=>{sd(p.cancel)&&Y&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Ie())},className:oa(P?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&sd(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||U,onClick:Ne=>{sd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Ie())},className:oa(P?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function LE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function A6(e,t){const n={};return[e,t].forEach((a,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?E6:_6;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(d)}),n}const C6=F.forwardRef(function(t,n){const{id:a,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=b6,toastOptions:R,dir:A=LE(),gap:C=w6,icons:O,containerAriaLabel:I="Notifications"}=t,[L,N]=F.useState([]),D=F.useMemo(()=>a?L.filter(ee=>ee.toasterId===a):L.filter(ee=>!ee.toasterId),[L,a]),U=F.useMemo(()=>Array.from(new Set([l].concat(D.filter(ee=>ee.position).map(ee=>ee.position)))),[D,l]),[Q,G]=F.useState([]),[W,j]=F.useState(!1),[ne,ie]=F.useState(!1),[P,V]=F.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=F.useRef(null),re=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=F.useRef(null),k=F.useRef(!1),Z=F.useCallback(ee=>{N(oe=>{var pe;return(pe=oe.find(be=>be.id===ee.id))!=null&&pe.delete||Qn.dismiss(ee.id),oe.filter(({id:be})=>be!==ee.id)})},[]);return F.useEffect(()=>Qn.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{N(oe=>oe.map(pe=>pe.id===ee.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{Vw.flushSync(()=>{N(oe=>{const pe=oe.findIndex(be=>be.id===ee.id);return pe!==-1?[...oe.slice(0,pe),{...oe[pe],...ee},...oe.slice(pe+1)]:[ee,...oe]})})})}),[L]),F.useEffect(()=>{if(y!=="system"){V(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:oe})=>{V(oe?"dark":"light")})}catch{ee.addListener(({matches:pe})=>{try{V(pe?"dark":"light")}catch(be){console.error(be)}})}},[y]),F.useEffect(()=>{L.length<=1&&j(!1)},[L]),F.useEffect(()=>{const ee=oe=>{var pe;if(u.every(Se=>oe[Se]||oe.code===Se)){var ye;j(!0),(ye=$.current)==null||ye.focus()}oe.code==="Escape"&&(document.activeElement===$.current||(pe=$.current)!=null&&pe.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[u]),F.useEffect(()=>{if($.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,k.current=!1)}},[$.current]),F.createElement("section",{ref:n,"aria-label":`${I} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((ee,oe)=>{var pe;const[be,ye]=ee.split("-");return D.length?F.createElement("ol",{key:ee,dir:A==="auto"?LE():A,tabIndex:-1,ref:$,className:h,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":be,"data-x-position":ye,style:{"--front-toast-height":`${((pe=Q[0])==null?void 0:pe.height)||0}px`,"--width":`${S6}px`,"--gap":`${C}px`,...w,...A6(g,p)},onBlur:Se=>{k.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(k.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||k.current||(k.current=!0,ve.current=Se.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{ne||j(!1)},onDragEnd:()=>j(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},D.filter(Se=>!Se.position&&oe===0||Se.position===ee).map((Se,Pe)=>{var ke,Ee;return F.createElement(T6,{key:Se.id,icons:O,index:Pe,toast:Se,defaultRichColors:_,duration:(ke=R?.duration)!=null?ke:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:T,closeButton:(Ee=R?.closeButton)!=null?Ee:f,interacting:ne,position:ee,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:Z,toasts:D.filter(ze=>ze.position==Se.position),heights:Q.filter(ze=>ze.position==Se.position),setHeights:G,expandByDefault:d,gap:C,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),xx=E.createContext({});function Rx(){return E.useContext(xx)}var Lm,PE;function M6(){if(PE)return Lm;PE=1;var e=function(){};return Lm=e,Lm}var I6=M6();const N6=No(I6);function D6({async:e,appendTo:t,defer:n,id:a,nonce:o,src:l}){const u=document.createElement("script");e!==void 0&&(u.async=e),n!==void 0&&(u.defer=n),a&&(u.id=a),o&&u.setAttribute("nonce",o),u.src=l,(t==="head"?document.head:document.body).appendChild(u)}var L6=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let lc=null,yc=!1;const rf=new Set,af=new Set,P6=typeof window<"u",ks="___grecaptcha_cfg",Ox=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function k6(){if(!P6)return;function e(n){if(yc)n();else{window[ks]||(window[ks]={});const a=window[ks];a.fns||(a.fns=[]),a.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){yc=!0;for(const n of af)n();af.clear()}window[Ox]=t}function j6({language:e,onLoadCallbackName:t,render:n,useEnterprise:a=!1,useRecaptchaNet:o=!1}){const l=o?"recaptcha.net":"google.com",u=a?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${u}?${d.toString()}`}function U6({language:e,render:t,scriptProps:n,useEnterprise:a,useRecaptchaNet:o}){const l={id:"google-recaptcha-v3"},u=j6({language:e,onLoadCallbackName:Ox,render:t,useEnterprise:a,useRecaptchaNet:o});if(lc){if(lc!==u)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}lc=u,D6(Object.assign(Object.assign(Object.assign({},l),n),{src:u}))}function B6(e){if(!window[ks])return;const t=window[ks];t.clients&&delete t.clients[e]}function z6(e,t){var{onLoadCallback:n,onLoadCallbackName:a}=t,o=L6(t,["onLoadCallback","onLoadCallbackName"]);if(rf.size===0&&k6(),U6(o),rf.add(e),n&&(yc?n():af.add(n)),a){let l=function(){if(!a)return;const u=window[a];typeof u=="function"&&u()};yc?l():af.add(l)}}function V6(e){var t,n,a;rf.delete(e),rf.size===0&&(window.grecaptcha=void 0,window[ks]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${lc}"]`))===null||n===void 0||n.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),lc=null,yc=!1)}let kE=!1;function F6({container:e,children:t,language:n,reCaptchaKey:a,scriptProps:o,useEnterprise:l,useRecaptchaNet:u}){var d,f,h,g,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function N(){var D;const U=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!U)throw new Error("reCAPTCHA not found");if(!U.ready)throw new Error("reCAPTCHA ready callback not found");U.ready(()=>{T(U)})}return z6(S,{language:n,onLoadCallback:N,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:l,useRecaptchaNet:u}),()=>{V6(S),T(null)}},[e?.element,S,n,a,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,l,u]),E.useEffect(()=>{var N,D,U;if(!e?.element||!w?.render)return;const Q={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((N=e.parameters)===null||N===void 0?void 0:N.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},G=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!G)throw new Error("reCAPTCHA container element not found");const W=w.render(G,Q);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(kE||(N6(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),kE=!0),(U=G.querySelector(".grecaptcha-badge"))===null||U===void 0||U.style.setProperty("display","none")),A(W),C.current=!0,()=>{A(null),C.current=!1,B6(W),G.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,w,a]);const O=!!e?.element,I=O?R:a,L=E.useMemo(()=>I!==null&&w?.execute?N=>{if(I===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(I,{action:N})}:void 0,[I,w,O]);return b.jsx(xx.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:w},children:t})}var H6=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const a of n)a()}}},Ir=new H6;function $6(){return()=>{}}function Xa(){return E.useSyncExternalStore($6,()=>!0,()=>!1)}function Iv(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const a=new MutationObserver(o=>{for(const l of o)l.attributeName==="lang"&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function Nv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var o;const l=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(l?"dark":"light")};n();const a=new MutationObserver(o=>{for(const l of o)(l.attributeName==="style"||l.attributeName==="class")&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function G6({children:e}){const t=Xa(),{captcha:n}=E.useContext(Ze);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(F6,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
11
|
+
.grecaptcha-badge {
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
border-radius: var(--radius) !important;
|
|
14
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
15
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
16
|
+
border-style: var(--tw-border-style) !important;
|
|
17
|
+
border-width: 1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dark .grecaptcha-badge {
|
|
21
|
+
border-color: var(--input) !important;
|
|
22
|
+
}
|
|
23
|
+
`}),b.jsx(q6,{}),e]})}function q6(){const{executeRecaptcha:e}=Rx(),{theme:t}=Nv(),{lang:n}=Iv();return E.useEffect(()=>{if(!e)return;(async()=>{const o=document.querySelector("iframe[title='reCAPTCHA']");if(o){const l=new URL(o.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),o.src=l.toString()}})()},[e,t,n]),null}function Y6({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:a}}=E.useContext(Ze),{pathMode:o,slug:l}=t||{};let u,d,f,h;const{data:g,isPending:p,isRefetching:y}=a();if(o==="slug"){const _=e||l;u=g?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:w,refetch:T}=n();h=T,u=_,d=S,f=w}return E.useMemo(()=>({data:u,isPending:d,isRefetching:f,refetch:h}),[u,d,f,h])}var K6=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:a,redirectTo:o}=E.useContext(Ze),{slug:l,pathMode:u,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:g,isRefetching:p,refetch:y}=Y6(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||g||l&&u==="slug"&&!h&&a(d||o)},[h,p,g,l,u,d,a,o]),null},W6=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),Z6=e=>{window.location.href=e},Q6=e=>{window.location.replace(e)},X6=({variant:e="default",message:t})=>{e==="default"?NE(t):NE[e](t)},Ze=E.createContext({}),J6=({children:e,authClient:t,account:n,avatar:a,deleteUser:o,social:l,genericOAuth:u,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:g="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:w,localization:T,localizeErrors:R=!0,nameRequired:A=!0,organization:C,teams:O,signUp:I=!0,toast:L=X6,viewPaths:N,navigate:D,replace:U,Link:Q=W6,emailVerification:G,...W})=>{const j=t,ne=E.useMemo(()=>{if(a)return a===!0?{extension:"png",size:128}:{upload:a.upload,delete:a.delete,extension:a.extension||"png",size:a.size||(a.upload?256:128),Image:a.Image}},[a]),ie=E.useMemo(()=>{if(G)return G===!0?{otp:!1}:{otp:G.otp??!1}},[G]),P=E.useMemo(()=>{var Ee;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ME}:{basePath:((Ee=n.basePath)!=null&&Ee.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...ME,...n.viewPaths}}},[n]),V=E.useMemo(()=>{if(o)return o===!0?{}:o},[o]),$=E.useMemo(()=>{if(l)return l},[l]),re=E.useMemo(()=>{if(u)return u},[u]),ve=E.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),k=E.useMemo(()=>{if(I!==!1)return I===!0||I===void 0?{fields:["name"]}:{fields:I.fields||["name"]}},[I]),Z=E.useMemo(()=>{var Ee;if(!C)return;if(C===!0)return{basePath:"/organization",viewPaths:IE,customRoles:[]};let ze;C.logo===!0?ze={extension:"png",size:128}:C.logo&&(ze={upload:C.logo.upload,delete:C.logo.delete,extension:C.logo.extension||"png",size:C.logo.size||(C.logo.upload?256:128)});const Pt=(Ee=C.basePath)!=null&&Ee.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:ze,basePath:Pt??"/organization",customRoles:C.customRoles||[],viewPaths:{...IE,...C.viewPaths}}},[C]),ee=E.useMemo(()=>{var Ee,ze;if(!(!O||!Z))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((Ee=O.colors)==null?void 0:Ee.count)??5,prefix:((ze=O.colors)==null?void 0:ze.prefix)??"team"}}},[O,Z]),oe=E.useMemo(()=>({deleteApiKey:Ee=>j.apiKey.delete({...Ee,fetchOptions:{throw:!0}}),deletePasskey:Ee=>j.passkey.deletePasskey({...Ee,fetchOptions:{throw:!0}}),revokeDeviceSession:Ee=>j.multiSession.revoke({...Ee,fetchOptions:{throw:!0}}),revokeSession:Ee=>j.revokeSession({...Ee,fetchOptions:{throw:!0}}),setActiveSession:Ee=>j.multiSession.setActive({...Ee,fetchOptions:{throw:!0}}),updateOrganization:Ee=>j.organization.update({...Ee,fetchOptions:{throw:!0}}),updateTeam:Ee=>j.$fetch("/organization/update-team",{method:"POST",body:Ee,throw:!0}),updateUser:Ee=>j.updateUser({...Ee,fetchOptions:{throw:!0}}),unlinkAccount:Ee=>j.unlinkAccount({...Ee,fetchOptions:{throw:!0}})}),[j]),pe=E.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>ur({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Ee=>ur({queryFn:()=>j.accountInfo(Ee),cacheKey:`accountInfo:${JSON.stringify(Ee)}`}),useListDeviceSessions:()=>ur({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>ur({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>ur({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Ee=>ur({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Ee}),cacheKey:`hasPermission:${JSON.stringify(Ee)}`}),useInvitation:Ee=>ur({queryFn:()=>j.organization.getInvitation(Ee),cacheKey:`invitation:${JSON.stringify(Ee)}`}),useListInvitations:Ee=>ur({queryFn:()=>{var ze;return j.$fetch(`/organization/list-invitations?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Ee)}`}),useListUserInvitations:()=>ur({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Ee=>ur({queryFn:()=>{var ze;return j.$fetch(`/organization/list-members?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Ee)}`}),useListTeams:Ee=>ur({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Ee?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Ee)}`}),useListTeamMembers:Ee=>ur({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Ee?.teamId?{query:{teamId:Ee.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Ee)}`}),useListUserTeams:()=>ur({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),be=E.useMemo(()=>({...n6,...N}),[N]),ye=E.useMemo(()=>({...t6,...T}),[T]),Se=E.useMemo(()=>({...pe,...S}),[pe,S]),Pe=E.useMemo(()=>({...oe,...w}),[oe,w]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:ke}=Se.useSession();return b.jsxs(Ze.Provider,{value:{authClient:j,avatar:ne,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:g,changeEmail:y,credentials:ve,deleteUser:V,emailVerification:ie,freshAge:_,genericOAuth:re,hooks:Se,mutators:Pe,localization:ye,localizeErrors:R,nameRequired:A,organization:Z,teams:ee,account:P,signUp:k,social:$,toast:L,navigate:D||Z6,replace:U||D||Q6,viewPaths:be,Link:Q,...W},children:[ke&&Z&&b.jsx(K6,{}),h?.provider==="google-recaptcha-v3"?b.jsx(G6,{children:e}):e]})};function ur({queryFn:e,cacheKey:t,staleTime:n=1e4}){var a;const{hooks:{useSession:o},toast:l,localization:u,localizeErrors:d}=E.useContext(Ze),{data:f,isPending:h}=o(),g=E.useRef(e);g.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Ir.subscribe(p,C),[p]),E.useCallback(()=>Ir.get(p),[p]),E.useCallback(()=>Ir.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[w,T]=E.useState(null),R=E.useCallback(async()=>{const C=Ir.getInFlightRequest(p);if(C){try{const I=await C;I.error?T(I.error):T(null)}catch(I){T(I)}return}y?.data!==void 0&&Ir.setRefetching(p,!0);const O=g.current();Ir.setInFlightRequest(p,O);try{const{data:I,error:L}=await O;L?(T(L),l({variant:"error",message:Ut({error:L,localization:u,localizeErrors:d})})):T(null),Ir.set(p,I)}catch(I){const L=I;T(L),l({variant:"error",message:Ut({error:L,localization:u,localizeErrors:d})})}finally{Ir.setRefetching(p,!1),Ir.removeInFlightRequest(p)}},[p,l,u,d,y]);E.useEffect(()=>{var C;const O=(C=f?.user)==null?void 0:C.id;if(!f){Ir.setRefetching(p,!1),Ir.clear(p),_.current=!1,S.current=void 0;return}const I=S.current!==void 0&&S.current!==O;I&&Ir.clear(p);const L=y?.data!==void 0,N=!y||Date.now()-y.timestamp>n;(!_.current||!L||I||L&&N)&&(!L||N)&&(_.current=!0,R()),S.current=O},[f,(a=f?.user)==null?void 0:a.id,p,R,y,n]);const A=h||y?.data===void 0&&!w;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:w,refetch:R}}const eN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),jE=e=>{const t=tN(e);return t.charAt(0).toUpperCase()+t.slice(1)},Tx=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),nN=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var rN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const aN=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:l,iconNode:u,...d},f)=>E.createElement("svg",{ref:f,...rN,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:Tx("lucide",o),...!l&&!nN(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,g])=>E.createElement(h,g)),...Array.isArray(l)?l:[l]]));const Cn=(e,t)=>{const n=E.forwardRef(({className:a,...o},l)=>E.createElement(aN,{ref:l,iconNode:t,className:Tx(`lucide-${eN(jE(e))}`,`lucide-${e}`,a),...o}));return n.displayName=jE(e),n};const iN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],oN=Cn("arrow-left",iN);const sN=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],lN=Cn("building",sN);const cN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Dv=Cn("check",cN);const uN=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],dN=Cn("cloud-upload",uN);const fN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],hN=Cn("ellipsis",fN);const pN=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],mN=Cn("eye-off",pN);const gN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vN=Cn("eye",gN);const yN=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],bN=Cn("fingerprint",yN);const _N=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_n=Cn("loader-circle",_N);const EN=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Ax=Cn("lock",EN);const SN=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Cx=Cn("mail",SN);const wN=[["path",{d:"M5 12h14",key:"1ays0h"}]],xN=Cn("minus",wN);const RN=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],ON=Cn("qr-code",RN);const TN=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],UE=Cn("send",TN);const AN=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],CN=Cn("trash-2",AN);const MN=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],IN=Cn("user-round",MN);const NN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mx=Cn("x",NN);var Tc=e=>e.type==="checkbox",vo=e=>e instanceof Date,Jn=e=>e==null;const Ix=e=>typeof e=="object";var on=e=>!Jn(e)&&!Array.isArray(e)&&Ix(e)&&!vo(e),Nx=e=>on(e)&&e.target?Tc(e.target)?e.target.checked:e.target.value:e,DN=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Dx=(e,t)=>e.has(DN(t)),LN=e=>{const t=e.constructor&&e.constructor.prototype;return on(t)&&t.hasOwnProperty("isPrototypeOf")},Lv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function un(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Lv&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(on(e)&&LN(e)))return e;const a=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=un(e[o]));return a}var Af=e=>/^\w*$/.test(e),Ft=e=>e===void 0,Pv=e=>Array.isArray(e)?e.filter(Boolean):[],kv=e=>Pv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,n)=>{if(!t||!on(e))return n;const a=(Af(t)?[t]:kv(t)).reduce((o,l)=>Jn(o)?o:o[l],e);return Ft(a)||a===e?Ft(e[t])?n:e[t]:a},hr=e=>typeof e=="boolean",Bn=e=>typeof e=="function",Et=(e,t,n)=>{let a=-1;const o=Af(t)?[t]:kv(t),l=o.length,u=l-1;for(;++a<l;){const d=o[a];let f=n;if(a!==u){const h=e[d];f=on(h)||Array.isArray(h)?h:isNaN(+o[a+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const of={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ga={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},jv=F.createContext(null);jv.displayName="HookFormContext";const Cf=()=>F.useContext(jv),PN=e=>{const{children:t,...n}=e;return F.createElement(jv.Provider,{value:n},t)};var Lx=(e,t,n,a=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const u=l;return t._proxyFormState[u]!==Kr.all&&(t._proxyFormState[u]=!a||Kr.all),n&&(n[u]=!0),e[u]}});return o};const Uv=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Bv(e){const t=Cf(),{control:n=t.control,disabled:a,name:o,exact:l}=e||{},[u,d]=F.useState(n._formState),f=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Uv(()=>n._subscribe({name:o,formState:f.current,exact:l,callback:h=>{!a&&d({...n._formState,...h})}}),[o,a,l]),F.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),F.useMemo(()=>Lx(u,n,f.current,!1),[u,n])}var gr=e=>typeof e=="string",kg=(e,t,n,a,o)=>gr(e)?(a&&t.watch.add(e),we(n,e,o)):Array.isArray(e)?e.map(l=>(a&&t.watch.add(l),we(n,l))):(a&&(t.watchAll=!0),n),jg=e=>Jn(e)||!Ix(e);function Wr(e,t,n=new WeakSet){if(jg(e)||jg(t))return Object.is(e,t);if(vo(e)&&vo(t))return e.getTime()===t.getTime();const a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of a){const u=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const d=t[l];if(vo(u)&&vo(d)||on(u)&&on(d)||Array.isArray(u)&&Array.isArray(d)?!Wr(u,d,n):!Object.is(u,d))return!1}}return!0}function kN(e){const t=Cf(),{control:n=t.control,name:a,defaultValue:o,disabled:l,exact:u,compute:d}=e||{},f=F.useRef(o),h=F.useRef(d),g=F.useRef(void 0),p=F.useRef(n),y=F.useRef(a);h.current=d;const[_,S]=F.useState(()=>{const O=n._getWatch(a,f.current);return h.current?h.current(O):O}),w=F.useCallback(O=>{const I=kg(a,n._names,O||n._formValues,!1,f.current);return h.current?h.current(I):I},[n._formValues,n._names,a]),T=F.useCallback(O=>{if(!l){const I=kg(a,n._names,O||n._formValues,!1,f.current);if(h.current){const L=h.current(I);Wr(L,g.current)||(S(L),g.current=L)}else S(I)}},[n._formValues,n._names,l,a]);Uv(()=>((p.current!==n||!Wr(y.current,a))&&(p.current=n,y.current=a,T()),n._subscribe({name:a,formState:{values:!0},exact:u,callback:O=>{T(O.values)}})),[n,u,a,T]),F.useEffect(()=>n._removeUnmounted());const R=p.current!==n,A=y.current,C=F.useMemo(()=>{if(l)return null;const O=!R&&!Wr(A,a);return R||O?w():null},[l,R,a,A,w]);return C!==null?C:_}function jN(e){const t=Cf(),{name:n,disabled:a,control:o=t.control,shouldUnregister:l,defaultValue:u,exact:d=!0}=e,f=Dx(o._names.array,n),h=F.useMemo(()=>we(o._formValues,n,we(o._defaultValues,n,u)),[o,n,u]),g=kN({control:o,name:n,defaultValue:h,exact:d}),p=Bv({control:o,name:n,exact:d}),y=F.useRef(e),_=F.useRef(void 0),S=F.useRef(o.register(n,{...e.rules,value:g,...hr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const w=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!we(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!we(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!we(p.validatingFields,n)},error:{enumerable:!0,get:()=>we(p.errors,n)}}),[p,n]),T=F.useCallback(O=>S.current.onChange({target:{value:Nx(O),name:n},type:of.CHANGE}),[n]),R=F.useCallback(()=>S.current.onBlur({target:{value:we(o._formValues,n),name:n},type:of.BLUR}),[n,o._formValues]),A=F.useCallback(O=>{const I=we(o._fields,n);I&&I._f&&O&&(I._f.ref={focus:()=>Bn(O.focus)&&O.focus(),select:()=>Bn(O.select)&&O.select(),setCustomValidity:L=>Bn(O.setCustomValidity)&&O.setCustomValidity(L),reportValidity:()=>Bn(O.reportValidity)&&O.reportValidity()})},[o._fields,n]),C=F.useMemo(()=>({name:n,value:g,...hr(a)||p.disabled?{disabled:p.disabled||a}:{},onChange:T,onBlur:R,ref:A}),[n,a,p.disabled,T,R,A,g]);return F.useEffect(()=>{const O=o._options.shouldUnregister||l,I=_.current;I&&I!==n&&!f&&o.unregister(I),o.register(n,{...y.current.rules,...hr(y.current.disabled)?{disabled:y.current.disabled}:{}});const L=(N,D)=>{const U=we(o._fields,N);U&&U._f&&(U._f.mount=D)};if(L(n,!0),O){const N=un(we(o._options.defaultValues,n,y.current.defaultValue));Et(o._defaultValues,n,N),Ft(we(o._formValues,n))&&Et(o._formValues,n,N)}return!f&&o.register(n),_.current=n,()=>{(f?O&&!o._state.action:O)?o.unregister(n):L(n,!1)}},[n,o,f,l]),F.useEffect(()=>{o._setDisabledField({disabled:a,name:n})},[a,n,o]),F.useMemo(()=>({field:C,formState:p,fieldState:w}),[C,p,w])}const UN=e=>e.render(jN(e));var zv=(e,t,n,a,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:o||!0}}:{},cc=e=>Array.isArray(e)?e:[e],BE=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function Px(e,t){const n={};for(const a in e)if(e.hasOwnProperty(a)){const o=e[a],l=t[a];if(o&&on(o)&&l){const u=Px(o,l);on(u)&&(n[a]=u)}else e[a]&&(n[a]=l)}return n}var Un=e=>on(e)&&!Object.keys(e).length,Vv=e=>e.type==="file",sf=e=>{if(!Lv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},kx=e=>e.type==="select-multiple",Fv=e=>e.type==="radio",BN=e=>Fv(e)||Tc(e),Pm=e=>sf(e)&&e.isConnected;function zN(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;)e=Ft(e)?a++:e[t[a++]];return e}function VN(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function tn(e,t){const n=Array.isArray(t)?t:Af(t)?[t]:kv(t),a=n.length===1?e:zN(e,n),o=n.length-1,l=n[o];return a&&delete a[l],o!==0&&(on(a)&&Un(a)||Array.isArray(a)&&VN(a))&&tn(e,n.slice(0,-1)),e}var FN=e=>{for(const t in e)if(Bn(e[t]))return!0;return!1};function jx(e){return Array.isArray(e)||on(e)&&!FN(e)}function Ug(e,t={}){for(const n in e){const a=e[n];jx(a)?(t[n]=Array.isArray(a)?[]:{},Ug(a,t[n])):Ft(a)||(t[n]=!0)}return t}function Ns(e,t,n){n||(n=Ug(t));for(const a in e){const o=e[a];if(jx(o))Ft(t)||jg(n[a])?n[a]=Ug(o,Array.isArray(o)?[]:{}):Ns(o,Jn(t)?{}:t[a],n[a]);else{const l=t[a];n[a]=!Wr(o,l)}}return n}const zE={value:!1,isValid:!1},VE={value:!0,isValid:!0};var Ux=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?VE:{value:e[0].value,isValid:!0}:VE:zE}return zE},Bx=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>Ft(e)?e:t?e===""?NaN:e&&+e:n&&gr(e)?new Date(e):a?a(e):e;const FE={isValid:!1,value:null};var zx=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,FE):FE;function HE(e){const t=e.ref;return Vv(t)?t.files:Fv(t)?zx(e.refs).value:kx(t)?[...t.selectedOptions].map(({value:n})=>n):Tc(t)?Ux(e.refs).value:Bx(Ft(t.value)?e.ref.value:t.value,e)}var HN=(e,t,n,a)=>{const o={};for(const l of e){const u=we(t,l);u&&Et(o,l,u._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:a}},lf=e=>e instanceof RegExp,Zl=e=>Ft(e)?e:lf(e)?e.source:on(e)?lf(e.value)?e.value.source:e.value:e,$E=e=>({isOnSubmit:!e||e===Kr.onSubmit,isOnBlur:e===Kr.onBlur,isOnChange:e===Kr.onChange,isOnAll:e===Kr.all,isOnTouch:e===Kr.onTouched});const GE="AsyncFunction";var $N=e=>!!e&&!!e.validate&&!!(Bn(e.validate)&&e.validate.constructor.name===GE||on(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===GE)),GN=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),qE=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const uc=(e,t,n,a)=>{for(const o of n||Object.keys(e)){const l=we(e,o);if(l){const{_f:u,...d}=l;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o)&&!a)return!0;if(u.ref&&t(u.ref,u.name)&&!a)return!0;if(uc(d,t))break}else if(on(d)&&uc(d,t))break}}};function YE(e,t,n){const a=we(e,n);if(a||Af(n))return{error:a,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),u=we(t,l),d=we(e,l);if(u&&!Array.isArray(u)&&n!==l)return{name:n};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};o.pop()}return{name:n}}var qN=(e,t,n,a)=>{n(e);const{name:o,...l}=e;return Un(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(u=>t[u]===(!a||Kr.all))},YN=(e,t,n)=>!e||!t||e===t||cc(e).some(a=>a&&(n?a===t:a.startsWith(t)||t.startsWith(a))),KN=(e,t,n,a,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?a.isOnBlur:o.isOnBlur)?!e:(n?a.isOnChange:o.isOnChange)?e:!0,WN=(e,t)=>!Pv(we(e,t)).length&&tn(e,t),ZN=(e,t,n)=>{const a=cc(we(e,n));return Et(a,"root",t[n]),Et(e,n,a),e};function KE(e,t,n="validate"){if(gr(e)||Array.isArray(e)&&e.every(gr)||hr(e)&&!e)return{type:n,message:gr(e)?e:"",ref:t}}var ws=e=>on(e)&&!lf(e)?e:{value:e,message:""},WE=async(e,t,n,a,o,l)=>{const{ref:u,refs:d,required:f,maxLength:h,minLength:g,min:p,max:y,pattern:_,validate:S,name:w,valueAsNumber:T,mount:R}=e._f,A=we(n,w);if(!R||t.has(w))return{};const C=d?d[0]:u,O=W=>{o&&C.reportValidity&&(C.setCustomValidity(hr(W)?"":W||""),C.reportValidity())},I={},L=Fv(u),N=Tc(u),D=L||N,U=(T||Vv(u))&&Ft(u.value)&&Ft(A)||sf(u)&&u.value===""||A===""||Array.isArray(A)&&!A.length,Q=zv.bind(null,w,a,I),G=(W,j,ne,ie=Ga.maxLength,P=Ga.minLength)=>{const V=W?j:ne;I[w]={type:W?ie:P,message:V,ref:u,...Q(W?ie:P,V)}};if(l?!Array.isArray(A)||!A.length:f&&(!D&&(U||Jn(A))||hr(A)&&!A||N&&!Ux(d).isValid||L&&!zx(d).isValid)){const{value:W,message:j}=gr(f)?{value:!!f,message:f}:ws(f);if(W&&(I[w]={type:Ga.required,message:j,ref:C,...Q(Ga.required,j)},!a))return O(j),I}if(!U&&(!Jn(p)||!Jn(y))){let W,j;const ne=ws(y),ie=ws(p);if(!Jn(A)&&!isNaN(A)){const P=u.valueAsNumber||A&&+A;Jn(ne.value)||(W=P>ne.value),Jn(ie.value)||(j=P<ie.value)}else{const P=u.valueAsDate||new Date(A),V=ve=>new Date(new Date().toDateString()+" "+ve),$=u.type=="time",re=u.type=="week";gr(ne.value)&&A&&(W=$?V(A)>V(ne.value):re?A>ne.value:P>new Date(ne.value)),gr(ie.value)&&A&&(j=$?V(A)<V(ie.value):re?A<ie.value:P<new Date(ie.value))}if((W||j)&&(G(!!W,ne.message,ie.message,Ga.max,Ga.min),!a))return O(I[w].message),I}if((h||g)&&!U&&(gr(A)||l&&Array.isArray(A))){const W=ws(h),j=ws(g),ne=!Jn(W.value)&&A.length>+W.value,ie=!Jn(j.value)&&A.length<+j.value;if((ne||ie)&&(G(ne,W.message,j.message),!a))return O(I[w].message),I}if(_&&!U&&gr(A)){const{value:W,message:j}=ws(_);if(lf(W)&&!A.match(W)&&(I[w]={type:Ga.pattern,message:j,ref:u,...Q(Ga.pattern,j)},!a))return O(j),I}if(S){if(Bn(S)){const W=await S(A,n),j=KE(W,C);if(j&&(I[w]={...j,...Q(Ga.validate,j.message)},!a))return O(j.message),I}else if(on(S)){let W={};for(const j in S){if(!Un(W)&&!a)break;const ne=KE(await S[j](A,n),C,j);ne&&(W={...ne,...Q(j,ne.message)},O(ne.message),a&&(I[w]=W))}if(!Un(W)&&(I[w]={ref:C,...W},!a))return I}}return O(!0),I};const QN={mode:Kr.onSubmit,reValidateMode:Kr.onChange,shouldFocusError:!0};function XN(e={}){let t={...QN,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Bn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},a={},o=on(t.defaultValues)||on(t.values)?un(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:un(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...g};let y={...p};const _={array:BE(),state:BE()},S=t.criteriaMode===Kr.all,w=B=>q=>{clearTimeout(h),h=setTimeout(B,q)},T=async B=>{if(!u.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||B)){let q;t.resolver?(q=Un((await D()).errors),R()):q=await Q(a,!0),q!==n.isValid&&_.state.next({isValid:q})}},R=(B,q)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((B||Array.from(d.mount)).forEach(Y=>{Y&&(q?Et(n.validatingFields,Y,q):tn(n.validatingFields,Y))}),_.state.next({validatingFields:n.validatingFields,isValidating:!Un(n.validatingFields)}))},A=(B,q=[],Y,ce,he=!0,fe=!0)=>{if(ce&&Y&&!t.disabled){if(u.action=!0,fe&&Array.isArray(we(a,B))){const xe=Y(we(a,B),ce.argA,ce.argB);he&&Et(a,B,xe)}if(fe&&Array.isArray(we(n.errors,B))){const xe=Y(we(n.errors,B),ce.argA,ce.argB);he&&Et(n.errors,B,xe),WN(n.errors,B)}if((p.touchedFields||y.touchedFields)&&fe&&Array.isArray(we(n.touchedFields,B))){const xe=Y(we(n.touchedFields,B),ce.argA,ce.argB);he&&Et(n.touchedFields,B,xe)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=Ns(o,l)),_.state.next({name:B,isDirty:W(B,q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Et(l,B,q)},C=(B,q)=>{Et(n.errors,B,q),_.state.next({errors:n.errors})},O=B=>{n.errors=B,_.state.next({errors:n.errors,isValid:!1})},I=(B,q,Y,ce)=>{const he=we(a,B);if(he){const fe=we(l,B,Ft(Y)?we(o,B):Y);Ft(fe)||ce&&ce.defaultChecked||q?Et(l,B,q?fe:HE(he._f)):ie(B,fe),u.mount&&!u.action&&T()}},L=(B,q,Y,ce,he)=>{let fe=!1,xe=!1;const $e={name:B};if(!t.disabled){if(!Y||ce){(p.isDirty||y.isDirty)&&(xe=n.isDirty,n.isDirty=$e.isDirty=W(),fe=xe!==$e.isDirty);const nt=Wr(we(o,B),q);xe=!!we(n.dirtyFields,B),nt?tn(n.dirtyFields,B):Et(n.dirtyFields,B,!0),$e.dirtyFields=n.dirtyFields,fe=fe||(p.dirtyFields||y.dirtyFields)&&xe!==!nt}if(Y){const nt=we(n.touchedFields,B);nt||(Et(n.touchedFields,B,Y),$e.touchedFields=n.touchedFields,fe=fe||(p.touchedFields||y.touchedFields)&&nt!==Y)}fe&&he&&_.state.next($e)}return fe?$e:{}},N=(B,q,Y,ce)=>{const he=we(n.errors,B),fe=(p.isValid||y.isValid)&&hr(q)&&n.isValid!==q;if(t.delayError&&Y?(f=w(()=>C(B,Y)),f(t.delayError)):(clearTimeout(h),f=null,Y?Et(n.errors,B,Y):tn(n.errors,B)),(Y?!Wr(he,Y):he)||!Un(ce)||fe){const xe={...ce,...fe&&hr(q)?{isValid:q}:{},errors:n.errors,name:B};n={...n,...xe},_.state.next(xe)}},D=async B=>(R(B,!0),await t.resolver(l,t.context,HN(B||d.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),U=async B=>{const{errors:q}=await D(B);if(R(B),B)for(const Y of B){const ce=we(q,Y);ce?Et(n.errors,Y,ce):tn(n.errors,Y)}else n.errors=q;return q},Q=async(B,q,Y={valid:!0})=>{for(const ce in B){const he=B[ce];if(he){const{_f:fe,...xe}=he;if(fe){const $e=d.array.has(fe.name),nt=he._f&&$N(he._f);nt&&p.validatingFields&&R([fe.name],!0);const Tt=await WE(he,d.disabled,l,S,t.shouldUseNativeValidation&&!q,$e);if(nt&&p.validatingFields&&R([fe.name]),Tt[fe.name]&&(Y.valid=!1,q))break;!q&&(we(Tt,fe.name)?$e?ZN(n.errors,Tt,fe.name):Et(n.errors,fe.name,Tt[fe.name]):tn(n.errors,fe.name))}!Un(xe)&&await Q(xe,q,Y)}}return Y.valid},G=()=>{for(const B of d.unMount){const q=we(a,B);q&&(q._f.refs?q._f.refs.every(Y=>!Pm(Y)):!Pm(q._f.ref))&&Se(B)}d.unMount=new Set},W=(B,q)=>!t.disabled&&(B&&q&&Et(l,B,q),!Wr(k(),o)),j=(B,q,Y)=>kg(B,d,{...u.mount?l:Ft(q)?o:gr(B)?{[B]:q}:q},Y,q),ne=B=>Pv(we(u.mount?l:o,B,t.shouldUnregister?we(o,B,[]):[])),ie=(B,q,Y={})=>{const ce=we(a,B);let he=q;if(ce){const fe=ce._f;fe&&(!fe.disabled&&Et(l,B,Bx(q,fe)),he=sf(fe.ref)&&Jn(q)?"":q,kx(fe.ref)?[...fe.ref.options].forEach(xe=>xe.selected=he.includes(xe.value)):fe.refs?Tc(fe.ref)?fe.refs.forEach(xe=>{(!xe.defaultChecked||!xe.disabled)&&(Array.isArray(he)?xe.checked=!!he.find($e=>$e===xe.value):xe.checked=he===xe.value||!!he)}):fe.refs.forEach(xe=>xe.checked=xe.value===he):Vv(fe.ref)?fe.ref.value="":(fe.ref.value=he,fe.ref.type||_.state.next({name:B,values:un(l)})))}(Y.shouldDirty||Y.shouldTouch)&&L(B,he,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&ve(B)},P=(B,q,Y)=>{for(const ce in q){if(!q.hasOwnProperty(ce))return;const he=q[ce],fe=B+"."+ce,xe=we(a,fe);(d.array.has(B)||on(he)||xe&&!xe._f)&&!vo(he)?P(fe,he,Y):ie(fe,he,Y)}},V=(B,q,Y={})=>{const ce=we(a,B),he=d.array.has(B),fe=un(q);Et(l,B,fe),he?(_.array.next({name:B,values:un(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&Y.shouldDirty&&_.state.next({name:B,dirtyFields:Ns(o,l),isDirty:W(B,fe)})):ce&&!ce._f&&!Jn(fe)?P(B,fe,Y):ie(B,fe,Y),qE(B,d)&&_.state.next({...n,name:B}),_.state.next({name:u.mount?B:void 0,values:un(l)})},$=async B=>{u.mount=!0;const q=B.target;let Y=q.name,ce=!0;const he=we(a,Y),fe=nt=>{ce=Number.isNaN(nt)||vo(nt)&&isNaN(nt.getTime())||Wr(nt,we(l,Y,nt))},xe=$E(t.mode),$e=$E(t.reValidateMode);if(he){let nt,Tt;const nr=q.type?HE(he._f):Nx(B),Mt=B.type===of.BLUR||B.type===of.FOCUS_OUT,Kt=!GN(he._f)&&!t.resolver&&!we(n.errors,Y)&&!he._f.deps||KN(Mt,we(n.touchedFields,Y),n.isSubmitted,$e,xe),It=qE(Y,d,Mt);Et(l,Y,nr),Mt?(!q||!q.readOnly)&&(he._f.onBlur&&he._f.onBlur(B),f&&f(0)):he._f.onChange&&he._f.onChange(B);const sn=L(Y,nr,Mt),Wt=!Un(sn)||It;if(!Mt&&_.state.next({name:Y,type:B.type,values:un(l)}),Kt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?Mt&&T():Mt||T()),Wt&&_.state.next({name:Y,...It?{}:sn});if(!Mt&&It&&_.state.next({...n}),t.resolver){const{errors:ei}=await D([Y]);if(R([Y]),fe(nr),ce){const Ra=YE(n.errors,a,Y),Ie=YE(ei,a,Ra.name||Y);nt=Ie.error,Y=Ie.name,Tt=Un(ei)}}else R([Y],!0),nt=(await WE(he,d.disabled,l,S,t.shouldUseNativeValidation))[Y],R([Y]),fe(nr),ce&&(nt?Tt=!1:(p.isValid||y.isValid)&&(Tt=await Q(a,!0)));ce&&(he._f.deps&&(!Array.isArray(he._f.deps)||he._f.deps.length>0)&&ve(he._f.deps),N(Y,Tt,nt,sn))}},re=(B,q)=>{if(we(n.errors,q)&&B.focus)return B.focus(),1},ve=async(B,q={})=>{let Y,ce;const he=cc(B);if(t.resolver){const fe=await U(Ft(B)?B:he);Y=Un(fe),ce=B?!he.some(xe=>we(fe,xe)):Y}else B?(ce=(await Promise.all(he.map(async fe=>{const xe=we(a,fe);return await Q(xe&&xe._f?{[fe]:xe}:xe)}))).every(Boolean),!(!ce&&!n.isValid)&&T()):ce=Y=await Q(a);return _.state.next({...!gr(B)||(p.isValid||y.isValid)&&Y!==n.isValid?{}:{name:B},...t.resolver||!B?{isValid:Y}:{},errors:n.errors}),q.shouldFocus&&!ce&&uc(a,re,B?he:d.mount),ce},k=(B,q)=>{let Y={...u.mount?l:o};return q&&(Y=Px(q.dirtyFields?n.dirtyFields:n.touchedFields,Y)),Ft(B)?Y:gr(B)?we(Y,B):B.map(ce=>we(Y,ce))},Z=(B,q)=>({invalid:!!we((q||n).errors,B),isDirty:!!we((q||n).dirtyFields,B),error:we((q||n).errors,B),isValidating:!!we(n.validatingFields,B),isTouched:!!we((q||n).touchedFields,B)}),ee=B=>{B&&cc(B).forEach(q=>tn(n.errors,q)),_.state.next({errors:B?n.errors:{}})},oe=(B,q,Y)=>{const ce=(we(a,B,{_f:{}})._f||{}).ref,he=we(n.errors,B)||{},{ref:fe,message:xe,type:$e,...nt}=he;Et(n.errors,B,{...nt,...q,ref:ce}),_.state.next({name:B,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&ce&&ce.focus&&ce.focus()},pe=(B,q)=>Bn(B)?_.state.subscribe({next:Y=>"values"in Y&&B(j(void 0,q),Y)}):j(B,q,!0),be=B=>_.state.subscribe({next:q=>{YN(B.name,q.name,B.exact)&&qN(q,B.formState||p,it,B.reRenderRoot)&&B.callback({values:{...l},...n,...q,defaultValues:o})}}).unsubscribe,ye=B=>(u.mount=!0,y={...y,...B.formState},be({...B,formState:{...g,...B.formState}})),Se=(B,q={})=>{for(const Y of B?cc(B):d.mount)d.mount.delete(Y),d.array.delete(Y),q.keepValue||(tn(a,Y),tn(l,Y)),!q.keepError&&tn(n.errors,Y),!q.keepDirty&&tn(n.dirtyFields,Y),!q.keepTouched&&tn(n.touchedFields,Y),!q.keepIsValidating&&tn(n.validatingFields,Y),!t.shouldUnregister&&!q.keepDefaultValue&&tn(o,Y);_.state.next({values:un(l)}),_.state.next({...n,...q.keepDirty?{isDirty:W()}:{}}),!q.keepIsValid&&T()},Pe=({disabled:B,name:q})=>{(hr(B)&&u.mount||B||d.disabled.has(q))&&(B?d.disabled.add(q):d.disabled.delete(q))},ke=(B,q={})=>{let Y=we(a,B);const ce=hr(q.disabled)||hr(t.disabled);return Et(a,B,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:B}},name:B,mount:!0,...q}}),d.mount.add(B),Y?Pe({disabled:hr(q.disabled)?q.disabled:t.disabled,name:B}):I(B,!0,q.value),{...ce?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:Zl(q.min),max:Zl(q.max),minLength:Zl(q.minLength),maxLength:Zl(q.maxLength),pattern:Zl(q.pattern)}:{},name:B,onChange:$,onBlur:$,ref:he=>{if(he){ke(B,q),Y=we(a,B);const fe=Ft(he.value)&&he.querySelectorAll&&he.querySelectorAll("input,select,textarea")[0]||he,xe=BN(fe),$e=Y._f.refs||[];if(xe?$e.find(nt=>nt===fe):fe===Y._f.ref)return;Et(a,B,{_f:{...Y._f,...xe?{refs:[...$e.filter(Pm),fe,...Array.isArray(we(o,B))?[{}]:[]],ref:{type:fe.type,name:B}}:{ref:fe}}}),I(B,!1,void 0,fe)}else Y=we(a,B,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(Dx(d.array,B)&&u.action)&&d.unMount.add(B)}}},Ee=()=>t.shouldFocusError&&uc(a,re,d.mount),ze=B=>{hr(B)&&(_.state.next({disabled:B}),uc(a,(q,Y)=>{const ce=we(a,Y);ce&&(q.disabled=ce._f.disabled||B,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(he=>{he.disabled=ce._f.disabled||B}))},0,!1))},Pt=(B,q)=>async Y=>{let ce;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let he=un(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:fe,values:xe}=await D();R(),n.errors=fe,he=un(xe)}else await Q(a);if(d.disabled.size)for(const fe of d.disabled)tn(he,fe);if(tn(n.errors,"root"),Un(n.errors)){_.state.next({errors:{}});try{await B(he,Y)}catch(fe){ce=fe}}else q&&await q({...n.errors},Y),Ee(),setTimeout(Ee);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Un(n.errors)&&!ce,submitCount:n.submitCount+1,errors:n.errors}),ce)throw ce},ge=(B,q={})=>{we(a,B)&&(Ft(q.defaultValue)?V(B,un(we(o,B))):(V(B,q.defaultValue),Et(o,B,un(q.defaultValue))),q.keepTouched||tn(n.touchedFields,B),q.keepDirty||(tn(n.dirtyFields,B),n.isDirty=q.defaultValue?W(B,un(we(o,B))):W()),q.keepError||(tn(n.errors,B),p.isValid&&T()),_.state.next({...n}))},me=(B,q={})=>{const Y=B?un(B):o,ce=un(Y),he=Un(B),fe=he?o:ce;if(q.keepDefaultValues||(o=Y),!q.keepValues){if(q.keepDirtyValues){const xe=new Set([...d.mount,...Object.keys(Ns(o,l))]);for(const $e of Array.from(xe))we(n.dirtyFields,$e)?Et(fe,$e,we(l,$e)):V($e,we(fe,$e))}else{if(Lv&&Ft(B))for(const xe of d.mount){const $e=we(a,xe);if($e&&$e._f){const nt=Array.isArray($e._f.refs)?$e._f.refs[0]:$e._f.ref;if(sf(nt)){const Tt=nt.closest("form");if(Tt){Tt.reset();break}}}}if(q.keepFieldsRef)for(const xe of d.mount)V(xe,we(fe,xe));else a={}}l=t.shouldUnregister?q.keepDefaultValues?un(o):{}:un(fe),_.array.next({values:{...fe}}),_.state.next({values:{...fe}})}d={mount:q.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!p.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!Un(fe),u.watch=!!t.shouldUnregister,u.keepIsValid=!!q.keepIsValid,u.action=!1,q.keepErrors||(n.errors={}),_.state.next({submitCount:q.keepSubmitCount?n.submitCount:0,isDirty:he?!1:q.keepDirty?n.isDirty:!!(q.keepDefaultValues&&!Wr(B,o)),isSubmitted:q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:he?{}:q.keepDirtyValues?q.keepDefaultValues&&l?Ns(o,l):n.dirtyFields:q.keepDefaultValues&&B?Ns(o,B):q.keepDirty?n.dirtyFields:{},touchedFields:q.keepTouched?n.touchedFields:{},errors:q.keepErrors?n.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Re=(B,q)=>me(Bn(B)?B(l):B,{...t.resetOptions,...q}),Ue=(B,q={})=>{const Y=we(a,B),ce=Y&&Y._f;if(ce){const he=ce.refs?ce.refs[0]:ce.ref;he.focus&&setTimeout(()=>{he.focus(),q.shouldSelect&&Bn(he.select)&&he.select()})}},it=B=>{n={...n,...B}},tt={control:{register:ke,unregister:Se,getFieldState:Z,handleSubmit:Pt,setError:oe,_subscribe:be,_runSchema:D,_updateIsValidating:R,_focusError:Ee,_getWatch:j,_getDirty:W,_setValid:T,_setFieldArray:A,_setDisabledField:Pe,_setErrors:O,_getFieldArray:ne,_reset:me,_resetDefaultValues:()=>Bn(t.defaultValues)&&t.defaultValues().then(B=>{Re(B,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:ze,_subjects:_,_proxyFormState:p,get _fields(){return a},get _formValues(){return l},get _state(){return u},set _state(B){u=B},get _defaultValues(){return o},get _names(){return d},set _names(B){d=B},get _formState(){return n},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:ye,trigger:ve,register:ke,handleSubmit:Pt,watch:pe,setValue:V,getValues:k,reset:Re,resetField:ge,clearErrors:ee,unregister:Se,setError:oe,setFocus:Ue,getFieldState:Z};return{...tt,formControl:tt}}function _a(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[a,o]=F.useState({isDirty:!1,isValidating:!1,isLoading:Bn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Bn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!Bn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=XN(e);t.current={...d,formState:a}}const l=t.current.control;return l._options=e,Uv(()=>{const u=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),l._formState.isReady=!0,u},[l]),F.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),F.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),F.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),F.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),F.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==a.isDirty&&l._subjects.state.next({isDirty:u})}},[l,a.isDirty]),F.useEffect(()=>{var u;e.values&&!Wr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),F.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=Lx(a,l),t.current}function ZE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ac(...e){return t=>{let n=!1;const a=e.map(o=>{const l=ZE(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<a.length;o++){const l=a[o];typeof l=="function"?l():ZE(e[o],null)}}}}function hn(...e){return E.useCallback(Ac(...e),e)}var JN=Symbol.for("react.lazy"),cf=cv[" use ".trim().toString()];function eD(e){return typeof e=="object"&&e!==null&&"then"in e}function Vx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JN&&"_payload"in e&&eD(e._payload)}function Fx(e){const t=tD(e),n=E.forwardRef((a,o)=>{let{children:l,...u}=a;Vx(l)&&typeof cf=="function"&&(l=cf(l._payload));const d=E.Children.toArray(l),f=d.find(rD);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var Hx=Fx("Slot");function tD(e){const t=E.forwardRef((n,a)=>{let{children:o,...l}=n;if(Vx(o)&&typeof cf=="function"&&(o=cf(o._payload)),E.isValidElement(o)){const u=iD(o),d=aD(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Ac(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nD=Symbol("radix.slottable");function rD(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nD}function aD(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function iD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const QE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,XE=ox,oD=(e,t)=>n=>{var a;if(t?.variants==null)return XE(e,n?.class,n?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(h=>{const g=n?.[h],p=l?.[h];if(g===null)return null;const y=QE(g)||QE(p);return o[h][y]}),d=n&&Object.entries(n).reduce((h,g)=>{let[p,y]=g;return y===void 0||(h[p]=y),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:p,className:y,..._}=g;return Object.entries(_).every(S=>{let[w,T]=S;return Array.isArray(T)?T.includes({...l,...d}[w]):{...l,...d}[w]===T})?[...h,p,y]:h},[]);return XE(e,u,f,n?.class,n?.className)},JE=(e,t,n)=>{if(e&&"reportValidity"in e){const a=we(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},Bg=(e,t)=>{for(const n in t.fields){const a=t.fields[n];a&&a.ref&&"reportValidity"in a.ref?JE(a.ref,n,e):a&&a.refs&&a.refs.forEach(o=>JE(o,n,e))}},eS=(e,t)=>{t.shouldUseNativeValidation&&Bg(e,t);const n={};for(const a in e){const o=we(t.fields,a),l=Object.assign(e[a]||{},{ref:o&&o.ref});if(sD(t.names||Object.keys(e),a)){const u=Object.assign({},we(n,a));Et(u,"root",l),Et(n,a,u)}else Et(n,a,l)}return n},sD=(e,t)=>{const n=tS(t);return e.some(a=>tS(a).match(`^${n}\\.\\d+`))};function tS(e){return e.replace(/\]|\[/g,"")}function $x(e,t,n){function a(d,f){var h;Object.defineProperty(d,"_zod",{value:d._zod??{},enumerable:!1}),(h=d._zod).traits??(h.traits=new Set),d._zod.traits.add(e),t(d,f);for(const g in u.prototype)g in d||Object.defineProperty(d,g,{value:u.prototype[g].bind(d)});d._zod.constr=u,d._zod.def=f}const o=n?.Parent??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function u(d){var f;const h=n?.Parent?new l:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class Gx extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const lD={};function Mf(e){return lD}function QB(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function cD(e,t){return typeof t=="bigint"?t.toString():t}function uD(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function XB(e){return e==null}function JB(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ez(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}function tz(e,t,n){Object.defineProperty(e,t,{get(){{const a=n();return e[t]=a,a}},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function qx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nz(e){return JSON.stringify(e)}const Yx=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function nS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const rz=uD(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function dD(e){if(nS(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(nS(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const az=new Set(["string","number","symbol"]);function iz(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ws(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function oz(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const lz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function cz(e,t){const n={},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=a.shape[o])}return Ws(e,{...e._zod.def,shape:n,checks:[]})}function uz(e,t){const n={...e._zod.def.shape},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return Ws(e,{...e._zod.def,shape:n,checks:[]})}function dz(e,t){if(!dD(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const a={...e._zod.def.shape,...t};return qx(this,"shape",a),a},checks:[]};return Ws(e,n)}function fz(e,t){return Ws(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return qx(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function hz(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)o[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Ws(t,{...t._zod.def,shape:o,checks:[]})}function pz(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return Ws(t,{...t._zod.def,shape:o,checks:[]})}function mz(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function gz(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function ld(e){return typeof e=="string"?e:e?.message}function If(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=ld(e.inst?._zod.def?.error?.(e))??ld(t?.error?.(e))??ld(n.customError?.(e))??ld(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function vz(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yz(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const Kx=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,cD,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Wx=$x("$ZodError",Kx),Nf=$x("$ZodError",Kx,{Parent:Error});function bz(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function _z(e,t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>o({issues:d}));else if(u.code==="invalid_key")o({issues:u.issues});else if(u.code==="invalid_element")o({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(e),a}const fD=e=>(t,n,a,o)=>{const l=a?Object.assign(a,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise)throw new Gx;if(u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>If(f,l,Mf())));throw Yx(d,o?.callee),d}return u.value},hD=fD(Nf),pD=e=>async(t,n,a,o)=>{const l=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>If(f,l,Mf())));throw Yx(d,o?.callee),d}return u.value},mD=pD(Nf),gD=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Gx;return l.issues.length?{success:!1,error:new(e??Wx)(l.issues.map(u=>If(u,o,Mf())))}:{success:!0,data:l.value}},Ez=gD(Nf),vD=e=>async(t,n,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>If(u,o,Mf())))}:{success:!0,data:l.value}},Sz=vD(Nf);function rS(e,t){try{var n=e()}catch(a){return t(a)}return n&&n.then?n.then(void 0,t):n}function yD(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if("unionErrors"in a){var d=a.unionErrors[0].errors[0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=zv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function bD(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if(a.code==="invalid_union"&&a.errors.length>0){var d=a.errors[0][0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=zv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function Ea(e,t,n){if(n===void 0&&(n={}),(function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def})(e))return function(a,o,l){try{return Promise.resolve(rS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(u){return l.shouldUseNativeValidation&&Bg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return Array.isArray(d?.issues)})(u))return{values:{},errors:eS(yD(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};if((function(a){return"_zod"in a&&typeof a._zod=="object"})(e))return function(a,o,l){try{return Promise.resolve(rS(function(){return Promise.resolve((n.mode==="sync"?hD:mD)(e,a,t)).then(function(u){return l.shouldUseNativeValidation&&Bg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return d instanceof Wx})(u))return{values:{},errors:eS(bD(u.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}function Ke(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function _D(e,t){const n=E.createContext(t),a=l=>{const{children:u,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:u})};a.displayName=e+"Provider";function o(l){const u=E.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[a,o]}function Lo(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u),f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function g(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,ED(o,...t)]}function ED(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Qr=globalThis?.document?E.useLayoutEffect:()=>{},SD=cv[" useId ".trim().toString()]||(()=>{}),wD=0;function Ui(e){const[t,n]=E.useState(SD());return Qr(()=>{n(a=>a??String(wD++))},[e]),e||(t?`radix-${t}`:"")}var xD=cv[" useInsertionEffect ".trim().toString()]||Qr;function Cc({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[o,l,u]=RD({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:o;{const g=E.useRef(e!==void 0);E.useEffect(()=>{const p=g.current;p!==d&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,a])}const h=E.useCallback(g=>{if(d){const p=OD(g)?g(e):g;p!==e&&u.current?.(p)}else l(g)},[d,e,l,u]);return[f,h]}function RD({defaultProp:e,onChange:t}){const[n,a]=E.useState(e),o=E.useRef(n),l=E.useRef(t);return xD(()=>{l.current=t},[t]),E.useEffect(()=>{o.current!==n&&(l.current?.(n),o.current=n)},[n,o]),[n,a,l]}function OD(e){return typeof e=="function"}function bc(e){const t=TD(e),n=E.forwardRef((a,o)=>{const{children:l,...u}=a,d=E.Children.toArray(l),f=d.find(AD);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function TD(e){const t=E.forwardRef((n,a)=>{const{children:o,...l}=n;if(E.isValidElement(o)){const u=MD(o),d=CD(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Ac(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zx=Symbol("radix.slottable");function wz(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Zx,t}function AD(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zx}function CD(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function MD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ID=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bt=ID.reduce((e,t)=>{const n=bc(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Qx(e,t){e&&Tf.flushSync(()=>e.dispatchEvent(t))}function Xr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function ND(e,t=globalThis?.document){const n=Xr(e);E.useEffect(()=>{const a=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var DD="DismissableLayer",zg="dismissableLayer.update",LD="dismissableLayer.pointerDownOutside",PD="dismissableLayer.focusOutside",aS,Xx=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hv=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,h=E.useContext(Xx),[g,p]=E.useState(null),y=g?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=hn(t,N=>p(N)),w=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=w.indexOf(T),A=g?w.indexOf(g):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,O=A>=R,I=UD(N=>{const D=N.target,U=[...h.branches].some(Q=>Q.contains(D));!O||U||(o?.(N),u?.(N),N.defaultPrevented||d?.())},y),L=BD(N=>{const D=N.target;[...h.branches].some(Q=>Q.contains(D))||(l?.(N),u?.(N),N.defaultPrevented||d?.())},y);return ND(N=>{A===h.layers.size-1&&(a?.(N),!N.defaultPrevented&&d&&(N.preventDefault(),d()))},y),E.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(aS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),iS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=aS)}},[g,y,n,h]),E.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),iS())},[g,h]),E.useEffect(()=>{const N=()=>_({});return document.addEventListener(zg,N),()=>document.removeEventListener(zg,N)},[]),b.jsx(Bt.div,{...f,ref:S,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:Ke(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Ke(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ke(e.onPointerDownCapture,I.onPointerDownCapture)})});Hv.displayName=DD;var kD="DismissableLayerBranch",jD=E.forwardRef((e,t)=>{const n=E.useContext(Xx),a=E.useRef(null),o=hn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(Bt.div,{...e,ref:o})});jD.displayName=kD;function UD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!a.current){let f=function(){Jx(LD,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function BD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1);return E.useEffect(()=>{const o=l=>{l.target&&!a.current&&Jx(PD,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function iS(){const e=new CustomEvent(zg);document.dispatchEvent(e)}function Jx(e,t,n,{discrete:a}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?Qx(o,l):o.dispatchEvent(l)}var km="focusScope.autoFocusOnMount",jm="focusScope.autoFocusOnUnmount",oS={bubbles:!1,cancelable:!0},zD="FocusScope",$v=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=e,[d,f]=E.useState(null),h=Xr(o),g=Xr(l),p=E.useRef(null),y=hn(t,w=>f(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(a){let w=function(C){if(_.paused||!d)return;const O=C.target;d.contains(O)?p.current=O:Ci(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const O=C.relatedTarget;O!==null&&(d.contains(O)||Ci(p.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const I of C)I.removedNodes.length>0&&Ci(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const A=new MutationObserver(R);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),A.disconnect()}}},[a,d,_.paused]),E.useEffect(()=>{if(d){lS.add(_);const w=document.activeElement;if(!d.contains(w)){const R=new CustomEvent(km,oS);d.addEventListener(km,h),d.dispatchEvent(R),R.defaultPrevented||(VD(qD(eR(d)),{select:!0}),document.activeElement===w&&Ci(d))}return()=>{d.removeEventListener(km,h),setTimeout(()=>{const R=new CustomEvent(jm,oS);d.addEventListener(jm,g),d.dispatchEvent(R),R.defaultPrevented||Ci(w??document.body,{select:!0}),d.removeEventListener(jm,g),lS.remove(_)},0)}}},[d,h,g,_]);const S=E.useCallback(w=>{if(!n&&!a||_.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,R=document.activeElement;if(T&&R){const A=w.currentTarget,[C,O]=FD(A);C&&O?!w.shiftKey&&R===O?(w.preventDefault(),n&&Ci(C,{select:!0})):w.shiftKey&&R===C&&(w.preventDefault(),n&&Ci(O,{select:!0})):R===A&&w.preventDefault()}},[n,a,_.paused]);return b.jsx(Bt.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});$v.displayName=zD;function VD(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Ci(a,{select:t}),document.activeElement!==n)return}function FD(e){const t=eR(e),n=sS(t,e),a=sS(t.reverse(),e);return[n,a]}function eR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sS(e,t){for(const n of e)if(!HD(n,{upTo:t}))return n}function HD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $D(e){return e instanceof HTMLInputElement&&"select"in e}function Ci(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$D(e)&&t&&e.select()}}var lS=GD();function GD(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=cS(e,t),e.unshift(t)},remove(t){e=cS(e,t),e[0]?.resume()}}}function cS(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function qD(e){return e.filter(t=>t.tagName!=="A")}var YD="Portal",Gv=E.forwardRef((e,t)=>{const{container:n,...a}=e,[o,l]=E.useState(!1);Qr(()=>l(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Vw.createPortal(b.jsx(Bt.div,{...a,ref:t}),u):null});Gv.displayName=YD;function KD(e,t){return E.useReducer((n,a)=>t[n][a]??n,e)}var Ja=e=>{const{present:t,children:n}=e,a=WD(t),o=typeof n=="function"?n({present:a.isPresent}):E.Children.only(n),l=hn(a.ref,ZD(o));return typeof n=="function"||a.isPresent?E.cloneElement(o,{ref:l}):null};Ja.displayName="Presence";function WD(e){const[t,n]=E.useState(),a=E.useRef(null),o=E.useRef(e),l=E.useRef("none"),u=e?"mounted":"unmounted",[d,f]=KD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=cd(a.current);l.current=d==="mounted"?h:"none"},[d]),Qr(()=>{const h=a.current,g=o.current;if(g!==e){const y=l.current,_=cd(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(g&&y!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Qr(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=_=>{const w=cd(a.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(f("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},y=_=>{_.target===t&&(l.current=cd(a.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(h=>{a.current=h?getComputedStyle(h):null,n(h)},[])}}function cd(e){return e?.animationName||"none"}function ZD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Um=0;function tR(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uS()),document.body.insertAdjacentElement("beforeend",e[1]??uS()),Um++,()=>{Um===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Um--}},[])}function uS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var da=function(){return da=Object.assign||function(t){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},da.apply(this,arguments)};function nR(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function QD(e,t,n){if(n||arguments.length===2)for(var a=0,o=t.length,l;a<o;a++)(l||!(a in t))&&(l||(l=Array.prototype.slice.call(t,0,a)),l[a]=t[a]);return e.concat(l||Array.prototype.slice.call(t))}var Ad="right-scroll-bar-position",Cd="width-before-scroll-bar",XD="with-scroll-bars-hidden",JD="--removed-body-scroll-bar-size";function Bm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eL(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var o=n.value;o!==a&&(n.value=a,n.callback(a,o))}}}})[0];return n.callback=t,n.facade}var tL=typeof window<"u"?E.useLayoutEffect:E.useEffect,dS=new WeakMap;function nL(e,t){var n=eL(null,function(a){return e.forEach(function(o){return Bm(o,a)})});return tL(function(){var a=dS.get(n);if(a){var o=new Set(a),l=new Set(e),u=n.current;o.forEach(function(d){l.has(d)||Bm(d,null)}),l.forEach(function(d){o.has(d)||Bm(d,u)})}dS.set(n,e)},[e]),n}function rL(e){return e}function aL(e,t){t===void 0&&(t=rL);var n=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,a);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(a=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){a=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(l),u=n}var f=function(){var g=u;u=[],g.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){u.push(g),h()},filter:function(g){return u=u.filter(g),n}}}};return o}function iL(e){e===void 0&&(e={});var t=aL(null);return t.options=da({async:!0,ssr:!1},e),t}var rR=function(e){var t=e.sideCar,n=nR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return E.createElement(a,da({},n))};rR.isSideCarExport=!0;function oL(e,t){return e.useMedium(t),rR}var aR=iL(),zm=function(){},Df=E.forwardRef(function(e,t){var n=E.useRef(null),a=E.useState({onScrollCapture:zm,onWheelCapture:zm,onTouchMoveCapture:zm}),o=a[0],l=a[1],u=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,y=e.sideCar,_=e.noRelative,S=e.noIsolation,w=e.inert,T=e.allowPinchZoom,R=e.as,A=R===void 0?"div":R,C=e.gapMode,O=nR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=y,L=nL([n,t]),N=da(da({},O),o);return E.createElement(E.Fragment,null,g&&E.createElement(I,{sideCar:aR,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),u?E.cloneElement(E.Children.only(d),da(da({},N),{ref:L})):E.createElement(A,da({},N,{className:f,ref:L}),d))});Df.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Df.classNames={fullWidth:Cd,zeroRight:Ad};var sL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sL();return t&&e.setAttribute("nonce",t),e}function cL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lL())&&(cL(t,n),uL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fL=function(){var e=dL();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iR=function(){var e=fL(),t=function(n){var a=n.styles,o=n.dynamic;return e(a,o),null};return t},hL={left:0,top:0,right:0,gap:0},Vm=function(e){return parseInt(e||"",10)||0},pL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vm(n),Vm(a),Vm(o)]},mL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hL;var t=pL(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},gL=iR(),js="data-scroll-locked",vL=function(e,t,n,a){var o=e.left,l=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
24
|
+
.`.concat(XD,` {
|
|
25
|
+
overflow: hidden `).concat(a,`;
|
|
26
|
+
padding-right: `).concat(d,"px ").concat(a,`;
|
|
27
|
+
}
|
|
28
|
+
body[`).concat(js,`] {
|
|
29
|
+
overflow: hidden `).concat(a,`;
|
|
30
|
+
overscroll-behavior: contain;
|
|
31
|
+
`).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
|
|
32
|
+
padding-left: `.concat(o,`px;
|
|
33
|
+
padding-top: `).concat(l,`px;
|
|
34
|
+
padding-right: `).concat(u,`px;
|
|
35
|
+
margin-left:0;
|
|
36
|
+
margin-top:0;
|
|
37
|
+
margin-right: `).concat(d,"px ").concat(a,`;
|
|
38
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.`).concat(Ad,` {
|
|
42
|
+
right: `).concat(d,"px ").concat(a,`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.`).concat(Cd,` {
|
|
46
|
+
margin-right: `).concat(d,"px ").concat(a,`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.`).concat(Ad," .").concat(Ad,` {
|
|
50
|
+
right: 0 `).concat(a,`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.`).concat(Cd," .").concat(Cd,` {
|
|
54
|
+
margin-right: 0 `).concat(a,`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
body[`).concat(js,`] {
|
|
58
|
+
`).concat(JD,": ").concat(d,`px;
|
|
59
|
+
}
|
|
60
|
+
`)},fS=function(){var e=parseInt(document.body.getAttribute(js)||"0",10);return isFinite(e)?e:0},yL=function(){E.useEffect(function(){return document.body.setAttribute(js,(fS()+1).toString()),function(){var e=fS()-1;e<=0?document.body.removeAttribute(js):document.body.setAttribute(js,e.toString())}},[])},bL=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;yL();var l=E.useMemo(function(){return mL(o)},[o]);return E.createElement(gL,{styles:vL(l,!t,o,n?"":"!important")})},Vg=!1;if(typeof window<"u")try{var ud=Object.defineProperty({},"passive",{get:function(){return Vg=!0,!0}});window.addEventListener("test",ud,ud),window.removeEventListener("test",ud,ud)}catch{Vg=!1}var xs=Vg?{passive:!1}:!1,_L=function(e){return e.tagName==="TEXTAREA"},oR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_L(e)&&n[t]==="visible")},EL=function(e){return oR(e,"overflowY")},SL=function(e){return oR(e,"overflowX")},hS=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=sR(e,a);if(o){var l=lR(e,a),u=l[1],d=l[2];if(u>d)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},wL=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},xL=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},sR=function(e,t){return e==="v"?EL(t):SL(t)},lR=function(e,t){return e==="v"?wL(t):xL(t)},RL=function(e,t){return e==="h"&&t==="rtl"?-1:1},OL=function(e,t,n,a,o){var l=RL(e,window.getComputedStyle(t).direction),u=l*a,d=n.target,f=t.contains(d),h=!1,g=u>0,p=0,y=0;do{if(!d)break;var _=lR(e,d),S=_[0],w=_[1],T=_[2],R=w-T-l*S;(S||R)&&sR(e,d)&&(p+=R,y+=S);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(p)<1||!g&&Math.abs(y)<1)&&(h=!0),h},dd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pS=function(e){return[e.deltaX,e.deltaY]},mS=function(e){return e&&"current"in e?e.current:e},TL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},AL=function(e){return`
|
|
61
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
62
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
63
|
+
`)},CL=0,Rs=[];function ML(e){var t=E.useRef([]),n=E.useRef([0,0]),a=E.useRef(),o=E.useState(CL++)[0],l=E.useState(iR)[0],u=E.useRef(e);E.useEffect(function(){u.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=QD([e.lockRef.current],(e.shards||[]).map(mS),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(w,T){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var R=dd(w),A=n.current,C="deltaX"in w?w.deltaX:A[0]-R[0],O="deltaY"in w?w.deltaY:A[1]-R[1],I,L=w.target,N=Math.abs(C)>Math.abs(O)?"h":"v";if("touches"in w&&N==="h"&&L.type==="range")return!1;var D=window.getSelection(),U=D&&D.anchorNode,Q=U?U===L||U.contains(L):!1;if(Q)return!1;var G=hS(N,L);if(!G)return!0;if(G?I=N:(I=N==="v"?"h":"v",G=hS(N,L)),!G)return!1;if(!a.current&&"changedTouches"in w&&(C||O)&&(a.current=I),!I)return!0;var W=a.current||I;return OL(W,T,w,W==="h"?C:O)},[]),f=E.useCallback(function(w){var T=w;if(!(!Rs.length||Rs[Rs.length-1]!==l)){var R="deltaY"in T?pS(T):dd(T),A=t.current.filter(function(I){return I.name===T.type&&(I.target===T.target||T.target===I.shadowParent)&&TL(I.delta,R)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var C=(u.current.shards||[]).map(mS).filter(Boolean).filter(function(I){return I.contains(T.target)}),O=C.length>0?d(T,C[0]):!u.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),h=E.useCallback(function(w,T,R,A){var C={name:w,delta:T,target:R,should:A,shadowParent:IL(R)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(O){return O!==C})},1)},[]),g=E.useCallback(function(w){n.current=dd(w),a.current=void 0},[]),p=E.useCallback(function(w){h(w.type,pS(w),w.target,d(w,e.lockRef.current))},[]),y=E.useCallback(function(w){h(w.type,dd(w),w.target,d(w,e.lockRef.current))},[]);E.useEffect(function(){return Rs.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,xs),document.addEventListener("touchmove",f,xs),document.addEventListener("touchstart",g,xs),function(){Rs=Rs.filter(function(w){return w!==l}),document.removeEventListener("wheel",f,xs),document.removeEventListener("touchmove",f,xs),document.removeEventListener("touchstart",g,xs)}},[]);var _=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(l,{styles:AL(o)}):null,_?E.createElement(bL,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function IL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const NL=oL(aR,ML);var qv=E.forwardRef(function(e,t){return E.createElement(Df,da({},e,{ref:t,sideCar:NL}))});qv.classNames=Df.classNames;var DL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Os=new WeakMap,fd=new WeakMap,hd={},Fm=0,cR=function(e){return e&&(e.host||cR(e.parentNode))},LL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=cR(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},PL=function(e,t,n,a){var o=LL(t,Array.isArray(e)?e:[e]);hd[n]||(hd[n]=new WeakMap);var l=hd[n],u=[],d=new Set,f=new Set(o),h=function(p){!p||d.has(p)||(d.add(p),h(p.parentNode))};o.forEach(h);var g=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(y){if(d.has(y))g(y);else try{var _=y.getAttribute(a),S=_!==null&&_!=="false",w=(Os.get(y)||0)+1,T=(l.get(y)||0)+1;Os.set(y,w),l.set(y,T),u.push(y),w===1&&S&&fd.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",y,R)}})};return g(t),d.clear(),Fm++,function(){u.forEach(function(p){var y=Os.get(p)-1,_=l.get(p)-1;Os.set(p,y),l.set(p,_),y||(fd.has(p)||p.removeAttribute(a),fd.delete(p)),_||p.removeAttribute(n)}),Fm--,Fm||(Os=new WeakMap,Os=new WeakMap,fd=new WeakMap,hd={})}},uR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=DL(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),PL(a,o,n,"aria-hidden")):function(){return null}},Lf="Dialog",[dR,xz]=Lo(Lf),[kL,ta]=dR(Lf),fR=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=E.useRef(null),f=E.useRef(null),[h,g]=Cc({prop:a,defaultProp:o??!1,onChange:l,caller:Lf});return b.jsx(kL,{scope:t,triggerRef:d,contentRef:f,contentId:Ui(),titleId:Ui(),descriptionId:Ui(),open:h,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(p=>!p),[g]),modal:u,children:n})};fR.displayName=Lf;var hR="DialogTrigger",pR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(hR,n),l=hn(t,o.triggerRef);return b.jsx(Bt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wv(o.open),...a,ref:l,onClick:Ke(e.onClick,o.onOpenToggle)})});pR.displayName=hR;var Yv="DialogPortal",[jL,mR]=dR(Yv,{forceMount:void 0}),gR=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,l=ta(Yv,t);return b.jsx(jL,{scope:t,forceMount:n,children:E.Children.map(a,u=>b.jsx(Ja,{present:n||l.open,children:b.jsx(Gv,{asChild:!0,container:o,children:u})}))})};gR.displayName=Yv;var uf="DialogOverlay",vR=E.forwardRef((e,t)=>{const n=mR(uf,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(uf,e.__scopeDialog);return l.modal?b.jsx(Ja,{present:a||l.open,children:b.jsx(BL,{...o,ref:t})}):null});vR.displayName=uf;var UL=bc("DialogOverlay.RemoveScroll"),BL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(uf,n);return b.jsx(qv,{as:UL,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(Bt.div,{"data-state":Wv(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Co="DialogContent",yR=E.forwardRef((e,t)=>{const n=mR(Co,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(Co,e.__scopeDialog);return b.jsx(Ja,{present:a||l.open,children:l.modal?b.jsx(zL,{...o,ref:t}):b.jsx(VL,{...o,ref:t})})});yR.displayName=Co;var zL=E.forwardRef((e,t)=>{const n=ta(Co,e.__scopeDialog),a=E.useRef(null),o=hn(t,n.contentRef,a);return E.useEffect(()=>{const l=a.current;if(l)return uR(l)},[]),b.jsx(bR,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ke(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ke(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&l.preventDefault()}),onFocusOutside:Ke(e.onFocusOutside,l=>l.preventDefault())})}),VL=E.forwardRef((e,t)=>{const n=ta(Co,e.__scopeDialog),a=E.useRef(!1),o=E.useRef(!1);return b.jsx(bR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(a.current||n.triggerRef.current?.focus(),l.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(a.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;n.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),bR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=e,d=ta(Co,n),f=E.useRef(null),h=hn(t,f);return tR(),b.jsxs(b.Fragment,{children:[b.jsx($v,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:b.jsx(Hv,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Wv(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(FL,{titleId:d.titleId}),b.jsx($L,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Kv="DialogTitle",_R=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(Kv,n);return b.jsx(Bt.h2,{id:o.titleId,...a,ref:t})});_R.displayName=Kv;var ER="DialogDescription",SR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(ER,n);return b.jsx(Bt.p,{id:o.descriptionId,...a,ref:t})});SR.displayName=ER;var wR="DialogClose",xR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(wR,n);return b.jsx(Bt.button,{type:"button",...a,ref:t,onClick:Ke(e.onClick,()=>o.onOpenChange(!1))})});xR.displayName=wR;function Wv(e){return e?"open":"closed"}var RR="DialogTitleWarning",[Rz,OR]=_D(RR,{contentName:Co,titleName:Kv,docsSlug:"dialog"}),FL=({titleId:e})=>{const t=OR(RR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
64
|
+
|
|
65
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
66
|
+
|
|
67
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},HL="DialogDescriptionWarning",$L=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OR(HL).contentName}}.`;return E.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},GL=fR,qL=pR,YL=gR,KL=vR,WL=yR,ZL=_R,Oz=SR,Tz=xR;function TR(e){const t=e+"CollectionProvider",[n,a]=Lo(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:T,children:R}=w,A=F.useRef(null),C=F.useRef(new Map).current;return b.jsx(o,{scope:T,itemMap:C,collectionRef:A,children:R})};u.displayName=t;const d=e+"CollectionSlot",f=bc(d),h=F.forwardRef((w,T)=>{const{scope:R,children:A}=w,C=l(d,R),O=hn(T,C.collectionRef);return b.jsx(f,{ref:O,children:A})});h.displayName=d;const g=e+"CollectionItemSlot",p="data-radix-collection-item",y=bc(g),_=F.forwardRef((w,T)=>{const{scope:R,children:A,...C}=w,O=F.useRef(null),I=hn(T,O),L=l(g,R);return F.useEffect(()=>(L.itemMap.set(O,{ref:O,...C}),()=>{L.itemMap.delete(O)})),b.jsx(y,{[p]:"",ref:I,children:A})});_.displayName=g;function S(w){const T=l(e+"CollectionConsumer",w);return F.useCallback(()=>{const A=T.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((L,N)=>C.indexOf(L.ref.current)-C.indexOf(N.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:u,Slot:h,ItemSlot:_},S,a]}var QL=E.createContext(void 0);function AR(e){const t=E.useContext(QL);return e||t||"ltr"}const XL=["top","right","bottom","left"],Fi=Math.min,mr=Math.max,df=Math.round,pd=Math.floor,ga=e=>({x:e,y:e}),JL={left:"right",right:"left",bottom:"top",top:"bottom"},e8={start:"end",end:"start"};function Fg(e,t,n){return mr(e,Fi(t,n))}function Za(e,t){return typeof e=="function"?e(t):e}function Qa(e){return e.split("-")[0]}function Zs(e){return e.split("-")[1]}function Zv(e){return e==="x"?"y":"x"}function Qv(e){return e==="y"?"height":"width"}const t8=new Set(["top","bottom"]);function pa(e){return t8.has(Qa(e))?"y":"x"}function Xv(e){return Zv(pa(e))}function n8(e,t,n){n===void 0&&(n=!1);const a=Zs(e),o=Xv(e),l=Qv(o);let u=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=ff(u)),[u,ff(u)]}function r8(e){const t=ff(e);return[Hg(e),t,Hg(t)]}function Hg(e){return e.replace(/start|end/g,t=>e8[t])}const gS=["left","right"],vS=["right","left"],a8=["top","bottom"],i8=["bottom","top"];function o8(e,t,n){switch(e){case"top":case"bottom":return n?t?vS:gS:t?gS:vS;case"left":case"right":return t?a8:i8;default:return[]}}function s8(e,t,n,a){const o=Zs(e);let l=o8(Qa(e),n==="start",a);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(Hg)))),l}function ff(e){return e.replace(/left|right|bottom|top/g,t=>JL[t])}function l8(e){return{top:0,right:0,bottom:0,left:0,...e}}function CR(e){return typeof e!="number"?l8(e):{top:e,right:e,bottom:e,left:e}}function hf(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function yS(e,t,n){let{reference:a,floating:o}=e;const l=pa(t),u=Xv(t),d=Qv(u),f=Qa(t),h=l==="y",g=a.x+a.width/2-o.width/2,p=a.y+a.height/2-o.height/2,y=a[d]/2-o[d]/2;let _;switch(f){case"top":_={x:g,y:a.y-o.height};break;case"bottom":_={x:g,y:a.y+a.height};break;case"right":_={x:a.x+a.width,y:p};break;case"left":_={x:a.x-o.width,y:p};break;default:_={x:a.x,y:a.y}}switch(Zs(t)){case"start":_[u]-=y*(n&&h?-1:1);break;case"end":_[u]+=y*(n&&h?-1:1);break}return _}const c8=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:p}=yS(h,a,f),y=a,_={},S=0;for(let w=0;w<d.length;w++){const{name:T,fn:R}=d[w],{x:A,y:C,data:O,reset:I}=await R({x:g,y:p,initialPlacement:a,placement:y,strategy:o,middlewareData:_,rects:h,platform:u,elements:{reference:e,floating:t}});g=A??g,p=C??p,_={..._,[T]:{..._[T],...O}},I&&S<=50&&(S++,typeof I=="object"&&(I.placement&&(y=I.placement),I.rects&&(h=I.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:g,y:p}=yS(h,y,f)),w=-1)}return{x:g,y:p,placement:y,strategy:o,middlewareData:_}};async function _c(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=Za(t,e),S=CR(_),T=d[y?p==="floating"?"reference":"floating":p],R=hf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(T)))==null||n?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:g,strategy:f})),A=p==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),O=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},I=hf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(R.top-I.top+S.top)/O.y,bottom:(I.bottom-R.bottom+S.bottom)/O.y,left:(R.left-I.left+S.left)/O.x,right:(I.right-R.right+S.right)/O.x}}const u8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=Za(e,t)||{};if(h==null)return{};const p=CR(g),y={x:n,y:a},_=Xv(o),S=Qv(_),w=await u.getDimensions(h),T=_==="y",R=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",O=l.reference[S]+l.reference[_]-y[_]-l.floating[S],I=y[_]-l.reference[_],L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let N=L?L[C]:0;(!N||!await(u.isElement==null?void 0:u.isElement(L)))&&(N=d.floating[C]||l.floating[S]);const D=O/2-I/2,U=N/2-w[S]/2-1,Q=Fi(p[R],U),G=Fi(p[A],U),W=Q,j=N-w[S]-G,ne=N/2-w[S]/2+D,ie=Fg(W,ne,j),P=!f.arrow&&Zs(o)!=null&&ne!==ie&&l.reference[S]/2-(ne<W?Q:G)-w[S]/2<0,V=P?ne<W?ne-W:ne-j:0;return{[_]:y[_]+V,data:{[_]:ie,centerOffset:ne-ie-V,...P&&{alignmentOffset:V}},reset:P}}}),d8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...T}=Za(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const R=Qa(o),A=pa(d),C=Qa(d)===d,O=await(f.isRTL==null?void 0:f.isRTL(h.floating)),I=y||(C||!w?[ff(d)]:r8(d)),L=S!=="none";!y&&L&&I.push(...s8(d,w,S,O));const N=[d,...I],D=await _c(t,T),U=[];let Q=((a=l.flip)==null?void 0:a.overflows)||[];if(g&&U.push(D[R]),p){const ne=n8(o,u,O);U.push(D[ne[0]],D[ne[1]])}if(Q=[...Q,{placement:o,overflows:U}],!U.every(ne=>ne<=0)){var G,W;const ne=(((G=l.flip)==null?void 0:G.index)||0)+1,ie=N[ne];if(ie&&(!(p==="alignment"?A!==pa(ie):!1)||Q.every($=>pa($.placement)===A?$.overflows[0]>0:!0)))return{data:{index:ne,overflows:Q},reset:{placement:ie}};let P=(W=Q.filter(V=>V.overflows[0]<=0).sort((V,$)=>V.overflows[1]-$.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(_){case"bestFit":{var j;const V=(j=Q.filter($=>{if(L){const re=pa($.placement);return re===A||re==="y"}return!0}).map($=>[$.placement,$.overflows.filter(re=>re>0).reduce((re,ve)=>re+ve,0)]).sort(($,re)=>$[1]-re[1])[0])==null?void 0:j[0];V&&(P=V);break}case"initialPlacement":P=d;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function bS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _S(e){return XL.some(t=>e[t]>=0)}const f8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...o}=Za(e,t);switch(a){case"referenceHidden":{const l=await _c(t,{...o,elementContext:"reference"}),u=bS(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:_S(u)}}}case"escaped":{const l=await _c(t,{...o,altBoundary:!0}),u=bS(l,n.floating);return{data:{escapedOffsets:u,escaped:_S(u)}}}default:return{}}}}},MR=new Set(["left","top"]);async function h8(e,t){const{placement:n,platform:a,elements:o}=e,l=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=Qa(n),d=Zs(n),f=pa(n)==="y",h=MR.has(u)?-1:1,g=l&&f?-1:1,p=Za(t,e);let{mainAxis:y,crossAxis:_,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof S=="number"&&(_=d==="end"?S*-1:S),f?{x:_*g,y:y*h}:{x:y*h,y:_*g}}const p8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await h8(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(a=d.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},m8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:T=>{let{x:R,y:A}=T;return{x:R,y:A}}},...f}=Za(e,t),h={x:n,y:a},g=await _c(t,f),p=pa(Qa(o)),y=Zv(p);let _=h[y],S=h[p];if(l){const T=y==="y"?"top":"left",R=y==="y"?"bottom":"right",A=_+g[T],C=_-g[R];_=Fg(A,_,C)}if(u){const T=p==="y"?"top":"left",R=p==="y"?"bottom":"right",A=S+g[T],C=S-g[R];S=Fg(A,S,C)}const w=d.fn({...t,[y]:_,[p]:S});return{...w,data:{x:w.x-n,y:w.y-a,enabled:{[y]:l,[p]:u}}}}}},g8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=Za(e,t),g={x:n,y:a},p=pa(o),y=Zv(p);let _=g[y],S=g[p];const w=Za(d,t),T=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const C=y==="y"?"height":"width",O=l.reference[y]-l.floating[C]+T.mainAxis,I=l.reference[y]+l.reference[C]-T.mainAxis;_<O?_=O:_>I&&(_=I)}if(h){var R,A;const C=y==="y"?"width":"height",O=MR.has(Qa(o)),I=l.reference[p]-l.floating[C]+(O&&((R=u.offset)==null?void 0:R[p])||0)+(O?0:T.crossAxis),L=l.reference[p]+l.reference[C]+(O?0:((A=u.offset)==null?void 0:A[p])||0)-(O?T.crossAxis:0);S<I?S=I:S>L&&(S=L)}return{[y]:_,[p]:S}}}},v8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:f=()=>{},...h}=Za(e,t),g=await _c(t,h),p=Qa(o),y=Zs(o),_=pa(o)==="y",{width:S,height:w}=l.floating;let T,R;p==="top"||p==="bottom"?(T=p,R=y===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(R=p,T=y==="end"?"top":"bottom");const A=w-g.top-g.bottom,C=S-g.left-g.right,O=Fi(w-g[T],A),I=Fi(S-g[R],C),L=!t.middlewareData.shift;let N=O,D=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(N=A),L&&!y){const Q=mr(g.left,0),G=mr(g.right,0),W=mr(g.top,0),j=mr(g.bottom,0);_?D=S-2*(Q!==0||G!==0?Q+G:mr(g.left,g.right)):N=w-2*(W!==0||j!==0?W+j:mr(g.top,g.bottom))}await f({...t,availableWidth:D,availableHeight:N});const U=await u.getDimensions(d.floating);return S!==U.width||w!==U.height?{reset:{rects:!0}}:{}}}};function Pf(){return typeof window<"u"}function Qs(e){return IR(e)?(e.nodeName||"").toLowerCase():"#document"}function br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sa(e){var t;return(t=(IR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IR(e){return Pf()?e instanceof Node||e instanceof br(e).Node:!1}function Jr(e){return Pf()?e instanceof Element||e instanceof br(e).Element:!1}function ba(e){return Pf()?e instanceof HTMLElement||e instanceof br(e).HTMLElement:!1}function ES(e){return!Pf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof br(e).ShadowRoot}const y8=new Set(["inline","contents"]);function Mc(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!y8.has(o)}const b8=new Set(["table","td","th"]);function _8(e){return b8.has(Qs(e))}const E8=[":popover-open",":modal"];function kf(e){return E8.some(t=>{try{return e.matches(t)}catch{return!1}})}const S8=["transform","translate","scale","rotate","perspective"],w8=["transform","translate","scale","rotate","perspective","filter"],x8=["paint","layout","strict","content"];function Jv(e){const t=e0(),n=Jr(e)?ea(e):e;return S8.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||w8.some(a=>(n.willChange||"").includes(a))||x8.some(a=>(n.contain||"").includes(a))}function R8(e){let t=Hi(e);for(;ba(t)&&!$s(t);){if(Jv(t))return t;if(kf(t))return null;t=Hi(t)}return null}function e0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const O8=new Set(["html","body","#document"]);function $s(e){return O8.has(Qs(e))}function ea(e){return br(e).getComputedStyle(e)}function jf(e){return Jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hi(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ES(e)&&e.host||Sa(e);return ES(t)?t.host:t}function NR(e){const t=Hi(e);return $s(t)?e.ownerDocument?e.ownerDocument.body:e.body:ba(t)&&Mc(t)?t:NR(t)}function Ec(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=NR(e),l=o===((a=e.ownerDocument)==null?void 0:a.body),u=br(o);if(l){const d=$g(u);return t.concat(u,u.visualViewport||[],Mc(o)?o:[],d&&n?Ec(d):[])}return t.concat(o,Ec(o,[],n))}function $g(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DR(e){const t=ea(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=ba(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:a,d=df(n)!==l||df(a)!==u;return d&&(n=l,a=u),{width:n,height:a,$:d}}function t0(e){return Jr(e)?e:e.contextElement}function Us(e){const t=t0(e);if(!ba(t))return ga(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:l}=DR(t);let u=(l?df(n.width):n.width)/a,d=(l?df(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const T8=ga(0);function LR(e){const t=br(e);return!e0()||!t.visualViewport?T8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==br(e)?!1:t}function Mo(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=t0(e);let u=ga(1);t&&(a?Jr(a)&&(u=Us(a)):u=Us(e));const d=A8(l,n,a)?LR(l):ga(0);let f=(o.left+d.x)/u.x,h=(o.top+d.y)/u.y,g=o.width/u.x,p=o.height/u.y;if(l){const y=br(l),_=a&&Jr(a)?br(a):a;let S=y,w=$g(S);for(;w&&a&&_!==S;){const T=Us(w),R=w.getBoundingClientRect(),A=ea(w),C=R.left+(w.clientLeft+parseFloat(A.paddingLeft))*T.x,O=R.top+(w.clientTop+parseFloat(A.paddingTop))*T.y;f*=T.x,h*=T.y,g*=T.x,p*=T.y,f+=C,h+=O,S=br(w),w=$g(S)}}return hf({width:g,height:p,x:f,y:h})}function Uf(e,t){const n=jf(e).scrollLeft;return t?t.left+n:Mo(Sa(e)).left+n}function PR(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Uf(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function C8(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const l=o==="fixed",u=Sa(a),d=t?kf(t.floating):!1;if(a===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=ga(1);const g=ga(0),p=ba(a);if((p||!p&&!l)&&((Qs(a)!=="body"||Mc(u))&&(f=jf(a)),ba(a))){const _=Mo(a);h=Us(a),g.x=_.x+a.clientLeft,g.y=_.y+a.clientTop}const y=u&&!p&&!l?PR(u,f):ga(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+y.x,y:n.y*h.y-f.scrollTop*h.y+g.y+y.y}}function M8(e){return Array.from(e.getClientRects())}function I8(e){const t=Sa(e),n=jf(e),a=e.ownerDocument.body,o=mr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=mr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+Uf(e);const d=-n.scrollTop;return ea(a).direction==="rtl"&&(u+=mr(t.clientWidth,a.clientWidth)-o),{width:o,height:l,x:u,y:d}}const SS=25;function N8(e,t){const n=br(e),a=Sa(e),o=n.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,f=0;if(o){l=o.width,u=o.height;const g=e0();(!g||g&&t==="fixed")&&(d=o.offsetLeft,f=o.offsetTop)}const h=Uf(a);if(h<=0){const g=a.ownerDocument,p=g.body,y=getComputedStyle(p),_=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(a.clientWidth-p.clientWidth-_);S<=SS&&(l-=S)}else h<=SS&&(l+=h);return{width:l,height:u,x:d,y:f}}const D8=new Set(["absolute","fixed"]);function L8(e,t){const n=Mo(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,l=ba(e)?Us(e):ga(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,h=a*l.y;return{width:u,height:d,x:f,y:h}}function wS(e,t,n){let a;if(t==="viewport")a=N8(e,n);else if(t==="document")a=I8(Sa(e));else if(Jr(t))a=L8(t,n);else{const o=LR(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hf(a)}function kR(e,t){const n=Hi(e);return n===t||!Jr(n)||$s(n)?!1:ea(n).position==="fixed"||kR(n,t)}function P8(e,t){const n=t.get(e);if(n)return n;let a=Ec(e,[],!1).filter(d=>Jr(d)&&Qs(d)!=="body"),o=null;const l=ea(e).position==="fixed";let u=l?Hi(e):e;for(;Jr(u)&&!$s(u);){const d=ea(u),f=Jv(u);!f&&d.position==="fixed"&&(o=null),(l?!f&&!o:!f&&d.position==="static"&&!!o&&D8.has(o.position)||Mc(u)&&!f&&kR(e,u))?a=a.filter(g=>g!==u):o=d,u=Hi(u)}return t.set(e,a),a}function k8(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const u=[...n==="clippingAncestors"?kf(t)?[]:P8(t,this._c):[].concat(n),a],d=u[0],f=u.reduce((h,g)=>{const p=wS(t,g,o);return h.top=mr(p.top,h.top),h.right=Fi(p.right,h.right),h.bottom=Fi(p.bottom,h.bottom),h.left=mr(p.left,h.left),h},wS(t,d,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function j8(e){const{width:t,height:n}=DR(e);return{width:t,height:n}}function U8(e,t,n){const a=ba(t),o=Sa(t),l=n==="fixed",u=Mo(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=ga(0);function h(){f.x=Uf(o)}if(a||!a&&!l)if((Qs(t)!=="body"||Mc(o))&&(d=jf(t)),a){const _=Mo(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else o&&h();l&&!a&&o&&h();const g=o&&!a&&!l?PR(o,d):ga(0),p=u.left+d.scrollLeft-f.x-g.x,y=u.top+d.scrollTop-f.y-g.y;return{x:p,y,width:u.width,height:u.height}}function Hm(e){return ea(e).position==="static"}function xS(e,t){if(!ba(e)||ea(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Sa(e)===n&&(n=n.ownerDocument.body),n}function jR(e,t){const n=br(e);if(kf(e))return n;if(!ba(e)){let o=Hi(e);for(;o&&!$s(o);){if(Jr(o)&&!Hm(o))return o;o=Hi(o)}return n}let a=xS(e,t);for(;a&&_8(a)&&Hm(a);)a=xS(a,t);return a&&$s(a)&&Hm(a)&&!Jv(a)?n:a||R8(e)||n}const B8=async function(e){const t=this.getOffsetParent||jR,n=this.getDimensions,a=await n(e.floating);return{reference:U8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function z8(e){return ea(e).direction==="rtl"}const V8={convertOffsetParentRelativeRectToViewportRelativeRect:C8,getDocumentElement:Sa,getClippingRect:k8,getOffsetParent:jR,getElementRects:B8,getClientRects:M8,getDimensions:j8,getScale:Us,isElement:Jr,isRTL:z8};function UR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function F8(e,t){let n=null,a;const o=Sa(e);function l(){var d;clearTimeout(a),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:g,top:p,width:y,height:_}=h;if(d||t(),!y||!_)return;const S=pd(p),w=pd(o.clientWidth-(g+y)),T=pd(o.clientHeight-(p+_)),R=pd(g),C={rootMargin:-S+"px "+-w+"px "+-T+"px "+-R+"px",threshold:mr(0,Fi(1,f))||1};let O=!0;function I(L){const N=L[0].intersectionRatio;if(N!==f){if(!O)return u();N?u(!1,N):a=setTimeout(()=>{u(!1,1e-7)},1e3)}N===1&&!UR(h,e.getBoundingClientRect())&&u(),O=!1}try{n=new IntersectionObserver(I,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return u(!0),l}function H8(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,h=t0(e),g=o||l?[...h?Ec(h):[],...Ec(t)]:[];g.forEach(R=>{o&&R.addEventListener("scroll",n,{passive:!0}),l&&R.addEventListener("resize",n)});const p=h&&d?F8(h,n):null;let y=-1,_=null;u&&(_=new ResizeObserver(R=>{let[A]=R;A&&A.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),n()}),h&&!f&&_.observe(h),_.observe(t));let S,w=f?Mo(e):null;f&&T();function T(){const R=Mo(e);w&&!UR(w,R)&&n(),w=R,S=requestAnimationFrame(T)}return n(),()=>{var R;g.forEach(A=>{o&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(R=_)==null||R.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const $8=p8,G8=m8,q8=d8,Y8=v8,K8=f8,RS=u8,W8=g8,Z8=(e,t,n)=>{const a=new Map,o={platform:V8,...n},l={...o.platform,_c:a};return c8(e,t,{...o,platform:l})};var Q8=typeof document<"u",X8=function(){},Md=Q8?E.useLayoutEffect:X8;function pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!pf(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const l=o[a];if(!(l==="_owner"&&e.$$typeof)&&!pf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function BR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function OS(e,t){const n=BR(e);return Math.round(t*n)/n}function $m(e){const t=E.useRef(e);return Md(()=>{t.current=e}),t}function J8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[g,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=E.useState(a);pf(y,a)||_(a);const[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useCallback($=>{$!==L.current&&(L.current=$,w($))},[]),C=E.useCallback($=>{$!==N.current&&(N.current=$,R($))},[]),O=l||S,I=u||T,L=E.useRef(null),N=E.useRef(null),D=E.useRef(g),U=f!=null,Q=$m(f),G=$m(o),W=$m(h),j=E.useCallback(()=>{if(!L.current||!N.current)return;const $={placement:t,strategy:n,middleware:y};G.current&&($.platform=G.current),Z8(L.current,N.current,$).then(re=>{const ve={...re,isPositioned:W.current!==!1};ne.current&&!pf(D.current,ve)&&(D.current=ve,Tf.flushSync(()=>{p(ve)}))})},[y,t,n,G,W]);Md(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[h]);const ne=E.useRef(!1);Md(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Md(()=>{if(O&&(L.current=O),I&&(N.current=I),O&&I){if(Q.current)return Q.current(O,I,j);j()}},[O,I,j,Q,U]);const ie=E.useMemo(()=>({reference:L,floating:N,setReference:A,setFloating:C}),[A,C]),P=E.useMemo(()=>({reference:O,floating:I}),[O,I]),V=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!P.floating)return $;const re=OS(P.floating,g.x),ve=OS(P.floating,g.y);return d?{...$,transform:"translate("+re+"px, "+ve+"px)",...BR(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ve}},[n,d,P.floating,g.x,g.y]);return E.useMemo(()=>({...g,update:j,refs:ie,elements:P,floatingStyles:V}),[g,j,ie,P,V])}const eP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:o}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?RS({element:a.current,padding:o}).fn(n):{}:a?RS({element:a,padding:o}).fn(n):{}}}},tP=(e,t)=>({...$8(e),options:[e,t]}),nP=(e,t)=>({...G8(e),options:[e,t]}),rP=(e,t)=>({...W8(e),options:[e,t]}),aP=(e,t)=>({...q8(e),options:[e,t]}),iP=(e,t)=>({...Y8(e),options:[e,t]}),oP=(e,t)=>({...K8(e),options:[e,t]}),sP=(e,t)=>({...eP(e),options:[e,t]});var lP="Arrow",zR=E.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...l}=e;return b.jsx(Bt.svg,{...l,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});zR.displayName=lP;var cP=zR;function VR(e){const[t,n]=E.useState(void 0);return Qr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var n0="Popper",[FR,HR]=Lo(n0),[uP,$R]=FR(n0),GR=e=>{const{__scopePopper:t,children:n}=e,[a,o]=E.useState(null);return b.jsx(uP,{scope:t,anchor:a,onAnchorChange:o,children:n})};GR.displayName=n0;var qR="PopperAnchor",YR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,l=$R(qR,n),u=E.useRef(null),d=hn(t,u),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=a?.current||u.current,h!==f.current&&l.onAnchorChange(f.current)}),a?null:b.jsx(Bt.div,{...o,ref:d})});YR.displayName=qR;var r0="PopperContent",[dP,fP]=FR(r0),KR=E.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...w}=e,T=$R(r0,n),[R,A]=E.useState(null),C=hn(t,ye=>A(ye)),[O,I]=E.useState(null),L=VR(O),N=L?.width??0,D=L?.height??0,U=a+(l!=="center"?"-"+l:""),Q=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},G=Array.isArray(h)?h:[h],W=G.length>0,j={padding:Q,boundary:G.filter(pP),altBoundary:W},{refs:ne,floatingStyles:ie,placement:P,isPositioned:V,middlewareData:$}=J8({strategy:"fixed",placement:U,whileElementsMounted:(...ye)=>H8(...ye,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[tP({mainAxis:o+D,alignmentAxis:u}),f&&nP({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?rP():void 0,...j}),f&&aP({...j}),iP({...j,apply:({elements:ye,rects:Se,availableWidth:Pe,availableHeight:ke})=>{const{width:Ee,height:ze}=Se.reference,Pt=ye.floating.style;Pt.setProperty("--radix-popper-available-width",`${Pe}px`),Pt.setProperty("--radix-popper-available-height",`${ke}px`),Pt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Pt.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),O&&sP({element:O,padding:d}),mP({arrowWidth:N,arrowHeight:D}),y&&oP({strategy:"referenceHidden",...j})]}),[re,ve]=QR(P),k=Xr(S);Qr(()=>{V&&k?.()},[V,k]);const Z=$.arrow?.x,ee=$.arrow?.y,oe=$.arrow?.centerOffset!==0,[pe,be]=E.useState();return Qr(()=>{R&&be(window.getComputedStyle(R).zIndex)},[R]),b.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:V?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(dP,{scope:n,placedSide:re,onArrowChange:I,arrowX:Z,arrowY:ee,shouldHideArrow:oe,children:b.jsx(Bt.div,{"data-side":re,"data-align":ve,...w,ref:C,style:{...w.style,animation:V?void 0:"none"}})})})});KR.displayName=r0;var WR="PopperArrow",hP={top:"bottom",right:"left",bottom:"top",left:"right"},ZR=E.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,l=fP(WR,a),u=hP[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(cP,{...o,ref:n,style:{...o.style,display:"block"}})})});ZR.displayName=WR;function pP(e){return e!==null}var mP=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:o}=t,u=o.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,g]=QR(n),p={start:"0%",center:"50%",end:"100%"}[g],y=(o.arrow?.x??0)+d/2,_=(o.arrow?.y??0)+f/2;let S="",w="";return h==="bottom"?(S=u?p:`${y}px`,w=`${-f}px`):h==="top"?(S=u?p:`${y}px`,w=`${a.floating.height+f}px`):h==="right"?(S=`${-f}px`,w=u?p:`${_}px`):h==="left"&&(S=`${a.floating.width+f}px`,w=u?p:`${_}px`),{data:{x:S,y:w}}}});function QR(e){const[t,n="center"]=e.split("-");return[t,n]}var XR=GR,gP=YR,vP=KR,yP=ZR,Gm="rovingFocusGroup.onEntryFocus",bP={bubbles:!1,cancelable:!0},Ic="RovingFocusGroup",[Gg,JR,_P]=TR(Ic),[EP,e2]=Lo(Ic,[_P]),[SP,wP]=EP(Ic),t2=E.forwardRef((e,t)=>b.jsx(Gg.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Gg.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(xP,{...e,ref:t})})}));t2.displayName=Ic;var xP=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,y=E.useRef(null),_=hn(t,y),S=AR(l),[w,T]=Cc({prop:u,defaultProp:d??null,onChange:f,caller:Ic}),[R,A]=E.useState(!1),C=Xr(h),O=JR(n),I=E.useRef(!1),[L,N]=E.useState(0);return E.useEffect(()=>{const D=y.current;if(D)return D.addEventListener(Gm,C),()=>D.removeEventListener(Gm,C)},[C]),b.jsx(SP,{scope:n,orientation:a,dir:S,loop:o,currentTabStopId:w,onItemFocus:E.useCallback(D=>T(D),[T]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:E.useCallback(()=>N(D=>D-1),[]),children:b.jsx(Bt.div,{tabIndex:R||L===0?-1:0,"data-orientation":a,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:Ke(e.onMouseDown,()=>{I.current=!0}),onFocus:Ke(e.onFocus,D=>{const U=!I.current;if(D.target===D.currentTarget&&U&&!R){const Q=new CustomEvent(Gm,bP);if(D.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const G=O().filter(P=>P.focusable),W=G.find(P=>P.active),j=G.find(P=>P.id===w),ie=[W,j,...G].filter(Boolean).map(P=>P.ref.current);a2(ie,g)}}I.current=!1}),onBlur:Ke(e.onBlur,()=>A(!1))})})}),n2="RovingFocusGroupItem",r2=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:l,children:u,...d}=e,f=Ui(),h=l||f,g=wP(n2,n),p=g.currentTabStopId===h,y=JR(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:w}=g;return E.useEffect(()=>{if(a)return _(),()=>S()},[a,_,S]),b.jsx(Gg.ItemSlot,{scope:n,id:h,focusable:a,active:o,children:b.jsx(Bt.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:Ke(e.onMouseDown,T=>{a?g.onItemFocus(h):T.preventDefault()}),onFocus:Ke(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Ke(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const R=TP(T,g.orientation,g.dir);if(R!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=y().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")C.reverse();else if(R==="prev"||R==="next"){R==="prev"&&C.reverse();const O=C.indexOf(T.currentTarget);C=g.loop?AP(C,O+1):C.slice(O+1)}setTimeout(()=>a2(C))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:w!=null}):u})})});r2.displayName=n2;var RP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TP(e,t,n){const a=OP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return RP[a]}function a2(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function AP(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var CP=t2,MP=r2,qg=["Enter"," "],IP=["ArrowDown","PageUp","Home"],i2=["ArrowUp","PageDown","End"],NP=[...IP,...i2],DP={ltr:[...qg,"ArrowRight"],rtl:[...qg,"ArrowLeft"]},LP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Nc="Menu",[Sc,PP,kP]=TR(Nc),[Po,o2]=Lo(Nc,[kP,HR,e2]),Dc=HR(),s2=e2(),[l2,Gi]=Po(Nc),[jP,Lc]=Po(Nc),c2=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:o,onOpenChange:l,modal:u=!0}=e,d=Dc(t),[f,h]=E.useState(null),g=E.useRef(!1),p=Xr(l),y=AR(o);return E.useEffect(()=>{const _=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),b.jsx(XR,{...d,children:b.jsx(l2,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(jP,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:y,modal:u,children:a})})})};c2.displayName=Nc;var UP="MenuAnchor",a0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Dc(n);return b.jsx(gP,{...o,...a,ref:t})});a0.displayName=UP;var i0="MenuPortal",[BP,u2]=Po(i0,{forceMount:void 0}),d2=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:o}=e,l=Gi(i0,t);return b.jsx(BP,{scope:t,forceMount:n,children:b.jsx(Ja,{present:n||l.open,children:b.jsx(Gv,{asChild:!0,container:o,children:a})})})};d2.displayName=i0;var jr="MenuContent",[zP,o0]=Po(jr),f2=E.forwardRef((e,t)=>{const n=u2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=Gi(jr,e.__scopeMenu),u=Lc(jr,e.__scopeMenu);return b.jsx(Sc.Provider,{scope:e.__scopeMenu,children:b.jsx(Ja,{present:a||l.open,children:b.jsx(Sc.Slot,{scope:e.__scopeMenu,children:u.modal?b.jsx(VP,{...o,ref:t}):b.jsx(FP,{...o,ref:t})})})})}),VP=E.forwardRef((e,t)=>{const n=Gi(jr,e.__scopeMenu),a=E.useRef(null),o=hn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return uR(l)},[]),b.jsx(s0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ke(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),FP=E.forwardRef((e,t)=>{const n=Gi(jr,e.__scopeMenu);return b.jsx(s0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HP=bc("MenuContent.ScrollLock"),s0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...w}=e,T=Gi(jr,n),R=Lc(jr,n),A=Dc(n),C=s2(n),O=PP(n),[I,L]=E.useState(null),N=E.useRef(null),D=hn(t,N,T.onContentChange),U=E.useRef(0),Q=E.useRef(""),G=E.useRef(0),W=E.useRef(null),j=E.useRef("right"),ne=E.useRef(0),ie=S?qv:E.Fragment,P=S?{as:HP,allowPinchZoom:!0}:void 0,V=re=>{const ve=Q.current+re,k=O().filter(ye=>!ye.disabled),Z=document.activeElement,ee=k.find(ye=>ye.ref.current===Z)?.textValue,oe=k.map(ye=>ye.textValue),pe=t7(oe,ve,ee),be=k.find(ye=>ye.textValue===pe)?.ref.current;(function ye(Se){Q.current=Se,window.clearTimeout(U.current),Se!==""&&(U.current=window.setTimeout(()=>ye(""),1e3))})(ve),be&&setTimeout(()=>be.focus())};E.useEffect(()=>()=>window.clearTimeout(U.current),[]),tR();const $=E.useCallback(re=>j.current===W.current?.side&&r7(re,W.current?.area),[]);return b.jsx(zP,{scope:n,searchRef:Q,onItemEnter:E.useCallback(re=>{$(re)&&re.preventDefault()},[$]),onItemLeave:E.useCallback(re=>{$(re)||(N.current?.focus(),L(null))},[$]),onTriggerLeave:E.useCallback(re=>{$(re)&&re.preventDefault()},[$]),pointerGraceTimerRef:G,onPointerGraceIntentChange:E.useCallback(re=>{W.current=re},[]),children:b.jsx(ie,{...P,children:b.jsx($v,{asChild:!0,trapped:o,onMountAutoFocus:Ke(l,re=>{re.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:b.jsx(Hv,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(CP,{asChild:!0,...C,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:I,onCurrentTabStopIdChange:L,onEntryFocus:Ke(f,re=>{R.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(vP,{role:"menu","aria-orientation":"vertical","data-state":C2(T.open),"data-radix-menu-content":"",dir:R.dir,...A,...w,ref:D,style:{outline:"none",...w.style},onKeyDown:Ke(w.onKeyDown,re=>{const k=re.target.closest("[data-radix-menu-content]")===re.currentTarget,Z=re.ctrlKey||re.altKey||re.metaKey,ee=re.key.length===1;k&&(re.key==="Tab"&&re.preventDefault(),!Z&&ee&&V(re.key));const oe=N.current;if(re.target!==oe||!NP.includes(re.key))return;re.preventDefault();const be=O().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);i2.includes(re.key)&&be.reverse(),JP(be)}),onBlur:Ke(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(U.current),Q.current="")}),onPointerMove:Ke(e.onPointerMove,wc(re=>{const ve=re.target,k=ne.current!==re.clientX;if(re.currentTarget.contains(ve)&&k){const Z=re.clientX>ne.current?"right":"left";j.current=Z,ne.current=re.clientX}}))})})})})})})});f2.displayName=jr;var $P="MenuGroup",l0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{role:"group",...a,ref:t})});l0.displayName=$P;var GP="MenuLabel",h2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{...a,ref:t})});h2.displayName=GP;var mf="MenuItem",TS="menu.itemSelect",Bf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...o}=e,l=E.useRef(null),u=Lc(mf,e.__scopeMenu),d=o0(mf,e.__scopeMenu),f=hn(t,l),h=E.useRef(!1),g=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(TS,{bubbles:!0,cancelable:!0});p.addEventListener(TS,_=>a?.(_),{once:!0}),Qx(p,y),y.defaultPrevented?h.current=!1:u.onClose()}};return b.jsx(p2,{...o,ref:f,disabled:n,onClick:Ke(e.onClick,g),onPointerDown:p=>{e.onPointerDown?.(p),h.current=!0},onPointerUp:Ke(e.onPointerUp,p=>{h.current||p.currentTarget?.click()}),onKeyDown:Ke(e.onKeyDown,p=>{const y=d.searchRef.current!=="";n||y&&p.key===" "||qg.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Bf.displayName=mf;var p2=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:o,...l}=e,u=o0(mf,n),d=s2(n),f=E.useRef(null),h=hn(t,f),[g,p]=E.useState(!1),[y,_]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&_((S.textContent??"").trim())},[l.children]),b.jsx(Sc.ItemSlot,{scope:n,disabled:a,textValue:o??y,children:b.jsx(MP,{asChild:!0,...d,focusable:!a,children:b.jsx(Bt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:h,onPointerMove:Ke(e.onPointerMove,wc(S=>{a?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ke(e.onPointerLeave,wc(S=>u.onItemLeave(S))),onFocus:Ke(e.onFocus,()=>p(!0)),onBlur:Ke(e.onBlur,()=>p(!1))})})})}),qP="MenuCheckboxItem",m2=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...o}=e;return b.jsx(_2,{scope:e.__scopeMenu,checked:n,children:b.jsx(Bf,{role:"menuitemcheckbox","aria-checked":gf(n)?"mixed":n,...o,ref:t,"data-state":d0(n),onSelect:Ke(o.onSelect,()=>a?.(gf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});m2.displayName=qP;var g2="MenuRadioGroup",[YP,KP]=Po(g2,{value:void 0,onValueChange:()=>{}}),v2=E.forwardRef((e,t)=>{const{value:n,onValueChange:a,...o}=e,l=Xr(a);return b.jsx(YP,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(l0,{...o,ref:t})})});v2.displayName=g2;var y2="MenuRadioItem",b2=E.forwardRef((e,t)=>{const{value:n,...a}=e,o=KP(y2,e.__scopeMenu),l=n===o.value;return b.jsx(_2,{scope:e.__scopeMenu,checked:l,children:b.jsx(Bf,{role:"menuitemradio","aria-checked":l,...a,ref:t,"data-state":d0(l),onSelect:Ke(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});b2.displayName=y2;var c0="MenuItemIndicator",[_2,WP]=Po(c0,{checked:!1}),E2=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...o}=e,l=WP(c0,n);return b.jsx(Ja,{present:a||gf(l.checked)||l.checked===!0,children:b.jsx(Bt.span,{...o,ref:t,"data-state":d0(l.checked)})})});E2.displayName=c0;var ZP="MenuSeparator",S2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});S2.displayName=ZP;var QP="MenuArrow",w2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Dc(n);return b.jsx(yP,{...o,...a,ref:t})});w2.displayName=QP;var u0="MenuSub",[XP,x2]=Po(u0),R2=e=>{const{__scopeMenu:t,children:n,open:a=!1,onOpenChange:o}=e,l=Gi(u0,t),u=Dc(t),[d,f]=E.useState(null),[h,g]=E.useState(null),p=Xr(o);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(XR,{...u,children:b.jsx(l2,{scope:t,open:a,onOpenChange:p,content:h,onContentChange:g,children:b.jsx(XP,{scope:t,contentId:Ui(),triggerId:Ui(),trigger:d,onTriggerChange:f,children:n})})})};R2.displayName=u0;var ac="MenuSubTrigger",O2=E.forwardRef((e,t)=>{const n=Gi(ac,e.__scopeMenu),a=Lc(ac,e.__scopeMenu),o=x2(ac,e.__scopeMenu),l=o0(ac,e.__scopeMenu),u=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},g=E.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return E.useEffect(()=>g,[g]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(a0,{asChild:!0,...h,children:b.jsx(p2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":C2(n.open),...e,ref:Ac(t,o.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ke(e.onPointerMove,wc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ke(e.onPointerLeave,wc(p=>{g();const y=n.content?.getBoundingClientRect();if(y){const _=n.content?.dataset.side,S=_==="right",w=S?-5:5,T=y[S?"left":"right"],R=y[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:T,y:y.top},{x:R,y:y.top},{x:R,y:y.bottom},{x:T,y:y.bottom}],side:_}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(p),p.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Ke(e.onKeyDown,p=>{const y=l.searchRef.current!=="";e.disabled||y&&p.key===" "||DP[a.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});O2.displayName=ac;var T2="MenuSubContent",A2=E.forwardRef((e,t)=>{const n=u2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=Gi(jr,e.__scopeMenu),u=Lc(jr,e.__scopeMenu),d=x2(T2,e.__scopeMenu),f=E.useRef(null),h=hn(t,f);return b.jsx(Sc.Provider,{scope:e.__scopeMenu,children:b.jsx(Ja,{present:a||l.open,children:b.jsx(Sc.Slot,{scope:e.__scopeMenu,children:b.jsx(s0,{id:d.contentId,"aria-labelledby":d.triggerId,...o,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{u.isUsingKeyboardRef.current&&f.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ke(e.onFocusOutside,g=>{g.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Ke(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:Ke(e.onKeyDown,g=>{const p=g.currentTarget.contains(g.target),y=LP[u.dir].includes(g.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),g.preventDefault())})})})})})});A2.displayName=T2;function C2(e){return e?"open":"closed"}function gf(e){return e==="indeterminate"}function d0(e){return gf(e)?"indeterminate":e?"checked":"unchecked"}function JP(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e7(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function t7(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=e7(e,Math.max(l,0));o.length===1&&(u=u.filter(h=>h!==n));const f=u.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function n7(e,t){const{x:n,y:a}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l],f=t[u],h=d.x,g=d.y,p=f.x,y=f.y;g>a!=y>a&&n<(p-h)*(a-g)/(y-g)+h&&(o=!o)}return o}function r7(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return n7(n,t)}function wc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var a7=c2,i7=a0,o7=d2,s7=f2,l7=l0,c7=h2,u7=Bf,d7=m2,f7=v2,h7=b2,p7=E2,m7=S2,g7=w2,v7=R2,y7=O2,b7=A2,zf="DropdownMenu",[_7]=Lo(zf,[o2]),kn=o2(),[E7,M2]=_7(zf),I2=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:o,defaultOpen:l,onOpenChange:u,modal:d=!0}=e,f=kn(t),h=E.useRef(null),[g,p]=Cc({prop:o,defaultProp:l??!1,onChange:u,caller:zf});return b.jsx(E7,{scope:t,triggerId:Ui(),triggerRef:h,contentId:Ui(),open:g,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(a7,{...f,open:g,onOpenChange:p,dir:a,modal:d,children:n})})};I2.displayName=zf;var N2="DropdownMenuTrigger",D2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,l=M2(N2,n),u=kn(n);return b.jsx(i7,{asChild:!0,...u,children:b.jsx(Bt.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:Ac(t,l.triggerRef),onPointerDown:Ke(e.onPointerDown,d=>{!a&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:Ke(e.onKeyDown,d=>{a||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});D2.displayName=N2;var S7="DropdownMenuPortal",L2=e=>{const{__scopeDropdownMenu:t,...n}=e,a=kn(t);return b.jsx(o7,{...a,...n})};L2.displayName=S7;var P2="DropdownMenuContent",k2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=M2(P2,n),l=kn(n),u=E.useRef(!1);return b.jsx(s7,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...a,ref:t,onCloseAutoFocus:Ke(e.onCloseAutoFocus,d=>{u.current||o.triggerRef.current?.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:Ke(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,g=f.button===2||h;(!o.modal||g)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});k2.displayName=P2;var w7="DropdownMenuGroup",x7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(l7,{...o,...a,ref:t})});x7.displayName=w7;var R7="DropdownMenuLabel",O7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(c7,{...o,...a,ref:t})});O7.displayName=R7;var T7="DropdownMenuItem",j2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(u7,{...o,...a,ref:t})});j2.displayName=T7;var A7="DropdownMenuCheckboxItem",C7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(d7,{...o,...a,ref:t})});C7.displayName=A7;var M7="DropdownMenuRadioGroup",I7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(f7,{...o,...a,ref:t})});I7.displayName=M7;var N7="DropdownMenuRadioItem",D7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(h7,{...o,...a,ref:t})});D7.displayName=N7;var L7="DropdownMenuItemIndicator",P7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(p7,{...o,...a,ref:t})});P7.displayName=L7;var k7="DropdownMenuSeparator",U2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(m7,{...o,...a,ref:t})});U2.displayName=k7;var j7="DropdownMenuArrow",U7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(g7,{...o,...a,ref:t})});U7.displayName=j7;var B7=e=>{const{__scopeDropdownMenu:t,children:n,open:a,onOpenChange:o,defaultOpen:l}=e,u=kn(t),[d,f]=Cc({prop:a,defaultProp:l??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(v7,{...u,open:d,onOpenChange:f,children:n})},z7="DropdownMenuSubTrigger",B2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(y7,{...o,...a,ref:t})});B2.displayName=z7;var V7="DropdownMenuSubContent",z2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(b7,{...o,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});z2.displayName=V7;var F7=I2,H7=D2,$7=L2,G7=k2,q7=j2,Az=U2,Cz=B7,Mz=B2,Iz=z2,Y7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pc=Y7.reduce((e,t)=>{const n=Fx(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),K7="Label",V2=E.forwardRef((e,t)=>b.jsx(Pc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));V2.displayName=K7;var W7=V2;function Z7(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u);d.displayName=l+"Context";const f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function g(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,Q7(o,...t)]}function Q7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var X7=Uw();function J7(){return X7.useSyncExternalStore(ek,()=>!0,()=>!1)}function ek(){return()=>{}}var f0="Avatar",[tk]=Z7(f0),[nk,F2]=tk(f0),H2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...a}=e,[o,l]=E.useState("idle");return b.jsx(nk,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:l,children:b.jsx(Pc.span,{...a,ref:t})})});H2.displayName=f0;var $2="AvatarImage",G2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...l}=e,u=F2($2,n),d=rk(a,l),f=Xr(h=>{o(h),u.onImageLoadingStatusChange(h)});return Qr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Pc.img,{...l,ref:t,src:a}):null});G2.displayName=$2;var q2="AvatarFallback",Y2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:a,...o}=e,l=F2(q2,n),[u,d]=E.useState(a===void 0);return E.useEffect(()=>{if(a!==void 0){const f=window.setTimeout(()=>d(!0),a);return()=>window.clearTimeout(f)}},[a]),u&&l.imageLoadingStatus!=="loaded"?b.jsx(Pc.span,{...o,ref:t}):null});Y2.displayName=q2;function AS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function rk(e,{referrerPolicy:t,crossOrigin:n}){const a=J7(),o=E.useRef(null),l=a?(o.current||(o.current=new window.Image),o.current):null,[u,d]=E.useState(()=>AS(l,e));return Qr(()=>{d(AS(l,e))},[l,e]),Qr(()=>{const f=p=>()=>{d(p)};if(!l)return;const h=f("loaded"),g=f("error");return l.addEventListener("load",h),l.addEventListener("error",g),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",g)}},[l,n,t]),u}var ak=H2,ik=G2,ok=Y2;function sk(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function h0(e,t,n=""){const a=sk(e),o=e?.length;if(!a||t!==void 0){const u=n&&`"${n}" `,d="",f=a?`length=${o}`:`type=${typeof e}`;throw new Error(u+"expected Uint8Array"+d+", got "+f)}return e}function CS(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function lk(e,t){h0(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Yg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function qm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function sa(e,t){return e<<32-t|e>>>t}const ck=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dk(e){if(h0(e),ck)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=uk[e[n]];return t}function fk(e,t={}){const n=(o,l)=>e(l).update(o).digest(),a=e(void 0);return n.outputLen=a.outputLen,n.blockLen=a.blockLen,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}const hk=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function pk(e,t,n){return e&t^~e&n}function mk(e,t,n){return e&t^e&n^t&n}class gk{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,a,o){this.blockLen=t,this.outputLen=n,this.padOffset=a,this.isLE=o,this.buffer=new Uint8Array(t),this.view=qm(this.buffer)}update(t){CS(this),h0(t);const{view:n,buffer:a,blockLen:o}=this,l=t.length;for(let u=0;u<l;){const d=Math.min(o-this.pos,l-u);if(d===o){const f=qm(t);for(;o<=l-u;u+=o)this.process(f,u);continue}a.set(t.subarray(u,u+d),this.pos),this.pos+=d,u+=d,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){CS(this),lk(t,this),this.finished=!0;const{buffer:n,view:a,blockLen:o,isLE:l}=this;let{pos:u}=this;n[u++]=128,Yg(this.buffer.subarray(u)),this.padOffset>o-u&&(this.process(a,0),u=0);for(let p=u;p<o;p++)n[p]=0;a.setBigUint64(o-8,BigInt(this.length*8),l),this.process(a,0);const d=qm(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const h=f/4,g=this.get();if(h>g.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)d.setUint32(4*p,g[p],l)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const a=t.slice(0,n);return this.destroy(),a}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:a,length:o,finished:l,destroyed:u,pos:d}=this;return t.destroyed=u,t.finished=l,t.length=o,t.pos=d,o%n&&t.buffer.set(a),t}clone(){return this._cloneInto()}}const Ti=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vk=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ai=new Uint32Array(64);class yk extends gk{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:a,D:o,E:l,F:u,G:d,H:f}=this;return[t,n,a,o,l,u,d,f]}set(t,n,a,o,l,u,d,f){this.A=t|0,this.B=n|0,this.C=a|0,this.D=o|0,this.E=l|0,this.F=u|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)Ai[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=Ai[p-15],_=Ai[p-2],S=sa(y,7)^sa(y,18)^y>>>3,w=sa(_,17)^sa(_,19)^_>>>10;Ai[p]=w+Ai[p-7]+S+Ai[p-16]|0}let{A:a,B:o,C:l,D:u,E:d,F:f,G:h,H:g}=this;for(let p=0;p<64;p++){const y=sa(d,6)^sa(d,11)^sa(d,25),_=g+y+pk(d,f,h)+vk[p]+Ai[p]|0,w=(sa(a,2)^sa(a,13)^sa(a,22))+mk(a,o,l)|0;g=h,h=f,f=d,d=u+_|0,u=l,l=o,o=a,a=_+w|0}a=a+this.A|0,o=o+this.B|0,l=l+this.C|0,u=u+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,g=g+this.H|0,this.set(a,o,l,u,d,f,h,g)}roundClean(){Yg(Ai)}destroy(){this.set(0,0,0,0,0,0,0,0),Yg(this.buffer)}}class bk extends yk{A=Ti[0]|0;B=Ti[1]|0;C=Ti[2]|0;D=Ti[3]|0;E=Ti[4]|0;F=Ti[5]|0;G=Ti[6]|0;H=Ti[7]|0;constructor(){super(32)}}const _k=fk(()=>new bk,hk(1));function Ek(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Vf="Checkbox",[Sk]=Lo(Vf),[wk,p0]=Sk(Vf);function xk(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:o,disabled:l,form:u,name:d,onCheckedChange:f,required:h,value:g="on",internal_do_not_use_render:p}=e,[y,_]=Cc({prop:n,defaultProp:o??!1,onChange:f,caller:Vf}),[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useRef(!1),C=S?!!u||!!S.closest("form"):!0,O={checked:y,disabled:l,setChecked:_,control:S,setControl:w,name:d,form:u,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Bi(o)?!1:o,isFormControl:C,bubbleInput:T,setBubbleInput:R};return b.jsx(wk,{scope:t,...O,children:Rk(p)?p(O):a})}var K2="CheckboxTrigger",W2=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},o)=>{const{control:l,value:u,disabled:d,checked:f,required:h,setControl:g,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=p0(K2,e),w=hn(o,g),T=E.useRef(f);return E.useEffect(()=>{const R=l?.form;if(R){const A=()=>p(T.current);return R.addEventListener("reset",A),()=>R.removeEventListener("reset",A)}},[l,p]),b.jsx(Bt.button,{type:"button",role:"checkbox","aria-checked":Bi(f)?"mixed":f,"aria-required":h,"data-state":tO(f),"data-disabled":d?"":void 0,disabled:d,value:u,...a,ref:w,onKeyDown:Ke(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Ke(n,R=>{p(A=>Bi(A)?!0:!A),S&&_&&(y.current=R.isPropagationStopped(),y.current||R.stopPropagation())})})});W2.displayName=K2;var Z2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:l,required:u,disabled:d,value:f,onCheckedChange:h,form:g,...p}=e;return b.jsx(xk,{__scopeCheckbox:n,checked:o,defaultChecked:l,disabled:d,required:u,onCheckedChange:h,name:a,form:g,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(W2,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(eO,{__scopeCheckbox:n})]})})});Z2.displayName=Vf;var Q2="CheckboxIndicator",X2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,l=p0(Q2,n);return b.jsx(Ja,{present:a||Bi(l.checked)||l.checked===!0,children:b.jsx(Bt.span,{"data-state":tO(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});X2.displayName=Q2;var J2="CheckboxBubbleInput",eO=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:o,checked:l,defaultChecked:u,required:d,disabled:f,name:h,value:g,form:p,bubbleInput:y,setBubbleInput:_}=p0(J2,e),S=hn(n,_),w=Ek(l),T=VR(a);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(C,"checked").set,L=!o.current;if(w!==l&&I){const N=new Event("click",{bubbles:L});A.indeterminate=Bi(l),I.call(A,Bi(l)?!1:l),A.dispatchEvent(N)}},[y,w,l,o]);const R=E.useRef(Bi(l)?!1:l);return b.jsx(Bt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??R.current,required:d,disabled:f,name:h,value:g,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});eO.displayName=J2;function Rk(e){return typeof e=="function"}function Bi(e){return e==="indeterminate"}function tO(e){return Bi(e)?"indeterminate":e?"checked":"unchecked"}var nO={OBJECT:"object",UNDEFINED:"undefined"},md="browser",MS="cpu",IS="device",Ym="engine",gd="os",Ii="name",vf="type",Kg="vendor",qr="version",Wg="architecture",Zg="major",Qg="model",Ok="console",Tk="mobile",Ak="tablet",Ck="smarttv",Mk="wearable",Ik="embedded",Nk=typeof window!==nO.UNDEFINED,Km=Nk&&window.navigator?window.navigator:void 0;Km&&Km.userAgentData&&Km.userAgentData;var Ff=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},vd=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==nO.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return vd.call(e.init,[[md,[Ii,qr,Zg,vf]],[MS,[Wg]],[IS,[vf,Qg,Kg]],[Ym,[Ii,qr]],[gd,[Ii,qr]]]),vd.call(e.isIgnore,[[md,[qr,Zg]],[Ym,[qr]],[gd,[qr]]]),vd.call(e.isIgnoreRgx,[[md,/ ?browser$/i],[gd,/ ?os$/i]]),vd.call(e.toString,[[md,[Ii,qr]],[MS,[Wg]],[IS,[Kg,Qg]],[Ym,[Ii,qr]],[gd,[Ii,qr]]]),e})();Ff([Ii,qr,Zg,vf]);Ff([Wg]);Ff([Qg,Kg,vf,Ok,Tk,Ck,Ak,Mk,Ik]);Ff([Ii,qr]);function fa(e){const t=new Uint8Array(e);let n="";for(const o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function yf(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,a=t.padEnd(t.length+n,"="),o=atob(a),l=new ArrayBuffer(o.length),u=new Uint8Array(l);for(let d=0;d<o.length;d++)u[d]=o.charCodeAt(d);return l}function m0(){return Dk.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const Dk={stubThis:e=>e};function rO(e){const{id:t}=e;return{...e,id:yf(t),transports:e.transports}}function aO(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class yn extends Error{constructor({message:t,code:n,cause:a,name:o}){super(t,{cause:a}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o??a.name,this.code=n}}function Lk({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yn({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new yn({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&n.authenticatorSelection?.userVerification==="required")return new yn({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new yn({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new yn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new yn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new yn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new yn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(aO(a)){if(n.rp.id!==a)return new yn({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new yn({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new yn({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class Pk{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const iO=new Pk,kk=["cross-platform","platform"];function oO(e){if(e&&!(kk.indexOf(e)<0))return e}async function jk(e){!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!m0())throw new Error("WebAuthn is not supported in this browser");const a={...t,challenge:yf(t.challenge),user:{...t.user,id:yf(t.user.id)},excludeCredentials:t.excludeCredentials?.map(rO)},o={};n&&(o.mediation="conditional"),o.publicKey=a,o.signal=iO.createNewAbortSignal();let l;try{l=await navigator.credentials.create(o)}catch(S){throw Lk({error:S,options:o})}if(!l)throw new Error("Registration was not completed");const{id:u,rawId:d,response:f,type:h}=l;let g;typeof f.getTransports=="function"&&(g=f.getTransports());let p;if(typeof f.getPublicKeyAlgorithm=="function")try{p=f.getPublicKeyAlgorithm()}catch(S){Wm("getPublicKeyAlgorithm()",S)}let y;if(typeof f.getPublicKey=="function")try{const S=f.getPublicKey();S!==null&&(y=fa(S))}catch(S){Wm("getPublicKey()",S)}let _;if(typeof f.getAuthenticatorData=="function")try{_=fa(f.getAuthenticatorData())}catch(S){Wm("getAuthenticatorData()",S)}return{id:u,rawId:fa(d),response:{attestationObject:fa(f.attestationObject),clientDataJSON:fa(f.clientDataJSON),transports:g,publicKeyAlgorithm:p,publicKey:y,authenticatorData:_},type:h,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:oO(l.authenticatorAttachment)}}function Wm(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
68
|
+
`,t)}function Uk(){if(!m0())return Zm.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Zm.stubThis(new Promise(t=>t(!1))):Zm.stubThis(e.isConditionalMediationAvailable())}const Zm={stubThis:e=>e};function Bk({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new yn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(aO(a)){if(n.rpId!==a)return new yn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new yn({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function zk(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:a=!0}=e;if(!m0())throw new Error("WebAuthn is not supported in this browser");let o;t.allowCredentials?.length!==0&&(o=t.allowCredentials?.map(rO));const l={...t,challenge:yf(t.challenge),allowCredentials:o},u={};if(n){if(!await Uk())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&a)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');u.mediation="conditional",l.allowCredentials=[]}u.publicKey=l,u.signal=iO.createNewAbortSignal();let d;try{d=await navigator.credentials.get(u)}catch(_){throw Bk({error:_,options:u})}if(!d)throw new Error("Authentication was not completed");const{id:f,rawId:h,response:g,type:p}=d;let y;return g.userHandle&&(y=fa(g.userHandle)),{id:f,rawId:fa(h),response:{authenticatorData:fa(g.authenticatorData),clientDataJSON:fa(g.clientDataJSON),signature:fa(g.signature),userHandle:y},type:p,clientExtensionResults:d.getClientExtensionResults(),authenticatorAttachment:oO(d.authenticatorAttachment)}}const Vk=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(l,u)=>{const d=await e("/passkey/generate-authenticate-options",{method:"GET",throw:!1});if(!d.data)return d;try{const f=await e("/passkey/verify-authentication",{body:{response:await zk({optionsJSON:d.data,useBrowserAutofill:l?.autoFill})},...l?.fetchOptions,...u,method:"POST",throw:!1});return t.set(Math.random()),n.notify("$sessionSignal"),f}catch{return{data:null,error:{code:"AUTH_CANCELLED",message:"auth cancelled",status:400,statusText:"BAD_REQUEST"}}}}},passkey:{addPasskey:async(l,u)=>{const d=await e("/passkey/generate-register-options",{method:"GET",query:{...l?.authenticatorAttachment&&{authenticatorAttachment:l.authenticatorAttachment},...l?.name&&{name:l.name}},throw:!1});if(!d.data)return d;try{const f=await jk({optionsJSON:d.data,useAutoRegister:l?.useAutoRegister}),h=await e("/passkey/verify-registration",{...l?.fetchOptions,...u,body:{response:f,name:l?.name},method:"POST",throw:!1});return h.data&&t.set(Math.random()),h}catch(f){return f instanceof yn?f.code==="ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED"?{data:null,error:{code:f.code,message:"previously registered",status:400,statusText:"BAD_REQUEST"}}:f.code==="ERROR_CEREMONY_ABORTED"?{data:null,error:{code:f.code,message:"registration cancelled",status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:f.code,message:f.message,status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:"UNKNOWN_ERROR",message:f instanceof Error?f.message:"unknown error",status:500,statusText:"INTERNAL_SERVER_ERROR"}}}}},$Infer:{}}),Fk=()=>{const e=go();return{id:"passkey",$InferServerPlugin:{},getActions:(t,n)=>Vk(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Ls(e,"/passkey/list-user-passkeys",t,{method:"GET"}),$listPasskeys:e}},pathMethods:{"/passkey/register":"POST","/passkey/authenticate":"POST"},atomListeners:[{matcher(t){return t==="/passkey/verify-registration"||t==="/passkey/delete-passkey"||t==="/passkey/update-passkey"||t==="/sign-out"},signal:"$listPasskeys"},{matcher:t=>t==="/passkey/verify-authentication",signal:"$sessionSignal"}]}};function Hk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sO=F.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),kc=()=>{const e=F.useContext(sO);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Hk(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
69
|
+
[data-state=closed]
|
|
70
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function $k(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Gk(){return g0(/^Mac/)}function qk(){return g0(/^iPhone/)}function NS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Yk(){return g0(/^iPad/)||Gk()&&navigator.maxTouchPoints>1}function lO(){return qk()||Yk()}function g0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Kk=24,Wk=typeof window<"u"?E.useLayoutEffect:E.useEffect;function DS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Qm=typeof document<"u"&&window.visualViewport;function LS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function cO(e){for(LS(e)&&(e=e.parentElement);e&&!LS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Zk=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let yd=0,Xm;function Qk(e={}){let{isDisabled:t}=e;Wk(()=>{if(!t)return yd++,yd===1&&lO()&&(Xm=Xk()),()=>{yd--,yd===0&&Xm?.()}},[t])}function Xk(){let e,t=0,n=p=>{e=cO(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},a=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let y=p.changedTouches[0].pageY,_=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((_<=0&&y>t||_>=S&&y<t)&&p.preventDefault(),t=y)},o=p=>{let y=p.target;Xg(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Xg(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Qm&&(Qm.height<window.innerHeight?requestAnimationFrame(()=>{PS(y)}):Qm.addEventListener("resize",()=>PS(y),{once:!0}))}))},u=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=DS(Jk(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=DS(Ql(document,"touchstart",n,{passive:!1,capture:!0}),Ql(document,"touchmove",a,{passive:!1,capture:!0}),Ql(document,"touchend",o,{passive:!1,capture:!0}),Ql(document,"focus",l,!0),Ql(window,"scroll",u));return()=>{h(),g(),window.scrollTo(d,f)}}function Jk(e,t,n){let a=e.style[t];return e.style[t]=n,()=>{e.style[t]=a}}function Ql(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}function PS(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=cO(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let a=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const u=n.getBoundingClientRect().bottom+Kk;l>u&&(n.scrollTop+=o-a)}e=n.parentElement}}function Xg(e){return e instanceof HTMLInputElement&&!Zk.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function ej(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function tj(...e){return t=>e.forEach(n=>ej(n,t))}function uO(...e){return E.useCallback(tj(...e),e)}const dO=new WeakMap;function dn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let a={};Object.entries(t).forEach(([o,l])=>{if(o.startsWith("--")){e.style.setProperty(o,l);return}a[o]=e.style[o],e.style[o]=l}),!n&&dO.set(e,a)}function nj(e,t){if(!e||!(e instanceof HTMLElement))return;let n=dO.get(e);n&&(e.style[t]=n[t])}const nn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function bd(e,t){if(!e)return null;const n=window.getComputedStyle(e),a=n.transform||n.webkitTransform||n.mozTransform;let o=a.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[nn(t)?13:12]):(o=a.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[nn(t)?5:4]):null)}function rj(e){return 8*(Math.log(e+1)-2)}function Jm(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function aj(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const jt={DURATION:.5,EASE:[.32,.72,0,1]},fO=.4,ij=.25,oj=100,hO=8,fo=16,Jg=26,eg="vaul-dragging";function pO(e){const t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function sj({defaultProp:e,onChange:t}){const n=F.useState(e),[a]=n,o=F.useRef(a),l=pO(t);return F.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),n}function mO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,o]=sj({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:a,d=pO(n),f=F.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else o(h)},[l,e,o,d]);return[u,f]}function lj({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:a,overlayRef:o,fadeFromIndex:l,onSnapPointChange:u,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[g,p]=mO({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=F.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);F.useEffect(()=>{function N(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const S=F.useMemo(()=>g===n?.[n.length-1]||null,[n,g]),w=F.useMemo(()=>{var N;return(N=n?.findIndex(D=>D===g))!=null?N:null},[n,g]),T=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===g||!n,R=F.useMemo(()=>{const N=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n?.map(U=>{const Q=typeof U=="string";let G=0;if(Q&&(G=parseInt(U,10)),nn(d)){const j=Q?G:y?U*N.height:0;return y?d==="bottom"?N.height-j:-N.height+j:j}const W=Q?G:y?U*N.width:0;return y?d==="right"?N.width-W:-N.width+W:W}))!=null?D:[]},[n,y,f]),A=F.useMemo(()=>w!==null?R?.[w]:null,[R,w]),C=F.useCallback(N=>{var D;const U=(D=R?.findIndex(Q=>Q===N))!=null?D:null;u(U),dn(a.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(d)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`}),R&&U!==R.length-1&&l!==void 0&&U!==l&&U<l?dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"0"}):dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(U,0)])},[a.current,n,R,l,o,p]);F.useEffect(()=>{if(g||e){var N;const D=(N=n?.findIndex(U=>U===e||U===g))!=null?N:-1;R&&D!==-1&&typeof R[D]=="number"&&C(R[D])}},[g,e,n,R,C]);function O({draggedDistance:N,closeDrawer:D,velocity:U,dismissible:Q}){if(l===void 0)return;const G=d==="bottom"||d==="right"?(A??0)-N:(A??0)+N,W=w===l-1,j=w===0,ne=N>0;if(W&&dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`}),!h&&U>2&&!ne){Q?D():C(R[0]);return}if(!h&&U>2&&ne&&R&&n){C(R[n.length-1]);return}const ie=R?.reduce((V,$)=>typeof V!="number"||typeof $!="number"?V:Math.abs($-G)<Math.abs(V-G)?$:V),P=nn(d)?window.innerHeight:window.innerWidth;if(U>fO&&Math.abs(N)<P*.4){const V=ne?1:-1;if(V>0&&S&&n){C(R[n.length-1]);return}if(j&&V<0&&Q&&D(),w===null)return;C(R[w+V]);return}C(ie)}function I({draggedDistance:N}){if(A===null)return;const D=d==="bottom"||d==="right"?A-N:A+N;(d==="bottom"||d==="right")&&D<R[R.length-1]||(d==="top"||d==="left")&&D>R[R.length-1]||dn(a.current,{transform:nn(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function L(N,D){if(!n||typeof w!="number"||!R||l===void 0)return null;const U=w===l-1;if(w>=l&&D)return 0;if(U&&!D)return 1;if(!T&&!U)return null;const G=U?w+1:w-1,W=U?R[G]-R[G-1]:R[G+1]-R[G],j=N/Math.abs(W);return U?1-j:j}return{isLastSnapPoint:S,activeSnapPoint:g,shouldFade:T,getPercentageDragged:L,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:O,onDrag:I,snapPointsOffset:R}}const cj=()=>()=>{};function uj(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:a,noBodyStyles:o}=kc(),l=F.useRef(null),u=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Jg)/window.innerWidth}F.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;aj(a&&!o?Jm(document.body,{background:"black"}):cj,Jm(f,{transformOrigin:nn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${jt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${jt.EASE.join(",")})`}));const h=Jm(f,{borderRadius:`${hO}px`,overflow:"hidden",...nn(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},jt.DURATION*1e3)}}},[t,n,u])}let Xl=null;function dj({isOpen:e,modal:t,nested:n,hasBeenOpened:a,preventScrollRestoration:o,noBodyStyles:l}){const[u,d]=F.useState(()=>typeof window<"u"?window.location.href:""),f=F.useRef(0),h=F.useCallback(()=>{if(NS()&&Xl===null&&e&&!l){Xl={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:y}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const _=y-window.innerHeight;_&&f.current>=y&&(document.body.style.top=`${-(f.current+_)}px`)}),300)}},[e]),g=F.useCallback(()=>{if(NS()&&Xl!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Xl),window.requestAnimationFrame(()=>{if(o&&u!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Xl=null}},[u]);return F.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),F.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),F.useEffect(()=>{n||!a||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{g()},500)):g())},[e,a,u,t,n,h,g]),{restorePositionSetting:g}}function fj({open:e,onOpenChange:t,children:n,onDrag:a,onRelease:o,snapPoints:l,shouldScaleBackground:u=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=ij,scrollLockTimeout:h=oj,dismissible:g=!0,handleOnly:p=!1,fadeFromIndex:y=l&&l.length-1,activeSnapPoint:_,setActiveSnapPoint:S,fixed:w,modal:T=!0,onClose:R,nested:A,noBodyStyles:C=!1,direction:O="bottom",defaultOpen:I=!1,disablePreventScroll:L=!0,snapToSequentialPoint:N=!1,preventScrollRestoration:D=!1,repositionInputs:U=!0,onAnimationEnd:Q,container:G,autoFocus:W=!1}){var j,ne;const[ie=!1,P]=mO({defaultProp:I,prop:e,onChange:Ie=>{t?.(Ie),!Ie&&!A&&xe(),setTimeout(()=>{Q?.(Ie)},jt.DURATION*1e3),Ie&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ie||(document.body.style.pointerEvents="auto")}}),[V,$]=F.useState(!1),[re,ve]=F.useState(!1),[k,Z]=F.useState(!1),ee=F.useRef(null),oe=F.useRef(null),pe=F.useRef(null),be=F.useRef(null),ye=F.useRef(null),Se=F.useRef(!1),Pe=F.useRef(null),ke=F.useRef(0),Ee=F.useRef(!1),ze=F.useRef(!I),Pt=F.useRef(0),ge=F.useRef(null),me=F.useRef(((j=ge.current)==null?void 0:j.getBoundingClientRect().height)||0),Re=F.useRef(((ne=ge.current)==null?void 0:ne.getBoundingClientRect().width)||0),Ue=F.useRef(0),it=F.useCallback(Ie=>{l&&Ie===Y.length-1&&(oe.current=new Date)},[]),{activeSnapPoint:He,activeSnapPointIndex:tt,setActiveSnapPoint:B,onRelease:q,snapPointsOffset:Y,onDrag:ce,shouldFade:he,getPercentageDragged:fe}=lj({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:ge,fadeFromIndex:y,overlayRef:ee,onSnapPointChange:it,direction:O,container:G,snapToSequentialPoint:N});Qk({isDisabled:!ie||re||!T||k||!V||!U||!L});const{restorePositionSetting:xe}=dj({isOpen:ie,modal:T,nested:A??!1,hasBeenOpened:V,preventScrollRestoration:D,noBodyStyles:C});function $e(){return(window.innerWidth-Jg)/window.innerWidth}function nt(Ie){var ot,dt;!g&&!l||ge.current&&!ge.current.contains(Ie.target)||(me.current=((ot=ge.current)==null?void 0:ot.getBoundingClientRect().height)||0,Re.current=((dt=ge.current)==null?void 0:dt.getBoundingClientRect().width)||0,ve(!0),pe.current=new Date,lO()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Ie.target.setPointerCapture(Ie.pointerId),ke.current=nn(O)?Ie.pageY:Ie.pageX)}function Tt(Ie,ot){var dt;let Qe=Ie;const ht=(dt=window.getSelection())==null?void 0:dt.toString(),Ne=ge.current?bd(ge.current,O):null,Xe=new Date;if(Qe.tagName==="SELECT"||Qe.hasAttribute("data-vaul-no-drag")||Qe.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(oe.current&&Xe.getTime()-oe.current.getTime()<500)return!1;if(Ne!==null&&(O==="bottom"?Ne>0:Ne<0))return!0;if(ht&&ht.length>0)return!1;if(ye.current&&Xe.getTime()-ye.current.getTime()<h&&Ne===0||ot)return ye.current=Xe,!1;for(;Qe;){if(Qe.scrollHeight>Qe.clientHeight){if(Qe.scrollTop!==0)return ye.current=new Date,!1;if(Qe.getAttribute("role")==="dialog")return!0}Qe=Qe.parentNode}return!0}function nr(Ie){if(ge.current&&re){const ot=O==="bottom"||O==="right"?1:-1,dt=(ke.current-(nn(O)?Ie.pageY:Ie.pageX))*ot,Qe=dt>0,ht=l&&!g&&!Qe;if(ht&&tt===0)return;const Ne=Math.abs(dt),Xe=document.querySelector("[data-vaul-drawer-wrapper]"),At=O==="bottom"||O==="top"?me.current:Re.current;let St=Ne/At;const Mn=fe(Ne,Qe);if(Mn!==null&&(St=Mn),ht&&St>=1||!Se.current&&!Tt(Ie.target,Qe))return;if(ge.current.classList.add(eg),Se.current=!0,dn(ge.current,{transition:"none"}),dn(ee.current,{transition:"none"}),l&&ce({draggedDistance:dt}),Qe&&!l){const Nt=rj(dt),_r=Math.min(Nt*-1,0)*ot;dn(ge.current,{transform:nn(O)?`translate3d(0, ${_r}px, 0)`:`translate3d(${_r}px, 0, 0)`});return}const pt=1-St;if((he||y&&tt===y-1)&&(a?.(Ie,St),dn(ee.current,{opacity:`${pt}`,transition:"none"},!0)),Xe&&ee.current&&u){const Nt=Math.min($e()+St*(1-$e()),1),_r=8-St*8,En=Math.max(0,14-St*14);dn(Xe,{borderRadius:`${_r}px`,transform:nn(O)?`scale(${Nt}) translate3d(0, ${En}px, 0)`:`scale(${Nt}) translate3d(${En}px, 0, 0)`,transition:"none"},!0)}if(!l){const Nt=Ne*ot;dn(ge.current,{transform:nn(O)?`translate3d(0, ${Nt}px, 0)`:`translate3d(${Nt}px, 0, 0)`})}}}F.useEffect(()=>{window.requestAnimationFrame(()=>{ze.current=!0})},[]),F.useEffect(()=>{var Ie;function ot(){if(!ge.current||!U)return;const dt=document.activeElement;if(Xg(dt)||Ee.current){var Qe;const ht=((Qe=window.visualViewport)==null?void 0:Qe.height)||0,Ne=window.innerHeight;let Xe=Ne-ht;const At=ge.current.getBoundingClientRect().height||0,St=At>Ne*.8;Ue.current||(Ue.current=At);const Mn=ge.current.getBoundingClientRect().top;if(Math.abs(Pt.current-Xe)>60&&(Ee.current=!Ee.current),l&&l.length>0&&Y&&tt){const pt=Y[tt]||0;Xe+=pt}if(Pt.current=Xe,At>ht||Ee.current){const pt=ge.current.getBoundingClientRect().height;let Nt=pt;pt>ht&&(Nt=ht-(St?Mn:Jg)),w?ge.current.style.height=`${pt-Math.max(Xe,0)}px`:ge.current.style.height=`${Math.max(Nt,ht-Mn)}px`}else $k()||(ge.current.style.height=`${Ue.current}px`);l&&l.length>0&&!Ee.current?ge.current.style.bottom="0px":ge.current.style.bottom=`${Math.max(Xe,0)}px`}}return(Ie=window.visualViewport)==null||Ie.addEventListener("resize",ot),()=>{var dt;return(dt=window.visualViewport)==null?void 0:dt.removeEventListener("resize",ot)}},[tt,l,Y]);function Mt(Ie){It(),R?.(),Ie||P(!1),setTimeout(()=>{l&&B(l[0])},jt.DURATION*1e3)}function Kt(){if(!ge.current)return;const Ie=document.querySelector("[data-vaul-drawer-wrapper]"),ot=bd(ge.current,O);dn(ge.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`}),dn(ee.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"1"}),u&&ot&&ot>0&&ie&&dn(Ie,{borderRadius:`${hO}px`,overflow:"hidden",...nn(O)?{transform:`scale(${$e()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${$e()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${jt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${jt.EASE.join(",")})`},!0)}function It(){!re||!ge.current||(ge.current.classList.remove(eg),Se.current=!1,ve(!1),be.current=new Date)}function sn(Ie){if(!re||!ge.current)return;ge.current.classList.remove(eg),Se.current=!1,ve(!1),be.current=new Date;const ot=bd(ge.current,O);if(!Ie||!Tt(Ie.target,!1)||!ot||Number.isNaN(ot)||pe.current===null)return;const dt=be.current.getTime()-pe.current.getTime(),Qe=ke.current-(nn(O)?Ie.pageY:Ie.pageX),ht=Math.abs(Qe)/dt;if(ht>.05&&(Z(!0),setTimeout(()=>{Z(!1)},200)),l){q({draggedDistance:Qe*(O==="bottom"||O==="right"?1:-1),closeDrawer:Mt,velocity:ht,dismissible:g}),o?.(Ie,!0);return}if(O==="bottom"||O==="right"?Qe>0:Qe<0){Kt(),o?.(Ie,!0);return}if(ht>fO){Mt(),o?.(Ie,!1);return}var Ne;const Xe=Math.min((Ne=ge.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var At;const St=Math.min((At=ge.current.getBoundingClientRect().width)!=null?At:0,window.innerWidth),Mn=O==="left"||O==="right";if(Math.abs(ot)>=(Mn?St:Xe)*f){Mt(),o?.(Ie,!1);return}o?.(Ie,!0),Kt()}F.useEffect(()=>(ie&&(dn(document.documentElement,{scrollBehavior:"auto"}),oe.current=new Date),()=>{nj(document.documentElement,"scrollBehavior")}),[ie]);function Wt(Ie){const ot=Ie?(window.innerWidth-fo)/window.innerWidth:1,dt=Ie?-fo:0;Pe.current&&window.clearTimeout(Pe.current),dn(ge.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(O)?`scale(${ot}) translate3d(0, ${dt}px, 0)`:`scale(${ot}) translate3d(${dt}px, 0, 0)`}),!Ie&&ge.current&&(Pe.current=setTimeout(()=>{const Qe=bd(ge.current,O);dn(ge.current,{transition:"none",transform:nn(O)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function ei(Ie,ot){if(ot<0)return;const dt=(window.innerWidth-fo)/window.innerWidth,Qe=dt+ot*(1-dt),ht=-fo+ot*fo;dn(ge.current,{transform:nn(O)?`scale(${Qe}) translate3d(0, ${ht}px, 0)`:`scale(${Qe}) translate3d(${ht}px, 0, 0)`,transition:"none"})}function Ra(Ie,ot){const dt=nn(O)?window.innerHeight:window.innerWidth,Qe=ot?(dt-fo)/dt:1,ht=ot?-fo:0;ot&&dn(ge.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(O)?`scale(${Qe}) translate3d(0, ${ht}px, 0)`:`scale(${Qe}) translate3d(${ht}px, 0, 0)`})}return F.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),F.createElement(GL,{defaultOpen:I,onOpenChange:Ie=>{!g&&!Ie||(Ie?$(!0):Mt(!0),P(Ie))},open:ie},F.createElement(sO.Provider,{value:{activeSnapPoint:He,snapPoints:l,setActiveSnapPoint:B,drawerRef:ge,overlayRef:ee,onOpenChange:t,onPress:nt,onRelease:sn,onDrag:nr,dismissible:g,shouldAnimate:ze,handleOnly:p,isOpen:ie,isDragging:re,shouldFade:he,closeDrawer:Mt,onNestedDrag:ei,onNestedOpenChange:Wt,onNestedRelease:Ra,keyboardIsOpen:Ee,modal:T,snapPointsOffset:Y,activeSnapPointIndex:tt,direction:O,shouldScaleBackground:u,setBackgroundColorOnScale:d,noBodyStyles:C,container:G,autoFocus:W}},n))}const gO=F.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:a,onRelease:o,shouldFade:l,isOpen:u,modal:d,shouldAnimate:f}=kc(),h=uO(t,n),g=a&&a.length>0;if(!d)return null;const p=F.useCallback(y=>o(y),[o]);return F.createElement(KL,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":u&&g?"true":"false","data-vaul-snap-points-overlay":u&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});gO.displayName="Drawer.Overlay";const vO=F.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...a},o){const{drawerRef:l,onPress:u,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:g,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:w,container:T,handleOnly:R,shouldAnimate:A,autoFocus:C}=kc(),[O,I]=F.useState(!1),L=uO(o,l),N=F.useRef(null),D=F.useRef(null),U=F.useRef(!1),Q=w&&w.length>0;uj();const G=(j,ne,ie=0)=>{if(U.current)return!0;const P=Math.abs(j.y),V=Math.abs(j.x),$=V>P,re=["bottom","right"].includes(ne)?1:-1;if(ne==="left"||ne==="right"){if(!(j.x*re<0)&&V>=0&&V<=ie)return $}else if(!(j.y*re<0)&&P>=0&&P<=ie)return!$;return U.current=!0,!0};F.useEffect(()=>{Q&&window.requestAnimationFrame(()=>{I(!0)})},[]);function W(j){N.current=null,U.current=!1,d(j)}return F.createElement(WL,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":_&&Q?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...a,ref:L,style:g&&g.length>0?{"--snap-point-height":`${g[p??0]}px`,...t}:t,onPointerDown:j=>{R||(a.onPointerDown==null||a.onPointerDown.call(a,j),N.current={x:j.pageX,y:j.pageY},u(j))},onOpenAutoFocus:j=>{n?.(j),C||j.preventDefault()},onPointerDownOutside:j=>{if(e?.(j),!y||j.defaultPrevented){j.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:j=>{if(!y){j.preventDefault();return}},onPointerMove:j=>{if(D.current=j,R||(a.onPointerMove==null||a.onPointerMove.call(a,j),!N.current))return;const ne=j.pageY-N.current.y,ie=j.pageX-N.current.x,P=j.pointerType==="touch"?10:2;G({x:ie,y:ne},S,P)?f(j):(Math.abs(ie)>P||Math.abs(ne)>P)&&(N.current=null)},onPointerUp:j=>{a.onPointerUp==null||a.onPointerUp.call(a,j),N.current=null,U.current=!1,d(j)},onPointerOut:j=>{a.onPointerOut==null||a.onPointerOut.call(a,j),W(D.current)},onContextMenu:j=>{a.onContextMenu==null||a.onContextMenu.call(a,j),D.current&&W(D.current)}})});vO.displayName="Drawer.Content";const hj=250,pj=120,mj=F.forwardRef(function({preventCycle:e=!1,children:t,...n},a){const{closeDrawer:o,isDragging:l,snapPoints:u,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:g,isOpen:p,onPress:y,onDrag:_}=kc(),S=F.useRef(null),w=F.useRef(!1);function T(){if(w.current){C();return}window.setTimeout(()=>{R()},pj)}function R(){if(l||e||w.current){C();return}if(C(),!u||u.length===0){h||o();return}if(d===u[u.length-1]&&h){o();return}const I=u.findIndex(N=>N===d);if(I===-1)return;const L=u[I+1];f(L)}function A(){S.current=window.setTimeout(()=>{w.current=!0},hj)}function C(){S.current&&window.clearTimeout(S.current),w.current=!1}return F.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:O=>{g&&y(O),A()},onPointerMove:O=>{g&&_(O)},ref:a,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},F.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});mj.displayName="Drawer.Handle";function gj(e){const t=kc(),{container:n=t.container,...a}=e;return F.createElement(YL,{container:n,...a})}const Nz={Root:fj,Content:vO,Overlay:gO,Trigger:qL,Portal:gj,Title:ZL};var Bs=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),Id=class extends Error{},vj=class extends Error{},yj=e=>Math.exp(e)*150,bj=(e,...t)=>Bs(void 0,[e,...t],function*(n,{attempts:a=4}={}){var o;let l;for(let u=0;u<a;u++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,yj(u)))}throw new Id((o=l?.message)!=null?o:"Exhausted all retries")}),Jl,yO="captchaFoxOnLoad",kS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${yO}`;function _j(){return Bs(this,arguments,function*({nonce:e}={}){return Jl&&document.querySelector(`script[src="${kS}"]`)||(Jl=new Promise((t,n)=>{window[yO]=t;const a=document.createElement("script");a.src=kS,a.async=!0,a.defer=!0,a.onerror=o=>{a.remove(),Jl=void 0,n(o)},e&&(a.nonce=e),document.body.appendChild(a)})),Jl})}function Ej(){return Bs(this,arguments,function*(e={}){return bj(()=>_j(e))})}var Ts=()=>typeof window?.captchafox<"u",bO=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:a,theme:o,className:l,nonce:u,i18n:d,onError:f,onVerify:h,onLoad:g,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},w)=>{const[T,R]=E.useState(),[A,C]=E.useState(),O=E.useRef(!1),I=E.useRef(),L=E.useRef(),N=E.useRef(),D=E.useRef(!1);E.useImperativeHandle(w,()=>({getResponse(){return!Ts()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!Ts()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!Ts()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>Bs(void 0,null,function*(){if(D.current)return Promise.reject(new Id);if(!Ts()||!A)return Q();try{return yield window.captchafox.execute(A)}catch(j){const ne=G(j);return Promise.reject(ne)}})}),[A]),E.useEffect(()=>{A&&g?.()},[A]),E.useEffect(()=>()=>{U()},[]),E.useEffect(()=>{T&&(O.current?Ts()&&W():Ej({nonce:u}).then(()=>Bs(void 0,null,function*(){Ts()&&(O.current=!0,yield W())})).catch(j=>{var ne;f?.(j),D.current=!0,(ne=N.current)==null||ne.call(N),console.error("[CaptchaFox] Could not load script:",j)}))},[T,t,n,a]);const U=()=>{clearTimeout(L.current)},Q=()=>new Promise((j,ne)=>{N.current=()=>{U(),ne(new Id)},L.current=setTimeout(()=>{ne(new vj("Execute timed out"))},e*1e3),I.current=ie=>{U(),window.captchafox.execute(ie).then(j).catch(P=>{const V=G(P);ne(V)})}}),G=j=>j!=="challenge-aborted"&&j!=="rate-limited"?new Id:j,W=()=>Bs(void 0,null,function*(){var j,ne,ie;if((j=window.captchafox)==null||j.remove(A),!T||((ne=T?.children)==null?void 0:ne.length)===1)return;const P=yield(ie=window.captchafox)==null?void 0:ie.render(T,{lang:n,sitekey:t,mode:a,theme:o,i18n:d,onError:f,onFail:p,onClose:y,onVerify:h,onChallengeChange:_,onChallengeOpen:S});P&&(C(P),I.current&&(I.current(P),I.current=void 0))});return F.createElement("div",{ref:R,id:A,className:l})});bO.displayName="CaptchaFox";function Nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ev(e,t)}function Sj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ev(e,t)}var wj=Object.defineProperty,xj=Object.defineProperties,Rj=Object.getOwnPropertyDescriptors,bf=Object.getOwnPropertySymbols,_O=Object.prototype.hasOwnProperty,EO=Object.prototype.propertyIsEnumerable,tv=(e,t,n)=>t in e?wj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dr=(e,t)=>{for(var n in t||(t={}))_O.call(t,n)&&tv(e,n,t[n]);if(bf)for(var n of bf(t))EO.call(t,n)&&tv(e,n,t[n]);return e},SO=(e,t)=>xj(e,Rj(t)),Oj=(e,t)=>{var n={};for(var a in e)_O.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&bf)for(var a of bf(e))t.indexOf(a)<0&&EO.call(e,a)&&(n[a]=e[a]);return n},bn=(e,t,n)=>(tv(e,typeof t!="symbol"?t+"":t,n),n),Gs=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),Tj="hCaptcha-script",Nd="hCaptchaOnLoad",jS="script-error",Ni="@hCaptcha/loader";function Aj(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function wO(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function xO(e){return e||document.head}function Cj(e){var t;e.setTag("source",Ni),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",dr({},Mj())),e.setContext("device",SO(dr({},Nj()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function Mj(){var e,t,n,a,o,l;let u=navigator.userAgent,d,f;return u.indexOf("Firefox")!==-1?(d="Firefox",f=(e=u.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):u.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=u.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):u.indexOf("Chrome")!==-1&&u.indexOf("Safari")!==-1?(d="Chrome",f=(n=u.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):u.indexOf("Safari")!==-1&&u.indexOf("Chrome")===-1?(d="Safari",f=(a=u.match(/Version\/([\d.]+)/))==null?void 0:a[1]):u.indexOf("Opera")!==-1||u.indexOf("OPR")!==-1?(d="Opera",f=(o=u.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:o[2]):u.indexOf("MSIE")!==-1||u.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=u.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function Ij(e){return new Promise(t=>setTimeout(t,e))}function Nj(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var Dj=class RO{constructor(t){bn(this,"_parent"),bn(this,"breadcrumbs",[]),bn(this,"context",{}),bn(this,"extra",{}),bn(this,"tags",{}),bn(this,"request"),bn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new RO(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=dr(dr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((a,o)=>{var l;return a.breadcrumbs=[...(l=a.breadcrumbs)!=null?l:[],...o.breadcrumbs],a.extra=dr(dr({},a.extra),o.extra),a.contexts=dr(dr({},a.contexts),o.context),a.tags=dr(dr({},a.tags),o.tags),o.user&&(a.user=o.user),o.request&&(a.request=o.request),a},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},Lj=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pj=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,kj=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,jj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,_d="?",US="An unknown error occurred",Uj="0.0.4";function Bj(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Nn(e){return(e+256).toString(16).substring(1)}function zj(){let e=Bj(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Nn(e[0])+Nn(e[1])+Nn(e[2])+Nn(e[3])+"-"+Nn(e[4])+Nn(e[5])+"-"+Nn(e[6])+Nn(e[7])+"-"+Nn(e[8])+Nn(e[9])+"-"+Nn(e[10])+Nn(e[11])+Nn(e[12])+Nn(e[13])+Nn(e[14])+Nn(e[15])}var Vj=[[Lj,"chrome"],[kj,"winjs"],[Pj,"gecko"]];function Fj(e){var t,n,a,o;if(!e.stack)return null;let l=[],u=(a=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
71
|
+
`))!=null?a:[];for(let d=0;d<u.length;++d){let f=null,h=null,g=null;for(let[p,y]of Vj)if(h=p.exec(u[d]),h){g=y;break}if(!(!h||!g)){if(g==="chrome")f={filename:(o=h[2])!=null&&o.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||_d,lineno:h[3]?+h[3]:null,colno:h[4]?+h[4]:null};else if(g==="winjs")f={filename:h[2],function:h[1]||_d,lineno:+h[3],colno:h[4]?+h[4]:null};else if(g==="gecko")d===0&&!h[5]&&e.columnNumber!==void 0&&l.length>0&&(l[0].column=e.columnNumber+1),f={filename:h[3],function:h[1]||_d,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!f.function&&f.lineno&&(f.function=_d),l.push(f)}}return l.length?l.reverse():null}function Hj(e){let t=Fj(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function $j(e){let t=jj.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let a=n[5].split("/"),o=a.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(o?"/"+o:"")+"/api/"+a.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function Gj(e,t,n){var a,o;let l=dr({event_id:zj().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:Uj},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){l.message=(o=(a=e.error)==null?void 0:a.message)!=null?o:"Unknown error",l.fingerprint=[l.message];let u=[],d=e.error;for(let f=0;f<5&&d&&(u.push(Hj(d)),!(!d.cause||!(d.cause instanceof Error)));f++)d=d.cause;l.exception={values:u.reverse()}}return e.type==="message"&&(l.message=e.message,l.level=e.level),l}function qj(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:a}=n,o=Oj(n,["message"]),l=new Error(typeof a=="string"?a:US);return Object.assign(l,o)}let t=new Error(US);return Object.assign(t,{cause:e})}function Yj(e,t,n){return Gs(this,null,function*(){var a,o;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let l;if(n){let f=new AbortController;l=f.signal,setTimeout(()=>f.abort(),n)}let u=yield fetch(e,SO(dr({},t),{signal:l})),d=yield u.text();return{status:u.status,body:d}}return yield new Promise((l,u)=>{var d,f;let h=new XMLHttpRequest;if(h.open((d=t?.method)!=null?d:"GET",e),h.onload=()=>l({status:h.status,body:h.responseText}),h.onerror=()=>u(new Error("XHR Network Error")),t?.headers)for(let[g,p]of Object.entries(t.headers))h.setRequestHeader(g,p);if(n){let g=setTimeout(()=>{h.abort(),u(new Error("Request timed out"))},n);h.onloadend=()=>{clearTimeout(g)}}h.send((f=t?.body)==null?void 0:f.toString())})}catch(l){return{status:0,body:(o=(a=l?.toString)==null?void 0:a.call(l))!=null?o:"Unknown error"}}})}var Wn,nv=(Wn=class{constructor(e){bn(this,"apiURL"),bn(this,"dsn"),bn(this,"environment"),bn(this,"release"),bn(this,"sampleRate"),bn(this,"debug"),bn(this,"_scope"),bn(this,"shouldBuffer",!1),bn(this,"bufferlimit",20),bn(this,"buffer",[]);var t,n,a,o,l;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(a=e.scope)!=null?a:new Dj,this.apiURL=$j(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(o=e.buffer)!=null?o:!1,this.bufferlimit=(l=e.bufferLimit)!=null?l:20}static init(e){Wn._instance||(Wn._instance=new Wn(e))}static get instance(){if(!Wn._instance)throw new Error("Sentry has not been initialized");return Wn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Wn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Wn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:qj(e),scope:t??this._scope})}static captureException(e,t){Wn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Wn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return Gs(this,null,function*(){try{this.log("Sending sentry event",e);let n=Gj(e,this.environment,this.release),a={event_id:n.event_id,dsn:this.dsn},o={type:"event"},l=JSON.stringify(a)+`
|
|
72
|
+
`+JSON.stringify(o)+`
|
|
73
|
+
`+JSON.stringify(n),u=yield Yj(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",u.status),u.status!==200&&(console.log(u.body),console.error("Failed to send event to Sentry",u))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Gs(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Wn.instance.flush(e)}static reset(){Wn._instance=void 0}},bn(Wn,"_instance"),Wn),Kj="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",Wj="2.3.0",Zj="production";function Qj(e=!0){if(!e)return BS();nv.init({dsn:Kj,release:Wj,environment:Zj});let t=nv.scope;return Cj(t),BS(t)}function BS(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&nv.captureException(t,e)}}}function Xj({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:a="anonymous",apihost:o="https://js.hcaptcha.com",cleanup:l=!1,secureApi:u=!1,scriptSource:d=""}={},f){let h=xO(e),g=wO(h);return new Promise((p,y)=>{let _=g.document.createElement("script");_.id=Tj,d?_.src=`${d}?onload=${Nd}`:u?_.src=`${o}/1/secure-api.js?onload=${Nd}`:_.src=`${o}/1/api.js?onload=${Nd}`,_.crossOrigin=a,_.async=n;let S=(w,T)=>{try{!u&&l&&h.removeChild(_),T(w)}catch(R){y(R)}};_.onload=w=>S(w,p),_.onerror=w=>{f&&f(_.src),S(w,y)},_.src+=t!==""?`&${t}`:"",h.appendChild(_)})}var Ed=[];function Jj(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ni,message:"hCaptcha loader params",data:e});let n=xO(e.scriptLocation),a=wO(n),o=Ed.find(({scope:u})=>u===a.window);if(o)return t.addBreadcrumb({category:Ni,message:"hCaptcha already loaded"}),o.promise;let l=new Promise((u,d)=>Gs(this,null,function*(){try{a.window[Nd]=()=>{t.addBreadcrumb({category:Ni,message:"hCaptcha script called onload function"}),u(a.window.hcaptcha)};let f=Aj({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield Xj(dr({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:Ni,message:"hCaptcha loaded",data:o})}catch{t.addBreadcrumb({category:Ni,message:"hCaptcha failed to load"});let h=Ed.findIndex(g=>g.scope===a.window);h!==-1&&Ed.splice(h,1),d(new Error(jS))}}));return Ed.push({promise:l,scope:a.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(jS))}}function OO(e,t,n=0){return Gs(this,null,function*(){var a,o;let l=(a=e.maxRetries)!=null?a:2,u=(o=e.retryDelay)!=null?o:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield Jj(e,t)}catch(f){return t.addBreadcrumb({category:Ni,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:Ni,message:`Waiting ${u}ms before retry attempt ${n+1}`}),yield Ij(u),n+=1,OO(e,t,n))}})}function e9(){return Gs(this,arguments,function*(e={}){let t=Qj(e.sentry);return yield OO(e,t)})}function zS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function VS(e){return e||document.head}var t9=(function(e){Sj(t,e);function t(a){var o;return o=e.call(this,a)||this,o._hcaptcha=void 0,o.renderCaptcha=o.renderCaptcha.bind(Nr(o)),o.resetCaptcha=o.resetCaptcha.bind(Nr(o)),o.removeCaptcha=o.removeCaptcha.bind(Nr(o)),o.isReady=o.isReady.bind(Nr(o)),o._onReady=null,o.loadCaptcha=o.loadCaptcha.bind(Nr(o)),o.handleOnLoad=o.handleOnLoad.bind(Nr(o)),o.handleSubmit=o.handleSubmit.bind(Nr(o)),o.handleExpire=o.handleExpire.bind(Nr(o)),o.handleError=o.handleError.bind(Nr(o)),o.handleOpen=o.handleOpen.bind(Nr(o)),o.handleClose=o.handleClose.bind(Nr(o)),o.handleChallengeExpired=o.handleChallengeExpired.bind(Nr(o)),o.ref=E.createRef(),o.apiScriptRequested=!1,o.sentryHub=null,o.captchaId="",o._pendingExecute=null,o.state={isApiReady:!1,isRemoved:!1,elementId:a.id},o}var n=t.prototype;return n.componentDidMount=function(){var o=this,l=VS(this.props.scriptLocation),u=zS(l);this._hcaptcha=u.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){o.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var o=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(o.reset(l),o.remove(l))},n.shouldComponentUpdate=function(o,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(o){var l=this,u=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=u.every(function(f){return o[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var o=this.props,l=o.apihost,u=o.assethost,d=o.endpoint,f=o.host,h=o.imghost,g=o.languageOverride,p=o.reCaptchaCompat,y=o.reportapi,_=o.sentry,S=o.custom,w=o.loadAsync,T=o.scriptLocation,R=o.scriptSource,A=o.secureApi,C=o.cleanup,O=C===void 0?!0:C,I=o.userJourneys,L={render:"explicit",apihost:l,assethost:u,endpoint:d,hl:g,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:w,scriptLocation:T,scriptSource:R,secureApi:A,cleanup:O,uj:I!==void 0?I:!1};e9(L).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(o){var l=this,u=this.props.onReady,d=this.state.isApiReady,f=this.captchaId;if(!(!d||f)){var h=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),g=this._hcaptcha,p=g.render(this.ref.current,h);this.captchaId=p,this.setState({isRemoved:!1},function(){o&&o(),u&&u(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var o=this._hcaptcha,l=this.captchaId;this.isReady()&&(o.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(o){var l=this,u=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",u.remove(d),o&&o()})},n.handleOnLoad=function(){var o=this;this.setState({isApiReady:!0},function(){var l=VS(o.props.scriptLocation),u=zS(l);o._hcaptcha=u.window.hcaptcha,o.renderCaptcha(function(){var d=o.props.onLoad;d&&d()})})},n.handleSubmit=function(o){var l=this.props.onVerify,u=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||u)){var h=d.getResponse(f),g=d.getRespKey(f);l&&l(h,g)}},n.handleExpire=function(){var o=this.props.onExpire,l=this._hcaptcha,u=this.captchaId;this.isReady()&&(l.reset(u),o&&o())},n.handleError=function(o){var l=this.props.onError,u=this._hcaptcha,d=this.captchaId;this.isReady()&&u.reset(d),l&&l(o)},n.isReady=function(){var o=this.state,l=o.isApiReady,u=o.isRemoved;return l&&!u},n._cancelPendingExecute=function(o){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var u=new Error(o);l.reject(u)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(o){var l=this;o===void 0&&(o=null),o=typeof o=="object"?o:null;try{var u=this._hcaptcha,d=this.captchaId;if(o&&o.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return o&&o.async?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},l._onReady=function(p){if(l._pendingExecute)try{var y=u.execute(p,o);y&&typeof y.then=="function"?y.then(function(_){l._pendingExecute=null,h(_)}).catch(function(_){l._pendingExecute=null,g(_)}):(l._pendingExecute=null,g(new Error("hcaptcha-execute-no-promise")))}catch(_){l._pendingExecute=null,g(_)}}}):(this._onReady=function(h){u.execute(h,o)},null);var f=u.execute(d,o);return o&&o.async&&f&&typeof f.then=="function"?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},f.then(function(p){l._pendingExecute=null,h(p)}).catch(function(p){l._pendingExecute=null,g(p)})}):f}catch(h){return o&&o.async?Promise.reject(h):null}},n.close=function(){var o=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return o.close(l)},n.setData=function(o){var l=this._hcaptcha,u=this.captchaId;this.isReady()&&(o&&typeof o!="object"&&(o=null),l.setData(u,o))},n.getResponse=function(){var o=this._hcaptcha;return o.getResponse(this.captchaId)},n.getRespKey=function(){var o=this._hcaptcha;return o.getRespKey(this.captchaId)},n.render=function(){var o=this.state.elementId;return E.createElement("div",{ref:this.ref,id:o})},t})(E.Component),n9=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),r9=E.forwardRef(n9),a9="https://challenges.cloudflare.com/turnstile/v0/api.js",v0="cf-turnstile-script",i9="cf-turnstile",y0="onloadTurnstileCallback",TO=e=>!!document.getElementById(e),o9=({render:e="explicit",onLoadCallbackName:t=y0,scriptOptions:{nonce:n="",defer:a=!0,async:o=!0,id:l="",appendTo:u,onError:d,crossOrigin:f=""}={}})=>{let h=l||v0;if(TO(h))return;let g=document.createElement("script");g.id=h,g.src=`${a9}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${g.src}"]`)&&(g.defer=!!a,g.async=!!o,n&&(g.nonce=n),f&&(g.crossOrigin=f),d&&(g.onerror=d,delete window[t]),(u==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(g))},ho={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function s9(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function l9(e=v0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let a=()=>{TO(e)&&n(!0)},o=new MutationObserver(a);return o.observe(document,{childList:!0,subtree:!0}),a(),()=>{o.disconnect()}},[e]),t}var dc="unloaded",AO,c9=new Promise((e,t)=>{AO={resolve:e,reject:t},dc==="ready"&&e(void 0)}),u9=(e=y0)=>(dc==="unloaded"&&(dc="loading",window[e]=()=>{AO.resolve(),dc="ready",delete window[e]}),c9),CO=E.forwardRef((e,t)=>{let{scriptOptions:n,options:a={},siteKey:o,onWidgetLoad:l,onSuccess:u,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:w,as:T="div",injectScript:R=!0,rerenderOnCallbackChange:A=!1,...C}=e,O=a.size,I=E.useCallback(()=>typeof O>"u"?{}:a.execution==="execute"?ho.invisible:a.appearance==="interaction-only"?ho.interactionOnly:ho[O],[a.execution,O,a.appearance]),[L,N]=E.useState(I()),D=E.useRef(null),[U,Q]=E.useState(!1),G=E.useRef(void 0),W=E.useRef(!1),j=S||i9,ne=E.useRef({onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(ne.current={onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y})});let ie=n?.id||v0,P=l9(ie),V=n?.onLoadCallbackName||y0,$=a.appearance||"always",re=E.useMemo(()=>({sitekey:o,action:a.action,cData:a.cData,theme:a.theme||"auto",language:a.language||"auto",tabindex:a.tabIndex,"response-field":a.responseField,"response-field-name":a.responseFieldName,size:s9(O),retry:a.retry||"auto","retry-interval":a.retryInterval||8e3,"refresh-expired":a.refreshExpired||"auto","refresh-timeout":a.refreshTimeout||"auto",execution:a.execution||"render",appearance:a.appearance||"always","feedback-enabled":a.feedbackEnabled||!0,callback:k=>{W.current=!0,A?u?.(k):ne.current.onSuccess?.(k)},"error-callback":A?f:(...k)=>ne.current.onError?.(...k),"expired-callback":A?d:(...k)=>ne.current.onExpire?.(...k),"before-interactive-callback":A?h:(...k)=>ne.current.onBeforeInteractive?.(...k),"after-interactive-callback":A?g:(...k)=>ne.current.onAfterInteractive?.(...k),"unsupported-callback":A?p:(...k)=>ne.current.onUnsupported?.(...k),"timeout-callback":A?y:(...k)=>ne.current.onTimeout?.(...k)}),[a.action,a.appearance,a.cData,a.execution,a.language,a.refreshExpired,a.responseField,a.responseFieldName,a.retry,a.retryInterval,a.tabIndex,a.theme,a.feedbackEnabled,a.refreshTimeout,o,O,A,A?u:null,A?f:null,A?d:null,A?h:null,A?g:null,A?p:null,A?y:null]),ve=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){R&&!U&&o9({onLoadCallbackName:V,scriptOptions:{...n,id:ie}})},[R,U,n,ie]),E.useEffect(function(){dc!=="ready"&&u9(V).then(()=>Q(!0)).catch(console.error)},[]),E.useEffect(function(){if(!D.current||!U)return;let k=!1;return(async()=>{if(k||!D.current)return;let Z=window.turnstile.render(D.current,re);G.current=Z,G.current&&l?.(G.current)})(),()=>{k=!0,G.current&&(window.turnstile.remove(G.current),W.current=!1)}},[j,U,re]),E.useImperativeHandle(t,()=>{let{turnstile:k}=window;return{getResponse(){if(!k?.getResponse||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}return k.getResponse(G.current)},async getResponsePromise(Z=3e4,ee=100){return new Promise((oe,pe)=>{let be,ye=async()=>{if(W.current&&window.turnstile&&G.current)try{let Se=window.turnstile.getResponse(G.current);return be&&clearTimeout(be),Se?oe(Se):pe(new Error("No response received"))}catch(Se){return be&&clearTimeout(be),console.warn("Failed to get response",Se),pe(new Error("Failed to get response"))}be||(be=setTimeout(()=>{be&&clearTimeout(be),pe(new Error("Timeout"))},Z)),await new Promise(Se=>setTimeout(Se,ee)),await ye()};ye()})},reset(){if(!k?.reset||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}a.execution==="execute"&&N(ho.invisible);try{W.current=!1,k.reset(G.current)}catch(Z){console.warn(`Failed to reset Turnstile widget ${G}`,Z)}},remove(){if(!k?.remove||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}N(ho.invisible),W.current=!1,k.remove(G.current),G.current=null},render(){if(!k?.render||!D.current||!ve()||G.current){console.warn("Turnstile has not been loaded or container not found");return}let Z=k.render(D.current,re);return G.current=Z,G.current&&l?.(G.current),a.execution!=="execute"&&N(O?ho[O]:{}),Z},execute(){if(a.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!k?.execute||!D.current||!G.current||!ve()){console.warn("Turnstile has not been loaded or container not found");return}k.execute(D.current,re),N(O?ho[O]:{})},isExpired(){return!k?.isExpired||!G.current||!ve()?(console.warn("Turnstile has not been loaded"),!1):k.isExpired(G.current)}}},[G,a.execution,O,re,D,ve,U,l]),E.useEffect(()=>{P&&!U&&window.turnstile&&Q(!0)},[U,P]),E.useEffect(()=>{N(I())},[a.execution,O,$]),E.useEffect(()=>{!P||typeof _!="function"||_()},[P]),b.jsx(r9,{ref:D,as:T,id:j,style:{...L,...w},...C})});CO.displayName="Turnstile";var tg={exports:{}},ng,FS;function d9(){if(FS)return ng;FS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ng=e,ng}var rg,HS;function f9(){if(HS)return rg;HS=1;var e=d9();function t(){}function n(){}return n.resetWarningCache=t,rg=function(){function a(u,d,f,h,g,p){if(p!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}a.isRequired=a;function o(){return a}var l={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},rg}var $S;function b0(){return $S||($S=1,tg.exports=f9()()),tg.exports}var h9=b0();const Zn=No(h9);var p9=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rv.apply(this,arguments)}function m9(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Sd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,av(e,t)}function av(e,t){return av=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,o){return a.__proto__=o,a},av(e,t)}var Hf=(function(e){g9(t,e);function t(){var a;return a=e.call(this)||this,a.handleExpired=a.handleExpired.bind(Sd(a)),a.handleErrored=a.handleErrored.bind(Sd(a)),a.handleChange=a.handleChange.bind(Sd(a)),a.handleRecaptchaRef=a.handleRecaptchaRef.bind(Sd(a)),a}var n=t.prototype;return n.getCaptchaFunction=function(o){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[o]:this.props.grecaptcha[o]:null},n.getValue=function(){var o=this.getCaptchaFunction("getResponse");return o&&this._widgetId!==void 0?o(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var o=this.getCaptchaFunction("execute");if(o&&this._widgetId!==void 0)return o(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var o=this;return new Promise(function(l,u){o.executionResolve=l,o.executionReject=u,o.execute()})},n.reset=function(){var o=this.getCaptchaFunction("reset");o&&this._widgetId!==void 0&&o(this._widgetId)},n.forceReset=function(){var o=this.getCaptchaFunction("reset");o&&o()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(o){this.props.onChange&&this.props.onChange(o),this.executionResolve&&(this.executionResolve(o),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var o=this.getCaptchaFunction("render");if(o&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=o(l,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(l)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(o){this.captcha=o},n.render=function(){var o=this.props;o.sitekey,o.onChange,o.theme,o.type,o.tabindex,o.onExpired,o.onErrored,o.size,o.stoken,o.grecaptcha,o.badge,o.hl,o.isolated;var l=m9(o,p9);return E.createElement("div",rv({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Hf.displayName="ReCAPTCHA";Hf.propTypes={sitekey:Zn.string.isRequired,onChange:Zn.func,grecaptcha:Zn.object,theme:Zn.oneOf(["dark","light"]),type:Zn.oneOf(["image","audio"]),tabindex:Zn.number,onExpired:Zn.func,onErrored:Zn.func,size:Zn.oneOf(["compact","normal","invisible"]),stoken:Zn.string,hl:Zn.string,badge:Zn.oneOf(["bottomright","bottomleft","inline"]),isolated:Zn.bool};Hf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ag={exports:{}},yt={};var GS;function v9(){if(GS)return yt;GS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function C(I){if(typeof I=="object"&&I!==null){var L=I.$$typeof;switch(L){case t:switch(I=I.type,I){case f:case h:case a:case l:case o:case p:return I;default:switch(I=I&&I.$$typeof,I){case d:case g:case S:case _:case u:return I;default:return L}}case n:return L}}}function O(I){return C(I)===h}return yt.AsyncMode=f,yt.ConcurrentMode=h,yt.ContextConsumer=d,yt.ContextProvider=u,yt.Element=t,yt.ForwardRef=g,yt.Fragment=a,yt.Lazy=S,yt.Memo=_,yt.Portal=n,yt.Profiler=l,yt.StrictMode=o,yt.Suspense=p,yt.isAsyncMode=function(I){return O(I)||C(I)===f},yt.isConcurrentMode=O,yt.isContextConsumer=function(I){return C(I)===d},yt.isContextProvider=function(I){return C(I)===u},yt.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},yt.isForwardRef=function(I){return C(I)===g},yt.isFragment=function(I){return C(I)===a},yt.isLazy=function(I){return C(I)===S},yt.isMemo=function(I){return C(I)===_},yt.isPortal=function(I){return C(I)===n},yt.isProfiler=function(I){return C(I)===l},yt.isStrictMode=function(I){return C(I)===o},yt.isSuspense=function(I){return C(I)===p},yt.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===a||I===h||I===l||I===o||I===p||I===y||typeof I=="object"&&I!==null&&(I.$$typeof===S||I.$$typeof===_||I.$$typeof===u||I.$$typeof===d||I.$$typeof===g||I.$$typeof===T||I.$$typeof===R||I.$$typeof===A||I.$$typeof===w)},yt.typeOf=C,yt}var qS;function y9(){return qS||(qS=1,ag.exports=v9()),ag.exports}var ig,YS;function b9(){if(YS)return ig;YS=1;var e=y9(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=a,l[e.Memo]=o;function u(S){return e.isMemo(S)?o:l[S.$$typeof]||t}var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;function _(S,w,T){if(typeof w!="string"){if(y){var R=p(w);R&&R!==y&&_(S,R,T)}var A=f(w);h&&(A=A.concat(h(w)));for(var C=u(S),O=u(w),I=0;I<A.length;++I){var L=A[I];if(!n[L]&&!(T&&T[L])&&!(O&&O[L])&&!(C&&C[L])){var N=g(w,L);try{d(S,L,N)}catch{}}}}return S}return ig=_,ig}var _9=b9();const E9=No(_9);function iv(){return iv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},iv.apply(this,arguments)}function S9(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function w9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gr={},x9=0;function R9(e,t){return t=t||{},function(a){var o=a.displayName||a.name||"Component",l=(function(d){w9(f,d);function f(g,p){var y;return y=d.call(this,g,p)||this,y.state={},y.__scriptURL="",y}var h=f.prototype;return h.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+x9++),this.__scriptLoaderID},h.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},h.asyncScriptLoaderHandleLoad=function(p){var y=this;this.setState(p,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},h.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Gr[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var y in p.observers)p.observers[y](p);delete window[t.callbackName]},h.componentDidMount=function(){var p=this,y=this.setupScriptURL(),_=this.asyncScriptLoaderGetScriptLoaderID(),S=t,w=S.globalName,T=S.callbackName,R=S.scriptId;if(w&&typeof window[w]<"u"&&(Gr[y]={loaded:!0,observers:{}}),Gr[y]){var A=Gr[y];if(A&&(A.loaded||A.errored)){this.asyncScriptLoaderHandleLoad(A);return}A.observers[_]=function(N){return p.asyncScriptLoaderHandleLoad(N)};return}var C={};C[_]=function(N){return p.asyncScriptLoaderHandleLoad(N)},Gr[y]={loaded:!1,observers:C};var O=document.createElement("script");O.src=y,O.async=!0;for(var I in t.attributes)O.setAttribute(I,t.attributes[I]);R&&(O.id=R);var L=function(D){if(Gr[y]){var U=Gr[y],Q=U.observers;for(var G in Q)D(Q[G])&&delete Q[G]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=Gr[y];N&&(N.loaded=!0,L(function(D){return T?!1:(D(N),!0)}))},O.onerror=function(){var N=Gr[y];N&&(N.errored=!0,L(function(D){return D(N),!0}))},document.body.appendChild(O)},h.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),_=0;_<y.length;_+=1)y[_].src.indexOf(p)>-1&&y[_].parentNode&&y[_].parentNode.removeChild(y[_]);var S=Gr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Gr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=S9(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(a,S)},f})(E.Component),u=E.forwardRef(function(d,f){return E.createElement(l,iv({},d,{forwardedRef:f}))});return u.displayName="AsyncScriptLoader("+o+")",u.propTypes={asyncScriptOnLoad:Zn.func},E9(u,a)}}var ov="onloadcallback",O9="grecaptcha";function sv(){return typeof window<"u"&&window.recaptchaOptions||{}}function T9(){var e=sv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+ov+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+ov+"&render=explicit"}const A9=R9(T9,{callbackName:ov,globalName:O9,attributes:sv().nonce?{nonce:sv().nonce}:{}})(Hf);var C9=Object.defineProperty,M9=Object.defineProperties,I9=Object.getOwnPropertyDescriptors,_f=Object.getOwnPropertySymbols,MO=Object.prototype.hasOwnProperty,IO=Object.prototype.propertyIsEnumerable,KS=(e,t,n)=>t in e?C9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N9=(e,t)=>{for(var n in t||(t={}))MO.call(t,n)&&KS(e,n,t[n]);if(_f)for(var n of _f(t))IO.call(t,n)&&KS(e,n,t[n]);return e},D9=(e,t)=>M9(e,I9(t)),L9=(e,t)=>{var n={};for(var a in e)MO.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&_f)for(var a of _f(e))t.indexOf(a)<0&&IO.call(e,a)&&(n[a]=e[a]);return n};function P9(e){let t=setTimeout(e,0),n=setTimeout(e,10),a=setTimeout(e,50);return[t,n,a]}function k9(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var j9=18,NO=40,U9=`${NO}px`,B9=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function z9({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:a}){let[o,l]=E.useState(!1),[u,d]=E.useState(!1),[f,h]=E.useState(!1),g=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&u,[o,u,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,w=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,R=w-j9,A=T;document.querySelectorAll(B9).length===0&&document.elementFromPoint(R,A)===y||(l(!0),h(!0))},[e,t,f,n]);return E.useEffect(()=>{let y=e.current;if(!y||n==="none")return;function _(){let w=window.innerWidth-y.getBoundingClientRect().right;d(w>=NO)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=a||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),w=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(w),clearTimeout(T)}},[t,a,n,p]),{hasPWMBadge:o,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:U9}}var DO=E.createContext({}),LO=E.forwardRef((e,t)=>{var n=e,{value:a,onChange:o,maxLength:l,textAlign:u="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:g,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=V9,render:w,children:T}=n,R=L9(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),A,C,O,I,L;let[N,D]=E.useState(typeof R.defaultValue=="string"?R.defaultValue:""),U=a??N,Q=k9(U),G=E.useCallback(ge=>{o?.(ge),D(ge)},[o]),W=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),j=E.useRef(null),ne=E.useRef(null),ie=E.useRef({value:U,onChange:G,isIOS:typeof window<"u"&&((C=(A=window?.CSS)==null?void 0:A.supports)==null?void 0:C.call(A,"-webkit-touch-callout","none"))}),P=E.useRef({prev:[(O=j.current)==null?void 0:O.selectionStart,(I=j.current)==null?void 0:I.selectionEnd,(L=j.current)==null?void 0:L.selectionDirection]});E.useImperativeHandle(t,()=>j.current,[]),E.useEffect(()=>{let ge=j.current,me=ne.current;if(!ge||!me)return;ie.current.value!==ge.value&&ie.current.onChange(ge.value),P.current.prev=[ge.selectionStart,ge.selectionEnd,ge.selectionDirection];function Re(){if(document.activeElement!==ge){Z(null),oe(null);return}let He=ge.selectionStart,tt=ge.selectionEnd,B=ge.selectionDirection,q=ge.maxLength,Y=ge.value,ce=P.current.prev,he=-1,fe=-1,xe;if(Y.length!==0&&He!==null&&tt!==null){let nr=He===tt,Mt=He===Y.length&&Y.length<q;if(nr&&!Mt){let Kt=He;if(Kt===0)he=0,fe=1,xe="forward";else if(Kt===q)he=Kt-1,fe=Kt,xe="backward";else if(q>1&&Y.length>1){let It=0;if(ce[0]!==null&&ce[1]!==null){xe=Kt<ce[1]?"backward":"forward";let sn=ce[0]===ce[1]&&ce[0]<q;xe==="backward"&&!sn&&(It=-1)}he=It+Kt,fe=It+Kt+1}}he!==-1&&fe!==-1&&he!==fe&&j.current.setSelectionRange(he,fe,xe)}let $e=he!==-1?he:He,nt=fe!==-1?fe:tt,Tt=xe??B;Z($e),oe(nt),P.current.prev=[$e,nt,Tt]}if(document.addEventListener("selectionchange",Re,{capture:!0}),Re(),document.activeElement===ge&&ve(!0),!document.getElementById("input-otp-style")){let He=document.createElement("style");if(He.id="input-otp-style",document.head.appendChild(He),He.sheet){let tt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ec(He.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ec(He.sheet,`[data-input-otp]:autofill { ${tt} }`),ec(He.sheet,`[data-input-otp]:-webkit-autofill { ${tt} }`),ec(He.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ec(He.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ue=()=>{me&&me.style.setProperty("--root-height",`${ge.clientHeight}px`)};Ue();let it=new ResizeObserver(Ue);return it.observe(ge),()=>{document.removeEventListener("selectionchange",Re,{capture:!0}),it.disconnect()}},[]);let[V,$]=E.useState(!1),[re,ve]=E.useState(!1),[k,Z]=E.useState(null),[ee,oe]=E.useState(null);E.useEffect(()=>{P9(()=>{var ge,me,Re,Ue;(ge=j.current)==null||ge.dispatchEvent(new Event("input"));let it=(me=j.current)==null?void 0:me.selectionStart,He=(Re=j.current)==null?void 0:Re.selectionEnd,tt=(Ue=j.current)==null?void 0:Ue.selectionDirection;it!==null&&He!==null&&(Z(it),oe(He),P.current.prev=[it,He,tt])})},[U,re]),E.useEffect(()=>{Q!==void 0&&U!==Q&&Q.length<l&&U.length===l&&g?.(U)},[l,g,Q,U]);let pe=z9({containerRef:ne,inputRef:j,pushPasswordManagerStrategy:p,isFocused:re}),be=E.useCallback(ge=>{let me=ge.currentTarget.value.slice(0,l);if(me.length>0&&W&&!W.test(me)){ge.preventDefault();return}typeof Q=="string"&&me.length<Q.length&&document.dispatchEvent(new Event("selectionchange")),G(me)},[l,G,Q,W]),ye=E.useCallback(()=>{var ge;if(j.current){let me=Math.min(j.current.value.length,l-1),Re=j.current.value.length;(ge=j.current)==null||ge.setSelectionRange(me,Re),Z(me),oe(Re)}ve(!0)},[l]),Se=E.useCallback(ge=>{var me,Re;let Ue=j.current;if(!y&&(!ie.current.isIOS||!ge.clipboardData||!Ue))return;let it=ge.clipboardData.getData("text/plain"),He=y?y(it):it;ge.preventDefault();let tt=(me=j.current)==null?void 0:me.selectionStart,B=(Re=j.current)==null?void 0:Re.selectionEnd,q=(tt!==B?U.slice(0,tt)+He+U.slice(B):U.slice(0,tt)+He+U.slice(tt)).slice(0,l);if(q.length>0&&W&&!W.test(q))return;Ue.value=q,G(q);let Y=Math.min(q.length,l-1),ce=q.length;Ue.setSelectionRange(Y,ce),Z(Y),oe(ce)},[l,G,W,U]),Pe=E.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),ke=E.useMemo(()=>({position:"absolute",inset:0,width:pe.willPushPWMBadge?`calc(100% + ${pe.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:pe.willPushPWMBadge?`inset(0 ${pe.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[pe.PWM_BADGE_SPACE_WIDTH,pe.willPushPWMBadge,u]),Ee=E.useMemo(()=>E.createElement("input",D9(N9({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":U.length===0||void 0,"data-input-otp-mss":k,"data-input-otp-mse":ee,inputMode:h,pattern:W?.source,"aria-placeholder":f,style:ke,maxLength:l,value:U,ref:j,onPaste:ge=>{var me;Se(ge),(me=R.onPaste)==null||me.call(R,ge)},onChange:be,onMouseOver:ge=>{var me;$(!0),(me=R.onMouseOver)==null||me.call(R,ge)},onMouseLeave:ge=>{var me;$(!1),(me=R.onMouseLeave)==null||me.call(R,ge)},onFocus:ge=>{var me;ye(),(me=R.onFocus)==null||me.call(R,ge)},onBlur:ge=>{var me;ve(!1),(me=R.onBlur)==null||me.call(R,ge)}})),[be,ye,Se,h,ke,l,ee,k,R,W?.source,U]),ze=E.useMemo(()=>({slots:Array.from({length:l}).map((ge,me)=>{var Re;let Ue=re&&k!==null&&ee!==null&&(k===ee&&me===k||me>=k&&me<ee),it=U[me]!==void 0?U[me]:null,He=U[0]!==void 0?null:(Re=f?.[me])!=null?Re:null;return{char:it,placeholderChar:He,isActive:Ue,hasFakeCaret:Ue&&it===null}}),isFocused:re,isHovering:!R.disabled&&V}),[re,V,l,ee,k,R.disabled,U]),Pt=E.useMemo(()=>w?w(ze):E.createElement(DO.Provider,{value:ze},T),[T,ze,w]);return E.createElement(E.Fragment,null,S!==null&&E.createElement("noscript",null,E.createElement("style",null,S)),E.createElement("div",{ref:ne,"data-input-otp-container":!0,style:Pe,className:_},Pt,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ee)))});LO.displayName="Input";function ec(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var V9=`
|
|
74
|
+
[data-input-otp] {
|
|
75
|
+
--nojs-bg: white !important;
|
|
76
|
+
--nojs-fg: black !important;
|
|
77
|
+
|
|
78
|
+
background-color: var(--nojs-bg) !important;
|
|
79
|
+
color: var(--nojs-fg) !important;
|
|
80
|
+
caret-color: var(--nojs-fg) !important;
|
|
81
|
+
letter-spacing: .25em !important;
|
|
82
|
+
text-align: center !important;
|
|
83
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
84
|
+
border-radius: 4px !important;
|
|
85
|
+
width: 100% !important;
|
|
86
|
+
}
|
|
87
|
+
@media (prefers-color-scheme: dark) {
|
|
88
|
+
[data-input-otp] {
|
|
89
|
+
--nojs-bg: black !important;
|
|
90
|
+
--nojs-fg: white !important;
|
|
91
|
+
}
|
|
92
|
+
}`,As={},og,WS;function PO(){return WS||(WS=1,og={L:1,M:0,Q:3,H:2}),og}var sg,ZS;function kO(){return ZS||(ZS=1,sg={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),sg}var lg,QS;function F9(){if(QS)return lg;QS=1;var e=kO();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var a=0;a<this.data.length;a++)n.put(this.data.charCodeAt(a),8)}},lg=t,lg}var cg,XS;function H9(){if(XS)return cg;XS=1;var e=PO();function t(n,a){this.totalCount=n,this.dataCount=a}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,a){var o=t.getRsBlockTable(n,a);if(o==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+a);for(var l=o.length/3,u=new Array,d=0;d<l;d++)for(var f=o[d*3+0],h=o[d*3+1],g=o[d*3+2],p=0;p<f;p++)u.push(new t(h,g));return u},t.getRsBlockTable=function(n,a){switch(a){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},cg=t,cg}var ug,JS;function $9(){if(JS)return ug;JS=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var a=0;a<n;a++)this.putBit((t>>>n-a-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ug=e,ug}var dg,ew;function jO(){if(ew)return dg;ew=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return dg=e,dg}var fg,tw;function UO(){if(tw)return fg;tw=1;var e=jO();function t(n,a){if(n.length==null)throw new Error(n.length+"/"+a);for(var o=0;o<n.length&&n[o]==0;)o++;this.num=new Array(n.length-o+a);for(var l=0;l<n.length-o;l++)this.num[l]=n[l+o]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var a=new Array(this.getLength()+n.getLength()-1),o=0;o<this.getLength();o++)for(var l=0;l<n.getLength();l++)a[o+l]^=e.gexp(e.glog(this.get(o))+e.glog(n.get(l)));return new t(a,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var a=e.glog(this.get(0))-e.glog(n.get(0)),o=new Array(this.getLength()),l=0;l<this.getLength();l++)o[l]=this.get(l);for(var l=0;l<n.getLength();l++)o[l]^=e.gexp(e.glog(n.get(l))+a);return new t(o,0).mod(n)}},fg=t,fg}var hg,nw;function G9(){if(nw)return hg;nw=1;var e=kO(),t=UO(),n=jO(),a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(l){for(var u=l<<10;o.getBCHDigit(u)-o.getBCHDigit(o.G15)>=0;)u^=o.G15<<o.getBCHDigit(u)-o.getBCHDigit(o.G15);return(l<<10|u)^o.G15_MASK},getBCHTypeNumber:function(l){for(var u=l<<12;o.getBCHDigit(u)-o.getBCHDigit(o.G18)>=0;)u^=o.G18<<o.getBCHDigit(u)-o.getBCHDigit(o.G18);return l<<12|u},getBCHDigit:function(l){for(var u=0;l!=0;)u++,l>>>=1;return u},getPatternPosition:function(l){return o.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,u,d){switch(l){case a.PATTERN000:return(u+d)%2==0;case a.PATTERN001:return u%2==0;case a.PATTERN010:return d%3==0;case a.PATTERN011:return(u+d)%3==0;case a.PATTERN100:return(Math.floor(u/2)+Math.floor(d/3))%2==0;case a.PATTERN101:return u*d%2+u*d%3==0;case a.PATTERN110:return(u*d%2+u*d%3)%2==0;case a.PATTERN111:return(u*d%3+(u+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var u=new t([1],0),d=0;d<l;d++)u=u.multiply(new t([1,n.gexp(d)],0));return u},getLengthInBits:function(l,u){if(1<=u&&u<10)switch(l){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(u<27)switch(l){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(u<41)switch(l){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+u)},getLostPoint:function(l){for(var u=l.getModuleCount(),d=0,f=0;f<u;f++)for(var h=0;h<u;h++){for(var g=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||u<=f+y))for(var _=-1;_<=1;_++)h+_<0||u<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&g++;g>5&&(d+=3+g-5)}for(var f=0;f<u-1;f++)for(var h=0;h<u-1;h++){var S=0;l.isDark(f,h)&&S++,l.isDark(f+1,h)&&S++,l.isDark(f,h+1)&&S++,l.isDark(f+1,h+1)&&S++,(S==0||S==4)&&(d+=3)}for(var f=0;f<u;f++)for(var h=0;h<u-6;h++)l.isDark(f,h)&&!l.isDark(f,h+1)&&l.isDark(f,h+2)&&l.isDark(f,h+3)&&l.isDark(f,h+4)&&!l.isDark(f,h+5)&&l.isDark(f,h+6)&&(d+=40);for(var h=0;h<u;h++)for(var f=0;f<u-6;f++)l.isDark(f,h)&&!l.isDark(f+1,h)&&l.isDark(f+2,h)&&l.isDark(f+3,h)&&l.isDark(f+4,h)&&!l.isDark(f+5,h)&&l.isDark(f+6,h)&&(d+=40);for(var w=0,h=0;h<u;h++)for(var f=0;f<u;f++)l.isDark(f,h)&&w++;var T=Math.abs(100*w/u/u-50)/5;return d+=T*10,d}};return hg=o,hg}var pg,rw;function q9(){if(rw)return pg;rw=1;var e=F9(),t=H9(),n=$9(),a=G9(),o=UO();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=l.prototype;return u.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},u.isDark=function(d,f){if(d<0||this.moduleCount<=d||f<0||this.moduleCount<=f)throw new Error(d+","+f);return this.modules[d][f]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var f=t.getRSBlocks(d,this.errorCorrectLevel),h=new n,g=0,p=0;p<f.length;p++)g+=f[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),a.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=g*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(d,f){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++)this.modules[h][g]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,f),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},u.setupPositionProbePattern=function(d,f){for(var h=-1;h<=7;h++)if(!(d+h<=-1||this.moduleCount<=d+h))for(var g=-1;g<=7;g++)f+g<=-1||this.moduleCount<=f+g||(0<=h&&h<=6&&(g==0||g==6)||0<=g&&g<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=g&&g<=4?this.modules[d+h][f+g]=!0:this.modules[d+h][f+g]=!1)},u.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var g=a.getLostPoint(this);(h==0||d>g)&&(d=g,f=h)}return f},u.createMovieClip=function(d,f,h){var g=d.createEmptyMovieClip(f,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var _=y*p,S=0;S<this.modules[y].length;S++){var w=S*p,T=this.modules[y][S];T&&(g.beginFill(0,100),g.moveTo(w,_),g.lineTo(w+p,_),g.lineTo(w+p,_+p),g.lineTo(w,_+p),g.endFill())}return g},u.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++)this.modules[d][6]==null&&(this.modules[d][6]=d%2==0);for(var f=8;f<this.moduleCount-8;f++)this.modules[6][f]==null&&(this.modules[6][f]=f%2==0)},u.setupPositionAdjustPattern=function(){for(var d=a.getPatternPosition(this.typeNumber),f=0;f<d.length;f++)for(var h=0;h<d.length;h++){var g=d[f],p=d[h];if(this.modules[g][p]==null)for(var y=-2;y<=2;y++)for(var _=-2;_<=2;_++)y==-2||y==2||_==-2||_==2||y==0&&_==0?this.modules[g+y][p+_]=!0:this.modules[g+y][p+_]=!1}},u.setupTypeNumber=function(d){for(var f=a.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=g}for(var h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=g}},u.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,g=a.getBCHTypeInfo(h),p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!d},u.mapData=function(d,f){for(var h=-1,g=this.moduleCount-1,p=7,y=0,_=this.moduleCount-1;_>0;_-=2)for(_==6&&_--;;){for(var S=0;S<2;S++)if(this.modules[g][_-S]==null){var w=!1;y<d.length&&(w=(d[y]>>>p&1)==1);var T=a.getMask(f,g,_-S);T&&(w=!w),this.modules[g][_-S]=w,p--,p==-1&&(y++,p=7)}if(g+=h,g<0||this.moduleCount<=g){g-=h,h=-h;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(d,f,h){for(var g=t.getRSBlocks(d,f),p=new n,y=0;y<h.length;y++){var _=h[y];p.put(_.mode,4),p.put(_.getLength(),a.getLengthInBits(_.mode,d)),_.write(p)}for(var S=0,y=0;y<g.length;y++)S+=g[y].dataCount;if(p.getLengthInBits()>S*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+S*8+")");for(p.getLengthInBits()+4<=S*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=S*8||(p.put(l.PAD0,8),p.getLengthInBits()>=S*8));)p.put(l.PAD1,8);return l.createBytes(p,g)},l.createBytes=function(d,f){for(var h=0,g=0,p=0,y=new Array(f.length),_=new Array(f.length),S=0;S<f.length;S++){var w=f[S].dataCount,T=f[S].totalCount-w;g=Math.max(g,w),p=Math.max(p,T),y[S]=new Array(w);for(var R=0;R<y[S].length;R++)y[S][R]=255&d.buffer[R+h];h+=w;var A=a.getErrorCorrectPolynomial(T),C=new o(y[S],A.getLength()-1),O=C.mod(A);_[S]=new Array(A.getLength()-1);for(var R=0;R<_[S].length;R++){var I=R+O.getLength()-_[S].length;_[S][R]=I>=0?O.get(I):0}}for(var L=0,R=0;R<f.length;R++)L+=f[R].totalCount;for(var N=new Array(L),D=0,R=0;R<g;R++)for(var S=0;S<f.length;S++)R<y[S].length&&(N[D++]=y[S][R]);for(var R=0;R<p;R++)for(var S=0;S<f.length;S++)R<_[S].length&&(N[D++]=_[S][R]);return N},pg=l,pg}var wd={},aw;function Y9(){if(aw)return wd;aw=1,Object.defineProperty(wd,"__esModule",{value:!0});var e=Object.assign||function(h){for(var g=1;g<arguments.length;g++){var p=arguments[g];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},t=b0(),n=l(t),a=$i(),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function u(h,g){var p={};for(var y in h)g.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var d={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},f=(0,a.forwardRef)(function(h,g){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,w=h.size,T=h.title,R=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,O=u(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return o.default.createElement("svg",e({},O,{height:w,ref:g,viewBox:"0 0 "+R+" "+R,width:w,xmlns:C}),T?o.default.createElement("title",null,T):null,o.default.createElement("path",{d:y,fill:p}),o.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,wd.default=f,wd}var iw;function K9(){if(iw)return As;iw=1,Object.defineProperty(As,"__esModule",{value:!0}),As.QRCode=void 0;var e=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var R=arguments[T];for(var A in R)Object.prototype.hasOwnProperty.call(R,A)&&(w[A]=R[A])}return w},t=b0(),n=p(t),a=PO(),o=p(a),l=q9(),u=p(l),d=$i(),f=p(d),h=Y9(),g=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,T){var R={};for(var A in w)T.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(w,A)&&(R[A]=w[A]);return R}var _={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},S=(0,d.forwardRef)(function(w,T){var R=w.bgColor,A=R===void 0?"#FFFFFF":R,C=w.fgColor,O=C===void 0?"#000000":C,I=w.level,L=I===void 0?"L":I,N=w.size,D=N===void 0?256:N,U=w.value,Q=y(w,["bgColor","fgColor","level","size","value"]),G=new u.default(-1,o.default[L]);G.addData(U),G.make();var W=G.modules;return f.default.createElement(g.default,e({},Q,{bgColor:A,bgD:W.map(function(j,ne){return j.map(function(ie,P){return ie?"":"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:W.map(function(j,ne){return j.map(function(ie,P){return ie?"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:D,viewBoxSize:W.length}))});return As.QRCode=S,S.displayName="QRCode",S.propTypes=_,As.default=S,As}var W9=K9();const Z9=No(W9);var Q9="Separator",ow="horizontal",X9=["horizontal","vertical"],BO=E.forwardRef((e,t)=>{const{decorative:n,orientation:a=ow,...o}=e,l=J9(a)?a:ow,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Pc.div,{"data-orientation":l,...d,...o,ref:t})});BO.displayName=Q9;function J9(e){return X9.includes(e)}var eU=BO;function tU(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:a},basePath:o,viewPaths:l,replace:u}=E.useContext(Ze),{data:d,isPending:f,error:h,refetch:g}=a(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;u(`${o}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,o,l,u,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:g}}function Io({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:de("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function $f({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:de("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function _0({className:e,...t}){return b.jsx("div",{"data-slot":"card-title",className:de("leading-none font-semibold",e),...t})}function Gf({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:de("text-muted-foreground text-sm",e),...t})}function qf({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:de("px-6",e),...t})}function lv({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:de("flex items-center px-6 [.border-t]:pt-6",e),...t})}function vr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:de("bg-accent animate-pulse rounded-md",e),...t})}var nU=oD("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ot({className:e,variant:t,size:n,asChild:a=!1,...o}){const l=a?Hx:"button";return b.jsx(l,{"data-slot":"button",className:de(nU({variant:t,size:n,className:e})),...o})}function rU({classNames:e,actionLabel:t,disabled:n,isSubmitting:a,variant:o,onClick:l,...u}){return l||(a=Bv().isSubmitting),b.jsxs(Ot,{className:de("md:ms-auto",e?.button,o==="default"&&e?.primaryButton,o==="destructive"&&e?.destructiveButton),disabled:a||n,size:"sm",type:l?"button":"submit",variant:o,onClick:l,...u,children:[a&&b.jsx(_n,{className:"animate-spin"}),t]})}function aU({className:e,classNames:t,actionLabel:n,disabled:a,instructions:o,isPending:l,isSubmitting:u,variant:d,action:f}){return b.jsx(lv,{className:de("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||o)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[o&&b.jsx(vr,{className:de("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(vr,{className:de("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[o&&b.jsx(Gf,{className:de("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:o}),n&&b.jsx(rU,{classNames:t,actionLabel:n,disabled:a,isSubmitting:u,variant:d,onClick:f})]})})}function iU({className:e,classNames:t,description:n,isPending:a,title:o}){return b.jsx($f,{className:de(t?.header,e),children:a?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:de("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(vr,{className:de("mt-1.5 mb-0.5 h-3 w-2/3 md:h-3.5",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:o}),n&&b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:n})]})})}function oU({children:e,className:t,classNames:n,title:a,description:o,instructions:l,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,optimistic:g,variant:p,action:y,..._}){return b.jsxs(Io,{className:de("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(iU,{classNames:n,description:o,isPending:f,title:a}),e,b.jsx(aU,{classNames:n,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:g,variant:p,action:y})]})}async function sU(e,t,n,a){const o=await lU(e),l=document.createElement("canvas");l.width=l.height=n;const u=l.getContext("2d"),d=Math.min(o.width,o.height),f=(o.width-d)/2,h=(o.height-d)/2,g=d,p=d;u?.drawImage(o,f,h,g,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${a}`));return new File([y],`${t}.${a}`,{type:`image/${a}`})}async function lU(e){return new Promise((t,n)=>{const a=new Image,o=new FileReader;o.onload=l=>{var u;a.src=(u=l.target)==null?void 0:u.result},a.onload=()=>t(a),a.onerror=l=>n(l),o.readAsDataURL(e)})}async function cU(e){return new Promise((t,n)=>{const a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=n,a.readAsDataURL(e)})}function zO({...e}){return b.jsx(F7,{"data-slot":"dropdown-menu",...e})}function VO({...e}){return b.jsx(H7,{"data-slot":"dropdown-menu-trigger",...e})}function FO({className:e,sideOffset:t=4,...n}){return b.jsx($7,{children:b.jsx(G7,{"data-slot":"dropdown-menu-content",sideOffset:t,className:de("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Ef({className:e,inset:t,variant:n="default",...a}){return b.jsx(q7,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:de("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function HO({className:e,...t}){return b.jsx(W7,{"data-slot":"label",className:de("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var wa=PN,$O=E.createContext({}),Gt=({...e})=>b.jsx($O.Provider,{value:{name:e.name},children:b.jsx(UN,{...e})}),E0=()=>{const e=E.useContext($O),t=E.useContext(GO),{getFieldState:n}=Cf(),a=Bv({name:e.name}),o=n(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...o}},GO=E.createContext({});function qt({className:e,...t}){const n=E.useId();return b.jsx(GO.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:de("grid gap-2",e),...t})})}function Yt({className:e,...t}){const{error:n,formItemId:a}=E0();return b.jsx(HO,{"data-slot":"form-label","data-error":!!n,className:de("data-[error=true]:text-destructive",e),htmlFor:a,...t})}function an({...e}){const{error:t,formItemId:n,formDescriptionId:a,formMessageId:o}=E0();return b.jsx(Hx,{"data-slot":"form-control",id:n,"aria-describedby":t?`${a} ${o}`:`${a}`,"aria-invalid":!!t,...e})}function fn({className:e,...t}){const{error:n,formMessageId:a}=E0(),o=n?String(n?.message??""):t.children;return o?b.jsx("p",{"data-slot":"form-message",id:a,className:de("text-destructive text-sm",e),...t,children:o}):null}function Zr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:de("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function qO({className:e,...t}){return b.jsx(ak,{"data-slot":"avatar",className:de("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function YO({className:e,...t}){return b.jsx(ik,{"data-slot":"avatar-image",className:de("aspect-square size-full",e),...t})}function KO({className:e,...t}){return b.jsx(ok,{"data-slot":"avatar-fallback",className:de("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function uU({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l,...u}){const{localization:d,avatar:f}=E.useContext(Ze),h=E.useMemo(()=>({...d,...l}),[d,l]),g=o?.name,p=o?.logo;return n?b.jsx(vr,{className:de("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(qO,{className:de("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[f?.Image?b.jsx(f.Image,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(YO,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx(KO,{className:de("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(lN,{className:de("size-[50%]",t?.fallbackIcon)})})]})}function WO({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l}){const{localization:u}=E.useContext(Ze),d={...u,...l};return b.jsxs("div",{className:de("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(uU,{className:de(a!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:o,size:a}),b.jsx("div",{className:de("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:de("max-w-full",a==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),a!=="sm"&&b.jsx(vr,{className:de("mt-1.5 max-w-full",a==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:de("truncate font-semibold",a==="lg"?"text-base":"text-sm",t?.title),children:o?.name||d?.ORGANIZATION}),a!=="sm"&&o?.slug&&b.jsx("span",{className:de("truncate opacity-70",a==="lg"?"text-sm":"text-xs",t?.subtitle),children:o.slug})]})})]})}function dU(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),o=new TextEncoder().encode(n),l=dk(_k(o)),u=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${u}`;const f=new URLSearchParams;t?.size&&f.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&f.append("d",t.d),t?.forceDefault&&f.append("f","y");const h=f.toString();return h&&(d+=`?${h}`),d}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function ZO({className:e,classNames:t,isPending:n,size:a,user:o,localization:l,...u}){const{localization:d,gravatar:f,avatar:h}=E.useContext(Ze),g={...d,...l},p=o?.displayName||o?.name||o?.fullName||o?.firstName||o?.displayUsername||o?.username||o?.email,y=o?.image||o?.avatar||o?.avatarUrl,_=f&&o?.email?dU(o.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(vr,{className:de("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(qO,{className:de("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[h?.Image?b.jsx(h.Image,{alt:p||g?.USER,className:t?.image,src:S||""}):b.jsx(YO,{alt:p||g?.USER,className:t?.image,src:S||void 0}),b.jsx(KO,{className:de("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:fU(p)||b.jsx(IN,{className:de("size-[50%]",t?.fallbackIcon)})})]})}var fU=e=>e?.slice(0,2);function Dz({className:e,classNames:t,localization:n,...a}){const{hooks:{useListUserInvitations:o,useListOrganizations:l},localization:u}=E.useContext(Ze),d=E.useMemo(()=>({...u,...n}),[u,n]),{data:f,refetch:h}=o(),{refetch:g}=l(),p=async()=>{await h?.(),await g?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(oU,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...a,children:b.jsx(qf,{className:de("grid gap-4",t?.content),children:y.map(_=>b.jsx(hU,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function hU({classNames:e,invitation:t,onChanged:n}){const{authClient:a,organization:o,localization:l,toast:u,localizeErrors:d}=E.useContext(Ze),f=l,{lang:h}=Iv(),[g,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...o?.customRoles||[]].find(R=>R.role===t.role),w=async()=>{p(!0);try{await a.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_ACCEPTED})}catch(R){u({variant:"error",message:Ut({error:R,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await a.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_REJECTED})}catch(R){u({variant:"error",message:Ut({error:R,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(Io,{className:de("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(ZO,{className:"my-0.5",user:{email:t.email},localization:f}),b.jsxs("div",{className:"grid flex-1 text-left leading-tight",children:[b.jsx("span",{className:"truncate font-semibold text-sm",children:t.email}),b.jsxs("span",{className:"truncate text-muted-foreground text-xs",children:[f.EXPIRES," ",t.expiresAt.toLocaleDateString(h??"en")]})]})]}),b.jsx("span",{className:"truncate text-sm opacity-70",children:S?.label}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsxs(zO,{children:[b.jsx(VO,{asChild:!0,children:b.jsx(Ot,{className:de("relative ms-auto",e?.button,e?.outlineButton),disabled:g,size:"icon",type:"button",variant:"outline",children:g?b.jsx(_n,{className:"animate-spin"}):b.jsx(hN,{className:e?.icon})})}),b.jsxs(FO,{onCloseAutoFocus:R=>R.preventDefault(),children:[b.jsxs(Ef,{onClick:w,disabled:g,children:[b.jsx(Dv,{className:e?.icon}),f.ACCEPT]}),b.jsxs(Ef,{onClick:T,disabled:g,variant:"destructive",children:[b.jsx(Mx,{className:e?.icon}),f.REJECT]})]})]})})]})}function S0({className:e,...t}){return b.jsx(Z2,{"data-slot":"checkbox",className:de("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(X2,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Dv,{className:"size-3.5"})})})}function pU({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:de("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var mU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),gU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),vU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),yU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),b.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),bU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),_U=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),b.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),b.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),b.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),b.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),EU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),b.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),b.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),b.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),SU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),wU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),xU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),RU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),b.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),OU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),b.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),b.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),b.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),TU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),AU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),b.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),CU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),MU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),IU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),NU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),b.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),b.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),DU=({className:e})=>b.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[b.jsx("style",{type:"text/css",children:`
|
|
93
|
+
.st0{fill:#FFFFFF}
|
|
94
|
+
.st1{fill:#9146FF}
|
|
95
|
+
`}),b.jsx("title",{children:"Asset 2"}),b.jsxs("g",{children:[b.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),b.jsx("g",{children:b.jsxs("g",{children:[b.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),LU=({className:e})=>b.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:b.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),PU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),kU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),jU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:b.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),UU=[{provider:"apple",name:"Apple",icon:mU},{provider:"discord",name:"Discord",icon:gU},{provider:"dropbox",name:"Dropbox",icon:vU},{provider:"facebook",name:"Facebook",icon:yU},{provider:"github",name:"GitHub",icon:bU},{provider:"gitlab",name:"GitLab",icon:_U},{provider:"google",name:"Google",icon:EU},{provider:"huggingface",name:"Hugging Face",icon:SU},{provider:"kick",name:"Kick",icon:wU},{provider:"linear",name:"Linear",icon:xU},{provider:"linkedin",name:"LinkedIn",icon:RU},{provider:"microsoft",name:"Microsoft",icon:OU},{provider:"notion",name:"Notion",icon:TU},{provider:"reddit",name:"Reddit",icon:AU},{provider:"roblox",name:"Roblox",icon:CU},{provider:"slack",name:"Slack",icon:MU},{provider:"spotify",name:"Spotify",icon:IU},{provider:"tiktok",name:"TikTok",icon:NU},{provider:"twitch",name:"Twitch",icon:DU},{provider:"vercel",name:"Vercel",icon:LU},{provider:"vk",name:"VK",icon:PU},{provider:"twitter",name:"X",icon:kU},{provider:"zoom",name:"Zoom",icon:jU}];function xc({className:e,enableToggle:t,onChange:n,...a}){const[o,l]=E.useState(!0),[u,d]=E.useState(!1);return b.jsxs("div",{className:"relative",children:[b.jsx(Zr,{className:de(t&&"pr-10",e),...a,type:u&&t?"text":"password",onChange:f=>{l(!f.target.value),n?.(f)}}),t&&b.jsxs(b.Fragment,{children:[b.jsx(Ot,{className:"!bg-transparent absolute top-0 right-0",disabled:o,size:"icon",type:"button",variant:"ghost",onClick:()=>d(!u),children:u?b.jsx(vN,{}):b.jsx(mN,{})}),b.jsx("style",{children:`
|
|
96
|
+
.hide-password-toggle::-ms-reveal,
|
|
97
|
+
.hide-password-toggle::-ms-clear {
|
|
98
|
+
visibility: hidden;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
`})]})]})}Ww({plugins:[dM(),pM(),Fk(),mM({clientId:""}),hM(),uM(),yM(),rx(),fM(),lM(),ax({})]});function xa({redirectTo:e}){const{redirectTo:t}=E.useContext(Ze),n=E.useCallback(()=>e||Do("redirectTo")||t,[e,t]),[a,o]=E.useState(!1),{navigate:l,hooks:{useSession:u},onSessionChange:d}=E.useContext(Ze),{refetch:f}=u();return{onSuccess:E.useCallback(async()=>{o(!0),await f?.(),d&&await d(),o(!1),l(n())},[f,d,l,n]),isPending:a}}function QO({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(Ze),a=t?.(),o=E.useRef(!1),{onSuccess:l}=xa({redirectTo:e});return E.useEffect(()=>{if(!o.current){if(!n){o.current=!0,l();return}a||(o.current=!0,l())}},[a,n,l]),b.jsx(_n,{className:"animate-spin"})}var BU=["/sign-up/email","/sign-in/email","/forget-password"],zU=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\/([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function jc({localization:e}){const{captcha:t,localization:n}=E.useContext(Ze);e={...n,...e};const a=E.useRef(null),{executeRecaptcha:o}=Rx(),l=async f=>{if(!t)throw new Error(e.MISSING_RESPONSE);let h;switch(t.provider){case"google-recaptcha-v3":{const g=zU(f);h=await o?.(g);break}case"google-recaptcha-v2-checkbox":{h=a.current.getValue();break}case"google-recaptcha-v2-invisible":{h=await a.current.executeAsync();break}case"cloudflare-turnstile":{h=a.current.getResponse();break}case"hcaptcha":{h=a.current.getResponse();break}case"captchafox":{h=a.current.getResponse();break}}if(!h)throw new Error(e.MISSING_RESPONSE);return h};return{captchaRef:a,getCaptchaHeaders:async f=>{if(!t)return;if((t.endpoints||BU).includes(f))return{"x-captcha-response":await l(f)}},resetCaptcha:()=>{var f,h,g,p,y,_,S,w;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(h=(f=a.current)==null?void 0:f.reset)==null||h.call(f);break}case"cloudflare-turnstile":{(p=(g=a.current)==null?void 0:g.reset)==null||p.call(g);break}case"hcaptcha":{(_=(y=a.current)==null?void 0:y.resetCaptcha)==null||_.call(y);break}case"captchafox":{(w=(S=a.current)==null?void 0:S.reset)==null||w.call(S);break}}}}}function VU({className:e,localization:t}){const n=Xa(),{captcha:a,localization:o}=E.useContext(Ze),l={...o,...t};return a?a.hideBadge?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
103
|
+
.grecaptcha-badge { visibility: hidden; }
|
|
104
|
+
`}),b.jsxs("p",{className:de("text-muted-foreground text-xs",e),children:[l.PROTECTED_BY_RECAPTCHA," ",l.BY_CONTINUING_YOU_AGREE," Google"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:l.PRIVACY_POLICY})," ","&"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:l.TERMS_OF_SERVICE}),"."]})]}):n?b.jsx("style",{children:`
|
|
105
|
+
.grecaptcha-badge { visibility: visible !important; }
|
|
106
|
+
`}):null:null}function FU({ref:e}){const{captcha:t}=E.useContext(Ze),{theme:n}=Nv(),{lang:a}=Iv();return E.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
107
|
+
.grecaptcha-badge {
|
|
108
|
+
border-radius: var(--radius) !important;
|
|
109
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
110
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
111
|
+
border-style: var(--tw-border-style) !important;
|
|
112
|
+
border-width: 1px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dark .grecaptcha-badge {
|
|
116
|
+
border-color: var(--input) !important;
|
|
117
|
+
}
|
|
118
|
+
`}),b.jsx(A9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:de(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var HU=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Ze);if(!a||n&&!(a.endpoints||HU).includes(n))return null;const{theme:o}=Nv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(FU,{ref:e}),u&&b.jsx(VU,{localization:t}),d&&b.jsx(CO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(t9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(bO,{ref:e,sitekey:a.siteKey,theme:o})})]})}function w0({className:e,containerClassName:t,...n}){return b.jsx(LO,{"data-slot":"input-otp",containerClassName:de("flex items-center gap-2 has-disabled:opacity-50",t),className:de("disabled:cursor-not-allowed",e),...n})}function Cs({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:de("flex items-center",e),...t})}function gn({index:e,className:t,...n}){const a=E.useContext(DO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:de("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(xN,{})})}function x0({otpSeparators:e=0}){return e===0?b.jsxs(Cs,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2}),b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(gn,{index:2}),b.jsx(gn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]})}function sw(e){const[t,n]=E.useState();return t?b.jsx(GU,{...e,email:t}):b.jsx($U,{...e,setEmail:n})}function $U({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Xa(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Ze);a={...g,...a};const _=Pn({email:et().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=_a({resolver:Ea(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function w({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),p({variant:"success",message:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:Ut({error:A,localization:a,localizeErrors:y})})}}return b.jsx(wa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:S.control,name:"email",render:({field:T})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Ze);a={...h,...a};const{onSuccess:y,isPending:_}=xa({redirectTo:l}),S=Pn({code:et().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=_a({resolver:Ea(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:Ut({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(wa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:w.control,name:"code",render:({field:R})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function qU({onCancel:e,localization:t,className:n,classNames:a,otpSeparators:o,callbackURL:l,isSubmitting:u,redirectTo:d,setIsSubmitting:f}){const[h,g]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(Ze);t={...S,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:I,isPending:L}=xa({redirectTo:d}),N=Pn({code:et().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=_a({resolver:Ea(N),defaultValues:{code:""}}),U=u||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const W=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(W)}else g(!1)},[p]);async function Q({code:W}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:W,fetchOptions:{throw:!0}});"token"in j&&j.token?await I():(R(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:Ut({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){g(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(W){w({variant:"error",message:Ut({error:W,localization:t,localizeErrors:T})}),g(!1),y(0)}}}return O?b.jsx(wa,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(Q),className:de("grid w-full gap-6",n,a?.base),children:[b.jsx(Gt,{control:D.control,name:"code",render:({field:W})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:a?.label,children:t.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...W,maxLength:6,onChange:j=>{W.onChange(j),j.length===6&&D.handleSubmit(Q)()},containerClassName:a?.otpInputContainer,className:a?.otpInput,disabled:U,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:a?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(Ot,{type:"submit",disabled:U,className:de(a?.button,a?.primaryButton),children:[U&&b.jsx(_n,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(Ot,{type:"button",variant:"outline",onClick:G,disabled:h||U,className:de("w-full",a?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(Ot,{type:"button",variant:"ghost",onClick:e,disabled:U,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:de("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function YU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Xa(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Ze);a={...y,...a};const R=Pn({email:et().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=_a({resolver:Ea(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const I={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:I}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(I){S({variant:"error",message:Ut({error:I,localization:a,localizeErrors:T})}),f()}}return b.jsx(wa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:A.control,name:"email",render:({field:O})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function lw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Ze);o={...w,...o};const O=E.useCallback(()=>l||Do("redirectTo")||T,[l,T]),I=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=Pn({email:et().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),N=_a({resolver:Ea(L),defaultValues:{email:""}});a=a||N.formState.isSubmitting,E.useEffect(()=>{u?.(N.formState.isSubmitting)},[N.formState.isSubmitting,u]);async function D({email:U}){try{const Q={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:U,callbackURL:I(),fetchOptions:Q}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),N.reset()}catch(Q){A({variant:"error",message:Ut({error:Q,localization:o,localizeErrors:C})}),g()}}return b.jsx(wa,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:N.control,name:"email",render:({field:U})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...U})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function KU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Ze);a={...d,...a};const{onSuccess:g,isPending:p}=xa({redirectTo:o}),y=Pn({code:et().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=_a({resolver:Ea(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:Ut({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(wa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:de("grid gap-6",e,t?.base),children:[b.jsx(Gt,{control:_.control,name:"code",render:({field:w})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(an,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function WU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=Pn({newPassword:vc(a,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?vc(a,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):et().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=_a({resolver:Ea(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const I=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:I,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:Ut({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(wa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),_&&b.jsx(Gt,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:R,className:de("w-full",t?.button,t?.primaryButton),children:R?b.jsx(_n,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function ZU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(Ze),I=_?.rememberMe,L=_?.username,N=_?.passwordValidation;a={...S,...a},u={...N,...u};const{onSuccess:D,isPending:U}=xa({redirectTo:o}),Q=Pn({email:L?et().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):et().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Cv().optional()}),G=_a({resolver:Ea(Q),defaultValues:{email:"",password:"",rememberMe:!I}});n=n||G.formState.isSubmitting||U,E.useEffect(()=>{l?.(G.formState.isSubmitting||U)},[G.formState.isSubmitting,U,l]);async function W({email:j,password:ne,rememberMe:ie}){var P;try{let V={};if(L&&!kI(j)){const $={throw:!0,headers:await h("/sign-in/username")};V=await p.signIn.username({username:j,password:ne,rememberMe:ie,fetchOptions:$})}else{const $={throw:!0,headers:await h("/sign-in/email")};V=await p.signIn.email({email:j,password:ne,rememberMe:ie,fetchOptions:$})}V.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await D()}catch(V){G.resetField("password"),g(),R({variant:"error",message:Ut({error:V,localization:a,localizeErrors:C})}),O?.otp&&((P=V?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(wa,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(W),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:G.control,name:"email",render:({field:j})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:L?a.USERNAME:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:G.control,name:"password",render:({field:j})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),I&&b.jsx(Gt,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(Yt,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function QU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Xa(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:I,viewPaths:L,navigate:N,toast:D,avatar:U,localizeErrors:Q,emailVerification:G}=E.useContext(Ze),W=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ie=T?.passwordValidation,P=I?.fields;o={...R,...o},d={...ie,...d};const V=E.useRef(null),[$,re]=E.useState(null),[ve,k]=E.useState(!1),Z=E.useCallback(()=>l||Do("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Z())}`:Z())}`,[n,C,S,L,w,Z]),{onSuccess:oe,isPending:pe}=xa({redirectTo:l}),be={email:et().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:P?.includes("name")&&A?et().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):et().optional(),image:et().optional(),username:j&&ne?et().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):et().optional(),confirmPassword:W?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):et().optional()},ye={};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];if(!Re)continue;let Ue;Re.type==="number"?Ue=Re.required?PI(it=>it?Number(it):void 0,wx({message:`${Re.label} ${o.IS_INVALID}`})):Dm.number({message:`${Re.label} ${o.IS_INVALID}`}).optional():Re.type==="boolean"?Ue=Re.required?Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).refine(it=>it===!0,{message:`${Re.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).optional():Ue=Re.required?et().min(1,`${Re.label} ${o.IS_REQUIRED}`):et().optional(),ye[me]=Ue}const Se=Pn(be).extend(ye).refine(me=>W?me.password===me.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Pe={email:"",password:"",...W&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&U?{image:""}:{}};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];Re&&(Pe[me]=Re.type==="boolean"?!1:"")}const ke=_a({resolver:Ea(Se),defaultValues:Pe});a=a||ke.formState.isSubmitting||pe,E.useEffect(()=>{u?.(ke.formState.isSubmitting||pe)},[ke.formState.isSubmitting,pe,u]);const Ee=async me=>{if(U){k(!0);try{const Re=await sU(me,crypto.randomUUID(),U.size,U.extension);let Ue;U.upload?Ue=await U.upload(Re):Ue=await cU(Re),Ue?(re(Ue),ke.setValue("image",Ue)):(re(null),ke.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:Ut({error:Re,localization:o,localizeErrors:Q})})}k(!1)}},ze=()=>{re(null),ke.setValue("image","")},Pt=()=>{var me;return(me=V.current)==null?void 0:me.click()};async function ge({email:me,password:Re,name:Ue,username:it,confirmPassword:He,image:tt,...B}){try{for(const[he,fe]of Object.entries(B)){const xe=y?.[he];if(xe?.validate&&typeof fe=="string"&&!await xe.validate(fe)){ke.setError(he,{message:`${xe.label} ${o.IS_INVALID}`});return}}const q={throw:!0,headers:await g("/sign-up/email")},Y={};it!==void 0&&(!ne&&(it===null||it===""||typeof it=="string"&&it.trim()==="")||(Y.username=it)),tt!==void 0&&(Y.image=tt);const ce=await _.signUp.email({email:me,password:Re,name:Ue||"",...Y,...B,callbackURL:ee(),fetchOptions:q});"token"in ce&&ce.token?await oe():G?.otp?N(`${S}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(me)}`):(N(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:Ut({error:q,localization:o,localizeErrors:Q})}),ke.resetField("password"),ke.resetField("confirmPassword"),p()}}return b.jsx(wa,{...ke,children:b.jsxs("form",{onSubmit:ke.handleSubmit(ge),noValidate:f,className:de("grid w-full gap-6",e,t?.base),children:[P?.includes("image")&&U&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:V,accept:"image/*",disabled:ve,hidden:!0,type:"file",onChange:me=>{var Re;const Ue=(Re=me.target.files)==null?void 0:Re.item(0);Ue&&Ee(Ue),me.target.value=""}}),b.jsx(Gt,{control:ke.control,name:"image",render:()=>b.jsxs(qt,{children:[b.jsx(Yt,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(zO,{children:[b.jsx(VO,{asChild:!0,children:b.jsx(Ot,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(ZO,{isPending:ve,className:"size-16",user:$?{name:ke.watch("name"),email:ke.watch("email"),image:$}:null,localization:o})})}),b.jsxs(FO,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[b.jsxs(Ef,{onClick:Pt,disabled:ve,children:[b.jsx(dN,{}),o.UPLOAD_AVATAR]}),$&&b.jsxs(Ef,{onClick:ze,disabled:ve,variant:"destructive",children:[b.jsx(CN,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Ot,{type:"button",variant:"outline",onClick:Pt,disabled:ve,children:[ve&&b.jsx(_n,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(fn,{})]})})]}),P?.includes("name")&&b.jsx(Gt,{control:ke.control,name:"name",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),j&&b.jsx(Gt,{control:ke.control,name:"username",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.USERNAME,!ne&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"email",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"password",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),W&&b.jsx(Gt,{control:ke.control,name:"confirmPassword",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),P?.filter(me=>me!=="name"&&me!=="image").map(me=>{const Re=y?.[me];return Re?Re.type==="boolean"?b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:Ue.value,onCheckedChange:Ue.onChange,disabled:a})}),b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(fn,{className:t?.error})]})},me):b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(an,{children:Re.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):Re.multiline?b.jsx(pU,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value})}),b.jsx(fn,{className:t?.error})]})},me):(console.error(`Additional field ${me} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function XU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Xa(),h=f?Do("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze);a={...S,...a};const{onSuccess:O,isPending:I}=xa({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,U]=E.useState(w?.length===1?w[0]:null),[Q,G]=E.useState(!1),[W,j]=E.useState(0),ne=Pn({code:et().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Cv().optional()}),ie=_a({resolver:Ea(ne),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||I,E.useEffect(()=>{u?.(ie.formState.isSubmitting||I)},[ie.formState.isSubmitting,I,u]),E.useEffect(()=>{D==="otp"&&W<=0&&!g.current&&(g.current=!0,P())},[D]),E.useEffect(()=>{if(W<=0)return;const $=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout($)},[W]);const P=async()=>{if(!(Q||W>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch($){R({variant:"error",message:Ut({error:$,localization:a,localizeErrors:C})}),$.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,G(!1)}};async function V({code:$,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:$,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:Ut({error:ve,localization:a,localizeErrors:C})}),ie.reset()}}return b.jsx(wa,{...ie,children:b.jsxs("form",{onSubmit:ie.handleSubmit(V),className:de("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(HO,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Z9,{className:de("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Gt,{control:ie.control,name:"code",render:({field:$})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(an,{children:b.jsx(w0,{...$,maxLength:6,onChange:re=>{$.onChange(re),re.length===6&&ie.handleSubmit(V)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ie.control,name:"trustDevice",render:({field:$})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:$.value,onCheckedChange:$.onChange,disabled:n,className:t?.checkbox})}),b.jsx(Yt,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"outline",onClick:P,disabled:W>0||Q||n,className:de(t?.button,t?.outlineButton),children:[Q?b.jsx(_n,{className:"animate-spin"}):b.jsx(UE,{className:t?.icon}),a.RESEND_CODE,W>0&&` (${W})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("otp"),disabled:n,children:[b.jsx(UE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("totp"),disabled:n,children:[b.jsx(ON,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function XO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Ze),{onSuccess:l}=xa({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(_n,{className:"animate-spin"})}function JU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Ze),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Lg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Lg(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(XO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(QO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(ZU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(XU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(KU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(qU,{className:e,classNames:t,callbackURL:n,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(YU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(WU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(QU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function eB({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Ze),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=tU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Do("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(JO,{className:e,classNames:t}):b.jsx(tB,{className:e,classNames:t,localization:d,invitationId:h})}function tB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),I=E.useCallback(()=>Do("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(I())}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),w(!1)}},Q=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(Io,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center text-center",t?.header),children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Io,{className:de("flex-row items-center p-4"),children:[b.jsx(WO,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:Q})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Ot,{variant:"outline",className:de(t?.button,t?.outlineButton),onClick:N,disabled:A,children:[S?b.jsx(_n,{className:"animate-spin"}):b.jsx(Mx,{}),_.REJECT]}),b.jsxs(Ot,{className:de(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(_n,{className:"animate-spin"}):b.jsx(Dv,{}),_.ACCEPT]})]})]})]}):b.jsx(JO,{className:e,classNames:t})}var JO=({className:e,classNames:t,localization:n})=>b.jsxs(Io,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center",t?.header),children:[b.jsx(vr,{className:de("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:de("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Io,{className:de("flex-row items-center p-4"),children:[b.jsx(WO,{isPending:!0,localization:n}),b.jsx(vr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function cw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(eU,{"data-slot":"separator",decorative:n,orientation:t,className:de("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function nB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Ze);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Ax,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Cx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function rB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Ze);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Ax,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Cx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function aB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Ze),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=xa({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:Ut({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function iB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Ze);n={...f,...n};const{onSuccess:p}=xa({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:Ut({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:Ut({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Ot,{className:de("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(bN,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function uw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:I,toast:L,localizeErrors:N}=E.useContext(Ze),D=E.useCallback(()=>d||Do("redirectTo")||A,[d,A]),U=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Q=async()=>{h(!0);try{if(l){const G={providerId:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};I?.signIn?(await I.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(G)}else{const G={provider:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(G)}}catch(G){L({variant:"error",message:Ut({error:G,localization:o,localizeErrors:N})}),h(!1)}};return b.jsxs(Ot,{className:de(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Q,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Lz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Xa(),{basePath:C,credentials:O,localization:I,magicLink:L,emailOTP:N,oneTap:D,passkey:U,signUp:Q,social:G,genericOAuth:W,viewPaths:j,Link:ne}=E.useContext(Ze);l={...I,...l};let ie=h;ie==="auto"&&(ie=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=u??d?.split("/").pop(),V=g||Lg(j,P)||"SIGN_IN",[$,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),V==="CALLBACK")return b.jsx(QO,{redirectTo:f});if(V==="SIGN_OUT")return b.jsx(XO,{redirectTo:f});if(V==="ACCEPT_INVITATION")return b.jsx(eB,{className:e,classNames:t});const ve=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${V}_DESCRIPTION`];return b.jsxs(Io,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:l[V]}),ve&&b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:de("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(V)&&b.jsx(aB,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(JU,{classNames:t?.form,callbackURL:n,isSubmitting:$,localization:l,otpSeparators:p,view:V,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||N&&V==="EMAIL_OTP")&&b.jsx(rB,{classNames:t,localization:l,view:V,isSubmitting:$}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||L&&["SIGN_IN","MAGIC_LINK"].includes(V))&&b.jsx(nB,{classNames:t,localization:l,view:V,isSubmitting:$})]}),V!=="RESET_PASSWORD"&&V!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=W?.providers)==null?void 0:_.length)||V==="SIGN_IN"&&U)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:de("flex items-center gap-2",t?.continueWith),children:[b.jsx(cw,{className:de("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(cw,{className:de("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=G?.providers)==null?void 0:S.length)||((w=W?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:de("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Z=UU.find(ee=>ee.provider===k);return Z?b.jsx(uw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:Z,redirectTo:f,setIsSubmitting:re,socialLayout:ie},k):null}),(R=W?.providers)==null?void 0:R.map(k=>b.jsx(uw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ie,other:!0},k.provider))]}),U&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(V)&&b.jsx(iB,{classNames:t,isSubmitting:$,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),o&&b.jsx(lv,{className:t?.footer,children:o}),O&&Q&&b.jsxs(lv,{className:de("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:V==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(oN,{className:"size-3"}),V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"||V==="SIGN_UP"?b.jsx(ne,{className:de("text-foreground underline",t?.footerLink),href:`${C}/${j[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),children:V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function Pz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{isPending:n}=t();return n?e:null}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n}=t();return n?e:null}function jz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n,isPending:a}=t();return!n&&!a?e:null}function oB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(J6,{authClient:_M,organization:o,navigate:l,replace:u,Link:sB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function sB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(xv,{to:t,className:n,...o,children:a})}const lB=new KC;function cB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(C6,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(ZC,{client:lB,children:[a,b.jsx(f4,{children:b.jsx(oB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const uB=function(){return null};function dB(){const e=Sf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Bc=P3({component:()=>b.jsxs(cB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(dB,{}),children:b.jsx($w,{})}),b.jsx(uB,{})]})}),fB=An({getParentRoute:()=>Bc,path:"/login",component:Ln(()=>Dn(()=>import("./login-baVguqcM.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Ks(()=>Pn({next:et().optional(),client_id:et().optional(),redirect_uri:et().optional(),response_type:et().optional(),state:et().optional(),scope:et().optional(),code_challenge:et().optional(),code_challenge_method:et().optional()}))}),hB=An({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Ln(()=>Dn(()=>import("./auth-catchall-BXXli3-E.js"),[]))}),Br=An({getParentRoute:()=>Bc,id:"shell",component:Ln(()=>Dn(()=>import("./shell-layout-DxFvs5RE.js"),__vite__mapDeps([4,5,2,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,3,25,26,27,28])))}),pB=An({getParentRoute:()=>Br,path:"/",component:Ln(()=>Dn(()=>import("./home-Dy-_EeTf.js"),__vite__mapDeps([29,18,2,27,7,1,3,22,23,24,25])))}),mB=An({getParentRoute:()=>Br,path:"/$org",component:Ln(()=>Dn(()=>import("./page-D0r-m9VX.js"),__vite__mapDeps([30,6,2,7,8,1,31,32,28,33,19,34,9,35,36,37,38])))}),gB=An({getParentRoute:()=>Br,path:"/$org/members",component:Ln(()=>Dn(()=>import("./members-BL6-e_ID.js"),__vite__mapDeps([39,31,32,1,2,28,8,7,33,40,3,41,42,6,43,14,44,45,13,27,37,23,20,46,5,19,24,16,18])))}),vB=An({getParentRoute:()=>Br,path:"/$org/mcps",component:Ln(()=>Dn(()=>import("./connections-DgVq2Zi4.js"),__vite__mapDeps([47,48,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,49,15,23,37,20,24,14,16,50]))),validateSearch:Ks(()=>Pn({action:Mv(["create"]).optional()}))}),yB=An({getParentRoute:()=>Br,path:"/$org/settings",component:Ln(()=>Dn(()=>import("./settings-DOQRUeGN.js"),__vite__mapDeps([51,31,32,1,2,28,8,7,33,24,3,52])))}),bB=An({getParentRoute:()=>Br,path:"/$org/monitoring",component:Ln(()=>Dn(()=>import("./monitoring-DSGI33MK.js"),__vite__mapDeps([53,6,2,7,8,1,31,32,28,33,40,3,5,19,35,36,37,9,44,34,43,14,54,26]))),validateSearch:Ks(()=>Pn({from:et().default("now-24h"),to:et().default("now"),connectionId:CE(et()).optional().default([]),gatewayId:CE(et()).optional().default([]),tool:et().default(""),status:Mv(["all","success","errors"]).default("all"),search:et().default(""),page:wx().optional(),streaming:Cv().default(!0)}))}),eT=An({getParentRoute:()=>Br,path:"/$org/store",component:Ln(()=>Dn(()=>import("./store-BsHJOv3r.js"),__vite__mapDeps([55,45,31,32,1,2,28,8,7,6,56,40,3,18,57,58,14,17,5,10,11,12,13])))}),_B=An({getParentRoute:()=>eT,path:"/$appName",component:Ln(()=>Dn(()=>import("./store-app-detail-D8K1UJ66.js"),__vite__mapDeps([59,7,2,1,6,8,28,5,60,13,57,32,40,3,41,18,61,37,62,10,11,34,63,64,50,56,58]))),validateSearch:Ks(()=>Pn({registryId:et().optional(),serverName:et().optional(),itemId:et().optional()}))}),EB=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Ln(()=>Dn(()=>import("./connection-detail-B5XIo4jJ.js"),__vite__mapDeps([65,5,2,19,1,6,7,8,10,11,66,67,21,34,61,24,3,14,9,68,64,57,50,36,54,48,60,13,32,28,40,41,18,37,62,49,15,23]))),validateSearch:Ks(()=>Pn({tab:et().optional()}))}),SB=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>Dn(()=>import("./collection-detail-bCm7IhzQ.js"),__vite__mapDeps([69,6,2,7,8,1,42,43,14,40,3,37,25,16,66,67,11,21,5,19,10,34,61,24,9,68,64,57,50,36,54,48,52,63,13,70])))}),wB=An({getParentRoute:()=>Br,path:"/$org/gateways",component:Ln(()=>Dn(()=>import("./gateways-C0TCQRt5.js"),__vite__mapDeps([71,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,9,49,15,23,37]))),validateSearch:Ks(()=>Pn({action:Mv(["create"]).optional()}))}),xB=An({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Ln(()=>Dn(()=>import("./gateway-detail-DrTM5RUx.js"),__vite__mapDeps([72,5,2,19,1,6,7,8,42,43,14,40,3,9,46,24,56,61,68])))}),RB=An({getParentRoute:()=>Bc,path:"/oauth/callback",component:Ln(()=>Dn(()=>import("./oauth-callback-BxWJgxm-.js"),__vite__mapDeps([73,18,2,7,67,11,70])))}),OB=eT.addChildren([_B]),TB=Br.addChildren([pB,mB,gB,vB,wB,xB,bB,OB,yB,EB,SB]),AB=Bc.addChildren([TB,fB,hB,RB]),CB=$3({routeTree:AB}),MB=document.getElementById("root");wC.createRoot(MB).render(b.jsx(E.StrictMode,{children:b.jsx(Y3,{router:CB})}));export{$x as $,Lz as A,yz as B,sz as C,JB as D,QB as E,az as F,oz as G,Wx as H,bz as I,_z as J,fD as K,gD as L,pD as M,kB as N,dz as O,fz as P,cz as Q,uz as R,dB as S,hz as T,pz as U,qx as V,Ws as W,No as X,Nz as Y,Fe as Z,vD as _,_M as a,yP as a$,Xr as a0,WC as a1,u4 as a2,c4 as a3,Dn as a4,Oc as a5,NE as a6,eU as a7,GL as a8,ZL as a9,AR as aA,CP as aB,PB as aC,ox as aD,CE as aE,YB as aF,Cv as aG,ik as aH,ok as aI,ak as aJ,qL as aK,Mx as aL,hn as aM,Ja as aN,Qr as aO,HR as aP,XR as aQ,Ui as aR,gP as aS,Gv as aT,uR as aU,qv as aV,bc as aW,tR as aX,$v as aY,Hv as aZ,vP as a_,Oz as aa,WL as ab,YL as ac,Tz as ad,KL as ae,oD as af,Hx as ag,Ze as ah,bU as ai,Dz as aj,Pz as ak,kz as al,jz as am,cv as an,$w as ao,Pn as ap,et as aq,Ea as ar,_a as as,Cc as at,Bt as au,Ke as av,F as aw,Lo as ax,e2 as ay,MP as az,wv as b,Az as b$,IB as b0,Bw as b1,Tf as b2,$i as b3,Ka as b4,VC as b5,j_ as b6,DB as b7,NB as b8,l4 as b9,TR as bA,Mv as bB,FB as bC,Pc as bD,Ac as bE,KB as bF,zB as bG,VB as bH,$B as bI,wx as bJ,HB as bK,qB as bL,Ks as bM,UB as bN,BB as bO,jB as bP,xz as bQ,Rz as bR,wz as bS,F7 as bT,H7 as bU,$7 as bV,G7 as bW,q7 as bX,Cz as bY,Mz as bZ,Iz as b_,a4 as ba,er as bb,oN as bc,tr as bd,Cn as be,Rc as bf,Tn as bg,vg as bh,hw as bi,QC as bj,e4 as bk,i4 as bl,t4 as bm,n4 as bn,Xn as bo,s4 as bp,U_ as bq,o4 as br,r4 as bs,xv as bt,lI as bu,Z2 as bv,X2 as bw,W7 as bx,Ek as by,VR as bz,Sf as c,PN as c0,UN as c1,Cf as c2,Bv as c3,fc as c4,GC as c5,LC as c6,_n as c7,WB as c8,GB as c9,_e as ca,ZB as cb,Sv as d,iz as e,ez as f,vz as g,lz as h,tz as i,b as j,dD as k,If as l,Mf as m,XB as n,lD as o,gz as p,rz as q,E as r,uD as s,nS as t,LB as u,nz as v,Gx as w,Ez as x,Sz as y,mz as z};
|