@powerhousedao/connect 4.1.0-dev.106 → 4.1.0-dev.108
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/assets/AddDriveModal-7r-BM-yT.js +1 -0
- package/dist/assets/ClearStorageModal-9gL_vLgY.js +1 -0
- package/dist/assets/CookiesPolicyModal-BdPCCPNX.js +1 -0
- package/dist/assets/CreateDocumentModal-C09c_nGK.js +1 -0
- package/dist/assets/DebugSettingsModal-BkU8bK-I.js +1 -0
- package/dist/assets/DeleteDriveModal-Ctt3VSe4.js +1 -0
- package/dist/assets/DeleteItemModal-DZLHSQPf.js +1 -0
- package/dist/assets/DisclaimerModal-BTFCt2N-.js +1 -0
- package/dist/assets/DriveSettingsModal-B18X9rkK.js +1 -0
- package/dist/assets/ExportDocumentWithErrorsModal-B_tnIZE0.js +1 -0
- package/dist/assets/SettingsModal-BDHjn5Ac.js +1 -0
- package/dist/assets/UpgradeDriveModal-kyIQAIjP.js +1 -0
- package/dist/assets/common-8r_LaZs4.css +1 -0
- package/dist/assets/common-n2B-GsjO.js +1 -0
- package/dist/assets/config-CU-aFfVJ.js +1 -0
- package/dist/assets/design_system-CZfmC8Ij.js +45 -0
- package/dist/assets/design_system_connect-DHQbQvgv.js +53 -0
- package/dist/assets/document_drive-CP6paqKN.js +305 -0
- package/dist/assets/document_engineering-DojqH50p.js +1 -0
- package/dist/assets/document_model-DLxR7ZLO.js +230 -0
- package/dist/assets/document_model_editor-ButtI7kP.js +2 -0
- package/dist/assets/drive_explorer-IB_BS5Au.js +2 -0
- package/dist/assets/editor-CgH7LMsL.js +105 -0
- package/dist/assets/editor-ClAkqmdQ.js +1 -0
- package/dist/assets/graphql-BS4Brs_E.js +75 -0
- package/dist/assets/graphql_request-9RNJ00DB.js +3 -0
- package/dist/assets/hmr-LMNkvzP7.js +1 -0
- package/dist/assets/index-BAlx9zX9.js +18 -0
- package/dist/assets/index-Br7E7qjt.css +1 -0
- package/dist/assets/reactor_browser-BbZdm6Aa.js +25 -0
- package/dist/assets/sentry_browser-BFJlXALZ.js +498 -0
- package/dist/assets/sentry_react-C4W8xEsl.js +3 -0
- package/dist/assets/virtual_ph_external-packages-CM1tCR4L.js +1 -0
- package/dist/assets/zod-C6yxFxyo.js +1 -0
- package/dist/index.html +17 -2
- package/heroku/config/nginx.conf.template +7 -18
- package/lib/package.copy.json +27 -57
- package/lib/src/components/analytics.js +1 -1
- package/lib/src/components/analytics.js.map +1 -1
- package/lib/src/components/app-loader.d.ts +1 -1
- package/lib/src/components/app-loader.d.ts.map +1 -1
- package/lib/src/components/app-loader.js +2 -5
- package/lib/src/components/app-loader.js.map +1 -1
- package/lib/src/components/app-skeleton.d.ts.map +1 -1
- package/lib/src/components/app-skeleton.js +1 -1
- package/lib/src/components/app-skeleton.js.map +1 -1
- package/lib/src/components/app.d.ts.map +1 -1
- package/lib/src/components/app.js +3 -4
- package/lib/src/components/app.js.map +1 -1
- package/lib/src/components/cookie-banner.d.ts.map +1 -1
- package/lib/src/components/cookie-banner.js +3 -4
- package/lib/src/components/cookie-banner.js.map +1 -1
- package/lib/src/components/document-editor-container.js +2 -2
- package/lib/src/components/document-editor-container.js.map +1 -1
- package/lib/src/components/drive-editor-container.js +2 -2
- package/lib/src/components/drive-editor-container.js.map +1 -1
- package/lib/src/components/editor-loader.d.ts +1 -1
- package/lib/src/components/editor-loader.d.ts.map +1 -1
- package/lib/src/components/editor-loader.js +1 -1
- package/lib/src/components/editor-loader.js.map +1 -1
- package/lib/src/components/editors.js +2 -2
- package/lib/src/components/editors.js.map +1 -1
- package/lib/src/components/footer.js +3 -2
- package/lib/src/components/footer.js.map +1 -1
- package/lib/src/components/index.d.ts +1 -2
- package/lib/src/components/index.d.ts.map +1 -1
- package/lib/src/components/index.js +1 -2
- package/lib/src/components/index.js.map +1 -1
- package/lib/src/components/login.js +1 -1
- package/lib/src/components/login.js.map +1 -1
- package/lib/src/components/modal/index.d.ts +17 -1
- package/lib/src/components/modal/index.d.ts.map +1 -1
- package/lib/src/components/modal/index.js +17 -1
- package/lib/src/components/modal/index.js.map +1 -1
- package/lib/src/components/modal/modals/AddDriveModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/AddDriveModal.js +2 -1
- package/lib/src/components/modal/modals/AddDriveModal.js.map +1 -1
- package/lib/src/components/modal/modals/ClearStorageModal.js +2 -2
- package/lib/src/components/modal/modals/ClearStorageModal.js.map +1 -1
- package/lib/src/components/modal/modals/CookiesPolicyModal.js +1 -1
- package/lib/src/components/modal/modals/CookiesPolicyModal.js.map +1 -1
- package/lib/src/components/modal/modals/CreateDocumentModal.js +1 -1
- package/lib/src/components/modal/modals/CreateDocumentModal.js.map +1 -1
- package/lib/src/components/modal/modals/DebugSettingsModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/DebugSettingsModal.js +3 -2
- package/lib/src/components/modal/modals/DebugSettingsModal.js.map +1 -1
- package/lib/src/components/modal/modals/DeleteDriveModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/DeleteDriveModal.js +2 -1
- package/lib/src/components/modal/modals/DeleteDriveModal.js.map +1 -1
- package/lib/src/components/modal/modals/DeleteItemModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/DeleteItemModal.js +2 -1
- package/lib/src/components/modal/modals/DeleteItemModal.js.map +1 -1
- package/lib/src/components/modal/modals/DisclaimerModal.js +1 -1
- package/lib/src/components/modal/modals/DisclaimerModal.js.map +1 -1
- package/lib/src/components/modal/modals/DriveSettingsModal.js +2 -2
- package/lib/src/components/modal/modals/DriveSettingsModal.js.map +1 -1
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js +1 -1
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js.map +1 -1
- package/lib/src/components/modal/modals/SettingsModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/SettingsModal.js +4 -6
- package/lib/src/components/modal/modals/SettingsModal.js.map +1 -1
- package/lib/src/components/modal/modals/UpgradeDriveModal.js +1 -1
- package/lib/src/components/modal/modals/UpgradeDriveModal.js.map +1 -1
- package/lib/src/components/modal/modals/settings/about.js +1 -1
- package/lib/src/components/modal/modals/settings/about.js.map +1 -1
- package/lib/src/components/modal/modals/settings/danger-zone.js +1 -1
- package/lib/src/components/modal/modals/settings/danger-zone.js.map +1 -1
- package/lib/src/components/modal/modals/settings/default-editor.js +1 -1
- package/lib/src/components/modal/modals/settings/default-editor.js.map +1 -1
- package/lib/src/components/modal/modals/settings/package-manager.d.ts +1 -1
- package/lib/src/components/modal/modals/settings/package-manager.d.ts.map +1 -1
- package/lib/src/components/modal/modals/settings/package-manager.js +4 -5
- package/lib/src/components/modal/modals/settings/package-manager.js.map +1 -1
- package/lib/src/components/ph-logo.js +1 -1
- package/lib/src/components/ph-logo.js.map +1 -1
- package/lib/src/components/reload-connect-toast.d.ts.map +1 -0
- package/lib/src/components/reload-connect-toast.js.map +1 -0
- package/lib/src/components/root.js +1 -1
- package/lib/src/components/root.js.map +1 -1
- package/lib/src/components/router.js +1 -1
- package/lib/src/components/router.js.map +1 -1
- package/lib/src/components/search-bar.d.ts.map +1 -1
- package/lib/src/components/search-bar.js +2 -1
- package/lib/src/components/search-bar.js.map +1 -1
- package/lib/src/components/sidebar.d.ts.map +1 -1
- package/lib/src/components/sidebar.js +3 -2
- package/lib/src/components/sidebar.js.map +1 -1
- package/lib/src/context/sentry-provider.js +1 -1
- package/lib/src/context/sentry-provider.js.map +1 -1
- package/lib/src/feature-flags.d.ts.map +1 -0
- package/lib/src/feature-flags.js.map +1 -0
- package/lib/src/globals.d.ts +1 -1
- package/lib/src/globals.d.ts.map +1 -1
- package/lib/src/hooks/useCheckLatestVersion.js +3 -3
- package/lib/src/hooks/useCheckLatestVersion.js.map +1 -1
- package/lib/src/index.d.ts +1 -8
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -8
- package/lib/src/index.js.map +1 -1
- package/lib/src/main.js +1 -1
- package/lib/src/main.js.map +1 -1
- package/lib/src/pages/content.d.ts.map +1 -1
- package/lib/src/pages/content.js +2 -3
- package/lib/src/pages/content.js.map +1 -1
- package/lib/src/pages/index.d.ts +2 -1
- package/lib/src/pages/index.d.ts.map +1 -1
- package/lib/src/pages/index.js +2 -1
- package/lib/src/pages/index.js.map +1 -1
- package/lib/src/services/index.d.ts +6 -2
- package/lib/src/services/index.d.ts.map +1 -1
- package/lib/src/services/index.js +5 -2
- package/lib/src/services/index.js.map +1 -1
- package/lib/src/services/toast.d.ts +2 -2
- package/lib/src/services/toast.d.ts.map +1 -1
- package/lib/src/services/toast.js +1 -1
- package/lib/src/services/toast.js.map +1 -1
- package/lib/src/store/document-model.d.ts.map +1 -1
- package/lib/src/store/document-model.js +3 -3
- package/lib/src/store/document-model.js.map +1 -1
- package/lib/src/store/editor.d.ts +2 -2
- package/lib/src/store/editor.d.ts.map +1 -1
- package/lib/src/store/editor.js +6 -6
- package/lib/src/store/editor.js.map +1 -1
- package/lib/src/store/reactor.d.ts.map +1 -1
- package/lib/src/store/reactor.js +6 -21
- package/lib/src/store/reactor.js.map +1 -1
- package/lib/src/utils/drive-sections.d.ts +1 -1
- package/lib/src/utils/drive-sections.d.ts.map +1 -1
- package/lib/src/utils/drive-sections.js +1 -1
- package/lib/src/utils/drive-sections.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/vite.config.d.ts.map +1 -1
- package/lib/vite.config.js +23 -0
- package/lib/vite.config.js.map +1 -1
- package/package.copy.json +27 -57
- package/package.json +34 -64
- package/dist/assets/AddDriveModal-CtZf_obp.js +0 -248
- package/dist/assets/AddDriveModal-CtZf_obp.js.map +0 -1
- package/dist/assets/ClearStorageModal-C2hbvDkF.js +0 -46
- package/dist/assets/ClearStorageModal-C2hbvDkF.js.map +0 -1
- package/dist/assets/CookiesPolicyModal-Cd7uBIEB.js +0 -34
- package/dist/assets/CookiesPolicyModal-Cd7uBIEB.js.map +0 -1
- package/dist/assets/CreateDocumentModal-Dgkc55q6.js +0 -69
- package/dist/assets/CreateDocumentModal-Dgkc55q6.js.map +0 -1
- package/dist/assets/DebugSettingsModal-CPmyP1YW.js +0 -5134
- package/dist/assets/DebugSettingsModal-CPmyP1YW.js.map +0 -1
- package/dist/assets/DeleteDriveModal-apg0MYPC.js +0 -55
- package/dist/assets/DeleteDriveModal-apg0MYPC.js.map +0 -1
- package/dist/assets/DeleteItemModal-D-z5CndZ.js +0 -47
- package/dist/assets/DeleteItemModal-D-z5CndZ.js.map +0 -1
- package/dist/assets/DisclaimerModal-B1Jtt1cj.js +0 -21
- package/dist/assets/DisclaimerModal-B1Jtt1cj.js.map +0 -1
- package/dist/assets/DriveSettingsModal-CnXO-QWT.js +0 -103
- package/dist/assets/DriveSettingsModal-CnXO-QWT.js.map +0 -1
- package/dist/assets/ExportDocumentWithErrorsModal-HI8wR1ha.js +0 -44
- package/dist/assets/ExportDocumentWithErrorsModal-HI8wR1ha.js.map +0 -1
- package/dist/assets/SettingsModal-W6c3EI1V.js +0 -1723
- package/dist/assets/SettingsModal-W6c3EI1V.js.map +0 -1
- package/dist/assets/UpgradeDriveModal-CzMEFvzJ.js +0 -40
- package/dist/assets/UpgradeDriveModal-CzMEFvzJ.js.map +0 -1
- package/dist/assets/ccip-kd0oo78s.js +0 -168
- package/dist/assets/ccip-kd0oo78s.js.map +0 -1
- package/dist/assets/confirmation-modal-BRCSDFfA.js +0 -16
- package/dist/assets/confirmation-modal-BRCSDFfA.js.map +0 -1
- package/dist/assets/disclosure-Cdsd0yEm.js +0 -9
- package/dist/assets/disclosure-Cdsd0yEm.js.map +0 -1
- package/dist/assets/drive-by-id-Dtyl2hjB.js +0 -14
- package/dist/assets/drive-by-id-Dtyl2hjB.js.map +0 -1
- package/dist/assets/dropdown-menu-BJNDsW2h.js +0 -1026
- package/dist/assets/dropdown-menu-BJNDsW2h.js.map +0 -1
- package/dist/assets/editor-BNCF82f5.js +0 -47585
- package/dist/assets/editor-BNCF82f5.js.map +0 -1
- package/dist/assets/editor-DLJCk_iy.js +0 -416
- package/dist/assets/editor-DLJCk_iy.js.map +0 -1
- package/dist/assets/form-input-CPnbINdu.js +0 -11
- package/dist/assets/form-input-CPnbINdu.js.map +0 -1
- package/dist/assets/hmr-DO4QUuY_.js +0 -5
- package/dist/assets/hmr-DO4QUuY_.js.map +0 -1
- package/dist/assets/hoist-non-react-statics.cjs-Dz4HIRQF.js +0 -224
- package/dist/assets/hoist-non-react-statics.cjs-Dz4HIRQF.js.map +0 -1
- package/dist/assets/index-7h14d2-k.js +0 -45
- package/dist/assets/index-7h14d2-k.js.map +0 -1
- package/dist/assets/index-CtewK_c6.js +0 -183
- package/dist/assets/index-CtewK_c6.js.map +0 -1
- package/dist/assets/index-DK-Td17X.js +0 -92921
- package/dist/assets/index-DK-Td17X.js.map +0 -1
- package/dist/assets/index-DOrl22sv.css +0 -6263
- package/dist/assets/index-DXMjnAPx.js +0 -285
- package/dist/assets/index-DXMjnAPx.js.map +0 -1
- package/dist/assets/index-PvEUoqAt.js +0 -25570
- package/dist/assets/index-PvEUoqAt.js.map +0 -1
- package/dist/assets/index.esm-BTzn889G.js +0 -1801
- package/dist/assets/index.esm-BTzn889G.js.map +0 -1
- package/dist/assets/options-Bqnui46O.js +0 -81
- package/dist/assets/options-Bqnui46O.js.map +0 -1
- package/dist/assets/read-required-modal-DyeA1PS1.js +0 -44
- package/dist/assets/read-required-modal-DyeA1PS1.js.map +0 -1
- package/dist/assets/toggle-BeBMssLx.js +0 -33
- package/dist/assets/toggle-BeBMssLx.js.map +0 -1
- package/dist/assets/virtual_ph_external-packages-DawtJ3DU.js +0 -8
- package/dist/assets/virtual_ph_external-packages-DawtJ3DU.js.map +0 -1
- package/lib/feature-flags.d.ts.map +0 -1
- package/lib/feature-flags.js.map +0 -1
- package/lib/src/components/modal/modals/settings/index.d.ts +0 -5
- package/lib/src/components/modal/modals/settings/index.d.ts.map +0 -1
- package/lib/src/components/modal/modals/settings/index.js +0 -5
- package/lib/src/components/modal/modals/settings/index.js.map +0 -1
- package/lib/src/components/toast/index.d.ts +0 -2
- package/lib/src/components/toast/index.d.ts.map +0 -1
- package/lib/src/components/toast/index.js +0 -2
- package/lib/src/components/toast/index.js.map +0 -1
- package/lib/src/components/toast/reload-connect-toast.d.ts.map +0 -1
- package/lib/src/components/toast/reload-connect-toast.js.map +0 -1
- package/lib/src/pages/demo/index.d.ts +0 -2
- package/lib/src/pages/demo/index.d.ts.map +0 -1
- package/lib/src/pages/demo/index.js +0 -2
- package/lib/src/pages/demo/index.js.map +0 -1
- package/lib/src/services/renown/index.d.ts +0 -4
- package/lib/src/services/renown/index.d.ts.map +0 -1
- package/lib/src/services/renown/index.js +0 -4
- package/lib/src/services/renown/index.js.map +0 -1
- package/lib/src/services/storage/index.d.ts +0 -4
- package/lib/src/services/storage/index.d.ts.map +0 -1
- package/lib/src/services/storage/index.js +0 -4
- package/lib/src/services/storage/index.js.map +0 -1
- /package/lib/src/components/{toast/reload-connect-toast.d.ts → reload-connect-toast.d.ts} +0 -0
- /package/lib/src/components/{toast/reload-connect-toast.js → reload-connect-toast.js} +0 -0
- /package/lib/{feature-flags.d.ts → src/feature-flags.d.ts} +0 -0
- /package/lib/{feature-flags.js → src/feature-flags.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import{j as g,u as wh,a as L1,b as U1,c as Hw,s as qw,d as Fs,e as Gw,f as $w,g as Yw,h as Qw,i as Xw,k as Kw,l as Zw,m as Jw,n as Ch,o as Ww,p as eC,q as tC,r as nC,t as I1,v as aC}from"./reactor_browser-BbZdm6Aa.js";import{b as rC,r as S,d as fe,c as pu,g as _1,R as Ay}from"./sentry_react-C4W8xEsl.js";import{p as Xd}from"./sentry_browser-BFJlXALZ.js";import{r as sC,S as iC,c as xe,P as rr,a as Eh,b as cc,u as Ca,d as Oh,R as P1,e as fc,A as Ah,f as tn,g as _o,h as V1,D as B1,C as F1,i as oC,j as H1,I as ae,k as sr,l as lC,m as uC,O as cC,n as fC,o as io,p as dC,q as hC,s as mC,t as pC,F as gC,v as bC,w as yC,x as q1,y as Ot,z as In,M as ir,B as vC,E as xC,G as SC,H as wC,J as CC,K as G1,L as EC,N as OC,Q as AC,T as jC,U as NC,V as MC,W as TC,X as DC}from"./design_system-CZfmC8Ij.js";import{c as Yn,a as de,t as jh}from"./common-n2B-GsjO.js";import{J as RC,K as zC,F as jy,n as kC,s as LC}from"./document_model-DLxR7ZLO.js";import{o as j0,p as UC}from"./document_drive-CP6paqKN.js";import{o as IC,r as Ny,s as qi}from"./zod-C6yxFxyo.js";import{_ as _C}from"./drive_explorer-IB_BS5Au.js";var Kd={exports:{}},Gi={},Zd={exports:{}},Jd={};var My;function PC(){return My||(My=1,(function(e){function n(_,K){var ie=_.length;_.push(K);e:for(;0<ie;){var be=ie-1>>>1,we=_[be];if(0<i(we,K))_[be]=K,_[ie]=we,ie=be;else break e}}function r(_){return _.length===0?null:_[0]}function s(_){if(_.length===0)return null;var K=_[0],ie=_.pop();if(ie!==K){_[0]=ie;e:for(var be=0,we=_.length,De=we>>>1;be<De;){var V=2*(be+1)-1,te=_[V],ne=V+1,se=_[ne];if(0>i(te,ie))ne<we&&0>i(se,te)?(_[be]=se,_[ne]=ie,be=ne):(_[be]=te,_[V]=ie,be=V);else if(ne<we&&0>i(se,ie))_[be]=se,_[ne]=ie,be=ne;else break e}}return K}function i(_,K){var ie=_.sortIndex-K.sortIndex;return ie!==0?ie:_.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],p=[],b=1,y=null,v=3,w=!1,E=!1,C=!1,O=!1,M=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function U(_){for(var K=r(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=_)s(p),K.sortIndex=K.expirationTime,n(h,K);else break;K=r(p)}}function N(_){if(C=!1,U(_),!E)if(r(h)!==null)E=!0,R||(R=!0,J());else{var K=r(p);K!==null&&le(N,K.startTime-_)}}var R=!1,D=-1,I=5,B=-1;function Z(){return O?!0:!(e.unstable_now()-B<I)}function re(){if(O=!1,R){var _=e.unstable_now();B=_;var K=!0;try{e:{E=!1,C&&(C=!1,j(D),D=-1),w=!0;var ie=v;try{t:{for(U(_),y=r(h);y!==null&&!(y.expirationTime>_&&Z());){var be=y.callback;if(typeof be=="function"){y.callback=null,v=y.priorityLevel;var we=be(y.expirationTime<=_);if(_=e.unstable_now(),typeof we=="function"){y.callback=we,U(_),K=!0;break t}y===r(h)&&s(h),U(_)}else s(h);y=r(h)}if(y!==null)K=!0;else{var De=r(p);De!==null&&le(N,De.startTime-_),K=!1}}break e}finally{y=null,v=ie,w=!1}K=void 0}}finally{K?J():R=!1}}}var J;if(typeof T=="function")J=function(){T(re)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,oe=Y.port2;Y.port1.onmessage=re,J=function(){oe.postMessage(null)}}else J=function(){M(re,0)};function le(_,K){D=M(function(){_(e.unstable_now())},K)}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(_){_.callback=null},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(_){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var ie=v;v=K;try{return _()}finally{v=ie}},e.unstable_requestPaint=function(){O=!0},e.unstable_runWithPriority=function(_,K){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var ie=v;v=_;try{return K()}finally{v=ie}},e.unstable_scheduleCallback=function(_,K,ie){var be=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?be+ie:be):ie=be,_){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=ie+we,_={id:b++,callback:K,priorityLevel:_,startTime:ie,expirationTime:we,sortIndex:-1},ie>be?(_.sortIndex=ie,n(p,_),r(h)===null&&_===r(p)&&(C?(j(D),D=-1):C=!0,le(N,ie-be))):(_.sortIndex=we,n(h,_),E||w||(E=!0,R||(R=!0,J()))),_},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(_){var K=v;return function(){var ie=v;v=K;try{return _.apply(this,arguments)}finally{v=ie}}}})(Jd)),Jd}var Ty;function VC(){return Ty||(Ty=1,Zd.exports=PC()),Zd.exports}var Dy;function BC(){if(Dy)return Gi;Dy=1;var e=VC(),n=rC(),r=sC();function s(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function c(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function h(t){if(u(t)!==t)throw Error(s(188))}function p(t){var a=t.alternate;if(!a){if(a=u(t),a===null)throw Error(s(188));return a!==t?null:t}for(var o=t,l=a;;){var d=o.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===o)return h(d),t;if(m===l)return h(d),a;m=m.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=m;else{for(var x=!1,A=d.child;A;){if(A===o){x=!0,o=d,l=m;break}if(A===l){x=!0,l=d,o=m;break}A=A.sibling}if(!x){for(A=m.child;A;){if(A===o){x=!0,o=m,l=d;break}if(A===l){x=!0,l=m,o=d;break}A=A.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:a}function b(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=b(t),a!==null)return a;t=t.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),T=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function J(t){return t===null||typeof t!="object"?null:(t=re&&t[re]||t["@@iterator"],typeof t=="function"?t:null)}var Y=Symbol.for("react.client.reference");function oe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Y?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case M:return"Profiler";case O:return"StrictMode";case N:return"Suspense";case R:return"SuspenseList";case B:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case T:return t.displayName||"Context";case j:return(t._context.displayName||"Context")+".Consumer";case U:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case D:return a=t.displayName||null,a!==null?a:oe(t.type)||"Memo";case I:a=t._payload,t=t._init;try{return oe(t(a))}catch{}}return null}var le=Array.isArray,_=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},be=[],we=-1;function De(t){return{current:t}}function V(t){0>we||(t.current=be[we],be[we]=null,we--)}function te(t,a){we++,be[we]=t.current,t.current=a}var ne=De(null),se=De(null),pe=De(null),he=De(null);function Ae(t,a){switch(te(pe,a),te(se,t),te(ne,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Xb(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Xb(a),t=Kb(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(ne),te(ne,t)}function Te(){V(ne),V(se),V(pe)}function Je(t){t.memoizedState!==null&&te(he,t);var a=ne.current,o=Kb(a,t.type);a!==o&&(te(se,t),te(ne,o))}function _t(t){se.current===t&&(V(ne),V(se)),he.current===t&&(V(he),Vi._currentValue=ie)}var qt,ea;function Pt(t){if(qt===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);qt=a&&a[1]||"",ea=-1<o.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+qt+t+ea}var _n=!1;function ur(t,a){if(!t||_n)return"";_n=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch($){var G=$}Reflect.construct(t,[],ee)}else{try{ee.call()}catch($){G=$}t.call(ee.prototype)}}else{try{throw Error()}catch($){G=$}(ee=t())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch($){if($&&G&&typeof $.stack=="string")return[$.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],A=m[1];if(x&&A){var z=x.split(`
|
|
4
|
+
`),H=A.split(`
|
|
5
|
+
`);for(d=l=0;l<z.length&&!z[l].includes("DetermineComponentFrameRoot");)l++;for(;d<H.length&&!H[d].includes("DetermineComponentFrameRoot");)d++;if(l===z.length||d===H.length)for(l=z.length-1,d=H.length-1;1<=l&&0<=d&&z[l]!==H[d];)d--;for(;1<=l&&0<=d;l--,d--)if(z[l]!==H[d]){if(l!==1||d!==1)do if(l--,d--,0>d||z[l]!==H[d]){var Q=`
|
|
6
|
+
`+z[l].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=l&&0<=d);break}}}finally{_n=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?Pt(o):""}function Js(t,a){switch(t.tag){case 26:case 27:case 5:return Pt(t.type);case 16:return Pt("Lazy");case 13:return t.child!==a&&a!==null?Pt("Suspense Fallback"):Pt("Suspense");case 19:return Pt("SuspenseList");case 0:case 15:return ur(t.type,!1);case 11:return ur(t.type.render,!1);case 1:return ur(t.type,!0);case 31:return Pt("Activity");default:return""}}function wt(t){try{var a="",o=null;do a+=Js(t,o),o=t,t=t.return;while(t);return a}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Gr=Object.prototype.hasOwnProperty,k=e.unstable_scheduleCallback,q=e.unstable_cancelCallback,X=e.unstable_shouldYield,ye=e.unstable_requestPaint,ue=e.unstable_now,ce=e.unstable_getCurrentPriorityLevel,Ce=e.unstable_ImmediatePriority,Pe=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,Gt=e.unstable_LowPriority,cr=e.unstable_IdlePriority,Pn=e.log,kc=e.unstable_setDisableYieldValue,ta=null,At=null;function Vn(t){if(typeof Pn=="function"&&kc(t),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(ta,t)}catch{}}var kt=Math.clz32?Math.clz32:M2,Lc=Math.log,Jo=Math.LN2;function M2(t){return t>>>=0,t===0?32:31-(Lc(t)/Jo|0)|0}var Wo=256,el=262144,tl=4194304;function fr(t){var a=t&42;if(a!==0)return a;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function nl(t,a,o){var l=t.pendingLanes;if(l===0)return 0;var d=0,m=t.suspendedLanes,x=t.pingedLanes;t=t.warmLanes;var A=l&134217727;return A!==0?(l=A&~m,l!==0?d=fr(l):(x&=A,x!==0?d=fr(x):o||(o=A&~t,o!==0&&(d=fr(o))))):(A=l&~m,A!==0?d=fr(A):x!==0?d=fr(x):o||(o=l&~t,o!==0&&(d=fr(o)))),d===0?0:a!==0&&a!==d&&(a&m)===0&&(m=d&-d,o=a&-a,m>=o||m===32&&(o&4194048)!==0)?a:d}function Ws(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function T2(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Tm(){var t=tl;return tl<<=1,(tl&62914560)===0&&(tl=4194304),t}function Uc(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function ei(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function D2(t,a,o,l,d,m){var x=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var A=t.entanglements,z=t.expirationTimes,H=t.hiddenUpdates;for(o=x&~o;0<o;){var Q=31-kt(o),ee=1<<Q;A[Q]=0,z[Q]=-1;var G=H[Q];if(G!==null)for(H[Q]=null,Q=0;Q<G.length;Q++){var $=G[Q];$!==null&&($.lane&=-536870913)}o&=~ee}l!==0&&Dm(t,l,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(x&~a))}function Dm(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var l=31-kt(a);t.entangledLanes|=a,t.entanglements[l]=t.entanglements[l]|1073741824|o&261930}function Rm(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var l=31-kt(o),d=1<<l;d&a|t[l]&a&&(t[l]|=a),o&=~d}}function zm(t,a){var o=a&-a;return o=(o&42)!==0?1:Ic(o),(o&(t.suspendedLanes|a))!==0?0:o}function Ic(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function _c(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function km(){var t=K.p;return t!==0?t:(t=window.event,t===void 0?32:vy(t.type))}function Lm(t,a){var o=K.p;try{return K.p=t,a()}finally{K.p=o}}var Na=Math.random().toString(36).slice(2),jt="__reactFiber$"+Na,$t="__reactProps$"+Na,$r="__reactContainer$"+Na,Pc="__reactEvents$"+Na,R2="__reactListeners$"+Na,z2="__reactHandles$"+Na,Um="__reactResources$"+Na,ti="__reactMarker$"+Na;function Vc(t){delete t[jt],delete t[$t],delete t[Pc],delete t[R2],delete t[z2]}function Yr(t){var a=t[jt];if(a)return a;for(var o=t.parentNode;o;){if(a=o[$r]||o[jt]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=ay(t);t!==null;){if(o=t[jt])return o;t=ay(t)}return a}t=o,o=t.parentNode}return null}function Qr(t){if(t=t[jt]||t[$r]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function ni(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(s(33))}function Xr(t){var a=t[Um];return a||(a=t[Um]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ct(t){t[ti]=!0}var Im=new Set,_m={};function dr(t,a){Kr(t,a),Kr(t+"Capture",a)}function Kr(t,a){for(_m[t]=a,t=0;t<a.length;t++)Im.add(a[t])}var k2=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]*$"),Pm={},Vm={};function L2(t){return Gr.call(Vm,t)?!0:Gr.call(Pm,t)?!1:k2.test(t)?Vm[t]=!0:(Pm[t]=!0,!1)}function al(t,a,o){if(L2(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function rl(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function na(t,a,o,l){if(l===null)t.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+l)}}function bn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Bm(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function U2(t,a,o){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,m=l.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return d.call(this)},set:function(x){o=""+x,m.call(this,x)}}),Object.defineProperty(t,a,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Bc(t){if(!t._valueTracker){var a=Bm(t)?"checked":"value";t._valueTracker=U2(t,a,""+t[a])}}function Fm(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),l="";return t&&(l=Bm(t)?t.checked?"true":"false":t.value),t=l,t!==o?(a.setValue(t),!0):!1}function sl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var I2=/[\n"\\]/g;function yn(t){return t.replace(I2,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Fc(t,a,o,l,d,m,x,A){t.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.type=x:t.removeAttribute("type"),a!=null?x==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+bn(a)):t.value!==""+bn(a)&&(t.value=""+bn(a)):x!=="submit"&&x!=="reset"||t.removeAttribute("value"),a!=null?Hc(t,x,bn(a)):o!=null?Hc(t,x,bn(o)):l!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+bn(A):t.removeAttribute("name")}function Hm(t,a,o,l,d,m,x,A){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||o!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Bc(t);return}o=o!=null?""+bn(o):"",a=a!=null?""+bn(a):o,A||a===t.value||(t.value=a),t.defaultValue=a}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=A?t.checked:!!l,t.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.name=x),Bc(t)}function Hc(t,a,o){a==="number"&&sl(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function Zr(t,a,o,l){if(t=t.options,a){a={};for(var d=0;d<o.length;d++)a["$"+o[d]]=!0;for(o=0;o<t.length;o++)d=a.hasOwnProperty("$"+t[o].value),t[o].selected!==d&&(t[o].selected=d),d&&l&&(t[o].defaultSelected=!0)}else{for(o=""+bn(o),a=null,d=0;d<t.length;d++){if(t[d].value===o){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}a!==null||t[d].disabled||(a=t[d])}a!==null&&(a.selected=!0)}}function qm(t,a,o){if(a!=null&&(a=""+bn(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+bn(o):""}function Gm(t,a,o,l){if(a==null){if(l!=null){if(o!=null)throw Error(s(92));if(le(l)){if(1<l.length)throw Error(s(93));l=l[0]}o=l}o==null&&(o=""),a=o}o=bn(a),t.defaultValue=o,l=t.textContent,l===o&&l!==""&&l!==null&&(t.value=l),Bc(t)}function Jr(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var _2=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 $m(t,a,o){var l=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":l?t.setProperty(a,o):typeof o!="number"||o===0||_2.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function Ym(t,a,o){if(a!=null&&typeof a!="object")throw Error(s(62));if(t=t.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var d in a)l=a[d],a.hasOwnProperty(d)&&o[d]!==l&&$m(t,d,l)}else for(var m in a)a.hasOwnProperty(m)&&$m(t,m,a[m])}function qc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 P2=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"]]),V2=/^[\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 il(t){return V2.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function aa(){}var Gc=null;function $c(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wr=null,es=null;function Qm(t){var a=Qr(t);if(a&&(t=a.stateNode)){var o=t[$t]||null;e:switch(t=a.stateNode,a.type){case"input":if(Fc(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+yn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var l=o[a];if(l!==t&&l.form===t.form){var d=l[$t]||null;if(!d)throw Error(s(90));Fc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(a=0;a<o.length;a++)l=o[a],l.form===t.form&&Fm(l)}break e;case"textarea":qm(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Zr(t,!!o.multiple,a,!1)}}}var Yc=!1;function Xm(t,a,o){if(Yc)return t(a,o);Yc=!0;try{var l=t(a);return l}finally{if(Yc=!1,(Wr!==null||es!==null)&&(Yl(),Wr&&(a=Wr,t=es,es=Wr=null,Qm(a),t)))for(a=0;a<t.length;a++)Qm(t[a])}}function ai(t,a){var o=t.stateNode;if(o===null)return null;var l=o[$t]||null;if(l===null)return null;o=l[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(s(231,a,typeof o));return o}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qc=!1;if(ra)try{var ri={};Object.defineProperty(ri,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",ri,ri),window.removeEventListener("test",ri,ri)}catch{Qc=!1}var Ma=null,Xc=null,ol=null;function Km(){if(ol)return ol;var t,a=Xc,o=a.length,l,d="value"in Ma?Ma.value:Ma.textContent,m=d.length;for(t=0;t<o&&a[t]===d[t];t++);var x=o-t;for(l=1;l<=x&&a[o-l]===d[m-l];l++);return ol=d.slice(t,1<l?1-l:void 0)}function ll(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function ul(){return!0}function Zm(){return!1}function Yt(t){function a(o,l,d,m,x){this._reactName=o,this._targetInst=d,this.type=l,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(o=t[A],this[A]=o?o(m):m[A]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ul:Zm,this.isPropagationStopped=Zm,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ul)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ul)},persist:function(){},isPersistent:ul}),a}var hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=Yt(hr),si=y({},hr,{view:0,detail:0}),B2=Yt(si),Kc,Zc,ii,fl=y({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ii&&(ii&&t.type==="mousemove"?(Kc=t.screenX-ii.screenX,Zc=t.screenY-ii.screenY):Zc=Kc=0,ii=t),Kc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),Jm=Yt(fl),F2=y({},fl,{dataTransfer:0}),H2=Yt(F2),q2=y({},si,{relatedTarget:0}),Jc=Yt(q2),G2=y({},hr,{animationName:0,elapsedTime:0,pseudoElement:0}),$2=Yt(G2),Y2=y({},hr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Q2=Yt(Y2),X2=y({},hr,{data:0}),Wm=Yt(X2),K2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z2={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"},J2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W2(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=J2[t])?!!a[t]:!1}function Wc(){return W2}var eS=y({},si,{key:function(t){if(t.key){var a=K2[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=ll(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Z2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?ll(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ll(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),tS=Yt(eS),nS=y({},fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ep=Yt(nS),aS=y({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),rS=Yt(aS),sS=y({},hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),iS=Yt(sS),oS=y({},fl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lS=Yt(oS),uS=y({},hr,{newState:0,oldState:0}),cS=Yt(uS),fS=[9,13,27,32],ef=ra&&"CompositionEvent"in window,oi=null;ra&&"documentMode"in document&&(oi=document.documentMode);var dS=ra&&"TextEvent"in window&&!oi,tp=ra&&(!ef||oi&&8<oi&&11>=oi),np=" ",ap=!1;function rp(t,a){switch(t){case"keyup":return fS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ts=!1;function hS(t,a){switch(t){case"compositionend":return sp(a);case"keypress":return a.which!==32?null:(ap=!0,np);case"textInput":return t=a.data,t===np&&ap?null:t;default:return null}}function mS(t,a){if(ts)return t==="compositionend"||!ef&&rp(t,a)?(t=Km(),ol=Xc=Ma=null,ts=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return tp&&a.locale!=="ko"?null:a.data;default:return null}}var pS={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 ip(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!pS[t.type]:a==="textarea"}function op(t,a,o,l){Wr?es?es.push(l):es=[l]:Wr=l,a=eu(a,"onChange"),0<a.length&&(o=new cl("onChange","change",null,o,l),t.push({event:o,listeners:a}))}var li=null,ui=null;function gS(t){Hb(t,0)}function dl(t){var a=ni(t);if(Fm(a))return t}function lp(t,a){if(t==="change")return a}var up=!1;if(ra){var tf;if(ra){var nf="oninput"in document;if(!nf){var cp=document.createElement("div");cp.setAttribute("oninput","return;"),nf=typeof cp.oninput=="function"}tf=nf}else tf=!1;up=tf&&(!document.documentMode||9<document.documentMode)}function fp(){li&&(li.detachEvent("onpropertychange",dp),ui=li=null)}function dp(t){if(t.propertyName==="value"&&dl(ui)){var a=[];op(a,ui,t,$c(t)),Xm(gS,a)}}function bS(t,a,o){t==="focusin"?(fp(),li=a,ui=o,li.attachEvent("onpropertychange",dp)):t==="focusout"&&fp()}function yS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return dl(ui)}function vS(t,a){if(t==="click")return dl(a)}function xS(t,a){if(t==="input"||t==="change")return dl(a)}function SS(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var rn=typeof Object.is=="function"?Object.is:SS;function ci(t,a){if(rn(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),l=Object.keys(a);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var d=o[l];if(!Gr.call(a,d)||!rn(t[d],a[d]))return!1}return!0}function hp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mp(t,a){var o=hp(t);t=0;for(var l;o;){if(o.nodeType===3){if(l=t+o.textContent.length,t<=a&&l>=a)return{node:o,offset:a-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=hp(o)}}function pp(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?pp(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function gp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=sl(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=sl(t.document)}return a}function af(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var wS=ra&&"documentMode"in document&&11>=document.documentMode,ns=null,rf=null,fi=null,sf=!1;function bp(t,a,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;sf||ns==null||ns!==sl(l)||(l=ns,"selectionStart"in l&&af(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fi&&ci(fi,l)||(fi=l,l=eu(rf,"onSelect"),0<l.length&&(a=new cl("onSelect","select",null,a,o),t.push({event:a,listeners:l}),a.target=ns)))}function mr(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var as={animationend:mr("Animation","AnimationEnd"),animationiteration:mr("Animation","AnimationIteration"),animationstart:mr("Animation","AnimationStart"),transitionrun:mr("Transition","TransitionRun"),transitionstart:mr("Transition","TransitionStart"),transitioncancel:mr("Transition","TransitionCancel"),transitionend:mr("Transition","TransitionEnd")},of={},yp={};ra&&(yp=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function pr(t){if(of[t])return of[t];if(!as[t])return t;var a=as[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in yp)return of[t]=a[o];return t}var vp=pr("animationend"),xp=pr("animationiteration"),Sp=pr("animationstart"),CS=pr("transitionrun"),ES=pr("transitionstart"),OS=pr("transitioncancel"),wp=pr("transitionend"),Cp=new Map,lf="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(" ");lf.push("scrollEnd");function Tn(t,a){Cp.set(t,a),dr(a,[t])}var hl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof Xd=="object"&&typeof Xd.emit=="function"){Xd.emit("uncaughtException",t);return}console.error(t)},vn=[],rs=0,uf=0;function ml(){for(var t=rs,a=uf=rs=0;a<t;){var o=vn[a];vn[a++]=null;var l=vn[a];vn[a++]=null;var d=vn[a];vn[a++]=null;var m=vn[a];if(vn[a++]=null,l!==null&&d!==null){var x=l.pending;x===null?d.next=d:(d.next=x.next,x.next=d),l.pending=d}m!==0&&Ep(o,d,m)}}function pl(t,a,o,l){vn[rs++]=t,vn[rs++]=a,vn[rs++]=o,vn[rs++]=l,uf|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function cf(t,a,o,l){return pl(t,a,o,l),gl(t)}function gr(t,a){return pl(t,null,null,a),gl(t)}function Ep(t,a,o){t.lanes|=o;var l=t.alternate;l!==null&&(l.lanes|=o);for(var d=!1,m=t.return;m!==null;)m.childLanes|=o,l=m.alternate,l!==null&&(l.childLanes|=o),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&a!==null&&(d=31-kt(o),t=m.hiddenUpdates,l=t[d],l===null?t[d]=[a]:l.push(a),a.lane=o|536870912),m):null}function gl(t){if(50<zi)throw zi=0,vd=null,Error(s(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var ss={};function AS(t,a,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(t,a,o,l){return new AS(t,a,o,l)}function ff(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sa(t,a){var o=t.alternate;return o===null?(o=sn(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function Op(t,a){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function bl(t,a,o,l,d,m){var x=0;if(l=t,typeof t=="function")ff(t)&&(x=1);else if(typeof t=="string")x=Dw(t,o,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case B:return t=sn(31,o,a,d),t.elementType=B,t.lanes=m,t;case C:return br(o.children,d,m,a);case O:x=8,d|=24;break;case M:return t=sn(12,o,a,d|2),t.elementType=M,t.lanes=m,t;case N:return t=sn(13,o,a,d),t.elementType=N,t.lanes=m,t;case R:return t=sn(19,o,a,d),t.elementType=R,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T:x=10;break e;case j:x=9;break e;case U:x=11;break e;case D:x=14;break e;case I:x=16,l=null;break e}x=29,o=Error(s(130,t===null?"null":typeof t,"")),l=null}return a=sn(x,o,a,d),a.elementType=t,a.type=l,a.lanes=m,a}function br(t,a,o,l){return t=sn(7,t,l,a),t.lanes=o,t}function df(t,a,o){return t=sn(6,t,null,a),t.lanes=o,t}function Ap(t){var a=sn(18,null,null,0);return a.stateNode=t,a}function hf(t,a,o){return a=sn(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var jp=new WeakMap;function xn(t,a){if(typeof t=="object"&&t!==null){var o=jp.get(t);return o!==void 0?o:(a={value:t,source:a,stack:wt(a)},jp.set(t,a),a)}return{value:t,source:a,stack:wt(a)}}var is=[],os=0,yl=null,di=0,Sn=[],wn=0,Ta=null,Bn=1,Fn="";function ia(t,a){is[os++]=di,is[os++]=yl,yl=t,di=a}function Np(t,a,o){Sn[wn++]=Bn,Sn[wn++]=Fn,Sn[wn++]=Ta,Ta=t;var l=Bn;t=Fn;var d=32-kt(l)-1;l&=~(1<<d),o+=1;var m=32-kt(a)+d;if(30<m){var x=d-d%5;m=(l&(1<<x)-1).toString(32),l>>=x,d-=x,Bn=1<<32-kt(a)+d|o<<d|l,Fn=m+t}else Bn=1<<m|o<<d|l,Fn=t}function mf(t){t.return!==null&&(ia(t,1),Np(t,1,0))}function pf(t){for(;t===yl;)yl=is[--os],is[os]=null,di=is[--os],is[os]=null;for(;t===Ta;)Ta=Sn[--wn],Sn[wn]=null,Fn=Sn[--wn],Sn[wn]=null,Bn=Sn[--wn],Sn[wn]=null}function Mp(t,a){Sn[wn++]=Bn,Sn[wn++]=Fn,Sn[wn++]=Ta,Bn=a.id,Fn=a.overflow,Ta=t}var Nt=null,at=null,_e=!1,Da=null,Cn=!1,gf=Error(s(519));function Ra(t){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hi(xn(a,t)),gf}function Tp(t){var a=t.stateNode,o=t.type,l=t.memoizedProps;switch(a[jt]=t,a[$t]=l,o){case"dialog":Le("cancel",a),Le("close",a);break;case"iframe":case"object":case"embed":Le("load",a);break;case"video":case"audio":for(o=0;o<Li.length;o++)Le(Li[o],a);break;case"source":Le("error",a);break;case"img":case"image":case"link":Le("error",a),Le("load",a);break;case"details":Le("toggle",a);break;case"input":Le("invalid",a),Hm(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Le("invalid",a);break;case"textarea":Le("invalid",a),Gm(a,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||l.suppressHydrationWarning===!0||Yb(a.textContent,o)?(l.popover!=null&&(Le("beforetoggle",a),Le("toggle",a)),l.onScroll!=null&&Le("scroll",a),l.onScrollEnd!=null&&Le("scrollend",a),l.onClick!=null&&(a.onclick=aa),a=!0):a=!1,a||Ra(t,!0)}function Dp(t){for(Nt=t.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Nt=Nt.return}}function ls(t){if(t!==Nt)return!1;if(!_e)return Dp(t),_e=!0,!1;var a=t.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||kd(t.type,t.memoizedProps)),o=!o),o&&at&&Ra(t),Dp(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));at=ny(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));at=ny(t)}else a===27?(a=at,$a(t.type)?(t=Pd,Pd=null,at=t):at=a):at=Nt?On(t.stateNode.nextSibling):null;return!0}function yr(){at=Nt=null,_e=!1}function bf(){var t=Da;return t!==null&&(Zt===null?Zt=t:Zt.push.apply(Zt,t),Da=null),t}function hi(t){Da===null?Da=[t]:Da.push(t)}var yf=De(null),vr=null,oa=null;function za(t,a,o){te(yf,a._currentValue),a._currentValue=o}function la(t){t._currentValue=yf.current,V(yf)}function vf(t,a,o){for(;t!==null;){var l=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),t===o)break;t=t.return}}function xf(t,a,o,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var x=d.child;m=m.firstContext;e:for(;m!==null;){var A=m;m=d;for(var z=0;z<a.length;z++)if(A.context===a[z]){m.lanes|=o,A=m.alternate,A!==null&&(A.lanes|=o),vf(m.return,o,t),l||(x=null);break e}m=A.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(s(341));x.lanes|=o,m=x.alternate,m!==null&&(m.lanes|=o),vf(x,o,t),x=null}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===t){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function us(t,a,o,l){t=null;for(var d=a,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(s(387));if(x=x.memoizedProps,x!==null){var A=d.type;rn(d.pendingProps.value,x.value)||(t!==null?t.push(A):t=[A])}}else if(d===he.current){if(x=d.alternate,x===null)throw Error(s(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Vi):t=[Vi])}d=d.return}t!==null&&xf(a,t,o,l),a.flags|=262144}function vl(t){for(t=t.firstContext;t!==null;){if(!rn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function xr(t){vr=t,oa=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Mt(t){return Rp(vr,t)}function xl(t,a){return vr===null&&xr(t),Rp(t,a)}function Rp(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},oa===null){if(t===null)throw Error(s(308));oa=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else oa=oa.next=a;return o}var jS=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,l){t.push(l)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},NS=e.unstable_scheduleCallback,MS=e.unstable_NormalPriority,dt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sf(){return{controller:new jS,data:new Map,refCount:0}}function mi(t){t.refCount--,t.refCount===0&&NS(MS,function(){t.controller.abort()})}var pi=null,wf=0,cs=0,fs=null;function TS(t,a){if(pi===null){var o=pi=[];wf=0,cs=Od(),fs={status:"pending",value:void 0,then:function(l){o.push(l)}}}return wf++,a.then(zp,zp),a}function zp(){if(--wf===0&&pi!==null){fs!==null&&(fs.status="fulfilled");var t=pi;pi=null,cs=0,fs=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function DS(t,a){var o=[],l={status:"pending",value:null,reason:null,then:function(d){o.push(d)}};return t.then(function(){l.status="fulfilled",l.value=a;for(var d=0;d<o.length;d++)(0,o[d])(a)},function(d){for(l.status="rejected",l.reason=d,d=0;d<o.length;d++)(0,o[d])(void 0)}),l}var kp=_.S;_.S=function(t,a){bb=ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&TS(t,a),kp!==null&&kp(t,a)};var Sr=De(null);function Cf(){var t=Sr.current;return t!==null?t:We.pooledCache}function Sl(t,a){a===null?te(Sr,Sr.current):te(Sr,a.pool)}function Lp(){var t=Cf();return t===null?null:{parent:dt._currentValue,pool:t}}var ds=Error(s(460)),Ef=Error(s(474)),wl=Error(s(542)),Cl={then:function(){}};function Up(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ip(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(aa,aa),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Pp(t),t;default:if(typeof a.status=="string")a.then(aa,aa);else{if(t=We,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=a,t.status="pending",t.then(function(l){if(a.status==="pending"){var d=a;d.status="fulfilled",d.value=l}},function(l){if(a.status==="pending"){var d=a;d.status="rejected",d.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Pp(t),t}throw Cr=a,ds}}function wr(t){try{var a=t._init;return a(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Cr=o,ds):o}}var Cr=null;function _p(){if(Cr===null)throw Error(s(459));var t=Cr;return Cr=null,t}function Pp(t){if(t===ds||t===wl)throw Error(s(483))}var hs=null,gi=0;function El(t){var a=gi;return gi+=1,hs===null&&(hs=[]),Ip(hs,t,a)}function bi(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Ol(t,a){throw a.$$typeof===v?Error(s(525)):(t=Object.prototype.toString.call(a),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Vp(t){function a(P,L){if(t){var F=P.deletions;F===null?(P.deletions=[L],P.flags|=16):F.push(L)}}function o(P,L){if(!t)return null;for(;L!==null;)a(P,L),L=L.sibling;return null}function l(P){for(var L=new Map;P!==null;)P.key!==null?L.set(P.key,P):L.set(P.index,P),P=P.sibling;return L}function d(P,L){return P=sa(P,L),P.index=0,P.sibling=null,P}function m(P,L,F){return P.index=F,t?(F=P.alternate,F!==null?(F=F.index,F<L?(P.flags|=67108866,L):F):(P.flags|=67108866,L)):(P.flags|=1048576,L)}function x(P){return t&&P.alternate===null&&(P.flags|=67108866),P}function A(P,L,F,W){return L===null||L.tag!==6?(L=df(F,P.mode,W),L.return=P,L):(L=d(L,F),L.return=P,L)}function z(P,L,F,W){var Ee=F.type;return Ee===C?Q(P,L,F.props.children,W,F.key):L!==null&&(L.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===I&&wr(Ee)===L.type)?(L=d(L,F.props),bi(L,F),L.return=P,L):(L=bl(F.type,F.key,F.props,null,P.mode,W),bi(L,F),L.return=P,L)}function H(P,L,F,W){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=hf(F,P.mode,W),L.return=P,L):(L=d(L,F.children||[]),L.return=P,L)}function Q(P,L,F,W,Ee){return L===null||L.tag!==7?(L=br(F,P.mode,W,Ee),L.return=P,L):(L=d(L,F),L.return=P,L)}function ee(P,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=df(""+L,P.mode,F),L.return=P,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return F=bl(L.type,L.key,L.props,null,P.mode,F),bi(F,L),F.return=P,F;case E:return L=hf(L,P.mode,F),L.return=P,L;case I:return L=wr(L),ee(P,L,F)}if(le(L)||J(L))return L=br(L,P.mode,F,null),L.return=P,L;if(typeof L.then=="function")return ee(P,El(L),F);if(L.$$typeof===T)return ee(P,xl(P,L),F);Ol(P,L)}return null}function G(P,L,F,W){var Ee=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ee!==null?null:A(P,L,""+F,W);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return F.key===Ee?z(P,L,F,W):null;case E:return F.key===Ee?H(P,L,F,W):null;case I:return F=wr(F),G(P,L,F,W)}if(le(F)||J(F))return Ee!==null?null:Q(P,L,F,W,null);if(typeof F.then=="function")return G(P,L,El(F),W);if(F.$$typeof===T)return G(P,L,xl(P,F),W);Ol(P,F)}return null}function $(P,L,F,W,Ee){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return P=P.get(F)||null,A(L,P,""+W,Ee);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case w:return P=P.get(W.key===null?F:W.key)||null,z(L,P,W,Ee);case E:return P=P.get(W.key===null?F:W.key)||null,H(L,P,W,Ee);case I:return W=wr(W),$(P,L,F,W,Ee)}if(le(W)||J(W))return P=P.get(F)||null,Q(L,P,W,Ee,null);if(typeof W.then=="function")return $(P,L,F,El(W),Ee);if(W.$$typeof===T)return $(P,L,F,xl(L,W),Ee);Ol(L,W)}return null}function ve(P,L,F,W){for(var Ee=null,Ve=null,Se=L,ze=L=0,Ie=null;Se!==null&&ze<F.length;ze++){Se.index>ze?(Ie=Se,Se=null):Ie=Se.sibling;var Be=G(P,Se,F[ze],W);if(Be===null){Se===null&&(Se=Ie);break}t&&Se&&Be.alternate===null&&a(P,Se),L=m(Be,L,ze),Ve===null?Ee=Be:Ve.sibling=Be,Ve=Be,Se=Ie}if(ze===F.length)return o(P,Se),_e&&ia(P,ze),Ee;if(Se===null){for(;ze<F.length;ze++)Se=ee(P,F[ze],W),Se!==null&&(L=m(Se,L,ze),Ve===null?Ee=Se:Ve.sibling=Se,Ve=Se);return _e&&ia(P,ze),Ee}for(Se=l(Se);ze<F.length;ze++)Ie=$(Se,P,ze,F[ze],W),Ie!==null&&(t&&Ie.alternate!==null&&Se.delete(Ie.key===null?ze:Ie.key),L=m(Ie,L,ze),Ve===null?Ee=Ie:Ve.sibling=Ie,Ve=Ie);return t&&Se.forEach(function(Za){return a(P,Za)}),_e&&ia(P,ze),Ee}function Ne(P,L,F,W){if(F==null)throw Error(s(151));for(var Ee=null,Ve=null,Se=L,ze=L=0,Ie=null,Be=F.next();Se!==null&&!Be.done;ze++,Be=F.next()){Se.index>ze?(Ie=Se,Se=null):Ie=Se.sibling;var Za=G(P,Se,Be.value,W);if(Za===null){Se===null&&(Se=Ie);break}t&&Se&&Za.alternate===null&&a(P,Se),L=m(Za,L,ze),Ve===null?Ee=Za:Ve.sibling=Za,Ve=Za,Se=Ie}if(Be.done)return o(P,Se),_e&&ia(P,ze),Ee;if(Se===null){for(;!Be.done;ze++,Be=F.next())Be=ee(P,Be.value,W),Be!==null&&(L=m(Be,L,ze),Ve===null?Ee=Be:Ve.sibling=Be,Ve=Be);return _e&&ia(P,ze),Ee}for(Se=l(Se);!Be.done;ze++,Be=F.next())Be=$(Se,P,ze,Be.value,W),Be!==null&&(t&&Be.alternate!==null&&Se.delete(Be.key===null?ze:Be.key),L=m(Be,L,ze),Ve===null?Ee=Be:Ve.sibling=Be,Ve=Be);return t&&Se.forEach(function(Fw){return a(P,Fw)}),_e&&ia(P,ze),Ee}function Ze(P,L,F,W){if(typeof F=="object"&&F!==null&&F.type===C&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case w:e:{for(var Ee=F.key;L!==null;){if(L.key===Ee){if(Ee=F.type,Ee===C){if(L.tag===7){o(P,L.sibling),W=d(L,F.props.children),W.return=P,P=W;break e}}else if(L.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===I&&wr(Ee)===L.type){o(P,L.sibling),W=d(L,F.props),bi(W,F),W.return=P,P=W;break e}o(P,L);break}else a(P,L);L=L.sibling}F.type===C?(W=br(F.props.children,P.mode,W,F.key),W.return=P,P=W):(W=bl(F.type,F.key,F.props,null,P.mode,W),bi(W,F),W.return=P,P=W)}return x(P);case E:e:{for(Ee=F.key;L!==null;){if(L.key===Ee)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){o(P,L.sibling),W=d(L,F.children||[]),W.return=P,P=W;break e}else{o(P,L);break}else a(P,L);L=L.sibling}W=hf(F,P.mode,W),W.return=P,P=W}return x(P);case I:return F=wr(F),Ze(P,L,F,W)}if(le(F))return ve(P,L,F,W);if(J(F)){if(Ee=J(F),typeof Ee!="function")throw Error(s(150));return F=Ee.call(F),Ne(P,L,F,W)}if(typeof F.then=="function")return Ze(P,L,El(F),W);if(F.$$typeof===T)return Ze(P,L,xl(P,F),W);Ol(P,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(o(P,L.sibling),W=d(L,F),W.return=P,P=W):(o(P,L),W=df(F,P.mode,W),W.return=P,P=W),x(P)):o(P,L)}return function(P,L,F,W){try{gi=0;var Ee=Ze(P,L,F,W);return hs=null,Ee}catch(Se){if(Se===ds||Se===wl)throw Se;var Ve=sn(29,Se,null,P.mode);return Ve.lanes=W,Ve.return=P,Ve}finally{}}}var Er=Vp(!0),Bp=Vp(!1),ka=!1;function Of(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Af(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function La(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ua(t,a,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var d=l.pending;return d===null?a.next=a:(a.next=d.next,d.next=a),l.pending=a,a=gl(t),Ep(t,null,o),a}return pl(t,l,a,o),gl(t)}function yi(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,Rm(t,o)}}function jf(t,a){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var x={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};m===null?d=m=x:m=m.next=x,o=o.next}while(o!==null);m===null?d=m=a:m=m.next=a}else d=m=a;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var Nf=!1;function vi(){if(Nf){var t=fs;if(t!==null)throw t}}function xi(t,a,o,l){Nf=!1;var d=t.updateQueue;ka=!1;var m=d.firstBaseUpdate,x=d.lastBaseUpdate,A=d.shared.pending;if(A!==null){d.shared.pending=null;var z=A,H=z.next;z.next=null,x===null?m=H:x.next=H,x=z;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,A=Q.lastBaseUpdate,A!==x&&(A===null?Q.firstBaseUpdate=H:A.next=H,Q.lastBaseUpdate=z))}if(m!==null){var ee=d.baseState;x=0,Q=H=z=null,A=m;do{var G=A.lane&-536870913,$=G!==A.lane;if($?(Ue&G)===G:(l&G)===G){G!==0&&G===cs&&(Nf=!0),Q!==null&&(Q=Q.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ve=t,Ne=A;G=a;var Ze=o;switch(Ne.tag){case 1:if(ve=Ne.payload,typeof ve=="function"){ee=ve.call(Ze,ee,G);break e}ee=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ne.payload,G=typeof ve=="function"?ve.call(Ze,ee,G):ve,G==null)break e;ee=y({},ee,G);break e;case 2:ka=!0}}G=A.callback,G!==null&&(t.flags|=64,$&&(t.flags|=8192),$=d.callbacks,$===null?d.callbacks=[G]:$.push(G))}else $={lane:G,tag:A.tag,payload:A.payload,callback:A.callback,next:null},Q===null?(H=Q=$,z=ee):Q=Q.next=$,x|=G;if(A=A.next,A===null){if(A=d.shared.pending,A===null)break;$=A,A=$.next,$.next=null,d.lastBaseUpdate=$,d.shared.pending=null}}while(!0);Q===null&&(z=ee),d.baseState=z,d.firstBaseUpdate=H,d.lastBaseUpdate=Q,m===null&&(d.shared.lanes=0),Ba|=x,t.lanes=x,t.memoizedState=ee}}function Fp(t,a){if(typeof t!="function")throw Error(s(191,t));t.call(a)}function Hp(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)Fp(o[t],a)}var ms=De(null),Al=De(0);function qp(t,a){t=ba,te(Al,t),te(ms,a),ba=t|a.baseLanes}function Mf(){te(Al,ba),te(ms,ms.current)}function Tf(){ba=Al.current,V(ms),V(Al)}var on=De(null),En=null;function Ia(t){var a=t.alternate;te(ct,ct.current&1),te(on,t),En===null&&(a===null||ms.current!==null||a.memoizedState!==null)&&(En=t)}function Df(t){te(ct,ct.current),te(on,t),En===null&&(En=t)}function Gp(t){t.tag===22?(te(ct,ct.current),te(on,t),En===null&&(En=t)):_a()}function _a(){te(ct,ct.current),te(on,on.current)}function ln(t){V(on),En===t&&(En=null),V(ct)}var ct=De(0);function jl(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Id(o)||_d(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ua=0,Re=null,Xe=null,ht=null,Nl=!1,ps=!1,Or=!1,Ml=0,Si=0,gs=null,RS=0;function it(){throw Error(s(321))}function Rf(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!rn(t[o],a[o]))return!1;return!0}function zf(t,a,o,l,d,m){return ua=m,Re=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,_.H=t===null||t.memoizedState===null?Ng:Qf,Or=!1,m=o(l,d),Or=!1,ps&&(m=Yp(a,o,l,d)),$p(t),m}function $p(t){_.H=Ei;var a=Xe!==null&&Xe.next!==null;if(ua=0,ht=Xe=Re=null,Nl=!1,Si=0,gs=null,a)throw Error(s(300));t===null||mt||(t=t.dependencies,t!==null&&vl(t)&&(mt=!0))}function Yp(t,a,o,l){Re=t;var d=0;do{if(ps&&(gs=null),Si=0,ps=!1,25<=d)throw Error(s(301));if(d+=1,ht=Xe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}_.H=Mg,m=a(o,l)}while(ps);return m}function zS(){var t=_.H,a=t.useState()[0];return a=typeof a.then=="function"?wi(a):a,t=t.useState()[0],(Xe!==null?Xe.memoizedState:null)!==t&&(Re.flags|=1024),a}function kf(){var t=Ml!==0;return Ml=0,t}function Lf(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function Uf(t){if(Nl){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Nl=!1}ua=0,ht=Xe=Re=null,ps=!1,Si=Ml=0,gs=null}function Vt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Re.memoizedState=ht=t:ht=ht.next=t,ht}function ft(){if(Xe===null){var t=Re.alternate;t=t!==null?t.memoizedState:null}else t=Xe.next;var a=ht===null?Re.memoizedState:ht.next;if(a!==null)ht=a,Xe=t;else{if(t===null)throw Re.alternate===null?Error(s(467)):Error(s(310));Xe=t,t={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ht===null?Re.memoizedState=ht=t:ht=ht.next=t}return ht}function Tl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wi(t){var a=Si;return Si+=1,gs===null&&(gs=[]),t=Ip(gs,t,a),a=Re,(ht===null?a.memoizedState:ht.next)===null&&(a=a.alternate,_.H=a===null||a.memoizedState===null?Ng:Qf),t}function Dl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return wi(t);if(t.$$typeof===T)return Mt(t)}throw Error(s(438,String(t)))}function If(t){var a=null,o=Re.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(d){return d.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Tl(),Re.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),l=0;l<t;l++)o[l]=Z;return a.index++,o}function ca(t,a){return typeof a=="function"?a(t):a}function Rl(t){var a=ft();return _f(a,Xe,t)}function _f(t,a,o){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=o;var d=t.baseQueue,m=l.pending;if(m!==null){if(d!==null){var x=d.next;d.next=m.next,m.next=x}a.baseQueue=d=m,l.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{a=d.next;var A=x=null,z=null,H=a,Q=!1;do{var ee=H.lane&-536870913;if(ee!==H.lane?(Ue&ee)===ee:(ua&ee)===ee){var G=H.revertLane;if(G===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),ee===cs&&(Q=!0);else if((ua&G)===G){H=H.next,G===cs&&(Q=!0);continue}else ee={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(A=z=ee,x=m):z=z.next=ee,Re.lanes|=G,Ba|=G;ee=H.action,Or&&o(m,ee),m=H.hasEagerState?H.eagerState:o(m,ee)}else G={lane:ee,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(A=z=G,x=m):z=z.next=G,Re.lanes|=ee,Ba|=ee;H=H.next}while(H!==null&&H!==a);if(z===null?x=m:z.next=A,!rn(m,t.memoizedState)&&(mt=!0,Q&&(o=fs,o!==null)))throw o;t.memoizedState=m,t.baseState=x,t.baseQueue=z,l.lastRenderedState=m}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Pf(t){var a=ft(),o=a.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=o.dispatch,d=o.pending,m=a.memoizedState;if(d!==null){o.pending=null;var x=d=d.next;do m=t(m,x.action),x=x.next;while(x!==d);rn(m,a.memoizedState)||(mt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),o.lastRenderedState=m}return[m,l]}function Qp(t,a,o){var l=Re,d=ft(),m=_e;if(m){if(o===void 0)throw Error(s(407));o=o()}else o=a();var x=!rn((Xe||d).memoizedState,o);if(x&&(d.memoizedState=o,mt=!0),d=d.queue,Ff(Zp.bind(null,l,d,t),[t]),d.getSnapshot!==a||x||ht!==null&&ht.memoizedState.tag&1){if(l.flags|=2048,bs(9,{destroy:void 0},Kp.bind(null,l,d,o,a),null),We===null)throw Error(s(349));m||(ua&127)!==0||Xp(l,a,o)}return o}function Xp(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=Re.updateQueue,a===null?(a=Tl(),Re.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function Kp(t,a,o,l){a.value=o,a.getSnapshot=l,Jp(a)&&Wp(t)}function Zp(t,a,o){return o(function(){Jp(a)&&Wp(t)})}function Jp(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!rn(t,o)}catch{return!0}}function Wp(t){var a=gr(t,2);a!==null&&Jt(a,t,2)}function Vf(t){var a=Vt();if(typeof t=="function"){var o=t;if(t=o(),Or){Vn(!0);try{o()}finally{Vn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:t},a}function eg(t,a,o,l){return t.baseState=o,_f(t,Xe,typeof l=="function"?l:ca)}function kS(t,a,o,l,d){if(Ll(t))throw Error(s(485));if(t=a.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};_.T!==null?o(!0):m.isTransition=!1,l(m),o=a.pending,o===null?(m.next=a.pending=m,tg(a,m)):(m.next=o.next,a.pending=o.next=m)}}function tg(t,a){var o=a.action,l=a.payload,d=t.state;if(a.isTransition){var m=_.T,x={};_.T=x;try{var A=o(d,l),z=_.S;z!==null&&z(x,A),ng(t,a,A)}catch(H){Bf(t,a,H)}finally{m!==null&&x.types!==null&&(m.types=x.types),_.T=m}}else try{m=o(d,l),ng(t,a,m)}catch(H){Bf(t,a,H)}}function ng(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){ag(t,a,l)},function(l){return Bf(t,a,l)}):ag(t,a,o)}function ag(t,a,o){a.status="fulfilled",a.value=o,rg(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,tg(t,o)))}function Bf(t,a,o){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=o,rg(a),a=a.next;while(a!==l)}t.action=null}function rg(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function sg(t,a){return a}function ig(t,a){if(_e){var o=We.formState;if(o!==null){e:{var l=Re;if(_e){if(at){t:{for(var d=at,m=Cn;d.nodeType!==8;){if(!m){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){at=On(d.nextSibling),l=d.data==="F!";break e}}Ra(l)}l=!1}l&&(a=o[0])}}return o=Vt(),o.memoizedState=o.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sg,lastRenderedState:a},o.queue=l,o=Og.bind(null,Re,l),l.dispatch=o,l=Vf(!1),m=Yf.bind(null,Re,!1,l.queue),l=Vt(),d={state:a,dispatch:null,action:t,pending:null},l.queue=d,o=kS.bind(null,Re,d,m,o),d.dispatch=o,l.memoizedState=t,[a,o,!1]}function og(t){var a=ft();return lg(a,Xe,t)}function lg(t,a,o){if(a=_f(t,a,sg)[0],t=Rl(ca)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var l=wi(a)}catch(x){throw x===ds?wl:x}else l=a;a=ft();var d=a.queue,m=d.dispatch;return o!==a.memoizedState&&(Re.flags|=2048,bs(9,{destroy:void 0},LS.bind(null,d,o),null)),[l,m,t]}function LS(t,a){t.action=a}function ug(t){var a=ft(),o=Xe;if(o!==null)return lg(a,o,t);ft(),a=a.memoizedState,o=ft();var l=o.queue.dispatch;return o.memoizedState=t,[a,l,!1]}function bs(t,a,o,l){return t={tag:t,create:o,deps:l,inst:a,next:null},a=Re.updateQueue,a===null&&(a=Tl(),Re.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(l=o.next,o.next=t,t.next=l,a.lastEffect=t),t}function cg(){return ft().memoizedState}function zl(t,a,o,l){var d=Vt();Re.flags|=t,d.memoizedState=bs(1|a,{destroy:void 0},o,l===void 0?null:l)}function kl(t,a,o,l){var d=ft();l=l===void 0?null:l;var m=d.memoizedState.inst;Xe!==null&&l!==null&&Rf(l,Xe.memoizedState.deps)?d.memoizedState=bs(a,m,o,l):(Re.flags|=t,d.memoizedState=bs(1|a,m,o,l))}function fg(t,a){zl(8390656,8,t,a)}function Ff(t,a){kl(2048,8,t,a)}function US(t){Re.flags|=4;var a=Re.updateQueue;if(a===null)a=Tl(),Re.updateQueue=a,a.events=[t];else{var o=a.events;o===null?a.events=[t]:o.push(t)}}function dg(t){var a=ft().memoizedState;return US({ref:a,nextImpl:t}),function(){if((He&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function hg(t,a){return kl(4,2,t,a)}function mg(t,a){return kl(4,4,t,a)}function pg(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function gg(t,a,o){o=o!=null?o.concat([t]):null,kl(4,4,pg.bind(null,a,t),o)}function Hf(){}function bg(t,a){var o=ft();a=a===void 0?null:a;var l=o.memoizedState;return a!==null&&Rf(a,l[1])?l[0]:(o.memoizedState=[t,a],t)}function yg(t,a){var o=ft();a=a===void 0?null:a;var l=o.memoizedState;if(a!==null&&Rf(a,l[1]))return l[0];if(l=t(),Or){Vn(!0);try{t()}finally{Vn(!1)}}return o.memoizedState=[l,a],l}function qf(t,a,o){return o===void 0||(ua&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=a:(t.memoizedState=o,t=vb(),Re.lanes|=t,Ba|=t,o)}function vg(t,a,o,l){return rn(o,a)?o:ms.current!==null?(t=qf(t,o,l),rn(t,a)||(mt=!0),t):(ua&42)===0||(ua&1073741824)!==0&&(Ue&261930)===0?(mt=!0,t.memoizedState=o):(t=vb(),Re.lanes|=t,Ba|=t,a)}function xg(t,a,o,l,d){var m=K.p;K.p=m!==0&&8>m?m:8;var x=_.T,A={};_.T=A,Yf(t,!1,a,o);try{var z=d(),H=_.S;if(H!==null&&H(A,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var Q=DS(z,l);Ci(t,a,Q,fn(t))}else Ci(t,a,l,fn(t))}catch(ee){Ci(t,a,{then:function(){},status:"rejected",reason:ee},fn())}finally{K.p=m,x!==null&&A.types!==null&&(x.types=A.types),_.T=x}}function IS(){}function Gf(t,a,o,l){if(t.tag!==5)throw Error(s(476));var d=Sg(t).queue;xg(t,d,a,ie,o===null?IS:function(){return wg(t),o(l)})}function Sg(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:ie},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function wg(t){var a=Sg(t);a.next===null&&(a=t.alternate.memoizedState),Ci(t,a.next.queue,{},fn())}function $f(){return Mt(Vi)}function Cg(){return ft().memoizedState}function Eg(){return ft().memoizedState}function _S(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=fn();t=La(o);var l=Ua(a,t,o);l!==null&&(Jt(l,a,o),yi(l,a,o)),a={cache:Sf()},t.payload=a;return}a=a.return}}function PS(t,a,o){var l=fn();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ll(t)?Ag(a,o):(o=cf(t,a,o,l),o!==null&&(Jt(o,t,l),jg(o,a,l)))}function Og(t,a,o){var l=fn();Ci(t,a,o,l)}function Ci(t,a,o,l){var d={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ll(t))Ag(a,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var x=a.lastRenderedState,A=m(x,o);if(d.hasEagerState=!0,d.eagerState=A,rn(A,x))return pl(t,a,d,0),We===null&&ml(),!1}catch{}finally{}if(o=cf(t,a,d,l),o!==null)return Jt(o,t,l),jg(o,a,l),!0}return!1}function Yf(t,a,o,l){if(l={lane:2,revertLane:Od(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ll(t)){if(a)throw Error(s(479))}else a=cf(t,o,l,2),a!==null&&Jt(a,t,2)}function Ll(t){var a=t.alternate;return t===Re||a!==null&&a===Re}function Ag(t,a){ps=Nl=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function jg(t,a,o){if((o&4194048)!==0){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,Rm(t,o)}}var Ei={readContext:Mt,use:Dl,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Ei.useEffectEvent=it;var Ng={readContext:Mt,use:Dl,useCallback:function(t,a){return Vt().memoizedState=[t,a===void 0?null:a],t},useContext:Mt,useEffect:fg,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,zl(4194308,4,pg.bind(null,a,t),o)},useLayoutEffect:function(t,a){return zl(4194308,4,t,a)},useInsertionEffect:function(t,a){zl(4,2,t,a)},useMemo:function(t,a){var o=Vt();a=a===void 0?null:a;var l=t();if(Or){Vn(!0);try{t()}finally{Vn(!1)}}return o.memoizedState=[l,a],l},useReducer:function(t,a,o){var l=Vt();if(o!==void 0){var d=o(a);if(Or){Vn(!0);try{o(a)}finally{Vn(!1)}}}else d=a;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=PS.bind(null,Re,t),[l.memoizedState,t]},useRef:function(t){var a=Vt();return t={current:t},a.memoizedState=t},useState:function(t){t=Vf(t);var a=t.queue,o=Og.bind(null,Re,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:Hf,useDeferredValue:function(t,a){var o=Vt();return qf(o,t,a)},useTransition:function(){var t=Vf(!1);return t=xg.bind(null,Re,t.queue,!0,!1),Vt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var l=Re,d=Vt();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=a(),We===null)throw Error(s(349));(Ue&127)!==0||Xp(l,a,o)}d.memoizedState=o;var m={value:o,getSnapshot:a};return d.queue=m,fg(Zp.bind(null,l,m,t),[t]),l.flags|=2048,bs(9,{destroy:void 0},Kp.bind(null,l,m,o,a),null),o},useId:function(){var t=Vt(),a=We.identifierPrefix;if(_e){var o=Fn,l=Bn;o=(l&~(1<<32-kt(l)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Ml++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=RS++,a="_"+a+"r_"+o.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:$f,useFormState:ig,useActionState:ig,useOptimistic:function(t){var a=Vt();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Yf.bind(null,Re,!0,o),o.dispatch=a,[t,a]},useMemoCache:If,useCacheRefresh:function(){return Vt().memoizedState=_S.bind(null,Re)},useEffectEvent:function(t){var a=Vt(),o={impl:t};return a.memoizedState=o,function(){if((He&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}},Qf={readContext:Mt,use:Dl,useCallback:bg,useContext:Mt,useEffect:Ff,useImperativeHandle:gg,useInsertionEffect:hg,useLayoutEffect:mg,useMemo:yg,useReducer:Rl,useRef:cg,useState:function(){return Rl(ca)},useDebugValue:Hf,useDeferredValue:function(t,a){var o=ft();return vg(o,Xe.memoizedState,t,a)},useTransition:function(){var t=Rl(ca)[0],a=ft().memoizedState;return[typeof t=="boolean"?t:wi(t),a]},useSyncExternalStore:Qp,useId:Cg,useHostTransitionStatus:$f,useFormState:og,useActionState:og,useOptimistic:function(t,a){var o=ft();return eg(o,Xe,t,a)},useMemoCache:If,useCacheRefresh:Eg};Qf.useEffectEvent=dg;var Mg={readContext:Mt,use:Dl,useCallback:bg,useContext:Mt,useEffect:Ff,useImperativeHandle:gg,useInsertionEffect:hg,useLayoutEffect:mg,useMemo:yg,useReducer:Pf,useRef:cg,useState:function(){return Pf(ca)},useDebugValue:Hf,useDeferredValue:function(t,a){var o=ft();return Xe===null?qf(o,t,a):vg(o,Xe.memoizedState,t,a)},useTransition:function(){var t=Pf(ca)[0],a=ft().memoizedState;return[typeof t=="boolean"?t:wi(t),a]},useSyncExternalStore:Qp,useId:Cg,useHostTransitionStatus:$f,useFormState:ug,useActionState:ug,useOptimistic:function(t,a){var o=ft();return Xe!==null?eg(o,Xe,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:If,useCacheRefresh:Eg};Mg.useEffectEvent=dg;function Xf(t,a,o,l){a=t.memoizedState,o=o(l,a),o=o==null?a:y({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Kf={enqueueSetState:function(t,a,o){t=t._reactInternals;var l=fn(),d=La(l);d.payload=a,o!=null&&(d.callback=o),a=Ua(t,d,l),a!==null&&(Jt(a,t,l),yi(a,t,l))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var l=fn(),d=La(l);d.tag=1,d.payload=a,o!=null&&(d.callback=o),a=Ua(t,d,l),a!==null&&(Jt(a,t,l),yi(a,t,l))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=fn(),l=La(o);l.tag=2,a!=null&&(l.callback=a),a=Ua(t,l,o),a!==null&&(Jt(a,t,o),yi(a,t,o))}};function Tg(t,a,o,l,d,m,x){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,x):a.prototype&&a.prototype.isPureReactComponent?!ci(o,l)||!ci(d,m):!0}function Dg(t,a,o,l){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,l),a.state!==t&&Kf.enqueueReplaceState(a,a.state,null)}function Ar(t,a){var o=a;if("ref"in a){o={};for(var l in a)l!=="ref"&&(o[l]=a[l])}if(t=t.defaultProps){o===a&&(o=y({},o));for(var d in t)o[d]===void 0&&(o[d]=t[d])}return o}function Rg(t){hl(t)}function zg(t){console.error(t)}function kg(t){hl(t)}function Ul(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function Lg(t,a,o){try{var l=t.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Zf(t,a,o){return o=La(o),o.tag=3,o.payload={element:null},o.callback=function(){Ul(t,a)},o}function Ug(t){return t=La(t),t.tag=3,t}function Ig(t,a,o,l){var d=o.type.getDerivedStateFromError;if(typeof d=="function"){var m=l.value;t.payload=function(){return d(m)},t.callback=function(){Lg(a,o,l)}}var x=o.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(t.callback=function(){Lg(a,o,l),typeof d!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var A=l.stack;this.componentDidCatch(l.value,{componentStack:A!==null?A:""})})}function VS(t,a,o,l,d){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=o.alternate,a!==null&&us(a,o,d,!0),o=on.current,o!==null){switch(o.tag){case 31:case 13:return En===null?Ql():o.alternate===null&&ot===0&&(ot=3),o.flags&=-257,o.flags|=65536,o.lanes=d,l===Cl?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([l]):a.add(l),wd(t,l,d)),!1;case 22:return o.flags|=65536,l===Cl?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([l]):o.add(l)),wd(t,l,d)),!1}throw Error(s(435,o.tag))}return wd(t,l,d),Ql(),!1}if(_e)return a=on.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=d,l!==gf&&(t=Error(s(422),{cause:l}),hi(xn(t,o)))):(l!==gf&&(a=Error(s(423),{cause:l}),hi(xn(a,o))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=xn(l,o),d=Zf(t.stateNode,l,d),jf(t,d),ot!==4&&(ot=2)),!1;var m=Error(s(520),{cause:l});if(m=xn(m,o),Ri===null?Ri=[m]:Ri.push(m),ot!==4&&(ot=2),a===null)return!0;l=xn(l,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=d&-d,o.lanes|=t,t=Zf(o.stateNode,l,t),jf(o,t),!1;case 1:if(a=o.type,m=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Fa===null||!Fa.has(m))))return o.flags|=65536,d&=-d,o.lanes|=d,d=Ug(d),Ig(d,t,o,l),jf(o,d),!1}o=o.return}while(o!==null);return!1}var Jf=Error(s(461)),mt=!1;function Tt(t,a,o,l){a.child=t===null?Bp(a,null,o,l):Er(a,t.child,o,l)}function _g(t,a,o,l,d){o=o.render;var m=a.ref;if("ref"in l){var x={};for(var A in l)A!=="ref"&&(x[A]=l[A])}else x=l;return xr(a),l=zf(t,a,o,x,m,d),A=kf(),t!==null&&!mt?(Lf(t,a,d),fa(t,a,d)):(_e&&A&&mf(a),a.flags|=1,Tt(t,a,l,d),a.child)}function Pg(t,a,o,l,d){if(t===null){var m=o.type;return typeof m=="function"&&!ff(m)&&m.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=m,Vg(t,a,m,l,d)):(t=bl(o.type,null,l,a,a.mode,d),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!id(t,d)){var x=m.memoizedProps;if(o=o.compare,o=o!==null?o:ci,o(x,l)&&t.ref===a.ref)return fa(t,a,d)}return a.flags|=1,t=sa(m,l),t.ref=a.ref,t.return=a,a.child=t}function Vg(t,a,o,l,d){if(t!==null){var m=t.memoizedProps;if(ci(m,l)&&t.ref===a.ref)if(mt=!1,a.pendingProps=l=m,id(t,d))(t.flags&131072)!==0&&(mt=!0);else return a.lanes=t.lanes,fa(t,a,d)}return Wf(t,a,o,l,d)}function Bg(t,a,o,l){var d=l.children,m=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|o:o,t!==null){for(l=a.child=t.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~m}else l=0,a.child=null;return Fg(t,a,m,o,l)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Sl(a,m!==null?m.cachePool:null),m!==null?qp(a,m):Mf(),Gp(a);else return l=a.lanes=536870912,Fg(t,a,m!==null?m.baseLanes|o:o,o,l)}else m!==null?(Sl(a,m.cachePool),qp(a,m),_a(),a.memoizedState=null):(t!==null&&Sl(a,null),Mf(),_a());return Tt(t,a,d,o),a.child}function Oi(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Fg(t,a,o,l,d){var m=Cf();return m=m===null?null:{parent:dt._currentValue,pool:m},a.memoizedState={baseLanes:o,cachePool:m},t!==null&&Sl(a,null),Mf(),Gp(a),t!==null&&us(t,a,l,!0),a.childLanes=d,null}function Il(t,a){return a=Pl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Hg(t,a,o){return Er(a,t.child,null,o),t=Il(a,a.pendingProps),t.flags|=2,ln(a),a.memoizedState=null,t}function BS(t,a,o){var l=a.pendingProps,d=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(_e){if(l.mode==="hidden")return t=Il(a,l),a.lanes=536870912,Oi(null,t);if(Df(a),(t=at)?(t=ty(t,Cn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Ta!==null?{id:Bn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},o=Ap(t),o.return=a,a.child=o,Nt=a,at=null)):t=null,t===null)throw Ra(a);return a.lanes=536870912,null}return Il(a,l)}var m=t.memoizedState;if(m!==null){var x=m.dehydrated;if(Df(a),d)if(a.flags&256)a.flags&=-257,a=Hg(t,a,o);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(s(558));else if(mt||us(t,a,o,!1),d=(o&t.childLanes)!==0,mt||d){if(l=We,l!==null&&(x=zm(l,o),x!==0&&x!==m.retryLane))throw m.retryLane=x,gr(t,x),Jt(l,t,x),Jf;Ql(),a=Hg(t,a,o)}else t=m.treeContext,at=On(x.nextSibling),Nt=a,_e=!0,Da=null,Cn=!1,t!==null&&Mp(a,t),a=Il(a,l),a.flags|=4096;return a}return t=sa(t.child,{mode:l.mode,children:l.children}),t.ref=a.ref,a.child=t,t.return=a,t}function _l(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(t===null||t.ref!==o)&&(a.flags|=4194816)}}function Wf(t,a,o,l,d){return xr(a),o=zf(t,a,o,l,void 0,d),l=kf(),t!==null&&!mt?(Lf(t,a,d),fa(t,a,d)):(_e&&l&&mf(a),a.flags|=1,Tt(t,a,o,d),a.child)}function qg(t,a,o,l,d,m){return xr(a),a.updateQueue=null,o=Yp(a,l,o,d),$p(t),l=kf(),t!==null&&!mt?(Lf(t,a,m),fa(t,a,m)):(_e&&l&&mf(a),a.flags|=1,Tt(t,a,o,m),a.child)}function Gg(t,a,o,l,d){if(xr(a),a.stateNode===null){var m=ss,x=o.contextType;typeof x=="object"&&x!==null&&(m=Mt(x)),m=new o(l,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Kf,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=l,m.state=a.memoizedState,m.refs={},Of(a),x=o.contextType,m.context=typeof x=="object"&&x!==null?Mt(x):ss,m.state=a.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Xf(a,o,x,l),m.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Kf.enqueueReplaceState(m,m.state,null),xi(a,l,m,d),vi(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(t===null){m=a.stateNode;var A=a.memoizedProps,z=Ar(o,A);m.props=z;var H=m.context,Q=o.contextType;x=ss,typeof Q=="object"&&Q!==null&&(x=Mt(Q));var ee=o.getDerivedStateFromProps;Q=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(A||H!==x)&&Dg(a,m,l,x),ka=!1;var G=a.memoizedState;m.state=G,xi(a,l,m,d),vi(),H=a.memoizedState,A||G!==H||ka?(typeof ee=="function"&&(Xf(a,o,ee,l),H=a.memoizedState),(z=ka||Tg(a,o,z,l,G,H,x))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=l,a.memoizedState=H),m.props=l,m.state=H,m.context=x,l=z):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{m=a.stateNode,Af(t,a),x=a.memoizedProps,Q=Ar(o,x),m.props=Q,ee=a.pendingProps,G=m.context,H=o.contextType,z=ss,typeof H=="object"&&H!==null&&(z=Mt(H)),A=o.getDerivedStateFromProps,(H=typeof A=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==ee||G!==z)&&Dg(a,m,l,z),ka=!1,G=a.memoizedState,m.state=G,xi(a,l,m,d),vi();var $=a.memoizedState;x!==ee||G!==$||ka||t!==null&&t.dependencies!==null&&vl(t.dependencies)?(typeof A=="function"&&(Xf(a,o,A,l),$=a.memoizedState),(Q=ka||Tg(a,o,Q,l,G,$,z)||t!==null&&t.dependencies!==null&&vl(t.dependencies))?(H||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,$,z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,$,z)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===t.memoizedProps&&G===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&G===t.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=$),m.props=l,m.state=$,m.context=z,l=Q):(typeof m.componentDidUpdate!="function"||x===t.memoizedProps&&G===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&G===t.memoizedState||(a.flags|=1024),l=!1)}return m=l,_l(t,a),l=(a.flags&128)!==0,m||l?(m=a.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&l?(a.child=Er(a,t.child,null,d),a.child=Er(a,null,o,d)):Tt(t,a,o,d),a.memoizedState=m.state,t=a.child):t=fa(t,a,d),t}function $g(t,a,o,l){return yr(),a.flags|=256,Tt(t,a,o,l),a.child}var ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function td(t){return{baseLanes:t,cachePool:Lp()}}function nd(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=cn),t}function Yg(t,a,o){var l=a.pendingProps,d=!1,m=(a.flags&128)!==0,x;if((x=m)||(x=t!==null&&t.memoizedState===null?!1:(ct.current&2)!==0),x&&(d=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,t===null){if(_e){if(d?Ia(a):_a(),(t=at)?(t=ty(t,Cn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Ta!==null?{id:Bn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},o=Ap(t),o.return=a,a.child=o,Nt=a,at=null)):t=null,t===null)throw Ra(a);return _d(t)?a.lanes=32:a.lanes=536870912,null}var A=l.children;return l=l.fallback,d?(_a(),d=a.mode,A=Pl({mode:"hidden",children:A},d),l=br(l,d,o,null),A.return=a,l.return=a,A.sibling=l,a.child=A,l=a.child,l.memoizedState=td(o),l.childLanes=nd(t,x,o),a.memoizedState=ed,Oi(null,l)):(Ia(a),ad(a,A))}var z=t.memoizedState;if(z!==null&&(A=z.dehydrated,A!==null)){if(m)a.flags&256?(Ia(a),a.flags&=-257,a=rd(t,a,o)):a.memoizedState!==null?(_a(),a.child=t.child,a.flags|=128,a=null):(_a(),A=l.fallback,d=a.mode,l=Pl({mode:"visible",children:l.children},d),A=br(A,d,o,null),A.flags|=2,l.return=a,A.return=a,l.sibling=A,a.child=l,Er(a,t.child,null,o),l=a.child,l.memoizedState=td(o),l.childLanes=nd(t,x,o),a.memoizedState=ed,a=Oi(null,l));else if(Ia(a),_d(A)){if(x=A.nextSibling&&A.nextSibling.dataset,x)var H=x.dgst;x=H,l=Error(s(419)),l.stack="",l.digest=x,hi({value:l,source:null,stack:null}),a=rd(t,a,o)}else if(mt||us(t,a,o,!1),x=(o&t.childLanes)!==0,mt||x){if(x=We,x!==null&&(l=zm(x,o),l!==0&&l!==z.retryLane))throw z.retryLane=l,gr(t,l),Jt(x,t,l),Jf;Id(A)||Ql(),a=rd(t,a,o)}else Id(A)?(a.flags|=192,a.child=t.child,a=null):(t=z.treeContext,at=On(A.nextSibling),Nt=a,_e=!0,Da=null,Cn=!1,t!==null&&Mp(a,t),a=ad(a,l.children),a.flags|=4096);return a}return d?(_a(),A=l.fallback,d=a.mode,z=t.child,H=z.sibling,l=sa(z,{mode:"hidden",children:l.children}),l.subtreeFlags=z.subtreeFlags&65011712,H!==null?A=sa(H,A):(A=br(A,d,o,null),A.flags|=2),A.return=a,l.return=a,l.sibling=A,a.child=l,Oi(null,l),l=a.child,A=t.child.memoizedState,A===null?A=td(o):(d=A.cachePool,d!==null?(z=dt._currentValue,d=d.parent!==z?{parent:z,pool:z}:d):d=Lp(),A={baseLanes:A.baseLanes|o,cachePool:d}),l.memoizedState=A,l.childLanes=nd(t,x,o),a.memoizedState=ed,Oi(t.child,l)):(Ia(a),o=t.child,t=o.sibling,o=sa(o,{mode:"visible",children:l.children}),o.return=a,o.sibling=null,t!==null&&(x=a.deletions,x===null?(a.deletions=[t],a.flags|=16):x.push(t)),a.child=o,a.memoizedState=null,o)}function ad(t,a){return a=Pl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Pl(t,a){return t=sn(22,t,null,a),t.lanes=0,t}function rd(t,a,o){return Er(a,t.child,null,o),t=ad(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Qg(t,a,o){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a),vf(t.return,a,o)}function sd(t,a,o,l,d,m){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d,treeForkCount:m}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=l,x.tail=o,x.tailMode=d,x.treeForkCount=m)}function Xg(t,a,o){var l=a.pendingProps,d=l.revealOrder,m=l.tail;l=l.children;var x=ct.current,A=(x&2)!==0;if(A?(x=x&1|2,a.flags|=128):x&=1,te(ct,x),Tt(t,a,l,o),l=_e?di:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qg(t,o,a);else if(t.tag===19)Qg(t,o,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(o=a.child,d=null;o!==null;)t=o.alternate,t!==null&&jl(t)===null&&(d=o),o=o.sibling;o=d,o===null?(d=a.child,a.child=null):(d=o.sibling,o.sibling=null),sd(a,!1,d,o,m,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,d=a.child,a.child=null;d!==null;){if(t=d.alternate,t!==null&&jl(t)===null){a.child=d;break}t=d.sibling,d.sibling=o,o=d,d=t}sd(a,!0,o,null,m,l);break;case"together":sd(a,!1,null,null,void 0,l);break;default:a.memoizedState=null}return a.child}function fa(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),Ba|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(us(t,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(s(153));if(a.child!==null){for(t=a.child,o=sa(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=sa(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function id(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&vl(t)))}function FS(t,a,o){switch(a.tag){case 3:Ae(a,a.stateNode.containerInfo),za(a,dt,t.memoizedState.cache),yr();break;case 27:case 5:Je(a);break;case 4:Ae(a,a.stateNode.containerInfo);break;case 10:za(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Df(a),null;break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(Ia(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Yg(t,a,o):(Ia(a),t=fa(t,a,o),t!==null?t.sibling:null);Ia(a);break;case 19:var d=(t.flags&128)!==0;if(l=(o&a.childLanes)!==0,l||(us(t,a,o,!1),l=(o&a.childLanes)!==0),d){if(l)return Xg(t,a,o);a.flags|=128}if(d=a.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),te(ct,ct.current),l)break;return null;case 22:return a.lanes=0,Bg(t,a,o,a.pendingProps);case 24:za(a,dt,t.memoizedState.cache)}return fa(t,a,o)}function Kg(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)mt=!0;else{if(!id(t,o)&&(a.flags&128)===0)return mt=!1,FS(t,a,o);mt=(t.flags&131072)!==0}else mt=!1,_e&&(a.flags&1048576)!==0&&Np(a,di,a.index);switch(a.lanes=0,a.tag){case 16:e:{var l=a.pendingProps;if(t=wr(a.elementType),a.type=t,typeof t=="function")ff(t)?(l=Ar(t,l),a.tag=1,a=Gg(null,a,t,l,o)):(a.tag=0,a=Wf(null,a,t,l,o));else{if(t!=null){var d=t.$$typeof;if(d===U){a.tag=11,a=_g(null,a,t,l,o);break e}else if(d===D){a.tag=14,a=Pg(null,a,t,l,o);break e}}throw a=oe(t)||t,Error(s(306,a,""))}}return a;case 0:return Wf(t,a,a.type,a.pendingProps,o);case 1:return l=a.type,d=Ar(l,a.pendingProps),Gg(t,a,l,d,o);case 3:e:{if(Ae(a,a.stateNode.containerInfo),t===null)throw Error(s(387));l=a.pendingProps;var m=a.memoizedState;d=m.element,Af(t,a),xi(a,l,null,o);var x=a.memoizedState;if(l=x.cache,za(a,dt,l),l!==m.cache&&xf(a,[dt],o,!0),vi(),l=x.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=$g(t,a,l,o);break e}else if(l!==d){d=xn(Error(s(424)),a),hi(d),a=$g(t,a,l,o);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(at=On(t.firstChild),Nt=a,_e=!0,Da=null,Cn=!0,o=Bp(a,null,l,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(yr(),l===d){a=fa(t,a,o);break e}Tt(t,a,l,o)}a=a.child}return a;case 26:return _l(t,a),t===null?(o=oy(a.type,null,a.pendingProps,null))?a.memoizedState=o:_e||(o=a.type,t=a.pendingProps,l=tu(pe.current).createElement(o),l[jt]=a,l[$t]=t,Dt(l,o,t),Ct(l),a.stateNode=l):a.memoizedState=oy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Je(a),t===null&&_e&&(l=a.stateNode=ry(a.type,a.pendingProps,pe.current),Nt=a,Cn=!0,d=at,$a(a.type)?(Pd=d,at=On(l.firstChild)):at=d),Tt(t,a,a.pendingProps.children,o),_l(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&_e&&((d=l=at)&&(l=yw(l,a.type,a.pendingProps,Cn),l!==null?(a.stateNode=l,Nt=a,at=On(l.firstChild),Cn=!1,d=!0):d=!1),d||Ra(a)),Je(a),d=a.type,m=a.pendingProps,x=t!==null?t.memoizedProps:null,l=m.children,kd(d,m)?l=null:x!==null&&kd(d,x)&&(a.flags|=32),a.memoizedState!==null&&(d=zf(t,a,zS,null,null,o),Vi._currentValue=d),_l(t,a),Tt(t,a,l,o),a.child;case 6:return t===null&&_e&&((t=o=at)&&(o=vw(o,a.pendingProps,Cn),o!==null?(a.stateNode=o,Nt=a,at=null,t=!0):t=!1),t||Ra(a)),null;case 13:return Yg(t,a,o);case 4:return Ae(a,a.stateNode.containerInfo),l=a.pendingProps,t===null?a.child=Er(a,null,l,o):Tt(t,a,l,o),a.child;case 11:return _g(t,a,a.type,a.pendingProps,o);case 7:return Tt(t,a,a.pendingProps,o),a.child;case 8:return Tt(t,a,a.pendingProps.children,o),a.child;case 12:return Tt(t,a,a.pendingProps.children,o),a.child;case 10:return l=a.pendingProps,za(a,a.type,l.value),Tt(t,a,l.children,o),a.child;case 9:return d=a.type._context,l=a.pendingProps.children,xr(a),d=Mt(d),l=l(d),a.flags|=1,Tt(t,a,l,o),a.child;case 14:return Pg(t,a,a.type,a.pendingProps,o);case 15:return Vg(t,a,a.type,a.pendingProps,o);case 19:return Xg(t,a,o);case 31:return BS(t,a,o);case 22:return Bg(t,a,o,a.pendingProps);case 24:return xr(a),l=Mt(dt),t===null?(d=Cf(),d===null&&(d=We,m=Sf(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=o),d=m),a.memoizedState={parent:l,cache:d},Of(a),za(a,dt,d)):((t.lanes&o)!==0&&(Af(t,a),xi(a,null,null,o),vi()),d=t.memoizedState,m=a.memoizedState,d.parent!==l?(d={parent:l,cache:l},a.memoizedState=d,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=d),za(a,dt,l)):(l=m.cache,za(a,dt,l),l!==d.cache&&xf(a,[dt],o,!0))),Tt(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function da(t){t.flags|=4}function od(t,a,o,l,d){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Cb())t.flags|=8192;else throw Cr=Cl,Ef}else t.flags&=-16777217}function Zg(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!dy(a))if(Cb())t.flags|=8192;else throw Cr=Cl,Ef}function Vl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?Tm():536870912,t.lanes|=a,Ss|=a)}function Ai(t,a){if(!_e)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function rt(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,l=0;if(a)for(var d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=o,a}function HS(t,a,o){var l=a.pendingProps;switch(pf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(a),null;case 1:return rt(a),null;case 3:return o=a.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),la(dt),Te(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(ls(a)?da(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,bf())),rt(a),null;case 26:var d=a.type,m=a.memoizedState;return t===null?(da(a),m!==null?(rt(a),Zg(a,m)):(rt(a),od(a,d,null,l,o))):m?m!==t.memoizedState?(da(a),rt(a),Zg(a,m)):(rt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==l&&da(a),rt(a),od(a,d,t,l,o)),null;case 27:if(_t(a),o=pe.current,d=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&da(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return rt(a),null}t=ne.current,ls(a)?Tp(a):(t=ry(d,l,o),a.stateNode=t,da(a))}return rt(a),null;case 5:if(_t(a),d=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&da(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return rt(a),null}if(m=ne.current,ls(a))Tp(a);else{var x=tu(pe.current);switch(m){case 1:m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=x.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?x.createElement("select",{is:l.is}):x.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?x.createElement(d,{is:l.is}):x.createElement(d)}}m[jt]=a,m[$t]=l;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)m.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=m;e:switch(Dt(m,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&da(a)}}return rt(a),od(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,o),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==l&&da(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(s(166));if(t=pe.current,ls(a)){if(t=a.stateNode,o=a.memoizedProps,l=null,d=Nt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}t[jt]=a,t=!!(t.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||Yb(t.nodeValue,o)),t||Ra(a,!0)}else t=tu(t).createTextNode(l),t[jt]=a,a.stateNode=t}return rt(a),null;case 31:if(o=a.memoizedState,t===null||t.memoizedState!==null){if(l=ls(a),o!==null){if(t===null){if(!l)throw Error(s(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[jt]=a}else yr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;rt(a),t=!1}else o=bf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return a.flags&256?(ln(a),a):(ln(a),null);if((a.flags&128)!==0)throw Error(s(558))}return rt(a),null;case 13:if(l=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=ls(a),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error(s(318));if(d=a.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[jt]=a}else yr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;rt(a),d=!1}else d=bf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return a.flags&256?(ln(a),a):(ln(a),null)}return ln(a),(a.flags&128)!==0?(a.lanes=o,a):(o=l!==null,t=t!==null&&t.memoizedState!==null,o&&(l=a.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048)),o!==t&&o&&(a.child.flags|=8192),Vl(a,a.updateQueue),rt(a),null);case 4:return Te(),t===null&&Md(a.stateNode.containerInfo),rt(a),null;case 10:return la(a.type),rt(a),null;case 19:if(V(ct),l=a.memoizedState,l===null)return rt(a),null;if(d=(a.flags&128)!==0,m=l.rendering,m===null)if(d)Ai(l,!1);else{if(ot!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=jl(t),m!==null){for(a.flags|=128,Ai(l,!1),t=m.updateQueue,a.updateQueue=t,Vl(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)Op(o,t),o=o.sibling;return te(ct,ct.current&1|2),_e&&ia(a,l.treeForkCount),a.child}t=t.sibling}l.tail!==null&&ue()>Gl&&(a.flags|=128,d=!0,Ai(l,!1),a.lanes=4194304)}else{if(!d)if(t=jl(m),t!==null){if(a.flags|=128,d=!0,t=t.updateQueue,a.updateQueue=t,Vl(a,t),Ai(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!_e)return rt(a),null}else 2*ue()-l.renderingStartTime>Gl&&o!==536870912&&(a.flags|=128,d=!0,Ai(l,!1),a.lanes=4194304);l.isBackwards?(m.sibling=a.child,a.child=m):(t=l.last,t!==null?t.sibling=m:a.child=m,l.last=m)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ue(),t.sibling=null,o=ct.current,te(ct,d?o&1|2:o&1),_e&&ia(a,l.treeForkCount),t):(rt(a),null);case 22:case 23:return ln(a),Tf(),l=a.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(o&536870912)!==0&&(a.flags&128)===0&&(rt(a),a.subtreeFlags&6&&(a.flags|=8192)):rt(a),o=a.updateQueue,o!==null&&Vl(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==o&&(a.flags|=2048),t!==null&&V(Sr),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),la(dt),rt(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function qS(t,a){switch(pf(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return la(dt),Te(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return _t(a),null;case 31:if(a.memoizedState!==null){if(ln(a),a.alternate===null)throw Error(s(340));yr()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ln(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(s(340));yr()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return V(ct),null;case 4:return Te(),null;case 10:return la(a.type),null;case 22:case 23:return ln(a),Tf(),t!==null&&V(Sr),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return la(dt),null;case 25:return null;default:return null}}function Jg(t,a){switch(pf(a),a.tag){case 3:la(dt),Te();break;case 26:case 27:case 5:_t(a);break;case 4:Te();break;case 31:a.memoizedState!==null&&ln(a);break;case 13:ln(a);break;case 19:V(ct);break;case 10:la(a.type);break;case 22:case 23:ln(a),Tf(),t!==null&&V(Sr);break;case 24:la(dt)}}function ji(t,a){try{var o=a.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var d=l.next;o=d;do{if((o.tag&t)===t){l=void 0;var m=o.create,x=o.inst;l=m(),x.destroy=l}o=o.next}while(o!==d)}}catch(A){Ye(a,a.return,A)}}function Pa(t,a,o){try{var l=a.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var m=d.next;l=m;do{if((l.tag&t)===t){var x=l.inst,A=x.destroy;if(A!==void 0){x.destroy=void 0,d=a;var z=o,H=A;try{H()}catch(Q){Ye(d,z,Q)}}}l=l.next}while(l!==m)}}catch(Q){Ye(a,a.return,Q)}}function Wg(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{Hp(a,o)}catch(l){Ye(t,t.return,l)}}}function eb(t,a,o){o.props=Ar(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(l){Ye(t,a,l)}}function Ni(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof o=="function"?t.refCleanup=o(l):o.current=l}}catch(d){Ye(t,a,d)}}function Hn(t,a){var o=t.ref,l=t.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(d){Ye(t,a,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(d){Ye(t,a,d)}else o.current=null}function tb(t){var a=t.type,o=t.memoizedProps,l=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(d){Ye(t,t.return,d)}}function ld(t,a,o){try{var l=t.stateNode;dw(l,t.type,o,a),l[$t]=a}catch(d){Ye(t,t.return,d)}}function nb(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&$a(t.type)||t.tag===4}function ud(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||nb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&$a(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cd(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=aa));else if(l!==4&&(l===27&&$a(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(cd(t,a,o),t=t.sibling;t!==null;)cd(t,a,o),t=t.sibling}function Bl(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(l!==4&&(l===27&&$a(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Bl(t,a,o),t=t.sibling;t!==null;)Bl(t,a,o),t=t.sibling}function ab(t){var a=t.stateNode,o=t.memoizedProps;try{for(var l=t.type,d=a.attributes;d.length;)a.removeAttributeNode(d[0]);Dt(a,l,o),a[jt]=t,a[$t]=o}catch(m){Ye(t,t.return,m)}}var ha=!1,pt=!1,fd=!1,rb=typeof WeakSet=="function"?WeakSet:Set,Et=null;function GS(t,a){if(t=t.containerInfo,Rd=lu,t=gp(t),af(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var d=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var x=0,A=-1,z=-1,H=0,Q=0,ee=t,G=null;t:for(;;){for(var $;ee!==o||d!==0&&ee.nodeType!==3||(A=x+d),ee!==m||l!==0&&ee.nodeType!==3||(z=x+l),ee.nodeType===3&&(x+=ee.nodeValue.length),($=ee.firstChild)!==null;)G=ee,ee=$;for(;;){if(ee===t)break t;if(G===o&&++H===d&&(A=x),G===m&&++Q===l&&(z=x),($=ee.nextSibling)!==null)break;ee=G,G=ee.parentNode}ee=$}o=A===-1||z===-1?null:{start:A,end:z}}else o=null}o=o||{start:0,end:0}}else o=null;for(zd={focusedElem:t,selectionRange:o},lu=!1,Et=a;Et!==null;)if(a=Et,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Et=t;else for(;Et!==null;){switch(a=Et,m=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(o=0;o<t.length;o++)d=t[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,o=a,d=m.memoizedProps,m=m.memoizedState,l=o.stateNode;try{var ve=Ar(o.type,d);t=l.getSnapshotBeforeUpdate(ve,m),l.__reactInternalSnapshotBeforeUpdate=t}catch(Ne){Ye(o,o.return,Ne)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)Ud(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Ud(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=a.sibling,t!==null){t.return=a.return,Et=t;break}Et=a.return}}function sb(t,a,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:pa(t,o),l&4&&ji(5,o);break;case 1:if(pa(t,o),l&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(x){Ye(o,o.return,x)}else{var d=Ar(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(d,a,t.__reactInternalSnapshotBeforeUpdate)}catch(x){Ye(o,o.return,x)}}l&64&&Wg(o),l&512&&Ni(o,o.return);break;case 3:if(pa(t,o),l&64&&(t=o.updateQueue,t!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Hp(t,a)}catch(x){Ye(o,o.return,x)}}break;case 27:a===null&&l&4&&ab(o);case 26:case 5:pa(t,o),a===null&&l&4&&tb(o),l&512&&Ni(o,o.return);break;case 12:pa(t,o);break;case 31:pa(t,o),l&4&&lb(t,o);break;case 13:pa(t,o),l&4&&ub(t,o),l&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=ew.bind(null,o),xw(t,o))));break;case 22:if(l=o.memoizedState!==null||ha,!l){a=a!==null&&a.memoizedState!==null||pt,d=ha;var m=pt;ha=l,(pt=a)&&!m?ga(t,o,(o.subtreeFlags&8772)!==0):pa(t,o),ha=d,pt=m}break;case 30:break;default:pa(t,o)}}function ib(t){var a=t.alternate;a!==null&&(t.alternate=null,ib(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Vc(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var st=null,Qt=!1;function ma(t,a,o){for(o=o.child;o!==null;)ob(t,a,o),o=o.sibling}function ob(t,a,o){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(ta,o)}catch{}switch(o.tag){case 26:pt||Hn(o,a),ma(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:pt||Hn(o,a);var l=st,d=Qt;$a(o.type)&&(st=o.stateNode,Qt=!1),ma(t,a,o),Ii(o.stateNode),st=l,Qt=d;break;case 5:pt||Hn(o,a);case 6:if(l=st,d=Qt,st=null,ma(t,a,o),st=l,Qt=d,st!==null)if(Qt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(o.stateNode)}catch(m){Ye(o,a,m)}else try{st.removeChild(o.stateNode)}catch(m){Ye(o,a,m)}break;case 18:st!==null&&(Qt?(t=st,Wb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),Ms(t)):Wb(st,o.stateNode));break;case 4:l=st,d=Qt,st=o.stateNode.containerInfo,Qt=!0,ma(t,a,o),st=l,Qt=d;break;case 0:case 11:case 14:case 15:Pa(2,o,a),pt||Pa(4,o,a),ma(t,a,o);break;case 1:pt||(Hn(o,a),l=o.stateNode,typeof l.componentWillUnmount=="function"&&eb(o,a,l)),ma(t,a,o);break;case 21:ma(t,a,o);break;case 22:pt=(l=pt)||o.memoizedState!==null,ma(t,a,o),pt=l;break;default:ma(t,a,o)}}function lb(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ms(t)}catch(o){Ye(a,a.return,o)}}}function ub(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ms(t)}catch(o){Ye(a,a.return,o)}}function $S(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new rb),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new rb),a;default:throw Error(s(435,t.tag))}}function Fl(t,a){var o=$S(t);a.forEach(function(l){if(!o.has(l)){o.add(l);var d=tw.bind(null,t,l);l.then(d,d)}})}function Xt(t,a){var o=a.deletions;if(o!==null)for(var l=0;l<o.length;l++){var d=o[l],m=t,x=a,A=x;e:for(;A!==null;){switch(A.tag){case 27:if($a(A.type)){st=A.stateNode,Qt=!1;break e}break;case 5:st=A.stateNode,Qt=!1;break e;case 3:case 4:st=A.stateNode.containerInfo,Qt=!0;break e}A=A.return}if(st===null)throw Error(s(160));ob(m,x,d),st=null,Qt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)cb(a,t),a=a.sibling}var Dn=null;function cb(t,a){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Xt(a,t),Kt(t),l&4&&(Pa(3,t,t.return),ji(3,t),Pa(5,t,t.return));break;case 1:Xt(a,t),Kt(t),l&512&&(pt||o===null||Hn(o,o.return)),l&64&&ha&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var d=Dn;if(Xt(a,t),Kt(t),l&512&&(pt||o===null||Hn(o,o.return)),l&4){var m=o!==null?o.memoizedState:null;if(l=t.memoizedState,o===null)if(l===null)if(t.stateNode===null){e:{l=t.type,o=t.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":m=d.getElementsByTagName("title")[0],(!m||m[ti]||m[jt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(l),d.head.insertBefore(m,d.querySelector("head > title"))),Dt(m,l,o),m[jt]=t,Ct(m),l=m;break e;case"link":var x=cy("link","href",d).get(l+(o.href||""));if(x){for(var A=0;A<x.length;A++)if(m=x[A],m.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&m.getAttribute("rel")===(o.rel==null?null:o.rel)&&m.getAttribute("title")===(o.title==null?null:o.title)&&m.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){x.splice(A,1);break t}}m=d.createElement(l),Dt(m,l,o),d.head.appendChild(m);break;case"meta":if(x=cy("meta","content",d).get(l+(o.content||""))){for(A=0;A<x.length;A++)if(m=x[A],m.getAttribute("content")===(o.content==null?null:""+o.content)&&m.getAttribute("name")===(o.name==null?null:o.name)&&m.getAttribute("property")===(o.property==null?null:o.property)&&m.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&m.getAttribute("charset")===(o.charSet==null?null:o.charSet)){x.splice(A,1);break t}}m=d.createElement(l),Dt(m,l,o),d.head.appendChild(m);break;default:throw Error(s(468,l))}m[jt]=t,Ct(m),l=m}t.stateNode=l}else fy(d,t.type,t.stateNode);else t.stateNode=uy(d,l,t.memoizedProps);else m!==l?(m===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):m.count--,l===null?fy(d,t.type,t.stateNode):uy(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&ld(t,t.memoizedProps,o.memoizedProps)}break;case 27:Xt(a,t),Kt(t),l&512&&(pt||o===null||Hn(o,o.return)),o!==null&&l&4&&ld(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Xt(a,t),Kt(t),l&512&&(pt||o===null||Hn(o,o.return)),t.flags&32){d=t.stateNode;try{Jr(d,"")}catch(ve){Ye(t,t.return,ve)}}l&4&&t.stateNode!=null&&(d=t.memoizedProps,ld(t,d,o!==null?o.memoizedProps:d)),l&1024&&(fd=!0);break;case 6:if(Xt(a,t),Kt(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,o=t.stateNode;try{o.nodeValue=l}catch(ve){Ye(t,t.return,ve)}}break;case 3:if(ru=null,d=Dn,Dn=nu(a.containerInfo),Xt(a,t),Dn=d,Kt(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Ms(a.containerInfo)}catch(ve){Ye(t,t.return,ve)}fd&&(fd=!1,fb(t));break;case 4:l=Dn,Dn=nu(t.stateNode.containerInfo),Xt(a,t),Kt(t),Dn=l;break;case 12:Xt(a,t),Kt(t);break;case 31:Xt(a,t),Kt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Fl(t,l)));break;case 13:Xt(a,t),Kt(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(ql=ue()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Fl(t,l)));break;case 22:d=t.memoizedState!==null;var z=o!==null&&o.memoizedState!==null,H=ha,Q=pt;if(ha=H||d,pt=Q||z,Xt(a,t),pt=Q,ha=H,Kt(t),l&8192)e:for(a=t.stateNode,a._visibility=d?a._visibility&-2:a._visibility|1,d&&(o===null||z||ha||pt||jr(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){z=o=a;try{if(m=z.stateNode,d)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{A=z.stateNode;var ee=z.memoizedProps.style,G=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;A.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ve){Ye(z,z.return,ve)}}}else if(a.tag===6){if(o===null){z=a;try{z.stateNode.nodeValue=d?"":z.memoizedProps}catch(ve){Ye(z,z.return,ve)}}}else if(a.tag===18){if(o===null){z=a;try{var $=z.stateNode;d?ey($,!0):ey(z.stateNode,!1)}catch(ve){Ye(z,z.return,ve)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}l&4&&(l=t.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,Fl(t,o))));break;case 19:Xt(a,t),Kt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Fl(t,l)));break;case 30:break;case 21:break;default:Xt(a,t),Kt(t)}}function Kt(t){var a=t.flags;if(a&2){try{for(var o,l=t.return;l!==null;){if(nb(l)){o=l;break}l=l.return}if(o==null)throw Error(s(160));switch(o.tag){case 27:var d=o.stateNode,m=ud(t);Bl(t,m,d);break;case 5:var x=o.stateNode;o.flags&32&&(Jr(x,""),o.flags&=-33);var A=ud(t);Bl(t,A,x);break;case 3:case 4:var z=o.stateNode.containerInfo,H=ud(t);cd(t,H,z);break;default:throw Error(s(161))}}catch(Q){Ye(t,t.return,Q)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function fb(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;fb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function pa(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)sb(t,a.alternate,a),a=a.sibling}function jr(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Pa(4,a,a.return),jr(a);break;case 1:Hn(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&eb(a,a.return,o),jr(a);break;case 27:Ii(a.stateNode);case 26:case 5:Hn(a,a.return),jr(a);break;case 22:a.memoizedState===null&&jr(a);break;case 30:jr(a);break;default:jr(a)}t=t.sibling}}function ga(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,d=t,m=a,x=m.flags;switch(m.tag){case 0:case 11:case 15:ga(d,m,o),ji(4,m);break;case 1:if(ga(d,m,o),l=m,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(H){Ye(l,l.return,H)}if(l=m,d=l.updateQueue,d!==null){var A=l.stateNode;try{var z=d.shared.hiddenCallbacks;if(z!==null)for(d.shared.hiddenCallbacks=null,d=0;d<z.length;d++)Fp(z[d],A)}catch(H){Ye(l,l.return,H)}}o&&x&64&&Wg(m),Ni(m,m.return);break;case 27:ab(m);case 26:case 5:ga(d,m,o),o&&l===null&&x&4&&tb(m),Ni(m,m.return);break;case 12:ga(d,m,o);break;case 31:ga(d,m,o),o&&x&4&&lb(d,m);break;case 13:ga(d,m,o),o&&x&4&&ub(d,m);break;case 22:m.memoizedState===null&&ga(d,m,o),Ni(m,m.return);break;case 30:break;default:ga(d,m,o)}a=a.sibling}}function dd(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&mi(o))}function hd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&mi(t))}function Rn(t,a,o,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)db(t,a,o,l),a=a.sibling}function db(t,a,o,l){var d=a.flags;switch(a.tag){case 0:case 11:case 15:Rn(t,a,o,l),d&2048&&ji(9,a);break;case 1:Rn(t,a,o,l);break;case 3:Rn(t,a,o,l),d&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&mi(t)));break;case 12:if(d&2048){Rn(t,a,o,l),t=a.stateNode;try{var m=a.memoizedProps,x=m.id,A=m.onPostCommit;typeof A=="function"&&A(x,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(z){Ye(a,a.return,z)}}else Rn(t,a,o,l);break;case 31:Rn(t,a,o,l);break;case 13:Rn(t,a,o,l);break;case 23:break;case 22:m=a.stateNode,x=a.alternate,a.memoizedState!==null?m._visibility&2?Rn(t,a,o,l):Mi(t,a):m._visibility&2?Rn(t,a,o,l):(m._visibility|=2,ys(t,a,o,l,(a.subtreeFlags&10256)!==0||!1)),d&2048&&dd(x,a);break;case 24:Rn(t,a,o,l),d&2048&&hd(a.alternate,a);break;default:Rn(t,a,o,l)}}function ys(t,a,o,l,d){for(d=d&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=t,x=a,A=o,z=l,H=x.flags;switch(x.tag){case 0:case 11:case 15:ys(m,x,A,z,d),ji(8,x);break;case 23:break;case 22:var Q=x.stateNode;x.memoizedState!==null?Q._visibility&2?ys(m,x,A,z,d):Mi(m,x):(Q._visibility|=2,ys(m,x,A,z,d)),d&&H&2048&&dd(x.alternate,x);break;case 24:ys(m,x,A,z,d),d&&H&2048&&hd(x.alternate,x);break;default:ys(m,x,A,z,d)}a=a.sibling}}function Mi(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,l=a,d=l.flags;switch(l.tag){case 22:Mi(o,l),d&2048&&dd(l.alternate,l);break;case 24:Mi(o,l),d&2048&&hd(l.alternate,l);break;default:Mi(o,l)}a=a.sibling}}var Ti=8192;function vs(t,a,o){if(t.subtreeFlags&Ti)for(t=t.child;t!==null;)hb(t,a,o),t=t.sibling}function hb(t,a,o){switch(t.tag){case 26:vs(t,a,o),t.flags&Ti&&t.memoizedState!==null&&Rw(o,Dn,t.memoizedState,t.memoizedProps);break;case 5:vs(t,a,o);break;case 3:case 4:var l=Dn;Dn=nu(t.stateNode.containerInfo),vs(t,a,o),Dn=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Ti,Ti=16777216,vs(t,a,o),Ti=l):vs(t,a,o));break;default:vs(t,a,o)}}function mb(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Di(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Et=l,gb(l,t)}mb(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pb(t),t=t.sibling}function pb(t){switch(t.tag){case 0:case 11:case 15:Di(t),t.flags&2048&&Pa(9,t,t.return);break;case 3:Di(t);break;case 12:Di(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Hl(t)):Di(t);break;default:Di(t)}}function Hl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Et=l,gb(l,t)}mb(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Pa(8,a,a.return),Hl(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Hl(a));break;default:Hl(a)}t=t.sibling}}function gb(t,a){for(;Et!==null;){var o=Et;switch(o.tag){case 0:case 11:case 15:Pa(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:mi(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Et=l;else e:for(o=t;Et!==null;){l=Et;var d=l.sibling,m=l.return;if(ib(l),l===o){Et=null;break e}if(d!==null){d.return=m,Et=d;break e}Et=m}}}var YS={getCacheForType:function(t){var a=Mt(dt),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o},cacheSignal:function(){return Mt(dt).controller.signal}},QS=typeof WeakMap=="function"?WeakMap:Map,He=0,We=null,ke=null,Ue=0,$e=0,un=null,Va=!1,xs=!1,md=!1,ba=0,ot=0,Ba=0,Nr=0,pd=0,cn=0,Ss=0,Ri=null,Zt=null,gd=!1,ql=0,bb=0,Gl=1/0,$l=null,Fa=null,xt=0,Ha=null,ws=null,ya=0,bd=0,yd=null,yb=null,zi=0,vd=null;function fn(){return(He&2)!==0&&Ue!==0?Ue&-Ue:_.T!==null?Od():km()}function vb(){if(cn===0)if((Ue&536870912)===0||_e){var t=el;el<<=1,(el&3932160)===0&&(el=262144),cn=t}else cn=536870912;return t=on.current,t!==null&&(t.flags|=32),cn}function Jt(t,a,o){(t===We&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(Cs(t,0),qa(t,Ue,cn,!1)),ei(t,o),((He&2)===0||t!==We)&&(t===We&&((He&2)===0&&(Nr|=o),ot===4&&qa(t,Ue,cn,!1)),qn(t))}function xb(t,a,o){if((He&6)!==0)throw Error(s(327));var l=!o&&(a&127)===0&&(a&t.expiredLanes)===0||Ws(t,a),d=l?ZS(t,a):Sd(t,a,!0),m=l;do{if(d===0){xs&&!l&&qa(t,a,0,!1);break}else{if(o=t.current.alternate,m&&!XS(o)){d=Sd(t,a,!1),m=!1;continue}if(d===2){if(m=a,t.errorRecoveryDisabledLanes&m)var x=0;else x=t.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var A=t;d=Ri;var z=A.current.memoizedState.isDehydrated;if(z&&(Cs(A,x).flags|=256),x=Sd(A,x,!1),x!==2){if(md&&!z){A.errorRecoveryDisabledLanes|=m,Nr|=m,d=4;break e}m=Zt,Zt=d,m!==null&&(Zt===null?Zt=m:Zt.push.apply(Zt,m))}d=x}if(m=!1,d!==2)continue}}if(d===1){Cs(t,0),qa(t,a,0,!0);break}e:{switch(l=t,m=d,m){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:qa(l,a,cn,!Va);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(d=ql+300-ue(),10<d)){if(qa(l,a,cn,!Va),nl(l,0,!0)!==0)break e;ya=a,l.timeoutHandle=Zb(Sb.bind(null,l,o,Zt,$l,gd,a,cn,Nr,Ss,Va,m,"Throttled",-0,0),d);break e}Sb(l,o,Zt,$l,gd,a,cn,Nr,Ss,Va,m,null,-0,0)}}break}while(!0);qn(t)}function Sb(t,a,o,l,d,m,x,A,z,H,Q,ee,G,$){if(t.timeoutHandle=-1,ee=a.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},hb(a,m,ee);var ve=(m&62914560)===m?ql-ue():(m&4194048)===m?bb-ue():0;if(ve=zw(ee,ve),ve!==null){ya=m,t.cancelPendingCommit=ve(Mb.bind(null,t,a,m,o,l,d,x,A,z,Q,ee,null,G,$)),qa(t,m,x,!H);return}}Mb(t,a,m,o,l,d,x,A,z)}function XS(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var d=o[l],m=d.getSnapshot;d=d.value;try{if(!rn(m(),d))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function qa(t,a,o,l){a&=~pd,a&=~Nr,t.suspendedLanes|=a,t.pingedLanes&=~a,l&&(t.warmLanes|=a),l=t.expirationTimes;for(var d=a;0<d;){var m=31-kt(d),x=1<<m;l[m]=-1,d&=~x}o!==0&&Dm(t,o,a)}function Yl(){return(He&6)===0?(ki(0),!1):!0}function xd(){if(ke!==null){if($e===0)var t=ke.return;else t=ke,oa=vr=null,Uf(t),hs=null,gi=0,t=ke;for(;t!==null;)Jg(t.alternate,t),t=t.return;ke=null}}function Cs(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,pw(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),ya=0,xd(),We=t,ke=o=sa(t.current,null),Ue=a,$e=0,un=null,Va=!1,xs=Ws(t,a),md=!1,Ss=cn=pd=Nr=Ba=ot=0,Zt=Ri=null,gd=!1,(a&8)!==0&&(a|=a&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=a;0<l;){var d=31-kt(l),m=1<<d;a|=t[d],l&=~m}return ba=a,ml(),o}function wb(t,a){Re=null,_.H=Ei,a===ds||a===wl?(a=_p(),$e=3):a===Ef?(a=_p(),$e=4):$e=a===Jf?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,un=a,ke===null&&(ot=1,Ul(t,xn(a,t.current)))}function Cb(){var t=on.current;return t===null?!0:(Ue&4194048)===Ue?En===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===En:!1}function Eb(){var t=_.H;return _.H=Ei,t===null?Ei:t}function Ob(){var t=_.A;return _.A=YS,t}function Ql(){ot=4,Va||(Ue&4194048)!==Ue&&on.current!==null||(xs=!0),(Ba&134217727)===0&&(Nr&134217727)===0||We===null||qa(We,Ue,cn,!1)}function Sd(t,a,o){var l=He;He|=2;var d=Eb(),m=Ob();(We!==t||Ue!==a)&&($l=null,Cs(t,a)),a=!1;var x=ot;e:do try{if($e!==0&&ke!==null){var A=ke,z=un;switch($e){case 8:xd(),x=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(a=!0);var H=$e;if($e=0,un=null,Es(t,A,z,H),o&&xs){x=0;break e}break;default:H=$e,$e=0,un=null,Es(t,A,z,H)}}KS(),x=ot;break}catch(Q){wb(t,Q)}while(!0);return a&&t.shellSuspendCounter++,oa=vr=null,He=l,_.H=d,_.A=m,ke===null&&(We=null,Ue=0,ml()),x}function KS(){for(;ke!==null;)Ab(ke)}function ZS(t,a){var o=He;He|=2;var l=Eb(),d=Ob();We!==t||Ue!==a?($l=null,Gl=ue()+500,Cs(t,a)):xs=Ws(t,a);e:do try{if($e!==0&&ke!==null){a=ke;var m=un;t:switch($e){case 1:$e=0,un=null,Es(t,a,m,1);break;case 2:case 9:if(Up(m)){$e=0,un=null,jb(a);break}a=function(){$e!==2&&$e!==9||We!==t||($e=7),qn(t)},m.then(a,a);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Up(m)?($e=0,un=null,jb(a)):($e=0,un=null,Es(t,a,m,7));break;case 5:var x=null;switch(ke.tag){case 26:x=ke.memoizedState;case 5:case 27:var A=ke;if(x?dy(x):A.stateNode.complete){$e=0,un=null;var z=A.sibling;if(z!==null)ke=z;else{var H=A.return;H!==null?(ke=H,Xl(H)):ke=null}break t}}$e=0,un=null,Es(t,a,m,5);break;case 6:$e=0,un=null,Es(t,a,m,6);break;case 8:xd(),ot=6;break e;default:throw Error(s(462))}}JS();break}catch(Q){wb(t,Q)}while(!0);return oa=vr=null,_.H=l,_.A=d,He=o,ke!==null?0:(We=null,Ue=0,ml(),ot)}function JS(){for(;ke!==null&&!X();)Ab(ke)}function Ab(t){var a=Kg(t.alternate,t,ba);t.memoizedProps=t.pendingProps,a===null?Xl(t):ke=a}function jb(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=qg(o,a,a.pendingProps,a.type,void 0,Ue);break;case 11:a=qg(o,a,a.pendingProps,a.type.render,a.ref,Ue);break;case 5:Uf(a);default:Jg(o,a),a=ke=Op(a,ba),a=Kg(o,a,ba)}t.memoizedProps=t.pendingProps,a===null?Xl(t):ke=a}function Es(t,a,o,l){oa=vr=null,Uf(a),hs=null,gi=0;var d=a.return;try{if(VS(t,d,a,o,Ue)){ot=1,Ul(t,xn(o,t.current)),ke=null;return}}catch(m){if(d!==null)throw ke=d,m;ot=1,Ul(t,xn(o,t.current)),ke=null;return}a.flags&32768?(_e||l===1?t=!0:xs||(Ue&536870912)!==0?t=!1:(Va=t=!0,(l===2||l===9||l===3||l===6)&&(l=on.current,l!==null&&l.tag===13&&(l.flags|=16384))),Nb(a,t)):Xl(a)}function Xl(t){var a=t;do{if((a.flags&32768)!==0){Nb(a,Va);return}t=a.return;var o=HS(a.alternate,a,ba);if(o!==null){ke=o;return}if(a=a.sibling,a!==null){ke=a;return}ke=a=t}while(a!==null);ot===0&&(ot=5)}function Nb(t,a){do{var o=qS(t.alternate,t);if(o!==null){o.flags&=32767,ke=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){ke=t;return}ke=t=o}while(t!==null);ot=6,ke=null}function Mb(t,a,o,l,d,m,x,A,z){t.cancelPendingCommit=null;do Kl();while(xt!==0);if((He&6)!==0)throw Error(s(327));if(a!==null){if(a===t.current)throw Error(s(177));if(m=a.lanes|a.childLanes,m|=uf,D2(t,o,m,x,A,z),t===We&&(ke=We=null,Ue=0),ws=a,Ha=t,ya=o,bd=m,yd=d,yb=l,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,nw(Fe,function(){return kb(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||l){l=_.T,_.T=null,d=K.p,K.p=2,x=He,He|=4;try{GS(t,a,o)}finally{He=x,K.p=d,_.T=l}}xt=1,Tb(),Db(),Rb()}}function Tb(){if(xt===1){xt=0;var t=Ha,a=ws,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=_.T,_.T=null;var l=K.p;K.p=2;var d=He;He|=4;try{cb(a,t);var m=zd,x=gp(t.containerInfo),A=m.focusedElem,z=m.selectionRange;if(x!==A&&A&&A.ownerDocument&&pp(A.ownerDocument.documentElement,A)){if(z!==null&&af(A)){var H=z.start,Q=z.end;if(Q===void 0&&(Q=H),"selectionStart"in A)A.selectionStart=H,A.selectionEnd=Math.min(Q,A.value.length);else{var ee=A.ownerDocument||document,G=ee&&ee.defaultView||window;if(G.getSelection){var $=G.getSelection(),ve=A.textContent.length,Ne=Math.min(z.start,ve),Ze=z.end===void 0?Ne:Math.min(z.end,ve);!$.extend&&Ne>Ze&&(x=Ze,Ze=Ne,Ne=x);var P=mp(A,Ne),L=mp(A,Ze);if(P&&L&&($.rangeCount!==1||$.anchorNode!==P.node||$.anchorOffset!==P.offset||$.focusNode!==L.node||$.focusOffset!==L.offset)){var F=ee.createRange();F.setStart(P.node,P.offset),$.removeAllRanges(),Ne>Ze?($.addRange(F),$.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),$.addRange(F))}}}}for(ee=[],$=A;$=$.parentNode;)$.nodeType===1&&ee.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ee.length;A++){var W=ee[A];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}lu=!!Rd,zd=Rd=null}finally{He=d,K.p=l,_.T=o}}t.current=a,xt=2}}function Db(){if(xt===2){xt=0;var t=Ha,a=ws,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=_.T,_.T=null;var l=K.p;K.p=2;var d=He;He|=4;try{sb(t,a.alternate,a)}finally{He=d,K.p=l,_.T=o}}xt=3}}function Rb(){if(xt===4||xt===3){xt=0,ye();var t=Ha,a=ws,o=ya,l=yb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?xt=5:(xt=0,ws=Ha=null,zb(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Fa=null),_c(o),a=a.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(ta,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=_.T,d=K.p,K.p=2,_.T=null;try{for(var m=t.onRecoverableError,x=0;x<l.length;x++){var A=l[x];m(A.value,{componentStack:A.stack})}}finally{_.T=a,K.p=d}}(ya&3)!==0&&Kl(),qn(t),d=t.pendingLanes,(o&261930)!==0&&(d&42)!==0?t===vd?zi++:(zi=0,vd=t):zi=0,ki(0)}}function zb(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,mi(a)))}function Kl(){return Tb(),Db(),Rb(),kb()}function kb(){if(xt!==5)return!1;var t=Ha,a=bd;bd=0;var o=_c(ya),l=_.T,d=K.p;try{K.p=32>o?32:o,_.T=null,o=yd,yd=null;var m=Ha,x=ya;if(xt=0,ws=Ha=null,ya=0,(He&6)!==0)throw Error(s(331));var A=He;if(He|=4,pb(m.current),db(m,m.current,x,o),He=A,ki(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(ta,m)}catch{}return!0}finally{K.p=d,_.T=l,zb(t,a)}}function Lb(t,a,o){a=xn(o,a),a=Zf(t.stateNode,a,2),t=Ua(t,a,2),t!==null&&(ei(t,2),qn(t))}function Ye(t,a,o){if(t.tag===3)Lb(t,t,o);else for(;a!==null;){if(a.tag===3){Lb(a,t,o);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Fa===null||!Fa.has(l))){t=xn(o,t),o=Ug(2),l=Ua(a,o,2),l!==null&&(Ig(o,l,a,t),ei(l,2),qn(l));break}}a=a.return}}function wd(t,a,o){var l=t.pingCache;if(l===null){l=t.pingCache=new QS;var d=new Set;l.set(a,d)}else d=l.get(a),d===void 0&&(d=new Set,l.set(a,d));d.has(o)||(md=!0,d.add(o),t=WS.bind(null,t,a,o),a.then(t,t))}function WS(t,a,o){var l=t.pingCache;l!==null&&l.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,We===t&&(Ue&o)===o&&(ot===4||ot===3&&(Ue&62914560)===Ue&&300>ue()-ql?(He&2)===0&&Cs(t,0):pd|=o,Ss===Ue&&(Ss=0)),qn(t)}function Ub(t,a){a===0&&(a=Tm()),t=gr(t,a),t!==null&&(ei(t,a),qn(t))}function ew(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),Ub(t,o)}function tw(t,a){var o=0;switch(t.tag){case 31:case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(o=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(a),Ub(t,o)}function nw(t,a){return k(t,a)}var Zl=null,Os=null,Cd=!1,Jl=!1,Ed=!1,Ga=0;function qn(t){t!==Os&&t.next===null&&(Os===null?Zl=Os=t:Os=Os.next=t),Jl=!0,Cd||(Cd=!0,rw())}function ki(t,a){if(!Ed&&Jl){Ed=!0;do for(var o=!1,l=Zl;l!==null;){if(t!==0){var d=l.pendingLanes;if(d===0)var m=0;else{var x=l.suspendedLanes,A=l.pingedLanes;m=(1<<31-kt(42|t)+1)-1,m&=d&~(x&~A),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(o=!0,Vb(l,m))}else m=Ue,m=nl(l,l===We?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Ws(l,m)||(o=!0,Vb(l,m));l=l.next}while(o);Ed=!1}}function aw(){Ib()}function Ib(){Jl=Cd=!1;var t=0;Ga!==0&&mw()&&(t=Ga);for(var a=ue(),o=null,l=Zl;l!==null;){var d=l.next,m=_b(l,a);m===0?(l.next=null,o===null?Zl=d:o.next=d,d===null&&(Os=o)):(o=l,(t!==0||(m&3)!==0)&&(Jl=!0)),l=d}xt!==0&&xt!==5||ki(t),Ga!==0&&(Ga=0)}function _b(t,a){for(var o=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var x=31-kt(m),A=1<<x,z=d[x];z===-1?((A&o)===0||(A&l)!==0)&&(d[x]=T2(A,a)):z<=a&&(t.expiredLanes|=A),m&=~A}if(a=We,o=Ue,o=nl(t,t===a?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,o===0||t===a&&($e===2||$e===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&q(l),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||Ws(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(l!==null&&q(l),_c(o)){case 2:case 8:o=Pe;break;case 32:o=Fe;break;case 268435456:o=cr;break;default:o=Fe}return l=Pb.bind(null,t),o=k(o,l),t.callbackPriority=a,t.callbackNode=o,a}return l!==null&&l!==null&&q(l),t.callbackPriority=2,t.callbackNode=null,2}function Pb(t,a){if(xt!==0&&xt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Kl()&&t.callbackNode!==o)return null;var l=Ue;return l=nl(t,t===We?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(xb(t,l,a),_b(t,ue()),t.callbackNode!=null&&t.callbackNode===o?Pb.bind(null,t):null)}function Vb(t,a){if(Kl())return null;xb(t,a,!0)}function rw(){gw(function(){(He&6)!==0?k(Ce,aw):Ib()})}function Od(){if(Ga===0){var t=cs;t===0&&(t=Wo,Wo<<=1,(Wo&261888)===0&&(Wo=256)),Ga=t}return Ga}function Bb(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:il(""+t)}function Fb(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function sw(t,a,o,l,d){if(a==="submit"&&o&&o.stateNode===d){var m=Bb((d[$t]||null).action),x=l.submitter;x&&(a=(a=x[$t]||null)?Bb(a.formAction):x.getAttribute("formAction"),a!==null&&(m=a,x=null));var A=new cl("action","action",null,l,d);t.push({event:A,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ga!==0){var z=x?Fb(d,x):new FormData(d);Gf(o,{pending:!0,data:z,method:d.method,action:m},null,z)}}else typeof m=="function"&&(A.preventDefault(),z=x?Fb(d,x):new FormData(d),Gf(o,{pending:!0,data:z,method:d.method,action:m},m,z))},currentTarget:d}]})}}for(var Ad=0;Ad<lf.length;Ad++){var jd=lf[Ad],iw=jd.toLowerCase(),ow=jd[0].toUpperCase()+jd.slice(1);Tn(iw,"on"+ow)}Tn(vp,"onAnimationEnd"),Tn(xp,"onAnimationIteration"),Tn(Sp,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(CS,"onTransitionRun"),Tn(ES,"onTransitionStart"),Tn(OS,"onTransitionCancel"),Tn(wp,"onTransitionEnd"),Kr("onMouseEnter",["mouseout","mouseover"]),Kr("onMouseLeave",["mouseout","mouseover"]),Kr("onPointerEnter",["pointerout","pointerover"]),Kr("onPointerLeave",["pointerout","pointerover"]),dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dr("onBeforeInput",["compositionend","keypress","textInput","paste"]),dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),lw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function Hb(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var l=t[o],d=l.event;l=l.listeners;e:{var m=void 0;if(a)for(var x=l.length-1;0<=x;x--){var A=l[x],z=A.instance,H=A.currentTarget;if(A=A.listener,z!==m&&d.isPropagationStopped())break e;m=A,d.currentTarget=H;try{m(d)}catch(Q){hl(Q)}d.currentTarget=null,m=z}else for(x=0;x<l.length;x++){if(A=l[x],z=A.instance,H=A.currentTarget,A=A.listener,z!==m&&d.isPropagationStopped())break e;m=A,d.currentTarget=H;try{m(d)}catch(Q){hl(Q)}d.currentTarget=null,m=z}}}}function Le(t,a){var o=a[Pc];o===void 0&&(o=a[Pc]=new Set);var l=t+"__bubble";o.has(l)||(qb(a,t,2,!1),o.add(l))}function Nd(t,a,o){var l=0;a&&(l|=4),qb(o,t,l,a)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function Md(t){if(!t[Wl]){t[Wl]=!0,Im.forEach(function(o){o!=="selectionchange"&&(lw.has(o)||Nd(o,!1,t),Nd(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Wl]||(a[Wl]=!0,Nd("selectionchange",!1,a))}}function qb(t,a,o,l){switch(vy(a)){case 2:var d=Uw;break;case 8:d=Iw;break;default:d=qd}o=d.bind(null,a,o,t),d=void 0,!Qc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(a,o,{capture:!0,passive:d}):t.addEventListener(a,o,!0):d!==void 0?t.addEventListener(a,o,{passive:d}):t.addEventListener(a,o,!1)}function Td(t,a,o,l,d){var m=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var A=l.stateNode.containerInfo;if(A===d)break;if(x===4)for(x=l.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;A!==null;){if(x=Yr(A),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){l=m=x;continue e}A=A.parentNode}}l=l.return}Xm(function(){var H=m,Q=$c(o),ee=[];e:{var G=Cp.get(t);if(G!==void 0){var $=cl,ve=t;switch(t){case"keypress":if(ll(o)===0)break e;case"keydown":case"keyup":$=tS;break;case"focusin":ve="focus",$=Jc;break;case"focusout":ve="blur",$=Jc;break;case"beforeblur":case"afterblur":$=Jc;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=Jm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=H2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=rS;break;case vp:case xp:case Sp:$=$2;break;case wp:$=iS;break;case"scroll":case"scrollend":$=B2;break;case"wheel":$=lS;break;case"copy":case"cut":case"paste":$=Q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=ep;break;case"toggle":case"beforetoggle":$=cS}var Ne=(a&4)!==0,Ze=!Ne&&(t==="scroll"||t==="scrollend"),P=Ne?G!==null?G+"Capture":null:G;Ne=[];for(var L=H,F;L!==null;){var W=L;if(F=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||F===null||P===null||(W=ai(L,P),W!=null&&Ne.push(Ui(L,W,F))),Ze)break;L=L.return}0<Ne.length&&(G=new $(G,ve,null,o,Q),ee.push({event:G,listeners:Ne}))}}if((a&7)===0){e:{if(G=t==="mouseover"||t==="pointerover",$=t==="mouseout"||t==="pointerout",G&&o!==Gc&&(ve=o.relatedTarget||o.fromElement)&&(Yr(ve)||ve[$r]))break e;if(($||G)&&(G=Q.window===Q?Q:(G=Q.ownerDocument)?G.defaultView||G.parentWindow:window,$?(ve=o.relatedTarget||o.toElement,$=H,ve=ve?Yr(ve):null,ve!==null&&(Ze=u(ve),Ne=ve.tag,ve!==Ze||Ne!==5&&Ne!==27&&Ne!==6)&&(ve=null)):($=null,ve=H),$!==ve)){if(Ne=Jm,W="onMouseLeave",P="onMouseEnter",L="mouse",(t==="pointerout"||t==="pointerover")&&(Ne=ep,W="onPointerLeave",P="onPointerEnter",L="pointer"),Ze=$==null?G:ni($),F=ve==null?G:ni(ve),G=new Ne(W,L+"leave",$,o,Q),G.target=Ze,G.relatedTarget=F,W=null,Yr(Q)===H&&(Ne=new Ne(P,L+"enter",ve,o,Q),Ne.target=F,Ne.relatedTarget=Ze,W=Ne),Ze=W,$&&ve)t:{for(Ne=uw,P=$,L=ve,F=0,W=P;W;W=Ne(W))F++;W=0;for(var Ee=L;Ee;Ee=Ne(Ee))W++;for(;0<F-W;)P=Ne(P),F--;for(;0<W-F;)L=Ne(L),W--;for(;F--;){if(P===L||L!==null&&P===L.alternate){Ne=P;break t}P=Ne(P),L=Ne(L)}Ne=null}else Ne=null;$!==null&&Gb(ee,G,$,Ne,!1),ve!==null&&Ze!==null&&Gb(ee,Ze,ve,Ne,!0)}}e:{if(G=H?ni(H):window,$=G.nodeName&&G.nodeName.toLowerCase(),$==="select"||$==="input"&&G.type==="file")var Ve=lp;else if(ip(G))if(up)Ve=xS;else{Ve=yS;var Se=bS}else $=G.nodeName,!$||$.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&qc(H.elementType)&&(Ve=lp):Ve=vS;if(Ve&&(Ve=Ve(t,H))){op(ee,Ve,o,Q);break e}Se&&Se(t,G,H),t==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&Hc(G,"number",G.value)}switch(Se=H?ni(H):window,t){case"focusin":(ip(Se)||Se.contentEditable==="true")&&(ns=Se,rf=H,fi=null);break;case"focusout":fi=rf=ns=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,bp(ee,o,Q);break;case"selectionchange":if(wS)break;case"keydown":case"keyup":bp(ee,o,Q)}var ze;if(ef)e:{switch(t){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ts?rp(t,o)&&(Ie="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Ie="onCompositionStart");Ie&&(tp&&o.locale!=="ko"&&(ts||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ts&&(ze=Km()):(Ma=Q,Xc="value"in Ma?Ma.value:Ma.textContent,ts=!0)),Se=eu(H,Ie),0<Se.length&&(Ie=new Wm(Ie,t,null,o,Q),ee.push({event:Ie,listeners:Se}),ze?Ie.data=ze:(ze=sp(o),ze!==null&&(Ie.data=ze)))),(ze=dS?hS(t,o):mS(t,o))&&(Ie=eu(H,"onBeforeInput"),0<Ie.length&&(Se=new Wm("onBeforeInput","beforeinput",null,o,Q),ee.push({event:Se,listeners:Ie}),Se.data=ze)),sw(ee,t,H,o,Q)}Hb(ee,a)})}function Ui(t,a,o){return{instance:t,listener:a,currentTarget:o}}function eu(t,a){for(var o=a+"Capture",l=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=ai(t,o),d!=null&&l.unshift(Ui(t,d,m)),d=ai(t,a),d!=null&&l.push(Ui(t,d,m))),t.tag===3)return l;t=t.return}return[]}function uw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Gb(t,a,o,l,d){for(var m=a._reactName,x=[];o!==null&&o!==l;){var A=o,z=A.alternate,H=A.stateNode;if(A=A.tag,z!==null&&z===l)break;A!==5&&A!==26&&A!==27||H===null||(z=H,d?(H=ai(o,m),H!=null&&x.unshift(Ui(o,H,z))):d||(H=ai(o,m),H!=null&&x.push(Ui(o,H,z)))),o=o.return}x.length!==0&&t.push({event:a,listeners:x})}var cw=/\r\n?/g,fw=/\u0000|\uFFFD/g;function $b(t){return(typeof t=="string"?t:""+t).replace(cw,`
|
|
9
|
+
`).replace(fw,"")}function Yb(t,a){return a=$b(a),$b(t)===a}function Ke(t,a,o,l,d,m){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Jr(t,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Jr(t,""+l);break;case"className":rl(t,"class",l);break;case"tabIndex":rl(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(t,o,l);break;case"style":Ym(t,l,m);break;case"data":if(a!=="object"){rl(t,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=il(""+l),t.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(o,"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 m=="function"&&(o==="formAction"?(a!=="input"&&Ke(t,a,"name",d.name,d,null),Ke(t,a,"formEncType",d.formEncType,d,null),Ke(t,a,"formMethod",d.formMethod,d,null),Ke(t,a,"formTarget",d.formTarget,d,null)):(Ke(t,a,"encType",d.encType,d,null),Ke(t,a,"method",d.method,d,null),Ke(t,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=il(""+l),t.setAttribute(o,l);break;case"onClick":l!=null&&(t.onclick=aa);break;case"onScroll":l!=null&&Le("scroll",t);break;case"onScrollEnd":l!=null&&Le("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}o=il(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""+l):t.removeAttribute(o);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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":l===!0?t.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,l):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(o,l):t.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(o):t.setAttribute(o,l);break;case"popover":Le("beforetoggle",t),Le("toggle",t),al(t,"popover",l);break;case"xlinkActuate":na(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":na(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":na(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":na(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":na(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":na(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":na(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":na(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":na(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":al(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=P2.get(o)||o,al(t,o,l))}}function Dd(t,a,o,l,d,m){switch(o){case"style":Ym(t,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"children":typeof l=="string"?Jr(t,l):(typeof l=="number"||typeof l=="bigint")&&Jr(t,""+l);break;case"onScroll":l!=null&&Le("scroll",t);break;case"onScrollEnd":l!=null&&Le("scrollend",t);break;case"onClick":l!=null&&(t.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_m.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(d=o.endsWith("Capture"),a=o.slice(2,d?o.length-7:void 0),m=t[$t]||null,m=m!=null?m[o]:null,typeof m=="function"&&t.removeEventListener(a,m,d),typeof l=="function")){typeof m!="function"&&m!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,l,d);break e}o in t?t[o]=l:l===!0?t.setAttribute(o,""):al(t,o,l)}}}function Dt(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",t),Le("load",t);var l=!1,d=!1,m;for(m in o)if(o.hasOwnProperty(m)){var x=o[m];if(x!=null)switch(m){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,m,x,o,null)}}d&&Ke(t,a,"srcSet",o.srcSet,o,null),l&&Ke(t,a,"src",o.src,o,null);return;case"input":Le("invalid",t);var A=m=x=d=null,z=null,H=null;for(l in o)if(o.hasOwnProperty(l)){var Q=o[l];if(Q!=null)switch(l){case"name":d=Q;break;case"type":x=Q;break;case"checked":z=Q;break;case"defaultChecked":H=Q;break;case"value":m=Q;break;case"defaultValue":A=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(s(137,a));break;default:Ke(t,a,l,Q,o,null)}}Hm(t,m,A,z,H,x,d,!1);return;case"select":Le("invalid",t),l=x=m=null;for(d in o)if(o.hasOwnProperty(d)&&(A=o[d],A!=null))switch(d){case"value":m=A;break;case"defaultValue":x=A;break;case"multiple":l=A;default:Ke(t,a,d,A,o,null)}a=m,o=x,t.multiple=!!l,a!=null?Zr(t,!!l,a,!1):o!=null&&Zr(t,!!l,o,!0);return;case"textarea":Le("invalid",t),m=d=l=null;for(x in o)if(o.hasOwnProperty(x)&&(A=o[x],A!=null))switch(x){case"value":l=A;break;case"defaultValue":d=A;break;case"children":m=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(91));break;default:Ke(t,a,x,A,o,null)}Gm(t,l,d,m);return;case"option":for(z in o)if(o.hasOwnProperty(z)&&(l=o[z],l!=null))switch(z){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(t,a,z,l,o,null)}return;case"dialog":Le("beforetoggle",t),Le("toggle",t),Le("cancel",t),Le("close",t);break;case"iframe":case"object":Le("load",t);break;case"video":case"audio":for(l=0;l<Li.length;l++)Le(Li[l],t);break;case"image":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"embed":case"source":case"link":Le("error",t),Le("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in o)if(o.hasOwnProperty(H)&&(l=o[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,H,l,o,null)}return;default:if(qc(a)){for(Q in o)o.hasOwnProperty(Q)&&(l=o[Q],l!==void 0&&Dd(t,a,Q,l,o,void 0));return}}for(A in o)o.hasOwnProperty(A)&&(l=o[A],l!=null&&Ke(t,a,A,l,o,null))}function dw(t,a,o,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,x=null,A=null,z=null,H=null,Q=null;for($ in o){var ee=o[$];if(o.hasOwnProperty($)&&ee!=null)switch($){case"checked":break;case"value":break;case"defaultValue":z=ee;default:l.hasOwnProperty($)||Ke(t,a,$,null,l,ee)}}for(var G in l){var $=l[G];if(ee=o[G],l.hasOwnProperty(G)&&($!=null||ee!=null))switch(G){case"type":m=$;break;case"name":d=$;break;case"checked":H=$;break;case"defaultChecked":Q=$;break;case"value":x=$;break;case"defaultValue":A=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(s(137,a));break;default:$!==ee&&Ke(t,a,G,$,l,ee)}}Fc(t,x,A,z,H,Q,m,d);return;case"select":$=x=A=G=null;for(m in o)if(z=o[m],o.hasOwnProperty(m)&&z!=null)switch(m){case"value":break;case"multiple":$=z;default:l.hasOwnProperty(m)||Ke(t,a,m,null,l,z)}for(d in l)if(m=l[d],z=o[d],l.hasOwnProperty(d)&&(m!=null||z!=null))switch(d){case"value":G=m;break;case"defaultValue":A=m;break;case"multiple":x=m;default:m!==z&&Ke(t,a,d,m,l,z)}a=A,o=x,l=$,G!=null?Zr(t,!!o,G,!1):!!l!=!!o&&(a!=null?Zr(t,!!o,a,!0):Zr(t,!!o,o?[]:"",!1));return;case"textarea":$=G=null;for(A in o)if(d=o[A],o.hasOwnProperty(A)&&d!=null&&!l.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Ke(t,a,A,null,l,d)}for(x in l)if(d=l[x],m=o[x],l.hasOwnProperty(x)&&(d!=null||m!=null))switch(x){case"value":G=d;break;case"defaultValue":$=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==m&&Ke(t,a,x,d,l,m)}qm(t,G,$);return;case"option":for(var ve in o)if(G=o[ve],o.hasOwnProperty(ve)&&G!=null&&!l.hasOwnProperty(ve))switch(ve){case"selected":t.selected=!1;break;default:Ke(t,a,ve,null,l,G)}for(z in l)if(G=l[z],$=o[z],l.hasOwnProperty(z)&&G!==$&&(G!=null||$!=null))switch(z){case"selected":t.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ke(t,a,z,G,l,$)}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 Ne in o)G=o[Ne],o.hasOwnProperty(Ne)&&G!=null&&!l.hasOwnProperty(Ne)&&Ke(t,a,Ne,null,l,G);for(H in l)if(G=l[H],$=o[H],l.hasOwnProperty(H)&&G!==$&&(G!=null||$!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,a));break;default:Ke(t,a,H,G,l,$)}return;default:if(qc(a)){for(var Ze in o)G=o[Ze],o.hasOwnProperty(Ze)&&G!==void 0&&!l.hasOwnProperty(Ze)&&Dd(t,a,Ze,void 0,l,G);for(Q in l)G=l[Q],$=o[Q],!l.hasOwnProperty(Q)||G===$||G===void 0&&$===void 0||Dd(t,a,Q,G,l,$);return}}for(var P in o)G=o[P],o.hasOwnProperty(P)&&G!=null&&!l.hasOwnProperty(P)&&Ke(t,a,P,null,l,G);for(ee in l)G=l[ee],$=o[ee],!l.hasOwnProperty(ee)||G===$||G==null&&$==null||Ke(t,a,ee,G,l,$)}function Qb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var d=o[l],m=d.transferSize,x=d.initiatorType,A=d.duration;if(m&&A&&Qb(x)){for(x=0,A=d.responseEnd,l+=1;l<o.length;l++){var z=o[l],H=z.startTime;if(H>A)break;var Q=z.transferSize,ee=z.initiatorType;Q&&Qb(ee)&&(z=z.responseEnd,x+=Q*(z<A?1:(A-H)/(z-H)))}if(--l,a+=8*(m+x)/(d.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Rd=null,zd=null;function tu(t){return t.nodeType===9?t:t.ownerDocument}function Xb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kb(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function kd(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Ld=null;function mw(){var t=window.event;return t&&t.type==="popstate"?t===Ld?!1:(Ld=t,!0):(Ld=null,!1)}var Zb=typeof setTimeout=="function"?setTimeout:void 0,pw=typeof clearTimeout=="function"?clearTimeout:void 0,Jb=typeof Promise=="function"?Promise:void 0,gw=typeof queueMicrotask=="function"?queueMicrotask:typeof Jb<"u"?function(t){return Jb.resolve(null).then(t).catch(bw)}:Zb;function bw(t){setTimeout(function(){throw t})}function $a(t){return t==="head"}function Wb(t,a){var o=a,l=0;do{var d=o.nextSibling;if(t.removeChild(o),d&&d.nodeType===8)if(o=d.data,o==="/$"||o==="/&"){if(l===0){t.removeChild(d),Ms(a);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")Ii(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,Ii(o);for(var m=o.firstChild;m;){var x=m.nextSibling,A=m.nodeName;m[ti]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&m.rel.toLowerCase()==="stylesheet"||o.removeChild(m),m=x}}else o==="body"&&Ii(t.ownerDocument.body);o=d}while(o);Ms(a)}function ey(t,a){var o=t;t=0;do{var l=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(t===0)break;t--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||t++;o=l}while(o)}function Ud(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Ud(o),Vc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function yw(t,a,o,l){for(;t.nodeType===1;){var d=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[ti])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function vw(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=On(t.nextSibling),t===null))return null;return t}function ty(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=On(t.nextSibling),t===null))return null;return t}function Id(t){return t.data==="$?"||t.data==="$~"}function _d(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function xw(t,a){var o=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||o.readyState!=="loading")a();else{var l=function(){a(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function On(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var Pd=null;function ny(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"||o==="/&"){if(a===0)return On(t.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}t=t.nextSibling}return null}function ay(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return t;a--}else o!=="/$"&&o!=="/&"||a++}t=t.previousSibling}return null}function ry(t,a,o){switch(a=tu(o),t){case"html":if(t=a.documentElement,!t)throw Error(s(452));return t;case"head":if(t=a.head,!t)throw Error(s(453));return t;case"body":if(t=a.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function Ii(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Vc(t)}var An=new Map,sy=new Set;function nu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var va=K.d;K.d={f:Sw,r:ww,D:Cw,C:Ew,L:Ow,m:Aw,X:Nw,S:jw,M:Mw};function Sw(){var t=va.f(),a=Yl();return t||a}function ww(t){var a=Qr(t);a!==null&&a.tag===5&&a.type==="form"?wg(a):va.r(t)}var As=typeof document>"u"?null:document;function iy(t,a,o){var l=As;if(l&&typeof a=="string"&&a){var d=yn(a);d='link[rel="'+t+'"][href="'+d+'"]',typeof o=="string"&&(d+='[crossorigin="'+o+'"]'),sy.has(d)||(sy.add(d),t={rel:t,crossOrigin:o,href:a},l.querySelector(d)===null&&(a=l.createElement("link"),Dt(a,"link",t),Ct(a),l.head.appendChild(a)))}}function Cw(t){va.D(t),iy("dns-prefetch",t,null)}function Ew(t,a){va.C(t,a),iy("preconnect",t,a)}function Ow(t,a,o){va.L(t,a,o);var l=As;if(l&&t&&a){var d='link[rel="preload"][as="'+yn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(d+='[imagesrcset="'+yn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(d+='[imagesizes="'+yn(o.imageSizes)+'"]')):d+='[href="'+yn(t)+'"]';var m=d;switch(a){case"style":m=js(t);break;case"script":m=Ns(t)}An.has(m)||(t=y({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),An.set(m,t),l.querySelector(d)!==null||a==="style"&&l.querySelector(_i(m))||a==="script"&&l.querySelector(Pi(m))||(a=l.createElement("link"),Dt(a,"link",t),Ct(a),l.head.appendChild(a)))}}function Aw(t,a){va.m(t,a);var o=As;if(o&&t){var l=a&&typeof a.as=="string"?a.as:"script",d='link[rel="modulepreload"][as="'+yn(l)+'"][href="'+yn(t)+'"]',m=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ns(t)}if(!An.has(m)&&(t=y({rel:"modulepreload",href:t},a),An.set(m,t),o.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Pi(m)))return}l=o.createElement("link"),Dt(l,"link",t),Ct(l),o.head.appendChild(l)}}}function jw(t,a,o){va.S(t,a,o);var l=As;if(l&&t){var d=Xr(l).hoistableStyles,m=js(t);a=a||"default";var x=d.get(m);if(!x){var A={loading:0,preload:null};if(x=l.querySelector(_i(m)))A.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":a},o),(o=An.get(m))&&Vd(t,o);var z=x=l.createElement("link");Ct(z),Dt(z,"link",t),z._p=new Promise(function(H,Q){z.onload=H,z.onerror=Q}),z.addEventListener("load",function(){A.loading|=1}),z.addEventListener("error",function(){A.loading|=2}),A.loading|=4,au(x,a,l)}x={type:"stylesheet",instance:x,count:1,state:A},d.set(m,x)}}}function Nw(t,a){va.X(t,a);var o=As;if(o&&t){var l=Xr(o).hoistableScripts,d=Ns(t),m=l.get(d);m||(m=o.querySelector(Pi(d)),m||(t=y({src:t,async:!0},a),(a=An.get(d))&&Bd(t,a),m=o.createElement("script"),Ct(m),Dt(m,"link",t),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function Mw(t,a){va.M(t,a);var o=As;if(o&&t){var l=Xr(o).hoistableScripts,d=Ns(t),m=l.get(d);m||(m=o.querySelector(Pi(d)),m||(t=y({src:t,async:!0,type:"module"},a),(a=An.get(d))&&Bd(t,a),m=o.createElement("script"),Ct(m),Dt(m,"link",t),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function oy(t,a,o,l){var d=(d=pe.current)?nu(d):null;if(!d)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=js(o.href),o=Xr(d).hoistableStyles,l=o.get(a),l||(l={type:"style",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=js(o.href);var m=Xr(d).hoistableStyles,x=m.get(t);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,x),(m=d.querySelector(_i(t)))&&!m._p&&(x.instance=m,x.state.loading=5),An.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},An.set(t,o),m||Tw(d,t,o,x.state))),a&&l===null)throw Error(s(528,""));return x}if(a&&l!==null)throw Error(s(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ns(o),o=Xr(d).hoistableScripts,l=o.get(a),l||(l={type:"script",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function js(t){return'href="'+yn(t)+'"'}function _i(t){return'link[rel="stylesheet"]['+t+"]"}function ly(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function Tw(t,a,o,l){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=t.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),Dt(a,"link",o),Ct(a),t.head.appendChild(a))}function Ns(t){return'[src="'+yn(t)+'"]'}function Pi(t){return"script[async]"+t}function uy(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var l=t.querySelector('style[data-href~="'+yn(o.href)+'"]');if(l)return a.instance=l,Ct(l),l;var d=y({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Ct(l),Dt(l,"style",d),au(l,o.precedence,t),a.instance=l;case"stylesheet":d=js(o.href);var m=t.querySelector(_i(d));if(m)return a.state.loading|=4,a.instance=m,Ct(m),m;l=ly(o),(d=An.get(d))&&Vd(l,d),m=(t.ownerDocument||t).createElement("link"),Ct(m);var x=m;return x._p=new Promise(function(A,z){x.onload=A,x.onerror=z}),Dt(m,"link",l),a.state.loading|=4,au(m,o.precedence,t),a.instance=m;case"script":return m=Ns(o.src),(d=t.querySelector(Pi(m)))?(a.instance=d,Ct(d),d):(l=o,(d=An.get(m))&&(l=y({},o),Bd(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),Ct(d),Dt(d,"link",l),t.head.appendChild(d),a.instance=d);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,au(l,o.precedence,t));return a.instance}function au(t,a,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,m=d,x=0;x<l.length;x++){var A=l[x];if(A.dataset.precedence===a)m=A;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function Vd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Bd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var ru=null;function cy(t,a,o){if(ru===null){var l=new Map,d=ru=new Map;d.set(o,l)}else d=ru,l=d.get(o),l||(l=new Map,d.set(o,l));if(l.has(t))return l;for(l.set(t,null),o=o.getElementsByTagName(t),d=0;d<o.length;d++){var m=o[d];if(!(m[ti]||m[jt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(a)||"";x=t+x;var A=l.get(x);A?A.push(m):l.set(x,[m])}}return l}function fy(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function Dw(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function dy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Rw(t,a,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var d=js(l.href),m=a.querySelector(_i(d));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=su.bind(t),a.then(t,t)),o.state.loading|=4,o.instance=m,Ct(m);return}m=a.ownerDocument||a,l=ly(l),(d=An.get(d))&&Vd(l,d),m=m.createElement("link"),Ct(m);var x=m;x._p=new Promise(function(A,z){x.onload=A,x.onerror=z}),Dt(m,"link",l),o.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=su.bind(t),a.addEventListener("load",o),a.addEventListener("error",o))}}var Fd=0;function zw(t,a){return t.stylesheets&&t.count===0&&ou(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var l=setTimeout(function(){if(t.stylesheets&&ou(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&Fd===0&&(Fd=62500*hw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ou(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Fd?50:800)+a);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ou(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var iu=null;function ou(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,iu=new Map,a.forEach(kw,t),iu=null,su.call(t))}function kw(t,a){if(!(a.state.loading&4)){var o=iu.get(t);if(o)var l=o.get(null);else{o=new Map,iu.set(t,o);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var x=d[m];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(o.set(x.dataset.precedence,x),l=x)}l&&o.set(null,l)}d=a.instance,x=d.getAttribute("data-precedence"),m=o.get(x)||l,m===l&&o.set(null,d),o.set(x,d),this.count++,l=su.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),a.state.loading|=4}}var Vi={$$typeof:T,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Lw(t,a,o,l,d,m,x,A,z){this.tag=1,this.containerInfo=t,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=Uc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uc(0),this.hiddenUpdates=Uc(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function hy(t,a,o,l,d,m,x,A,z,H,Q,ee){return t=new Lw(t,a,o,x,z,H,Q,ee,A),a=1,m===!0&&(a|=24),m=sn(3,null,null,a),t.current=m,m.stateNode=t,a=Sf(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:l,isDehydrated:o,cache:a},Of(m),t}function my(t){return t?(t=ss,t):ss}function py(t,a,o,l,d,m){d=my(d),l.context===null?l.context=d:l.pendingContext=d,l=La(a),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=Ua(t,l,a),o!==null&&(Jt(o,t,a),yi(o,t,a))}function gy(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function Hd(t,a){gy(t,a),(t=t.alternate)&&gy(t,a)}function by(t){if(t.tag===13||t.tag===31){var a=gr(t,67108864);a!==null&&Jt(a,t,67108864),Hd(t,67108864)}}function yy(t){if(t.tag===13||t.tag===31){var a=fn();a=Ic(a);var o=gr(t,a);o!==null&&Jt(o,t,a),Hd(t,a)}}var lu=!0;function Uw(t,a,o,l){var d=_.T;_.T=null;var m=K.p;try{K.p=2,qd(t,a,o,l)}finally{K.p=m,_.T=d}}function Iw(t,a,o,l){var d=_.T;_.T=null;var m=K.p;try{K.p=8,qd(t,a,o,l)}finally{K.p=m,_.T=d}}function qd(t,a,o,l){if(lu){var d=Gd(l);if(d===null)Td(t,a,l,uu,o),xy(t,l);else if(Pw(d,t,a,o,l))l.stopPropagation();else if(xy(t,l),a&4&&-1<_w.indexOf(t)){for(;d!==null;){var m=Qr(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=fr(m.pendingLanes);if(x!==0){var A=m;for(A.pendingLanes|=2,A.entangledLanes|=2;x;){var z=1<<31-kt(x);A.entanglements[1]|=z,x&=~z}qn(m),(He&6)===0&&(Gl=ue()+500,ki(0))}}break;case 31:case 13:A=gr(m,2),A!==null&&Jt(A,m,2),Yl(),Hd(m,2)}if(m=Gd(l),m===null&&Td(t,a,l,uu,o),m===d)break;d=m}d!==null&&l.stopPropagation()}else Td(t,a,l,null,o)}}function Gd(t){return t=$c(t),$d(t)}var uu=null;function $d(t){if(uu=null,t=Yr(t),t!==null){var a=u(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=c(a),t!==null)return t;t=null}else if(o===31){if(t=f(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return uu=t,null}function vy(t){switch(t){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(ce()){case Ce:return 2;case Pe:return 8;case Fe:case Gt:return 32;case cr:return 268435456;default:return 32}default:return 32}}var Yd=!1,Ya=null,Qa=null,Xa=null,Bi=new Map,Fi=new Map,Ka=[],_w="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 xy(t,a){switch(t){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Qa=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":Bi.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(a.pointerId)}}function Hi(t,a,o,l,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:o,eventSystemFlags:l,nativeEvent:m,targetContainers:[d]},a!==null&&(a=Qr(a),a!==null&&by(a)),t):(t.eventSystemFlags|=l,a=t.targetContainers,d!==null&&a.indexOf(d)===-1&&a.push(d),t)}function Pw(t,a,o,l,d){switch(a){case"focusin":return Ya=Hi(Ya,t,a,o,l,d),!0;case"dragenter":return Qa=Hi(Qa,t,a,o,l,d),!0;case"mouseover":return Xa=Hi(Xa,t,a,o,l,d),!0;case"pointerover":var m=d.pointerId;return Bi.set(m,Hi(Bi.get(m)||null,t,a,o,l,d)),!0;case"gotpointercapture":return m=d.pointerId,Fi.set(m,Hi(Fi.get(m)||null,t,a,o,l,d)),!0}return!1}function Sy(t){var a=Yr(t.target);if(a!==null){var o=u(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){t.blockedOn=a,Lm(t.priority,function(){yy(o)});return}}else if(a===31){if(a=f(o),a!==null){t.blockedOn=a,Lm(t.priority,function(){yy(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function cu(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=Gd(t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);Gc=l,o.target.dispatchEvent(l),Gc=null}else return a=Qr(o),a!==null&&by(a),t.blockedOn=o,!1;a.shift()}return!0}function wy(t,a,o){cu(t)&&o.delete(a)}function Vw(){Yd=!1,Ya!==null&&cu(Ya)&&(Ya=null),Qa!==null&&cu(Qa)&&(Qa=null),Xa!==null&&cu(Xa)&&(Xa=null),Bi.forEach(wy),Fi.forEach(wy)}function fu(t,a){t.blockedOn===a&&(t.blockedOn=null,Yd||(Yd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Vw)))}var du=null;function Cy(t){du!==t&&(du=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){du===t&&(du=null);for(var a=0;a<t.length;a+=3){var o=t[a],l=t[a+1],d=t[a+2];if(typeof l!="function"){if($d(l||o)===null)continue;break}var m=Qr(o);m!==null&&(t.splice(a,3),a-=3,Gf(m,{pending:!0,data:d,method:o.method,action:l},l,d))}}))}function Ms(t){function a(z){return fu(z,t)}Ya!==null&&fu(Ya,t),Qa!==null&&fu(Qa,t),Xa!==null&&fu(Xa,t),Bi.forEach(a),Fi.forEach(a);for(var o=0;o<Ka.length;o++){var l=Ka[o];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Ka.length&&(o=Ka[0],o.blockedOn===null);)Sy(o),o.blockedOn===null&&Ka.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var d=o[l],m=o[l+1],x=d[$t]||null;if(typeof m=="function")x||Cy(o);else if(x){var A=null;if(m&&m.hasAttribute("formAction")){if(d=m,x=m[$t]||null)A=x.formAction;else if($d(d)!==null)continue}else A=x.action;typeof A=="function"?o[l+1]=A:(o.splice(l,3),l-=3),Cy(o)}}}function Ey(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(x){return d=x})},focusReset:"manual",scroll:"manual"})}function a(){d!==null&&(d(),d=null),l||setTimeout(o,20)}function o(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),d!==null&&(d(),d=null)}}}function Qd(t){this._internalRoot=t}hu.prototype.render=Qd.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(s(409));var o=a.current,l=fn();py(o,l,t,a,null,null)},hu.prototype.unmount=Qd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;py(t.current,2,null,t,null,null),Yl(),a[$r]=null}};function hu(t){this._internalRoot=t}hu.prototype.unstable_scheduleHydration=function(t){if(t){var a=km();t={blockedOn:null,target:t,priority:a};for(var o=0;o<Ka.length&&a!==0&&a<Ka[o].priority;o++);Ka.splice(o,0,t),o===0&&Sy(t)}};var Oy=n.version;if(Oy!=="19.2.0")throw Error(s(527,Oy,"19.2.0"));K.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=p(a),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var Bw={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mu.isDisabled&&mu.supportsFiber)try{ta=mu.inject(Bw),At=mu}catch{}}return Gi.createRoot=function(t,a){if(!i(t))throw Error(s(299));var o=!1,l="",d=Rg,m=zg,x=kg;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=hy(t,1,!1,null,null,o,l,null,d,m,x,Ey),t[$r]=a.current,Md(t),new Qd(a)},Gi.hydrateRoot=function(t,a,o){if(!i(t))throw Error(s(299));var l=!1,d="",m=Rg,x=zg,A=kg,z=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(m=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(A=o.onRecoverableError),o.formState!==void 0&&(z=o.formState)),a=hy(t,1,!0,a,o??null,l,d,z,m,x,A,Ey),a.context=my(null),o=a.current,l=fn(),l=Ic(l),d=La(l),d.callback=null,Ua(o,d,l),o=l,a.current.lanes=o,ei(a,o),qn(a),t[$r]=a.current,Md(t),new hu(a)},Gi.version="19.2.0",Gi}var Ry;function FC(){if(Ry)return Kd.exports;Ry=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(n){console.error(n)}}return e(),Kd.exports=BC(),Kd.exports}var xk=FC();const zy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ky=Yn,HC=(e,n)=>r=>{var s;if(n?.variants==null)return ky(e,r?.class,r?.className);const{variants:i,defaultVariants:u}=n,c=Object.keys(i).map(p=>{const b=r?.[p],y=u?.[p];if(b===null)return null;const v=zy(b)||zy(y);return i[p][v]}),f=r&&Object.entries(r).reduce((p,b)=>{let[y,v]=b;return v===void 0||(p[y]=v),p},{}),h=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((p,b)=>{let{class:y,className:v,...w}=b;return Object.entries(w).every(E=>{let[C,O]=E;return Array.isArray(O)?O.includes({...u,...f}[C]):{...u,...f}[C]===O})?[...p,y,v]:p},[]);return ky(e,c,h,r?.class,r?.className)},qC=HC(xe("inline-flex items-center justify-center gap-2","whitespace-nowrap rounded-md text-sm font-medium","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"),{variants:{variant:{default:"",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),GC=S.forwardRef(({variant:e,className:n,asChild:r=!1,...s},i)=>{const u=r?iC:"button";return g.jsx(u,{className:xe(qC({variant:e,className:n})),ref:i,...s})});var $C=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),YC="VisuallyHidden",$1=S.forwardRef((e,n)=>g.jsx(rr.span,{...e,ref:n,style:{...$C,...e.style}}));$1.displayName=YC;var QC=$1,[dc]=Eh("Tooltip",[cc]),hc=cc(),Y1="TooltipProvider",XC=700,N0="tooltip.open",[KC,Nh]=dc(Y1),Q1=e=>{const{__scopeTooltip:n,delayDuration:r=XC,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:u}=e,c=S.useRef(!0),f=S.useRef(!1),h=S.useRef(0);return S.useEffect(()=>{const p=h.current;return()=>window.clearTimeout(p)},[]),g.jsx(KC,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(h.current),c.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:f,onPointerInTransitChange:S.useCallback(p=>{f.current=p},[]),disableHoverableContent:i,children:u})};Q1.displayName=Y1;var oo="Tooltip",[ZC,Po]=dc(oo),X1=e=>{const{__scopeTooltip:n,children:r,open:s,defaultOpen:i,onOpenChange:u,disableHoverableContent:c,delayDuration:f}=e,h=Nh(oo,e.__scopeTooltip),p=hc(n),[b,y]=S.useState(null),v=Ca(),w=S.useRef(0),E=c??h.disableHoverableContent,C=f??h.delayDuration,O=S.useRef(!1),[M,j]=Oh({prop:s,defaultProp:i??!1,onChange:D=>{D?(h.onOpen(),document.dispatchEvent(new CustomEvent(N0))):h.onClose(),u?.(D)},caller:oo}),T=S.useMemo(()=>M?O.current?"delayed-open":"instant-open":"closed",[M]),U=S.useCallback(()=>{window.clearTimeout(w.current),w.current=0,O.current=!1,j(!0)},[j]),N=S.useCallback(()=>{window.clearTimeout(w.current),w.current=0,j(!1)},[j]),R=S.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{O.current=!0,j(!0),w.current=0},C)},[C,j]);return S.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(P1,{...p,children:g.jsx(ZC,{scope:n,contentId:v,open:M,stateAttribute:T,trigger:b,onTriggerChange:y,onTriggerEnter:S.useCallback(()=>{h.isOpenDelayedRef.current?R():U()},[h.isOpenDelayedRef,R,U]),onTriggerLeave:S.useCallback(()=>{E?N():(window.clearTimeout(w.current),w.current=0)},[N,E]),onOpen:U,onClose:N,disableHoverableContent:E,children:r})})};X1.displayName=oo;var M0="TooltipTrigger",K1=S.forwardRef((e,n)=>{const{__scopeTooltip:r,...s}=e,i=Po(M0,r),u=Nh(M0,r),c=hc(r),f=S.useRef(null),h=fc(n,f,i.onTriggerChange),p=S.useRef(!1),b=S.useRef(!1),y=S.useCallback(()=>p.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Ah,{asChild:!0,...c,children:g.jsx(rr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...s,ref:h,onPointerMove:tn(e.onPointerMove,v=>{v.pointerType!=="touch"&&!b.current&&!u.isPointerInTransitRef.current&&(i.onTriggerEnter(),b.current=!0)}),onPointerLeave:tn(e.onPointerLeave,()=>{i.onTriggerLeave(),b.current=!1}),onPointerDown:tn(e.onPointerDown,()=>{i.open&&i.onClose(),p.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:tn(e.onFocus,()=>{p.current||i.onOpen()}),onBlur:tn(e.onBlur,i.onClose),onClick:tn(e.onClick,i.onClose)})})});K1.displayName=M0;var Mh="TooltipPortal",[JC,WC]=dc(Mh,{forceMount:void 0}),Z1=e=>{const{__scopeTooltip:n,forceMount:r,children:s,container:i}=e,u=Po(Mh,n);return g.jsx(JC,{scope:n,forceMount:r,children:g.jsx(_o,{present:r||u.open,children:g.jsx(V1,{asChild:!0,container:i,children:s})})})};Z1.displayName=Mh;var Hs="TooltipContent",J1=S.forwardRef((e,n)=>{const r=WC(Hs,e.__scopeTooltip),{forceMount:s=r.forceMount,side:i="top",...u}=e,c=Po(Hs,e.__scopeTooltip);return g.jsx(_o,{present:s||c.open,children:c.disableHoverableContent?g.jsx(W1,{side:i,...u,ref:n}):g.jsx(e3,{side:i,...u,ref:n})})}),e3=S.forwardRef((e,n)=>{const r=Po(Hs,e.__scopeTooltip),s=Nh(Hs,e.__scopeTooltip),i=S.useRef(null),u=fc(n,i),[c,f]=S.useState(null),{trigger:h,onClose:p}=r,b=i.current,{onPointerInTransitChange:y}=s,v=S.useCallback(()=>{f(null),y(!1)},[y]),w=S.useCallback((E,C)=>{const O=E.currentTarget,M={x:E.clientX,y:E.clientY},j=s3(M,O.getBoundingClientRect()),T=i3(M,j),U=o3(C.getBoundingClientRect()),N=u3([...T,...U]);f(N),y(!0)},[y]);return S.useEffect(()=>()=>v(),[v]),S.useEffect(()=>{if(h&&b){const E=O=>w(O,b),C=O=>w(O,h);return h.addEventListener("pointerleave",E),b.addEventListener("pointerleave",C),()=>{h.removeEventListener("pointerleave",E),b.removeEventListener("pointerleave",C)}}},[h,b,w,v]),S.useEffect(()=>{if(c){const E=C=>{const O=C.target,M={x:C.clientX,y:C.clientY},j=h?.contains(O)||b?.contains(O),T=!l3(M,c);j?v():T&&(v(),p())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[h,b,c,p,v]),g.jsx(W1,{...e,ref:u})}),[t3,n3]=dc(oo,{isInside:!1}),a3=oC("TooltipContent"),W1=S.forwardRef((e,n)=>{const{__scopeTooltip:r,children:s,"aria-label":i,onEscapeKeyDown:u,onPointerDownOutside:c,...f}=e,h=Po(Hs,r),p=hc(r),{onClose:b}=h;return S.useEffect(()=>(document.addEventListener(N0,b),()=>document.removeEventListener(N0,b)),[b]),S.useEffect(()=>{if(h.trigger){const y=v=>{v.target?.contains(h.trigger)&&b()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,b]),g.jsx(B1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:b,children:g.jsxs(F1,{"data-state":h.stateAttribute,...p,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(a3,{children:s}),g.jsx(t3,{scope:r,isInside:!0,children:g.jsx(QC,{id:h.contentId,role:"tooltip",children:i||s})})]})})});J1.displayName=Hs;var ex="TooltipArrow",r3=S.forwardRef((e,n)=>{const{__scopeTooltip:r,...s}=e,i=hc(r);return n3(ex,r).isInside?null:g.jsx(H1,{...i,...s,ref:n})});r3.displayName=ex;function s3(e,n){const r=Math.abs(n.top-e.y),s=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),u=Math.abs(n.left-e.x);switch(Math.min(r,s,i,u)){case u:return"left";case i:return"right";case r:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function i3(e,n,r=5){const s=[];switch(n){case"top":s.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":s.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":s.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":s.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return s}function o3(e){const{top:n,right:r,bottom:s,left:i}=e;return[{x:i,y:n},{x:r,y:n},{x:r,y:s},{x:i,y:s}]}function l3(e,n){const{x:r,y:s}=e;let i=!1;for(let u=0,c=n.length-1;u<n.length;c=u++){const f=n[u],h=n[c],p=f.x,b=f.y,y=h.x,v=h.y;b>s!=v>s&&r<(y-p)*(s-b)/(v-b)+p&&(i=!i)}return i}function u3(e){const n=e.slice();return n.sort((r,s)=>r.x<s.x?-1:r.x>s.x?1:r.y<s.y?-1:r.y>s.y?1:0),c3(n)}function c3(e){if(e.length<=1)return e.slice();const n=[];for(let s=0;s<e.length;s++){const i=e[s];for(;n.length>=2;){const u=n[n.length-1],c=n[n.length-2];if((u.x-c.x)*(i.y-c.y)>=(u.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;r.length>=2;){const u=r[r.length-1],c=r[r.length-2];if((u.x-c.x)*(i.y-c.y)>=(u.y-c.y)*(i.x-c.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var Fu=Q1,tx=X1,nx=K1,ax=Z1,rx=J1;const f3=S.forwardRef(({children:e,className:n,...r},s)=>g.jsx(rx,{ref:s,...r,className:xe("z-50 overflow-hidden rounded-md text-sm","border border-gray-200 bg-white text-gray-900 dark:border-gray-900 dark:bg-slate-900 dark:text-gray-200","px-3 py-1.5 shadow-md","data-[state=open]:animate-fade-in data-[state=open]:animate-zoom-in","data-[state=closed]:animate-fade-out data-[state=closed]:animate-zoom-out","data-[side=bottom]:animate-slide-in-from-top","data-[side=left]:animate-slide-in-from-right","data-[side=right]:animate-slide-in-from-left","data-[side=top]:animate-slide-in-from-bottom",n),children:e})),T0=({content:e,children:n,triggerAsChild:r=!1,delayDuration:s=0,...i})=>{const{open:u,defaultOpen:c,onOpenChange:f,...h}=i;return g.jsxs(tx,{defaultOpen:c,delayDuration:s,onOpenChange:f,open:u,children:[g.jsx(nx,{asChild:r,type:r?void 0:"button",children:n}),g.jsx(ax,{children:g.jsx(f3,{sideOffset:3,...h,children:e})})]})},sx=({children:e,required:n,disabled:r,description:s,hasError:i,inline:u,className:c,...f})=>{const h=xe("inline-flex items-center text-sm font-medium",u?"leading-[22px]":"leading-4",`text-gray-900 ${u?"dark:text-gray-400":"dark:text-gray-50"}`,i&&"group-hover:!text-red-900 dark:group-hover:!text-red-900",i&&u&&"text-red-800 dark:text-red-800",i&&!u&&"text-red-900 dark:text-red-900",r&&`cursor-not-allowed text-gray-700 ${u?"dark:text-gray-600":"dark:text-gray-300"}`,u?!r&&"group-hover:text-gray-900 dark:group-hover:text-slate-50":"mb-[3px]",c);if(!e)return null;const p={...f};return g.jsxs("label",{className:h,...p,children:[e,n&&g.jsx("span",{className:xe("ml-1 text-gray-800 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-slate-50",i&&`${u?"!text-red-800":"!text-red-900"} group-hover:!text-red-900`),children:"*"}),s&&g.jsx(Fu,{children:g.jsx(T0,{content:s,children:g.jsx(ae,{name:"CircleInfo",size:16,className:xe("ml-1 cursor-pointer text-gray-600 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-500",r&&"text-gray-500")})})})]})},d3="p",Ly=({children:e,type:n="info",as:r,className:s,...i})=>{const u=r||d3,f=xe("mb-0 inline-flex items-center text-xs font-medium",{error:"text-red-900 dark:text-red-900",info:"text-blue-900 dark:text-blue-900",warning:"text-yellow-900 dark:text-yellow-900"}[n],s);return g.jsx(u,{"data-type":n,className:f,...i,children:e})},Hu=({messages:e,type:n="info",className:r,...s})=>{if(e.length===0)return null;if(e.length===1)return g.jsx(Ly,{type:n,...s,children:e[0]});const i={error:"before:bg-red-900 dark:before:bg-red-900",info:"before:bg-blue-900 dark:before:bg-blue-900",warning:"before:bg-orange-900 dark:before:bg-orange-900"};return g.jsx("ul",{className:xe("flex flex-col gap-1",r),...s,children:e.map(u=>g.jsx(Ly,{as:"li",type:n,className:xe("relative pl-4","before:absolute before:left-0 before:top-[0.4em] before:size-2 before:rounded-full",i[n]),children:u},u))})};var Uy=1,h3=.9,m3=.8,p3=.17,Wd=.1,e0=.999,g3=.9999,b3=.99,y3=/[\\\/_+.#"@\[\(\{&]/,v3=/[\\\/_+.#"@\[\(\{&]/g,x3=/[\s-]/,ix=/[\s-]/g;function D0(e,n,r,s,i,u,c){if(u===n.length)return i===e.length?Uy:b3;var f=`${i},${u}`;if(c[f]!==void 0)return c[f];for(var h=s.charAt(u),p=r.indexOf(h,i),b=0,y,v,w,E;p>=0;)y=D0(e,n,r,s,p+1,u+1,c),y>b&&(p===i?y*=Uy:y3.test(e.charAt(p-1))?(y*=m3,w=e.slice(i,p-1).match(v3),w&&i>0&&(y*=Math.pow(e0,w.length))):x3.test(e.charAt(p-1))?(y*=h3,E=e.slice(i,p-1).match(ix),E&&i>0&&(y*=Math.pow(e0,E.length))):(y*=p3,i>0&&(y*=Math.pow(e0,p-i))),e.charAt(p)!==n.charAt(u)&&(y*=g3)),(y<Wd&&r.charAt(p-1)===s.charAt(u+1)||s.charAt(u+1)===s.charAt(u)&&r.charAt(p-1)!==s.charAt(u))&&(v=D0(e,n,r,s,p+1,u+2,c),v*Wd>y&&(y=v*Wd)),y>b&&(b=y),p=r.indexOf(h,p+1);return c[f]=b,b}function Iy(e){return e.toLowerCase().replace(ix," ")}function S3(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,D0(e,n,Iy(e),Iy(n),0,0,{})}var $i='[cmdk-group=""]',t0='[cmdk-group-items=""]',w3='[cmdk-group-heading=""]',ox='[cmdk-item=""]',_y=`${ox}:not([aria-disabled="true"])`,R0="cmdk-item-select",Ls="data-value",C3=(e,n,r)=>S3(e,n,r),lx=S.createContext(void 0),Vo=()=>S.useContext(lx),ux=S.createContext(void 0),Th=()=>S.useContext(ux),cx=S.createContext(void 0),fx=S.forwardRef((e,n)=>{let r=Us(()=>{var V,te;return{search:"",value:(te=(V=e.value)!=null?V:e.defaultValue)!=null?te:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=Us(()=>new Set),i=Us(()=>new Map),u=Us(()=>new Map),c=Us(()=>new Set),f=dx(e),{label:h,children:p,value:b,onValueChange:y,filter:v,shouldFilter:w,loop:E,disablePointerSelection:C=!1,vimBindings:O=!0,...M}=e,j=Ca(),T=Ca(),U=Ca(),N=S.useRef(null),R=k3();Ir(()=>{if(b!==void 0){let V=b.trim();r.current.value=V,D.emit()}},[b]),Ir(()=>{R(6,Y)},[]);let D=S.useMemo(()=>({subscribe:V=>(c.current.add(V),()=>c.current.delete(V)),snapshot:()=>r.current,setState:(V,te,ne)=>{var se,pe,he,Ae;if(!Object.is(r.current[V],te)){if(r.current[V]=te,V==="search")J(),Z(),R(1,re);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Te=document.getElementById(U);Te?Te.focus():(se=document.getElementById(j))==null||se.focus()}if(R(7,()=>{var Te;r.current.selectedItemId=(Te=oe())==null?void 0:Te.id,D.emit()}),ne||R(5,Y),((pe=f.current)==null?void 0:pe.value)!==void 0){let Te=te??"";(Ae=(he=f.current).onValueChange)==null||Ae.call(he,Te);return}}D.emit()}},emit:()=>{c.current.forEach(V=>V())}}),[]),I=S.useMemo(()=>({value:(V,te,ne)=>{var se;te!==((se=u.current.get(V))==null?void 0:se.value)&&(u.current.set(V,{value:te,keywords:ne}),r.current.filtered.items.set(V,B(te,ne)),R(2,()=>{Z(),D.emit()}))},item:(V,te)=>(s.current.add(V),te&&(i.current.has(te)?i.current.get(te).add(V):i.current.set(te,new Set([V]))),R(3,()=>{J(),Z(),r.current.value||re(),D.emit()}),()=>{u.current.delete(V),s.current.delete(V),r.current.filtered.items.delete(V);let ne=oe();R(4,()=>{J(),ne?.getAttribute("id")===V&&re(),D.emit()})}),group:V=>(i.current.has(V)||i.current.set(V,new Set),()=>{u.current.delete(V),i.current.delete(V)}),filter:()=>f.current.shouldFilter,label:h||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:j,inputId:U,labelId:T,listInnerRef:N}),[]);function B(V,te){var ne,se;let pe=(se=(ne=f.current)==null?void 0:ne.filter)!=null?se:C3;return V?pe(V,r.current.search,te):0}function Z(){if(!r.current.search||f.current.shouldFilter===!1)return;let V=r.current.filtered.items,te=[];r.current.filtered.groups.forEach(se=>{let pe=i.current.get(se),he=0;pe.forEach(Ae=>{let Te=V.get(Ae);he=Math.max(Te,he)}),te.push([se,he])});let ne=N.current;le().sort((se,pe)=>{var he,Ae;let Te=se.getAttribute("id"),Je=pe.getAttribute("id");return((he=V.get(Je))!=null?he:0)-((Ae=V.get(Te))!=null?Ae:0)}).forEach(se=>{let pe=se.closest(t0);pe?pe.appendChild(se.parentElement===pe?se:se.closest(`${t0} > *`)):ne.appendChild(se.parentElement===ne?se:se.closest(`${t0} > *`))}),te.sort((se,pe)=>pe[1]-se[1]).forEach(se=>{var pe;let he=(pe=N.current)==null?void 0:pe.querySelector(`${$i}[${Ls}="${encodeURIComponent(se[0])}"]`);he?.parentElement.appendChild(he)})}function re(){let V=le().find(ne=>ne.getAttribute("aria-disabled")!=="true"),te=V?.getAttribute(Ls);D.setState("value",te||void 0)}function J(){var V,te,ne,se;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=s.current.size;return}r.current.filtered.groups=new Set;let pe=0;for(let he of s.current){let Ae=(te=(V=u.current.get(he))==null?void 0:V.value)!=null?te:"",Te=(se=(ne=u.current.get(he))==null?void 0:ne.keywords)!=null?se:[],Je=B(Ae,Te);r.current.filtered.items.set(he,Je),Je>0&&pe++}for(let[he,Ae]of i.current)for(let Te of Ae)if(r.current.filtered.items.get(Te)>0){r.current.filtered.groups.add(he);break}r.current.filtered.count=pe}function Y(){var V,te,ne;let se=oe();se&&(((V=se.parentElement)==null?void 0:V.firstChild)===se&&((ne=(te=se.closest($i))==null?void 0:te.querySelector(w3))==null||ne.scrollIntoView({block:"nearest"})),se.scrollIntoView({block:"nearest"}))}function oe(){var V;return(V=N.current)==null?void 0:V.querySelector(`${ox}[aria-selected="true"]`)}function le(){var V;return Array.from(((V=N.current)==null?void 0:V.querySelectorAll(_y))||[])}function _(V){let te=le()[V];te&&D.setState("value",te.getAttribute(Ls))}function K(V){var te;let ne=oe(),se=le(),pe=se.findIndex(Ae=>Ae===ne),he=se[pe+V];(te=f.current)!=null&&te.loop&&(he=pe+V<0?se[se.length-1]:pe+V===se.length?se[0]:se[pe+V]),he&&D.setState("value",he.getAttribute(Ls))}function ie(V){let te=oe(),ne=te?.closest($i),se;for(;ne&&!se;)ne=V>0?R3(ne,$i):z3(ne,$i),se=ne?.querySelector(_y);se?D.setState("value",se.getAttribute(Ls)):K(V)}let be=()=>_(le().length-1),we=V=>{V.preventDefault(),V.metaKey?be():V.altKey?ie(1):K(1)},De=V=>{V.preventDefault(),V.metaKey?_(0):V.altKey?ie(-1):K(-1)};return S.createElement(sr.div,{ref:n,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:V=>{var te;(te=M.onKeyDown)==null||te.call(M,V);let ne=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||ne))switch(V.key){case"n":case"j":{O&&V.ctrlKey&&we(V);break}case"ArrowDown":{we(V);break}case"p":case"k":{O&&V.ctrlKey&&De(V);break}case"ArrowUp":{De(V);break}case"Home":{V.preventDefault(),_(0);break}case"End":{V.preventDefault(),be();break}case"Enter":{V.preventDefault();let se=oe();if(se){let pe=new Event(R0);se.dispatchEvent(pe)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:U3},h),mc(e,V=>S.createElement(ux.Provider,{value:D},S.createElement(lx.Provider,{value:I},V))))}),E3=S.forwardRef((e,n)=>{var r,s;let i=Ca(),u=S.useRef(null),c=S.useContext(cx),f=Vo(),h=dx(e),p=(s=(r=h.current)==null?void 0:r.forceMount)!=null?s:c?.forceMount;Ir(()=>{if(!p)return f.item(i,c?.id)},[p]);let b=hx(i,u,[e.value,e.children,u],e.keywords),y=Th(),v=Kn(R=>R.value&&R.value===b.current),w=Kn(R=>p||f.filter()===!1?!0:R.search?R.filtered.items.get(i)>0:!0);S.useEffect(()=>{let R=u.current;if(!(!R||e.disabled))return R.addEventListener(R0,E),()=>R.removeEventListener(R0,E)},[w,e.onSelect,e.disabled]);function E(){var R,D;C(),(D=(R=h.current).onSelect)==null||D.call(R,b.current)}function C(){y.setState("value",b.current,!0)}if(!w)return null;let{disabled:O,value:M,onSelect:j,forceMount:T,keywords:U,...N}=e;return S.createElement(sr.div,{ref:io(u,n),...N,id:i,"cmdk-item":"",role:"option","aria-disabled":!!O,"aria-selected":!!v,"data-disabled":!!O,"data-selected":!!v,onPointerMove:O||f.getDisablePointerSelection()?void 0:C,onClick:O?void 0:E},e.children)}),O3=S.forwardRef((e,n)=>{let{heading:r,children:s,forceMount:i,...u}=e,c=Ca(),f=S.useRef(null),h=S.useRef(null),p=Ca(),b=Vo(),y=Kn(w=>i||b.filter()===!1?!0:w.search?w.filtered.groups.has(c):!0);Ir(()=>b.group(c),[]),hx(c,f,[e.value,e.heading,h]);let v=S.useMemo(()=>({id:c,forceMount:i}),[i]);return S.createElement(sr.div,{ref:io(f,n),...u,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&S.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:p},r),mc(e,w=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?p:void 0},S.createElement(cx.Provider,{value:v},w))))}),A3=S.forwardRef((e,n)=>{let{alwaysRender:r,...s}=e,i=S.useRef(null),u=Kn(c=>!c.search);return!r&&!u?null:S.createElement(sr.div,{ref:io(i,n),...s,"cmdk-separator":"",role:"separator"})}),j3=S.forwardRef((e,n)=>{let{onValueChange:r,...s}=e,i=e.value!=null,u=Th(),c=Kn(p=>p.search),f=Kn(p=>p.selectedItemId),h=Vo();return S.useEffect(()=>{e.value!=null&&u.setState("search",e.value)},[e.value]),S.createElement(sr.input,{ref:n,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":f,id:h.inputId,type:"text",value:i?e.value:c,onChange:p=>{i||u.setState("search",p.target.value),r?.(p.target.value)}})}),N3=S.forwardRef((e,n)=>{let{children:r,label:s="Suggestions",...i}=e,u=S.useRef(null),c=S.useRef(null),f=Kn(p=>p.selectedItemId),h=Vo();return S.useEffect(()=>{if(c.current&&u.current){let p=c.current,b=u.current,y,v=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=p.offsetHeight;b.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return v.observe(p),()=>{cancelAnimationFrame(y),v.unobserve(p)}}},[]),S.createElement(sr.div,{ref:io(u,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":s,id:h.listId},mc(e,p=>S.createElement("div",{ref:io(c,h.listInnerRef),"cmdk-list-sizer":""},p)))}),M3=S.forwardRef((e,n)=>{let{open:r,onOpenChange:s,overlayClassName:i,contentClassName:u,container:c,...f}=e;return S.createElement(lC,{open:r,onOpenChange:s},S.createElement(uC,{container:c},S.createElement(cC,{"cmdk-overlay":"",className:i}),S.createElement(fC,{"aria-label":e.label,"cmdk-dialog":"",className:u},S.createElement(fx,{ref:n,...f}))))}),T3=S.forwardRef((e,n)=>Kn(r=>r.filtered.count===0)?S.createElement(sr.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),D3=S.forwardRef((e,n)=>{let{progress:r,children:s,label:i="Loading...",...u}=e;return S.createElement(sr.div,{ref:n,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},mc(e,c=>S.createElement("div",{"aria-hidden":!0},c)))}),It=Object.assign(fx,{List:N3,Item:E3,Input:j3,Group:O3,Separator:A3,Dialog:M3,Empty:T3,Loading:D3});function R3(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function z3(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function dx(e){let n=S.useRef(e);return Ir(()=>{n.current=e}),n}var Ir=typeof window>"u"?S.useEffect:S.useLayoutEffect;function Us(e){let n=S.useRef();return n.current===void 0&&(n.current=e()),n}function Kn(e){let n=Th(),r=()=>e(n.snapshot());return S.useSyncExternalStore(n.subscribe,r,r)}function hx(e,n,r,s=[]){let i=S.useRef(),u=Vo();return Ir(()=>{var c;let f=(()=>{var p;for(let b of r){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(p=b.current.textContent)==null?void 0:p.trim():i.current}})(),h=s.map(p=>p.trim());u.value(e,f,h),(c=n.current)==null||c.setAttribute(Ls,f),i.current=f}),i}var k3=()=>{let[e,n]=S.useState(),r=Us(()=>new Map);return Ir(()=>{r.current.forEach(s=>s()),r.current=new Map},[e]),(s,i)=>{r.current.set(s,i),n({})}};function L3(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function mc({asChild:e,children:n},r){return e&&S.isValidElement(n)?S.cloneElement(L3(n),{ref:n.ref},r(n.props.children)):r(n)}var U3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const mx=fe.forwardRef(({className:e,...n},r)=>g.jsx(It,{ref:r,className:xe("flex size-full flex-col rounded-md [&_[cmdk-label]]:hidden",e),...n}));mx.displayName=It.displayName;const px=fe.forwardRef(({wrapperClassName:e,className:n,...r},s)=>g.jsxs("div",{className:xe("group relative flex items-center border-b","border-b-gray-300 dark:border-b-gray-900","hover:border-b-gray-300 dark:hover:border-b-gray-800","hover:bg-gray-100 dark:hover:bg-gray-900","focus-within:border-b-gray-300 dark:focus-within:border-b-gray-800","focus-within:bg-gray-100 dark:focus-within:bg-gray-900",e),"cmdk-input-wrapper":"",children:[g.jsx(ae,{name:"Search",size:16,className:xe("pointer-events-none absolute left-2 top-3.5 text-gray-500 dark:text-gray-700","group-hover:text-gray-700 dark:group-hover:text-gray-500","group-focus-within:!text-gray-900 dark:group-focus-within:!text-gray-50")}),g.jsx(It.Input,{ref:s,className:xe("flex w-full bg-transparent pb-2 pl-8 pr-3 pt-3 text-[14px] font-normal leading-5 outline-none","placeholder:text-gray-500 dark:placeholder:text-gray-700","group-hover:placeholder:text-gray-700 dark:group-hover:placeholder:text-gray-500","group-focus-within:placeholder:!text-gray-700 dark:group-focus-within:placeholder:!text-gray-300","disabled:cursor-not-allowed",n),...r})]}));px.displayName=It.Input.displayName;const Dh=fe.forwardRef(({className:e,...n},r)=>g.jsx(It.List,{ref:r,className:xe("max-h-[300px] overflow-y-auto overflow-x-hidden","focus:outline-none","scrollbar-thin scrollbar-gutter-stable","scrollbar-track-transparent","scrollbar-thumb-gray-300 hover:scrollbar-thumb-gray-300","dark:scrollbar-thumb-charcoal-700 dark:hover:scrollbar-thumb-charcoal-700","scrollbar-thumb-rounded-md",e),...n}));Dh.displayName=It.List.displayName;const I3=fe.forwardRef((e,n)=>g.jsx(It.Loading,{ref:n,...e}));I3.displayName=It.Loading.displayName;const Rh=fe.forwardRef((e,n)=>g.jsx(It.Empty,{ref:n,...e}));Rh.displayName=It.Empty.displayName;const qu=fe.forwardRef(({className:e,...n},r)=>g.jsx(It.Group,{ref:r,className:xe("overflow-hidden px-0.5 py-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...n}));qu.displayName=It.Group.displayName;const pc=fe.forwardRef(({className:e,...n},r)=>g.jsx(It.Item,{ref:r,className:xe("relative flex select-none items-center justify-between","h-8 gap-2 rounded-md py-1.5 pl-1.5 pr-2.5","text-[14px] leading-4 outline-none","border-y-2 border-white dark:border-slate-600","data-[disabled=true]:pointer-events-none","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...n}));pc.displayName=It.Item.displayName;const gx=6048e5,_3=864e5,bx=6e4,yx=36e5,gu=43200,Py=1440,Vy=Symbol.for("constructDateFrom");function Zn(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&Vy in e?e[Vy](n):e instanceof Date?new e.constructor(n):new Date(n)}function vt(e,n){return Zn(n||e,e)}let P3={};function Bo(){return P3}function lo(e,n){const r=Bo(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=vt(e,n?.in),u=i.getDay(),c=(u<s?7:0)+u-s;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function Gu(e,n){return lo(e,{...n,weekStartsOn:1})}function vx(e,n){const r=vt(e,n?.in),s=r.getFullYear(),i=Zn(r,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const u=Gu(i),c=Zn(r,0);c.setFullYear(s,0,4),c.setHours(0,0,0,0);const f=Gu(c);return r.getTime()>=u.getTime()?s+1:r.getTime()>=f.getTime()?s:s-1}function $u(e){const n=vt(e),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+e-+r}function gc(e,...n){const r=Zn.bind(null,e||n.find(s=>typeof s=="object"));return n.map(r)}function By(e,n){const r=vt(e,n?.in);return r.setHours(0,0,0,0),r}function V3(e,n,r){const[s,i]=gc(r?.in,e,n),u=By(s),c=By(i),f=+u-$u(u),h=+c-$u(c);return Math.round((f-h)/_3)}function B3(e,n){const r=vx(e,n),s=Zn(e,0);return s.setFullYear(r,0,4),s.setHours(0,0,0,0),Gu(s)}function zu(e,n){const r=+vt(e)-+vt(n);return r<0?-1:r>0?1:r}function F3(e){return Zn(e,Date.now())}function H3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function q3(e){return!(!H3(e)&&typeof e!="number"||isNaN(+vt(e)))}function G3(e,n,r){const[s,i]=gc(r?.in,e,n),u=s.getFullYear()-i.getFullYear(),c=s.getMonth()-i.getMonth();return u*12+c}function $3(e){return n=>{const s=(e?Math[e]:Math.trunc)(n);return s===0?0:s}}function Y3(e,n){return+vt(e)-+vt(n)}function Q3(e,n){const r=vt(e,n?.in);return r.setHours(23,59,59,999),r}function X3(e,n){const r=vt(e,n?.in),s=r.getMonth();return r.setFullYear(r.getFullYear(),s+1,0),r.setHours(23,59,59,999),r}function K3(e,n){const r=vt(e,n?.in);return+Q3(r,n)==+X3(r,n)}function Z3(e,n,r){const[s,i,u]=gc(r?.in,e,e,n),c=zu(i,u),f=Math.abs(G3(i,u));if(f<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-c*f);let h=zu(i,u)===-c;K3(s)&&f===1&&zu(s,u)===1&&(h=!1);const p=c*(f-+h);return p===0?0:p}function J3(e,n,r){const s=Y3(e,n)/1e3;return $3(r?.roundingMethod)(s)}function W3(e,n){const r=vt(e,n?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const eE={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tE=(e,n,r)=>{let s;const i=eE[e];return typeof i=="string"?s=i:n===1?s=i.one:s=i.other.replace("{{count}}",n.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+s:s+" ago":s};function n0(e){return(n={})=>{const r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const nE={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},aE={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rE={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sE={date:n0({formats:nE,defaultWidth:"full"}),time:n0({formats:aE,defaultWidth:"full"}),dateTime:n0({formats:rE,defaultWidth:"full"})},iE={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},oE=(e,n,r,s)=>iE[e];function Yi(e){return(n,r)=>{const s=r?.context?String(r.context):"standalone";let i;if(s==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,f=r?.width?String(r.width):c;i=e.formattingValues[f]||e.formattingValues[c]}else{const c=e.defaultWidth,f=r?.width?String(r.width):e.defaultWidth;i=e.values[f]||e.values[c]}const u=e.argumentCallback?e.argumentCallback(n):n;return i[u]}}const lE={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uE={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cE={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fE={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mE=(e,n)=>{const r=Number(e),s=r%100;if(s>20||s<10)switch(s%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},pE={ordinalNumber:mE,era:Yi({values:lE,defaultWidth:"wide"}),quarter:Yi({values:uE,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Yi({values:cE,defaultWidth:"wide"}),day:Yi({values:fE,defaultWidth:"wide"}),dayPeriod:Yi({values:dE,defaultWidth:"wide",formattingValues:hE,defaultFormattingWidth:"wide"})};function Qi(e){return(n,r={})=>{const s=r.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],u=n.match(i);if(!u)return null;const c=u[0],f=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(f)?bE(f,y=>y.test(c)):gE(f,y=>y.test(c));let p;p=e.valueCallback?e.valueCallback(h):h,p=r.valueCallback?r.valueCallback(p):p;const b=n.slice(c.length);return{value:p,rest:b}}}function gE(e,n){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n(e[r]))return r}function bE(e,n){for(let r=0;r<e.length;r++)if(n(e[r]))return r}function yE(e){return(n,r={})=>{const s=n.match(e.matchPattern);if(!s)return null;const i=s[0],u=n.match(e.parsePattern);if(!u)return null;let c=e.valueCallback?e.valueCallback(u[0]):u[0];c=r.valueCallback?r.valueCallback(c):c;const f=n.slice(i.length);return{value:c,rest:f}}}const vE=/^(\d+)(th|st|nd|rd)?/i,xE=/\d+/i,SE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wE={any:[/^b/i,/^(a|c)/i]},CE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},EE={any:[/1/i,/2/i,/3/i,/4/i]},OE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},AE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},NE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ME={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},TE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},DE={ordinalNumber:yE({matchPattern:vE,parsePattern:xE,valueCallback:e=>parseInt(e,10)}),era:Qi({matchPatterns:SE,defaultMatchWidth:"wide",parsePatterns:wE,defaultParseWidth:"any"}),quarter:Qi({matchPatterns:CE,defaultMatchWidth:"wide",parsePatterns:EE,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Qi({matchPatterns:OE,defaultMatchWidth:"wide",parsePatterns:AE,defaultParseWidth:"any"}),day:Qi({matchPatterns:jE,defaultMatchWidth:"wide",parsePatterns:NE,defaultParseWidth:"any"}),dayPeriod:Qi({matchPatterns:ME,defaultMatchWidth:"any",parsePatterns:TE,defaultParseWidth:"any"})},xx={code:"en-US",formatDistance:tE,formatLong:sE,formatRelative:oE,localize:pE,match:DE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function RE(e,n){const r=vt(e,n?.in);return V3(r,W3(r))+1}function zE(e,n){const r=vt(e,n?.in),s=+Gu(r)-+B3(r);return Math.round(s/gx)+1}function Sx(e,n){const r=vt(e,n?.in),s=r.getFullYear(),i=Bo(),u=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=Zn(n?.in||e,0);c.setFullYear(s+1,0,u),c.setHours(0,0,0,0);const f=lo(c,n),h=Zn(n?.in||e,0);h.setFullYear(s,0,u),h.setHours(0,0,0,0);const p=lo(h,n);return+r>=+f?s+1:+r>=+p?s:s-1}function kE(e,n){const r=Bo(),s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Sx(e,n),u=Zn(n?.in||e,0);return u.setFullYear(i,0,s),u.setHours(0,0,0,0),lo(u,n)}function LE(e,n){const r=vt(e,n?.in),s=+lo(r,n)-+kE(r,n);return Math.round(s/gx)+1}function Qe(e,n){const r=e<0?"-":"",s=Math.abs(e).toString().padStart(n,"0");return r+s}const Ja={y(e,n){const r=e.getFullYear(),s=r>0?r:1-r;return Qe(n==="yy"?s%100:s,n.length)},M(e,n){const r=e.getMonth();return n==="M"?String(r+1):Qe(r+1,2)},d(e,n){return Qe(e.getDate(),n.length)},a(e,n){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,n){return Qe(e.getHours()%12||12,n.length)},H(e,n){return Qe(e.getHours(),n.length)},m(e,n){return Qe(e.getMinutes(),n.length)},s(e,n){return Qe(e.getSeconds(),n.length)},S(e,n){const r=n.length,s=e.getMilliseconds(),i=Math.trunc(s*Math.pow(10,r-3));return Qe(i,n.length)}},Ts={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fy={G:function(e,n,r){const s=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(s,{width:"abbreviated"});case"GGGGG":return r.era(s,{width:"narrow"});case"GGGG":default:return r.era(s,{width:"wide"})}},y:function(e,n,r){if(n==="yo"){const s=e.getFullYear(),i=s>0?s:1-s;return r.ordinalNumber(i,{unit:"year"})}return Ja.y(e,n)},Y:function(e,n,r,s){const i=Sx(e,s),u=i>0?i:1-i;if(n==="YY"){const c=u%100;return Qe(c,2)}return n==="Yo"?r.ordinalNumber(u,{unit:"year"}):Qe(u,n.length)},R:function(e,n){const r=vx(e);return Qe(r,n.length)},u:function(e,n){const r=e.getFullYear();return Qe(r,n.length)},Q:function(e,n,r){const s=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(s);case"QQ":return Qe(s,2);case"Qo":return r.ordinalNumber(s,{unit:"quarter"});case"QQQ":return r.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,n,r){const s=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(s);case"qq":return Qe(s,2);case"qo":return r.ordinalNumber(s,{unit:"quarter"});case"qqq":return r.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,n,r){const s=e.getMonth();switch(n){case"M":case"MM":return Ja.M(e,n);case"Mo":return r.ordinalNumber(s+1,{unit:"month"});case"MMM":return r.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(s,{width:"wide",context:"formatting"})}},L:function(e,n,r){const s=e.getMonth();switch(n){case"L":return String(s+1);case"LL":return Qe(s+1,2);case"Lo":return r.ordinalNumber(s+1,{unit:"month"});case"LLL":return r.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(s,{width:"wide",context:"standalone"})}},w:function(e,n,r,s){const i=LE(e,s);return n==="wo"?r.ordinalNumber(i,{unit:"week"}):Qe(i,n.length)},I:function(e,n,r){const s=zE(e);return n==="Io"?r.ordinalNumber(s,{unit:"week"}):Qe(s,n.length)},d:function(e,n,r){return n==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ja.d(e,n)},D:function(e,n,r){const s=RE(e);return n==="Do"?r.ordinalNumber(s,{unit:"dayOfYear"}):Qe(s,n.length)},E:function(e,n,r){const s=e.getDay();switch(n){case"E":case"EE":case"EEE":return r.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(s,{width:"short",context:"formatting"});case"EEEE":default:return r.day(s,{width:"wide",context:"formatting"})}},e:function(e,n,r,s){const i=e.getDay(),u=(i-s.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return Qe(u,2);case"eo":return r.ordinalNumber(u,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,n,r,s){const i=e.getDay(),u=(i-s.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return Qe(u,n.length);case"co":return r.ordinalNumber(u,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,n,r){const s=e.getDay(),i=s===0?7:s;switch(n){case"i":return String(i);case"ii":return Qe(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(s,{width:"short",context:"formatting"});case"iiii":default:return r.day(s,{width:"wide",context:"formatting"})}},a:function(e,n,r){const i=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,n,r){const s=e.getHours();let i;switch(s===12?i=Ts.noon:s===0?i=Ts.midnight:i=s/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,n,r){const s=e.getHours();let i;switch(s>=17?i=Ts.evening:s>=12?i=Ts.afternoon:s>=4?i=Ts.morning:i=Ts.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,n,r){if(n==="ho"){let s=e.getHours()%12;return s===0&&(s=12),r.ordinalNumber(s,{unit:"hour"})}return Ja.h(e,n)},H:function(e,n,r){return n==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ja.H(e,n)},K:function(e,n,r){const s=e.getHours()%12;return n==="Ko"?r.ordinalNumber(s,{unit:"hour"}):Qe(s,n.length)},k:function(e,n,r){let s=e.getHours();return s===0&&(s=24),n==="ko"?r.ordinalNumber(s,{unit:"hour"}):Qe(s,n.length)},m:function(e,n,r){return n==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ja.m(e,n)},s:function(e,n,r){return n==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ja.s(e,n)},S:function(e,n){return Ja.S(e,n)},X:function(e,n,r){const s=e.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return qy(s);case"XXXX":case"XX":return Mr(s);case"XXXXX":case"XXX":default:return Mr(s,":")}},x:function(e,n,r){const s=e.getTimezoneOffset();switch(n){case"x":return qy(s);case"xxxx":case"xx":return Mr(s);case"xxxxx":case"xxx":default:return Mr(s,":")}},O:function(e,n,r){const s=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Hy(s,":");case"OOOO":default:return"GMT"+Mr(s,":")}},z:function(e,n,r){const s=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Hy(s,":");case"zzzz":default:return"GMT"+Mr(s,":")}},t:function(e,n,r){const s=Math.trunc(+e/1e3);return Qe(s,n.length)},T:function(e,n,r){return Qe(+e,n.length)}};function Hy(e,n=""){const r=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),u=s%60;return u===0?r+String(i):r+String(i)+n+Qe(u,2)}function qy(e,n){return e%60===0?(e>0?"-":"+")+Qe(Math.abs(e)/60,2):Mr(e,n)}function Mr(e,n=""){const r=e>0?"-":"+",s=Math.abs(e),i=Qe(Math.trunc(s/60),2),u=Qe(s%60,2);return r+i+n+u}const Gy=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},wx=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},UE=(e,n)=>{const r=e.match(/(P+)(p+)?/)||[],s=r[1],i=r[2];if(!i)return Gy(e,n);let u;switch(s){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;case"PPPP":default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",Gy(s,n)).replace("{{time}}",wx(i,n))},IE={p:wx,P:UE},_E=/^D+$/,PE=/^Y+$/,VE=["D","DD","YY","YYYY"];function BE(e){return _E.test(e)}function FE(e){return PE.test(e)}function HE(e,n,r){const s=qE(e,n,r);if(console.warn(s),VE.includes(e))throw new RangeError(s)}function qE(e,n,r){const s=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${s} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const GE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$E=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YE=/^'([^]*?)'?$/,QE=/''/g,XE=/[a-zA-Z]/;function Yu(e,n,r){const s=Bo(),i=s.locale??xx,u=s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,c=s.weekStartsOn??s.locale?.options?.weekStartsOn??0,f=vt(e,r?.in);if(!q3(f))throw new RangeError("Invalid time value");let h=n.match($E).map(b=>{const y=b[0];if(y==="p"||y==="P"){const v=IE[y];return v(b,i.formatLong)}return b}).join("").match(GE).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const y=b[0];if(y==="'")return{isToken:!1,value:KE(b)};if(Fy[y])return{isToken:!0,value:b};if(y.match(XE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(h=i.localize.preprocessor(f,h));const p={firstWeekContainsDate:u,weekStartsOn:c,locale:i};return h.map(b=>{if(!b.isToken)return b.value;const y=b.value;(FE(y)||BE(y))&&HE(y,n,String(e));const v=Fy[y[0]];return v(f,y,i.localize,p)}).join("")}function KE(e){const n=e.match(YE);return n?n[1].replace(QE,"'"):e}function ZE(e,n,r){const s=Bo(),i=r?.locale??s.locale??xx,u=2520,c=zu(e,n);if(isNaN(c))throw new RangeError("Invalid time value");const f=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:c}),[h,p]=gc(r?.in,...c>0?[n,e]:[e,n]),b=J3(p,h),y=($u(p)-$u(h))/1e3,v=Math.round((b-y)/60);let w;if(v<2)return r?.includeSeconds?b<5?i.formatDistance("lessThanXSeconds",5,f):b<10?i.formatDistance("lessThanXSeconds",10,f):b<20?i.formatDistance("lessThanXSeconds",20,f):b<40?i.formatDistance("halfAMinute",0,f):b<60?i.formatDistance("lessThanXMinutes",1,f):i.formatDistance("xMinutes",1,f):v===0?i.formatDistance("lessThanXMinutes",1,f):i.formatDistance("xMinutes",v,f);if(v<45)return i.formatDistance("xMinutes",v,f);if(v<90)return i.formatDistance("aboutXHours",1,f);if(v<Py){const E=Math.round(v/60);return i.formatDistance("aboutXHours",E,f)}else{if(v<u)return i.formatDistance("xDays",1,f);if(v<gu){const E=Math.round(v/Py);return i.formatDistance("xDays",E,f)}else if(v<gu*2)return w=Math.round(v/gu),i.formatDistance("aboutXMonths",w,f)}if(w=Z3(p,h),w<12){const E=Math.round(v/gu);return i.formatDistance("xMonths",E,f)}else{const E=w%12,C=Math.trunc(w/12);return E<3?i.formatDistance("aboutXYears",C,f):E<9?i.formatDistance("overXYears",C,f):i.formatDistance("almostXYears",C+1,f)}}function JE(e,n){return ZE(e,F3(e),n)}function WE(e,n){const r=()=>Zn(n?.in,NaN),i=a8(e);let u;if(i.date){const p=r8(i.date,2);u=s8(p.restDateString,p.year)}if(!u||isNaN(+u))return r();const c=+u;let f=0,h;if(i.time&&(f=i8(i.time),isNaN(f)))return r();if(i.timezone){if(h=o8(i.timezone),isNaN(h))return r()}else{const p=new Date(c+f),b=vt(0,n?.in);return b.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),b.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),b}return vt(c+f+h,n?.in)}const bu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},e8=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,t8=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,n8=/^([+-])(\d{2})(?::?(\d{2}))?$/;function a8(e){const n={},r=e.split(bu.dateTimeDelimiter);let s;if(r.length>2)return n;if(/:/.test(r[0])?s=r[0]:(n.date=r[0],s=r[1],bu.timeZoneDelimiter.test(n.date)&&(n.date=e.split(bu.timeZoneDelimiter)[0],s=e.substr(n.date.length,e.length))),s){const i=bu.timezone.exec(s);i?(n.time=s.replace(i[1],""),n.timezone=i[1]):n.time=s}return n}function r8(e,n){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),s=e.match(r);if(!s)return{year:NaN,restDateString:""};const i=s[1]?parseInt(s[1]):null,u=s[2]?parseInt(s[2]):null;return{year:u===null?i:u*100,restDateString:e.slice((s[1]||s[2]).length)}}function s8(e,n){if(n===null)return new Date(NaN);const r=e.match(e8);if(!r)return new Date(NaN);const s=!!r[4],i=Xi(r[1]),u=Xi(r[2])-1,c=Xi(r[3]),f=Xi(r[4]),h=Xi(r[5])-1;if(s)return d8(n,f,h)?l8(n,f,h):new Date(NaN);{const p=new Date(0);return!c8(n,u,c)||!f8(n,i)?new Date(NaN):(p.setUTCFullYear(n,u,Math.max(i,c)),p)}}function Xi(e){return e?parseInt(e):1}function i8(e){const n=e.match(t8);if(!n)return NaN;const r=a0(n[1]),s=a0(n[2]),i=a0(n[3]);return h8(r,s,i)?r*yx+s*bx+i*1e3:NaN}function a0(e){return e&&parseFloat(e.replace(",","."))||0}function o8(e){if(e==="Z")return 0;const n=e.match(n8);if(!n)return 0;const r=n[1]==="+"?-1:1,s=parseInt(n[2]),i=n[3]&&parseInt(n[3])||0;return m8(s,i)?r*(s*yx+i*bx):NaN}function l8(e,n,r){const s=new Date(0);s.setUTCFullYear(e,0,4);const i=s.getUTCDay()||7,u=(n-1)*7+r+1-i;return s.setUTCDate(s.getUTCDate()+u),s}const u8=[31,null,31,30,31,30,31,31,30,31,30,31];function Cx(e){return e%400===0||e%4===0&&e%100!==0}function c8(e,n,r){return n>=0&&n<=11&&r>=1&&r<=(u8[n]||(Cx(e)?29:28))}function f8(e,n){return n>=1&&n<=(Cx(e)?366:365)}function d8(e,n,r){return n>=1&&n<=53&&r>=0&&r<=6}function h8(e,n,r){return e===24?n===0&&r===0:r>=0&&r<60&&n>=0&&n<60&&e>=0&&e<25}function m8(e,n){return n>=0&&n<=59}function no(e,n,r=new Map){if(e===n)return!0;if(e===null||n===null||e===void 0||n===void 0||typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n))return r.get(e)===n?!0:(r.set(e,n),e.length===n.length&&e.every((s,i)=>no(s,n[i],r)));if(typeof e=="object"&&typeof n=="object"&&!Array.isArray(e)&&!Array.isArray(n)){if(r.get(e)===n)return!0;r.set(e,n);const s=Object.keys(e),i=Object.keys(n);return s.length===i.length&&s.every(u=>u in n&&no(e[u],n[u],r))}return!1}const Qu={trimOnBlur:(e=!0)=>({transformer:n=>n?.trim(),options:{trigger:"blur",if:e}}),lowercaseOnChange:(e=!0)=>({transformer:n=>n?.toLowerCase(),options:{trigger:"change",if:e}}),uppercaseOnChange:(e=!0)=>({transformer:n=>n?.toUpperCase(),options:{trigger:"change",if:e}}),trimOnEnter:(e=!0)=>({transformer:n=>n?.trim(),options:{trigger:"keyDown",if:e}})};var Fo=e=>e.type==="checkbox",Tr=e=>e instanceof Date,Wt=e=>e==null;const Ex=e=>typeof e=="object";var yt=e=>!Wt(e)&&!Array.isArray(e)&&Ex(e)&&!Tr(e),Ox=e=>yt(e)&&e.target?Fo(e.target)?e.target.checked:e.target.value:e,p8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ax=(e,n)=>e.has(p8(n)),g8=e=>{const n=e.constructor&&e.constructor.prototype;return yt(n)&&n.hasOwnProperty("isPrototypeOf")},zh=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(e){let n;const r=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)n=new Date(e);else if(!(zh&&(e instanceof Blob||s))&&(r||yt(e)))if(n=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!g8(e))n=e;else for(const i in e)e.hasOwnProperty(i)&&(n[i]=St(e[i]));else return e;return n}var bc=e=>/^\w*$/.test(e),lt=e=>e===void 0,kh=e=>Array.isArray(e)?e.filter(Boolean):[],Lh=e=>kh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ge=(e,n,r)=>{if(!n||!yt(e))return r;const s=(bc(n)?[n]:Lh(n)).reduce((i,u)=>Wt(i)?i:i[u],e);return lt(s)||s===e?lt(e[n])?r:e[n]:s},dn=e=>typeof e=="boolean",tt=(e,n,r)=>{let s=-1;const i=bc(n)?[n]:Lh(n),u=i.length,c=u-1;for(;++s<u;){const f=i[s];let h=r;if(s!==c){const p=e[f];h=yt(p)||Array.isArray(p)?p:isNaN(+i[s+1])?{}:[]}if(f==="__proto__"||f==="constructor"||f==="prototype")return;e[f]=h,e=e[f]}};const Xu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},zn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Uh=fe.createContext(null);Uh.displayName="HookFormContext";const Ho=()=>fe.useContext(Uh),Sk=e=>{const{children:n,...r}=e;return fe.createElement(Uh.Provider,{value:r},n)};var jx=(e,n,r,s=!0)=>{const i={defaultValues:n._defaultValues};for(const u in e)Object.defineProperty(i,u,{get:()=>{const c=u;return n._proxyFormState[c]!==zn.all&&(n._proxyFormState[c]=!s||zn.all),r&&(r[c]=!0),e[c]}});return i};const Ih=typeof window<"u"?fe.useLayoutEffect:fe.useEffect;function Nx(e){const n=Ho(),{control:r=n.control,disabled:s,name:i,exact:u}=e||{},[c,f]=fe.useState(r._formState),h=fe.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ih(()=>r._subscribe({name:i,formState:h.current,exact:u,callback:p=>{!s&&f({...r._formState,...p})}}),[i,s,u]),fe.useEffect(()=>{h.current.isValid&&r._setValid(!0)},[r]),fe.useMemo(()=>jx(c,r,h.current,!1),[c,r])}var hn=e=>typeof e=="string",z0=(e,n,r,s,i)=>hn(e)?(s&&n.watch.add(e),ge(r,e,i)):Array.isArray(e)?e.map(u=>(s&&n.watch.add(u),ge(r,u))):(s&&(n.watchAll=!0),r),k0=e=>Wt(e)||!Ex(e);function kn(e,n,r=new WeakSet){if(k0(e)||k0(n))return e===n;if(Tr(e)&&Tr(n))return e.getTime()===n.getTime();const s=Object.keys(e),i=Object.keys(n);if(s.length!==i.length)return!1;if(r.has(e)||r.has(n))return!0;r.add(e),r.add(n);for(const u of s){const c=e[u];if(!i.includes(u))return!1;if(u!=="ref"){const f=n[u];if(Tr(c)&&Tr(f)||yt(c)&&yt(f)||Array.isArray(c)&&Array.isArray(f)?!kn(c,f,r):c!==f)return!1}}return!0}function b8(e){const n=Ho(),{control:r=n.control,name:s,defaultValue:i,disabled:u,exact:c,compute:f}=e||{},h=fe.useRef(i),p=fe.useRef(f),b=fe.useRef(void 0),y=fe.useRef(r),v=fe.useRef(s);p.current=f;const[w,E]=fe.useState(()=>{const U=r._getWatch(s,h.current);return p.current?p.current(U):U}),C=fe.useCallback(U=>{const N=z0(s,r._names,U||r._formValues,!1,h.current);return p.current?p.current(N):N},[r._formValues,r._names,s]),O=fe.useCallback(U=>{if(!u){const N=z0(s,r._names,U||r._formValues,!1,h.current);if(p.current){const R=p.current(N);kn(R,b.current)||(E(R),b.current=R)}else E(N)}},[r._formValues,r._names,u,s]);Ih(()=>((y.current!==r||!kn(v.current,s))&&(y.current=r,v.current=s,O()),r._subscribe({name:s,formState:{values:!0},exact:c,callback:U=>{O(U.values)}})),[r,c,s,O]),fe.useEffect(()=>r._removeUnmounted());const M=y.current!==r,j=v.current,T=fe.useMemo(()=>{if(u)return null;const U=!M&&!kn(j,s);return M||U?C():null},[u,M,s,j,C]);return T!==null?T:w}function y8(e){const n=Ho(),{name:r,disabled:s,control:i=n.control,shouldUnregister:u,defaultValue:c}=e,f=Ax(i._names.array,r),h=fe.useMemo(()=>ge(i._formValues,r,ge(i._defaultValues,r,c)),[i,r,c]),p=b8({control:i,name:r,defaultValue:h,exact:!0}),b=Nx({control:i,name:r,exact:!0}),y=fe.useRef(e),v=fe.useRef(void 0),w=fe.useRef(i.register(r,{...e.rules,value:p,...dn(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const E=fe.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ge(b.errors,r)},isDirty:{enumerable:!0,get:()=>!!ge(b.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ge(b.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ge(b.validatingFields,r)},error:{enumerable:!0,get:()=>ge(b.errors,r)}}),[b,r]),C=fe.useCallback(T=>w.current.onChange({target:{value:Ox(T),name:r},type:Xu.CHANGE}),[r]),O=fe.useCallback(()=>w.current.onBlur({target:{value:ge(i._formValues,r),name:r},type:Xu.BLUR}),[r,i._formValues]),M=fe.useCallback(T=>{const U=ge(i._fields,r);U&&T&&(U._f.ref={focus:()=>T.focus&&T.focus(),select:()=>T.select&&T.select(),setCustomValidity:N=>T.setCustomValidity(N),reportValidity:()=>T.reportValidity()})},[i._fields,r]),j=fe.useMemo(()=>({name:r,value:p,...dn(s)||b.disabled?{disabled:b.disabled||s}:{},onChange:C,onBlur:O,ref:M}),[r,s,b.disabled,C,O,M,p]);return fe.useEffect(()=>{const T=i._options.shouldUnregister||u,U=v.current;U&&U!==r&&!f&&i.unregister(U),i.register(r,{...y.current.rules,...dn(y.current.disabled)?{disabled:y.current.disabled}:{}});const N=(R,D)=>{const I=ge(i._fields,R);I&&I._f&&(I._f.mount=D)};if(N(r,!0),T){const R=St(ge(i._options.defaultValues,r,y.current.defaultValue));tt(i._defaultValues,r,R),lt(ge(i._formValues,r))&&tt(i._formValues,r,R)}return!f&&i.register(r),v.current=r,()=>{(f?T&&!i._state.action:T)?i.unregister(r):N(r,!1)}},[r,i,f,u]),fe.useEffect(()=>{i._setDisabledField({disabled:s,name:r})},[s,r,i]),fe.useMemo(()=>({field:j,formState:b,fieldState:E}),[j,b,E])}const _h=e=>e.render(y8(e));var v8=(e,n,r,s,i)=>n?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:i||!0}}:{},ao=e=>Array.isArray(e)?e:[e],$y=()=>{let e=[];return{get observers(){return e},next:i=>{for(const u of e)u.next&&u.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(u=>u!==i)}}),unsubscribe:()=>{e=[]}}};function Mx(e,n){const r={};for(const s in e)if(e.hasOwnProperty(s)){const i=e[s],u=n[s];if(i&&yt(i)&&u){const c=Mx(i,u);yt(c)&&(r[s]=c)}else e[s]&&(r[s]=u)}return r}var Bt=e=>yt(e)&&!Object.keys(e).length,Ph=e=>e.type==="file",Ln=e=>typeof e=="function",Ku=e=>{if(!zh)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},Tx=e=>e.type==="select-multiple",Vh=e=>e.type==="radio",x8=e=>Vh(e)||Fo(e),r0=e=>Ku(e)&&e.isConnected;function S8(e,n){const r=n.slice(0,-1).length;let s=0;for(;s<r;)e=lt(e)?s++:e[n[s++]];return e}function w8(e){for(const n in e)if(e.hasOwnProperty(n)&&!lt(e[n]))return!1;return!0}function gt(e,n){const r=Array.isArray(n)?n:bc(n)?[n]:Lh(n),s=r.length===1?e:S8(e,r),i=r.length-1,u=r[i];return s&&delete s[u],i!==0&&(yt(s)&&Bt(s)||Array.isArray(s)&&w8(s))&>(e,r.slice(0,-1)),e}var C8=e=>{for(const n in e)if(Ln(e[n]))return!0;return!1};function Dx(e){return Array.isArray(e)||yt(e)&&!C8(e)}function L0(e,n={}){for(const r in e)Dx(e[r])?(n[r]=Array.isArray(e[r])?[]:{},L0(e[r],n[r])):lt(e[r])||(n[r]=!0);return n}function Is(e,n,r){r||(r=L0(n));for(const s in e)Dx(e[s])?lt(n)||k0(r[s])?r[s]=L0(e[s],Array.isArray(e[s])?[]:{}):Is(e[s],Wt(n)?{}:n[s],r[s]):r[s]=!kn(e[s],n[s]);return r}const Yy={value:!1,isValid:!1},Qy={value:!0,isValid:!0};var Rx=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!lt(e[0].attributes.value)?lt(e[0].value)||e[0].value===""?Qy:{value:e[0].value,isValid:!0}:Qy:Yy}return Yy},zx=(e,{valueAsNumber:n,valueAsDate:r,setValueAs:s})=>lt(e)?e:n?e===""?NaN:e&&+e:r&&hn(e)?new Date(e):s?s(e):e;const Xy={isValid:!1,value:null};var kx=e=>Array.isArray(e)?e.reduce((n,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:n,Xy):Xy;function Ky(e){const n=e.ref;return Ph(n)?n.files:Vh(n)?kx(e.refs).value:Tx(n)?[...n.selectedOptions].map(({value:r})=>r):Fo(n)?Rx(e.refs).value:zx(lt(n.value)?e.ref.value:n.value,e)}var E8=(e,n,r,s)=>{const i={};for(const u of e){const c=ge(n,u);c&&tt(i,u,c._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:s}},Zu=e=>e instanceof RegExp,Ki=e=>lt(e)?e:Zu(e)?e.source:yt(e)?Zu(e.value)?e.value.source:e.value:e,Zy=e=>({isOnSubmit:!e||e===zn.onSubmit,isOnBlur:e===zn.onBlur,isOnChange:e===zn.onChange,isOnAll:e===zn.all,isOnTouch:e===zn.onTouched});const Jy="AsyncFunction";var O8=e=>!!e&&!!e.validate&&!!(Ln(e.validate)&&e.validate.constructor.name===Jy||yt(e.validate)&&Object.values(e.validate).find(n=>n.constructor.name===Jy)),A8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Wy=(e,n,r)=>!r&&(n.watchAll||n.watch.has(e)||[...n.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ro=(e,n,r,s)=>{for(const i of r||Object.keys(e)){const u=ge(e,i);if(u){const{_f:c,...f}=u;if(c){if(c.refs&&c.refs[0]&&n(c.refs[0],i)&&!s)return!0;if(c.ref&&n(c.ref,c.name)&&!s)return!0;if(ro(f,n))break}else if(yt(f)&&ro(f,n))break}}};function ev(e,n,r){const s=ge(e,r);if(s||bc(r))return{error:s,name:r};const i=r.split(".");for(;i.length;){const u=i.join("."),c=ge(n,u),f=ge(e,u);if(c&&!Array.isArray(c)&&r!==u)return{name:r};if(f&&f.type)return{name:u,error:f};if(f&&f.root&&f.root.type)return{name:`${u}.root`,error:f.root};i.pop()}return{name:r}}var j8=(e,n,r,s)=>{r(e);const{name:i,...u}=e;return Bt(u)||Object.keys(u).length>=Object.keys(n).length||Object.keys(u).find(c=>n[c]===(!s||zn.all))},N8=(e,n,r)=>!e||!n||e===n||ao(e).some(s=>s&&(r?s===n:s.startsWith(n)||n.startsWith(s))),M8=(e,n,r,s,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(n||e):(r?s.isOnBlur:i.isOnBlur)?!e:(r?s.isOnChange:i.isOnChange)?e:!0,T8=(e,n)=>!kh(ge(e,n)).length&>(e,n),D8=(e,n,r)=>{const s=ao(ge(e,r));return tt(s,"root",n[r]),tt(e,r,s),e};function tv(e,n,r="validate"){if(hn(e)||Array.isArray(e)&&e.every(hn)||dn(e)&&!e)return{type:r,message:hn(e)?e:"",ref:n}}var Ds=e=>yt(e)&&!Zu(e)?e:{value:e,message:""},nv=async(e,n,r,s,i,u)=>{const{ref:c,refs:f,required:h,maxLength:p,minLength:b,min:y,max:v,pattern:w,validate:E,name:C,valueAsNumber:O,mount:M}=e._f,j=ge(r,C);if(!M||n.has(C))return{};const T=f?f[0]:c,U=J=>{i&&T.reportValidity&&(T.setCustomValidity(dn(J)?"":J||""),T.reportValidity())},N={},R=Vh(c),D=Fo(c),I=R||D,B=(O||Ph(c))&<(c.value)&<(j)||Ku(c)&&c.value===""||j===""||Array.isArray(j)&&!j.length,Z=v8.bind(null,C,s,N),re=(J,Y,oe,le=xa.maxLength,_=xa.minLength)=>{const K=J?Y:oe;N[C]={type:J?le:_,message:K,ref:c,...Z(J?le:_,K)}};if(u?!Array.isArray(j)||!j.length:h&&(!I&&(B||Wt(j))||dn(j)&&!j||D&&!Rx(f).isValid||R&&!kx(f).isValid)){const{value:J,message:Y}=hn(h)?{value:!!h,message:h}:Ds(h);if(J&&(N[C]={type:xa.required,message:Y,ref:T,...Z(xa.required,Y)},!s))return U(Y),N}if(!B&&(!Wt(y)||!Wt(v))){let J,Y;const oe=Ds(v),le=Ds(y);if(!Wt(j)&&!isNaN(j)){const _=c.valueAsNumber||j&&+j;Wt(oe.value)||(J=_>oe.value),Wt(le.value)||(Y=_<le.value)}else{const _=c.valueAsDate||new Date(j),K=we=>new Date(new Date().toDateString()+" "+we),ie=c.type=="time",be=c.type=="week";hn(oe.value)&&j&&(J=ie?K(j)>K(oe.value):be?j>oe.value:_>new Date(oe.value)),hn(le.value)&&j&&(Y=ie?K(j)<K(le.value):be?j<le.value:_<new Date(le.value))}if((J||Y)&&(re(!!J,oe.message,le.message,xa.max,xa.min),!s))return U(N[C].message),N}if((p||b)&&!B&&(hn(j)||u&&Array.isArray(j))){const J=Ds(p),Y=Ds(b),oe=!Wt(J.value)&&j.length>+J.value,le=!Wt(Y.value)&&j.length<+Y.value;if((oe||le)&&(re(oe,J.message,Y.message),!s))return U(N[C].message),N}if(w&&!B&&hn(j)){const{value:J,message:Y}=Ds(w);if(Zu(J)&&!j.match(J)&&(N[C]={type:xa.pattern,message:Y,ref:c,...Z(xa.pattern,Y)},!s))return U(Y),N}if(E){if(Ln(E)){const J=await E(j,r),Y=tv(J,T);if(Y&&(N[C]={...Y,...Z(xa.validate,Y.message)},!s))return U(Y.message),N}else if(yt(E)){let J={};for(const Y in E){if(!Bt(J)&&!s)break;const oe=tv(await E[Y](j,r),T,Y);oe&&(J={...oe,...Z(Y,oe.message)},U(oe.message),s&&(N[C]=J))}if(!Bt(J)&&(N[C]={ref:T,...J},!s))return N}}return U(!0),N};const R8={mode:zn.onSubmit,reValidateMode:zn.onChange,shouldFocusError:!0};function z8(e={}){let n={...R8,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ln(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},i=yt(n.defaultValues)||yt(n.values)?St(n.defaultValues||n.values)||{}:{},u=n.shouldUnregister?{}:St(i),c={action:!1,mount:!1,watch:!1},f={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},h,p=0;const b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let y={...b};const v={array:$y(),state:$y()},w=n.criteriaMode===zn.all,E=k=>q=>{clearTimeout(p),p=setTimeout(k,q)},C=async k=>{if(!n.disabled&&(b.isValid||y.isValid||k)){const q=n.resolver?Bt((await D()).errors):await B(s,!0);q!==r.isValid&&v.state.next({isValid:q})}},O=(k,q)=>{!n.disabled&&(b.isValidating||b.validatingFields||y.isValidating||y.validatingFields)&&((k||Array.from(f.mount)).forEach(X=>{X&&(q?tt(r.validatingFields,X,q):gt(r.validatingFields,X))}),v.state.next({validatingFields:r.validatingFields,isValidating:!Bt(r.validatingFields)}))},M=(k,q=[],X,ye,ue=!0,ce=!0)=>{if(ye&&X&&!n.disabled){if(c.action=!0,ce&&Array.isArray(ge(s,k))){const Ce=X(ge(s,k),ye.argA,ye.argB);ue&&tt(s,k,Ce)}if(ce&&Array.isArray(ge(r.errors,k))){const Ce=X(ge(r.errors,k),ye.argA,ye.argB);ue&&tt(r.errors,k,Ce),T8(r.errors,k)}if((b.touchedFields||y.touchedFields)&&ce&&Array.isArray(ge(r.touchedFields,k))){const Ce=X(ge(r.touchedFields,k),ye.argA,ye.argB);ue&&tt(r.touchedFields,k,Ce)}(b.dirtyFields||y.dirtyFields)&&(r.dirtyFields=Is(i,u)),v.state.next({name:k,isDirty:re(k,q),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else tt(u,k,q)},j=(k,q)=>{tt(r.errors,k,q),v.state.next({errors:r.errors})},T=k=>{r.errors=k,v.state.next({errors:r.errors,isValid:!1})},U=(k,q,X,ye)=>{const ue=ge(s,k);if(ue){const ce=ge(u,k,lt(X)?ge(i,k):X);lt(ce)||ye&&ye.defaultChecked||q?tt(u,k,q?ce:Ky(ue._f)):oe(k,ce),c.mount&&C()}},N=(k,q,X,ye,ue)=>{let ce=!1,Ce=!1;const Pe={name:k};if(!n.disabled){if(!X||ye){(b.isDirty||y.isDirty)&&(Ce=r.isDirty,r.isDirty=Pe.isDirty=re(),ce=Ce!==Pe.isDirty);const Fe=kn(ge(i,k),q);Ce=!!ge(r.dirtyFields,k),Fe?gt(r.dirtyFields,k):tt(r.dirtyFields,k,!0),Pe.dirtyFields=r.dirtyFields,ce=ce||(b.dirtyFields||y.dirtyFields)&&Ce!==!Fe}if(X){const Fe=ge(r.touchedFields,k);Fe||(tt(r.touchedFields,k,X),Pe.touchedFields=r.touchedFields,ce=ce||(b.touchedFields||y.touchedFields)&&Fe!==X)}ce&&ue&&v.state.next(Pe)}return ce?Pe:{}},R=(k,q,X,ye)=>{const ue=ge(r.errors,k),ce=(b.isValid||y.isValid)&&dn(q)&&r.isValid!==q;if(n.delayError&&X?(h=E(()=>j(k,X)),h(n.delayError)):(clearTimeout(p),h=null,X?tt(r.errors,k,X):gt(r.errors,k)),(X?!kn(ue,X):ue)||!Bt(ye)||ce){const Ce={...ye,...ce&&dn(q)?{isValid:q}:{},errors:r.errors,name:k};r={...r,...Ce},v.state.next(Ce)}},D=async k=>{O(k,!0);const q=await n.resolver(u,n.context,E8(k||f.mount,s,n.criteriaMode,n.shouldUseNativeValidation));return O(k),q},I=async k=>{const{errors:q}=await D(k);if(k)for(const X of k){const ye=ge(q,X);ye?tt(r.errors,X,ye):gt(r.errors,X)}else r.errors=q;return q},B=async(k,q,X={valid:!0})=>{for(const ye in k){const ue=k[ye];if(ue){const{_f:ce,...Ce}=ue;if(ce){const Pe=f.array.has(ce.name),Fe=ue._f&&O8(ue._f);Fe&&b.validatingFields&&O([ce.name],!0);const Gt=await nv(ue,f.disabled,u,w,n.shouldUseNativeValidation&&!q,Pe);if(Fe&&b.validatingFields&&O([ce.name]),Gt[ce.name]&&(X.valid=!1,q))break;!q&&(ge(Gt,ce.name)?Pe?D8(r.errors,Gt,ce.name):tt(r.errors,ce.name,Gt[ce.name]):gt(r.errors,ce.name))}!Bt(Ce)&&await B(Ce,q,X)}}return X.valid},Z=()=>{for(const k of f.unMount){const q=ge(s,k);q&&(q._f.refs?q._f.refs.every(X=>!r0(X)):!r0(q._f.ref))&&he(k)}f.unMount=new Set},re=(k,q)=>!n.disabled&&(k&&q&&tt(u,k,q),!kn(we(),i)),J=(k,q,X)=>z0(k,f,{...c.mount?u:lt(q)?i:hn(k)?{[k]:q}:q},X,q),Y=k=>kh(ge(c.mount?u:i,k,n.shouldUnregister?ge(i,k,[]):[])),oe=(k,q,X={})=>{const ye=ge(s,k);let ue=q;if(ye){const ce=ye._f;ce&&(!ce.disabled&&tt(u,k,zx(q,ce)),ue=Ku(ce.ref)&&Wt(q)?"":q,Tx(ce.ref)?[...ce.ref.options].forEach(Ce=>Ce.selected=ue.includes(Ce.value)):ce.refs?Fo(ce.ref)?ce.refs.forEach(Ce=>{(!Ce.defaultChecked||!Ce.disabled)&&(Array.isArray(ue)?Ce.checked=!!ue.find(Pe=>Pe===Ce.value):Ce.checked=ue===Ce.value||!!ue)}):ce.refs.forEach(Ce=>Ce.checked=Ce.value===ue):Ph(ce.ref)?ce.ref.value="":(ce.ref.value=ue,ce.ref.type||v.state.next({name:k,values:St(u)})))}(X.shouldDirty||X.shouldTouch)&&N(k,ue,X.shouldTouch,X.shouldDirty,!0),X.shouldValidate&&be(k)},le=(k,q,X)=>{for(const ye in q){if(!q.hasOwnProperty(ye))return;const ue=q[ye],ce=k+"."+ye,Ce=ge(s,ce);(f.array.has(k)||yt(ue)||Ce&&!Ce._f)&&!Tr(ue)?le(ce,ue,X):oe(ce,ue,X)}},_=(k,q,X={})=>{const ye=ge(s,k),ue=f.array.has(k),ce=St(q);tt(u,k,ce),ue?(v.array.next({name:k,values:St(u)}),(b.isDirty||b.dirtyFields||y.isDirty||y.dirtyFields)&&X.shouldDirty&&v.state.next({name:k,dirtyFields:Is(i,u),isDirty:re(k,ce)})):ye&&!ye._f&&!Wt(ce)?le(k,ce,X):oe(k,ce,X),Wy(k,f)&&v.state.next({...r,name:k}),v.state.next({name:c.mount?k:void 0,values:St(u)})},K=async k=>{c.mount=!0;const q=k.target;let X=q.name,ye=!0;const ue=ge(s,X),ce=Fe=>{ye=Number.isNaN(Fe)||Tr(Fe)&&isNaN(Fe.getTime())||kn(Fe,ge(u,X,Fe))},Ce=Zy(n.mode),Pe=Zy(n.reValidateMode);if(ue){let Fe,Gt;const cr=q.type?Ky(ue._f):Ox(k),Pn=k.type===Xu.BLUR||k.type===Xu.FOCUS_OUT,kc=!A8(ue._f)&&!n.resolver&&!ge(r.errors,X)&&!ue._f.deps||M8(Pn,ge(r.touchedFields,X),r.isSubmitted,Pe,Ce),ta=Wy(X,f,Pn);tt(u,X,cr),Pn?(!q||!q.readOnly)&&(ue._f.onBlur&&ue._f.onBlur(k),h&&h(0)):ue._f.onChange&&ue._f.onChange(k);const At=N(X,cr,Pn),Vn=!Bt(At)||ta;if(!Pn&&v.state.next({name:X,type:k.type,values:St(u)}),kc)return(b.isValid||y.isValid)&&(n.mode==="onBlur"?Pn&&C():Pn||C()),Vn&&v.state.next({name:X,...ta?{}:At});if(!Pn&&ta&&v.state.next({...r}),n.resolver){const{errors:kt}=await D([X]);if(ce(cr),ye){const Lc=ev(r.errors,s,X),Jo=ev(kt,s,Lc.name||X);Fe=Jo.error,X=Jo.name,Gt=Bt(kt)}}else O([X],!0),Fe=(await nv(ue,f.disabled,u,w,n.shouldUseNativeValidation))[X],O([X]),ce(cr),ye&&(Fe?Gt=!1:(b.isValid||y.isValid)&&(Gt=await B(s,!0)));ye&&(ue._f.deps&&(!Array.isArray(ue._f.deps)||ue._f.deps.length>0)&&be(ue._f.deps),R(X,Gt,Fe,At))}},ie=(k,q)=>{if(ge(r.errors,q)&&k.focus)return k.focus(),1},be=async(k,q={})=>{let X,ye;const ue=ao(k);if(n.resolver){const ce=await I(lt(k)?k:ue);X=Bt(ce),ye=k?!ue.some(Ce=>ge(ce,Ce)):X}else k?(ye=(await Promise.all(ue.map(async ce=>{const Ce=ge(s,ce);return await B(Ce&&Ce._f?{[ce]:Ce}:Ce)}))).every(Boolean),!(!ye&&!r.isValid)&&C()):ye=X=await B(s);return v.state.next({...!hn(k)||(b.isValid||y.isValid)&&X!==r.isValid?{}:{name:k},...n.resolver||!k?{isValid:X}:{},errors:r.errors}),q.shouldFocus&&!ye&&ro(s,ie,k?ue:f.mount),ye},we=(k,q)=>{let X={...c.mount?u:i};return q&&(X=Mx(q.dirtyFields?r.dirtyFields:r.touchedFields,X)),lt(k)?X:hn(k)?ge(X,k):k.map(ye=>ge(X,ye))},De=(k,q)=>({invalid:!!ge((q||r).errors,k),isDirty:!!ge((q||r).dirtyFields,k),error:ge((q||r).errors,k),isValidating:!!ge(r.validatingFields,k),isTouched:!!ge((q||r).touchedFields,k)}),V=k=>{k&&ao(k).forEach(q=>gt(r.errors,q)),v.state.next({errors:k?r.errors:{}})},te=(k,q,X)=>{const ye=(ge(s,k,{_f:{}})._f||{}).ref,ue=ge(r.errors,k)||{},{ref:ce,message:Ce,type:Pe,...Fe}=ue;tt(r.errors,k,{...Fe,...q,ref:ye}),v.state.next({name:k,errors:r.errors,isValid:!1}),X&&X.shouldFocus&&ye&&ye.focus&&ye.focus()},ne=(k,q)=>Ln(k)?v.state.subscribe({next:X=>"values"in X&&k(J(void 0,q),X)}):J(k,q,!0),se=k=>v.state.subscribe({next:q=>{N8(k.name,q.name,k.exact)&&j8(q,k.formState||b,Js,k.reRenderRoot)&&k.callback({values:{...u},...r,...q,defaultValues:i})}}).unsubscribe,pe=k=>(c.mount=!0,y={...y,...k.formState},se({...k,formState:y})),he=(k,q={})=>{for(const X of k?ao(k):f.mount)f.mount.delete(X),f.array.delete(X),q.keepValue||(gt(s,X),gt(u,X)),!q.keepError&>(r.errors,X),!q.keepDirty&>(r.dirtyFields,X),!q.keepTouched&>(r.touchedFields,X),!q.keepIsValidating&>(r.validatingFields,X),!n.shouldUnregister&&!q.keepDefaultValue&>(i,X);v.state.next({values:St(u)}),v.state.next({...r,...q.keepDirty?{isDirty:re()}:{}}),!q.keepIsValid&&C()},Ae=({disabled:k,name:q})=>{(dn(k)&&c.mount||k||f.disabled.has(q))&&(k?f.disabled.add(q):f.disabled.delete(q))},Te=(k,q={})=>{let X=ge(s,k);const ye=dn(q.disabled)||dn(n.disabled);return tt(s,k,{...X||{},_f:{...X&&X._f?X._f:{ref:{name:k}},name:k,mount:!0,...q}}),f.mount.add(k),X?Ae({disabled:dn(q.disabled)?q.disabled:n.disabled,name:k}):U(k,!0,q.value),{...ye?{disabled:q.disabled||n.disabled}:{},...n.progressive?{required:!!q.required,min:Ki(q.min),max:Ki(q.max),minLength:Ki(q.minLength),maxLength:Ki(q.maxLength),pattern:Ki(q.pattern)}:{},name:k,onChange:K,onBlur:K,ref:ue=>{if(ue){Te(k,q),X=ge(s,k);const ce=lt(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,Ce=x8(ce),Pe=X._f.refs||[];if(Ce?Pe.find(Fe=>Fe===ce):ce===X._f.ref)return;tt(s,k,{_f:{...X._f,...Ce?{refs:[...Pe.filter(r0),ce,...Array.isArray(ge(i,k))?[{}]:[]],ref:{type:ce.type,name:k}}:{ref:ce}}}),U(k,!1,void 0,ce)}else X=ge(s,k,{}),X._f&&(X._f.mount=!1),(n.shouldUnregister||q.shouldUnregister)&&!(Ax(f.array,k)&&c.action)&&f.unMount.add(k)}}},Je=()=>n.shouldFocusError&&ro(s,ie,f.mount),_t=k=>{dn(k)&&(v.state.next({disabled:k}),ro(s,(q,X)=>{const ye=ge(s,X);ye&&(q.disabled=ye._f.disabled||k,Array.isArray(ye._f.refs)&&ye._f.refs.forEach(ue=>{ue.disabled=ye._f.disabled||k}))},0,!1))},qt=(k,q)=>async X=>{let ye;X&&(X.preventDefault&&X.preventDefault(),X.persist&&X.persist());let ue=St(u);if(v.state.next({isSubmitting:!0}),n.resolver){const{errors:ce,values:Ce}=await D();r.errors=ce,ue=St(Ce)}else await B(s);if(f.disabled.size)for(const ce of f.disabled)gt(ue,ce);if(gt(r.errors,"root"),Bt(r.errors)){v.state.next({errors:{}});try{await k(ue,X)}catch(ce){ye=ce}}else q&&await q({...r.errors},X),Je(),setTimeout(Je);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Bt(r.errors)&&!ye,submitCount:r.submitCount+1,errors:r.errors}),ye)throw ye},ea=(k,q={})=>{ge(s,k)&&(lt(q.defaultValue)?_(k,St(ge(i,k))):(_(k,q.defaultValue),tt(i,k,St(q.defaultValue))),q.keepTouched||gt(r.touchedFields,k),q.keepDirty||(gt(r.dirtyFields,k),r.isDirty=q.defaultValue?re(k,St(ge(i,k))):re()),q.keepError||(gt(r.errors,k),b.isValid&&C()),v.state.next({...r}))},Pt=(k,q={})=>{const X=k?St(k):i,ye=St(X),ue=Bt(k),ce=ue?i:ye;if(q.keepDefaultValues||(i=X),!q.keepValues){if(q.keepDirtyValues){const Ce=new Set([...f.mount,...Object.keys(Is(i,u))]);for(const Pe of Array.from(Ce))ge(r.dirtyFields,Pe)?tt(ce,Pe,ge(u,Pe)):_(Pe,ge(ce,Pe))}else{if(zh&<(k))for(const Ce of f.mount){const Pe=ge(s,Ce);if(Pe&&Pe._f){const Fe=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(Ku(Fe)){const Gt=Fe.closest("form");if(Gt){Gt.reset();break}}}}if(q.keepFieldsRef)for(const Ce of f.mount)_(Ce,ge(ce,Ce));else s={}}u=n.shouldUnregister?q.keepDefaultValues?St(i):{}:St(ce),v.array.next({values:{...ce}}),v.state.next({values:{...ce}})}f={mount:q.keepDirtyValues?f.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!b.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!n.shouldUnregister&&!Bt(ce),c.watch=!!n.shouldUnregister,v.state.next({submitCount:q.keepSubmitCount?r.submitCount:0,isDirty:ue?!1:q.keepDirty?r.isDirty:!!(q.keepDefaultValues&&!kn(k,i)),isSubmitted:q.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ue?{}:q.keepDirtyValues?q.keepDefaultValues&&u?Is(i,u):r.dirtyFields:q.keepDefaultValues&&k?Is(i,k):q.keepDirty?r.dirtyFields:{},touchedFields:q.keepTouched?r.touchedFields:{},errors:q.keepErrors?r.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},_n=(k,q)=>Pt(Ln(k)?k(u):k,q),ur=(k,q={})=>{const X=ge(s,k),ye=X&&X._f;if(ye){const ue=ye.refs?ye.refs[0]:ye.ref;ue.focus&&(ue.focus(),q.shouldSelect&&Ln(ue.select)&&ue.select())}},Js=k=>{r={...r,...k}},Gr={control:{register:Te,unregister:he,getFieldState:De,handleSubmit:qt,setError:te,_subscribe:se,_runSchema:D,_focusError:Je,_getWatch:J,_getDirty:re,_setValid:C,_setFieldArray:M,_setDisabledField:Ae,_setErrors:T,_getFieldArray:Y,_reset:Pt,_resetDefaultValues:()=>Ln(n.defaultValues)&&n.defaultValues().then(k=>{_n(k,n.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:_t,_subjects:v,_proxyFormState:b,get _fields(){return s},get _formValues(){return u},get _state(){return c},set _state(k){c=k},get _defaultValues(){return i},get _names(){return f},set _names(k){f=k},get _formState(){return r},get _options(){return n},set _options(k){n={...n,...k}}},subscribe:pe,trigger:be,register:Te,handleSubmit:qt,watch:ne,setValue:_,getValues:we,reset:_n,resetField:ea,clearErrors:V,unregister:he,setError:te,setFocus:ur,getFieldState:De};return{...Gr,formControl:Gr}}function Bh(e={}){const n=fe.useRef(void 0),r=fe.useRef(void 0),[s,i]=fe.useState({isDirty:!1,isValidating:!1,isLoading:Ln(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:Ln(e.defaultValues)?void 0:e.defaultValues});if(!n.current)if(e.formControl)n.current={...e.formControl,formState:s},e.defaultValues&&!Ln(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...f}=z8(e);n.current={...f,formState:s}}const u=n.current.control;return u._options=e,Ih(()=>{const c=u._subscribe({formState:u._proxyFormState,callback:()=>i({...u._formState}),reRenderRoot:!0});return i(f=>({...f,isReady:!0})),u._formState.isReady=!0,c},[u]),fe.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),fe.useEffect(()=>{e.mode&&(u._options.mode=e.mode),e.reValidateMode&&(u._options.reValidateMode=e.reValidateMode)},[u,e.mode,e.reValidateMode]),fe.useEffect(()=>{e.errors&&(u._setErrors(e.errors),u._focusError())},[u,e.errors]),fe.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,e.shouldUnregister]),fe.useEffect(()=>{if(u._proxyFormState.isDirty){const c=u._getDirty();c!==s.isDirty&&u._subjects.state.next({isDirty:c})}},[u,s.isDirty]),fe.useEffect(()=>{e.values&&!kn(e.values,r.current)?(u._reset(e.values,{keepFieldsRef:!0,...u._options.resetOptions}),r.current=e.values,i(c=>({...c}))):u._resetDefaultValues()},[u,e.values]),fe.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),n.current.formState=jx(s,u),n.current}const k8=(e,n)=>S.forwardRef(({value:r,name:s,showErrorOnBlur:i,showErrorOnChange:u,validators:c,...f},h)=>{const{onChange:p,onBlur:b}=f,{control:y,formState:{errors:v,defaultValues:w},trigger:E,setValue:C,getValues:O}=Ho(),{submitCount:M}=Nx();if(!s)throw new Error(`[Field: ${e.displayName}] The name prop is required.`);const j=[...v[s]?.types?Object.values(v[s].types??[]):[]];j.length===0&&v[s]&&j.push("Invalid value"),S.useEffect(()=>{M>0&&E(s)},[f.required]),S.useEffect(()=>{f.errors&&f.errors.length>0&&E(s)},[s,f.errors,E]);const[T,U]=S.useState(!1);return S.useEffect(()=>{T&&C(s,r),U(!0)},[s,r]),r!==void 0&&!p&&console.warn(`[Field: ${s}] Value prop provided without onChange so it will be ignored. Use disabled/readOnly if you want to prevent changes.`),g.jsx(_h,{control:y,name:s,defaultValue:r??f.defaultValue,disabled:f.disabled,render:({field:{onChange:N,onBlur:R,value:D,...I}})=>{const B=S.useCallback(Y=>{i?E(s):R(),b&&b(Y)},[R,i]),Z=S.useCallback(Y=>{if(p)Object.hasOwn(Y,"target")?C(s,Y.target.value):C(s,Y),p(Y);else{let oe=Y;(Y instanceof Event||Y.target instanceof HTMLElement)&&(oe=Y.target.value),C(s,oe)}u===void 0&&i===void 0?M>0&&E(s):u&&E(s)},[D,u,i,M]),{ref:re}=I,J=Y=>{typeof h=="function"?h(Y):h&&(h.current=Y),re(Y)};return g.jsx(e,{...f,...I,value:D,onBlur:B,onChange:Z,errors:j,ref:J})},rules:{...f.required?{required:{value:f.required,message:"This field is required"}}:{required:void 0},...f.pattern&&{pattern:{value:new RegExp(f.pattern),message:"This field does not match the required pattern"}},...f.maxLength!==void 0&&f.maxLength>=0?{maxLength:{value:f.maxLength,message:`This field must be at most ${f.maxLength} characters`}}:{maxLength:void 0},...f.minLength!==void 0&&f.minLength>=0?{minLength:{value:f.minLength,message:`This field must be at least ${f.minLength} characters`}}:{minLength:void 0},...f.minValue&&{min:{value:f.minValue,message:`This field must be greater than or equal to ${f.minValue}`}},...f.maxValue&&{max:{value:f.maxValue,message:`This field must be less than or equal to ${f.maxValue}`}},validate:{...f.errors?Object.fromEntries(Array.isArray(f.errors)?f.errors.map((N,R)=>[`_propError${R}`,()=>N]):[]):{},...c!==void 0?Object.fromEntries((Array.isArray(c)?c:[c]).map((N,R)=>[`customValidation${R}`,N])):{}}}})}),Lx=({children:e,as:n,className:r})=>{const s=n??"p";return g.jsx(s,{className:xe("font-sans text-sm font-normal leading-5 text-gray-600 dark:text-gray-500",r),children:e})},Ux=({children:e})=>g.jsx("div",{className:"flex flex-col gap-2",children:e});var yc="Popover",[Ix]=Eh(yc,[cc]),qo=cc(),[L8,or]=Ix(yc),_x=e=>{const{__scopePopover:n,children:r,open:s,defaultOpen:i,onOpenChange:u,modal:c=!1}=e,f=qo(n),h=S.useRef(null),[p,b]=S.useState(!1),[y,v]=Oh({prop:s,defaultProp:i??!1,onChange:u,caller:yc});return g.jsx(P1,{...f,children:g.jsx(L8,{scope:n,contentId:Ca(),triggerRef:h,open:y,onOpenChange:v,onOpenToggle:S.useCallback(()=>v(w=>!w),[v]),hasCustomAnchor:p,onCustomAnchorAdd:S.useCallback(()=>b(!0),[]),onCustomAnchorRemove:S.useCallback(()=>b(!1),[]),modal:c,children:r})})};_x.displayName=yc;var Px="PopoverAnchor",Vx=S.forwardRef((e,n)=>{const{__scopePopover:r,...s}=e,i=or(Px,r),u=qo(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:f}=i;return S.useEffect(()=>(c(),()=>f()),[c,f]),g.jsx(Ah,{...u,...s,ref:n})});Vx.displayName=Px;var Bx="PopoverTrigger",Fx=S.forwardRef((e,n)=>{const{__scopePopover:r,...s}=e,i=or(Bx,r),u=qo(r),c=fc(n,i.triggerRef),f=g.jsx(rr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Yx(i.open),...s,ref:c,onClick:tn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?f:g.jsx(Ah,{asChild:!0,...u,children:f})});Fx.displayName=Bx;var Fh="PopoverPortal",[U8,I8]=Ix(Fh,{forceMount:void 0}),Hx=e=>{const{__scopePopover:n,forceMount:r,children:s,container:i}=e,u=or(Fh,n);return g.jsx(U8,{scope:n,forceMount:r,children:g.jsx(_o,{present:r||u.open,children:g.jsx(V1,{asChild:!0,container:i,children:s})})})};Hx.displayName=Fh;var qs="PopoverContent",qx=S.forwardRef((e,n)=>{const r=I8(qs,e.__scopePopover),{forceMount:s=r.forceMount,...i}=e,u=or(qs,e.__scopePopover);return g.jsx(_o,{present:s||u.open,children:u.modal?g.jsx(P8,{...i,ref:n}):g.jsx(V8,{...i,ref:n})})});qx.displayName=qs;var _8=mC("PopoverContent.RemoveScroll"),P8=S.forwardRef((e,n)=>{const r=or(qs,e.__scopePopover),s=S.useRef(null),i=fc(n,s),u=S.useRef(!1);return S.useEffect(()=>{const c=s.current;if(c)return dC(c)},[]),g.jsx(hC,{as:_8,allowPinchZoom:!0,children:g.jsx(Gx,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tn(e.onCloseAutoFocus,c=>{c.preventDefault(),u.current||r.triggerRef.current?.focus()}),onPointerDownOutside:tn(e.onPointerDownOutside,c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,p=f.button===2||h;u.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:tn(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),V8=S.forwardRef((e,n)=>{const r=or(qs,e.__scopePopover),s=S.useRef(!1),i=S.useRef(!1);return g.jsx(Gx,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(s.current||r.triggerRef.current?.focus(),u.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(s.current=!0,u.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=u.target;r.triggerRef.current?.contains(c)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&i.current&&u.preventDefault()}})}),Gx=S.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:b,...y}=e,v=or(qs,r),w=qo(r);return pC(),g.jsx(gC,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:u,children:g.jsx(B1,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:b,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:g.jsx(F1,{"data-state":Yx(v.open),role:"dialog",id:v.contentId,...w,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$x="PopoverClose",B8=S.forwardRef((e,n)=>{const{__scopePopover:r,...s}=e,i=or($x,r);return g.jsx(rr.button,{type:"button",...s,ref:n,onClick:tn(e.onClick,()=>i.onOpenChange(!1))})});B8.displayName=$x;var F8="PopoverArrow",H8=S.forwardRef((e,n)=>{const{__scopePopover:r,...s}=e,i=qo(r);return g.jsx(H1,{...i,...s,ref:n})});H8.displayName=F8;function Yx(e){return e?"open":"closed"}var q8=_x,G8=Vx,$8=Fx,Y8=Hx,Q8=qx;const Hh=q8,X8=G8,Qx=$8,qh=fe.forwardRef(({align:e="center",sideOffset:n=4,className:r,...s},i)=>g.jsx(Y8,{children:g.jsx(Q8,{align:e,sideOffset:n,className:xe(["data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in","data-[state=closed]:animate-zoom-out data-[state=open]:animate-zoom-in","data-[side=bottom]:animate-slide-in-from-top data-[side=left]:animate-slide-in-from-right","data-[side=right]:animate-slide-in-from-left data-[side=top]:animate-slide-in-from-bottom","w-(--radix-popover-trigger-width) z-50 border p-0 outline-none","border-gray-300 bg-white dark:border-slate-500 dark:bg-slate-600","rounded-md shadow-[1px_4px_15px_0px_rgba(74,88,115,0.25)] dark:shadow-[1px_4px_15.3px_0px_#141921]"],r),ref:i,...s})})),K8=e=>typeof e=="string"?g.jsx(ae,{name:e,size:16,className:xe("text-gray-700 dark:text-gray-400")}):e&&g.jsx(e,{className:xe("size-4","text-gray-700 dark:text-gray-400")}),av=({options:e=[],selectedValues:n,multiple:r,selectionIcon:s,selectionIconPosition:i,hasAnyIcon:u,toggleOption:c,tabIndex:f})=>g.jsx(g.Fragment,{children:e.map(h=>{const p=n.includes(h.value);return g.jsxs(pc,{tabIndex:f,value:h.label,onSelect:()=>!h.disabled&&c(h.value),disabled:h.disabled,className:xe("cursor-pointer","data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900",h.disabled&&"!pointer-events-auto cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent"),role:"option","aria-selected":p,children:[s==="auto"&&(r?g.jsx("div",{className:xe("flex size-4 items-center justify-center rounded-md border","border-gray-700 dark:border-gray-400",p&&"bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"),children:p&&g.jsx(ae,{name:"Checkmark",size:16})}):g.jsx("div",{className:xe("relative size-4 rounded-full border",p?"border-gray-900 dark:border-gray-400":"border-gray-800 dark:border-gray-400","bg-transparent dark:bg-transparent"),children:p&&g.jsx("div",{className:"absolute left-1/2 top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-gray-900 dark:bg-gray-400"})})),s==="checkmark"&&!(i==="right"&&u)&&g.jsx("div",{className:"size-4",children:i==="left"&&p&&g.jsx(ae,{name:"Checkmark",size:16,className:"text-gray-900 dark:text-gray-50"})}),K8(h.icon),g.jsx("span",{className:xe("flex-1 truncate text-[14px] font-normal leading-4","text-gray-700 dark:text-gray-500",h.disabled&&"text-gray-600 dark:text-gray-600"),children:h.label}),s==="checkmark"&&i==="right"&&g.jsx("div",{className:"size-4",children:p&&g.jsx(ae,{name:"Checkmark",size:16,className:"text-gray-900 dark:text-gray-50"})})]},`favorite-${h.value}`)})}),Z8=({searchable:e,commandListRef:n,multiple:r,selectedValues:s,selectionIcon:i,selectionIconPosition:u,options:c=[],toggleAll:f,toggleOption:h,favoriteOptions:p=[]})=>{const b=c.filter(w=>!w.disabled),y=c.some(w=>w.icon),v=Kn(w=>w.search);return S.useEffect(()=>{n.current?.scrollTo({top:0,behavior:"instant"})},[n,v]),g.jsxs(g.Fragment,{children:[e&&g.jsx(px,{placeholder:"Search...",onKeyDown:w=>{["ArrowUp","ArrowDown","Enter"].includes(w.key)&&b.length>0||w.stopPropagation()},wrapperClassName:"rounded-t",className:"text-gray-900 dark:text-gray-50"}),g.jsxs(Dh,{ref:n,tabIndex:e?void 0:0,children:[g.jsx(Rh,{className:"p-4 text-center text-[14px] font-normal leading-5 text-gray-700 dark:text-gray-400",children:"No results found."}),r&&v===""&&g.jsx(qu,{className:"pb-0",children:g.jsx(pc,{value:"select-all",onSelect:f,disabled:!1,className:xe("cursor-pointer","data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900"),role:"option","aria-selected":s.length===b.length,children:g.jsxs("div",{className:"flex w-full items-center gap-2",children:[i==="auto"&&g.jsx("div",{className:xe("flex size-4 items-center justify-center rounded-md border","border-gray-700 dark:border-gray-400",s.length===b.length&&"bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"),children:s.length===b.length&&g.jsx(ae,{name:"Checkmark",size:16})}),i==="checkmark"&&!(u==="right"&&y)&&g.jsx("div",{className:"size-4",children:u==="left"&&s.length===b.length&&g.jsx(ae,{name:"Checkmark",size:16,className:"text-gray-900 dark:text-gray-50"})}),g.jsx("span",{className:"text-[14px] font-semibold leading-4 text-gray-900 dark:text-gray-50",children:s.length===b.length?"Deselect All":"Select All"}),i==="checkmark"&&u==="right"&&g.jsx("div",{className:"ml-auto size-4",children:s.length===b.length&&g.jsx(ae,{name:"Checkmark",size:16,className:"text-gray-900 dark:text-gray-50"})})]})})}),g.jsxs(qu,{className:r&&v===""?"pt-0":void 0,children:[g.jsx(av,{options:p,selectedValues:s,multiple:r,selectionIcon:i,selectionIconPosition:u,hasAnyIcon:y,toggleOption:h,tabIndex:e?void 0:0}),p.length>0&&g.jsx("div",{className:"my-1 border-b border-gray-300 dark:border-gray-600"}),g.jsx(av,{options:c,selectedValues:s,multiple:r,selectionIcon:i,selectionIconPosition:u,hasAnyIcon:y,toggleOption:h,tabIndex:e?void 0:0})]})]})]})},J8=({selectedValues:e,options:n=[],multiple:r,searchable:s,placeholder:i,handleClear:u})=>{const c=f=>typeof f=="string"?g.jsx(ae,{name:f,size:16}):f&&g.jsx(f,{className:"size-4"});return e.length===0?g.jsxs("div",{className:xe("mx-auto flex w-full items-center",i?"justify-between":"justify-end"),children:[i&&g.jsx("span",{className:"text-[14px] font-normal leading-5 text-gray-600 dark:text-gray-500",children:i}),s?g.jsx(ae,{name:"CaretSort",size:16,className:"cursor-pointer text-gray-700 dark:text-gray-400"}):g.jsx(ae,{name:"ChevronDown",size:16,className:"cursor-pointer text-gray-700 dark:text-gray-400"})]}):g.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[g.jsx("div",{className:xe("max-w-full truncate text-gray-900 dark:text-gray-50",!r&&"flex items-center gap-2"),children:e.map((f,h)=>{const p=n.find(b=>b.value===f);return r?g.jsx("span",{className:xe("text-[14px] font-normal leading-5",h!==e.length-1&&"mr-1"),children:h!==e.length-1?`${p?.label},`:p?.label},f):g.jsxs(fe.Fragment,{children:[c(p?.icon),g.jsx("span",{className:"truncate text-[14px] font-normal leading-5",children:p?.label})]},f)})}),g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r&&e.length>0&&g.jsx("div",{onClick:f=>{f.preventDefault(),f.stopPropagation(),u()},className:"size-4 p-0",children:g.jsx(ae,{name:"XmarkLight",size:16,className:"cursor-pointer text-gray-700 dark:text-gray-400"})}),s?g.jsx(ae,{name:"CaretSort",size:16,className:"cursor-pointer text-gray-700 dark:text-gray-400"}):g.jsx(ae,{name:"ChevronDown",size:16,className:"cursor-pointer text-gray-700 dark:text-gray-400"})]})]})};function W8({options:e=[],multiple:n=!1,defaultValue:r,value:s,onChange:i}){const u=S.useRef(!1),c=S.useRef(null),[f,h]=S.useState(!1),[p,b]=S.useState(()=>{const O=s??r??[];return O===""?[]:Array.isArray(O)?O:[O]});S.useEffect(()=>{if(u.current){u.current=!1;return}const O=s??r??[];b(O===""?[]:Array.isArray(O)?O:[O])},[s]);const y=S.useCallback(O=>{h(O)},[]),v=S.useCallback(O=>{u.current=!0;let M;n?M=p.includes(O)?p.filter(j=>j!==O):[...p,O]:(M=p[0]===O?[]:[O],h(!1)),b(M),i?.(n?M:M[0]??"")},[n,p,e,i]),w=S.useCallback(()=>{u.current=!0,b([]),i?.(n?[]:"")},[n,i]),E=S.useCallback(()=>{u.current=!0;const O=e.filter(j=>!j.disabled).map(j=>j.value),M=p.length===O.length?[]:O;b(M),i?.(n?M:M[0])},[e,p,n,i]),C=S.useRef(n);return S.useEffect(()=>{if(C.current!==n){if(C.current=n,!n&&p.length>1){u.current=!0,b([p[0]]),i?.(p[0]);return}p.length>0&&(u.current=!0,i?.(n?[p[0]]:p[0]))}},[n]),{selectedValues:p,isPopoverOpen:f,commandListRef:c,toggleOption:v,handleClear:w,toggleAll:E,handleOpenChange:y}}const Gh=fe.forwardRef(({options:e=[],favoriteOptions:n=[],defaultValue:r,value:s,onChange:i,onBlur:u,id:c,name:f,label:h,required:p,disabled:b,errors:y=[],warnings:v=[],multiple:w,selectionIcon:E="auto",selectionIconPosition:C="left",searchable:O,description:M,placeholder:j,className:T,contentClassName:U,contentAlign:N="start",...R},D)=>{const I=S.useId(),B=c??`${I}-select`,{selectedValues:Z,isPopoverOpen:re,commandListRef:J,toggleOption:Y,handleClear:oe,toggleAll:le,handleOpenChange:_}=W8({options:e,multiple:w,defaultValue:r,value:s,onChange:i}),K=S.useCallback(ie=>{re||u?.(ie)},[u,re]);return g.jsxs(Ux,{children:[h&&g.jsx(sx,{htmlFor:B,required:p,disabled:b,hasError:y.length>0,inline:!1,onClick:ie=>{ie.preventDefault(),ie.target.control?.focus()},children:h}),g.jsxs(Hh,{open:re,onOpenChange:ie=>{_(ie),!ie&&document.activeElement?.id!==B&&u?.({target:{}})},children:[g.jsx(Qx,{asChild:!0,children:g.jsx(GC,{id:B,name:f,type:"button",role:"combobox",onBlur:K,disabled:b,"aria-invalid":y.length>0,"aria-label":h?void 0:w?"Multi select":"Select","aria-required":p,"aria-expanded":re,className:xe("flex h-9 w-full items-center justify-between px-3 py-2","dark:border-charcoal-700 dark:bg-charcoal-900 rounded-md border border-gray-300 bg-white","hover:border-gray-300 hover:bg-gray-100","dark:hover:border-charcoal-700 dark:hover:bg-charcoal-800","dark:focus:ring-charcoal-300 focus:outline-none focus:ring-1 focus:ring-gray-900 focus:ring-offset-0","dark:focus-visible:ring-charcoal-300 focus-visible:ring-1 focus-visible:ring-gray-900 focus-visible:ring-offset-0",b&&["!pointer-events-auto cursor-not-allowed bg-gray-50","dark:hover:border-charcoal-700 dark:hover:bg-charcoal-900 hover:border-gray-300 hover:bg-gray-50"],T),...R,ref:D,children:g.jsx(J8,{selectedValues:Z,options:[...n,...e],multiple:w,searchable:O,placeholder:j,handleClear:oe})})}),g.jsx(qh,{align:N,onEscapeKeyDown:ie=>{ie.preventDefault(),_(!1)},className:U,children:g.jsx(mx,{defaultValue:!w&&Z[0]?e.find(ie=>ie.value===Z[0])?.label:void 0,children:g.jsx(Z8,{favoriteOptions:n,searchable:O,commandListRef:J,multiple:w,selectedValues:Z,selectionIcon:E,selectionIconPosition:C,options:e,toggleAll:le,toggleOption:Y})})})]}),M&&g.jsx(Lx,{children:M}),v.length>0&&g.jsx(Hu,{messages:v,type:"warning"}),y.length>0&&g.jsx(Hu,{messages:y,type:"error"})]})}),eO=k8(Gh);eO.displayName="SelectField";var s0,rv;function tO(){if(rv)return s0;rv=1;var e="Expected a function",n=NaN,r="[object Symbol]",s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt,h=typeof pu=="object"&&pu&&pu.Object===Object&&pu,p=typeof self=="object"&&self&&self.Object===Object&&self,b=h||p||Function("return this")(),y=Object.prototype,v=y.toString,w=Math.max,E=Math.min,C=function(){return b.Date.now()};function O(N,R,D){var I,B,Z,re,J,Y,oe=0,le=!1,_=!1,K=!0;if(typeof N!="function")throw new TypeError(e);R=U(R)||0,M(D)&&(le=!!D.leading,_="maxWait"in D,Z=_?w(U(D.maxWait)||0,R):Z,K="trailing"in D?!!D.trailing:K);function ie(he){var Ae=I,Te=B;return I=B=void 0,oe=he,re=N.apply(Te,Ae),re}function be(he){return oe=he,J=setTimeout(V,R),le?ie(he):re}function we(he){var Ae=he-Y,Te=he-oe,Je=R-Ae;return _?E(Je,Z-Te):Je}function De(he){var Ae=he-Y,Te=he-oe;return Y===void 0||Ae>=R||Ae<0||_&&Te>=Z}function V(){var he=C();if(De(he))return te(he);J=setTimeout(V,we(he))}function te(he){return J=void 0,K&&I?ie(he):(I=B=void 0,re)}function ne(){J!==void 0&&clearTimeout(J),oe=0,I=Y=B=J=void 0}function se(){return J===void 0?re:te(C())}function pe(){var he=C(),Ae=De(he);if(I=arguments,B=this,Y=he,Ae){if(J===void 0)return be(Y);if(_)return J=setTimeout(V,R),ie(Y)}return J===void 0&&(J=setTimeout(V,R)),re}return pe.cancel=ne,pe.flush=se,pe}function M(N){var R=typeof N;return!!N&&(R=="object"||R=="function")}function j(N){return!!N&&typeof N=="object"}function T(N){return typeof N=="symbol"||j(N)&&v.call(N)==r}function U(N){if(typeof N=="number")return N;if(T(N))return n;if(M(N)){var R=typeof N.valueOf=="function"?N.valueOf():N;N=M(R)?R+"":R}if(typeof N!="string")return N===0?N:+N;N=N.replace(s,"");var D=u.test(N);return D||c.test(N)?f(N.slice(2),D?2:8):i.test(N)?n:+N}return s0=O,s0}var nO=tO();const sv=_1(nO);var Xx=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Kx(e,n,r,s){const i=S.useRef(n);Xx(()=>{i.current=n},[n]),S.useEffect(()=>{const u=window;if(!(u&&u.addEventListener))return;const c=f=>{i.current(f)};return u.addEventListener(e,c,s),()=>{u.removeEventListener(e,c,s)}},[e,r,s])}function vc(){const[e,n]=S.useState(null),r=S.useCallback(async s=>{if(!navigator?.clipboard)return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),n(s),!0}catch(i){return console.warn("Copy failed",i),n(null),!1}},[]);return[e,r]}var aO=typeof window>"u";function rO(e,{defaultValue:n=!1,initializeWithValue:r=!0}={}){const s=f=>aO?n:window.matchMedia(f).matches,[i,u]=S.useState(()=>r?s(e):n);function c(){u(s(e))}return Xx(()=>{const f=window.matchMedia(e);return c(),f.addListener?f.addListener(c):f.addEventListener("change",c),()=>{f.removeListener?f.removeListener(c):f.removeEventListener("change",c)}},[e]),i}function sO(e){const n=S.useRef(e);n.current=e,S.useEffect(()=>()=>{n.current()},[])}function Zx(e,n=500,r){const s=S.useRef();sO(()=>{s.current&&s.current.cancel()});const i=S.useMemo(()=>{const u=sv(e,n,r),c=(...f)=>u(...f);return c.cancel=()=>{u.cancel()},c.isPending=()=>!!s.current,c.flush=()=>u.flush(),c},[e,n,r]);return S.useEffect(()=>{s.current=sv(e,n,r)},[e,n,r]),i}function iO(e,n,r){const s=((p,b)=>p===b),i=e instanceof Function?e():e,[u,c]=S.useState(i),f=S.useRef(i),h=Zx(c,n,r);return s(f.current,i)||(h(i),f.current=i),[u,h]}function oO(e,n,r="mousedown",s={}){Kx(r,i=>{const u=i.target;if(!u||!u.isConnected)return;(Array.isArray(e)?e.filter(f=>!!f.current).every(f=>f.current&&!f.current.contains(u)):e.current&&!e.current.contains(u))&&n(i)},void 0,s)}function Jx(...e){return de(Yn(e))}const lO=Jx("flex h-9 w-full rounded-md text-sm font-normal leading-5 text-gray-900 dark:text-gray-50","dark:border-charcoal-700 dark:bg-charcoal-900 border border-gray-300 bg-white","px-3 py-2","font-sans placeholder:text-gray-500 dark:placeholder:text-gray-600","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-900 focus-visible:ring-offset-0 focus-visible:ring-offset-white","dark:focus-visible:ring-charcoal-300 dark:focus-visible:ring-offset-charcoal-900 dark:focus:bg-charcoal-900 focus:bg-gray-50","disabled:cursor-not-allowed","disabled:border-gray-300 disabled:bg-gray-50 disabled:text-gray-700","disabled:dark:border-charcoal-800 disabled:dark:bg-charcoal-900 disabled:dark:text-gray-300"),xc=S.forwardRef(({className:e,type:n,...r},s)=>g.jsx("input",{type:n,className:Jx(lO,e),ref:s,...r}));xc.displayName="Input";function i0(e,n){const r=Object.getOwnPropertyDescriptor(e,"value")?.set,s=Object.getPrototypeOf(e),i=Object.getOwnPropertyDescriptor(s,"value")?.set;r&&r!==i?i?.call(e,n):r?.call(e,n)}function yu(e,n,r="blur"){return e.reduce((s,i)=>typeof i=="function"?r==="blur"||r==="all"?i(s):s:(i.options?.trigger??"blur")!==r&&r!=="all"?s:i.options?.if===void 0||i.options.if?i.transformer(s):s,n)}function Wx({transformers:e,children:n}){const s=Ho()?.setValue;return S.useEffect(()=>{const i=n.props.value,u=yu(e,i,"all");no(u,i)||(typeof s=="function"?s(n.props.name,u):n.props.onChange?.({target:{value:u}}))},[e,s]),fe.cloneElement(n,{...n.props,onChange:i=>{const u=yu(e,i.target.value,"change");u!==i.target.value&&s&&(s(n.props.name,u),i0(i.target,u)),n.props.onChange?.(i)},onBlur:i=>{n.props.onBlur?.(i);const u=i.target,c=yu(e,u.value,"blur");if(!no(c,u.value)){i0(u,c);const f=new Event("change",{bubbles:!0});u.dispatchEvent(f)}},onKeyDown:i=>{if(n.props.onKeyDown?.(i),i.key==="Enter"){const u=i.target,c=yu(e,u.value,"keyDown");if(!no(c,u.value)){i0(u,c);const f=new Event("change",{bubbles:!0});u.dispatchEvent(f)}}}})}const uO=fe.forwardRef(({id:e,name:n,value:r,className:s,isLoading:i,haveFetchError:u,disabled:c,onChange:f,onBlur:h,onClick:p,selectedOption:b,optionsLength:y,handleOpenChange:v,onKeyDown:w,onMouseDown:E,placeholder:C,hasError:O,label:M,required:j,isPopoverOpen:T,maxLength:U,handlePaste:N,onPaste:R,...D},I)=>{const[B,Z]=S.useState(!1),re=rO("(hover: hover) and (pointer: fine)"),J=S.useMemo(()=>[Qu.trimOnBlur(),Qu.trimOnEnter()],[]);return g.jsxs("div",{className:xe("group relative"),children:[g.jsx(Wx,{transformers:J,children:g.jsx(It.Input,{asChild:!0,children:g.jsx(xc,{id:e,name:n,value:r,className:xe("pr-9",s),disabled:c,onChange:f,onBlur:h,onClick:Y=>{const oe=Y.target;!(i||u)&&!b&&oe.value!==""&&v?.(!0),p?.(Y)},onKeyDown:Y=>{w?.(Y);const oe=["ArrowUp","ArrowDown","Enter"].includes(Y.key);if(Y.key==="Enter"&&T&&y===0){v?.(!1),Y.preventDefault();return}oe&&T&&y>0||Y.stopPropagation()},onMouseDown:Y=>{const oe=Y.target;oe.contains(document.activeElement)||requestAnimationFrame(()=>{oe.select()}),E?.(Y)},onPaste:Y=>{N?.(Y),R?.(Y)},placeholder:C,"aria-invalid":O,"aria-label":M?void 0:"Id Autocomplete","aria-required":j,"aria-expanded":T,maxLength:U,...D,ref:I})})}),g.jsxs("div",{className:xe("absolute right-3 top-1/2 flex size-4 -translate-y-1/2 items-center",!i&&!u&&!b&&"pointer-events-none"),children:[i&&g.jsx(ae,{name:"Reload",size:16,className:xe("animate-spin text-gray-500 dark:text-gray-600")}),u&&g.jsx(Fu,{children:g.jsx(T0,{content:"Network error!",children:g.jsx(ae,{name:"Error",size:16,className:xe("text-red-900")})})}),b&&!i&&!u&&g.jsx(Fu,{children:g.jsx(T0,{content:"Copied!",open:B,triggerAsChild:!0,children:g.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(b.value).then(()=>{Z(!0),setTimeout(()=>Z(!1),2e3)}).catch(Y=>{console.error("Failed to copy value: ",Y)})},className:xe("focus-visible:outline-none [&_svg]:pointer-events-none",re&&"opacity-0 transition-opacity duration-500 group-hover:opacity-100"),children:g.jsx(ae,{name:"Copy",size:16,className:xe("text-gray-500 dark:text-gray-600")})})})})]})]})}),cO=({customIcon:e,asPlaceholder:n})=>typeof e=="string"?g.jsx(ae,{name:e,size:24,className:xe("shrink-0",n?"text-gray-400 dark:text-gray-700":"text-gray-900 dark:text-gray-300")}):fe.isValidElement(e)?g.jsx("div",{className:"size-6 shrink-0 overflow-hidden",children:e}):null,fO=({isLoadingSelectedOption:e,handleFetchSelectedOption:n,isFetchSelectedOptionSync:r,value:s})=>g.jsx("div",{children:g.jsx("button",{type:"button",disabled:e||r,onClick:()=>{!e&&!r&&n(s)},className:xe("mt-0.5 focus-visible:outline-none","disabled:pointer-events-none [&_svg]:pointer-events-none"),"aria-label":e?"Loading":r?"Success":"Reload",children:g.jsx(ae,{name:r?"Checkmark":"Reload",size:16,className:xe("text-gray-500 dark:text-gray-600",e&&"animate-spin",r&&"animate-in fade-in duration-500")})})}),U0=({variant:e="withValue",icon:n,title:r="Title not available",path:s="Path not available",value:i,description:u="Description not available",asPlaceholder:c,showValue:f=!0,isLoadingSelectedOption:h,handleFetchSelectedOption:p,isFetchSelectedOptionSync:b,className:y,placeholderIcon:v="PowerhouseLogoSmall",...w})=>{const E=()=>g.jsx("div",{className:xe("flex w-full items-center"),children:g.jsx("span",{className:xe("truncate text-xs leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-500 dark:text-gray-600"),children:i})}),C=(O=!0)=>g.jsxs("div",{className:xe("flex w-full flex-col gap-1"),children:[g.jsxs("div",{className:xe("flex gap-2"),children:[g.jsx(cO,{customIcon:c?v:n,asPlaceholder:c}),g.jsxs("div",{className:xe("flex min-w-0 grow flex-col gap-[-2px]"),children:[g.jsx("span",{className:xe("truncate text-sm font-bold leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-900 dark:text-gray-300"),children:r}),!f&&typeof s=="object"?g.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:xe("truncate text-xs leading-5 text-blue-900 hover:underline focus-visible:outline-none"),children:s.text}):g.jsx("span",{className:xe("truncate text-xs leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-500 dark:text-gray-600"),children:typeof s=="object"?s.text:s})]}),c===!1&&p&&g.jsx(fO,{isLoadingSelectedOption:h,handleFetchSelectedOption:p,isFetchSelectedOptionSync:b,value:i})]}),f&&g.jsx("div",{className:xe("flex max-w-full items-center"),children:g.jsx("span",{className:xe("truncate text-xs leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-500 dark:text-gray-600"),children:i})}),O&&g.jsx("div",{className:xe("flex flex-col"),children:g.jsx("p",{className:xe("line-clamp-2 text-xs leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-900 dark:text-gray-300"),children:u})}),O&&"agentType"in w&&typeof w.agentType=="string"&&g.jsx("div",{className:xe("flex max-w-full items-center justify-end"),children:g.jsx("span",{className:xe("truncate text-xs leading-5",c?"text-gray-400 dark:text-gray-700":"text-gray-500 dark:text-gray-600"),children:w.agentType})})]});return g.jsxs("div",{className:xe("w-full max-w-full rounded-md bg-transparent px-3 pb-2",e==="withValue"?"pt-2":"pt-3",y),children:[e==="withValue"&&E(),e==="withValueAndTitle"&&C(!1),e==="withValueTitleAndDescription"&&C()]})},dO=({variant:e,commandListRef:n,selectedValue:r,options:s=[],toggleOption:i,renderOption:u,previewPlaceholder:c})=>{const f=Kn(p=>p.search),h=c||{value:"value not available",title:"Title not available",path:"Path not available",description:"Description not available"};return S.useEffect(()=>{n?.current?.scrollTo({top:0,behavior:"instant"})},[n,f]),g.jsxs(Dh,{ref:n,children:[g.jsx(Rh,{className:xe("h-full p-1"),children:u?u(h,{asPlaceholder:!0,showValue:!0,className:xe("pb-0")}):g.jsx(U0,{variant:e,icon:h.icon,title:h.title,path:h.path,value:h.value,description:h.description,asPlaceholder:!0,className:xe("pb-0")})}),g.jsx(qu,{className:xe("px-1"),children:s.map(p=>{const b=r===p.value;return g.jsx(pc,{value:p.value,onSelect:()=>i?.(p.value),className:xe("h-full cursor-pointer border-y-0 p-0","data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900"),role:"option","aria-selected":b,children:u?u(p,{asPlaceholder:!1,showValue:!0}):g.jsx(U0,{variant:e,...p})},p.value)})})]})},hO=S.createContext({}),mO=()=>S.useContext(hO);function pO({autoComplete:e,defaultValue:n,value:r,isOpenByDefault:s,initialOptions:i,onChange:u,onBlur:c,fetchOptions:f,fetchSelectedOption:h}){const p=mO(),b=S.useRef(!1),y=S.useRef(!1),v=S.useRef(null),[w,E]=S.useState(s??!1),[C,O]=S.useState(i??[]),[M,j]=S.useState(!1),[T,U]=S.useState(!1),[N,R]=S.useState(!1),[D,I]=S.useState(r??n??""),[B,Z]=S.useState(void 0),[re,J]=S.useState(""),[Y,oe]=S.useState(!1),le=S.useCallback(()=>{R(!1),j(!1),U(!1),E(!1)},[]),_=Zx(S.useCallback(ne=>{if(!(!e||!f)){if(ne===""){le(),O([]),I(""),Z(void 0);return}R(!1),j(!0);try{const se=f(ne,p);Promise.resolve(se).then(pe=>{O(pe);const he=pe.find(Ae=>Ae.value===ne);he?(Z(he),E(!1)):(Z(void 0),E(!0)),j(!1)}).catch(()=>{R(!0),j(!1)})}catch{R(!0),j(!1)}}},[le,e,f,p])),K=S.useCallback(ne=>{if(!(!e||!h)){U(!0);try{const se=h(ne),pe=se instanceof Promise;Promise.resolve(se).then(he=>{he?(Z(he),O(Ae=>{const Te=Ae.findIndex(Je=>Je.value===ne);if(Te!==-1){const Je=[...Ae];return Je[Te]=he,Je}return Ae})):(le(),O([]),I(""),Z(void 0)),U(!1),pe||(oe(!0),setTimeout(()=>{oe(!1)},1500))}).catch(()=>{U(!1)})}catch{U(!1)}}},[le,e,h]),ie=S.useCallback(ne=>{ne||J(C[0]?.value??""),E(ne)},[C]),be=S.useCallback(ne=>{b.current=!1,y.current=!0,I(ne),Z(C.find(se=>se.value===ne)),le(),u?.(ne)},[u,le,C]),we=S.useCallback(ne=>{const se=ne.target.value;b.current=!0,I(se),Z(void 0),u?.(se)},[u]),De=S.useCallback(ne=>{J(ne)},[]),V=S.useCallback(ne=>{w||c?.(ne)},[c,w]),te=S.useCallback(ne=>{const se=ne.clipboardData.getData("text"),pe=se.trim();if(se!==pe){ne.preventDefault();const he=ne.currentTarget,Ae=he.selectionStart||0,Te=he.selectionEnd||0,Je=he.value,_t=Je.substring(0,Ae)+pe+Je.substring(Te);u?.(_t),requestAnimationFrame(()=>{const qt=Ae+pe.length;he.setSelectionRange(qt,qt),_(_t)})}else se===D&&_(D)},[D,_,u]);return S.useEffect(()=>{e?b.current&&_(D):(le(),O([]),I(""),Z(void 0))},[e,D,_,le]),S.useEffect(()=>{y.current||(b.current=!1,I(r??n??""),Z(void 0)),y.current=!1},[r]),S.useEffect(()=>{if(i?.length&&D){const ne=i.find(se=>se.value===D);ne&&Z(ne)}},[]),{selectedValue:D,selectedOption:B,isPopoverOpen:w,commandListRef:v,options:C,isLoading:M,isLoadingSelectedOption:T,haveFetchError:N,commandValue:re,isFetchSelectedOptionSync:Y,toggleOption:be,handleOpenChange:ie,onTriggerBlur:V,handleChange:we,handleCommandValue:De,handleFetchSelectedOption:K,handlePaste:te}}const e5=fe.forwardRef(({id:e,name:n,className:r,label:s,description:i,value:u,defaultValue:c,disabled:f,placeholder:h,required:p,errors:b,warnings:y,onChange:v,onBlur:w,onClick:E,onKeyDown:C,onMouseDown:O,autoComplete:M=!0,variant:j="withValue",maxLength:T,fetchOptionsCallback:U,fetchSelectedOptionCallback:N,isOpenByDefault:R,initialOptions:D,renderOption:I,previewPlaceholder:B,...Z},re)=>{const J=S.useId(),Y=e??`${J}-id-autocomplete`,oe=S.useRef(null),le=wt=>{oe.current=wt,typeof re=="function"?re(wt):re&&(re.current=wt)},_=Array.isArray(y)&&y.length>0,K=Array.isArray(b)&&b.length>0,{selectedValue:ie,selectedOption:be,isPopoverOpen:we,commandListRef:De,options:V,isLoading:te,isLoadingSelectedOption:ne,haveFetchError:se,commandValue:pe,isFetchSelectedOptionSync:he,toggleOption:Ae,handleOpenChange:Te,onTriggerBlur:Je,handleChange:_t,handleCommandValue:qt,handleFetchSelectedOption:ea,handlePaste:Pt}=pO({autoComplete:M,defaultValue:c,value:u,isOpenByDefault:R,initialOptions:D,onChange:v,onBlur:w,fetchOptions:U,fetchSelectedOption:N}),_n=wt=>{Ae(wt),oe.current?.focus()},ur=j==="withValueAndTitle"||j==="withValueTitleAndDescription",Js=S.useMemo(()=>[Qu.trimOnBlur(),Qu.trimOnEnter()],[]);return g.jsxs(Ux,{children:[!!s&&g.jsx(sx,{htmlFor:Y,disabled:f,hasError:K,required:p,onClick:wt=>{wt.preventDefault(),wt.target.control?.focus()},children:s}),M&&U?g.jsx(Hh,{open:we,onOpenChange:Te,children:g.jsxs(It,{shouldFilter:!1,value:pe,onValueChange:qt,className:xe("dark:bg-charcoal-900 bg-gray-100"),children:[g.jsx(X8,{asChild:!0,children:g.jsx(uO,{id:Y,name:n,value:ie,className:r,isLoading:te,haveFetchError:se,disabled:f,onChange:_t,onBlur:Je,onClick:E,selectedOption:be,optionsLength:V.length,handleOpenChange:Te,onKeyDown:C,onMouseDown:O,placeholder:h,hasError:K,label:s,required:p,isPopoverOpen:we,maxLength:T,handlePaste:Pt,...Z,ref:le})}),ur&&(I?I(be===void 0&&B?{...B}:{...be,value:be?.value??""},{asPlaceholder:be===void 0,showValue:!1,isLoadingSelectedOption:ne,handleFetchSelectedOption:N?ea:void 0,isFetchSelectedOptionSync:he,className:xe("rounded-t-none pt-2")}):g.jsx(U0,{variant:j,icon:be?.icon??B?.icon,title:be?.title??B?.title,path:be?.path??B?.path,value:be?.value??B?.value??"",description:be?.description??B?.description,asPlaceholder:be===void 0,showValue:!1,isLoadingSelectedOption:ne,handleFetchSelectedOption:N?ea:void 0,isFetchSelectedOptionSync:he,className:xe("rounded-t-none pt-2")})),g.jsx(qh,{align:"start",onOpenAutoFocus:wt=>wt.preventDefault(),onInteractOutside:wt=>{wt.target instanceof Element&&wt.target.id===Y&&wt.preventDefault()},children:g.jsx(dO,{variant:j,commandListRef:De,selectedValue:ie,options:V,toggleOption:_n,renderOption:I,previewPlaceholder:B})})]})}):g.jsx(Wx,{transformers:Js,children:g.jsx(xc,{id:Y,name:n,value:ie,className:r,disabled:f,onChange:_t,onBlur:w,onClick:E,onMouseDown:O,placeholder:h,"aria-invalid":K,"aria-label":s?void 0:"Id Autocomplete","aria-required":p,maxLength:T,...Z,ref:le})}),!!i&&g.jsx(Lx,{children:i}),_&&g.jsx(Hu,{messages:y,type:"warning"}),K&&g.jsx(Hu,{messages:b,type:"error"})]})});e5.displayName="IdAutocomplete";const t5=({children:e,content:n})=>g.jsxs(Hh,{children:[g.jsx(Qx,{asChild:!0,children:g.jsx("button",{type:"button","aria-label":"Open Account",className:"cursor-pointer",children:e})}),g.jsx(qh,{className:"w-52 p-0",align:"start",children:n})]}),gO="/assets/connect-loader-CvOC68Ih.mp4";function bO(e){const{style:n,size:r=100,...s}=e,i=bC(r),u={objectFit:"contain",pointerEvents:"none",...i,...n},c=i.width?.replace("px",""),f=i.height?.replace("px","");return g.jsx("video",{autoPlay:!0,height:f,loop:!0,muted:!0,playsInline:!0,width:c,...s,style:u,children:g.jsx("source",{src:gO,type:"video/mp4"})})}function $h(e){const{onSubmit:n,onCancel:r,defaultValue:s,className:i,minLength:u=1,...c}=e,[f,h]=S.useState(s??""),p=S.useRef(null);oO(p,b),Kx("keyup",y=>{y.key==="Enter"&&b(),y.key==="Escape"&&r()}),S.useLayoutEffect(()=>{setTimeout(()=>{p.current?.focus(),p.current?.select(),p.current?.scroll({left:9999})},100)},[]);function b(){f.length>=u&&n(f)}return g.jsx("input",{...c,autoFocus:!0,className:de("bg-inherit text-inherit outline-none",i),minLength:u,onChange:y=>h(y.target.value),ref:p,required:!0,type:"text",value:f})}function wk(){const{isAllowedToCreateDocuments:e}=wh(),[n]=L1(),r=U1(),s=Hw(),[i,u]=S.useState(!1);function c(){u(!0)}function f(y){!e||!r||Gw(r,y,s.at(-1)?.id).then(v=>{Fs(v)}).catch(v=>{console.error(v)}).finally(()=>{u(!1)})}function h(){u(!1)}const p=!!n,b=!!s.length;return g.jsxs("div",{className:"flex h-9 flex-row items-center gap-2 p-6 text-gray-500",children:[p&&g.jsxs(g.Fragment,{children:[g.jsx(iv,{name:n.state.global.name,onClick:()=>qw(n)}),g.jsx("span",{children:"/"})]}),b&&s.map(y=>g.jsxs(S.Fragment,{children:[g.jsx(iv,{name:y.name,onClick:()=>Fs(y)}),g.jsx("span",{children:"/"})]},y.id)),e&&(i?g.jsx($h,{className:"text-gray-800",defaultValue:"New Folder",onCancel:h,onSubmit:f,placeholder:"New Folder"}):g.jsxs("button",{type:"button",className:"ml-1 flex items-center justify-center gap-2 rounded-md bg-gray-50 px-2 py-1.5 transition-colors hover:bg-gray-200 hover:text-gray-800",onClick:c,children:[g.jsx(ae,{name:"Plus",size:14}),"Add new"]}))]})}function iv(e){const{name:n,onClick:r}=e;return g.jsx("div",{className:"transition-colors last-of-type:text-gray-800 hover:text-gray-800",onClick:r,role:"button",children:n})}function _r(e){"@babel/helpers - typeof";return _r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_r(e)}function yO(e,n){if(_r(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,n);if(_r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function n5(e){var n=yO(e,"string");return _r(n)=="symbol"?n:n+""}function to(e,n,r){return(n=n5(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ov(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function je(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ov(Object(r),!0).forEach(function(s){to(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ov(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function vO(e){if(Array.isArray(e))return e}function xO(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var s,i,u,c,f=[],h=!0,p=!1;try{if(u=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;h=!1}else for(;!(h=(s=u.call(r)).done)&&(f.push(s.value),f.length!==n);h=!0);}catch(b){p=!0,i=b}finally{try{if(!h&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw i}}return f}}function I0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,s=Array(n);r<n;r++)s[r]=e[r];return s}function a5(e,n){if(e){if(typeof e=="string")return I0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I0(e,n):void 0}}function SO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ea(e,n){return vO(e)||xO(e,n)||a5(e,n)||SO()}function wO(e,n){if(e==null)return{};var r={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;r[s]=e[s]}return r}function Aa(e,n){if(e==null)return{};var r,s,i=wO(e,n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(s=0;s<u.length;s++)r=u[s],n.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var CO=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function EO(e){var n=e.defaultInputValue,r=n===void 0?"":n,s=e.defaultMenuIsOpen,i=s===void 0?!1:s,u=e.defaultValue,c=u===void 0?null:u,f=e.inputValue,h=e.menuIsOpen,p=e.onChange,b=e.onInputChange,y=e.onMenuClose,v=e.onMenuOpen,w=e.value,E=Aa(e,CO),C=S.useState(f!==void 0?f:r),O=Ea(C,2),M=O[0],j=O[1],T=S.useState(h!==void 0?h:i),U=Ea(T,2),N=U[0],R=U[1],D=S.useState(w!==void 0?w:c),I=Ea(D,2),B=I[0],Z=I[1],re=S.useCallback(function(ie,be){typeof p=="function"&&p(ie,be),Z(ie)},[p]),J=S.useCallback(function(ie,be){var we;typeof b=="function"&&(we=b(ie,be)),j(we!==void 0?we:ie)},[b]),Y=S.useCallback(function(){typeof v=="function"&&v(),R(!0)},[v]),oe=S.useCallback(function(){typeof y=="function"&&y(),R(!1)},[y]),le=f!==void 0?f:M,_=h!==void 0?h:N,K=w!==void 0?w:B;return je(je({},E),{},{inputValue:le,menuIsOpen:_,onChange:re,onInputChange:J,onMenuClose:oe,onMenuOpen:Y,value:K})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Me.apply(null,arguments)}function OO(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function lv(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,n5(s.key),s)}}function AO(e,n,r){return n&&lv(e.prototype,n),r&&lv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _0(e,n){return _0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},_0(e,n)}function jO(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&_0(e,n)}function Ju(e){return Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ju(e)}function r5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r5=function(){return!!e})()}function NO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MO(e,n){if(n&&(_r(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NO(e)}function TO(e){var n=r5();return function(){var r,s=Ju(e);if(n){var i=Ju(this).constructor;r=Reflect.construct(s,arguments,i)}else r=s.apply(this,arguments);return MO(this,r)}}function DO(e){if(Array.isArray(e))return I0(e)}function RO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yh(e){return DO(e)||RO(e)||a5(e)||zO()}function kO(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function LO(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var UO=(function(){function e(r){var s=this;this._insertTag=function(i){var u;s.tags.length===0?s.insertionPoint?u=s.insertionPoint.nextSibling:s.prepend?u=s.container.firstChild:u=s.before:u=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(i,u),s.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(s){s.forEach(this._insertTag)},n.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(LO(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var u=kO(i);try{u.insertRule(s,u.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(s));this.ctr++},n.flush=function(){this.tags.forEach(function(s){var i;return(i=s.parentNode)==null?void 0:i.removeChild(s)}),this.tags=[],this.ctr=0},e})(),Lt="-ms-",Wu="-moz-",qe="-webkit-",s5="comm",Qh="rule",Xh="decl",IO="@import",i5="@keyframes",_O="@layer",PO=Math.abs,Sc=String.fromCharCode,VO=Object.assign;function BO(e,n){return Rt(e,0)^45?(((n<<2^Rt(e,0))<<2^Rt(e,1))<<2^Rt(e,2))<<2^Rt(e,3):0}function o5(e){return e.trim()}function FO(e,n){return(e=n.exec(e))?e[0]:e}function Ge(e,n,r){return e.replace(n,r)}function P0(e,n){return e.indexOf(n)}function Rt(e,n){return e.charCodeAt(n)|0}function uo(e,n,r){return e.slice(n,r)}function Gn(e){return e.length}function Kh(e){return e.length}function vu(e,n){return n.push(e),e}function HO(e,n){return e.map(n).join("")}var wc=1,Gs=1,l5=0,nn=0,bt=0,Xs="";function Cc(e,n,r,s,i,u,c){return{value:e,root:n,parent:r,type:s,props:i,children:u,line:wc,column:Gs,length:c,return:""}}function Zi(e,n){return VO(Cc("",null,null,"",null,null,0),e,{length:-e.length},n)}function qO(){return bt}function GO(){return bt=nn>0?Rt(Xs,--nn):0,Gs--,bt===10&&(Gs=1,wc--),bt}function pn(){return bt=nn<l5?Rt(Xs,nn++):0,Gs++,bt===10&&(Gs=1,wc++),bt}function Qn(){return Rt(Xs,nn)}function ku(){return nn}function Go(e,n){return uo(Xs,e,n)}function co(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function u5(e){return wc=Gs=1,l5=Gn(Xs=e),nn=0,[]}function c5(e){return Xs="",e}function Lu(e){return o5(Go(nn-1,V0(e===91?e+2:e===40?e+1:e)))}function $O(e){for(;(bt=Qn())&&bt<33;)pn();return co(e)>2||co(bt)>3?"":" "}function YO(e,n){for(;--n&&pn()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return Go(e,ku()+(n<6&&Qn()==32&&pn()==32))}function V0(e){for(;pn();)switch(bt){case e:return nn;case 34:case 39:e!==34&&e!==39&&V0(bt);break;case 40:e===41&&V0(e);break;case 92:pn();break}return nn}function QO(e,n){for(;pn()&&e+bt!==57;)if(e+bt===84&&Qn()===47)break;return"/*"+Go(n,nn-1)+"*"+Sc(e===47?e:pn())}function XO(e){for(;!co(Qn());)pn();return Go(e,nn)}function KO(e){return c5(Uu("",null,null,null,[""],e=u5(e),0,[0],e))}function Uu(e,n,r,s,i,u,c,f,h){for(var p=0,b=0,y=c,v=0,w=0,E=0,C=1,O=1,M=1,j=0,T="",U=i,N=u,R=s,D=T;O;)switch(E=j,j=pn()){case 40:if(E!=108&&Rt(D,y-1)==58){P0(D+=Ge(Lu(j),"&","&\f"),"&\f")!=-1&&(M=-1);break}case 34:case 39:case 91:D+=Lu(j);break;case 9:case 10:case 13:case 32:D+=$O(E);break;case 92:D+=YO(ku()-1,7);continue;case 47:switch(Qn()){case 42:case 47:vu(ZO(QO(pn(),ku()),n,r),h);break;default:D+="/"}break;case 123*C:f[p++]=Gn(D)*M;case 125*C:case 59:case 0:switch(j){case 0:case 125:O=0;case 59+b:M==-1&&(D=Ge(D,/\f/g,"")),w>0&&Gn(D)-y&&vu(w>32?cv(D+";",s,r,y-1):cv(Ge(D," ","")+";",s,r,y-2),h);break;case 59:D+=";";default:if(vu(R=uv(D,n,r,p,b,i,f,T,U=[],N=[],y),u),j===123)if(b===0)Uu(D,n,R,R,U,u,y,f,N);else switch(v===99&&Rt(D,3)===110?100:v){case 100:case 108:case 109:case 115:Uu(e,R,R,s&&vu(uv(e,R,R,0,0,i,f,T,i,U=[],y),N),i,N,y,f,s?U:N);break;default:Uu(D,R,R,R,[""],N,0,f,N)}}p=b=w=0,C=M=1,T=D="",y=c;break;case 58:y=1+Gn(D),w=E;default:if(C<1){if(j==123)--C;else if(j==125&&C++==0&&GO()==125)continue}switch(D+=Sc(j),j*C){case 38:M=b>0?1:(D+="\f",-1);break;case 44:f[p++]=(Gn(D)-1)*M,M=1;break;case 64:Qn()===45&&(D+=Lu(pn())),v=Qn(),b=y=Gn(T=D+=XO(ku())),j++;break;case 45:E===45&&Gn(D)==2&&(C=0)}}return u}function uv(e,n,r,s,i,u,c,f,h,p,b){for(var y=i-1,v=i===0?u:[""],w=Kh(v),E=0,C=0,O=0;E<s;++E)for(var M=0,j=uo(e,y+1,y=PO(C=c[E])),T=e;M<w;++M)(T=o5(C>0?v[M]+" "+j:Ge(j,/&\f/g,v[M])))&&(h[O++]=T);return Cc(e,n,r,i===0?Qh:f,h,p,b)}function ZO(e,n,r){return Cc(e,n,r,s5,Sc(qO()),uo(e,2,-2),0)}function cv(e,n,r,s){return Cc(e,n,r,Xh,uo(e,0,s),uo(e,s+1,-1),s)}function Vs(e,n){for(var r="",s=Kh(e),i=0;i<s;i++)r+=n(e[i],i,e,n)||"";return r}function JO(e,n,r,s){switch(e.type){case _O:if(e.children.length)break;case IO:case Xh:return e.return=e.return||e.value;case s5:return"";case i5:return e.return=e.value+"{"+Vs(e.children,s)+"}";case Qh:e.value=e.props.join(",")}return Gn(r=Vs(e.children,s))?e.return=e.value+"{"+r+"}":""}function WO(e){var n=Kh(e);return function(r,s,i,u){for(var c="",f=0;f<n;f++)c+=e[f](r,s,i,u)||"";return c}}function eA(e){return function(n){n.root||(n=n.return)&&e(n)}}function tA(e){var n=Object.create(null);return function(r){return n[r]===void 0&&(n[r]=e(r)),n[r]}}var nA=function(n,r,s){for(var i=0,u=0;i=u,u=Qn(),i===38&&u===12&&(r[s]=1),!co(u);)pn();return Go(n,nn)},aA=function(n,r){var s=-1,i=44;do switch(co(i)){case 0:i===38&&Qn()===12&&(r[s]=1),n[s]+=nA(nn-1,r,s);break;case 2:n[s]+=Lu(i);break;case 4:if(i===44){n[++s]=Qn()===58?"&\f":"",r[s]=n[s].length;break}default:n[s]+=Sc(i)}while(i=pn());return n},rA=function(n,r){return c5(aA(u5(n),r))},fv=new WeakMap,sA=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var r=n.value,s=n.parent,i=n.column===s.column&&n.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(n.props.length===1&&r.charCodeAt(0)!==58&&!fv.get(s))&&!i){fv.set(n,!0);for(var u=[],c=rA(r,u),f=s.props,h=0,p=0;h<c.length;h++)for(var b=0;b<f.length;b++,p++)n.props[p]=u[h]?c[h].replace(/&\f/g,f[b]):f[b]+" "+c[h]}}},iA=function(n){if(n.type==="decl"){var r=n.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(n.return="",n.value="")}};function f5(e,n){switch(BO(e,n)){case 5103:return qe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qe+e+Wu+e+Lt+e+e;case 6828:case 4268:return qe+e+Lt+e+e;case 6165:return qe+e+Lt+"flex-"+e+e;case 5187:return qe+e+Ge(e,/(\w+).+(:[^]+)/,qe+"box-$1$2"+Lt+"flex-$1$2")+e;case 5443:return qe+e+Lt+"flex-item-"+Ge(e,/flex-|-self/,"")+e;case 4675:return qe+e+Lt+"flex-line-pack"+Ge(e,/align-content|flex-|-self/,"")+e;case 5548:return qe+e+Lt+Ge(e,"shrink","negative")+e;case 5292:return qe+e+Lt+Ge(e,"basis","preferred-size")+e;case 6060:return qe+"box-"+Ge(e,"-grow","")+qe+e+Lt+Ge(e,"grow","positive")+e;case 4554:return qe+Ge(e,/([^-])(transform)/g,"$1"+qe+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,qe+"$1"),/(image-set)/,qe+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,qe+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,qe+"box-pack:$3"+Lt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qe+e+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,qe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gn(e)-1-n>6)switch(Rt(e,n+1)){case 109:if(Rt(e,n+4)!==45)break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+qe+"$2-$3$1"+Wu+(Rt(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~P0(e,"stretch")?f5(Ge(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Rt(e,n+1)!==115)break;case 6444:switch(Rt(e,Gn(e)-3-(~P0(e,"!important")&&10))){case 107:return Ge(e,":",":"+qe)+e;case 101:return Ge(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qe+(Rt(e,14)===45?"inline-":"")+"box$3$1"+qe+"$2$3$1"+Lt+"$2box$3")+e}break;case 5936:switch(Rt(e,n+11)){case 114:return qe+e+Lt+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qe+e+Lt+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qe+e+Lt+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return qe+e+Lt+e+e}return e}var oA=function(n,r,s,i){if(n.length>-1&&!n.return)switch(n.type){case Xh:n.return=f5(n.value,n.length);break;case i5:return Vs([Zi(n,{value:Ge(n.value,"@","@"+qe)})],i);case Qh:if(n.length)return HO(n.props,function(u){switch(FO(u,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Vs([Zi(n,{props:[Ge(u,/:(read-\w+)/,":"+Wu+"$1")]})],i);case"::placeholder":return Vs([Zi(n,{props:[Ge(u,/:(plac\w+)/,":"+qe+"input-$1")]}),Zi(n,{props:[Ge(u,/:(plac\w+)/,":"+Wu+"$1")]}),Zi(n,{props:[Ge(u,/:(plac\w+)/,Lt+"input-$1")]})],i)}return""})}},lA=[oA],uA=function(n){var r=n.key;if(r==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(C){var O=C.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var i=n.stylisPlugins||lA,u={},c,f=[];c=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(C){for(var O=C.getAttribute("data-emotion").split(" "),M=1;M<O.length;M++)u[O[M]]=!0;f.push(C)});var h,p=[sA,iA];{var b,y=[JO,eA(function(C){b.insert(C)})],v=WO(p.concat(i,y)),w=function(O){return Vs(KO(O),v)};h=function(O,M,j,T){b=j,w(O?O+"{"+M.styles+"}":M.styles),T&&(E.inserted[M.name]=!0)}}var E={key:r,sheet:new UO({key:r,container:c,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:u,registered:{},insert:h};return E.sheet.hydrate(f),E},cA=!0;function fA(e,n,r){var s="";return r.split(" ").forEach(function(i){e[i]!==void 0?n.push(e[i]+";"):i&&(s+=i+" ")}),s}var d5=function(n,r,s){var i=n.key+"-"+r.name;(s===!1||cA===!1)&&n.registered[i]===void 0&&(n.registered[i]=r.styles)},dA=function(n,r,s){d5(n,r,s);var i=n.key+"-"+r.name;if(n.inserted[r.name]===void 0){var u=r;do n.insert(r===u?"."+i:"",u,n.sheet,!0),u=u.next;while(u!==void 0)}};function hA(e){for(var n=0,r,s=0,i=e.length;i>=4;++s,i-=4)r=e.charCodeAt(s)&255|(e.charCodeAt(++s)&255)<<8|(e.charCodeAt(++s)&255)<<16|(e.charCodeAt(++s)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,n=(r&65535)*1540483477+((r>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(e.charCodeAt(s+2)&255)<<16;case 2:n^=(e.charCodeAt(s+1)&255)<<8;case 1:n^=e.charCodeAt(s)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var mA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},pA=/[A-Z]|^ms/g,gA=/_EMO_([^_]+?)_([^]*?)_EMO_/g,h5=function(n){return n.charCodeAt(1)===45},dv=function(n){return n!=null&&typeof n!="boolean"},o0=tA(function(e){return h5(e)?e:e.replace(pA,"-$&").toLowerCase()}),hv=function(n,r){switch(n){case"animation":case"animationName":if(typeof r=="string")return r.replace(gA,function(s,i,u){return $n={name:i,styles:u,next:$n},i})}return mA[n]!==1&&!h5(n)&&typeof r=="number"&&r!==0?r+"px":r};function fo(e,n,r){if(r==null)return"";var s=r;if(s.__emotion_styles!==void 0)return s;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return $n={name:i.name,styles:i.styles,next:$n},i.name;var u=r;if(u.styles!==void 0){var c=u.next;if(c!==void 0)for(;c!==void 0;)$n={name:c.name,styles:c.styles,next:$n},c=c.next;var f=u.styles+";";return f}return bA(e,n,r)}case"function":{if(e!==void 0){var h=$n,p=r(e);return $n=h,fo(e,n,p)}break}}var b=r;return b}function bA(e,n,r){var s="";if(Array.isArray(r))for(var i=0;i<r.length;i++)s+=fo(e,n,r[i])+";";else for(var u in r){var c=r[u];if(typeof c!="object"){var f=c;dv(f)&&(s+=o0(u)+":"+hv(u,f)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&n==null)for(var h=0;h<c.length;h++)dv(c[h])&&(s+=o0(u)+":"+hv(u,c[h])+";");else{var p=fo(e,n,c);switch(u){case"animation":case"animationName":{s+=o0(u)+":"+p+";";break}default:s+=u+"{"+p+"}"}}}return s}var mv=/label:\s*([^\s;{]+)\s*(;|$)/g,$n;function m5(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,i="";$n=void 0;var u=e[0];if(u==null||u.raw===void 0)s=!1,i+=fo(r,n,u);else{var c=u;i+=c[0]}for(var f=1;f<e.length;f++)if(i+=fo(r,n,e[f]),s){var h=u;i+=h[f]}mv.lastIndex=0;for(var p="",b;(b=mv.exec(i))!==null;)p+="-"+b[1];var y=hA(i)+p;return{name:y,styles:i,next:$n}}var yA=function(n){return n()},vA=Ay.useInsertionEffect?Ay.useInsertionEffect:!1,xA=vA||yA,p5=S.createContext(typeof HTMLElement<"u"?uA({key:"css"}):null);p5.Provider;var SA=function(n){return S.forwardRef(function(r,s){var i=S.useContext(p5);return n(r,i,s)})},wA=S.createContext({}),Zh={}.hasOwnProperty,B0="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",CA=function(n,r){var s={};for(var i in r)Zh.call(r,i)&&(s[i]=r[i]);return s[B0]=n,s},EA=function(n){var r=n.cache,s=n.serialized,i=n.isStringTag;return d5(r,s,i),xA(function(){return dA(r,s,i)}),null},OA=SA(function(e,n,r){var s=e.css;typeof s=="string"&&n.registered[s]!==void 0&&(s=n.registered[s]);var i=e[B0],u=[s],c="";typeof e.className=="string"?c=fA(n.registered,u,e.className):e.className!=null&&(c=e.className+" ");var f=m5(u,void 0,S.useContext(wA));c+=n.key+"-"+f.name;var h={};for(var p in e)Zh.call(e,p)&&p!=="css"&&p!==B0&&(h[p]=e[p]);return h.className=c,r&&(h.ref=r),S.createElement(S.Fragment,null,S.createElement(EA,{cache:n,serialized:f,isStringTag:typeof i=="string"}),S.createElement(i,h))}),AA=OA,Oe=function(n,r){var s=arguments;if(r==null||!Zh.call(r,"css"))return S.createElement.apply(void 0,s);var i=s.length,u=new Array(i);u[0]=AA,u[1]=CA(n,r);for(var c=2;c<i;c++)u[c]=s[c];return S.createElement.apply(null,u)};(function(e){var n;n||(n=e.JSX||(e.JSX={}))})(Oe||(Oe={}));function Jh(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return m5(n)}function jA(){var e=Jh.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function NA(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var F0=S.useLayoutEffect,MA=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ec=function(){};function TA(e,n){return n?n[0]==="-"?e+n:e+"__"+n:e}function DA(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];var u=[].concat(s);if(n&&e)for(var c in n)n.hasOwnProperty(c)&&n[c]&&u.push("".concat(TA(e,c)));return u.filter(function(f){return f}).map(function(f){return String(f).trim()}).join(" ")}var pv=function(n){return VA(n)?n.filter(Boolean):_r(n)==="object"&&n!==null?[n]:[]},g5=function(n){n.className,n.clearValue,n.cx,n.getStyles,n.getClassNames,n.getValue,n.hasValue,n.isMulti,n.isRtl,n.options,n.selectOption,n.selectProps,n.setValue,n.theme;var r=Aa(n,MA);return je({},r)},ut=function(n,r,s){var i=n.cx,u=n.getStyles,c=n.getClassNames,f=n.className;return{css:u(r,n),className:i(s??{},c(r,n),f)}};function Ec(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function RA(e){return Ec(e)?window.innerHeight:e.clientHeight}function b5(e){return Ec(e)?window.pageYOffset:e.scrollTop}function tc(e,n){if(Ec(e)){window.scrollTo(0,n);return}e.scrollTop=n}function zA(e){var n=getComputedStyle(e),r=n.position==="absolute",s=/(auto|scroll)/;if(n.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(n=getComputedStyle(i),!(r&&n.position==="static")&&s.test(n.overflow+n.overflowY+n.overflowX))return i;return document.documentElement}function kA(e,n,r,s){return r*((e=e/s-1)*e*e+1)+n}function xu(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ec,i=b5(e),u=n-i,c=10,f=0;function h(){f+=c;var p=kA(f,i,u,r);tc(e,p),f<r?window.requestAnimationFrame(h):s(e)}h()}function gv(e,n){var r=e.getBoundingClientRect(),s=n.getBoundingClientRect(),i=n.offsetHeight/3;s.bottom+i>r.bottom?tc(e,Math.min(n.offsetTop+n.clientHeight-e.offsetHeight+i,e.scrollHeight)):s.top-i<r.top&&tc(e,Math.max(n.offsetTop-i,0))}function LA(e){var n=e.getBoundingClientRect();return{bottom:n.bottom,height:n.height,left:n.left,right:n.right,top:n.top,width:n.width}}function bv(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function UA(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var y5=!1,IA={get passive(){return y5=!0}},Su=typeof window<"u"?window:{};Su.addEventListener&&Su.removeEventListener&&(Su.addEventListener("p",ec,IA),Su.removeEventListener("p",ec,!1));var _A=y5;function PA(e){return e!=null}function VA(e){return Array.isArray(e)}function wu(e,n,r){return e?n:r}var BA=function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];var u=Object.entries(n).filter(function(c){var f=Ea(c,1),h=f[0];return!s.includes(h)});return u.reduce(function(c,f){var h=Ea(f,2),p=h[0],b=h[1];return c[p]=b,c},{})},FA=["children","innerProps"],HA=["children","innerProps"];function qA(e){var n=e.maxHeight,r=e.menuEl,s=e.minHeight,i=e.placement,u=e.shouldScroll,c=e.isFixedPosition,f=e.controlHeight,h=zA(r),p={placement:"bottom",maxHeight:n};if(!r||!r.offsetParent)return p;var b=h.getBoundingClientRect(),y=b.height,v=r.getBoundingClientRect(),w=v.bottom,E=v.height,C=v.top,O=r.offsetParent.getBoundingClientRect(),M=O.top,j=c?window.innerHeight:RA(h),T=b5(h),U=parseInt(getComputedStyle(r).marginBottom,10),N=parseInt(getComputedStyle(r).marginTop,10),R=M-N,D=j-C,I=R+T,B=y-T-C,Z=w-j+T+U,re=T+C-N,J=160;switch(i){case"auto":case"bottom":if(D>=E)return{placement:"bottom",maxHeight:n};if(B>=E&&!c)return u&&xu(h,Z,J),{placement:"bottom",maxHeight:n};if(!c&&B>=s||c&&D>=s){u&&xu(h,Z,J);var Y=c?D-U:B-U;return{placement:"bottom",maxHeight:Y}}if(i==="auto"||c){var oe=n,le=c?R:I;return le>=s&&(oe=Math.min(le-U-f,n)),{placement:"top",maxHeight:oe}}if(i==="bottom")return u&&tc(h,Z),{placement:"bottom",maxHeight:n};break;case"top":if(R>=E)return{placement:"top",maxHeight:n};if(I>=E&&!c)return u&&xu(h,re,J),{placement:"top",maxHeight:n};if(!c&&I>=s||c&&R>=s){var _=n;return(!c&&I>=s||c&&R>=s)&&(_=c?R-N:I-N),u&&xu(h,re,J),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:n};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return p}function GA(e){var n={bottom:"top",top:"bottom"};return e?n[e]:"bottom"}var v5=function(n){return n==="auto"?"bottom":n},$A=function(n,r){var s,i=n.placement,u=n.theme,c=u.borderRadius,f=u.spacing,h=u.colors;return je((s={label:"menu"},to(s,GA(i),"100%"),to(s,"position","absolute"),to(s,"width","100%"),to(s,"zIndex",1),s),r?{}:{backgroundColor:h.neutral0,borderRadius:c,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:f.menuGutter,marginTop:f.menuGutter})},x5=S.createContext(null),YA=function(n){var r=n.children,s=n.minMenuHeight,i=n.maxMenuHeight,u=n.menuPlacement,c=n.menuPosition,f=n.menuShouldScrollIntoView,h=n.theme,p=S.useContext(x5)||{},b=p.setPortalPlacement,y=S.useRef(null),v=S.useState(i),w=Ea(v,2),E=w[0],C=w[1],O=S.useState(null),M=Ea(O,2),j=M[0],T=M[1],U=h.spacing.controlHeight;return F0(function(){var N=y.current;if(N){var R=c==="fixed",D=f&&!R,I=qA({maxHeight:i,menuEl:N,minHeight:s,placement:u,shouldScroll:D,isFixedPosition:R,controlHeight:U});C(I.maxHeight),T(I.placement),b?.(I.placement)}},[i,u,c,f,s,b,U]),r({ref:y,placerProps:je(je({},n),{},{placement:j||v5(u),maxHeight:E})})},QA=function(n){var r=n.children,s=n.innerRef,i=n.innerProps;return Oe("div",Me({},ut(n,"menu",{menu:!0}),{ref:s},i),r)},XA=QA,KA=function(n,r){var s=n.maxHeight,i=n.theme.spacing.baseUnit;return je({maxHeight:s,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:i,paddingTop:i})},ZA=function(n){var r=n.children,s=n.innerProps,i=n.innerRef,u=n.isMulti;return Oe("div",Me({},ut(n,"menuList",{"menu-list":!0,"menu-list--is-multi":u}),{ref:i},s),r)},S5=function(n,r){var s=n.theme,i=s.spacing.baseUnit,u=s.colors;return je({textAlign:"center"},r?{}:{color:u.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},JA=S5,WA=S5,e4=function(n){var r=n.children,s=r===void 0?"No options":r,i=n.innerProps,u=Aa(n,FA);return Oe("div",Me({},ut(je(je({},u),{},{children:s,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),s)},t4=function(n){var r=n.children,s=r===void 0?"Loading...":r,i=n.innerProps,u=Aa(n,HA);return Oe("div",Me({},ut(je(je({},u),{},{children:s,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),s)},n4=function(n){var r=n.rect,s=n.offset,i=n.position;return{left:r.left,position:i,top:s,width:r.width,zIndex:1}},a4=function(n){var r=n.appendTo,s=n.children,i=n.controlElement,u=n.innerProps,c=n.menuPlacement,f=n.menuPosition,h=S.useRef(null),p=S.useRef(null),b=S.useState(v5(c)),y=Ea(b,2),v=y[0],w=y[1],E=S.useMemo(function(){return{setPortalPlacement:w}},[]),C=S.useState(null),O=Ea(C,2),M=O[0],j=O[1],T=S.useCallback(function(){if(i){var D=LA(i),I=f==="fixed"?0:window.pageYOffset,B=D[v]+I;(B!==M?.offset||D.left!==M?.rect.left||D.width!==M?.rect.width)&&j({offset:B,rect:D})}},[i,f,v,M?.offset,M?.rect.left,M?.rect.width]);F0(function(){T()},[T]);var U=S.useCallback(function(){typeof p.current=="function"&&(p.current(),p.current=null),i&&h.current&&(p.current=yC(i,h.current,T,{elementResize:"ResizeObserver"in window}))},[i,T]);F0(function(){U()},[U]);var N=S.useCallback(function(D){h.current=D,U()},[U]);if(!r&&f!=="fixed"||!M)return null;var R=Oe("div",Me({ref:N},ut(je(je({},n),{},{offset:M.offset,position:f,rect:M.rect}),"menuPortal",{"menu-portal":!0}),u),s);return Oe(x5.Provider,{value:E},r?q1.createPortal(R,r):R)},r4=function(n){var r=n.isDisabled,s=n.isRtl;return{label:"container",direction:s?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},s4=function(n){var r=n.children,s=n.innerProps,i=n.isDisabled,u=n.isRtl;return Oe("div",Me({},ut(n,"container",{"--is-disabled":i,"--is-rtl":u}),s),r)},i4=function(n,r){var s=n.theme.spacing,i=n.isMulti,u=n.hasValue,c=n.selectProps.controlShouldRenderValue;return je({alignItems:"center",display:i&&u&&c?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(s.baseUnit/2,"px ").concat(s.baseUnit*2,"px")})},o4=function(n){var r=n.children,s=n.innerProps,i=n.isMulti,u=n.hasValue;return Oe("div",Me({},ut(n,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":u}),s),r)},l4=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},u4=function(n){var r=n.children,s=n.innerProps;return Oe("div",Me({},ut(n,"indicatorsContainer",{indicators:!0}),s),r)},yv,c4=["size"],f4=["innerProps","isRtl","size"],d4={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},w5=function(n){var r=n.size,s=Aa(n,c4);return Oe("svg",Me({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:d4},s))},Wh=function(n){return Oe(w5,Me({size:20},n),Oe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},C5=function(n){return Oe(w5,Me({size:20},n),Oe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},E5=function(n,r){var s=n.isFocused,i=n.theme,u=i.spacing.baseUnit,c=i.colors;return je({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:s?c.neutral60:c.neutral20,padding:u*2,":hover":{color:s?c.neutral80:c.neutral40}})},h4=E5,m4=function(n){var r=n.children,s=n.innerProps;return Oe("div",Me({},ut(n,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),s),r||Oe(C5,null))},p4=E5,g4=function(n){var r=n.children,s=n.innerProps;return Oe("div",Me({},ut(n,"clearIndicator",{indicator:!0,"clear-indicator":!0}),s),r||Oe(Wh,null))},b4=function(n,r){var s=n.isDisabled,i=n.theme,u=i.spacing.baseUnit,c=i.colors;return je({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:s?c.neutral10:c.neutral20,marginBottom:u*2,marginTop:u*2})},y4=function(n){var r=n.innerProps;return Oe("span",Me({},r,ut(n,"indicatorSeparator",{"indicator-separator":!0})))},v4=jA(yv||(yv=NA([`
|
|
12
|
+
0%, 80%, 100% { opacity: 0; }
|
|
13
|
+
40% { opacity: 1; }
|
|
14
|
+
`]))),x4=function(n,r){var s=n.isFocused,i=n.size,u=n.theme,c=u.colors,f=u.spacing.baseUnit;return je({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},r?{}:{color:s?c.neutral60:c.neutral20,padding:f*2})},l0=function(n){var r=n.delay,s=n.offset;return Oe("span",{css:Jh({animation:"".concat(v4," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:s?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},S4=function(n){var r=n.innerProps,s=n.isRtl,i=n.size,u=i===void 0?4:i,c=Aa(n,f4);return Oe("div",Me({},ut(je(je({},c),{},{innerProps:r,isRtl:s,size:u}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),Oe(l0,{delay:0,offset:s}),Oe(l0,{delay:160,offset:!0}),Oe(l0,{delay:320,offset:!s}))},w4=function(n,r){var s=n.isDisabled,i=n.isFocused,u=n.theme,c=u.colors,f=u.borderRadius,h=u.spacing;return je({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:h.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:s?c.neutral5:c.neutral0,borderColor:s?c.neutral10:i?c.primary:c.neutral20,borderRadius:f,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(c.primary):void 0,"&:hover":{borderColor:i?c.primary:c.neutral30}})},C4=function(n){var r=n.children,s=n.isDisabled,i=n.isFocused,u=n.innerRef,c=n.innerProps,f=n.menuIsOpen;return Oe("div",Me({ref:u},ut(n,"control",{control:!0,"control--is-disabled":s,"control--is-focused":i,"control--menu-is-open":f}),c,{"aria-disabled":s||void 0}),r)},E4=C4,O4=["data"],A4=function(n,r){var s=n.theme.spacing;return r?{}:{paddingBottom:s.baseUnit*2,paddingTop:s.baseUnit*2}},j4=function(n){var r=n.children,s=n.cx,i=n.getStyles,u=n.getClassNames,c=n.Heading,f=n.headingProps,h=n.innerProps,p=n.label,b=n.theme,y=n.selectProps;return Oe("div",Me({},ut(n,"group",{group:!0}),h),Oe(c,Me({},f,{selectProps:y,theme:b,getStyles:i,getClassNames:u,cx:s}),p),Oe("div",null,r))},N4=function(n,r){var s=n.theme,i=s.colors,u=s.spacing;return je({label:"group",cursor:"default",display:"block"},r?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:u.baseUnit*3,paddingRight:u.baseUnit*3,textTransform:"uppercase"})},M4=function(n){var r=g5(n);r.data;var s=Aa(r,O4);return Oe("div",Me({},ut(n,"groupHeading",{"group-heading":!0}),s))},T4=j4,D4=["innerRef","isDisabled","isHidden","inputClassName"],R4=function(n,r){var s=n.isDisabled,i=n.value,u=n.theme,c=u.spacing,f=u.colors;return je(je({visibility:s?"hidden":"visible",transform:i?"translateZ(0)":""},z4),r?{}:{margin:c.baseUnit/2,paddingBottom:c.baseUnit/2,paddingTop:c.baseUnit/2,color:f.neutral80})},O5={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},z4={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":je({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},O5)},k4=function(n){return je({label:"input",color:"inherit",background:0,opacity:n?0:1,width:"100%"},O5)},L4=function(n){var r=n.cx,s=n.value,i=g5(n),u=i.innerRef,c=i.isDisabled,f=i.isHidden,h=i.inputClassName,p=Aa(i,D4);return Oe("div",Me({},ut(n,"input",{"input-container":!0}),{"data-value":s||""}),Oe("input",Me({className:r({input:!0},h),ref:u,style:k4(f),disabled:c},p)))},U4=L4,I4=function(n,r){var s=n.theme,i=s.spacing,u=s.borderRadius,c=s.colors;return je({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:c.neutral10,borderRadius:u/2,margin:i.baseUnit/2})},_4=function(n,r){var s=n.theme,i=s.borderRadius,u=s.colors,c=n.cropWithEllipsis;return je({overflow:"hidden",textOverflow:c||c===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:i/2,color:u.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},P4=function(n,r){var s=n.theme,i=s.spacing,u=s.borderRadius,c=s.colors,f=n.isFocused;return je({alignItems:"center",display:"flex"},r?{}:{borderRadius:u/2,backgroundColor:f?c.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:c.dangerLight,color:c.danger}})},A5=function(n){var r=n.children,s=n.innerProps;return Oe("div",s,r)},V4=A5,B4=A5;function F4(e){var n=e.children,r=e.innerProps;return Oe("div",Me({role:"button"},r),n||Oe(Wh,{size:14}))}var H4=function(n){var r=n.children,s=n.components,i=n.data,u=n.innerProps,c=n.isDisabled,f=n.removeProps,h=n.selectProps,p=s.Container,b=s.Label,y=s.Remove;return Oe(p,{data:i,innerProps:je(je({},ut(n,"multiValue",{"multi-value":!0,"multi-value--is-disabled":c})),u),selectProps:h},Oe(b,{data:i,innerProps:je({},ut(n,"multiValueLabel",{"multi-value__label":!0})),selectProps:h},r),Oe(y,{data:i,innerProps:je(je({},ut(n,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},f),selectProps:h}))},q4=H4,G4=function(n,r){var s=n.isDisabled,i=n.isFocused,u=n.isSelected,c=n.theme,f=c.spacing,h=c.colors;return je({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:u?h.primary:i?h.primary25:"transparent",color:s?h.neutral20:u?h.neutral0:"inherit",padding:"".concat(f.baseUnit*2,"px ").concat(f.baseUnit*3,"px"),":active":{backgroundColor:s?void 0:u?h.primary:h.primary50}})},$4=function(n){var r=n.children,s=n.isDisabled,i=n.isFocused,u=n.isSelected,c=n.innerRef,f=n.innerProps;return Oe("div",Me({},ut(n,"option",{option:!0,"option--is-disabled":s,"option--is-focused":i,"option--is-selected":u}),{ref:c,"aria-disabled":s},f),r)},Y4=$4,Q4=function(n,r){var s=n.theme,i=s.spacing,u=s.colors;return je({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:u.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},X4=function(n){var r=n.children,s=n.innerProps;return Oe("div",Me({},ut(n,"placeholder",{placeholder:!0}),s),r)},K4=X4,Z4=function(n,r){var s=n.isDisabled,i=n.theme,u=i.spacing,c=i.colors;return je({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:s?c.neutral40:c.neutral80,marginLeft:u.baseUnit/2,marginRight:u.baseUnit/2})},J4=function(n){var r=n.children,s=n.isDisabled,i=n.innerProps;return Oe("div",Me({},ut(n,"singleValue",{"single-value":!0,"single-value--is-disabled":s}),i),r)},W4=J4,Oc={ClearIndicator:g4,Control:E4,DropdownIndicator:m4,DownChevron:C5,CrossIcon:Wh,Group:T4,GroupHeading:M4,IndicatorsContainer:u4,IndicatorSeparator:y4,Input:U4,LoadingIndicator:S4,Menu:XA,MenuList:ZA,MenuPortal:a4,LoadingMessage:t4,NoOptionsMessage:e4,MultiValue:q4,MultiValueContainer:V4,MultiValueLabel:B4,MultiValueRemove:F4,Option:Y4,Placeholder:K4,SelectContainer:s4,SingleValue:W4,ValueContainer:o4},e9=function(n){return je(je({},Oc),n.components)},vv=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function t9(e,n){return!!(e===n||vv(e)&&vv(n))}function n9(e,n){if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(!t9(e[r],n[r]))return!1;return!0}function a9(e,n){n===void 0&&(n=n9);var r=null;function s(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];if(r&&r.lastThis===this&&n(i,r.lastArgs))return r.lastResult;var c=e.apply(this,i);return r={lastResult:c,lastArgs:i,lastThis:this},c}return s.clear=function(){r=null},s}var r9={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},s9=function(n){return Oe("span",Me({css:r9},n))},xv=s9,i9={guidance:function(n){var r=n.isSearchable,s=n.isMulti,i=n.tabSelectsValue,u=n.context,c=n.isInitialFocus;switch(u){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return c?"".concat(n["aria-label"]||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(s?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(n){var r=n.action,s=n.label,i=s===void 0?"":s,u=n.labels,c=n.isDisabled;switch(r){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(u.length>1?"s":""," ").concat(u.join(","),", selected.");case"select-option":return c?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(n){var r=n.context,s=n.focused,i=n.options,u=n.label,c=u===void 0?"":u,f=n.selectValue,h=n.isDisabled,p=n.isSelected,b=n.isAppleDevice,y=function(C,O){return C&&C.length?"".concat(C.indexOf(O)+1," of ").concat(C.length):""};if(r==="value"&&f)return"value ".concat(c," focused, ").concat(y(f,s),".");if(r==="menu"&&b){var v=h?" disabled":"",w="".concat(p?" selected":"").concat(v);return"".concat(c).concat(w,", ").concat(y(i,s),".")}return""},onFilter:function(n){var r=n.inputValue,s=n.resultsMessage;return"".concat(s).concat(r?" for search term "+r:"",".")}},o9=function(n){var r=n.ariaSelection,s=n.focusedOption,i=n.focusedValue,u=n.focusableOptions,c=n.isFocused,f=n.selectValue,h=n.selectProps,p=n.id,b=n.isAppleDevice,y=h.ariaLiveMessages,v=h.getOptionLabel,w=h.inputValue,E=h.isMulti,C=h.isOptionDisabled,O=h.isSearchable,M=h.menuIsOpen,j=h.options,T=h.screenReaderStatus,U=h.tabSelectsValue,N=h.isLoading,R=h["aria-label"],D=h["aria-live"],I=S.useMemo(function(){return je(je({},i9),y||{})},[y]),B=S.useMemo(function(){var le="";if(r&&I.onChange){var _=r.option,K=r.options,ie=r.removedValue,be=r.removedValues,we=r.value,De=function(Ae){return Array.isArray(Ae)?null:Ae},V=ie||_||De(we),te=V?v(V):"",ne=K||be||void 0,se=ne?ne.map(v):[],pe=je({isDisabled:V&&C(V,f),label:te,labels:se},r);le=I.onChange(pe)}return le},[r,I,C,f,v]),Z=S.useMemo(function(){var le="",_=s||i,K=!!(s&&f&&f.includes(s));if(_&&I.onFocus){var ie={focused:_,label:v(_),isDisabled:C(_,f),isSelected:K,options:u,context:_===s?"menu":"value",selectValue:f,isAppleDevice:b};le=I.onFocus(ie)}return le},[s,i,v,C,I,u,f,b]),re=S.useMemo(function(){var le="";if(M&&j.length&&!N&&I.onFilter){var _=T({count:u.length});le=I.onFilter({inputValue:w,resultsMessage:_})}return le},[u,w,M,I,j,T,N]),J=r?.action==="initial-input-focus",Y=S.useMemo(function(){var le="";if(I.guidance){var _=i?"value":M?"menu":"input";le=I.guidance({"aria-label":R,context:_,isDisabled:s&&C(s,f),isMulti:E,isSearchable:O,tabSelectsValue:U,isInitialFocus:J})}return le},[R,s,i,E,C,O,M,I,f,U,J]),oe=Oe(S.Fragment,null,Oe("span",{id:"aria-selection"},B),Oe("span",{id:"aria-focused"},Z),Oe("span",{id:"aria-results"},re),Oe("span",{id:"aria-guidance"},Y));return Oe(S.Fragment,null,Oe(xv,{id:p},J&&oe),Oe(xv,{"aria-live":D,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},c&&!J&&oe))},l9=o9,H0=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],u9=new RegExp("["+H0.map(function(e){return e.letters}).join("")+"]","g"),j5={};for(var u0=0;u0<H0.length;u0++)for(var c0=H0[u0],f0=0;f0<c0.letters.length;f0++)j5[c0.letters[f0]]=c0.base;var N5=function(n){return n.replace(u9,function(r){return j5[r]})},c9=a9(N5),Sv=function(n){return n.replace(/^\s+|\s+$/g,"")},f9=function(n){return"".concat(n.label," ").concat(n.value)},d9=function(n){return function(r,s){if(r.data.__isNew__)return!0;var i=je({ignoreCase:!0,ignoreAccents:!0,stringify:f9,trim:!0,matchFrom:"any"},n),u=i.ignoreCase,c=i.ignoreAccents,f=i.stringify,h=i.trim,p=i.matchFrom,b=h?Sv(s):s,y=h?Sv(f(r)):f(r);return u&&(b=b.toLowerCase(),y=y.toLowerCase()),c&&(b=c9(b),y=N5(y)),p==="start"?y.substr(0,b.length)===b:y.indexOf(b)>-1}},h9=["innerRef"];function m9(e){var n=e.innerRef,r=Aa(e,h9),s=BA(r,"onExited","in","enter","exit","appear");return Oe("input",Me({ref:n},s,{css:Jh({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var p9=function(n){n.cancelable&&n.preventDefault(),n.stopPropagation()};function g9(e){var n=e.isEnabled,r=e.onBottomArrive,s=e.onBottomLeave,i=e.onTopArrive,u=e.onTopLeave,c=S.useRef(!1),f=S.useRef(!1),h=S.useRef(0),p=S.useRef(null),b=S.useCallback(function(O,M){if(p.current!==null){var j=p.current,T=j.scrollTop,U=j.scrollHeight,N=j.clientHeight,R=p.current,D=M>0,I=U-N-T,B=!1;I>M&&c.current&&(s&&s(O),c.current=!1),D&&f.current&&(u&&u(O),f.current=!1),D&&M>I?(r&&!c.current&&r(O),R.scrollTop=U,B=!0,c.current=!0):!D&&-M>T&&(i&&!f.current&&i(O),R.scrollTop=0,B=!0,f.current=!0),B&&p9(O)}},[r,s,i,u]),y=S.useCallback(function(O){b(O,O.deltaY)},[b]),v=S.useCallback(function(O){h.current=O.changedTouches[0].clientY},[]),w=S.useCallback(function(O){var M=h.current-O.changedTouches[0].clientY;b(O,M)},[b]),E=S.useCallback(function(O){if(O){var M=_A?{passive:!1}:!1;O.addEventListener("wheel",y,M),O.addEventListener("touchstart",v,M),O.addEventListener("touchmove",w,M)}},[w,v,y]),C=S.useCallback(function(O){O&&(O.removeEventListener("wheel",y,!1),O.removeEventListener("touchstart",v,!1),O.removeEventListener("touchmove",w,!1))},[w,v,y]);return S.useEffect(function(){if(n){var O=p.current;return E(O),function(){C(O)}}},[n,E,C]),function(O){p.current=O}}var wv=["boxSizing","height","overflow","paddingRight","position"],Cv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ev(e){e.cancelable&&e.preventDefault()}function Ov(e){e.stopPropagation()}function Av(){var e=this.scrollTop,n=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===n&&(this.scrollTop=e-1)}function jv(){return"ontouchstart"in window||navigator.maxTouchPoints}var Nv=!!(typeof window<"u"&&window.document&&window.document.createElement),Ji=0,Rs={capture:!1,passive:!1};function b9(e){var n=e.isEnabled,r=e.accountForScrollbars,s=r===void 0?!0:r,i=S.useRef({}),u=S.useRef(null),c=S.useCallback(function(h){if(Nv){var p=document.body,b=p&&p.style;if(s&&wv.forEach(function(E){var C=b&&b[E];i.current[E]=C}),s&&Ji<1){var y=parseInt(i.current.paddingRight,10)||0,v=document.body?document.body.clientWidth:0,w=window.innerWidth-v+y||0;Object.keys(Cv).forEach(function(E){var C=Cv[E];b&&(b[E]=C)}),b&&(b.paddingRight="".concat(w,"px"))}p&&jv()&&(p.addEventListener("touchmove",Ev,Rs),h&&(h.addEventListener("touchstart",Av,Rs),h.addEventListener("touchmove",Ov,Rs))),Ji+=1}},[s]),f=S.useCallback(function(h){if(Nv){var p=document.body,b=p&&p.style;Ji=Math.max(Ji-1,0),s&&Ji<1&&wv.forEach(function(y){var v=i.current[y];b&&(b[y]=v)}),p&&jv()&&(p.removeEventListener("touchmove",Ev,Rs),h&&(h.removeEventListener("touchstart",Av,Rs),h.removeEventListener("touchmove",Ov,Rs)))}},[s]);return S.useEffect(function(){if(n){var h=u.current;return c(h),function(){f(h)}}},[n,c,f]),function(h){u.current=h}}var y9=function(n){var r=n.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},v9={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function x9(e){var n=e.children,r=e.lockEnabled,s=e.captureEnabled,i=s===void 0?!0:s,u=e.onBottomArrive,c=e.onBottomLeave,f=e.onTopArrive,h=e.onTopLeave,p=g9({isEnabled:i,onBottomArrive:u,onBottomLeave:c,onTopArrive:f,onTopLeave:h}),b=b9({isEnabled:r}),y=function(w){p(w),b(w)};return Oe(S.Fragment,null,r&&Oe("div",{onClick:y9,css:v9}),n(y))}var S9={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},w9=function(n){var r=n.name,s=n.onFocus;return Oe("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:s,css:S9,value:"",onChange:function(){}})},C9=w9;function em(e){var n;return typeof window<"u"&&window.navigator!=null?e.test(((n=window.navigator.userAgentData)===null||n===void 0?void 0:n.platform)||window.navigator.platform):!1}function E9(){return em(/^iPhone/i)}function M5(){return em(/^Mac/i)}function O9(){return em(/^iPad/i)||M5()&&navigator.maxTouchPoints>1}function A9(){return E9()||O9()}function j9(){return M5()||A9()}var N9=function(n){return n.label},M9=function(n){return n.label},T9=function(n){return n.value},D9=function(n){return!!n.isDisabled},R9={clearIndicator:p4,container:r4,control:w4,dropdownIndicator:h4,group:A4,groupHeading:N4,indicatorsContainer:l4,indicatorSeparator:b4,input:R4,loadingIndicator:x4,loadingMessage:WA,menu:$A,menuList:KA,menuPortal:n4,multiValue:I4,multiValueLabel:_4,multiValueRemove:P4,noOptionsMessage:JA,option:G4,placeholder:Q4,singleValue:Z4,valueContainer:i4},z9={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},k9=4,T5=4,L9=38,U9=T5*2,I9={baseUnit:T5,controlHeight:L9,menuGutter:U9},d0={borderRadius:k9,colors:z9,spacing:I9},_9={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:bv(),captureMenuScroll:!bv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:d9(),formatGroupLabel:N9,getOptionLabel:M9,getOptionValue:T9,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:D9,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!UA(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(n){var r=n.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Mv(e,n,r,s){var i=z5(e,n,r),u=k5(e,n,r),c=R5(e,n),f=nc(e,n);return{type:"option",data:n,isDisabled:i,isSelected:u,label:c,value:f,index:s}}function Iu(e,n){return e.options.map(function(r,s){if("options"in r){var i=r.options.map(function(c,f){return Mv(e,c,n,f)}).filter(function(c){return Dv(e,c)});return i.length>0?{type:"group",data:r,options:i,index:s}:void 0}var u=Mv(e,r,n,s);return Dv(e,u)?u:void 0}).filter(PA)}function D5(e){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Yh(r.options.map(function(s){return s.data}))):n.push(r.data),n},[])}function Tv(e,n){return e.reduce(function(r,s){return s.type==="group"?r.push.apply(r,Yh(s.options.map(function(i){return{data:i.data,id:"".concat(n,"-").concat(s.index,"-").concat(i.index)}}))):r.push({data:s.data,id:"".concat(n,"-").concat(s.index)}),r},[])}function P9(e,n){return D5(Iu(e,n))}function Dv(e,n){var r=e.inputValue,s=r===void 0?"":r,i=n.data,u=n.isSelected,c=n.label,f=n.value;return(!U5(e)||!u)&&L5(e,{label:c,value:f,data:i},s)}function V9(e,n){var r=e.focusedValue,s=e.selectValue,i=s.indexOf(r);if(i>-1){var u=n.indexOf(r);if(u>-1)return r;if(i<n.length)return n[i]}return null}function B9(e,n){var r=e.focusedOption;return r&&n.indexOf(r)>-1?r:n[0]}var h0=function(n,r){var s,i=(s=n.find(function(u){return u.data===r}))===null||s===void 0?void 0:s.id;return i||null},R5=function(n,r){return n.getOptionLabel(r)},nc=function(n,r){return n.getOptionValue(r)};function z5(e,n,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(n,r):!1}function k5(e,n,r){if(r.indexOf(n)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(n,r);var s=nc(e,n);return r.some(function(i){return nc(e,i)===s})}function L5(e,n,r){return e.filterOption?e.filterOption(n,r):!0}var U5=function(n){var r=n.hideSelectedOptions,s=n.isMulti;return r===void 0?s:r},F9=1,I5=(function(e){jO(r,e);var n=TO(r);function r(s){var i;if(OO(this,r),i=n.call(this,s),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(h){i.controlRef=h},i.focusedOptionRef=null,i.getFocusedOptionRef=function(h){i.focusedOptionRef=h},i.menuListRef=null,i.getMenuListRef=function(h){i.menuListRef=h},i.inputRef=null,i.getInputRef=function(h){i.inputRef=h},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(h,p){var b=i.props,y=b.onChange,v=b.name;p.name=v,i.ariaOnChange(h,p),y(h,p)},i.setValue=function(h,p,b){var y=i.props,v=y.closeMenuOnSelect,w=y.isMulti,E=y.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:E}),v&&(i.setState({inputIsHiddenAfterUpdate:!w}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(h,{action:p,option:b})},i.selectOption=function(h){var p=i.props,b=p.blurInputOnSelect,y=p.isMulti,v=p.name,w=i.state.selectValue,E=y&&i.isOptionSelected(h,w),C=i.isOptionDisabled(h,w);if(E){var O=i.getOptionValue(h);i.setValue(w.filter(function(M){return i.getOptionValue(M)!==O}),"deselect-option",h)}else if(!C)y?i.setValue([].concat(Yh(w),[h]),"select-option",h):i.setValue(h,"select-option");else{i.ariaOnChange(h,{action:"select-option",option:h,name:v});return}b&&i.blurInput()},i.removeValue=function(h){var p=i.props.isMulti,b=i.state.selectValue,y=i.getOptionValue(h),v=b.filter(function(E){return i.getOptionValue(E)!==y}),w=wu(p,v,v[0]||null);i.onChange(w,{action:"remove-value",removedValue:h}),i.focusInput()},i.clearValue=function(){var h=i.state.selectValue;i.onChange(wu(i.props.isMulti,[],null),{action:"clear",removedValues:h})},i.popValue=function(){var h=i.props.isMulti,p=i.state.selectValue,b=p[p.length-1],y=p.slice(0,p.length-1),v=wu(h,y,y[0]||null);b&&i.onChange(v,{action:"pop-value",removedValue:b})},i.getFocusedOptionId=function(h){return h0(i.state.focusableOptionsWithIds,h)},i.getFocusableOptionsWithIds=function(){return Tv(Iu(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var h=arguments.length,p=new Array(h),b=0;b<h;b++)p[b]=arguments[b];return DA.apply(void 0,[i.props.classNamePrefix].concat(p))},i.getOptionLabel=function(h){return R5(i.props,h)},i.getOptionValue=function(h){return nc(i.props,h)},i.getStyles=function(h,p){var b=i.props.unstyled,y=R9[h](p,b);y.boxSizing="border-box";var v=i.props.styles[h];return v?v(y,p):y},i.getClassNames=function(h,p){var b,y;return(b=(y=i.props.classNames)[h])===null||b===void 0?void 0:b.call(y,p)},i.getElementId=function(h){return"".concat(i.state.instancePrefix,"-").concat(h)},i.getComponents=function(){return e9(i.props)},i.buildCategorizedOptions=function(){return Iu(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return D5(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(h,p){i.setState({ariaSelection:je({value:h},p)})},i.onMenuMouseDown=function(h){h.button===0&&(h.stopPropagation(),h.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(h){i.blockOptionHover=!1},i.onControlMouseDown=function(h){if(!h.defaultPrevented){var p=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?h.target.tagName!=="INPUT"&&h.target.tagName!=="TEXTAREA"&&i.onMenuClose():p&&i.openMenu("first"):(p&&(i.openAfterFocus=!0),i.focusInput()),h.target.tagName!=="INPUT"&&h.target.tagName!=="TEXTAREA"&&h.preventDefault()}},i.onDropdownIndicatorMouseDown=function(h){if(!(h&&h.type==="mousedown"&&h.button!==0)&&!i.props.isDisabled){var p=i.props,b=p.isMulti,y=p.menuIsOpen;i.focusInput(),y?(i.setState({inputIsHiddenAfterUpdate:!b}),i.onMenuClose()):i.openMenu("first"),h.preventDefault()}},i.onClearIndicatorMouseDown=function(h){h&&h.type==="mousedown"&&h.button!==0||(i.clearValue(),h.preventDefault(),i.openAfterFocus=!1,h.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(h){typeof i.props.closeMenuOnScroll=="boolean"?h.target instanceof HTMLElement&&Ec(h.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(h)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(h){var p=h.touches,b=p&&p.item(0);b&&(i.initialTouchX=b.clientX,i.initialTouchY=b.clientY,i.userIsDragging=!1)},i.onTouchMove=function(h){var p=h.touches,b=p&&p.item(0);if(b){var y=Math.abs(b.clientX-i.initialTouchX),v=Math.abs(b.clientY-i.initialTouchY),w=5;i.userIsDragging=y>w||v>w}},i.onTouchEnd=function(h){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(h.target)&&i.menuListRef&&!i.menuListRef.contains(h.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(h){i.userIsDragging||i.onControlMouseDown(h)},i.onClearIndicatorTouchEnd=function(h){i.userIsDragging||i.onClearIndicatorMouseDown(h)},i.onDropdownIndicatorTouchEnd=function(h){i.userIsDragging||i.onDropdownIndicatorMouseDown(h)},i.handleInputChange=function(h){var p=i.props.inputValue,b=h.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(b,{action:"input-change",prevInputValue:p}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(h){i.props.onFocus&&i.props.onFocus(h),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(h){var p=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(h),i.onInputChange("",{action:"input-blur",prevInputValue:p}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(h){if(!(i.blockOptionHover||i.state.focusedOption===h)){var p=i.getFocusableOptions(),b=p.indexOf(h);i.setState({focusedOption:h,focusedOptionId:b>-1?i.getFocusedOptionId(h):null})}},i.shouldHideSelectedOptions=function(){return U5(i.props)},i.onValueInputFocus=function(h){h.preventDefault(),h.stopPropagation(),i.focus()},i.onKeyDown=function(h){var p=i.props,b=p.isMulti,y=p.backspaceRemovesValue,v=p.escapeClearsValue,w=p.inputValue,E=p.isClearable,C=p.isDisabled,O=p.menuIsOpen,M=p.onKeyDown,j=p.tabSelectsValue,T=p.openMenuOnFocus,U=i.state,N=U.focusedOption,R=U.focusedValue,D=U.selectValue;if(!C&&!(typeof M=="function"&&(M(h),h.defaultPrevented))){switch(i.blockOptionHover=!0,h.key){case"ArrowLeft":if(!b||w)return;i.focusValue("previous");break;case"ArrowRight":if(!b||w)return;i.focusValue("next");break;case"Delete":case"Backspace":if(w)return;if(R)i.removeValue(R);else{if(!y)return;b?i.popValue():E&&i.clearValue()}break;case"Tab":if(i.isComposing||h.shiftKey||!O||!j||!N||T&&i.isOptionSelected(N,D))return;i.selectOption(N);break;case"Enter":if(h.keyCode===229)break;if(O){if(!N||i.isComposing)return;i.selectOption(N);break}return;case"Escape":O?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:w}),i.onMenuClose()):E&&v&&i.clearValue();break;case" ":if(w)return;if(!O){i.openMenu("first");break}if(!N)return;i.selectOption(N);break;case"ArrowUp":O?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":O?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!O)return;i.focusOption("pageup");break;case"PageDown":if(!O)return;i.focusOption("pagedown");break;case"Home":if(!O)return;i.focusOption("first");break;case"End":if(!O)return;i.focusOption("last");break;default:return}h.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++F9),i.state.selectValue=pv(s.value),s.menuIsOpen&&i.state.selectValue.length){var u=i.getFocusableOptionsWithIds(),c=i.buildFocusableOptions(),f=c.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=u,i.state.focusedOption=c[f],i.state.focusedOptionId=h0(u,c[f])}return i}return AO(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&gv(this.menuListRef,this.focusedOptionRef),j9()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var u=this.props,c=u.isDisabled,f=u.menuIsOpen,h=this.state.isFocused;(h&&!c&&i.isDisabled||h&&f&&!i.menuIsOpen)&&this.focusInput(),h&&c&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!h&&!c&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(gv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,u){this.props.onInputChange(i,u)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var u=this,c=this.state,f=c.selectValue,h=c.isFocused,p=this.buildFocusableOptions(),b=i==="first"?0:p.length-1;if(!this.props.isMulti){var y=p.indexOf(f[0]);y>-1&&(b=y)}this.scrollToFocusedOptionOnUpdate=!(h&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:p[b],focusedOptionId:this.getFocusedOptionId(p[b])},function(){return u.onMenuOpen()})}},{key:"focusValue",value:function(i){var u=this.state,c=u.selectValue,f=u.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var h=c.indexOf(f);f||(h=-1);var p=c.length-1,b=-1;if(c.length){switch(i){case"previous":h===0?b=0:h===-1?b=p:b=h-1;break;case"next":h>-1&&h<p&&(b=h+1);break}this.setState({inputIsHidden:b!==-1,focusedValue:c[b]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",u=this.props.pageSize,c=this.state.focusedOption,f=this.getFocusableOptions();if(f.length){var h=0,p=f.indexOf(c);c||(p=-1),i==="up"?h=p>0?p-1:f.length-1:i==="down"?h=(p+1)%f.length:i==="pageup"?(h=p-u,h<0&&(h=0)):i==="pagedown"?(h=p+u,h>f.length-1&&(h=f.length-1)):i==="last"&&(h=f.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:f[h],focusedValue:null,focusedOptionId:this.getFocusedOptionId(f[h])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(d0):je(je({},d0),this.props.theme):d0})},{key:"getCommonProps",value:function(){var i=this.clearValue,u=this.cx,c=this.getStyles,f=this.getClassNames,h=this.getValue,p=this.selectOption,b=this.setValue,y=this.props,v=y.isMulti,w=y.isRtl,E=y.options,C=this.hasValue();return{clearValue:i,cx:u,getStyles:c,getClassNames:f,getValue:h,hasValue:C,isMulti:v,isRtl:w,options:E,selectOption:p,selectProps:y,setValue:b,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,u=i.isClearable,c=i.isMulti;return u===void 0?c:u}},{key:"isOptionDisabled",value:function(i,u){return z5(this.props,i,u)}},{key:"isOptionSelected",value:function(i,u){return k5(this.props,i,u)}},{key:"filterOption",value:function(i,u){return L5(this.props,i,u)}},{key:"formatOptionLabel",value:function(i,u){if(typeof this.props.formatOptionLabel=="function"){var c=this.props.inputValue,f=this.state.selectValue;return this.props.formatOptionLabel(i,{context:u,inputValue:c,selectValue:f})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:(function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))})},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:(function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))})},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:(function(){var i=this.props,u=i.isDisabled,c=i.isSearchable,f=i.inputId,h=i.inputValue,p=i.tabIndex,b=i.form,y=i.menuIsOpen,v=i.required,w=this.getComponents(),E=w.Input,C=this.state,O=C.inputIsHidden,M=C.ariaSelection,j=this.commonProps,T=f||this.getElementId("input"),U=je(je(je({"aria-autocomplete":"list","aria-expanded":y,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":v,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},y&&{"aria-controls":this.getElementId("listbox")}),!c&&{"aria-readonly":!0}),this.hasValue()?M?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return c?S.createElement(E,Me({},j,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:T,innerRef:this.getInputRef,isDisabled:u,isHidden:O,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:p,form:b,type:"text",value:h},U)):S.createElement(m9,Me({id:T,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ec,onFocus:this.onInputFocus,disabled:u,tabIndex:p,inputMode:"none",form:b,value:""},U))})},{key:"renderPlaceholderOrValue",value:function(){var i=this,u=this.getComponents(),c=u.MultiValue,f=u.MultiValueContainer,h=u.MultiValueLabel,p=u.MultiValueRemove,b=u.SingleValue,y=u.Placeholder,v=this.commonProps,w=this.props,E=w.controlShouldRenderValue,C=w.isDisabled,O=w.isMulti,M=w.inputValue,j=w.placeholder,T=this.state,U=T.selectValue,N=T.focusedValue,R=T.isFocused;if(!this.hasValue()||!E)return M?null:S.createElement(y,Me({},v,{key:"placeholder",isDisabled:C,isFocused:R,innerProps:{id:this.getElementId("placeholder")}}),j);if(O)return U.map(function(I,B){var Z=I===N,re="".concat(i.getOptionLabel(I),"-").concat(i.getOptionValue(I));return S.createElement(c,Me({},v,{components:{Container:f,Label:h,Remove:p},isFocused:Z,isDisabled:C,key:re,index:B,removeProps:{onClick:function(){return i.removeValue(I)},onTouchEnd:function(){return i.removeValue(I)},onMouseDown:function(Y){Y.preventDefault()}},data:I}),i.formatOptionLabel(I,"value"))});if(M)return null;var D=U[0];return S.createElement(b,Me({},v,{data:D,isDisabled:C}),this.formatOptionLabel(D,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),u=i.ClearIndicator,c=this.commonProps,f=this.props,h=f.isDisabled,p=f.isLoading,b=this.state.isFocused;if(!this.isClearable()||!u||h||!this.hasValue()||p)return null;var y={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(u,Me({},c,{innerProps:y,isFocused:b}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),u=i.LoadingIndicator,c=this.commonProps,f=this.props,h=f.isDisabled,p=f.isLoading,b=this.state.isFocused;if(!u||!p)return null;var y={"aria-hidden":"true"};return S.createElement(u,Me({},c,{innerProps:y,isDisabled:h,isFocused:b}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),u=i.DropdownIndicator,c=i.IndicatorSeparator;if(!u||!c)return null;var f=this.commonProps,h=this.props.isDisabled,p=this.state.isFocused;return S.createElement(c,Me({},f,{isDisabled:h,isFocused:p}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),u=i.DropdownIndicator;if(!u)return null;var c=this.commonProps,f=this.props.isDisabled,h=this.state.isFocused,p={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(u,Me({},c,{innerProps:p,isDisabled:f,isFocused:h}))}},{key:"renderMenu",value:function(){var i=this,u=this.getComponents(),c=u.Group,f=u.GroupHeading,h=u.Menu,p=u.MenuList,b=u.MenuPortal,y=u.LoadingMessage,v=u.NoOptionsMessage,w=u.Option,E=this.commonProps,C=this.state.focusedOption,O=this.props,M=O.captureMenuScroll,j=O.inputValue,T=O.isLoading,U=O.loadingMessage,N=O.minMenuHeight,R=O.maxMenuHeight,D=O.menuIsOpen,I=O.menuPlacement,B=O.menuPosition,Z=O.menuPortalTarget,re=O.menuShouldBlockScroll,J=O.menuShouldScrollIntoView,Y=O.noOptionsMessage,oe=O.onMenuScrollToTop,le=O.onMenuScrollToBottom;if(!D)return null;var _=function(te,ne){var se=te.type,pe=te.data,he=te.isDisabled,Ae=te.isSelected,Te=te.label,Je=te.value,_t=C===pe,qt=he?void 0:function(){return i.onOptionHover(pe)},ea=he?void 0:function(){return i.selectOption(pe)},Pt="".concat(i.getElementId("option"),"-").concat(ne),_n={id:Pt,onClick:ea,onMouseMove:qt,onMouseOver:qt,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:Ae};return S.createElement(w,Me({},E,{innerProps:_n,data:pe,isDisabled:he,isSelected:Ae,key:Pt,label:Te,type:se,value:Je,isFocused:_t,innerRef:_t?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(te.data,"menu"))},K;if(this.hasOptions())K=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var te=V.data,ne=V.options,se=V.index,pe="".concat(i.getElementId("group"),"-").concat(se),he="".concat(pe,"-heading");return S.createElement(c,Me({},E,{key:pe,data:te,options:ne,Heading:f,headingProps:{id:he,data:V.data},label:i.formatGroupLabel(V.data)}),V.options.map(function(Ae){return _(Ae,"".concat(se,"-").concat(Ae.index))}))}else if(V.type==="option")return _(V,"".concat(V.index))});else if(T){var ie=U({inputValue:j});if(ie===null)return null;K=S.createElement(y,E,ie)}else{var be=Y({inputValue:j});if(be===null)return null;K=S.createElement(v,E,be)}var we={minMenuHeight:N,maxMenuHeight:R,menuPlacement:I,menuPosition:B,menuShouldScrollIntoView:J},De=S.createElement(YA,Me({},E,we),function(V){var te=V.ref,ne=V.placerProps,se=ne.placement,pe=ne.maxHeight;return S.createElement(h,Me({},E,we,{innerRef:te,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:T,placement:se}),S.createElement(x9,{captureEnabled:M,onTopArrive:oe,onBottomArrive:le,lockEnabled:re},function(he){return S.createElement(p,Me({},E,{innerRef:function(Te){i.getMenuListRef(Te),he(Te)},innerProps:{role:"listbox","aria-multiselectable":E.isMulti,id:i.getElementId("listbox")},isLoading:T,maxHeight:pe,focusedOption:C}),K)}))});return Z||B==="fixed"?S.createElement(b,Me({},E,{appendTo:Z,controlElement:this.controlRef,menuPlacement:I,menuPosition:B}),De):De}},{key:"renderFormField",value:function(){var i=this,u=this.props,c=u.delimiter,f=u.isDisabled,h=u.isMulti,p=u.name,b=u.required,y=this.state.selectValue;if(b&&!this.hasValue()&&!f)return S.createElement(C9,{name:p,onFocus:this.onValueInputFocus});if(!(!p||f))if(h)if(c){var v=y.map(function(C){return i.getOptionValue(C)}).join(c);return S.createElement("input",{name:p,type:"hidden",value:v})}else{var w=y.length>0?y.map(function(C,O){return S.createElement("input",{key:"i-".concat(O),name:p,type:"hidden",value:i.getOptionValue(C)})}):S.createElement("input",{name:p,type:"hidden",value:""});return S.createElement("div",null,w)}else{var E=y[0]?this.getOptionValue(y[0]):"";return S.createElement("input",{name:p,type:"hidden",value:E})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,u=this.state,c=u.ariaSelection,f=u.focusedOption,h=u.focusedValue,p=u.isFocused,b=u.selectValue,y=this.getFocusableOptions();return S.createElement(l9,Me({},i,{id:this.getElementId("live-region"),ariaSelection:c,focusedOption:f,focusedValue:h,isFocused:p,selectValue:b,focusableOptions:y,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),u=i.Control,c=i.IndicatorsContainer,f=i.SelectContainer,h=i.ValueContainer,p=this.props,b=p.className,y=p.id,v=p.isDisabled,w=p.menuIsOpen,E=this.state.isFocused,C=this.commonProps=this.getCommonProps();return S.createElement(f,Me({},C,{className:b,innerProps:{id:y,onKeyDown:this.onKeyDown},isDisabled:v,isFocused:E}),this.renderLiveRegion(),S.createElement(u,Me({},C,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:v,isFocused:E,menuIsOpen:w}),S.createElement(h,Me({},C,{isDisabled:v}),this.renderPlaceholderOrValue(),this.renderInput()),S.createElement(c,Me({},C,{isDisabled:v}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,u){var c=u.prevProps,f=u.clearFocusValueOnUpdate,h=u.inputIsHiddenAfterUpdate,p=u.ariaSelection,b=u.isFocused,y=u.prevWasFocused,v=u.instancePrefix,w=i.options,E=i.value,C=i.menuIsOpen,O=i.inputValue,M=i.isMulti,j=pv(E),T={};if(c&&(E!==c.value||w!==c.options||C!==c.menuIsOpen||O!==c.inputValue)){var U=C?P9(i,j):[],N=C?Tv(Iu(i,j),"".concat(v,"-option")):[],R=f?V9(u,j):null,D=B9(u,U),I=h0(N,D);T={selectValue:j,focusedOption:D,focusedOptionId:I,focusableOptionsWithIds:N,focusedValue:R,clearFocusValueOnUpdate:!1}}var B=h!=null&&i!==c?{inputIsHidden:h,inputIsHiddenAfterUpdate:void 0}:{},Z=p,re=b&&y;return b&&!re&&(Z={value:wu(M,j,j[0]||null),options:j,action:"initial-input-focus"},re=!y),p?.action==="initial-input-focus"&&(Z=null),je(je(je({},T),B),{},{prevProps:i,ariaSelection:Z,prevWasFocused:re})}}]),r})(S.Component);I5.defaultProps=_9;var H9=S.forwardRef(function(e,n){var r=EO(e);return S.createElement(I5,Me({ref:n},r))}),q9=H9;function G9(e){return g.jsx(Oc.DropdownIndicator,{...e,children:g.jsx(ae,{name:"ChevronDown",size:16})})}function $9(e){return g.jsx(Oc.ClearIndicator,{...e,children:g.jsx(ae,{name:"Xmark",size:16})})}function Y9(e){const{label:n,onClick:r,...s}=e,i=!!n&&!!r;return g.jsxs(Oc.MenuList,{...s,children:[e.children,i?g.jsx("button",{className:"w-full px-2 py-3 hover:bg-slate-50",onClick:r,children:n}):null]})}function Ck(e){const n=e["aria-invalid"]==="true",{addItemButtonProps:r,...s}=e;return g.jsx(q9,{...s,components:{DropdownIndicator:G9,ClearIndicator:$9,MenuList:i=>Y9({...i,...r})},styles:{dropdownIndicator:()=>({label:"indicatorContainer",display:"flex",transition:"color 150ms",color:"var(color-gray-900)",padding:8,boxSizing:"border-box"}),clearIndicator:i=>({...i,color:"var(color-gray-900)"}),container:i=>({...i,borderColor:"var(color-gray-200)",fontSize:12}),placeholder:i=>({...i,color:n?"var(color-red-800)":"var(color-gray-500)"}),control:()=>({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:32,outline:"0 !important",position:"relative",transition:"all 100ms",backgroundColor:"var(--color-white)",borderColor:n?"var(--color-red-900)":"var(--color-gray-200)",borderStyle:"solid",borderWidth:1,borderRadius:"6px",boxSizing:"border-box"}),option:(i,u)=>({...i,backgroundColor:u.isSelected?"var(--color-slate-50)":"var(--color-white)",color:"var(--color-gray-800)",":hover":{backgroundColor:"var(--color-slate-50)"}}),menuList:i=>({...i,padding:0,borderRadius:"6px"})},theme:i=>({...i,colors:{...i.colors,primary:"var(--color-slate-100)",primary25:"var(--color-slate-50)",primary50:"var(--color-slate-100)",primary75:"var(--color-slate-100)",danger:"var(--color-red-900)",dangerLight:"var(--color-red-100)",neutral0:"var(--color-white)",neutral5:"var(--color-gray-50)",neutral10:"var(--color-gray-100)",neutral20:"var(--color-gray-200)",neutral30:"var(--color-gray-300)",neutral40:"var(--color-gray-400)",neutral50:"var(--color-gray-500)",neutral60:"var(--color-gray-600)",neutral70:"var(--color-gray-700)",neutral80:"var(--color-gray-800)",neutral90:"var(--color-gray-900)"}})})}const Ek=e=>{const{children:n,cookies:r,submitLabel:s,rejectLabel:i,onSubmit:u=()=>{},onReject:c=()=>{},...f}=e,[h,p]=S.useState(r),b=v=>{const{id:w,checked:E}=v.target;p(C=>C.map(O=>O.id===w?{...O,value:E}:O))},y="min-w-64 h-8 text-base";return g.jsxs("div",{...Ot(f,"flex flex-col items-center"),children:[g.jsx("div",{className:"text-center",children:n}),g.jsx("div",{className:"my-8 flex gap-x-16 text-sm font-medium",children:h.map((v,w)=>g.jsxs("div",{className:"cursor-pointer",children:[g.jsx("input",{checked:v.value,className:"mr-1 size-3 cursor-pointer rounded-sm border-2 border-gray-900 accent-gray-900 focus:outline-none",id:v.id,onChange:b,type:"checkbox"}),g.jsx("label",{className:"cursor-pointer select-none",htmlFor:v.id,children:v.label})]},w))}),g.jsxs("div",{className:"flex gap-x-8",children:[g.jsx(In,{className:y,color:"light",onClick:()=>c(),size:"small",children:i},"button-reject"),g.jsx(In,{className:y,onClick:()=>u(h),size:"small",children:s},"button-submit")]})]})};function Ok(e){const{message:n="Loading editor",...r}=e;return g.jsx("div",{className:"grid h-full place-items-center",...r,children:g.jsxs("div",{className:"-mt-20 grid place-items-center",children:[g.jsx("h3",{className:"mb-4 text-xl",children:n}),g.jsx(bO,{})]})})}function ac(e){const{title:n,isOpen:r,onOpenChange:s,children:i,containerClassName:u,toggleClassName:c,contentClassName:f}=e;return g.jsxs("div",{className:de(u),children:[g.jsxs("div",{className:de("flex cursor-pointer justify-between text-gray-500",c),onClick:s,children:[g.jsx("h2",{className:"font-semibold text-inherit",children:n}),g.jsx(ae,{className:jh("transition",r?"":"-rotate-90"),size:16,name:"ChevronDown"})]}),g.jsx("div",{className:de("max-h-0 overflow-hidden transition-[max-height] duration-300 ease-in-out",r&&"max-h-screen",f),children:i})]})}function _s(e){return g.jsx("div",{...e,className:de("h-px bg-gray-200",e.className)})}function lr(e){const{children:n,content:r,open:s,defaultOpen:i,onOpenChange:u,className:c,side:f="top",sideOffset:h=5,delayDuration:p,...b}=e;return g.jsxs(tx,{defaultOpen:i,delayDuration:p,onOpenChange:u,open:s,children:[g.jsx(nx,{asChild:!0,children:n}),g.jsx(ax,{children:g.jsx(rx,{...b,side:f,sideOffset:h,className:de("shadow-tooltip rounded-lg border border-gray-200 bg-white p-2 text-xs",c),children:r})})]})}const _5=Fu,Q9=e=>{const{className:n,timestampUtcMs:r,title:s,subtitle:i,onClick:u,isSelected:c=!1}=e,[f,h]=S.useState(!1),p=!!s||!!i||!!r;S.useEffect(()=>{f&&(h(!1),setTimeout(()=>p&&h(!0),50))},[s,i,r,p]);const b=E=>{if(!E)return"";try{return JE(new Date(E),{addSuffix:!0})}catch{return E}},y=g.jsxs("div",{className:"flex flex-col text-xs",children:[!!s&&g.jsx("div",{children:s}),!!i&&g.jsx("div",{className:"text-gray-300",children:i}),!!r&&g.jsx("div",{children:b(r)})]}),v=()=>{p&&h(!0)},w=()=>{h(!1)};return g.jsxs("div",{className:"relative",onMouseEnter:v,onMouseLeave:w,children:[c&&g.jsx(ae,{name:"TimelineCaret",color:"#4EA9FF",size:10,className:"absolute top-[-11px] z-40"}),g.jsx(lr,{className:"rounded-md bg-gray-900 text-white",content:y,open:f&&p,onOpenChange:h,delayDuration:0,side:"bottom",sideOffset:5,children:g.jsx("div",{className:de("mx-0.5 flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:bg-blue-300",c&&"bg-blue-300",n),onClick:u,"data-title":s,"data-subtitle":i,"data-timestamp":r,children:g.jsx("div",{className:"h-0.5 w-1 rounded-full bg-gray-500"})})})]})},Rv=(e=0)=>{switch(!0){case e<=0:return"h-[1px]";case e===1:return"h-[3px]";case e===2:return"h-[6px]";case e===3:return"h-[9px]";case e>=4:return"h-[12px]";default:return"h-[1px]"}},X9=e=>{if(!e)return"";try{const n=WE(e);return Yu(n,"HH:mm, dd, MMMM")}catch{return e}},K9=({onClick:e,className:n,timestampUtcMs:r,additions:s,deletions:i,addSize:u=0,delSize:c=0,isSelected:f=!1})=>{const[h,p]=S.useState(!1),b=u===0&&c===0,y=Rv(u),v=Rv(c),w=g.jsxs("div",{className:"flex flex-col text-xs",children:[g.jsx("div",{children:X9(r)}),g.jsx("div",{className:"text-green-900",children:`${s} additions +`}),g.jsx("div",{className:"text-red-700",children:`${i} deletions -`})]}),E=()=>{b||p(!0)},C=()=>{p(!1)};return g.jsxs("div",{className:"relative",onMouseEnter:E,onMouseLeave:C,children:[f&&g.jsx(ae,{name:"TimelineCaret",color:"#4EA9FF",size:10,className:"absolute left-[-2px] top-[-11px] z-40"}),b?g.jsx("div",{className:de("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:bg-blue-300",n),"data-timestamp":r,onClick:e,children:g.jsx("div",{className:"size-[3px] rounded-full bg-gray-500"})}):g.jsx(lr,{className:"rounded-md bg-gray-900 text-white",content:w,open:h,onOpenChange:p,delayDuration:0,side:"bottom",sideOffset:5,children:g.jsxs("div",{className:de("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:bg-blue-300",n,f&&"bg-blue-300"),"data-timestamp":r,onClick:e,children:[g.jsx("div",{className:"flex h-3 w-0.5 items-end",children:g.jsx("div",{className:de("h-3 w-0.5 rounded-t-full bg-green-600",y)})}),g.jsx("div",{className:"flex h-3 w-0.5 items-start",children:g.jsx("div",{className:de("h-3 w-0.5 rounded-b-full bg-red-600",v)})})]})})]})},zv={id:"default",type:"bar",addSize:0,delSize:0},Z9=e=>{const{timeline:n=[],onItemClick:r}=e,[s,i]=S.useState(null),u=S.useRef(null),c=w=>{w.id===s||w.id===zv.id?(r?.(null),i(null)):(r?.(w),i(w.id))},f=[...n,zv],[h,p]=S.useMemo(()=>{const w=f.findIndex(E=>E.id===s);return w===-1?[f,[]]:[f.slice(0,w),f.slice(w)]},[f,s]),b=S.useCallback(w=>w.map(E=>{if(E.type==="divider"){const{timestampUtcMs:C,title:O,subtitle:M}=E;return g.jsx(Q9,{timestampUtcMs:C,title:O,subtitle:M,onClick:()=>c(E),isSelected:E.id===s},E.id)}return g.jsx(K9,{timestampUtcMs:E.timestampUtcMs,addSize:E.addSize,delSize:E.delSize,additions:E.additions,deletions:E.deletions,isSelected:E.id===s,onClick:()=>c(E)},E.id)}),[c,s]),y=S.useMemo(()=>b(h),[h,b]),v=S.useMemo(()=>b(p),[p,b]);return S.useEffect(()=>{u.current&&(u.current.scrollLeft=u.current.scrollWidth)},[]),g.jsx(_5,{delayDuration:0,skipDelayDuration:0,children:g.jsxs("div",{className:"relative h-[36px] w-full",children:[g.jsx("div",{className:"absolute left-[0px] z-[20] h-[17px] w-[6px] bg-white",children:g.jsx("div",{className:"mt-[11px] h-[6px] w-[6px] rounded-tl-md bg-slate-50"})}),g.jsx("div",{className:"absolute right-[0px] top-[11px] z-[20] h-[6px] w-[6px] bg-white",children:g.jsx("div",{className:"h-[6px] w-[6px] rounded-tr-md bg-slate-50"})}),g.jsx("div",{className:"absolute inset-x-0 bottom-0 h-[25px] rounded-md bg-slate-50"}),g.jsx("div",{className:"absolute inset-x-0 bottom-0 h-[36px]",children:g.jsx("div",{ref:u,className:"h-full overflow-x-auto rounded-md",children:g.jsxs("div",{className:"ml-auto flex h-[36px] w-max items-end px-2 pb-0",children:[g.jsx("div",{className:"flex",children:y}),g.jsx("div",{className:"flex rounded-sm bg-blue-200",children:v})]})})}),g.jsx("div",{className:"pointer-events-none absolute bottom-0 left-0 z-10 h-[25px] w-2 rounded-l-md bg-slate-50"}),g.jsx("div",{className:"pointer-events-none absolute bottom-0 right-0 z-10 h-[25px] w-2 rounded-r-md bg-slate-50"})]})})};function J9(e){const[n,r]=$w(e),s=n?.header.revision.global??0,i=n?.header.revision.local??0,u=s>0||i>0,c=!!n?.clipboard.length;return{undo:()=>{r(zC())},redo:()=>{r(RC())},canUndo:u,canRedo:c}}function W9(e){return[]}const Ak=e=>{const{onClose:n,children:r,onExport:s,className:i,document:u,onSwitchboardLinkClick:c,enabledControls:f=["undo","redo","export","history"],defaultTimelineVisible:h=!0,disableRevisionHistory:p=!1,initialTimelineVisible:b=!1,...y}=e,[v]=Yw(),w=u??v,E=w?.header.name||void 0,C=Qw(w?.header.id),O=n??(()=>Fs(C)),M=async le=>{le&&(s?s(le):await Jw(le))},j=J9(w?.header.id),T=!j.canUndo,U=!j.canRedo,N=W9(w?.header.id),[R,D]=S.useState(b),I=Xw(w),Z=c??(I?async()=>{if(I)try{const le=await I();window.open(le,"_blank")}catch(le){console.error("Error opening switchboard link:",le)}}:void 0),re=!w,J=!Z,Y=N.length===0;S.useEffect(()=>{typeof b=="boolean"&&D(b)},[b]);const oe=()=>{Y||D(!R)};return g.jsxs("div",{className:"flex w-full flex-col",...y,children:[g.jsxs("div",{className:de("flex h-12 w-full items-center justify-between rounded-xl border border-gray-200 bg-slate-50 px-4",i),children:[g.jsxs("div",{className:"flex items-center gap-x-2",children:[f.includes("undo")&&g.jsx("button",{className:de("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white",T?"cursor-not-allowed":"cursor-pointer active:opacity-70"),onClick:j.undo,disabled:T,children:g.jsx(ae,{name:"ArrowCouterclockwise",size:16,className:T?"text-gray-500":"text-gray-900"})}),f.includes("redo")&&g.jsx("button",{className:de("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white",U?"cursor-not-allowed":"cursor-pointer active:opacity-70"),onClick:j.redo,disabled:U,children:g.jsx("div",{className:"-scale-x-100",children:g.jsx(ae,{name:"ArrowCouterclockwise",size:16,className:U?"text-gray-500":"text-gray-900"})})}),f.includes("export")&&g.jsx("button",{className:de("flex h-8 items-center rounded-lg border border-gray-200 bg-white px-3 text-sm",re?"cursor-not-allowed":"cursor-pointer active:opacity-70"),onClick:()=>void M(w),disabled:re,children:g.jsx("span",{className:re?"text-gray-500":"text-gray-900",children:"Export"})})]}),g.jsx("div",{className:"flex items-center",children:g.jsx("h1",{className:"text-sm font-medium text-gray-500",children:E})}),g.jsxs("div",{className:"flex items-center gap-x-2",children:[!J&&g.jsx("button",{className:de("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white","cursor-pointer active:opacity-70"),onClick:Z,disabled:J,children:g.jsx(ae,{name:"Drive",size:16,className:"text-gray-900"})}),f.includes("history")&&g.jsx("button",{className:de("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white",p?"cursor-not-allowed":"cursor-pointer active:opacity-70"),onClick:Kw,disabled:p,children:g.jsx(ae,{name:"History",size:16,className:p?"text-gray-500":"text-gray-900"})}),f.includes("timeline")&&h&&g.jsx("button",{className:de("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white",Y?"cursor-not-allowed":"cursor-pointer active:opacity-70"),onClick:oe,disabled:Y,"aria-pressed":R,children:g.jsx(ae,{name:"Timeline",size:16,className:de("text-gray-900",Y&&"opacity-50",R&&"text-blue-600")})}),g.jsx("button",{"aria-label":"Close document",className:"grid size-8 cursor-pointer place-items-center rounded-lg border border-gray-200 bg-white active:opacity-70",onClick:O,children:g.jsx(ae,{name:"XmarkLight",size:16,className:"text-gray-900"})})]})]}),R&&g.jsx("div",{className:"mt-2 w-full",children:g.jsx(Z9,{timeline:N,onItemClick:Zw})}),r]})};function P5(e){const{target:n,onAddFileOverride:r,trackNestedDrag:s=!1,acceptedFileExtensions:i}=e??{},[u,c]=S.useState(!1),f=S.useRef(0),{onMoveNode:h,onCopyNode:p,onAddFile:b}=Ch(),y=r??b,v=S.useCallback(j=>!i||i.length===0||j.types.includes("UI_NODE")?!0:j.types.includes("Files")?Array.from(j.items).some(U=>{if(U.kind==="file"){if(U.type==="application/zip"||U.type==="application/x-zip-compressed")return i.includes(".zip");if(U.type===""||U.type==="application/octet-stream")return!0}return!1}):!1,[i]),w=S.useCallback(j=>{j.preventDefault(),j.stopPropagation(),v(j.dataTransfer)?c(!0):j.dataTransfer.dropEffect="none"},[v]),E=S.useCallback(j=>{j.preventDefault(),j.stopPropagation(),v(j.dataTransfer)&&(f.current+=1,c(!0))},[v]),C=S.useCallback(j=>{j.preventDefault(),j.stopPropagation(),f.current=Math.max(0,f.current-1),f.current===0&&c(!1)},[]),O=S.useCallback(()=>{c(!1)},[]),M=S.useCallback(async j=>{j.preventDefault();const U=j.target.closest("[data-drop-zone]"),N=n?.id||"root";if((U?.getAttribute("data-drop-zone")||"root")!==N){c(!1);return}try{let D=ej(j.dataTransfer.items).filter(Boolean);if(i&&i.length>0&&(D=D.filter(re=>{if(!re)return!1;const J=re.name.toLowerCase();return i.some(Y=>J.endsWith(Y.toLowerCase()))})),D.length){for(const re of D)re&&await y(re,n);return}const I=j.getModifierState("Alt"),B=j.dataTransfer.getData("UI_NODE"),Z=JSON.parse(B);I?await p(Z,n):await h(Z,n)}catch(D){console.error(D)}finally{s&&(f.current=0),c(!1)}},[y,p,h,n,s]);return S.useMemo(()=>{const j={onDragOver:w,onDrop:M,"data-drop-zone":n?.id||"root"};return s?(j.onDragEnter=E,j.onDragLeave=C):j.onDragLeave=O,{isDropTarget:u,dropProps:j}},[u,n?.id,E,C,O,w,M,s])}function ej(e){return Array.from(e).map(r=>r.kind==="file"?r.getAsFile():null).filter(Boolean)}const kv="min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";function tj(e){const{title:n="Document Already Exists",fileName:r,message:s,children:i,onReplace:u,onOpenChange:c,onDuplicate:f,replaceLabel:h="Replace",duplicateLabel:p="Create Copy",overlayProps:b,contentProps:y,bodyProps:v={},headerProps:w={},containerProps:E={},replaceButtonProps:C={},duplicateButtonProps:O={},buttonContainerProps:M={},...j}=e,T=r?`A document named "${r}" already exists in this location. Would you like to replace it or create a copy?`:"A document with the same name already exists in this location. Would you like to replace it or create a copy?";return g.jsx(ir,{contentProps:{...y,className:de("rounded-3xl",y?.className)},onOpenChange:c,overlayProps:{...b,className:b?.className},...j,children:g.jsxs("div",{...Ot(E,"w-[450px] p-6 text-slate-300"),children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-50 pb-2",children:[g.jsx("div",{...Ot(w,"text-2xl font-bold text-gray-800"),children:n}),g.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-md outline-none hover:bg-slate-100",onClick:()=>c?.(!1),children:g.jsx(ae,{name:"XmarkLight",size:24})})]}),g.jsxs("div",{...Ot(v,"my-6 rounded-md bg-slate-50 p-4 text-center"),children:[s||T,i]}),g.jsxs("div",{...Ot(M,"mt-8 flex justify-between gap-3"),children:[g.jsx("button",{onClick:u,...Ot(C,de(kv,"flex-1 bg-slate-50 text-slate-800")),children:h}),g.jsx("button",{onClick:f,...Ot(O,de(kv,"flex-1 bg-gray-800 text-gray-50")),children:p})]})]})})}function nj(e){const{status:n,errorDetails:r}=e;return(n==="failed"||n==="unsupported-document-type")&&r?g.jsx("div",{className:"break-words text-xs leading-[18px] text-gray-500",children:r}):null}function aj(e){switch(e){case"analytics-processor":return"AnalyticsProcessorModule";case"relational-processor":return"RelationalProcessorModule";case"codegen-processor":return"CodegenProcessorModule";case"app":return"AppModule";case"document-model":return"DocumentModelModule";case"editor":return"EditorModule";case"package":return"PackageModule";case"subgraph":return"SubgraphModule";default:return"PowerhouseDocumentModule"}}function rj(e){const{fileName:n,fileSize:r,documentType:s,onClose:i,...u}=e;return g.jsxs("div",{className:"flex items-center gap-2",...u,children:[g.jsx("div",{className:"flex h-9 w-7 flex-shrink-0 items-center justify-center",children:g.jsx(ae,{name:aj(s),size:48,className:"text-gray-600"})}),g.jsxs("div",{className:"flex flex-1 flex-col gap-0.5",children:[g.jsx("div",{className:"text-xs font-medium leading-[18px] text-gray-900",children:n}),g.jsx("div",{className:"text-xs font-medium leading-[18px] text-gray-500",children:r})]}),i&&g.jsx("div",{className:"flex h-9 w-[18px] flex-shrink-0 items-start justify-center",children:g.jsx("button",{type:"button",onClick:i,className:"flex h-[18px] w-[18px] items-center justify-center text-gray-600 hover:text-gray-800","aria-label":"Close",children:g.jsx(ae,{name:"XmarkLight",size:18})})})]})}function sj(e){const{status:n,progress:r=0}=e;if(n!=="uploading")return null;const s=Math.min(100,Math.max(0,r));return g.jsx("div",{className:"h-2 w-full overflow-hidden rounded-sm bg-gray-200",children:g.jsx("div",{className:"h-full bg-blue-900 transition-all duration-300 ease-out",style:{width:`${s}%`}})})}function ij(e){switch(e){case"success":return"Upload successful";case"failed":return"Upload failed";case"unsupported-document-type":return"Document not supported by this drive";case"pending":return"Pending resolution";case"conflict":return"Pending Resolution";case"uploading":return"Uploading...";default:return""}}function oj(e){switch(e){case"success":return"text-green-700";case"failed":case"unsupported-document-type":case"pending":case"conflict":return"text-red-900";case"uploading":return"text-gray-900";default:return"text-gray-900"}}function lj(e,n,r){return e==="success"&&!!n||e==="pending"&&!!r||e==="conflict"&&!!r}function uj(e){return e==="success"?"Open Document":e==="pending"||e==="conflict"?"Find resolution":""}function cj(e){const{status:n,progress:r=0,onOpenDocument:s,onFindResolution:i}=e,u=()=>{n==="success"&&s?s():(n==="pending"||n==="conflict")&&i&&i()};return g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:de("text-xs leading-[18px]",oj(n)),children:ij(n)}),n==="uploading"&&g.jsxs("div",{className:"text-xs font-medium leading-[18px] text-gray-900",children:[Math.round(r),"%"]}),lj(n,s,i)&&g.jsx("button",{type:"button",onClick:u,className:"text-xs leading-[18px] text-blue-900 hover:opacity-80",children:uj(n)})]})}const fj=S.forwardRef(function(n,r){const{fileName:s,fileSize:i,status:u,documentType:c,progress:f=0,errorDetails:h,onClose:p,onOpenDocument:b,onFindResolution:y,className:v,...w}=n;return g.jsxs("div",{ref:r,className:de("flex w-full flex-col gap-0.5 rounded-md border border-gray-100 bg-white p-2 shadow-[0_2px_12px_rgba(37,42,52,0.1)]",v),...w,children:[g.jsx(rj,{fileName:s,fileSize:i,documentType:c,onClose:p}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(cj,{status:u,progress:f,onOpenDocument:b,onFindResolution:y}),g.jsx(sj,{status:u,progress:f}),g.jsx(nj,{status:u,errorDetails:h})]})]})});function dj(e,n){return n||`Uploading ${e} document${e===1?"":"s"}`}function hj(e){const{items:n,title:r,defaultCollapsed:s=!1,onClose:i,className:u,...c}=e,[f,h]=S.useState(s),p=S.useMemo(()=>dj(n.length,r),[n.length,r]);return g.jsxs("div",{className:de("w-[358px] rounded-md border border-gray-100 bg-gray-50 p-4 shadow-[1px_4px_15px_rgba(74,88,115,0.25)]",u),...c,children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("button",{type:"button","aria-expanded":!f,"aria-label":f?"Expand list":"Collapse list",onClick:()=>h(b=>!b),className:"min-w-0 flex-1 text-left text-sm font-medium leading-4 text-gray-900 hover:opacity-80",children:p}),g.jsxs("div",{className:"flex shrink-0 items-center gap-4",children:[g.jsx("button",{type:"button","aria-label":f?"Expand":"Collapse",onClick:()=>h(b=>!b),className:"text-gray-900 hover:opacity-80",children:g.jsx("span",{className:de("inline-block h-4 w-4 select-none transition-transform",f?"-rotate-90":"rotate-0"),children:g.jsx(ae,{name:"CaretDown",size:16,"aria-hidden":"true"})})}),i&&g.jsx("button",{type:"button","aria-label":"Close",onClick:i,className:"text-gray-900 hover:opacity-80",children:g.jsx("span",{className:"inline-block h-4 w-4 select-none",children:g.jsx(ae,{name:"XmarkLight",size:16,"aria-hidden":"true"})})})]})]}),!f&&g.jsx("div",{className:"mt-4 flex max-h-[404px] flex-col gap-4 overflow-y-auto overflow-x-visible px-2 py-2",children:n.map((b,y)=>g.jsx(fj,{...b},`${b.fileName}-${y}`))})]})}function mj(){return`upload_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function pj(e){if(e===0)return"0 Bytes";const n=1024,r=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,s)).toFixed(2))} ${r[s]}`}function gj(e){switch(e){case"loading":case"initializing":return"pending";case"uploading":return"uploading";case"complete":return"success";case"failed":return"failed";case"conflict":return"conflict";case"unsupported-document-type":return"unsupported-document-type";default:return"pending"}}function bj(e,n,r,s){return e.filter(i=>i!==void 0).map(i=>({fileName:i.fileName,fileSize:i.fileSize,status:i.status,progress:i.progress,errorDetails:i.errorDetails,documentType:i.documentType,onClose:()=>{n(i.id)},onOpenDocument:i.status==="success"?()=>{i.fileNode&&r?r(i.fileNode):console.error("Opening document for upload:",i.id,"- fileNode not available or setSelectedNode not provided")}:void 0,onFindResolution:i.status==="failed"?()=>{console.log("Finding resolution for upload:",i.id)}:i.status==="conflict"?()=>{console.log("Finding conflict resolution for upload:",i.id),s?.(i.id)}:void 0}))}function yj(e){const{uploadsArray:n,uploadsCount:r,removeUpload:s,clearAllUploads:i,setSelectedNode:u,onClose:c,onConflictResolution:f,className:h,...p}=e;if(r===0)return null;const b=bj(n,s,u,f),y=c??i;return g.jsx("div",{className:de("fixed bottom-4 right-4 z-[1001]",h),...p,children:g.jsx(hj,{items:b,onClose:y})})}function vj(e,n){switch(n.type){case"ADD_UPLOAD":return{...e,[n.payload.id]:{id:n.payload.id,fileName:n.payload.fileName,fileSize:n.payload.fileSize,status:"pending",progress:0,fileNode:void 0}};case"UPDATE_PROGRESS":{const r=e[n.payload.id];return r?{...e,[n.payload.id]:{...r,status:gj(n.payload.progress.stage),progress:n.payload.progress.progress,errorDetails:n.payload.progress.error,...n.payload.progress.documentType&&{documentType:n.payload.progress.documentType},...n.payload.progress.duplicateType&&{duplicateType:n.payload.progress.duplicateType}}}:e}case"SET_FILE_NODE":{const r=e[n.payload.id];return r?{...e,[n.payload.id]:{...r,fileNode:n.payload.fileNode}}:e}case"SET_ERROR":{const r=e[n.payload.id];return r?{...e,[n.payload.id]:{...r,status:r.status||"failed",errorDetails:n.payload.error}}:e}case"REMOVE_UPLOAD":{const{[n.payload.id]:r,...s}=e;return s}case"CLEAR_ALL_UPLOADS":return{};case"SET_CONFLICT_DATA":{const r=e[n.payload.id];return r?{...e,[n.payload.id]:{...r,file:n.payload.file,parentNode:n.payload.parentNode}}:e}case"CLEAR_CONFLICTED_UPLOADS":{const r={};for(const[s,i]of Object.entries(e))i&&i.status!=="conflict"&&(r[s]=i);return r}default:return e}}function xj(e=!1,n){const r=S.useCallback(()=>{if(e&&n)try{const v=localStorage.getItem(`uploadTracker_${n}`);return v?JSON.parse(v):{}}catch(v){return console.error("Failed to load upload tracker from localStorage:",v),{}}return{}},[e,n]),[s,i]=S.useReducer(vj,r());S.useEffect(()=>{if(e&&n)try{localStorage.setItem(`uploadTracker_${n}`,JSON.stringify(s))}catch(v){console.error("Failed to save upload tracker to localStorage:",v)}},[s,e,n]);const u=S.useCallback(v=>{if(v)return async(w,E)=>{const C=mj();i({type:"ADD_UPLOAD",payload:{id:C,fileName:w.name,fileSize:pj(w.size)}});const O=M=>{i({type:"UPDATE_PROGRESS",payload:{id:C,progress:M}}),M.stage==="conflict"&&i({type:"SET_CONFLICT_DATA",payload:{id:C,file:w,parentNode:E}})};try{const M=await v(w,E,O);i({type:"SET_FILE_NODE",payload:{id:C,fileNode:M||void 0}})}catch(M){i({type:"SET_ERROR",payload:{id:C,error:M instanceof Error?M.message:"Unknown error"}})}}},[]),c=S.useCallback(v=>{i({type:"REMOVE_UPLOAD",payload:{id:v}})},[]),f=S.useCallback(()=>{i({type:"CLEAR_ALL_UPLOADS"})},[]),h=S.useCallback(()=>{i({type:"CLEAR_CONFLICTED_UPLOADS"})},[]),p=S.useCallback(()=>Object.values(s),[s]),b=S.useCallback(()=>Object.keys(s).length,[s]),y=S.useCallback((v,w,E)=>{const C=s[v];if(!C?.file||!E){console.error("Cannot resolve conflict: missing upload data or onAddFile function");return}const O=j=>{i({type:"UPDATE_PROGRESS",payload:{id:v,progress:j}})},M=E(C.file,C.parentNode,O,w);Promise.resolve(M).then(j=>{j&&i({type:"SET_FILE_NODE",payload:{id:v,fileNode:j}})}).catch(j=>{i({type:"SET_ERROR",payload:{id:v,error:j instanceof Error?j.message:"Unknown error"}})})},[s]);return{uploads:s,uploadsArray:p(),uploadsCount:b(),createUploadHandler:u,removeUpload:c,clearAllUploads:f,clearConflictedUploads:h,resolveConflict:y}}function Sj(e){const{title:n="Drag your documents",subtitle:r="to drop them in the currently selected folder.",node:s,enable:i=!0,children:u,onAddFile:c,useLocalStorage:f=!1,driveId:h,acceptedFileExtensions:p=[".zip",".phd",".phdm"],className:b,...y}=e,[v,w]=S.useState(!1),[E,C]=S.useState(null),{uploadsArray:O,uploadsCount:M,createUploadHandler:j,clearAllUploads:T,clearConflictedUploads:U,removeUpload:N,resolveConflict:R}=xj(f,h);S.useEffect(()=>{U()},[]);const D=j(c)??(async()=>{}),I=oe=>{C(oe),w(!0)},B=()=>{E&&c&&R(E,"replace",c),w(!1),C(null)},Z=()=>{E&&c&&R(E,"duplicate",c),w(!1),C(null)},re=()=>{w(!1),C(null)},{isDropTarget:J,dropProps:Y}=P5({target:s,onAddFileOverride:D,trackNestedDrag:!0,acceptedFileExtensions:p});return g.jsxs("div",{className:de("relative",b),...i?Y:{},...y,children:[u,i&&J&&g.jsx("div",{className:"fixed inset-0 z-[1000] flex min-h-screen w-screen items-center justify-center bg-black/50",children:g.jsx("div",{className:"rounded-[24px] bg-white p-6 shadow-[1px_4px_15px_rgba(74,88,115,0.25)]",children:g.jsxs("div",{className:"relative flex h-[130px] w-[400px] flex-col items-center justify-start overflow-visible rounded-lg border border-dashed border-black px-4 py-6",children:[g.jsx("div",{className:"text-center text-base leading-5 text-zinc-500",children:n}),g.jsx("div",{className:"text-center text-base leading-5 text-zinc-500",children:r}),g.jsx("span",{className:"pointer-events-none absolute -bottom-16 left-1/2 z-10 -translate-x-1/2",children:g.jsx(ae,{name:"DocumentIcons",size:144,"aria-hidden":"true"})})]})})}),g.jsx(yj,{uploadsArray:O,uploadsCount:M,removeUpload:N,clearAllUploads:T,setSelectedNode:Fs,onConflictResolution:I}),g.jsx(tj,{open:v,onOpenChange:re,fileName:E?O.find(oe=>oe?.id===E)?.fileName:void 0,onReplace:B,onDuplicate:Z})]})}function jk({children:e,...n}){const r=Ww(),s=U1(),i=eC(),u=async(c,f,h,p)=>await i(c,h,p);return!r||!s?g.jsx(g.Fragment,{children:e}):g.jsx(Sj,{onAddFile:u,driveId:s,useLocalStorage:!0,...n,children:e})}function Ac(e){const{children:n,items:r,open:s,onItemClick:i,onOpenChange:u,menuClassName:c}=e;return g.jsxs(vC,{onOpenChange:u,open:s,children:[g.jsx(xC,{asChild:!0,className:"outline-none",children:n}),g.jsx(SC,{className:de("modal-shadow cursor-pointer rounded-2xl bg-white text-sm font-medium text-slate-500",c),children:r.map(({id:f,label:h,icon:p,className:b})=>g.jsxs(wC,{className:de("flex items-center px-5 py-2 outline-none first-of-type:rounded-t-2xl first-of-type:pt-3 last-of-type:rounded-b-2xl last-of-type:pb-3 hover:bg-slate-50",b),onClick:y=>y.stopPropagation(),onSelect:()=>i(f),children:[p?g.jsx("span",{className:"mr-2 inline-block",children:p}):null,h]},f))})]})}const wj="/assets/powerhouse-rounded-CeKGGUG4.png",Lv=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],q0=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],V5=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Cj=[...V5,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Ej=[...V5,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],Uv=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}];function nr(e,{includeName:n=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Uj(e.type);return`${e.name}(${tm(e.inputs,{includeName:n})})`}function tm(e,{includeName:n=!1}={}){return e?e.map(r=>Oj(r,{includeName:n})).join(n?", ":","):""}function Oj(e,{includeName:n}){return e.type.startsWith("tuple")?`(${tm(e.components,{includeName:n})})${e.type.slice(5)}`:e.type+(n&&e.name?` ${e.name}`:"")}function qr(e,{strict:n=!0}={}){return!e||typeof e!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Ut(e){return qr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const B5="2.38.6";let m0={getDocsUrl:({docsBaseUrl:e,docsPath:n="",docsSlug:r})=>n?`${e??"https://viem.sh"}${n}${r?`#${r}`:""}`:void 0,version:`viem@${B5}`},me=class G0 extends Error{constructor(n,r={}){const s=r.cause instanceof G0?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof G0&&r.cause.docsPath||r.docsPath,u=m0.getDocsUrl?.({...r,docsPath:i}),c=[n||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...s?[`Details: ${s}`]:[],...m0.version?[`Version: ${m0.version}`]:[]].join(`
|
|
15
|
+
`);super(c,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=s,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=n,this.version=B5}walk(n){return F5(this,n)}};function F5(e,n){return n?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?F5(e.cause,n):n?null:e}class Aj extends me{constructor({docsPath:n}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
16
|
+
`),{docsPath:n,name:"AbiConstructorNotFoundError"})}}class Iv extends me{constructor({docsPath:n}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
17
|
+
`),{docsPath:n,name:"AbiConstructorParamsNotFoundError"})}}class jj extends me{constructor({data:n,params:r,size:s}){super([`Data size of ${s} bytes is too small for given parameters.`].join(`
|
|
18
|
+
`),{metaMessages:[`Params: (${tm(r,{includeName:!0})})`,`Data: ${n} (${s} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n,this.params=r,this.size=s}}class nm extends me{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Nj extends me{constructor({expectedLength:n,givenLength:r,type:s}){super([`ABI encoding array length mismatch for type ${s}.`,`Expected length: ${n}`,`Given length: ${r}`].join(`
|
|
19
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class Mj extends me{constructor({expectedSize:n,value:r}){super(`Size of bytes "${r}" (bytes${Ut(r)}) does not match expected size (bytes${n}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Tj extends me{constructor({expectedLength:n,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${n}`,`Given length (values): ${r}`].join(`
|
|
20
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class Dj extends me{constructor(n,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${n}", but "${n}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
21
|
+
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}}class _v extends me{constructor(n,{docsPath:r}={}){super([`Error ${n?`"${n}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
22
|
+
`),{docsPath:r,name:"AbiErrorNotFoundError"})}}class H5 extends me{constructor(n,{docsPath:r}){super([`Encoded error signature "${n}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${n}.`].join(`
|
|
23
|
+
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=n}}class $s extends me{constructor(n,{docsPath:r}={}){super([`Function ${n?`"${n}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
24
|
+
`),{docsPath:r,name:"AbiFunctionNotFoundError"})}}class q5 extends me{constructor(n,{docsPath:r}){super([`Function "${n}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
25
|
+
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}}class Rj extends me{constructor(n,{docsPath:r}){super([`Encoded function signature "${n}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${n}.`].join(`
|
|
26
|
+
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}}class zj extends me{constructor(n,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${n.type}\` in \`${nr(n.abiItem)}\`, and`,`\`${r.type}\` in \`${nr(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class kj extends me{constructor(n,{docsPath:r}){super([`Type "${n}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
27
|
+
`),{docsPath:r,name:"InvalidAbiEncodingType"})}}class Lj extends me{constructor(n,{docsPath:r}){super([`Type "${n}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
28
|
+
`),{docsPath:r,name:"InvalidAbiDecodingType"})}}class G5 extends me{constructor(n){super([`Value "${n}" is not a valid array.`].join(`
|
|
29
|
+
`),{name:"InvalidArrayError"})}}class Uj extends me{constructor(n){super([`"${n}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
30
|
+
`),{name:"InvalidDefinitionTypeError"})}}class Pr extends me{constructor({address:n}){super(`Address "${n}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class $5 extends me{constructor({offset:n,position:r,size:s}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${n}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}let Y5=class extends me{constructor({size:n,targetSize:r,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${n}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};class Pv extends me{constructor({size:n,targetSize:r,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${r} ${s} long, but is ${n} ${s} long.`,{name:"InvalidBytesLengthError"})}}function Ks(e,{dir:n,size:r=32}={}){return typeof e=="string"?Wa(e,{dir:n,size:r}):Ij(e,{dir:n,size:r})}function Wa(e,{dir:n,size:r=32}={}){if(r===null)return e;const s=e.replace("0x","");if(s.length>r*2)throw new Y5({size:Math.ceil(s.length/2),targetSize:r,type:"hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function Ij(e,{dir:n,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Y5({size:e.length,targetSize:r,type:"bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const u=n==="right";s[u?i:r-i-1]=e[u?i:e.length-i-1]}return s}let Q5=class extends me{constructor({max:n,min:r,signed:s,size:i,value:u}){super(`Number "${u}" is not in safe ${i?`${i*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${n?`(${r} to ${n})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}};class _j extends me{constructor(n){super(`Bytes value "${n}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class Pj extends me{constructor({givenSize:n,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${n} bytes.`,{name:"SizeOverflowError"})}}function am(e,{dir:n="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),typeof e=="string"?(r.length===1&&n==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}function Wn(e,{size:n}){if(Ut(e)>n)throw new Pj({givenSize:Ut(e),maxSize:n})}function X5(e,n={}){const{signed:r}=n;n.size&&Wn(e,{size:n.size});const s=BigInt(e);if(!r)return s;const i=(e.length-2)/2,u=(1n<<BigInt(i)*8n-1n)-1n;return s<=u?s:s-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function Vj(e,n={}){return Number(X5(e,n))}const Bj=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function K5(e,n={}){return typeof e=="number"||typeof e=="bigint"?nt(e,n):typeof e=="string"?rm(e,n):typeof e=="boolean"?Z5(e,n):Nn(e,n)}function Z5(e,n={}){const r=`0x${Number(e)}`;return typeof n.size=="number"?(Wn(r,{size:n.size}),Ks(r,{size:n.size})):r}function Nn(e,n={}){let r="";for(let i=0;i<e.length;i++)r+=Bj[e[i]];const s=`0x${r}`;return typeof n.size=="number"?(Wn(s,{size:n.size}),Ks(s,{dir:"right",size:n.size})):s}function nt(e,n={}){const{signed:r,size:s}=n,i=BigInt(e);let u;s?r?u=(1n<<BigInt(s)*8n-1n)-1n:u=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(u=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof u=="bigint"&&r?-u-1n:0;if(u&&i>u||i<c){const h=typeof e=="bigint"?"n":"";throw new Q5({max:u?`${u}${h}`:void 0,min:`${c}${h}`,signed:r,size:s,value:`${e}${h}`})}const f=`0x${(r&&i<0?(1n<<BigInt(s*8))+BigInt(i):i).toString(16)}`;return s?Ks(f,{size:s}):f}const Fj=new TextEncoder;function rm(e,n={}){const r=Fj.encode(e);return Nn(r,n)}const Hj=new TextEncoder;function sm(e,n={}){return typeof e=="number"||typeof e=="bigint"?Gj(e,n):typeof e=="boolean"?qj(e,n):qr(e)?im(e,n):zr(e,n)}function qj(e,n={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof n.size=="number"?(Wn(r,{size:n.size}),Ks(r,{size:n.size})):r}const Sa={zero:48,nine:57,A:65,F:70,a:97,f:102};function Vv(e){if(e>=Sa.zero&&e<=Sa.nine)return e-Sa.zero;if(e>=Sa.A&&e<=Sa.F)return e-(Sa.A-10);if(e>=Sa.a&&e<=Sa.f)return e-(Sa.a-10)}function im(e,n={}){let r=e;n.size&&(Wn(r,{size:n.size}),r=Ks(r,{dir:"right",size:n.size}));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,u=new Uint8Array(i);for(let c=0,f=0;c<i;c++){const h=Vv(s.charCodeAt(f++)),p=Vv(s.charCodeAt(f++));if(h===void 0||p===void 0)throw new me(`Invalid byte sequence ("${s[f-2]}${s[f-1]}" in "${s}").`);u[c]=h*16+p}return u}function Gj(e,n){const r=nt(e,n);return im(r)}function zr(e,n={}){const r=Hj.encode(e);return typeof n.size=="number"?(Wn(r,{size:n.size}),Ks(r,{dir:"right",size:n.size})):r}function ho(e,n){const r=n||"hex",s=tC(qr(e,{strict:!1})?sm(e):e);return r==="bytes"?s:K5(s)}class om extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const r=super.get(n);return super.has(n)&&r!==void 0&&(this.delete(n),super.set(n,r)),r}set(n,r){if(super.set(n,r),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}const $j=/^0x[a-fA-F0-9]{40}$/,p0=new om(8192);function Jn(e,n){const{strict:r=!0}=n??{},s=`${e}.${r}`;if(p0.has(s))return p0.get(s);const i=$j.test(e)?e.toLowerCase()===e?!0:r?lm(e)===e:!0:!1;return p0.set(s,i),i}const g0=new om(8192);function lm(e,n){if(g0.has(`${e}.${n}`))return g0.get(`${e}.${n}`);const r=e.substring(2).toLowerCase(),s=ho(zr(r),"bytes"),i=r.split("");for(let c=0;c<40;c+=2)s[c>>1]>>4>=8&&i[c]&&(i[c]=i[c].toUpperCase()),(s[c>>1]&15)>=8&&i[c+1]&&(i[c+1]=i[c+1].toUpperCase());const u=`0x${i.join("")}`;return g0.set(`${e}.${n}`,u),u}function Cu(e,n){if(!Jn(e,{strict:!1}))throw new Pr({address:e});return lm(e,n)}class Bv extends me{constructor({offset:n}){super(`Offset \`${n}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Yj extends me{constructor({length:n,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${n}\`).`,{name:"PositionOutOfBoundsError"})}}class Qj extends me{constructor({count:n,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${n}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Xj={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Qj({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Yj({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Bv({offset:e});const n=this.position-e;this.assertPosition(n),this.position=n},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Bv({offset:e});const n=this.position+e;this.assertPosition(n),this.position=n},inspectByte(e){const n=e??this.position;return this.assertPosition(n),this.bytes[n]},inspectBytes(e,n){const r=n??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const n=e??this.position;return this.assertPosition(n),this.bytes[n]},inspectUint16(e){const n=e??this.position;return this.assertPosition(n+1),this.dataView.getUint16(n)},inspectUint24(e){const n=e??this.position;return this.assertPosition(n+2),(this.dataView.getUint16(n)<<8)+this.dataView.getUint8(n+2)},inspectUint32(e){const n=e??this.position;return this.assertPosition(n+3),this.dataView.getUint32(n)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,n){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=n??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const n=this.position;return this.assertPosition(e),this.position=e,()=>this.position=n},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Kj(e,{recursiveReadLimit:n=8192}={}){const r=Object.create(Xj);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=n,r}function Ys(e,n,r,{strict:s}={}){return qr(e,{strict:!1})?Zj(e,n,r,{strict:s}):e6(e,n,r,{strict:s})}function J5(e,n){if(typeof n=="number"&&n>0&&n>Ut(e)-1)throw new $5({offset:n,position:"start",size:Ut(e)})}function W5(e,n,r){if(typeof n=="number"&&typeof r=="number"&&Ut(e)!==r-n)throw new $5({offset:r,position:"end",size:Ut(e)})}function e6(e,n,r,{strict:s}={}){J5(e,n);const i=e.slice(n,r);return s&&W5(i,n,r),i}function Zj(e,n,r,{strict:s}={}){J5(e,n);const i=`0x${e.replace("0x","").slice((n??0)*2,(r??e.length)*2)}`;return s&&W5(i,n,r),i}function Jj(e,n={}){typeof n.size<"u"&&Wn(e,{size:n.size});const r=Nn(e,n);return X5(r,n)}function Wj(e,n={}){let r=e;if(typeof n.size<"u"&&(Wn(r,{size:n.size}),r=am(r)),r.length>1||r[0]>1)throw new _j(r);return!!r[0]}function Oa(e,n={}){typeof n.size<"u"&&Wn(e,{size:n.size});const r=Nn(e,n);return Vj(r,n)}function eN(e,n={}){let r=e;return typeof n.size<"u"&&(Wn(r,{size:n.size}),r=am(r,{dir:"right"})),new TextDecoder().decode(r)}function ar(e){return typeof e[0]=="string"?jc(e):tN(e)}function tN(e){let n=0;for(const i of e)n+=i.length;const r=new Uint8Array(n);let s=0;for(const i of e)r.set(i,s),s+=i.length;return r}function jc(e){return`0x${e.reduce((n,r)=>n+r.replace("0x",""),"")}`}const nN=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function $o(e,n){if(e.length!==n.length)throw new Tj({expectedLength:e.length,givenLength:n.length});const r=aN({params:e,values:n}),s=cm(r);return s.length===0?"0x":s}function aN({params:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(um({param:e[s],value:n[s]}));return r}function um({param:e,value:n}){const r=fm(e.type);if(r){const[s,i]=r;return sN(n,{length:s,param:{...e,type:i}})}if(e.type==="tuple")return cN(n,{param:e});if(e.type==="address")return rN(n);if(e.type==="bool")return oN(n);if(e.type.startsWith("uint")||e.type.startsWith("int")){const s=e.type.startsWith("int"),[,,i="256"]=nN.exec(e.type)??[];return lN(n,{signed:s,size:Number(i)})}if(e.type.startsWith("bytes"))return iN(n,{param:e});if(e.type==="string")return uN(n);throw new kj(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function cm(e){let n=0;for(let u=0;u<e.length;u++){const{dynamic:c,encoded:f}=e[u];c?n+=32:n+=Ut(f)}const r=[],s=[];let i=0;for(let u=0;u<e.length;u++){const{dynamic:c,encoded:f}=e[u];c?(r.push(nt(n+i,{size:32})),s.push(f),i+=Ut(f)):r.push(f)}return ar([...r,...s])}function rN(e){if(!Jn(e))throw new Pr({address:e});return{dynamic:!1,encoded:Wa(e.toLowerCase())}}function sN(e,{length:n,param:r}){const s=n===null;if(!Array.isArray(e))throw new G5(e);if(!s&&e.length!==n)throw new Nj({expectedLength:n,givenLength:e.length,type:`${r.type}[${n}]`});let i=!1;const u=[];for(let c=0;c<e.length;c++){const f=um({param:r,value:e[c]});f.dynamic&&(i=!0),u.push(f)}if(s||i){const c=cm(u);if(s){const f=nt(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?ar([f,c]):f}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:ar(u.map(({encoded:c})=>c))}}function iN(e,{param:n}){const[,r]=n.type.split("bytes"),s=Ut(e);if(!r){let i=e;return s%32!==0&&(i=Wa(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:ar([Wa(nt(s,{size:32})),i])}}if(s!==Number.parseInt(r,10))throw new Mj({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Wa(e,{dir:"right"})}}function oN(e){if(typeof e!="boolean")throw new me(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Wa(Z5(e))}}function lN(e,{signed:n,size:r=256}){if(typeof r=="number"){const s=2n**(BigInt(r)-(n?1n:0n))-1n,i=n?-s-1n:0n;if(e>s||e<i)throw new Q5({max:s.toString(),min:i.toString(),signed:n,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:nt(e,{size:32,signed:n})}}function uN(e){const n=rm(e),r=Math.ceil(Ut(n)/32),s=[];for(let i=0;i<r;i++)s.push(Wa(Ys(n,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:ar([Wa(nt(Ut(n),{size:32})),...s])}}function cN(e,{param:n}){let r=!1;const s=[];for(let i=0;i<n.components.length;i++){const u=n.components[i],c=Array.isArray(e)?i:u.name,f=um({param:u,value:e[c]});s.push(f),f.dynamic&&(r=!0)}return{dynamic:r,encoded:r?cm(s):ar(s.map(({encoded:i})=>i))}}function fm(e){const n=e.match(/^(.*)\[(\d+)?\]$/);return n?[n[2]?Number(n[2]):null,n[1]]:void 0}function dm(e,n){const r=typeof n=="string"?im(n):n,s=Kj(r);if(Ut(r)===0&&e.length>0)throw new nm;if(Ut(n)&&Ut(n)<32)throw new jj({data:typeof n=="string"?n:Nn(n),params:e,size:Ut(n)});let i=0;const u=[];for(let c=0;c<e.length;++c){const f=e[c];s.setPosition(i);const[h,p]=Bs(s,f,{staticPosition:0});i+=p,u.push(h)}return u}function Bs(e,n,{staticPosition:r}){const s=fm(n.type);if(s){const[i,u]=s;return dN(e,{...n,type:u},{length:i,staticPosition:r})}if(n.type==="tuple")return gN(e,n,{staticPosition:r});if(n.type==="address")return fN(e);if(n.type==="bool")return hN(e);if(n.type.startsWith("bytes"))return mN(e,n,{staticPosition:r});if(n.type.startsWith("uint")||n.type.startsWith("int"))return pN(e,n);if(n.type==="string")return bN(e,{staticPosition:r});throw new Lj(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Fv=32,$0=32;function fN(e){const n=e.readBytes(32);return[lm(Nn(e6(n,-20))),32]}function dN(e,n,{length:r,staticPosition:s}){if(!r){const c=Oa(e.readBytes($0)),f=s+c,h=f+Fv;e.setPosition(f);const p=Oa(e.readBytes(Fv)),b=mo(n);let y=0;const v=[];for(let w=0;w<p;++w){e.setPosition(h+(b?w*32:y));const[E,C]=Bs(e,n,{staticPosition:h});y+=C,v.push(E)}return e.setPosition(s+32),[v,32]}if(mo(n)){const c=Oa(e.readBytes($0)),f=s+c,h=[];for(let p=0;p<r;++p){e.setPosition(f+p*32);const[b]=Bs(e,n,{staticPosition:f});h.push(b)}return e.setPosition(s+32),[h,32]}let i=0;const u=[];for(let c=0;c<r;++c){const[f,h]=Bs(e,n,{staticPosition:s+i});i+=h,u.push(f)}return[u,i]}function hN(e){return[Wj(e.readBytes(32),{size:32}),32]}function mN(e,n,{staticPosition:r}){const[s,i]=n.type.split("bytes");if(!i){const c=Oa(e.readBytes(32));e.setPosition(r+c);const f=Oa(e.readBytes(32));if(f===0)return e.setPosition(r+32),["0x",32];const h=e.readBytes(f);return e.setPosition(r+32),[Nn(h),32]}return[Nn(e.readBytes(Number.parseInt(i,10),32)),32]}function pN(e,n){const r=n.type.startsWith("int"),s=Number.parseInt(n.type.split("int")[1]||"256",10),i=e.readBytes(32);return[s>48?Jj(i,{signed:r}):Oa(i,{signed:r}),32]}function gN(e,n,{staticPosition:r}){const s=n.components.length===0||n.components.some(({name:c})=>!c),i=s?[]:{};let u=0;if(mo(n)){const c=Oa(e.readBytes($0)),f=r+c;for(let h=0;h<n.components.length;++h){const p=n.components[h];e.setPosition(f+u);const[b,y]=Bs(e,p,{staticPosition:f});u+=y,i[s?h:p?.name]=b}return e.setPosition(r+32),[i,32]}for(let c=0;c<n.components.length;++c){const f=n.components[c],[h,p]=Bs(e,f,{staticPosition:r});i[s?c:f?.name]=h,u+=p}return[i,u]}function bN(e,{staticPosition:n}){const r=Oa(e.readBytes(32)),s=n+r;e.setPosition(s);const i=Oa(e.readBytes(32));if(i===0)return e.setPosition(n+32),["",32];const u=e.readBytes(i,32),c=eN(am(u));return e.setPosition(n+32),[c,32]}function mo(e){const{type:n}=e;if(n==="string"||n==="bytes"||n.endsWith("[]"))return!0;if(n==="tuple")return e.components?.some(mo);const r=fm(e.type);return!!(r&&mo({...e,type:r[1]}))}const yN=e=>ho(sm(e));function vN(e){return yN(e)}const xN="1.1.0";let Mn=class Y0 extends Error{constructor(n,r={}){const s=r.cause instanceof Y0?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof Y0&&r.cause.docsPath||r.docsPath,u=[n||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${xN}`].join(`
|
|
31
|
+
`);super(u),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=s,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=n}};function ja(e,n){return e.exec(n)?.groups}const t6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,n6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,a6=/^\(.+?\).*?$/,Hv=/^tuple(?<array>(\[(\d*)\])*)$/;function Q0(e){let n=e.type;if(Hv.test(e.type)&&"components"in e){n="(";const r=e.components.length;for(let i=0;i<r;i++){const u=e.components[i];n+=Q0(u),i<r-1&&(n+=", ")}const s=ja(Hv,e.type);return n+=`)${s?.array??""}`,Q0({...e,type:n})}return"indexed"in e&&e.indexed&&(n=`${n} indexed`),e.name?`${n} ${e.name}`:n}function Wi(e){let n="";const r=e.length;for(let s=0;s<r;s++){const i=e[s];n+=Q0(i),s!==r-1&&(n+=", ")}return n}function SN(e){return e.type==="function"?`function ${e.name}(${Wi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Wi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Wi(e.inputs)})`:e.type==="error"?`error ${e.name}(${Wi(e.inputs)})`:e.type==="constructor"?`constructor(${Wi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const r6=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function wN(e){return r6.test(e)}function CN(e){return ja(r6,e)}const s6=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function EN(e){return s6.test(e)}function ON(e){return ja(s6,e)}const i6=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function AN(e){return i6.test(e)}function jN(e){return ja(i6,e)}const o6=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function l6(e){return o6.test(e)}function NN(e){return ja(o6,e)}const u6=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function MN(e){return u6.test(e)}function TN(e){return ja(u6,e)}const c6=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function DN(e){return c6.test(e)}function RN(e){return ja(c6,e)}const zN=/^receive\(\) external payable$/;function kN(e){return zN.test(e)}const LN=new Set(["indexed"]),X0=new Set(["calldata","memory","storage"]);class UN extends Mn{constructor({type:n}){super("Unknown type.",{metaMessages:[`Type "${n}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class IN extends Mn{constructor({type:n}){super("Unknown type.",{metaMessages:[`Type "${n}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class _N extends Mn{constructor({param:n}){super("Invalid ABI parameter.",{details:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class PN extends Mn{constructor({param:n,name:r}){super("Invalid ABI parameter.",{details:n,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class VN extends Mn{constructor({param:n,type:r,modifier:s}){super("Invalid ABI parameter.",{details:n,metaMessages:[`Modifier "${s}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class BN extends Mn{constructor({param:n,type:r,modifier:s}){super("Invalid ABI parameter.",{details:n,metaMessages:[`Modifier "${s}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${s}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class FN extends Mn{constructor({abiParameter:n}){super("Invalid ABI parameter.",{details:JSON.stringify(n,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Zs extends Mn{constructor({signature:n,type:r}){super(`Invalid ${r} signature.`,{details:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class HN extends Mn{constructor({signature:n}){super("Unknown signature.",{details:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class qN extends Mn{constructor({signature:n}){super("Invalid struct signature.",{details:n,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class GN extends Mn{constructor({type:n}){super("Circular reference detected.",{metaMessages:[`Struct "${n}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class $N extends Mn{constructor({current:n,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${n.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function YN(e,n,r){let s="";if(r)for(const i of Object.entries(r)){if(!i)continue;let u="";for(const c of i[1])u+=`[${c.type}${c.name?`:${c.name}`:""}]`;s+=`(${i[0]}{${u}})`}return n?`${n}:${e}${s}`:e}const b0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function QN(e,n={}){if(AN(e))return XN(e,n);if(EN(e))return KN(e,n);if(wN(e))return ZN(e,n);if(MN(e))return JN(e,n);if(DN(e))return WN(e);if(kN(e))return{type:"receive",stateMutability:"payable"};throw new HN({signature:e})}function XN(e,n={}){const r=jN(e);if(!r)throw new Zs({signature:e,type:"function"});const s=Un(r.parameters),i=[],u=s.length;for(let f=0;f<u;f++)i.push(Vr(s[f],{modifiers:X0,structs:n,type:"function"}));const c=[];if(r.returns){const f=Un(r.returns),h=f.length;for(let p=0;p<h;p++)c.push(Vr(f[p],{modifiers:X0,structs:n,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:c}}function KN(e,n={}){const r=ON(e);if(!r)throw new Zs({signature:e,type:"event"});const s=Un(r.parameters),i=[],u=s.length;for(let c=0;c<u;c++)i.push(Vr(s[c],{modifiers:LN,structs:n,type:"event"}));return{name:r.name,type:"event",inputs:i}}function ZN(e,n={}){const r=CN(e);if(!r)throw new Zs({signature:e,type:"error"});const s=Un(r.parameters),i=[],u=s.length;for(let c=0;c<u;c++)i.push(Vr(s[c],{structs:n,type:"error"}));return{name:r.name,type:"error",inputs:i}}function JN(e,n={}){const r=TN(e);if(!r)throw new Zs({signature:e,type:"constructor"});const s=Un(r.parameters),i=[],u=s.length;for(let c=0;c<u;c++)i.push(Vr(s[c],{structs:n,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}function WN(e){const n=RN(e);if(!n)throw new Zs({signature:e,type:"fallback"});return{type:"fallback",stateMutability:n.stateMutability??"nonpayable"}}const eM=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,tM=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,nM=/^u?int$/;function Vr(e,n){const r=YN(e,n?.type,n?.structs);if(b0.has(r))return b0.get(r);const s=a6.test(e),i=ja(s?tM:eM,e);if(!i)throw new _N({param:e});if(i.name&&rM(i.name))throw new PN({param:e,name:i.name});const u=i.name?{name:i.name}:{},c=i.modifier==="indexed"?{indexed:!0}:{},f=n?.structs??{};let h,p={};if(s){h="tuple";const y=Un(i.type),v=[],w=y.length;for(let E=0;E<w;E++)v.push(Vr(y[E],{structs:f}));p={components:v}}else if(i.type in f)h="tuple",p={components:f[i.type]};else if(nM.test(i.type))h=`${i.type}256`;else if(i.type==="address payable")h="address";else if(h=i.type,n?.type!=="struct"&&!f6(h))throw new IN({type:h});if(i.modifier){if(!n?.modifiers?.has?.(i.modifier))throw new VN({param:e,type:n?.type,modifier:i.modifier});if(X0.has(i.modifier)&&!sM(h,!!i.array))throw new BN({param:e,type:n?.type,modifier:i.modifier})}const b={type:`${h}${i.array??""}`,...u,...c,...p};return b0.set(r,b),b}function Un(e,n=[],r="",s=0){const i=e.trim().length;for(let u=0;u<i;u++){const c=e[u],f=e.slice(u+1);switch(c){case",":return s===0?Un(f,[...n,r.trim()]):Un(f,n,`${r}${c}`,s);case"(":return Un(f,n,`${r}${c}`,s+1);case")":return Un(f,n,`${r}${c}`,s-1);default:return Un(f,n,`${r}${c}`,s)}}if(r==="")return n;if(s!==0)throw new $N({current:r,depth:s});return n.push(r.trim()),n}function f6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||t6.test(e)||n6.test(e)}const aM=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function rM(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||t6.test(e)||n6.test(e)||aM.test(e)}function sM(e,n){return n||e==="bytes"||e==="string"||e==="tuple"}function iM(e){const n={},r=e.length;for(let c=0;c<r;c++){const f=e[c];if(!l6(f))continue;const h=NN(f);if(!h)throw new Zs({signature:f,type:"struct"});const p=h.properties.split(";"),b=[],y=p.length;for(let v=0;v<y;v++){const E=p[v].trim();if(!E)continue;const C=Vr(E,{type:"struct"});b.push(C)}if(!b.length)throw new qN({signature:f});n[h.name]=b}const s={},i=Object.entries(n),u=i.length;for(let c=0;c<u;c++){const[f,h]=i[c];s[f]=d6(h,n)}return s}const oM=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d6(e,n,r=new Set){const s=[],i=e.length;for(let u=0;u<i;u++){const c=e[u];if(a6.test(c.type))s.push(c);else{const h=ja(oM,c.type);if(!h?.type)throw new FN({abiParameter:c});const{array:p,type:b}=h;if(b in n){if(r.has(b))throw new GN({type:b});s.push({...c,type:`tuple${p??""}`,components:d6(n[b]??[],n,new Set([...r,b]))})}else if(f6(b))s.push(c);else throw new UN({type:b})}}return s}function h6(e){const n=iM(e),r=[],s=e.length;for(let i=0;i<s;i++){const u=e[i];l6(u)||r.push(QN(u,n))}return r}function lM(e){let n=!0,r="",s=0,i="",u=!1;for(let c=0;c<e.length;c++){const f=e[c];if(["(",")",","].includes(f)&&(n=!0),f==="("&&s++,f===")"&&s--,!!n){if(s===0){if(f===" "&&["event","function",""].includes(i))i="";else if(i+=f,f===")"){u=!0;break}continue}if(f===" "){e[c-1]!==","&&r!==","&&r!==",("&&(r="",n=!1);continue}i+=f,r+=f}}if(!u)throw new me("Unable to normalize signature.");return i}const uM=e=>{const n=typeof e=="string"?e:SN(e);return lM(n)};function m6(e){return vN(uM(e))}const cM=m6,Yo=e=>Ys(m6(e),0,4);function Qo(e){const{abi:n,args:r=[],name:s}=e,i=qr(s,{strict:!1}),u=n.filter(f=>i?f.type==="function"?Yo(f)===s:f.type==="event"?cM(f)===s:!1:"name"in f&&f.name===s);if(u.length===0)return;if(u.length===1)return u[0];let c;for(const f of u){if(!("inputs"in f))continue;if(!r||r.length===0){if(!f.inputs||f.inputs.length===0)return f;continue}if(!f.inputs||f.inputs.length===0||f.inputs.length!==r.length)continue;if(r.every((p,b)=>{const y="inputs"in f&&f.inputs[b];return y?K0(p,y):!1})){if(c&&"inputs"in c&&c.inputs){const p=p6(f.inputs,c.inputs,r);if(p)throw new zj({abiItem:f,type:p[0]},{abiItem:c,type:p[1]})}c=f}}return c||u[0]}function K0(e,n){const r=typeof e,s=n.type;switch(s){case"address":return Jn(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return s==="tuple"&&"components"in n?Object.values(n.components).every((i,u)=>K0(Object.values(e)[u],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(s)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(s)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(s)?Array.isArray(e)&&e.every(i=>K0(i,{...n,type:s.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function p6(e,n,r){for(const s in e){const i=e[s],u=n[s];if(i.type==="tuple"&&u.type==="tuple"&&"components"in i&&"components"in u)return p6(i.components,u.components,r[s]);const c=[i.type,u.type];if(c.includes("address")&&c.includes("bytes20")?!0:c.includes("address")&&c.includes("string")?Jn(r[s],{strict:!1}):c.includes("address")&&c.includes("bytes")?Jn(r[s],{strict:!1}):!1)return c}}const y0="/docs/contract/decodeFunctionResult";function hm(e){const{abi:n,args:r,functionName:s,data:i}=e;let u=n[0];if(s){const f=Qo({abi:n,args:r,name:s});if(!f)throw new $s(s,{docsPath:y0});u=f}if(u.type!=="function")throw new $s(void 0,{docsPath:y0});if(!u.outputs)throw new q5(u.name,{docsPath:y0});const c=dm(u.outputs,i);if(c&&c.length>1)return c;if(c&&c.length===1)return c[0]}const qv="/docs/contract/encodeFunctionData";function fM(e){const{abi:n,args:r,functionName:s}=e;let i=n[0];if(s){const u=Qo({abi:n,args:r,name:s});if(!u)throw new $s(s,{docsPath:qv});i=u}if(i.type!=="function")throw new $s(void 0,{docsPath:qv});return{abi:[i],functionName:Yo(nr(i))}}function mm(e){const{args:n}=e,{abi:r,functionName:s}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:fM(e),i=r[0],u=s,c="inputs"in i&&i.inputs?$o(i.inputs,n??[]):void 0;return jc([u,c??"0x"])}class Z0 extends me{constructor({blockNumber:n,chain:r,contract:s}){super(`Chain "${r.name}" does not support contract "${s.name}".`,{metaMessages:["This could be due to any of the following:",...n&&s.blockCreated&&s.blockCreated>n?[`- The contract "${s.name}" was not deployed until block ${s.blockCreated} (current block ${n}).`]:[`- The chain does not have the contract "${s.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class g6 extends me{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}function pm({blockNumber:e,chain:n,contract:r}){const s=n?.contracts?.[r];if(!s)throw new Z0({chain:n,contract:{name:r}});if(e&&s.blockCreated&&s.blockCreated>e)throw new Z0({blockNumber:e,chain:n,contract:{name:r,blockCreated:s.blockCreated}});return s.address}function Nc(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const dM={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},b6={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},hM={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function y6(e){const{abi:n,data:r}=e,s=Ys(r,0,4);if(s==="0x")throw new nm;const u=[...n||[],b6,hM].find(c=>c.type==="error"&&s===Yo(nr(c)));if(!u)throw new H5(s,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?dm(u.inputs,Ys(r,4)):void 0,errorName:u.name}}const Xn=(e,n,r)=>JSON.stringify(e,(s,i)=>typeof i=="bigint"?i.toString():i,r);function v6({abiItem:e,args:n,includeFunctionName:r=!0,includeName:s=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((i,u)=>`${s&&i.name?`${i.name}: `:""}${typeof n[u]=="object"?Xn(n[u]):n[u]}`).join(", ")})`}const mM={gwei:9,wei:18},pM={ether:-9,wei:9};function x6(e,n){let r=e.toString();const s=r.startsWith("-");s&&(r=r.slice(1)),r=r.padStart(n,"0");let[i,u]=[r.slice(0,r.length-n),r.slice(r.length-n)];return u=u.replace(/(0+)$/,""),`${s?"-":""}${i||"0"}${u?`.${u}`:""}`}function gM(e,n="wei"){return x6(e,mM[n])}function kr(e,n="wei"){return x6(e,pM[n])}class bM extends me{constructor({address:n}){super(`State for account "${n}" is set multiple times.`,{name:"AccountStateConflictError"})}}class yM extends me{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Gv(e){return e.reduce((n,{slot:r,value:s})=>`${n} ${r}: ${s}
|
|
32
|
+
`,"")}function vM(e){return e.reduce((n,{address:r,...s})=>{let i=`${n} ${r}:
|
|
33
|
+
`;return s.nonce&&(i+=` nonce: ${s.nonce}
|
|
34
|
+
`),s.balance&&(i+=` balance: ${s.balance}
|
|
35
|
+
`),s.code&&(i+=` code: ${s.code}
|
|
36
|
+
`),s.state&&(i+=` state:
|
|
37
|
+
`,i+=Gv(s.state)),s.stateDiff&&(i+=` stateDiff:
|
|
38
|
+
`,i+=Gv(s.stateDiff)),i},` State Override:
|
|
39
|
+
`).slice(0,-1)}function S6(e){const n=Object.entries(e).map(([s,i])=>i===void 0||i===!1?null:[s,i]).filter(Boolean),r=n.reduce((s,[i])=>Math.max(s,i.length),0);return n.map(([s,i])=>` ${`${s}:`.padEnd(r+1)} ${i}`).join(`
|
|
40
|
+
`)}class xM extends me{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
|
|
41
|
+
`),{name:"FeeConflictError"})}}const SM=e=>e,Xo=e=>e;class wM extends me{constructor(n,{account:r,docsPath:s,chain:i,data:u,gas:c,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:b,to:y,value:v,stateOverride:w}){const E=r?Nc(r):void 0;let C=S6({from:E?.address,to:y,value:typeof v<"u"&&`${gM(v)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:u,gas:c,gasPrice:typeof f<"u"&&`${kr(f)} gwei`,maxFeePerGas:typeof h<"u"&&`${kr(h)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${kr(p)} gwei`,nonce:b});w&&(C+=`
|
|
42
|
+
${vM(w)}`),super(n.shortMessage,{cause:n,docsPath:s,metaMessages:[...n.metaMessages?[...n.metaMessages," "]:[],"Raw Call Arguments:",C].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=n}}class CM extends me{constructor(n,{abi:r,args:s,contractAddress:i,docsPath:u,functionName:c,sender:f}){const h=Qo({abi:r,args:s,name:c}),p=h?v6({abiItem:h,args:s,includeFunctionName:!1,includeName:!1}):void 0,b=h?nr(h,{includeName:!0}):void 0,y=S6({address:i&&SM(i),function:b,args:p&&p!=="()"&&`${[...Array(c?.length??0).keys()].map(()=>" ").join("")}${p}`,sender:f});super(n.shortMessage||`An unknown error occurred while executing the contract function "${c}".`,{cause:n,docsPath:u,metaMessages:[...n.metaMessages?[...n.metaMessages," "]:[],y&&"Contract Call:",y].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=s,this.cause=n,this.contractAddress=i,this.functionName=c,this.sender=f}}class J0 extends me{constructor({abi:n,data:r,functionName:s,message:i}){let u,c,f,h;if(r&&r!=="0x")try{c=y6({abi:n,data:r});const{abiItem:b,errorName:y,args:v}=c;if(y==="Error")h=v[0];else if(y==="Panic"){const[w]=v;h=dM[w]}else{const w=b?nr(b,{includeName:!0}):void 0,E=b&&v?v6({abiItem:b,args:v,includeFunctionName:!1,includeName:!1}):void 0;f=[w?`Error: ${w}`:"",E&&E!=="()"?` ${[...Array(y?.length??0).keys()].map(()=>" ").join("")}${E}`:""]}}catch(b){u=b}else i&&(h=i);let p;u instanceof H5&&(p=u.signature,f=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(h&&h!=="execution reverted"||p?[`The contract function "${s}" reverted with the following ${p?"signature":"reason"}:`,h||p].join(`
|
|
43
|
+
`):`The contract function "${s}" reverted.`,{cause:u,metaMessages:f,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=c,this.raw=r,this.reason=h,this.signature=p}}class EM extends me{constructor({functionName:n}){super(`The contract function "${n}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${n}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class OM extends me{constructor({factory:n}){super(`Deployment for counterfactual contract call failed${n?` for factory "${n}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class w6 extends me{constructor({data:n,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n}}function C6(e){if(!(e instanceof me))return!1;const n=e.walk(r=>r instanceof J0);return n instanceof J0?n.data?.errorName==="HttpError"||n.data?.errorName==="ResolverError"||n.data?.errorName==="ResolverNotContract"||n.data?.errorName==="ResolverNotFound"||n.data?.errorName==="ReverseAddressMismatch"||n.data?.errorName==="UnsupportedResolverProfile":!1}function AM(e){const{abi:n,data:r}=e,s=Ys(r,0,4),i=n.find(u=>u.type==="function"&&s===Yo(nr(u)));if(!i)throw new Rj(s,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:i.name,args:"inputs"in i&&i.inputs&&i.inputs.length>0?dm(i.inputs,Ys(r,4)):void 0}}const v0="/docs/contract/encodeErrorResult";function $v(e){const{abi:n,errorName:r,args:s}=e;let i=n[0];if(r){const h=Qo({abi:n,args:s,name:r});if(!h)throw new _v(r,{docsPath:v0});i=h}if(i.type!=="error")throw new _v(void 0,{docsPath:v0});const u=nr(i),c=Yo(u);let f="0x";if(s&&s.length>0){if(!i.inputs)throw new Dj(i.name,{docsPath:v0});f=$o(i.inputs,s)}return jc([c,f])}const x0="/docs/contract/encodeFunctionResult";function jM(e){const{abi:n,functionName:r,result:s}=e;let i=n[0];if(r){const c=Qo({abi:n,name:r});if(!c)throw new $s(r,{docsPath:x0});i=c}if(i.type!=="function")throw new $s(void 0,{docsPath:x0});if(!i.outputs)throw new q5(i.name,{docsPath:x0});const u=(()=>{if(i.outputs.length===0)return[];if(i.outputs.length===1)return[s];if(Array.isArray(s))return s;throw new G5(s)})();return $o(i.outputs,u)}const Mc="x-batch-gateway:true";async function E6(e){const{data:n,ccipRequest:r}=e,{args:[s]}=AM({abi:q0,data:n}),i=[],u=[];return await Promise.all(s.map(async(c,f)=>{try{u[f]=c.urls.includes(Mc)?await E6({data:c.data,ccipRequest:r}):await r(c),i[f]=!1}catch(h){i[f]=!0,u[f]=NM(h)}})),jM({abi:q0,functionName:"query",result:[i,u]})}function NM(e){return e.name==="HttpRequestError"&&e.status?$v({abi:q0,errorName:"HttpError",args:[e.status,e.shortMessage]}):$v({abi:[b6],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function O6(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const n=`0x${e.slice(1,65)}`;return qr(n)?n:null}function MM(e){let n=new Uint8Array(32).fill(0);if(!e)return Nn(n);const r=e.split(".");for(let s=r.length-1;s>=0;s-=1){const i=O6(r[s]),u=i?sm(i):ho(zr(r[s]),"bytes");n=ho(ar([n,u]),"bytes")}return Nn(n)}function TM(e){return`[${e.slice(2)}]`}function DM(e){const n=new Uint8Array(32).fill(0);return e?O6(e)||ho(zr(e)):Nn(n)}function RM(e){const n=e.replace(/^\.|\.$/gm,"");if(n.length===0)return new Uint8Array(1);const r=new Uint8Array(zr(n).byteLength+2);let s=0;const i=n.split(".");for(let u=0;u<i.length;u++){let c=zr(i[u]);c.byteLength>255&&(c=zr(TM(DM(i[u])))),r[s]=c.length,r.set(c,s+1),s+=c.length+1}return r.byteLength!==s+1?r.slice(0,s+1):r}function Tc(e,n,r){const s=e[n.name];if(typeof s=="function")return s;const i=e[r];return typeof i=="function"?i:u=>n(e,u)}class Lr extends me{constructor({body:n,cause:r,details:s,headers:i,status:u,url:c}){super("HTTP request failed.",{cause:r,details:s,metaMessages:[u&&`Status: ${u}`,`URL: ${Xo(c)}`,n&&`Request body: ${Xn(n)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=n,this.headers=i,this.status=u,this.url=c}}class gm extends me{constructor({body:n,error:r,url:s}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${Xo(s)}`,`Request body: ${Xn(n)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data}}class Yv extends me{constructor({body:n,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Xo(r)}`,`Request body: ${Xn(n)}`],name:"TimeoutError"})}}const zM=-1;class an extends me{constructor(n,{code:r,docsPath:s,metaMessages:i,name:u,shortMessage:c}){super(c,{cause:n,docsPath:s,metaMessages:i||n?.metaMessages,name:u||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=u||n.name,this.code=n instanceof gm?n.code:r??zM}}class gn extends an{constructor(n,r){super(n,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class po extends an{constructor(n){super(n,{code:po.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(po,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class go extends an{constructor(n){super(n,{code:go.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(go,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class bo extends an{constructor(n,{method:r}={}){super(n,{code:bo.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class yo extends an{constructor(n){super(n,{code:yo.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
44
|
+
`)})}}Object.defineProperty(yo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Br extends an{constructor(n){super(n,{code:Br.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Br,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class vo extends an{constructor(n){super(n,{code:vo.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
45
|
+
`)})}}Object.defineProperty(vo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class xo extends an{constructor(n){super(n,{code:xo.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(xo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class er extends an{constructor(n){super(n,{code:er.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(er,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class So extends an{constructor(n){super(n,{code:So.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(So,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Dr extends an{constructor(n,{method:r}={}){super(n,{code:Dr.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Dr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Qs extends an{constructor(n){super(n,{code:Qs.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Qs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class wo extends an{constructor(n){super(n,{code:wo.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(wo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ft extends gn{constructor(n){super(n,{code:Ft.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ft,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Co extends gn{constructor(n){super(n,{code:Co.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Co,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Eo extends gn{constructor(n,{method:r}={}){super(n,{code:Eo.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(Eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Oo extends gn{constructor(n){super(n,{code:Oo.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Oo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Ao extends gn{constructor(n){super(n,{code:Ao.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Fr extends gn{constructor(n){super(n,{code:Fr.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Fr,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class jo extends gn{constructor(n){super(n,{code:jo.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(jo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class No extends gn{constructor(n){super(n,{code:No.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(No,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class Mo extends gn{constructor(n){super(n,{code:Mo.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(Mo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class To extends gn{constructor(n){super(n,{code:To.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(To,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Do extends gn{constructor(n){super(n,{code:Do.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Do,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Ro extends gn{constructor(n){super(n,{code:Ro.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class zo extends gn{constructor(n){super(n,{code:zo.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(zo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class kM extends an{constructor(n){super(n,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const LM=3;function UM(e,{abi:n,address:r,args:s,docsPath:i,functionName:u,sender:c}){const f=e instanceof w6?e:e instanceof me?e.walk(E=>"data"in E)||e.walk():{},{code:h,data:p,details:b,message:y,shortMessage:v}=f,w=e instanceof nm?new EM({functionName:u}):[LM,Br.code].includes(h)&&(p||b||y||v)?new J0({abi:n,data:typeof p=="object"?p.data:p,functionName:u,message:f instanceof gm?b:v??y}):e;return new CM(w,{abi:n,args:s,contractAddress:r,docsPath:i,functionName:u,sender:c})}const IM="0.1.1";function _M(){return IM}let A6=class W0 extends Error{constructor(n,r={}){const s=(()=>{if(r.cause instanceof W0){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),i=r.cause instanceof W0&&r.cause.docsPath||r.docsPath,c=`https://oxlib.sh${i??""}`,f=[n||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...s||i?["",s?`Details: ${s}`:void 0,i?`See: ${c}`:void 0]:[]].filter(h=>typeof h=="string").join(`
|
|
46
|
+
`);super(f,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${_M()}`}),this.cause=r.cause,this.details=s,this.docs=c,this.docsPath=i,this.shortMessage=n}walk(n){return j6(this,n)}};function j6(e,n){return n?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?j6(e.cause,n):n?null:e}function PM(e,n={}){const{dir:r,size:s=32}=n;if(s===0)return e;const i=e.replace("0x","");if(i.length>s*2)throw new FM({size:Math.ceil(i.length/2),targetSize:s,type:"Hex"});return`0x${i[r==="right"?"padEnd":"padStart"](s*2,"0")}`}function wa(e,n={}){const{signed:r,size:s}=n,i=BigInt(e);let u;s?r?u=(1n<<BigInt(s)*8n-1n)-1n:u=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(u=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof u=="bigint"&&r?-u-1n:0;if(u&&i>u||i<c){const p=typeof e=="bigint"?"n":"";throw new BM({max:u?`${u}${p}`:void 0,min:`${c}${p}`,signed:r,size:s,value:`${e}${p}`})}const h=`0x${(r&&i<0?(1n<<BigInt(s*8))+BigInt(i):i).toString(16)}`;return s?VM(h,s):h}function VM(e,n){return PM(e,{dir:"left",size:n})}class BM extends A6{constructor({max:n,min:r,signed:s,size:i,value:u}){super(`Number \`${u}\` is not in safe${i?` ${i*8}-bit`:""}${s?" signed":" unsigned"} integer range ${n?`(\`${r}\` to \`${n}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class FM extends A6{constructor({size:n,targetSize:r,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (\`${n}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function HM(e){return{address:e.address,amount:wa(e.amount),index:wa(e.index),validatorIndex:wa(e.validatorIndex)}}function qM(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:wa(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:wa(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:wa(e.gasLimit)},...typeof e.number=="bigint"&&{number:wa(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:wa(e.prevRandao)},...typeof e.time=="bigint"&&{time:wa(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(HM)}}}const GM="0x82ad56cb",$M="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",YM="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",QM="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",S0="/docs/contract/encodeDeployData";function N6(e){const{abi:n,args:r,bytecode:s}=e;if(!r||r.length===0)return s;const i=n.find(c=>"type"in c&&c.type==="constructor");if(!i)throw new Aj({docsPath:S0});if(!("inputs"in i))throw new Iv({docsPath:S0});if(!i.inputs||i.inputs.length===0)throw new Iv({docsPath:S0});const u=$o(i.inputs,r);return jc([s,u])}class Ps extends me{constructor({cause:n,message:r}={}){const s=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:n,name:"ExecutionRevertedError"})}}Object.defineProperty(Ps,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Ps,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class rc extends me{constructor({cause:n,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${kr(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:n,name:"FeeCapTooHighError"})}}Object.defineProperty(rc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class eh extends me{constructor({cause:n,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${kr(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:n,name:"FeeCapTooLowError"})}}Object.defineProperty(eh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class th extends me{constructor({cause:n,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:n,name:"NonceTooHighError"})}}Object.defineProperty(th,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class nh extends me{constructor({cause:n,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
47
|
+
`),{cause:n,name:"NonceTooLowError"})}}Object.defineProperty(nh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class ah extends me{constructor({cause:n,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:n,name:"NonceMaxValueError"})}}Object.defineProperty(ah,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class rh extends me{constructor({cause:n}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
48
|
+
`),{cause:n,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(rh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class sh extends me{constructor({cause:n,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:n,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(sh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class ih extends me{constructor({cause:n,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:n,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(ih,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class oh extends me{constructor({cause:n}){super("The transaction type is not supported for this chain.",{cause:n,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(oh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class sc extends me{constructor({cause:n,maxPriorityFeePerGas:r,maxFeePerGas:s}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${kr(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s?` = ${kr(s)} gwei`:""}).`].join(`
|
|
49
|
+
`),{cause:n,name:"TipAboveFeeCapError"})}}Object.defineProperty(sc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class M6 extends me{constructor({cause:n}){super(`An error occurred while executing: ${n?.shortMessage}`,{cause:n,name:"UnknownNodeError"})}}function XM(e,n){const r=(e.details||"").toLowerCase(),s=e instanceof me?e.walk(i=>i?.code===Ps.code):e;return s instanceof me?new Ps({cause:e,message:s.details}):Ps.nodeMessage.test(r)?new Ps({cause:e,message:e.details}):rc.nodeMessage.test(r)?new rc({cause:e,maxFeePerGas:n?.maxFeePerGas}):eh.nodeMessage.test(r)?new eh({cause:e,maxFeePerGas:n?.maxFeePerGas}):th.nodeMessage.test(r)?new th({cause:e,nonce:n?.nonce}):nh.nodeMessage.test(r)?new nh({cause:e,nonce:n?.nonce}):ah.nodeMessage.test(r)?new ah({cause:e,nonce:n?.nonce}):rh.nodeMessage.test(r)?new rh({cause:e}):sh.nodeMessage.test(r)?new sh({cause:e,gas:n?.gas}):ih.nodeMessage.test(r)?new ih({cause:e,gas:n?.gas}):oh.nodeMessage.test(r)?new oh({cause:e}):sc.nodeMessage.test(r)?new sc({cause:e,maxFeePerGas:n?.maxFeePerGas,maxPriorityFeePerGas:n?.maxPriorityFeePerGas}):new M6({cause:e})}function KM(e,{docsPath:n,...r}){const s=(()=>{const i=XM(e,r);return i instanceof M6?e:i})();return new wM(s,{docsPath:n,...r})}function ZM(e,{format:n}){if(!n)return{};const r={};function s(u){const c=Object.keys(u);for(const f of c)f in e&&(r[f]=e[f]),u[f]&&typeof u[f]=="object"&&!Array.isArray(u[f])&&s(u[f])}const i=n(e||{});return s(i),r}const JM={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function WM(e,n){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=eT(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(s=>Nn(s)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=nt(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=nt(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=nt(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=nt(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=nt(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=nt(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=JM[e.type]),typeof e.value<"u"&&(r.value=nt(e.value)),r}function eT(e){return e.map(n=>({address:n.address,r:n.r?nt(BigInt(n.r)):n.r,s:n.s?nt(BigInt(n.s)):n.s,chainId:nt(n.chainId),nonce:nt(n.nonce),...typeof n.yParity<"u"?{yParity:nt(n.yParity)}:{},...typeof n.v<"u"&&typeof n.yParity>"u"?{v:nt(n.v)}:{}}))}function tT(){let e=()=>{},n=()=>{};return{promise:new Promise((s,i)=>{e=s,n=i}),resolve:e,reject:n}}const w0=new Map;function T6({fn:e,id:n,shouldSplitBatch:r,wait:s=0,sort:i}){const u=async()=>{const b=h();c();const y=b.map(({args:v})=>v);y.length!==0&&e(y).then(v=>{i&&Array.isArray(v)&&v.sort(i);for(let w=0;w<b.length;w++){const{resolve:E}=b[w];E?.([v[w],v])}}).catch(v=>{for(let w=0;w<b.length;w++){const{reject:E}=b[w];E?.(v)}})},c=()=>w0.delete(n),f=()=>h().map(({args:b})=>b),h=()=>w0.get(n)||[],p=b=>w0.set(n,[...h(),b]);return{flush:c,async schedule(b){const{promise:y,resolve:v,reject:w}=tT();return r?.([...f(),b])&&u(),h().length>0?(p({args:b,resolve:v,reject:w}),y):(p({args:b,resolve:v,reject:w}),setTimeout(u,s),y)}}}function Qv(e){if(!(!e||e.length===0))return e.reduce((n,{slot:r,value:s})=>{if(r.length!==66)throw new Pv({size:r.length,targetSize:66,type:"hex"});if(s.length!==66)throw new Pv({size:s.length,targetSize:66,type:"hex"});return n[r]=s,n},{})}function nT(e){const{balance:n,nonce:r,state:s,stateDiff:i,code:u}=e,c={};if(u!==void 0&&(c.code=u),n!==void 0&&(c.balance=nt(n)),r!==void 0&&(c.nonce=nt(r)),s!==void 0&&(c.state=Qv(s)),i!==void 0){if(c.state)throw new yM;c.stateDiff=Qv(i)}return c}function aT(e){if(!e)return;const n={};for(const{address:r,...s}of e){if(!Jn(r,{strict:!1}))throw new Pr({address:r});if(n[r])throw new bM({address:r});n[r]=nT(s)}return n}const rT=2n**256n-1n;function sT(e){const{account:n,gasPrice:r,maxFeePerGas:s,maxPriorityFeePerGas:i,to:u}=e,c=n?Nc(n):void 0;if(c&&!Jn(c.address))throw new Pr({address:c.address});if(u&&!Jn(u))throw new Pr({address:u});if(typeof r<"u"&&(typeof s<"u"||typeof i<"u"))throw new xM;if(s&&s>rT)throw new rc({maxFeePerGas:s});if(i&&s&&i>s)throw new sc({maxFeePerGas:s,maxPriorityFeePerGas:i})}async function D6(e,n){const{account:r=e.account,authorizationList:s,batch:i=!!e.batch?.multicall,blockNumber:u,blockTag:c=e.experimental_blockTag??"latest",accessList:f,blobs:h,blockOverrides:p,code:b,data:y,factory:v,factoryData:w,gas:E,gasPrice:C,maxFeePerBlobGas:O,maxFeePerGas:M,maxPriorityFeePerGas:j,nonce:T,to:U,value:N,stateOverride:R,...D}=n,I=r?Nc(r):void 0;if(b&&(v||w))throw new me("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(b&&U)throw new me("Cannot provide both `code` & `to` as parameters.");const B=b&&y,Z=v&&w&&U&&y,re=B||Z,J=B?R6({code:b,data:y}):Z?lT({data:y,factory:v,factoryData:w,to:U}):y;try{sT(n);const oe=(typeof u=="bigint"?nt(u):void 0)||c,le=p?qM(p):void 0,_=aT(R),K=e.chain?.formatters?.transactionRequest?.format,be=(K||WM)({...ZM(D,{format:K}),accessList:f,account:I,authorizationList:s,blobs:h,data:J,gas:E,gasPrice:C,maxFeePerBlobGas:O,maxFeePerGas:M,maxPriorityFeePerGas:j,nonce:T,to:re?void 0:U,value:N},"call");if(i&&iT({request:be})&&!_&&!le)try{return await oT(e,{...be,blockNumber:u,blockTag:c})}catch(V){if(!(V instanceof g6)&&!(V instanceof Z0))throw V}const we=(()=>{const V=[be,oe];return _&&le?[...V,_,le]:_?[...V,_]:le?[...V,{},le]:V})(),De=await e.request({method:"eth_call",params:we});return De==="0x"?{data:void 0}:{data:De}}catch(Y){const oe=uT(Y),{offchainLookup:le,offchainLookupSignature:_}=await _C(async()=>{const{offchainLookup:K,offchainLookupSignature:ie}=await Promise.resolve().then(()=>LT);return{offchainLookup:K,offchainLookupSignature:ie}},void 0);if(e.ccipRead!==!1&&oe?.slice(0,10)===_&&U)return{data:await le(e,{data:oe,to:U})};throw re&&oe?.slice(0,10)==="0x101bb98d"?new OM({factory:v}):KM(Y,{...n,account:I,chain:e.chain})}}function iT({request:e}){const{data:n,to:r,...s}=e;return!(!n||n.startsWith(GM)||!r||Object.values(s).filter(i=>typeof i<"u").length>0)}async function oT(e,n){const{batchSize:r=1024,deployless:s=!1,wait:i=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:u,blockTag:c=e.experimental_blockTag??"latest",data:f,to:h}=n,p=(()=>{if(s)return null;if(n.multicallAddress)return n.multicallAddress;if(e.chain)return pm({blockNumber:u,chain:e.chain,contract:"multicall3"});throw new g6})(),y=(typeof u=="bigint"?nt(u):void 0)||c,{schedule:v}=T6({id:`${e.uid}.${y}`,wait:i,shouldSplitBatch(C){return C.reduce((M,{data:j})=>M+(j.length-2),0)>r*2},fn:async C=>{const O=C.map(T=>({allowFailure:!0,callData:T.data,target:T.to})),M=mm({abi:Lv,args:[O],functionName:"aggregate3"}),j=await e.request({method:"eth_call",params:[{...p===null?{data:R6({code:QM,data:M})}:{to:p,data:M}},y]});return hm({abi:Lv,args:[O],functionName:"aggregate3",data:j||"0x"})}}),[{returnData:w,success:E}]=await v({data:f,to:h});if(!E)throw new w6({data:w});return w==="0x"?{data:void 0}:{data:w}}function R6(e){const{code:n,data:r}=e;return N6({abi:h6(["constructor(bytes, bytes)"]),bytecode:$M,args:[n,r]})}function lT(e){const{data:n,factory:r,factoryData:s,to:i}=e;return N6({abi:h6(["constructor(address, bytes, address, bytes)"]),bytecode:YM,args:[i,n,r,s]})}function uT(e){if(!(e instanceof me))return;const n=e.walk();return typeof n?.data=="object"?n.data?.data:n.data}async function ic(e,n){const{abi:r,address:s,args:i,functionName:u,...c}=n,f=mm({abi:r,args:i,functionName:u});try{const{data:h}=await Tc(e,D6,"call")({...c,data:f,to:s});return hm({abi:r,args:i,functionName:u,data:h||"0x"})}catch(h){throw UM(h,{abi:r,address:s,args:i,docsPath:"/docs/contract/readContract",functionName:u})}}class cT extends me{constructor({data:n}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(n)}`],name:"EnsAvatarInvalidMetadataError"})}}class eo extends me{constructor({reason:n}){super(`ENS NFT avatar URI is invalid. ${n}`,{name:"EnsAvatarInvalidNftUriError"})}}class bm extends me{constructor({uri:n}){super(`Unable to resolve ENS avatar URI "${n}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class fT extends me{constructor({namespace:n}){super(`ENS NFT avatar namespace "${n}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const dT=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,hT=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,mT=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,pT=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function gT(e){try{const n=await fetch(e,{method:"HEAD"});return n.status===200?n.headers.get("content-type")?.startsWith("image/"):!1}catch(n){return typeof n=="object"&&typeof n.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(r=>{const s=new Image;s.onload=()=>{r(!0)},s.onerror=()=>{r(!1)},s.src=e})}}function Xv(e,n){return e?e.endsWith("/")?e.slice(0,-1):e:n}function z6({uri:e,gatewayUrls:n}){const r=mT.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const s=Xv(n?.ipfs,"https://ipfs.io"),i=Xv(n?.arweave,"https://arweave.net"),u=e.match(dT),{protocol:c,subpath:f,target:h,subtarget:p=""}=u?.groups||{},b=c==="ipns:/"||f==="ipns/",y=c==="ipfs:/"||f==="ipfs/"||hT.test(e);if(e.startsWith("http")&&!b&&!y){let w=e;return n?.arweave&&(w=e.replace(/https:\/\/arweave.net/g,n?.arweave)),{uri:w,isOnChain:!1,isEncoded:!1}}if((b||y)&&h)return{uri:`${s}/${b?"ipns":"ipfs"}/${h}${p}`,isOnChain:!1,isEncoded:!1};if(c==="ar:/"&&h)return{uri:`${i}/${h}${p||""}`,isOnChain:!1,isEncoded:!1};let v=e.replace(pT,"");if(v.startsWith("<svg")&&(v=`data:image/svg+xml;base64,${btoa(v)}`),v.startsWith("data:")||v.startsWith("{"))return{uri:v,isOnChain:!0,isEncoded:!1};throw new bm({uri:e})}function k6(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new cT({data:e});return e.image||e.image_url||e.image_data}async function bT({gatewayUrls:e,uri:n}){try{const r=await fetch(n).then(i=>i.json());return await ym({gatewayUrls:e,uri:k6(r)})}catch{throw new bm({uri:n})}}async function ym({gatewayUrls:e,uri:n}){const{uri:r,isOnChain:s}=z6({uri:n,gatewayUrls:e});if(s||await gT(r))return r;throw new bm({uri:n})}function yT(e){let n=e;n.startsWith("did:nft:")&&(n=n.replace("did:nft:","").replace(/_/g,"/"));const[r,s,i]=n.split("/"),[u,c]=r.split(":"),[f,h]=s.split(":");if(!u||u.toLowerCase()!=="eip155")throw new eo({reason:"Only EIP-155 supported"});if(!c)throw new eo({reason:"Chain ID not found"});if(!h)throw new eo({reason:"Contract address not found"});if(!i)throw new eo({reason:"Token ID not found"});if(!f)throw new eo({reason:"ERC namespace not found"});return{chainID:Number.parseInt(c,10),namespace:f.toLowerCase(),contractAddress:h,tokenID:i}}async function vT(e,{nft:n}){if(n.namespace==="erc721")return ic(e,{address:n.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(n.tokenID)]});if(n.namespace==="erc1155")return ic(e,{address:n.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(n.tokenID)]});throw new fT({namespace:n.namespace})}async function xT(e,{gatewayUrls:n,record:r}){return/eip155:/i.test(r)?ST(e,{gatewayUrls:n,record:r}):ym({uri:r,gatewayUrls:n})}async function ST(e,{gatewayUrls:n,record:r}){const s=yT(r),i=await vT(e,{nft:s}),{uri:u,isOnChain:c,isEncoded:f}=z6({uri:i,gatewayUrls:n});if(c&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const p=f?atob(u.replace("data:application/json;base64,","")):u,b=JSON.parse(p);return ym({uri:k6(b),gatewayUrls:n})}let h=s.tokenID;return s.namespace==="erc1155"&&(h=h.replace("0x","").padStart(64,"0")),bT({gatewayUrls:n,uri:u.replace(/(?:0x)?{id}/,h)})}async function wT(e,n){const{blockNumber:r,blockTag:s,key:i,name:u,gatewayUrls:c,strict:f}=n,{chain:h}=e,p=(()=>{if(n.universalResolverAddress)return n.universalResolverAddress;if(!h)throw new Error("client chain not configured. universalResolverAddress is required.");return pm({blockNumber:r,chain:h,contract:"ensUniversalResolver"})})(),b=h?.ensTlds;if(b&&!b.some(y=>u.endsWith(y)))return null;try{const y={address:p,abi:Cj,args:[K5(RM(u)),mm({abi:Uv,functionName:"text",args:[MM(u),i]}),c??[Mc]],functionName:"resolveWithGateways",blockNumber:r,blockTag:s},w=await Tc(e,ic,"readContract")(y);if(w[0]==="0x")return null;const E=hm({abi:Uv,functionName:"text",data:w[0]});return E===""?null:E}catch(y){if(f)throw y;if(C6(y))return null;throw y}}async function CT(e,{blockNumber:n,blockTag:r,assetGatewayUrls:s,name:i,gatewayUrls:u,strict:c,universalResolverAddress:f}){const h=await Tc(e,wT,"getEnsText")({blockNumber:n,blockTag:r,key:"avatar",name:i,universalResolverAddress:f,gatewayUrls:u,strict:c});if(!h)return null;try{return await xT(e,{record:h,gatewayUrls:s})}catch{return null}}async function ET(e,n){const{address:r,blockNumber:s,blockTag:i,coinType:u=60n,gatewayUrls:c,strict:f}=n,{chain:h}=e,p=(()=>{if(n.universalResolverAddress)return n.universalResolverAddress;if(!h)throw new Error("client chain not configured. universalResolverAddress is required.");return pm({blockNumber:s,chain:h,contract:"ensUniversalResolver"})})();try{const b={address:p,abi:Ej,args:[r,u,c??[Mc]],functionName:"reverseWithGateways",blockNumber:s,blockTag:i},y=Tc(e,ic,"readContract"),[v]=await y(b);return v||null}catch(b){if(f)throw b;if(C6(b))return null;throw b}}function OT(e,n){if(!Jn(e,{strict:!1}))throw new Pr({address:e});if(!Jn(n,{strict:!1}))throw new Pr({address:n});return e.toLowerCase()===n.toLowerCase()}const Eu=new om(8192);function AT(e,{enabled:n=!0,id:r}){if(!n||!r)return e();if(Eu.get(r))return Eu.get(r);const s=e().finally(()=>Eu.delete(r));return Eu.set(r,s),s}async function jT(e){return new Promise(n=>setTimeout(n,e))}function L6(e,{delay:n=100,retryCount:r=2,shouldRetry:s=()=>!0}={}){return new Promise((i,u)=>{const c=async({count:f=0}={})=>{const h=async({error:p})=>{const b=typeof n=="function"?n({count:f,error:p}):n;b&&await jT(b),c({count:f+1})};try{const p=await e();i(p)}catch(p){if(f<r&&await s({count:f,error:p}))return h({error:p});u(p)}};c()})}function NT(e,n={}){return async(r,s={})=>{const{dedupe:i=!1,methods:u,retryDelay:c=150,retryCount:f=3,uid:h}={...n,...s},{method:p}=r;if(u?.exclude?.includes(p))throw new Dr(new Error("method not supported"),{method:p});if(u?.include&&!u.include.includes(p))throw new Dr(new Error("method not supported"),{method:p});const b=i?rm(`${h}.${Xn(r)}`):void 0;return AT(()=>L6(async()=>{try{return await e(r)}catch(y){const v=y;switch(v.code){case po.code:throw new po(v);case go.code:throw new go(v);case bo.code:throw new bo(v,{method:r.method});case yo.code:throw new yo(v);case Br.code:throw new Br(v);case vo.code:throw new vo(v);case xo.code:throw new xo(v);case er.code:throw new er(v);case So.code:throw new So(v);case Dr.code:throw new Dr(v,{method:r.method});case Qs.code:throw new Qs(v);case wo.code:throw new wo(v);case Ft.code:throw new Ft(v);case Co.code:throw new Co(v);case Eo.code:throw new Eo(v);case Oo.code:throw new Oo(v);case Ao.code:throw new Ao(v);case Fr.code:throw new Fr(v);case jo.code:throw new jo(v);case No.code:throw new No(v);case Mo.code:throw new Mo(v);case To.code:throw new To(v);case Do.code:throw new Do(v);case Ro.code:throw new Ro(v);case zo.code:throw new zo(v);case 5e3:throw new Ft(v);default:throw y instanceof me?y:new kM(v)}}},{delay:({count:y,error:v})=>{if(v&&v instanceof Lr){const w=v?.headers?.get("Retry-After");if(w?.match(/\d/))return Number.parseInt(w,10)*1e3}return~~(1<<y)*c},retryCount:f,shouldRetry:({error:y})=>MT(y)}),{enabled:i,id:b})}}function MT(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Qs.code||e.code===Br.code:e instanceof Lr&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}class TT extends me{constructor({callbackSelector:n,cause:r,data:s,extraData:i,sender:u,urls:c}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",c&&[" Gateway URL(s):",...c.map(f=>` ${Xo(f)}`)],` Sender: ${u}`,` Data: ${s}`,` Callback selector: ${n}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class DT extends me{constructor({result:n,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Xo(r)}`,`Response: ${Xn(n)}`],name:"OffchainLookupResponseMalformedError"})}}class RT extends me{constructor({sender:n,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${n}`],name:"OffchainLookupSenderMismatchError"})}}const zT="0x556f1830",U6={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function kT(e,{blockNumber:n,blockTag:r,data:s,to:i}){const{args:u}=y6({data:s,abi:[U6]}),[c,f,h,p,b]=u,{ccipRead:y}=e,v=y&&typeof y?.request=="function"?y.request:I6;try{if(!OT(i,c))throw new RT({sender:c,to:i});const w=f.includes(Mc)?await E6({data:h,ccipRequest:v}):await v({data:h,sender:c,urls:f}),{data:E}=await D6(e,{blockNumber:n,blockTag:r,data:ar([p,$o([{type:"bytes"},{type:"bytes"}],[w,b])]),to:i});return E}catch(w){throw new TT({callbackSelector:p,cause:w,data:s,extraData:b,sender:c,urls:f})}}async function I6({data:e,sender:n,urls:r}){let s=new Error("An unknown error occurred.");for(let i=0;i<r.length;i++){const u=r[i],c=u.includes("{data}")?"GET":"POST",f=c==="POST"?{data:e,sender:n}:void 0,h=c==="POST"?{"Content-Type":"application/json"}:{};try{const p=await fetch(u.replace("{sender}",n.toLowerCase()).replace("{data}",e),{body:JSON.stringify(f),headers:h,method:c});let b;if(p.headers.get("Content-Type")?.startsWith("application/json")?b=(await p.json()).data:b=await p.text(),!p.ok){s=new Lr({body:f,details:b?.error?Xn(b.error):p.statusText,headers:p.headers,status:p.status,url:u});continue}if(!qr(b)){s=new DT({result:b,url:u});continue}return b}catch(p){s=new Lr({body:f,details:p.message,url:u})}}throw s}const LT=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:I6,offchainLookup:kT,offchainLookupAbiItem:U6,offchainLookupSignature:zT},Symbol.toStringTag,{value:"Module"}));function UT(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function _6(e,{errorInstance:n=new Error("timed out"),timeout:r,signal:s}){return new Promise((i,u)=>{(async()=>{let c;try{const f=new AbortController;r>0&&(c=setTimeout(()=>{s?f.abort():u(n)},r)),i(await e({signal:f?.signal||null}))}catch(f){f?.name==="AbortError"&&u(n),u(f)}finally{clearTimeout(c)}})()})}function IT(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Kv=IT();function _T(e,n={}){return{async request(r){const{body:s,fetchFn:i=n.fetchFn??fetch,onRequest:u=n.onRequest,onResponse:c=n.onResponse,timeout:f=n.timeout??1e4}=r,h={...n.fetchOptions??{},...r.fetchOptions??{}},{headers:p,method:b,signal:y}=h;try{const v=await _6(async({signal:E})=>{const C={...h,body:Array.isArray(s)?Xn(s.map(T=>({jsonrpc:"2.0",id:T.id??Kv.take(),...T}))):Xn({jsonrpc:"2.0",id:s.id??Kv.take(),...s}),headers:{"Content-Type":"application/json",...p},method:b||"POST",signal:y||(f>0?E:null)},O=new Request(e,C),M=await u?.(O,C)??{...C,url:e};return await i(M.url??e,M)},{errorInstance:new Yv({body:s,url:e}),timeout:f,signal:!0});c&&await c(v);let w;if(v.headers.get("Content-Type")?.startsWith("application/json"))w=await v.json();else{w=await v.text();try{w=JSON.parse(w||"{}")}catch(E){if(v.ok)throw E;w={error:w}}}if(!v.ok)throw new Lr({body:s,details:Xn(w.error)||v.statusText,headers:v.headers,status:v.status,url:e});return w}catch(v){throw v instanceof Lr||v instanceof Yv?v:new Lr({body:s,cause:v,url:e})}}}}function P6(e,n,r){const s=e[n.name];if(typeof s=="function")return s;const i=e[r];return typeof i=="function"?i:u=>n(e,u)}const _u="2.22.1",PT=()=>`@wagmi/core@${_u}`;var V6=function(e,n,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?e!==n||!s:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(e):s?s.value:n.get(e)},oc,B6;let vm=class lh extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return PT()}constructor(n,r={}){super(),oc.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const s=r.cause instanceof lh?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof lh&&r.cause.docsPath||r.docsPath;this.message=[n||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...s?[`Details: ${s}`]:[],`Version: ${this.version}`].join(`
|
|
50
|
+
`),r.cause&&(this.cause=r.cause),this.details=s,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=n}walk(n){return V6(this,oc,"m",B6).call(this,this,n)}};oc=new WeakSet,B6=function e(n,r){return r?.(n)?n:n.cause?V6(this,oc,"m",e).call(this,n.cause,r):n};class uh extends vm{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}const ch=256;let Ou=ch,Au;function F6(e=11){if(!Au||Ou+e>ch*2){Au="",Ou=0;for(let n=0;n<ch;n++)Au+=(256+Math.random()*256|0).toString(16).substring(1)}return Au.substring(Ou,Ou+++e)}function VT(e){const{batch:n,chain:r,ccipRead:s,key:i="base",name:u="Base Client",type:c="base"}=e,f=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),h=r?.blockTime??12e3,p=Math.min(Math.max(Math.floor(h/2),500),4e3),b=e.pollingInterval??p,y=e.cacheTime??b,v=e.account?Nc(e.account):void 0,{config:w,request:E,value:C}=e.transport({chain:r,pollingInterval:b}),O={...w,...C},M={account:v,batch:n,cacheTime:y,ccipRead:s,chain:r,key:i,name:u,pollingInterval:b,request:E,transport:O,type:c,uid:F6(),...f?{experimental_blockTag:f}:{}};function j(T){return U=>{const N=U(T);for(const D in M)delete N[D];const R={...T,...N};return Object.assign(R,{extend:j(R)})}}return Object.assign(M,{extend:j(M)})}function BT({key:e,methods:n,name:r,request:s,retryCount:i=3,retryDelay:u=150,timeout:c,type:f},h){const p=F6();return{config:{key:e,methods:n,name:r,request:s,retryCount:i,retryDelay:u,timeout:c,type:f},request:NT(s,{methods:n,retryCount:i,retryDelay:u,uid:p}),value:h}}class FT extends me{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function HT(e,n={}){const{batch:r,fetchFn:s,fetchOptions:i,key:u="http",methods:c,name:f="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:p,retryDelay:b,raw:y}=n;return({chain:v,retryCount:w,timeout:E})=>{const{batchSize:C=1e3,wait:O=0}=typeof r=="object"?r:{},M=n.retryCount??w,j=E??n.timeout??1e4,T=v?.rpcUrls.default.http[0];if(!T)throw new FT;const U=_T(T,{fetchFn:s,fetchOptions:i,onRequest:h,onResponse:p,timeout:j});return BT({key:u,methods:c,name:f,async request({method:N,params:R}){const D={method:N,params:R},{schedule:I}=T6({id:T,wait:O,shouldSplitBatch(J){return J.length>C},fn:J=>U.request({body:J}),sort:(J,Y)=>J.id-Y.id}),B=async J=>r?I(J):[await U.request({body:J})],[{error:Z,result:re}]=await B(D);if(y)return{error:Z,result:re};if(Z)throw new gm({body:D,error:Z,url:T});return re},retryCount:M,retryDelay:b,timeout:j,type:"http"},{fetchOptions:i,url:T})}}function Zv(e){return e.state.chainId}function qT(e,n){const{chainId:r,...s}=n,i=e.getClient({chainId:r});return P6(i,CT,"getEnsAvatar")(s)}function GT(e,n){const{chainId:r,...s}=n,i=e.getClient({chainId:r});return P6(i,ET,"getEnsName")(s)}let C0=!1;async function $T(e,n={}){if(C0)return[];C0=!0,e.setState(p=>({...p,status:p.current?"reconnecting":"connecting"}));const r=[];if(n.connectors?.length)for(const p of n.connectors){let b;typeof p=="function"?b=e._internal.connectors.setup(p):b=p,r.push(b)}else r.push(...e.connectors);let s;try{s=await e.storage?.getItem("recentConnectorId")}catch{}const i={};for(const[,p]of e.state.connections)i[p.connector.id]=1;s&&(i[s]=0);const u=Object.keys(i).length>0?[...r].sort((p,b)=>(i[p.id]??10)-(i[b.id]??10)):r;let c=!1;const f=[],h=[];for(const p of u){const b=await p.getProvider().catch(()=>{});if(!b||h.some(w=>w===b)||!await p.isAuthorized())continue;const v=await p.connect({isReconnecting:!0}).catch(()=>null);v&&(p.emitter.off("connect",e._internal.events.connect),p.emitter.on("change",e._internal.events.change),p.emitter.on("disconnect",e._internal.events.disconnect),e.setState(w=>{const E=new Map(c?w.connections:new Map).set(p.uid,{accounts:v.accounts,chainId:v.chainId,connector:p});return{...w,current:c?w.current:p.uid,connections:E}}),f.push({accounts:v.accounts,chainId:v.chainId,connector:p}),h.push(b),c=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(c?e.setState(p=>({...p,status:"connected"})):e.setState(p=>({...p,connections:new Map,current:null,status:"disconnected"}))),C0=!1,f}class zs extends vm{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}function YT(e,n){const{onChange:r}=n;return e.subscribe(s=>s.chainId,r)}xm.type="injected";function xm(e={}){const{shimDisconnect:n=!0,unstable_shimAsyncInject:r}=e;function s(){const h=e.target;if(typeof h=="function"){const p=h();if(p)return p}return typeof h=="object"?h:typeof h=="string"?{...QT[h]??{id:h,name:`${h[0].toUpperCase()}${h.slice(1)}`,provider:`is${h[0].toUpperCase()}${h.slice(1)}`}}:{id:"injected",name:"Injected",provider(p){return p?.ethereum}}}let i,u,c,f;return h=>({get icon(){return s().icon},get id(){return s().id},get name(){return s().name},get supportsSimulation(){return!0},type:xm.type,async setup(){const p=await this.getProvider();p?.on&&e.target&&(c||(c=this.onConnect.bind(this),p.on("connect",c)),i||(i=this.onAccountsChanged.bind(this),p.on("accountsChanged",i)))},async connect({chainId:p,isReconnecting:b,withCapabilities:y}={}){const v=await this.getProvider();if(!v)throw new zs;let w=[];if(b)w=await this.getAccounts().catch(()=>[]);else if(n)try{w=(await v.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(C=>Cu(C)),w.length>0&&(w=await this.getAccounts())}catch(E){const C=E;if(C.code===Ft.code)throw new Ft(C);if(C.code===er.code)throw C}try{!w?.length&&!b&&(w=(await v.request({method:"eth_requestAccounts"})).map(O=>Cu(O))),c&&(v.removeListener("connect",c),c=void 0),i||(i=this.onAccountsChanged.bind(this),v.on("accountsChanged",i)),u||(u=this.onChainChanged.bind(this),v.on("chainChanged",u)),f||(f=this.onDisconnect.bind(this),v.on("disconnect",f));let E=await this.getChainId();return p&&E!==p&&(E=(await this.switchChain({chainId:p}).catch(O=>{if(O.code===Ft.code)throw O;return{id:E}}))?.id??E),n&&await h.storage?.removeItem(`${this.id}.disconnected`),e.target||await h.storage?.setItem("injected.connected",!0),{accounts:y?w.map(C=>({address:C,capabilities:{}})):w,chainId:E}}catch(E){const C=E;throw C.code===Ft.code?new Ft(C):C.code===er.code?new er(C):C}},async disconnect(){const p=await this.getProvider();if(!p)throw new zs;u&&(p.removeListener("chainChanged",u),u=void 0),f&&(p.removeListener("disconnect",f),f=void 0),c||(c=this.onConnect.bind(this),p.on("connect",c));try{await _6(()=>p.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}n&&await h.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await h.storage?.removeItem("injected.connected")},async getAccounts(){const p=await this.getProvider();if(!p)throw new zs;return(await p.request({method:"eth_accounts"})).map(y=>Cu(y))},async getChainId(){const p=await this.getProvider();if(!p)throw new zs;const b=await p.request({method:"eth_chainId"});return Number(b)},async getProvider(){if(typeof window>"u")return;let p;const b=s();return typeof b.provider=="function"?p=b.provider(window):typeof b.provider=="string"?p=Pu(window,b.provider):p=b.provider,p&&!p.removeListener&&("off"in p&&typeof p.off=="function"?p.removeListener=p.off:p.removeListener=()=>{}),p},async isAuthorized(){try{if(n&&await h.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await h.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){const v=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",v),!!await this.getProvider()),w=typeof r=="number"?r:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(C=>window.addEventListener("ethereum#initialized",()=>C(v()),{once:!0}))]:[],new Promise(C=>setTimeout(()=>C(v()),w))]))return!0}throw new zs}return!!(await L6(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:p,chainId:b}){const y=await this.getProvider();if(!y)throw new zs;const v=h.chains.find(E=>E.id===b);if(!v)throw new Fr(new uh);const w=new Promise(E=>{const C=(O=>{"chainId"in O&&O.chainId===b&&(h.emitter.off("change",C),E())});h.emitter.on("change",C)});try{return await Promise.all([y.request({method:"wallet_switchEthereumChain",params:[{chainId:nt(b)}]}).then(async()=>{await this.getChainId()===b&&h.emitter.emit("change",{chainId:b})}),w]),v}catch(E){const C=E;if(C.code===4902||C?.data?.originalError?.code===4902)try{const{default:O,...M}=v.blockExplorers??{};let j;p?.blockExplorerUrls?j=p.blockExplorerUrls:O&&(j=[O.url,...Object.values(M).map(N=>N.url)]);let T;p?.rpcUrls?.length?T=p.rpcUrls:T=[v.rpcUrls.default?.http[0]??""];const U={blockExplorerUrls:j,chainId:nt(b),chainName:p?.chainName??v.name,iconUrls:p?.iconUrls,nativeCurrency:p?.nativeCurrency??v.nativeCurrency,rpcUrls:T};return await Promise.all([y.request({method:"wallet_addEthereumChain",params:[U]}).then(async()=>{if(await this.getChainId()===b)h.emitter.emit("change",{chainId:b});else throw new Ft(new Error("User rejected switch after adding network."))}),w]),v}catch(O){throw new Ft(O)}throw C.code===Ft.code?new Ft(C):new Fr(C)}},async onAccountsChanged(p){if(p.length===0)this.onDisconnect();else if(h.emitter.listenerCount("connect")){const b=(await this.getChainId()).toString();this.onConnect({chainId:b}),n&&await h.storage?.removeItem(`${this.id}.disconnected`)}else h.emitter.emit("change",{accounts:p.map(b=>Cu(b))})},onChainChanged(p){const b=Number(p);h.emitter.emit("change",{chainId:b})},async onConnect(p){const b=await this.getAccounts();if(b.length===0)return;const y=Number(p.chainId);h.emitter.emit("connect",{accounts:b,chainId:y});const v=await this.getProvider();v&&(c&&(v.removeListener("connect",c),c=void 0),i||(i=this.onAccountsChanged.bind(this),v.on("accountsChanged",i)),u||(u=this.onChainChanged.bind(this),v.on("chainChanged",u)),f||(f=this.onDisconnect.bind(this),v.on("disconnect",f)))},async onDisconnect(p){const b=await this.getProvider();p&&p.code===1013&&b&&(await this.getAccounts()).length||(h.emitter.emit("disconnect"),b&&(u&&(b.removeListener("chainChanged",u),u=void 0),f&&(b.removeListener("disconnect",f),f=void 0),c||(c=this.onConnect.bind(this),b.on("connect",c))))}})}const QT={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e?.coinbaseWalletExtension?e.coinbaseWalletExtension:Pu(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return Pu(e,n=>{if(!n.isMetaMask||n.isBraveWallet&&!n._events&&!n._state)return!1;const r=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const s of r)if(n[s])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){return e?.phantom?.ethereum?e.phantom?.ethereum:Pu(e,"isPhantom")}}};function Pu(e,n){function r(i){return typeof n=="function"?n(i):typeof n=="string"?i[n]:!0}const s=e.ethereum;if(s?.providers)return s.providers.find(i=>r(i));if(s&&r(s))return s}function XT(e){if(typeof window>"u")return;const n=r=>e(r.detail);return window.addEventListener("eip6963:announceProvider",n),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",n)}function KT(){const e=new Set;let n=[];const r=()=>XT(i=>{n.some(({info:u})=>u.uuid===i.info.uuid)||(n=[...n,i],e.forEach(u=>u(n,{added:[i]})))});let s=r();return{_listeners(){return e},clear(){e.forEach(i=>i([],{removed:[...n]})),n=[]},destroy(){this.clear(),e.clear(),s?.()},findProvider({rdns:i}){return n.find(u=>u.info.rdns===i)},getProviders(){return n},reset(){this.clear(),s?.(),s=r()},subscribe(i,{emitImmediately:u}={}){return e.add(i),u&&i(n,{added:n}),()=>e.delete(i)}}}const ZT=e=>(n,r,s)=>{const i=s.subscribe;return s.subscribe=(c,f,h)=>{let p=c;if(f){const b=h?.equalityFn||Object.is;let y=c(s.getState());p=v=>{const w=c(v);if(!b(y,w)){const E=y;f(y=w,E)}},h?.fireImmediately&&f(y,y)}return i(p)},e(n,r,s)},JT=ZT;function WT(e,n){let r;try{r=e()}catch{return}return{getItem:i=>{var u;const c=h=>h===null?null:JSON.parse(h,void 0),f=(u=r.getItem(i))!=null?u:null;return f instanceof Promise?f.then(c):c(f)},setItem:(i,u)=>r.setItem(i,JSON.stringify(u,void 0)),removeItem:i=>r.removeItem(i)}}const fh=e=>n=>{try{const r=e(n);return r instanceof Promise?r:{then(s){return fh(s)(r)},catch(s){return this}}}catch(r){return{then(s){return this},catch(s){return fh(s)(r)}}}},eD=(e,n)=>(r,s,i)=>{let u={storage:WT(()=>localStorage),partialize:C=>C,version:0,merge:(C,O)=>({...O,...C}),...n},c=!1;const f=new Set,h=new Set;let p=u.storage;if(!p)return e((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),r(...C)},s,i);const b=()=>{const C=u.partialize({...s()});return p.setItem(u.name,{state:C,version:u.version})},y=i.setState;i.setState=(C,O)=>{y(C,O),b()};const v=e((...C)=>{r(...C),b()},s,i);i.getInitialState=()=>v;let w;const E=()=>{var C,O;if(!p)return;c=!1,f.forEach(j=>{var T;return j((T=s())!=null?T:v)});const M=((O=u.onRehydrateStorage)==null?void 0:O.call(u,(C=s())!=null?C:v))||void 0;return fh(p.getItem.bind(p))(u.name).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==u.version){if(u.migrate)return[!0,u.migrate(j.state,j.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,j.state];return[!1,void 0]}).then(j=>{var T;const[U,N]=j;if(w=u.merge(N,(T=s())!=null?T:v),r(w,!0),U)return b()}).then(()=>{M?.(w,void 0),w=s(),c=!0,h.forEach(j=>j(w))}).catch(j=>{M?.(void 0,j)})};return i.persist={setOptions:C=>{u={...u,...C},C.storage&&(p=C.storage)},clearStorage:()=>{p?.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>E(),hasHydrated:()=>c,onHydrate:C=>(f.add(C),()=>{f.delete(C)}),onFinishHydration:C=>(h.add(C),()=>{h.delete(C)})},u.skipHydration||E(),w||v},tD=eD,Jv=e=>{let n;const r=new Set,s=(p,b)=>{const y=typeof p=="function"?p(n):p;if(!Object.is(y,n)){const v=n;n=b??(typeof y!="object"||y===null)?y:Object.assign({},n,y),r.forEach(w=>w(n,v))}},i=()=>n,f={setState:s,getState:i,getInitialState:()=>h,subscribe:p=>(r.add(p),()=>r.delete(p))},h=n=e(s,i,f);return f},E0=e=>e?Jv(e):Jv;var O0={exports:{}},Wv;function nD(){return Wv||(Wv=1,(function(e){var n=Object.prototype.hasOwnProperty,r="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(r=!1));function i(h,p,b){this.fn=h,this.context=p,this.once=b||!1}function u(h,p,b,y,v){if(typeof b!="function")throw new TypeError("The listener must be a function");var w=new i(b,y||h,v),E=r?r+p:p;return h._events[E]?h._events[E].fn?h._events[E]=[h._events[E],w]:h._events[E].push(w):(h._events[E]=w,h._eventsCount++),h}function c(h,p){--h._eventsCount===0?h._events=new s:delete h._events[p]}function f(){this._events=new s,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],b,y;if(this._eventsCount===0)return p;for(y in b=this._events)n.call(b,y)&&p.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(b)):p},f.prototype.listeners=function(p){var b=r?r+p:p,y=this._events[b];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,w=y.length,E=new Array(w);v<w;v++)E[v]=y[v].fn;return E},f.prototype.listenerCount=function(p){var b=r?r+p:p,y=this._events[b];return y?y.fn?1:y.length:0},f.prototype.emit=function(p,b,y,v,w,E){var C=r?r+p:p;if(!this._events[C])return!1;var O=this._events[C],M=arguments.length,j,T;if(O.fn){switch(O.once&&this.removeListener(p,O.fn,void 0,!0),M){case 1:return O.fn.call(O.context),!0;case 2:return O.fn.call(O.context,b),!0;case 3:return O.fn.call(O.context,b,y),!0;case 4:return O.fn.call(O.context,b,y,v),!0;case 5:return O.fn.call(O.context,b,y,v,w),!0;case 6:return O.fn.call(O.context,b,y,v,w,E),!0}for(T=1,j=new Array(M-1);T<M;T++)j[T-1]=arguments[T];O.fn.apply(O.context,j)}else{var U=O.length,N;for(T=0;T<U;T++)switch(O[T].once&&this.removeListener(p,O[T].fn,void 0,!0),M){case 1:O[T].fn.call(O[T].context);break;case 2:O[T].fn.call(O[T].context,b);break;case 3:O[T].fn.call(O[T].context,b,y);break;case 4:O[T].fn.call(O[T].context,b,y,v);break;default:if(!j)for(N=1,j=new Array(M-1);N<M;N++)j[N-1]=arguments[N];O[T].fn.apply(O[T].context,j)}}return!0},f.prototype.on=function(p,b,y){return u(this,p,b,y,!1)},f.prototype.once=function(p,b,y){return u(this,p,b,y,!0)},f.prototype.removeListener=function(p,b,y,v){var w=r?r+p:p;if(!this._events[w])return this;if(!b)return c(this,w),this;var E=this._events[w];if(E.fn)E.fn===b&&(!v||E.once)&&(!y||E.context===y)&&c(this,w);else{for(var C=0,O=[],M=E.length;C<M;C++)(E[C].fn!==b||v&&!E[C].once||y&&E[C].context!==y)&&O.push(E[C]);O.length?this._events[w]=O.length===1?O[0]:O:c(this,w)}return this},f.prototype.removeAllListeners=function(p){var b;return p?(b=r?r+p:p,this._events[b]&&c(this,b)):(this._events=new s,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=r,f.EventEmitter=f,e.exports=f})(O0)),O0.exports}var aD=nD();const rD=_1(aD);class sD{constructor(n){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new rD})}on(n,r){this._emitter.on(n,r)}once(n,r){this._emitter.once(n,r)}off(n,r){this._emitter.off(n,r)}emit(n,...r){const s=r[0];this._emitter.emit(n,{uid:this.uid,...s})}listenerCount(n){return this._emitter.listenerCount(n)}}function iD(e){return new sD(e)}function oD(e,n){return JSON.parse(e,(r,s)=>{let i=s;return i?.__type==="bigint"&&(i=BigInt(i.value)),i?.__type==="Map"&&(i=new Map(i.value)),n?.(r,i)??i})}function e1(e,n){return e.slice(0,n).join(".")||"."}function t1(e,n){const{length:r}=e;for(let s=0;s<r;++s)if(e[s]===n)return s+1;return 0}function lD(e,n){const r=typeof e=="function",s=typeof n=="function",i=[],u=[];return function(f,h){if(typeof h=="object")if(i.length){const p=t1(i,this);p===0?i[i.length]=this:(i.splice(p),u.splice(p)),u[u.length]=f;const b=t1(i,h);if(b!==0)return s?n.call(this,f,h,e1(u,b)):`[ref=${e1(u,b)}]`}else i[0]=h,u[0]=f;return r?e.call(this,f,h):h}}function uD(e,n,r,s){return JSON.stringify(e,lD((i,u)=>{let c=u;return typeof c=="bigint"&&(c={__type:"bigint",value:u.toString()}),c instanceof Map&&(c={__type:"Map",value:Array.from(u.entries())}),n?.(i,c)??c},s),r??void 0)}function cD(e){const{deserialize:n=oD,key:r="wagmi",serialize:s=uD,storage:i=H6}=e;function u(c){return c instanceof Promise?c.then(f=>f).catch(()=>null):c}return{...i,key:r,async getItem(c,f){const h=i.getItem(`${r}.${c}`),p=await u(h);return p?n(p)??null:f??null},async setItem(c,f){const h=`${r}.${c}`;f===null?await u(i.removeItem(h)):await u(i.setItem(h,s(f)))},async removeItem(c){await u(i.removeItem(`${r}.${c}`))}}}const H6={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function fD(){const e=typeof window<"u"&&window.localStorage?window.localStorage:H6;return{getItem(n){return e.getItem(n)},removeItem(n){e.removeItem(n)},setItem(n,r){try{e.setItem(n,r)}catch{}}}}const dh=256;let ju=dh,Nu;function dD(e=11){if(!Nu||ju+e>dh*2){Nu="",ju=0;for(let n=0;n<dh;n++)Nu+=(256+Math.random()*256|0).toString(16).substring(1)}return Nu.substring(ju,ju+++e)}function hD(e){const{multiInjectedProviderDiscovery:n=!0,storage:r=cD({storage:fD()}),syncConnectedChain:s=!0,ssr:i=!1,...u}=e,c=typeof window<"u"&&n?KT():void 0,f=E0(()=>u.chains),h=E0(()=>{const N=[],R=new Set;for(const D of u.connectors??[]){const I=p(D);if(N.push(I),!i&&I.rdns){const B=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const Z of B)R.add(Z)}}if(!i&&c){const D=c.getProviders();for(const I of D)R.has(I.info.rdns)||N.push(p(b(I)))}return N});function p(N){const R=iD(dD()),D={...N({emitter:R,chains:f.getState(),storage:r,transports:u.transports}),emitter:R,uid:R.uid};return R.on("connect",T),D.setup?.(),D}function b(N){const{info:R}=N,D=N.provider;return xm({target:{...R,id:R.rdns,provider:D}})}const y=new Map;function v(N={}){const R=N.chainId??O.getState().chainId,D=f.getState().find(B=>B.id===R);if(N.chainId&&!D)throw new uh;{const B=y.get(O.getState().chainId);if(B&&!D)return B;if(!D)throw new uh}{const B=y.get(R);if(B)return B}let I;if(u.client)I=u.client({chain:D});else{const B=D.id,Z=f.getState().map(Y=>Y.id),re={},J=Object.entries(u);for(const[Y,oe]of J)if(!(Y==="chains"||Y==="client"||Y==="connectors"||Y==="transports"))if(typeof oe=="object")if(B in oe)re[Y]=oe[B];else{if(Z.some(_=>_ in oe))continue;re[Y]=oe}else re[Y]=oe;I=VT({...re,chain:D,batch:re.batch??{multicall:!0},transport:Y=>u.transports[B]({...Y,connectors:h})})}return y.set(R,I),I}function w(){return{chainId:f.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let E;const C="0.0.0-canary-";_u.startsWith(C)?E=Number.parseInt(_u.replace(C,""),10):E=Number.parseInt(_u.split(".")[0]??"0",10);const O=E0(JT(r?tD(w,{migrate(N,R){if(R===E)return N;const D=w(),I=M(N,D.chainId);return{...D,chainId:I}},name:"store",partialize(N){return{connections:{__type:"Map",value:Array.from(N.connections.entries()).map(([R,D])=>{const{id:I,name:B,type:Z,uid:re}=D.connector;return[R,{...D,connector:{id:I,name:B,type:Z,uid:re}}]})},chainId:N.chainId,current:N.current}},merge(N,R){typeof N=="object"&&N&&"status"in N&&delete N.status;const D=M(N,R.chainId);return{...R,...N,chainId:D}},skipHydration:i,storage:r,version:E}):w));O.setState(w());function M(N,R){return N&&typeof N=="object"&&"chainId"in N&&typeof N.chainId=="number"&&f.getState().some(D=>D.id===N.chainId)?N.chainId:R}s&&O.subscribe(({connections:N,current:R})=>R?N.get(R)?.chainId:void 0,N=>{if(f.getState().some(D=>D.id===N))return O.setState(D=>({...D,chainId:N??D.chainId}))}),c?.subscribe(N=>{const R=new Set,D=new Set;for(const B of h.getState())if(R.add(B.id),B.rdns){const Z=typeof B.rdns=="string"?[B.rdns]:B.rdns;for(const re of Z)D.add(re)}const I=[];for(const B of N){if(D.has(B.info.rdns))continue;const Z=p(b(B));R.has(Z.id)||I.push(Z)}r&&!O.persist.hasHydrated()||h.setState(B=>[...B,...I],!0)});function j(N){O.setState(R=>{const D=R.connections.get(N.uid);return D?{...R,connections:new Map(R.connections).set(N.uid,{accounts:N.accounts??D.accounts,chainId:N.chainId??D.chainId,connector:D.connector})}:R})}function T(N){O.getState().status==="connecting"||O.getState().status==="reconnecting"||O.setState(R=>{const D=h.getState().find(I=>I.uid===N.uid);return D?(D.emitter.listenerCount("connect")&&D.emitter.off("connect",j),D.emitter.listenerCount("change")||D.emitter.on("change",j),D.emitter.listenerCount("disconnect")||D.emitter.on("disconnect",U),{...R,connections:new Map(R.connections).set(N.uid,{accounts:N.accounts,chainId:N.chainId,connector:D}),current:N.uid,status:"connected"}):R})}function U(N){O.setState(R=>{const D=R.connections.get(N.uid);if(D){const B=D.connector;B.emitter.listenerCount("change")&&D.connector.emitter.off("change",j),B.emitter.listenerCount("disconnect")&&D.connector.emitter.off("disconnect",U),B.emitter.listenerCount("connect")||D.connector.emitter.on("connect",T)}if(R.connections.delete(N.uid),R.connections.size===0)return{...R,connections:new Map,current:null,status:"disconnected"};const I=R.connections.values().next().value;return{...R,connections:new Map(R.connections),current:I.connector.uid}})}return{get chains(){return f.getState()},get connectors(){return h.getState()},storage:r,getClient:v,get state(){return O.getState()},setState(N){let R;typeof N=="function"?R=N(O.getState()):R=N;const D=w();typeof R!="object"&&(R=D),Object.keys(D).some(B=>!(B in R))&&(R=D),O.setState(R,!0)},subscribe(N,R,D){return O.subscribe(N,R,D?{...D,fireImmediately:D.emitImmediately}:void 0)},_internal:{mipd:c,async revalidate(){const N=O.getState(),R=N.connections;let D=N.current;for(const[,I]of R){const B=I.connector;B.isAuthorized&&await B.isAuthorized()||(R.delete(B.uid),D===B.uid&&(D=null))}O.setState(I=>({...I,connections:R,current:D}))},store:O,ssr:!!i,syncConnectedChain:s,transports:u.transports,chains:{setState(N){const R=typeof N=="function"?N(f.getState()):N;if(R.length!==0)return f.setState(R,!0)},subscribe(N){return f.subscribe(N)}},connectors:{providerDetailToConnector:b,setup:p,setState(N){return h.setState(typeof N=="function"?N(h.getState()):N,!0)},subscribe(N){return h.subscribe(N)}},events:{change:j,connect:T,disconnect:U}}}}function mD(e,n){const{initialState:r,reconnectOnMount:s}=n;return r&&!e._internal.store.persist.hasHydrated()&&e.setState({...r,chainId:e.chains.some(i=>i.id===r.chainId)?r.chainId:e.chains[0].id,connections:s?r.connections:new Map,status:s?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(i=>{const u=new Set;for(const h of i??[])if(h.rdns){const p=Array.isArray(h.rdns)?h.rdns:[h.rdns];for(const b of p)u.add(b)}const c=[],f=e._internal.mipd?.getProviders()??[];for(const h of f){if(u.has(h.info.rdns))continue;const p=e._internal.connectors.providerDetailToConnector(h),b=e._internal.connectors.setup(p);c.push(b)}return[...i,...c]})),s?$T(e):e.storage&&e.setState(i=>({...i,connections:new Map}))}}}function pD(e){const{children:n,config:r,initialState:s,reconnectOnMount:i=!0}=e,{onMount:u}=mD(r,{initialState:s,reconnectOnMount:i});r._internal.ssr||u();const c=S.useRef(!0);return S.useEffect(()=>{if(c.current&&r._internal.ssr)return u(),()=>{c.current=!1}},[]),n}const q6=S.createContext(void 0);function gD(e){const{children:n,config:r}=e,s={value:r};return S.createElement(pD,e,S.createElement(q6.Provider,s,n))}const bD="2.19.2",yD=()=>`wagmi@${bD}`;class vD extends vm{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return yD()}}class xD extends vD{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Sm(e={}){const n=e.config??S.useContext(q6);if(!n)throw new xD;return n}var Ko=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(){}},SD={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},wD=class{#e=SD;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},Rr=new wD;function CD(e){setTimeout(e,0)}var Hr=typeof window>"u"||"Deno"in globalThis;function en(){}function ED(e,n){return typeof e=="function"?e(n):e}function hh(e){return typeof e=="number"&&e>=0&&e!==1/0}function G6(e,n){return Math.max(e+(n||0)-Date.now(),0)}function tr(e,n){return typeof e=="function"?e(n):e}function jn(e,n){return typeof e=="function"?e(n):e}function n1(e,n){const{type:r="all",exact:s,fetchStatus:i,predicate:u,queryKey:c,stale:f}=e;if(c){if(s){if(n.queryHash!==wm(c,n.options))return!1}else if(!Lo(n.queryKey,c))return!1}if(r!=="all"){const h=n.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||i&&i!==n.state.fetchStatus||u&&!u(n))}function a1(e,n){const{exact:r,status:s,predicate:i,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(r){if(ko(n.options.mutationKey)!==ko(u))return!1}else if(!Lo(n.options.mutationKey,u))return!1}return!(s&&n.state.status!==s||i&&!i(n))}function wm(e,n){return(n?.queryKeyHashFn||ko)(e)}function ko(e){return JSON.stringify(e,(n,r)=>ph(r)?Object.keys(r).sort().reduce((s,i)=>(s[i]=r[i],s),{}):r)}function Lo(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Lo(e[r],n[r])):!1}var OD=Object.prototype.hasOwnProperty;function $6(e,n){if(e===n)return e;const r=r1(e)&&r1(n);if(!r&&!(ph(e)&&ph(n)))return n;const i=(r?e:Object.keys(e)).length,u=r?n:Object.keys(n),c=u.length,f=r?new Array(c):{};let h=0;for(let p=0;p<c;p++){const b=r?p:u[p],y=e[b],v=n[b];if(y===v){f[b]=y,(r?p<i:OD.call(e,b))&&h++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){f[b]=v;continue}const w=$6(y,v);f[b]=w,w===y&&h++}return i===c&&h===i?e:f}function mh(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}function r1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ph(e){if(!s1(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!s1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function s1(e){return Object.prototype.toString.call(e)==="[object Object]"}function AD(e){return new Promise(n=>{Rr.setTimeout(n,e)})}function gh(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?$6(e,n):n}function jD(e,n,r=0){const s=[...e,n];return r&&s.length>r?s.slice(1):s}function ND(e,n,r=0){const s=[n,...e];return r&&s.length>r?s.slice(0,-1):s}var Cm=Symbol();function Y6(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Cm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function MD(e,n){return typeof e=="function"?e(...n):!!e}var TD=class extends Ko{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Hr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",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(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Em=new TD;function bh(){let e,n;const r=new Promise((i,u)=>{e=i,n=u});r.status="pending",r.catch(()=>{});function s(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},r.reject=i=>{s({status:"rejected",reason:i}),n(i)},r}var DD=CD;function RD(){let e=[],n=0,r=f=>{f()},s=f=>{f()},i=DD;const u=f=>{n?e.push(f):i(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&i(()=>{s(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;n++;try{h=f()}finally{n--,n||c()}return h},batchCalls:f=>(...h)=>{u(()=>{f(...h)})},schedule:u,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{i=f}}}var zt=RD(),zD=class extends Ko{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Hr&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}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(r=>{r(e)}))}isOnline(){return this.#e}},lc=new zD;function kD(e){return Math.min(1e3*2**e,3e4)}function Q6(e){return(e??"online")==="online"?lc.isOnline():!0}var yh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function X6(e){let n=!1,r=0,s;const i=bh(),u=()=>i.status!=="pending",c=C=>{if(!u()){const O=new yh(C);v(O),e.onCancel?.(O)}},f=()=>{n=!0},h=()=>{n=!1},p=()=>Em.isFocused()&&(e.networkMode==="always"||lc.isOnline())&&e.canRun(),b=()=>Q6(e.networkMode)&&e.canRun(),y=C=>{u()||(s?.(),i.resolve(C))},v=C=>{u()||(s?.(),i.reject(C))},w=()=>new Promise(C=>{s=O=>{(u()||p())&&C(O)},e.onPause?.()}).then(()=>{s=void 0,u()||e.onContinue?.()}),E=()=>{if(u())return;let C;const O=r===0?e.initialPromise:void 0;try{C=O??e.fn()}catch(M){C=Promise.reject(M)}Promise.resolve(C).then(y).catch(M=>{if(u())return;const j=e.retry??(Hr?0:3),T=e.retryDelay??kD,U=typeof T=="function"?T(r,M):T,N=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,M);if(n||!N){v(M);return}r++,e.onFail?.(r,M),AD(U).then(()=>p()?void 0:w()).then(()=>{n?v(M):E()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(s?.(),i),cancelRetry:f,continueRetry:h,canStart:b,start:()=>(b()?E():w().then(E),i)}}var K6=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hh(this.gcTime)&&(this.#e=Rr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hr?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Rr.clearTimeout(this.#e),this.#e=void 0)}},LD=class extends K6{#e;#t;#n;#r;#a;#o;#i;constructor(e){super(),this.#i=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=o1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=o1(this.options);n.data!==void 0&&(this.setState(i1(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=gh(this.state.data,e,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#s({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>jn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>tr(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:!G6(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.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(n=>n!==e),this.observers.length||(this.#a&&(this.#i?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},i=()=>{const f=Y6(this.options,n),p=(()=>{const b={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(b),b})();return this.#i=!1,this.options.persister?this.options.persister(f,p,this):f(p)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return s(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta}),this.#a=X6({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof yh&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,h)=>{this.#s({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#a.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof yh){if(f.silent)return this.#a.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#s({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#s(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Z6(r.data,this.options),fetchMeta:e.meta??null};case"success":const s={...r,...i1(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?s:void 0,s;case"error":const i=e.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),zt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Z6(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Q6(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function i1(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function o1(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var UD=class extends Ko{constructor(e,n){super(),this.options=n,this.#e=e,this.#s=null,this.#i=bh(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#o;#i;#s;#p;#d;#h;#u;#c;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),l1(this.#t,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vh(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vh(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,r=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 jn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!mh(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&u1(this.#t,r,this.options,n)&&this.#f(),this.updateResult(),s&&(this.#t!==r||jn(this.options.enabled,this.#t)!==jn(n.enabled,this.#t)||tr(this.options.staleTime,this.#t)!==tr(n.staleTime,this.#t))&&this.#g();const i=this.#b();s&&(this.#t!==r||jn(this.options.enabled,this.#t)!==jn(n.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(n,e);return _D(this,r)&&(this.#r=r,this.#o=this.options,this.#a=this.#t.state),r}getCurrentResult(){return this.#r}trackResult(e,n){return new Proxy(e,{get:(r,s)=>(this.trackProp(s),n?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(en)),n}#g(){this.#x();const e=tr(this.options.staleTime,this.#t);if(Hr||this.#r.isStale||!hh(e))return;const r=G6(this.#r.dataUpdatedAt,e)+1;this.#u=Rr.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#S(),this.#l=e,!(Hr||jn(this.options.enabled,this.#t)===!1||!hh(this.#l)||this.#l===0)&&(this.#c=Rr.setInterval(()=>{(this.options.refetchIntervalInBackground||Em.isFocused())&&this.#f()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#x(){this.#u&&(Rr.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Rr.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const r=this.#t,s=this.options,i=this.#r,u=this.#a,c=this.#o,h=e!==r?e.state:this.#n,{state:p}=e;let b={...p},y=!1,v;if(n._optimisticResults){const I=this.hasListeners(),B=!I&&l1(e,n),Z=I&&u1(e,r,n,s);(B||Z)&&(b={...b,...Z6(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:w,errorUpdatedAt:E,status:C}=b;v=b.data;let O=!1;if(n.placeholderData!==void 0&&v===void 0&&C==="pending"){let I;i?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(I=i.data,O=!0):I=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,I!==void 0&&(C="success",v=gh(i?.data,I,n),y=!0)}if(n.select&&v!==void 0&&!O)if(i&&v===u?.data&&n.select===this.#p)v=this.#d;else try{this.#p=n.select,v=n.select(v),v=gh(i?.data,v,n),this.#d=v,this.#s=null}catch(I){this.#s=I}this.#s&&(w=this.#s,v=this.#d,E=Date.now(),C="error");const M=b.fetchStatus==="fetching",j=C==="pending",T=C==="error",U=j&&M,N=v!==void 0,D={status:C,fetchStatus:b.fetchStatus,isPending:j,isSuccess:C==="success",isError:T,isInitialLoading:U,isLoading:U,data:v,dataUpdatedAt:b.dataUpdatedAt,error:w,errorUpdatedAt:E,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>h.dataUpdateCount||b.errorUpdateCount>h.errorUpdateCount,isFetching:M,isRefetching:M&&!j,isLoadingError:T&&!N,isPaused:b.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:T&&N,isStale:Om(e,n),refetch:this.refetch,promise:this.#i,isEnabled:jn(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=re=>{D.status==="error"?re.reject(D.error):D.data!==void 0&&re.resolve(D.data)},B=()=>{const re=this.#i=D.promise=bh();I(re)},Z=this.#i;switch(Z.status){case"pending":e.queryHash===r.queryHash&&I(Z);break;case"fulfilled":(D.status==="error"||D.data!==Z.value)&&B();break;case"rejected":(D.status!=="error"||D.error!==Z.reason)&&B();break}}return D}updateResult(){const e=this.#r,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),mh(n,e))return;this.#r=n;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#m.size)return!0;const u=new Set(i??this.#m);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(c=>{const f=c;return this.#r[f]!==e[f]&&u.has(f)})};this.#C({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#C(e){zt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ID(e,n){return jn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function l1(e,n){return ID(e,n)||e.state.data!==void 0&&vh(e,n,n.refetchOnMount)}function vh(e,n,r){if(jn(n.enabled,e)!==!1&&tr(n.staleTime,e)!=="static"){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Om(e,n)}return!1}function u1(e,n,r,s){return(e!==n||jn(s.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Om(e,r)}function Om(e,n){return jn(n.enabled,e)!==!1&&e.isStaleByTime(tr(n.staleTime,e))}function _D(e,n){return!mh(e.getCurrentResult(),n)}function c1(e){return{onFetch:(n,r)=>{const s=n.options,i=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const p=async()=>{let b=!1;const y=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(n.signal.aborted?b=!0:n.signal.addEventListener("abort",()=>{b=!0}),n.signal)})},v=Y6(n.options,n.fetchOptions),w=async(E,C,O)=>{if(b)return Promise.reject();if(C==null&&E.pages.length)return Promise.resolve(E);const j=(()=>{const R={client:n.client,queryKey:n.queryKey,pageParam:C,direction:O?"backward":"forward",meta:n.options.meta};return y(R),R})(),T=await v(j),{maxPages:U}=n.options,N=O?ND:jD;return{pages:N(E.pages,T,U),pageParams:N(E.pageParams,C,U)}};if(i&&u.length){const E=i==="backward",C=E?PD:f1,O={pages:u,pageParams:c},M=C(s,O);f=await w(O,M,E)}else{const E=e??u.length;do{const C=h===0?c[0]??s.initialPageParam:f1(s,f);if(h>0&&C==null)break;f=await w(f,C),h++}while(h<E)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(p,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=p}}}function f1(e,{pages:n,pageParams:r}){const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,r[s],r):void 0}function PD(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var VD=class extends K6{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||BD(),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(n=>n!==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.#r?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=X6({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#a({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",i=!this.#r.canStart();try{if(s)n();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#a({type:"pending",context:c,variables:e,isPaused:i})}const u=await this.#r.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,r),await this.options.onSuccess?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,e,this.state.context,r),this.#a({type:"success",data:u}),u}catch(u){try{throw await this.#n.config.onError?.(u,e,this.state.context,this,r),await this.options.onError?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,u,e,this.state.context,r),u}finally{this.#a({type:"error",error:u})}}finally{this.#n.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),zt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function BD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var FD=class extends Ko{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const s=new VD({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){this.#e.add(e);const n=Mu(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Mu(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Mu(e);if(typeof n=="string"){const s=this.#t.get(n)?.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){const n=Mu(e);return typeof n=="string"?this.#t.get(n)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){zt.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 n={exact:!0,...e};return this.getAll().find(r=>a1(n,r))}findAll(e={}){return this.getAll().filter(n=>a1(e,n))}notify(e){zt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return zt.batch(()=>Promise.all(e.map(n=>n.continue().catch(en))))}};function Mu(e){return e.options.scope?.id}var HD=class extends Ko{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const s=n.queryKey,i=n.queryHash??wm(s,n);let u=this.get(i);return u||(u=new LD({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){zt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>n1(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>n1(e,r)):n}notify(e){zt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){zt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){zt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qD=class{#e;#t;#n;#r;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new HD,this.#t=e.mutationCache||new FD,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=Em.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=lc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=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 n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(tr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(e,n,r){const s=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(s.queryHash)?.state.data,c=ED(n,u);if(c!==void 0)return this.#e.build(this,s).setData(c,{...r,manual:!0})}setQueriesData(e,n,r){return zt.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;zt.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return zt.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},s=zt.batch(()=>this.#e.findAll(e).map(i=>i.cancel(r)));return Promise.all(s).then(en).catch(en)}invalidateQueries(e,n={}){return zt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=zt.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let u=i.fetch(void 0,r);return r.throwOnError||(u=u.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(en)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(tr(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=c1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=c1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return lc.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,n){this.#r.set(ko(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(s=>{Lo(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,n){this.#a.set(ko(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(s=>{Lo(e,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=wm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Cm&&(n.enabled=!1),n}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()}};function GD(e){return JSON.stringify(e,(n,r)=>$D(r)?Object.keys(r).sort().reduce((s,i)=>(s[i]=r[i],s),{}):typeof r=="bigint"?r.toString():r)}function $D(e){if(!d1(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const r=n.prototype;return!(!d1(r)||!r.hasOwnProperty("isPrototypeOf"))}function d1(e){return Object.prototype.toString.call(e)==="[object Object]"}function J6(e){const{_defaulted:n,behavior:r,gcTime:s,initialData:i,initialDataUpdatedAt:u,maxPages:c,meta:f,networkMode:h,queryFn:p,queryHash:b,queryKey:y,queryKeyHashFn:v,retry:w,retryDelay:E,structuralSharing:C,getPreviousPageParam:O,getNextPageParam:M,initialPageParam:j,_optimisticResults:T,enabled:U,notifyOnChangeProps:N,placeholderData:R,refetchInterval:D,refetchIntervalInBackground:I,refetchOnMount:B,refetchOnReconnect:Z,refetchOnWindowFocus:re,retryOnMount:J,select:Y,staleTime:oe,suspense:le,throwOnError:_,config:K,connector:ie,query:be,...we}=e;return we}function YD(e,n={}){return{async queryFn({queryKey:r}){const{name:s,scopeKey:i,...u}=r[1];if(!s)throw new Error("name is required");return qT(e,{...u,name:s})},queryKey:QD(n)}}function QD(e={}){return["ensAvatar",J6(e)]}function XD(e,n={}){return{async queryFn({queryKey:r}){const{address:s,scopeKey:i,...u}=r[1];if(!s)throw new Error("address is required");return GT(e,{...u,address:s})},queryKey:KD(n)}}function KD(e={}){return["ensName",J6(e)]}var W6=S.createContext(void 0),ZD=e=>{const n=S.useContext(W6);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},JD=({client:e,children:n})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(W6.Provider,{value:e,children:n})),e2=S.createContext(!1),WD=()=>S.useContext(e2);e2.Provider;function eR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tR=S.createContext(eR()),nR=()=>S.useContext(tR),aR=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},rR=e=>{S.useEffect(()=>{e.clearReset()},[e])},sR=({result:e,errorResetBoundary:n,throwOnError:r,query:s,suspense:i})=>e.isError&&!n.isReset()&&!e.isFetching&&s&&(i&&e.data===void 0||MD(r,[e.error,s])),iR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...i)=>r(s(...i)):r(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oR=(e,n)=>e.isLoading&&e.isFetching&&!n,lR=(e,n)=>e?.suspense&&n.isPending,h1=(e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()});function uR(e,n,r){const s=WD(),i=nR(),u=ZD(),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=s?"isRestoring":"optimistic",iR(c),aR(c,i),rR(i);const f=!u.getQueryCache().get(c.queryHash),[h]=S.useState(()=>new n(u,c)),p=h.getOptimisticResult(c),b=!s&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(y=>{const v=b?h.subscribe(zt.batchCalls(y)):en;return h.updateResult(),v},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(c)},[c,h]),lR(c,p))throw h1(c,h,i);if(sR({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw p.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!Hr&&oR(p,s)&&(f?h1(c,h,i):u.getQueryCache().get(c.queryHash)?.promise)?.catch(en).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?p:h.trackResult(p)}function cR(e,n){return uR(e,UD)}function t2(e){const n=cR({...e,queryKeyHashFn:GD});return n.queryKey=e.queryKey,n}function n2(e={}){const n=Sm(e);return S.useSyncExternalStore(r=>YT(n,{onChange:r}),()=>Zv(n),()=>Zv(n))}function fR(e={}){const{name:n,query:r={}}=e,s=Sm(e),i=n2({config:s}),u=YD(s,{...e,chainId:e.chainId??i}),c=!!(n&&(r.enabled??!0));return t2({...r,...u,enabled:c})}function a2(e={}){const{address:n,query:r={}}=e,s=Sm(e),i=n2({config:s}),u=XD(s,{...e,chainId:e.chainId??i}),c=!!(n&&(r.enabled??!0));return t2({...r,...u,enabled:c})}function r2(e){const{address:n,chainId:r=1,size:s="14px"}=e,i={width:s,height:s},u=a2({address:n,chainId:r}),c=u.data??void 0,f=fR({name:c}),h=f.data??wj;return u.isLoading||f.isLoading?g.jsx("div",{className:"fade-out flex-none animate-pulse rounded-full bg-gray-400",style:i}):g.jsx("img",{alt:"ENS Avatar",className:"flex-none rounded-full object-contain",src:h,style:i})}const s2=["RENAME","DELETE","DUPLICATE"],dR=[{value:"LOCAL",icon:g.jsx(ae,{name:"Lock"}),description:"Only available to you"},{value:"CLOUD",icon:g.jsx(ae,{name:"People"}),description:"Only available to people in this drive"},{value:"PUBLIC",icon:g.jsx(ae,{name:"Globe"}),description:"Available to everyone",disabled:!0}],hR={CLOUD:{title:"Secure cloud",description:"End to end encryption between members.",icon:g.jsx(ae,{name:"Lock"})},LOCAL:{title:"Local",description:"Private and only available to you.",icon:g.jsx(ae,{name:"Hdd"})},SWITCHBOARD:{title:"Switchboard",description:"Public and available to everyone.",icon:g.jsx(ae,{name:"Drive"})}},mR={ADD_TRIGGER:{label:"Add Trigger",icon:g.jsx(ae,{className:"text-orange-900",name:"Plus"})},REMOVE_TRIGGER:{label:"Remove Trigger",icon:g.jsx(ae,{className:"text-orange-900",name:"Xmark"})},ADD_INVALID_TRIGGER:{label:"Add Trigger",icon:g.jsx(ae,{className:"text-orange-900",name:"Exclamation"})}},pR={DUPLICATE:{label:"Duplicate",icon:g.jsx(ae,{name:"FilesEarmark"})},RENAME:{label:"Rename",icon:g.jsx(ae,{name:"Pencil"})},DELETE:{label:"Delete",icon:g.jsx(ae,{name:"Trash"}),className:"text-red-900"},SETTINGS:{label:"Settings",icon:g.jsx(ae,{name:"Gear"})}},i2={...mR,...pR};function o2(e){const{node:n}=e,[r,s]=S.useState(!1),i=S.useCallback(c=>{c.dataTransfer.setData("UI_NODE",JSON.stringify(n))},[n]),u=S.useCallback(()=>{s(!1)},[]);return S.useMemo(()=>({isDragging:r,dragProps:{draggable:!0,onDragStart:i,onDragEnd:u}}),[r,u,i])}const l2="powerhouse/budget-statement",Am="powerhouse/default",u2="makerdao/rwa-portfolio",gR=[l2,Am,u2],bR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAB4CAYAAAAXIRdAAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzWSURBVHgB7V1dbBXHFZ5d/wI1WMhuVBUJq1GlAg9QlZSngNU2D9BIreoYGikKUdVKjaoSklSRWol4TdWmUgs0SFVTVaqUELUKhDTlIUFqiDA8lKQ8QCvMS5PaVRAN14kMjrGN7TuZb5izPne89/r+7HrXvvNJ17s7O3v3er89Z845M3PGE+XDw58j372+Pi8bv+3n5WZV0i2l1y6EbBfLFNKT/U8fvycQGYFXznkppTi8O7fXF95eKWS3qDN4irQnM0LaPMIUOWGZ53ni0O7r3Z5o+JOQokvUMYyk9dOhSAkFhHGyfvXg/9pbVq7oU7tP8DotqzzRsb5R3Lu1Sazb2CTaOnxdtpxw9OGPI8st0nSRWGT4dgGk6je7P+xSZL0tGFkgZVvPCvHY8+2i50Cb2LKzVRHXsOzIKgVPen1HdufwEosgCPCPL/o/79n7v+79f1eD57/NVeCWnS2KrJV1Q04xCSOol7p//ysd/Xi5LSQucY1Qg3Tj57453G6Ttf3RlVqaHOagnlnf4T03sNtvnfJgoKnnmRhxPn9LdJvFyHrgh6scWUUA9Xho94d988rN8+T2QJwI27BDvTf2CtZmQbI27GgRDsURRRokTGjeIGzxkxYSpl6M8MYbtrc4ySoTNmlcwrAfN2masMMPXX+MVOHqTl9se2iFcCgfUZJG7VjcpN2VMK9xHxVAukCaQ2WwSANZBQEIEZML4MOMV9+/hQpcu1U9GGnaWjS+mt6atq32exzak9vv5eURHHxha7N48OnPiHrHQn7YQkBEZGzj7w8qokKWjLkvajX7fV+KHXSwbmOjcKgdkLS2wcefLSgzxkiEs10RfMn8rk4VanKIB8VMfjL7qzVElEjJLjpAUNdBiDZldI3l8qJWmNijuLnxdwf18V3fTJh9Mv0rUo8wB8POx3oK5JbC6s74NA3CWGuUeuzr6+PEhCZ/pXD2ewTWbYhX0yhBQuyxD9YiSFJbPzxVoWp0hEVgy674ozxkiIA0Zj16lUqZIywCLSs98XnVORs3QNqawR8diDxVpqQ5wooAPRVJtOmKmKBYlL8c0hxhRaBjqj3JxFTJ5C8S/ShJmiOsBNBjkSRpv90z8iwnrZz2zBG2ANBzgb7BpNQj98OMQVLyRt7h3hvhBfv+slY4ROOWcqTfeXVCXD03JeLEUyc+61OcEWD7kfrShTbKBNq0Bx5fpSXu/Yt3xHsXp8XI8IyYGq89Ct/f3w+GyvoiR1iFAHFo22rpka+lN8C1YRkAOdIUCRFWByiHIyxD4BGQYnUcYSmDzHqyDi3fTI8u5g61IyxlQAeCLBPNl9wA4V0xwkidIyxlKLK0KjRE0RgQzUtEX5nnrMQMAJKkCNP7fByImD+7yElY2oCE8ZAUb8t41IMsSCdhGYEiBGMSwmFxRh3ysJXedxKWMiBhCjA8fDaOURaLKToJywAMabTVkma1ZSGchGUExlpcsBPTEZYyGFHyypUrHh/kYdSiLOgzq7fulWuD0+LCycmSkXaM59i4vTmxeQY8+Ku6VxpIJYKwTZs2UVxR8m4XQl1J2DsnJ8TJn49p0kp1i+D8318Y1/UXAR4RxsnSJyyy6soPuzowpTsgK4HusByIt8PSRm9vb2S57YNhCwLrhrDBc3dENaj2unIBqYKE0chgZubP88GAuiEMbVY1gHpMEmi3sEUskQwQBfLDwn4yql83flgcXflJgVuKZjY7BX5DR5rqOrM+ZZw4cUISYZAy1aZFDt8mKXORjpRBFiIA9QgCTTk3OiRJmSMsZXCSYICoT9hHFlXfqcSUociCaa9VIYspenxCO6+/ZCQMRsOl05NiUPlFxWZHYggaohTbelpjnZSXJLgkQbpYmTY6eLcLsCQk7FZuVvz5pze1I1tqKitG58LRfU1FM3DNUgBUIkmR2Q/nQZsqBRK2JAhDOKmSOccgDqQtFRijIrQYjU8WEmUI1L5Z5gmD41rNBHGQ9kHCTm8cQBtG4BYjV5U0agplmScsN1y9ars2WF10YzERZQ1aE9gLkHmjI8sRijhAISge7aBym0w3aioDoGg9GRyeN9eHac/QrKtofVZB0XoW4cBGS5dJEbH0rMTlDJIsFqkHiqpFR1hGwC1Ec8zJCklbFKMjC+Mosg5LykKyDHEhgYkThnER5XTNg1R8bo3kE5u5n0XAD7NVot3bzHMsJqoSszqOIsugHmiAgsDc+EhUwmoZR1EvqpHMekgXDXOj6IclaXn18ROVsKyOo8giSB0iylEsQw5IS5Sw5R6liANMmrQvxh3nCGQ/+LvcwaxBO/gbzhNjEpf94G+9ICicwRIGgCFtZjqtPnRjOlIGWYXUF0bHMOPZMAE3zC0rQBsGy5DGdFBsEaDRUtwIcRKWMmDWG4K4CR8mCQvmps9qOAlLGTRqyrLlJVmKLvibMYAQMudtSzEKjrCUQQRBwniPszk3b8qRa8NSBhFGs1d46qIgYspRohIWR9rVuFK3ZnXVC2a60/G8pCq8XqIShrVcqokL8kV7OmpYwKej4Htq/y1JgKxE5oNJK4UsVKW/KBKGIdPVgGf7xGrs1ST9x7Dte+9rjvW3JAE+LpHNceap+LxFc5zX6XHulXVGor7dtYKk/20VLPMIsr5zYHUivyVuMD+Md2RGTkoHErcSkdQYD7yUlKB9wXnUi1owFQT0KAKwPmcp4tpMPl6QFbWOZxy/JW7waH3A5joTyGikIPCiWIl4S2t9UymrdRZ+S5ygDkwTmuK5fgtTkxppc35YBkAxRDqWd6H3KTzl/LCMwYxPLGi7WDwxNEYcYSmDulUUJE9dBLBVacPVaZ1KzAjsGKKVoDkkzRGWMqgfLGDj66OSgrk2LCOwMgeQpIVp95jRIZXJ71Y3SgNW+r1Gu88LvlixkVNOJaYMPpCUtjToJioA7FRixsBDU5bkaZXoJCwDCIr0MvOwlDBLCDvCUgb3u2ziuElP6tERljKMBciP57VdHK4NSxm8A5NgIvZewBI1owx1HGEpg/wwgIjzIhYtJbXoVGJGQWoRJj71hQVLIRNOPSCYn0WAz3GWPHrvCEsZlPaBEBQZTArSnFmfIfAgMElX1ExMZ3SkDPLDeBCYLENrQW493M1JWEbA1SC1WcaUDyfzOaMjo+CqMHCzV7KFoHDCg97avcwAbRVh3ihd4Gb9J4+p2wXPeDQq0gHYo6aIvEbhyVHVrLXjJNIGda5aGtmolypGhgpylwwbo4MbFxrWyrPhaCpfitlzdKIeE5osNgpT4sohSA9fzqMYQpWoDMhLVPjexWSXXnIQBYmj854cCExG7Yhoh0bA1g4D/Lw3dopOjgzNisnxyjNYO5SHmzdmxfsX5wibuJM7xZOBwXnGNmCrQhhCw5G//jOvfHFIcT2AAzSIl96cFA7xAyrtakGyNHn5zOiPh/l0I5ZGVlpkhekffFgpMj/7El10+c0pJ2UxAw9ar1pxjqUVlPnnOzs7pb2kYmDlTAzYItza6ADDF/z9L6r9IRRCypCzsEhGMYcKQc/x3ZNzy5DgWZ8aefgY1WEkFVwbRGTCwao62o7/qjiyo0E0n6ET9z+yQmzZ1WpukM35wVkHkYVm5vwxluhTzn7vqVc/p7WaHckwy1Pl7e+ZN93oXfHkgMznj9Lx+ZfvZga1sok5lAl6bliNiZMlZf7oP7x9YRNkRzqOHz8+rz1iycG0w6YlDLr0yzMH21sb1yop8zZThfsfaRWbd7YWhEscosFfbOxfPl1Iliodzn387688d+YbOrqEZw7HmWat0OJvZi3M0Erk9wglDG3Zz/66YXTGv9VD7Rlw/uVJ8dYL48okndE/Ip/Ph2+P+0R/Jj6ZFeeO3S4gS73mQ6Jp8mv/WfuHkCz27MMuFl2XpS0KrBFUYNA3JzWbYPm+6V92NTWveUvdu4sqtnX44kvbm9SnWaxW+7ak8eOo2Rc2eJ2o+nYZHZdTt1JUe70tUTDYIFX/On3HihnKyzPTt3qeeR0uVHHJ4hfY9yJ+NFnkvKEwl8t5+OKJ6Y+2Qt/SBWMqzvjP16bEsf1j4o0j47oh/eDKtH6bSPLoYx9HfXidqPrFvrOcupV+qr0e/3vuvzP6Wbz+i0/0s8Ez4mRJOXN0cmbo62+M/mDYJoBS7VH6PVMe+VKQtKGSz8Mi3POGmjzUc22v39B0gEubw8KACrwjJ75/0fvJWSojJ5nUIUkVyCLyqP0i2O2YNuvZtE0yK8MLuru7vbNnz8rDe64/KvL+E9wgcYjEgPSmX7og97/ICYLmUs8yH6H+eAwxckIfJ01LGF1EWxJP3ATeOPZxc5C3654/rm/Ir/qWumyH8rvXe8Jbr5radlGHUP/7qFKmN1XTMaC6qS7fnh7/2wHVnNBLbkcxAHssPUlXqTlhAJH4Kc1sL4jISlnaAAAAAElFTkSuQmCC",yR="/assets/rwa-report-Bb0W5-ac.png",vR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAB4CAYAAAAXIRdAAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzzSURBVHgB7V1dbFxHFT5zdwNt+lCTJq1EItkPBKmJlCK1JW+JBTzQgkTAtUPlKAGUhzit0ki88JL4biseeCEiLQG1AqlpEaqdP/riIBFk961VHwhVUkErYUsND7FjuT9J1Nq+0zmzc8Znx/fau/buvbP2fNJm7996N/e758w538ycEVA/BP4jj/+0Ez6X+yBKHgEputWRDnW4A9YsREWcGYrBE4h6zkspAZ7pO6T2DoGEblhviBRpL/lB2iLCFDn2mBACZo/2dZcB/qzOdME6RqIsrXRmqGJ2JRSEGsI4WR8f/WHH/WLjoNp8ruYT994HcmsnyF2PAXxjB8gHNutjawmlY09nnNHuscIO5E7cIsLQqu4e7u2656twQf2cb9mTSFT39yHpfmLNEeQimzAg91iJ41ioFxKWK2nC3ZbP9nZBIv7JXaBUJCVP9Kx5oghLEoZQpMGLb1Tw4XbQcvLKZFWImYEfdCwi6ycHq1YVsIBEDsIz+3Gr4pwRGKCp+9ky4iL+lFTbLEZW/5FAVibk4PzRvkH3KN1PHg80E5H9+qO9h4AFGNqydu+FgGxEKaTpFEjzhsbWfNKihU1hv1ju3hMsq064pHELw+1mk6YJmxt46mfWFW7aogKMpyCgfiBp0rE0aseaTZomrBSJY3QArQtJC2gUNaQhWTUCBCyvKtWFCHMunm+Fdms1sO5RR4uYq+FRfDdt26oh5MD+4yCSU/rrlHqRHP4lrHcsm4ctC1GpPLjjeZNYa5hwH1Yb9keKMmtSUklNAc2AHDxx8/pJfoSCkZRkuyEgYV12T2mEAc1BWiCC1kVh/0oDkbJqv7rsH9wWCENIFXSJ6UlYPRRpz/ZBZfOO53HP5GZgtin0b8g9YpS40Pm4TrTCZdHMKFnJWINT108ODg5yYmzI3ygiCFgEuf1haCqq2uMgRotIknqn+96wGhIIS4HsfhKaD2VpKhBh3TII0aiVBcLScO/GFkXMmrQTKSfqDkICYRlIDhxpUZsu4yyVvx7SAmFZ0JpqD7QCJBhnqB9i6c8GZAJ72mULSVOByElOWj3tWSBsGWDPRaL6BlvlHnkeZgKSJVkTquPSfmD+9F8hIAMqkY5GzoF4+y1oJsSZ4Yh0RgTbTvWXZQioD9im9Q8AKIsT/363+roxAXD3NqwWlUoFGapL8QiENQpFnG7bVtEjv5regNCGeQBKpEkJAacDlCMQ5hG4ApJ1TSCsYFBYT9Ghk5vhsRoVJBBWMNAHIllGzZc8AOFdMWCsLhBWMBRZ2hUaomgMiOYlpa9MhCjRA6AlKcL0Nh8HAosnqwQLKxpoYVyS4m0ZVz0oggwW5gkUIQksuEQaOsBlK70dLKxgoIUpYOARsXGMMktTLNTCxB0l63z4PogPrwPcuQPNBo6z1DNF+XcaWQk2Vjsp3fNFwJBG79rSnLbMojDCxMh5iEZHmqLFZUFP53UJuTEO4p2x6m/A70eNcPfelnWj1AsTLYIK75ccNpC7SxS3JqH0m19p5buVZNUNo8KX4mP6t+UNIgpH41y7dk1wtoxblDyZzpUwvCHRiy+op3wCvMO0+W0FPERImMnDiEC9bZLpGovLl7DL5/WN8RZI2iu/hZwhqA3buXMnicCp4xZzzcPE22P65TswABIfXIe80Nvbm3rczcHwHQnMkbDm9tS2EhgQ5QW0KhNskHXpn8CjRL6dC2HYdunQvU2gf2tObRkGGviObRgFIICDPUzAgTvc2vIJ630MMpYB5moyp8mNPFI0s9lJ+LWJNF2bj0tUuU/b4W7zE/k0DA8PSyIMrUy1aal5GFmZN1oiJq6ygVkjOjhoZbuYk0ukCBGB7hEJNMd50CHJyrwgbCXVdtBdia1dEF04C+0MThIGIOpl+8jSrvdC/F1pTRC5BibQK7IwtNeukGmKgk9o59f74RLR/axgZK0Wj9sc3JLQutgxHXTwbheEFxYWnX8NVgJxsb3dIQJdIlmR2bbzoM0l/lkYquclFURg4cx6LU28964f4nETYIIK3JQULfJ2jMJ87DPzp8dZ6XjCZ52xRcA2jLlCe5y7Sho1hcdCj3PBSIsGnQnsNQhjOgoGSVBc7aDjLplh1JQHILWeAg4hFvow3RmaXo2a8k7pyAksWeZJs6BAxLW0oHQUDFI6yCVStIj/pLnFoHR4Ah4hmn1OVs5q/XJYYT61FpQOQlw71M2SZYIS4ZVaj0qHrovRINaC0oF5mOMOwe1t5jUWg9LhGUwPdE0Xi1E5tNUFpaNgUFiP1oVkYdSIVmeOcUtLUJoKeZgnIHeIKkdWhRwkLRBWMJg16eECPHFOgQiEFQwWDbrir50nxizOnzZsvSodBB7Wx2acopGqrN4IvkyZXe9KB76T2kH7FBnidpz7MLdlsN7HdGBkSGM6aCQwwuiJNUFIGNNRMDCs5/ohgoYJkDvk1QTCmI6CQaOmnFheUqToir9B6SgY1I1iCqzURIppyIewekjwTenIqYY/EcTG1XPrqhGB85Om2nGJkJx+MxFGI6V46aI4ZcpRLm2Y3NbVdqtOyO35LBzEQnfaX1RUhV+Xk0vcCHLXo22T6OpF73ICRYksB5NOCVk9HjFXC0O00zKNef5W0hIRbI4zL8VX0JgOrIehFA3flQldryPHJSXRwvhA0piN+E0TgXPNw1pZB74ZwN+Wtyfgaj1piPw8pWckAueeh+ENwackz4nf9aCoFeGpA9NIU7zWb21pUmNthSgdSNp8fLrauBcZParvRqvH31LkutWkIdK+rEJvkzyVb5SYBqoD3w/Vuhg4p7jJyoVOJ9xjux6HRKn8upy5RysSmpG/NW0X0xNtMOJH98r2HBdLVQmx9CiRp24VBUljOugcW5XWTjkKPc6ewNUQnQLNlrRAWMGgfjAa04HH+FoshOLbsAANp3IAWZotu8eCDqlC/rC6URHga6+IM8Nlt88Lc7GskVPBJRYMPpCU3lntxEUCcHCJnoFLU47laZcYLMwDxBm9zFyWAlOZNBBWMHje5RLHQ3pyj4GwgmEiQL6/qO3iCFFiAeBRYt8klJnaoYFRohkyIB2lI+RhRYPyMATlYSJl0VJyi8Elegpyi2hp1BcWh0o4fsBRORB8eJvk6n0grGBQQRVCnDGYFEkLYb1H4CJwzKq4uQhBR8GgPIyLwBQROgty6+FuwcI8AXeD1GaZSX220GUIOjwFd4Wxj6WL1jPi2nLn+t3tZUbQOxI2Yz+9BguVeIfaBQxm+FBtDnfUFJGngg6hCJMd+uz0FMDW9pq00G4QH43bbXX/J0zQwYOL6nW1K8/a0VRRIsHOUMhzGaZ1C7YOjbr/42g9vPxeFhZcooR/2T+Ai3kGtBbMKBIQY/FCIctU1xiztcMQ0aeJeJNOihvjINdQSTvvcOsmRO8tGMXU3BdvUpkHBCbP+B6zVSEMoXbkb9Tx8hvjytjG9CdUg6hXfg1oOnQyzObHqd2r+/87M8GnG7GFcqRDli3/EGGUMpckdg5QNDYSrKzJ0O0PzuF+Z4GwBOTvtmzZIt0lFWOnZmLMFuHWQQcy3H8relXtjusr0cpGzkFGRbGABmGDhZHzbNK9GP/e+1O21gUfMcURp1TCwVV1Srhx9gHYe08EV+hE8uMDkHQ/Wb1oiYWgA7JhcynVzJQuLtQimZfyF+U/nNNezVUyTNHmxP07i6YbHbwFYwkkp2k/uvi6XhXWqSYWUCfovuE95GQpV3j66SlhmyBX6RgaGkrcv0XjFBG4oS0MfempB+c6vg7lK0LCI3TB/L4Deu4Ul0sC0sEfbB0gjF2uIUudnfjPZ9OPPnz2ilaXzHRZO2uFSqJTrY54qTLo2JZt+/3FmU9mox7bnimULr0O0V/+CHLqpv4RSZLYpye8Ml63P4Powms1ZCmMfy43fOfk3U2WLHbvbRcLvvOyRbEzggoZjMxJzSay/MrXZrvuL3/lH+qZ6LJPx6bNMP/4HpDf3qO3XUvj+2mzL1zwa9Kud4/Rfj3XNoqVft61KAzYSsqqorcug2CaoRRw9ZPZ2Z6Oly+N436WZfE/7X4X8aPJouQND05OTgr8wzfE7GPob+kDQumM5b9fgA0vHIfyn04BqIZUfnBNP01kefRy99Ne/Jq067P+Zj3XNvpa6ef1//2j/+l7UX7p1/relNQ94mThPfw/zH13n8q5XAKo1B6V3zPHUx8Ksja8KOKyCM+80U1+caTn0IaodIJbW0BdGL89Lw//fFqM0gFKkskdklUhWUQetV8Etx3TYT0fyGjM036gu7tbjI6OyrmB/QejKHmOByQBi4Gq0ZwQZ/tvylc5Qei51L1MUtwf1xBTJ/Rx0rSF0YfoncwTvwSzcdzGL0fyLn3zoc77RPIjEcHeKIJORWCnOt0B6xMz6uZ8rNzemJwXV6fl7N8eUs0JPeSuioFwx9KTdS01JwxBJH4JoOdEKaNKcdAAAAAASUVORK5CYII=",m1={[l2]:bR,[Am]:vR,[u2]:yR};function xR(e,n){return n||(gR.includes(e)?m1[e]:m1[Am])}const p1="SYNCING",g1="SUCCESS",b1="CONFLICT",y1="MISSING",v1="ERROR",x1="INITIAL_SYNC",SR={SYNCING:"Syncing",SUCCESS:"Synced",CONFLICT:"Error",MISSING:"Circle",ERROR:"Error",INITIAL_SYNC:"Syncing"};function wR(e){const{syncStatus:n,className:r,overrideSyncIcons:s={},...i}=e,u={...SR,...s};return{[x1]:g.jsx(ae,{size:16,...i,className:de("text-blue-900",r),name:u[x1]}),[p1]:g.jsx(ae,{size:16,...i,className:de("text-blue-900",r),name:u[p1]}),[g1]:g.jsx(ae,{size:16,...i,className:de("text-green-900",r),name:u[g1]}),[b1]:g.jsx(ae,{size:16,...i,className:de("text-orange-900",r),name:u[b1]}),[y1]:g.jsx(ae,{size:16,...i,className:de("text-red-900",r),name:u[y1]}),[v1]:g.jsx(ae,{size:16,...i,className:de("text-red-900",r),name:u[v1]})}[n]}function Tk(e){const{fileNode:n,className:r,customDocumentIconSrc:s}=e,[i,u]=S.useState("READ"),[c,f]=S.useState(!1),[h]=L1(),p=h?j0(h):"LOCAL",{dragProps:b}=o2({node:n}),{isAllowedToCreateDocuments:y}=wh(),{onRenameNode:v,onDuplicateNode:w}=Ch(),E=i==="READ",C=nC(n.id,p),O={DUPLICATE:()=>w(n),RENAME:()=>u("WRITE"),DELETE:()=>I1(n)},M=Object.entries(i2).map(([B,Z])=>({...Z,id:B})).filter(B=>s2.includes(B.id));function j(B){v(B,n).catch(Z=>{console.error(Z)}).finally(()=>{u("READ")})}function T(){u("READ")}function U(B){const Z=O[B];if(!Z){console.error(`No handler found for dropdown menu item: ${B}`);return}Z(),f(!1)}const N=xR(n.documentType,s),R=g.jsxs("div",{className:"relative",children:[g.jsx("img",{alt:"file icon",className:"max-w-none",height:34,src:N,width:32}),E&&C&&g.jsx("div",{className:"absolute bottom-[-2px] right-0 size-3 rounded-full bg-white",children:g.jsx("div",{className:"absolute left-[-2px] top-[-2px]",children:g.jsx(wR,{overrideSyncIcons:{SUCCESS:"CheckCircleFill"},syncStatus:C})})})]}),D=de("group flex h-12 cursor-pointer select-none items-center rounded-lg bg-gray-200 px-2 text-gray-600 hover:text-gray-800",r),I=E?g.jsxs("div",{className:"flex w-52 items-center justify-between",children:[g.jsxs("div",{className:"mr-2 truncate group-hover:mr-0",children:[g.jsx("div",{className:"max-h-6 truncate text-sm font-medium group-hover:text-gray-800",children:n.name}),g.jsx("div",{className:"max-h-6 truncate text-xs font-medium text-gray-600 group-hover:text-gray-800",children:n.documentType})]}),y?g.jsx(Ac,{items:M,onItemClick:U,onOpenChange:f,open:c,children:g.jsx("button",{className:de("hidden group-hover:block",c&&"block"),onClick:B=>{B.stopPropagation(),f(!0)},children:g.jsx(ae,{className:"text-gray-600",name:"VerticalDots"})})}):null]}):g.jsx($h,{className:"ml-3 flex-1 font-medium",defaultValue:n.name,onCancel:T,onSubmit:j});return g.jsx("div",{className:"relative w-64",onClick:()=>Fs(n),children:g.jsx("div",{...b,className:D,children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"mr-1.5",children:R}),I]})})})}function Dk(e){const{folderNode:n,className:r}=e,{isAllowedToCreateDocuments:s}=wh(),[i,u]=S.useState("READ"),[c,f]=S.useState(!1),{dragProps:h}=o2({node:n}),{onRenameNode:p,onDuplicateNode:b}=Ch(),{isDropTarget:y,dropProps:v}=P5({target:n}),w=i==="READ";function E(){u("READ")}function C(N){p(N,n).catch(R=>{console.error(R)}).finally(()=>{u("READ")})}const O={DUPLICATE:()=>b(n),RENAME:()=>u("WRITE"),DELETE:()=>I1(n)},M=Object.entries(i2).map(([N,R])=>({...R,id:N})).filter(N=>s2.includes(N.id));function j(N){const R=O[N];if(!R){console.error(`No handler found for dropdown menu item: ${N}`);return}R(),f(!1)}const T=w||!s?g.jsx("div",{className:"ml-3 max-h-6 truncate font-medium text-gray-600 group-hover:text-gray-800",children:n.name}):g.jsx($h,{className:"ml-3 font-medium",defaultValue:n.name,onCancel:E,onSubmit:C}),U=de("group flex h-12 cursor-pointer select-none items-center rounded-lg bg-gray-200 px-2",r,y&&"bg-blue-100");return g.jsx("div",{className:"relative w-64",onClick:()=>Fs(n),children:g.jsxs("div",{...h,...v,className:U,children:[g.jsxs("div",{className:"flex items-center overflow-hidden",children:[g.jsx("div",{className:"p-1",children:g.jsx("div",{className:"relative",children:g.jsx(ae,{name:"FolderClose",size:24})})}),T]}),w&&s?g.jsx(Ac,{items:M,onItemClick:j,onOpenChange:f,open:c,children:g.jsx("button",{className:de("ml-auto hidden group-hover:block",c&&"block"),onClick:N=>{N.stopPropagation(),f(!0)},children:g.jsx(ae,{className:"text-gray-600",name:"VerticalDots"})})}):null]})})}const Zo=S.forwardRef(function(n,r){const{icon:s,errorMessage:i,isDirty:u,containerClassName:c,inputClassName:f,errorMessageClassName:h,hideErrors:p=!1,...b}=n,y=n.type??"text",v=!!i;return g.jsxs("div",{children:[g.jsxs("div",{className:de("mb-1 flex gap-2 rounded-md border border-gray-200 bg-gray-50 p-3 text-black placeholder:text-gray-50",v&&"border-red-900",c),children:[s&&g.jsx("span",{className:jh((!u||v)&&"text-slate-200"),children:s}),g.jsx("input",{...b,className:de("w-full bg-transparent font-semibold outline-none",f),ref:r,type:y})]}),g.jsx("p",{className:de("hidden min-h-4 text-xs text-red-900",v&&"block",p&&"hidden",h),children:i})]})});function CR(e){return S.forwardRef(e)}const jm=CR(function(n,r){const{items:s,value:i,id:u,onChange:c,containerClassName:f,menuClassName:h,itemClassName:p,absolutePositionMenu:b=!1,borderRadius:y="6px"}=n,[v,w]=S.useState(!1),E=O(i)??s[0];function C(j){j.disabled||(c(j.value),w(!1))}function O(j){return s.find(T=>T.value===j)}const M=s.filter(j=>j.value!==i);return g.jsxs("div",{className:de("border border-gray-200 bg-gray-50 text-gray-800 transition-[border-radius]",b&&"relative",f),"data-open":v,ref:r,style:{borderRadius:y},children:[g.jsxs("div",{className:de("flex min-w-[360px] cursor-pointer items-center justify-between pr-3 text-gray-800 outline-none",h),id:u,onClick:()=>w(!v),children:[g.jsx(S1,{...E,className:p}),g.jsx(ae,{className:jh("transition",v?"":"-rotate-90"),name:"ChevronDown"})]}),g.jsx("div",{className:de("max-h-0 w-full overflow-hidden bg-inherit transition-[max-height] ease-in-out",v&&"max-h-screen",b&&"absolute"),style:{borderRadius:`0 0 ${y} ${y}`},children:M.map(j=>g.jsx(S1,{...j,className:p,onItemClick:()=>C(j)},j.value))})]})});function S1(e){const{className:n,disabled:r,onItemClick:s,icon:i,displayValue:u,value:c,description:f}=e;return g.jsxs("div",{className:de(r?"cursor-not-allowed text-gray-500":"text-gray-800","flex size-full cursor-pointer items-center gap-2 bg-inherit py-3 pl-3 text-start outline-none",n),onClick:s,children:[i,g.jsxs("div",{children:[g.jsx("p",{className:"capitalize text-inherit",children:u??c.toLowerCase()}),g.jsx("p",{className:"text-xs text-gray-600",children:f})]})]})}function ER(e){return{value:e.id,displayValue:e.name,icon:g.jsx(ae,{name:"PowerhouseLogoSmall"}),description:"Built by Powerhouse"}}function OR(e){const{control:n,appOptions:r,...s}=e,i=r.map(ER);return g.jsx(_h,{control:n,name:"appId",render:({field:u})=>g.jsx(jm,{...s,...u,id:"appId",items:i})})}const AR=S.forwardRef(function(n,r){return g.jsxs("label",{className:"relative cursor-pointer items-center",htmlFor:n.id,children:[g.jsx("input",{className:"peer sr-only",ref:r,type:"checkbox",value:"",...n}),g.jsx("div",{className:"peer h-6 w-11 rounded-full bg-gray-500 after:absolute after:start-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-gray-50 after:transition-all peer-checked:bg-blue-900 peer-checked:after:translate-x-full peer-focus:outline-none"})]})}),Nm=S.forwardRef(function(n,r){return g.jsxs("div",{className:"flex items-center rounded-md border border-gray-200 bg-gray-50 p-3 text-gray-900",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx("label",{className:"font-medium text-gray-900",htmlFor:"availableOffline",children:"Make available offline"}),g.jsxs("p",{className:"text-xs text-gray-600",children:["Check this options if you keep a local backup",g.jsx("br",{}),"available at all times."]})]}),g.jsx(AR,{id:"availableOffline",ref:r,...n})]})});function Vu(e){const{children:n,className:r,...s}=e;return g.jsx("label",{...s,className:de("block font-semibold text-gray-500",r),children:n})}function c2(e){const{control:n,...r}=e;return g.jsx(_h,{control:n,name:"sharingType",render:({field:s})=>g.jsx(jm,{...r,...s,id:"sharingType",items:dR})})}function jR(e){const{register:n,handleSubmit:r,control:s,formState:{errors:i}}=Bh({defaultValues:{name:"",sharingType:"LOCAL",availableOffline:!1,appId:e.appOptions[0].id}});return g.jsx("form",{name:"add-local-drive",onSubmit:r(e.onSubmit),className:"flex flex-col gap-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{children:[g.jsx(Vu,{htmlFor:"name",className:"text-sm font-medium text-gray-800",children:"Drive Name"}),g.jsx(Zo,{...n("name",{required:"Drive name is required"}),errorMessage:i.name?.message,placeholder:"Drive name"})]}),g.jsxs("div",{children:[g.jsx(Vu,{htmlFor:"driveApp",className:"text-sm font-medium text-gray-800",children:"Drive App"}),g.jsx(OR,{control:s,appOptions:e.appOptions})]}),g.jsxs("div",{children:[g.jsx(Vu,{htmlFor:"sharingType",className:"text-sm font-medium text-gray-800",children:"Location"}),g.jsx(c2,{control:s})]}),g.jsx("div",{children:g.jsx(Nm,{...n("availableOffline")})}),g.jsx(In,{className:"mt-2 w-full",type:"submit",children:"Create new drive"})]})})}function NR(e){return g.jsxs("div",{className:"flex gap-2 rounded-xl bg-gray-100 p-3 font-semibold text-gray-500",children:[g.jsx(ae,{className:"text-gray-600",name:"Drive"}),e.driveName]})}function f2(e){const{location:n,className:r,...s}=e,i=hR[n];return g.jsxs("div",{...s,className:de("my-3 flex items-center gap-2 rounded-xl border border-gray-100 p-3 text-gray-800 shadow",r),children:[i.icon,g.jsxs("div",{children:[g.jsx("p",{children:i.title}),g.jsx("p",{className:"text-xs text-slate-200",children:i.description})]})]})}function MR(e){const{sharingType:n="PUBLIC",requestPublicDrive:r}=e,[s,i]=S.useState(),[u,c]=S.useState(!1),[f,h]=S.useState(!0),[p,b]=S.useState(!1),[y,v]=S.useState(""),[w,E]=S.useState(""),[C,O]=iO(w,500),{register:M,handleSubmit:j,setValue:T}=Bh({mode:"onBlur",defaultValues:{availableOffline:s?.availableOffline??!1}});S.useEffect(()=>{O(w)},[w]),S.useEffect(()=>{if(b(!1),C==="")return;N().catch(console.error);async function N(){try{const{id:R,name:D}=await r(C);i({id:R,name:D,sharingType:n,location:"SWITCHBOARD",availableOffline:!0}),T("availableOffline",!0),h(!0),v("")}catch(R){i(void 0),h(!1),v(R.message)}}},[C,T,n]);function U({availableOffline:N}){s&&e.onSubmit({...s,availableOffline:N,url:C})}return g.jsx("form",{onSubmit:j(U),children:p?g.jsxs(g.Fragment,{children:[g.jsx(NR,{driveName:s?.name??"New drive"}),g.jsx(_s,{className:"my-3"}),g.jsxs(ac,{isOpen:u,onOpenChange:()=>c(!u),title:"Location",children:[g.jsx(f2,{location:"SWITCHBOARD"}),g.jsx(Nm,{...M("availableOffline")})]}),g.jsx(In,{className:"mt-4 w-full",color:"dark",type:"submit",children:"Add new drive"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Zo,{errorMessage:y,onChange:N=>E(N.target.value),placeholder:"Drive URL",required:!0,type:"url",value:w}),g.jsx(In,{className:"mt-4 w-full py-2 text-base",color:"dark",size:"small",disabled:!f||w==="",onClick:N=>{N.preventDefault(),b(!0)},type:"button",children:"Add drive"})]})})}const TR="/assets/home-bg-BRYzhkhi.avif",DR="/assets/home-bg-BEhF9NuW.png";function RR(){return g.jsxs("picture",{className:"pointer-events-none absolute inset-8 z-0 size-[calc(100%-32px)] object-contain",children:[g.jsx("source",{srcSet:TR,type:"image/avif"}),g.jsx("img",{src:DR,alt:"background",className:"object-contain"})]})}const zR=function(n){const{icon:r,title:s,description:i,containerClassName:u,shareable:c,onClick:f}=n;return g.jsxs("div",{className:de("relative flex h-24 cursor-pointer flex-col items-center justify-center text-center text-sm text-black",u,f&&"cursor-pointer"),onClick:f,children:[g.jsx("div",{className:"mx-auto pb-2",children:r||g.jsx("div",{className:"size-8 items-center justify-center rounded-lg bg-black pt-1",children:g.jsx("span",{className:"text-6 w-6 text-white",children:s.slice(0,1).toUpperCase()})})}),g.jsxs("div",{children:[g.jsx("h3",{children:s}),i&&g.jsx("p",{className:"text-gray-500",children:i})]}),c&&g.jsx("div",{className:"absolute left-2 top-0 mb-2",children:g.jsx(ae,{name:"PeopleFill",width:12,height:12})})]})},Rk=function(n){const{containerClassName:r}=n;return g.jsx(zR,{title:"Create New Drive",icon:g.jsx(ae,{name:"PlusSquare",size:32}),onClick:()=>aC({type:"addDrive"}),containerClassName:r})},zk=function(n){const{children:r,containerClassName:s}=n;return g.jsx("div",{className:de("container relative mx-auto flex h-full flex-col",s),children:g.jsxs("div",{className:"m-8 flex flex-wrap justify-center gap-4 pt-12",children:[g.jsx(RR,{}),r]})})};function w1(e){const{label:n,children:r}=e;return g.jsx("div",{children:r})}var Dc="Tabs",[kR]=Eh(Dc,[G1]),d2=G1(),[LR,Mm]=kR(Dc),h2=S.forwardRef((e,n)=>{const{__scopeTabs:r,value:s,onValueChange:i,defaultValue:u,orientation:c="horizontal",dir:f,activationMode:h="automatic",...p}=e,b=CC(f),[y,v]=Oh({prop:s,onChange:i,defaultProp:u??"",caller:Dc});return g.jsx(LR,{scope:r,baseId:Ca(),value:y,onValueChange:v,orientation:c,dir:b,activationMode:h,children:g.jsx(rr.div,{dir:b,"data-orientation":c,...p,ref:n})})});h2.displayName=Dc;var m2="TabsList",p2=S.forwardRef((e,n)=>{const{__scopeTabs:r,loop:s=!0,...i}=e,u=Mm(m2,r),c=d2(r);return g.jsx(EC,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:s,children:g.jsx(rr.div,{role:"tablist","aria-orientation":u.orientation,...i,ref:n})})});p2.displayName=m2;var g2="TabsTrigger",b2=S.forwardRef((e,n)=>{const{__scopeTabs:r,value:s,disabled:i=!1,...u}=e,c=Mm(g2,r),f=d2(r),h=x2(c.baseId,s),p=S2(c.baseId,s),b=s===c.value;return g.jsx(OC,{asChild:!0,...f,focusable:!i,active:b,children:g.jsx(rr.button,{type:"button",role:"tab","aria-selected":b,"aria-controls":p,"data-state":b?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:h,...u,ref:n,onMouseDown:tn(e.onMouseDown,y=>{!i&&y.button===0&&y.ctrlKey===!1?c.onValueChange(s):y.preventDefault()}),onKeyDown:tn(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(s)}),onFocus:tn(e.onFocus,()=>{const y=c.activationMode!=="manual";!b&&!i&&y&&c.onValueChange(s)})})})});b2.displayName=g2;var y2="TabsContent",v2=S.forwardRef((e,n)=>{const{__scopeTabs:r,value:s,forceMount:i,children:u,...c}=e,f=Mm(y2,r),h=x2(f.baseId,s),p=S2(f.baseId,s),b=s===f.value,y=S.useRef(b);return S.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),g.jsx(_o,{present:i||b,children:({present:v})=>g.jsx(rr.div,{"data-state":b?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!v,id:p,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:y.current?"0s":void 0},children:v&&u})})});v2.displayName=y2;function x2(e,n){return`${e}-trigger-${n}`}function S2(e,n){return`${e}-content-${n}`}var UR=h2,IR=p2,_R=b2,PR=v2;function VR({children:e,defaultValue:n}){return g.jsxs(UR,{defaultValue:n,className:"flex flex-col gap-2",children:[g.jsx("div",{className:"flex w-full justify-between",children:g.jsx(IR,{className:"flex w-full gap-x-2 rounded-xl bg-slate-50 p-1 text-sm font-semibold text-gray-600 outline-none",children:fe.Children.map(e,(r,s)=>{if(!fe.isValidElement(r))return;const{label:i,disabled:u}=r.props;return g.jsx(_R,{className:"data-[state='active']:tab-shadow ata-disabled:cursor-not-allowed data-disabled:text-gray-400 flex h-7 flex-1 items-center justify-center rounded-lg transition duration-300 data-[state='active']:bg-gray-50 data-[state='active']:text-gray-900",value:i,disabled:u??!1,children:i},i)})})}),g.jsx("div",{className:"mt-3 rounded-md bg-white",children:fe.Children.map(e,(r,s)=>{if(!fe.isValidElement(r))return;const{label:i}=r.props;return g.jsx(PR,{value:i,children:r},s)})})]})}function kk(e){function n(){s(!1)}const{open:r,onOpenChange:s,onAddRemoteDrive:i,onAddLocalDrive:u,requestPublicDrive:c,modalProps:f,containerProps:h}=e;return g.jsx(ir,{...f,contentProps:{className:"rounded-2xl"},onOpenChange:s,open:r,children:g.jsx("div",{...h,className:de("w-[408px] rounded-2xl p-6",h?.className),children:g.jsxs(VR,{defaultValue:"Create Drive",children:[g.jsx(w1,{label:"Create Drive",description:"Create a new drive",children:g.jsx(jR,{onCancel:n,onSubmit:u,appOptions:e.appOptions})}),g.jsx(w1,{label:"Add Drive",description:"Add a drive",children:g.jsx(MR,{sharingType:"PUBLIC",onSubmit:i,onCancel:n,requestPublicDrive:c})})]})})})}const C1="min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";function w2(e){const{body:n,header:r,children:s,onCancel:i,onOpenChange:u,onContinue:c,cancelLabel:f,continueLabel:h,overlayProps:p,contentProps:b,bodyProps:y={},headerProps:v={},containerProps:w={},cancelButtonProps:E={},continueButtonProps:C={},buttonContainerProps:O={},...M}=e;return g.jsx(ir,{contentProps:{...b,className:de("rounded-3xl",b?.className)},onOpenChange:u,overlayProps:{...p,className:p?.className},...M,children:g.jsxs("div",{...Ot(w,"w-[400px] p-6 text-slate-300"),children:[g.jsx("div",{...Ot(v,"border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800"),children:r}),g.jsxs("div",{...Ot(y,"my-6 rounded-md bg-slate-50 p-4 text-center"),children:[n,s]}),g.jsxs("div",{...Ot(O,"mt-8 flex justify-between gap-3"),children:[g.jsx("button",{onClick:i,...Ot(E,de(C1,"flex-1 bg-slate-50 text-slate-800")),children:f}),g.jsx("button",{onClick:c,...Ot(C,de(C1,"flex-1 bg-gray-800 text-gray-50")),children:h})]})]})})}const E1="min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all",O1=300;function Lk(e){const{onOpenChange:n,onContinue:r,overlayProps:s,contentProps:i,...u}=e,[c,f]=S.useState(""),[h,p]=S.useState(!1),b=()=>{n?.(!1),setTimeout(()=>f(""),O1)},y=S.useCallback(()=>{h&&(r(c),setTimeout(()=>f(""),O1))},[h,c,r]),v=S.useCallback(w=>{w.preventDefault(),y()},[y]);return g.jsx(ir,{contentProps:{...i,className:de("rounded-3xl",i?.className)},onOpenChange:n,overlayProps:{...s,className:s?.className},...u,children:g.jsxs("form",{name:"create-document",className:"w-[400px] p-6 text-slate-300",onSubmit:v,children:[g.jsx("div",{className:"border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800",children:"Create a new document"}),g.jsxs("div",{className:"my-6",children:[!h&&c&&g.jsx("div",{className:"mb-2 text-red-500",children:"Document name must be valid URL characters."}),g.jsx(Zo,{icon:g.jsx(ae,{name:"BrickGlobe"}),onChange:w=>{const E=w.target.value;f(E),p(UC(E))},placeholder:"Document name",required:!0,value:c})]}),g.jsxs("div",{className:"mt-8 flex justify-between gap-3",children:[g.jsx("button",{type:"button",className:de(E1,"flex-1 bg-slate-50 text-slate-800"),onClick:b,children:"Cancel"}),g.jsx(In,{type:"submit",className:de(E1,"flex-1 bg-gray-800 text-gray-50"),disabled:!h,children:"Create"})]})]})})}const Uk=e=>{const{inputPlaceholder:n,body:r,driveName:s,...i}=e,[u,c]=S.useState("");return g.jsx(w2,{bodyProps:{className:"p-0 bg-white my-0"},containerProps:{className:"w-[450px]"},continueButtonProps:{disabled:u!==s,className:u!==s?"bg-red-600 hover:scale-100 cursor-not-allowed active:opacity-100":"bg-red-900"},...i,children:g.jsxs("div",{children:[g.jsx("div",{className:"my-6 rounded-md bg-slate-50 p-4 text-center",children:r}),g.jsx("div",{children:g.jsx(Zo,{hideErrors:!0,icon:g.jsx(ae,{name:"Lock"}),onChange:f=>c(f.target.value),placeholder:n,value:u})})]})})};function Ik(e){const{onDelete:n,deleteLabel:r,...s}=e;return g.jsx(w2,{...s,containerProps:{className:"w-[450px]"},continueButtonProps:{className:"bg-red-900"},continueLabel:r,onContinue:n})}const C2=S.forwardRef(function(n,r){return g.jsx(Zo,{...n,icon:n.icon??g.jsx(ae,{name:"Drive"}),id:"driveName",placeholder:"Drive name",ref:r})});function BR(e){const{drive:n,handleDeleteDrive:r,onCancel:s}=e,[i,u]=S.useState(""),c=i===n.header.name;function f(){c&&r()}return g.jsxs("div",{children:[g.jsx("p",{className:"mb-2 rounded-md bg-slate-50 p-4 text-center text-slate-200",children:"Are you sure you want to delete this drive? All files and subfolders within it will be removed. Do you want to proceed?"}),g.jsx(C2,{icon:g.jsx(ae,{name:"Lock"}),onChange:h=>u(h.target.value),placeholder:"Enter drive name...",value:i}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx(In,{className:"w-full",color:"light",onClick:s,children:"Cancel"}),g.jsx(In,{className:"w-full",color:"red",disabled:!c,onClick:f,children:"Delete"})]})]})}function FR(e){const{drive:n,sharingType:r,availableOffline:s,onSubmit:i,handleDeleteDrive:u}=e,c=n.header.name,[f,h]=S.useState(!1),[p,b]=S.useState(!1),[y,v]=S.useState(!1),{register:w,handleSubmit:E,control:C}=Bh({mode:"onBlur",defaultValues:{name:c,sharingType:r,availableOffline:s}}),O=r==="PUBLIC"?"SWITCHBOARD":r;return g.jsxs("form",{onSubmit:E(i),children:[g.jsx(C2,{...w("name")}),g.jsx(_s,{className:"my-4"}),g.jsx(Vu,{htmlFor:"sharingType",children:"Sharing settings"}),g.jsx(c2,{control:C}),g.jsx(_s,{className:"my-3"}),g.jsxs(ac,{isOpen:f,onOpenChange:()=>h(!f),title:"Location",children:[g.jsx(f2,{location:O}),g.jsx(Nm,{...w("availableOffline")})]}),g.jsx(_s,{className:"my-3"}),g.jsx(ac,{isOpen:p,onOpenChange:()=>b(!p),title:"Danger zone",children:g.jsxs("button",{className:"flex gap-2 py-3 font-semibold text-red-900 transition hover:brightness-125",onClick:()=>v(!0),type:"button",children:[g.jsx(ae,{name:"Trash"}),"Delete drive"]})}),y&&p?g.jsx(BR,{drive:n,handleDeleteDrive:u,onCancel:()=>v(!1)}):g.jsxs(g.Fragment,{children:[g.jsx(_s,{className:"my-3"}),g.jsx(In,{className:"mb-4 w-full",type:"submit",children:"Confirm"})]})]})}function _k(e){const{drive:n,open:r,sharingType:s,availableOffline:i,onOpenChange:u,onDeleteDrive:c,onRenameDrive:f,onChangeSharingType:h,onChangeAvailableOffline:p,modalProps:b,containerProps:y}=e,v=C=>{C.name!==n.header.name&&f(n,C.name),C.sharingType!==s&&h(n,C.sharingType),C.availableOffline!==i&&p(n,C.availableOffline),u(!1)};function w(){c(n),u(!1)}function E(){u(!1)}return g.jsx(ir,{...b,contentProps:{className:"rounded-2xl"},onOpenChange:u,open:r,children:g.jsxs("div",{...y,className:de("max-w-[408px] rounded-2xl p-6",y?.className),children:[g.jsxs("div",{className:"flex justify-between",children:[g.jsx("h1",{className:"text-xl font-bold",children:"Drive settings"}),g.jsx("button",{className:"flex size-8 items-center justify-center rounded-md bg-gray-100 text-gray-500 outline-none hover:text-gray-900",onClick:E,tabIndex:-1,children:g.jsx(ae,{name:"XmarkLight",size:24})})]}),g.jsx(_s,{className:"my-4"}),g.jsx(FR,{handleCancel:E,handleDeleteDrive:w,onSubmit:v,drive:n,sharingType:s,availableOffline:i})]})})}const HR="min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";function Pk(e){const{body:n,header:r,children:s,onOpenChange:i,onContinue:u,closeLabel:c,overlayProps:f,contentProps:h,bodyProps:p={},headerProps:b={},containerProps:y={},continueButtonProps:v={},buttonContainerProps:w={},...E}=e,[C,O]=S.useState(!0),M=S.useRef(null);return S.useEffect(()=>{const j=()=>{const U=M.current;U&&(U.scrollHeight>U.clientHeight?(O(!0),U.addEventListener("scroll",T)):O(!1))},T=()=>{const U=M.current;U&&U.scrollHeight-Math.ceil(U.scrollTop)===U.clientHeight&&O(!1)};return requestAnimationFrame(j),()=>{const U=M.current;U&&U.removeEventListener("scroll",T)}},[]),g.jsx(ir,{contentProps:{...h,className:de("rounded-3xl outline-none",h?.className)},onOpenChange:i,overlayProps:{...f,className:f?.className},...E,children:g.jsxs("div",{...Ot(y,"w-[500px] p-6 text-slate-300"),children:[g.jsx("div",{...Ot(b,"border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800"),children:r}),g.jsxs("div",{ref:M,...Ot(p,"my-6 max-h-[245px] overflow-scroll rounded-md bg-slate-50 p-4 text-center"),children:[n,s]}),g.jsx("div",{...Ot(w,"mt-8 flex justify-between gap-3"),children:g.jsx("button",{disabled:C,onClick:u,...Ot(v,de(HR,"flex-1 bg-gray-800 text-gray-50",C&&"cursor-not-allowed bg-gray-300 hover:scale-100")),children:c})})]})})}const qR=[/^@powerhousedao\/.+$/,"document-drive","document-model"],GR=IC({version:qi({message:"Missing version field in package.json"}),dependencies:Ny(qi(),qi()).nullable(),devDependencies:Ny(qi(),qi()).nullable()}).refine(e=>e.dependencies!=null||e.devDependencies!=null,"package.json must have either dependencies or devDependencies").transform(e=>{const n={...e.dependencies,...e.devDependencies};return{version:e.version,dependencies:Object.fromEntries(Object.entries(n).filter(([r])=>qR.some(s=>typeof s=="string"?s===r:s.test(r))))}});function $R(e){const n=GR.safeParse(e);return n.success?n.data:(console.error("Package.json validation failed:",n.error.format()),!1)}function YR(e){const[n,r]=S.useState(!1),{packageJson:s,phCliVersion:i}=e,u=$R(s);return u?g.jsx(ac,{isOpen:n,onOpenChange:()=>r(!n),title:`App version: ${u.version}`,toggleClassName:"text-gray-900 text-sm",children:g.jsxs("ul",{className:"text-sm text-gray-600",children:[Object.entries(u.dependencies).map(([c,f])=>g.jsxs("li",{className:"my-1 flex justify-between pr-1",children:[g.jsxs("span",{children:[c.replace("@powerhousedao/",""),":"]}),g.jsx("span",{className:"font-normal",children:f})]},c)),i&&g.jsxs("li",{className:"my-1 flex justify-between pr-1",children:[g.jsx("span",{children:"@powerhousedao/ph-cli:"}),g.jsx("span",{className:"font-normal",children:i})]},"ph-cli")]})}):(console.error("Failed to validate package.json data"),null)}function Vk(e){const{packageJson:n,phCliVersion:r}=e;return g.jsxs("div",{className:"bg-white p-3",children:[g.jsx("h2",{className:"font-semibold",children:"About"}),g.jsx("p",{className:"text-sm font-normal text-gray-600",children:"Connect is the hub for your most important documents and processes translated into software. Easily capture data in a structured way with Connect."}),g.jsx("div",{className:"my-4",children:g.jsx(YR,{packageJson:n,phCliVersion:r})})]})}function Bk(e){const{className:n,...r}=e;return g.jsxs("div",{className:xe("h-full rounded-lg bg-white p-3",n),children:[g.jsx("h2",{className:"mb-4 font-semibold",children:"Modify Drives"}),g.jsx(QR,{...r}),g.jsx("h2",{className:"my-4 font-semibold",children:"Local Storage"}),g.jsx(ZR,{...r})]})}function QR(e){const{className:n,...r}=e;return g.jsx("div",{className:n,children:g.jsx(XR,{...r})})}function XR(e){const{className:n,...r}=e;return g.jsx("div",{className:n,children:e.drives.map(s=>g.jsx(KR,{drive:s,...r},s.header.id))})}function KR(e){const{drive:n,className:r,onDeleteDrive:s}=e,[i,u]=S.useState(!1),c=g.jsx(ae,{name:"Hdd",size:16,className:"flex-none"}),f=g.jsx(ae,{name:"Server",size:16,className:"flex-none"}),h=n.state.global.icon?g.jsx("img",{alt:"drive icon",className:"size-4 flex-none object-contain",src:n.state.global.icon}):g.jsx(ae,{name:"M",size:16,className:"flex-none"});function p(){const y=j0(n);return y==="PUBLIC"?h:y==="CLOUD"?f:c}const b=p();return g.jsxs("div",{className:xe("mb-4 flex w-96 items-center gap-2 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 shadow-sm last-of-type:mb-0",r),children:[b,g.jsxs("div",{children:[g.jsx("span",{className:"block text-sm font-medium leading-[18px]",children:jy(n.header.name)}),g.jsxs("div",{className:"flex items-baseline gap-x-2 leading-[18px]",children:[g.jsxs("span",{className:"text-sm text-gray-600",children:[jy(j0(n))," App"]}),g.jsxs("a",{className:"group flex items-center gap-x-2 text-sm text-slate-500 transition-colors hover:text-[#9896FF]",children:["By Powerhouse",g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",className:"size-4 text-gray-400 transition-colors group-hover:text-inherit",children:g.jsx("path",{d:"M7.99365 11.9939C9.46632 11.9939 10.6603 10.7999 10.6603 9.32722V7.32722C10.6603 6.95922 10.3617 6.66056 9.99365 6.66056C9.62565 6.66056 9.32699 6.95922 9.32699 7.32722V9.32722C9.32699 10.0639 8.73032 10.6606 7.99365 10.6606H2.66032C1.92365 10.6606 1.32699 10.0639 1.32699 9.32722V3.99389C1.32699 3.25723 1.92365 2.66056 2.66032 2.66056H4.66032C5.02832 2.66056 5.32699 2.36189 5.32699 1.99389C5.32699 1.6259 5.02832 1.32723 4.66032 1.32723H2.66032C1.18765 1.32723 -0.00634766 2.52123 -0.00634766 3.99389V9.32722C-0.00634766 10.7999 1.18765 11.9939 2.66032 11.9939H7.99365ZM5.32699 7.32722C5.49765 7.32722 5.67565 7.26989 5.80632 7.13989L10.1396 2.80656L11.9937 4.66056V-0.00610352H7.32699L9.18099 1.8479L4.84766 6.18123C4.58766 6.4419 4.58766 6.87922 4.84766 7.13989C4.97832 7.26989 5.15632 7.32722 5.32699 7.32722Z",fill:"currentColor"})})]})]})]}),g.jsx(Ac,{items:[{id:"delete-drive",label:"Delete",icon:g.jsx(ae,{name:"Trash"}),className:"text-red-900"}],onItemClick:y=>{y==="delete-drive"&&s(n)},onOpenChange:u,open:i,children:g.jsx("button",{className:"group ml-auto flex-none",onClick:y=>{y.stopPropagation(),u(!0)},children:g.jsx(ae,{className:"text-gray-600 group-hover:text-gray-900",name:"VerticalDots",size:16})})})]})}function ZR(e){const{onClearStorage:n}=e;return g.jsx("div",{children:g.jsxs("button",{className:"flex items-center gap-x-2 rounded-md border border-gray-300 bg-transparent px-3 py-1 text-sm font-medium text-red-900 transition-colors hover:bg-gray-100",onClick:n,children:["Clear Storage ",g.jsx(ae,{name:"Trash",size:16})]})})}function Fk(e){const{className:n,...r}=e;return g.jsx("div",{className:de("rounded-lg p-3",n),children:g.jsx(JR,{...r})})}function JR(e){const{documentModelEditor:n,setDocumentModelEditor:r,documentModelEditorOptions:s,className:i}=e;return g.jsxs("div",{children:[g.jsx("h3",{className:"mb-4 font-semibold text-gray-900",children:"Default Editor Selection"}),g.jsx(Gh,{className:de("min-w-36 max-w-fit",i),name:"default-editor",required:!0,value:n,options:s,multiple:!1,onChange:u=>r(u)})]})}const WR={npm:{icon:"Npm"},github:{icon:"Github",size:28},local:{icon:"Hdd"}},ez=({packageName:e,provider:n})=>{const r=n&&WR[n];return g.jsxs("div",{className:"flex w-full items-center justify-between px-2 py-1",children:[g.jsx("p",{className:"font-medium",children:e}),r&&g.jsx(ae,{name:r.icon,size:r.size})]})},tz=e=>{const{onInstall:n,packageOptions:r,className:s}=e,[i,u]=S.useState(""),[c,f]=S.useState(!1),[h,p]=S.useState(),b=S.useCallback(()=>{const E=n(i);E?(f(!0),E.then(()=>u("")).catch(p).finally(()=>f(!1))):(u(""),p(void 0))},[n,i]),y=S.useCallback(E=>{u(E.target.value)},[]),v=h?typeof h=="string"?h:h instanceof Error?h.message:h:" ",w=S.useMemo(()=>{const E=r?.map(C=>({...C,value:C.packageName}));return r?.length?{autoComplete:!0,initialOptions:E,fetchOptionsCallback:C=>E?.filter(O=>O.packageName.toLowerCase().includes(C.toLowerCase()))??[],renderOption:C=>g.jsx(ez,{...C})}:{autoComplete:!1}},[r]);return g.jsxs("div",{className:s,children:[g.jsx("h3",{className:"mb-4 font-semibold text-gray-900",children:"Install Package"}),g.jsxs("div",{className:"flex items-center gap-4",children:[r?.length?g.jsx(e5,{...w,onChange:u}):g.jsx(xc,{name:"package",className:"max-w-xs text-gray-700",value:i,onChange:y,onSubmit:b,disabled:c}),g.jsx(In,{className:"h-9 rounded-md text-sm",onClick:b,disabled:c,children:"Install"})]}),g.jsx("p",{className:"mb-3 ml-2 h-3 text-sm text-red-800",children:v})]})},Tu=({label:e,value:n})=>g.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[g.jsxs("p",{className:"text-gray-600",children:[e,":"]}),g.jsx("p",{className:"text-gray-600",children:n})]}),nz=e=>{const{package:{name:n,description:r,category:s,publisher:i,publisherUrl:u,modules:c,id:f,removable:h},mutable:p,onUninstall:b,className:y}=e,[v,w]=S.useState(!1);return g.jsxs("li",{className:de("relative flex flex-col items-start rounded-md border border-gray-200 p-3 text-sm leading-5 shadow-sm",y),children:[g.jsx("h3",{className:"font-semibold text-gray-900",children:n}),g.jsx(Tu,{label:"Description",value:r}),g.jsx(Tu,{label:"Category",value:s}),g.jsx(Tu,{label:"Publisher",value:i}),g.jsx(Tu,{label:"Publisher URL",value:g.jsx("a",{className:"underline",href:u,children:u})}),g.jsx("p",{className:"text-sm text-gray-600",children:"Modules included:"}),g.jsx("ul",{className:"list-disc pl-5",children:c.map(E=>g.jsx("li",{children:g.jsx("span",{className:"text-gray-600",children:E})},E))}),p&&h&&g.jsx(Ac,{items:[{id:"uninstall",label:"Uninstall",icon:g.jsx(ae,{name:"Trash"}),className:"text-red-900"}],onItemClick:E=>{E==="uninstall"&&b(f)},onOpenChange:w,open:v,children:g.jsx("button",{className:"group absolute right-3 top-3",onClick:E=>{E.stopPropagation(),w(!0)},children:g.jsx(ae,{className:"text-gray-600 group-hover:text-gray-900",name:"VerticalDots"})})})]})},az=e=>{const{className:n,packages:r,onUninstall:s,mutable:i,...u}=e,c=S.useCallback(f=>{s(f)},[s]);return g.jsxs("div",{...u,className:de("flex max-h-[370px] flex-col items-stretch overflow-hidden",n),children:[g.jsx("h3",{className:"mb-4 font-semibold text-gray-900",children:"Installed Packages"}),g.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:g.jsx("ul",{className:"flex flex-col items-stretch gap-4 pr-2",children:r.map(f=>g.jsx(nz,{package:f,onUninstall:c,mutable:i},f.id))})})]})},rz=e=>{const{reactorOptions:n,reactor:r,onReactorChange:s,...i}=e,u=S.useCallback(c=>{s(Array.isArray(c)?c.at(-1):c)},[s]);return g.jsxs("div",{...i,children:[g.jsx("h3",{className:"mb-4 font-semibold text-gray-900",children:"Select Reactor"}),g.jsx(Gh,{className:"min-w-36 max-w-fit",name:"reactor",required:!0,value:r,options:n,multiple:!1,onChange:u})]})},Hk=e=>{const{className:n,reactorOptions:r,reactor:s,onReactorChange:i,onInstall:u,packages:c,onUninstall:f,mutable:h,packageOptions:p,...b}=e,y=S.useMemo(()=>p?.filter(v=>!c.find(w=>w.name===v.packageName)),[c,p]);return g.jsxs("div",{...b,className:de("flex h-full flex-1 flex-col rounded-lg p-3",n),children:[g.jsx(rz,{reactor:s,reactorOptions:r,onReactorChange:i,className:"mb-4"}),h&&g.jsx(tz,{onInstall:u,packageOptions:y}),g.jsx(az,{packages:c,onUninstall:f,mutable:h})]})};function qk(e){const{title:n,overlayProps:r,contentProps:s,onOpenChange:i,tabs:u,defaultTab:c,...f}=e,[h,p]=S.useState(c??u.at(0)?.id),b=u.map(w=>g.jsx("button",{type:"button",onClick:()=>p(w.id),children:g.jsxs("div",{className:de("flex h-9 w-48 cursor-pointer items-center gap-x-2 rounded-md pl-3 hover:bg-slate-50",h===w.id?"bg-slate-50":"bg-transparent"),children:[w.icon,g.jsx("span",{children:w.label})]})},w.id)),v=u.find(w=>w.id===h)?.content;return g.jsxs(ir,{contentProps:{...s,className:de("min-h-full w-full max-w-4xl rounded-xl",s?.className),style:{...s?.style,boxShadow:"0px 0px 16px 4px rgba(0, 0, 0, 0.04), 0px 33px 32px -16px rgba(0, 0, 0, 0.10)"}},onOpenChange:i,overlayProps:{...r,className:de("py-28",r?.className)},...f,children:[g.jsxs("div",{className:"flex justify-between border-b border-slate-50 p-4",children:[g.jsx("h1",{className:"text-center text-xl font-semibold",children:n}),g.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-md outline-none",onClick:()=>i?.(!1),children:g.jsx(ae,{name:"XmarkLight",size:24})})]}),g.jsxs("div",{className:"flex flex-1",children:[g.jsx("div",{className:"flex flex-col gap-y-1 p-3 pt-6",children:b}),g.jsx("div",{className:"m-6 flex h-full flex-1 flex-col overflow-hidden rounded-lg border border-slate-50",children:typeof v=="function"?g.jsx(v,{}):v})]})]})}const A1="min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";function Gk(e){const{body:n,header:r,onOpenChange:s,onContinue:i,cancelLabel:u,continueLabel:c,overlayProps:f,contentProps:h,...p}=e;return g.jsx(ir,{contentProps:{...h,className:de("rounded-3xl",h?.className)},onOpenChange:s,overlayProps:{...f,className:f?.className},...p,children:g.jsxs("div",{className:"w-[400px] p-6 text-slate-300",children:[g.jsx("div",{className:"border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800",children:r}),g.jsx("div",{className:"my-6 rounded-md bg-slate-50 p-4 text-center",children:n}),g.jsxs("div",{className:"mt-8 flex justify-between gap-3",children:[g.jsx("button",{className:de(A1,"flex-1 bg-slate-50 text-slate-800"),onClick:()=>s?.(!1),children:u}),g.jsx("button",{className:de(A1,"flex-1 bg-gray-800 text-gray-50"),onClick:i,children:c})]})]})})}function sz(e){const{branch:n="main"}=e;return g.jsxs("button",{className:"flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pl-1 pr-2 text-xs text-stone-300",children:[g.jsx(ae,{name:"Branch"}),g.jsx("span",{children:"BRANCH"}),g.jsx("span",{className:"text-gray-900",children:n})]})}function iz(e){const{docId:n}=e,[,r]=vc();function s(i){return()=>{r(i).catch(u=>{console.error("Failed to copy!",u)})}}return g.jsxs("button",{className:"flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pl-1 pr-2 text-xs text-stone-300",onClick:s(n),children:[g.jsx(ae,{name:"Link"}),"DOC ID",g.jsx("span",{className:"text-gray-900",children:n})]})}const oz=e=>{const{documentState:n,onCopyState:r}=e,[,s]=vc();function i(){const u=JSON.stringify(n,null,2);s(u).then(()=>{r?.()}).catch(c=>{console.error("Failed to copy document state!",c)})}return g.jsx("button",{className:"rounded-lg bg-slate-50 p-1 text-stone-300",onClick:i,children:g.jsx(ae,{name:"CurlyBrackets"})})};function lz(e){const{value:n,onChange:r}=e,s=[{displayValue:"Global scope",value:"global"},{displayValue:"Local scope",value:"local"}];return g.jsx(jm,{absolutePositionMenu:!0,containerClassName:"bg-slate-50 text-gray-500 rounded-lg w-fit text-xs z-10",id:"scope select",itemClassName:"py-2 text-gray-500 grid grid-cols-[auto,auto] gap-1",items:s,menuClassName:"min-w-0 text-gray-500",onChange:r,value:n})}function uz(e){const{title:n,docId:r,scope:s,onChangeScope:i,onClose:u,className:c,documentState:f,onCopyState:h,...p}=e;return g.jsxs("header",{className:de("flex items-center justify-between bg-transparent",c),...p,children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{name:"close-revision-history",className:"shadow-button rounded-lg bg-gray-50 p-1 text-stone-300",onClick:u,children:g.jsx(ae,{name:"VariantArrowLeft"})}),g.jsx("h1",{className:"text-xs",children:n})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(iz,{docId:r}),f&&g.jsx(oz,{documentState:f,onCopyState:h}),g.jsx(sz,{}),g.jsx(lz,{onChange:i,value:s})]})]})}function ks(e,n,r){let s=r.initialDeps??[],i;function u(){var c,f,h,p;let b;r.key&&((c=r.debug)!=null&&c.call(r))&&(b=Date.now());const y=e();if(!(y.length!==s.length||y.some((E,C)=>s[C]!==E)))return i;s=y;let w;if(r.key&&((f=r.debug)!=null&&f.call(r))&&(w=Date.now()),i=n(...y),r.key&&((h=r.debug)!=null&&h.call(r))){const E=Math.round((Date.now()-b)*100)/100,C=Math.round((Date.now()-w)*100)/100,O=C/16,M=(j,T)=>{for(j=String(j);j.length<T;)j=" "+j;return j};console.info(`%c⏱ ${M(C,5)} /${M(E,5)} ms`,`
|
|
51
|
+
font-size: .6rem;
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
color: hsl(${Math.max(0,Math.min(120-120*O,120))}deg 100% 31%);`,r?.key)}return(p=r?.onChange)==null||p.call(r,i),i}return u.updateDeps=c=>{s=c},u}function j1(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const cz=(e,n)=>Math.abs(e-n)<1.01,fz=(e,n,r)=>{let s;return function(...i){e.clearTimeout(s),s=e.setTimeout(()=>n.apply(this,i),r)}},N1=e=>{const{offsetWidth:n,offsetHeight:r}=e;return{width:n,height:r}},dz=e=>e,hz=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),s=[];for(let i=n;i<=r;i++)s.push(i);return s},mz=(e,n)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=c=>{const{width:f,height:h}=c;n({width:Math.round(f),height:Math.round(h)})};if(i(N1(r)),!s.ResizeObserver)return()=>{};const u=new s.ResizeObserver(c=>{const f=()=>{const h=c[0];if(h?.borderBoxSize){const p=h.borderBoxSize[0];if(p){i({width:p.inlineSize,height:p.blockSize});return}}i(N1(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return u.observe(r,{box:"border-box"}),()=>{u.unobserve(r)}},M1={passive:!0},T1=typeof window>"u"?!0:"onscrollend"in window,pz=(e,n)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;let i=0;const u=e.options.useScrollendEvent&&T1?()=>{}:fz(s,()=>{n(i,!1)},e.options.isScrollingResetDelay),c=b=>()=>{const{horizontal:y,isRtl:v}=e.options;i=y?r.scrollLeft*(v&&-1||1):r.scrollTop,u(),n(i,b)},f=c(!0),h=c(!1);h(),r.addEventListener("scroll",f,M1);const p=e.options.useScrollendEvent&&T1;return p&&r.addEventListener("scrollend",h,M1),()=>{r.removeEventListener("scroll",f),p&&r.removeEventListener("scrollend",h)}},gz=(e,n,r)=>{if(n?.borderBoxSize){const s=n.borderBoxSize[0];if(s)return Math.round(s[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},bz=(e,{adjustments:n=0,behavior:r},s)=>{var i,u;const c=e+n;(u=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||u.call(i,{[s.options.horizontal?"left":"top"]:c,behavior:r})};class yz{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const s=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(u=>{const c=()=>{this._measureElement(u.target,u)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),r=null},observe:i=>{var u;return(u=s())==null?void 0:u.observe(i,{box:"border-box"})},unobserve:i=>{var u;return(u=s())==null?void 0:u.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([s,i])=>{typeof i>"u"&&delete r[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:dz,rangeExtractor:hz,onChange:()=>{},measureElement:gz,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,r)},this.maybeNotify=ks(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,u)=>{this.scrollAdjustments=0,this.scrollDirection=u?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=u,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,s)=>{const i=new Map,u=new Map;for(let c=s-1;c>=0;c--){const f=r[c];if(i.has(f.lane))continue;const h=u.get(f.lane);if(h==null||f.end>h.end?u.set(f.lane,f):f.end<h.end&&i.set(f.lane,!0),i.size===this.options.lanes)break}return u.size===this.options.lanes?Array.from(u.values()).sort((c,f)=>c.end===f.end?c.index-f.index:c.end-f.end)[0]:void 0},this.getMeasurementOptions=ks(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,s,i,u,c)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:s,scrollMargin:i,getItemKey:u,enabled:c}),{key:!1}),this.getMeasurements=ks(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:s,scrollMargin:i,getItemKey:u,enabled:c},f)=>{if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const p=this.measurementsCache.slice(0,h);for(let b=h;b<r;b++){const y=u(b),v=this.options.lanes===1?p[b-1]:this.getFurthestMeasurement(p,b),w=v?v.end+this.options.gap:s+i,E=f.get(y),C=typeof E=="number"?E:this.options.estimateSize(b),O=w+C,M=v?v.lane:b%this.options.lanes;p[b]={index:b,start:w,size:C,end:O,key:y,lane:M}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ks(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,s,i,u)=>this.range=r.length>0&&s>0?vz({measurements:r,outerSize:s,scrollOffset:i,lanes:u}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ks(()=>{let r=null,s=null;const i=this.calculateRange();return i&&(r=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,s]},(r,s,i,u,c)=>u===null||c===null?[]:r({startIndex:u,endIndex:c,overscan:s,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{const s=this.options.indexAttribute,i=r.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(r,s)=>{const i=this.indexFromElement(r),u=this.measurementsCache[i];if(!u)return;const c=u.key,f=this.elementsCache.get(c);f!==r&&(f&&this.observer.unobserve(f),this.observer.observe(r),this.elementsCache.set(c,r)),r.isConnected&&this.resizeItem(i,this.options.measureElement(r,s,this))},this.resizeItem=(r,s)=>{const i=this.measurementsCache[r];if(!i)return;const u=this.itemSizeCache.get(i.key)??i.size,c=s-u;c!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,c,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(r,void 0)},this.getVirtualItems=ks(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,s)=>{const i=[];for(let u=0,c=r.length;u<c;u++){const f=r[u],h=s[f];i.push(h)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const s=this.getMeasurements();if(s.length!==0)return j1(s[E2(0,s.length-1,i=>j1(s[i]).start,r)])},this.getOffsetForAlignment=(r,s,i=0)=>{const u=this.getSize(),c=this.getScrollOffset();s==="auto"&&(s=r>=c+u?"end":"start"),s==="center"?r+=(i-u)/2:s==="end"&&(r-=u);const f=this.getTotalSize()+this.options.scrollMargin-u;return Math.max(Math.min(f,r),0)},this.getOffsetForIndex=(r,s="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.measurementsCache[r];if(!i)return;const u=this.getSize(),c=this.getScrollOffset();if(s==="auto")if(i.end>=c+u-this.options.scrollPaddingEnd)s="end";else if(i.start<=c+this.options.scrollPaddingStart)s="start";else return[c,s];const f=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(r,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1));let u=0;const c=10,f=p=>{if(!this.targetWindow)return;const b=this.getOffsetForIndex(r,p);if(!b){console.warn("Failed to get offset for index:",r);return}const[y,v]=b;this._scrollToOffset(y,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const w=this.getScrollOffset(),E=this.getOffsetForIndex(r,v);if(!E){console.warn("Failed to get offset for index:",r);return}cz(E[0],w)||h(v)})},h=p=>{this.targetWindow&&(u++,u<c?this.targetWindow.requestAnimationFrame(()=>f(p)):console.warn(`Failed to scroll to index ${r} after ${c} attempts.`))};f(s)},this.scrollBy=(r,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var r;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=s[s.length-1])==null?void 0:r.end)??0;else{const u=Array(this.options.lanes).fill(null);let c=s.length-1;for(;c>=0&&u.some(f=>f===null);){const f=s[c];u[f.lane]===null&&(u[f.lane]=f.end),c--}i=Math.max(...u.filter(f=>f!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:s,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(n)}}const E2=(e,n,r,s)=>{for(;e<=n;){const i=(e+n)/2|0,u=r(i);if(u<s)e=i+1;else if(u>s)n=i-1;else return i}return e>0?e-1:0};function vz({measurements:e,outerSize:n,scrollOffset:r,lanes:s}){const i=e.length-1,u=h=>e[h].start;if(e.length<=s)return{startIndex:0,endIndex:i};let c=E2(0,i,u,r),f=c;if(s===1)for(;f<i&&e[f].end<r+n;)f++;else if(s>1){const h=Array(s).fill(0);for(;f<i&&h.some(b=>b<r+n);){const b=e[f];h[b.lane]=b.end,f++}const p=Array(s).fill(r+n);for(;c>=0&&p.some(b=>b>=r);){const b=e[c];p[b.lane]=b.start,c--}c=Math.max(0,c-c%s),f=Math.min(i,f+(s-1-f%s))}return{startIndex:c,endIndex:f}}const D1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function xz(e){const n=S.useReducer(()=>({}),{})[1],r={...e,onChange:(i,u)=>{var c;u?q1.flushSync(n):n(),(c=e.onChange)==null||c.call(e,i,u)}},[s]=S.useState(()=>new yz(r));return s.setOptions(r),D1(()=>s._didMount(),[]),D1(()=>s._willUpdate()),s}function Sz(e){return xz({observeElementRect:mz,observeElementOffset:pz,scrollToFn:bz,...e})}function wz(e){return`${e.slice(0,7)}...${e.slice(-5)}`}function Cz(e){const{address:n,chainId:r}=e,[,s]=vc();if(!n)return null;const i=wz(n);function u(f){return()=>{s(f).catch(h=>{console.error("Failed to copy!",h)})}}const c=g.jsxs("button",{className:"flex items-center gap-1",onClick:u(n),children:[n,g.jsx(ae,{className:"inline-block text-gray-600",name:"FilesEarmark",size:16})]});return g.jsx(lr,{content:c,children:g.jsxs("span",{className:"flex w-fit cursor-pointer items-center gap-1 rounded-lg bg-gray-100 p-1 text-xs text-slate-100",children:[g.jsx(r2,{address:n,chainId:r}),i]})})}function Ez(e){const{errors:n}=e,r=!!n?.length,s=r?"text-red-800":"text-green-700",i=r?g.jsx(ae,{name:"Exclamation",size:16}):g.jsx(ae,{name:"Check",size:16}),u=r?`Error: ${n[0]}`:"No errors",c=g.jsxs("span",{className:de("flex w-fit items-center rounded-lg border border-gray-200 px-2 py-1 text-xs",s,r&&"cursor-pointer"),children:[i,g.jsx("span",{className:de("inline-block max-w-36 truncate"),children:u})]}),f=n?.map((h,p)=>g.jsxs("p",{className:"text-red-800",children:["Error: ",h]},p));return r?g.jsx(lr,{content:f,children:c}):c}function Oz(e){const{operationType:n,operationInput:r}=e,s=g.jsx("code",{children:g.jsx("pre",{children:JSON.stringify(r,null,2)})});return g.jsx(lr,{content:s,children:g.jsxs("span",{className:"flex cursor-pointer items-center gap-2 text-xs",children:[n,g.jsx(ae,{className:"text-gray-300",name:"Braces",size:16})]})})}function Az(e){const{operationIndex:n,eventId:r,stateHash:s}=e,[,i]=vc(),u=n+1,c=g.jsxs("button",{className:"flex items-center gap-1",onClick:f(s),children:["Revision ",u," - Event ID: ",r," - State Hash: ",s,g.jsx(ae,{className:"inline-block text-gray-600",name:"FilesEarmark",size:16})]});function f(h){return()=>{i(h).catch(p=>{console.error("Failed to copy!",p)})}}return g.jsx(lr,{content:c,children:g.jsxs("span",{className:"flex cursor-pointer items-center gap-2 text-xs text-gray-600",children:["Revision ",u,".",g.jsx("a",{children:g.jsx(ae,{className:"cursor-pointer text-slate-100",name:"Ellipsis",size:14})})]})})}function jz(e){const{signatures:n}=e;if(!n?.length)return null;const r=g.jsxs("div",{className:"text-xs text-slate-300",children:[g.jsx("h3",{className:"mb-2",children:"Signature details:"}),n.map((s,i)=>g.jsxs("div",{className:"mb-2 last:mb-0",children:[g.jsxs("h4",{children:["Signature #",i+1," -"," ",s.isVerified?"verified":"unverified"]}),g.jsx("code",{children:g.jsx("pre",{children:JSON.stringify(s,null,2)})})]},s.hash))]});return g.jsx(lr,{content:r,children:g.jsxs("span",{className:"flex w-fit cursor-pointer items-center gap-1 rounded-lg border border-gray-200 px-2 py-1",children:[g.jsx(Nz,{signatures:n})," ",g.jsx(ae,{className:"text-gray-300",name:"InfoSquare",size:16})]})})}function Nz(e){const{signatures:n}=e;if(!n?.length)return null;const r=n.length,s=n.filter(f=>f.isVerified).length,u=`${s}/${r} ${r===1?"signature":"signatures"} verified`,c=s===0?"text-red-800":s===r?"text-green-700":"text-orange-700";return g.jsx("span",{className:`text-xs ${c}`,children:u})}function Mz(e){const{timestampUtcMs:n}=e,r=typeof n=="string"&&!n.includes("-")?parseInt(n):n,s=new Date(r),i=Yu(s,"HH:mm 'UTC'"),u=Yu(s,"eee, dd MMM yyyy HH:mm:ss 'UTC'"),c=g.jsx("div",{children:u});return g.jsx(lr,{content:c,children:g.jsxs("span",{className:"cursor-pointer text-xs",children:["committed at ",i]})})}function Tz(e){return g.jsxs("article",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white px-4 py-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Az,{...e}),g.jsx(Oz,{...e}),g.jsx(Cz,{...e}),g.jsx(Mz,{...e})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(jz,{...e}),g.jsx(Ez,{...e})]})]})}const Dz=S.memo(Tz);function Rz(e){const{operationIndex:n,skipCount:r}=e,s=n,i=r===1?`${s}`:`${s} - ${s+1-r}`;return g.jsxs("article",{className:"grid grid-cols-[1fr,auto,1fr] items-center py-2",children:[g.jsx("div",{className:"h-px rounded-full bg-slate-100"}),g.jsxs("div",{className:"mx-3 text-xs text-slate-100",children:["[Skipped Revision ",i,"]"]}),g.jsx("div",{className:"h-px rounded-full bg-slate-100"})]})}function zz(e){const n=[],r=new Set;for(const s of e){if(!s.timestampUtcMs)continue;const i=s.timestampUtcMs.split("T")[0];r.has(i)||(r.add(i),n.push({type:"day",height:32,timestampUtcMs:i})),n.push({type:"revision",height:46,operationIndex:s.index,eventId:s.id??"EVENT_ID_NOT_FOUND",stateHash:s.hash,operationType:s.action.type,operationInput:s.action.input??{},address:s.action?.context?.signer?.user.address,chainId:s.action?.context?.signer?.user.chainId,timestampUtcMs:s.timestampUtcMs,signatures:Lz(s.action?.context?.signer?.signatures??[]),errors:s.error?[s.error]:void 0}),s.skip>0&&n.push({type:"skip",height:34,operationIndex:s.index,skipCount:s.skip,timestampUtcMs:s.timestampUtcMs})}return n}function kz(e){const[n,r,s,i]=e;return{signerAddress:n,hash:r,prevStateHash:s,signatureBytes:i,isVerified:!0}}function Lz(e){return e?.map(kz)}function Uz(e){const{timestampUtcMs:n}=e,r=Yu(n,"MMM dd, yyyy");return g.jsxs("h2",{className:"-ml-6 flex items-center gap-1 bg-slate-50 py-2 text-xs text-slate-100",children:[g.jsx(ae,{name:"Ring",size:16})," Changes on ",r]})}function Iz(e){const{localOperations:n,globalOperations:r,scope:s}=e,i=s==="local"?n:r,u=100,c=S.useMemo(()=>zz(i),[i]),[f,h]=S.useState(0),[p,b]=S.useState(u),[y,v]=S.useState(()=>c.slice(0,p)),w=S.useRef(null),E=y.length<c.length,C=Sz({count:y.length,getScrollElement:()=>w.current,estimateSize:M=>c[M].height,gap:8});S.useEffect(()=>{if(!E)return;const M=Math.floor(f/46),j=u+M;b(T=>j>T?j:T)},[f,E]),S.useEffect(()=>{v(c.slice(0,p))},[c,p]);const O=M=>{h(j=>{const T=j+M.deltaY;return T<0?0:T})};return S.useEffect(()=>(window.addEventListener("wheel",O),()=>{window.removeEventListener("wheel",O)}),[]),g.jsx("div",{className:"border-l border-slate-100",ref:w,style:{height:`${C.getTotalSize()}px`,width:"100%",position:"relative"},children:C.getVirtualItems().map(M=>{const j=y[M.index];return g.jsxs("div",{style:{position:"absolute",top:0,left:16,width:"100%",height:`${M.size}px`,transform:`translateY(${M.start}px)`},children:[j.type==="revision"&&S.createElement(Dz,{...j,key:M.key}),j.type==="skip"&&g.jsx(Rz,{...j},M.key),j.type==="day"&&g.jsx(Uz,{...j},M.key)]},M.index)})})}function $k(e){const{documentTitle:n,documentId:r,globalOperations:s,localOperations:i,onClose:u,itemsPerPage:c=100,documentState:f,onCopyState:h}=e,[p,b]=S.useState("global"),y=S.useMemo(()=>kC(LC(p==="global"?s:i)).sort((Z,re)=>re.index-Z.index),[s,i,p]),{pageItems:v,pages:w,goToPage:E,goToNextPage:C,goToPreviousPage:O,goToFirstPage:M,goToLastPage:j,hiddenNextPages:T,isNextPageAvailable:U,isPreviousPageAvailable:N}=AC(y,{itemsPerPage:c});function R(B){M(),b(B)}const I=y.length>c?g.jsx("div",{className:"mt-4 flex w-full justify-end",children:g.jsx(jC,{firstPageLabel:"First Page",goToFirstPage:M,goToLastPage:j,goToNextPage:C,goToPage:E,goToPreviousPage:O,hiddenNextPages:T,isNextPageAvailable:U,isPreviousPageAvailable:N,lastPageLabel:"Last Page",nextPageLabel:"Next",pages:w,previousPageLabel:"Previous"})}):g.jsx("hr",{className:"h-12 border-none"});return g.jsxs(_5,{children:[g.jsx(uz,{docId:r,onChangeScope:R,onClose:u,scope:p,title:n,documentState:f,onCopyState:h}),I,g.jsx("div",{className:"mt-4 flex justify-center rounded-md bg-slate-50 p-4",children:y.length>0?g.jsx("div",{className:"grid grid-cols-[minmax(min-content,1018px)]",children:g.jsx(Iz,{globalOperations:p==="global"?v:[],localOperations:p==="local"?v:[],scope:p})}):g.jsx("h3",{className:"my-40 text-gray-600",children:"This document has no recorded operations yet."})}),I]})}const _z=function(n){const{icon:r,title:s,description:i,containerClassName:u,active:c,onClick:f}=n;return g.jsx("div",{className:de("relative flex cursor-pointer flex-col items-center justify-center text-center text-sm text-black",u,c&&"bg-white",f&&"cursor-pointer"),onClick:f,children:g.jsx("div",{className:"mx-auto py-4",children:r||g.jsx("div",{className:"size-8 items-center justify-center rounded-lg bg-black pt-1",children:g.jsx("span",{className:"text-6 w-6 text-white",children:s.slice(0,1).toUpperCase()})})})})},Yk=function(n){const{containerClassName:r,onClick:s}=n;return g.jsx(_z,{title:"Create New Drive",icon:g.jsx(ae,{name:"PlusSquare",size:32}),onClick:s,containerClassName:r})},Pz="/assets/renown-short-hover-BiSLBV7L.png",Vz="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAtmSURBVHgB7Z3dbtvmGcefl5LsqHYCq0C6tEUCZ0kDzAFqd0NTYAmweAfr0YD0CrpeQboriH0H6RUsu4ChAYodtCdJD3LQBGttILEBJ4tdJ2uzBoi0yIpsi+S790+ZDkmREilSHySfX6FKpkgliH5+nuf9pKAEkFLO1Bu7VzRNzEuiWfXzglDHSIgZYsYC9b1sCaEeJFZMU66WCnS7XC5vUUwE9Qmk2dndvar+ZpetB5NCxIr6Hr+II1NkgQ7FMeTnHGGygxLhRkGj5agiRRKo3mxeY3EyjkZLR8vl5bCnhxKo2WzOGqb4UpJcCDpH1T+E/wpKY+3gU4XoO0MyCaKyhvVsqifTNNWzVM8y8Hz1rW2pr3ExTDTq+Q3vNPc/lYZ+3S/qwI+iVlDSCJYlZcgDiVqGQdLXJVGTJD47NjV5s9vndP3W6429a8rZpY6LIE6hoB4aMenHMMxgkXqktECBguSBNHhwxMkWiEgt3SRDpbgOukjka8HLxt4VQeaX3uOlIkedrKPr7WjkRWiFv0yXJ/7ecdx7AAWzbsgfnDUPgs1EsWgVykz2QTTaa+melCZqRU1+4C2sO8KJSoe3vAXzZInlyRMoTxAw3MgZXbXEvee6BELdg6EI5zGkLa538gcCRkk1lNzIhXqjseQ8cmiGlbpM2nS+WdA0migViMkvKKx1V00kavr+5OlKRdTw02EEUqnrmvNCBJ1SkQvmvFMsauROQHKmOPHqc/sn6y2/6MMtLsams2X2OgpZhrQM92h6u6OQ5WHadItCliWqSL7quqDAdQ/jpqB5nBDaH6wnv/R1ZKLILS/GBbqEdvdarmP6/pGK5k1f1qg6y8N4gBHevsBSafeKOuSeoqGxPEwAXjcwvUfVQGLedZLGxTPjj9cNKWhWw/9cJ3EAYgLwuqHaZvM4Nus+zAYxAXSkMDGj9TiHYQ7pVEP1BxEzFL6+9T3tvGrS4u/fpzcrRykrcMU8BLb/85yePa/STmOX1h49oSzBAg2BJ0qgw9dPn1OWYIEGzH5LtyKQ8+dnv1QpK7BAA2ZbRRxI42T1wSZlBRZowKw/2u44hnpov9WiLMACDRCI8qK64/ve2sZTygIs0ABZvf848L31je1MRCEWaEA82vxZRaBa4Puoi1bvp78WYoEGxOra457nrD18kvoWGQs0AFYfPLY6DcOdm+4oxAIlzE6jSSsRpEChvbaR3t5pFihBUBR/fft7isq9lY3UpjIWKEHufLceOnV1XHtvzYpeaYMFSgjUPds/9T/OBfEQvdLWtGeBEgDyrCRQDFsS3UqXRCxQTJKSx+ZFbSdVErFAMbi38jBReWwg0Vff3E1FTcQC9YHV2lJRYm1jmwaFXRONu0Si3mi69qEqT5aICQb9NnfurvXd2uqHhfO/pvnzp2kcaHpWp7JAIUHUWX2wNdCo0403Z6Zp8eL7ND1VplHCAvXBuuopXlHFsndi2Cg4O/u2FY1GJRILFBJEnEebz2j94fZQ01UYpqeO0InjlZGIxAL1ADUOJsFjOsY4RJxenHr3OJ05/Tadeuc4DQMWKAC0dtqtnvGKNmGZKBXp4oU5S6hB4hWIm/EHoO8lrfIAa/XHT8NfMsQCHXDirYqqK9J7FytEoLmzp2jYcArzgCiEqRWYUTjuEQnSWPWPSlsoqocB10ARwIJATH7vNrd5FECc35w7SXPnTlmvhwkL1AdokY1DRBqlODYsUAzQmTiqOcwnVTP90kdzIxPHhgWKSXuQ819Di0YQ5sMPzlk90OMAC5QQd1c2rCGOQYIe548v/856Hhe8AvEGU31yYeGcFR0GldLQpbB4aX7kKasXLFAMMM0CJC3RGZWuLqle5TQwcoGGUUsMMgUkLVGa5AEjF+gf/7xDwwQyTb9RpomJIlVmpg96oON1wiUlEeb8pEkekLsUhohnRz10FNpfOiRCr26/rR1IhPGofgtriL14cZ7SBtdAB2AaBx5YZXF29p2+ppBCov/+UlMDs3WKyri1tsLCg6keEJ3QYYjU+mjr50jXosWEaadRW04fLryXSnkACxQARMLk+ah1DUSYP6iJwoDmOoYm0goL1ANEI4gUhTk1XhV2asjFC+cpzbBAIUAqiypRmCiEc9KaumxYoJBAoij7+PSaoAZxxmV8Kw4sUASwj8+LavgWVrcodEa19NIefQALFBGshw9LtyiUhegDWKCIWP1FEXYT84tCGK7IQvQBqe1IxBdwJuRvcbW6Qy/+V09s3A1Ne0SXMODWTugXcq4xO3s6G9EHpFcgNZ61EKG/BSQ1NRU9zVi5OlHqPXfKnvhuD3HYq0qzQq5SGH7z//ynj2LXH+077oSfaO9cNfqrDMkDclcD2Ss4464BQy0UFqS7k+8et0bbo0bNcSe3g6noAf7qm+/6Xv8eNQ3+UY2RZZHctsKsIjxGMVvtY8Q9i+S6GR9nR4s0r6NPklwLlKW7J4+KXAs07ise0gD3RDOxyLVAadiBbNzJtUAvYrSksjKWFZdcC/TvzWhznp1gKIXJsUDYEzFKb7KXSmWamBwLtP7waay+nCwNiMYhlwJh7VfcHedPvJXe/RSTJFcdIdbCwfubsVIXwDykMFM58kBqBdp51bSW3IShgY0zlTRJDT9kaUJYXNIrkJJhFNvNofbh+uc13BMdkYsp2z1j0LBAEcjCQsCkYYFCghmMC2Ny07dxggUKgXWzt0vp27tnGPB8hh6My/7M4wr/qwQAYbDJVJq3XhkGLJAPuJ0AVk9w1OkN10A+oJeZ5QkHC+QD7tCDladMb1L7a4be4I8Xfxv4fpwbo2Cm4trGU262hyCzESjuLZE4CoUjswLZ99bqFzsKMd3JdA3EUWjwZFogjkKDJ/OtMI5CgyXzAtkbPPULR6Hu5KIfaO69eMMRHIWCyYVA7W3l+p8Ez1EomNz0RM/H3BmMo5A/uRGo187xveAo5E+uxsI4CiVPrgTiKJQ8uRuN5yiULLkTiKNQsuRyPhDulBMHjkKvyaVAWJocZ30XR6HX5HZG4pmYtzvgKNQmtwLFHWTlKNQmtwLFneoBOArlfFI9R6H4iHqjKZ0HypO8cRITTHPPHXFVBJKuG19JSQzji58amiRR630awygzTLcbgmhLE0KsOA+a7A8TgFcNKZRAZJo/Og8apkkM44fpdcOUq0hhrggkuQhiAjA9bsAdzWjt3nSdpHIYO8R4QWAxPfWNUaDbWqVSqSmVbjvf0E2DGMaJ2VFAy5VKubzV7kiU9K3zTUPnOohx0zLcTphSfIFnSyBd373u7A+Ca7rBUYhpYyh5vLUx0heeLYGsNGa2jbLRdZNrIcYSxxt9BGk3kL7arw+oVqszxYnJTXXocLpesahRqVAgJr/s64YVgZzoGp22BTocTA2KQpzK8ouuxPHKo6qfZVseILwX1Ru7P6jAteA8NqlGrDVNEJMfkLp29933lBWq53n6jbJr27aO6Ry6Jj/xDrBi2gJ3MOYHQzXZ91rezCNrLUGL3nM7BEJ4klL81XWpesBGTmfZB2nLL2BIKnzmTF02vhPKjk2Xb5BJy97jLVUToajiaJQ9rNaW+m7x6MRcPjY1edPvuq6FTb3eXFKKXeu4SCXDYkGzHkz6QdTRffp62pjLR6emloKu7VkZv3zZuCIK4m/O5v3hxQciFVSBjddMeoAsuolWlgwQR9aEKmWmkY26EOpbrzabsyVJt9SfMxt0DlppmmiLhNf4YJZqPLAFQXGMEXW/gVEnmCPWEvITv5qn41yKQFBKY7KCtPoCjx4tL4W9InKIQDQqGOaSENqnxGSEtjj69JHrFeGd4tydvnNMWyS6rMLdVW/HI5MShBoQNejbfsR5/REJcCiTJZKYl4Jm1QfPEjMmyBoWT2AOj+rQ+REzCY2pIzf7lcbJ/wH9VD8KK3ri6QAAAABJRU5ErkJggg==",Bz=({onLogin:e})=>{const[n,r]=S.useState(!1),s=!n&&!!e,i=n?g.jsx(ae,{name:"Reload",size:14,className:"animate-spin"}):g.jsx("span",{children:"Connect"}),u=()=>{e&&(r(!0),e())};return g.jsxs("div",{className:"p-4",children:[g.jsx("div",{className:"mb-4 flex justify-center",children:g.jsx("div",{className:"flex h-[22px] w-[83px] items-center justify-center overflow-hidden",children:g.jsx(ae,{name:"RenownLight",size:83})})}),g.jsx("button",{onClick:s?u:void 0,className:de("mt-4 flex h-7 w-full cursor-pointer items-center justify-center rounded-lg border border-gray-300 bg-transparent text-sm active:opacity-70",s?"cursor-pointer":"cursor-wait"),type:"button",children:i})]})},Fz=({onLogin:e})=>{const n=g.jsx(Bz,{onLogin:e});return g.jsx(t5,{content:n,children:g.jsxs("div",{className:de("group/sidebar-footer flex w-full items-baseline justify-start text-sm font-semibold leading-10 text-gray-600",e?"cursor-pointer":"cursor-wait"),children:[g.jsx("img",{width:42,height:42,loading:"lazy",className:"group-hover/sidebar-footer:hidden",src:Vz,alt:"Renown Login"}),g.jsx("img",{width:42,height:42,loading:"lazy",className:"hidden group-hover/sidebar-footer:block",src:Pz,alt:"Renown Login Hover"})]})})},Hz=e=>`${e.slice(0,7)}...${e.slice(-5)}`,qz=({address:e,onDisconnect:n,etherscanUrl:r,username:s=""})=>{const[i,u]=S.useState(!1),c=S.useCallback(async f=>{try{await navigator.clipboard.writeText(f),u(!0),setTimeout(()=>u(!1),2e3)}catch(h){console.error("Failed to copy address:",h)}},[]);return g.jsxs("div",{className:"flex flex-col divide-y divide-gray-200 text-gray-900",children:[g.jsxs("div",{className:"px-3 py-2",children:[s&&g.jsx("div",{className:"text-sm font-medium",children:s}),g.jsx("div",{className:"mt-1 flex items-center gap-2",children:g.jsx(In,{size:"small",color:"light",onClick:c.bind(null,e),className:"w-full cursor-pointer bg-transparent p-0 active:opacity-70",type:"button",children:g.jsxs("div",{className:"relative flex w-full items-center gap-1",children:[g.jsxs("div",{className:`flex items-center gap-1 transition-opacity duration-150 ${i?"opacity-0":"opacity-100"}`,children:[g.jsx("span",{className:"text-xs",children:Hz(e)}),g.jsx(ae,{name:"FilesEarmark",color:"#9EA0A1",size:14})]}),g.jsx("div",{className:`absolute left-0 text-xs transition-opacity duration-150 ${i?"opacity-100":"opacity-0"}`,children:"Copied to clipboard!"})]})})})]}),r&&g.jsx("div",{className:"px-3 py-2",children:g.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-gray-900 hover:text-gray-600",children:[g.jsx(ae,{name:"Ethscan",size:14}),"View on Etherscan"]})}),g.jsx("div",{className:"px-3 py-2",children:g.jsxs("button",{onClick:n,className:de("flex w-full items-center gap-2 text-sm text-red-900",n?"cursor-pointer hover:text-red-700":"pointer-events-none cursor-wait"),type:"button",children:[g.jsx(ae,{name:"Disconnect",size:14,color:"#EA4335"}),"Disconnect"]})})]})},Gz=({address:e,etherscanUrl:n,onDisconnect:r})=>{const{data:s}=a2({address:e}),i=s,u=g.jsx(qz,{address:e,username:i,onDisconnect:r,etherscanUrl:n});return g.jsx(t5,{content:u,children:g.jsx("div",{className:"flex items-center justify-center rounded-sm",children:g.jsx(r2,{address:e,size:"40px"})})})},$z=({address:e,className:n,onLogin:r,onClickSettings:s,onDisconnect:i,etherscanUrl:u="",...c})=>g.jsxs(NC,{...c,className:de("flex flex-col gap-2 border-t border-gray-300 px-2 py-4",n),children:[g.jsx("div",{children:e?g.jsx(Gz,{address:e,onDisconnect:i,etherscanUrl:u}):g.jsx(Fz,{onLogin:r})}),g.jsxs("button",{"aria-label":"Settings",type:"button",className:de("mt-3 flex w-full items-center justify-center outline-none",s?"cursor-pointer":"cursor-wait"),onClick:s,children:[g.jsx(ae,{className:"text-gray-600",name:"Settings"}),g.jsx("span",{className:"hidden text-sm font-semibold leading-6 text-gray-800",children:"Settings"})]})]}),Yz=({onClick:e,className:n,children:r,...s})=>g.jsx(MC,{...s,className:de("flex justify-center gap-4 border-b border-gray-300 py-4",n),children:g.jsx("button",{"aria-label":"Home",className:e?"cursor-pointer":"cursor-wait",onClick:e,type:"button",children:g.jsx(ae,{className:"text-gray-600",name:"ConnectSmall",size:24})})}),Qk=({onClick:e,address:n,headerContent:r,onClickSettings:s,maxWidth:i="304px",minWidth:u="58px",onLogin:c,onDisconnect:f,etherscanUrl:h,...p})=>g.jsxs(TC,{...p,maxWidth:i,minWidth:u,children:[g.jsxs(DC,{children:[g.jsx(Yz,{onClick:e,children:r}),g.jsx("div",{className:"flex flex-col",children:p.children})]}),g.jsx($z,{address:n,onClickSettings:s,onLogin:c,onDisconnect:f,etherscanUrl:h})]}),Uo=e=>typeof e=="number"&&!isNaN(e),Ur=e=>typeof e=="string",mn=e=>typeof e=="function",Bu=e=>Ur(e)||mn(e)?e:null,xh=e=>S.isValidElement(e)||Ur(e)||mn(e)||Uo(e);function Qz(e,n,r){r===void 0&&(r=300);const{scrollHeight:s,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=s+"px",i.transition=`all ${r}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(n,r)})})}function Rc(e){let{enter:n,exit:r,appendPosition:s=!1,collapse:i=!0,collapseDuration:u=300}=e;return function(c){let{children:f,position:h,preventExitTransition:p,done:b,nodeRef:y,isIn:v,playToast:w}=c;const E=s?`${n}--${h}`:n,C=s?`${r}--${h}`:r,O=S.useRef(0);return S.useLayoutEffect(()=>{const M=y.current,j=E.split(" "),T=U=>{U.target===y.current&&(w(),M.removeEventListener("animationend",T),M.removeEventListener("animationcancel",T),O.current===0&&U.type!=="animationcancel"&&M.classList.remove(...j))};M.classList.add(...j),M.addEventListener("animationend",T),M.addEventListener("animationcancel",T)},[]),S.useEffect(()=>{const M=y.current,j=()=>{M.removeEventListener("animationend",j),i?Qz(M,b,u):b()};v||(p?j():(O.current=1,M.className+=` ${C}`,M.addEventListener("animationend",j)))},[v]),fe.createElement(fe.Fragment,null,f)}}function R1(e,n){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:n}:{}}const Ht=new Map;let Io=[];const Sh=new Set,Xz=e=>Sh.forEach(n=>n(e)),O2=()=>Ht.size>0;function A2(e,n){var r;if(n)return!((r=Ht.get(n))==null||!r.isToastActive(e));let s=!1;return Ht.forEach(i=>{i.isToastActive(e)&&(s=!0)}),s}function j2(e,n){xh(e)&&(O2()||Io.push({content:e,options:n}),Ht.forEach(r=>{r.buildToast(e,n)}))}function z1(e,n){Ht.forEach(r=>{n!=null&&n!=null&&n.containerId?n?.containerId===r.id&&r.toggle(e,n?.id):r.toggle(e,n?.id)})}function Kz(e){const{subscribe:n,getSnapshot:r,setProps:s}=S.useRef((function(u){const c=u.containerId||1;return{subscribe(f){const h=(function(b,y,v){let w=1,E=0,C=[],O=[],M=[],j=y;const T=new Map,U=new Set,N=()=>{M=Array.from(T.values()),U.forEach(I=>I())},R=I=>{O=I==null?[]:O.filter(B=>B!==I),N()},D=I=>{const{toastId:B,onOpen:Z,updateId:re,children:J}=I.props,Y=re==null;I.staleId&&T.delete(I.staleId),T.set(B,I),O=[...O,I.props.toastId].filter(oe=>oe!==I.staleId),N(),v(R1(I,Y?"added":"updated")),Y&&mn(Z)&&Z(S.isValidElement(J)&&J.props)};return{id:b,props:j,observe:I=>(U.add(I),()=>U.delete(I)),toggle:(I,B)=>{T.forEach(Z=>{B!=null&&B!==Z.props.toastId||mn(Z.toggle)&&Z.toggle(I)})},removeToast:R,toasts:T,clearQueue:()=>{E-=C.length,C=[]},buildToast:(I,B)=>{if((V=>{let{containerId:te,toastId:ne,updateId:se}=V;const pe=te?te!==b:b!==1,he=T.has(ne)&&se==null;return pe||he})(B))return;const{toastId:Z,updateId:re,data:J,staleId:Y,delay:oe}=B,le=()=>{R(Z)},_=re==null;_&&E++;const K={...j,style:j.toastStyle,key:w++,...Object.fromEntries(Object.entries(B).filter(V=>{let[te,ne]=V;return ne!=null})),toastId:Z,updateId:re,data:J,closeToast:le,isIn:!1,className:Bu(B.className||j.toastClassName),bodyClassName:Bu(B.bodyClassName||j.bodyClassName),progressClassName:Bu(B.progressClassName||j.progressClassName),autoClose:!B.isLoading&&(ie=B.autoClose,be=j.autoClose,ie===!1||Uo(ie)&&ie>0?ie:be),deleteToast(){const V=T.get(Z),{onClose:te,children:ne}=V.props;mn(te)&&te(S.isValidElement(ne)&&ne.props),v(R1(V,"removed")),T.delete(Z),E--,E<0&&(E=0),C.length>0?D(C.shift()):N()}};var ie,be;K.closeButton=j.closeButton,B.closeButton===!1||xh(B.closeButton)?K.closeButton=B.closeButton:B.closeButton===!0&&(K.closeButton=!xh(j.closeButton)||j.closeButton);let we=I;S.isValidElement(I)&&!Ur(I.type)?we=S.cloneElement(I,{closeToast:le,toastProps:K,data:J}):mn(I)&&(we=I({closeToast:le,toastProps:K,data:J}));const De={content:we,props:K,staleId:Y};j.limit&&j.limit>0&&E>j.limit&&_?C.push(De):Uo(oe)?setTimeout(()=>{D(De)},oe):D(De)},setProps(I){j=I},setToggle:(I,B)=>{T.get(I).toggle=B},isToastActive:I=>O.some(B=>B===I),getSnapshot:()=>M}})(c,u,Xz);Ht.set(c,h);const p=h.observe(f);return Io.forEach(b=>j2(b.content,b.options)),Io=[],()=>{p(),Ht.delete(c)}},setProps(f){var h;(h=Ht.get(c))==null||h.setProps(f)},getSnapshot(){var f;return(f=Ht.get(c))==null?void 0:f.getSnapshot()}}})(e)).current;s(e);const i=S.useSyncExternalStore(n,r,r);return{getToastToRender:function(u){if(!i)return[];const c=new Map;return e.newestOnTop&&i.reverse(),i.forEach(f=>{const{position:h}=f.props;c.has(h)||c.set(h,[]),c.get(h).push(f)}),Array.from(c,f=>u(f[0],f[1]))},isToastActive:A2,count:i?.length}}function Zz(e){const[n,r]=S.useState(!1),[s,i]=S.useState(!1),u=S.useRef(null),c=S.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:h,closeToast:p,onClick:b,closeOnClick:y}=e;var v,w;function E(){r(!0)}function C(){r(!1)}function O(T){const U=u.current;c.canDrag&&U&&(c.didMove=!0,n&&C(),c.delta=e.draggableDirection==="x"?T.clientX-c.start:T.clientY-c.start,c.start!==T.clientX&&(c.canCloseOnClick=!1),U.style.transform=`translate3d(${e.draggableDirection==="x"?`${c.delta}px, var(--y)`:`0, calc(${c.delta}px + var(--y))`},0)`,U.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function M(){document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",M);const T=u.current;if(c.canDrag&&c.didMove&&T){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();T.style.transition="transform 0.2s, opacity 0.2s",T.style.removeProperty("transform"),T.style.removeProperty("opacity")}}(w=Ht.get((v={id:e.toastId,containerId:e.containerId,fn:r}).containerId||1))==null||w.setToggle(v.id,v.fn),S.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||C(),window.addEventListener("focus",E),window.addEventListener("blur",C),()=>{window.removeEventListener("focus",E),window.removeEventListener("blur",C)}},[e.pauseOnFocusLoss]);const j={onPointerDown:function(T){if(e.draggable===!0||e.draggable===T.pointerType){c.didMove=!1,document.addEventListener("pointermove",O),document.addEventListener("pointerup",M);const U=u.current;c.canCloseOnClick=!0,c.canDrag=!0,U.style.transition="none",e.draggableDirection==="x"?(c.start=T.clientX,c.removalDistance=U.offsetWidth*(e.draggablePercent/100)):(c.start=T.clientY,c.removalDistance=U.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(T){const{top:U,bottom:N,left:R,right:D}=u.current.getBoundingClientRect();T.nativeEvent.type!=="touchend"&&e.pauseOnHover&&T.clientX>=R&&T.clientX<=D&&T.clientY>=U&&T.clientY<=N?C():E()}};return f&&h&&(j.onMouseEnter=C,e.stacked||(j.onMouseLeave=E)),y&&(j.onClick=T=>{b&&b(T),c.canCloseOnClick&&p()}),{playToast:E,pauseToast:C,isRunning:n,preventExitTransition:s,toastRef:u,eventHandlers:j}}function Jz(e){let{delay:n,isRunning:r,closeToast:s,type:i="default",hide:u,className:c,style:f,controlledProgress:h,progress:p,rtl:b,isIn:y,theme:v}=e;const w=u||h&&p===0,E={...f,animationDuration:`${n}ms`,animationPlayState:r?"running":"paused"};h&&(E.transform=`scaleX(${p})`);const C=Yn("Toastify__progress-bar",h?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${v}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":b}),O=mn(c)?c({rtl:b,type:i,defaultClassName:C}):Yn(C,c),M={[h&&p>=1?"onTransitionEnd":"onAnimationEnd"]:h&&p<1?null:()=>{y&&s()}};return fe.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":w},fe.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${v} Toastify__progress-bar--${i}`}),fe.createElement("div",{role:"progressbar","aria-hidden":w?"true":"false","aria-label":"notification timer",className:O,style:E,...M}))}let Wz=1;const N2=()=>""+Wz++;function ek(e){return e&&(Ur(e.toastId)||Uo(e.toastId))?e.toastId:N2()}function so(e,n){return j2(e,n),n.toastId}function uc(e,n){return{...n,type:n&&n.type||e,toastId:ek(n)}}function Du(e){return(n,r)=>so(n,uc(e,r))}function et(e,n){return so(e,uc("default",n))}et.loading=(e,n)=>so(e,uc("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...n})),et.promise=function(e,n,r){let s,{pending:i,error:u,success:c}=n;i&&(s=Ur(i)?et.loading(i,r):et.loading(i.render,{...r,...i}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(b,y,v)=>{if(y==null)return void et.dismiss(s);const w={type:b,...f,...r,data:v},E=Ur(y)?{render:y}:y;return s?et.update(s,{...w,...E}):et(E.render,{...w,...E}),v},p=mn(e)?e():e;return p.then(b=>h("success",c,b)).catch(b=>h("error",u,b)),p},et.success=Du("success"),et.info=Du("info"),et.error=Du("error"),et.warning=Du("warning"),et.warn=et.warning,et.dark=(e,n)=>so(e,uc("default",{theme:"dark",...n})),et.dismiss=function(e){(function(n){var r;if(O2()){if(n==null||Ur(r=n)||Uo(r))Ht.forEach(s=>{s.removeToast(n)});else if(n&&("containerId"in n||"id"in n)){const s=Ht.get(n.containerId);s?s.removeToast(n.id):Ht.forEach(i=>{i.removeToast(n.id)})}}else Io=Io.filter(s=>n!=null&&s.options.toastId!==n)})(e)},et.clearWaitingQueue=function(e){e===void 0&&(e={}),Ht.forEach(n=>{!n.props.limit||e.containerId&&n.id!==e.containerId||n.clearQueue()})},et.isActive=A2,et.update=function(e,n){n===void 0&&(n={});const r=((s,i)=>{var u;let{containerId:c}=i;return(u=Ht.get(c||1))==null?void 0:u.toasts.get(s)})(e,n);if(r){const{props:s,content:i}=r,u={delay:100,...s,...n,toastId:n.toastId||e,updateId:N2()};u.toastId!==e&&(u.staleId=e);const c=u.render||i;delete u.render,so(c,u)}},et.done=e=>{et.update(e,{progress:1})},et.onChange=function(e){return Sh.add(e),()=>{Sh.delete(e)}},et.play=e=>z1(!0,e),et.pause=e=>z1(!1,e);const tk=typeof window<"u"?S.useLayoutEffect:S.useEffect,Ru=e=>{let{theme:n,type:r,isLoading:s,...i}=e;return fe.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...i})},A0={info:function(e){return fe.createElement(Ru,{...e},fe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return fe.createElement(Ru,{...e},fe.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return fe.createElement(Ru,{...e},fe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return fe.createElement(Ru,{...e},fe.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return fe.createElement("div",{className:"Toastify__spinner"})}},nk=e=>{const{isRunning:n,preventExitTransition:r,toastRef:s,eventHandlers:i,playToast:u}=Zz(e),{closeButton:c,children:f,autoClose:h,onClick:p,type:b,hideProgressBar:y,closeToast:v,transition:w,position:E,className:C,style:O,bodyClassName:M,bodyStyle:j,progressClassName:T,progressStyle:U,updateId:N,role:R,progress:D,rtl:I,toastId:B,deleteToast:Z,isIn:re,isLoading:J,closeOnClick:Y,theme:oe}=e,le=Yn("Toastify__toast",`Toastify__toast-theme--${oe}`,`Toastify__toast--${b}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":Y}),_=mn(C)?C({rtl:I,position:E,type:b,defaultClassName:le}):Yn(le,C),K=(function(De){let{theme:V,type:te,isLoading:ne,icon:se}=De,pe=null;const he={theme:V,type:te};return se===!1||(mn(se)?pe=se({...he,isLoading:ne}):S.isValidElement(se)?pe=S.cloneElement(se,he):ne?pe=A0.spinner():(Ae=>Ae in A0)(te)&&(pe=A0[te](he))),pe})(e),ie=!!D||!h,be={closeToast:v,type:b,theme:oe};let we=null;return c===!1||(we=mn(c)?c(be):S.isValidElement(c)?S.cloneElement(c,be):(function(De){let{closeToast:V,theme:te,ariaLabel:ne="close"}=De;return fe.createElement("button",{className:`Toastify__close-button Toastify__close-button--${te}`,type:"button",onClick:se=>{se.stopPropagation(),V(se)},"aria-label":ne},fe.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},fe.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))})(be)),fe.createElement(w,{isIn:re,done:Z,position:E,preventExitTransition:r,nodeRef:s,playToast:u},fe.createElement("div",{id:B,onClick:p,"data-in":re,className:_,...i,style:O,ref:s},fe.createElement("div",{...re&&{role:R},className:mn(M)?M({type:b}):Yn("Toastify__toast-body",M),style:j},K!=null&&fe.createElement("div",{className:Yn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!J})},K),fe.createElement("div",null,f)),we,fe.createElement(Jz,{...N&&!ie?{key:`pb-${N}`}:{},rtl:I,theme:oe,delay:h,isRunning:n,isIn:re,closeToast:v,hide:y,type:b,style:U,className:T,controlledProgress:ie,progress:D||0})))},zc=function(e,n){return n===void 0&&(n=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:n}},ak=Rc(zc("bounce",!0));Rc(zc("slide",!0));Rc(zc("zoom"));Rc(zc("flip"));const rk={position:"top-right",transition:ak,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function sk(e){let n={...rk,...e};const r=e.stacked,[s,i]=S.useState(!0),u=S.useRef(null),{getToastToRender:c,isToastActive:f,count:h}=Kz(n),{className:p,style:b,rtl:y,containerId:v}=n;function w(C){const O=Yn("Toastify__toast-container",`Toastify__toast-container--${C}`,{"Toastify__toast-container--rtl":y});return mn(p)?p({position:C,rtl:y,defaultClassName:O}):Yn(O,Bu(p))}function E(){r&&(i(!0),et.play())}return tk(()=>{if(r){var C;const O=u.current.querySelectorAll('[data-in="true"]'),M=12,j=(C=n.position)==null?void 0:C.includes("top");let T=0,U=0;Array.from(O).reverse().forEach((N,R)=>{const D=N;D.classList.add("Toastify__toast--stacked"),R>0&&(D.dataset.collapsed=`${s}`),D.dataset.pos||(D.dataset.pos=j?"top":"bot");const I=T*(s?.2:1)+(s?0:M*R);D.style.setProperty("--y",`${j?I:-1*I}px`),D.style.setProperty("--g",`${M}`),D.style.setProperty("--s",""+(1-(s?U:0))),T+=D.offsetHeight,U+=.025})}},[s,h,r]),fe.createElement("div",{ref:u,className:"Toastify",id:v,onMouseEnter:()=>{r&&(i(!1),et.pause())},onMouseLeave:E},c((C,O)=>{const M=O.length?{...b}:{...b,pointerEvents:"none"};return fe.createElement("div",{className:w(C),style:M,key:`container-${C}`},O.map(j=>{let{content:T,props:U}=j;return fe.createElement(nk,{...U,stacked:r,collapseAll:E,isIn:f(U.toastId,U.containerId),style:U.style,key:`toast-${U.key}`},T)}))}))}function ik(e){return e==="connect-success"||e==="connect-warning"||e==="connect-loading"||e==="connect-deleted"}function ok(e){if(ik(e)){const n={};switch(e){case"connect-success":n.type="success",n.icon=g.jsx(ae,{className:"text-green-800",name:"CheckCircleFill",size:24});break;case"connect-warning":n.type="warning",n.icon=g.jsx(ae,{className:"text-gray-600",name:"WarningFill",size:24});break;case"connect-loading":n.type="default",n.icon=g.jsx(ae,{className:"text-gray-600",name:"ClockFill",size:24});break;case"connect-deleted":n.type="error",n.icon=g.jsx(ae,{className:"text-red-800",name:"TrashFill",size:24});break}return n}return{type:e}}function Xk(e,n){const{type:r="default",...s}=n||{},i=ok(r);return et(e,{...i,...s})}const lk=({closeToast:e})=>g.jsx("button",{className:"flex items-center text-gray-500 hover:text-gray-600",onClick:e,children:g.jsx(ae,{name:"XmarkLight",size:16})}),Kk=e=>g.jsx(sk,{closeButton:lk,...e}),k1=UT({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),uk=hD({chains:[k1],transports:{[k1.id]:HT()}}),ck=new qD;function Zk(e){const{children:n,wagmiProviderProps:r,queryClientProviderProps:s}=e,{config:i=uk,...u}=r??{},{client:c=ck,...f}=s??{};return g.jsx(gD,{config:i,...u,children:g.jsx(JD,{client:c,...f,children:n})})}export{bO as A,_h as B,Qk as C,Ok as D,Bh as E,Zo as F,UR as G,zk as H,_R as I,PR as J,Ak as K,IR as L,Sz as M,Tk as N,P5 as O,Hk as P,Dk as Q,$k as R,_z as S,Kk as T,wk as U,Zk as W,Ek as a,jk as b,Rk as c,zR as d,Yk as e,xk as f,kk as g,w2 as h,Pk as i,Lk as j,Ck as k,Uk as l,Ik as m,_k as n,Vk as o,Bk as p,Fk as q,qk as r,Gk as s,Xk as t,ge as u,tt as v,v8 as w,Ho as x,HC as y,Sk as z};
|