ocean-brain 0.7.5 → 0.8.1
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/index.js +3 -3
- package/dist/mcp.js +180 -736
- package/package.json +6 -2
- package/server/client/dist/assets/ArrowRight.es-CbA8ey6a.js +1 -0
- package/server/client/dist/assets/{Calendar-Bc2zJueR.js → Calendar-CgWgr1BV.js} +2 -2
- package/server/client/dist/assets/Callout-DKruIT0f.js +1 -0
- package/server/client/dist/assets/Copy.es-DFbgpaNJ.js +1 -0
- package/server/client/dist/assets/Graph-kCltGRlY.js +1 -0
- package/server/client/dist/assets/{Image-DxWhlIDG.js → Image-7W0DZwMo.js} +1 -1
- package/server/client/dist/assets/Image.es-5pXLx9TU.js +1 -0
- package/server/client/dist/assets/Note-BW6Np_5g.js +20 -0
- package/server/client/dist/assets/Plus.es-B0sg64VJ.js +1 -0
- package/server/client/dist/assets/Reminders-C10fHQcl.js +1 -0
- package/server/client/dist/assets/Search-tf2nV4v0.js +1 -0
- package/server/client/dist/assets/{SurfaceCard-CkAVMLPs.js → SurfaceCard-pydtvHfu.js} +1 -1
- package/server/client/dist/assets/Tag-uCoYbISy.js +1 -0
- package/server/client/dist/assets/TagNotes-CqOcQiRw.js +1 -0
- package/server/client/dist/assets/Trash.es-w32Goxfa.js +1 -0
- package/server/client/dist/assets/ViewNotes-slPXXoOY.js +1 -0
- package/server/client/dist/assets/ViewSectionDialog-brTrsF6G.js +102 -0
- package/server/client/dist/assets/Views-B_wsb-XJ.js +1 -0
- package/server/client/dist/assets/{graph-vendor-CUxe67Lr.js → graph-vendor-BAF95C0g.js} +2 -2
- package/server/client/dist/assets/image.api-CYsjXiMr.js +17 -0
- package/server/client/dist/assets/index-BR05aSXr.js +342 -0
- package/server/client/dist/assets/{index-D3BfroIT.js → index-D83QbOcw.js} +1 -1
- package/server/client/dist/assets/{index-C5BGzDgt.css → index-DPI6YoDt.css} +1 -1
- package/server/client/dist/assets/manage-image-BYIhWu56.js +1 -0
- package/server/client/dist/assets/{manage-image-detail-C8Q7K7I3.js → manage-image-detail-6KgmQvbN.js} +1 -1
- package/server/client/dist/assets/mcp-Dd98N9Hq.js +4 -0
- package/server/client/dist/assets/mcp-admin-adapter-DOgBsYpl.js +1 -0
- package/server/client/dist/assets/note-core-CMGUaW1v.js +176 -0
- package/server/client/dist/assets/note-vendor-Hoz9Q4-4.js +54 -0
- package/server/client/dist/assets/{placeholder-Cr_nI8UI.js → placeholder-siHGg9aK.js} +4 -4
- package/server/client/dist/assets/{properties-CvYWJWUM.js → properties-CyVRKgcT.js} +1 -1
- package/server/client/dist/assets/tag.api-CwmC8crB.js +21 -0
- package/server/client/dist/assets/trash-wojQBK9Z.js +1 -0
- package/server/client/dist/assets/{useReminderMutate-CDmIEwsw.js → useReminderMutate-DuVKxpBh.js} +1 -1
- package/server/client/dist/index.html +5 -5
- package/server/dist/app.js +0 -1
- package/server/dist/features/auth/http/api.js +0 -1
- package/server/dist/features/auth/http/login-page.js +272 -5
- package/server/dist/features/auth/http/pages.js +20 -3
- package/server/dist/features/auth/service.js +3 -2
- package/server/dist/features/cache/graphql/cache.field.resolver.js +0 -1
- package/server/dist/features/cache/graphql/cache.mutation.resolver.js +0 -1
- package/server/dist/features/cache/graphql/cache.query.resolver.js +0 -1
- package/server/dist/features/cache/graphql/cache.resolver.js +0 -1
- package/server/dist/features/cache/graphql/cache.type-defs.js +0 -1
- package/server/dist/features/cache/graphql/index.js +0 -1
- package/server/dist/features/image/graphql/image.field.resolver.js +0 -1
- package/server/dist/features/image/graphql/image.mutation.resolver.js +0 -1
- package/server/dist/features/image/graphql/image.query.resolver.js +0 -1
- package/server/dist/features/image/graphql/image.resolver.js +0 -1
- package/server/dist/features/image/graphql/image.type-defs.js +0 -1
- package/server/dist/features/image/graphql/index.js +0 -1
- package/server/dist/features/image/http/upload.js +34 -24
- package/server/dist/features/image/services/delete.js +0 -1
- package/server/dist/features/image/services/upload.js +0 -1
- package/server/dist/features/image/services/validation.js +110 -0
- package/server/dist/features/mcp-admin/http/handlers.js +11 -4
- package/server/dist/features/mcp-admin/service.js +0 -1
- package/server/dist/features/note/graphql/index.js +0 -1
- package/server/dist/features/note/graphql/note.field.resolver.js +0 -1
- package/server/dist/features/note/graphql/note.mutation.resolver.js +0 -1
- package/server/dist/features/note/graphql/note.query.resolver.js +0 -1
- package/server/dist/features/note/graphql/note.resolver.js +0 -1
- package/server/dist/features/note/graphql/note.type-defs.js +0 -1
- package/server/dist/features/note/http/mcp.js +8 -44
- package/server/dist/features/note/services/authoring.js +0 -1
- package/server/dist/features/note/services/cleanup.js +2 -3
- package/server/dist/features/note/services/content-blocks.js +0 -1
- package/server/dist/features/note/services/markdown-intent-write.js +11 -44
- package/server/dist/features/note/services/markdown-patch.js +4 -124
- package/server/dist/features/note/services/properties.js +0 -1
- package/server/dist/features/note/services/search-backfill.js +0 -1
- package/server/dist/features/note/services/search.js +0 -1
- package/server/dist/features/note/services/snapshot.js +0 -1
- package/server/dist/features/note/services/tag-filter.js +0 -1
- package/server/dist/features/note/services/trash.js +0 -1
- package/server/dist/features/note/services/write-conflict.js +0 -1
- package/server/dist/features/note/services/write.js +13 -14
- package/server/dist/features/placeholder/graphql/index.js +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.field.resolver.js +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.resolver.js +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.type-defs.js +0 -1
- package/server/dist/features/reminder/graphql/index.js +0 -1
- package/server/dist/features/reminder/graphql/reminder.field.resolver.js +0 -1
- package/server/dist/features/reminder/graphql/reminder.mutation.resolver.js +0 -1
- package/server/dist/features/reminder/graphql/reminder.query.resolver.js +0 -1
- package/server/dist/features/reminder/graphql/reminder.resolver.js +0 -1
- package/server/dist/features/reminder/graphql/reminder.type-defs.js +0 -1
- package/server/dist/features/tag/graphql/index.js +0 -1
- package/server/dist/features/tag/graphql/tag.field.resolver.js +0 -1
- package/server/dist/features/tag/graphql/tag.mutation.resolver.js +0 -1
- package/server/dist/features/tag/graphql/tag.query.resolver.js +16 -2
- package/server/dist/features/tag/graphql/tag.resolver.js +0 -1
- package/server/dist/features/tag/graphql/tag.type-defs.js +2 -1
- package/server/dist/features/tag/http/mcp.js +0 -1
- package/server/dist/features/tag/services/organization.js +0 -1
- package/server/dist/features/view/graphql/index.js +0 -1
- package/server/dist/features/view/graphql/view.mutation.resolver.js +0 -1
- package/server/dist/features/view/graphql/view.query.resolver.js +0 -1
- package/server/dist/features/view/graphql/view.resolver.js +0 -1
- package/server/dist/features/view/graphql/view.type-defs.js +0 -1
- package/server/dist/features/view/services/workspace.js +0 -1
- package/server/dist/main.js +0 -1
- package/server/dist/models.js +0 -1
- package/server/dist/modules/app-version.js +104 -0
- package/server/dist/modules/auth-guard.js +0 -1
- package/server/dist/modules/auth-mode.js +0 -1
- package/server/dist/modules/auth-redirect.js +0 -1
- package/server/dist/modules/blocknote-markdown-editor.js +53 -0
- package/server/dist/modules/blocknote-tree.js +0 -1
- package/server/dist/modules/blocknote.js +10 -4
- package/server/dist/modules/data-maintenance.js +0 -1
- package/server/dist/modules/error-handler.js +0 -1
- package/server/dist/modules/graphql.js +0 -1
- package/server/dist/modules/logger.js +0 -1
- package/server/dist/modules/mcp-auth.js +62 -2
- package/server/dist/modules/mcp-token.js +0 -1
- package/server/dist/modules/prisma-runtime.js +0 -1
- package/server/dist/modules/rate-limit.js +0 -1
- package/server/dist/modules/recovery-retention.js +0 -1
- package/server/dist/modules/server-events-handler.js +0 -1
- package/server/dist/modules/server-events.js +0 -1
- package/server/dist/modules/session-store.js +0 -1
- package/server/dist/modules/use-async.js +0 -1
- package/server/dist/paths.js +1 -1
- package/server/dist/routes/api.js +2 -9
- package/server/dist/routes/auth-pages.js +0 -1
- package/server/dist/routes/client.js +51 -2
- package/server/dist/routes/graphql.js +0 -1
- package/server/dist/routes/index.js +0 -1
- package/server/dist/routes/mcp.js +0 -1
- package/server/dist/schema/index.js +0 -1
- package/server/dist/start.js +0 -1
- package/server/dist/types/index.js +0 -1
- package/server/dist/types/input.js +0 -1
- package/server/client/dist/assets/Callout-B4kA_Cvr.js +0 -1
- package/server/client/dist/assets/Graph-uq5jfJgt.js +0 -1
- package/server/client/dist/assets/Image.es-BpAOJjJT.js +0 -1
- package/server/client/dist/assets/Note-Bo8ZYRP-.js +0 -22
- package/server/client/dist/assets/Plus.es-Dc_js8AC.js +0 -1
- package/server/client/dist/assets/Reminders-lj7Equld.js +0 -1
- package/server/client/dist/assets/Search-1wcRO5--.js +0 -1
- package/server/client/dist/assets/Tag-CeygwFfv.js +0 -1
- package/server/client/dist/assets/TagNotes-B8DqItxw.js +0 -1
- package/server/client/dist/assets/Trash.es-OuQVb_SX.js +0 -1
- package/server/client/dist/assets/ViewNotes-BH7PbdOD.js +0 -1
- package/server/client/dist/assets/ViewSectionTableRenderer-BJwhd5be.js +0 -102
- package/server/client/dist/assets/Views-eYFtsdFj.js +0 -1
- package/server/client/dist/assets/image.api-C0eYGCeH.js +0 -17
- package/server/client/dist/assets/index-jIfkRdY_.js +0 -361
- package/server/client/dist/assets/manage-image-C0YwkLIP.js +0 -1
- package/server/client/dist/assets/mcp-DHHhTLC8.js +0 -1
- package/server/client/dist/assets/note-core-Z6kqulGB.js +0 -180
- package/server/client/dist/assets/note-vendor-i1M2FSI2.js +0 -54
- package/server/client/dist/assets/trash-DA27aW7L.js +0 -1
- package/server/client/dist/fonts/Pretendard-Bold.woff +0 -0
- package/server/client/dist/fonts/Pretendard-Regular.woff +0 -0
- package/server/dist/app.js.map +0 -1
- package/server/dist/features/auth/http/api.js.map +0 -1
- package/server/dist/features/auth/http/login-page.js.map +0 -1
- package/server/dist/features/auth/http/pages.js.map +0 -1
- package/server/dist/features/auth/service.js.map +0 -1
- package/server/dist/features/cache/graphql/cache.field.resolver.js.map +0 -1
- package/server/dist/features/cache/graphql/cache.mutation.resolver.js.map +0 -1
- package/server/dist/features/cache/graphql/cache.query.resolver.js.map +0 -1
- package/server/dist/features/cache/graphql/cache.resolver.js.map +0 -1
- package/server/dist/features/cache/graphql/cache.type-defs.js.map +0 -1
- package/server/dist/features/cache/graphql/index.js.map +0 -1
- package/server/dist/features/image/graphql/image.field.resolver.js.map +0 -1
- package/server/dist/features/image/graphql/image.mutation.resolver.js.map +0 -1
- package/server/dist/features/image/graphql/image.query.resolver.js.map +0 -1
- package/server/dist/features/image/graphql/image.resolver.js.map +0 -1
- package/server/dist/features/image/graphql/image.type-defs.js.map +0 -1
- package/server/dist/features/image/graphql/index.js.map +0 -1
- package/server/dist/features/image/http/upload.js.map +0 -1
- package/server/dist/features/image/services/delete.js.map +0 -1
- package/server/dist/features/image/services/remote-fetch.js +0 -176
- package/server/dist/features/image/services/remote-fetch.js.map +0 -1
- package/server/dist/features/image/services/upload.js.map +0 -1
- package/server/dist/features/mcp-admin/http/handlers.js.map +0 -1
- package/server/dist/features/mcp-admin/service.js.map +0 -1
- package/server/dist/features/note/graphql/index.js.map +0 -1
- package/server/dist/features/note/graphql/note.field.resolver.js.map +0 -1
- package/server/dist/features/note/graphql/note.mutation.resolver.js.map +0 -1
- package/server/dist/features/note/graphql/note.query.resolver.js.map +0 -1
- package/server/dist/features/note/graphql/note.resolver.js.map +0 -1
- package/server/dist/features/note/graphql/note.type-defs.js.map +0 -1
- package/server/dist/features/note/http/mcp.js.map +0 -1
- package/server/dist/features/note/services/authoring.js.map +0 -1
- package/server/dist/features/note/services/cleanup.js.map +0 -1
- package/server/dist/features/note/services/content-blocks.js.map +0 -1
- package/server/dist/features/note/services/markdown-intent-write.js.map +0 -1
- package/server/dist/features/note/services/markdown-patch.js.map +0 -1
- package/server/dist/features/note/services/properties.js.map +0 -1
- package/server/dist/features/note/services/search-backfill.js.map +0 -1
- package/server/dist/features/note/services/search.js.map +0 -1
- package/server/dist/features/note/services/snapshot.js.map +0 -1
- package/server/dist/features/note/services/tag-filter.js.map +0 -1
- package/server/dist/features/note/services/trash.js.map +0 -1
- package/server/dist/features/note/services/write-conflict.js.map +0 -1
- package/server/dist/features/note/services/write.js.map +0 -1
- package/server/dist/features/placeholder/graphql/index.js.map +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.field.resolver.js.map +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js.map +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js.map +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.resolver.js.map +0 -1
- package/server/dist/features/placeholder/graphql/placeholder.type-defs.js.map +0 -1
- package/server/dist/features/reminder/graphql/index.js.map +0 -1
- package/server/dist/features/reminder/graphql/reminder.field.resolver.js.map +0 -1
- package/server/dist/features/reminder/graphql/reminder.mutation.resolver.js.map +0 -1
- package/server/dist/features/reminder/graphql/reminder.query.resolver.js.map +0 -1
- package/server/dist/features/reminder/graphql/reminder.resolver.js.map +0 -1
- package/server/dist/features/reminder/graphql/reminder.type-defs.js.map +0 -1
- package/server/dist/features/tag/graphql/index.js.map +0 -1
- package/server/dist/features/tag/graphql/tag.field.resolver.js.map +0 -1
- package/server/dist/features/tag/graphql/tag.mutation.resolver.js.map +0 -1
- package/server/dist/features/tag/graphql/tag.query.resolver.js.map +0 -1
- package/server/dist/features/tag/graphql/tag.resolver.js.map +0 -1
- package/server/dist/features/tag/graphql/tag.type-defs.js.map +0 -1
- package/server/dist/features/tag/http/mcp.js.map +0 -1
- package/server/dist/features/tag/services/organization.js.map +0 -1
- package/server/dist/features/view/graphql/index.js.map +0 -1
- package/server/dist/features/view/graphql/view.mutation.resolver.js.map +0 -1
- package/server/dist/features/view/graphql/view.query.resolver.js.map +0 -1
- package/server/dist/features/view/graphql/view.resolver.js.map +0 -1
- package/server/dist/features/view/graphql/view.type-defs.js.map +0 -1
- package/server/dist/features/view/services/workspace.js.map +0 -1
- package/server/dist/main.js.map +0 -1
- package/server/dist/models.js.map +0 -1
- package/server/dist/modules/auth-guard.js.map +0 -1
- package/server/dist/modules/auth-mode.js.map +0 -1
- package/server/dist/modules/auth-redirect.js.map +0 -1
- package/server/dist/modules/blocknote-tree.js.map +0 -1
- package/server/dist/modules/blocknote.js.map +0 -1
- package/server/dist/modules/data-maintenance.js.map +0 -1
- package/server/dist/modules/error-handler.js.map +0 -1
- package/server/dist/modules/graphql.js.map +0 -1
- package/server/dist/modules/logger.js.map +0 -1
- package/server/dist/modules/mcp-auth.js.map +0 -1
- package/server/dist/modules/mcp-token.js.map +0 -1
- package/server/dist/modules/prisma-runtime.js.map +0 -1
- package/server/dist/modules/rate-limit.js.map +0 -1
- package/server/dist/modules/recovery-retention.js.map +0 -1
- package/server/dist/modules/server-events-handler.js.map +0 -1
- package/server/dist/modules/server-events.js.map +0 -1
- package/server/dist/modules/session-store.js.map +0 -1
- package/server/dist/modules/use-async.js.map +0 -1
- package/server/dist/paths.js.map +0 -1
- package/server/dist/routes/api.js.map +0 -1
- package/server/dist/routes/auth-pages.js.map +0 -1
- package/server/dist/routes/client.js.map +0 -1
- package/server/dist/routes/graphql.js.map +0 -1
- package/server/dist/routes/index.js.map +0 -1
- package/server/dist/routes/mcp.js.map +0 -1
- package/server/dist/schema/index.js.map +0 -1
- package/server/dist/start.js.map +0 -1
- package/server/dist/types/index.js.map +0 -1
- package/server/dist/types/input.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{r as Pc,g as rp,a as y,R as Gc,b as dt}from"./graph-vendor-BAF95C0g.js";import{$ as j4,p as D4,q as H4,U as L4,s as z4,n as k4,r as V4,P as B4,a as $4,y as U4,g as P4,b as zm,D as Gd,c as G4,M as Z4,m as q4,e as I4,w as xt,_ as gc,T as Y4,N as F4,i as X4,d as Q4,L as K4,I as J4,f as Do,h as Xt,j as mi,Z as Pl,k as We,C as Zc,K as cc,l as pi,O as W4,o as qc,t as zn,Y as km,V as p0,u as ew,v as tw,x as gy,A as nw,z as vy,B as by,E as ow,F as lw,G as hi,W as rw,H as yy,J as aw,Q as iw,R as h0,S as sw,X as cw,a0 as uw,a1 as fw,a2 as dw,a3 as Me,a4 as Vm}from"./note-core-CMGUaW1v.js";var Zd={exports:{}},ai={};var g0;function mw(){if(g0)return ai;g0=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function l(a,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var f in s)f!=="key"&&(c[f]=s[f])}else c=s;return s=c.ref,{$$typeof:t,type:a,key:u,ref:s!==void 0?s:null,props:c}}return ai.Fragment=o,ai.jsx=l,ai.jsxs=l,ai}var v0;function pw(){return v0||(v0=1,Zd.exports=mw()),Zd.exports}var g=pw(),qd={exports:{}},ii={},Id={exports:{}},Yd={};var b0;function hw(){return b0||(b0=1,(function(t){function o(L,z){var _=L.length;L.push(z);e:for(;0<_;){var U=_-1>>>1,X=L[U];if(0<s(X,z))L[U]=z,L[_]=X,_=U;else break e}}function l(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var z=L[0],_=L.pop();if(_!==z){L[0]=_;e:for(var U=0,X=L.length,ae=X>>>1;U<ae;){var oe=2*(U+1)-1,J=L[oe],ge=oe+1,ie=L[ge];if(0>s(J,_))ge<X&&0>s(ie,J)?(L[U]=ie,L[ge]=_,U=ge):(L[U]=J,L[oe]=_,U=oe);else if(ge<X&&0>s(ie,_))L[U]=ie,L[ge]=_,U=ge;else break e}}return z}function s(L,z){var _=L.sortIndex-z.sortIndex;return _!==0?_:L.id-z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var m=[],h=[],v=1,b=null,x=3,S=!1,E=!1,w=!1,R=!1,M=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var z=l(h);z!==null;){if(z.callback===null)a(h);else if(z.startTime<=L)a(h),z.sortIndex=z.expirationTime,o(m,z);else break;z=l(h)}}function H(L){if(w=!1,N(L),!E)if(l(m)!==null)E=!0,V||(V=!0,re());else{var z=l(h);z!==null&&I(H,z.startTime-L)}}var V=!1,$=-1,F=5,Q=-1;function Z(){return R?!0:!(t.unstable_now()-Q<F)}function ee(){if(R=!1,V){var L=t.unstable_now();Q=L;var z=!0;try{e:{E=!1,w&&(w=!1,O($),$=-1),S=!0;var _=x;try{t:{for(N(L),b=l(m);b!==null&&!(b.expirationTime>L&&Z());){var U=b.callback;if(typeof U=="function"){b.callback=null,x=b.priorityLevel;var X=U(b.expirationTime<=L);if(L=t.unstable_now(),typeof X=="function"){b.callback=X,N(L),z=!0;break t}b===l(m)&&a(m),N(L)}else a(m);b=l(m)}if(b!==null)z=!0;else{var ae=l(h);ae!==null&&I(H,ae.startTime-L),z=!1}}break e}finally{b=null,x=_,S=!1}z=void 0}}finally{z?re():V=!1}}}var re;if(typeof A=="function")re=function(){A(ee)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,j=ne.port2;ne.port1.onmessage=ee,re=function(){j.postMessage(null)}}else re=function(){M(ee,0)};function I(L,z){$=M(function(){L(t.unstable_now())},z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(L){switch(x){case 1:case 2:case 3:var z=3;break;default:z=x}var _=x;x=z;try{return L()}finally{x=_}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(L,z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var _=x;x=L;try{return z()}finally{x=_}},t.unstable_scheduleCallback=function(L,z,_){var U=t.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?U+_:U):_=U,L){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=_+X,L={id:v++,callback:z,priorityLevel:L,startTime:_,expirationTime:X,sortIndex:-1},_>U?(L.sortIndex=_,o(h,L),l(m)===null&&L===l(h)&&(w?(O($),$=-1):w=!0,I(H,_-U))):(L.sortIndex=X,o(m,L),E||S||(E=!0,V||(V=!0,re()))),L},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(L){var z=x;return function(){var _=x;x=z;try{return L.apply(this,arguments)}finally{x=_}}}})(Yd)),Yd}var y0;function gw(){return y0||(y0=1,Id.exports=hw()),Id.exports}var Fd={exports:{}},_t={};var x0;function vw(){if(x0)return _t;x0=1;var t=Pc();function o(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var a={d:{f:l,r:function(){throw Error(o(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(m,h,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:m,containerInfo:h,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,_t.createPortal=function(m,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(o(299));return c(m,h,null,v)},_t.flushSync=function(m){var h=u.T,v=a.p;try{if(u.T=null,a.p=2,m)return m()}finally{u.T=h,a.p=v,a.d.f()}},_t.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},_t.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},_t.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var v=h.as,b=f(v,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:S}):v==="script"&&a.d.X(m,{crossOrigin:b,integrity:x,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_t.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=f(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},_t.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,b=f(v,h.crossOrigin);a.d.L(m,v,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_t.preloadModule=function(m,h){if(typeof m=="string")if(h){var v=f(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},_t.requestFormReset=function(m){a.d.r(m)},_t.unstable_batchedUpdates=function(m,h){return m(h)},_t.useFormState=function(m,h,v){return u.H.useFormState(m,h,v)},_t.useFormStatus=function(){return u.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var S0;function xy(){if(S0)return Fd.exports;S0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(o){console.error(o)}}return t(),Fd.exports=vw(),Fd.exports}var C0;function bw(){if(C0)return ii;C0=1;var t=gw(),o=Pc(),l=xy();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function f(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(a(188))}function h(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(a(188));return n!==e?null:e}for(var r=e,i=n;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(i=d.return,i!==null){r=i;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return m(d),e;if(p===i)return m(d),n;p=p.sibling}throw Error(a(188))}if(r.return!==i.return)r=d,i=p;else{for(var C=!1,T=d.child;T;){if(T===r){C=!0,r=d,i=p;break}if(T===i){C=!0,i=d,r=p;break}T=T.sibling}if(!C){for(T=p.child;T;){if(T===r){C=!0,r=p,i=d;break}if(T===i){C=!0,i=p,r=d;break}T=T.sibling}if(!C)throw Error(a(189))}}if(r.alternate!==i)throw Error(a(190))}if(r.tag!==3)throw Error(a(188));return r.stateNode.current===r?e:n}function v(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=v(e),n!==null)return n;e=e.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function j(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case M:return"Profiler";case R:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case A:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case N:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return n=e.displayName||null,n!==null?n:j(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return j(e(n))}catch{}}return null}var I=Array.isArray,L=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_={pending:!1,data:null,method:null,action:null},U=[],X=-1;function ae(e){return{current:e}}function oe(e){0>X||(e.current=U[X],U[X]=null,X--)}function J(e,n){X++,U[X]=e.current,e.current=n}var ge=ae(null),ie=ae(null),Ce=ae(null),ze=ae(null);function Te(e,n){switch(J(Ce,n),J(ie,e),J(ge,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?kv(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=kv(n),e=Vv(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}oe(ge),J(ge,e)}function Se(){oe(ge),oe(ie),oe(Ce)}function Xe(e){e.memoizedState!==null&&J(ze,e);var n=ge.current,r=Vv(n,e.type);n!==r&&(J(ie,e),J(ge,r))}function et(e){ie.current===e&&(oe(ge),oe(ie)),ze.current===e&&(oe(ze),ni._currentValue=_)}var de,ce;function me(e){if(de===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",ce=-1<r.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+de+e+ce}var ke=!1;function qe(e,n){if(!e||ke)return"";ke=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(n){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(Y){var q=Y}Reflect.construct(e,[],te)}else{try{te.call()}catch(Y){q=Y}e.call(te.prototype)}}else{try{throw Error()}catch(Y){q=Y}(te=e())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(Y){if(Y&&q&&typeof Y.stack=="string")return[Y.stack,q.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=i.DetermineComponentFrameRoot(),C=p[0],T=p[1];if(C&&T){var D=C.split(`
|
|
4
|
+
`),G=T.split(`
|
|
5
|
+
`);for(d=i=0;i<D.length&&!D[i].includes("DetermineComponentFrameRoot");)i++;for(;d<G.length&&!G[d].includes("DetermineComponentFrameRoot");)d++;if(i===D.length||d===G.length)for(i=D.length-1,d=G.length-1;1<=i&&0<=d&&D[i]!==G[d];)d--;for(;1<=i&&0<=d;i--,d--)if(D[i]!==G[d]){if(i!==1||d!==1)do if(i--,d--,0>d||D[i]!==G[d]){var K=`
|
|
6
|
+
`+D[i].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=i&&0<=d);break}}}finally{ke=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?me(r):""}function Oe(e,n){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me("Lazy");case 13:return e.child!==n&&n!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return qe(e.type,!1);case 11:return qe(e.type.render,!1);case 1:return qe(e.type,!0);case 31:return me("Activity");default:return""}}function mt(e){try{var n="",r=null;do n+=Oe(e,r),r=e,e=e.return;while(e);return n}catch(i){return`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}}var Pe=Object.prototype.hasOwnProperty,it=t.unstable_scheduleCallback,kt=t.unstable_cancelCallback,pn=t.unstable_shouldYield,Wt=t.unstable_requestPaint,lt=t.unstable_now,Fl=t.unstable_getCurrentPriorityLevel,ma=t.unstable_ImmediatePriority,bt=t.unstable_UserBlockingPriority,Xl=t.unstable_NormalPriority,Ou=t.unstable_LowPriority,Di=t.unstable_IdlePriority,Au=t.log,fo=t.unstable_setDisableYieldValue,pa=null,en=null;function Bo(e){if(typeof Au=="function"&&fo(e),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(pa,e)}catch{}}var tn=Math.clz32?Math.clz32:bS,gS=Math.log,vS=Math.LN2;function bS(e){return e>>>=0,e===0?32:31-(gS(e)/vS|0)|0}var Hi=256,Li=262144,zi=4194304;function Cl(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ki(e,n,r){var i=e.pendingLanes;if(i===0)return 0;var d=0,p=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var T=i&134217727;return T!==0?(i=T&~p,i!==0?d=Cl(i):(C&=T,C!==0?d=Cl(C):r||(r=T&~e,r!==0&&(d=Cl(r))))):(T=i&~p,T!==0?d=Cl(T):C!==0?d=Cl(C):r||(r=i&~e,r!==0&&(d=Cl(r)))),d===0?0:n!==0&&n!==d&&(n&p)===0&&(p=d&-d,r=n&-n,p>=r||p===32&&(r&4194048)!==0)?n:d}function ha(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function yS(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 bh(){var e=zi;return zi<<=1,(zi&62914560)===0&&(zi=4194304),e}function _u(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function ga(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xS(e,n,r,i,d,p){var C=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var T=e.entanglements,D=e.expirationTimes,G=e.hiddenUpdates;for(r=C&~r;0<r;){var K=31-tn(r),te=1<<K;T[K]=0,D[K]=-1;var q=G[K];if(q!==null)for(G[K]=null,K=0;K<q.length;K++){var Y=q[K];Y!==null&&(Y.lane&=-536870913)}r&=~te}i!==0&&yh(e,i,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(C&~n))}function yh(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var i=31-tn(n);e.entangledLanes|=n,e.entanglements[i]=e.entanglements[i]|1073741824|r&261930}function xh(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var i=31-tn(r),d=1<<i;d&n|e[i]&n&&(e[i]|=n),r&=~d}}function Sh(e,n){var r=n&-n;return r=(r&42)!==0?1:Nu(r),(r&(e.suspendedLanes|n))!==0?0:r}function Nu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ch(){var e=z.p;return e!==0?e:(e=window.event,e===void 0?32:i0(e.type))}function wh(e,n){var r=z.p;try{return z.p=e,n()}finally{z.p=r}}var $o=Math.random().toString(36).slice(2),Et="__reactFiber$"+$o,Vt="__reactProps$"+$o,Ql="__reactContainer$"+$o,Du="__reactEvents$"+$o,SS="__reactListeners$"+$o,CS="__reactHandles$"+$o,Eh="__reactResources$"+$o,va="__reactMarker$"+$o;function Hu(e){delete e[Et],delete e[Vt],delete e[Du],delete e[SS],delete e[CS]}function Kl(e){var n=e[Et];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Ql]||r[Et]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=qv(e);e!==null;){if(r=e[Et])return r;e=qv(e)}return n}e=r,r=e.parentNode}return null}function Jl(e){if(e=e[Et]||e[Ql]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ba(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function Wl(e){var n=e[Eh];return n||(n=e[Eh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ct(e){e[va]=!0}var Rh=new Set,Th={};function wl(e,n){er(e,n),er(e+"Capture",n)}function er(e,n){for(Th[e]=n,e=0;e<n.length;e++)Rh.add(n[e])}var wS=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]*$"),Mh={},Oh={};function ES(e){return Pe.call(Oh,e)?!0:Pe.call(Mh,e)?!1:wS.test(e)?Oh[e]=!0:(Mh[e]=!0,!1)}function Vi(e,n,r){if(ES(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var i=n.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function Bi(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+r)}}function mo(e,n,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+i)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ah(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function RS(e,n,r){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,p=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(C){r=""+C,p.call(this,C)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return r},setValue:function(C){r=""+C},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Lu(e){if(!e._valueTracker){var n=Ah(e)?"checked":"value";e._valueTracker=RS(e,n,""+e[n])}}function _h(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),i="";return e&&(i=Ah(e)?e.checked?"true":"false":e.value),e=i,e!==r?(n.setValue(e),!0):!1}function $i(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var TS=/[\n"\\]/g;function gn(e){return e.replace(TS,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function zu(e,n,r,i,d,p,C,T){e.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.type=C:e.removeAttribute("type"),n!=null?C==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+hn(n)):e.value!==""+hn(n)&&(e.value=""+hn(n)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),n!=null?ku(e,C,hn(n)):r!=null?ku(e,C,hn(r)):i!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+hn(T):e.removeAttribute("name")}function Nh(e,n,r,i,d,p,C,T){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){Lu(e);return}r=r!=null?""+hn(r):"",n=n!=null?""+hn(n):r,T||n===e.value||(e.value=n),e.defaultValue=n}i=i??d,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=T?e.checked:!!i,e.defaultChecked=!!i,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.name=C),Lu(e)}function ku(e,n,r){n==="number"&&$i(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function tr(e,n,r,i){if(e=e.options,n){n={};for(var d=0;d<r.length;d++)n["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=n.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&i&&(e[r].defaultSelected=!0)}else{for(r=""+hn(r),n=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function jh(e,n,r){if(n!=null&&(n=""+hn(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+hn(r):""}function Dh(e,n,r,i){if(n==null){if(i!=null){if(r!=null)throw Error(a(92));if(I(i)){if(1<i.length)throw Error(a(93));i=i[0]}r=i}r==null&&(r=""),n=r}r=hn(n),e.defaultValue=r,i=e.textContent,i===r&&i!==""&&i!==null&&(e.value=i),Lu(e)}function nr(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var MS=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 Hh(e,n,r){var i=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?i?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":i?e.setProperty(n,r):typeof r!="number"||r===0||MS.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function Lh(e,n,r){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,r!=null){for(var i in r)!r.hasOwnProperty(i)||n!=null&&n.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var d in n)i=n[d],n.hasOwnProperty(d)&&r[d]!==i&&Hh(e,d,i)}else for(var p in n)n.hasOwnProperty(p)&&Hh(e,p,n[p])}function Vu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var OS=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"]]),AS=/^[\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 Ui(e){return AS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function po(){}var Bu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var or=null,lr=null;function zh(e){var n=Jl(e);if(n&&(e=n.stateNode)){var r=e[Vt]||null;e:switch(e=n.stateNode,n.type){case"input":if(zu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+gn(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var i=r[n];if(i!==e&&i.form===e.form){var d=i[Vt]||null;if(!d)throw Error(a(90));zu(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<r.length;n++)i=r[n],i.form===e.form&&_h(i)}break e;case"textarea":jh(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&tr(e,!!r.multiple,n,!1)}}}var Uu=!1;function kh(e,n,r){if(Uu)return e(n,r);Uu=!0;try{var i=e(n);return i}finally{if(Uu=!1,(or!==null||lr!==null)&&(Os(),or&&(n=or,e=lr,lr=or=null,zh(n),e)))for(n=0;n<e.length;n++)zh(e[n])}}function ya(e,n){var r=e.stateNode;if(r===null)return null;var i=r[Vt]||null;if(i===null)return null;r=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(a(231,n,typeof r));return r}var ho=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pu=!1;if(ho)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){Pu=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch{Pu=!1}var Uo=null,Gu=null,Pi=null;function Vh(){if(Pi)return Pi;var e,n=Gu,r=n.length,i,d="value"in Uo?Uo.value:Uo.textContent,p=d.length;for(e=0;e<r&&n[e]===d[e];e++);var C=r-e;for(i=1;i<=C&&n[r-i]===d[p-i];i++);return Pi=d.slice(e,1<i?1-i:void 0)}function Gi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Zi(){return!0}function Bh(){return!1}function Bt(e){function n(r,i,d,p,C){this._reactName=r,this._targetInst=d,this.type=i,this.nativeEvent=p,this.target=C,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(r=e[T],this[T]=r?r(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Zi:Bh,this.isPropagationStopped=Bh,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),n}var El={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qi=Bt(El),Sa=b({},El,{view:0,detail:0}),_S=Bt(Sa),Zu,qu,Ca,Ii=b({},Sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ca&&(Ca&&e.type==="mousemove"?(Zu=e.screenX-Ca.screenX,qu=e.screenY-Ca.screenY):qu=Zu=0,Ca=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:qu}}),$h=Bt(Ii),NS=b({},Ii,{dataTransfer:0}),jS=Bt(NS),DS=b({},Sa,{relatedTarget:0}),Iu=Bt(DS),HS=b({},El,{animationName:0,elapsedTime:0,pseudoElement:0}),LS=Bt(HS),zS=b({},El,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kS=Bt(zS),VS=b({},El,{data:0}),Uh=Bt(VS),BS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$S={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"},US={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function PS(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=US[e])?!!n[e]:!1}function Yu(){return PS}var GS=b({},Sa,{key:function(e){if(e.key){var n=BS[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Gi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$S[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yu,charCode:function(e){return e.type==="keypress"?Gi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ZS=Bt(GS),qS=b({},Ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Bt(qS),IS=b({},Sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yu}),YS=Bt(IS),FS=b({},El,{propertyName:0,elapsedTime:0,pseudoElement:0}),XS=Bt(FS),QS=b({},Ii,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),KS=Bt(QS),JS=b({},El,{newState:0,oldState:0}),WS=Bt(JS),eC=[9,13,27,32],Fu=ho&&"CompositionEvent"in window,wa=null;ho&&"documentMode"in document&&(wa=document.documentMode);var tC=ho&&"TextEvent"in window&&!wa,Gh=ho&&(!Fu||wa&&8<wa&&11>=wa),Zh=" ",qh=!1;function Ih(e,n){switch(e){case"keyup":return eC.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rr=!1;function nC(e,n){switch(e){case"compositionend":return Yh(n);case"keypress":return n.which!==32?null:(qh=!0,Zh);case"textInput":return e=n.data,e===Zh&&qh?null:e;default:return null}}function oC(e,n){if(rr)return e==="compositionend"||!Fu&&Ih(e,n)?(e=Vh(),Pi=Gu=Uo=null,rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Gh&&n.locale!=="ko"?null:n.data;default:return null}}var lC={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 Fh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!lC[e.type]:n==="textarea"}function Xh(e,n,r,i){or?lr?lr.push(i):lr=[i]:or=i,n=Ls(n,"onChange"),0<n.length&&(r=new qi("onChange","change",null,r,i),e.push({event:r,listeners:n}))}var Ea=null,Ra=null;function rC(e){Nv(e,0)}function Yi(e){var n=ba(e);if(_h(n))return e}function Qh(e,n){if(e==="change")return n}var Kh=!1;if(ho){var Xu;if(ho){var Qu="oninput"in document;if(!Qu){var Jh=document.createElement("div");Jh.setAttribute("oninput","return;"),Qu=typeof Jh.oninput=="function"}Xu=Qu}else Xu=!1;Kh=Xu&&(!document.documentMode||9<document.documentMode)}function Wh(){Ea&&(Ea.detachEvent("onpropertychange",eg),Ra=Ea=null)}function eg(e){if(e.propertyName==="value"&&Yi(Ra)){var n=[];Xh(n,Ra,e,$u(e)),kh(rC,n)}}function aC(e,n,r){e==="focusin"?(Wh(),Ea=n,Ra=r,Ea.attachEvent("onpropertychange",eg)):e==="focusout"&&Wh()}function iC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yi(Ra)}function sC(e,n){if(e==="click")return Yi(n)}function cC(e,n){if(e==="input"||e==="change")return Yi(n)}function uC(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:uC;function Ta(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),i=Object.keys(n);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var d=r[i];if(!Pe.call(n,d)||!nn(e[d],n[d]))return!1}return!0}function tg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ng(e,n){var r=tg(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=n&&i>=n)return{node:r,offset:n-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tg(r)}}function og(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?og(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function lg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=$i(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=$i(e.document)}return n}function Ku(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var fC=ho&&"documentMode"in document&&11>=document.documentMode,ar=null,Ju=null,Ma=null,Wu=!1;function rg(e,n,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wu||ar==null||ar!==$i(i)||(i=ar,"selectionStart"in i&&Ku(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Ma&&Ta(Ma,i)||(Ma=i,i=Ls(Ju,"onSelect"),0<i.length&&(n=new qi("onSelect","select",null,n,r),e.push({event:n,listeners:i}),n.target=ar)))}function Rl(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var ir={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionrun:Rl("Transition","TransitionRun"),transitionstart:Rl("Transition","TransitionStart"),transitioncancel:Rl("Transition","TransitionCancel"),transitionend:Rl("Transition","TransitionEnd")},ef={},ag={};ho&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete ir.animationend.animation,delete ir.animationiteration.animation,delete ir.animationstart.animation),"TransitionEvent"in window||delete ir.transitionend.transition);function Tl(e){if(ef[e])return ef[e];if(!ir[e])return e;var n=ir[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in ag)return ef[e]=n[r];return e}var ig=Tl("animationend"),sg=Tl("animationiteration"),cg=Tl("animationstart"),dC=Tl("transitionrun"),mC=Tl("transitionstart"),pC=Tl("transitioncancel"),ug=Tl("transitionend"),fg=new Map,tf="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(" ");tf.push("scrollEnd");function _n(e,n){fg.set(e,n),wl(n,[e])}var Fi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},vn=[],sr=0,nf=0;function Xi(){for(var e=sr,n=nf=sr=0;n<e;){var r=vn[n];vn[n++]=null;var i=vn[n];vn[n++]=null;var d=vn[n];vn[n++]=null;var p=vn[n];if(vn[n++]=null,i!==null&&d!==null){var C=i.pending;C===null?d.next=d:(d.next=C.next,C.next=d),i.pending=d}p!==0&&dg(r,d,p)}}function Qi(e,n,r,i){vn[sr++]=e,vn[sr++]=n,vn[sr++]=r,vn[sr++]=i,nf|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function of(e,n,r,i){return Qi(e,n,r,i),Ki(e)}function Ml(e,n){return Qi(e,null,null,n),Ki(e)}function dg(e,n,r){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,i=p.alternate,i!==null&&(i.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&n!==null&&(d=31-tn(r),e=p.hiddenUpdates,i=e[d],i===null?e[d]=[n]:i.push(n),n.lane=r|536870912),p):null}function Ki(e){if(50<Xa)throw Xa=0,md=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var cr={};function hC(e,n,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,n,r,i){return new hC(e,n,r,i)}function lf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function go(e,n){var r=e.alternate;return r===null?(r=on(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function mg(e,n){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Ji(e,n,r,i,d,p){var C=0;if(i=e,typeof e=="function")lf(e)&&(C=1);else if(typeof e=="string")C=x4(e,r,ge.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=on(31,r,n,d),e.elementType=Q,e.lanes=p,e;case w:return Ol(r.children,d,p,n);case R:C=8,d|=24;break;case M:return e=on(12,r,n,d|2),e.elementType=M,e.lanes=p,e;case H:return e=on(13,r,n,d),e.elementType=H,e.lanes=p,e;case V:return e=on(19,r,n,d),e.elementType=V,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:C=10;break e;case O:C=9;break e;case N:C=11;break e;case $:C=14;break e;case F:C=16,i=null;break e}C=29,r=Error(a(130,e===null?"null":typeof e,"")),i=null}return n=on(C,r,n,d),n.elementType=e,n.type=i,n.lanes=p,n}function Ol(e,n,r,i){return e=on(7,e,i,n),e.lanes=r,e}function rf(e,n,r){return e=on(6,e,null,n),e.lanes=r,e}function pg(e){var n=on(18,null,null,0);return n.stateNode=e,n}function af(e,n,r){return n=on(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var hg=new WeakMap;function bn(e,n){if(typeof e=="object"&&e!==null){var r=hg.get(e);return r!==void 0?r:(n={value:e,source:n,stack:mt(n)},hg.set(e,n),n)}return{value:e,source:n,stack:mt(n)}}var ur=[],fr=0,Wi=null,Oa=0,yn=[],xn=0,Po=null,Zn=1,qn="";function vo(e,n){ur[fr++]=Oa,ur[fr++]=Wi,Wi=e,Oa=n}function gg(e,n,r){yn[xn++]=Zn,yn[xn++]=qn,yn[xn++]=Po,Po=e;var i=Zn;e=qn;var d=32-tn(i)-1;i&=~(1<<d),r+=1;var p=32-tn(n)+d;if(30<p){var C=d-d%5;p=(i&(1<<C)-1).toString(32),i>>=C,d-=C,Zn=1<<32-tn(n)+d|r<<d|i,qn=p+e}else Zn=1<<p|r<<d|i,qn=e}function sf(e){e.return!==null&&(vo(e,1),gg(e,1,0))}function cf(e){for(;e===Wi;)Wi=ur[--fr],ur[fr]=null,Oa=ur[--fr],ur[fr]=null;for(;e===Po;)Po=yn[--xn],yn[xn]=null,qn=yn[--xn],yn[xn]=null,Zn=yn[--xn],yn[xn]=null}function vg(e,n){yn[xn++]=Zn,yn[xn++]=qn,yn[xn++]=Po,Zn=n.id,qn=n.overflow,Po=e}var Rt=null,tt=null,De=!1,Go=null,Sn=!1,uf=Error(a(519));function Zo(e){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Aa(bn(n,e)),uf}function bg(e){var n=e.stateNode,r=e.type,i=e.memoizedProps;switch(n[Et]=e,n[Vt]=i,r){case"dialog":_e("cancel",n),_e("close",n);break;case"iframe":case"object":case"embed":_e("load",n);break;case"video":case"audio":for(r=0;r<Ka.length;r++)_e(Ka[r],n);break;case"source":_e("error",n);break;case"img":case"image":case"link":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"input":_e("invalid",n),Nh(n,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":_e("invalid",n);break;case"textarea":_e("invalid",n),Dh(n,i.value,i.defaultValue,i.children)}r=i.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||i.suppressHydrationWarning===!0||Lv(n.textContent,r)?(i.popover!=null&&(_e("beforetoggle",n),_e("toggle",n)),i.onScroll!=null&&_e("scroll",n),i.onScrollEnd!=null&&_e("scrollend",n),i.onClick!=null&&(n.onclick=po),n=!0):n=!1,n||Zo(e,!0)}function yg(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:Rt=Rt.return}}function dr(e){if(e!==Rt)return!1;if(!De)return yg(e),De=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Od(e.type,e.memoizedProps)),r=!r),r&&tt&&Zo(e),yg(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));tt=Zv(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));tt=Zv(e)}else n===27?(n=tt,ll(e.type)?(e=Dd,Dd=null,tt=e):tt=n):tt=Rt?wn(e.stateNode.nextSibling):null;return!0}function Al(){tt=Rt=null,De=!1}function ff(){var e=Go;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Go=null),e}function Aa(e){Go===null?Go=[e]:Go.push(e)}var df=ae(null),_l=null,bo=null;function qo(e,n,r){J(df,n._currentValue),n._currentValue=r}function yo(e){e._currentValue=df.current,oe(df)}function mf(e,n,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===r)break;e=e.return}}function pf(e,n,r,i){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var C=d.child;p=p.firstContext;e:for(;p!==null;){var T=p;p=d;for(var D=0;D<n.length;D++)if(T.context===n[D]){p.lanes|=r,T=p.alternate,T!==null&&(T.lanes|=r),mf(p.return,r,e),i||(C=null);break e}p=T.next}}else if(d.tag===18){if(C=d.return,C===null)throw Error(a(341));C.lanes|=r,p=C.alternate,p!==null&&(p.lanes|=r),mf(C,r,e),C=null}else C=d.child;if(C!==null)C.return=d;else for(C=d;C!==null;){if(C===e){C=null;break}if(d=C.sibling,d!==null){d.return=C.return,C=d;break}C=C.return}d=C}}function mr(e,n,r,i){e=null;for(var d=n,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var C=d.alternate;if(C===null)throw Error(a(387));if(C=C.memoizedProps,C!==null){var T=d.type;nn(d.pendingProps.value,C.value)||(e!==null?e.push(T):e=[T])}}else if(d===ze.current){if(C=d.alternate,C===null)throw Error(a(387));C.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(ni):e=[ni])}d=d.return}e!==null&&pf(n,e,r,i),n.flags|=262144}function es(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nl(e){_l=e,bo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return xg(_l,e)}function ts(e,n){return _l===null&&Nl(e),xg(e,n)}function xg(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},bo===null){if(e===null)throw Error(a(308));bo=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else bo=bo.next=n;return r}var gC=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,i){e.push(i)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},vC=t.unstable_scheduleCallback,bC=t.unstable_NormalPriority,pt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hf(){return{controller:new gC,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&vC(bC,function(){e.controller.abort()})}var Na=null,gf=0,pr=0,hr=null;function yC(e,n){if(Na===null){var r=Na=[];gf=0,pr=yd(),hr={status:"pending",value:void 0,then:function(i){r.push(i)}}}return gf++,n.then(Sg,Sg),n}function Sg(){if(--gf===0&&Na!==null){hr!==null&&(hr.status="fulfilled");var e=Na;Na=null,pr=0,hr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function xC(e,n){var r=[],i={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){i.status="fulfilled",i.value=n;for(var d=0;d<r.length;d++)(0,r[d])(n)},function(d){for(i.status="rejected",i.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),i}var Cg=L.S;L.S=function(e,n){rv=lt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&yC(e,n),Cg!==null&&Cg(e,n)};var jl=ae(null);function vf(){var e=jl.current;return e!==null?e:Qe.pooledCache}function ns(e,n){n===null?J(jl,jl.current):J(jl,n.pool)}function wg(){var e=vf();return e===null?null:{parent:pt._currentValue,pool:e}}var gr=Error(a(460)),bf=Error(a(474)),os=Error(a(542)),ls={then:function(){}};function Eg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rg(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(po,po),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Mg(e),e;default:if(typeof n.status=="string")n.then(po,po);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(i){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=i}},function(i){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=i}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Mg(e),e}throw Hl=n,gr}}function Dl(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Hl=r,gr):r}}var Hl=null;function Tg(){if(Hl===null)throw Error(a(459));var e=Hl;return Hl=null,e}function Mg(e){if(e===gr||e===os)throw Error(a(483))}var vr=null,ja=0;function rs(e){var n=ja;return ja+=1,vr===null&&(vr=[]),Rg(vr,e,n)}function Da(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function as(e,n){throw n.$$typeof===x?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Og(e){function n(B,k){if(e){var P=B.deletions;P===null?(B.deletions=[k],B.flags|=16):P.push(k)}}function r(B,k){if(!e)return null;for(;k!==null;)n(B,k),k=k.sibling;return null}function i(B){for(var k=new Map;B!==null;)B.key!==null?k.set(B.key,B):k.set(B.index,B),B=B.sibling;return k}function d(B,k){return B=go(B,k),B.index=0,B.sibling=null,B}function p(B,k,P){return B.index=P,e?(P=B.alternate,P!==null?(P=P.index,P<k?(B.flags|=67108866,k):P):(B.flags|=67108866,k)):(B.flags|=1048576,k)}function C(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function T(B,k,P,W){return k===null||k.tag!==6?(k=rf(P,B.mode,W),k.return=B,k):(k=d(k,P),k.return=B,k)}function D(B,k,P,W){var he=P.type;return he===w?K(B,k,P.props.children,W,P.key):k!==null&&(k.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===F&&Dl(he)===k.type)?(k=d(k,P.props),Da(k,P),k.return=B,k):(k=Ji(P.type,P.key,P.props,null,B.mode,W),Da(k,P),k.return=B,k)}function G(B,k,P,W){return k===null||k.tag!==4||k.stateNode.containerInfo!==P.containerInfo||k.stateNode.implementation!==P.implementation?(k=af(P,B.mode,W),k.return=B,k):(k=d(k,P.children||[]),k.return=B,k)}function K(B,k,P,W,he){return k===null||k.tag!==7?(k=Ol(P,B.mode,W,he),k.return=B,k):(k=d(k,P),k.return=B,k)}function te(B,k,P){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=rf(""+k,B.mode,P),k.return=B,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case S:return P=Ji(k.type,k.key,k.props,null,B.mode,P),Da(P,k),P.return=B,P;case E:return k=af(k,B.mode,P),k.return=B,k;case F:return k=Dl(k),te(B,k,P)}if(I(k)||re(k))return k=Ol(k,B.mode,P,null),k.return=B,k;if(typeof k.then=="function")return te(B,rs(k),P);if(k.$$typeof===A)return te(B,ts(B,k),P);as(B,k)}return null}function q(B,k,P,W){var he=k!==null?k.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return he!==null?null:T(B,k,""+P,W);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case S:return P.key===he?D(B,k,P,W):null;case E:return P.key===he?G(B,k,P,W):null;case F:return P=Dl(P),q(B,k,P,W)}if(I(P)||re(P))return he!==null?null:K(B,k,P,W,null);if(typeof P.then=="function")return q(B,k,rs(P),W);if(P.$$typeof===A)return q(B,k,ts(B,P),W);as(B,P)}return null}function Y(B,k,P,W,he){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return B=B.get(P)||null,T(k,B,""+W,he);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case S:return B=B.get(W.key===null?P:W.key)||null,D(k,B,W,he);case E:return B=B.get(W.key===null?P:W.key)||null,G(k,B,W,he);case F:return W=Dl(W),Y(B,k,P,W,he)}if(I(W)||re(W))return B=B.get(P)||null,K(k,B,W,he,null);if(typeof W.then=="function")return Y(B,k,P,rs(W),he);if(W.$$typeof===A)return Y(B,k,P,ts(k,W),he);as(k,W)}return null}function se(B,k,P,W){for(var he=null,Be=null,fe=k,Ee=k=0,je=null;fe!==null&&Ee<P.length;Ee++){fe.index>Ee?(je=fe,fe=null):je=fe.sibling;var $e=q(B,fe,P[Ee],W);if($e===null){fe===null&&(fe=je);break}e&&fe&&$e.alternate===null&&n(B,fe),k=p($e,k,Ee),Be===null?he=$e:Be.sibling=$e,Be=$e,fe=je}if(Ee===P.length)return r(B,fe),De&&vo(B,Ee),he;if(fe===null){for(;Ee<P.length;Ee++)fe=te(B,P[Ee],W),fe!==null&&(k=p(fe,k,Ee),Be===null?he=fe:Be.sibling=fe,Be=fe);return De&&vo(B,Ee),he}for(fe=i(fe);Ee<P.length;Ee++)je=Y(fe,B,Ee,P[Ee],W),je!==null&&(e&&je.alternate!==null&&fe.delete(je.key===null?Ee:je.key),k=p(je,k,Ee),Be===null?he=je:Be.sibling=je,Be=je);return e&&fe.forEach(function(cl){return n(B,cl)}),De&&vo(B,Ee),he}function ye(B,k,P,W){if(P==null)throw Error(a(151));for(var he=null,Be=null,fe=k,Ee=k=0,je=null,$e=P.next();fe!==null&&!$e.done;Ee++,$e=P.next()){fe.index>Ee?(je=fe,fe=null):je=fe.sibling;var cl=q(B,fe,$e.value,W);if(cl===null){fe===null&&(fe=je);break}e&&fe&&cl.alternate===null&&n(B,fe),k=p(cl,k,Ee),Be===null?he=cl:Be.sibling=cl,Be=cl,fe=je}if($e.done)return r(B,fe),De&&vo(B,Ee),he;if(fe===null){for(;!$e.done;Ee++,$e=P.next())$e=te(B,$e.value,W),$e!==null&&(k=p($e,k,Ee),Be===null?he=$e:Be.sibling=$e,Be=$e);return De&&vo(B,Ee),he}for(fe=i(fe);!$e.done;Ee++,$e=P.next())$e=Y(fe,B,Ee,$e.value,W),$e!==null&&(e&&$e.alternate!==null&&fe.delete($e.key===null?Ee:$e.key),k=p($e,k,Ee),Be===null?he=$e:Be.sibling=$e,Be=$e);return e&&fe.forEach(function(N4){return n(B,N4)}),De&&vo(B,Ee),he}function Fe(B,k,P,W){if(typeof P=="object"&&P!==null&&P.type===w&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case S:e:{for(var he=P.key;k!==null;){if(k.key===he){if(he=P.type,he===w){if(k.tag===7){r(B,k.sibling),W=d(k,P.props.children),W.return=B,B=W;break e}}else if(k.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===F&&Dl(he)===k.type){r(B,k.sibling),W=d(k,P.props),Da(W,P),W.return=B,B=W;break e}r(B,k);break}else n(B,k);k=k.sibling}P.type===w?(W=Ol(P.props.children,B.mode,W,P.key),W.return=B,B=W):(W=Ji(P.type,P.key,P.props,null,B.mode,W),Da(W,P),W.return=B,B=W)}return C(B);case E:e:{for(he=P.key;k!==null;){if(k.key===he)if(k.tag===4&&k.stateNode.containerInfo===P.containerInfo&&k.stateNode.implementation===P.implementation){r(B,k.sibling),W=d(k,P.children||[]),W.return=B,B=W;break e}else{r(B,k);break}else n(B,k);k=k.sibling}W=af(P,B.mode,W),W.return=B,B=W}return C(B);case F:return P=Dl(P),Fe(B,k,P,W)}if(I(P))return se(B,k,P,W);if(re(P)){if(he=re(P),typeof he!="function")throw Error(a(150));return P=he.call(P),ye(B,k,P,W)}if(typeof P.then=="function")return Fe(B,k,rs(P),W);if(P.$$typeof===A)return Fe(B,k,ts(B,P),W);as(B,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,k!==null&&k.tag===6?(r(B,k.sibling),W=d(k,P),W.return=B,B=W):(r(B,k),W=rf(P,B.mode,W),W.return=B,B=W),C(B)):r(B,k)}return function(B,k,P,W){try{ja=0;var he=Fe(B,k,P,W);return vr=null,he}catch(fe){if(fe===gr||fe===os)throw fe;var Be=on(29,fe,null,B.mode);return Be.lanes=W,Be.return=B,Be}}}var Ll=Og(!0),Ag=Og(!1),Io=!1;function yf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fo(e,n,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ue&2)!==0){var d=i.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),i.pending=n,n=Ki(e),dg(e,null,r),n}return Qi(e,i,n,r),Ki(e)}function Ha(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var i=n.lanes;i&=e.pendingLanes,r|=i,n.lanes=r,xh(e,r)}}function Sf(e,n){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var C={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=C:p=p.next=C,r=r.next}while(r!==null);p===null?d=p=n:p=p.next=n}else d=p=n;r={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:i.shared,callbacks:i.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var Cf=!1;function La(){if(Cf){var e=hr;if(e!==null)throw e}}function za(e,n,r,i){Cf=!1;var d=e.updateQueue;Io=!1;var p=d.firstBaseUpdate,C=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var D=T,G=D.next;D.next=null,C===null?p=G:C.next=G,C=D;var K=e.alternate;K!==null&&(K=K.updateQueue,T=K.lastBaseUpdate,T!==C&&(T===null?K.firstBaseUpdate=G:T.next=G,K.lastBaseUpdate=D))}if(p!==null){var te=d.baseState;C=0,K=G=D=null,T=p;do{var q=T.lane&-536870913,Y=q!==T.lane;if(Y?(Ne&q)===q:(i&q)===q){q!==0&&q===pr&&(Cf=!0),K!==null&&(K=K.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var se=e,ye=T;q=n;var Fe=r;switch(ye.tag){case 1:if(se=ye.payload,typeof se=="function"){te=se.call(Fe,te,q);break e}te=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ye.payload,q=typeof se=="function"?se.call(Fe,te,q):se,q==null)break e;te=b({},te,q);break e;case 2:Io=!0}}q=T.callback,q!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=d.callbacks,Y===null?d.callbacks=[q]:Y.push(q))}else Y={lane:q,tag:T.tag,payload:T.payload,callback:T.callback,next:null},K===null?(G=K=Y,D=te):K=K.next=Y,C|=q;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;Y=T,T=Y.next,Y.next=null,d.lastBaseUpdate=Y,d.shared.pending=null}}while(!0);K===null&&(D=te),d.baseState=D,d.firstBaseUpdate=G,d.lastBaseUpdate=K,p===null&&(d.shared.lanes=0),Wo|=C,e.lanes=C,e.memoizedState=te}}function _g(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function Ng(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)_g(r[e],n)}var br=ae(null),is=ae(0);function jg(e,n){e=Oo,J(is,e),J(br,n),Oo=e|n.baseLanes}function wf(){J(is,Oo),J(br,br.current)}function Ef(){Oo=is.current,oe(br),oe(is)}var ln=ae(null),Cn=null;function Xo(e){var n=e.alternate;J(ut,ut.current&1),J(ln,e),Cn===null&&(n===null||br.current!==null||n.memoizedState!==null)&&(Cn=e)}function Rf(e){J(ut,ut.current),J(ln,e),Cn===null&&(Cn=e)}function Dg(e){e.tag===22?(J(ut,ut.current),J(ln,e),Cn===null&&(Cn=e)):Qo()}function Qo(){J(ut,ut.current),J(ln,ln.current)}function rn(e){oe(ln),Cn===e&&(Cn=null),oe(ut)}var ut=ae(0);function ss(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Nd(r)||jd(r)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var xo=0,we=null,Ie=null,ht=null,cs=!1,yr=!1,zl=!1,us=0,ka=0,xr=null,SC=0;function st(){throw Error(a(321))}function Tf(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!nn(e[r],n[r]))return!1;return!0}function Mf(e,n,r,i,d,p){return xo=p,we=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=e===null||e.memoizedState===null?g1:Pf,zl=!1,p=r(i,d),zl=!1,yr&&(p=Lg(n,r,i,d)),Hg(e),p}function Hg(e){L.H=$a;var n=Ie!==null&&Ie.next!==null;if(xo=0,ht=Ie=we=null,cs=!1,ka=0,xr=null,n)throw Error(a(300));e===null||gt||(e=e.dependencies,e!==null&&es(e)&&(gt=!0))}function Lg(e,n,r,i){we=e;var d=0;do{if(yr&&(xr=null),ka=0,yr=!1,25<=d)throw Error(a(301));if(d+=1,ht=Ie=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}L.H=v1,p=n(r,i)}while(yr);return p}function CC(){var e=L.H,n=e.useState()[0];return n=typeof n.then=="function"?Va(n):n,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(we.flags|=1024),n}function Of(){var e=us!==0;return us=0,e}function Af(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function _f(e){if(cs){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}cs=!1}xo=0,ht=Ie=we=null,yr=!1,ka=us=0,xr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?we.memoizedState=ht=e:ht=ht.next=e,ht}function ft(){if(Ie===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var n=ht===null?we.memoizedState:ht.next;if(n!==null)ht=n,Ie=e;else{if(e===null)throw we.alternate===null?Error(a(467)):Error(a(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},ht===null?we.memoizedState=ht=e:ht=ht.next=e}return ht}function fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Va(e){var n=ka;return ka+=1,xr===null&&(xr=[]),e=Rg(xr,e,n),n=we,(ht===null?n.memoizedState:ht.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?g1:Pf),e}function ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Va(e);if(e.$$typeof===A)return Tt(e)}throw Error(a(438,String(e)))}function Nf(e){var n=null,r=we.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var i=we.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(n={data:i.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=fs(),we.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),i=0;i<e;i++)r[i]=Z;return n.index++,r}function So(e,n){return typeof n=="function"?n(e):n}function ms(e){var n=ft();return jf(n,Ie,e)}function jf(e,n,r){var i=e.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=r;var d=e.baseQueue,p=i.pending;if(p!==null){if(d!==null){var C=d.next;d.next=p.next,p.next=C}n.baseQueue=d=p,i.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{n=d.next;var T=C=null,D=null,G=n,K=!1;do{var te=G.lane&-536870913;if(te!==G.lane?(Ne&te)===te:(xo&te)===te){var q=G.revertLane;if(q===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),te===pr&&(K=!0);else if((xo&q)===q){G=G.next,q===pr&&(K=!0);continue}else te={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(T=D=te,C=p):D=D.next=te,we.lanes|=q,Wo|=q;te=G.action,zl&&r(p,te),p=G.hasEagerState?G.eagerState:r(p,te)}else q={lane:te,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(T=D=q,C=p):D=D.next=q,we.lanes|=te,Wo|=te;G=G.next}while(G!==null&&G!==n);if(D===null?C=p:D.next=T,!nn(p,e.memoizedState)&&(gt=!0,K&&(r=hr,r!==null)))throw r;e.memoizedState=p,e.baseState=C,e.baseQueue=D,i.lastRenderedState=p}return d===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Df(e){var n=ft(),r=n.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=e;var i=r.dispatch,d=r.pending,p=n.memoizedState;if(d!==null){r.pending=null;var C=d=d.next;do p=e(p,C.action),C=C.next;while(C!==d);nn(p,n.memoizedState)||(gt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),r.lastRenderedState=p}return[p,i]}function zg(e,n,r){var i=we,d=ft(),p=De;if(p){if(r===void 0)throw Error(a(407));r=r()}else r=n();var C=!nn((Ie||d).memoizedState,r);if(C&&(d.memoizedState=r,gt=!0),d=d.queue,zf(Bg.bind(null,i,d,e),[e]),d.getSnapshot!==n||C||ht!==null&&ht.memoizedState.tag&1){if(i.flags|=2048,Sr(9,{destroy:void 0},Vg.bind(null,i,d,r,n),null),Qe===null)throw Error(a(349));p||(xo&127)!==0||kg(i,n,r)}return r}function kg(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=we.updateQueue,n===null?(n=fs(),we.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function Vg(e,n,r,i){n.value=r,n.getSnapshot=i,$g(n)&&Ug(e)}function Bg(e,n,r){return r(function(){$g(n)&&Ug(e)})}function $g(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!nn(e,r)}catch{return!0}}function Ug(e){var n=Ml(e,2);n!==null&&Zt(n,e,2)}function Hf(e){var n=Lt();if(typeof e=="function"){var r=e;if(e=r(),zl){Bo(!0);try{r()}finally{Bo(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:e},n}function Pg(e,n,r,i){return e.baseState=r,jf(e,Ie,typeof i=="function"?i:So)}function wC(e,n,r,i,d){if(gs(e))throw Error(a(485));if(e=n.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){p.listeners.push(C)}};L.T!==null?r(!0):p.isTransition=!1,i(p),r=n.pending,r===null?(p.next=n.pending=p,Gg(n,p)):(p.next=r.next,n.pending=r.next=p)}}function Gg(e,n){var r=n.action,i=n.payload,d=e.state;if(n.isTransition){var p=L.T,C={};L.T=C;try{var T=r(d,i),D=L.S;D!==null&&D(C,T),Zg(e,n,T)}catch(G){Lf(e,n,G)}finally{p!==null&&C.types!==null&&(p.types=C.types),L.T=p}}else try{p=r(d,i),Zg(e,n,p)}catch(G){Lf(e,n,G)}}function Zg(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(i){qg(e,n,i)},function(i){return Lf(e,n,i)}):qg(e,n,r)}function qg(e,n,r){n.status="fulfilled",n.value=r,Ig(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,Gg(e,r)))}function Lf(e,n,r){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do n.status="rejected",n.reason=r,Ig(n),n=n.next;while(n!==i)}e.action=null}function Ig(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Yg(e,n){return n}function Fg(e,n){if(De){var r=Qe.formState;if(r!==null){e:{var i=we;if(De){if(tt){t:{for(var d=tt,p=Sn;d.nodeType!==8;){if(!p){d=null;break t}if(d=wn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){tt=wn(d.nextSibling),i=d.data==="F!";break e}}Zo(i)}i=!1}i&&(n=r[0])}}return r=Lt(),r.memoizedState=r.baseState=n,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yg,lastRenderedState:n},r.queue=i,r=m1.bind(null,we,i),i.dispatch=r,i=Hf(!1),p=Uf.bind(null,we,!1,i.queue),i=Lt(),d={state:n,dispatch:null,action:e,pending:null},i.queue=d,r=wC.bind(null,we,d,p,r),d.dispatch=r,i.memoizedState=e,[n,r,!1]}function Xg(e){var n=ft();return Qg(n,Ie,e)}function Qg(e,n,r){if(n=jf(e,n,Yg)[0],e=ms(So)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var i=Va(n)}catch(C){throw C===gr?os:C}else i=n;n=ft();var d=n.queue,p=d.dispatch;return r!==n.memoizedState&&(we.flags|=2048,Sr(9,{destroy:void 0},EC.bind(null,d,r),null)),[i,p,e]}function EC(e,n){e.action=n}function Kg(e){var n=ft(),r=Ie;if(r!==null)return Qg(n,r,e);ft(),n=n.memoizedState,r=ft();var i=r.queue.dispatch;return r.memoizedState=e,[n,i,!1]}function Sr(e,n,r,i){return e={tag:e,create:r,deps:i,inst:n,next:null},n=we.updateQueue,n===null&&(n=fs(),we.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,n.lastEffect=e),e}function Jg(){return ft().memoizedState}function ps(e,n,r,i){var d=Lt();we.flags|=e,d.memoizedState=Sr(1|n,{destroy:void 0},r,i===void 0?null:i)}function hs(e,n,r,i){var d=ft();i=i===void 0?null:i;var p=d.memoizedState.inst;Ie!==null&&i!==null&&Tf(i,Ie.memoizedState.deps)?d.memoizedState=Sr(n,p,r,i):(we.flags|=e,d.memoizedState=Sr(1|n,p,r,i))}function Wg(e,n){ps(8390656,8,e,n)}function zf(e,n){hs(2048,8,e,n)}function RC(e){we.flags|=4;var n=we.updateQueue;if(n===null)n=fs(),we.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function e1(e){var n=ft().memoizedState;return RC({ref:n,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function t1(e,n){return hs(4,2,e,n)}function n1(e,n){return hs(4,4,e,n)}function o1(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function l1(e,n,r){r=r!=null?r.concat([e]):null,hs(4,4,o1.bind(null,n,e),r)}function kf(){}function r1(e,n){var r=ft();n=n===void 0?null:n;var i=r.memoizedState;return n!==null&&Tf(n,i[1])?i[0]:(r.memoizedState=[e,n],e)}function a1(e,n){var r=ft();n=n===void 0?null:n;var i=r.memoizedState;if(n!==null&&Tf(n,i[1]))return i[0];if(i=e(),zl){Bo(!0);try{e()}finally{Bo(!1)}}return r.memoizedState=[i,n],i}function Vf(e,n,r){return r===void 0||(xo&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=iv(),we.lanes|=e,Wo|=e,r)}function i1(e,n,r,i){return nn(r,n)?r:br.current!==null?(e=Vf(e,r,i),nn(e,n)||(gt=!0),e):(xo&42)===0||(xo&1073741824)!==0&&(Ne&261930)===0?(gt=!0,e.memoizedState=r):(e=iv(),we.lanes|=e,Wo|=e,n)}function s1(e,n,r,i,d){var p=z.p;z.p=p!==0&&8>p?p:8;var C=L.T,T={};L.T=T,Uf(e,!1,n,r);try{var D=d(),G=L.S;if(G!==null&&G(T,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var K=xC(D,i);Ba(e,n,K,cn(e))}else Ba(e,n,i,cn(e))}catch(te){Ba(e,n,{then:function(){},status:"rejected",reason:te},cn())}finally{z.p=p,C!==null&&T.types!==null&&(C.types=T.types),L.T=C}}function TC(){}function Bf(e,n,r,i){if(e.tag!==5)throw Error(a(476));var d=c1(e).queue;s1(e,d,n,_,r===null?TC:function(){return u1(e),r(i)})}function c1(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:_},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function u1(e){var n=c1(e);n.next===null&&(n=e.alternate.memoizedState),Ba(e,n.next.queue,{},cn())}function $f(){return Tt(ni)}function f1(){return ft().memoizedState}function d1(){return ft().memoizedState}function MC(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=cn();e=Yo(r);var i=Fo(n,e,r);i!==null&&(Zt(i,n,r),Ha(i,n,r)),n={cache:hf()},e.payload=n;return}n=n.return}}function OC(e,n,r){var i=cn();r={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gs(e)?p1(n,r):(r=of(e,n,r,i),r!==null&&(Zt(r,e,i),h1(r,n,i)))}function m1(e,n,r){var i=cn();Ba(e,n,r,i)}function Ba(e,n,r,i){var d={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(gs(e))p1(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var C=n.lastRenderedState,T=p(C,r);if(d.hasEagerState=!0,d.eagerState=T,nn(T,C))return Qi(e,n,d,0),Qe===null&&Xi(),!1}catch{}if(r=of(e,n,d,i),r!==null)return Zt(r,e,i),h1(r,n,i),!0}return!1}function Uf(e,n,r,i){if(i={lane:2,revertLane:yd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},gs(e)){if(n)throw Error(a(479))}else n=of(e,r,i,2),n!==null&&Zt(n,e,2)}function gs(e){var n=e.alternate;return e===we||n!==null&&n===we}function p1(e,n){yr=cs=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function h1(e,n,r){if((r&4194048)!==0){var i=n.lanes;i&=e.pendingLanes,r|=i,n.lanes=r,xh(e,r)}}var $a={readContext:Tt,use:ds,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};$a.useEffectEvent=st;var g1={readContext:Tt,use:ds,useCallback:function(e,n){return Lt().memoizedState=[e,n===void 0?null:n],e},useContext:Tt,useEffect:Wg,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,ps(4194308,4,o1.bind(null,n,e),r)},useLayoutEffect:function(e,n){return ps(4194308,4,e,n)},useInsertionEffect:function(e,n){ps(4,2,e,n)},useMemo:function(e,n){var r=Lt();n=n===void 0?null:n;var i=e();if(zl){Bo(!0);try{e()}finally{Bo(!1)}}return r.memoizedState=[i,n],i},useReducer:function(e,n,r){var i=Lt();if(r!==void 0){var d=r(n);if(zl){Bo(!0);try{r(n)}finally{Bo(!1)}}}else d=n;return i.memoizedState=i.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},i.queue=e,e=e.dispatch=OC.bind(null,we,e),[i.memoizedState,e]},useRef:function(e){var n=Lt();return e={current:e},n.memoizedState=e},useState:function(e){e=Hf(e);var n=e.queue,r=m1.bind(null,we,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:kf,useDeferredValue:function(e,n){var r=Lt();return Vf(r,e,n)},useTransition:function(){var e=Hf(!1);return e=s1.bind(null,we,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var i=we,d=Lt();if(De){if(r===void 0)throw Error(a(407));r=r()}else{if(r=n(),Qe===null)throw Error(a(349));(Ne&127)!==0||kg(i,n,r)}d.memoizedState=r;var p={value:r,getSnapshot:n};return d.queue=p,Wg(Bg.bind(null,i,p,e),[e]),i.flags|=2048,Sr(9,{destroy:void 0},Vg.bind(null,i,p,r,n),null),r},useId:function(){var e=Lt(),n=Qe.identifierPrefix;if(De){var r=qn,i=Zn;r=(i&~(1<<32-tn(i)-1)).toString(32)+r,n="_"+n+"R_"+r,r=us++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=SC++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:$f,useFormState:Fg,useActionState:Fg,useOptimistic:function(e){var n=Lt();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=Uf.bind(null,we,!0,r),r.dispatch=n,[e,n]},useMemoCache:Nf,useCacheRefresh:function(){return Lt().memoizedState=MC.bind(null,we)},useEffectEvent:function(e){var n=Lt(),r={impl:e};return n.memoizedState=r,function(){if((Ue&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}},Pf={readContext:Tt,use:ds,useCallback:r1,useContext:Tt,useEffect:zf,useImperativeHandle:l1,useInsertionEffect:t1,useLayoutEffect:n1,useMemo:a1,useReducer:ms,useRef:Jg,useState:function(){return ms(So)},useDebugValue:kf,useDeferredValue:function(e,n){var r=ft();return i1(r,Ie.memoizedState,e,n)},useTransition:function(){var e=ms(So)[0],n=ft().memoizedState;return[typeof e=="boolean"?e:Va(e),n]},useSyncExternalStore:zg,useId:f1,useHostTransitionStatus:$f,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,n){var r=ft();return Pg(r,Ie,e,n)},useMemoCache:Nf,useCacheRefresh:d1};Pf.useEffectEvent=e1;var v1={readContext:Tt,use:ds,useCallback:r1,useContext:Tt,useEffect:zf,useImperativeHandle:l1,useInsertionEffect:t1,useLayoutEffect:n1,useMemo:a1,useReducer:Df,useRef:Jg,useState:function(){return Df(So)},useDebugValue:kf,useDeferredValue:function(e,n){var r=ft();return Ie===null?Vf(r,e,n):i1(r,Ie.memoizedState,e,n)},useTransition:function(){var e=Df(So)[0],n=ft().memoizedState;return[typeof e=="boolean"?e:Va(e),n]},useSyncExternalStore:zg,useId:f1,useHostTransitionStatus:$f,useFormState:Kg,useActionState:Kg,useOptimistic:function(e,n){var r=ft();return Ie!==null?Pg(r,Ie,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Nf,useCacheRefresh:d1};v1.useEffectEvent=e1;function Gf(e,n,r,i){n=e.memoizedState,r=r(i,n),r=r==null?n:b({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Zf={enqueueSetState:function(e,n,r){e=e._reactInternals;var i=cn(),d=Yo(i);d.payload=n,r!=null&&(d.callback=r),n=Fo(e,d,i),n!==null&&(Zt(n,e,i),Ha(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var i=cn(),d=Yo(i);d.tag=1,d.payload=n,r!=null&&(d.callback=r),n=Fo(e,d,i),n!==null&&(Zt(n,e,i),Ha(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=cn(),i=Yo(r);i.tag=2,n!=null&&(i.callback=n),n=Fo(e,i,r),n!==null&&(Zt(n,e,r),Ha(n,e,r))}};function b1(e,n,r,i,d,p,C){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,C):n.prototype&&n.prototype.isPureReactComponent?!Ta(r,i)||!Ta(d,p):!0}function y1(e,n,r,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,i),n.state!==e&&Zf.enqueueReplaceState(n,n.state,null)}function kl(e,n){var r=n;if("ref"in n){r={};for(var i in n)i!=="ref"&&(r[i]=n[i])}if(e=e.defaultProps){r===n&&(r=b({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function x1(e){Fi(e)}function S1(e){console.error(e)}function C1(e){Fi(e)}function vs(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(i){setTimeout(function(){throw i})}}function w1(e,n,r){try{var i=e.onCaughtError;i(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function qf(e,n,r){return r=Yo(r),r.tag=3,r.payload={element:null},r.callback=function(){vs(e,n)},r}function E1(e){return e=Yo(e),e.tag=3,e}function R1(e,n,r,i){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=i.value;e.payload=function(){return d(p)},e.callback=function(){w1(n,r,i)}}var C=r.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){w1(n,r,i),typeof d!="function"&&(el===null?el=new Set([this]):el.add(this));var T=i.stack;this.componentDidCatch(i.value,{componentStack:T!==null?T:""})})}function AC(e,n,r,i,d){if(r.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(n=r.alternate,n!==null&&mr(n,r,d,!0),r=ln.current,r!==null){switch(r.tag){case 31:case 13:return Cn===null?As():r.alternate===null&&ct===0&&(ct=3),r.flags&=-257,r.flags|=65536,r.lanes=d,i===ls?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([i]):n.add(i),gd(e,i,d)),!1;case 22:return r.flags|=65536,i===ls?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([i]):r.add(i)),gd(e,i,d)),!1}throw Error(a(435,r.tag))}return gd(e,i,d),As(),!1}if(De)return n=ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,i!==uf&&(e=Error(a(422),{cause:i}),Aa(bn(e,r)))):(i!==uf&&(n=Error(a(423),{cause:i}),Aa(bn(n,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,i=bn(i,r),d=qf(e.stateNode,i,d),Sf(e,d),ct!==4&&(ct=2)),!1;var p=Error(a(520),{cause:i});if(p=bn(p,r),Fa===null?Fa=[p]:Fa.push(p),ct!==4&&(ct=2),n===null)return!0;i=bn(i,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=qf(r.stateNode,i,e),Sf(r,e),!1;case 1:if(n=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(el===null||!el.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=E1(d),R1(d,e,r,i),Sf(r,d),!1}r=r.return}while(r!==null);return!1}var If=Error(a(461)),gt=!1;function Mt(e,n,r,i){n.child=e===null?Ag(n,null,r,i):Ll(n,e.child,r,i)}function T1(e,n,r,i,d){r=r.render;var p=n.ref;if("ref"in i){var C={};for(var T in i)T!=="ref"&&(C[T]=i[T])}else C=i;return Nl(n),i=Mf(e,n,r,C,p,d),T=Of(),e!==null&&!gt?(Af(e,n,d),Co(e,n,d)):(De&&T&&sf(n),n.flags|=1,Mt(e,n,i,d),n.child)}function M1(e,n,r,i,d){if(e===null){var p=r.type;return typeof p=="function"&&!lf(p)&&p.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=p,O1(e,n,p,i,d)):(e=Ji(r.type,null,i,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!ed(e,d)){var C=p.memoizedProps;if(r=r.compare,r=r!==null?r:Ta,r(C,i)&&e.ref===n.ref)return Co(e,n,d)}return n.flags|=1,e=go(p,i),e.ref=n.ref,e.return=n,n.child=e}function O1(e,n,r,i,d){if(e!==null){var p=e.memoizedProps;if(Ta(p,i)&&e.ref===n.ref)if(gt=!1,n.pendingProps=i=p,ed(e,d))(e.flags&131072)!==0&&(gt=!0);else return n.lanes=e.lanes,Co(e,n,d)}return Yf(e,n,r,i,d)}function A1(e,n,r,i){var d=i.children,p=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(i=n.child=e.child,d=0;i!==null;)d=d|i.lanes|i.childLanes,i=i.sibling;i=d&~p}else i=0,n.child=null;return _1(e,n,p,r,i)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&ns(n,p!==null?p.cachePool:null),p!==null?jg(n,p):wf(),Dg(n);else return i=n.lanes=536870912,_1(e,n,p!==null?p.baseLanes|r:r,r,i)}else p!==null?(ns(n,p.cachePool),jg(n,p),Qo(),n.memoizedState=null):(e!==null&&ns(n,null),wf(),Qo());return Mt(e,n,d,r),n.child}function Ua(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function _1(e,n,r,i,d){var p=vf();return p=p===null?null:{parent:pt._currentValue,pool:p},n.memoizedState={baseLanes:r,cachePool:p},e!==null&&ns(n,null),wf(),Dg(n),e!==null&&mr(e,n,i,!0),n.childLanes=d,null}function bs(e,n){return n=xs({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function N1(e,n,r){return Ll(n,e.child,null,r),e=bs(n,n.pendingProps),e.flags|=2,rn(n),n.memoizedState=null,e}function _C(e,n,r){var i=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(De){if(i.mode==="hidden")return e=bs(n,i),n.lanes=536870912,Ua(null,e);if(Rf(n),(e=tt)?(e=Gv(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Po!==null?{id:Zn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=pg(e),r.return=n,n.child=r,Rt=n,tt=null)):e=null,e===null)throw Zo(n);return n.lanes=536870912,null}return bs(n,i)}var p=e.memoizedState;if(p!==null){var C=p.dehydrated;if(Rf(n),d)if(n.flags&256)n.flags&=-257,n=N1(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(a(558));else if(gt||mr(e,n,r,!1),d=(r&e.childLanes)!==0,gt||d){if(i=Qe,i!==null&&(C=Sh(i,r),C!==0&&C!==p.retryLane))throw p.retryLane=C,Ml(e,C),Zt(i,e,C),If;As(),n=N1(e,n,r)}else e=p.treeContext,tt=wn(C.nextSibling),Rt=n,De=!0,Go=null,Sn=!1,e!==null&&vg(n,e),n=bs(n,i),n.flags|=4096;return n}return e=go(e.child,{mode:i.mode,children:i.children}),e.ref=n.ref,n.child=e,e.return=n,e}function ys(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(a(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function Yf(e,n,r,i,d){return Nl(n),r=Mf(e,n,r,i,void 0,d),i=Of(),e!==null&&!gt?(Af(e,n,d),Co(e,n,d)):(De&&i&&sf(n),n.flags|=1,Mt(e,n,r,d),n.child)}function j1(e,n,r,i,d,p){return Nl(n),n.updateQueue=null,r=Lg(n,i,r,d),Hg(e),i=Of(),e!==null&&!gt?(Af(e,n,p),Co(e,n,p)):(De&&i&&sf(n),n.flags|=1,Mt(e,n,r,p),n.child)}function D1(e,n,r,i,d){if(Nl(n),n.stateNode===null){var p=cr,C=r.contextType;typeof C=="object"&&C!==null&&(p=Tt(C)),p=new r(i,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Zf,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=i,p.state=n.memoizedState,p.refs={},yf(n),C=r.contextType,p.context=typeof C=="object"&&C!==null?Tt(C):cr,p.state=n.memoizedState,C=r.getDerivedStateFromProps,typeof C=="function"&&(Gf(n,r,C,i),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(C=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),C!==p.state&&Zf.enqueueReplaceState(p,p.state,null),za(n,i,p,d),La(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),i=!0}else if(e===null){p=n.stateNode;var T=n.memoizedProps,D=kl(r,T);p.props=D;var G=p.context,K=r.contextType;C=cr,typeof K=="object"&&K!==null&&(C=Tt(K));var te=r.getDerivedStateFromProps;K=typeof te=="function"||typeof p.getSnapshotBeforeUpdate=="function",T=n.pendingProps!==T,K||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T||G!==C)&&y1(n,p,i,C),Io=!1;var q=n.memoizedState;p.state=q,za(n,i,p,d),La(),G=n.memoizedState,T||q!==G||Io?(typeof te=="function"&&(Gf(n,r,te,i),G=n.memoizedState),(D=Io||b1(n,r,D,i,q,G,C))?(K||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=G),p.props=i,p.state=G,p.context=C,i=D):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{p=n.stateNode,xf(e,n),C=n.memoizedProps,K=kl(r,C),p.props=K,te=n.pendingProps,q=p.context,G=r.contextType,D=cr,typeof G=="object"&&G!==null&&(D=Tt(G)),T=r.getDerivedStateFromProps,(G=typeof T=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(C!==te||q!==D)&&y1(n,p,i,D),Io=!1,q=n.memoizedState,p.state=q,za(n,i,p,d),La();var Y=n.memoizedState;C!==te||q!==Y||Io||e!==null&&e.dependencies!==null&&es(e.dependencies)?(typeof T=="function"&&(Gf(n,r,T,i),Y=n.memoizedState),(K=Io||b1(n,r,K,i,q,Y,D)||e!==null&&e.dependencies!==null&&es(e.dependencies))?(G||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(i,Y,D),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(i,Y,D)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||C===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=Y),p.props=i,p.state=Y,p.context=D,i=K):(typeof p.componentDidUpdate!="function"||C===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),i=!1)}return p=i,ys(e,n),i=(n.flags&128)!==0,p||i?(p=n.stateNode,r=i&&typeof r.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&i?(n.child=Ll(n,e.child,null,d),n.child=Ll(n,null,r,d)):Mt(e,n,r,d),n.memoizedState=p.state,e=n.child):e=Co(e,n,d),e}function H1(e,n,r,i){return Al(),n.flags|=256,Mt(e,n,r,i),n.child}var Ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xf(e){return{baseLanes:e,cachePool:wg()}}function Qf(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=sn),e}function L1(e,n,r){var i=n.pendingProps,d=!1,p=(n.flags&128)!==0,C;if((C=p)||(C=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),C&&(d=!0,n.flags&=-129),C=(n.flags&32)!==0,n.flags&=-33,e===null){if(De){if(d?Xo(n):Qo(),(e=tt)?(e=Gv(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Po!==null?{id:Zn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=pg(e),r.return=n,n.child=r,Rt=n,tt=null)):e=null,e===null)throw Zo(n);return jd(e)?n.lanes=32:n.lanes=536870912,null}var T=i.children;return i=i.fallback,d?(Qo(),d=n.mode,T=xs({mode:"hidden",children:T},d),i=Ol(i,d,r,null),T.return=n,i.return=n,T.sibling=i,n.child=T,i=n.child,i.memoizedState=Xf(r),i.childLanes=Qf(e,C,r),n.memoizedState=Ff,Ua(null,i)):(Xo(n),Kf(n,T))}var D=e.memoizedState;if(D!==null&&(T=D.dehydrated,T!==null)){if(p)n.flags&256?(Xo(n),n.flags&=-257,n=Jf(e,n,r)):n.memoizedState!==null?(Qo(),n.child=e.child,n.flags|=128,n=null):(Qo(),T=i.fallback,d=n.mode,i=xs({mode:"visible",children:i.children},d),T=Ol(T,d,r,null),T.flags|=2,i.return=n,T.return=n,i.sibling=T,n.child=i,Ll(n,e.child,null,r),i=n.child,i.memoizedState=Xf(r),i.childLanes=Qf(e,C,r),n.memoizedState=Ff,n=Ua(null,i));else if(Xo(n),jd(T)){if(C=T.nextSibling&&T.nextSibling.dataset,C)var G=C.dgst;C=G,i=Error(a(419)),i.stack="",i.digest=C,Aa({value:i,source:null,stack:null}),n=Jf(e,n,r)}else if(gt||mr(e,n,r,!1),C=(r&e.childLanes)!==0,gt||C){if(C=Qe,C!==null&&(i=Sh(C,r),i!==0&&i!==D.retryLane))throw D.retryLane=i,Ml(e,i),Zt(C,e,i),If;Nd(T)||As(),n=Jf(e,n,r)}else Nd(T)?(n.flags|=192,n.child=e.child,n=null):(e=D.treeContext,tt=wn(T.nextSibling),Rt=n,De=!0,Go=null,Sn=!1,e!==null&&vg(n,e),n=Kf(n,i.children),n.flags|=4096);return n}return d?(Qo(),T=i.fallback,d=n.mode,D=e.child,G=D.sibling,i=go(D,{mode:"hidden",children:i.children}),i.subtreeFlags=D.subtreeFlags&65011712,G!==null?T=go(G,T):(T=Ol(T,d,r,null),T.flags|=2),T.return=n,i.return=n,i.sibling=T,n.child=i,Ua(null,i),i=n.child,T=e.child.memoizedState,T===null?T=Xf(r):(d=T.cachePool,d!==null?(D=pt._currentValue,d=d.parent!==D?{parent:D,pool:D}:d):d=wg(),T={baseLanes:T.baseLanes|r,cachePool:d}),i.memoizedState=T,i.childLanes=Qf(e,C,r),n.memoizedState=Ff,Ua(e.child,i)):(Xo(n),r=e.child,e=r.sibling,r=go(r,{mode:"visible",children:i.children}),r.return=n,r.sibling=null,e!==null&&(C=n.deletions,C===null?(n.deletions=[e],n.flags|=16):C.push(e)),n.child=r,n.memoizedState=null,r)}function Kf(e,n){return n=xs({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function xs(e,n){return e=on(22,e,null,n),e.lanes=0,e}function Jf(e,n,r){return Ll(n,e.child,null,r),e=Kf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function z1(e,n,r){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),mf(e.return,n,r)}function Wf(e,n,r,i,d,p){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:d,treeForkCount:p}:(C.isBackwards=n,C.rendering=null,C.renderingStartTime=0,C.last=i,C.tail=r,C.tailMode=d,C.treeForkCount=p)}function k1(e,n,r){var i=n.pendingProps,d=i.revealOrder,p=i.tail;i=i.children;var C=ut.current,T=(C&2)!==0;if(T?(C=C&1|2,n.flags|=128):C&=1,J(ut,C),Mt(e,n,i,r),i=De?Oa:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&z1(e,r,n);else if(e.tag===19)z1(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=n.child,d=null;r!==null;)e=r.alternate,e!==null&&ss(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=n.child,n.child=null):(d=r.sibling,r.sibling=null),Wf(n,!1,d,r,p,i);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&ss(e)===null){n.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}Wf(n,!0,r,null,p,i);break;case"together":Wf(n,!1,null,null,void 0,i);break;default:n.memoizedState=null}return n.child}function Co(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),Wo|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(mr(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,r=go(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=go(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function ed(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&es(e)))}function NC(e,n,r){switch(n.tag){case 3:Te(n,n.stateNode.containerInfo),qo(n,pt,e.memoizedState.cache),Al();break;case 27:case 5:Xe(n);break;case 4:Te(n,n.stateNode.containerInfo);break;case 10:qo(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Rf(n),null;break;case 13:var i=n.memoizedState;if(i!==null)return i.dehydrated!==null?(Xo(n),n.flags|=128,null):(r&n.child.childLanes)!==0?L1(e,n,r):(Xo(n),e=Co(e,n,r),e!==null?e.sibling:null);Xo(n);break;case 19:var d=(e.flags&128)!==0;if(i=(r&n.childLanes)!==0,i||(mr(e,n,r,!1),i=(r&n.childLanes)!==0),d){if(i)return k1(e,n,r);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),J(ut,ut.current),i)break;return null;case 22:return n.lanes=0,A1(e,n,r,n.pendingProps);case 24:qo(n,pt,e.memoizedState.cache)}return Co(e,n,r)}function V1(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)gt=!0;else{if(!ed(e,r)&&(n.flags&128)===0)return gt=!1,NC(e,n,r);gt=(e.flags&131072)!==0}else gt=!1,De&&(n.flags&1048576)!==0&&gg(n,Oa,n.index);switch(n.lanes=0,n.tag){case 16:e:{var i=n.pendingProps;if(e=Dl(n.elementType),n.type=e,typeof e=="function")lf(e)?(i=kl(e,i),n.tag=1,n=D1(null,n,e,i,r)):(n.tag=0,n=Yf(null,n,e,i,r));else{if(e!=null){var d=e.$$typeof;if(d===N){n.tag=11,n=T1(null,n,e,i,r);break e}else if(d===$){n.tag=14,n=M1(null,n,e,i,r);break e}}throw n=j(e)||e,Error(a(306,n,""))}}return n;case 0:return Yf(e,n,n.type,n.pendingProps,r);case 1:return i=n.type,d=kl(i,n.pendingProps),D1(e,n,i,d,r);case 3:e:{if(Te(n,n.stateNode.containerInfo),e===null)throw Error(a(387));i=n.pendingProps;var p=n.memoizedState;d=p.element,xf(e,n),za(n,i,null,r);var C=n.memoizedState;if(i=C.cache,qo(n,pt,i),i!==p.cache&&pf(n,[pt],r,!0),La(),i=C.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:C.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=H1(e,n,i,r);break e}else if(i!==d){d=bn(Error(a(424)),n),Aa(d),n=H1(e,n,i,r);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,tt=wn(e.firstChild),Rt=n,De=!0,Go=null,Sn=!0,r=Ag(n,null,i,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Al(),i===d){n=Co(e,n,r);break e}Mt(e,n,i,r)}n=n.child}return n;case 26:return ys(e,n),e===null?(r=Xv(n.type,null,n.pendingProps,null))?n.memoizedState=r:De||(r=n.type,e=n.pendingProps,i=zs(Ce.current).createElement(r),i[Et]=n,i[Vt]=e,Ot(i,r,e),Ct(i),n.stateNode=i):n.memoizedState=Xv(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Xe(n),e===null&&De&&(i=n.stateNode=Iv(n.type,n.pendingProps,Ce.current),Rt=n,Sn=!0,d=tt,ll(n.type)?(Dd=d,tt=wn(i.firstChild)):tt=d),Mt(e,n,n.pendingProps.children,r),ys(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&De&&((d=i=tt)&&(i=i4(i,n.type,n.pendingProps,Sn),i!==null?(n.stateNode=i,Rt=n,tt=wn(i.firstChild),Sn=!1,d=!0):d=!1),d||Zo(n)),Xe(n),d=n.type,p=n.pendingProps,C=e!==null?e.memoizedProps:null,i=p.children,Od(d,p)?i=null:C!==null&&Od(d,C)&&(n.flags|=32),n.memoizedState!==null&&(d=Mf(e,n,CC,null,null,r),ni._currentValue=d),ys(e,n),Mt(e,n,i,r),n.child;case 6:return e===null&&De&&((e=r=tt)&&(r=s4(r,n.pendingProps,Sn),r!==null?(n.stateNode=r,Rt=n,tt=null,e=!0):e=!1),e||Zo(n)),null;case 13:return L1(e,n,r);case 4:return Te(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=Ll(n,null,i,r):Mt(e,n,i,r),n.child;case 11:return T1(e,n,n.type,n.pendingProps,r);case 7:return Mt(e,n,n.pendingProps,r),n.child;case 8:return Mt(e,n,n.pendingProps.children,r),n.child;case 12:return Mt(e,n,n.pendingProps.children,r),n.child;case 10:return i=n.pendingProps,qo(n,n.type,i.value),Mt(e,n,i.children,r),n.child;case 9:return d=n.type._context,i=n.pendingProps.children,Nl(n),d=Tt(d),i=i(d),n.flags|=1,Mt(e,n,i,r),n.child;case 14:return M1(e,n,n.type,n.pendingProps,r);case 15:return O1(e,n,n.type,n.pendingProps,r);case 19:return k1(e,n,r);case 31:return _C(e,n,r);case 22:return A1(e,n,r,n.pendingProps);case 24:return Nl(n),i=Tt(pt),e===null?(d=vf(),d===null&&(d=Qe,p=hf(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),n.memoizedState={parent:i,cache:d},yf(n),qo(n,pt,d)):((e.lanes&r)!==0&&(xf(e,n),za(n,null,null,r),La()),d=e.memoizedState,p=n.memoizedState,d.parent!==i?(d={parent:i,cache:i},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),qo(n,pt,i)):(i=p.cache,qo(n,pt,i),i!==d.cache&&pf(n,[pt],r,!0))),Mt(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function wo(e){e.flags|=4}function td(e,n,r,i,d){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(fv())e.flags|=8192;else throw Hl=ls,bf}else e.flags&=-16777217}function B1(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!e0(n))if(fv())e.flags|=8192;else throw Hl=ls,bf}function Ss(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?bh():536870912,e.lanes|=n,Rr|=n)}function Pa(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function nt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(n)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags&65011712,i|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=r,n}function jC(e,n,r){var i=n.pendingProps;switch(cf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(n),null;case 1:return nt(n),null;case 3:return r=n.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),yo(pt),Se(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dr(n)?wo(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ff())),nt(n),null;case 26:var d=n.type,p=n.memoizedState;return e===null?(wo(n),p!==null?(nt(n),B1(n,p)):(nt(n),td(n,d,null,i,r))):p?p!==e.memoizedState?(wo(n),nt(n),B1(n,p)):(nt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==i&&wo(n),nt(n),td(n,d,e,i,r)),null;case 27:if(et(n),r=Ce.current,d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==i&&wo(n);else{if(!i){if(n.stateNode===null)throw Error(a(166));return nt(n),null}e=ge.current,dr(n)?bg(n):(e=Iv(d,i,r),n.stateNode=e,wo(n))}return nt(n),null;case 5:if(et(n),d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==i&&wo(n);else{if(!i){if(n.stateNode===null)throw Error(a(166));return nt(n),null}if(p=ge.current,dr(n))bg(n);else{var C=zs(Ce.current);switch(p){case 1:p=C.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=C.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=C.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=C.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=C.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof i.is=="string"?C.createElement("select",{is:i.is}):C.createElement("select"),i.multiple?p.multiple=!0:i.size&&(p.size=i.size);break;default:p=typeof i.is=="string"?C.createElement(d,{is:i.is}):C.createElement(d)}}p[Et]=n,p[Vt]=i;e:for(C=n.child;C!==null;){if(C.tag===5||C.tag===6)p.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===n)break e;for(;C.sibling===null;){if(C.return===null||C.return===n)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}n.stateNode=p;e:switch(Ot(p,d,i),d){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&wo(n)}}return nt(n),td(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==i&&wo(n);else{if(typeof i!="string"&&n.stateNode===null)throw Error(a(166));if(e=Ce.current,dr(n)){if(e=n.stateNode,r=n.memoizedProps,i=null,d=Rt,d!==null)switch(d.tag){case 27:case 5:i=d.memoizedProps}e[Et]=n,e=!!(e.nodeValue===r||i!==null&&i.suppressHydrationWarning===!0||Lv(e.nodeValue,r)),e||Zo(n,!0)}else e=zs(e).createTextNode(i),e[Et]=n,n.stateNode=e}return nt(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(i=dr(n),r!==null){if(e===null){if(!i)throw Error(a(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Et]=n}else Al(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;nt(n),e=!1}else r=ff(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(rn(n),n):(rn(n),null);if((n.flags&128)!==0)throw Error(a(558))}return nt(n),null;case 13:if(i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=dr(n),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(a(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Et]=n}else Al(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;nt(n),d=!1}else d=ff(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(rn(n),n):(rn(n),null)}return rn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=i!==null,e=e!==null&&e.memoizedState!==null,r&&(i=n.child,d=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(d=i.alternate.memoizedState.cachePool.pool),p=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),p!==d&&(i.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),Ss(n,n.updateQueue),nt(n),null);case 4:return Se(),e===null&&wd(n.stateNode.containerInfo),nt(n),null;case 10:return yo(n.type),nt(n),null;case 19:if(oe(ut),i=n.memoizedState,i===null)return nt(n),null;if(d=(n.flags&128)!==0,p=i.rendering,p===null)if(d)Pa(i,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=ss(e),p!==null){for(n.flags|=128,Pa(i,!1),e=p.updateQueue,n.updateQueue=e,Ss(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)mg(r,e),r=r.sibling;return J(ut,ut.current&1|2),De&&vo(n,i.treeForkCount),n.child}e=e.sibling}i.tail!==null&<()>Ts&&(n.flags|=128,d=!0,Pa(i,!1),n.lanes=4194304)}else{if(!d)if(e=ss(p),e!==null){if(n.flags|=128,d=!0,e=e.updateQueue,n.updateQueue=e,Ss(n,e),Pa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!p.alternate&&!De)return nt(n),null}else 2*lt()-i.renderingStartTime>Ts&&r!==536870912&&(n.flags|=128,d=!0,Pa(i,!1),n.lanes=4194304);i.isBackwards?(p.sibling=n.child,n.child=p):(e=i.last,e!==null?e.sibling=p:n.child=p,i.last=p)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=lt(),e.sibling=null,r=ut.current,J(ut,d?r&1|2:r&1),De&&vo(n,i.treeForkCount),e):(nt(n),null);case 22:case 23:return rn(n),Ef(),i=n.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(n.flags|=8192):i&&(n.flags|=8192),i?(r&536870912)!==0&&(n.flags&128)===0&&(nt(n),n.subtreeFlags&6&&(n.flags|=8192)):nt(n),r=n.updateQueue,r!==null&&Ss(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=2048),e!==null&&oe(jl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),yo(pt),nt(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function DC(e,n){switch(cf(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return yo(pt),Se(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return et(n),null;case 31:if(n.memoizedState!==null){if(rn(n),n.alternate===null)throw Error(a(340));Al()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Al()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return oe(ut),null;case 4:return Se(),null;case 10:return yo(n.type),null;case 22:case 23:return rn(n),Ef(),e!==null&&oe(jl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return yo(pt),null;case 25:return null;default:return null}}function $1(e,n){switch(cf(n),n.tag){case 3:yo(pt),Se();break;case 26:case 27:case 5:et(n);break;case 4:Se();break;case 31:n.memoizedState!==null&&rn(n);break;case 13:rn(n);break;case 19:oe(ut);break;case 10:yo(n.type);break;case 22:case 23:rn(n),Ef(),e!==null&&oe(jl);break;case 24:yo(pt)}}function Ga(e,n){try{var r=n.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var d=i.next;r=d;do{if((r.tag&e)===e){i=void 0;var p=r.create,C=r.inst;i=p(),C.destroy=i}r=r.next}while(r!==d)}}catch(T){Ze(n,n.return,T)}}function Ko(e,n,r){try{var i=n.updateQueue,d=i!==null?i.lastEffect:null;if(d!==null){var p=d.next;i=p;do{if((i.tag&e)===e){var C=i.inst,T=C.destroy;if(T!==void 0){C.destroy=void 0,d=n;var D=r,G=T;try{G()}catch(K){Ze(d,D,K)}}}i=i.next}while(i!==p)}}catch(K){Ze(n,n.return,K)}}function U1(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{Ng(n,r)}catch(i){Ze(e,e.return,i)}}}function P1(e,n,r){r.props=kl(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(i){Ze(e,n,i)}}function Za(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof r=="function"?e.refCleanup=r(i):r.current=i}}catch(d){Ze(e,n,d)}}function In(e,n){var r=e.ref,i=e.refCleanup;if(r!==null)if(typeof i=="function")try{i()}catch(d){Ze(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){Ze(e,n,d)}else r.current=null}function G1(e){var n=e.type,r=e.memoizedProps,i=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&i.focus();break e;case"img":r.src?i.src=r.src:r.srcSet&&(i.srcset=r.srcSet)}}catch(d){Ze(e,e.return,d)}}function nd(e,n,r){try{var i=e.stateNode;t4(i,e.type,r,n),i[Vt]=n}catch(d){Ze(e,e.return,d)}}function Z1(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Z1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ld(e,n,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=po));else if(i!==4&&(i===27&&ll(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(ld(e,n,r),e=e.sibling;e!==null;)ld(e,n,r),e=e.sibling}function Cs(e,n,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(i!==4&&(i===27&&ll(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Cs(e,n,r),e=e.sibling;e!==null;)Cs(e,n,r),e=e.sibling}function q1(e){var n=e.stateNode,r=e.memoizedProps;try{for(var i=e.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Ot(n,i,r),n[Et]=e,n[Vt]=r}catch(p){Ze(e,e.return,p)}}var Eo=!1,vt=!1,rd=!1,I1=typeof WeakSet=="function"?WeakSet:Set,wt=null;function HC(e,n){if(e=e.containerInfo,Td=Gs,e=lg(e),Ku(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var d=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var C=0,T=-1,D=-1,G=0,K=0,te=e,q=null;t:for(;;){for(var Y;te!==r||d!==0&&te.nodeType!==3||(T=C+d),te!==p||i!==0&&te.nodeType!==3||(D=C+i),te.nodeType===3&&(C+=te.nodeValue.length),(Y=te.firstChild)!==null;)q=te,te=Y;for(;;){if(te===e)break t;if(q===r&&++G===d&&(T=C),q===p&&++K===i&&(D=C),(Y=te.nextSibling)!==null)break;te=q,q=te.parentNode}te=Y}r=T===-1||D===-1?null:{start:T,end:D}}else r=null}r=r||{start:0,end:0}}else r=null;for(Md={focusedElem:e,selectionRange:r},Gs=!1,wt=n;wt!==null;)if(n=wt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,wt=e;else for(;wt!==null;){switch(n=wt,p=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=n,d=p.memoizedProps,p=p.memoizedState,i=r.stateNode;try{var se=kl(r.type,d);e=i.getSnapshotBeforeUpdate(se,p),i.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ze(r,r.return,ye)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)_d(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_d(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,wt=e;break}wt=n.return}}function Y1(e,n,r){var i=r.flags;switch(r.tag){case 0:case 11:case 15:To(e,r),i&4&&Ga(5,r);break;case 1:if(To(e,r),i&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(C){Ze(r,r.return,C)}else{var d=kl(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(d,n,e.__reactInternalSnapshotBeforeUpdate)}catch(C){Ze(r,r.return,C)}}i&64&&U1(r),i&512&&Za(r,r.return);break;case 3:if(To(e,r),i&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{Ng(e,n)}catch(C){Ze(r,r.return,C)}}break;case 27:n===null&&i&4&&q1(r);case 26:case 5:To(e,r),n===null&&i&4&&G1(r),i&512&&Za(r,r.return);break;case 12:To(e,r);break;case 31:To(e,r),i&4&&Q1(e,r);break;case 13:To(e,r),i&4&&K1(e,r),i&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=GC.bind(null,r),c4(e,r))));break;case 22:if(i=r.memoizedState!==null||Eo,!i){n=n!==null&&n.memoizedState!==null||vt,d=Eo;var p=vt;Eo=i,(vt=n)&&!p?Mo(e,r,(r.subtreeFlags&8772)!==0):To(e,r),Eo=d,vt=p}break;case 30:break;default:To(e,r)}}function F1(e){var n=e.alternate;n!==null&&(e.alternate=null,F1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Hu(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rt=null,$t=!1;function Ro(e,n,r){for(r=r.child;r!==null;)X1(e,n,r),r=r.sibling}function X1(e,n,r){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(pa,r)}catch{}switch(r.tag){case 26:vt||In(r,n),Ro(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:vt||In(r,n);var i=rt,d=$t;ll(r.type)&&(rt=r.stateNode,$t=!1),Ro(e,n,r),Wa(r.stateNode),rt=i,$t=d;break;case 5:vt||In(r,n);case 6:if(i=rt,d=$t,rt=null,Ro(e,n,r),rt=i,$t=d,rt!==null)if($t)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(r.stateNode)}catch(p){Ze(r,n,p)}else try{rt.removeChild(r.stateNode)}catch(p){Ze(r,n,p)}break;case 18:rt!==null&&($t?(e=rt,Uv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Dr(e)):Uv(rt,r.stateNode));break;case 4:i=rt,d=$t,rt=r.stateNode.containerInfo,$t=!0,Ro(e,n,r),rt=i,$t=d;break;case 0:case 11:case 14:case 15:Ko(2,r,n),vt||Ko(4,r,n),Ro(e,n,r);break;case 1:vt||(In(r,n),i=r.stateNode,typeof i.componentWillUnmount=="function"&&P1(r,n,i)),Ro(e,n,r);break;case 21:Ro(e,n,r);break;case 22:vt=(i=vt)||r.memoizedState!==null,Ro(e,n,r),vt=i;break;default:Ro(e,n,r)}}function Q1(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Dr(e)}catch(r){Ze(n,n.return,r)}}}function K1(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dr(e)}catch(r){Ze(n,n.return,r)}}function LC(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new I1),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new I1),n;default:throw Error(a(435,e.tag))}}function ws(e,n){var r=LC(e);n.forEach(function(i){if(!r.has(i)){r.add(i);var d=ZC.bind(null,e,i);i.then(d,d)}})}function Ut(e,n){var r=n.deletions;if(r!==null)for(var i=0;i<r.length;i++){var d=r[i],p=e,C=n,T=C;e:for(;T!==null;){switch(T.tag){case 27:if(ll(T.type)){rt=T.stateNode,$t=!1;break e}break;case 5:rt=T.stateNode,$t=!1;break e;case 3:case 4:rt=T.stateNode.containerInfo,$t=!0;break e}T=T.return}if(rt===null)throw Error(a(160));X1(p,C,d),rt=null,$t=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)J1(n,e),n=n.sibling}var Nn=null;function J1(e,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ut(n,e),Pt(e),i&4&&(Ko(3,e,e.return),Ga(3,e),Ko(5,e,e.return));break;case 1:Ut(n,e),Pt(e),i&512&&(vt||r===null||In(r,r.return)),i&64&&Eo&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:var d=Nn;if(Ut(n,e),Pt(e),i&512&&(vt||r===null||In(r,r.return)),i&4){var p=r!==null?r.memoizedState:null;if(i=e.memoizedState,r===null)if(i===null)if(e.stateNode===null){e:{i=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(i){case"title":p=d.getElementsByTagName("title")[0],(!p||p[va]||p[Et]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(i),d.head.insertBefore(p,d.querySelector("head > title"))),Ot(p,i,r),p[Et]=e,Ct(p),i=p;break e;case"link":var C=Jv("link","href",d).get(i+(r.href||""));if(C){for(var T=0;T<C.length;T++)if(p=C[T],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){C.splice(T,1);break t}}p=d.createElement(i),Ot(p,i,r),d.head.appendChild(p);break;case"meta":if(C=Jv("meta","content",d).get(i+(r.content||""))){for(T=0;T<C.length;T++)if(p=C[T],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){C.splice(T,1);break t}}p=d.createElement(i),Ot(p,i,r),d.head.appendChild(p);break;default:throw Error(a(468,i))}p[Et]=e,Ct(p),i=p}e.stateNode=i}else Wv(d,e.type,e.stateNode);else e.stateNode=Kv(d,i,e.memoizedProps);else p!==i?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,i===null?Wv(d,e.type,e.stateNode):Kv(d,i,e.memoizedProps)):i===null&&e.stateNode!==null&&nd(e,e.memoizedProps,r.memoizedProps)}break;case 27:Ut(n,e),Pt(e),i&512&&(vt||r===null||In(r,r.return)),r!==null&&i&4&&nd(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Ut(n,e),Pt(e),i&512&&(vt||r===null||In(r,r.return)),e.flags&32){d=e.stateNode;try{nr(d,"")}catch(se){Ze(e,e.return,se)}}i&4&&e.stateNode!=null&&(d=e.memoizedProps,nd(e,d,r!==null?r.memoizedProps:d)),i&1024&&(rd=!0);break;case 6:if(Ut(n,e),Pt(e),i&4){if(e.stateNode===null)throw Error(a(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i}catch(se){Ze(e,e.return,se)}}break;case 3:if(Bs=null,d=Nn,Nn=ks(n.containerInfo),Ut(n,e),Nn=d,Pt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Dr(n.containerInfo)}catch(se){Ze(e,e.return,se)}rd&&(rd=!1,W1(e));break;case 4:i=Nn,Nn=ks(e.stateNode.containerInfo),Ut(n,e),Pt(e),Nn=i;break;case 12:Ut(n,e),Pt(e);break;case 31:Ut(n,e),Pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ws(e,i)));break;case 13:Ut(n,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Rs=lt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ws(e,i)));break;case 22:d=e.memoizedState!==null;var D=r!==null&&r.memoizedState!==null,G=Eo,K=vt;if(Eo=G||d,vt=K||D,Ut(n,e),vt=K,Eo=G,Pt(e),i&8192)e:for(n=e.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(r===null||D||Eo||vt||Vl(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){D=r=n;try{if(p=D.stateNode,d)C=p.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{T=D.stateNode;var te=D.memoizedProps.style,q=te!=null&&te.hasOwnProperty("display")?te.display:null;T.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(se){Ze(D,D.return,se)}}}else if(n.tag===6){if(r===null){D=n;try{D.stateNode.nodeValue=d?"":D.memoizedProps}catch(se){Ze(D,D.return,se)}}}else if(n.tag===18){if(r===null){D=n;try{var Y=D.stateNode;d?Pv(Y,!0):Pv(D.stateNode,!1)}catch(se){Ze(D,D.return,se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}i&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,ws(e,r))));break;case 19:Ut(n,e),Pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ws(e,i)));break;case 30:break;case 21:break;default:Ut(n,e),Pt(e)}}function Pt(e){var n=e.flags;if(n&2){try{for(var r,i=e.return;i!==null;){if(Z1(i)){r=i;break}i=i.return}if(r==null)throw Error(a(160));switch(r.tag){case 27:var d=r.stateNode,p=od(e);Cs(e,p,d);break;case 5:var C=r.stateNode;r.flags&32&&(nr(C,""),r.flags&=-33);var T=od(e);Cs(e,T,C);break;case 3:case 4:var D=r.stateNode.containerInfo,G=od(e);ld(e,G,D);break;default:throw Error(a(161))}}catch(K){Ze(e,e.return,K)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function W1(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;W1(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function To(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Y1(e,n.alternate,n),n=n.sibling}function Vl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ko(4,n,n.return),Vl(n);break;case 1:In(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&P1(n,n.return,r),Vl(n);break;case 27:Wa(n.stateNode);case 26:case 5:In(n,n.return),Vl(n);break;case 22:n.memoizedState===null&&Vl(n);break;case 30:Vl(n);break;default:Vl(n)}e=e.sibling}}function Mo(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var i=n.alternate,d=e,p=n,C=p.flags;switch(p.tag){case 0:case 11:case 15:Mo(d,p,r),Ga(4,p);break;case 1:if(Mo(d,p,r),i=p,d=i.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(G){Ze(i,i.return,G)}if(i=p,d=i.updateQueue,d!==null){var T=i.stateNode;try{var D=d.shared.hiddenCallbacks;if(D!==null)for(d.shared.hiddenCallbacks=null,d=0;d<D.length;d++)_g(D[d],T)}catch(G){Ze(i,i.return,G)}}r&&C&64&&U1(p),Za(p,p.return);break;case 27:q1(p);case 26:case 5:Mo(d,p,r),r&&i===null&&C&4&&G1(p),Za(p,p.return);break;case 12:Mo(d,p,r);break;case 31:Mo(d,p,r),r&&C&4&&Q1(d,p);break;case 13:Mo(d,p,r),r&&C&4&&K1(d,p);break;case 22:p.memoizedState===null&&Mo(d,p,r),Za(p,p.return);break;case 30:break;default:Mo(d,p,r)}n=n.sibling}}function ad(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&_a(r))}function id(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&_a(e))}function jn(e,n,r,i){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ev(e,n,r,i),n=n.sibling}function ev(e,n,r,i){var d=n.flags;switch(n.tag){case 0:case 11:case 15:jn(e,n,r,i),d&2048&&Ga(9,n);break;case 1:jn(e,n,r,i);break;case 3:jn(e,n,r,i),d&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&_a(e)));break;case 12:if(d&2048){jn(e,n,r,i),e=n.stateNode;try{var p=n.memoizedProps,C=p.id,T=p.onPostCommit;typeof T=="function"&&T(C,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){Ze(n,n.return,D)}}else jn(e,n,r,i);break;case 31:jn(e,n,r,i);break;case 13:jn(e,n,r,i);break;case 23:break;case 22:p=n.stateNode,C=n.alternate,n.memoizedState!==null?p._visibility&2?jn(e,n,r,i):qa(e,n):p._visibility&2?jn(e,n,r,i):(p._visibility|=2,Cr(e,n,r,i,(n.subtreeFlags&10256)!==0||!1)),d&2048&&ad(C,n);break;case 24:jn(e,n,r,i),d&2048&&id(n.alternate,n);break;default:jn(e,n,r,i)}}function Cr(e,n,r,i,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=e,C=n,T=r,D=i,G=C.flags;switch(C.tag){case 0:case 11:case 15:Cr(p,C,T,D,d),Ga(8,C);break;case 23:break;case 22:var K=C.stateNode;C.memoizedState!==null?K._visibility&2?Cr(p,C,T,D,d):qa(p,C):(K._visibility|=2,Cr(p,C,T,D,d)),d&&G&2048&&ad(C.alternate,C);break;case 24:Cr(p,C,T,D,d),d&&G&2048&&id(C.alternate,C);break;default:Cr(p,C,T,D,d)}n=n.sibling}}function qa(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,i=n,d=i.flags;switch(i.tag){case 22:qa(r,i),d&2048&&ad(i.alternate,i);break;case 24:qa(r,i),d&2048&&id(i.alternate,i);break;default:qa(r,i)}n=n.sibling}}var Ia=8192;function wr(e,n,r){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)tv(e,n,r),e=e.sibling}function tv(e,n,r){switch(e.tag){case 26:wr(e,n,r),e.flags&Ia&&e.memoizedState!==null&&S4(r,Nn,e.memoizedState,e.memoizedProps);break;case 5:wr(e,n,r);break;case 3:case 4:var i=Nn;Nn=ks(e.stateNode.containerInfo),wr(e,n,r),Nn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ia,Ia=16777216,wr(e,n,r),Ia=i):wr(e,n,r));break;default:wr(e,n,r)}}function nv(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ya(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];wt=i,lv(i,e)}nv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ov(e),e=e.sibling}function ov(e){switch(e.tag){case 0:case 11:case 15:Ya(e),e.flags&2048&&Ko(9,e,e.return);break;case 3:Ya(e);break;case 12:Ya(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Es(e)):Ya(e);break;default:Ya(e)}}function Es(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];wt=i,lv(i,e)}nv(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ko(8,n,n.return),Es(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,Es(n));break;default:Es(n)}e=e.sibling}}function lv(e,n){for(;wt!==null;){var r=wt;switch(r.tag){case 0:case 11:case 15:Ko(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var i=r.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:_a(r.memoizedState.cache)}if(i=r.child,i!==null)i.return=r,wt=i;else e:for(r=e;wt!==null;){i=wt;var d=i.sibling,p=i.return;if(F1(i),i===r){wt=null;break e}if(d!==null){d.return=p,wt=d;break e}wt=p}}}var zC={getCacheForType:function(e){var n=Tt(pt),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return Tt(pt).controller.signal}},kC=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Qe=null,Ae=null,Ne=0,Ge=0,an=null,Jo=!1,Er=!1,sd=!1,Oo=0,ct=0,Wo=0,Bl=0,cd=0,sn=0,Rr=0,Fa=null,Gt=null,ud=!1,Rs=0,rv=0,Ts=1/0,Ms=null,el=null,yt=0,tl=null,Tr=null,Ao=0,fd=0,dd=null,av=null,Xa=0,md=null;function cn(){return(Ue&2)!==0&&Ne!==0?Ne&-Ne:L.T!==null?yd():Ch()}function iv(){if(sn===0)if((Ne&536870912)===0||De){var e=Li;Li<<=1,(Li&3932160)===0&&(Li=262144),sn=e}else sn=536870912;return e=ln.current,e!==null&&(e.flags|=32),sn}function Zt(e,n,r){(e===Qe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Mr(e,0),nl(e,Ne,sn,!1)),ga(e,r),((Ue&2)===0||e!==Qe)&&(e===Qe&&((Ue&2)===0&&(Bl|=r),ct===4&&nl(e,Ne,sn,!1)),Yn(e))}function sv(e,n,r){if((Ue&6)!==0)throw Error(a(327));var i=!r&&(n&127)===0&&(n&e.expiredLanes)===0||ha(e,n),d=i?$C(e,n):hd(e,n,!0),p=i;do{if(d===0){Er&&!i&&nl(e,n,0,!1);break}else{if(r=e.current.alternate,p&&!VC(r)){d=hd(e,n,!1),p=!1;continue}if(d===2){if(p=n,e.errorRecoveryDisabledLanes&p)var C=0;else C=e.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){n=C;e:{var T=e;d=Fa;var D=T.current.memoizedState.isDehydrated;if(D&&(Mr(T,C).flags|=256),C=hd(T,C,!1),C!==2){if(sd&&!D){T.errorRecoveryDisabledLanes|=p,Bl|=p,d=4;break e}p=Gt,Gt=d,p!==null&&(Gt===null?Gt=p:Gt.push.apply(Gt,p))}d=C}if(p=!1,d!==2)continue}}if(d===1){Mr(e,0),nl(e,n,0,!0);break}e:{switch(i=e,p=d,p){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:nl(i,n,sn,!Jo);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(d=Rs+300-lt(),10<d)){if(nl(i,n,sn,!Jo),ki(i,0,!0)!==0)break e;Ao=n,i.timeoutHandle=Bv(cv.bind(null,i,r,Gt,Ms,ud,n,sn,Bl,Rr,Jo,p,"Throttled",-0,0),d);break e}cv(i,r,Gt,Ms,ud,n,sn,Bl,Rr,Jo,p,null,-0,0)}}break}while(!0);Yn(e)}function cv(e,n,r,i,d,p,C,T,D,G,K,te,q,Y){if(e.timeoutHandle=-1,te=n.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:po},tv(n,p,te);var se=(p&62914560)===p?Rs-lt():(p&4194048)===p?rv-lt():0;if(se=C4(te,se),se!==null){Ao=p,e.cancelPendingCommit=se(vv.bind(null,e,n,p,r,i,d,C,T,D,K,te,null,q,Y)),nl(e,p,C,!G);return}}vv(e,n,p,r,i,d,C,T,D)}function VC(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var i=0;i<r.length;i++){var d=r[i],p=d.getSnapshot;d=d.value;try{if(!nn(p(),d))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function nl(e,n,r,i){n&=~cd,n&=~Bl,e.suspendedLanes|=n,e.pingedLanes&=~n,i&&(e.warmLanes|=n),i=e.expirationTimes;for(var d=n;0<d;){var p=31-tn(d),C=1<<p;i[p]=-1,d&=~C}r!==0&&yh(e,r,n)}function Os(){return(Ue&6)===0?(Qa(0),!1):!0}function pd(){if(Ae!==null){if(Ge===0)var e=Ae.return;else e=Ae,bo=_l=null,_f(e),vr=null,ja=0,e=Ae;for(;e!==null;)$1(e.alternate,e),e=e.return;Ae=null}}function Mr(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,l4(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ao=0,pd(),Qe=e,Ae=r=go(e.current,null),Ne=n,Ge=0,an=null,Jo=!1,Er=ha(e,n),sd=!1,Rr=sn=cd=Bl=Wo=ct=0,Gt=Fa=null,ud=!1,(n&8)!==0&&(n|=n&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=n;0<i;){var d=31-tn(i),p=1<<d;n|=e[d],i&=~p}return Oo=n,Xi(),r}function uv(e,n){we=null,L.H=$a,n===gr||n===os?(n=Tg(),Ge=3):n===bf?(n=Tg(),Ge=4):Ge=n===If?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,an=n,Ae===null&&(ct=1,vs(e,bn(n,e.current)))}function fv(){var e=ln.current;return e===null?!0:(Ne&4194048)===Ne?Cn===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Cn:!1}function dv(){var e=L.H;return L.H=$a,e===null?$a:e}function mv(){var e=L.A;return L.A=zC,e}function As(){ct=4,Jo||(Ne&4194048)!==Ne&&ln.current!==null||(Er=!0),(Wo&134217727)===0&&(Bl&134217727)===0||Qe===null||nl(Qe,Ne,sn,!1)}function hd(e,n,r){var i=Ue;Ue|=2;var d=dv(),p=mv();(Qe!==e||Ne!==n)&&(Ms=null,Mr(e,n)),n=!1;var C=ct;e:do try{if(Ge!==0&&Ae!==null){var T=Ae,D=an;switch(Ge){case 8:pd(),C=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(n=!0);var G=Ge;if(Ge=0,an=null,Or(e,T,D,G),r&&Er){C=0;break e}break;default:G=Ge,Ge=0,an=null,Or(e,T,D,G)}}BC(),C=ct;break}catch(K){uv(e,K)}while(!0);return n&&e.shellSuspendCounter++,bo=_l=null,Ue=i,L.H=d,L.A=p,Ae===null&&(Qe=null,Ne=0,Xi()),C}function BC(){for(;Ae!==null;)pv(Ae)}function $C(e,n){var r=Ue;Ue|=2;var i=dv(),d=mv();Qe!==e||Ne!==n?(Ms=null,Ts=lt()+500,Mr(e,n)):Er=ha(e,n);e:do try{if(Ge!==0&&Ae!==null){n=Ae;var p=an;t:switch(Ge){case 1:Ge=0,an=null,Or(e,n,p,1);break;case 2:case 9:if(Eg(p)){Ge=0,an=null,hv(n);break}n=function(){Ge!==2&&Ge!==9||Qe!==e||(Ge=7),Yn(e)},p.then(n,n);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Eg(p)?(Ge=0,an=null,hv(n)):(Ge=0,an=null,Or(e,n,p,7));break;case 5:var C=null;switch(Ae.tag){case 26:C=Ae.memoizedState;case 5:case 27:var T=Ae;if(C?e0(C):T.stateNode.complete){Ge=0,an=null;var D=T.sibling;if(D!==null)Ae=D;else{var G=T.return;G!==null?(Ae=G,_s(G)):Ae=null}break t}}Ge=0,an=null,Or(e,n,p,5);break;case 6:Ge=0,an=null,Or(e,n,p,6);break;case 8:pd(),ct=6;break e;default:throw Error(a(462))}}UC();break}catch(K){uv(e,K)}while(!0);return bo=_l=null,L.H=i,L.A=d,Ue=r,Ae!==null?0:(Qe=null,Ne=0,Xi(),ct)}function UC(){for(;Ae!==null&&!pn();)pv(Ae)}function pv(e){var n=V1(e.alternate,e,Oo);e.memoizedProps=e.pendingProps,n===null?_s(e):Ae=n}function hv(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=j1(r,n,n.pendingProps,n.type,void 0,Ne);break;case 11:n=j1(r,n,n.pendingProps,n.type.render,n.ref,Ne);break;case 5:_f(n);default:$1(r,n),n=Ae=mg(n,Oo),n=V1(r,n,Oo)}e.memoizedProps=e.pendingProps,n===null?_s(e):Ae=n}function Or(e,n,r,i){bo=_l=null,_f(n),vr=null,ja=0;var d=n.return;try{if(AC(e,d,n,r,Ne)){ct=1,vs(e,bn(r,e.current)),Ae=null;return}}catch(p){if(d!==null)throw Ae=d,p;ct=1,vs(e,bn(r,e.current)),Ae=null;return}n.flags&32768?(De||i===1?e=!0:Er||(Ne&536870912)!==0?e=!1:(Jo=e=!0,(i===2||i===9||i===3||i===6)&&(i=ln.current,i!==null&&i.tag===13&&(i.flags|=16384))),gv(n,e)):_s(n)}function _s(e){var n=e;do{if((n.flags&32768)!==0){gv(n,Jo);return}e=n.return;var r=jC(n.alternate,n,Oo);if(r!==null){Ae=r;return}if(n=n.sibling,n!==null){Ae=n;return}Ae=n=e}while(n!==null);ct===0&&(ct=5)}function gv(e,n){do{var r=DC(e.alternate,e);if(r!==null){r.flags&=32767,Ae=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=r}while(e!==null);ct=6,Ae=null}function vv(e,n,r,i,d,p,C,T,D){e.cancelPendingCommit=null;do Ns();while(yt!==0);if((Ue&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(p=n.lanes|n.childLanes,p|=nf,xS(e,r,p,C,T,D),e===Qe&&(Ae=Qe=null,Ne=0),Tr=n,tl=e,Ao=r,fd=p,dd=d,av=i,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qC(Xl,function(){return Cv(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||i){i=L.T,L.T=null,d=z.p,z.p=2,C=Ue,Ue|=4;try{HC(e,n,r)}finally{Ue=C,z.p=d,L.T=i}}yt=1,bv(),yv(),xv()}}function bv(){if(yt===1){yt=0;var e=tl,n=Tr,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=L.T,L.T=null;var i=z.p;z.p=2;var d=Ue;Ue|=4;try{J1(n,e);var p=Md,C=lg(e.containerInfo),T=p.focusedElem,D=p.selectionRange;if(C!==T&&T&&T.ownerDocument&&og(T.ownerDocument.documentElement,T)){if(D!==null&&Ku(T)){var G=D.start,K=D.end;if(K===void 0&&(K=G),"selectionStart"in T)T.selectionStart=G,T.selectionEnd=Math.min(K,T.value.length);else{var te=T.ownerDocument||document,q=te&&te.defaultView||window;if(q.getSelection){var Y=q.getSelection(),se=T.textContent.length,ye=Math.min(D.start,se),Fe=D.end===void 0?ye:Math.min(D.end,se);!Y.extend&&ye>Fe&&(C=Fe,Fe=ye,ye=C);var B=ng(T,ye),k=ng(T,Fe);if(B&&k&&(Y.rangeCount!==1||Y.anchorNode!==B.node||Y.anchorOffset!==B.offset||Y.focusNode!==k.node||Y.focusOffset!==k.offset)){var P=te.createRange();P.setStart(B.node,B.offset),Y.removeAllRanges(),ye>Fe?(Y.addRange(P),Y.extend(k.node,k.offset)):(P.setEnd(k.node,k.offset),Y.addRange(P))}}}}for(te=[],Y=T;Y=Y.parentNode;)Y.nodeType===1&&te.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<te.length;T++){var W=te[T];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Gs=!!Td,Md=Td=null}finally{Ue=d,z.p=i,L.T=r}}e.current=n,yt=2}}function yv(){if(yt===2){yt=0;var e=tl,n=Tr,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=L.T,L.T=null;var i=z.p;z.p=2;var d=Ue;Ue|=4;try{Y1(e,n.alternate,n)}finally{Ue=d,z.p=i,L.T=r}}yt=3}}function xv(){if(yt===4||yt===3){yt=0,Wt();var e=tl,n=Tr,r=Ao,i=av;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?yt=5:(yt=0,Tr=tl=null,Sv(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(el=null),ju(r),n=n.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(pa,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=L.T,d=z.p,z.p=2,L.T=null;try{for(var p=e.onRecoverableError,C=0;C<i.length;C++){var T=i[C];p(T.value,{componentStack:T.stack})}}finally{L.T=n,z.p=d}}(Ao&3)!==0&&Ns(),Yn(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===md?Xa++:(Xa=0,md=e):Xa=0,Qa(0)}}function Sv(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,_a(n)))}function Ns(){return bv(),yv(),xv(),Cv()}function Cv(){if(yt!==5)return!1;var e=tl,n=fd;fd=0;var r=ju(Ao),i=L.T,d=z.p;try{z.p=32>r?32:r,L.T=null,r=dd,dd=null;var p=tl,C=Ao;if(yt=0,Tr=tl=null,Ao=0,(Ue&6)!==0)throw Error(a(331));var T=Ue;if(Ue|=4,ov(p.current),ev(p,p.current,C,r),Ue=T,Qa(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(pa,p)}catch{}return!0}finally{z.p=d,L.T=i,Sv(e,n)}}function wv(e,n,r){n=bn(r,n),n=qf(e.stateNode,n,2),e=Fo(e,n,2),e!==null&&(ga(e,2),Yn(e))}function Ze(e,n,r){if(e.tag===3)wv(e,e,r);else for(;n!==null;){if(n.tag===3){wv(n,e,r);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(el===null||!el.has(i))){e=bn(r,e),r=E1(2),i=Fo(n,r,2),i!==null&&(R1(r,i,n,e),ga(i,2),Yn(i));break}}n=n.return}}function gd(e,n,r){var i=e.pingCache;if(i===null){i=e.pingCache=new kC;var d=new Set;i.set(n,d)}else d=i.get(n),d===void 0&&(d=new Set,i.set(n,d));d.has(r)||(sd=!0,d.add(r),e=PC.bind(null,e,n,r),n.then(e,e))}function PC(e,n,r){var i=e.pingCache;i!==null&&i.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Qe===e&&(Ne&r)===r&&(ct===4||ct===3&&(Ne&62914560)===Ne&&300>lt()-Rs?(Ue&2)===0&&Mr(e,0):cd|=r,Rr===Ne&&(Rr=0)),Yn(e)}function Ev(e,n){n===0&&(n=bh()),e=Ml(e,n),e!==null&&(ga(e,n),Yn(e))}function GC(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Ev(e,r)}function ZC(e,n){var r=0;switch(e.tag){case 31:case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(a(314))}i!==null&&i.delete(n),Ev(e,r)}function qC(e,n){return it(e,n)}var js=null,Ar=null,vd=!1,Ds=!1,bd=!1,ol=0;function Yn(e){e!==Ar&&e.next===null&&(Ar===null?js=Ar=e:Ar=Ar.next=e),Ds=!0,vd||(vd=!0,YC())}function Qa(e,n){if(!bd&&Ds){bd=!0;do for(var r=!1,i=js;i!==null;){if(e!==0){var d=i.pendingLanes;if(d===0)var p=0;else{var C=i.suspendedLanes,T=i.pingedLanes;p=(1<<31-tn(42|e)+1)-1,p&=d&~(C&~T),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,Ov(i,p))}else p=Ne,p=ki(i,i===Qe?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(p&3)===0||ha(i,p)||(r=!0,Ov(i,p));i=i.next}while(r);bd=!1}}function IC(){Rv()}function Rv(){Ds=vd=!1;var e=0;ol!==0&&o4()&&(e=ol);for(var n=lt(),r=null,i=js;i!==null;){var d=i.next,p=Tv(i,n);p===0?(i.next=null,r===null?js=d:r.next=d,d===null&&(Ar=r)):(r=i,(e!==0||(p&3)!==0)&&(Ds=!0)),i=d}yt!==0&&yt!==5||Qa(e),ol!==0&&(ol=0)}function Tv(e,n){for(var r=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var C=31-tn(p),T=1<<C,D=d[C];D===-1?((T&r)===0||(T&i)!==0)&&(d[C]=yS(T,n)):D<=n&&(e.expiredLanes|=T),p&=~T}if(n=Qe,r=Ne,r=ki(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,r===0||e===n&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&kt(i),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||ha(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(i!==null&&kt(i),ju(r)){case 2:case 8:r=bt;break;case 32:r=Xl;break;case 268435456:r=Di;break;default:r=Xl}return i=Mv.bind(null,e),r=it(r,i),e.callbackPriority=n,e.callbackNode=r,n}return i!==null&&i!==null&&kt(i),e.callbackPriority=2,e.callbackNode=null,2}function Mv(e,n){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Ns()&&e.callbackNode!==r)return null;var i=Ne;return i=ki(e,e===Qe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(sv(e,i,n),Tv(e,lt()),e.callbackNode!=null&&e.callbackNode===r?Mv.bind(null,e):null)}function Ov(e,n){if(Ns())return null;sv(e,n,!0)}function YC(){r4(function(){(Ue&6)!==0?it(ma,IC):Rv()})}function yd(){if(ol===0){var e=pr;e===0&&(e=Hi,Hi<<=1,(Hi&261888)===0&&(Hi=256)),ol=e}return ol}function Av(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ui(""+e)}function _v(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function FC(e,n,r,i,d){if(n==="submit"&&r&&r.stateNode===d){var p=Av((d[Vt]||null).action),C=i.submitter;C&&(n=(n=C[Vt]||null)?Av(n.formAction):C.getAttribute("formAction"),n!==null&&(p=n,C=null));var T=new qi("action","action",null,i,d);e.push({event:T,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ol!==0){var D=C?_v(d,C):new FormData(d);Bf(r,{pending:!0,data:D,method:d.method,action:p},null,D)}}else typeof p=="function"&&(T.preventDefault(),D=C?_v(d,C):new FormData(d),Bf(r,{pending:!0,data:D,method:d.method,action:p},p,D))},currentTarget:d}]})}}for(var xd=0;xd<tf.length;xd++){var Sd=tf[xd],XC=Sd.toLowerCase(),QC=Sd[0].toUpperCase()+Sd.slice(1);_n(XC,"on"+QC)}_n(ig,"onAnimationEnd"),_n(sg,"onAnimationIteration"),_n(cg,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(dC,"onTransitionRun"),_n(mC,"onTransitionStart"),_n(pC,"onTransitionCancel"),_n(ug,"onTransitionEnd"),er("onMouseEnter",["mouseout","mouseover"]),er("onMouseLeave",["mouseout","mouseover"]),er("onPointerEnter",["pointerout","pointerover"]),er("onPointerLeave",["pointerout","pointerover"]),wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ka="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(" "),KC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ka));function Nv(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],d=i.event;i=i.listeners;e:{var p=void 0;if(n)for(var C=i.length-1;0<=C;C--){var T=i[C],D=T.instance,G=T.currentTarget;if(T=T.listener,D!==p&&d.isPropagationStopped())break e;p=T,d.currentTarget=G;try{p(d)}catch(K){Fi(K)}d.currentTarget=null,p=D}else for(C=0;C<i.length;C++){if(T=i[C],D=T.instance,G=T.currentTarget,T=T.listener,D!==p&&d.isPropagationStopped())break e;p=T,d.currentTarget=G;try{p(d)}catch(K){Fi(K)}d.currentTarget=null,p=D}}}}function _e(e,n){var r=n[Du];r===void 0&&(r=n[Du]=new Set);var i=e+"__bubble";r.has(i)||(jv(n,e,2,!1),r.add(i))}function Cd(e,n,r){var i=0;n&&(i|=4),jv(r,e,i,n)}var Hs="_reactListening"+Math.random().toString(36).slice(2);function wd(e){if(!e[Hs]){e[Hs]=!0,Rh.forEach(function(r){r!=="selectionchange"&&(KC.has(r)||Cd(r,!1,e),Cd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Hs]||(n[Hs]=!0,Cd("selectionchange",!1,n))}}function jv(e,n,r,i){switch(i0(n)){case 2:var d=R4;break;case 8:d=T4;break;default:d=Vd}r=d.bind(null,n,r,e),d=void 0,!Pu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(n,r,{capture:!0,passive:d}):e.addEventListener(n,r,!0):d!==void 0?e.addEventListener(n,r,{passive:d}):e.addEventListener(n,r,!1)}function Ed(e,n,r,i,d){var p=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var C=i.tag;if(C===3||C===4){var T=i.stateNode.containerInfo;if(T===d)break;if(C===4)for(C=i.return;C!==null;){var D=C.tag;if((D===3||D===4)&&C.stateNode.containerInfo===d)return;C=C.return}for(;T!==null;){if(C=Kl(T),C===null)return;if(D=C.tag,D===5||D===6||D===26||D===27){i=p=C;continue e}T=T.parentNode}}i=i.return}kh(function(){var G=p,K=$u(r),te=[];e:{var q=fg.get(e);if(q!==void 0){var Y=qi,se=e;switch(e){case"keypress":if(Gi(r)===0)break e;case"keydown":case"keyup":Y=ZS;break;case"focusin":se="focus",Y=Iu;break;case"focusout":se="blur",Y=Iu;break;case"beforeblur":case"afterblur":Y=Iu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=$h;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=jS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=YS;break;case ig:case sg:case cg:Y=LS;break;case ug:Y=XS;break;case"scroll":case"scrollend":Y=_S;break;case"wheel":Y=KS;break;case"copy":case"cut":case"paste":Y=kS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ph;break;case"toggle":case"beforetoggle":Y=WS}var ye=(n&4)!==0,Fe=!ye&&(e==="scroll"||e==="scrollend"),B=ye?q!==null?q+"Capture":null:q;ye=[];for(var k=G,P;k!==null;){var W=k;if(P=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||P===null||B===null||(W=ya(k,B),W!=null&&ye.push(Ja(k,W,P))),Fe)break;k=k.return}0<ye.length&&(q=new Y(q,se,null,r,K),te.push({event:q,listeners:ye}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",q&&r!==Bu&&(se=r.relatedTarget||r.fromElement)&&(Kl(se)||se[Ql]))break e;if((Y||q)&&(q=K.window===K?K:(q=K.ownerDocument)?q.defaultView||q.parentWindow:window,Y?(se=r.relatedTarget||r.toElement,Y=G,se=se?Kl(se):null,se!==null&&(Fe=c(se),ye=se.tag,se!==Fe||ye!==5&&ye!==27&&ye!==6)&&(se=null)):(Y=null,se=G),Y!==se)){if(ye=$h,W="onMouseLeave",B="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Ph,W="onPointerLeave",B="onPointerEnter",k="pointer"),Fe=Y==null?q:ba(Y),P=se==null?q:ba(se),q=new ye(W,k+"leave",Y,r,K),q.target=Fe,q.relatedTarget=P,W=null,Kl(K)===G&&(ye=new ye(B,k+"enter",se,r,K),ye.target=P,ye.relatedTarget=Fe,W=ye),Fe=W,Y&&se)t:{for(ye=JC,B=Y,k=se,P=0,W=B;W;W=ye(W))P++;W=0;for(var he=k;he;he=ye(he))W++;for(;0<P-W;)B=ye(B),P--;for(;0<W-P;)k=ye(k),W--;for(;P--;){if(B===k||k!==null&&B===k.alternate){ye=B;break t}B=ye(B),k=ye(k)}ye=null}else ye=null;Y!==null&&Dv(te,q,Y,ye,!1),se!==null&&Fe!==null&&Dv(te,Fe,se,ye,!0)}}e:{if(q=G?ba(G):window,Y=q.nodeName&&q.nodeName.toLowerCase(),Y==="select"||Y==="input"&&q.type==="file")var Be=Qh;else if(Fh(q))if(Kh)Be=cC;else{Be=iC;var fe=aC}else Y=q.nodeName,!Y||Y.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?G&&Vu(G.elementType)&&(Be=Qh):Be=sC;if(Be&&(Be=Be(e,G))){Xh(te,Be,r,K);break e}fe&&fe(e,q,G),e==="focusout"&&G&&q.type==="number"&&G.memoizedProps.value!=null&&ku(q,"number",q.value)}switch(fe=G?ba(G):window,e){case"focusin":(Fh(fe)||fe.contentEditable==="true")&&(ar=fe,Ju=G,Ma=null);break;case"focusout":Ma=Ju=ar=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,rg(te,r,K);break;case"selectionchange":if(fC)break;case"keydown":case"keyup":rg(te,r,K)}var Ee;if(Fu)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else rr?Ih(e,r)&&(je="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(je="onCompositionStart");je&&(Gh&&r.locale!=="ko"&&(rr||je!=="onCompositionStart"?je==="onCompositionEnd"&&rr&&(Ee=Vh()):(Uo=K,Gu="value"in Uo?Uo.value:Uo.textContent,rr=!0)),fe=Ls(G,je),0<fe.length&&(je=new Uh(je,e,null,r,K),te.push({event:je,listeners:fe}),Ee?je.data=Ee:(Ee=Yh(r),Ee!==null&&(je.data=Ee)))),(Ee=tC?nC(e,r):oC(e,r))&&(je=Ls(G,"onBeforeInput"),0<je.length&&(fe=new Uh("onBeforeInput","beforeinput",null,r,K),te.push({event:fe,listeners:je}),fe.data=Ee)),FC(te,e,G,r,K)}Nv(te,n)})}function Ja(e,n,r){return{instance:e,listener:n,currentTarget:r}}function Ls(e,n){for(var r=n+"Capture",i=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=ya(e,r),d!=null&&i.unshift(Ja(e,d,p)),d=ya(e,n),d!=null&&i.push(Ja(e,d,p))),e.tag===3)return i;e=e.return}return[]}function JC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dv(e,n,r,i,d){for(var p=n._reactName,C=[];r!==null&&r!==i;){var T=r,D=T.alternate,G=T.stateNode;if(T=T.tag,D!==null&&D===i)break;T!==5&&T!==26&&T!==27||G===null||(D=G,d?(G=ya(r,p),G!=null&&C.unshift(Ja(r,G,D))):d||(G=ya(r,p),G!=null&&C.push(Ja(r,G,D)))),r=r.return}C.length!==0&&e.push({event:n,listeners:C})}var WC=/\r\n?/g,e4=/\u0000|\uFFFD/g;function Hv(e){return(typeof e=="string"?e:""+e).replace(WC,`
|
|
9
|
+
`).replace(e4,"")}function Lv(e,n){return n=Hv(n),Hv(e)===n}function Ye(e,n,r,i,d,p){switch(r){case"children":typeof i=="string"?n==="body"||n==="textarea"&&i===""||nr(e,i):(typeof i=="number"||typeof i=="bigint")&&n!=="body"&&nr(e,""+i);break;case"className":Bi(e,"class",i);break;case"tabIndex":Bi(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Bi(e,r,i);break;case"style":Lh(e,i,p);break;case"data":if(n!=="object"){Bi(e,"data",i);break}case"src":case"href":if(i===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Ui(""+i),e.setAttribute(r,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(r,"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 p=="function"&&(r==="formAction"?(n!=="input"&&Ye(e,n,"name",d.name,d,null),Ye(e,n,"formEncType",d.formEncType,d,null),Ye(e,n,"formMethod",d.formMethod,d,null),Ye(e,n,"formTarget",d.formTarget,d,null)):(Ye(e,n,"encType",d.encType,d,null),Ye(e,n,"method",d.method,d,null),Ye(e,n,"target",d.target,d,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Ui(""+i),e.setAttribute(r,i);break;case"onClick":i!=null&&(e.onclick=po);break;case"onScroll":i!=null&&_e("scroll",e);break;case"onScrollEnd":i!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(a(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(a(60));e.innerHTML=r}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}r=Ui(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""+i):e.removeAttribute(r);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":i===!0?e.setAttribute(r,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,i):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(r,i):e.removeAttribute(r);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(r):e.setAttribute(r,i);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Vi(e,"popover",i);break;case"xlinkActuate":mo(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":mo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":mo(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":mo(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":mo(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":mo(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":mo(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":mo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":mo(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Vi(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=OS.get(r)||r,Vi(e,r,i))}}function Rd(e,n,r,i,d,p){switch(r){case"style":Lh(e,i,p);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(a(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(a(60));e.innerHTML=r}}break;case"children":typeof i=="string"?nr(e,i):(typeof i=="number"||typeof i=="bigint")&&nr(e,""+i);break;case"onScroll":i!=null&&_e("scroll",e);break;case"onScrollEnd":i!=null&&_e("scrollend",e);break;case"onClick":i!=null&&(e.onclick=po);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Th.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),n=r.slice(2,d?r.length-7:void 0),p=e[Vt]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(n,p,d),typeof i=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,i,d);break e}r in e?e[r]=i:i===!0?e.setAttribute(r,""):Vi(e,r,i)}}}function Ot(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var i=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var C=r[p];if(C!=null)switch(p){case"src":i=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Ye(e,n,p,C,r,null)}}d&&Ye(e,n,"srcSet",r.srcSet,r,null),i&&Ye(e,n,"src",r.src,r,null);return;case"input":_e("invalid",e);var T=p=C=d=null,D=null,G=null;for(i in r)if(r.hasOwnProperty(i)){var K=r[i];if(K!=null)switch(i){case"name":d=K;break;case"type":C=K;break;case"checked":D=K;break;case"defaultChecked":G=K;break;case"value":p=K;break;case"defaultValue":T=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,n));break;default:Ye(e,n,i,K,r,null)}}Nh(e,p,T,D,G,C,d,!1);return;case"select":_e("invalid",e),i=C=p=null;for(d in r)if(r.hasOwnProperty(d)&&(T=r[d],T!=null))switch(d){case"value":p=T;break;case"defaultValue":C=T;break;case"multiple":i=T;default:Ye(e,n,d,T,r,null)}n=p,r=C,e.multiple=!!i,n!=null?tr(e,!!i,n,!1):r!=null&&tr(e,!!i,r,!0);return;case"textarea":_e("invalid",e),p=d=i=null;for(C in r)if(r.hasOwnProperty(C)&&(T=r[C],T!=null))switch(C){case"value":i=T;break;case"defaultValue":d=T;break;case"children":p=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(a(91));break;default:Ye(e,n,C,T,r,null)}Dh(e,i,d,p);return;case"option":for(D in r)r.hasOwnProperty(D)&&(i=r[D],i!=null)&&(D==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":Ye(e,n,D,i,r,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(i=0;i<Ka.length;i++)_e(Ka[i],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in r)if(r.hasOwnProperty(G)&&(i=r[G],i!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Ye(e,n,G,i,r,null)}return;default:if(Vu(n)){for(K in r)r.hasOwnProperty(K)&&(i=r[K],i!==void 0&&Rd(e,n,K,i,r,void 0));return}}for(T in r)r.hasOwnProperty(T)&&(i=r[T],i!=null&&Ye(e,n,T,i,r,null))}function t4(e,n,r,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,C=null,T=null,D=null,G=null,K=null;for(Y in r){var te=r[Y];if(r.hasOwnProperty(Y)&&te!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":D=te;default:i.hasOwnProperty(Y)||Ye(e,n,Y,null,i,te)}}for(var q in i){var Y=i[q];if(te=r[q],i.hasOwnProperty(q)&&(Y!=null||te!=null))switch(q){case"type":p=Y;break;case"name":d=Y;break;case"checked":G=Y;break;case"defaultChecked":K=Y;break;case"value":C=Y;break;case"defaultValue":T=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,n));break;default:Y!==te&&Ye(e,n,q,Y,i,te)}}zu(e,C,T,D,G,K,p,d);return;case"select":Y=C=T=q=null;for(p in r)if(D=r[p],r.hasOwnProperty(p)&&D!=null)switch(p){case"value":break;case"multiple":Y=D;default:i.hasOwnProperty(p)||Ye(e,n,p,null,i,D)}for(d in i)if(p=i[d],D=r[d],i.hasOwnProperty(d)&&(p!=null||D!=null))switch(d){case"value":q=p;break;case"defaultValue":T=p;break;case"multiple":C=p;default:p!==D&&Ye(e,n,d,p,i,D)}n=T,r=C,i=Y,q!=null?tr(e,!!r,q,!1):!!i!=!!r&&(n!=null?tr(e,!!r,n,!0):tr(e,!!r,r?[]:"",!1));return;case"textarea":Y=q=null;for(T in r)if(d=r[T],r.hasOwnProperty(T)&&d!=null&&!i.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ye(e,n,T,null,i,d)}for(C in i)if(d=i[C],p=r[C],i.hasOwnProperty(C)&&(d!=null||p!=null))switch(C){case"value":q=d;break;case"defaultValue":Y=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==p&&Ye(e,n,C,d,i,p)}jh(e,q,Y);return;case"option":for(var se in r)q=r[se],r.hasOwnProperty(se)&&q!=null&&!i.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Ye(e,n,se,null,i,q));for(D in i)q=i[D],Y=r[D],i.hasOwnProperty(D)&&q!==Y&&(q!=null||Y!=null)&&(D==="selected"?e.selected=q&&typeof q!="function"&&typeof q!="symbol":Ye(e,n,D,q,i,Y));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 ye in r)q=r[ye],r.hasOwnProperty(ye)&&q!=null&&!i.hasOwnProperty(ye)&&Ye(e,n,ye,null,i,q);for(G in i)if(q=i[G],Y=r[G],i.hasOwnProperty(G)&&q!==Y&&(q!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,n));break;default:Ye(e,n,G,q,i,Y)}return;default:if(Vu(n)){for(var Fe in r)q=r[Fe],r.hasOwnProperty(Fe)&&q!==void 0&&!i.hasOwnProperty(Fe)&&Rd(e,n,Fe,void 0,i,q);for(K in i)q=i[K],Y=r[K],!i.hasOwnProperty(K)||q===Y||q===void 0&&Y===void 0||Rd(e,n,K,q,i,Y);return}}for(var B in r)q=r[B],r.hasOwnProperty(B)&&q!=null&&!i.hasOwnProperty(B)&&Ye(e,n,B,null,i,q);for(te in i)q=i[te],Y=r[te],!i.hasOwnProperty(te)||q===Y||q==null&&Y==null||Ye(e,n,te,q,i,Y)}function zv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function n4(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),i=0;i<r.length;i++){var d=r[i],p=d.transferSize,C=d.initiatorType,T=d.duration;if(p&&T&&zv(C)){for(C=0,T=d.responseEnd,i+=1;i<r.length;i++){var D=r[i],G=D.startTime;if(G>T)break;var K=D.transferSize,te=D.initiatorType;K&&zv(te)&&(D=D.responseEnd,C+=K*(D<T?1:(T-G)/(D-G)))}if(--i,n+=8*(p+C)/(d.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Td=null,Md=null;function zs(e){return e.nodeType===9?e:e.ownerDocument}function kv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vv(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Od(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ad=null;function o4(){var e=window.event;return e&&e.type==="popstate"?e===Ad?!1:(Ad=e,!0):(Ad=null,!1)}var Bv=typeof setTimeout=="function"?setTimeout:void 0,l4=typeof clearTimeout=="function"?clearTimeout:void 0,$v=typeof Promise=="function"?Promise:void 0,r4=typeof queueMicrotask=="function"?queueMicrotask:typeof $v<"u"?function(e){return $v.resolve(null).then(e).catch(a4)}:Bv;function a4(e){setTimeout(function(){throw e})}function ll(e){return e==="head"}function Uv(e,n){var r=n,i=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(i===0){e.removeChild(d),Dr(n);return}i--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")i++;else if(r==="html")Wa(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Wa(r);for(var p=r.firstChild;p;){var C=p.nextSibling,T=p.nodeName;p[va]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=C}}else r==="body"&&Wa(e.ownerDocument.body);r=d}while(r);Dr(n)}function Pv(e,n){var r=e;e=0;do{var i=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=i}while(r)}function _d(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":_d(r),Hu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function i4(e,n,r,i){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[va])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function s4(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=wn(e.nextSibling),e===null))return null;return e}function Gv(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=wn(e.nextSibling),e===null))return null;return e}function Nd(e){return e.data==="$?"||e.data==="$~"}function jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function c4(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var i=function(){n(),r.removeEventListener("DOMContentLoaded",i)};r.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function wn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Dd=null;function Zv(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return wn(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function qv(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function Iv(e,n,r){switch(n=zs(r),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Wa(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Hu(e)}var En=new Map,Yv=new Set;function ks(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _o=z.d;z.d={f:u4,r:f4,D:d4,C:m4,L:p4,m:h4,X:v4,S:g4,M:b4};function u4(){var e=_o.f(),n=Os();return e||n}function f4(e){var n=Jl(e);n!==null&&n.tag===5&&n.type==="form"?u1(n):_o.r(e)}var _r=typeof document>"u"?null:document;function Fv(e,n,r){var i=_r;if(i&&typeof n=="string"&&n){var d=gn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),Yv.has(d)||(Yv.add(d),e={rel:e,crossOrigin:r,href:n},i.querySelector(d)===null&&(n=i.createElement("link"),Ot(n,"link",e),Ct(n),i.head.appendChild(n)))}}function d4(e){_o.D(e),Fv("dns-prefetch",e,null)}function m4(e,n){_o.C(e,n),Fv("preconnect",e,n)}function p4(e,n,r){_o.L(e,n,r);var i=_r;if(i&&e&&n){var d='link[rel="preload"][as="'+gn(n)+'"]';n==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+gn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+gn(r.imageSizes)+'"]')):d+='[href="'+gn(e)+'"]';var p=d;switch(n){case"style":p=Nr(e);break;case"script":p=jr(e)}En.has(p)||(e=b({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),En.set(p,e),i.querySelector(d)!==null||n==="style"&&i.querySelector(ei(p))||n==="script"&&i.querySelector(ti(p))||(n=i.createElement("link"),Ot(n,"link",e),Ct(n),i.head.appendChild(n)))}}function h4(e,n){_o.m(e,n);var r=_r;if(r&&e){var i=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+gn(i)+'"][href="'+gn(e)+'"]',p=d;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=jr(e)}if(!En.has(p)&&(e=b({rel:"modulepreload",href:e},n),En.set(p,e),r.querySelector(d)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ti(p)))return}i=r.createElement("link"),Ot(i,"link",e),Ct(i),r.head.appendChild(i)}}}function g4(e,n,r){_o.S(e,n,r);var i=_r;if(i&&e){var d=Wl(i).hoistableStyles,p=Nr(e);n=n||"default";var C=d.get(p);if(!C){var T={loading:0,preload:null};if(C=i.querySelector(ei(p)))T.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":n},r),(r=En.get(p))&&Hd(e,r);var D=C=i.createElement("link");Ct(D),Ot(D,"link",e),D._p=new Promise(function(G,K){D.onload=G,D.onerror=K}),D.addEventListener("load",function(){T.loading|=1}),D.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Vs(C,n,i)}C={type:"stylesheet",instance:C,count:1,state:T},d.set(p,C)}}}function v4(e,n){_o.X(e,n);var r=_r;if(r&&e){var i=Wl(r).hoistableScripts,d=jr(e),p=i.get(d);p||(p=r.querySelector(ti(d)),p||(e=b({src:e,async:!0},n),(n=En.get(d))&&Ld(e,n),p=r.createElement("script"),Ct(p),Ot(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(d,p))}}function b4(e,n){_o.M(e,n);var r=_r;if(r&&e){var i=Wl(r).hoistableScripts,d=jr(e),p=i.get(d);p||(p=r.querySelector(ti(d)),p||(e=b({src:e,async:!0,type:"module"},n),(n=En.get(d))&&Ld(e,n),p=r.createElement("script"),Ct(p),Ot(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(d,p))}}function Xv(e,n,r,i){var d=(d=Ce.current)?ks(d):null;if(!d)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=Nr(r.href),r=Wl(d).hoistableStyles,i=r.get(n),i||(i={type:"style",instance:null,count:0,state:null},r.set(n,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Nr(r.href);var p=Wl(d).hoistableStyles,C=p.get(e);if(C||(d=d.ownerDocument||d,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,C),(p=d.querySelector(ei(e)))&&!p._p&&(C.instance=p,C.state.loading=5),En.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},En.set(e,r),p||y4(d,e,r,C.state))),n&&i===null)throw Error(a(528,""));return C}if(n&&i!==null)throw Error(a(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=jr(r),r=Wl(d).hoistableScripts,i=r.get(n),i||(i={type:"script",instance:null,count:0,state:null},r.set(n,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Nr(e){return'href="'+gn(e)+'"'}function ei(e){return'link[rel="stylesheet"]['+e+"]"}function Qv(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function y4(e,n,r,i){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?i.loading=1:(n=e.createElement("link"),i.preload=n,n.addEventListener("load",function(){return i.loading|=1}),n.addEventListener("error",function(){return i.loading|=2}),Ot(n,"link",r),Ct(n),e.head.appendChild(n))}function jr(e){return'[src="'+gn(e)+'"]'}function ti(e){return"script[async]"+e}function Kv(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var i=e.querySelector('style[data-href~="'+gn(r.href)+'"]');if(i)return n.instance=i,Ct(i),i;var d=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ct(i),Ot(i,"style",d),Vs(i,r.precedence,e),n.instance=i;case"stylesheet":d=Nr(r.href);var p=e.querySelector(ei(d));if(p)return n.state.loading|=4,n.instance=p,Ct(p),p;i=Qv(r),(d=En.get(d))&&Hd(i,d),p=(e.ownerDocument||e).createElement("link"),Ct(p);var C=p;return C._p=new Promise(function(T,D){C.onload=T,C.onerror=D}),Ot(p,"link",i),n.state.loading|=4,Vs(p,r.precedence,e),n.instance=p;case"script":return p=jr(r.src),(d=e.querySelector(ti(p)))?(n.instance=d,Ct(d),d):(i=r,(d=En.get(p))&&(i=b({},r),Ld(i,d)),e=e.ownerDocument||e,d=e.createElement("script"),Ct(d),Ot(d,"link",i),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(i=n.instance,n.state.loading|=4,Vs(i,r.precedence,e));return n.instance}function Vs(e,n,r){for(var i=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=i.length?i[i.length-1]:null,p=d,C=0;C<i.length;C++){var T=i[C];if(T.dataset.precedence===n)p=T;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function Hd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Ld(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Bs=null;function Jv(e,n,r){if(Bs===null){var i=new Map,d=Bs=new Map;d.set(r,i)}else d=Bs,i=d.get(r),i||(i=new Map,d.set(r,i));if(i.has(e))return i;for(i.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[va]||p[Et]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var C=p.getAttribute(n)||"";C=e+C;var T=i.get(C);T?T.push(p):i.set(C,[p])}}return i}function Wv(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function x4(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function e0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function S4(e,n,r,i){if(r.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Nr(i.href),p=n.querySelector(ei(d));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=$s.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=p,Ct(p);return}p=n.ownerDocument||n,i=Qv(i),(d=En.get(d))&&Hd(i,d),p=p.createElement("link"),Ct(p);var C=p;C._p=new Promise(function(T,D){C.onload=T,C.onerror=D}),Ot(p,"link",i),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=$s.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var zd=0;function C4(e,n){return e.stylesheets&&e.count===0&&Ps(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var i=setTimeout(function(){if(e.stylesheets&&Ps(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+n);0<e.imgBytes&&zd===0&&(zd=62500*n4());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ps(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>zd?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(d)}}:null}function $s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ps(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Us=null;function Ps(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Us=new Map,n.forEach(w4,e),Us=null,$s.call(e))}function w4(e,n){if(!(n.state.loading&4)){var r=Us.get(e);if(r)var i=r.get(null);else{r=new Map,Us.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var C=d[p];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(r.set(C.dataset.precedence,C),i=C)}i&&r.set(null,i)}d=n.instance,C=d.getAttribute("data-precedence"),p=r.get(C)||i,p===i&&r.set(null,d),r.set(C,d),this.count++,i=$s.bind(this),d.addEventListener("load",i),d.addEventListener("error",i),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=4}}var ni={$$typeof:A,Provider:null,Consumer:null,_currentValue:_,_currentValue2:_,_threadCount:0};function E4(e,n,r,i,d,p,C,T,D){this.tag=1,this.containerInfo=e,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=_u(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.hiddenUpdates=_u(null),this.identifierPrefix=i,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function t0(e,n,r,i,d,p,C,T,D,G,K,te){return e=new E4(e,n,r,C,D,G,K,te,T),n=1,p===!0&&(n|=24),p=on(3,null,null,n),e.current=p,p.stateNode=e,n=hf(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:i,isDehydrated:r,cache:n},yf(p),e}function n0(e){return e?(e=cr,e):cr}function o0(e,n,r,i,d,p){d=n0(d),i.context===null?i.context=d:i.pendingContext=d,i=Yo(n),i.payload={element:r},p=p===void 0?null:p,p!==null&&(i.callback=p),r=Fo(e,i,n),r!==null&&(Zt(r,e,n),Ha(r,e,n))}function l0(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function kd(e,n){l0(e,n),(e=e.alternate)&&l0(e,n)}function r0(e){if(e.tag===13||e.tag===31){var n=Ml(e,67108864);n!==null&&Zt(n,e,67108864),kd(e,67108864)}}function a0(e){if(e.tag===13||e.tag===31){var n=cn();n=Nu(n);var r=Ml(e,n);r!==null&&Zt(r,e,n),kd(e,n)}}var Gs=!0;function R4(e,n,r,i){var d=L.T;L.T=null;var p=z.p;try{z.p=2,Vd(e,n,r,i)}finally{z.p=p,L.T=d}}function T4(e,n,r,i){var d=L.T;L.T=null;var p=z.p;try{z.p=8,Vd(e,n,r,i)}finally{z.p=p,L.T=d}}function Vd(e,n,r,i){if(Gs){var d=Bd(i);if(d===null)Ed(e,n,i,Zs,r),s0(e,i);else if(O4(d,e,n,r,i))i.stopPropagation();else if(s0(e,i),n&4&&-1<M4.indexOf(e)){for(;d!==null;){var p=Jl(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var C=Cl(p.pendingLanes);if(C!==0){var T=p;for(T.pendingLanes|=2,T.entangledLanes|=2;C;){var D=1<<31-tn(C);T.entanglements[1]|=D,C&=~D}Yn(p),(Ue&6)===0&&(Ts=lt()+500,Qa(0))}}break;case 31:case 13:T=Ml(p,2),T!==null&&Zt(T,p,2),Os(),kd(p,2)}if(p=Bd(i),p===null&&Ed(e,n,i,Zs,r),p===d)break;d=p}d!==null&&i.stopPropagation()}else Ed(e,n,i,null,r)}}function Bd(e){return e=$u(e),$d(e)}var Zs=null;function $d(e){if(Zs=null,e=Kl(e),e!==null){var n=c(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=u(n),e!==null)return e;e=null}else if(r===31){if(e=f(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Zs=e,null}function i0(e){switch(e){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(Fl()){case ma:return 2;case bt:return 8;case Xl:case Ou:return 32;case Di:return 268435456;default:return 32}default:return 32}}var Ud=!1,rl=null,al=null,il=null,oi=new Map,li=new Map,sl=[],M4="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 s0(e,n){switch(e){case"focusin":case"focusout":rl=null;break;case"dragenter":case"dragleave":al=null;break;case"mouseover":case"mouseout":il=null;break;case"pointerover":case"pointerout":oi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":li.delete(n.pointerId)}}function ri(e,n,r,i,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:r,eventSystemFlags:i,nativeEvent:p,targetContainers:[d]},n!==null&&(n=Jl(n),n!==null&&r0(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function O4(e,n,r,i,d){switch(n){case"focusin":return rl=ri(rl,e,n,r,i,d),!0;case"dragenter":return al=ri(al,e,n,r,i,d),!0;case"mouseover":return il=ri(il,e,n,r,i,d),!0;case"pointerover":var p=d.pointerId;return oi.set(p,ri(oi.get(p)||null,e,n,r,i,d)),!0;case"gotpointercapture":return p=d.pointerId,li.set(p,ri(li.get(p)||null,e,n,r,i,d)),!0}return!1}function c0(e){var n=Kl(e.target);if(n!==null){var r=c(n);if(r!==null){if(n=r.tag,n===13){if(n=u(r),n!==null){e.blockedOn=n,wh(e.priority,function(){a0(r)});return}}else if(n===31){if(n=f(r),n!==null){e.blockedOn=n,wh(e.priority,function(){a0(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=Bd(e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Bu=i,r.target.dispatchEvent(i),Bu=null}else return n=Jl(r),n!==null&&r0(n),e.blockedOn=r,!1;n.shift()}return!0}function u0(e,n,r){qs(e)&&r.delete(n)}function A4(){Ud=!1,rl!==null&&qs(rl)&&(rl=null),al!==null&&qs(al)&&(al=null),il!==null&&qs(il)&&(il=null),oi.forEach(u0),li.forEach(u0)}function Is(e,n){e.blockedOn===n&&(e.blockedOn=null,Ud||(Ud=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,A4)))}var Ys=null;function f0(e){Ys!==e&&(Ys=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ys===e&&(Ys=null);for(var n=0;n<e.length;n+=3){var r=e[n],i=e[n+1],d=e[n+2];if(typeof i!="function"){if($d(i||r)===null)continue;break}var p=Jl(r);p!==null&&(e.splice(n,3),n-=3,Bf(p,{pending:!0,data:d,method:r.method,action:i},i,d))}}))}function Dr(e){function n(D){return Is(D,e)}rl!==null&&Is(rl,e),al!==null&&Is(al,e),il!==null&&Is(il,e),oi.forEach(n),li.forEach(n);for(var r=0;r<sl.length;r++){var i=sl[r];i.blockedOn===e&&(i.blockedOn=null)}for(;0<sl.length&&(r=sl[0],r.blockedOn===null);)c0(r),r.blockedOn===null&&sl.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(i=0;i<r.length;i+=3){var d=r[i],p=r[i+1],C=d[Vt]||null;if(typeof p=="function")C||f0(r);else if(C){var T=null;if(p&&p.hasAttribute("formAction")){if(d=p,C=p[Vt]||null)T=C.formAction;else if($d(d)!==null)continue}else T=C.action;typeof T=="function"?r[i+1]=T:(r.splice(i,3),i-=3),f0(r)}}}function d0(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(C){return d=C})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),i||setTimeout(r,20)}function r(){if(!i&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Pd(e){this._internalRoot=e}Fs.prototype.render=Pd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var r=n.current,i=cn();o0(r,i,e,n,null,null)},Fs.prototype.unmount=Pd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;o0(e.current,2,null,e,null,null),Os(),n[Ql]=null}};function Fs(e){this._internalRoot=e}Fs.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ch();e={blockedOn:null,target:e,priority:n};for(var r=0;r<sl.length&&n!==0&&n<sl[r].priority;r++);sl.splice(r,0,e),r===0&&c0(e)}};var m0=o.version;if(m0!=="19.2.4")throw Error(a(527,m0,"19.2.4"));z.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=h(n),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var _4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xs.isDisabled&&Xs.supportsFiber)try{pa=Xs.inject(_4),en=Xs}catch{}}return ii.createRoot=function(e,n){if(!s(e))throw Error(a(299));var r=!1,i="",d=x1,p=S1,C=C1;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(C=n.onRecoverableError)),n=t0(e,1,!1,null,null,r,i,null,d,p,C,d0),e[Ql]=n.current,wd(e),new Pd(n)},ii.hydrateRoot=function(e,n,r){if(!s(e))throw Error(a(299));var i=!1,d="",p=x1,C=S1,T=C1,D=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(C=r.onCaughtError),r.onRecoverableError!==void 0&&(T=r.onRecoverableError),r.formState!==void 0&&(D=r.formState)),n=t0(e,1,!0,n,r??null,i,d,D,p,C,T,d0),n.context=n0(null),r=n.current,i=cn(),i=Nu(i),d=Yo(i),d.callback=null,Fo(r,d,i),r=i,n.current.lanes=r,ga(n,r),Yn(n),e[Ql]=n.current,wd(e),new Fs(n)},ii.version="19.2.4",ii}var w0;function yw(){if(w0)return qd.exports;w0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(o){console.error(o)}}return t(),qd.exports=bw(),qd.exports}var Sy=yw();const hA=rp(Sy);var Xd={exports:{}},Qd={},Kd={exports:{}},Jd={};var E0;function xw(){if(E0)return Jd;E0=1;var t=Pc();function o(b,x){return b===x&&(b!==0||1/b===1/x)||b!==b&&x!==x}var l=typeof Object.is=="function"?Object.is:o,a=t.useState,s=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function f(b,x){var S=x(),E=a({inst:{value:S,getSnapshot:x}}),w=E[0].inst,R=E[1];return c(function(){w.value=S,w.getSnapshot=x,m(w)&&R({inst:w})},[b,S,x]),s(function(){return m(w)&&R({inst:w}),b(function(){m(w)&&R({inst:w})})},[b]),u(S),S}function m(b){var x=b.getSnapshot;b=b.value;try{var S=x();return!l(b,S)}catch{return!0}}function h(b,x){return x()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Jd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Jd}var R0;function Cy(){return R0||(R0=1,Kd.exports=xw()),Kd.exports}var T0;function Sw(){if(T0)return Qd;T0=1;var t=Pc(),o=Cy();function l(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var a=typeof Object.is=="function"?Object.is:l,s=o.useSyncExternalStore,c=t.useRef,u=t.useEffect,f=t.useMemo,m=t.useDebugValue;return Qd.useSyncExternalStoreWithSelector=function(h,v,b,x,S){var E=c(null);if(E.current===null){var w={hasValue:!1,value:null};E.current=w}else w=E.current;E=f(function(){function M(V){if(!O){if(O=!0,A=V,V=x(V),S!==void 0&&w.hasValue){var $=w.value;if(S($,V))return N=$}return N=V}if($=N,a(A,V))return $;var F=x(V);return S!==void 0&&S($,F)?(A=V,$):(A=V,N=F)}var O=!1,A,N,H=b===void 0?null:b;return[function(){return M(v())},H===null?void 0:function(){return M(H())}]},[v,b,x,S]);var R=s(h,E[0],E[1]);return u(function(){w.hasValue=!0,w.value=R},[R]),m(R),R},Qd}var M0;function Cw(){return M0||(M0=1,Xd.exports=Sw()),Xd.exports}var wy=Cw(),kn=xy();const Ey=rp(kn);var Qn=function(){return Qn=Object.assign||function(o){for(var l,a=1,s=arguments.length;a<s;a++){l=arguments[a];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(o[c]=l[c])}return o},Qn.apply(this,arguments)};function Ry(t,o){var l={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&o.indexOf(a)<0&&(l[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(t);s<a.length;s++)o.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(t,a[s])&&(l[a[s]]=t[a[s]]);return l}function ww(t,o,l){if(l||arguments.length===2)for(var a=0,s=o.length,c;a<s;a++)(c||!(a in o))&&(c||(c=Array.prototype.slice.call(o,0,a)),c[a]=o[a]);return t.concat(c||Array.prototype.slice.call(o))}var uc="right-scroll-bar-position",fc="width-before-scroll-bar",Ew="with-scroll-bars-hidden",Rw="--removed-body-scroll-bar-size";function Wd(t,o){return typeof t=="function"?t(o):t&&(t.current=o),t}function Tw(t,o){var l=y.useState(function(){return{value:t,callback:o,facade:{get current(){return l.value},set current(a){var s=l.value;s!==a&&(l.value=a,l.callback(a,s))}}}})[0];return l.callback=o,l.facade}var Mw=typeof window<"u"?y.useLayoutEffect:y.useEffect,O0=new WeakMap;function Ow(t,o){var l=Tw(null,function(a){return t.forEach(function(s){return Wd(s,a)})});return Mw(function(){var a=O0.get(l);if(a){var s=new Set(a),c=new Set(t),u=l.current;s.forEach(function(f){c.has(f)||Wd(f,null)}),c.forEach(function(f){s.has(f)||Wd(f,u)})}O0.set(l,t)},[t]),l}function Aw(t){return t}function _w(t,o){o===void 0&&(o=Aw);var l=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:t},useMedium:function(c){var u=o(c,a);return l.push(u),function(){l=l.filter(function(f){return f!==u})}},assignSyncMedium:function(c){for(a=!0;l.length;){var u=l;l=[],u.forEach(c)}l={push:function(f){return c(f)},filter:function(){return l}}},assignMedium:function(c){a=!0;var u=[];if(l.length){var f=l;l=[],f.forEach(c),u=l}var m=function(){var v=u;u=[],v.forEach(c)},h=function(){return Promise.resolve().then(m)};h(),l={push:function(v){u.push(v),h()},filter:function(v){return u=u.filter(v),l}}}};return s}function Nw(t){t===void 0&&(t={});var o=_w(null);return o.options=Qn({async:!0,ssr:!1},t),o}var Ty=function(t){var o=t.sideCar,l=Ry(t,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=o.read();if(!a)throw new Error("Sidecar medium not found");return y.createElement(a,Qn({},l))};Ty.isSideCarExport=!0;function jw(t,o){return t.useMedium(o),Ty}var My=Nw(),em=function(){},Ic=y.forwardRef(function(t,o){var l=y.useRef(null),a=y.useState({onScrollCapture:em,onWheelCapture:em,onTouchMoveCapture:em}),s=a[0],c=a[1],u=t.forwardProps,f=t.children,m=t.className,h=t.removeScrollBar,v=t.enabled,b=t.shards,x=t.sideCar,S=t.noRelative,E=t.noIsolation,w=t.inert,R=t.allowPinchZoom,M=t.as,O=M===void 0?"div":M,A=t.gapMode,N=Ry(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=x,V=Ow([l,o]),$=Qn(Qn({},N),s);return y.createElement(y.Fragment,null,v&&y.createElement(H,{sideCar:My,removeScrollBar:h,shards:b,noRelative:S,noIsolation:E,inert:w,setCallbacks:c,allowPinchZoom:!!R,lockRef:l,gapMode:A}),u?y.cloneElement(y.Children.only(f),Qn(Qn({},$),{ref:V})):y.createElement(O,Qn({},$,{className:m,ref:V}),f))});Ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ic.classNames={fullWidth:fc,zeroRight:uc};var Dw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hw(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var o=Dw();return o&&t.setAttribute("nonce",o),t}function Lw(t,o){t.styleSheet?t.styleSheet.cssText=o:t.appendChild(document.createTextNode(o))}function zw(t){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(t)}var kw=function(){var t=0,o=null;return{add:function(l){t==0&&(o=Hw())&&(Lw(o,l),zw(o)),t++},remove:function(){t--,!t&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},Vw=function(){var t=kw();return function(o,l){y.useEffect(function(){return t.add(o),function(){t.remove()}},[o&&l])}},Oy=function(){var t=Vw(),o=function(l){var a=l.styles,s=l.dynamic;return t(a,s),null};return o},Bw={left:0,top:0,right:0,gap:0},tm=function(t){return parseInt(t||"",10)||0},$w=function(t){var o=window.getComputedStyle(document.body),l=o[t==="padding"?"paddingLeft":"marginLeft"],a=o[t==="padding"?"paddingTop":"marginTop"],s=o[t==="padding"?"paddingRight":"marginRight"];return[tm(l),tm(a),tm(s)]},Uw=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Bw;var o=$w(t),l=document.documentElement.clientWidth,a=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,a-l+o[2]-o[0])}},Pw=Oy(),Gr="data-scroll-locked",Gw=function(t,o,l,a){var s=t.left,c=t.top,u=t.right,f=t.gap;return l===void 0&&(l="margin"),`
|
|
10
|
+
.`.concat(Ew,` {
|
|
11
|
+
overflow: hidden `).concat(a,`;
|
|
12
|
+
padding-right: `).concat(f,"px ").concat(a,`;
|
|
13
|
+
}
|
|
14
|
+
body[`).concat(Gr,`] {
|
|
15
|
+
overflow: hidden `).concat(a,`;
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
`).concat([o&&"position: relative ".concat(a,";"),l==="margin"&&`
|
|
18
|
+
padding-left: `.concat(s,`px;
|
|
19
|
+
padding-top: `).concat(c,`px;
|
|
20
|
+
padding-right: `).concat(u,`px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: `).concat(f,"px ").concat(a,`;
|
|
24
|
+
`),l==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(uc,` {
|
|
28
|
+
right: `).concat(f,"px ").concat(a,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(fc,` {
|
|
32
|
+
margin-right: `).concat(f,"px ").concat(a,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.`).concat(uc," .").concat(uc,` {
|
|
36
|
+
right: 0 `).concat(a,`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.`).concat(fc," .").concat(fc,` {
|
|
40
|
+
margin-right: 0 `).concat(a,`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[`).concat(Gr,`] {
|
|
44
|
+
`).concat(Rw,": ").concat(f,`px;
|
|
45
|
+
}
|
|
46
|
+
`)},A0=function(){var t=parseInt(document.body.getAttribute(Gr)||"0",10);return isFinite(t)?t:0},Zw=function(){y.useEffect(function(){return document.body.setAttribute(Gr,(A0()+1).toString()),function(){var t=A0()-1;t<=0?document.body.removeAttribute(Gr):document.body.setAttribute(Gr,t.toString())}},[])},qw=function(t){var o=t.noRelative,l=t.noImportant,a=t.gapMode,s=a===void 0?"margin":a;Zw();var c=y.useMemo(function(){return Uw(s)},[s]);return y.createElement(Pw,{styles:Gw(c,!o,s,l?"":"!important")})},Bm=!1;if(typeof window<"u")try{var Qs=Object.defineProperty({},"passive",{get:function(){return Bm=!0,!0}});window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{Bm=!1}var Hr=Bm?{passive:!1}:!1,Iw=function(t){return t.tagName==="TEXTAREA"},Ay=function(t,o){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[o]!=="hidden"&&!(l.overflowY===l.overflowX&&!Iw(t)&&l[o]==="visible")},Yw=function(t){return Ay(t,"overflowY")},Fw=function(t){return Ay(t,"overflowX")},_0=function(t,o){var l=o.ownerDocument,a=o;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=_y(t,a);if(s){var c=Ny(t,a),u=c[1],f=c[2];if(u>f)return!0}a=a.parentNode}while(a&&a!==l.body);return!1},Xw=function(t){var o=t.scrollTop,l=t.scrollHeight,a=t.clientHeight;return[o,l,a]},Qw=function(t){var o=t.scrollLeft,l=t.scrollWidth,a=t.clientWidth;return[o,l,a]},_y=function(t,o){return t==="v"?Yw(o):Fw(o)},Ny=function(t,o){return t==="v"?Xw(o):Qw(o)},Kw=function(t,o){return t==="h"&&o==="rtl"?-1:1},Jw=function(t,o,l,a,s){var c=Kw(t,window.getComputedStyle(o).direction),u=c*a,f=l.target,m=o.contains(f),h=!1,v=u>0,b=0,x=0;do{if(!f)break;var S=Ny(t,f),E=S[0],w=S[1],R=S[2],M=w-R-c*E;(E||M)&&_y(t,f)&&(b+=M,x+=E);var O=f.parentNode;f=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!m&&f!==document.body||m&&(o.contains(f)||o===f));return(v&&Math.abs(b)<1||!v&&Math.abs(x)<1)&&(h=!0),h},Ks=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},N0=function(t){return[t.deltaX,t.deltaY]},j0=function(t){return t&&"current"in t?t.current:t},Ww=function(t,o){return t[0]===o[0]&&t[1]===o[1]},e5=function(t){return`
|
|
47
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
49
|
+
`)},t5=0,Lr=[];function n5(t){var o=y.useRef([]),l=y.useRef([0,0]),a=y.useRef(),s=y.useState(t5++)[0],c=y.useState(Oy)[0],u=y.useRef(t);y.useEffect(function(){u.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var w=ww([t.lockRef.current],(t.shards||[]).map(j0),!0).filter(Boolean);return w.forEach(function(R){return R.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var f=y.useCallback(function(w,R){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var M=Ks(w),O=l.current,A="deltaX"in w?w.deltaX:O[0]-M[0],N="deltaY"in w?w.deltaY:O[1]-M[1],H,V=w.target,$=Math.abs(A)>Math.abs(N)?"h":"v";if("touches"in w&&$==="h"&&V.type==="range")return!1;var F=window.getSelection(),Q=F&&F.anchorNode,Z=Q?Q===V||Q.contains(V):!1;if(Z)return!1;var ee=_0($,V);if(!ee)return!0;if(ee?H=$:(H=$==="v"?"h":"v",ee=_0($,V)),!ee)return!1;if(!a.current&&"changedTouches"in w&&(A||N)&&(a.current=H),!H)return!0;var re=a.current||H;return Jw(re,R,w,re==="h"?A:N)},[]),m=y.useCallback(function(w){var R=w;if(!(!Lr.length||Lr[Lr.length-1]!==c)){var M="deltaY"in R?N0(R):Ks(R),O=o.current.filter(function(H){return H.name===R.type&&(H.target===R.target||R.target===H.shadowParent)&&Ww(H.delta,M)})[0];if(O&&O.should){R.cancelable&&R.preventDefault();return}if(!O){var A=(u.current.shards||[]).map(j0).filter(Boolean).filter(function(H){return H.contains(R.target)}),N=A.length>0?f(R,A[0]):!u.current.noIsolation;N&&R.cancelable&&R.preventDefault()}}},[]),h=y.useCallback(function(w,R,M,O){var A={name:w,delta:R,target:M,should:O,shadowParent:o5(M)};o.current.push(A),setTimeout(function(){o.current=o.current.filter(function(N){return N!==A})},1)},[]),v=y.useCallback(function(w){l.current=Ks(w),a.current=void 0},[]),b=y.useCallback(function(w){h(w.type,N0(w),w.target,f(w,t.lockRef.current))},[]),x=y.useCallback(function(w){h(w.type,Ks(w),w.target,f(w,t.lockRef.current))},[]);y.useEffect(function(){return Lr.push(c),t.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:x}),document.addEventListener("wheel",m,Hr),document.addEventListener("touchmove",m,Hr),document.addEventListener("touchstart",v,Hr),function(){Lr=Lr.filter(function(w){return w!==c}),document.removeEventListener("wheel",m,Hr),document.removeEventListener("touchmove",m,Hr),document.removeEventListener("touchstart",v,Hr)}},[]);var S=t.removeScrollBar,E=t.inert;return y.createElement(y.Fragment,null,E?y.createElement(c,{styles:e5(s)}):null,S?y.createElement(qw,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function o5(t){for(var o=null;t!==null;)t instanceof ShadowRoot&&(o=t.host,t=t.host),t=t.parentNode;return o}const l5=jw(My,n5);var r5=y.forwardRef(function(t,o){return y.createElement(Ic,Qn({},t,{ref:o,sideCar:l5}))});r5.classNames=Ic.classNames;function jy(t){var o,l,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(o=0;o<s;o++)t[o]&&(l=jy(t[o]))&&(a&&(a+=" "),a+=l)}else for(l in t)t[l]&&(a&&(a+=" "),a+=l);return a}function Vo(){for(var t,o,l=0,a="",s=arguments.length;l<s;l++)(t=arguments[l])&&(o=jy(t))&&(a&&(a+=" "),a+=o);return a}const a5=["top","right","bottom","left"],ml=Math.min,Xn=Math.max,i5={left:"right",right:"left",bottom:"top",top:"bottom"},s5={start:"end",end:"start"};function $m(t,o,l){return Xn(t,ml(o,l))}function ro(t,o){return typeof t=="function"?t(o):t}function Vn(t){return t.split("-")[0]}function ta(t){return t.split("-")[1]}function ap(t){return t==="x"?"y":"x"}function ip(t){return t==="y"?"height":"width"}const c5=new Set(["top","bottom"]);function Dn(t){return c5.has(Vn(t))?"y":"x"}function sp(t){return ap(Dn(t))}function u5(t,o,l){l===void 0&&(l=!1);const a=ta(t),s=sp(t),c=ip(s);let u=s==="x"?a===(l?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[c]>o.floating[c]&&(u=vc(u)),[u,vc(u)]}function f5(t){const o=vc(t);return[Um(t),o,Um(o)]}function Um(t){return t.replace(/start|end/g,o=>s5[o])}const D0=["left","right"],H0=["right","left"],d5=["top","bottom"],m5=["bottom","top"];function p5(t,o,l){switch(t){case"top":case"bottom":return l?o?H0:D0:o?D0:H0;case"left":case"right":return o?d5:m5;default:return[]}}function h5(t,o,l,a){const s=ta(t);let c=p5(Vn(t),l==="start",a);return s&&(c=c.map(u=>u+"-"+s),o&&(c=c.concat(c.map(Um)))),c}function vc(t){return t.replace(/left|right|bottom|top/g,o=>i5[o])}function g5(t){return{top:0,right:0,bottom:0,left:0,...t}}function cp(t){return typeof t!="number"?g5(t):{top:t,right:t,bottom:t,left:t}}function Xr(t){const{x:o,y:l,width:a,height:s}=t;return{width:a,height:s,top:l,left:o,right:o+a,bottom:l+s,x:o,y:l}}function L0(t,o,l){let{reference:a,floating:s}=t;const c=Dn(o),u=sp(o),f=ip(u),m=Vn(o),h=c==="y",v=a.x+a.width/2-s.width/2,b=a.y+a.height/2-s.height/2,x=a[f]/2-s[f]/2;let S;switch(m){case"top":S={x:v,y:a.y-s.height};break;case"bottom":S={x:v,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:b};break;case"left":S={x:a.x-s.width,y:b};break;default:S={x:a.x,y:a.y}}switch(ta(o)){case"start":S[u]-=x*(l&&h?-1:1);break;case"end":S[u]+=x*(l&&h?-1:1);break}return S}async function v5(t,o){var l;o===void 0&&(o={});const{x:a,y:s,platform:c,rects:u,elements:f,strategy:m}=t,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:x=!1,padding:S=0}=ro(o,t),E=cp(S),R=f[x?b==="floating"?"reference":"floating":b],M=Xr(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(R)))==null||l?R:R.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:h,rootBoundary:v,strategy:m})),O=b==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),N=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},H=Xr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:O,offsetParent:A,strategy:m}):O);return{top:(M.top-H.top+E.top)/N.y,bottom:(H.bottom-M.bottom+E.bottom)/N.y,left:(M.left-H.left+E.left)/N.x,right:(H.right-M.right+E.right)/N.x}}const b5=async(t,o,l)=>{const{placement:a="bottom",strategy:s="absolute",middleware:c=[],platform:u}=l,f=c.filter(Boolean),m=await(u.isRTL==null?void 0:u.isRTL(o));let h=await u.getElementRects({reference:t,floating:o,strategy:s}),{x:v,y:b}=L0(h,a,m),x=a,S={},E=0;for(let R=0;R<f.length;R++){var w;const{name:M,fn:O}=f[R],{x:A,y:N,data:H,reset:V}=await O({x:v,y:b,initialPlacement:a,placement:x,strategy:s,middlewareData:S,rects:h,platform:{...u,detectOverflow:(w=u.detectOverflow)!=null?w:v5},elements:{reference:t,floating:o}});v=A??v,b=N??b,S={...S,[M]:{...S[M],...H}},V&&E<=50&&(E++,typeof V=="object"&&(V.placement&&(x=V.placement),V.rects&&(h=V.rects===!0?await u.getElementRects({reference:t,floating:o,strategy:s}):V.rects),{x:v,y:b}=L0(h,x,m)),R=-1)}return{x:v,y:b,placement:x,strategy:s,middlewareData:S}},y5=t=>({name:"arrow",options:t,async fn(o){const{x:l,y:a,placement:s,rects:c,platform:u,elements:f,middlewareData:m}=o,{element:h,padding:v=0}=ro(t,o)||{};if(h==null)return{};const b=cp(v),x={x:l,y:a},S=sp(s),E=ip(S),w=await u.getDimensions(h),R=S==="y",M=R?"top":"left",O=R?"bottom":"right",A=R?"clientHeight":"clientWidth",N=c.reference[E]+c.reference[S]-x[S]-c.floating[E],H=x[S]-c.reference[S],V=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let $=V?V[A]:0;(!$||!await(u.isElement==null?void 0:u.isElement(V)))&&($=f.floating[A]||c.floating[E]);const F=N/2-H/2,Q=$/2-w[E]/2-1,Z=ml(b[M],Q),ee=ml(b[O],Q),re=Z,ne=$-w[E]-ee,j=$/2-w[E]/2+F,I=$m(re,j,ne),L=!m.arrow&&ta(s)!=null&&j!==I&&c.reference[E]/2-(j<re?Z:ee)-w[E]/2<0,z=L?j<re?j-re:j-ne:0;return{[S]:x[S]+z,data:{[S]:I,centerOffset:j-I-z,...L&&{alignmentOffset:z}},reset:L}}}),x5=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var l,a;const{placement:s,middlewareData:c,rects:u,initialPlacement:f,platform:m,elements:h}=o,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...R}=ro(t,o);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const M=Vn(s),O=Dn(f),A=Vn(f)===f,N=await(m.isRTL==null?void 0:m.isRTL(h.floating)),H=x||(A||!w?[vc(f)]:f5(f)),V=E!=="none";!x&&V&&H.push(...h5(f,w,E,N));const $=[f,...H],F=await m.detectOverflow(o,R),Q=[];let Z=((a=c.flip)==null?void 0:a.overflows)||[];if(v&&Q.push(F[M]),b){const j=u5(s,u,N);Q.push(F[j[0]],F[j[1]])}if(Z=[...Z,{placement:s,overflows:Q}],!Q.every(j=>j<=0)){var ee,re;const j=(((ee=c.flip)==null?void 0:ee.index)||0)+1,I=$[j];if(I&&(!(b==="alignment"?O!==Dn(I):!1)||Z.every(_=>Dn(_.placement)===O?_.overflows[0]>0:!0)))return{data:{index:j,overflows:Z},reset:{placement:I}};let L=(re=Z.filter(z=>z.overflows[0]<=0).sort((z,_)=>z.overflows[1]-_.overflows[1])[0])==null?void 0:re.placement;if(!L)switch(S){case"bestFit":{var ne;const z=(ne=Z.filter(_=>{if(V){const U=Dn(_.placement);return U===O||U==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(U=>U>0).reduce((U,X)=>U+X,0)]).sort((_,U)=>_[1]-U[1])[0])==null?void 0:ne[0];z&&(L=z);break}case"initialPlacement":L=f;break}if(s!==L)return{reset:{placement:L}}}return{}}}};function z0(t,o){return{top:t.top-o.height,right:t.right-o.width,bottom:t.bottom-o.height,left:t.left-o.width}}function k0(t){return a5.some(o=>t[o]>=0)}const S5=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(o){const{rects:l,platform:a}=o,{strategy:s="referenceHidden",...c}=ro(t,o);switch(s){case"referenceHidden":{const u=await a.detectOverflow(o,{...c,elementContext:"reference"}),f=z0(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:k0(f)}}}case"escaped":{const u=await a.detectOverflow(o,{...c,altBoundary:!0}),f=z0(u,l.floating);return{data:{escapedOffsets:f,escaped:k0(f)}}}default:return{}}}}};function Dy(t){const o=ml(...t.map(c=>c.left)),l=ml(...t.map(c=>c.top)),a=Xn(...t.map(c=>c.right)),s=Xn(...t.map(c=>c.bottom));return{x:o,y:l,width:a-o,height:s-l}}function C5(t){const o=t.slice().sort((s,c)=>s.y-c.y),l=[];let a=null;for(let s=0;s<o.length;s++){const c=o[s];!a||c.y-a.y>a.height/2?l.push([c]):l[l.length-1].push(c),a=c}return l.map(s=>Xr(Dy(s)))}const w5=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(o){const{placement:l,elements:a,rects:s,platform:c,strategy:u}=o,{padding:f=2,x:m,y:h}=ro(t,o),v=Array.from(await(c.getClientRects==null?void 0:c.getClientRects(a.reference))||[]),b=C5(v),x=Xr(Dy(v)),S=cp(f);function E(){if(b.length===2&&b[0].left>b[1].right&&m!=null&&h!=null)return b.find(R=>m>R.left-S.left&&m<R.right+S.right&&h>R.top-S.top&&h<R.bottom+S.bottom)||x;if(b.length>=2){if(Dn(l)==="y"){const Z=b[0],ee=b[b.length-1],re=Vn(l)==="top",ne=Z.top,j=ee.bottom,I=re?Z.left:ee.left,L=re?Z.right:ee.right,z=L-I,_=j-ne;return{top:ne,bottom:j,left:I,right:L,width:z,height:_,x:I,y:ne}}const R=Vn(l)==="left",M=Xn(...b.map(Z=>Z.right)),O=ml(...b.map(Z=>Z.left)),A=b.filter(Z=>R?Z.left===O:Z.right===M),N=A[0].top,H=A[A.length-1].bottom,V=O,$=M,F=$-V,Q=H-N;return{top:N,bottom:H,left:V,right:$,width:F,height:Q,x:V,y:N}}return x}const w=await c.getElementRects({reference:{getBoundingClientRect:E},floating:a.floating,strategy:u});return s.reference.x!==w.reference.x||s.reference.y!==w.reference.y||s.reference.width!==w.reference.width||s.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},Hy=new Set(["left","top"]);async function E5(t,o){const{placement:l,platform:a,elements:s}=t,c=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=Vn(l),f=ta(l),m=Dn(l)==="y",h=Hy.has(u)?-1:1,v=c&&m?-1:1,b=ro(o,t);let{mainAxis:x,crossAxis:S,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return f&&typeof E=="number"&&(S=f==="end"?E*-1:E),m?{x:S*v,y:x*h}:{x:x*h,y:S*v}}const R5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var l,a;const{x:s,y:c,placement:u,middlewareData:f}=o,m=await E5(o,t);return u===((l=f.offset)==null?void 0:l.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:s+m.x,y:c+m.y,data:{...m,placement:u}}}}},T5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:l,y:a,placement:s,platform:c}=o,{mainAxis:u=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:O,y:A}=M;return{x:O,y:A}}},...h}=ro(t,o),v={x:l,y:a},b=await c.detectOverflow(o,h),x=Dn(Vn(s)),S=ap(x);let E=v[S],w=v[x];if(u){const M=S==="y"?"top":"left",O=S==="y"?"bottom":"right",A=E+b[M],N=E-b[O];E=$m(A,E,N)}if(f){const M=x==="y"?"top":"left",O=x==="y"?"bottom":"right",A=w+b[M],N=w-b[O];w=$m(A,w,N)}const R=m.fn({...o,[S]:E,[x]:w});return{...R,data:{x:R.x-l,y:R.y-a,enabled:{[S]:u,[x]:f}}}}}},M5=function(t){return t===void 0&&(t={}),{options:t,fn(o){const{x:l,y:a,placement:s,rects:c,middlewareData:u}=o,{offset:f=0,mainAxis:m=!0,crossAxis:h=!0}=ro(t,o),v={x:l,y:a},b=Dn(s),x=ap(b);let S=v[x],E=v[b];const w=ro(f,o),R=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(m){const A=x==="y"?"height":"width",N=c.reference[x]-c.floating[A]+R.mainAxis,H=c.reference[x]+c.reference[A]-R.mainAxis;S<N?S=N:S>H&&(S=H)}if(h){var M,O;const A=x==="y"?"width":"height",N=Hy.has(Vn(s)),H=c.reference[b]-c.floating[A]+(N&&((M=u.offset)==null?void 0:M[b])||0)+(N?0:R.crossAxis),V=c.reference[b]+c.reference[A]+(N?0:((O=u.offset)==null?void 0:O[b])||0)-(N?R.crossAxis:0);E<H?E=H:E>V&&(E=V)}return{[x]:S,[b]:E}}}},O5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var l,a;const{placement:s,rects:c,platform:u,elements:f}=o,{apply:m=()=>{},...h}=ro(t,o),v=await u.detectOverflow(o,h),b=Vn(s),x=ta(s),S=Dn(s)==="y",{width:E,height:w}=c.floating;let R,M;b==="top"||b==="bottom"?(R=b,M=x===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(M=b,R=x==="end"?"top":"bottom");const O=w-v.top-v.bottom,A=E-v.left-v.right,N=ml(w-v[R],O),H=ml(E-v[M],A),V=!o.middlewareData.shift;let $=N,F=H;if((l=o.middlewareData.shift)!=null&&l.enabled.x&&(F=A),(a=o.middlewareData.shift)!=null&&a.enabled.y&&($=O),V&&!x){const Z=Xn(v.left,0),ee=Xn(v.right,0),re=Xn(v.top,0),ne=Xn(v.bottom,0);S?F=E-2*(Z!==0||ee!==0?Z+ee:Xn(v.left,v.right)):$=w-2*(re!==0||ne!==0?re+ne:Xn(v.top,v.bottom))}await m({...o,availableWidth:F,availableHeight:$});const Q=await u.getDimensions(f.floating);return E!==Q.width||w!==Q.height?{reset:{rects:!0}}:{}}}},Pm=Math.min,Zr=Math.max,bc=Math.round,Js=Math.floor,Wn=t=>({x:t,y:t});function Yc(){return typeof window<"u"}function na(t){return Ly(t)?(t.nodeName||"").toLowerCase():"#document"}function fn(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function co(t){var o;return(o=(Ly(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function Ly(t){return Yc()?t instanceof Node||t instanceof fn(t).Node:!1}function Bn(t){return Yc()?t instanceof Element||t instanceof fn(t).Element:!1}function ao(t){return Yc()?t instanceof HTMLElement||t instanceof fn(t).HTMLElement:!1}function V0(t){return!Yc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof fn(t).ShadowRoot}const A5=new Set(["inline","contents"]);function Si(t){const{overflow:o,overflowX:l,overflowY:a,display:s}=$n(t);return/auto|scroll|overlay|hidden|clip/.test(o+a+l)&&!A5.has(s)}const _5=new Set(["table","td","th"]);function N5(t){return _5.has(na(t))}const j5=[":popover-open",":modal"];function Fc(t){return j5.some(o=>{try{return t.matches(o)}catch{return!1}})}const D5=["transform","translate","scale","rotate","perspective"],H5=["transform","translate","scale","rotate","perspective","filter"],L5=["paint","layout","strict","content"];function up(t){const o=fp(),l=Bn(t)?$n(t):t;return D5.some(a=>l[a]?l[a]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!o&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!o&&(l.filter?l.filter!=="none":!1)||H5.some(a=>(l.willChange||"").includes(a))||L5.some(a=>(l.contain||"").includes(a))}function z5(t){let o=pl(t);for(;ao(o)&&!Qr(o);){if(up(o))return o;if(Fc(o))return null;o=pl(o)}return null}function fp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const k5=new Set(["html","body","#document"]);function Qr(t){return k5.has(na(t))}function $n(t){return fn(t).getComputedStyle(t)}function Xc(t){return Bn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pl(t){if(na(t)==="html")return t;const o=t.assignedSlot||t.parentNode||V0(t)&&t.host||co(t);return V0(o)?o.host:o}function zy(t){const o=pl(t);return Qr(o)?t.ownerDocument?t.ownerDocument.body:t.body:ao(o)&&Si(o)?o:zy(o)}function Ho(t,o,l){var a;o===void 0&&(o=[]),l===void 0&&(l=!0);const s=zy(t),c=s===((a=t.ownerDocument)==null?void 0:a.body),u=fn(s);if(c){const f=Gm(u);return o.concat(u,u.visualViewport||[],Si(s)?s:[],f&&l?Ho(f):[])}return o.concat(s,Ho(s,[],l))}function Gm(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ky(t){const o=$n(t);let l=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const s=ao(t),c=s?t.offsetWidth:l,u=s?t.offsetHeight:a,f=bc(l)!==c||bc(a)!==u;return f&&(l=c,a=u),{width:l,height:a,$:f}}function dp(t){return Bn(t)?t:t.contextElement}function qr(t){const o=dp(t);if(!ao(o))return Wn(1);const l=o.getBoundingClientRect(),{width:a,height:s,$:c}=ky(o);let u=(c?bc(l.width):l.width)/a,f=(c?bc(l.height):l.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const V5=Wn(0);function Vy(t){const o=fn(t);return!fp()||!o.visualViewport?V5:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function B5(t,o,l){return o===void 0&&(o=!1),!l||o&&l!==fn(t)?!1:o}function Gl(t,o,l,a){o===void 0&&(o=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=dp(t);let u=Wn(1);o&&(a?Bn(a)&&(u=qr(a)):u=qr(t));const f=B5(c,l,a)?Vy(c):Wn(0);let m=(s.left+f.x)/u.x,h=(s.top+f.y)/u.y,v=s.width/u.x,b=s.height/u.y;if(c){const x=fn(c),S=a&&Bn(a)?fn(a):a;let E=x,w=Gm(E);for(;w&&a&&S!==E;){const R=qr(w),M=w.getBoundingClientRect(),O=$n(w),A=M.left+(w.clientLeft+parseFloat(O.paddingLeft))*R.x,N=M.top+(w.clientTop+parseFloat(O.paddingTop))*R.y;m*=R.x,h*=R.y,v*=R.x,b*=R.y,m+=A,h+=N,E=fn(w),w=Gm(E)}}return Xr({width:v,height:b,x:m,y:h})}function Qc(t,o){const l=Xc(t).scrollLeft;return o?o.left+l:Gl(co(t)).left+l}function By(t,o){const l=t.getBoundingClientRect(),a=l.left+o.scrollLeft-Qc(t,l),s=l.top+o.scrollTop;return{x:a,y:s}}function $5(t){let{elements:o,rect:l,offsetParent:a,strategy:s}=t;const c=s==="fixed",u=co(a),f=o?Fc(o.floating):!1;if(a===u||f&&c)return l;let m={scrollLeft:0,scrollTop:0},h=Wn(1);const v=Wn(0),b=ao(a);if((b||!b&&!c)&&((na(a)!=="body"||Si(u))&&(m=Xc(a)),ao(a))){const S=Gl(a);h=qr(a),v.x=S.x+a.clientLeft,v.y=S.y+a.clientTop}const x=u&&!b&&!c?By(u,m):Wn(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-m.scrollLeft*h.x+v.x+x.x,y:l.y*h.y-m.scrollTop*h.y+v.y+x.y}}function U5(t){return Array.from(t.getClientRects())}function P5(t){const o=co(t),l=Xc(t),a=t.ownerDocument.body,s=Zr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=Zr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-l.scrollLeft+Qc(t);const f=-l.scrollTop;return $n(a).direction==="rtl"&&(u+=Zr(o.clientWidth,a.clientWidth)-s),{width:s,height:c,x:u,y:f}}const B0=25;function G5(t,o){const l=fn(t),a=co(t),s=l.visualViewport;let c=a.clientWidth,u=a.clientHeight,f=0,m=0;if(s){c=s.width,u=s.height;const v=fp();(!v||v&&o==="fixed")&&(f=s.offsetLeft,m=s.offsetTop)}const h=Qc(a);if(h<=0){const v=a.ownerDocument,b=v.body,x=getComputedStyle(b),S=v.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,E=Math.abs(a.clientWidth-b.clientWidth-S);E<=B0&&(c-=E)}else h<=B0&&(c+=h);return{width:c,height:u,x:f,y:m}}const Z5=new Set(["absolute","fixed"]);function q5(t,o){const l=Gl(t,!0,o==="fixed"),a=l.top+t.clientTop,s=l.left+t.clientLeft,c=ao(t)?qr(t):Wn(1),u=t.clientWidth*c.x,f=t.clientHeight*c.y,m=s*c.x,h=a*c.y;return{width:u,height:f,x:m,y:h}}function $0(t,o,l){let a;if(o==="viewport")a=G5(t,l);else if(o==="document")a=P5(co(t));else if(Bn(o))a=q5(o,l);else{const s=Vy(t);a={x:o.x-s.x,y:o.y-s.y,width:o.width,height:o.height}}return Xr(a)}function $y(t,o){const l=pl(t);return l===o||!Bn(l)||Qr(l)?!1:$n(l).position==="fixed"||$y(l,o)}function I5(t,o){const l=o.get(t);if(l)return l;let a=Ho(t,[],!1).filter(f=>Bn(f)&&na(f)!=="body"),s=null;const c=$n(t).position==="fixed";let u=c?pl(t):t;for(;Bn(u)&&!Qr(u);){const f=$n(u),m=up(u);!m&&f.position==="fixed"&&(s=null),(c?!m&&!s:!m&&f.position==="static"&&!!s&&Z5.has(s.position)||Si(u)&&!m&&$y(t,u))?a=a.filter(v=>v!==u):s=f,u=pl(u)}return o.set(t,a),a}function Y5(t){let{element:o,boundary:l,rootBoundary:a,strategy:s}=t;const u=[...l==="clippingAncestors"?Fc(o)?[]:I5(o,this._c):[].concat(l),a],f=u[0],m=u.reduce((h,v)=>{const b=$0(o,v,s);return h.top=Zr(b.top,h.top),h.right=Pm(b.right,h.right),h.bottom=Pm(b.bottom,h.bottom),h.left=Zr(b.left,h.left),h},$0(o,f,s));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function F5(t){const{width:o,height:l}=ky(t);return{width:o,height:l}}function X5(t,o,l){const a=ao(o),s=co(o),c=l==="fixed",u=Gl(t,!0,c,o);let f={scrollLeft:0,scrollTop:0};const m=Wn(0);function h(){m.x=Qc(s)}if(a||!a&&!c)if((na(o)!=="body"||Si(s))&&(f=Xc(o)),a){const S=Gl(o,!0,c,o);m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}else s&&h();c&&!a&&s&&h();const v=s&&!a&&!c?By(s,f):Wn(0),b=u.left+f.scrollLeft-m.x-v.x,x=u.top+f.scrollTop-m.y-v.y;return{x:b,y:x,width:u.width,height:u.height}}function nm(t){return $n(t).position==="static"}function U0(t,o){if(!ao(t)||$n(t).position==="fixed")return null;if(o)return o(t);let l=t.offsetParent;return co(t)===l&&(l=l.ownerDocument.body),l}function Uy(t,o){const l=fn(t);if(Fc(t))return l;if(!ao(t)){let s=pl(t);for(;s&&!Qr(s);){if(Bn(s)&&!nm(s))return s;s=pl(s)}return l}let a=U0(t,o);for(;a&&N5(a)&&nm(a);)a=U0(a,o);return a&&Qr(a)&&nm(a)&&!up(a)?l:a||z5(t)||l}const Q5=async function(t){const o=this.getOffsetParent||Uy,l=this.getDimensions,a=await l(t.floating);return{reference:X5(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function K5(t){return $n(t).direction==="rtl"}const J5={convertOffsetParentRelativeRectToViewportRelativeRect:$5,getDocumentElement:co,getClippingRect:Y5,getOffsetParent:Uy,getElementRects:Q5,getClientRects:U5,getDimensions:F5,getScale:qr,isElement:Bn,isRTL:K5};function Py(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function W5(t,o){let l=null,a;const s=co(t);function c(){var f;clearTimeout(a),(f=l)==null||f.disconnect(),l=null}function u(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),c();const h=t.getBoundingClientRect(),{left:v,top:b,width:x,height:S}=h;if(f||o(),!x||!S)return;const E=Js(b),w=Js(s.clientWidth-(v+x)),R=Js(s.clientHeight-(b+S)),M=Js(v),A={rootMargin:-E+"px "+-w+"px "+-R+"px "+-M+"px",threshold:Zr(0,Pm(1,m))||1};let N=!0;function H(V){const $=V[0].intersectionRatio;if($!==m){if(!N)return u();$?u(!1,$):a=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!Py(h,t.getBoundingClientRect())&&u(),N=!1}try{l=new IntersectionObserver(H,{...A,root:s.ownerDocument})}catch{l=new IntersectionObserver(H,A)}l.observe(t)}return u(!0),c}function Zm(t,o,l,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,h=dp(t),v=s||c?[...h?Ho(h):[],...Ho(o)]:[];v.forEach(M=>{s&&M.addEventListener("scroll",l,{passive:!0}),c&&M.addEventListener("resize",l)});const b=h&&f?W5(h,l):null;let x=-1,S=null;u&&(S=new ResizeObserver(M=>{let[O]=M;O&&O.target===h&&S&&(S.unobserve(o),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=S)==null||A.observe(o)})),l()}),h&&!m&&S.observe(h),S.observe(o));let E,w=m?Gl(t):null;m&&R();function R(){const M=Gl(t);w&&!Py(w,M)&&l(),w=M,E=requestAnimationFrame(R)}return l(),()=>{var M;v.forEach(O=>{s&&O.removeEventListener("scroll",l),c&&O.removeEventListener("resize",l)}),b?.(),(M=S)==null||M.disconnect(),S=null,m&&cancelAnimationFrame(E)}}const e3=R5,t3=T5,n3=x5,o3=O5,l3=S5,P0=y5,r3=w5,a3=M5,i3=(t,o,l)=>{const a=new Map,s={platform:J5,...l},c={...s.platform,_c:a};return b5(t,o,{...s,platform:c})};var s3=typeof document<"u",c3=function(){},dc=s3?y.useLayoutEffect:c3;function yc(t,o){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(typeof t=="function"&&t.toString()===o.toString())return!0;let l,a,s;if(t&&o&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==o.length)return!1;for(a=l;a--!==0;)if(!yc(t[a],o[a]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(o).length)return!1;for(a=l;a--!==0;)if(!{}.hasOwnProperty.call(o,s[a]))return!1;for(a=l;a--!==0;){const c=s[a];if(!(c==="_owner"&&t.$$typeof)&&!yc(t[c],o[c]))return!1}return!0}return t!==t&&o!==o}function Gy(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function G0(t,o){const l=Gy(t);return Math.round(o*l)/l}function om(t){const o=y.useRef(t);return dc(()=>{o.current=t}),o}function u3(t){t===void 0&&(t={});const{placement:o="bottom",strategy:l="absolute",middleware:a=[],platform:s,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:m,open:h}=t,[v,b]=y.useState({x:0,y:0,strategy:l,placement:o,middlewareData:{},isPositioned:!1}),[x,S]=y.useState(a);yc(x,a)||S(a);const[E,w]=y.useState(null),[R,M]=y.useState(null),O=y.useCallback(_=>{_!==V.current&&(V.current=_,w(_))},[]),A=y.useCallback(_=>{_!==$.current&&($.current=_,M(_))},[]),N=c||E,H=u||R,V=y.useRef(null),$=y.useRef(null),F=y.useRef(v),Q=m!=null,Z=om(m),ee=om(s),re=om(h),ne=y.useCallback(()=>{if(!V.current||!$.current)return;const _={placement:o,strategy:l,middleware:x};ee.current&&(_.platform=ee.current),i3(V.current,$.current,_).then(U=>{const X={...U,isPositioned:re.current!==!1};j.current&&!yc(F.current,X)&&(F.current=X,kn.flushSync(()=>{b(X)}))})},[x,o,l,ee,re]);dc(()=>{h===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,b(_=>({..._,isPositioned:!1})))},[h]);const j=y.useRef(!1);dc(()=>(j.current=!0,()=>{j.current=!1}),[]),dc(()=>{if(N&&(V.current=N),H&&($.current=H),N&&H){if(Z.current)return Z.current(N,H,ne);ne()}},[N,H,ne,Z,Q]);const I=y.useMemo(()=>({reference:V,floating:$,setReference:O,setFloating:A}),[O,A]),L=y.useMemo(()=>({reference:N,floating:H}),[N,H]),z=y.useMemo(()=>{const _={position:l,left:0,top:0};if(!L.floating)return _;const U=G0(L.floating,v.x),X=G0(L.floating,v.y);return f?{..._,transform:"translate("+U+"px, "+X+"px)",...Gy(L.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:U,top:X}},[l,f,L.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:ne,refs:I,elements:L,floatingStyles:z}),[v,ne,I,L,z])}const f3=t=>{function o(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:t,fn(l){const{element:a,padding:s}=typeof t=="function"?t(l):t;return a&&o(a)?a.current!=null?P0({element:a.current,padding:s}).fn(l):{}:a?P0({element:a,padding:s}).fn(l):{}}}},Zy=(t,o)=>({...e3(t),options:[t,o]}),mp=(t,o)=>({...t3(t),options:[t,o]}),Z0=(t,o)=>({...a3(t),options:[t,o]}),xc=(t,o)=>({...n3(t),options:[t,o]}),d3=(t,o)=>({...o3(t),options:[t,o]}),m3=(t,o)=>({...l3(t),options:[t,o]}),ui=(t,o)=>({...r3(t),options:[t,o]}),qy=(t,o)=>({...f3(t),options:[t,o]});function Kc(){return typeof window<"u"}function gl(t){return pp(t)?(t.nodeName||"").toLowerCase():"#document"}function dn(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function uo(t){var o;return(o=(pp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function pp(t){return Kc()?t instanceof Node||t instanceof dn(t).Node:!1}function at(t){return Kc()?t instanceof Element||t instanceof dn(t).Element:!1}function Nt(t){return Kc()?t instanceof HTMLElement||t instanceof dn(t).HTMLElement:!1}function gi(t){return!Kc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof dn(t).ShadowRoot}function Ci(t){const{overflow:o,overflowX:l,overflowY:a,display:s}=Tn(t);return/auto|scroll|overlay|hidden|clip/.test(o+a+l)&&s!=="inline"&&s!=="contents"}function p3(t){return/^(table|td|th)$/.test(gl(t))}function Jc(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const h3=/transform|translate|scale|rotate|perspective|filter/,g3=/paint|layout|strict|content/,$l=t=>!!t&&t!=="none";let lm;function hp(t){const o=at(t)?Tn(t):t;return $l(o.transform)||$l(o.translate)||$l(o.scale)||$l(o.rotate)||$l(o.perspective)||!Wc()&&($l(o.backdropFilter)||$l(o.filter))||h3.test(o.willChange||"")||g3.test(o.contain||"")}function v3(t){let o=zo(t);for(;Nt(o)&&!Lo(o);){if(hp(o))return o;if(Jc(o))return null;o=zo(o)}return null}function Wc(){return lm==null&&(lm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),lm}function Lo(t){return/^(html|body|#document)$/.test(gl(t))}function Tn(t){return dn(t).getComputedStyle(t)}function eu(t){return at(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zo(t){if(gl(t)==="html")return t;const o=t.assignedSlot||t.parentNode||gi(t)&&t.host||uo(t);return gi(o)?o.host:o}function Iy(t){const o=zo(t);return Lo(o)?t.ownerDocument?t.ownerDocument.body:t.body:Nt(o)&&Ci(o)?o:Iy(o)}function dl(t,o,l){var a;o===void 0&&(o=[]),l===void 0&&(l=!0);const s=Iy(t),c=s===((a=t.ownerDocument)==null?void 0:a.body),u=dn(s);if(c){const f=qm(u);return o.concat(u,u.visualViewport||[],Ci(s)?s:[],f&&l?dl(f):[])}else return o.concat(s,dl(s,[],l))}function qm(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const b3=["top","right","bottom","left"],q0=["start","end"],I0=b3.reduce((t,o)=>t.concat(o,o+"-"+q0[0],o+"-"+q0[1]),[]),Kr=Math.min,un=Math.max,Sc=Math.round,Ws=Math.floor,eo=t=>({x:t,y:t}),y3={left:"right",right:"left",bottom:"top",top:"bottom"};function Y0(t,o,l){return un(t,Kr(o,l))}function oa(t,o){return typeof t=="function"?t(o):t}function io(t){return t.split("-")[0]}function to(t){return t.split("-")[1]}function Yy(t){return t==="x"?"y":"x"}function Fy(t){return t==="y"?"height":"width"}function No(t){const o=t[0];return o==="t"||o==="b"?"y":"x"}function Xy(t){return Yy(No(t))}function Qy(t,o,l){l===void 0&&(l=!1);const a=to(t),s=Xy(t),c=Fy(s);let u=s==="x"?a===(l?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[c]>o.floating[c]&&(u=wc(u)),[u,wc(u)]}function x3(t){const o=wc(t);return[Cc(t),o,Cc(o)]}function Cc(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const F0=["left","right"],X0=["right","left"],S3=["top","bottom"],C3=["bottom","top"];function w3(t,o,l){switch(t){case"top":case"bottom":return l?o?X0:F0:o?F0:X0;case"left":case"right":return o?S3:C3;default:return[]}}function E3(t,o,l,a){const s=to(t);let c=w3(io(t),l==="start",a);return s&&(c=c.map(u=>u+"-"+s),o&&(c=c.concat(c.map(Cc)))),c}function wc(t){const o=io(t);return y3[o]+t.slice(o.length)}function R3(t){return{top:0,right:0,bottom:0,left:0,...t}}function T3(t){return typeof t!="number"?R3(t):{top:t,right:t,bottom:t,left:t}}function Ec(t){const{x:o,y:l,width:a,height:s}=t;return{width:a,height:s,top:l,left:o,right:o+a,bottom:l+s,x:o,y:l}}var M3=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Rc=M3.join(","),Ky=typeof Element>"u",Jr=Ky?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Tc=!Ky&&Element.prototype.getRootNode?function(t){var o;return t==null||(o=t.getRootNode)===null||o===void 0?void 0:o.call(t)}:function(t){return t?.ownerDocument},Mc=function(o,l){var a;l===void 0&&(l=!0);var s=o==null||(a=o.getAttribute)===null||a===void 0?void 0:a.call(o,"inert"),c=s===""||s==="true",u=c||l&&o&&(typeof o.closest=="function"?o.closest("[inert]"):Mc(o.parentNode));return u},O3=function(o){var l,a=o==null||(l=o.getAttribute)===null||l===void 0?void 0:l.call(o,"contenteditable");return a===""||a==="true"},Jy=function(o,l,a){if(Mc(o))return[];var s=Array.prototype.slice.apply(o.querySelectorAll(Rc));return l&&Jr.call(o,Rc)&&s.unshift(o),s=s.filter(a),s},Oc=function(o,l,a){for(var s=[],c=Array.from(o);c.length;){var u=c.shift();if(!Mc(u,!1))if(u.tagName==="SLOT"){var f=u.assignedElements(),m=f.length?f:u.children,h=Oc(m,!0,a);a.flatten?s.push.apply(s,h):s.push({scopeParent:u,candidates:h})}else{var v=Jr.call(u,Rc);v&&a.filter(u)&&(l||!o.includes(u))&&s.push(u);var b=u.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(u),x=!Mc(b,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(u));if(b&&x){var S=Oc(b===!0?u.children:b.children,!0,a);a.flatten?s.push.apply(s,S):s.push({scopeParent:u,candidates:S})}else c.unshift.apply(c,u.children)}}return s},Wy=function(o){return!isNaN(parseInt(o.getAttribute("tabindex"),10))},e2=function(o){if(!o)throw new Error("No node provided");return o.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(o.tagName)||O3(o))&&!Wy(o)?0:o.tabIndex},A3=function(o,l){var a=e2(o);return a<0&&l&&!Wy(o)?0:a},_3=function(o,l){return o.tabIndex===l.tabIndex?o.documentOrder-l.documentOrder:o.tabIndex-l.tabIndex},t2=function(o){return o.tagName==="INPUT"},N3=function(o){return t2(o)&&o.type==="hidden"},j3=function(o){var l=o.tagName==="DETAILS"&&Array.prototype.slice.apply(o.children).some(function(a){return a.tagName==="SUMMARY"});return l},D3=function(o,l){for(var a=0;a<o.length;a++)if(o[a].checked&&o[a].form===l)return o[a]},H3=function(o){if(!o.name)return!0;var l=o.form||Tc(o),a=function(f){return l.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=a(window.CSS.escape(o.name));else try{s=a(o.name)}catch(u){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",u.message),!1}var c=D3(s,o.form);return!c||c===o},L3=function(o){return t2(o)&&o.type==="radio"},z3=function(o){return L3(o)&&!H3(o)},k3=function(o){var l,a=o&&Tc(o),s=(l=a)===null||l===void 0?void 0:l.host,c=!1;if(a&&a!==o){var u,f,m;for(c=!!((u=s)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(s)||o!=null&&(m=o.ownerDocument)!==null&&m!==void 0&&m.contains(o));!c&&s;){var h,v,b;a=Tc(s),s=(h=a)===null||h===void 0?void 0:h.host,c=!!((v=s)!==null&&v!==void 0&&(b=v.ownerDocument)!==null&&b!==void 0&&b.contains(s))}}return c},Q0=function(o){var l=o.getBoundingClientRect(),a=l.width,s=l.height;return a===0&&s===0},V3=function(o,l){var a=l.displayCheck,s=l.getShadowRoot;if(a==="full-native"&&"checkVisibility"in o){var c=o.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(o).visibility==="hidden")return!0;var u=Jr.call(o,"details>summary:first-of-type"),f=u?o.parentElement:o;if(Jr.call(f,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof s=="function"){for(var m=o;o;){var h=o.parentElement,v=Tc(o);if(h&&!h.shadowRoot&&s(h)===!0)return Q0(o);o.assignedSlot?o=o.assignedSlot:!h&&v!==o.ownerDocument?o=v.host:o=h}o=m}if(k3(o))return!o.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return Q0(o);return!1},B3=function(o){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(o.tagName))for(var l=o.parentElement;l;){if(l.tagName==="FIELDSET"&&l.disabled){for(var a=0;a<l.children.length;a++){var s=l.children.item(a);if(s.tagName==="LEGEND")return Jr.call(l,"fieldset[disabled] *")?!0:!s.contains(o)}return!0}l=l.parentElement}return!1},Im=function(o,l){return!(l.disabled||N3(l)||V3(l,o)||j3(l)||B3(l))},Ym=function(o,l){return!(z3(l)||e2(l)<0||!Im(o,l))},$3=function(o){var l=parseInt(o.getAttribute("tabindex"),10);return!!(isNaN(l)||l>=0)},n2=function(o){var l=[],a=[];return o.forEach(function(s,c){var u=!!s.scopeParent,f=u?s.scopeParent:s,m=A3(f,u),h=u?n2(s.candidates):f;m===0?u?l.push.apply(l,h):l.push(f):a.push({documentOrder:c,tabIndex:m,item:s,isScope:u,content:h})}),a.sort(_3).reduce(function(s,c){return c.isScope?s.push.apply(s,c.content):s.push(c.content),s},[]).concat(l)},tu=function(o,l){l=l||{};var a;return l.getShadowRoot?a=Oc([o],l.includeContainer,{filter:Ym.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:$3}):a=Jy(o,l.includeContainer,Ym.bind(null,l)),n2(a)},U3=function(o,l){l=l||{};var a;return l.getShadowRoot?a=Oc([o],l.includeContainer,{filter:Im.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):a=Jy(o,l.includeContainer,Im.bind(null,l)),a},o2=function(o,l){if(l=l||{},!o)throw new Error("No node provided");return Jr.call(o,Rc)===!1?!1:Ym(l,o)};function P3(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function l2(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(o=>{let{brand:l,version:a}=o;return l+"/"+a}).join(" "):navigator.userAgent}function G3(){return/apple/i.test(navigator.vendor)}function Fm(){const t=/android/i;return t.test(P3())||t.test(l2())}function Z3(){return l2().includes("jsdom/")}const K0="data-floating-ui-focusable",q3="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ur(t){let o=t.activeElement;for(;((l=o)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;o=o.shadowRoot.activeElement}return o}function It(t,o){if(!t||!o)return!1;const l=o.getRootNode==null?void 0:o.getRootNode();if(t.contains(o))return!0;if(l&&gi(l)){let a=o;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function ul(t){return"composedPath"in t?t.composedPath()[0]:t.target}function rm(t,o){if(o==null)return!1;if("composedPath"in t)return t.composedPath().includes(o);const l=t;return l.target!=null&&o.contains(l.target)}function I3(t){return t.matches("html,body")}function zt(t){return t?.ownerDocument||document}function Y3(t){return Nt(t)&&t.matches(q3)}function J0(t){return t?t.getAttribute("role")==="combobox"&&Y3(t):!1}function W0(t){return t?t.hasAttribute(K0)?t:t.querySelector("["+K0+"]")||t:null}function Ir(t,o,l){return l===void 0&&(l=!0),t.filter(s=>{var c;return s.parentId===o&&(!l||((c=s.context)==null?void 0:c.open))}).flatMap(s=>[s,...Ir(t,s.id,l)])}function eb(t,o){var l;let a=[],s=(l=t.find(c=>c.id===o))==null?void 0:l.parentId;for(;s;){const c=t.find(u=>u.id===s);s=c?.parentId,c&&(a=a.concat(c))}return a}function am(t){t.preventDefault(),t.stopPropagation()}function F3(t){return"nativeEvent"in t}function X3(t){return t.mozInputSource===0&&t.isTrusted?!0:Fm()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Q3(t){return Z3()?!1:!Fm()&&t.width===0&&t.height===0||Fm()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function Xm(t,o){const l=["mouse","pen"];return l.push("",void 0),l.includes(t)}var K3=typeof document<"u",J3=function(){},jt=K3?y.useLayoutEffect:J3;const W3={...Gc};function Hn(t){const o=y.useRef(t);return jt(()=>{o.current=t}),o}const e8=W3.useInsertionEffect,t8=e8||(t=>t());function Ft(t){const o=y.useRef(()=>{});return t8(()=>{o.current=t}),y.useCallback(function(){for(var l=arguments.length,a=new Array(l),s=0;s<l;s++)a[s]=arguments[s];return o.current==null?void 0:o.current(...a)},[])}const wi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function r2(t,o){const l=tu(t,wi()),a=l.length;if(a===0)return;const s=Ur(zt(t)),c=l.indexOf(s),u=c===-1?o===1?0:a-1:c+o;return l[u]}function a2(t){return r2(zt(t).body,1)||t}function i2(t){return r2(zt(t).body,-1)||t}function fi(t,o){const l=o||t.currentTarget,a=t.relatedTarget;return!a||!It(l,a)}function n8(t){tu(t,wi()).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function tb(t){t.querySelectorAll("[data-tabindex]").forEach(l=>{const a=l.dataset.tabindex;delete l.dataset.tabindex,a?l.setAttribute("tabindex",a):l.removeAttribute("tabindex")})}function nb(t,o,l){let{reference:a,floating:s}=t;const c=No(o),u=Xy(o),f=Fy(u),m=io(o),h=c==="y",v=a.x+a.width/2-s.width/2,b=a.y+a.height/2-s.height/2,x=a[f]/2-s[f]/2;let S;switch(m){case"top":S={x:v,y:a.y-s.height};break;case"bottom":S={x:v,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:b};break;case"left":S={x:a.x-s.width,y:b};break;default:S={x:a.x,y:a.y}}switch(to(o)){case"start":S[u]-=x*(l&&h?-1:1);break;case"end":S[u]+=x*(l&&h?-1:1);break}return S}async function o8(t,o){var l;o===void 0&&(o={});const{x:a,y:s,platform:c,rects:u,elements:f,strategy:m}=t,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:x=!1,padding:S=0}=oa(o,t),E=T3(S),R=f[x?b==="floating"?"reference":"floating":b],M=Ec(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(R)))==null||l?R:R.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:h,rootBoundary:v,strategy:m})),O=b==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),N=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},H=Ec(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:O,offsetParent:A,strategy:m}):O);return{top:(M.top-H.top+E.top)/N.y,bottom:(H.bottom-M.bottom+E.bottom)/N.y,left:(M.left-H.left+E.left)/N.x,right:(H.right-M.right+E.right)/N.x}}const l8=50,r8=async(t,o,l)=>{const{placement:a="bottom",strategy:s="absolute",middleware:c=[],platform:u}=l,f=u.detectOverflow?u:{...u,detectOverflow:o8},m=await(u.isRTL==null?void 0:u.isRTL(o));let h=await u.getElementRects({reference:t,floating:o,strategy:s}),{x:v,y:b}=nb(h,a,m),x=a,S=0;const E={};for(let w=0;w<c.length;w++){const R=c[w];if(!R)continue;const{name:M,fn:O}=R,{x:A,y:N,data:H,reset:V}=await O({x:v,y:b,initialPlacement:a,placement:x,strategy:s,middlewareData:E,rects:h,platform:f,elements:{reference:t,floating:o}});v=A??v,b=N??b,E[M]={...E[M],...H},V&&S<l8&&(S++,typeof V=="object"&&(V.placement&&(x=V.placement),V.rects&&(h=V.rects===!0?await u.getElementRects({reference:t,floating:o,strategy:s}):V.rects),{x:v,y:b}=nb(h,x,m)),w=-1)}return{x:v,y:b,placement:x,strategy:s,middlewareData:E}};function a8(t,o,l){return(t?[...l.filter(s=>to(s)===t),...l.filter(s=>to(s)!==t)]:l.filter(s=>io(s)===s)).filter(s=>t?to(s)===t||(o?Cc(s)!==s:!1):!0)}const i8=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var l,a,s;const{rects:c,middlewareData:u,placement:f,platform:m,elements:h}=o,{crossAxis:v=!1,alignment:b,allowedPlacements:x=I0,autoAlignment:S=!0,...E}=oa(t,o),w=b!==void 0||x===I0?a8(b||null,S,x):x,R=await m.detectOverflow(o,E),M=((l=u.autoPlacement)==null?void 0:l.index)||0,O=w[M];if(O==null)return{};const A=Qy(O,c,await(m.isRTL==null?void 0:m.isRTL(h.floating)));if(f!==O)return{reset:{placement:w[0]}};const N=[R[io(O)],R[A[0]],R[A[1]]],H=[...((a=u.autoPlacement)==null?void 0:a.overflows)||[],{placement:O,overflows:N}],V=w[M+1];if(V)return{data:{index:M+1,overflows:H},reset:{placement:V}};const $=H.map(Z=>{const ee=to(Z.placement);return[Z.placement,ee&&v?Z.overflows.slice(0,2).reduce((re,ne)=>re+ne,0):Z.overflows[0],Z.overflows]}).sort((Z,ee)=>Z[1]-ee[1]),Q=((s=$.filter(Z=>Z[2].slice(0,to(Z[0])?2:3).every(ee=>ee<=0))[0])==null?void 0:s[0])||$[0][0];return Q!==f?{data:{index:M+1,overflows:H},reset:{placement:Q}}:{}}}},s8=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var l,a;const{placement:s,middlewareData:c,rects:u,initialPlacement:f,platform:m,elements:h}=o,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...R}=oa(t,o);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const M=io(s),O=No(f),A=io(f)===f,N=await(m.isRTL==null?void 0:m.isRTL(h.floating)),H=x||(A||!w?[wc(f)]:x3(f)),V=E!=="none";!x&&V&&H.push(...E3(f,w,E,N));const $=[f,...H],F=await m.detectOverflow(o,R),Q=[];let Z=((a=c.flip)==null?void 0:a.overflows)||[];if(v&&Q.push(F[M]),b){const j=Qy(s,u,N);Q.push(F[j[0]],F[j[1]])}if(Z=[...Z,{placement:s,overflows:Q}],!Q.every(j=>j<=0)){var ee,re;const j=(((ee=c.flip)==null?void 0:ee.index)||0)+1,I=$[j];if(I&&(!(b==="alignment"?O!==No(I):!1)||Z.every(_=>No(_.placement)===O?_.overflows[0]>0:!0)))return{data:{index:j,overflows:Z},reset:{placement:I}};let L=(re=Z.filter(z=>z.overflows[0]<=0).sort((z,_)=>z.overflows[1]-_.overflows[1])[0])==null?void 0:re.placement;if(!L)switch(S){case"bestFit":{var ne;const z=(ne=Z.filter(_=>{if(V){const U=No(_.placement);return U===O||U==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(U=>U>0).reduce((U,X)=>U+X,0)]).sort((_,U)=>_[1]-U[1])[0])==null?void 0:ne[0];z&&(L=z);break}case"initialPlacement":L=f;break}if(s!==L)return{reset:{placement:L}}}return{}}}},c8=new Set(["left","top"]);async function u8(t,o){const{placement:l,platform:a,elements:s}=t,c=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=io(l),f=to(l),m=No(l)==="y",h=c8.has(u)?-1:1,v=c&&m?-1:1,b=oa(o,t);let{mainAxis:x,crossAxis:S,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return f&&typeof E=="number"&&(S=f==="end"?E*-1:E),m?{x:S*v,y:x*h}:{x:x*h,y:S*v}}const f8=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var l,a;const{x:s,y:c,placement:u,middlewareData:f}=o,m=await u8(o,t);return u===((l=f.offset)==null?void 0:l.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:s+m.x,y:c+m.y,data:{...m,placement:u}}}}},d8=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:l,y:a,placement:s,platform:c}=o,{mainAxis:u=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:O,y:A}=M;return{x:O,y:A}}},...h}=oa(t,o),v={x:l,y:a},b=await c.detectOverflow(o,h),x=No(io(s)),S=Yy(x);let E=v[S],w=v[x];if(u){const M=S==="y"?"top":"left",O=S==="y"?"bottom":"right",A=E+b[M],N=E-b[O];E=Y0(A,E,N)}if(f){const M=x==="y"?"top":"left",O=x==="y"?"bottom":"right",A=w+b[M],N=w-b[O];w=Y0(A,w,N)}const R=m.fn({...o,[S]:E,[x]:w});return{...R,data:{x:R.x-l,y:R.y-a,enabled:{[S]:u,[x]:f}}}}}},m8=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var l,a;const{placement:s,rects:c,platform:u,elements:f}=o,{apply:m=()=>{},...h}=oa(t,o),v=await u.detectOverflow(o,h),b=io(s),x=to(s),S=No(s)==="y",{width:E,height:w}=c.floating;let R,M;b==="top"||b==="bottom"?(R=b,M=x===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(M=b,R=x==="end"?"top":"bottom");const O=w-v.top-v.bottom,A=E-v.left-v.right,N=Kr(w-v[R],O),H=Kr(E-v[M],A),V=!o.middlewareData.shift;let $=N,F=H;if((l=o.middlewareData.shift)!=null&&l.enabled.x&&(F=A),(a=o.middlewareData.shift)!=null&&a.enabled.y&&($=O),V&&!x){const Z=un(v.left,0),ee=un(v.right,0),re=un(v.top,0),ne=un(v.bottom,0);S?F=E-2*(Z!==0||ee!==0?Z+ee:un(v.left,v.right)):$=w-2*(re!==0||ne!==0?re+ne:un(v.top,v.bottom))}await m({...o,availableWidth:F,availableHeight:$});const Q=await u.getDimensions(f.floating);return E!==Q.width||w!==Q.height?{reset:{rects:!0}}:{}}}};function s2(t){const o=Tn(t);let l=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const s=Nt(t),c=s?t.offsetWidth:l,u=s?t.offsetHeight:a,f=Sc(l)!==c||Sc(a)!==u;return f&&(l=c,a=u),{width:l,height:a,$:f}}function gp(t){return at(t)?t:t.contextElement}function Yr(t){const o=gp(t);if(!Nt(o))return eo(1);const l=o.getBoundingClientRect(),{width:a,height:s,$:c}=s2(o);let u=(c?Sc(l.width):l.width)/a,f=(c?Sc(l.height):l.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const p8=eo(0);function c2(t){const o=dn(t);return!Wc()||!o.visualViewport?p8:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function h8(t,o,l){return o===void 0&&(o=!1),!l||o&&l!==dn(t)?!1:o}function Zl(t,o,l,a){o===void 0&&(o=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=gp(t);let u=eo(1);o&&(a?at(a)&&(u=Yr(a)):u=Yr(t));const f=h8(c,l,a)?c2(c):eo(0);let m=(s.left+f.x)/u.x,h=(s.top+f.y)/u.y,v=s.width/u.x,b=s.height/u.y;if(c){const x=dn(c),S=a&&at(a)?dn(a):a;let E=x,w=qm(E);for(;w&&a&&S!==E;){const R=Yr(w),M=w.getBoundingClientRect(),O=Tn(w),A=M.left+(w.clientLeft+parseFloat(O.paddingLeft))*R.x,N=M.top+(w.clientTop+parseFloat(O.paddingTop))*R.y;m*=R.x,h*=R.y,v*=R.x,b*=R.y,m+=A,h+=N,E=dn(w),w=qm(E)}}return Ec({width:v,height:b,x:m,y:h})}function nu(t,o){const l=eu(t).scrollLeft;return o?o.left+l:Zl(uo(t)).left+l}function u2(t,o){const l=t.getBoundingClientRect(),a=l.left+o.scrollLeft-nu(t,l),s=l.top+o.scrollTop;return{x:a,y:s}}function g8(t){let{elements:o,rect:l,offsetParent:a,strategy:s}=t;const c=s==="fixed",u=uo(a),f=o?Jc(o.floating):!1;if(a===u||f&&c)return l;let m={scrollLeft:0,scrollTop:0},h=eo(1);const v=eo(0),b=Nt(a);if((b||!b&&!c)&&((gl(a)!=="body"||Ci(u))&&(m=eu(a)),b)){const S=Zl(a);h=Yr(a),v.x=S.x+a.clientLeft,v.y=S.y+a.clientTop}const x=u&&!b&&!c?u2(u,m):eo(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-m.scrollLeft*h.x+v.x+x.x,y:l.y*h.y-m.scrollTop*h.y+v.y+x.y}}function v8(t){return Array.from(t.getClientRects())}function b8(t){const o=uo(t),l=eu(t),a=t.ownerDocument.body,s=un(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=un(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-l.scrollLeft+nu(t);const f=-l.scrollTop;return Tn(a).direction==="rtl"&&(u+=un(o.clientWidth,a.clientWidth)-s),{width:s,height:c,x:u,y:f}}const ob=25;function y8(t,o){const l=dn(t),a=uo(t),s=l.visualViewport;let c=a.clientWidth,u=a.clientHeight,f=0,m=0;if(s){c=s.width,u=s.height;const v=Wc();(!v||v&&o==="fixed")&&(f=s.offsetLeft,m=s.offsetTop)}const h=nu(a);if(h<=0){const v=a.ownerDocument,b=v.body,x=getComputedStyle(b),S=v.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,E=Math.abs(a.clientWidth-b.clientWidth-S);E<=ob&&(c-=E)}else h<=ob&&(c+=h);return{width:c,height:u,x:f,y:m}}function x8(t,o){const l=Zl(t,!0,o==="fixed"),a=l.top+t.clientTop,s=l.left+t.clientLeft,c=Nt(t)?Yr(t):eo(1),u=t.clientWidth*c.x,f=t.clientHeight*c.y,m=s*c.x,h=a*c.y;return{width:u,height:f,x:m,y:h}}function lb(t,o,l){let a;if(o==="viewport")a=y8(t,l);else if(o==="document")a=b8(uo(t));else if(at(o))a=x8(o,l);else{const s=c2(t);a={x:o.x-s.x,y:o.y-s.y,width:o.width,height:o.height}}return Ec(a)}function f2(t,o){const l=zo(t);return l===o||!at(l)||Lo(l)?!1:Tn(l).position==="fixed"||f2(l,o)}function S8(t,o){const l=o.get(t);if(l)return l;let a=dl(t,[],!1).filter(f=>at(f)&&gl(f)!=="body"),s=null;const c=Tn(t).position==="fixed";let u=c?zo(t):t;for(;at(u)&&!Lo(u);){const f=Tn(u),m=hp(u);!m&&f.position==="fixed"&&(s=null),(c?!m&&!s:!m&&f.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Ci(u)&&!m&&f2(t,u))?a=a.filter(v=>v!==u):s=f,u=zo(u)}return o.set(t,a),a}function C8(t){let{element:o,boundary:l,rootBoundary:a,strategy:s}=t;const u=[...l==="clippingAncestors"?Jc(o)?[]:S8(o,this._c):[].concat(l),a],f=lb(o,u[0],s);let m=f.top,h=f.right,v=f.bottom,b=f.left;for(let x=1;x<u.length;x++){const S=lb(o,u[x],s);m=un(S.top,m),h=Kr(S.right,h),v=Kr(S.bottom,v),b=un(S.left,b)}return{width:h-b,height:v-m,x:b,y:m}}function w8(t){const{width:o,height:l}=s2(t);return{width:o,height:l}}function E8(t,o,l){const a=Nt(o),s=uo(o),c=l==="fixed",u=Zl(t,!0,c,o);let f={scrollLeft:0,scrollTop:0};const m=eo(0);function h(){m.x=nu(s)}if(a||!a&&!c)if((gl(o)!=="body"||Ci(s))&&(f=eu(o)),a){const S=Zl(o,!0,c,o);m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}else s&&h();c&&!a&&s&&h();const v=s&&!a&&!c?u2(s,f):eo(0),b=u.left+f.scrollLeft-m.x-v.x,x=u.top+f.scrollTop-m.y-v.y;return{x:b,y:x,width:u.width,height:u.height}}function im(t){return Tn(t).position==="static"}function rb(t,o){if(!Nt(t)||Tn(t).position==="fixed")return null;if(o)return o(t);let l=t.offsetParent;return uo(t)===l&&(l=l.ownerDocument.body),l}function d2(t,o){const l=dn(t);if(Jc(t))return l;if(!Nt(t)){let s=zo(t);for(;s&&!Lo(s);){if(at(s)&&!im(s))return s;s=zo(s)}return l}let a=rb(t,o);for(;a&&p3(a)&&im(a);)a=rb(a,o);return a&&Lo(a)&&im(a)&&!hp(a)?l:a||v3(t)||l}const R8=async function(t){const o=this.getOffsetParent||d2,l=this.getDimensions,a=await l(t.floating);return{reference:E8(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function T8(t){return Tn(t).direction==="rtl"}const M8={convertOffsetParentRelativeRectToViewportRelativeRect:g8,getDocumentElement:uo,getClippingRect:C8,getOffsetParent:d2,getElementRects:R8,getClientRects:v8,getDimensions:w8,getScale:Yr,isElement:at,isRTL:T8};function m2(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function O8(t,o){let l=null,a;const s=uo(t);function c(){var f;clearTimeout(a),(f=l)==null||f.disconnect(),l=null}function u(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),c();const h=t.getBoundingClientRect(),{left:v,top:b,width:x,height:S}=h;if(f||o(),!x||!S)return;const E=Ws(b),w=Ws(s.clientWidth-(v+x)),R=Ws(s.clientHeight-(b+S)),M=Ws(v),A={rootMargin:-E+"px "+-w+"px "+-R+"px "+-M+"px",threshold:un(0,Kr(1,m))||1};let N=!0;function H(V){const $=V[0].intersectionRatio;if($!==m){if(!N)return u();$?u(!1,$):a=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!m2(h,t.getBoundingClientRect())&&u(),N=!1}try{l=new IntersectionObserver(H,{...A,root:s.ownerDocument})}catch{l=new IntersectionObserver(H,A)}l.observe(t)}return u(!0),c}function vp(t,o,l,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,h=gp(t),v=s||c?[...h?dl(h):[],...o?dl(o):[]]:[];v.forEach(M=>{s&&M.addEventListener("scroll",l,{passive:!0}),c&&M.addEventListener("resize",l)});const b=h&&f?O8(h,l):null;let x=-1,S=null;u&&(S=new ResizeObserver(M=>{let[O]=M;O&&O.target===h&&S&&o&&(S.unobserve(o),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=S)==null||A.observe(o)})),l()}),h&&!m&&S.observe(h),o&&S.observe(o));let E,w=m?Zl(t):null;m&&R();function R(){const M=Zl(t);w&&!m2(w,M)&&l(),w=M,E=requestAnimationFrame(R)}return l(),()=>{var M;v.forEach(O=>{s&&O.removeEventListener("scroll",l),c&&O.removeEventListener("resize",l)}),b?.(),(M=S)==null||M.disconnect(),S=null,m&&cancelAnimationFrame(E)}}const A8=f8,_8=i8,N8=d8,j8=s8,D8=m8,H8=(t,o,l)=>{const a=new Map,s={platform:M8,...l},c={...s.platform,_c:a};return r8(t,o,{...s,platform:c})};var L8=typeof document<"u",z8=function(){},mc=L8?y.useLayoutEffect:z8;function Ac(t,o){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(typeof t=="function"&&t.toString()===o.toString())return!0;let l,a,s;if(t&&o&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==o.length)return!1;for(a=l;a--!==0;)if(!Ac(t[a],o[a]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(o).length)return!1;for(a=l;a--!==0;)if(!{}.hasOwnProperty.call(o,s[a]))return!1;for(a=l;a--!==0;){const c=s[a];if(!(c==="_owner"&&t.$$typeof)&&!Ac(t[c],o[c]))return!1}return!0}return t!==t&&o!==o}function p2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ab(t,o){const l=p2(t);return Math.round(o*l)/l}function sm(t){const o=y.useRef(t);return mc(()=>{o.current=t}),o}function k8(t){t===void 0&&(t={});const{placement:o="bottom",strategy:l="absolute",middleware:a=[],platform:s,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:m,open:h}=t,[v,b]=y.useState({x:0,y:0,strategy:l,placement:o,middlewareData:{},isPositioned:!1}),[x,S]=y.useState(a);Ac(x,a)||S(a);const[E,w]=y.useState(null),[R,M]=y.useState(null),O=y.useCallback(_=>{_!==V.current&&(V.current=_,w(_))},[]),A=y.useCallback(_=>{_!==$.current&&($.current=_,M(_))},[]),N=c||E,H=u||R,V=y.useRef(null),$=y.useRef(null),F=y.useRef(v),Q=m!=null,Z=sm(m),ee=sm(s),re=sm(h),ne=y.useCallback(()=>{if(!V.current||!$.current)return;const _={placement:o,strategy:l,middleware:x};ee.current&&(_.platform=ee.current),H8(V.current,$.current,_).then(U=>{const X={...U,isPositioned:re.current!==!1};j.current&&!Ac(F.current,X)&&(F.current=X,kn.flushSync(()=>{b(X)}))})},[x,o,l,ee,re]);mc(()=>{h===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,b(_=>({..._,isPositioned:!1})))},[h]);const j=y.useRef(!1);mc(()=>(j.current=!0,()=>{j.current=!1}),[]),mc(()=>{if(N&&(V.current=N),H&&($.current=H),N&&H){if(Z.current)return Z.current(N,H,ne);ne()}},[N,H,ne,Z,Q]);const I=y.useMemo(()=>({reference:V,floating:$,setReference:O,setFloating:A}),[O,A]),L=y.useMemo(()=>({reference:N,floating:H}),[N,H]),z=y.useMemo(()=>{const _={position:l,left:0,top:0};if(!L.floating)return _;const U=ab(L.floating,v.x),X=ab(L.floating,v.y);return f?{..._,transform:"translate("+U+"px, "+X+"px)",...p2(L.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:U,top:X}},[l,f,L.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:ne,refs:I,elements:L,floatingStyles:z}),[v,ne,I,L,z])}const no=(t,o)=>{const l=A8(t);return{name:l.name,fn:l.fn,options:[t,o]}},Ei=(t,o)=>{const l=N8(t);return{name:l.name,fn:l.fn,options:[t,o]}},Ri=(t,o)=>{const l=j8(t);return{name:l.name,fn:l.fn,options:[t,o]}},_c=(t,o)=>{const l=D8(t);return{name:l.name,fn:l.fn,options:[t,o]}},h2=(t,o)=>{const l=_8(t);return{name:l.name,fn:l.fn,options:[t,o]}};function V8(t){const o=y.useRef(void 0),l=y.useCallback(a=>{const s=t.map(c=>{if(c!=null){if(typeof c=="function"){const u=c,f=u(a);return typeof f=="function"?f:()=>{u(null)}}return c.current=a,()=>{c.current=null}}});return()=>{s.forEach(c=>c?.())}},t);return y.useMemo(()=>t.every(a=>a==null)?null:a=>{o.current&&(o.current(),o.current=void 0),a!=null&&(o.current=l(a))},t)}const B8="data-floating-ui-focusable",ib="active",sb="selected",$8={...Gc};let cb=!1,U8=0;const ub=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+U8++;function P8(){const[t,o]=y.useState(()=>cb?ub():void 0);return jt(()=>{t==null&&o(ub())},[]),y.useEffect(()=>{cb=!0},[]),t}const G8=$8.useId,g2=G8||P8;function Z8(){const t=new Map;return{emit(o,l){var a;(a=t.get(o))==null||a.forEach(s=>s(l))},on(o,l){t.has(o)||t.set(o,new Set),t.get(o).add(l)},off(o,l){var a;(a=t.get(o))==null||a.delete(l)}}}const q8=y.createContext(null),I8=y.createContext(null),v2=()=>{var t;return((t=y.useContext(q8))==null?void 0:t.id)||null},ou=()=>y.useContext(I8);function Wr(t){return"data-floating-ui-"+t}function qt(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const fb=Wr("safe-polygon");function cm(t,o,l){if(l&&!Xm(l))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const a=t();return typeof a=="number"?a:a?.[o]}return t?.[o]}function um(t){return typeof t=="function"?t():t}function Y8(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,dataRef:s,events:c,elements:u}=t,{enabled:f=!0,delay:m=0,handleClose:h=null,mouseOnly:v=!1,restMs:b=0,move:x=!0}=o,S=ou(),E=v2(),w=Hn(h),R=Hn(m),M=Hn(l),O=Hn(b),A=y.useRef(),N=y.useRef(-1),H=y.useRef(),V=y.useRef(-1),$=y.useRef(!0),F=y.useRef(!1),Q=y.useRef(()=>{}),Z=y.useRef(!1),ee=Ft(()=>{var z;const _=(z=s.current.openEvent)==null?void 0:z.type;return _?.includes("mouse")&&_!=="mousedown"});y.useEffect(()=>{if(!f)return;function z(_){let{open:U}=_;U||(qt(N),qt(V),$.current=!0,Z.current=!1)}return c.on("openchange",z),()=>{c.off("openchange",z)}},[f,c]),y.useEffect(()=>{if(!f||!w.current||!l)return;function z(U){ee()&&a(!1,U,"hover")}const _=zt(u.floating).documentElement;return _.addEventListener("mouseleave",z),()=>{_.removeEventListener("mouseleave",z)}},[u.floating,l,a,f,w,ee]);const re=y.useCallback(function(z,_,U){_===void 0&&(_=!0),U===void 0&&(U="hover");const X=cm(R.current,"close",A.current);X&&!H.current?(qt(N),N.current=window.setTimeout(()=>a(!1,z,U),X)):_&&(qt(N),a(!1,z,U))},[R,a]),ne=Ft(()=>{Q.current(),H.current=void 0}),j=Ft(()=>{if(F.current){const z=zt(u.floating).body;z.style.pointerEvents="",z.removeAttribute(fb),F.current=!1}}),I=Ft(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);y.useEffect(()=>{if(!f)return;function z(oe){if(qt(N),$.current=!1,v&&!Xm(A.current)||um(O.current)>0&&!cm(R.current,"open"))return;const J=cm(R.current,"open",A.current);J?N.current=window.setTimeout(()=>{M.current||a(!0,oe,"hover")},J):l||a(!0,oe,"hover")}function _(oe){if(I()){j();return}Q.current();const J=zt(u.floating);if(qt(V),Z.current=!1,w.current&&s.current.floatingContext){l||qt(N),H.current=w.current({...s.current.floatingContext,tree:S,x:oe.clientX,y:oe.clientY,onClose(){j(),ne(),I()||re(oe,!0,"safe-polygon")}});const ie=H.current;J.addEventListener("mousemove",ie),Q.current=()=>{J.removeEventListener("mousemove",ie)};return}(A.current!=="touch"||!It(u.floating,oe.relatedTarget))&&re(oe)}function U(oe){I()||s.current.floatingContext&&(w.current==null||w.current({...s.current.floatingContext,tree:S,x:oe.clientX,y:oe.clientY,onClose(){j(),ne(),I()||re(oe)}})(oe))}function X(){qt(N)}function ae(oe){I()||re(oe,!1)}if(at(u.domReference)){const oe=u.domReference,J=u.floating;return l&&oe.addEventListener("mouseleave",U),x&&oe.addEventListener("mousemove",z,{once:!0}),oe.addEventListener("mouseenter",z),oe.addEventListener("mouseleave",_),J&&(J.addEventListener("mouseleave",U),J.addEventListener("mouseenter",X),J.addEventListener("mouseleave",ae)),()=>{l&&oe.removeEventListener("mouseleave",U),x&&oe.removeEventListener("mousemove",z),oe.removeEventListener("mouseenter",z),oe.removeEventListener("mouseleave",_),J&&(J.removeEventListener("mouseleave",U),J.removeEventListener("mouseenter",X),J.removeEventListener("mouseleave",ae))}}},[u,f,t,v,x,re,ne,j,a,l,M,S,R,w,s,I,O]),jt(()=>{var z;if(f&&l&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&ee()){F.current=!0;const U=u.floating;if(at(u.domReference)&&U){var _;const X=zt(u.floating).body;X.setAttribute(fb,"");const ae=u.domReference,oe=S==null||(_=S.nodesRef.current.find(J=>J.id===E))==null||(_=_.context)==null?void 0:_.elements.floating;return oe&&(oe.style.pointerEvents=""),X.style.pointerEvents="none",ae.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{X.style.pointerEvents="",ae.style.pointerEvents="",U.style.pointerEvents=""}}}},[f,l,E,u,S,w,ee]),jt(()=>{l||(A.current=void 0,Z.current=!1,ne(),j())},[l,ne,j]),y.useEffect(()=>()=>{ne(),qt(N),qt(V),j()},[f,u.domReference,ne,j]);const L=y.useMemo(()=>{function z(_){A.current=_.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(_){const{nativeEvent:U}=_;function X(){!$.current&&!M.current&&a(!0,U,"hover")}v&&!Xm(A.current)||l||um(O.current)===0||Z.current&&_.movementX**2+_.movementY**2<2||(qt(V),A.current==="touch"?X():(Z.current=!0,V.current=window.setTimeout(X,um(O.current))))}}},[v,a,l,M,O]);return y.useMemo(()=>f?{reference:L}:{},[f,L])}let db=0;function zr(t,o){o===void 0&&(o={});const{preventScroll:l=!1,cancelPrevious:a=!0,sync:s=!1}=o;a&&cancelAnimationFrame(db);const c=()=>t?.focus({preventScroll:l});s?c():db=requestAnimationFrame(c)}function fm(t,o){if(!t||!o)return!1;const l=o.getRootNode==null?void 0:o.getRootNode();if(t.contains(o))return!0;if(l&&gi(l)){let a=o;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function F8(t){return"composedPath"in t?t.composedPath()[0]:t.target}function X8(t){return t?.ownerDocument||document}const Fr={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function mb(t){return t==="inert"?Fr.inert:t==="aria-hidden"?Fr["aria-hidden"]:Fr.none}let ec=new WeakSet,tc={},dm=0;const Q8=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function b2(t){return t?gi(t)?t.host:b2(t.parentNode):null}const K8=(t,o)=>o.map(l=>{if(t.contains(l))return l;const a=b2(l);return t.contains(a)?a:null}).filter(l=>l!=null);function J8(t,o,l,a){const s="data-floating-ui-inert",c=a?"inert":l?"aria-hidden":null,u=K8(o,t),f=new Set,m=new Set(u),h=[];tc[s]||(tc[s]=new WeakMap);const v=tc[s];u.forEach(b),x(o),f.clear();function b(S){!S||f.has(S)||(f.add(S),S.parentNode&&b(S.parentNode))}function x(S){!S||m.has(S)||[].forEach.call(S.children,E=>{if(gl(E)!=="script")if(f.has(E))x(E);else{const w=c?E.getAttribute(c):null,R=w!==null&&w!=="false",M=mb(c),O=(M.get(E)||0)+1,A=(v.get(E)||0)+1;M.set(E,O),v.set(E,A),h.push(E),O===1&&R&&ec.add(E),A===1&&E.setAttribute(s,""),!R&&c&&E.setAttribute(c,c==="inert"?"":"true")}})}return dm++,()=>{h.forEach(S=>{const E=mb(c),R=(E.get(S)||0)-1,M=(v.get(S)||0)-1;E.set(S,R),v.set(S,M),R||(!ec.has(S)&&c&&S.removeAttribute(c),ec.delete(S)),M||S.removeAttribute(s)}),dm--,dm||(Fr.inert=new WeakMap,Fr["aria-hidden"]=new WeakMap,Fr.none=new WeakMap,ec=new WeakSet,tc={})}}function pb(t,o,l){o===void 0&&(o=!1),l===void 0&&(l=!1);const a=X8(t[0]).body;return J8(t.concat(Array.from(a.querySelectorAll('[aria-live],[role="status"],output'))),a,o,l)}const bp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Nc=y.forwardRef(function(o,l){const[a,s]=y.useState();jt(()=>{G3()&&s("button")},[]);const c={ref:l,tabIndex:0,role:a,"aria-hidden":a?void 0:!0,[Wr("focus-guard")]:"",style:bp};return g.jsx("span",{...o,...c})}),W8={clipPath:"inset(50%)",position:"fixed",top:0,left:0},y2=y.createContext(null),hb=Wr("portal");function e7(t){t===void 0&&(t={});const{id:o,root:l}=t,a=g2(),s=x2(),[c,u]=y.useState(null),f=y.useRef(null);return jt(()=>()=>{c?.remove(),queueMicrotask(()=>{f.current=null})},[c]),jt(()=>{if(!a||f.current)return;const m=o?document.getElementById(o):null;if(!m)return;const h=document.createElement("div");h.id=a,h.setAttribute(hb,""),m.appendChild(h),f.current=h,u(h)},[o,a]),jt(()=>{if(l===null||!a||f.current)return;let m=l||s?.portalNode;m&&!pp(m)&&(m=m.current),m=m||document.body;let h=null;o&&(h=document.createElement("div"),h.id=o,m.appendChild(h));const v=document.createElement("div");v.id=a,v.setAttribute(hb,""),m=h||m,m.appendChild(v),f.current=v,u(v)},[o,l,a,s]),c}function mm(t){const{children:o,id:l,root:a,preserveTabOrder:s=!0}=t,c=e7({id:l,root:a}),[u,f]=y.useState(null),m=y.useRef(null),h=y.useRef(null),v=y.useRef(null),b=y.useRef(null),x=u?.modal,S=u?.open,E=!!u&&!u.modal&&u.open&&s&&!!(a||c);return y.useEffect(()=>{if(!c||!s||x)return;function w(R){c&&fi(R)&&(R.type==="focusin"?tb:n8)(c)}return c.addEventListener("focusin",w,!0),c.addEventListener("focusout",w,!0),()=>{c.removeEventListener("focusin",w,!0),c.removeEventListener("focusout",w,!0)}},[c,s,x]),y.useEffect(()=>{c&&(S||tb(c))},[S,c]),g.jsxs(y2.Provider,{value:y.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:m,afterOutsideRef:h,beforeInsideRef:v,afterInsideRef:b,portalNode:c,setFocusManagerState:f}),[s,c]),children:[E&&c&&g.jsx(Nc,{"data-type":"outside",ref:m,onFocus:w=>{if(fi(w,c)){var R;(R=v.current)==null||R.focus()}else{const M=u?u.domReference:null,O=i2(M);O?.focus()}}}),E&&c&&g.jsx("span",{"aria-owns":c.id,style:W8}),c&&kn.createPortal(o,c),E&&c&&g.jsx(Nc,{"data-type":"outside",ref:h,onFocus:w=>{if(fi(w,c)){var R;(R=b.current)==null||R.focus()}else{const M=u?u.domReference:null,O=a2(M);O?.focus(),u?.closeOnFocusOut&&u?.onOpenChange(!1,w.nativeEvent,"focus-out")}}})]})}const x2=()=>y.useContext(y2);function gb(t){return y.useMemo(()=>o=>{t.forEach(l=>{l&&(l.current=o)})},t)}const vb=20;let fl=[];function yp(){fl=fl.filter(t=>{var o;return(o=t.deref())==null?void 0:o.isConnected})}function t7(t){yp(),t&&gl(t)!=="body"&&(fl.push(new WeakRef(t)),fl.length>vb&&(fl=fl.slice(-vb)))}function bb(){yp();const t=fl[fl.length-1];return t?.deref()}function n7(t){const o=wi();return o2(t,o)?t:tu(t,o)[0]||t}function yb(t,o){var l;if(!o.current.includes("floating")&&!((l=t.getAttribute("role"))!=null&&l.includes("dialog")))return;const a=wi(),c=U3(t,a).filter(f=>{const m=f.getAttribute("data-tabindex")||"";return o2(f,a)||f.hasAttribute("data-tabindex")&&!m.startsWith("-")}),u=t.getAttribute("tabindex");o.current.includes("floating")||c.length===0?u!=="0"&&t.setAttribute("tabindex","0"):(u!=="-1"||t.hasAttribute("data-tabindex")&&t.getAttribute("data-tabindex")!=="-1")&&(t.setAttribute("tabindex","-1"),t.setAttribute("data-tabindex","-1"))}const o7=y.forwardRef(function(o,l){return g.jsx("button",{...o,type:"button",ref:l,tabIndex:-1,style:bp})});function l7(t){const{context:o,children:l,disabled:a=!1,order:s=["content"],guards:c=!0,initialFocus:u=0,returnFocus:f=!0,restoreFocus:m=!1,modal:h=!0,visuallyHiddenDismiss:v=!1,closeOnFocusOut:b=!0,outsideElementsInert:x=!1,getInsideElements:S=()=>[]}=t,{open:E,onOpenChange:w,events:R,dataRef:M,elements:{domReference:O,floating:A}}=o,N=Ft(()=>{var de;return(de=M.current.floatingContext)==null?void 0:de.nodeId}),H=Ft(S),V=typeof u=="number"&&u<0,$=J0(O)&&V,F=Q8(),Q=F?c:!0,Z=!Q||F&&x,ee=Hn(s),re=Hn(u),ne=Hn(f),j=ou(),I=x2(),L=y.useRef(null),z=y.useRef(null),_=y.useRef(!1),U=y.useRef(!1),X=y.useRef(-1),ae=y.useRef(-1),oe=I!=null,J=W0(A),ge=Ft(function(de){return de===void 0&&(de=J),de?tu(de,wi()):[]}),ie=Ft(de=>{const ce=ge(de);return ee.current.map(me=>O&&me==="reference"?O:J&&me==="floating"?J:ce).filter(Boolean).flat()});y.useEffect(()=>{if(a||!h)return;function de(me){if(me.key==="Tab"){It(J,Ur(zt(J)))&&ge().length===0&&!$&&am(me);const ke=ie(),qe=ul(me);ee.current[0]==="reference"&&qe===O&&(am(me),me.shiftKey?zr(ke[ke.length-1]):zr(ke[1])),ee.current[1]==="floating"&&qe===J&&me.shiftKey&&(am(me),zr(ke[0]))}}const ce=zt(J);return ce.addEventListener("keydown",de),()=>{ce.removeEventListener("keydown",de)}},[a,O,J,h,ee,$,ge,ie]),y.useEffect(()=>{if(a||!A)return;function de(ce){const me=ul(ce),qe=ge().indexOf(me);qe!==-1&&(X.current=qe)}return A.addEventListener("focusin",de),()=>{A.removeEventListener("focusin",de)}},[a,A,ge]),y.useEffect(()=>{if(a||!b)return;function de(){U.current=!0,setTimeout(()=>{U.current=!1})}function ce(qe){const Oe=qe.relatedTarget,mt=qe.currentTarget,Pe=ul(qe);queueMicrotask(()=>{const it=N(),kt=!(It(O,Oe)||It(A,Oe)||It(Oe,A)||It(I?.portalNode,Oe)||Oe!=null&&Oe.hasAttribute(Wr("focus-guard"))||j&&(Ir(j.nodesRef.current,it).find(pn=>{var Wt,lt;return It((Wt=pn.context)==null?void 0:Wt.elements.floating,Oe)||It((lt=pn.context)==null?void 0:lt.elements.domReference,Oe)})||eb(j.nodesRef.current,it).find(pn=>{var Wt,lt,Fl;return[(Wt=pn.context)==null?void 0:Wt.elements.floating,W0((lt=pn.context)==null?void 0:lt.elements.floating)].includes(Oe)||((Fl=pn.context)==null?void 0:Fl.elements.domReference)===Oe})));if(mt===O&&J&&yb(J,ee),m&&mt!==O&&!(Pe!=null&&Pe.isConnected)&&Ur(zt(J))===zt(J).body){Nt(J)&&J.focus();const pn=X.current,Wt=ge(),lt=Wt[pn]||Wt[Wt.length-1]||J;Nt(lt)&<.focus()}if(M.current.insideReactTree){M.current.insideReactTree=!1;return}($||!h)&&Oe&&kt&&!U.current&&Oe!==bb()&&(_.current=!0,w(!1,qe,"focus-out"))})}const me=!!(!j&&I);function ke(){qt(ae),M.current.insideReactTree=!0,ae.current=window.setTimeout(()=>{M.current.insideReactTree=!1})}if(A&&Nt(O))return O.addEventListener("focusout",ce),O.addEventListener("pointerdown",de),A.addEventListener("focusout",ce),me&&A.addEventListener("focusout",ke,!0),()=>{O.removeEventListener("focusout",ce),O.removeEventListener("pointerdown",de),A.removeEventListener("focusout",ce),me&&A.removeEventListener("focusout",ke,!0)}},[a,O,A,J,h,j,I,w,b,m,ge,$,N,ee,M]);const Ce=y.useRef(null),ze=y.useRef(null),Te=gb([Ce,I?.beforeInsideRef]),Se=gb([ze,I?.afterInsideRef]);y.useEffect(()=>{var de,ce;if(a||!A)return;const me=Array.from((I==null||(de=I.portalNode)==null?void 0:de.querySelectorAll("["+Wr("portal")+"]"))||[]),qe=(ce=(j?eb(j.nodesRef.current,N()):[]).find(Pe=>{var it;return J0(((it=Pe.context)==null?void 0:it.elements.domReference)||null)}))==null||(ce=ce.context)==null?void 0:ce.elements.domReference,Oe=[A,qe,...me,...H(),L.current,z.current,Ce.current,ze.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,ee.current.includes("reference")||$?O:null].filter(Pe=>Pe!=null),mt=h||$?pb(Oe,!Z,Z):pb(Oe);return()=>{mt()}},[a,O,A,h,ee,I,$,Q,Z,j,N,H]),jt(()=>{if(a||!Nt(J))return;const de=zt(J),ce=Ur(de);queueMicrotask(()=>{const me=ie(J),ke=re.current,qe=(typeof ke=="number"?me[ke]:ke.current)||J,Oe=It(J,ce);!V&&!Oe&&E&&zr(qe,{preventScroll:qe===J})})},[a,E,J,V,ie,re]),jt(()=>{if(a||!J)return;const de=zt(J),ce=Ur(de);t7(ce);function me(Oe){let{reason:mt,event:Pe,nested:it}=Oe;if(["hover","safe-polygon"].includes(mt)&&Pe.type==="mouseleave"&&(_.current=!0),mt==="outside-press")if(it)_.current=!1;else if(X3(Pe)||Q3(Pe))_.current=!1;else{let kt=!1;document.createElement("div").focus({get preventScroll(){return kt=!0,!1}}),kt?_.current=!1:_.current=!0}}R.on("openchange",me);const ke=de.createElement("span");ke.setAttribute("tabindex","-1"),ke.setAttribute("aria-hidden","true"),Object.assign(ke.style,bp),oe&&O&&O.insertAdjacentElement("afterend",ke);function qe(){if(typeof ne.current=="boolean"){const Oe=O||bb();return Oe&&Oe.isConnected?Oe:ke}return ne.current.current||ke}return()=>{R.off("openchange",me);const Oe=Ur(de),mt=It(A,Oe)||j&&Ir(j.nodesRef.current,N(),!1).some(it=>{var kt;return It((kt=it.context)==null?void 0:kt.elements.floating,Oe)}),Pe=qe();queueMicrotask(()=>{const it=n7(Pe);ne.current&&!_.current&&Nt(it)&&(!(it!==Oe&&Oe!==de.body)||mt)&&it.focus({preventScroll:!0}),ke.remove()})}},[a,A,J,ne,M,R,j,oe,O,N]),y.useEffect(()=>(queueMicrotask(()=>{_.current=!1}),()=>{queueMicrotask(yp)}),[a]),jt(()=>{if(!a&&I)return I.setFocusManagerState({modal:h,closeOnFocusOut:b,open:E,onOpenChange:w,domReference:O}),()=>{I.setFocusManagerState(null)}},[a,I,h,E,w,b,O]),jt(()=>{a||J&&yb(J,ee)},[a,J,ee]);function Xe(de){return a||!v||!h?null:g.jsx(o7,{ref:de==="start"?L:z,onClick:ce=>w(!1,ce.nativeEvent),children:typeof v=="string"?v:"Dismiss"})}const et=!a&&Q&&(h?!$:!0)&&(oe||h);return g.jsxs(g.Fragment,{children:[et&&g.jsx(Nc,{"data-type":"inside",ref:Te,onFocus:de=>{if(h){const me=ie();zr(s[0]==="reference"?me[0]:me[me.length-1])}else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(_.current=!1,fi(de,I.portalNode)){const me=a2(O);me?.focus()}else{var ce;(ce=I.beforeOutsideRef.current)==null||ce.focus()}}}),!$&&Xe("start"),l,Xe("end"),et&&g.jsx(Nc,{"data-type":"inside",ref:Se,onFocus:de=>{if(h)zr(ie()[0]);else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(b&&(_.current=!0),fi(de,I.portalNode)){const me=i2(O);me?.focus()}else{var ce;(ce=I.afterOutsideRef.current)==null||ce.focus()}}})]})}const r7={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},a7={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xb=t=>{var o,l;return{escapeKey:typeof t=="boolean"?t:(o=t?.escapeKey)!=null?o:!1,outsidePress:typeof t=="boolean"?t:(l=t?.outsidePress)!=null?l:!0}};function i7(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,elements:s,dataRef:c}=t,{enabled:u=!0,escapeKey:f=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:v=!1,referencePressEvent:b="pointerdown",ancestorScroll:x=!1,bubbles:S,capture:E}=o,w=ou(),R=Ft(typeof m=="function"?m:()=>!1),M=typeof m=="function"?R:m,O=y.useRef(!1),{escapeKey:A,outsidePress:N}=xb(S),{escapeKey:H,outsidePress:V}=xb(E),$=y.useRef(!1),F=Ft(j=>{var I;if(!l||!u||!f||j.key!=="Escape"||$.current)return;const L=(I=c.current.floatingContext)==null?void 0:I.nodeId,z=w?Ir(w.nodesRef.current,L):[];if(!A&&(j.stopPropagation(),z.length>0)){let _=!0;if(z.forEach(U=>{var X;if((X=U.context)!=null&&X.open&&!U.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}a(!1,F3(j)?j.nativeEvent:j,"escape-key")}),Q=Ft(j=>{var I;const L=()=>{var z;F(j),(z=ul(j))==null||z.removeEventListener("keydown",L)};(I=ul(j))==null||I.addEventListener("keydown",L)}),Z=Ft(j=>{var I;const L=c.current.insideReactTree;c.current.insideReactTree=!1;const z=O.current;if(O.current=!1,h==="click"&&z||L||typeof M=="function"&&!M(j))return;const _=ul(j),U="["+Wr("inert")+"]",X=zt(s.floating).querySelectorAll(U);let ae=at(_)?_:null;for(;ae&&!Lo(ae);){const ie=zo(ae);if(Lo(ie)||!at(ie))break;ae=ie}if(X.length&&at(_)&&!I3(_)&&!It(_,s.floating)&&Array.from(X).every(ie=>!It(ae,ie)))return;if(Nt(_)&&ne){const ie=Lo(_),Ce=Tn(_),ze=/auto|scroll/,Te=ie||ze.test(Ce.overflowX),Se=ie||ze.test(Ce.overflowY),Xe=Te&&_.clientWidth>0&&_.scrollWidth>_.clientWidth,et=Se&&_.clientHeight>0&&_.scrollHeight>_.clientHeight,de=Ce.direction==="rtl",ce=et&&(de?j.offsetX<=_.offsetWidth-_.clientWidth:j.offsetX>_.clientWidth),me=Xe&&j.offsetY>_.clientHeight;if(ce||me)return}const oe=(I=c.current.floatingContext)==null?void 0:I.nodeId,J=w&&Ir(w.nodesRef.current,oe).some(ie=>{var Ce;return rm(j,(Ce=ie.context)==null?void 0:Ce.elements.floating)});if(rm(j,s.floating)||rm(j,s.domReference)||J)return;const ge=w?Ir(w.nodesRef.current,oe):[];if(ge.length>0){let ie=!0;if(ge.forEach(Ce=>{var ze;if((ze=Ce.context)!=null&&ze.open&&!Ce.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}a(!1,j,"outside-press")}),ee=Ft(j=>{var I;const L=()=>{var z;Z(j),(z=ul(j))==null||z.removeEventListener(h,L)};(I=ul(j))==null||I.addEventListener(h,L)});y.useEffect(()=>{if(!l||!u)return;c.current.__escapeKeyBubbles=A,c.current.__outsidePressBubbles=N;let j=-1;function I(X){a(!1,X,"ancestor-scroll")}function L(){window.clearTimeout(j),$.current=!0}function z(){j=window.setTimeout(()=>{$.current=!1},Wc()?5:0)}const _=zt(s.floating);f&&(_.addEventListener("keydown",H?Q:F,H),_.addEventListener("compositionstart",L),_.addEventListener("compositionend",z)),M&&_.addEventListener(h,V?ee:Z,V);let U=[];return x&&(at(s.domReference)&&(U=dl(s.domReference)),at(s.floating)&&(U=U.concat(dl(s.floating))),!at(s.reference)&&s.reference&&s.reference.contextElement&&(U=U.concat(dl(s.reference.contextElement)))),U=U.filter(X=>{var ae;return X!==((ae=_.defaultView)==null?void 0:ae.visualViewport)}),U.forEach(X=>{X.addEventListener("scroll",I,{passive:!0})}),()=>{f&&(_.removeEventListener("keydown",H?Q:F,H),_.removeEventListener("compositionstart",L),_.removeEventListener("compositionend",z)),M&&_.removeEventListener(h,V?ee:Z,V),U.forEach(X=>{X.removeEventListener("scroll",I)}),window.clearTimeout(j)}},[c,s,f,M,h,l,a,x,u,A,N,F,H,Q,Z,V,ee]),y.useEffect(()=>{c.current.insideReactTree=!1},[c,M,h]);const re=y.useMemo(()=>({onKeyDown:F,...v&&{[r7[b]]:j=>{a(!1,j.nativeEvent,"reference-press")},...b!=="click"&&{onClick(j){a(!1,j.nativeEvent,"reference-press")}}}}),[F,a,v,b]),ne=y.useMemo(()=>{function j(I){I.button===0&&(O.current=!0)}return{onKeyDown:F,onMouseDown:j,onMouseUp:j,[a7[h]]:()=>{c.current.insideReactTree=!0}}},[F,h,c]);return y.useMemo(()=>u?{reference:re,floating:ne}:{},[u,re,ne])}function s7(t){const{open:o=!1,onOpenChange:l,elements:a}=t,s=g2(),c=y.useRef({}),[u]=y.useState(()=>Z8()),f=v2()!=null,[m,h]=y.useState(a.reference),v=Ft((S,E,w)=>{c.current.openEvent=S?E:void 0,u.emit("openchange",{open:S,event:E,reason:w,nested:f}),l?.(S,E,w)}),b=y.useMemo(()=>({setPositionReference:h}),[]),x=y.useMemo(()=>({reference:m||a.reference||null,floating:a.floating||null,domReference:a.reference}),[m,a.reference,a.floating]);return y.useMemo(()=>({dataRef:c,open:o,onOpenChange:v,elements:x,events:u,floatingId:s,refs:b}),[o,v,x,u,s,b])}function c7(t){t===void 0&&(t={});const{nodeId:o}=t,l=s7({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||l,s=a.elements,[c,u]=y.useState(null),[f,m]=y.useState(null),v=s?.domReference||c,b=y.useRef(null),x=ou();jt(()=>{v&&(b.current=v)},[v]);const S=k8({...t,elements:{...s,...f&&{reference:f}}}),E=y.useCallback(A=>{const N=at(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;m(N),S.refs.setReference(N)},[S.refs]),w=y.useCallback(A=>{(at(A)||A===null)&&(b.current=A,u(A)),(at(S.refs.reference.current)||S.refs.reference.current===null||A!==null&&!at(A))&&S.refs.setReference(A)},[S.refs]),R=y.useMemo(()=>({...S.refs,setReference:w,setPositionReference:E,domReference:b}),[S.refs,w,E]),M=y.useMemo(()=>({...S.elements,domReference:v}),[S.elements,v]),O=y.useMemo(()=>({...S,...a,refs:R,elements:M,nodeId:o}),[S,R,M,o,a]);return jt(()=>{a.dataRef.current.floatingContext=O;const A=x?.nodesRef.current.find(N=>N.id===o);A&&(A.context=O)}),y.useMemo(()=>({...S,context:O,refs:R,elements:M}),[S,R,M,O])}function pm(t,o,l){const a=new Map,s=l==="item";let c=t;if(s&&t){const{[ib]:u,[sb]:f,...m}=t;c=m}return{...l==="floating"&&{tabIndex:-1,[B8]:""},...c,...o.map(u=>{const f=u?u[l]:null;return typeof f=="function"?t?f(t):null:f}).concat(t).reduce((u,f)=>(f&&Object.entries(f).forEach(m=>{let[h,v]=m;if(!(s&&[ib,sb].includes(h)))if(h.indexOf("on")===0){if(a.has(h)||a.set(h,[]),typeof v=="function"){var b;(b=a.get(h))==null||b.push(v),u[h]=function(){for(var x,S=arguments.length,E=new Array(S),w=0;w<S;w++)E[w]=arguments[w];return(x=a.get(h))==null?void 0:x.map(R=>R(...E)).find(R=>R!==void 0)}}}else u[h]=v}),u),{})}}function u7(t){t===void 0&&(t=[]);const o=t.map(f=>f?.reference),l=t.map(f=>f?.floating),a=t.map(f=>f?.item),s=y.useCallback(f=>pm(f,t,"reference"),o),c=y.useCallback(f=>pm(f,t,"floating"),l),u=y.useCallback(f=>pm(f,t,"item"),a);return y.useMemo(()=>({getReferenceProps:s,getFloatingProps:c,getItemProps:u}),[s,c,u])}const Sb=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(o,l)=>(l?"-":"")+o.toLowerCase());function kr(t,o){return typeof t=="function"?t(o):t}function f7(t,o){const[l,a]=y.useState(t);return t&&!l&&a(!0),y.useEffect(()=>{if(!t&&l){const s=setTimeout(()=>a(!1),o);return()=>clearTimeout(s)}},[t,l,o]),l}function S2(t,o){o===void 0&&(o={});const{open:l,elements:{floating:a}}=t,{duration:s=250}=o,u=(typeof s=="number"?s:s.close)||0,[f,m]=y.useState("unmounted"),h=f7(l,u);return!h&&f==="close"&&m("unmounted"),jt(()=>{if(a){if(l){m("initial");const v=requestAnimationFrame(()=>{kn.flushSync(()=>{m("open")})});return()=>{cancelAnimationFrame(v)}}m("close")}},[l,a]),{isMounted:h,status:f}}function d7(t,o){o===void 0&&(o={});const{initial:l={opacity:0},open:a,close:s,common:c,duration:u=250}=o,f=t.placement,m=f.split("-")[0],h=y.useMemo(()=>({side:m,placement:f}),[m,f]),v=typeof u=="number",b=(v?u:u.open)||0,x=(v?u:u.close)||0,[S,E]=y.useState(()=>({...kr(c,h),...kr(l,h)})),{isMounted:w,status:R}=S2(t,{duration:u}),M=Hn(l),O=Hn(a),A=Hn(s),N=Hn(c);return jt(()=>{const H=kr(M.current,h),V=kr(A.current,h),$=kr(N.current,h),F=kr(O.current,h)||Object.keys(H).reduce((Q,Z)=>(Q[Z]="",Q),{});if(R==="initial"&&E(Q=>({transitionProperty:Q.transitionProperty,...$,...H})),R==="open"&&E({transitionProperty:Object.keys(F).map(Sb).join(","),transitionDuration:b+"ms",...$,...F}),R==="close"){const Q=V||H;E({transitionProperty:Object.keys(Q).map(Sb).join(","),transitionDuration:x+"ms",...$,...Q})}},[x,A,M,O,N,b,R,h]),{isMounted:w,styles:S}}function C2(t,o,l){return l===void 0&&(l=!0),t.filter(s=>{var c;return s.parentId===o&&(!l||((c=s.context)==null?void 0:c.open))}).flatMap(s=>[s,...C2(t,s.id,l)])}function Cb(t,o){const[l,a]=t;let s=!1;const c=o.length;for(let u=0,f=c-1;u<c;f=u++){const[m,h]=o[u]||[0,0],[v,b]=o[f]||[0,0];h>=a!=b>=a&&l<=(v-m)*(a-h)/(b-h)+m&&(s=!s)}return s}function m7(t,o){return t[0]>=o.x&&t[0]<=o.x+o.width&&t[1]>=o.y&&t[1]<=o.y+o.height}function p7(t){t===void 0&&(t={});const{buffer:o=.5,blockPointerEvents:l=!1,requireIntent:a=!0}=t,s={current:-1};let c=!1,u=null,f=null,m=typeof performance<"u"?performance.now():0;function h(b,x){const S=performance.now(),E=S-m;if(u===null||f===null||E===0)return u=b,f=x,m=S,null;const w=b-u,R=x-f,O=Math.sqrt(w*w+R*R)/E;return u=b,f=x,m=S,O}const v=b=>{let{x,y:S,placement:E,elements:w,onClose:R,nodeId:M,tree:O}=b;return function(N){function H(){qt(s),R()}if(qt(s),!w.domReference||!w.floating||E==null||x==null||S==null)return;const{clientX:V,clientY:$}=N,F=[V,$],Q=F8(N),Z=N.type==="mouseleave",ee=fm(w.floating,Q),re=fm(w.domReference,Q),ne=w.domReference.getBoundingClientRect(),j=w.floating.getBoundingClientRect(),I=E.split("-")[0],L=x>j.right-j.width/2,z=S>j.bottom-j.height/2,_=m7(F,ne),U=j.width>ne.width,X=j.height>ne.height,ae=(U?ne:j).left,oe=(U?ne:j).right,J=(X?ne:j).top,ge=(X?ne:j).bottom;if(ee&&(c=!0,!Z))return;if(re&&(c=!1),re&&!Z){c=!0;return}if(Z&&at(N.relatedTarget)&&fm(w.floating,N.relatedTarget)||O&&C2(O.nodesRef.current,M).length)return;if(I==="top"&&S>=ne.bottom-1||I==="bottom"&&S<=ne.top+1||I==="left"&&x>=ne.right-1||I==="right"&&x<=ne.left+1)return H();let ie=[];switch(I){case"top":ie=[[ae,ne.top+1],[ae,j.bottom-1],[oe,j.bottom-1],[oe,ne.top+1]];break;case"bottom":ie=[[ae,j.top+1],[ae,ne.bottom-1],[oe,ne.bottom-1],[oe,j.top+1]];break;case"left":ie=[[j.right-1,ge],[j.right-1,J],[ne.left+1,J],[ne.left+1,ge]];break;case"right":ie=[[ne.right-1,ge],[ne.right-1,J],[j.left+1,J],[j.left+1,ge]];break}function Ce(ze){let[Te,Se]=ze;switch(I){case"top":{const Xe=[U?Te+o/2:L?Te+o*4:Te-o*4,Se+o+1],et=[U?Te-o/2:L?Te+o*4:Te-o*4,Se+o+1],de=[[j.left,L||U?j.bottom-o:j.top],[j.right,L?U?j.bottom-o:j.top:j.bottom-o]];return[Xe,et,...de]}case"bottom":{const Xe=[U?Te+o/2:L?Te+o*4:Te-o*4,Se-o],et=[U?Te-o/2:L?Te+o*4:Te-o*4,Se-o],de=[[j.left,L||U?j.top+o:j.bottom],[j.right,L?U?j.top+o:j.bottom:j.top+o]];return[Xe,et,...de]}case"left":{const Xe=[Te+o+1,X?Se+o/2:z?Se+o*4:Se-o*4],et=[Te+o+1,X?Se-o/2:z?Se+o*4:Se-o*4];return[...[[z||X?j.right-o:j.left,j.top],[z?X?j.right-o:j.left:j.right-o,j.bottom]],Xe,et]}case"right":{const Xe=[Te-o,X?Se+o/2:z?Se+o*4:Se-o*4],et=[Te-o,X?Se-o/2:z?Se+o*4:Se-o*4],de=[[z||X?j.left+o:j.right,j.top],[z?X?j.left+o:j.right:j.left+o,j.bottom]];return[Xe,et,...de]}}}if(!Cb([V,$],ie)){if(c&&!_)return H();if(!Z&&a){const ze=h(N.clientX,N.clientY);if(ze!==null&&ze<.1)return H()}Cb([V,$],Ce([x,S]))?!c&&a&&(s.current=window.setTimeout(H,40)):H()}}};return v.__options={blockPointerEvents:l},v}function h7(t,o=l=>l){return wy.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,o,g7)}function g7(t,o){if(Object.is(t,o))return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null)return!1;if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(const[a,s]of t)if(!o.has(a)||!Object.is(s,o.get(a)))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(const a of t)if(!o.has(a))return!1;return!0}if(t instanceof Date&&o instanceof Date)return t.getTime()===o.getTime();const l=wb(t);if(l.length!==wb(o).length)return!1;for(let a=0;a<l.length;a++)if(!Object.prototype.hasOwnProperty.call(o,l[a])||!Object.is(t[l[a]],o[l[a]]))return!1;return!0}function wb(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}var hm,Eb;function v7(){return Eb||(Eb=1,hm=function t(o,l){if(o===l)return!0;if(o&&l&&typeof o=="object"&&typeof l=="object"){if(o.constructor!==l.constructor)return!1;var a,s,c;if(Array.isArray(o)){if(a=o.length,a!=l.length)return!1;for(s=a;s--!==0;)if(!t(o[s],l[s]))return!1;return!0}if(o instanceof Map&&l instanceof Map){if(o.size!==l.size)return!1;for(s of o.entries())if(!l.has(s[0]))return!1;for(s of o.entries())if(!t(s[1],l.get(s[0])))return!1;return!0}if(o instanceof Set&&l instanceof Set){if(o.size!==l.size)return!1;for(s of o.entries())if(!l.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(o)&&ArrayBuffer.isView(l)){if(a=o.length,a!=l.length)return!1;for(s=a;s--!==0;)if(o[s]!==l[s])return!1;return!0}if(o.constructor===RegExp)return o.source===l.source&&o.flags===l.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===l.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===l.toString();if(c=Object.keys(o),a=c.length,a!==Object.keys(l).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(l,c[s]))return!1;for(s=a;s--!==0;){var u=c[s];if(!(u==="_owner"&&o.$$typeof)&&!t(o[u],l[u]))return!1}return!0}return o!==o&&l!==l}),hm}var b7=v7();const y7=rp(b7);var w2=y.createContext(void 0);function On(t){return y.useContext(w2)}function be(t){let o=On();if(!o?.editor)throw Error("useBlockNoteEditor was called outside of a BlockNoteContext provider or BlockNoteView component");return o.editor}function Ve(t,o){let l=(o?.editor??be()).getExtension(t);if(!l)throw Error("Extension not found",{cause:{plugin:t}});return l}function Ke(t,o){let{store:l}=Ve(t,o);if(!l)throw Error("Store not found on plugin",{cause:{plugin:t}});return h7(l,o?.selector)}function x7(t){let o=new DOMRect,l="getBoundingClientRect"in t?()=>t.getBoundingClientRect():()=>t.element.getBoundingClientRect();return()=>t.element&&(t.cacheMountedBoundingClientRect??!0)?(t.element.isConnected&&(o=l()),o):l()}function S7(t,o){return t?o?(l,a,s)=>{let c=t(l,a,s),u=o(l,a,s);return()=>{c?.(),u?.()}}:t:o}var Kn=t=>{let o=be(),l=o?.portalElement;if(!l)throw Error("Portal element not found");let{whileElementsMounted:a,...s}=t.useFloatingOptions??{},{refs:c,floatingStyles:u,context:f}=c7({whileElementsMounted:S7(vp,t.useFloatingOptions?.whileElementsMounted),...s}),{isMounted:m,styles:h}=d7(f,t.useTransitionStylesProps),{status:v}=S2(f,t.useTransitionStatusProps),{getFloatingProps:b}=u7([i7(f,t.useDismissProps),Y8(f,{enabled:!1,...t.useHoverProps})]),x=y.useRef(""),S=y.useRef(null),E=V8([S,c.setFloating]);if(y.useEffect(()=>{if(t.reference){let R="element"in t.reference?t.reference.element:void 0;R!==void 0&&(t.focusManagerProps?.disabled||!o.isWithinEditor(R))&&c.setReference(R),c.setPositionReference({getBoundingClientRect:x7(t.reference),contextElement:R})}},[t.reference,c,t.focusManagerProps?.disabled,o]),y.useEffect(()=>{(v==="initial"||v==="open")&&S.current?.innerHTML&&(x.current=S.current.innerHTML)},[v,t.reference,t.children]),!m)return!1;let w={...t.elementProps,style:{display:"flex",...t.elementProps?.style,zIndex:`calc(var(--bn-ui-base-z-index, 0) + ${t.elementProps?.style?.zIndex||0})`,...u,...h},...b()};return v==="close"?g.jsx(mm,{root:l,children:g.jsx("div",{ref:E,...w,dangerouslySetInnerHTML:{__html:x.current}})}):t.focusManagerProps?.disabled?g.jsx(mm,{root:l,children:g.jsx("div",{ref:E,...w,children:t.children})}):g.jsx(mm,{root:l,children:g.jsx(l7,{...t.focusManagerProps,context:f,children:g.jsx("div",{ref:E,...w,children:t.children})})})},E2=y.createContext(void 0);function pe(){return y.useContext(E2)}function Re(){return On().editor.dictionary}var C7=typeof window<"u"?y.useLayoutEffect:y.useEffect,w7=class{transactionNumber=0;lastTransactionNumber=0;lastSnapshot;editor;subscribers=new Set;constructor(o){this.editor=o,this.lastSnapshot={editor:o,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(o){return this.subscribers.add(o),()=>{this.subscribers.delete(o)}}watch(o,l){if(this.editor=o,this.editor){let a=()=>{this.transactionNumber+=1,this.subscribers.forEach(u=>u())},s=this.editor._tiptapEditor,c={all:["transaction","create","mount","unmount"],mount:["create","mount","unmount"],selection:["selectionUpdate"],change:["update"]};for(let u of c[l])s.on(u,a);return()=>{for(let u of c[l])s.off(u,a)}}}};function St(t){let o=On(),l=t.editor||o?.editor||null,a=t.on||"all",[s]=y.useState(()=>new w7(l)),c=wy.useSyncExternalStoreWithSelector(s.subscribe,s.getSnapshot,s.getServerSnapshot,t.selector,t.equalityFn??y7);return C7(()=>s.watch(l,a),[l,s,a]),y.useDebugValue(c),c}function ql(t){let o=On();return t||=o?.editor,St({editor:t,selector:l=>l.editor?.domElement,equalityFn:(l,a)=>l===a,on:"mount"})}var xp=t=>{let{position:o,children:l,...a}=t,{from:s,to:c}=o||{},u=be(),f=ql();return g.jsx(Kn,{reference:y.useMemo(()=>{if(!(s===void 0||c===void 0))return{element:f?.firstElementChild||void 0,getBoundingClientRect:()=>D4(u.prosemirrorView,s,c??s)}},[u,f,s,c]),...a,children:o!==void 0&&l})},Sp=(t={},o=[])=>y.useMemo(()=>{let l=j4.create(t);return window&&(window.ProseMirror=l._tiptapEditor),l},o),Cp=t=>{let[o,l]=y.useState(!1),a=St({editor:t.editor,selector:({editor:f})=>f.isEmpty}),s=pe(),c=y.useCallback(()=>{l(!0)},[]),u=y.useCallback(()=>{l(!1)},[]);return y.useEffect(()=>{t.editable&&t.autoFocus&&t.editor.focus()},[t.autoFocus,t.editable,t.editor]),g.jsxs(g.Fragment,{children:[g.jsx(s.Comments.Editor,{autoFocus:t.autoFocus,className:"bn-comment-editor",editor:t.editor,onFocus:c,onBlur:u,editable:t.editable}),t.actions&&g.jsx("div",{className:"bn-comment-actions-wrapper",children:g.jsx(t.actions,{isFocused:o,isEmpty:a})})]})},{textColor:vA,backgroundColor:bA,...E7}=L4,wp=H4.create({blockSpecs:{paragraph:z4()},styleSpecs:E7}),Rb=Object.defineProperty,R2=(t,o)=>{let l={};for(var a in t)Rb(l,a,{get:t[a],enumerable:!0});return Rb(l,Symbol.toStringTag,{value:"Module"}),l},Tb=Z4.create({name:"comment",excludes:"",inclusive:!1,keepOnSplit:!0,addAttributes(){return{orphan:{parseHTML:t=>!!t.getAttribute("data-orphan"),renderHTML:t=>t.orphan?{"data-orphan":"true"}:{},default:!1},threadId:{parseHTML:t=>t.getAttribute("data-bn-thread-id"),renderHTML:t=>({"data-bn-thread-id":t.threadId}),default:""}}},renderHTML({HTMLAttributes:t}){return["span",q4(t,{class:"bn-thread-mark"})]},parseHTML(){return[{tag:"span.bn-thread-mark"}]},extendMarkSchema(t){return t.name==="comment"?{blocknoteIgnore:!0}:{}}}),R7=class extends I4{userCache=new Map;loadingUsers=new Set;constructor(t){super(),this.resolveUsers=t}async loadUsers(t){let o=t.filter(l=>!this.userCache.has(l)&&!this.loadingUsers.has(l));if(o.length!==0){for(let l of o)this.loadingUsers.add(l);try{let l=await this.resolveUsers(o);for(let a of l)this.userCache.set(a.id,a);this.emit("update",this.userCache)}finally{for(let l of o)this.loadingUsers.delete(l)}}}getUser(t){return this.userCache.get(t)}subscribe(t){return this.on("update",t)}},nc=new B4("blocknote-comments");function T7(t,o){let l=new Map;return t.descendants((a,s)=>{a.marks.forEach(c=>{if(c.type.name===o){let u=c.attrs.threadId;if(!u)return;let f=s,m=f+a.nodeSize,h=l.get(u)??{from:1/0,to:0};l.set(u,{from:Math.min(f,h.from),to:Math.max(m,h.to)})}})}),l}var Mn=k4(({editor:t,options:{schema:o,threadStore:l,resolveUsers:a}})=>{if(!a)throw Error("resolveUsers is required to be defined when using comments");if(!l)throw Error("threadStore is required to be defined when using comments");let s=Tb.name,c=new R7(a),u=V4({pendingComment:!1,selectedThreadId:void 0,threadPositions:new Map},{onUpdate(){u.state.selectedThreadId!==u.prevState.selectedThreadId&&t.transact(m=>m.setMeta(nc,!0))}}),f=m=>{t.transact(h=>{h.doc.descendants((v,b)=>{v.marks.forEach(x=>{if(x.type.name===s){let S=x.type,E=x.attrs.threadId,w=m.get(E),R=!!(!w||w.resolved||w.deletedAt);if(R!==x.attrs.orphan){let M=Math.max(b,0),O=Math.min(b+v.nodeSize,h.doc.content.size-1,h.doc.content.size-1);h.removeMark(M,O,x),h.addMark(M,O,S.create({...x.attrs,orphan:R})),R&&u.state.selectedThreadId===E&&u.setState(A=>({...A,selectedThreadId:void 0}))}}})})})};return{key:"comments",store:u,prosemirrorPlugins:[new $4({key:nc,state:{init(){return{decorations:Gd.empty}},apply(m,h){let v=m.getMeta(nc);if(!m.docChanged&&!v)return h;let b=m.docChanged?T7(m.doc,s):u.state.threadPositions;(b.size>0||u.state.threadPositions.size>0)&&u.setState(S=>({...S,threadPositions:b}));let x=[];if(u.state.selectedThreadId){let S=b.get(u.state.selectedThreadId);S&&x.push(G4.inline(S.from,S.to,{class:"bn-thread-mark-selected"}))}return{decorations:Gd.create(m.doc,x)}}},props:{decorations(m){return nc.getState(m)?.decorations??Gd.empty},handleClick:(m,h,v)=>{if(v.button!==0)return;let b=m.state.doc.nodeAt(h);if(!b){u.setState(S=>({...S,selectedThreadId:void 0}));return}let x=b.marks.find(S=>S.type.name===s&&S.attrs.orphan!==!0)?.attrs.threadId;x!==u.state.selectedThreadId&&u.setState(S=>({...S,selectedThreadId:x}))}}})],threadStore:l,mount(){let m=l.subscribe(f);f(l.getThreads());let h=t.onSelectionChange(()=>{u.state.pendingComment&&u.setState(v=>({...v,pendingComment:!1}))});return()=>{m(),h()}},selectThread(m,h=!0){if(u.state.selectedThreadId!==m&&(u.setState(v=>({...v,pendingComment:!1,selectedThreadId:m})),m&&h)){let v=u.state.threadPositions.get(m);if(!v)return;t.prosemirrorView?.domAtPos(v.from).node?.scrollIntoView({behavior:"smooth",block:"center"})}},startPendingComment(){u.setState(m=>({...m,selectedThreadId:void 0,pendingComment:!0})),t.domElement?.focus(),t.getExtension(zm)?.showSelection(!0,"comments")},stopPendingComment(){u.setState(m=>({...m,selectedThreadId:void 0,pendingComment:!1})),t.getExtension(zm)?.showSelection(!1,"comments")},async createThread(m){let h=await l.createThread(m);if(l.addThreadToDocument){let v=t.prosemirrorView,b=v.state.selection,x=U4.getState(v.state),S={prosemirror:{head:b.head,anchor:b.anchor},yjs:x?P4(x.binding,v.state):void 0};await l.addThreadToDocument({threadId:h.id,selection:S})}else t._tiptapEditor.commands.setMark(s,{orphan:!1,threadId:h.id})},userStore:c,commentEditorSchema:o,tiptapExtensions:[Tb]}}),T2={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Mb=dt.createContext&&dt.createContext(T2),M7=["attr","size","title"];function O7(t,o){if(t==null)return{};var l,a,s=A7(t,o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(a=0;a<c.length;a++)l=c[a],o.indexOf(l)===-1&&{}.propertyIsEnumerable.call(t,l)&&(s[l]=t[l])}return s}function A7(t,o){if(t==null)return{};var l={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(o.indexOf(a)!==-1)continue;l[a]=t[a]}return l}function jc(){return jc=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var a in l)({}).hasOwnProperty.call(l,a)&&(t[a]=l[a])}return t},jc.apply(null,arguments)}function Ob(t,o){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),l.push.apply(l,a)}return l}function Dc(t){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?Ob(Object(l),!0).forEach(function(a){_7(t,a,l[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):Ob(Object(l)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(l,a))})}return t}function _7(t,o,l){return(o=N7(o))in t?Object.defineProperty(t,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[o]=l,t}function N7(t){var o=j7(t,"string");return typeof o=="symbol"?o:o+""}function j7(t,o){if(typeof t!="object"||!t)return t;var l=t[Symbol.toPrimitive];if(l!==void 0){var a=l.call(t,o);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}function M2(t){return t&&t.map((o,l)=>dt.createElement(o.tag,Dc({key:l},o.attr),M2(o.child)))}function ve(t){return o=>dt.createElement(D7,jc({attr:Dc({},t.attr)},o),M2(t.child))}function D7(t){var o=l=>{var{attr:a,size:s,title:c}=t,u=O7(t,M7),f=s||l.size||"1em",m;return l.className&&(m=l.className),t.className&&(m=(m?m+" ":"")+t.className),dt.createElement("svg",jc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},l.attr,a,u,{className:m,style:Dc(Dc({color:t.color||l.color},l.style),t.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),c&&dt.createElement("title",null,c),t.children)};return Mb!==void 0?dt.createElement(Mb.Consumer,null,l=>o(l)):o(T2)}function Ab(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8 13H16C16 15.2091 14.2091 17 12 17C9.79086 17 8 15.2091 8 13ZM8 11C7.17157 11 6.5 10.3284 6.5 9.5C6.5 8.67157 7.17157 8 8 8C8.82843 8 9.5 8.67157 9.5 9.5C9.5 10.3284 8.82843 11 8 11ZM16 11C15.1716 11 14.5 10.3284 14.5 9.5C14.5 8.67157 15.1716 8 16 8C16.8284 8 17.5 8.67157 17.5 9.5C17.5 10.3284 16.8284 11 16 11Z"},child:[]}]})(t)}function H7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM8 13C8 15.2091 9.79086 17 12 17C14.2091 17 16 15.2091 16 13H8ZM8 11C8.82843 11 9.5 10.3284 9.5 9.5C9.5 8.67157 8.82843 8 8 8C7.17157 8 6.5 8.67157 6.5 9.5C6.5 10.3284 7.17157 11 8 11ZM16 11C16.8284 11 17.5 10.3284 17.5 9.5C17.5 8.67157 16.8284 8 16 8C15.1716 8 14.5 8.67157 14.5 9.5C14.5 10.3284 15.1716 11 16 11Z"},child:[]}]})(t)}function L7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5 11V13H19V11H5Z"},child:[]}]})(t)}function z7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10ZM19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z"},child:[]}]})(t)}function k7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V12L17.206 8.207L11.2071 14.2071L9.79289 12.7929L15.792 6.793L12 3H21Z"},child:[]}]})(t)}function V7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z"},child:[]}]})(t)}function B7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM9 11V17H11V11H9ZM13 11V17H15V11H13ZM9 4V6H15V4H9Z"},child:[]}]})(t)}function $7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 4V6H15V4H9Z"},child:[]}]})(t)}function U7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"},child:[]}]})(t)}function P7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"},child:[]}]})(t)}function G7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"},child:[]}]})(t)}function O2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M22 18V20H2V18H22ZM2 3.5L10 8.5L2 13.5V3.5ZM22 11V13H12V11H22ZM22 4V6H12V4H22Z"},child:[]}]})(t)}function Z7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 3C20.5523 3 21 3.44772 21 4V5.757L19 7.757V5H5V13.1L9 9.1005L13.328 13.429L12.0012 14.7562L11.995 18.995L16.2414 19.0012L17.571 17.671L18.8995 19H19V16.242L21 14.242V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM21.7782 7.80761L23.1924 9.22183L15.4142 17L13.9979 16.9979L14 15.5858L21.7782 7.80761ZM15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7Z"},child:[]}]})(t)}function q7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 15V18H24V20H21V23H19V20H16V18H19V15H21ZM21.0082 3C21.556 3 22 3.44495 22 3.9934L22.0007 13.3417C21.3749 13.1204 20.7015 13 20 13V5H4L4.001 19L13.2929 9.70715C13.6528 9.34604 14.22 9.31823 14.6123 9.62322L14.7065 9.70772L18.2521 13.2586C15.791 14.0069 14 16.2943 14 19C14 19.7015 14.1204 20.3749 14.3417 21.0007L2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082ZM8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7Z"},child:[]}]})(t)}function I7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"},child:[]}]})(t)}function Y7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"},child:[]}]})(t)}function F7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 3V12C8 14.2091 9.79086 16 12 16C14.2091 16 16 14.2091 16 12V3H18V12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12V3H8ZM4 20H20V22H4V20Z"},child:[]}]})(t)}function Ep(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 6V21H11V6H5V4H19V6H13Z"},child:[]}]})(t)}function X7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"},child:[]}]})(t)}function Q7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z"},child:[]}]})(t)}function A2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 4H3V6H21V4ZM21 11H8V13H21V11ZM21 18H8V20H21V18ZM5 11H3V20H5V11Z"},child:[]}]})(t)}function K7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20C20.5523 3 21 3.44772 21 4V20ZM19 11V5H13.001V7H15L12 10L9 7H11V5H5V11H7V13H5V19H11V17H9L12 14L15 17H13.001V19H19V13H17V11H19ZM11 13H9V11H11V13ZM15 13H13V11H15V13Z"},child:[]}]})(t)}function J7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"},child:[]}]})(t)}function _2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"},child:[]}]})(t)}function N2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"},child:[]}]})(t)}function j2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z"},child:[]}]})(t)}function D2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z"},child:[]}]})(t)}function W7(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 17H22V19H19V22H17V17ZM7 7H2V5H5V2H7V7ZM18.364 15.5355L16.9497 14.1213L18.364 12.7071C20.3166 10.7545 20.3166 7.58866 18.364 5.63604C16.4113 3.68342 13.2455 3.68342 11.2929 5.63604L9.87868 7.05025L8.46447 5.63604L9.87868 4.22183C12.6123 1.48816 17.0445 1.48816 19.7782 4.22183C22.5118 6.9555 22.5118 11.3877 19.7782 14.1213L18.364 15.5355ZM15.5355 18.364L14.1213 19.7782C11.3877 22.5118 6.9555 22.5118 4.22183 19.7782C1.48816 17.0445 1.48816 12.6123 4.22183 9.87868L5.63604 8.46447L7.05025 9.87868L5.63604 11.2929C3.68342 13.2455 3.68342 16.4113 5.63604 18.364C7.58866 20.3166 10.7545 20.3166 12.7071 18.364L14.1213 16.9497L15.5355 18.364ZM14.8284 7.75736L16.2426 9.17157L9.17157 16.2426L7.75736 14.8284L14.8284 7.75736Z"},child:[]}]})(t)}function eE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 20H7V18H9.92661L12.0425 6H9V4H17V6H14.0734L11.9575 18H15V20Z"},child:[]}]})(t)}function _b(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 5H11V19H8V21H16V19H13V5H16V3H8V5ZM2 7C1.44772 7 1 7.44772 1 8V16C1 16.5523 1.44772 17 2 17H8V15H3V9H8V7H2ZM16 9H21V15H16V17H22C22.5523 17 23 16.5523 23 16V8C23 7.44772 22.5523 7 22 7H16V9Z"},child:[]}]})(t)}function tE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z"},child:[]}]})(t)}function nE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z"},child:[]}]})(t)}function H2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21.097 8L18.499 12.5C20.7091 12.5 22.5 14.2909 22.5 16.5C22.5 18.7091 20.7091 20.5 18.5 20.5C16.2909 20.5 14.5 18.7091 14.5 16.5C14.5 15.7636 14.699 15.0737 15.0461 14.4811L18.788 8H21.097ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4ZM18.5 14.5C17.3954 14.5 16.5 15.3954 16.5 16.5C16.5 17.6046 17.3954 18.5 18.5 18.5C19.6046 18.5 20.5 17.6046 20.5 16.5C20.5 15.3954 19.6046 14.5 18.5 14.5Z"},child:[]}]})(t)}function L2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M22 8V10H17.6769L17.2126 12.6358C17.5435 12.5472 17.8912 12.5 18.25 12.5C20.4591 12.5 22.25 14.2909 22.25 16.5C22.25 18.7091 20.4591 20.5 18.25 20.5C16.4233 20.5 14.8827 19.2756 14.4039 17.6027L16.3271 17.0519C16.5667 17.8881 17.3369 18.5 18.25 18.5C19.3546 18.5 20.25 17.6046 20.25 16.5C20.25 15.3954 19.3546 14.5 18.25 14.5C17.6194 14.5 17.057 14.7918 16.6904 15.2478L14.8803 14.3439L16 8H22ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4Z"},child:[]}]})(t)}function z2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 20H11V13H4V20H2V4H4V11H11V4H13V20ZM22 8V16H23.5V18H22V20H20V18H14.5V16.66L19.5 8H22ZM20 11.133L17.19 16H20V11.133Z"},child:[]}]})(t)}function Hc(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M22 8L21.9984 10L19.4934 12.883C21.0823 13.3184 22.25 14.7728 22.25 16.5C22.25 18.5711 20.5711 20.25 18.5 20.25C16.674 20.25 15.1528 18.9449 14.8184 17.2166L16.7821 16.8352C16.9384 17.6413 17.6481 18.25 18.5 18.25C19.4665 18.25 20.25 17.4665 20.25 16.5C20.25 15.5335 19.4665 14.75 18.5 14.75C18.214 14.75 17.944 14.8186 17.7056 14.9403L16.3992 13.3932L19.3484 10H15V8H22ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4Z"},child:[]}]})(t)}function Lc(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 4V11H11V4H13V20H11V13H4V20H2V4H4ZM18.5 8C20.5711 8 22.25 9.67893 22.25 11.75C22.25 12.6074 21.9623 13.3976 21.4781 14.0292L21.3302 14.2102L18.0343 18H22V20H15L14.9993 18.444L19.8207 12.8981C20.0881 12.5908 20.25 12.1893 20.25 11.75C20.25 10.7835 19.4665 10 18.5 10C17.5818 10 16.8288 10.7071 16.7558 11.6065L16.75 11.75H14.75C14.75 9.67893 16.4289 8 18.5 8Z"},child:[]}]})(t)}function zc(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 20H11V13H4V20H2V4H4V11H11V4H13V20ZM21.0005 8V20H19.0005L19 10.204L17 10.74V8.67L19.5005 8H21.0005Z"},child:[]}]})(t)}function Nb(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.55397 22H3.3999L10.9999 3H12.9999L20.5999 22H18.4458L16.0458 16H7.95397L5.55397 22ZM8.75397 14H15.2458L11.9999 5.88517L8.75397 14Z"},child:[]}]})(t)}function oE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3.41436 5.99995L5.70726 3.70706L4.29304 2.29285L0.585938 5.99995L4.29304 9.70706L5.70726 8.29285L3.41436 5.99995ZM9.58594 5.99995L7.29304 3.70706L8.70726 2.29285L12.4144 5.99995L8.70726 9.70706L7.29304 8.29285L9.58594 5.99995ZM14.0002 2.99995H21.0002C21.5524 2.99995 22.0002 3.44767 22.0002 3.99995V20C22.0002 20.5522 21.5524 21 21.0002 21H3.00015C2.44787 21 2.00015 20.5522 2.00015 20V12H4.00015V19H20.0002V4.99995H14.0002V2.99995Z"},child:[]}]})(t)}function lE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 11H12.5C13.8807 11 15 9.88071 15 8.5C15 7.11929 13.8807 6 12.5 6H8V11ZM18 15.5C18 17.9853 15.9853 20 13.5 20H6V4H12.5C14.9853 4 17 6.01472 17 8.5C17 9.70431 16.5269 10.7981 15.7564 11.6058C17.0979 12.3847 18 13.837 18 15.5ZM8 13V18H13.5C14.8807 18 16 16.8807 16 15.5C16 14.1193 14.8807 13 13.5 13H8Z"},child:[]}]})(t)}function rE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z"},child:[]}]})(t)}function aE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z"},child:[]}]})(t)}function iE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z"},child:[]}]})(t)}function sE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z"},child:[]}]})(t)}function cE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M23 12L15.9289 19.0711L14.5147 17.6569L20.1716 12L14.5147 6.34317L15.9289 4.92896L23 12ZM3.82843 12L9.48528 17.6569L8.07107 19.0711L1 12L8.07107 4.92896L9.48528 6.34317L3.82843 12Z"},child:[]}]})(t)}function uE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"},child:[]}]})(t)}function k2(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711Z"},child:[]}]})(t)}function fE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M7.24264 17.9967H3V13.754L14.435 2.319C14.8256 1.92848 15.4587 1.92848 15.8492 2.319L18.6777 5.14743C19.0682 5.53795 19.0682 6.17112 18.6777 6.56164L7.24264 17.9967ZM3 19.9967H21V21.9967H3V19.9967Z"},child:[]}]})(t)}function dE(t){return ve({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z"},child:[]}]})(t)}var gm;async function mE(){return gm||(gm=(async()=>{let[t,o]=await Promise.all([gc(()=>import("./module-RjUF93sV.js"),[]),gc(()=>import("./native-48B9X9Wg.js"),[])]),l="default"in t?t.default:t,a="default"in o?o.default:o;return await l.init({data:a}),{emojiMart:l,emojiData:a}})(),gm)}function pE(t){let o=y.useRef(null),l=y.useRef(null);return l.current&&l.current.update(t),y.useEffect(()=>((async()=>{let{emojiMart:a}=await mE();l.current=new a.Picker({...t,ref:o})})(),()=>{l.current=null}),[]),dt.createElement("div",{ref:o})}var jb=t=>{let[o,l]=y.useState(!1),a=pe(),s=On(),c=s.editor?.portalElement;if(!c)throw Error("Portal root not found");return g.jsxs(a.Generic.Popover.Root,{open:o,portalRoot:c,children:[g.jsx(a.Generic.Popover.Trigger,{children:g.jsx("div",{onClick:u=>{u.preventDefault(),u.stopPropagation(),l(!o),t.onOpenChange?.(!o)},style:{display:"flex",justifyContent:"center",alignItems:"center"},children:t.children})}),g.jsx(a.Generic.Popover.Content,{className:"bn-emoji-picker-popover",variant:"panel-popover",children:g.jsx(pE,{perLine:7,onClickOutside:()=>{l(!1),t.onOpenChange?.(!1)},onEmojiSelect:u=>{t.onEmojiSelect(u),l(!1),t.onOpenChange?.(!1)},theme:s?.colorSchemePreference})})]})};function V2(t){return lu([t]).get(t)}function lu(t){let o=Ve(Mn).userStore,l=y.useCallback(()=>{let s=new Map;for(let c of t){let u=o.getUser(c);u&&s.set(c,u)}return s},[o,t]),a=y.useMemo(()=>({current:l()}),[l]);return y.useSyncExternalStore(y.useCallback(s=>{let c=o.subscribe(u=>{a.current=l(),s()});return o.loadUsers(t),c},[o,l,t,a]),()=>a.current)}var hE=t=>{let o=pe(),l=Re(),a=Ve(Mn),s=t.comment.reactions.find(m=>m.emoji===t.emoji);if(!s)throw Error("Trying to render reaction badge for non-existing reaction");let[c,u]=y.useState([]),f=lu(c);return g.jsx(o.Generic.Badge.Root,{className:xt("bn-badge","bn-comment-reaction"),text:s.userIds.length.toString(),icon:s.emoji,isSelected:a.threadStore.auth.canDeleteReaction(t.comment,s.emoji),onClick:()=>t.onReactionSelect(s.emoji),onMouseEnter:()=>u(s.userIds),mainTooltip:l.comments.reactions.reacted_by,secondaryTooltip:`${Array.from(f.values()).map(m=>m.username).join(`
|
|
50
|
+
`)}`},s.emoji)},B2=({comment:t,thread:o,showResolveButton:l})=>{let a=Ve(Mn),s=Re(),c=Sp({initialContent:t.body,trailingBlock:!1,dictionary:{...s,placeholders:{emptyDocument:s.placeholders.edit_comment}},schema:a.commentEditorSchema||wp}),u=pe(),[f,m]=y.useState(!1),[h,v]=y.useState(!1),b=a.threadStore,x=y.useCallback(()=>{m(!0)},[]),S=y.useCallback(()=>{c.replaceBlocks(c.document,t.body),m(!1)},[c,t.body]),E=y.useCallback(async Z=>{await b.updateComment({commentId:t.id,comment:{body:c.document},threadId:o.id}),m(!1)},[t,o.id,c,b]),w=y.useCallback(async()=>{await b.deleteComment({commentId:t.id,threadId:o.id})},[t,o.id,b]),R=y.useCallback(async Z=>{b.auth.canAddReaction(t,Z)?await b.addReaction({threadId:o.id,commentId:t.id,emoji:Z}):b.auth.canDeleteReaction(t,Z)&&await b.deleteReaction({threadId:o.id,commentId:t.id,emoji:Z})},[b,t,o.id]),M=y.useCallback(async()=>{await b.resolveThread({threadId:o.id})},[o.id,b]),O=y.useCallback(async()=>{await b.unresolveThread({threadId:o.id})},[o.id,b]),A=V2(t.userId);if(!t.body)return null;let N,H=b.auth.canAddReaction(t),V=b.auth.canDeleteComment(t),$=b.auth.canUpdateComment(t),F=l&&(o.resolved?b.auth.canUnresolveThread(o):b.auth.canResolveThread(o));f||(N=g.jsxs(u.Generic.Toolbar.Root,{className:xt("bn-action-toolbar","bn-comment-actions"),variant:"action-toolbar",children:[H&&g.jsx(jb,{onEmojiSelect:Z=>R(Z.native),onOpenChange:v,children:g.jsx(u.Generic.Toolbar.Button,{mainTooltip:s.comments.actions.add_reaction,variant:"compact",children:g.jsx(Ab,{size:16})},"add-reaction")}),F&&(o.resolved?g.jsx(u.Generic.Toolbar.Button,{mainTooltip:"Re-open",variant:"compact",onClick:O,children:g.jsx(dE,{size:16})},"reopen"):g.jsx(u.Generic.Toolbar.Button,{mainTooltip:s.comments.actions.resolve,variant:"compact",onClick:M,children:g.jsx(U7,{size:16})},"resolve")),(V||$)&&g.jsxs(u.Generic.Menu.Root,{position:"bottom-start",children:[g.jsx(u.Generic.Menu.Trigger,{children:g.jsx(u.Generic.Toolbar.Button,{mainTooltip:s.comments.actions.more_actions,variant:"compact",children:g.jsx(z7,{size:16})},"more-actions")}),g.jsxs(u.Generic.Menu.Dropdown,{className:"bn-menu-dropdown",children:[$&&g.jsx(u.Generic.Menu.Item,{icon:g.jsx(fE,{}),onClick:x,children:s.comments.actions.edit_comment},"edit-comment"),V&&g.jsx(u.Generic.Menu.Item,{icon:g.jsx(B7,{}),onClick:w,children:s.comments.actions.delete_comment},"delete-comment")]})]})]}));let Q=t.createdAt.toLocaleDateString(void 0,{month:"short",day:"numeric"});if(!t.body)throw Error("soft deletes are not yet supported");return g.jsx(u.Comments.Comment,{authorInfo:A??"loading",timeString:Q,edited:t.updatedAt.getTime()!==t.createdAt.getTime(),showActions:"hover",actions:N,className:"bn-thread-comment",emojiPickerOpen:h,children:g.jsx(Cp,{autoFocus:f,editor:c,editable:f,actions:t.reactions.length>0||f?({isEmpty:Z})=>g.jsxs(g.Fragment,{children:[t.reactions.length>0&&!f&&g.jsxs(u.Generic.Badge.Group,{className:xt("bn-badge-group","bn-comment-reactions"),children:[t.reactions.map(ee=>g.jsx(hE,{comment:t,emoji:ee.emoji,onReactionSelect:R},ee.emoji)),H&&g.jsx(jb,{onEmojiSelect:ee=>R(ee.native),onOpenChange:v,children:g.jsx(u.Generic.Badge.Root,{className:xt("bn-badge","bn-comment-add-reaction"),text:"+",icon:g.jsx(Ab,{size:16}),mainTooltip:s.comments.actions.add_reaction})})]}),f&&g.jsxs(u.Generic.Toolbar.Root,{variant:"action-toolbar",className:xt("bn-action-toolbar","bn-comment-actions"),children:[g.jsx(u.Generic.Toolbar.Button,{mainTooltip:s.comments.save_button_text,variant:"compact",onClick:E,isDisabled:Z,children:s.comments.save_button_text}),g.jsx(u.Generic.Toolbar.Button,{className:"bn-button",mainTooltip:s.comments.cancel_button_text,variant:"compact",onClick:S,children:s.comments.cancel_button_text})]})]}):void 0})})},$2=({thread:t,maxCommentsBeforeCollapse:o})=>{let l=pe(),a=Re(),s=lu(t.resolvedBy?[t.resolvedBy]:[]),c=t.comments.map((u,f)=>g.jsx(B2,{thread:t,comment:u,showResolveButton:f===0},u.id+JSON.stringify(u.body||"{}")));if(t.resolved&&t.resolvedUpdatedAt&&t.resolvedBy){if(!s.get(t.resolvedBy))throw Error(`User ${t.resolvedBy} resolved thread ${t.id}, but their data could not be found.`);let u=t.comments.findLastIndex(f=>t.resolvedUpdatedAt.getTime()>f.createdAt.getTime())+1;c.splice(u,0,g.jsx(l.Comments.Comment,{className:"bn-thread-comment",authorInfo:t.resolvedBy&&s.get(t.resolvedBy)||"loading",timeString:t.resolvedUpdatedAt.toLocaleDateString(void 0,{month:"short",day:"numeric"}),edited:!1,showActions:!1,children:g.jsx("div",{className:"bn-resolved-text",children:a.comments.sidebar.marked_as_resolved})},"resolved-comment"))}return o&&c.length>o&&c.splice(1,c.length-2,g.jsx(l.Comments.ExpandSectionsPrompt,{className:"bn-thread-expand-prompt",children:a.comments.sidebar.more_replies(t.comments.length-2)},"expand-prompt")),c},Rp=({thread:t,selected:o,referenceText:l,maxCommentsBeforeCollapse:a,onFocus:s,onBlur:c,tabIndex:u})=>{let f=pe(),m=Re(),h=Ve(Mn),v=Sp({trailingBlock:!1,dictionary:{...m,placeholders:{emptyDocument:m.placeholders.comment_reply}},schema:h.commentEditorSchema||wp}),b=y.useCallback(async()=>{await h.threadStore.addComment({comment:{body:v.document},threadId:t.id}),v.removeBlocks(v.document)},[h,v,t.id]);return g.jsxs(f.Comments.Card,{className:"bn-thread",headerText:l,onFocus:s,onBlur:c,selected:o,tabIndex:u,children:[g.jsx(f.Comments.CardSection,{className:"bn-thread-comments",children:g.jsx($2,{thread:t,maxCommentsBeforeCollapse:o?void 0:a||5})}),o&&g.jsx(f.Comments.CardSection,{className:"bn-thread-composer",children:g.jsx(Cp,{autoFocus:!1,editable:!0,editor:v,actions:({isEmpty:x})=>x?null:g.jsx(f.Generic.Toolbar.Root,{variant:"action-toolbar",className:xt("bn-action-toolbar","bn-comment-actions"),children:g.jsx(f.Generic.Toolbar.Button,{mainTooltip:m.comments.save_button_text,variant:"compact",isDisabled:x,onClick:b,children:m.comments.save_button_text})})})})]})};function U2(){let t=Ve(Mn).threadStore,o=y.useRef(void 0);return o.current||=t.getThreads(),y.useSyncExternalStore(y.useCallback(l=>t.subscribe(a=>{o.current=a,l()}),[t]),()=>o.current)}var gE=R2({default:()=>P2});function P2(t){let o=be(),l=Ve(Mn),a=Ke(Mn,{editor:o,selector:m=>m.selectedThreadId?{id:m.selectedThreadId,position:m.threadPositions.get(m.selectedThreadId)}:void 0}),s=U2(),c=y.useMemo(()=>a?s.get(a.id):void 0,[a,s]),u=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:!!a,onOpenChange:(m,h,v)=>{v==="escape-key"&&o.focus(),m||l.selectThread(void 0)},placement:"bottom",middleware:[no(10),Ei(),Ri()],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:30},...t.floatingUIOptions?.elementProps}}),[l,o,t.floatingUIOptions,a]),f=t.floatingThread||Rp;return g.jsx(xp,{position:a?.position,...u,children:c&&g.jsx(f,{thread:c,selected:!0})})}const vE=Object.freeze(Object.defineProperty({__proto__:null,a:$2,c:lu,i:Rp,n:gE,o:B2,r:U2,s:V2,t:P2},Symbol.toStringTag,{value:"Module"}));function G2(){let t=be(),o=Ve(Mn),l=pe(),a=Re(),s=Sp({trailingBlock:!1,dictionary:{...a,placeholders:{emptyDocument:a.placeholders.new_comment}},schema:o.commentEditorSchema||wp});return g.jsx(l.Comments.Card,{className:"bn-thread",children:g.jsx(Cp,{autoFocus:!0,editable:!0,editor:s,actions:({isEmpty:c})=>g.jsx(l.Generic.Toolbar.Root,{className:xt("bn-action-toolbar","bn-comment-actions"),variant:"action-toolbar",children:g.jsx(l.Generic.Toolbar.Button,{className:"bn-button",mainTooltip:"Save",variant:"compact",isDisabled:c,onClick:async()=>{await o.createThread({initialComment:{body:s.document}}),o.stopPendingComment(),t.transact(u=>{u.setSelection(Y4.create(u.doc,u.selection.to))}),t.focus()},children:"Save"})})})})}var bE=R2({default:()=>Z2});function Z2(t){let o=be(),l=Ve(Mn),a=Ke(Mn,{editor:o,selector:f=>f.pendingComment}),s=St({editor:o,selector:({editor:f})=>a?{from:f.prosemirrorState.selection.from,to:f.prosemirrorState.selection.to}:void 0}),c=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:!!a,onOpenChange:f=>{f||(l.stopPendingComment(),o.focus())},placement:"bottom",middleware:[no(10),Ei(),Ri()],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!1},elementProps:{style:{zIndex:60},...t.floatingUIOptions?.elementProps}}),[l,o,a,t.floatingUIOptions]),u=t.floatingComposer||G2;return g.jsx(xp,{position:s,...c,children:g.jsx(u,{})})}const yE=Object.freeze(Object.defineProperty({__proto__:null,n:bE,r:G2,t:Z2},Symbol.toStringTag,{value:"Module"}));function xE(t){return ve({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z"},child:[]},{tag:"path",attr:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},child:[]}]})(t)}function SE(t){return ve({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(t)}function q2(t){return ve({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(t)}var CE=Cy(),wE=(...t)=>o=>{t.forEach(l=>{typeof l=="function"?l(o):l&&(l.current=o)})},EE=({contentComponent:t})=>{const o=CE.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return g.jsx(g.Fragment,{children:Object.values(o)})};function RE(){const t=new Set;let o={};return{subscribe(l){return t.add(l),()=>{t.delete(l)}},getSnapshot(){return o},getServerSnapshot(){return o},setRenderer(l,a){o={...o,[l]:Ey.createPortal(a.reactElement,a.element,l)},t.forEach(s=>s())},removeRenderer(l){const a={...o};delete a[l],o=a,t.forEach(s=>s())}}}var TE=class extends dt.Component{constructor(t){super(t),this.editorContentRef=dt.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const o=this.props.editor;if(o&&!o.isDestroyed&&((t=o.view.dom)!=null&&t.parentNode)){if(o.contentComponent)return;const l=this.editorContentRef.current;l.append(...o.view.dom.parentNode.childNodes),o.setOptions({element:l}),o.contentComponent=RE(),o.createNodeViews(),o.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const o=this.props.editor;if(o){o.isEditorContentInitialized=!1,o.isDestroyed||o.view.setProps({nodeViews:{}}),o.contentComponent=null;try{if(!((t=o.view.dom)!=null&&t.parentNode))return;const l=document.createElement("div");l.append(...o.view.dom.parentNode.childNodes),o.setOptions({element:l})}catch{}}}render(){const{editor:t,innerRef:o,...l}=this.props;return g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:wE(o,this.editorContentRef),...l}),t?.contentComponent&&g.jsx(EE,{contentComponent:t.contentComponent})]})}},ME=y.forwardRef((t,o)=>{const l=dt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return dt.createElement(TE,{key:l,innerRef:o,...t})}),OE=dt.memo(ME),I2=y.createContext({editor:null});I2.Consumer;var Y2=y.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Tp=()=>y.useContext(Y2),F2=dt.forwardRef((t,o)=>{const{onDragStart:l}=Tp(),a=t.as||"div";return g.jsx(a,{...t,ref:o,"data-node-view-wrapper":"",onDragStart:l,style:{whiteSpace:"normal",...t.style}})});function Db(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function Hb(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function AE(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function _E(t){if(Db(t)||Hb(t))return!0;if(AE(t)){const o=t.type;if(o)return Db(o)||Hb(o)}return!1}function NE(){try{if(y.version)return parseInt(y.version.split(".")[0],10)>=19}catch{}return!1}var jE=class{constructor(t,{editor:o,props:l={},as:a="div",className:s=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=o,this.props=l,this.element=document.createElement(a),this.element.classList.add("react-renderer"),s&&this.element.classList.add(...s.split(" ")),this.editor.isEditorContentInitialized?kn.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;const o=this.component,l=this.props,a=this.editor,s=NE(),c=_E(o),u={...l};u.ref&&!(s||c)&&delete u.ref,!u.ref&&(s||c)&&(u.ref=f=>{this.ref=f}),this.reactElement=g.jsx(o,{...u}),(t=a?.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){if(this.destroyed)return;let o=!1;const l=Object.keys(t);for(let a=0;a<l.length;a+=1){const s=l[a];if(t[s]!==this.props[s]){o=!0;break}}o&&(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;const o=this.editor;(t=o?.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(o=>{this.element.setAttribute(o,t[o])})}};dt.createContext({markViewContentRef:()=>{}});var DE=class extends F4{constructor(t,o,l){if(super(t,o,l),this.selectionRafId=null,this.handlePositionUpdate=()=>{const a=this.getPos();typeof a!="number"||a===this.currentPos||(this.currentPos=a,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs=="function"&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const a=this.dom.querySelector("[data-node-view-content]");if(!a)return;a.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const t=this.editor,o=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(o,{get(l,a,s){var c;return a==="storage"?(c=t.storage[o.name])!=null?c:{}:Reflect.get(l,a,s)}})}return this.cachedExtensionWithSyncedStorage}mount(){const o={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(h={})=>this.updateAttributes(h),deleteNode:()=>this.deleteNode(),ref:y.createRef()};if(!this.component.displayName){const h=v=>v.charAt(0).toUpperCase()+v.substring(1);this.component.displayName=h(this.extension.name)}const s={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:h=>{h&&this.contentDOMElement&&h.firstChild!==this.contentDOMElement&&(h.hasAttribute("data-node-view-wrapper")&&h.removeAttribute("data-node-view-wrapper"),h.appendChild(this.contentDOMElement))}},c=this.component,u=y.memo(h=>g.jsx(Y2.Provider,{value:s,children:y.createElement(c,h)}));u.displayName="ReactNodeView";let f=this.node.isInline?"span":"div";this.options.as&&(f=this.options.as);const{className:m=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new jE(u,{editor:this.editor,props:o,as:f,className:`node-${this.node.type.name} ${m}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var t;if(this.renderer.element.firstElementChild&&!((t=this.renderer.element.firstElementChild)!=null&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const t=this.currentPos;if(typeof t!="number")return;if(X4({selection:this.editor.state.selection,pos:t,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,o,l){const a=f=>{this.renderer.updateProps(f),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const f=this.node,m=this.decorations,h=this.innerDecorations;return this.node=t,this.decorations=o,this.innerDecorations=l,this.currentPos=this.getPos(),this.options.update({oldNode:f,oldDecorations:m,newNode:t,newDecorations:o,oldInnerDecorations:h,innerDecorations:l,updateProps:()=>a({node:t,decorations:o,innerDecorations:l,extension:this.extensionWithSyncedStorage})})}if(!(t!==this.node))return this.node=t,this.decorations=o,this.innerDecorations=l,!0;const c=this.getPos();this.node=t,this.decorations=o,this.innerDecorations=l,this.currentPos=c;const u={node:t,decorations:o,innerDecorations:l,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(u.getPos=()=>this.getPos()),a(u),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){const o=this.editor.extensionManager.attributes,l=Q4(this.node,o);t=this.options.attrs({node:this.node,HTMLAttributes:l})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function X2(t,o){return l=>l.editor.contentComponent?new DE(t,l,o):{}}var Mp=y.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Mp.displayName="TiptapContext";var HE=()=>y.useContext(Mp);function Q2({editor:t,instance:o,children:l}){const a=t??o;if(!a)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const s=y.useMemo(()=>({editor:a}),[a]),c=y.useMemo(()=>({editor:a}),[a]);return g.jsx(I2.Provider,{value:c,children:g.jsx(Mp.Provider,{value:s,children:l})})}Q2.displayName="Tiptap";function K2({...t}){const{editor:o}=HE();return g.jsx(OE,{editor:o,...t})}K2.displayName="Tiptap.Content";Object.assign(Q2,{Content:K2});var J2=t=>{let{blockId:o,children:l,...a}=t,s=be();return g.jsx(Kn,{reference:y.useMemo(()=>s.transact(c=>{if(!o)return;let u=gy(o,c.doc);if(!u)return;let{node:f}=s.prosemirrorView.domAtPos(u.posBeforeNode+1);if(f instanceof Element)return{element:f}}),[s,o]),...a,children:o!==void 0&&l})},LE=t=>{let o=pe(),l=Re(),a=be(),s=a.getBlock(t.blockId),[c,u]=y.useState(""),f=y.useCallback(v=>{u(v.currentTarget.value)},[]),m=y.useCallback(v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),a.updateBlock(s.id,{props:{name:p0(c),url:c}}))},[a,s.id,c]),h=y.useCallback(()=>{a.updateBlock(s.id,{props:{name:p0(c),url:c}})},[a,s.id,c]);return g.jsxs(o.FilePanel.TabPanel,{className:"bn-tab-panel",children:[g.jsx(o.FilePanel.TextInput,{className:"bn-text-input",placeholder:l.file_panel.embed.url_placeholder,value:c,onChange:f,onKeyDown:m,"data-test":"embed-input"}),g.jsx(o.FilePanel.Button,{className:"bn-button",onClick:h,"data-test":"embed-input-button",children:l.file_panel.embed.embed_button[s.type]||l.file_panel.embed.embed_button.file})]})},zE=t=>{let o=pe(),l=Re(),{setLoading:a}=t,s=be(),c=s.getBlock(t.blockId),[u,f]=y.useState(!1);y.useEffect(()=>{u&&setTimeout(()=>{f(!1)},3e3)},[u]);let m=y.useCallback(b=>{if(b===null)return;async function x(S){if(a(!0),s.uploadFile!==void 0)try{let E=await s.uploadFile(S,t.blockId);typeof E=="string"&&(E={props:{name:S.name,url:E}}),s.updateBlock(t.blockId,E)}catch{f(!0)}finally{a(!1)}}x(b)},[t.blockId,s,a]),h=s.schema.blockSpecs[c.type],v=h.implementation.meta?.fileBlockAccept?.length?h.implementation.meta.fileBlockAccept.join(","):"*/*";return g.jsxs(o.FilePanel.TabPanel,{className:"bn-tab-panel",children:[g.jsx(o.FilePanel.FileInput,{className:"bn-file-input","data-test":"upload-input",accept:v,placeholder:l.file_panel.upload.file_placeholder[c.type]||l.file_panel.upload.file_placeholder.file,value:null,onChange:m}),u&&g.jsx("div",{className:"bn-error-text",children:l.file_panel.upload.upload_error})]})},W2=t=>{let o=pe(),l=Re(),a=be(),[s,c]=y.useState(!1),u=t.tabs??[...a.uploadFile===void 0?[]:[{name:l.file_panel.upload.title,tabPanel:g.jsx(zE,{blockId:t.blockId,setLoading:c})}],{name:l.file_panel.embed.title,tabPanel:g.jsx(LE,{blockId:t.blockId})}],[f,m]=y.useState(t.defaultOpenTab||u[0].name);return g.jsx(o.FilePanel.Root,{className:"bn-panel",defaultOpenTab:f,openTab:f,setOpenTab:m,tabs:u,loading:s})},kE=t=>{let o=be(),l=Ve(km),a=Ke(km),s=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:!!a,onOpenChange:(u,f,m)=>{u||l.closeMenu(),m==="escape-key"&&o.focus()},middleware:[no(10),Ri()],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:90},...t.floatingUIOptions?.elementProps}}),[a,o,l,t.floatingUIOptions]),c=t.filePanel||W2;return g.jsx(J2,{blockId:a,...s,children:a&&g.jsx(c,{blockId:a})})},VE={bold:lE,italic:eE,underline:F7,strike:Q7,code:cE};function BE(t,o){return t in o.schema.styleSchema&&o.schema.styleSchema[t].type===t&&o.schema.styleSchema[t].propSchema==="boolean"}var oc=t=>{let o=Re(),l=pe(),a=be(),s=St({editor:a,selector:({editor:f})=>{if(!(!f.isEditable||!BE(t.basicTextStyle,f)||!(f.getSelection()?.blocks||[f.getTextCursorPosition().block]).find(m=>m.content!==void 0)))return t.basicTextStyle in f.getActiveStyles()?{active:!0}:{active:!1}}}),c=y.useCallback(f=>{a.focus(),a.toggleStyles({[f]:!0})},[a,t]);if(s===void 0)return null;let u=VE[t.basicTextStyle];return g.jsx(l.FormattingToolbar.Button,{className:"bn-button","data-test":t.basicTextStyle,onClick:()=>c(t.basicTextStyle),isSelected:s.active,label:o.formatting_toolbar[t.basicTextStyle].tooltip,mainTooltip:o.formatting_toolbar[t.basicTextStyle].tooltip,secondaryTooltip:Zc(o.formatting_toolbar[t.basicTextStyle].secondary_tooltip,o.generic.ctrl_shortcut),icon:g.jsx(u,{})})},Qm=t=>{let o=t.textColor||"default",l=t.backgroundColor||"default",a=t.size||16;return g.jsx("div",{className:"bn-color-icon","data-background-color":l,"data-text-color":o,style:y.useMemo(()=>({pointerEvents:"none",fontSize:(a*.75).toString()+"px",height:a.toString()+"px",lineHeight:a.toString()+"px",textAlign:"center",width:a.toString()+"px"}),[a]),children:"A"})},Lb=["default","gray","brown","red","orange","yellow","green","blue","purple","pink"],ru=t=>{let o=pe(),l=Re();return g.jsxs(g.Fragment,{children:[g.jsx(()=>t.text?g.jsxs(g.Fragment,{children:[g.jsx(o.Generic.Menu.Label,{children:l.color_picker.text_title}),Lb.map(a=>g.jsx(o.Generic.Menu.Item,{onClick:()=>{t.onClick&&t.onClick(),t.text.setColor(a)},"data-test":"text-color-"+a,icon:g.jsx(Qm,{textColor:a,size:t.iconSize}),checked:t.text.color===a,children:l.color_picker.colors[a]},"text-color-"+a))]}):null,{}),g.jsx(()=>t.background?g.jsxs(g.Fragment,{children:[g.jsx(o.Generic.Menu.Label,{children:l.color_picker.background_title}),Lb.map(a=>g.jsx(o.Generic.Menu.Item,{onClick:()=>{t.onClick&&t.onClick(),t.background.setColor(a)},"data-test":"background-color-"+a,icon:g.jsx(Qm,{backgroundColor:a,size:t.iconSize}),checked:t.background.color===a,children:l.color_picker.colors[a]},"background-color-"+a))]}):null,{})]})};function lc(t,o){return`${t}Color`in o.schema.styleSchema&&o.schema.styleSchema[`${t}Color`].type===`${t}Color`&&o.schema.styleSchema[`${t}Color`].propSchema==="string"}var $E=()=>{let t=pe(),o=Re(),l=be(),a=lc("text",l),s=lc("background",l),c=St({editor:l,selector:({editor:m})=>{if(!m.isEditable||!(m.getSelection()?.blocks||[m.getTextCursorPosition().block]).find(b=>b.content!==void 0))return;let h=lc("text",m),v=lc("background",m);if(!(!h&&!v))return{textColor:h?m.getActiveStyles().textColor||"default":void 0,backgroundColor:v?m.getActiveStyles().backgroundColor||"default":void 0}}}),u=y.useCallback(m=>{if(!a)throw Error("Tried to set text color, but style does not exist in editor schema.");m==="default"?l.removeStyles({textColor:m}):l.addStyles({textColor:m}),setTimeout(()=>{l.focus()})},[l,a]),f=y.useCallback(m=>{if(!s)throw Error("Tried to set background color, but style does not exist in editor schema.");m==="default"?l.removeStyles({backgroundColor:m}):l.addStyles({backgroundColor:m}),setTimeout(()=>{l.focus()})},[s,l]);return c===void 0?null:g.jsxs(t.Generic.Menu.Root,{children:[g.jsx(t.Generic.Menu.Trigger,{children:g.jsx(t.FormattingToolbar.Button,{className:"bn-button","data-test":"colors",label:o.formatting_toolbar.colors.tooltip,mainTooltip:o.formatting_toolbar.colors.tooltip,icon:g.jsx(Qm,{textColor:c.textColor,backgroundColor:c.backgroundColor,size:20})})}),g.jsx(t.Generic.Menu.Dropdown,{className:"bn-menu-dropdown bn-color-picker-dropdown",children:g.jsx(ru,{text:c.textColor?{color:c.textColor,setColor:u}:void 0,background:c.backgroundColor?{color:c.backgroundColor,setColor:f}:void 0})})]})},zb=t=>{for(let o of ew)if(t.startsWith(o))return t;return`${tw}://${t}`},ex=t=>{let o=pe(),l=Re(),{editLink:a}=Ve(qc),{url:s,text:c,showTextField:u}=t,[f,m]=y.useState(s),[h,v]=y.useState(c);y.useEffect(()=>{m(s),v(c)},[c,s]);let b=y.useCallback(w=>{w.key==="Enter"&&!w.nativeEvent.isComposing&&(w.preventDefault(),a(zb(f),h,t.range.from),t.setToolbarOpen?.(!1),t.setToolbarPositionFrozen?.(!1))},[a,f,h,t]),x=y.useCallback(w=>m(w.currentTarget.value),[]),S=y.useCallback(w=>v(w.currentTarget.value),[]),E=y.useCallback(()=>{a(zb(f),h,t.range.from),t.setToolbarOpen?.(!1),t.setToolbarPositionFrozen?.(!1)},[a,f,h,t]);return g.jsxs(o.Generic.Form.Root,{children:[g.jsx(o.Generic.Form.TextInput,{className:"bn-text-input",name:"url",icon:g.jsx(D2,{}),autoFocus:!0,placeholder:l.link_toolbar.form.url_placeholder,value:f,onKeyDown:b,onChange:x,onSubmit:E}),u!==!1&&g.jsx(o.Generic.Form.TextInput,{className:"bn-text-input",name:"title",icon:g.jsx(Ep,{}),placeholder:l.link_toolbar.form.title_placeholder,value:h,onKeyDown:b,onChange:S,onSubmit:E})]})};function UE(t){return"link"in t.schema.inlineContentSchema&&t.schema.inlineContentSchema.link==="link"}var PE=()=>{let t=be(),o=ql(),l=pe(),a=Re(),s=Ve(mi),{showSelection:c}=Ve(zm),[u,f]=y.useState(!1);y.useEffect(()=>(c(u,"createLinkButton"),()=>c(!1,"createLinkButton")),[u,c]);let m=St({editor:t,selector:({editor:h})=>{if(!(!h.isEditable||!UE(h)||W4(h.prosemirrorState.selection)||!(h.getSelection()?.blocks||[h.getTextCursorPosition().block]).find(v=>v.content!==void 0)))return{url:h.getSelectedLinkUrl(),text:h.getSelectedText(),range:{from:h.prosemirrorState.selection.from,to:h.prosemirrorState.selection.to}}}});return y.useEffect(()=>{f(!1)},[m]),y.useEffect(()=>{let h=v=>{(v.ctrlKey||v.metaKey)&&v.key==="k"&&(f(!0),v.preventDefault())};return o?.addEventListener("keydown",h),()=>{o?.removeEventListener("keydown",h)}},[o]),m===void 0?null:g.jsxs(l.Generic.Popover.Root,{open:u,onOpenChange:f,children:[g.jsx(l.Generic.Popover.Trigger,{children:g.jsx(l.FormattingToolbar.Button,{className:"bn-button","data-test":"createLink",label:a.formatting_toolbar.link.tooltip,mainTooltip:a.formatting_toolbar.link.tooltip,secondaryTooltip:Zc(a.formatting_toolbar.link.secondary_tooltip,a.generic.ctrl_shortcut),icon:g.jsx(D2,{}),onClick:()=>f(h=>!h)})}),g.jsx(l.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:g.jsx(ex,{url:m.url||"",text:m.text,range:m.range,showTextField:!1,setToolbarOpen:h=>s.store.setState(h)})})]})},GE=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:m})=>{if(!m.isEditable)return;let h=m.getSelection()?.blocks||[m.getTextCursorPosition().block];if(h.length!==1)return;let v=h[0];if(Xt(v,m,v.type,{url:"string",caption:"string"}))return v}}),[s,c]=y.useState(!1),u=y.useCallback(m=>{a!==void 0&&Pl(l,a.type,{caption:"string"})&&l.updateBlock(a.id,{props:{caption:m.currentTarget.value}})},[a,l]),f=y.useCallback(m=>{m.key==="Enter"&&!m.nativeEvent.isComposing&&(m.preventDefault(),c(!1))},[]);return a===void 0?null:g.jsxs(o.Generic.Popover.Root,{open:s,onOpenChange:c,children:[g.jsx(o.Generic.Popover.Trigger,{children:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.file_caption.tooltip,mainTooltip:t.formatting_toolbar.file_caption.tooltip,icon:g.jsx(_b,{}),onClick:()=>c(m=>!m)})}),g.jsx(o.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:g.jsx(o.Generic.Form.Root,{children:g.jsx(o.Generic.Form.TextInput,{name:"file-caption",icon:g.jsx(_b,{}),value:a.props.caption,autoFocus:!0,placeholder:t.formatting_toolbar.file_caption.input_placeholder,onKeyDown:f,onChange:u})})})]})},ZE=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:c})=>{if(!c.isEditable)return;let u=c.getSelection()?.blocks||[c.getTextCursorPosition().block];if(u.length!==1)return;let f=u[0];if(Xt(f,c,f.type,{url:"string"}))return f}}),s=y.useCallback(()=>{a!==void 0&&(l.focus(),l.removeBlocks([a.id]))},[a,l]);return a===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.file_delete.tooltip[a.type]||t.formatting_toolbar.file_delete.tooltip.file,mainTooltip:t.formatting_toolbar.file_delete.tooltip[a.type]||t.formatting_toolbar.file_delete.tooltip.file,icon:g.jsx($7,{}),onClick:s})},qE=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:m})=>{if(!m.isEditable)return;let h=m.getSelection()?.blocks||[m.getTextCursorPosition().block];if(h.length!==1)return;let v=h[0];if(Xt(v,m,v.type,{url:"string",name:"string"}))return v}}),[s,c]=y.useState(!1),u=y.useCallback(m=>{a!==void 0&&Pl(l,a.type,{name:"string"})&&l.updateBlock(a.id,{props:{name:m.currentTarget.value}})},[a,l]),f=y.useCallback(m=>{m.key==="Enter"&&!m.nativeEvent.isComposing&&(m.preventDefault(),c(!1))},[]);return a===void 0?null:g.jsxs(o.Generic.Popover.Root,{open:s,onOpenChange:c,children:[g.jsx(o.Generic.Popover.Trigger,{children:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.file_rename.tooltip[a.type]||t.formatting_toolbar.file_rename.tooltip.file,mainTooltip:t.formatting_toolbar.file_rename.tooltip[a.type]||t.formatting_toolbar.file_rename.tooltip.file,icon:g.jsx(Nb,{}),onClick:()=>c(m=>!m)})}),g.jsx(o.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:g.jsx(o.Generic.Form.Root,{children:g.jsx(o.Generic.Form.TextInput,{name:"file-name",icon:g.jsx(Nb,{}),value:a.props.name,autoFocus:!0,placeholder:t.formatting_toolbar.file_rename.input_placeholder[a.type]||t.formatting_toolbar.file_rename.input_placeholder.file,onKeyDown:f,onChange:u})})})]})},IE=()=>{let t=Re(),o=pe(),l=St({editor:be(),selector:({editor:a})=>{if(!a.isEditable)return;let s=a.getSelection()?.blocks||[a.getTextCursorPosition().block];if(s.length!==1)return;let c=s[0];if(Xt(c,a,c.type,{url:"string"}))return c}});return l===void 0?null:g.jsxs(o.Generic.Popover.Root,{position:"bottom",children:[g.jsx(o.Generic.Popover.Trigger,{children:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",mainTooltip:t.formatting_toolbar.file_replace.tooltip[l.type]||t.formatting_toolbar.file_replace.tooltip.file,label:t.formatting_toolbar.file_replace.tooltip[l.type]||t.formatting_toolbar.file_replace.tooltip.file,icon:g.jsx(Z7,{})})}),g.jsx(o.Generic.Popover.Content,{className:"bn-popover-content bn-panel-popover",variant:"panel-popover",children:g.jsx(W2,{blockId:l.id})})]})},YE=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:c})=>{if(!(!c.isEditable||!(c.getSelection()?.blocks||[c.getTextCursorPosition().block]).find(u=>u.content!==void 0)))return{canNestBlock:c.canNestBlock()}}}),s=y.useCallback(()=>{a!==void 0&&a.canNestBlock&&(l.focus(),l.nestBlock())},[l,a]);return a===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button","data-test":"nestBlock",onClick:s,isDisabled:!a.canNestBlock,label:t.formatting_toolbar.nest.tooltip,mainTooltip:t.formatting_toolbar.nest.tooltip,secondaryTooltip:Zc(t.formatting_toolbar.nest.secondary_tooltip,t.generic.ctrl_shortcut),icon:g.jsx(tE,{})})},FE=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:c})=>{if(!(!c.isEditable||!(c.getSelection()?.blocks||[c.getTextCursorPosition().block]).find(u=>u.content!==void 0)))return{canUnnestBlock:c.canUnnestBlock()}}}),s=y.useCallback(()=>{a!==void 0&&a.canUnnestBlock&&(l.focus(),l.unnestBlock())},[l,a]);return a===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button","data-test":"unnestBlock",onClick:s,isDisabled:!a.canUnnestBlock,label:t.formatting_toolbar.unnest.tooltip,mainTooltip:t.formatting_toolbar.unnest.tooltip,secondaryTooltip:Zc(t.formatting_toolbar.unnest.secondary_tooltip,t.generic.ctrl_shortcut),icon:g.jsx(nE,{})})},XE=t=>[{name:t.slash_menu.paragraph.title,type:"paragraph",icon:Ep},{name:t.slash_menu.heading.title,type:"heading",props:{level:1,isToggleable:!1},icon:zc},{name:t.slash_menu.heading_2.title,type:"heading",props:{level:2,isToggleable:!1},icon:Lc},{name:t.slash_menu.heading_3.title,type:"heading",props:{level:3,isToggleable:!1},icon:Hc},{name:t.slash_menu.heading_4.title,type:"heading",props:{level:4,isToggleable:!1},icon:z2},{name:t.slash_menu.heading_5.title,type:"heading",props:{level:5,isToggleable:!1},icon:L2},{name:t.slash_menu.heading_6.title,type:"heading",props:{level:6,isToggleable:!1},icon:H2},{name:t.slash_menu.toggle_heading.title,type:"heading",props:{level:1,isToggleable:!0},icon:zc},{name:t.slash_menu.toggle_heading_2.title,type:"heading",props:{level:2,isToggleable:!0},icon:Lc},{name:t.slash_menu.toggle_heading_3.title,type:"heading",props:{level:3,isToggleable:!0},icon:Hc},{name:t.slash_menu.quote.title,type:"quote",icon:A2},{name:t.slash_menu.toggle_list.title,type:"toggleListItem",icon:O2},{name:t.slash_menu.bullet_list.title,type:"bulletListItem",icon:_2},{name:t.slash_menu.numbered_list.title,type:"numberedListItem",icon:N2},{name:t.slash_menu.check_list.title,type:"checkListItem",icon:j2}],QE=t=>{let o=pe(),l=be(),a=St({editor:l,selector:({editor:f})=>f.getSelection()?.blocks||[f.getTextCursorPosition().block]}),s=a[0],c=y.useMemo(()=>(t.items||XE(l.dictionary)).filter(f=>Pl(l,f.type,Object.fromEntries(Object.entries(f.props||{}).map(([m,h])=>[m,typeof h])))),[l,t.items]),u=y.useMemo(()=>c.map(f=>{let m=f.icon,h=f.type===s.type,v=Object.entries(f.props||{}).filter(([b,x])=>x!==s.props[b]).length===0;return{text:f.name,icon:g.jsx(m,{size:16}),onClick:()=>{l.focus(),l.transact(()=>{for(let b of a)l.updateBlock(b,{type:f.type,props:f.props})})},isSelected:h&&v}}),[l,c,s.props,s.type,a]);return!y.useMemo(()=>u.find(f=>f.isSelected)!==void 0,[u])||!l.isEditable?null:g.jsx(o.FormattingToolbar.Select,{className:"bn-select",items:u})},KE=()=>{let t=Re(),o=pe(),l=Ve("comments"),{store:a}=Ve(mi),s=y.useCallback(()=>{l.startPendingComment(),a.setState(!1)},[l,a]);return g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.comment.tooltip,mainTooltip:t.formatting_toolbar.comment.tooltip,icon:g.jsx(k2,{}),onClick:s})},JE=()=>be().getExtension("comments")?g.jsx(KE,{}):null,WE=()=>{let t=Re(),o=pe(),l=be(),a=y.useCallback(()=>{l._tiptapEditor.chain().focus().addPendingComment().run()},[l]);return!l._tiptapEditor.commands.addPendingComment||!l.isEditable?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.comment.tooltip,mainTooltip:t.formatting_toolbar.comment.tooltip,icon:g.jsx(k2,{}),onClick:a})};function Km(t,o){try{let l=new URL(t,o);if(l.protocol!=="javascript:")return l.href}catch{}return"#"}var eR=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:c})=>{let u=c.getSelection()?.blocks||[c.getTextCursorPosition().block];if(u.length!==1)return;let f=u[0];if(Xt(f,c,f.type,{url:"string"}))return f}}),s=y.useCallback(()=>{a!==void 0&&(l.focus(),l.resolveFileUrl?l.resolveFileUrl(a.props.url).then(c=>window.open(Km(c,window.location.href))):window.open(Km(a.props.url,window.location.href)))},[a,l]);return a===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.file_download.tooltip[a.type]||t.formatting_toolbar.file_download.tooltip.file,mainTooltip:t.formatting_toolbar.file_download.tooltip[a.type]||t.formatting_toolbar.file_download.tooltip.file,icon:g.jsx(V7,{}),onClick:s})},tR=()=>{let t=Re(),o=pe(),l=be(),a=St({editor:l,selector:({editor:c})=>{if(!c.isEditable)return;let u=c.getSelection()?.blocks||[c.getTextCursorPosition().block];if(u.length!==1)return;let f=u[0];if(Xt(f,c,f.type,{url:"string",showPreview:"boolean"}))return f}}),s=y.useCallback(()=>{a!==void 0&&Pl(l,a.type,{showPreview:"boolean"})&&l.updateBlock(a.id,{props:{showPreview:!a.props.showPreview}})},[a,l]);return a===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:"Toggle preview",mainTooltip:t.formatting_toolbar.file_preview_toggle.tooltip,icon:g.jsx(q7,{}),isSelected:a.props.showPreview,onClick:s})},nR=()=>{let t=Re(),o=pe(),l=be(),a=Ve(We),s=St({editor:l,selector:({editor:u})=>{if(!u.isEditable||!u.settings.tables.splitCells)return;let f=u.getSelection()?.blocks||[u.getTextCursorPosition().block];if(f.length!==1)return;let m=f[0];if(m.type==="table")return{mergeDirection:a.getMergeDirection(m)}}}),c=y.useCallback(()=>{a?.mergeCells()},[a]);return s===void 0?null:g.jsx(o.FormattingToolbar.Button,{className:"bn-button",label:t.formatting_toolbar.table_cell_merge.tooltip,mainTooltip:t.formatting_toolbar.table_cell_merge.tooltip,icon:s.mergeDirection==="horizontal"?g.jsx(J7,{}):g.jsx(K7,{}),onClick:c})},oR=()=>be().getExtension(We)?g.jsx(nR,{}):null,lR={left:aE,center:sE,right:rE,justify:iE},vm=t=>{let o=pe(),l=Re(),a=be(),s=St({editor:a,selector:({editor:f})=>{if(!f.isEditable)return;let m=f.getSelection()?.blocks||[f.getTextCursorPosition().block],h=m[0];if(Xt(h,f,h.type,{textAlignment:cc.textAlignment}))return{textAlignment:h.props.textAlignment,blocks:m};if(m.length===1&&Xt(h,f,"table"))return f.getExtension(We)?.getCellSelection()?{textAlignment:pi(h.content.rows[0].cells[0]).props.textAlignment,blocks:[h]}:void 0}}),c=y.useCallback(f=>{if(s!==void 0){a.focus();for(let m of s.blocks)if(Xt(m,a,m.type,{textAlignment:cc.textAlignment})&&Pl(a,m.type,{textAlignment:cc.textAlignment}))a.updateBlock(m,{props:{textAlignment:f}});else if(m.type==="table"){let h=a.getExtension(We)?.getCellSelection();if(!h)continue;let v=m.content.rows.map(b=>({...b,cells:b.cells.map(x=>pi(x))}));h.cells.forEach(({row:b,col:x})=>{v[b].cells[x].props.textAlignment=f}),a.updateBlock(m,{type:"table",content:{...m.content,type:"tableContent",rows:v}}),a.setTextCursorPosition(m)}}},[a,s]);if(s===void 0)return null;let u=lR[t.textAlignment];return g.jsx(o.FormattingToolbar.Button,{className:"bn-button","data-test":`alignText${t.textAlignment.slice(0,1).toUpperCase()+t.textAlignment.slice(1)}`,onClick:()=>c(t.textAlignment),isSelected:s.textAlignment===t.textAlignment,label:l.formatting_toolbar[`align_${t.textAlignment}`].tooltip,mainTooltip:l.formatting_toolbar[`align_${t.textAlignment}`].tooltip,icon:g.jsx(u,{})})},tx=t=>[g.jsx(QE,{items:t},"blockTypeSelect"),g.jsx(oR,{},"tableCellMergeButton"),g.jsx(GE,{},"fileCaptionButton"),g.jsx(IE,{},"replaceFileButton"),g.jsx(qE,{},"fileRenameButton"),g.jsx(ZE,{},"fileDeleteButton"),g.jsx(eR,{},"fileDownloadButton"),g.jsx(tR,{},"filePreviewButton"),g.jsx(oc,{basicTextStyle:"bold"},"boldStyleButton"),g.jsx(oc,{basicTextStyle:"italic"},"italicStyleButton"),g.jsx(oc,{basicTextStyle:"underline"},"underlineStyleButton"),g.jsx(oc,{basicTextStyle:"strike"},"strikeStyleButton"),g.jsx(vm,{textAlignment:"left"},"textAlignLeftButton"),g.jsx(vm,{textAlignment:"center"},"textAlignCenterButton"),g.jsx(vm,{textAlignment:"right"},"textAlignRightButton"),g.jsx($E,{},"colorStyleButton"),g.jsx(YE,{},"nestBlockButton"),g.jsx(FE,{},"unnestBlockButton"),g.jsx(PE,{},"createLinkButton"),g.jsx(JE,{},"addCommentButton"),g.jsx(WE,{},"addTiptapCommentButton")],nx=t=>g.jsx(pe().FormattingToolbar.Root,{className:"bn-toolbar bn-formatting-toolbar",children:t.children||tx(t.blockTypeSelectItems)}),rR=t=>{switch(t){case"left":return"top-start";case"center":return"top";case"right":return"top-end";default:return"top-start"}},ox=t=>{let o=be(),l=Ve(mi,{editor:o}),a=Ke(mi,{editor:o}),s=St({editor:o,selector:({editor:m})=>l.store.state?{from:m.prosemirrorState.selection.from,to:m.prosemirrorState.selection.to}:void 0}),c=St({editor:o,selector:({editor:m})=>{let h=m.getTextCursorPosition().block;return Xt(h,m,h.type,{textAlignment:cc.textAlignment})?rR(h.props.textAlignment):"top-start"}}),u=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:a,onOpenChange:(m,h,v)=>{l.store.setState(m),v==="escape-key"&&o.focus()},placement:c,middleware:[no(10),Ei(),Ri()],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:40},...t.floatingUIOptions?.elementProps}}),[a,c,t.floatingUIOptions,l.store,o]),f=t.formattingToolbar||nx;return g.jsx(xp,{position:s,...u,children:a&&g.jsx(f,{})})},aR=t=>{let o=pe(),l=Re(),{deleteLink:a}=Ve(qc);return g.jsx(o.LinkToolbar.Button,{className:"bn-button",label:l.link_toolbar.delete.tooltip,mainTooltip:l.link_toolbar.delete.tooltip,isSelected:!1,onClick:()=>{a(t.range.from),t.setToolbarOpen?.(!1)},icon:g.jsx(W7,{})})},iR=t=>{let o=pe(),l=Re();return g.jsxs(o.Generic.Popover.Root,{onOpenChange:t.setToolbarPositionFrozen,children:[g.jsx(o.Generic.Popover.Trigger,{children:g.jsx(o.LinkToolbar.Button,{className:"bn-button",mainTooltip:l.link_toolbar.edit.tooltip,isSelected:!1,children:l.link_toolbar.edit.text})}),g.jsx(o.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:g.jsx(ex,{url:t.url,text:t.text,range:t.range,setToolbarOpen:t.setToolbarOpen,setToolbarPositionFrozen:t.setToolbarPositionFrozen})})]})},sR=t=>{let o=pe(),l=Re();return g.jsx(o.LinkToolbar.Button,{className:"bn-button",mainTooltip:l.link_toolbar.open.tooltip,label:l.link_toolbar.open.tooltip,isSelected:!1,onClick:()=>{window.open(Km(t.url,window.location.href),"_blank")},icon:g.jsx(k7,{})})},cR=t=>g.jsx(pe().LinkToolbar.Root,{className:"bn-toolbar bn-link-toolbar",children:t.children||g.jsxs(g.Fragment,{children:[g.jsx(iR,{url:t.url,text:t.text,range:t.range,setToolbarOpen:t.setToolbarOpen,setToolbarPositionFrozen:t.setToolbarPositionFrozen}),g.jsx(sR,{url:t.url}),g.jsx(aR,{range:t.range,setToolbarOpen:t.setToolbarOpen})]})}),uR=t=>{let o=be(),[l,a]=y.useState(!1),[s,c]=y.useState(!1),u=ql(),f=Ve(qc),[m,h]=y.useState(void 0);y.useEffect(()=>{let S=()=>{let M=f.getLinkAtSelection();if(!M){h(void 0),s||a(!1);return}h({cursorType:"text",url:M.mark.attrs.href,text:M.text,range:M.range,element:f.getLinkElementAtPos(M.range.from)}),s||a(!0)},E=M=>{if(m!==void 0&&m.cursorType==="text"||!(M.target instanceof HTMLElement))return;let O=f.getLinkAtElement(M.target);O&&h({cursorType:"mouse",url:O.mark.attrs.href,text:O.text,range:O.range,element:f.getLinkElementAtPos(O.range.from)})},w=o.onChange(S),R=o.onSelectionChange(S);return u?.addEventListener("mouseover",E),()=>{w(),R(),u?.removeEventListener("mouseover",E)}},[o,u,f,m,s]);let v=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:l,onOpenChange:(S,E,w)=>{s||m!==void 0&&m.cursorType==="text"&&w==="hover"||(w==="escape-key"&&o.focus(),a(S))},placement:"top-start",middleware:[no(10),Ri()],...t.floatingUIOptions?.useFloatingOptions},useHoverProps:{enabled:m!==void 0&&m.cursorType==="mouse",delay:{open:250,close:250},handleClose:p7(),...t.floatingUIOptions?.useHoverProps},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:50},...t.floatingUIOptions?.elementProps}}),[o,m,t.floatingUIOptions,l,s]),b=y.useMemo(()=>m?.element?{element:m.element}:void 0,[m?.element]);if(!o.isEditable)return null;let x=t.linkToolbar||cR;return g.jsx(Kn,{reference:b,...v,children:m&&g.jsx(x,{url:m.url,text:m.text,range:m.range,setToolbarOpen:a,setToolbarPositionFrozen:c})})},fR=()=>{let t=pe(),o=Re(),l=be(),a=Ve(Do),s=Ke(zn,{editor:l,selector:u=>u?.block}),c=y.useCallback(()=>{if(s===void 0)return;let u=s.content;if(u!==void 0&&Array.isArray(u)&&u.length===0)l.setTextCursorPosition(s),a.openSuggestionMenu("/");else{let f=l.insertBlocks([{type:"paragraph"}],s,"after")[0];l.setTextCursorPosition(f),a.openSuggestionMenu("/")}},[s,l,a]);return s===void 0?null:g.jsx(t.SideMenu.Button,{className:"bn-button",label:o.side_menu.add_block_label,icon:g.jsx(xE,{size:24,onClick:c,"data-test":"dragHandleAdd"})})},dR=t=>{let o=pe(),l=be(),a=Ke(zn,{editor:l,selector:s=>s?.block});return a===void 0||!Xt(a,l,a.type,{textColor:"string"})&&!Xt(a,l,a.type,{backgroundColor:"string"})?null:g.jsxs(o.Generic.Menu.Root,{position:"right",sub:!0,children:[g.jsx(o.Generic.Menu.Trigger,{sub:!0,children:g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",subTrigger:!0,children:t.children})}),g.jsx(o.Generic.Menu.Dropdown,{sub:!0,className:"bn-menu-dropdown bn-color-picker-dropdown",children:g.jsx(ru,{iconSize:18,text:Xt(a,l,a.type,{textColor:"string"})&&Pl(l,a.type,{textColor:"string"})?{color:a.props.textColor,setColor:s=>l.updateBlock(a,{type:a.type,props:{textColor:s}})}:void 0,background:Xt(a,l,a.type,{backgroundColor:"string"})&&Pl(l,a.type,{backgroundColor:"string"})?{color:a.props.backgroundColor,setColor:s=>l.updateBlock(a,{props:{backgroundColor:s}})}:void 0})})]})},mR=t=>{let o=pe(),l=be(),a=Ke(zn,{editor:l,selector:s=>s?.block});return a===void 0?null:g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",onClick:()=>l.removeBlocks([a]),children:t.children})},pR=t=>{let o=pe(),l=be(),a=Ke(zn,{editor:l,selector:c=>c?.block});if(a===void 0||a.type!=="table"||!l.settings.tables.headers)return null;let s=!!a.content.headerRows;return g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",checked:s,onClick:()=>{l.updateBlock(a,{content:{...a.content,headerRows:s?void 0:1}})},children:t.children})},hR=t=>{let o=pe(),l=be(),a=Ke(zn,{editor:l,selector:c=>c?.block});if(a===void 0||a.type!=="table"||!l.settings.tables.headers)return null;let s=!!a.content.headerCols;return g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",checked:s,onClick:()=>{l.updateBlock(a,{content:{...a.content,headerCols:s?void 0:1}})},children:t.children})},gR=t=>{let o=pe(),l=Re();return g.jsx(o.Generic.Menu.Dropdown,{className:"bn-menu-dropdown bn-drag-handle-menu",children:t.children||g.jsxs(g.Fragment,{children:[g.jsx(mR,{children:l.drag_handle.delete_menuitem}),g.jsx(dR,{children:l.drag_handle.colors_menuitem}),g.jsx(pR,{children:l.drag_handle.header_row_menuitem}),g.jsx(hR,{children:l.drag_handle.header_column_menuitem})]})})},vR=t=>{let o=pe(),l=Re(),a=Ve(zn),s=Ke(zn,{selector:u=>u?.block});if(s===void 0)return null;let c=t.dragHandleMenu||gR;return g.jsxs(o.Generic.Menu.Root,{onOpenChange:u=>{u?a.freezeMenu():a.unfreezeMenu()},position:"left",children:[g.jsx(o.Generic.Menu.Trigger,{children:g.jsx(o.SideMenu.Button,{label:l.side_menu.drag_handle_label,draggable:!0,onDragStart:u=>a.blockDragStart(u,s),onDragEnd:a.blockDragEnd,className:"bn-button",icon:g.jsx(q2,{size:24,"data-test":"dragHandle"})})}),g.jsx(c,{children:t.children})]})},bR=t=>{let o=pe(),l=be(),a=Ke(zn,{editor:l,selector:c=>c?.block}),s=y.useMemo(()=>{if(a===void 0)return{};let c={"data-block-type":a.type};return a.type==="heading"&&(c["data-level"]=a.props.level.toString()),l.schema.blockSpecs[a.type].implementation.meta?.fileBlockAccept&&(a.props.url?c["data-url"]="true":c["data-url"]="false"),c},[a,l.schema.blockSpecs]);return g.jsx(o.SideMenu.Root,{className:"bn-side-menu",...s,children:t.children||g.jsxs(g.Fragment,{children:[g.jsx(fR,{}),g.jsx(vR,{dragHandleMenu:t.dragHandleMenu})]})})},yR=t=>{let o=be(),{show:l,block:a}=Ke(zn,{selector:f=>f===void 0?void 0:{show:f.show,block:f.block}})||{},s=y.useCallback((f,m,h)=>{let v=!1;return vp(f,m,()=>{if(!v){v=!0;return}o.getExtension(zn)?.hideMenuIfNotFrozen()},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[o]),c=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:l,placement:"left-start",whileElementsMounted:s,...t.floatingUIOptions?.useFloatingOptions},useDismissProps:{enabled:!1,...t.floatingUIOptions?.useDismissProps},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:20},...t.floatingUIOptions?.elementProps}}),[t.floatingUIOptions,l,s]),u=t.sideMenu||bR;return g.jsx(J2,{blockId:l?a?.id:void 0,...c,children:a?.id&&g.jsx(u,{})})};async function xR(t,o){return(await nw(t,o)).map(({id:l,onItemClick:a})=>({id:l,onItemClick:a,icon:l}))}function SR(t){let o=pe(),l=Re(),{items:a,loadingState:s,selectedIndex:c,onItemClick:u,columns:f}=t,m=s==="loading-initial"||s==="loading"?g.jsx(o.GridSuggestionMenu.Loader,{className:"bn-grid-suggestion-menu-loader",columns:f}):null,h=y.useMemo(()=>{let v=[];for(let b=0;b<a.length;b++){let x=a[b];v.push(g.jsx(o.GridSuggestionMenu.Item,{className:"bn-grid-suggestion-menu-item",item:x,id:`bn-grid-suggestion-menu-item-${b}`,isSelected:b===c,onClick:()=>u?.(x)},x.id))}return v},[o,a,u,c]);return g.jsxs(o.GridSuggestionMenu.Root,{id:"bn-grid-suggestion-menu",columns:f,className:"bn-grid-suggestion-menu",children:[m,h,h.length===0&&t.loadingState==="loaded"&&g.jsx(o.GridSuggestionMenu.EmptyItem,{className:"bn-grid-suggestion-menu-empty-item",columns:f,children:l.suggestion_menu.no_items_title})]})}function lx(t,o,l,a=3){let s=y.useRef(0);y.useEffect(()=>{o!==void 0&&(t.length>0?s.current=o.length:o.length-s.current>a&&l())},[l,a,t.length,o])}function rx(t,o){let[l,a]=y.useState([]),[s,c]=y.useState(!1),u=y.useRef(void 0),f=y.useRef(void 0);return y.useEffect(()=>{let m=t;u.current=t,c(!0),o(t).then(h=>{u.current===m&&(a(h),c(!1),f.current=m)})},[t,o]),{items:l||[],usedQuery:f.current,loadingState:f.current===void 0?"loading-initial":s?"loading":"loaded"}}function CR(t,o,l,a,s){let c=ql(t),[u,f]=y.useState(0);return y.useEffect(()=>{let m=h=>(h.key==="ArrowLeft"&&(h.preventDefault(),l.length&&f((u-1+l.length)%l.length)),h.key==="ArrowRight"&&(h.preventDefault(),l.length&&f((u+1+l.length)%l.length)),h.key==="ArrowUp"?(h.preventDefault(),l.length&&f((u-a+l.length)%l.length),!0):h.key==="ArrowDown"?(h.preventDefault(),l.length&&f((u+a)%l.length),!0):h.key==="Enter"&&!h.isComposing?(h.stopPropagation(),h.preventDefault(),l.length&&s?.(l[u]),!0):!1);return c?.addEventListener("keydown",m,!0),()=>{c?.removeEventListener("keydown",m,!0)}},[c,l,u,s,a,a!==void 0&&a>1]),y.useEffect(()=>{f(0)},[o]),{selectedIndex:l.length===0?void 0:u}}function wR(t){let o=On().setContentEditableProps,l=be(),{getItems:a,gridSuggestionMenuComponent:s,query:c,clearQuery:u,closeMenu:f,onItemClick:m,columns:h}=t,v=y.useCallback(w=>{f(),u(),m?.(w)},[m,f,u]),{items:b,usedQuery:x,loadingState:S}=rx(c,a);lx(b,x,f);let{selectedIndex:E}=CR(l,c,b,h,v);return y.useEffect(()=>(o(w=>({...w,"aria-expanded":!0,"aria-controls":"bn-suggestion-menu"})),()=>{o(w=>({...w,"aria-expanded":!1,"aria-controls":void 0}))}),[o]),y.useEffect(()=>(o(w=>({...w,"aria-activedescendant":E?"bn-suggestion-menu-item-"+E:void 0})),()=>{o(w=>({...w,"aria-activedescendant":void 0}))}),[o,E]),g.jsx(s,{items:b,onItemClick:v,loadingState:S,selectedIndex:E,columns:h})}function ER(t){let o=be(),l=ql(),{triggerCharacter:a,gridSuggestionMenuComponent:s,columns:c,shouldOpen:u,minQueryLength:f,onItemClick:m,getItems:h}=t,v=y.useMemo(()=>m||(R=>{R.onItemClick(o)}),[o,m]),b=y.useMemo(()=>h||(async R=>await xR(o,R)),[o,h]),x=Ve(Do);y.useEffect(()=>{x.addSuggestionMenu({triggerCharacter:a,shouldOpen:u})},[x,a,u]);let S=Ke(Do),E=Ke(Do,{selector:R=>({element:l?.firstChild||void 0,getBoundingClientRect:()=>R?.referencePos||new DOMRect})}),w=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:S?.show&&S?.triggerCharacter===a,onOpenChange:R=>{R||x.closeMenu()},placement:"bottom-start",middleware:[no(10),h2({allowedPlacements:["bottom-start","top-start"],padding:10}),Ei(),_c({apply({elements:R,availableHeight:M}){R.floating.style.maxHeight=`${Math.max(0,M)}px`},padding:10})],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{onMouseDownCapture:R=>R.preventDefault(),style:{zIndex:70},...t.floatingUIOptions?.elementProps}}),[t.floatingUIOptions,S?.show,S?.triggerCharacter,x,a]);return!S||!S.ignoreQueryLength&&f&&(S.query.startsWith(" ")||S.query.length<f)?null:g.jsx(Kn,{reference:E,...w,children:a&&g.jsx(wR,{query:S.query,closeMenu:x.closeMenu,clearQuery:x.clearQuery,getItems:b,columns:c,gridSuggestionMenuComponent:s||SR,onItemClick:v})})}function RR(t){let o=pe(),l=Re(),{items:a,loadingState:s,selectedIndex:c,onItemClick:u}=t,f=s==="loading-initial"||s==="loading"?g.jsx(o.SuggestionMenu.Loader,{className:"bn-suggestion-menu-loader"}):null,m=y.useMemo(()=>{let h,v=[];for(let b=0;b<a.length;b++){let x=a[b];x.group!==h&&(h=x.group,v.push(g.jsx(o.SuggestionMenu.Label,{className:"bn-suggestion-menu-label",children:h},h))),v.push(g.jsx(o.SuggestionMenu.Item,{className:xt("bn-suggestion-menu-item",x.size==="small"?"bn-suggestion-menu-item-small":""),item:x,id:`bn-suggestion-menu-item-${b}`,isSelected:b===c,onClick:()=>u?.(x)},x.title))}return v},[o,a,u,c]);return g.jsxs(o.SuggestionMenu.Root,{id:"bn-suggestion-menu",className:"bn-suggestion-menu",children:[m,m.length===0&&(t.loadingState==="loading"||t.loadingState==="loaded")&&g.jsx(o.SuggestionMenu.EmptyItem,{className:"bn-suggestion-menu-item",children:l.suggestion_menu.no_items_title}),f]})}function TR(t,o){let[l,a]=y.useState(0);return{selectedIndex:l,setSelectedIndex:a,handler:s=>{if(s.key==="ArrowUp")return s.preventDefault(),t.length&&a((l-1+t.length)%t.length),!0;if(s.key==="ArrowDown")return s.preventDefault(),t.length&&a((l+1)%t.length),!0;if(s.key==="PageUp")return s.preventDefault(),t.length&&a(0),!0;if(s.key==="PageDown")return s.preventDefault(),t.length&&a(t.length-1),!0;let c=MR(s)?s.nativeEvent.isComposing:s.isComposing;return s.key==="Enter"&&!c?(s.preventDefault(),s.stopPropagation(),t.length&&o?.(t[l]),!0):!1}}}function MR(t){return t.nativeEvent!==void 0}function OR(t,o,l,a,s){let c=ql(),{selectedIndex:u,setSelectedIndex:f,handler:m}=TR(l,a);return y.useEffect(()=>{let h=c;return h?.addEventListener("keydown",m,!0),()=>{h?.removeEventListener("keydown",m,!0)}},[c,l,u,a,s,m]),y.useEffect(()=>{f(0)},[o,f]),{selectedIndex:l.length===0?void 0:u}}function AR(t){let o=On().setContentEditableProps,l=be(),{getItems:a,suggestionMenuComponent:s,query:c,clearQuery:u,closeMenu:f,onItemClick:m}=t,h=y.useCallback(E=>{f(),u(),m?.(E)},[m,f,u]),{items:v,usedQuery:b,loadingState:x}=rx(c,a);lx(v,b,f);let{selectedIndex:S}=OR(l,c,v,h);return y.useEffect(()=>(o(E=>({...E,"aria-expanded":!0,"aria-controls":"bn-suggestion-menu"})),()=>{o(E=>({...E,"aria-expanded":!1,"aria-controls":void 0}))}),[o]),y.useEffect(()=>(o(E=>({...E,"aria-activedescendant":S?"bn-suggestion-menu-item-"+S:void 0})),()=>{o(E=>({...E,"aria-activedescendant":void 0}))}),[o,S]),g.jsx(s,{items:v,onItemClick:h,loadingState:x,selectedIndex:S})}var _R={heading:zc,heading_2:Lc,heading_3:Hc,heading_4:z2,heading_5:L2,heading_6:H2,toggle_heading:zc,toggle_heading_2:Lc,toggle_heading_3:Hc,quote:A2,toggle_list:O2,numbered_list:N2,bullet_list:_2,check_list:j2,paragraph:Ep,table:X7,image:I7,video:Y7,audio:G7,file:uE,emoji:H7,code_block:oE,divider:L7};function NR(t){return J4(t).map(o=>{let l=_R[o.key];return{...o,icon:g.jsx(l,{size:18})}})}function jR(t){let o=be(),l=ql(),{triggerCharacter:a,suggestionMenuComponent:s,shouldOpen:c,minQueryLength:u,onItemClick:f,getItems:m}=t,h=y.useMemo(()=>f||(w=>{w.onItemClick(o)}),[o,f]),v=y.useMemo(()=>m||(async w=>K4(NR(o),w)),[o,m]),b=Ve(Do);y.useEffect(()=>{b.addSuggestionMenu({triggerCharacter:a,shouldOpen:c})},[b,a,c]);let x=Ke(Do),S=Ke(Do,{selector:w=>({element:l?.firstChild||void 0,getBoundingClientRect:()=>w?.referencePos||new DOMRect})}),E=y.useMemo(()=>({...t.floatingUIOptions,useFloatingOptions:{open:x?.show&&x?.triggerCharacter===a,onOpenChange:w=>{w||b.closeMenu()},placement:"bottom-start",middleware:[no(10),h2({allowedPlacements:["bottom-start","top-start"],padding:10}),Ei(),_c({apply({elements:w,availableHeight:R}){w.floating.style.maxHeight=`${Math.max(0,R)}px`},padding:10})],...t.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...t.floatingUIOptions?.focusManagerProps},elementProps:{onMouseDownCapture:w=>w.preventDefault(),style:{zIndex:80},...t.floatingUIOptions?.elementProps}}),[t.floatingUIOptions,x?.show,x?.triggerCharacter,b,a]);return!x||!x.ignoreQueryLength&&u&&(x.query.startsWith(" ")||x.query.length<u)?null:g.jsx(Kn,{reference:S,...E,children:a&&g.jsx(AR,{query:x.query,closeMenu:b.closeMenu,clearQuery:b.clearQuery,getItems:v,suggestionMenuComponent:s||RR,onItemClick:h})})}var DR=(t,o=.3)=>{let l=Math.floor(t)+o,a=Math.ceil(t)-o;return t>=l&&t<=a?Math.round(t):t<l?Math.floor(t):Math.ceil(t)},HR=t=>{let o=pe(),l=be(),a=Ve(We),s=Ke(We,{selector:v=>v?.block}),c=y.useRef(!1),[u,f]=y.useState(),m=y.useCallback(v=>{a.freezeHandles(),t.hideOtherElements(!0),s&&(f({originalContent:s.content,originalCroppedContent:{rows:a.cropEmptyRowsOrColumns(s,t.orientation==="addOrRemoveColumns"?"columns":"rows")},startPos:t.orientation==="addOrRemoveColumns"?v.clientX:v.clientY}),c.current=!1,v.preventDefault())},[s,t,a]),h=y.useCallback(()=>{!s||c.current||l.updateBlock(s,{type:"table",content:{...s.content,rows:t.orientation==="addOrRemoveColumns"?a.addRowsOrColumns(s,"columns",1):a.addRowsOrColumns(s,"rows",1)}})},[s,l,t.orientation,a]);return y.useEffect(()=>{let v=b=>{if(!s)return;if(!u)throw Error("editingState is undefined");c.current=!0;let x=(t.orientation==="addOrRemoveColumns"?b.clientX:b.clientY)-u.startPos,S=t.orientation==="addOrRemoveColumns"?u.originalCroppedContent.rows[0]?.cells.length??0:u.originalCroppedContent.rows.length,E=t.orientation==="addOrRemoveColumns"?u.originalContent.rows[0]?.cells.length??0:u.originalContent.rows.length,w=t.orientation==="addOrRemoveColumns"?s.content.rows[0].cells.length:s.content.rows.length,R=E+DR(x/(t.orientation==="addOrRemoveColumns"?ow:lw),.3);R>=S&&R>0&&R!==w&&(l.updateBlock(s,{type:"table",content:{...s.content,rows:t.orientation==="addOrRemoveColumns"?a.addRowsOrColumns({type:"table",content:u.originalCroppedContent},"columns",R-S):a.addRowsOrColumns({type:"table",content:u.originalCroppedContent},"rows",R-S)}}),s.content&&l.setTextCursorPosition(s))};return u&&window.addEventListener("mousemove",v),()=>{window.removeEventListener("mousemove",v)}},[s,u,l,t.orientation,a]),y.useEffect(()=>{let v=()=>{t.hideOtherElements(!1),a.unfreezeHandles(),f(void 0)};return u&&window.addEventListener("mouseup",v),()=>{window.removeEventListener("mouseup",v)}},[u,t,a]),l.isEditable?g.jsx(o.TableHandle.ExtendButton,{className:xt("bn-extend-button",t.orientation==="addOrRemoveColumns"?"bn-extend-button-add-remove-columns":"bn-extend-button-add-remove-rows",u===null?"":"bn-extend-button-editing"),onClick:h,onMouseDown:m,children:t.children||g.jsx(P7,{size:18,"data-test":"extendButton"})}):null},LR=t=>{let o=pe(),l=Re(),a=be(),{block:s,colIndex:c,rowIndex:u}=Ke(We,{selector:h=>({block:h?.block,colIndex:h?.colIndex,rowIndex:h?.rowIndex})}),f=(h,v)=>{if(s===void 0||c===void 0||u===void 0)return;let b=s.content.rows.map(x=>({...x,cells:x.cells.map(S=>pi(S))}));v==="text"?b[u].cells[c].props.textColor=h:b[u].cells[c].props.backgroundColor=h,a.updateBlock(s,{type:"table",content:{...s.content,rows:b}}),a.setTextCursorPosition(s)};if(s===void 0||c===void 0||u===void 0)return null;let m=s.content.rows[u]?.cells?.[c];return!m||a.settings.tables.cellTextColor===!1&&a.settings.tables.cellBackgroundColor===!1?null:g.jsxs(o.Generic.Menu.Root,{position:"right",sub:!0,children:[g.jsx(o.Generic.Menu.Trigger,{sub:!0,children:g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",subTrigger:!0,children:t.children||l.drag_handle.colors_menuitem})}),g.jsx(o.Generic.Menu.Dropdown,{sub:!0,className:"bn-menu-dropdown bn-color-picker-dropdown",children:g.jsx(ru,{iconSize:18,text:a.settings.tables.cellTextColor?{color:hi(m)?m.props.textColor:"default",setColor:h=>f(h,"text")}:void 0,background:a.settings.tables.cellBackgroundColor?{color:hi(m)?m.props.backgroundColor:"default",setColor:h=>f(h,"background")}:void 0})})]})},zR=()=>{let t=pe(),o=Re(),l=be(),a=Ve(We),{block:s,colIndex:c,rowIndex:u}=Ke(We,{selector:m=>({block:m?.block,colIndex:m?.colIndex,rowIndex:m?.rowIndex})});if(s===void 0||c===void 0||u===void 0)return null;let f=s.content.rows[u]?.cells?.[c];return!f||!hi(f)||by(f)===1&&vy(f)===1||!l.settings.tables.splitCells?null:g.jsx(t.Generic.Menu.Item,{onClick:()=>{a.splitCell({row:u,col:c})},children:o.table_handle.split_cell_menuitem})},kR=t=>g.jsx(pe().Generic.Menu.Dropdown,{className:"bn-menu-dropdown bn-table-handle-menu",children:t.children||g.jsxs(g.Fragment,{children:[g.jsx(zR,{}),g.jsx(LR,{})]})}),VR=t=>{let o=pe(),l=be(),a=Ve(We),s=t.tableCellMenu||kR;return!l.settings.tables.splitCells&&!l.settings.tables.cellBackgroundColor&&!l.settings.tables.cellTextColor?null:g.jsxs(o.Generic.Menu.Root,{onOpenChange:c=>{c?(a.freezeHandles(),t.hideOtherElements(!0)):(a.unfreezeHandles(),t.hideOtherElements(!1),l.focus())},position:"right",children:[g.jsx(o.Generic.Menu.Trigger,{children:g.jsx(o.Generic.Menu.Button,{className:"bn-table-cell-handle",children:t.children||g.jsx(SE,{size:12,"data-test":"tableCellHandle"})})}),g.jsx(s,{})]})},kb=t=>{let o=pe(),l=Re(),a=Ve(We),s=Ke(We,{selector:c=>t.orientation==="column"?c?.colIndex:c?.rowIndex});return a===void 0||s===void 0?null:g.jsx(o.Generic.Menu.Item,{onClick:()=>{a.addRowOrColumn(s,t.orientation==="row"?{orientation:"row",side:t.side}:{orientation:"column",side:t.side})},children:l.table_handle[`add_${t.side}_menuitem`]})},BR=t=>{let o=pe(),l=Re(),a=Ve(We),s=Ke(We,{selector:c=>t.orientation==="column"?c?.colIndex:c?.rowIndex});return a===void 0||s===void 0?null:g.jsx(o.Generic.Menu.Item,{onClick:()=>a.removeRowOrColumn(s,t.orientation),children:t.orientation==="row"?l.table_handle.delete_row_menuitem:l.table_handle.delete_column_menuitem})},$R=t=>{let o=pe(),l=Re(),a=be(),s=Ve(We),{block:c,index:u}=Ke(We,{selector:v=>({block:v?.block,index:t.orientation==="column"?v?.colIndex:v?.rowIndex})}),f=y.useMemo(()=>s===void 0||c===void 0||u===void 0?[]:t.orientation==="row"?s.getCellsAtRowHandle(c,u):s.getCellsAtColumnHandle(c,u),[c,u,t.orientation,s]),m=(v,b)=>{if(c===void 0)return;let x=c.content.rows.map(S=>({...S,cells:S.cells.map(E=>pi(E))}));f.forEach(({row:S,col:E})=>{b==="text"?x[S].cells[E].props.textColor=v:x[S].cells[E].props.backgroundColor=v}),a.updateBlock(c,{type:"table",content:{...c.content,rows:x}}),a.setTextCursorPosition(c)};if(!f||!f[0]||!s||a.settings.tables.cellTextColor===!1&&a.settings.tables.cellBackgroundColor===!1)return null;let h=pi(f[0].cell);return g.jsxs(o.Generic.Menu.Root,{position:"right",sub:!0,children:[g.jsx(o.Generic.Menu.Trigger,{sub:!0,children:g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",subTrigger:!0,children:t.children||l.drag_handle.colors_menuitem})}),g.jsx(o.Generic.Menu.Dropdown,{sub:!0,className:"bn-menu-dropdown bn-color-picker-dropdown",children:g.jsx(ru,{iconSize:18,text:a.settings.tables.cellTextColor?{color:f.every(({cell:v})=>hi(v)&&v.props.textColor===h.props.textColor)?h.props.textColor:"default",setColor:v=>{m(v,"text")}}:void 0,background:a.settings.tables.cellBackgroundColor?{color:f.every(({cell:v})=>hi(v)&&v.props.backgroundColor===h.props.backgroundColor)?h.props.backgroundColor:"default",setColor:v=>m(v,"background")}:void 0})})]})},UR=t=>{let o=pe(),l=Re(),a=be(),s=Ve(We),{block:c,index:u}=Ke(We,{selector:m=>({block:m?.block,index:t.orientation==="column"?m?.colIndex:m?.rowIndex})});if(s===void 0||c===void 0||u!==0||t.orientation!=="row"||!a.settings.tables.headers)return null;let f=!!c.content.headerRows;return g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",checked:f,onClick:()=>{a.updateBlock(c,{...c,content:{...c.content,headerRows:f?void 0:1}})},children:l.drag_handle.header_row_menuitem})},PR=t=>{let o=pe(),l=Re(),a=be(),s=Ve(We),c=Ke(We,{selector:m=>m?.block}),u=Ke(We,{selector:m=>t.orientation==="column"?m?.colIndex:m?.rowIndex});if(!s||u!==0||!c||t.orientation!=="column"||!a.settings.tables.headers)return null;let f=!!c.content.headerCols;return g.jsx(o.Generic.Menu.Item,{className:"bn-menu-item",checked:f,onClick:()=>{a.updateBlock(c,{...c,content:{...c.content,headerCols:f?void 0:1}})},children:l.drag_handle.header_column_menuitem})},GR=t=>g.jsx(pe().Generic.Menu.Dropdown,{className:"bn-table-handle-menu",children:t.children||g.jsxs(g.Fragment,{children:[g.jsx(BR,{orientation:t.orientation}),g.jsx(kb,{orientation:t.orientation,side:t.orientation==="row"?"above":"left"}),g.jsx(kb,{orientation:t.orientation,side:t.orientation==="row"?"below":"right"}),g.jsx(UR,{orientation:t.orientation}),g.jsx(PR,{orientation:t.orientation}),g.jsx($R,{orientation:t.orientation})]})}),ZR=t=>{let o=be(),l=pe(),[a,s]=y.useState(!1),c=t.tableHandleMenu||GR,u=Ve(We),f=Ke(We),m=y.useMemo(()=>!u||!f||!f.block||f.block.type!=="table"?!1:t.orientation==="column"?u.getCellsAtColumnHandle(f.block,f.colIndex).every(({cell:h})=>vy(h)===1):u.getCellsAtRowHandle(f.block,f.rowIndex).every(({cell:h})=>by(h)===1),[t.orientation,f,u]);return f?g.jsxs(l.Generic.Menu.Root,{onOpenChange:h=>{h?(u.freezeHandles(),t.hideOtherElements(!0)):(u.unfreezeHandles(),t.hideOtherElements(!1),o.focus())},position:"right",children:[g.jsx(l.Generic.Menu.Trigger,{children:g.jsx(l.TableHandle.Root,{className:xt("bn-table-handle",a?"bn-table-handle-dragging":"",m?"":"bn-table-handle-not-draggable"),draggable:m,onDragStart:h=>{s(!0),t.hideOtherElements(!0),t.orientation==="column"?u.colDragStart(h):u.rowDragStart(h)},onDragEnd:()=>{u.dragEnd(),t.hideOtherElements(!1),s(!1)},style:t.orientation==="column"?{transform:"rotate(0.25turn)"}:void 0,children:t.children||g.jsx(q2,{size:24,"data-test":"tableHandle"})})}),g.jsx(c,{orientation:t.orientation})]}):null},qR=t=>{let o=be(),[l,a]=y.useState(),s=Ke(We),c=y.useMemo(()=>{let b={};if(s===void 0)return{};let x=gy(s.block.id,o.prosemirrorState.doc);if(!x)return{};let S=x.posBeforeNode+1,E=o.prosemirrorView.domAtPos(S+1).node;if(!(E instanceof Element))return{};if(b.tableReference={element:E},s.rowIndex===void 0||s.colIndex===void 0)return b;let w=o.prosemirrorState.doc.resolve(S+1).posAtIndex(s.rowIndex),R=o.prosemirrorState.doc.resolve(w+1).posAtIndex(s.colIndex),M=o.prosemirrorView.domAtPos(R+1).node;return M instanceof Element?(b.cellReference={element:M},b.rowReference={element:E,getBoundingClientRect:()=>{let O=E.getBoundingClientRect(),A=M.getBoundingClientRect();return new DOMRect(O.x,s.draggingState&&s.draggingState.draggedCellOrientation==="row"?s.draggingState.mousePos-A.height/2:A.y,O.width,A.height)}},b.columnReference={element:E,getBoundingClientRect:()=>{let O=E.getBoundingClientRect(),A=M.getBoundingClientRect();return new DOMRect(s.draggingState&&s.draggingState.draggedCellOrientation==="col"?s.draggingState.mousePos-A.width/2:A.x,O.y,A.width,O.height)}},b):{}},[o,s]),u=y.useCallback((b,x,S)=>{let E=!1;return vp(b,x,()=>{if(!E){E=!0;return}o.getExtension(We)?.hideHandlesIfNotFrozen()},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[o]),f=y.useMemo(()=>s===void 0?void 0:{rowTableHandle:{useFloatingOptions:{open:s.show&&s.rowIndex!==void 0&&(!l||l==="rowTableHandle"),placement:"left",middleware:[no(-10)],whileElementsMounted:u},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},columnTableHandle:{useFloatingOptions:{open:s.show&&s.colIndex!==void 0&&(!l||l==="columnTableHandle"),placement:"top",middleware:[no(-12)],whileElementsMounted:u},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},tableCellHandle:{useFloatingOptions:{open:s.show&&s.rowIndex!==void 0&&s.colIndex!==void 0&&(!l||l==="tableCellHandle"),placement:"top-end",middleware:[no({mainAxis:-15,crossAxis:-1})],whileElementsMounted:u},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},extendRowsButton:{useFloatingOptions:{open:s.show&&s.showAddOrRemoveRowsButton&&(!l||l==="extendRowsButton"),placement:"bottom",whileElementsMounted:u,middleware:[_c({apply({rects:b,elements:x}){Object.assign(x.floating.style,{width:`${b.reference.width}px`})}})]},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},extendColumnsButton:{useFloatingOptions:{open:s.show&&s.showAddOrRemoveColumnsButton&&(!l||l==="extendColumnsButton"),placement:"right",whileElementsMounted:u,middleware:[_c({apply({rects:b,elements:x}){Object.assign(x.floating.style,{height:`${b.reference.height}px`})}})]},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}}},[l,s,u]);if(!s)return null;let m=t.tableHandle||ZR,h=t.extendButton||HR,v=t.tableCellHandle||VR;return g.jsxs(g.Fragment,{children:[g.jsx(Kn,{reference:c?.rowReference,...f?.rowTableHandle,children:s.show&&s.rowIndex!==void 0&&(!l||l==="rowTableHandle")&&g.jsx(m,{orientation:"row",hideOtherElements:b=>a(b?"rowTableHandle":void 0)})}),g.jsx(Kn,{reference:c?.columnReference,...f?.columnTableHandle,children:s.show&&s.colIndex!==void 0&&(!l||l==="columnTableHandle")&&g.jsx(m,{orientation:"column",hideOtherElements:b=>a(b?"columnTableHandle":void 0)})}),g.jsx(Kn,{reference:c?.cellReference,...f?.tableCellHandle,children:s.show&&s.rowIndex!==void 0&&s.colIndex!==void 0&&(!l||l==="tableCellHandle")&&g.jsx(v,{hideOtherElements:b=>a(b?"tableCellHandle":void 0)})}),g.jsx(Kn,{reference:c?.tableReference,...f?.extendRowsButton,children:s.show&&s.showAddOrRemoveRowsButton&&(!l||l==="extendRowsButton")&&g.jsx(h,{orientation:"addOrRemoveRows",hideOtherElements:b=>a(b?"extendRowsButton":void 0)})}),g.jsx(Kn,{reference:c?.tableReference,...f?.extendColumnsButton,children:s.show&&s.showAddOrRemoveColumnsButton&&(!l||l==="extendColumnsButton")&&g.jsx(h,{orientation:"addOrRemoveColumns",hideOtherElements:b=>a(b?"extendColumnsButton":void 0)})})]})},IR=y.lazy(()=>gc(()=>Promise.resolve().then(()=>yE),void 0).then(t=>t.n)),YR=y.lazy(()=>gc(()=>Promise.resolve().then(()=>vE),void 0).then(t=>t.n));function FR(t){let o=be();if(!o)throw Error("BlockNoteDefaultUI must be used within a BlockNoteContext.Provider");return g.jsxs(g.Fragment,{children:[o.getExtension(mi)&&t.formattingToolbar!==!1&&g.jsx(ox,{}),o.getExtension(qc)&&t.linkToolbar!==!1&&g.jsx(uR,{}),o.getExtension(Do)&&t.slashMenu!==!1&&g.jsx(jR,{triggerCharacter:"/",shouldOpen:l=>!l.selection.$from.parent.type.isInGroup("tableContent")}),o.getExtension(Do)&&t.emojiPicker!==!1&&g.jsx(ER,{triggerCharacter:":",columns:10,minQueryLength:2}),o.getExtension(zn)&&t.sideMenu!==!1&&g.jsx(yR,{}),o.getExtension(km)&&t.filePanel!==!1&&g.jsx(kE,{}),o.getExtension(We)&&t.tableHandles!==!1&&g.jsx(qR,{}),o.getExtension(Mn)&&t.comments!==!1&&g.jsxs(y.Suspense,{children:[g.jsx(IR,{}),g.jsx(YR,{})]})]})}function XR(t,o){let l=On();o||=l?.editor,y.useEffect(()=>{if(!o)throw Error("'editor' is required, either from BlockNoteContext or as a function argument");return o.onChange(t)},[t,o])}function QR(t,o,l){let a=On();o||=a?.editor,y.useEffect(()=>{if(!o)throw Error("'editor' is required, either from BlockNoteContext or as a function argument");return o.onSelectionChange(t,l)},[t,o,l])}var ax=()=>{let t=y.useMemo(()=>window.matchMedia?.("(prefers-color-scheme: dark)"),[]),o=y.useMemo(()=>window.matchMedia?.("(prefers-color-scheme: light)"),[]),l=t?.matches,a=o?.matches,[s,c]=y.useState(l?"dark":a?"light":"no-preference");return y.useEffect(()=>{c(l?"dark":a?"light":"no-preference")},[l,a]),y.useEffect(()=>{if(typeof t?.addEventListener=="function"){let u=({matches:m})=>m&&c("dark"),f=({matches:m})=>m&&c("light");return t?.addEventListener("change",u),o?.addEventListener("change",f),()=>{t?.removeEventListener("change",u),o?.removeEventListener("change",f)}}else{let u=()=>c(t.matches?"dark":o.matches?"light":"no-preference");return t?.addEventListener("change",u),o?.addEventListener("change",u),()=>{t?.removeEventListener("change",u),o?.removeEventListener("change",u)}}},[t,o]),s},ix=y.createContext(void 0);function KR(){return y.useContext(ix)}function JR(){let t=new Set,o={};return{subscribe(l){return t.add(l),()=>{t.delete(l)}},getSnapshot(){return o},getServerSnapshot(){return o},setRenderer(l,a){o={...o,[l]:kn.createPortal(a.reactElement,a.element,l)},t.forEach(s=>s())},removeRenderer(l){let a={...o};delete a[l],o=a,t.forEach(s=>s())}}}var WR=({contentComponent:t})=>{let o=y.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return g.jsx(g.Fragment,{children:Object.values(o)})},e9=y.forwardRef((t,o)=>{let[l,a]=y.useState();return y.useImperativeHandle(o,()=>(s,c)=>{kn.flushSync(()=>{a({node:s,container:c})}),a(void 0)},[]),g.jsx(g.Fragment,{children:l&&kn.createPortal(l.node,l.container)})}),Vb=()=>{};function t9(t,o){let{editor:l,className:a,theme:s,children:c,editable:u,onSelectionChange:f,onChange:m,formattingToolbar:h,linkToolbar:v,slashMenu:b,emojiPicker:x,sideMenu:S,filePanel:E,tableHandles:w,comments:R,autoFocus:M,renderEditor:O=!0,...A}=t,[N,H]=y.useState(),V=On(),$=ax(),F=V?.colorSchemePreference||$,Q=s||(F==="dark"?"dark":"light"),Z=pe(),ee=y.useMemo(()=>({formattingToolbar:Z?h:!1,linkToolbar:Z?v:!1,sideMenu:Z?S:!1,slashMenu:Z?b:!1,filePanel:Z?E:!1,tableHandles:Z?w:!1,emojiPicker:Z?x:!1,comments:Z?R:!1}),[R,Z,x,E,h,v,S,b,w]);XR(m||Vb,l),QR(f||Vb,l);let re=y.useCallback(I=>{l.elementRenderer=I},[l]);y.useEffect(()=>{if(!l.portalElement)throw Error("Portal element not found");l.portalElement.className=xt("bn-root",Q,a||""),l.portalElement.setAttribute("data-color-scheme",Q)},[l,Q,a]);let ne=y.useMemo(()=>({...V,editor:l,setContentEditableProps:H,colorSchemePreference:Q}),[V,l,Q]),j=y.useMemo(()=>({editorProps:{autoFocus:M,contentEditableProps:N,editable:u},defaultUIProps:ee}),[M,N,u,ee]);return g.jsx(w2.Provider,{value:ne,children:g.jsxs(ix.Provider,{value:j,children:[g.jsx(e9,{ref:re}),g.jsx(n9,{className:a,renderEditor:O,editorColorScheme:Q,ref:o,...A,children:c})]})})}var n9=dt.forwardRef(({className:t,renderEditor:o,editorColorScheme:l,children:a,...s},c)=>g.jsx("div",{className:xt("bn-root","bn-container",l,t),"data-color-scheme":l,...s,ref:c,children:o?g.jsx(l9,{children:a}):a})),o9=dt.forwardRef(t9),l9=t=>{let o=KR(),l=be(),a=y.useMemo(()=>JR(),[]),s=y.useCallback(c=>{l.isEditable=o.editorProps.editable!==!1,l._tiptapEditor.contentComponent=a,c?l.mount(c):l.unmount()},[o.editorProps.editable,l,a]);return g.jsxs(g.Fragment,{children:[g.jsx(WR,{contentComponent:a}),g.jsx(r9,{...o.editorProps,...t,mount:s}),g.jsx(FR,{...o.defaultUIProps}),t.children]})},r9=t=>{let{autoFocus:o,mount:l,contentEditableProps:a}=t;return g.jsx("div",{"aria-autocomplete":"list","aria-haspopup":"listbox","data-bn-autofocus":o,ref:l,...a})};function di(t,o){let l,a=document.createElement("div"),s;if(o?.elementRenderer)o.elementRenderer(t(m=>l=m||void 0),a);else{if(!o?.headless)throw Error("elementRenderer not available, expected headless editor");s=Sy.createRoot(a),kn.flushSync(()=>{s.render(t(m=>l=m||void 0))})}if(!a.childElementCount)return console.warn("ReactInlineContentSpec: renderHTML() failed"),{dom:document.createElement("span")};l?.setAttribute("data-tmp-find","true");let c=a.cloneNode(!0),u=c.firstElementChild,f=c.querySelector("[data-tmp-find]");return f?.removeAttribute("data-tmp-find"),s?.unmount(),{dom:u,contentDOM:f||void 0}}function bm(t){return g.jsx(F2,{onDragOver:o=>o.preventDefault(),...Object.fromEntries(Object.entries(t.domAttributes||{}).filter(([o])=>o!=="class")),className:xt("bn-block-content",t.domAttributes?.class||""),"data-content-type":t.blockType,...Object.fromEntries(Object.entries(t.blockProps).filter(([o,l])=>l!==t.propSchema[o].default).map(([o,l])=>[yy(o),l])),"data-file-block":t.isFileBlock===!0||void 0,children:t.children})}function yA(t,o,l){return(a={})=>{let s=typeof t=="function"?t(a):t,c=typeof o=="function"?o(a):o,u=l?typeof l=="function"?l(a):l:void 0;return{config:s,implementation:{...c,toExternalHTML(f,m,h){let v=c.toExternalHTML||c.render;return di(b=>g.jsx(bm,{blockType:f.type,blockProps:f.props,propSchema:s.propSchema,domAttributes:this.blockContentDOMAttributes,isFileBlock:c.meta?.fileBlockAccept!==void 0,children:g.jsx(v,{block:f,editor:m,contentRef:x=>{b(x),x&&(x.className=xt("bn-inline-content",x.className))},context:h})}),m)},render(f,m){if(this.renderType==="nodeView")return X2(h=>{let v=rw(h.getPos,m,h.editor,s.type),b=Tp().nodeViewContentRef;if(!b)throw Error("nodeViewContentRef is not set");let x=c.render;return g.jsx(bm,{blockType:v.type,blockProps:v.props,propSchema:s.propSchema,isFileBlock:!!c.meta?.fileBlockAccept,domAttributes:this.blockContentDOMAttributes,children:g.jsx(x,{block:v,editor:m,contentRef:S=>{b(S),S&&(S.className=xt("bn-inline-content",S.className),S.dataset.nodeViewContent="")}})})},{className:"bn-react-node-view-renderer"})(this.props);{let h=c.render;return di(v=>g.jsx(bm,{blockType:f.type,blockProps:f.props,propSchema:s.propSchema,domAttributes:this.blockContentDOMAttributes,children:g.jsx(h,{block:f,editor:m,contentRef:b=>{v(b),b&&(b.className=xt("bn-inline-content",b.className))}})}),m)}}},extensions:u}}}dt.memo(({thread:t,selectedThreadId:o,maxCommentsBeforeCollapse:l,referenceText:a})=>{let s=Ve(Mn),c=y.useCallback(f=>{f.target.closest(".bn-action-toolbar")||s.selectThread(t.id)},[s,t.id]),u=y.useCallback(f=>{if(!f.relatedTarget||f.relatedTarget.closest(".bn-action-toolbar"))return;let m=f.target instanceof Node?f.target:null,h=f.relatedTarget instanceof Node?f.relatedTarget.closest(".bn-thread"):null;(!m||!h||!h.contains(m))&&s.selectThread(void 0)},[s]);return g.jsx(Rp,{thread:t,selected:t.id===o,referenceText:a,maxCommentsBeforeCollapse:l,onFocus:c,onBlur:u,tabIndex:0})});function ym(t){return g.jsx(F2,{as:"span",className:"bn-inline-content-section","data-inline-content-type":t.inlineContentType,...Object.fromEntries(Object.entries(t.inlineContentProps).filter(([o,l])=>l!==t.propSchema[o].default).map(([o,l])=>[yy(o),l])),children:t.children})}function xA(t,o){let l=aw.create({name:t.type,inline:!0,group:"inline",selectable:t.content==="styled",atom:t.content==="none",draggable:o.meta?.draggable,content:t.content==="styled"?"inline*":"",addAttributes(){return fw(t.propSchema)},addKeyboardShortcuts(){return uw(t)},parseHTML(){return cw(t,o.parse)},renderHTML({node:a}){let s=this.options.editor,c=h0(a,s.schema.inlineContentSchema,s.schema.styleSchema),u=o.toExternalHTML||o.render;return sw(di(f=>g.jsx(u,{contentRef:m=>{f(m),m&&(m.dataset.editable="")},inlineContent:c,updateInlineContent:()=>{},editor:s}),s),t.type,a.attrs,t.propSchema)},addNodeView(){let a=this.options.editor;return s=>X2(c=>{let u=Tp().nodeViewContentRef;if(!u)throw Error("nodeViewContentRef is not set");let f=o.render;return g.jsx(ym,{inlineContentProps:c.node.attrs,inlineContentType:t.type,propSchema:t.propSchema,children:g.jsx(f,{contentRef:m=>{u(m),m&&(m.dataset.editable="")},editor:a,inlineContent:h0(c.node,a.schema.inlineContentSchema,a.schema.styleSchema),updateInlineContent:m=>{let h=iw([m],a.pmSchema),v=c.getPos();v!==void 0&&a.transact(b=>b.replaceWith(v,v+c.node.nodeSize,h))}})})},{className:"bn-ic-react-node-view-renderer",as:"span"})(s)}});return dw(t,{...o,node:l,render(a,s,c){let u=o.render;return di(f=>g.jsx(ym,{inlineContentProps:a.props,inlineContentType:t.type,propSchema:t.propSchema,children:g.jsx(u,{contentRef:m=>{f(m),m&&(m.dataset.editable="")},editor:c,inlineContent:a,updateInlineContent:s})}),c)},toExternalHTML(a,s){let c=o.toExternalHTML||o.render;return di(u=>g.jsx(ym,{inlineContentProps:a.props,inlineContentType:t.type,propSchema:t.propSchema,children:g.jsx(c,{contentRef:f=>{u(f),f&&(f.dataset.editable="")},editor:s,inlineContent:a,updateInlineContent:()=>{}})}),s)}})}function sx(t,o){let l=t.getBoundingClientRect(),a=o.getBoundingClientRect(),s=l.top<a.top,c=l.bottom>a.bottom;return s&&c?"both":s?"top":c?"bottom":"none"}function a9(t){return o=>{t.forEach(l=>{typeof l=="function"?l(o):l!=null&&(l.current=o)})}}function oo(t){return Object.keys(t)}function xm(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Op(t,o){const l={...t},a=o;return xm(t)&&xm(o)&&Object.keys(o).forEach(s=>{xm(a[s])&&s in t?l[s]=Op(l[s],a[s]):l[s]=a[s]}),l}function i9(t){return t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}function s9(t){return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:t.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function c9(t){const o=s9(t);return typeof o=="number"?o:typeof o=="string"?o.includes("calc")||o.includes("var")?o:o.includes("px")?Number(o.replace("px","")):o.includes("rem")?Number(o.replace("rem",""))*16:o.includes("em")?Number(o.replace("em",""))*16:Number(o):NaN}function Bb(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function cx(t,{shouldScale:o=!1}={}){function l(a){if(a===0||a==="0")return`0${t}`;if(typeof a=="number"){const s=`${a/16}${t}`;return o?Bb(s):s}if(typeof a=="string"){if(a===""||a.startsWith("calc(")||a.startsWith("clamp(")||a.includes("rgba("))return a;if(a.includes(","))return a.split(",").map(c=>l(c)).join(",");if(a.includes(" "))return a.split(" ").map(c=>l(c)).join(" ");const s=a.replace("px","");if(!Number.isNaN(Number(s))){const c=`${Number(s)/16}${t}`;return o?Bb(c):c}}return a}return l}const le=cx("rem",{shouldScale:!0}),$b=cx("em");function au(t){return Object.keys(t).reduce((o,l)=>(t[l]!==void 0&&(o[l]=t[l]),o),{})}function ux(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const o=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(a=>o.test(a))}return!1}function fx(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==y.Fragment:!1}function iu(t){const o=y.createContext(null);return[({children:s,value:c})=>g.jsx(o.Provider,{value:c,children:s}),()=>{const s=y.useContext(o);if(s===null)throw new Error(t);return s}]}function su(t=null){const o=y.createContext(t);return[({children:s,value:c})=>g.jsx(o.Provider,{value:c,children:s}),()=>y.useContext(o)]}function Ub(t,o){return l=>{if(typeof l!="string"||l.trim().length===0)throw new Error(o);return`${t}-${l}`}}function kc(t,o){let l=t;for(;(l=l.parentElement)&&!l.matches(o););return l}function u9(t,o,l){for(let a=t-1;a>=0;a-=1)if(!o[a].disabled)return a;if(l){for(let a=o.length-1;a>-1;a-=1)if(!o[a].disabled)return a}return t}function f9(t,o,l){for(let a=t+1;a<o.length;a+=1)if(!o[a].disabled)return a;if(l){for(let a=0;a<o.length;a+=1)if(!o[a].disabled)return a}return t}function d9(t,o,l){return kc(t,l)===kc(o,l)}function Ap({parentSelector:t,siblingSelector:o,onKeyDown:l,loop:a=!0,activateOnFocus:s=!1,dir:c="rtl",orientation:u}){return f=>{l?.(f);const m=Array.from(kc(f.currentTarget,t)?.querySelectorAll(o)||[]).filter(E=>d9(f.currentTarget,E,t)),h=m.findIndex(E=>f.currentTarget===E),v=f9(h,m,a),b=u9(h,m,a),x=c==="rtl"?b:v,S=c==="rtl"?v:b;switch(f.key){case"ArrowRight":{u==="horizontal"&&(f.stopPropagation(),f.preventDefault(),m[x].focus(),s&&m[x].click());break}case"ArrowLeft":{u==="horizontal"&&(f.stopPropagation(),f.preventDefault(),m[S].focus(),s&&m[S].click());break}case"ArrowUp":{u==="vertical"&&(f.stopPropagation(),f.preventDefault(),m[b].focus(),s&&m[b].click());break}case"ArrowDown":{u==="vertical"&&(f.stopPropagation(),f.preventDefault(),m[v].focus(),s&&m[v].click());break}case"Home":{f.stopPropagation(),f.preventDefault(),!m[0].disabled&&m[0].focus();break}case"End":{f.stopPropagation(),f.preventDefault();const E=m.length-1;!m[E].disabled&&m[E].focus();break}}}}const m9={app:100,modal:200,popover:300,overlay:400,max:9999};function Ti(t){return m9[t]}const p9=()=>{};function h9(t,o={active:!0}){return typeof t!="function"||!o.active?o.onKeyDown||p9:l=>{l.key==="Escape"&&(t(l),o.onTrigger?.())}}function Je(t,o="size",l=!0){if(t!==void 0)return ux(t)?l?le(t):t:`var(--${o}-${t})`}function Mi(t){return Je(t,"mantine-spacing")}function Dt(t){return t===void 0?"var(--mantine-radius-default)":Je(t,"mantine-radius")}function Kt(t){return Je(t,"mantine-font-size")}function g9(t){return Je(t,"mantine-line-height",!1)}function dx(t){if(t)return Je(t,"mantine-shadow",!1)}function Qt(t,o){return l=>{t?.(l),o?.(l)}}function v9(t,o,l){return l?Array.from(kc(l,o)?.querySelectorAll(t)||[]).findIndex(a=>a===l):null}function b9(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function Pb(t){const o=y.useRef(t);return y.useEffect(()=>{o.current=t}),y.useMemo(()=>((...l)=>o.current?.(...l)),[])}const y9=["mousedown","touchstart"];function x9(t,o,l){const a=y.useRef(null),s=o||y9;return y.useEffect(()=>{const c=u=>{const{target:f}=u??{};if(Array.isArray(l)){const m=!document.body.contains(f)&&f?.tagName!=="HTML";l.every(v=>!!v&&!u.composedPath().includes(v))&&!m&&t(u)}else a.current&&!a.current.contains(f)&&t(u)};return s.forEach(u=>document.addEventListener(u,c)),()=>{s.forEach(u=>document.removeEventListener(u,c))}},[a,t,l]),a}function S9(t,o){try{return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}catch{return t.addListener(o),()=>t.removeListener(o)}}function C9(t,o){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function w9(t,o,{getInitialValueInEffect:l}={getInitialValueInEffect:!0}){const[a,s]=y.useState(l?o:C9(t));return y.useEffect(()=>{try{const c=window.matchMedia(t);return s(c.matches),S9(c,u=>s(u.matches))}catch{return}},[t]),a||!1}const Oi=typeof document<"u"?y.useLayoutEffect:y.useEffect;function vi(t,o){const l=y.useRef(!1);y.useEffect(()=>()=>{l.current=!1},[]),y.useEffect(()=>{if(l.current)return t();l.current=!0},o)}function E9({opened:t,shouldReturnFocus:o=!0}){const l=y.useRef(null),a=()=>{l.current&&"focus"in l.current&&typeof l.current.focus=="function"&&l.current?.focus({preventScroll:!0})};return vi(()=>{let s=-1;const c=u=>{u.key==="Tab"&&window.clearTimeout(s)};return document.addEventListener("keydown",c),t?l.current=document.activeElement:o&&(s=window.setTimeout(a,10)),()=>{window.clearTimeout(s),document.removeEventListener("keydown",c)}},[t,o]),a}const R9=/input|select|textarea|button|object/,mx="a, input, select, textarea, button, object, [tabindex]";function T9(t){return t.style.display==="none"}function M9(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let l=t;for(;l&&!(l===document.body||l.nodeType===11);){if(T9(l))return!1;l=l.parentNode}return!0}function px(t){let o=t.getAttribute("tabindex");return o===null&&(o=void 0),parseInt(o,10)}function Jm(t){const o=t.nodeName.toLowerCase(),l=!Number.isNaN(px(t));return(R9.test(o)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||l)&&M9(t)}function hx(t){const o=px(t);return(Number.isNaN(o)||o>=0)&&Jm(t)}function O9(t){return Array.from(t.querySelectorAll(mx)).filter(hx)}function A9(t,o){const l=O9(t);if(!l.length){o.preventDefault();return}const a=l[o.shiftKey?0:l.length-1],s=t.getRootNode();let c=a===s.activeElement||t===s.activeElement;const u=s.activeElement;if(u.tagName==="INPUT"&&u.getAttribute("type")==="radio"&&(c=l.filter(v=>v.getAttribute("type")==="radio"&&v.getAttribute("name")===u.getAttribute("name")).includes(a)),!c)return;o.preventDefault();const m=l[o.shiftKey?l.length-1:0];m&&m.focus()}function gx(t=!0){const o=y.useRef(null),l=s=>{let c=s.querySelector("[data-autofocus]");if(!c){const u=Array.from(s.querySelectorAll(mx));c=u.find(hx)||u.find(Jm)||null,!c&&Jm(s)&&(c=s)}c&&c.focus({preventScroll:!0})},a=y.useCallback(s=>{t&&s!==null&&o.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&l(s)}),o.current=s):o.current=null)},[t]);return y.useEffect(()=>{if(!t)return;o.current&&setTimeout(()=>l(o.current));const s=c=>{c.key==="Tab"&&o.current&&A9(o.current,c)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),a}const _9=dt.useId||(()=>{});function N9(){const t=_9();return t?`mantine-${t.replace(/:/g,"")}`:""}function la(t){const o=N9(),[l,a]=y.useState(o);return Oi(()=>{a(b9())},[]),typeof t=="string"?t:typeof window>"u"?o:l}function Vc(t,o){if(typeof t=="function")return t(o);typeof t=="object"&&t!==null&&"current"in t&&(t.current=o)}function cu(...t){const o=new Map;return l=>{if(t.forEach(a=>{const s=Vc(a,l);s&&o.set(a,s)}),o.size>0)return()=>{t.forEach(a=>{const s=o.get(a);s&&typeof s=="function"?s():Vc(a,null)}),o.clear()}}}function Un(...t){return y.useCallback(cu(...t),t)}function ra({value:t,defaultValue:o,finalValue:l,onChange:a=()=>{}}){const[s,c]=y.useState(o!==void 0?o:l),u=(f,...m)=>{c(f),a?.(f,...m)};return t!==void 0?[t,a,!0]:[s,u,!1]}function j9(t,o){return w9("(prefers-reduced-motion: reduce)",t,o)}function D9(){const[t,o]=y.useState(!1),l=y.useRef(null),a=y.useCallback(()=>{o(!0)},[]),s=y.useCallback(()=>{o(!1)},[]);return{ref:y.useCallback(u=>{l.current&&(l.current.removeEventListener("mouseenter",a),l.current.removeEventListener("mouseleave",s)),u&&(u.addEventListener("mouseenter",a),u.addEventListener("mouseleave",s)),l.current=u},[a,s]),hovered:t}}function H9(t=!1,o={}){const[l,a]=y.useState(t),s=y.useCallback(()=>{a(f=>f||(o.onOpen?.(),!0))},[o.onOpen]),c=y.useCallback(()=>{a(f=>f&&(o.onClose?.(),!1))},[o.onClose]),u=y.useCallback(()=>{l?c():s()},[c,s,l]);return[l,{open:s,close:c,toggle:u}]}function L9(t){return t.currentTarget instanceof HTMLElement&&t.relatedTarget instanceof HTMLElement?t.currentTarget.contains(t.relatedTarget):!1}function z9({onBlur:t,onFocus:o}={}){const[l,a]=y.useState(!1),s=y.useRef(!1),c=y.useRef(null),u=Pb(o),f=Pb(t),m=y.useCallback(x=>{a(x),s.current=x},[]),h=y.useCallback(x=>{s.current||(m(!0),u(x))},[]),v=y.useCallback(x=>{s.current&&!L9(x)&&(m(!1),f(x))},[]),b=y.useCallback(x=>{x&&(c.current&&(c.current.removeEventListener("focusin",h),c.current.removeEventListener("focusout",v)),x.addEventListener("focusin",h),x.addEventListener("focusout",v),c.current=x)},[h,v]);return y.useEffect(()=>()=>{c.current&&(c.current.removeEventListener("focusin",h),c.current.removeEventListener("focusout",v))},[]),{ref:b,focused:l}}function _p(t){const o=dt.version;return typeof dt.version!="string"||o.startsWith("18.")?t?.ref:t?.props?.ref}function Ai(t){const o=y.Children.toArray(t);return o.length!==1||!fx(o[0])?null:o[0]}const k9={};function V9(t){const o={};return t.forEach(l=>{Object.entries(l).forEach(([a,s])=>{o[a]?o[a]=Vo(o[a],s):o[a]=s})}),o}function uu({theme:t,classNames:o,props:l,stylesCtx:a}){const c=(Array.isArray(o)?o:[o]).map(u=>typeof u=="function"?u(t,l,a):u||k9);return V9(c)}function Bc({theme:t,styles:o,props:l,stylesCtx:a}){return(Array.isArray(o)?o:[o]).reduce((c,u)=>typeof u=="function"?{...c,...u(t,l,a)}:{...c,...u},{})}const Np=y.createContext(null);function vl(){const t=y.useContext(Np);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function B9(){return vl().cssVariablesResolver}function $9(){return vl().classNamesPrefix}function jp(){return vl().getStyleNonce}function U9(){return vl().withStaticClasses}function P9(){return vl().headless}function G9(){return vl().stylesTransform?.sx}function Z9(){return vl().stylesTransform?.styles}function fu(){return vl().env||"default"}function q9(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function I9(t){let o=t.replace("#","");if(o.length===3){const u=o.split("");o=[u[0],u[0],u[1],u[1],u[2],u[2]].join("")}if(o.length===8){const u=parseInt(o.slice(6,8),16)/255;return{r:parseInt(o.slice(0,2),16),g:parseInt(o.slice(2,4),16),b:parseInt(o.slice(4,6),16),a:u}}const l=parseInt(o,16),a=l>>16&255,s=l>>8&255,c=l&255;return{r:a,g:s,b:c,a:1}}function Y9(t){const[o,l,a,s]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:o,g:l,b:a,a:s===void 0?1:s}}function F9(t){const o=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,l=t.match(o);if(!l)return{r:0,g:0,b:0,a:1};const a=parseInt(l[1],10),s=parseInt(l[2],10)/100,c=parseInt(l[3],10)/100,u=l[5]?parseFloat(l[5]):void 0,f=(1-Math.abs(2*c-1))*s,m=a/60,h=f*(1-Math.abs(m%2-1)),v=c-f/2;let b,x,S;return m>=0&&m<1?(b=f,x=h,S=0):m>=1&&m<2?(b=h,x=f,S=0):m>=2&&m<3?(b=0,x=f,S=h):m>=3&&m<4?(b=0,x=h,S=f):m>=4&&m<5?(b=h,x=0,S=f):(b=f,x=0,S=h),{r:Math.round((b+v)*255),g:Math.round((x+v)*255),b:Math.round((S+v)*255),a:u||1}}function Dp(t){return q9(t)?I9(t):t.startsWith("rgb")?Y9(t):t.startsWith("hsl")?F9(t):{r:0,g:0,b:0,a:1}}function rc(t,o){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${o*100}%)`;const{r:l,g:a,b:s,a:c}=Dp(t),u=1-o,f=m=>Math.round(m*u);return`rgba(${f(l)}, ${f(a)}, ${f(s)}, ${c})`}function bi(t,o){return typeof t.primaryShade=="number"?t.primaryShade:o==="dark"?t.primaryShade.dark:t.primaryShade.light}function Sm(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function X9(t){const o=t.match(/oklch\((.*?)%\s/);return o?parseFloat(o[1]):null}function Q9(t){if(t.startsWith("oklch("))return(X9(t)||0)/100;const{r:o,g:l,b:a}=Dp(t),s=o/255,c=l/255,u=a/255,f=Sm(s),m=Sm(c),h=Sm(u);return .2126*f+.7152*m+.0722*h}function si(t,o=.179){return t.startsWith("var(")?!1:Q9(t)>o}function Il({color:t,theme:o,colorScheme:l}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:l==="dark"?o.white:o.black,shade:void 0,isThemeColor:!1,isLight:si(l==="dark"?o.white:o.black,o.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:l==="dark"?o.colors.dark[2]:o.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:si(l==="dark"?o.colors.dark[2]:o.colors.gray[6],o.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?o.white:o.black,shade:void 0,isThemeColor:!1,isLight:si(t==="white"?o.white:o.black,o.luminanceThreshold),variable:`--mantine-color-${t}`};const[a,s]=t.split("."),c=s?Number(s):void 0,u=a in o.colors;if(u){const f=c!==void 0?o.colors[a][c]:o.colors[a][bi(o,l||"light")];return{color:a,value:f,shade:c,isThemeColor:u,isLight:si(f,o.luminanceThreshold),variable:s?`--mantine-color-${a}-${c}`:`--mantine-color-${a}-filled`}}return{color:t,value:t,isThemeColor:u,isLight:si(t,o.luminanceThreshold),shade:c,variable:void 0}}function ko(t,o){const l=Il({color:t||o.primaryColor,theme:o});return l.variable?`var(${l.variable})`:t}function Wm(t,o){const l={from:t?.from||o.defaultGradient.from,to:t?.to||o.defaultGradient.to,deg:t?.deg??o.defaultGradient.deg??0},a=ko(l.from,o),s=ko(l.to,o);return`linear-gradient(${l.deg}deg, ${a} 0%, ${s} 100%)`}function Fn(t,o){if(typeof t!="string"||o>1||o<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const c=(1-o)*100;return`color-mix(in srgb, ${t}, transparent ${c}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${o})`):t.replace(")",` / ${o})`);const{r:l,g:a,b:s}=Dp(t);return`rgba(${l}, ${a}, ${s}, ${o})`}const Vr=Fn,K9=({color:t,theme:o,variant:l,gradient:a,autoContrast:s})=>{const c=Il({color:t,theme:o}),u=typeof s=="boolean"?s:o.autoContrast;if(l==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(l==="filled"){const f=u&&c.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return c.isThemeColor?c.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:f,border:`${le(1)} solid transparent`}:{background:`var(--mantine-color-${c.color}-${c.shade})`,hover:`var(--mantine-color-${c.color}-${c.shade===9?8:c.shade+1})`,color:f,border:`${le(1)} solid transparent`}:{background:t,hover:rc(t,.1),color:f,border:`${le(1)} solid transparent`}}if(l==="light"){if(c.isThemeColor){if(c.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${le(1)} solid transparent`};const f=o.colors[c.color][c.shade];return{background:Fn(f,.1),hover:Fn(f,.12),color:`var(--mantine-color-${c.color}-${Math.min(c.shade,6)})`,border:`${le(1)} solid transparent`}}return{background:Fn(t,.1),hover:Fn(t,.12),color:t,border:`${le(1)} solid transparent`}}if(l==="outline")return c.isThemeColor?c.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${le(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:Fn(o.colors[c.color][c.shade],.05),color:`var(--mantine-color-${c.color}-${c.shade})`,border:`${le(1)} solid var(--mantine-color-${c.color}-${c.shade})`}:{background:"transparent",hover:Fn(t,.05),color:t,border:`${le(1)} solid ${t}`};if(l==="subtle"){if(c.isThemeColor){if(c.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${le(1)} solid transparent`};const f=o.colors[c.color][c.shade];return{background:"transparent",hover:Fn(f,.12),color:`var(--mantine-color-${c.color}-${Math.min(c.shade,6)})`,border:`${le(1)} solid transparent`}}return{background:"transparent",hover:Fn(t,.12),color:t,border:`${le(1)} solid transparent`}}return l==="transparent"?c.isThemeColor?c.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${le(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${c.color}-${Math.min(c.shade,6)})`,border:`${le(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${le(1)} solid transparent`}:l==="white"?c.isThemeColor?c.shade===void 0?{background:"var(--mantine-color-white)",hover:rc(o.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${le(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:rc(o.white,.01),color:`var(--mantine-color-${c.color}-${c.shade})`,border:`${le(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:rc(o.white,.01),color:t,border:`${le(1)} solid transparent`}:l==="gradient"?{background:Wm(a,o),hover:Wm(a,o),color:"var(--mantine-color-white)",border:"none"}:l==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${le(1)} solid var(--mantine-color-default-border)`}:{}},J9={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Gb="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Hp={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:J9,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:K9,autoContrast:!1,luminanceThreshold:.3,fontFamily:Gb,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:Gb,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:le(34),lineHeight:"1.3"},h2:{fontSize:le(26),lineHeight:"1.35"},h3:{fontSize:le(22),lineHeight:"1.4"},h4:{fontSize:le(18),lineHeight:"1.45"},h5:{fontSize:le(16),lineHeight:"1.5"},h6:{fontSize:le(14),lineHeight:"1.5"}}},fontSizes:{xs:le(12),sm:le(14),md:le(16),lg:le(18),xl:le(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:le(2),sm:le(4),md:le(8),lg:le(16),xl:le(32)},spacing:{xs:le(10),sm:le(12),md:le(16),lg:le(20),xl:le(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${le(1)} ${le(3)} rgba(0, 0, 0, 0.05), 0 ${le(1)} ${le(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${le(1)} ${le(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${le(10)} ${le(15)} ${le(-5)}, rgba(0, 0, 0, 0.04) 0 ${le(7)} ${le(7)} ${le(-5)}`,md:`0 ${le(1)} ${le(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${le(20)} ${le(25)} ${le(-5)}, rgba(0, 0, 0, 0.04) 0 ${le(10)} ${le(10)} ${le(-5)}`,lg:`0 ${le(1)} ${le(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${le(28)} ${le(23)} ${le(-7)}, rgba(0, 0, 0, 0.04) 0 ${le(12)} ${le(12)} ${le(-7)}`,xl:`0 ${le(1)} ${le(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${le(36)} ${le(28)} ${le(-7)}, rgba(0, 0, 0, 0.04) 0 ${le(17)} ${le(17)} ${le(-7)}`},other:{},components:{}};function Zb(t){return t==="auto"||t==="dark"||t==="light"}function W9({key:t="mantine-color-scheme-value"}={}){let o;return{get:l=>{if(typeof window>"u")return l;try{const a=window.localStorage.getItem(t);return Zb(a)?a:l}catch{return l}},set:l=>{try{window.localStorage.setItem(t,l)}catch(a){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",a)}},subscribe:l=>{o=a=>{a.storageArea===window.localStorage&&a.key===t&&Zb(a.newValue)&&l(a.newValue)},window.addEventListener("storage",o)},unsubscribe:()=>{window.removeEventListener("storage",o)},clear:()=>{window.localStorage.removeItem(t)}}}const eT="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",qb="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Cm(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function Ib(t){if(!(t.primaryColor in t.colors))throw new Error(eT);if(typeof t.primaryShade=="object"&&(!Cm(t.primaryShade.dark)||!Cm(t.primaryShade.light)))throw new Error(qb);if(typeof t.primaryShade=="number"&&!Cm(t.primaryShade))throw new Error(qb)}function tT(t,o){if(!o)return Ib(t),t;const l=Op(t,o);return o.fontFamily&&!o.headings?.fontFamily&&(l.headings.fontFamily=o.fontFamily),Ib(l),l}const Lp=y.createContext(null),nT=()=>y.useContext(Lp)||Hp;function Jt(){const t=y.useContext(Lp);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function vx({theme:t,children:o,inherit:l=!0}){const a=nT(),s=y.useMemo(()=>tT(l?a:Hp,t),[t,a,l]);return g.jsx(Lp.Provider,{value:s,children:o})}vx.displayName="@mantine/core/MantineThemeProvider";function oT(){const t=Jt(),o=jp(),l=oo(t.breakpoints).reduce((a,s)=>{const c=t.breakpoints[s].includes("px"),u=c9(t.breakpoints[s]),f=c?`${u-.1}px`:$b(u-.1),m=c?`${u}px`:$b(u);return`${a}@media (max-width: ${f}) {.mantine-visible-from-${s} {display: none !important;}}@media (min-width: ${m}) {.mantine-hidden-from-${s} {display: none !important;}}`},"");return g.jsx("style",{"data-mantine-styles":"classes",nonce:o?.(),dangerouslySetInnerHTML:{__html:l}})}function wm(t){return Object.entries(t).map(([o,l])=>`${o}: ${l};`).join("")}function bx(t,o){const l=o?[o]:[":root",":host"],a=wm(t.variables),s=a?`${l.join(", ")}{${a}}`:"",c=wm(t.dark),u=wm(t.light),f=v=>l.map(b=>b===":host"?`${b}([data-mantine-color-scheme="${v}"])`:`${b}[data-mantine-color-scheme="${v}"]`).join(", "),m=c?`${f("dark")}{${c}}`:"",h=u?`${f("light")}{${u}}`:"";return`${s}
|
|
51
|
+
|
|
52
|
+
${m}
|
|
53
|
+
|
|
54
|
+
${h}`}function yx({color:t,theme:o,autoContrast:l}){return(typeof l=="boolean"?l:o.autoContrast)&&Il({color:t||o.primaryColor,theme:o}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function Yb(t,o){return yx({color:t.colors[t.primaryColor][bi(t,o)],theme:t,autoContrast:null})}function ac({theme:t,color:o,colorScheme:l,name:a=o,withColorValues:s=!0}){if(!t.colors[o])return{};if(l==="light"){const f=bi(t,"light"),m={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-filled)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${f===9?8:f+1})`,[`--mantine-color-${a}-light`]:Vr(t.colors[o][f],.1),[`--mantine-color-${a}-light-hover`]:Vr(t.colors[o][f],.12),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-outline-hover`]:Vr(t.colors[o][f],.05)};return s?{[`--mantine-color-${a}-0`]:t.colors[o][0],[`--mantine-color-${a}-1`]:t.colors[o][1],[`--mantine-color-${a}-2`]:t.colors[o][2],[`--mantine-color-${a}-3`]:t.colors[o][3],[`--mantine-color-${a}-4`]:t.colors[o][4],[`--mantine-color-${a}-5`]:t.colors[o][5],[`--mantine-color-${a}-6`]:t.colors[o][6],[`--mantine-color-${a}-7`]:t.colors[o][7],[`--mantine-color-${a}-8`]:t.colors[o][8],[`--mantine-color-${a}-9`]:t.colors[o][9],...m}:m}const c=bi(t,"dark"),u={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-4)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${c})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${c===9?8:c+1})`,[`--mantine-color-${a}-light`]:Vr(t.colors[o][Math.max(0,c-2)],.15),[`--mantine-color-${a}-light-hover`]:Vr(t.colors[o][Math.max(0,c-2)],.2),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${Math.max(c-5,0)})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${Math.max(c-4,0)})`,[`--mantine-color-${a}-outline-hover`]:Vr(t.colors[o][Math.max(c-4,0)],.05)};return s?{[`--mantine-color-${a}-0`]:t.colors[o][0],[`--mantine-color-${a}-1`]:t.colors[o][1],[`--mantine-color-${a}-2`]:t.colors[o][2],[`--mantine-color-${a}-3`]:t.colors[o][3],[`--mantine-color-${a}-4`]:t.colors[o][4],[`--mantine-color-${a}-5`]:t.colors[o][5],[`--mantine-color-${a}-6`]:t.colors[o][6],[`--mantine-color-${a}-7`]:t.colors[o][7],[`--mantine-color-${a}-8`]:t.colors[o][8],[`--mantine-color-${a}-9`]:t.colors[o][9],...u}:u}function lT(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Br(t,o,l){oo(o).forEach(a=>Object.assign(t,{[`--mantine-${l}-${a}`]:o[a]}))}const xx=t=>{const o=bi(t,"light"),l=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:le(t.defaultRadius),a={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":l,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":Yb(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${o})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":Yb(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Br(a.variables,t.breakpoints,"breakpoint"),Br(a.variables,t.spacing,"spacing"),Br(a.variables,t.fontSizes,"font-size"),Br(a.variables,t.lineHeights,"line-height"),Br(a.variables,t.shadows,"shadow"),Br(a.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((c,u)=>{a.variables[`--mantine-primary-color-${u}`]=`var(--mantine-color-${t.primaryColor}-${u})`}),oo(t.colors).forEach(c=>{const u=t.colors[c];if(lT(u)){Object.assign(a.light,ac({theme:t,name:u.name,color:u.light,colorScheme:"light",withColorValues:!0})),Object.assign(a.dark,ac({theme:t,name:u.name,color:u.dark,colorScheme:"dark",withColorValues:!0}));return}u.forEach((f,m)=>{a.variables[`--mantine-color-${c}-${m}`]=f}),Object.assign(a.light,ac({theme:t,color:c,colorScheme:"light",withColorValues:!1})),Object.assign(a.dark,ac({theme:t,color:c,colorScheme:"dark",withColorValues:!1}))});const s=t.headings.sizes;return oo(s).forEach(c=>{a.variables[`--mantine-${c}-font-size`]=s[c].fontSize,a.variables[`--mantine-${c}-line-height`]=s[c].lineHeight,a.variables[`--mantine-${c}-font-weight`]=s[c].fontWeight||t.headings.fontWeight}),a};function rT({theme:t,generator:o}){const l=xx(t),a=o?.(t);return a?Op(l,a):l}const Em=xx(Hp);function aT(t){const o={variables:{},light:{},dark:{}};return oo(t.variables).forEach(l=>{Em.variables[l]!==t.variables[l]&&(o.variables[l]=t.variables[l])}),oo(t.light).forEach(l=>{Em.light[l]!==t.light[l]&&(o.light[l]=t.light[l])}),oo(t.dark).forEach(l=>{Em.dark[l]!==t.dark[l]&&(o.dark[l]=t.dark[l])}),o}function iT(t){return bx({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function Sx({cssVariablesSelector:t,deduplicateCssVariables:o}){const l=Jt(),a=jp(),s=B9(),c=rT({theme:l,generator:s}),u=(t===void 0||t===":root"||t===":host")&&o,f=u?aT(c):c,m=bx(f,t);return m?g.jsx("style",{"data-mantine-styles":!0,nonce:a?.(),dangerouslySetInnerHTML:{__html:`${m}${u?"":iT(t)}`}}):null}Sx.displayName="@mantine/CssVariables";function $r(t,o){const l=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,a=t!=="auto"?t:l?"dark":"light";o()?.setAttribute("data-mantine-color-scheme",a)}function sT({manager:t,defaultColorScheme:o,getRootElement:l,forceColorScheme:a}){const s=y.useRef(null),[c,u]=y.useState(()=>t.get(o)),f=a||c,m=y.useCallback(v=>{a||($r(v,l),u(v),t.set(v))},[t.set,f,a]),h=y.useCallback(()=>{u(o),$r(o,l),t.clear()},[t.clear,o]);return y.useEffect(()=>(t.subscribe(m),t.unsubscribe),[t.subscribe,t.unsubscribe]),Oi(()=>{$r(t.get(o),l)},[]),y.useEffect(()=>{if(a)return $r(a,l),()=>{};a===void 0&&$r(c,l),typeof window<"u"&&"matchMedia"in window&&(s.current=window.matchMedia("(prefers-color-scheme: dark)"));const v=b=>{c==="auto"&&$r(b.matches?"dark":"light",l)};return s.current?.addEventListener("change",v),()=>s.current?.removeEventListener("change",v)},[c,a]),{colorScheme:f,setColorScheme:m,clearColorScheme:h}}function cT({respectReducedMotion:t,getRootElement:o}){Oi(()=>{t&&o()?.setAttribute("data-respect-reduced-motion","true")},[t])}function Cx({theme:t,children:o,getStyleNonce:l,withStaticClasses:a=!0,withGlobalClasses:s=!0,deduplicateCssVariables:c=!0,withCssVariables:u=!0,cssVariablesSelector:f,classNamesPrefix:m="mantine",colorSchemeManager:h=W9(),defaultColorScheme:v="light",getRootElement:b=()=>document.documentElement,cssVariablesResolver:x,forceColorScheme:S,stylesTransform:E,env:w}){const{colorScheme:R,setColorScheme:M,clearColorScheme:O}=sT({defaultColorScheme:v,forceColorScheme:S,manager:h,getRootElement:b});return cT({respectReducedMotion:t?.respectReducedMotion||!1,getRootElement:b}),g.jsx(Np.Provider,{value:{colorScheme:R,setColorScheme:M,clearColorScheme:O,getRootElement:b,classNamesPrefix:m,getStyleNonce:l,cssVariablesResolver:x,cssVariablesSelector:f??":root",withStaticClasses:a,stylesTransform:E,env:w},children:g.jsxs(vx,{theme:t,children:[u&&g.jsx(Sx,{cssVariablesSelector:f,deduplicateCssVariables:c}),s&&g.jsx(oT,{}),o]})})}Cx.displayName="@mantine/core/MantineProvider";function du({classNames:t,styles:o,props:l,stylesCtx:a}){const s=Jt();return{resolvedClassNames:uu({theme:s,classNames:t,props:l,stylesCtx:a||void 0}),resolvedStyles:Bc({theme:s,styles:o,props:l,stylesCtx:a||void 0})}}const uT={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function fT({theme:t,options:o,unstyled:l}){return Vo(o?.focusable&&!l&&(t.focusClassName||uT[t.focusRing]),o?.active&&!l&&t.activeClassName)}function dT({selector:t,stylesCtx:o,options:l,props:a,theme:s}){return uu({theme:s,classNames:l?.classNames,props:l?.props||a,stylesCtx:o})[t]}function Fb({selector:t,stylesCtx:o,theme:l,classNames:a,props:s}){return uu({theme:l,classNames:a,props:s,stylesCtx:o})[t]}function mT({rootSelector:t,selector:o,className:l}){return t===o?l:void 0}function pT({selector:t,classes:o,unstyled:l}){return l?void 0:o[t]}function hT({themeName:t,classNamesPrefix:o,selector:l,withStaticClass:a}){return a===!1?[]:t.map(s=>`${o}-${s}-${l}`)}function gT({themeName:t,theme:o,selector:l,props:a,stylesCtx:s}){return t.map(c=>uu({theme:o,classNames:o.components[c]?.classNames,props:a,stylesCtx:s})?.[l])}function vT({options:t,classes:o,selector:l,unstyled:a}){return t?.variant&&!a?o[`${l}--${t.variant}`]:void 0}function bT({theme:t,options:o,themeName:l,selector:a,classNamesPrefix:s,classNames:c,classes:u,unstyled:f,className:m,rootSelector:h,props:v,stylesCtx:b,withStaticClasses:x,headless:S,transformedStyles:E}){return Vo(fT({theme:t,options:o,unstyled:f||S}),gT({theme:t,themeName:l,selector:a,props:v,stylesCtx:b}),vT({options:o,classes:u,selector:a,unstyled:f}),Fb({selector:a,stylesCtx:b,theme:t,classNames:c,props:v}),Fb({selector:a,stylesCtx:b,theme:t,classNames:E,props:v}),dT({selector:a,stylesCtx:b,options:o,props:v,theme:t}),mT({rootSelector:h,selector:a,className:m}),pT({selector:a,classes:u,unstyled:f||S}),x&&!S&&hT({themeName:l,classNamesPrefix:s,selector:a,withStaticClass:o?.withStaticClass}),o?.className)}function yT({theme:t,themeName:o,props:l,stylesCtx:a,selector:s}){return o.map(c=>Bc({theme:t,styles:t.components[c]?.styles,props:l,stylesCtx:a})[s]).reduce((c,u)=>({...c,...u}),{})}function ep({style:t,theme:o}){return Array.isArray(t)?[...t].reduce((l,a)=>({...l,...ep({style:a,theme:o})}),{}):typeof t=="function"?t(o):t??{}}function xT(t){return t.reduce((o,l)=>(l&&Object.keys(l).forEach(a=>{o[a]={...o[a],...au(l[a])}}),o),{})}function ST({vars:t,varsResolver:o,theme:l,props:a,stylesCtx:s,selector:c,themeName:u,headless:f}){return xT([f?{}:o?.(l,a,s),...u.map(m=>l.components?.[m]?.vars?.(l,a,s)),t?.(l,a,s)])?.[c]}function CT({theme:t,themeName:o,selector:l,options:a,props:s,stylesCtx:c,rootSelector:u,styles:f,style:m,vars:h,varsResolver:v,headless:b,withStylesTransform:x}){return{...!x&&yT({theme:t,themeName:o,props:s,stylesCtx:c,selector:l}),...!x&&Bc({theme:t,styles:f,props:s,stylesCtx:c})[l],...!x&&Bc({theme:t,styles:a?.styles,props:a?.props||s,stylesCtx:c})[l],...ST({theme:t,props:s,stylesCtx:c,vars:h,varsResolver:v,selector:l,themeName:o,headless:b}),...u===l?ep({style:m,theme:t}):null,...ep({style:a?.style,theme:t})}}function wT({props:t,stylesCtx:o,themeName:l}){const a=Jt(),s=Z9()?.();return{getTransformedStyles:u=>s?[...u.map(m=>s(m,{props:t,theme:a,ctx:o})),...l.map(m=>s(a.components[m]?.styles,{props:t,theme:a,ctx:o}))].filter(Boolean):[],withStylesTransform:!!s}}function He({name:t,classes:o,props:l,stylesCtx:a,className:s,style:c,rootSelector:u="root",unstyled:f,classNames:m,styles:h,vars:v,varsResolver:b,attributes:x}){const S=Jt(),E=$9(),w=U9(),R=P9(),M=(Array.isArray(t)?t:[t]).filter(N=>N),{withStylesTransform:O,getTransformedStyles:A}=wT({props:l,stylesCtx:a,themeName:M});return(N,H)=>({className:bT({theme:S,options:H,themeName:M,selector:N,classNamesPrefix:E,classNames:m,classes:o,unstyled:f,className:s,rootSelector:u,props:l,stylesCtx:a,withStaticClasses:w,headless:R,transformedStyles:A([H?.styles,h])}),style:CT({theme:S,themeName:M,selector:N,options:H,props:l,stylesCtx:a,rootSelector:u,styles:h,style:c,vars:v,varsResolver:b,headless:R,withStylesTransform:O}),...x?.[N]})}function ET(t,o){return typeof t=="boolean"?t:o.autoContrast}function ue(t,o,l){const a=Jt(),s=a.components[t]?.defaultProps,c=typeof s=="function"?s(a):s;return{...o,...c,...au(l)}}function Rm(t){return oo(t).reduce((o,l)=>t[l]!==void 0?`${o}${i9(l)}:${t[l]};`:o,"").trim()}function RT({selector:t,styles:o,media:l,container:a}){const s=o?Rm(o):"",c=Array.isArray(l)?l.map(f=>`@media${f.query}{${t}{${Rm(f.styles)}}}`):[],u=Array.isArray(a)?a.map(f=>`@container ${f.query}{${t}{${Rm(f.styles)}}}`):[];return`${s?`${t}{${s}}`:""}${c.join("")}${u.join("")}`.trim()}function wx(t){const o=jp();return g.jsx("style",{"data-mantine-styles":"inline",nonce:o?.(),dangerouslySetInnerHTML:{__html:RT(t)}})}function mu(t){const{m:o,mx:l,my:a,mt:s,mb:c,ml:u,mr:f,me:m,ms:h,p:v,px:b,py:x,pt:S,pb:E,pl:w,pr:R,pe:M,ps:O,bd:A,bdrs:N,bg:H,c:V,opacity:$,ff:F,fz:Q,fw:Z,lts:ee,ta:re,lh:ne,fs:j,tt:I,td:L,w:z,miw:_,maw:U,h:X,mih:ae,mah:oe,bgsz:J,bgp:ge,bgr:ie,bga:Ce,pos:ze,top:Te,left:Se,bottom:Xe,right:et,inset:de,display:ce,flex:me,hiddenFrom:ke,visibleFrom:qe,lightHidden:Oe,darkHidden:mt,sx:Pe,...it}=t;return{styleProps:au({m:o,mx:l,my:a,mt:s,mb:c,ml:u,mr:f,me:m,ms:h,p:v,px:b,py:x,pt:S,pb:E,pl:w,pr:R,pe:M,ps:O,bd:A,bg:H,c:V,opacity:$,ff:F,fz:Q,fw:Z,lts:ee,ta:re,lh:ne,fs:j,tt:I,td:L,w:z,miw:_,maw:U,h:X,mih:ae,mah:oe,bgsz:J,bgp:ge,bgr:ie,bga:Ce,pos:ze,top:Te,left:Se,bottom:Xe,right:et,inset:de,display:ce,flex:me,bdrs:N,hiddenFrom:ke,visibleFrom:qe,lightHidden:Oe,darkHidden:mt,sx:Pe}),rest:it}}const TT={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function zp(t,o){const l=Il({color:t,theme:o});return l.color==="dimmed"?"var(--mantine-color-dimmed)":l.color==="bright"?"var(--mantine-color-bright)":l.variable?`var(${l.variable})`:l.color}function MT(t,o){const l=Il({color:t,theme:o});return l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-text)`:zp(t,o)}function OT(t,o){if(typeof t=="number")return le(t);if(typeof t=="string"){const[l,a,...s]=t.split(" ").filter(u=>u.trim()!=="");let c=`${le(l)}`;return a&&(c+=` ${a}`),s.length>0&&(c+=` ${zp(s.join(" "),o)}`),c.trim()}return t}const Xb={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function AT(t){return typeof t=="string"&&t in Xb?Xb[t]:t}const _T=["h1","h2","h3","h4","h5","h6"];function NT(t,o){return typeof t=="string"&&t in o.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&_T.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?le(t):t}function jT(t){return t}const DT=["h1","h2","h3","h4","h5","h6"];function HT(t,o){return typeof t=="string"&&t in o.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&DT.includes(t)?`var(--mantine-${t}-line-height)`:t}function LT(t,o){return typeof t=="string"&&t in o.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?le(t):t}function zT(t){return typeof t=="number"?le(t):t}function kT(t,o){if(typeof t=="number")return le(t);if(typeof t=="string"){const l=t.replace("-","");if(!(l in o.spacing))return le(t);const a=`--mantine-spacing-${l}`;return t.startsWith("-")?`calc(var(${a}) * -1)`:`var(${a})`}return t}const Tm={color:zp,textColor:MT,fontSize:NT,spacing:kT,radius:LT,identity:jT,size:zT,lineHeight:HT,fontFamily:AT,border:OT};function Qb(t){return t.replace("(min-width: ","").replace("em)","")}function VT({media:t,...o}){const a=Object.keys(t).sort((s,c)=>Number(Qb(s))-Number(Qb(c))).map(s=>({query:s,styles:t[s]}));return{...o,media:a}}function BT(t){if(typeof t!="object"||t===null)return!1;const o=Object.keys(t);return!(o.length===1&&o[0]==="base")}function $T(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function UT(t){return typeof t=="object"&&t!==null?oo(t).filter(o=>o!=="base"):[]}function PT(t,o){return typeof t=="object"&&t!==null&&o in t?t[o]:t}function Ex({styleProps:t,data:o,theme:l}){return VT(oo(t).reduce((a,s)=>{if(s==="hiddenFrom"||s==="visibleFrom"||s==="sx")return a;const c=o[s],u=Array.isArray(c.property)?c.property:[c.property],f=$T(t[s]);if(!BT(t[s]))return u.forEach(h=>{a.inlineStyles[h]=Tm[c.type](f,l)}),a;a.hasResponsiveStyles=!0;const m=UT(t[s]);return u.forEach(h=>{f!=null&&(a.styles[h]=Tm[c.type](f,l)),m.forEach(v=>{const b=`(min-width: ${l.breakpoints[v]})`;a.media[b]={...a.media[b],[h]:Tm[c.type](PT(t[s],v),l)}})}),a},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Rx(){return`__m__-${y.useId().replace(/[:«»]/g,"")}`}function Tx(t,o){return Array.isArray(t)?[...t].reduce((l,a)=>({...l,...Tx(a,o)}),{}):typeof t=="function"?t(o):t??{}}function Mx(t){return t.startsWith("data-")?t:`data-${t}`}function GT(t){return Object.keys(t).reduce((o,l)=>{const a=t[l];return a===void 0||a===""||a===!1||a===null||(o[Mx(l)]=t[l]),o},{})}function Ox(t){return t?typeof t=="string"?{[Mx(t)]:!0}:Array.isArray(t)?[...t].reduce((o,l)=>({...o,...Ox(l)}),{}):GT(t):null}function tp(t,o){return Array.isArray(t)?[...t].reduce((l,a)=>({...l,...tp(a,o)}),{}):typeof t=="function"?t(o):t??{}}function ZT({theme:t,style:o,vars:l,styleProps:a}){const s=tp(o,t),c=tp(l,t);return{...s,...c,...a}}const Ax=y.forwardRef(({component:t,style:o,__vars:l,className:a,variant:s,mod:c,size:u,hiddenFrom:f,visibleFrom:m,lightHidden:h,darkHidden:v,renderRoot:b,__size:x,...S},E)=>{const w=Jt(),R=t||"div",{styleProps:M,rest:O}=mu(S),N=G9()?.()?.(M.sx),H=Rx(),V=Ex({styleProps:M,theme:w,data:TT}),$={ref:E,style:ZT({theme:w,style:o,vars:l,styleProps:V.inlineStyles}),className:Vo(a,N,{[H]:V.hasResponsiveStyles,"mantine-light-hidden":h,"mantine-dark-hidden":v,[`mantine-hidden-from-${f}`]:f,[`mantine-visible-from-${m}`]:m}),"data-variant":s,"data-size":ux(u)?void 0:u||void 0,size:x,...Ox(c),...O};return g.jsxs(g.Fragment,{children:[V.hasResponsiveStyles&&g.jsx(wx,{selector:`.${H}`,styles:V.styles,media:V.media}),typeof b=="function"?b($):g.jsx(R,{...$})]})});Ax.displayName="@mantine/core/Box";const xe=Ax;function _x(t){return t}function qT(t){const o=t;return l=>{const a=y.forwardRef((s,c)=>g.jsx(o,{...l,...s,ref:c}));return a.extend=o.extend,a.displayName=`WithProps(${o.displayName})`,a}}function Le(t){const o=y.forwardRef(t);return o.extend=_x,o.withProps=l=>{const a=y.forwardRef((s,c)=>g.jsx(o,{...l,...s,ref:c}));return a.extend=o.extend,a.displayName=`WithProps(${o.displayName})`,a},o}function Ht(t){const o=y.forwardRef(t);return o.withProps=l=>{const a=y.forwardRef((s,c)=>g.jsx(o,{...l,...s,ref:c}));return a.extend=o.extend,a.displayName=`WithProps(${o.displayName})`,a},o.extend=_x,o}const IT=y.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function aa(){return y.useContext(IT)}function pu(){return typeof window<"u"}function Nx(t){return jx(t)?(t.nodeName||"").toLowerCase():"#document"}function ia(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function YT(t){var o;return(o=(jx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function jx(t){return pu()?t instanceof Node||t instanceof ia(t).Node:!1}function Yt(t){return pu()?t instanceof Element||t instanceof ia(t).Element:!1}function kp(t){return pu()?t instanceof HTMLElement||t instanceof ia(t).HTMLElement:!1}function np(t){return!pu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ia(t).ShadowRoot}function FT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const XT=new Set(["html","body","#document"]);function Mm(t){return XT.has(Nx(t))}function QT(t){return ia(t).getComputedStyle(t)}function KT(t){if(Nx(t)==="html")return t;const o=t.assignedSlot||t.parentNode||np(t)&&t.host||YT(t);return np(o)?o.host:o}function JT(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function WT(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(o=>{let{brand:l,version:a}=o;return l+"/"+a}).join(" "):navigator.userAgent}function e6(){return/apple/i.test(navigator.vendor)}function t6(){return JT().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function n6(){return WT().includes("jsdom/")}const Kb="data-floating-ui-focusable",o6="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jb(t){let o=t.activeElement;for(;((l=o)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;o=o.shadowRoot.activeElement}return o}function yi(t,o){if(!t||!o)return!1;const l=o.getRootNode==null?void 0:o.getRootNode();if(t.contains(o))return!0;if(l&&np(l)){let a=o;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function Pr(t){return"composedPath"in t?t.composedPath()[0]:t.target}function Om(t,o){if(o==null)return!1;if("composedPath"in t)return t.composedPath().includes(o);const l=t;return l.target!=null&&o.contains(l.target)}function l6(t){return t.matches("html,body")}function Ul(t){return t?.ownerDocument||document}function r6(t){return kp(t)&&t.matches(o6)}function a6(t){if(!t||n6())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function i6(t){return t?t.hasAttribute(Kb)?t:t.querySelector("["+Kb+"]")||t:null}function pc(t,o,l){return l===void 0&&(l=!0),t.filter(s=>{var c;return s.parentId===o&&(!l||((c=s.context)==null?void 0:c.open))}).flatMap(s=>[s,...pc(t,s.id,l)])}function s6(t){return"nativeEvent"in t}function op(t,o){const l=["mouse","pen"];return l.push("",void 0),l.includes(t)}var c6=typeof document<"u",u6=function(){},lo=c6?y.useLayoutEffect:u6;const f6={...Gc};function ic(t){const o=y.useRef(t);return lo(()=>{o.current=t}),o}const d6=f6.useInsertionEffect,m6=d6||(t=>t());function Jn(t){const o=y.useRef(()=>{});return m6(()=>{o.current=t}),y.useCallback(function(){for(var l=arguments.length,a=new Array(l),s=0;s<l;s++)a[s]=arguments[s];return o.current==null?void 0:o.current(...a)},[])}const p6="data-floating-ui-focusable",Wb="active",ey="selected",h6={...Gc};let ty=!1,g6=0;const ny=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+g6++;function v6(){const[t,o]=y.useState(()=>ty?ny():void 0);return lo(()=>{t==null&&o(ny())},[]),y.useEffect(()=>{ty=!0},[]),t}const b6=h6.useId,Dx=b6||v6;function y6(){const t=new Map;return{emit(o,l){var a;(a=t.get(o))==null||a.forEach(s=>s(l))},on(o,l){t.has(o)||t.set(o,new Set),t.get(o).add(l)},off(o,l){var a;(a=t.get(o))==null||a.delete(l)}}}const x6=y.createContext(null),S6=y.createContext(null),Vp=()=>{var t;return((t=y.useContext(x6))==null?void 0:t.id)||null},Bp=()=>y.useContext(S6);function $p(t){return"data-floating-ui-"+t}function Rn(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const oy=$p("safe-polygon");function hc(t,o,l){if(l&&!op(l))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const a=t();return typeof a=="number"?a:a?.[o]}return t?.[o]}function Am(t){return typeof t=="function"?t():t}function C6(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,dataRef:s,events:c,elements:u}=t,{enabled:f=!0,delay:m=0,handleClose:h=null,mouseOnly:v=!1,restMs:b=0,move:x=!0}=o,S=Bp(),E=Vp(),w=ic(h),R=ic(m),M=ic(l),O=ic(b),A=y.useRef(),N=y.useRef(-1),H=y.useRef(),V=y.useRef(-1),$=y.useRef(!0),F=y.useRef(!1),Q=y.useRef(()=>{}),Z=y.useRef(!1),ee=Jn(()=>{var z;const _=(z=s.current.openEvent)==null?void 0:z.type;return _?.includes("mouse")&&_!=="mousedown"});y.useEffect(()=>{if(!f)return;function z(_){let{open:U}=_;U||(Rn(N),Rn(V),$.current=!0,Z.current=!1)}return c.on("openchange",z),()=>{c.off("openchange",z)}},[f,c]),y.useEffect(()=>{if(!f||!w.current||!l)return;function z(U){ee()&&a(!1,U,"hover")}const _=Ul(u.floating).documentElement;return _.addEventListener("mouseleave",z),()=>{_.removeEventListener("mouseleave",z)}},[u.floating,l,a,f,w,ee]);const re=y.useCallback(function(z,_,U){_===void 0&&(_=!0),U===void 0&&(U="hover");const X=hc(R.current,"close",A.current);X&&!H.current?(Rn(N),N.current=window.setTimeout(()=>a(!1,z,U),X)):_&&(Rn(N),a(!1,z,U))},[R,a]),ne=Jn(()=>{Q.current(),H.current=void 0}),j=Jn(()=>{if(F.current){const z=Ul(u.floating).body;z.style.pointerEvents="",z.removeAttribute(oy),F.current=!1}}),I=Jn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);y.useEffect(()=>{if(!f)return;function z(oe){if(Rn(N),$.current=!1,v&&!op(A.current)||Am(O.current)>0&&!hc(R.current,"open"))return;const J=hc(R.current,"open",A.current);J?N.current=window.setTimeout(()=>{M.current||a(!0,oe,"hover")},J):l||a(!0,oe,"hover")}function _(oe){if(I()){j();return}Q.current();const J=Ul(u.floating);if(Rn(V),Z.current=!1,w.current&&s.current.floatingContext){l||Rn(N),H.current=w.current({...s.current.floatingContext,tree:S,x:oe.clientX,y:oe.clientY,onClose(){j(),ne(),I()||re(oe,!0,"safe-polygon")}});const ie=H.current;J.addEventListener("mousemove",ie),Q.current=()=>{J.removeEventListener("mousemove",ie)};return}(A.current!=="touch"||!yi(u.floating,oe.relatedTarget))&&re(oe)}function U(oe){I()||s.current.floatingContext&&(w.current==null||w.current({...s.current.floatingContext,tree:S,x:oe.clientX,y:oe.clientY,onClose(){j(),ne(),I()||re(oe)}})(oe))}function X(){Rn(N)}function ae(oe){I()||re(oe,!1)}if(Yt(u.domReference)){const oe=u.domReference,J=u.floating;return l&&oe.addEventListener("mouseleave",U),x&&oe.addEventListener("mousemove",z,{once:!0}),oe.addEventListener("mouseenter",z),oe.addEventListener("mouseleave",_),J&&(J.addEventListener("mouseleave",U),J.addEventListener("mouseenter",X),J.addEventListener("mouseleave",ae)),()=>{l&&oe.removeEventListener("mouseleave",U),x&&oe.removeEventListener("mousemove",z),oe.removeEventListener("mouseenter",z),oe.removeEventListener("mouseleave",_),J&&(J.removeEventListener("mouseleave",U),J.removeEventListener("mouseenter",X),J.removeEventListener("mouseleave",ae))}}},[u,f,t,v,x,re,ne,j,a,l,M,S,R,w,s,I,O]),lo(()=>{var z;if(f&&l&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&ee()){F.current=!0;const U=u.floating;if(Yt(u.domReference)&&U){var _;const X=Ul(u.floating).body;X.setAttribute(oy,"");const ae=u.domReference,oe=S==null||(_=S.nodesRef.current.find(J=>J.id===E))==null||(_=_.context)==null?void 0:_.elements.floating;return oe&&(oe.style.pointerEvents=""),X.style.pointerEvents="none",ae.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{X.style.pointerEvents="",ae.style.pointerEvents="",U.style.pointerEvents=""}}}},[f,l,E,u,S,w,ee]),lo(()=>{l||(A.current=void 0,Z.current=!1,ne(),j())},[l,ne,j]),y.useEffect(()=>()=>{ne(),Rn(N),Rn(V),j()},[f,u.domReference,ne,j]);const L=y.useMemo(()=>{function z(_){A.current=_.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(_){const{nativeEvent:U}=_;function X(){!$.current&&!M.current&&a(!0,U,"hover")}v&&!op(A.current)||l||Am(O.current)===0||Z.current&&_.movementX**2+_.movementY**2<2||(Rn(V),A.current==="touch"?X():(Z.current=!0,V.current=window.setTimeout(X,Am(O.current))))}}},[v,a,l,M,O]);return y.useMemo(()=>f?{reference:L}:{},[f,L])}const lp=()=>{},Hx=y.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:lp,setState:lp,isInstantPhase:!1}),w6=()=>y.useContext(Hx);function E6(t){const{children:o,delay:l,timeoutMs:a=0}=t,[s,c]=y.useReducer((m,h)=>({...m,...h}),{delay:l,timeoutMs:a,initialDelay:l,currentId:null,isInstantPhase:!1}),u=y.useRef(null),f=y.useCallback(m=>{c({currentId:m})},[]);return lo(()=>{s.currentId?u.current===null?u.current=s.currentId:s.isInstantPhase||c({isInstantPhase:!0}):(s.isInstantPhase&&c({isInstantPhase:!1}),u.current=null)},[s.currentId,s.isInstantPhase]),g.jsx(Hx.Provider,{value:y.useMemo(()=>({...s,setState:c,setCurrentId:f}),[s,f]),children:o})}function R6(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,floatingId:s}=t,{id:c,enabled:u=!0}=o,f=c??s,m=w6(),{currentId:h,setCurrentId:v,initialDelay:b,setState:x,timeoutMs:S}=m;return lo(()=>{u&&h&&(x({delay:{open:1,close:hc(b,"close")}}),h!==f&&a(!1))},[u,f,a,x,h,b]),lo(()=>{function E(){a(!1),x({delay:b,currentId:null})}if(u&&h&&!l&&h===f){if(S){const w=window.setTimeout(E,S);return()=>{clearTimeout(w)}}E()}},[u,l,x,h,f,a,b,S]),lo(()=>{u&&(v===lp||!l||v(f))},[u,l,v,f]),m}const T6={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},M6={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ly=t=>{var o,l;return{escapeKey:typeof t=="boolean"?t:(o=t?.escapeKey)!=null?o:!1,outsidePress:typeof t=="boolean"?t:(l=t?.outsidePress)!=null?l:!0}};function O6(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,elements:s,dataRef:c}=t,{enabled:u=!0,escapeKey:f=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:v=!1,referencePressEvent:b="pointerdown",ancestorScroll:x=!1,bubbles:S,capture:E}=o,w=Bp(),R=Jn(typeof m=="function"?m:()=>!1),M=typeof m=="function"?R:m,O=y.useRef(!1),{escapeKey:A,outsidePress:N}=ly(S),{escapeKey:H,outsidePress:V}=ly(E),$=y.useRef(!1),F=Jn(j=>{var I;if(!l||!u||!f||j.key!=="Escape"||$.current)return;const L=(I=c.current.floatingContext)==null?void 0:I.nodeId,z=w?pc(w.nodesRef.current,L):[];if(!A&&(j.stopPropagation(),z.length>0)){let _=!0;if(z.forEach(U=>{var X;if((X=U.context)!=null&&X.open&&!U.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}a(!1,s6(j)?j.nativeEvent:j,"escape-key")}),Q=Jn(j=>{var I;const L=()=>{var z;F(j),(z=Pr(j))==null||z.removeEventListener("keydown",L)};(I=Pr(j))==null||I.addEventListener("keydown",L)}),Z=Jn(j=>{var I;const L=c.current.insideReactTree;c.current.insideReactTree=!1;const z=O.current;if(O.current=!1,h==="click"&&z||L||typeof M=="function"&&!M(j))return;const _=Pr(j),U="["+$p("inert")+"]",X=Ul(s.floating).querySelectorAll(U);let ae=Yt(_)?_:null;for(;ae&&!Mm(ae);){const ie=KT(ae);if(Mm(ie)||!Yt(ie))break;ae=ie}if(X.length&&Yt(_)&&!l6(_)&&!yi(_,s.floating)&&Array.from(X).every(ie=>!yi(ae,ie)))return;if(kp(_)&&ne){const ie=Mm(_),Ce=QT(_),ze=/auto|scroll/,Te=ie||ze.test(Ce.overflowX),Se=ie||ze.test(Ce.overflowY),Xe=Te&&_.clientWidth>0&&_.scrollWidth>_.clientWidth,et=Se&&_.clientHeight>0&&_.scrollHeight>_.clientHeight,de=Ce.direction==="rtl",ce=et&&(de?j.offsetX<=_.offsetWidth-_.clientWidth:j.offsetX>_.clientWidth),me=Xe&&j.offsetY>_.clientHeight;if(ce||me)return}const oe=(I=c.current.floatingContext)==null?void 0:I.nodeId,J=w&&pc(w.nodesRef.current,oe).some(ie=>{var Ce;return Om(j,(Ce=ie.context)==null?void 0:Ce.elements.floating)});if(Om(j,s.floating)||Om(j,s.domReference)||J)return;const ge=w?pc(w.nodesRef.current,oe):[];if(ge.length>0){let ie=!0;if(ge.forEach(Ce=>{var ze;if((ze=Ce.context)!=null&&ze.open&&!Ce.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}a(!1,j,"outside-press")}),ee=Jn(j=>{var I;const L=()=>{var z;Z(j),(z=Pr(j))==null||z.removeEventListener(h,L)};(I=Pr(j))==null||I.addEventListener(h,L)});y.useEffect(()=>{if(!l||!u)return;c.current.__escapeKeyBubbles=A,c.current.__outsidePressBubbles=N;let j=-1;function I(X){a(!1,X,"ancestor-scroll")}function L(){window.clearTimeout(j),$.current=!0}function z(){j=window.setTimeout(()=>{$.current=!1},FT()?5:0)}const _=Ul(s.floating);f&&(_.addEventListener("keydown",H?Q:F,H),_.addEventListener("compositionstart",L),_.addEventListener("compositionend",z)),M&&_.addEventListener(h,V?ee:Z,V);let U=[];return x&&(Yt(s.domReference)&&(U=Ho(s.domReference)),Yt(s.floating)&&(U=U.concat(Ho(s.floating))),!Yt(s.reference)&&s.reference&&s.reference.contextElement&&(U=U.concat(Ho(s.reference.contextElement)))),U=U.filter(X=>{var ae;return X!==((ae=_.defaultView)==null?void 0:ae.visualViewport)}),U.forEach(X=>{X.addEventListener("scroll",I,{passive:!0})}),()=>{f&&(_.removeEventListener("keydown",H?Q:F,H),_.removeEventListener("compositionstart",L),_.removeEventListener("compositionend",z)),M&&_.removeEventListener(h,V?ee:Z,V),U.forEach(X=>{X.removeEventListener("scroll",I)}),window.clearTimeout(j)}},[c,s,f,M,h,l,a,x,u,A,N,F,H,Q,Z,V,ee]),y.useEffect(()=>{c.current.insideReactTree=!1},[c,M,h]);const re=y.useMemo(()=>({onKeyDown:F,...v&&{[T6[b]]:j=>{a(!1,j.nativeEvent,"reference-press")},...b!=="click"&&{onClick(j){a(!1,j.nativeEvent,"reference-press")}}}}),[F,a,v,b]),ne=y.useMemo(()=>({onKeyDown:F,onMouseDown(){O.current=!0},onMouseUp(){O.current=!0},[M6[h]]:()=>{c.current.insideReactTree=!0}}),[F,h,c]);return y.useMemo(()=>u?{reference:re,floating:ne}:{},[u,re,ne])}function A6(t){const{open:o=!1,onOpenChange:l,elements:a}=t,s=Dx(),c=y.useRef({}),[u]=y.useState(()=>y6()),f=Vp()!=null,[m,h]=y.useState(a.reference),v=Jn((S,E,w)=>{c.current.openEvent=S?E:void 0,u.emit("openchange",{open:S,event:E,reason:w,nested:f}),l?.(S,E,w)}),b=y.useMemo(()=>({setPositionReference:h}),[]),x=y.useMemo(()=>({reference:m||a.reference||null,floating:a.floating||null,domReference:a.reference}),[m,a.reference,a.floating]);return y.useMemo(()=>({dataRef:c,open:o,onOpenChange:v,elements:x,events:u,floatingId:s,refs:b}),[o,v,x,u,s,b])}function Up(t){t===void 0&&(t={});const{nodeId:o}=t,l=A6({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||l,s=a.elements,[c,u]=y.useState(null),[f,m]=y.useState(null),v=s?.domReference||c,b=y.useRef(null),x=Bp();lo(()=>{v&&(b.current=v)},[v]);const S=u3({...t,elements:{...s,...f&&{reference:f}}}),E=y.useCallback(A=>{const N=Yt(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;m(N),S.refs.setReference(N)},[S.refs]),w=y.useCallback(A=>{(Yt(A)||A===null)&&(b.current=A,u(A)),(Yt(S.refs.reference.current)||S.refs.reference.current===null||A!==null&&!Yt(A))&&S.refs.setReference(A)},[S.refs]),R=y.useMemo(()=>({...S.refs,setReference:w,setPositionReference:E,domReference:b}),[S.refs,w,E]),M=y.useMemo(()=>({...S.elements,domReference:v}),[S.elements,v]),O=y.useMemo(()=>({...S,...a,refs:R,elements:M,nodeId:o}),[S,R,M,o,a]);return lo(()=>{a.dataRef.current.floatingContext=O;const A=x?.nodesRef.current.find(N=>N.id===o);A&&(A.context=O)}),y.useMemo(()=>({...S,context:O,refs:R,elements:M}),[S,R,M,O])}function _m(){return t6()&&e6()}function _6(t,o){o===void 0&&(o={});const{open:l,onOpenChange:a,events:s,dataRef:c,elements:u}=t,{enabled:f=!0,visibleOnly:m=!0}=o,h=y.useRef(!1),v=y.useRef(-1),b=y.useRef(!0);y.useEffect(()=>{if(!f)return;const S=ia(u.domReference);function E(){!l&&kp(u.domReference)&&u.domReference===Jb(Ul(u.domReference))&&(h.current=!0)}function w(){b.current=!0}function R(){b.current=!1}return S.addEventListener("blur",E),_m()&&(S.addEventListener("keydown",w,!0),S.addEventListener("pointerdown",R,!0)),()=>{S.removeEventListener("blur",E),_m()&&(S.removeEventListener("keydown",w,!0),S.removeEventListener("pointerdown",R,!0))}},[u.domReference,l,f]),y.useEffect(()=>{if(!f)return;function S(E){let{reason:w}=E;(w==="reference-press"||w==="escape-key")&&(h.current=!0)}return s.on("openchange",S),()=>{s.off("openchange",S)}},[s,f]),y.useEffect(()=>()=>{Rn(v)},[]);const x=y.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(S){if(h.current)return;const E=Pr(S.nativeEvent);if(m&&Yt(E)){if(_m()&&!S.relatedTarget){if(!b.current&&!r6(E))return}else if(!a6(E))return}a(!0,S.nativeEvent,"focus")},onBlur(S){h.current=!1;const E=S.relatedTarget,w=S.nativeEvent,R=Yt(E)&&E.hasAttribute($p("focus-guard"))&&E.getAttribute("data-type")==="outside";v.current=window.setTimeout(()=>{var M;const O=Jb(u.domReference?u.domReference.ownerDocument:document);!E&&O===u.domReference||yi((M=c.current.floatingContext)==null?void 0:M.refs.floating.current,O)||yi(u.domReference,O)||R||a(!1,w,"focus")})}}),[c,u.domReference,a,m]);return y.useMemo(()=>f?{reference:x}:{},[f,x])}function Nm(t,o,l){const a=new Map,s=l==="item";let c=t;if(s&&t){const{[Wb]:u,[ey]:f,...m}=t;c=m}return{...l==="floating"&&{tabIndex:-1,[p6]:""},...c,...o.map(u=>{const f=u?u[l]:null;return typeof f=="function"?t?f(t):null:f}).concat(t).reduce((u,f)=>(f&&Object.entries(f).forEach(m=>{let[h,v]=m;if(!(s&&[Wb,ey].includes(h)))if(h.indexOf("on")===0){if(a.has(h)||a.set(h,[]),typeof v=="function"){var b;(b=a.get(h))==null||b.push(v),u[h]=function(){for(var x,S=arguments.length,E=new Array(S),w=0;w<S;w++)E[w]=arguments[w];return(x=a.get(h))==null?void 0:x.map(R=>R(...E)).find(R=>R!==void 0)}}}else u[h]=v}),u),{})}}function N6(t){t===void 0&&(t=[]);const o=t.map(f=>f?.reference),l=t.map(f=>f?.floating),a=t.map(f=>f?.item),s=y.useCallback(f=>Nm(f,t,"reference"),o),c=y.useCallback(f=>Nm(f,t,"floating"),l),u=y.useCallback(f=>Nm(f,t,"item"),a);return y.useMemo(()=>({getReferenceProps:s,getFloatingProps:c,getItemProps:u}),[s,c,u])}const j6=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function D6(t,o){var l,a;o===void 0&&(o={});const{open:s,elements:c,floatingId:u}=t,{enabled:f=!0,role:m="dialog"}=o,h=Dx(),v=((l=c.domReference)==null?void 0:l.id)||h,b=y.useMemo(()=>{var O;return((O=i6(c.floating))==null?void 0:O.id)||u},[c.floating,u]),x=(a=j6.get(m))!=null?a:m,E=Vp()!=null,w=y.useMemo(()=>x==="tooltip"||m==="label"?{["aria-"+(m==="label"?"labelledby":"describedby")]:s?b:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":x==="alertdialog"?"dialog":x,"aria-controls":s?b:void 0,...x==="listbox"&&{role:"combobox"},...x==="menu"&&{id:v},...x==="menu"&&E&&{role:"menuitem"},...m==="select"&&{"aria-autocomplete":"none"},...m==="combobox"&&{"aria-autocomplete":"list"}},[x,b,E,s,v,m]),R=y.useMemo(()=>{const O={id:b,...x&&{role:x}};return x==="tooltip"||m==="label"?O:{...O,...x==="menu"&&{"aria-labelledby":v}}},[x,b,v,m]),M=y.useCallback(O=>{let{active:A,selected:N}=O;const H={role:"option",...A&&{id:b+"-fui-option"}};switch(m){case"select":case"combobox":return{...H,"aria-selected":N}}return{}},[b,m]);return y.useMemo(()=>f?{reference:w,floating:R,item:M}:{},[f,w,R,M])}var Lx={root:"m_87cf2631"};const H6={__staticSelector:"UnstyledButton"},bl=Ht((t,o)=>{const l=ue("UnstyledButton",H6,t),{className:a,component:s="button",__staticSelector:c,unstyled:u,classNames:f,styles:m,style:h,attributes:v,...b}=l,x=He({name:c,props:l,classes:Lx,className:a,style:h,classNames:f,styles:m,unstyled:u,attributes:v});return g.jsx(xe,{...x("root",{focusable:!0}),component:s,ref:o,type:s==="button"?"button":void 0,...b})});bl.classes=Lx;bl.displayName="@mantine/core/UnstyledButton";var zx={root:"m_515a97f8"};const Pp=Le((t,o)=>{const l=ue("VisuallyHidden",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,attributes:h,...v}=l,b=He({name:"VisuallyHidden",classes:zx,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:h});return g.jsx(xe,{component:"span",ref:o,...b("root"),...v})});Pp.classes=zx;Pp.displayName="@mantine/core/VisuallyHidden";var kx={root:"m_1b7284a3"};const L6=(t,{radius:o,shadow:l})=>({root:{"--paper-radius":o===void 0?void 0:Dt(o),"--paper-shadow":dx(l)}}),Gp=Ht((t,o)=>{const l=ue("Paper",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,withBorder:m,vars:h,radius:v,shadow:b,variant:x,mod:S,attributes:E,...w}=l,R=He({name:"Paper",props:l,classes:kx,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:E,vars:h,varsResolver:L6});return g.jsx(xe,{ref:o,mod:[{"data-with-border":m},S],...R("root"),variant:x,...w})});Gp.classes=kx;Gp.displayName="@mantine/core/Paper";function ry(t,o,l,a){return t==="center"||a==="center"?{top:o}:t==="end"?{bottom:l}:t==="start"?{top:l}:{}}function ay(t,o,l,a,s){return t==="center"||a==="center"?{left:o}:t==="end"?{[s==="ltr"?"right":"left"]:l}:t==="start"?{[s==="ltr"?"left":"right"]:l}:{}}const z6={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function k6({position:t,arrowSize:o,arrowOffset:l,arrowRadius:a,arrowPosition:s,arrowX:c,arrowY:u,dir:f}){const[m,h="center"]=t.split("-"),v={width:o,height:o,transform:"rotate(45deg)",position:"absolute",[z6[m]]:a},b=-o/2;return m==="left"?{...v,...ry(h,u,l,s),right:b,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:m==="right"?{...v,...ry(h,u,l,s),left:b,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:m==="top"?{...v,...ay(h,c,l,s,f),bottom:b,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:m==="bottom"?{...v,...ay(h,c,l,s,f),top:b,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const $c=y.forwardRef(({position:t,arrowSize:o,arrowOffset:l,arrowRadius:a,arrowPosition:s,visible:c,arrowX:u,arrowY:f,style:m,...h},v)=>{const{dir:b}=aa();return c?g.jsx("div",{...h,ref:v,style:{...m,...k6({position:t,arrowSize:o,arrowOffset:l,arrowRadius:a,arrowPosition:s,dir:b,arrowX:u,arrowY:f})}}):null});$c.displayName="@mantine/core/FloatingArrow";function Vx(t,o){if(t==="rtl"&&(o.includes("right")||o.includes("left"))){const[l,a]=o.split("-"),s=l==="right"?"left":"right";return a===void 0?s:`${s}-${a}`}return o}var Bx={root:"m_9814e45f"};const V6={zIndex:Ti("modal")},B6=(t,{gradient:o,color:l,backgroundOpacity:a,blur:s,radius:c,zIndex:u})=>({root:{"--overlay-bg":o||(l!==void 0||a!==void 0)&&Fn(l||"#000",a??.6)||void 0,"--overlay-filter":s?`blur(${le(s)})`:void 0,"--overlay-radius":c===void 0?void 0:Dt(c),"--overlay-z-index":u?.toString()}}),xi=Ht((t,o)=>{const l=ue("Overlay",V6,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,fixed:h,center:v,children:b,radius:x,zIndex:S,gradient:E,blur:w,color:R,backgroundOpacity:M,mod:O,attributes:A,...N}=l,H=He({name:"Overlay",props:l,classes:Bx,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:A,vars:m,varsResolver:B6});return g.jsx(xe,{ref:o,...H("root"),mod:[{center:v,fixed:h},O],...N,children:b})});xi.classes=Bx;xi.displayName="@mantine/core/Overlay";function jm(t){const o=document.createElement("div");return o.setAttribute("data-portal","true"),typeof t.className=="string"&&o.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(o.style,t.style),typeof t.id=="string"&&o.setAttribute("id",t.id),o}function $6({target:t,reuseTargetNode:o,...l}){if(t)return typeof t=="string"?document.querySelector(t)||jm(l):t;if(o){const a=document.querySelector("[data-mantine-shared-portal-node]");if(a)return a;const s=jm(l);return s.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(s),s}return jm(l)}const U6={reuseTargetNode:!0},$x=Le((t,o)=>{const{children:l,target:a,reuseTargetNode:s,...c}=ue("Portal",U6,t),[u,f]=y.useState(!1),m=y.useRef(null);return Oi(()=>(f(!0),m.current=$6({target:a,reuseTargetNode:s,...c}),Vc(o,m.current),!a&&!s&&m.current&&document.body.appendChild(m.current),()=>{!a&&!s&&m.current&&document.body.removeChild(m.current)}),[a]),!u||!m.current?null:kn.createPortal(g.jsx(g.Fragment,{children:l}),m.current)});$x.displayName="@mantine/core/Portal";const ea=Le(({withinPortal:t=!0,children:o,...l},a)=>fu()==="test"||!t?g.jsx(g.Fragment,{children:o}):g.jsx($x,{ref:a,...l,children:o}));ea.displayName="@mantine/core/OptionalPortal";const ci=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),sc={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...ci("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...ci("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...ci("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...ci("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...ci("top"),common:{transformOrigin:"top right"}}},iy={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function P6({transition:t,state:o,duration:l,timingFunction:a}){const s={WebkitBackfaceVisibility:"hidden",transitionDuration:`${l}ms`,transitionTimingFunction:a};return typeof t=="string"?t in sc?{transitionProperty:sc[t].transitionProperty,...s,...sc[t].common,...sc[t][iy[o]]}:{}:{transitionProperty:t.transitionProperty,...s,...t.common,...t[iy[o]]}}function G6({duration:t,exitDuration:o,timingFunction:l,mounted:a,onEnter:s,onExit:c,onEntered:u,onExited:f,enterDelay:m,exitDelay:h}){const v=Jt(),b=j9(),x=v.respectReducedMotion?b:!1,[S,E]=y.useState(x?0:t),[w,R]=y.useState(a?"entered":"exited"),M=y.useRef(-1),O=y.useRef(-1),A=y.useRef(-1);function N(){window.clearTimeout(M.current),window.clearTimeout(O.current),cancelAnimationFrame(A.current)}const H=$=>{N();const F=$?s:c,Q=$?u:f,Z=x?0:$?t:o;E(Z),Z===0?(typeof F=="function"&&F(),typeof Q=="function"&&Q(),R($?"entered":"exited")):A.current=requestAnimationFrame(()=>{Ey.flushSync(()=>{R($?"pre-entering":"pre-exiting")}),A.current=requestAnimationFrame(()=>{typeof F=="function"&&F(),R($?"entering":"exiting"),M.current=window.setTimeout(()=>{typeof Q=="function"&&Q(),R($?"entered":"exited")},Z)})})},V=$=>{if(N(),typeof($?m:h)!="number"){H($);return}O.current=window.setTimeout(()=>{H($)},$?m:h)};return vi(()=>{V(a)},[a]),y.useEffect(()=>()=>{N()},[]),{transitionDuration:S,transitionStatus:w,transitionTimingFunction:l||"ease"}}function hl({keepMounted:t,transition:o="fade",duration:l=250,exitDuration:a=l,mounted:s,children:c,timingFunction:u="ease",onExit:f,onEntered:m,onEnter:h,onExited:v,enterDelay:b,exitDelay:x}){const S=fu(),{transitionDuration:E,transitionStatus:w,transitionTimingFunction:R}=G6({mounted:s,exitDuration:a,duration:l,timingFunction:u,onExit:f,onEntered:m,onEnter:h,onExited:v,enterDelay:b,exitDelay:x});return E===0||S==="test"?s?g.jsx(g.Fragment,{children:c({})}):t?c({display:"none"}):null:w==="exited"?t?c({display:"none"}):null:g.jsx(g.Fragment,{children:c(P6({transition:o,duration:E,state:w,timingFunction:R}))})}hl.displayName="@mantine/core/Transition";const[Z6,Ux]=iu("Popover component was not found in the tree");var Px={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};function Zp({children:t,active:o=!0,refProp:l="ref",innerRef:a}){const s=gx(o),c=Un(s,a),u=Ai(t);return u?y.cloneElement(u,{[l]:c}):t}function Gx(t){return g.jsx(Pp,{tabIndex:-1,"data-autofocus":!0,...t})}Zp.displayName="@mantine/core/FocusTrap";Gx.displayName="@mantine/core/FocusTrapInitialFocus";Zp.InitialFocus=Gx;const hu=Le((t,o)=>{const l=ue("PopoverDropdown",null,t),{className:a,style:s,vars:c,children:u,onKeyDownCapture:f,variant:m,classNames:h,styles:v,...b}=l,x=Ux(),S=E9({opened:x.opened,shouldReturnFocus:x.returnFocus}),E=x.withRoles?{"aria-labelledby":x.getTargetId(),id:x.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Un(o,x.floating);return x.disabled?null:g.jsx(ea,{...x.portalProps,withinPortal:x.withinPortal,children:g.jsx(hl,{mounted:x.opened,...x.transitionProps,transition:x.transitionProps?.transition||"fade",duration:x.transitionProps?.duration??150,keepMounted:x.keepMounted,exitDuration:typeof x.transitionProps?.exitDuration=="number"?x.transitionProps.exitDuration:x.transitionProps?.duration,children:R=>g.jsx(Zp,{active:x.trapFocus&&x.opened,innerRef:w,children:g.jsxs(xe,{...E,...b,variant:m,onKeyDownCapture:h9(()=>{x.onClose?.(),x.onDismiss?.()},{active:x.closeOnEscape,onTrigger:S,onKeyDown:f}),"data-position":x.placement,"data-fixed":x.floatingStrategy==="fixed"||void 0,...x.getStyles("dropdown",{className:a,props:l,classNames:h,styles:v,style:[{...R,zIndex:x.zIndex,top:x.y??0,left:x.x??0,width:x.width==="target"?void 0:le(x.width),...x.referenceHidden?{display:"none"}:null},x.resolvedStyles.dropdown,v?.dropdown,s]}),children:[u,g.jsx($c,{ref:x.arrowRef,arrowX:x.arrowX,arrowY:x.arrowY,visible:x.withArrow,position:x.placement,arrowSize:x.arrowSize,arrowRadius:x.arrowRadius,arrowOffset:x.arrowOffset,arrowPosition:x.arrowPosition,...x.getStyles("arrow",{props:l,classNames:h,styles:v})})]})})})})});hu.classes=Px;hu.displayName="@mantine/core/PopoverDropdown";const q6={refProp:"ref",popupType:"dialog"},qp=Le((t,o)=>{const{children:l,refProp:a,popupType:s,...c}=ue("PopoverTarget",q6,t),u=Ai(l);if(!u)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=c,m=Ux(),h=Un(m.reference,_p(u),o),v=m.withRoles?{"aria-haspopup":s,"aria-expanded":m.opened,"aria-controls":m.opened?m.getDropdownId():void 0,id:m.getTargetId()}:{},b=u.props;return y.cloneElement(u,{...f,...v,...m.targetProps,className:Vo(m.targetProps.className,f.className,b.className),[a]:h,...m.controlled?null:{onClick:()=>{m.onToggle(),b.onClick?.()}}})});qp.displayName="@mantine/core/PopoverTarget";function I6(t){if(t===void 0)return{shift:!0,flip:!0};const o={...t};return t.shift===void 0&&(o.shift=!0),t.flip===void 0&&(o.flip=!0),o}function Y6(t,o,l){const a=I6(t.middlewares),s=[Zy(t.offset),m3()];return t.dropdownVisible&&l!=="test"&&t.preventPositionChangeWhenVisible&&(a.flip=!1),a.flip&&s.push(typeof a.flip=="boolean"?xc():xc(a.flip)),a.shift&&s.push(mp(typeof a.shift=="boolean"?{limiter:Z0(),padding:5}:{limiter:Z0(),padding:5,...a.shift})),a.inline&&s.push(typeof a.inline=="boolean"?ui():ui(a.inline)),s.push(qy({element:t.arrowRef,padding:t.arrowOffset})),(a.size||t.width==="target")&&s.push(d3({...typeof a.size=="boolean"?{}:a.size,apply({rects:c,availableWidth:u,availableHeight:f,...m}){const v=o().refs.floating.current?.style??{};a.size&&(typeof a.size=="object"&&a.size.apply?a.size.apply({rects:c,availableWidth:u,availableHeight:f,...m}):Object.assign(v,{maxWidth:`${u}px`,maxHeight:`${f}px`})),t.width==="target"&&Object.assign(v,{width:`${c.reference.width}px`})}})),s}function F6(t){const o=fu(),[l,a]=ra({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),s=y.useRef(l),c=()=>{l&&!t.disabled&&a(!1)},u=()=>{t.disabled||a(!l)},f=Up({strategy:t.strategy,placement:t.preventPositionChangeWhenVisible?t.positionRef.current:t.position,middleware:Y6(t,()=>f,o),whileElementsMounted:t.keepMounted?void 0:Zm});return y.useEffect(()=>{if(!(!f.refs.reference.current||!f.refs.floating.current)&&l)return Zm(f.refs.reference.current,f.refs.floating.current,f.update)},[l,f.update]),vi(()=>{t.onPositionChange?.(f.placement),t.positionRef.current=f.placement},[f.placement,t.preventPositionChangeWhenVisible]),vi(()=>{l!==s.current&&(l?t.onOpen?.():t.onClose?.()),s.current=l},[l,t.onClose,t.onOpen]),Oi(()=>{let m=-1;return l&&(m=window.setTimeout(()=>t.setDropdownVisible(!0),4)),()=>{window.clearTimeout(m)}},[l,t.position]),{floating:f,controlled:typeof t.opened=="boolean",opened:l,onClose:c,onToggle:u}}const X6={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ti("popover"),__staticSelector:"Popover",width:"max-content"},Q6=(t,{radius:o,shadow:l})=>({dropdown:{"--popover-radius":o===void 0?void 0:Dt(o),"--popover-shadow":dx(l)}});function Pn(t){const o=ue("Popover",X6,t),{children:l,position:a,offset:s,onPositionChange:c,positionDependencies:u,opened:f,transitionProps:m,onExitTransitionEnd:h,onEnterTransitionEnd:v,width:b,middlewares:x,withArrow:S,arrowSize:E,arrowOffset:w,arrowRadius:R,arrowPosition:M,unstyled:O,classNames:A,styles:N,closeOnClickOutside:H,withinPortal:V,portalProps:$,closeOnEscape:F,clickOutsideEvents:Q,trapFocus:Z,onClose:ee,onDismiss:re,onOpen:ne,onChange:j,zIndex:I,radius:L,shadow:z,id:_,defaultOpened:U,__staticSelector:X,withRoles:ae,disabled:oe,returnFocus:J,variant:ge,keepMounted:ie,vars:Ce,floatingStrategy:ze,withOverlay:Te,overlayProps:Se,hideDetached:Xe,attributes:et,preventPositionChangeWhenVisible:de,...ce}=o,me=He({name:X,props:o,classes:Px,classNames:A,styles:N,unstyled:O,attributes:et,rootSelector:"dropdown",vars:Ce,varsResolver:Q6}),{resolvedStyles:ke}=du({classNames:A,styles:N,props:o}),[qe,Oe]=y.useState(f??U??!1),mt=y.useRef(a),Pe=y.useRef(null),[it,kt]=y.useState(null),[pn,Wt]=y.useState(null),{dir:lt}=aa(),Fl=fu(),ma=la(_),bt=F6({middlewares:x,width:b,position:Vx(lt,a),offset:typeof s=="number"?s+(S?E/2:0):s,arrowRef:Pe,arrowOffset:w,onPositionChange:c,positionDependencies:u,opened:f,defaultOpened:U,onChange:j,onOpen:ne,onClose:ee,onDismiss:re,strategy:ze,dropdownVisible:qe,setDropdownVisible:Oe,positionRef:mt,disabled:oe,preventPositionChangeWhenVisible:de,keepMounted:ie});x9(()=>{H&&(bt.onClose(),re?.())},Q,[it,pn]);const Xl=y.useCallback(fo=>{kt(fo),bt.floating.refs.setReference(fo)},[bt.floating.refs.setReference]),Ou=y.useCallback(fo=>{Wt(fo),bt.floating.refs.setFloating(fo)},[bt.floating.refs.setFloating]),Di=y.useCallback(()=>{m?.onExited?.(),h?.(),Oe(!1),de||(mt.current=a)},[m?.onExited,h,de,a]),Au=y.useCallback(()=>{m?.onEntered?.(),v?.()},[m?.onEntered,v]);return g.jsxs(Z6,{value:{returnFocus:J,disabled:oe,controlled:bt.controlled,reference:Xl,floating:Ou,x:bt.floating.x,y:bt.floating.y,arrowX:bt.floating?.middlewareData?.arrow?.x,arrowY:bt.floating?.middlewareData?.arrow?.y,opened:bt.opened,arrowRef:Pe,transitionProps:{...m,onExited:Di,onEntered:Au},width:b,withArrow:S,arrowSize:E,arrowOffset:w,arrowRadius:R,arrowPosition:M,placement:bt.floating.placement,trapFocus:Z,withinPortal:V,portalProps:$,zIndex:I,radius:L,shadow:z,closeOnEscape:F,onDismiss:re,onClose:bt.onClose,onToggle:bt.onToggle,getTargetId:()=>`${ma}-target`,getDropdownId:()=>`${ma}-dropdown`,withRoles:ae,targetProps:ce,__staticSelector:X,classNames:A,styles:N,unstyled:O,variant:ge,keepMounted:ie,getStyles:me,resolvedStyles:ke,floatingStrategy:ze,referenceHidden:Xe&&Fl!=="test"?bt.floating.middlewareData.hide?.referenceHidden:!1},children:[l,Te&&g.jsx(hl,{transition:"fade",mounted:bt.opened,duration:m?.duration||250,exitDuration:m?.exitDuration||250,children:fo=>g.jsx(ea,{withinPortal:V,children:g.jsx(xi,{...Se,...me("overlay",{className:Se?.className,style:[fo,Se?.style]})})})})]})}Pn.Target=qp;Pn.Dropdown=hu;Pn.displayName="@mantine/core/Popover";Pn.extend=t=>t;var Ln={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Zx=y.forwardRef(({className:t,...o},l)=>g.jsxs(xe,{component:"span",className:Vo(Ln.barsLoader,t),...o,ref:l,children:[g.jsx("span",{className:Ln.bar}),g.jsx("span",{className:Ln.bar}),g.jsx("span",{className:Ln.bar})]}));Zx.displayName="@mantine/core/Bars";const qx=y.forwardRef(({className:t,...o},l)=>g.jsxs(xe,{component:"span",className:Vo(Ln.dotsLoader,t),...o,ref:l,children:[g.jsx("span",{className:Ln.dot}),g.jsx("span",{className:Ln.dot}),g.jsx("span",{className:Ln.dot})]}));qx.displayName="@mantine/core/Dots";const Ix=y.forwardRef(({className:t,...o},l)=>g.jsx(xe,{component:"span",className:Vo(Ln.ovalLoader,t),...o,ref:l}));Ix.displayName="@mantine/core/Oval";const Yx={bars:Zx,oval:Ix,dots:qx},K6={loaders:Yx,type:"oval"},J6=(t,{size:o,color:l})=>({root:{"--loader-size":Je(o,"loader-size"),"--loader-color":l?ko(l,t):void 0}}),yl=Le((t,o)=>{const l=ue("Loader",K6,t),{size:a,color:s,type:c,vars:u,className:f,style:m,classNames:h,styles:v,unstyled:b,loaders:x,variant:S,children:E,attributes:w,...R}=l,M=He({name:"Loader",props:l,classes:Ln,className:f,style:m,classNames:h,styles:v,unstyled:b,attributes:w,vars:u,varsResolver:J6});return E?g.jsx(xe,{...M("root"),ref:o,...R,children:E}):g.jsx(xe,{...M("root"),ref:o,component:x[c],variant:S,size:a,...R})});yl.defaultLoaders=Yx;yl.classes=Ln;yl.displayName="@mantine/core/Loader";var sa={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const sy={orientation:"horizontal"},W6=(t,{borderWidth:o})=>({group:{"--ai-border-width":le(o)}}),Ip=Le((t,o)=>{const l=ue("ActionIconGroup",sy,t),{className:a,style:s,classNames:c,styles:u,unstyled:f,orientation:m,vars:h,borderWidth:v,variant:b,mod:x,attributes:S,...E}=ue("ActionIconGroup",sy,t),w=He({name:"ActionIconGroup",props:l,classes:sa,className:a,style:s,classNames:c,styles:u,unstyled:f,attributes:S,vars:h,varsResolver:W6,rootSelector:"group"});return g.jsx(xe,{...w("group"),ref:o,variant:b,mod:[{"data-orientation":m},x],role:"group",...E})});Ip.classes=sa;Ip.displayName="@mantine/core/ActionIconGroup";const eM=(t,{radius:o,color:l,gradient:a,variant:s,autoContrast:c,size:u})=>{const f=t.variantColorResolver({color:l||t.primaryColor,theme:t,gradient:a,variant:s||"filled",autoContrast:c});return{groupSection:{"--section-height":Je(u,"section-height"),"--section-padding-x":Je(u,"section-padding-x"),"--section-fz":Kt(u),"--section-radius":o===void 0?void 0:Dt(o),"--section-bg":l||s?f.background:void 0,"--section-color":f.color,"--section-bd":l||s?f.border:void 0}}},Yp=Le((t,o)=>{const l=ue("ActionIconGroupSection",null,t),{className:a,style:s,classNames:c,styles:u,unstyled:f,vars:m,variant:h,gradient:v,radius:b,autoContrast:x,attributes:S,...E}=l,w=He({name:"ActionIconGroupSection",props:l,classes:sa,className:a,style:s,classNames:c,styles:u,unstyled:f,attributes:S,vars:m,varsResolver:eM,rootSelector:"groupSection"});return g.jsx(xe,{...w("groupSection"),ref:o,variant:h,...E})});Yp.classes=sa;Yp.displayName="@mantine/core/ActionIconGroupSection";const tM=(t,{size:o,radius:l,variant:a,gradient:s,color:c,autoContrast:u})=>{const f=t.variantColorResolver({color:c||t.primaryColor,theme:t,gradient:s,variant:a||"filled",autoContrast:u});return{root:{"--ai-size":Je(o,"ai-size"),"--ai-radius":l===void 0?void 0:Dt(l),"--ai-bg":c||a?f.background:void 0,"--ai-hover":c||a?f.hover:void 0,"--ai-hover-color":c||a?f.hoverColor:void 0,"--ai-color":f.color,"--ai-bd":c||a?f.border:void 0}}},Yl=Ht((t,o)=>{const l=ue("ActionIcon",null,t),{className:a,unstyled:s,variant:c,classNames:u,styles:f,style:m,loading:h,loaderProps:v,size:b,color:x,radius:S,__staticSelector:E,gradient:w,vars:R,children:M,disabled:O,"data-disabled":A,autoContrast:N,mod:H,attributes:V,...$}=l,F=He({name:["ActionIcon",E],props:l,className:a,style:m,classes:sa,classNames:u,styles:f,unstyled:s,attributes:V,vars:R,varsResolver:tM});return g.jsxs(bl,{...F("root",{active:!O&&!h&&!A}),...$,unstyled:s,variant:c,size:b,disabled:O||h,ref:o,mod:[{loading:h,disabled:O||A},H],children:[typeof h=="boolean"&&g.jsx(hl,{mounted:h,transition:"slide-down",duration:150,children:Q=>g.jsx(xe,{component:"span",...F("loader",{style:Q}),"aria-hidden":!0,children:g.jsx(yl,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...v})})}),g.jsx(xe,{component:"span",mod:{loading:h},...F("icon"),children:M})]})});Yl.classes=sa;Yl.displayName="@mantine/core/ActionIcon";Yl.Group=Ip;Yl.GroupSection=Yp;const Fx=y.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:o,...l},a)=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...o,width:t,height:t},ref:a,...l,children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));Fx.displayName="@mantine/core/CloseIcon";var Xx={root:"m_86a44da5","root--subtle":"m_220c80f2"};const nM={variant:"subtle"},oM=(t,{size:o,radius:l,iconSize:a})=>({root:{"--cb-size":Je(o,"cb-size"),"--cb-radius":l===void 0?void 0:Dt(l),"--cb-icon-size":le(a)}}),gu=Ht((t,o)=>{const l=ue("CloseButton",nM,t),{iconSize:a,children:s,vars:c,radius:u,className:f,classNames:m,style:h,styles:v,unstyled:b,"data-disabled":x,disabled:S,variant:E,icon:w,mod:R,attributes:M,__staticSelector:O,...A}=l,N=He({name:O||"CloseButton",props:l,className:f,style:h,classes:Xx,classNames:m,styles:v,unstyled:b,attributes:M,vars:c,varsResolver:oM});return g.jsxs(bl,{ref:o,...A,unstyled:b,variant:E,disabled:S,mod:[{disabled:S||x},R],...N("root",{variant:E,active:!S&&!x}),children:[w||g.jsx(Fx,{}),s]})});gu.classes=Xx;gu.displayName="@mantine/core/CloseButton";function lM(t){return y.Children.toArray(t).filter(Boolean)}var Qx={root:"m_4081bf90"};const rM={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},aM=(t,{grow:o,preventGrowOverflow:l,gap:a,align:s,justify:c,wrap:u},{childWidth:f})=>({root:{"--group-child-width":o&&l?f:void 0,"--group-gap":Mi(a),"--group-align":s,"--group-justify":c,"--group-wrap":u}}),At=Le((t,o)=>{const l=ue("Group",rM,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,children:m,gap:h,align:v,justify:b,wrap:x,grow:S,preventGrowOverflow:E,vars:w,variant:R,__size:M,mod:O,attributes:A,...N}=l,H=lM(m),V=H.length,$=Mi(h??"md"),Q={childWidth:`calc(${100/V}% - (${$} - ${$} / ${V}))`},Z=He({name:"Group",props:l,stylesCtx:Q,className:s,style:c,classes:Qx,classNames:a,styles:u,unstyled:f,attributes:A,vars:w,varsResolver:aM});return g.jsx(xe,{...Z("root"),ref:o,variant:R,mod:[{grow:S},O],size:M,...N,children:H})});At.classes=Qx;At.displayName="@mantine/core/Group";const[iM,sM]=su({size:"sm"});var An={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const Kx=Le((t,o)=>{const l=ue("InputClearButton",null,t),{size:a,variant:s,vars:c,classNames:u,styles:f,...m}=l,h=sM(),{resolvedClassNames:v,resolvedStyles:b}=du({classNames:u,styles:f,props:l});return g.jsx(gu,{variant:s||"transparent",ref:o,size:a||h?.size||"sm",classNames:v,styles:b,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...m.style},...m})});Kx.displayName="@mantine/core/InputClearButton";const cM={xs:7,sm:8,md:10,lg:12,xl:15};function uM({__clearable:t,__clearSection:o,rightSection:l,__defaultRightSection:a,size:s="sm"}){const c=t&&o;return c&&(l||a)?g.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:cM[s]},children:[c,l||a]}):l===null?null:l||c||a}const[fM,vu]=su({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),dM=(t,{size:o})=>({description:{"--input-description-size":o===void 0?void 0:`calc(${Kt(o)} - ${le(2)})`}}),bu=Le((t,o)=>{const l=ue("InputDescription",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,size:h,__staticSelector:v,__inheritStyles:b=!0,attributes:x,variant:S,...E}=ue("InputDescription",null,l),w=vu(),R=He({name:["InputWrapper",v],props:l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:x,rootSelector:"description",vars:m,varsResolver:dM}),M=b&&w?.getStyles||R;return g.jsx(xe,{component:"p",ref:o,variant:S,size:h,...M("description",w?.getStyles?{className:s,style:c}:void 0),...E})});bu.classes=An;bu.displayName="@mantine/core/InputDescription";const mM=(t,{size:o})=>({error:{"--input-error-size":o===void 0?void 0:`calc(${Kt(o)} - ${le(2)})`}}),yu=Le((t,o)=>{const l=ue("InputError",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,size:h,attributes:v,__staticSelector:b,__inheritStyles:x=!0,variant:S,...E}=l,w=He({name:["InputWrapper",b],props:l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:v,rootSelector:"error",vars:m,varsResolver:mM}),R=vu(),M=x&&R?.getStyles||w;return g.jsx(xe,{component:"p",ref:o,variant:S,size:h,...M("error",R?.getStyles?{className:s,style:c}:void 0),...E})});yu.classes=An;yu.displayName="@mantine/core/InputError";const cy={labelElement:"label"},pM=(t,{size:o})=>({label:{"--input-label-size":Kt(o),"--input-asterisk-color":void 0}}),xu=Le((t,o)=>{const l=ue("InputLabel",cy,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,labelElement:h,size:v,required:b,htmlFor:x,onMouseDown:S,children:E,__staticSelector:w,variant:R,mod:M,attributes:O,...A}=ue("InputLabel",cy,l),N=He({name:["InputWrapper",w],props:l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:O,rootSelector:"label",vars:m,varsResolver:pM}),H=vu(),V=H?.getStyles||N;return g.jsxs(xe,{...V("label",H?.getStyles?{className:s,style:c}:void 0),component:h,variant:R,size:v,ref:o,htmlFor:h==="label"?x:void 0,mod:[{required:b},M],onMouseDown:$=>{S?.($),!$.defaultPrevented&&$.detail>1&&$.preventDefault()},...A,children:[E,b&&g.jsx("span",{...V("required"),"aria-hidden":!0,children:" *"})]})});xu.classes=An;xu.displayName="@mantine/core/InputLabel";const Fp=Le((t,o)=>{const l=ue("InputPlaceholder",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,__staticSelector:h,variant:v,error:b,mod:x,attributes:S,...E}=l,w=He({name:["InputPlaceholder",h],props:l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:S,rootSelector:"placeholder"});return g.jsx(xe,{...w("placeholder"),mod:[{error:!!b},x],component:"span",variant:v,ref:o,...E})});Fp.classes=An;Fp.displayName="@mantine/core/InputPlaceholder";function hM(t,{hasDescription:o,hasError:l}){const a=t.findIndex(m=>m==="input"),s=t.slice(0,a),c=t.slice(a+1),u=o&&s.includes("description")||l&&s.includes("error");return{offsetBottom:o&&c.includes("description")||l&&c.includes("error"),offsetTop:u}}const gM={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},vM=(t,{size:o})=>({label:{"--input-label-size":Kt(o),"--input-asterisk-color":void 0},error:{"--input-error-size":o===void 0?void 0:`calc(${Kt(o)} - ${le(2)})`},description:{"--input-description-size":o===void 0?void 0:`calc(${Kt(o)} - ${le(2)})`}}),Xp=Le((t,o)=>{const l=ue("InputWrapper",gM,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,size:h,variant:v,__staticSelector:b,inputContainer:x,inputWrapperOrder:S,label:E,error:w,description:R,labelProps:M,descriptionProps:O,errorProps:A,labelElement:N,children:H,withAsterisk:V,id:$,required:F,__stylesApiProps:Q,mod:Z,attributes:ee,...re}=l,ne=He({name:["InputWrapper",b],props:Q||l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:ee,vars:m,varsResolver:vM}),j={size:h,variant:v,__staticSelector:b},I=la($),L=typeof V=="boolean"?V:F,z=A?.id||`${I}-error`,_=O?.id||`${I}-description`,U=I,X=!!w&&typeof w!="boolean",ae=!!R,oe=`${X?z:""} ${ae?_:""}`,J=oe.trim().length>0?oe.trim():void 0,ge=M?.id||`${I}-label`,ie=E&&g.jsx(xu,{labelElement:N,id:ge,htmlFor:U,required:L,...j,...M,children:E},"label"),Ce=ae&&g.jsx(bu,{...O,...j,size:O?.size||j.size,id:O?.id||_,children:R},"description"),ze=g.jsx(y.Fragment,{children:x(H)},"input"),Te=X&&y.createElement(yu,{...A,...j,size:A?.size||j.size,key:"error",id:A?.id||z},w),Se=S.map(Xe=>{switch(Xe){case"label":return ie;case"input":return ze;case"description":return Ce;case"error":return Te;default:return null}});return g.jsx(fM,{value:{getStyles:ne,describedBy:J,inputId:U,labelId:ge,...hM(S,{hasDescription:ae,hasError:X})},children:g.jsx(xe,{ref:o,variant:v,size:h,mod:[{error:!!w},Z],...ne("root"),...re,children:Se})})});Xp.classes=An;Xp.displayName="@mantine/core/InputWrapper";const bM={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm"},yM=(t,o,l)=>({wrapper:{"--input-margin-top":l.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":l.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Je(o.size,"input-height"),"--input-fz":Kt(o.size),"--input-radius":o.radius===void 0?void 0:Dt(o.radius),"--input-left-section-width":o.leftSectionWidth!==void 0?le(o.leftSectionWidth):void 0,"--input-right-section-width":o.rightSectionWidth!==void 0?le(o.rightSectionWidth):void 0,"--input-padding-y":o.multiline?Je(o.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":o.leftSectionPointerEvents,"--input-right-section-pointer-events":o.rightSectionPointerEvents}}),mn=Ht((t,o)=>{const l=ue("Input",bM,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,required:m,__staticSelector:h,__stylesApiProps:v,size:b,wrapperProps:x,error:S,disabled:E,leftSection:w,leftSectionProps:R,leftSectionWidth:M,rightSection:O,rightSectionProps:A,rightSectionWidth:N,rightSectionPointerEvents:H,leftSectionPointerEvents:V,variant:$,vars:F,pointer:Q,multiline:Z,radius:ee,id:re,withAria:ne,withErrorStyles:j,mod:I,inputSize:L,attributes:z,__clearSection:_,__clearable:U,__defaultRightSection:X,...ae}=l,{styleProps:oe,rest:J}=mu(ae),ge=vu(),ie={offsetBottom:ge?.offsetBottom,offsetTop:ge?.offsetTop},Ce=He({name:["Input",h],props:v||l,classes:An,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:z,stylesCtx:ie,rootSelector:"wrapper",vars:F,varsResolver:yM}),ze=ne?{required:m,disabled:E,"aria-invalid":!!S,"aria-describedby":ge?.describedBy,id:ge?.inputId||re}:{},Te=uM({__clearable:U,__clearSection:_,rightSection:O,__defaultRightSection:X,size:b});return g.jsx(iM,{value:{size:b||"sm"},children:g.jsxs(xe,{...Ce("wrapper"),...oe,...x,mod:[{error:!!S&&j,pointer:Q,disabled:E,multiline:Z,"data-with-right-section":!!Te,"data-with-left-section":!!w},I],variant:$,size:b,children:[w&&g.jsx("div",{...R,"data-position":"left",...Ce("section",{className:R?.className,style:R?.style}),children:w}),g.jsx(xe,{component:"input",...J,...ze,ref:o,required:m,mod:{disabled:E,error:!!S&&j},variant:$,__size:L,...Ce("input")}),Te&&g.jsx("div",{...A,"data-position":"right",...Ce("section",{className:A?.className,style:A?.style}),children:Te})]})})});mn.classes=An;mn.Wrapper=Xp;mn.Label=xu;mn.Error=yu;mn.Description=bu;mn.Placeholder=Fp;mn.ClearButton=Kx;mn.displayName="@mantine/core/Input";function xM(t,o,l){const a=ue(t,o,l),{label:s,description:c,error:u,required:f,classNames:m,styles:h,className:v,unstyled:b,__staticSelector:x,__stylesApiProps:S,errorProps:E,labelProps:w,descriptionProps:R,wrapperProps:M,id:O,size:A,style:N,inputContainer:H,inputWrapperOrder:V,withAsterisk:$,variant:F,vars:Q,mod:Z,attributes:ee,...re}=a,{styleProps:ne,rest:j}=mu(re),I={label:s,description:c,error:u,required:f,classNames:m,className:v,__staticSelector:x,__stylesApiProps:S||a,errorProps:E,labelProps:w,descriptionProps:R,unstyled:b,styles:h,size:A,style:N,inputContainer:H,inputWrapperOrder:V,withAsterisk:$,variant:F,id:O,mod:Z,attributes:ee,...M};return{...j,classNames:m,styles:h,unstyled:b,wrapperProps:{...I,...ne},inputProps:{required:f,classNames:m,styles:h,unstyled:b,size:A,__staticSelector:x,__stylesApiProps:S||a,error:u,variant:F,id:O,attributes:ee}}}const SM={__staticSelector:"InputBase",withAria:!0,size:"sm"},ca=Ht((t,o)=>{const{inputProps:l,wrapperProps:a,...s}=xM("InputBase",SM,t);return g.jsx(mn.Wrapper,{...a,children:g.jsx(mn,{...l,...s,ref:o})})});ca.classes={...mn.classes,...mn.Wrapper.classes};ca.displayName="@mantine/core/InputBase";const CM={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var Jx={root:"m_8bffd616"};const Qp=Ht((t,o)=>{const l=ue("Flex",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,gap:h,rowGap:v,columnGap:b,align:x,justify:S,wrap:E,direction:w,attributes:R,...M}=l,O=He({name:"Flex",classes:Jx,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:R,vars:m}),A=Jt(),N=Rx(),H=Ex({styleProps:{gap:h,rowGap:v,columnGap:b,align:x,justify:S,wrap:E,direction:w},theme:A,data:CM});return g.jsxs(g.Fragment,{children:[H.hasResponsiveStyles&&g.jsx(wx,{selector:`.${N}`,styles:H.styles,media:H.media}),g.jsx(xe,{ref:o,...O("root",{className:N,style:au(H.inlineStyles)}),...M})]})});Qp.classes=Jx;Qp.displayName="@mantine/core/Flex";function Wx({open:t,close:o,openDelay:l,closeDelay:a}){const s=y.useRef(-1),c=y.useRef(-1),u=()=>{window.clearTimeout(s.current),window.clearTimeout(c.current)},f=()=>{u(),l===0||l===void 0?t():s.current=window.setTimeout(t,l)},m=()=>{u(),a===0||a===void 0?o():c.current=window.setTimeout(o,a)};return y.useEffect(()=>u,[]),{openDropdown:f,closeDropdown:m}}function eS({style:t,size:o=16,...l}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:le(o),height:le(o),display:"block"},...l,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}eS.displayName="@mantine/core/AccordionChevron";var tS={root:"m_b6d8b162"};function wM(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const EM={inherit:!1},RM=(t,{variant:o,lineClamp:l,gradient:a,size:s,color:c})=>({root:{"--text-fz":Kt(s),"--text-lh":g9(s),"--text-gradient":o==="gradient"?Wm(a,t):void 0,"--text-line-clamp":typeof l=="number"?l.toString():void 0,"--text-color":c?ko(c,t):void 0}}),so=Ht((t,o)=>{const l=ue("Text",EM,t),{lineClamp:a,truncate:s,inline:c,inherit:u,gradient:f,span:m,__staticSelector:h,vars:v,className:b,style:x,classNames:S,styles:E,unstyled:w,variant:R,mod:M,size:O,attributes:A,...N}=l,H=He({name:["Text",h],props:l,classes:tS,className:b,style:x,classNames:S,styles:E,unstyled:w,attributes:A,vars:v,varsResolver:RM});return g.jsx(xe,{...H("root",{focusable:!0}),ref:o,component:m?"span":"p",variant:R,mod:[{"data-truncate":wM(s),"data-line-clamp":typeof a=="number","data-inline":c,"data-inherit":u},M],size:O,...N})});so.classes=tS;so.displayName="@mantine/core/Text";function Kp({size:t,style:o,...l}){const a=t!==void 0?{width:le(t),height:le(t),...o}:o;return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:a,"aria-hidden":!0,...l,children:g.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var Su={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const nS=y.createContext(null),TM=nS.Provider;function MM(){return{withinGroup:!!y.useContext(nS)}}const OM=(t,{spacing:o})=>({group:{"--ag-spacing":Mi(o)}}),Jp=Le((t,o)=>{const l=ue("AvatarGroup",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,spacing:h,attributes:v,...b}=l,x=He({name:"AvatarGroup",classes:Su,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:v,vars:m,varsResolver:OM,rootSelector:"group"});return g.jsx(TM,{value:!0,children:g.jsx(xe,{ref:o,...x("group"),...b})})});Jp.classes=Su;Jp.displayName="@mantine/core/AvatarGroup";function AM(t){return g.jsx("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function _M(t){let o=0;for(let l=0;l<t.length;l+=1){const a=t.charCodeAt(l);o=(o<<5)-o+a,o|=0}return o}const NM=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function jM(t,o=NM){const l=_M(t),a=Math.abs(l)%o.length;return o[a]}function DM(t,o=2){const l=t.split(" ");return l.length===1?t.slice(0,o).toUpperCase():l.map(a=>a[0]).slice(0,o).join("").toUpperCase()}const HM=(t,{size:o,radius:l,variant:a,gradient:s,color:c,autoContrast:u,name:f,allowedInitialsColors:m})=>{const h=c==="initials"&&typeof f=="string"?jM(f,m):c,v=t.variantColorResolver({color:h||"gray",theme:t,gradient:s,variant:a||"light",autoContrast:u});return{root:{"--avatar-size":Je(o,"avatar-size"),"--avatar-radius":l===void 0?void 0:Dt(l),"--avatar-bg":h||a?v.background:void 0,"--avatar-color":h||a?v.color:void 0,"--avatar-bd":h||a?v.border:void 0}}},Cu=Ht((t,o)=>{const l=ue("Avatar",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,src:h,alt:v,radius:b,color:x,gradient:S,imageProps:E,children:w,autoContrast:R,mod:M,name:O,allowedInitialsColors:A,attributes:N,...H}=l,V=MM(),[$,F]=y.useState(!h),Q=He({name:"Avatar",props:l,classes:Su,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:N,vars:m,varsResolver:HM});return y.useEffect(()=>F(!h),[h]),g.jsx(xe,{...Q("root"),mod:[{"within-group":V.withinGroup},M],ref:o,...H,children:$||!h?g.jsx("span",{...Q("placeholder"),title:v,children:w||typeof O=="string"&&DM(O)||g.jsx(AM,{})}):g.jsx("img",{...E,...Q("image"),src:h,alt:v,onError:Z=>{F(!0),E?.onError?.(Z)}})})});Cu.classes=Su;Cu.displayName="@mantine/core/Avatar";Cu.Group=Jp;var oS={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const LM=(t,{radius:o,color:l,gradient:a,variant:s,size:c,autoContrast:u,circle:f})=>{const m=t.variantColorResolver({color:l||t.primaryColor,theme:t,gradient:a,variant:s||"filled",autoContrast:u});return{root:{"--badge-height":Je(c,"badge-height"),"--badge-padding-x":Je(c,"badge-padding-x"),"--badge-fz":Je(c,"badge-fz"),"--badge-radius":f||o===void 0?void 0:Dt(o),"--badge-bg":l||s?m.background:void 0,"--badge-color":l||s?m.color:void 0,"--badge-bd":l||s?m.border:void 0,"--badge-dot-color":s==="dot"?ko(l,t):void 0}}},Wp=Ht((t,o)=>{const l=ue("Badge",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,radius:h,color:v,gradient:b,leftSection:x,rightSection:S,children:E,variant:w,fullWidth:R,autoContrast:M,circle:O,mod:A,attributes:N,...H}=l,V=He({name:"Badge",props:l,classes:oS,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:N,vars:m,varsResolver:LM});return g.jsxs(xe,{variant:w,mod:[{block:R,circle:O,"with-right-section":!!S,"with-left-section":!!x},A],...V("root",{variant:w}),ref:o,...H,children:[x&&g.jsx("span",{...V("section"),"data-position":"left",children:x}),g.jsx("span",{...V("label"),children:E}),S&&g.jsx("span",{...V("section"),"data-position":"right",children:S})]})});Wp.classes=oS;Wp.displayName="@mantine/core/Badge";var ua={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const uy={orientation:"horizontal"},zM=(t,{borderWidth:o})=>({group:{"--button-border-width":le(o)}}),eh=Le((t,o)=>{const l=ue("ButtonGroup",uy,t),{className:a,style:s,classNames:c,styles:u,unstyled:f,orientation:m,vars:h,borderWidth:v,variant:b,mod:x,attributes:S,...E}=ue("ButtonGroup",uy,t),w=He({name:"ButtonGroup",props:l,classes:ua,className:a,style:s,classNames:c,styles:u,unstyled:f,attributes:S,vars:h,varsResolver:zM,rootSelector:"group"});return g.jsx(xe,{...w("group"),ref:o,variant:b,mod:[{"data-orientation":m},x],role:"group",...E})});eh.classes=ua;eh.displayName="@mantine/core/ButtonGroup";const kM=(t,{radius:o,color:l,gradient:a,variant:s,autoContrast:c,size:u})=>{const f=t.variantColorResolver({color:l||t.primaryColor,theme:t,gradient:a,variant:s||"filled",autoContrast:c});return{groupSection:{"--section-height":Je(u,"section-height"),"--section-padding-x":Je(u,"section-padding-x"),"--section-fz":u?.includes("compact")?Kt(u.replace("compact-","")):Kt(u),"--section-radius":o===void 0?void 0:Dt(o),"--section-bg":l||s?f.background:void 0,"--section-color":f.color,"--section-bd":l||s?f.border:void 0}}},th=Le((t,o)=>{const l=ue("ButtonGroupSection",null,t),{className:a,style:s,classNames:c,styles:u,unstyled:f,vars:m,variant:h,gradient:v,radius:b,autoContrast:x,attributes:S,...E}=l,w=He({name:"ButtonGroupSection",props:l,classes:ua,className:a,style:s,classNames:c,styles:u,unstyled:f,attributes:S,vars:m,varsResolver:kM,rootSelector:"groupSection"});return g.jsx(xe,{...w("groupSection"),ref:o,variant:h,...E})});th.classes=ua;th.displayName="@mantine/core/ButtonGroupSection";const VM={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${le(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},BM=(t,{radius:o,color:l,gradient:a,variant:s,size:c,justify:u,autoContrast:f})=>{const m=t.variantColorResolver({color:l||t.primaryColor,theme:t,gradient:a,variant:s||"filled",autoContrast:f});return{root:{"--button-justify":u,"--button-height":Je(c,"button-height"),"--button-padding-x":Je(c,"button-padding-x"),"--button-fz":c?.includes("compact")?Kt(c.replace("compact-","")):Kt(c),"--button-radius":o===void 0?void 0:Dt(o),"--button-bg":l||s?m.background:void 0,"--button-hover":l||s?m.hover:void 0,"--button-color":m.color,"--button-bd":l||s?m.border:void 0,"--button-hover-color":l||s?m.hoverColor:void 0}}},Gn=Ht((t,o)=>{const l=ue("Button",null,t),{style:a,vars:s,className:c,color:u,disabled:f,children:m,leftSection:h,rightSection:v,fullWidth:b,variant:x,radius:S,loading:E,loaderProps:w,gradient:R,classNames:M,styles:O,unstyled:A,"data-disabled":N,autoContrast:H,mod:V,attributes:$,...F}=l,Q=He({name:"Button",props:l,classes:ua,className:c,style:a,classNames:M,styles:O,unstyled:A,attributes:$,vars:s,varsResolver:BM}),Z=!!h,ee=!!v;return g.jsxs(bl,{ref:o,...Q("root",{active:!f&&!E&&!N}),unstyled:A,variant:x,disabled:f||E,mod:[{disabled:f||N,loading:E,block:b,"with-left-section":Z,"with-right-section":ee},V],...F,children:[typeof E=="boolean"&&g.jsx(hl,{mounted:E,transition:VM,duration:150,children:re=>g.jsx(xe,{component:"span",...Q("loader",{style:re}),"aria-hidden":!0,children:g.jsx(yl,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...w})})}),g.jsxs("span",{...Q("inner"),children:[h&&g.jsx(xe,{component:"span",...Q("section"),mod:{position:"left"},children:h}),g.jsx(xe,{component:"span",mod:{loading:E},...Q("label"),children:m}),v&&g.jsx(xe,{component:"span",...Q("section"),mod:{position:"right"},children:v})]})]})});Gn.classes=ua;Gn.displayName="@mantine/core/Button";Gn.Group=eh;Gn.GroupSection=th;const[$M,UM]=iu("Card component was not found in tree");var nh={root:"m_e615b15f",section:"m_599a2148"};const wu=Ht((t,o)=>{const l=ue("CardSection",null,t),{classNames:a,className:s,style:c,styles:u,vars:f,withBorder:m,inheritPadding:h,mod:v,...b}=l,x=UM();return g.jsx(xe,{ref:o,mod:[{"with-border":m,"inherit-padding":h},v],...x.getStyles("section",{className:s,style:c,styles:u,classNames:a}),...b})});wu.classes=nh;wu.displayName="@mantine/core/CardSection";const PM=(t,{padding:o})=>({root:{"--card-padding":Mi(o)}}),_i=Ht((t,o)=>{const l=ue("Card",null,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,children:h,padding:v,attributes:b,...x}=l,S=He({name:"Card",props:l,classes:nh,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:b,vars:m,varsResolver:PM}),E=y.Children.toArray(h),w=E.map((R,M)=>typeof R=="object"&&R&&"type"in R&&R.type===wu?y.cloneElement(R,{"data-first-section":M===0||void 0,"data-last-section":M===E.length-1||void 0}):R);return g.jsx($M,{value:{getStyles:S},children:g.jsx(Gp,{ref:o,unstyled:f,...S("root"),...x,children:w})})});_i.classes=nh;_i.displayName="@mantine/core/Card";_i.Section=wu;var lS={root:"m_f59ffda3",label:"m_be049a53","label--outline":"m_3904c1af","label--filled":"m_fa109255","label--light":"m_f7e165c3",iconWrapper:"m_9ac86df9",checkIcon:"m_d6d72580",input:"m_bde07329"};const[GM,ZM]=su();function rS(t){const{value:o,defaultValue:l,onChange:a,multiple:s,children:c}=ue("ChipGroup",null,t),[u,f]=ra({value:o,defaultValue:l,finalValue:s?[]:null,onChange:a}),m=v=>Array.isArray(u)?u.includes(v):v===u,h=v=>{const b=v.currentTarget.value;Array.isArray(u)?f(u.includes(b)?u.filter(x=>x!==b):[...u,b]):f(b)};return g.jsx(GM,{value:{isChipSelected:m,onChange:h,multiple:s},children:c})}rS.displayName="@mantine/core/ChipGroup";const qM={type:"checkbox"},IM=(t,{size:o,radius:l,variant:a,color:s,autoContrast:c})=>{const u=t.variantColorResolver({color:s||t.primaryColor,theme:t,variant:a||"filled",autoContrast:c});return{root:{"--chip-fz":Kt(o),"--chip-size":Je(o,"chip-size"),"--chip-radius":l===void 0?void 0:Dt(l),"--chip-checked-padding":Je(o,"chip-checked-padding"),"--chip-padding":Je(o,"chip-padding"),"--chip-icon-size":Je(o,"chip-icon-size"),"--chip-bg":s||a?u.background:void 0,"--chip-hover":s||a?u.hover:void 0,"--chip-color":s||a?u.color:void 0,"--chip-bd":s||a?u.border:void 0,"--chip-spacing":Je(o,"chip-spacing")}}},Eu=Le((t,o)=>{const l=ue("Chip",qM,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,id:h,checked:v,defaultChecked:b,onChange:x,value:S,wrapperProps:E,type:w,disabled:R,children:M,size:O,variant:A,icon:N,rootRef:H,autoContrast:V,mod:$,attributes:F,...Q}=l,Z=He({name:"Chip",classes:lS,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:F,vars:m,varsResolver:IM}),ee=ZM(),re=la(h),{styleProps:ne,rest:j}=mu(Q),[I,L]=ra({value:v,defaultValue:b,finalValue:!1,onChange:x}),z=ee?{checked:ee.isChipSelected(S),onChange:U=>{ee.onChange(U),x?.(U.currentTarget.checked)},type:ee.multiple?"checkbox":"radio"}:{},_=z.checked||I;return g.jsxs(xe,{size:O,variant:A,ref:H,mod:$,...Z("root"),...ne,...E,children:[g.jsx("input",{type:w,...Z("input"),checked:_,onChange:U=>L(U.currentTarget.checked),id:re,disabled:R,ref:o,value:S,...z,...j}),g.jsxs("label",{htmlFor:re,"data-checked":_||void 0,"data-disabled":R||void 0,...Z("label",{variant:A||"filled"}),children:[_&&N!==null&&N!==!1&&g.jsx("span",{...Z("iconWrapper"),children:N===void 0?g.jsx(Kp,{...Z("checkIcon")}):N}),g.jsx("span",{children:M})]})]})});Eu.classes=lS;Eu.displayName="@mantine/core/Chip";Eu.Group=rS;var aS={root:"m_3eebeb36",label:"m_9e365f20"};const YM={orientation:"horizontal"},FM=(t,{color:o,variant:l,size:a})=>({root:{"--divider-color":o?ko(o,t):void 0,"--divider-border-style":l,"--divider-size":Je(a,"divider-size")}}),oh=Le((t,o)=>{const l=ue("Divider",YM,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,color:h,orientation:v,label:b,labelPosition:x,mod:S,attributes:E,...w}=l,R=He({name:"Divider",classes:aS,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:E,vars:m,varsResolver:FM});return g.jsx(xe,{ref:o,mod:[{orientation:v,"with-label":!!b},S],...R("root"),...w,role:"separator",children:b&&g.jsx(xe,{component:"span",mod:{position:x},...R("label"),children:b})})});oh.classes=aS;oh.displayName="@mantine/core/Divider";const XM={multiple:!1},iS=y.forwardRef((t,o)=>{const{onChange:l,children:a,multiple:s,accept:c,name:u,form:f,resetRef:m,disabled:h,capture:v,inputProps:b,...x}=ue("FileButton",XM,t),S=y.useRef(null),E=()=>{!h&&S.current?.click()},w=M=>{if(M.currentTarget.files===null)return l(s?[]:null);l(s?Array.from(M.currentTarget.files):M.currentTarget.files[0]||null)};return Vc(m,()=>{S.current&&(S.current.value="")}),g.jsxs(g.Fragment,{children:[g.jsx("input",{style:{display:"none"},type:"file",accept:c,multiple:s,onChange:w,ref:Un(o,S),name:u,form:f,capture:v,...b}),a({onClick:E,...x})]})});iS.displayName="@mantine/core/FileButton";const QM=({value:t})=>g.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(t)?t.map(o=>o.name).join(", "):t?.name}),KM={valueComponent:QM,size:"sm"},lh=Le((t,o)=>{const l=ue("FileInput",KM,t),{unstyled:a,vars:s,onChange:c,value:u,defaultValue:f,multiple:m,accept:h,name:v,form:b,valueComponent:x,clearable:S,clearButtonProps:E,readOnly:w,capture:R,fileInputProps:M,rightSection:O,size:A,placeholder:N,component:H,resetRef:V,classNames:$,styles:F,attributes:Q,...Z}=l,ee=y.useRef(null),{resolvedClassNames:re,resolvedStyles:ne}=du({classNames:$,styles:F,props:l}),[j,I]=ra({value:u,defaultValue:f,onChange:c,finalValue:m?[]:null}),L=Array.isArray(j)?j.length!==0:j!==null,z=O||(S&&L&&!w?g.jsx(gu,{...E,variant:"subtle",onClick:()=>I(m?[]:null),size:A,unstyled:a}):null);return y.useEffect(()=>{(Array.isArray(j)&&j.length===0||j===null)&&ee.current?.()},[j]),g.jsx(iS,{onChange:I,multiple:m,accept:h,name:v,form:b,resetRef:Un(ee,V),disabled:w,capture:R,inputProps:M,children:_=>g.jsx(ca,{component:H||"button",ref:o,rightSection:z,..._,...Z,__staticSelector:"FileInput",multiline:!0,type:"button",pointer:!0,__stylesApiProps:l,unstyled:a,size:A,classNames:$,styles:F,attributes:Q,children:L?g.jsx(x,{value:j}):g.jsx(mn.Placeholder,{__staticSelector:"FileInput",classNames:re,styles:ne,attributes:Q,children:N})})})});lh.classes=ca.classes;lh.displayName="@mantine/core/FileInput";const JM=lh;var sS={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const fy={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:Ti("overlay")},WM=(t,{zIndex:o})=>({root:{"--lo-z-index":o?.toString()}}),rh=Le((t,o)=>{const l=ue("LoadingOverlay",fy,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,transitionProps:h,loaderProps:v,overlayProps:b,visible:x,zIndex:S,attributes:E,...w}=l,R=Jt(),M=He({name:"LoadingOverlay",classes:sS,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:E,vars:m,varsResolver:WM}),O={...fy.overlayProps,...b};return g.jsx(hl,{transition:"fade",...h,mounted:!!x,children:A=>g.jsxs(xe,{...M("root",{style:A}),ref:o,...w,children:[g.jsx(yl,{...M("loader"),unstyled:f,...v}),g.jsx(xi,{...O,...M("overlay"),darkHidden:!0,unstyled:f,color:b?.color||R.white}),g.jsx(xi,{...O,...M("overlay"),lightHidden:!0,unstyled:f,color:b?.color||R.colors.dark[5]})]})})});rh.classes=sS;rh.displayName="@mantine/core/LoadingOverlay";const[eO,xl]=iu("Menu component was not found in the tree");var Sl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const ah=Le((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,...f}=ue("MenuDivider",null,t),m=xl();return g.jsx(xe,{ref:o,...m.getStyles("divider",{className:a,style:s,styles:c,classNames:l}),...f})});ah.classes=Sl;ah.displayName="@mantine/core/MenuDivider";const ih=Le((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,onMouseEnter:f,onMouseLeave:m,onKeyDown:h,children:v,...b}=ue("MenuDropdown",null,t),x=y.useRef(null),S=xl(),E=Qt(h,M=>{(M.key==="ArrowUp"||M.key==="ArrowDown")&&(M.preventDefault(),x.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),w=Qt(f,()=>(S.trigger==="hover"||S.trigger==="click-hover")&&S.openDropdown()),R=Qt(m,()=>(S.trigger==="hover"||S.trigger==="click-hover")&&S.closeDropdown());return g.jsxs(Pn.Dropdown,{...b,onMouseEnter:w,onMouseLeave:R,role:"menu","aria-orientation":"vertical",ref:Un(o,x),...S.getStyles("dropdown",{className:a,style:s,styles:c,classNames:l,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:E,children:[S.withInitialFocusPlaceholder&&g.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),v]})});ih.classes=Sl;ih.displayName="@mantine/core/MenuDropdown";const[tO,Ru]=su(),sh=Ht((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,color:f,closeMenuOnClick:m,leftSection:h,rightSection:v,children:b,disabled:x,"data-disabled":S,...E}=ue("MenuItem",null,t),w=xl(),R=Ru(),M=Jt(),{dir:O}=aa(),A=y.useRef(null),N=E,H=Qt(N.onClick,()=>{S||(typeof m=="boolean"?m&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),V=f?M.variantColorResolver({color:f,theme:M,variant:"light"}):void 0,$=f?Il({color:f,theme:M}):null,F=Qt(N.onKeyDown,Q=>{Q.key==="ArrowLeft"&&R&&(R.close(),R.focusParentItem())});return g.jsxs(bl,{onMouseDown:Q=>Q.preventDefault(),...E,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:a,style:s,styles:c,classNames:l}),ref:Un(A,o),role:"menuitem",disabled:x,"data-menu-item":!0,"data-disabled":x||S||void 0,"data-mantine-stop-propagation":!0,onClick:H,onKeyDown:Ap({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:O,orientation:"vertical",onKeyDown:F}),__vars:{"--menu-item-color":$?.isThemeColor&&$?.shade===void 0?`var(--mantine-color-${$.color}-6)`:V?.color,"--menu-item-hover":V?.hover},children:[h&&g.jsx("div",{...w.getStyles("itemSection",{styles:c,classNames:l}),"data-position":"left",children:h}),b&&g.jsx("div",{...w.getStyles("itemLabel",{styles:c,classNames:l}),children:b}),v&&g.jsx("div",{...w.getStyles("itemSection",{styles:c,classNames:l}),"data-position":"right",children:v})]})});sh.classes=Sl;sh.displayName="@mantine/core/MenuItem";const ch=Le((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,...f}=ue("MenuLabel",null,t),m=xl();return g.jsx(xe,{ref:o,...m.getStyles("label",{className:a,style:s,styles:c,classNames:l}),...f})});ch.classes=Sl;ch.displayName="@mantine/core/MenuLabel";const uh=Le((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,onMouseEnter:f,onMouseLeave:m,onKeyDown:h,children:v,...b}=ue("MenuSubDropdown",null,t),x=y.useRef(null),S=xl(),E=Ru(),w=Qt(f,E?.open),R=Qt(m,E?.close);return g.jsx(Pn.Dropdown,{...b,onMouseEnter:w,onMouseLeave:R,role:"menu","aria-orientation":"vertical",ref:Un(o,x),...S.getStyles("dropdown",{className:a,style:s,styles:c,classNames:l,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:v})});uh.classes=Sl;uh.displayName="@mantine/core/MenuSubDropdown";const fh=Ht((t,o)=>{const{classNames:l,className:a,style:s,styles:c,vars:u,color:f,leftSection:m,rightSection:h,children:v,disabled:b,"data-disabled":x,closeMenuOnClick:S,...E}=ue("MenuSubItem",null,t),w=xl(),R=Ru(),M=Jt(),{dir:O}=aa(),A=y.useRef(null),N=E,H=f?M.variantColorResolver({color:f,theme:M,variant:"light"}):void 0,V=f?Il({color:f,theme:M}):null,$=Qt(N.onKeyDown,ee=>{ee.key==="ArrowRight"&&(R?.open(),R?.focusFirstItem()),ee.key==="ArrowLeft"&&R?.parentContext&&(R.parentContext.close(),R.parentContext.focusParentItem())}),F=Qt(N.onClick,()=>{!x&&S&&w.closeDropdownImmediately()}),Q=Qt(N.onMouseEnter,R?.open),Z=Qt(N.onMouseLeave,R?.close);return g.jsxs(bl,{onMouseDown:ee=>ee.preventDefault(),...E,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:a,style:s,styles:c,classNames:l}),ref:Un(A,o),role:"menuitem",disabled:b,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":b||x||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:Q,onMouseLeave:Z,onClick:F,onKeyDown:Ap({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:O,orientation:"vertical",onKeyDown:$}),__vars:{"--menu-item-color":V?.isThemeColor&&V?.shade===void 0?`var(--mantine-color-${V.color}-6)`:H?.color,"--menu-item-hover":H?.hover},children:[m&&g.jsx("div",{...w.getStyles("itemSection",{styles:c,classNames:l}),"data-position":"left",children:m}),v&&g.jsx("div",{...w.getStyles("itemLabel",{styles:c,classNames:l}),children:v}),g.jsx("div",{...w.getStyles("itemSection",{styles:c,classNames:l}),"data-position":"right",children:h||g.jsx(eS,{...w.getStyles("chevron"),size:14})})]})});fh.classes=Sl;fh.displayName="@mantine/core/MenuSubItem";function cS({children:t,refProp:o}){if(!fx(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return xl(),g.jsx(Pn.Target,{refProp:o,popupType:"menu",children:t})}cS.displayName="@mantine/core/MenuSubTarget";const nO={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function fa(t){const{children:o,closeDelay:l,openDelay:a,...s}=ue("MenuSub",nO,t),c=la(),[u,{open:f,close:m}]=H9(!1),h=Ru(),{openDropdown:v,closeDropdown:b}=Wx({open:f,close:m,closeDelay:l,openDelay:a}),x=()=>window.setTimeout(()=>{document.getElementById(`${c}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),S=()=>window.setTimeout(()=>{document.getElementById(`${c}-target`)?.focus()},16);return g.jsx(tO,{value:{opened:u,close:b,open:v,focusFirstItem:x,focusParentItem:S,parentContext:h},children:g.jsx(Pn,{opened:u,withinPortal:!1,withArrow:!1,id:c,...s,children:o})})}fa.extend=t=>t;fa.displayName="@mantine/core/MenuSub";fa.Target=cS;fa.Dropdown=uh;fa.Item=fh;const oO={refProp:"ref"},uS=y.forwardRef((t,o)=>{const{children:l,refProp:a,...s}=ue("MenuTarget",oO,t),c=Ai(l);if(!c)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=xl(),f=c.props,m=Qt(f.onClick,()=>{u.trigger==="click"?u.toggleDropdown():u.trigger==="click-hover"&&(u.setOpenedViaClick(!0),u.opened||u.openDropdown())}),h=Qt(f.onMouseEnter,()=>(u.trigger==="hover"||u.trigger==="click-hover")&&u.openDropdown()),v=Qt(f.onMouseLeave,()=>{(u.trigger==="hover"||u.trigger==="click-hover"&&!u.openedViaClick)&&u.closeDropdown()});return g.jsx(Pn.Target,{refProp:a,popupType:"menu",ref:o,...s,children:y.cloneElement(c,{onClick:m,onMouseEnter:h,onMouseLeave:v,"data-expanded":u.opened?!0:void 0})})});uS.displayName="@mantine/core/MenuTarget";const lO={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function ot(t){const o=ue("Menu",lO,t),{children:l,onOpen:a,onClose:s,opened:c,defaultOpened:u,trapFocus:f,onChange:m,closeOnItemClick:h,loop:v,closeOnEscape:b,trigger:x,openDelay:S,closeDelay:E,classNames:w,styles:R,unstyled:M,variant:O,vars:A,menuItemTabIndex:N,keepMounted:H,withInitialFocusPlaceholder:V,attributes:$,...F}=o,Q=He({name:"Menu",classes:Sl,props:o,classNames:w,styles:R,unstyled:M,attributes:$}),[Z,ee]=ra({value:c,defaultValue:u,finalValue:!1,onChange:m}),[re,ne]=y.useState(!1),j=()=>{ee(!1),ne(!1),Z&&s?.()},I=()=>{ee(!0),!Z&&a?.()},L=()=>{Z?j():I()},{openDropdown:z,closeDropdown:_}=Wx({open:I,close:j,closeDelay:E,openDelay:S}),U=oe=>v9("[data-menu-item]","[data-menu-dropdown]",oe),{resolvedClassNames:X,resolvedStyles:ae}=du({classNames:w,styles:R,props:o});return g.jsx(eO,{value:{getStyles:Q,opened:Z,toggleDropdown:L,getItemIndex:U,openedViaClick:re,setOpenedViaClick:ne,closeOnItemClick:h,closeDropdown:x==="click"?j:_,openDropdown:x==="click"?I:z,closeDropdownImmediately:j,loop:v,trigger:x,unstyled:M,menuItemTabIndex:N,withInitialFocusPlaceholder:V},children:g.jsx(Pn,{returnFocus:!0,...F,opened:Z,onChange:L,defaultOpened:u,trapFocus:H?!1:f,closeOnEscape:b,__staticSelector:"Menu",classNames:X,styles:ae,unstyled:M,variant:O,keepMounted:H,children:l})})}ot.extend=t=>t;ot.withProps=qT(ot);ot.classes=Sl;ot.displayName="@mantine/core/Menu";ot.Item=sh;ot.Label=ch;ot.Dropdown=ih;ot.Target=uS;ot.Divider=ah;ot.Sub=fa;const rO={duration:100,transition:"fade"};function dy(t,o){return{...rO,...o,...t}}var Tu={tooltip:"m_1b3c8819",arrow:"m_f898399f"};function aO({offset:t,position:o,defaultOpened:l}){const[a,s]=y.useState(l),c=y.useRef(null),{x:u,y:f,elements:m,refs:h,update:v,placement:b}=Up({placement:o,middleware:[mp({crossAxis:!0,padding:5,rootBoundary:"document"})]}),x=b.includes("right")?t:o.includes("left")?t*-1:0,S=b.includes("bottom")?t:o.includes("top")?t*-1:0,E=y.useCallback(({clientX:w,clientY:R})=>{h.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:R,left:w+x,top:R+S,right:w,bottom:R}}})},[m.reference]);return y.useEffect(()=>{if(h.floating.current){const w=c.current;w.addEventListener("mousemove",E);const R=Ho(h.floating.current);return R.forEach(M=>{M.addEventListener("scroll",v)}),()=>{w.removeEventListener("mousemove",E),R.forEach(M=>{M.removeEventListener("scroll",v)})}}},[m.reference,h.floating.current,v,E,a]),{handleMouseMove:E,x:u,y:f,opened:a,setOpened:s,boundaryRef:c,floating:h.setFloating}}const iO={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ti("popover")},sO=(t,{radius:o,color:l})=>({tooltip:{"--tooltip-radius":o===void 0?void 0:Dt(o),"--tooltip-bg":l?ko(l,t):void 0,"--tooltip-color":l?"var(--mantine-color-white)":void 0}}),dh=Le((t,o)=>{const l=ue("TooltipFloating",iO,t),{children:a,refProp:s,withinPortal:c,style:u,className:f,classNames:m,styles:h,unstyled:v,radius:b,color:x,label:S,offset:E,position:w,multiline:R,zIndex:M,disabled:O,defaultOpened:A,variant:N,vars:H,portalProps:V,attributes:$,...F}=l,Q=Jt(),Z=He({name:"TooltipFloating",props:l,classes:Tu,className:f,style:u,classNames:m,styles:h,unstyled:v,attributes:$,rootSelector:"tooltip",vars:H,varsResolver:sO}),{handleMouseMove:ee,x:re,y:ne,opened:j,boundaryRef:I,floating:L,setOpened:z}=aO({offset:E,position:w,defaultOpened:A}),_=Ai(a);if(!_)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const U=Un(I,_p(_),o),X=_.props,ae=J=>{X.onMouseEnter?.(J),ee(J),z(!0)},oe=J=>{X.onMouseLeave?.(J),z(!1)};return g.jsxs(g.Fragment,{children:[g.jsx(ea,{...V,withinPortal:c,children:g.jsx(xe,{...F,...Z("tooltip",{style:{...Tx(u,Q),zIndex:M,display:!O&&j?"block":"none",top:(ne&&Math.round(ne))??"",left:(re&&Math.round(re))??""}}),variant:N,ref:L,mod:{multiline:R},children:S})}),y.cloneElement(_,{...X,[s]:U,onMouseEnter:ae,onMouseLeave:oe})]})});dh.classes=Tu;dh.displayName="@mantine/core/TooltipFloating";const fS=y.createContext(!1),cO=fS.Provider,uO=()=>y.useContext(fS),fO={openDelay:0,closeDelay:0};function mh(t){const{openDelay:o,closeDelay:l,children:a}=ue("TooltipGroup",fO,t);return g.jsx(cO,{value:!0,children:g.jsx(E6,{delay:{open:o,close:l},children:a})})}mh.displayName="@mantine/core/TooltipGroup";mh.extend=t=>t;function dO(t){if(t===void 0)return{shift:!0,flip:!0};const o={...t};return t.shift===void 0&&(o.shift=!0),t.flip===void 0&&(o.flip=!0),o}function mO(t){const o=dO(t.middlewares),l=[Zy(t.offset)];return o.shift&&l.push(mp(typeof o.shift=="boolean"?{padding:8}:{padding:8,...o.shift})),o.flip&&l.push(typeof o.flip=="boolean"?xc():xc(o.flip)),l.push(qy({element:t.arrowRef,padding:t.arrowOffset})),o.inline?l.push(typeof o.inline=="boolean"?ui():ui(o.inline)):t.inline&&l.push(ui()),l}function pO(t){const[o,l]=y.useState(t.defaultOpened),s=typeof t.opened=="boolean"?t.opened:o,c=uO(),u=la(),f=y.useCallback(H=>{l(H),H&&M(u)},[u]),{x:m,y:h,context:v,refs:b,placement:x,middlewareData:{arrow:{x:S,y:E}={}}}=Up({strategy:t.strategy,placement:t.position,open:s,onOpenChange:f,middleware:mO(t),whileElementsMounted:Zm}),{delay:w,currentId:R,setCurrentId:M}=R6(v,{id:u}),{getReferenceProps:O,getFloatingProps:A}=N6([C6(v,{enabled:t.events?.hover,delay:c?w:{open:t.openDelay,close:t.closeDelay},mouseOnly:!t.events?.touch}),_6(v,{enabled:t.events?.focus,visibleOnly:!0}),D6(v,{role:"tooltip"}),O6(v,{enabled:typeof t.opened>"u"})]);vi(()=>{t.onPositionChange?.(x)},[x]);const N=s&&R&&R!==u;return{x:m,y:h,arrowX:S,arrowY:E,reference:b.setReference,floating:b.setFloating,getFloatingProps:A,getReferenceProps:O,isGroupPhase:N,opened:s,placement:x}}const my={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Ti("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},hO=(t,{radius:o,color:l,variant:a,autoContrast:s})=>{const c=t.variantColorResolver({theme:t,color:l||t.primaryColor,autoContrast:s,variant:a||"filled"});return{tooltip:{"--tooltip-radius":o===void 0?void 0:Dt(o),"--tooltip-bg":l?c.background:void 0,"--tooltip-color":l?c.color:void 0}}},da=Le((t,o)=>{const l=ue("Tooltip",my,t),{children:a,position:s,refProp:c,label:u,openDelay:f,closeDelay:m,onPositionChange:h,opened:v,defaultOpened:b,withinPortal:x,radius:S,color:E,classNames:w,styles:R,unstyled:M,style:O,className:A,withArrow:N,arrowSize:H,arrowOffset:V,arrowRadius:$,arrowPosition:F,offset:Q,transitionProps:Z,multiline:ee,events:re,zIndex:ne,disabled:j,positionDependencies:I,onClick:L,onMouseEnter:z,onMouseLeave:_,inline:U,variant:X,keepMounted:ae,vars:oe,portalProps:J,mod:ge,floatingStrategy:ie,middlewares:Ce,autoContrast:ze,attributes:Te,target:Se,...Xe}=ue("Tooltip",my,l),{dir:et}=aa(),de=y.useRef(null),ce=pO({position:Vx(et,s),closeDelay:m,openDelay:f,onPositionChange:h,opened:v,defaultOpened:b,events:re,arrowRef:de,arrowOffset:V,offset:typeof Q=="number"?Q+(N?H/2:0):Q,positionDependencies:[...I,Se??a],inline:U,strategy:ie,middlewares:Ce});y.useEffect(()=>{const Pe=Se instanceof HTMLElement?Se:typeof Se=="string"?document.querySelector(Se):Se?.current||null;Pe&&ce.reference(Pe)},[Se,ce]);const me=He({name:"Tooltip",props:l,classes:Tu,className:A,style:O,classNames:w,styles:R,unstyled:M,attributes:Te,rootSelector:"tooltip",vars:oe,varsResolver:hO}),ke=Ai(a);if(!Se&&!ke)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");if(Se){const Pe=dy(Z,{duration:100,transition:"fade"});return g.jsx(g.Fragment,{children:g.jsx(ea,{...J,withinPortal:x,children:g.jsx(hl,{...Pe,keepMounted:ae,mounted:!j&&!!ce.opened,duration:ce.isGroupPhase?10:Pe.duration,children:it=>g.jsxs(xe,{...Xe,"data-fixed":ie==="fixed"||void 0,variant:X,mod:[{multiline:ee},ge],...ce.getFloatingProps({ref:ce.floating,className:me("tooltip").className,style:{...me("tooltip").style,...it,zIndex:ne,top:ce.y??0,left:ce.x??0}}),children:[u,g.jsx($c,{ref:de,arrowX:ce.arrowX,arrowY:ce.arrowY,visible:N,position:ce.placement,arrowSize:H,arrowOffset:V,arrowRadius:$,arrowPosition:F,...me("arrow")})]})})})})}const qe=ke.props,Oe=Un(ce.reference,_p(ke),o),mt=dy(Z,{duration:100,transition:"fade"});return g.jsxs(g.Fragment,{children:[g.jsx(ea,{...J,withinPortal:x,children:g.jsx(hl,{...mt,keepMounted:ae,mounted:!j&&!!ce.opened,duration:ce.isGroupPhase?10:mt.duration,children:Pe=>g.jsxs(xe,{...Xe,"data-fixed":ie==="fixed"||void 0,variant:X,mod:[{multiline:ee},ge],...ce.getFloatingProps({ref:ce.floating,className:me("tooltip").className,style:{...me("tooltip").style,...Pe,zIndex:ne,top:ce.y??0,left:ce.x??0}}),children:[u,g.jsx($c,{ref:de,arrowX:ce.arrowX,arrowY:ce.arrowY,visible:N,position:ce.placement,arrowSize:H,arrowOffset:V,arrowRadius:$,arrowPosition:F,...me("arrow")})]})})}),y.cloneElement(ke,ce.getReferenceProps({onClick:L,onMouseEnter:z,onMouseLeave:_,onMouseMove:l.onMouseMove,onPointerDown:l.onPointerDown,onPointerEnter:l.onPointerEnter,...qe,className:Vo(A,qe.className),[c]:Oe}))]})});da.classes=Tu;da.displayName="@mantine/core/Tooltip";da.Floating=dh;da.Group=mh;var dS={root:"m_18320242","skeleton-fade":"m_299c329c"};const gO={visible:!0,animate:!0},vO=(t,{width:o,height:l,radius:a,circle:s})=>({root:{"--skeleton-height":le(l),"--skeleton-width":le(s?l:o),"--skeleton-radius":s?"1000px":a===void 0?void 0:Dt(a)}}),Uc=Le((t,o)=>{const l=ue("Skeleton",gO,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,width:h,height:v,circle:b,visible:x,radius:S,animate:E,mod:w,attributes:R,...M}=l,O=He({name:"Skeleton",classes:dS,props:l,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:R,vars:m,varsResolver:vO});return g.jsx(xe,{ref:o,...O("root"),mod:[{visible:x,animate:E},w],...M})});Uc.classes=dS;Uc.displayName="@mantine/core/Skeleton";var mS={root:"m_6d731127"};const bO={gap:"md",align:"stretch",justify:"flex-start"},yO=(t,{gap:o,align:l,justify:a})=>({root:{"--stack-gap":Mi(o),"--stack-align":l,"--stack-justify":a}}),Ni=Le((t,o)=>{const l=ue("Stack",bO,t),{classNames:a,className:s,style:c,styles:u,unstyled:f,vars:m,align:h,justify:v,gap:b,variant:x,attributes:S,...E}=l,w=He({name:"Stack",props:l,classes:mS,className:s,style:c,classNames:a,styles:u,unstyled:f,attributes:S,vars:m,varsResolver:yO});return g.jsx(xe,{ref:o,...w("root"),variant:x,...E})});Ni.classes=mS;Ni.displayName="@mantine/core/Stack";const[xO,ph]=iu("Tabs component was not found in the tree");var ji={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const hh=Le((t,o)=>{const l=ue("TabsList",null,t),{children:a,className:s,grow:c,justify:u,classNames:f,styles:m,style:h,mod:v,...b}=l,x=ph();return g.jsx(xe,{...b,...x.getStyles("list",{className:s,style:h,classNames:f,styles:m,props:l,variant:x.variant}),ref:o,role:"tablist",variant:x.variant,mod:[{grow:c,orientation:x.orientation,placement:x.orientation==="vertical"&&x.placement,inverted:x.inverted},v],"aria-orientation":x.orientation,__vars:{"--tabs-justify":u},children:a})});hh.classes=ji;hh.displayName="@mantine/core/TabsList";const gh=Le((t,o)=>{const l=ue("TabsPanel",null,t),{children:a,className:s,value:c,classNames:u,styles:f,style:m,mod:h,keepMounted:v,...b}=l,x=ph(),S=x.value===c,E=x.keepMounted||v||S?a:null;return g.jsx(xe,{...x.getStyles("panel",{className:s,classNames:u,styles:f,style:[m,S?void 0:{display:"none"}],props:l}),ref:o,mod:[{orientation:x.orientation},h],role:"tabpanel",id:x.getPanelId(c),"aria-labelledby":x.getTabId(c),...b,children:E})});gh.classes=ji;gh.displayName="@mantine/core/TabsPanel";const vh=Le((t,o)=>{const l=ue("TabsTab",null,t),{className:a,children:s,rightSection:c,leftSection:u,value:f,onClick:m,onKeyDown:h,disabled:v,color:b,style:x,classNames:S,styles:E,vars:w,mod:R,tabIndex:M,...O}=l,A=Jt(),{dir:N}=aa(),H=ph(),V=f===H.value,$=Q=>{H.onChange(H.allowTabDeactivation&&f===H.value?null:f),m?.(Q)},F={classNames:S,styles:E,props:l};return g.jsxs(bl,{...H.getStyles("tab",{className:a,style:x,variant:H.variant,...F}),disabled:v,unstyled:H.unstyled,variant:H.variant,mod:[{active:V,disabled:v,orientation:H.orientation,inverted:H.inverted,placement:H.orientation==="vertical"&&H.placement},R],ref:o,role:"tab",id:H.getTabId(f),"aria-selected":V,tabIndex:M!==void 0?M:V||H.value===null?0:-1,"aria-controls":H.getPanelId(f),onClick:$,__vars:{"--tabs-color":b?ko(b,A):void 0},onKeyDown:Ap({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:H.activateTabWithKeyboard,loop:H.loop,orientation:H.orientation||"horizontal",dir:N,onKeyDown:h}),...O,children:[u&&g.jsx("span",{...H.getStyles("tabSection",F),"data-position":"left",children:u}),s&&g.jsx("span",{...H.getStyles("tabLabel",F),children:s}),c&&g.jsx("span",{...H.getStyles("tabSection",F),"data-position":"right",children:c})]})});vh.classes=ji;vh.displayName="@mantine/core/TabsTab";const py="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",SO={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},CO=(t,{radius:o,color:l,autoContrast:a})=>({root:{"--tabs-radius":Dt(o),"--tabs-color":ko(l,t),"--tabs-text-color":ET(a,t)?yx({color:l,theme:t,autoContrast:a}):void 0}}),jo=Le((t,o)=>{const l=ue("Tabs",SO,t),{defaultValue:a,value:s,onChange:c,orientation:u,children:f,loop:m,id:h,activateTabWithKeyboard:v,allowTabDeactivation:b,variant:x,color:S,radius:E,inverted:w,placement:R,keepMounted:M,classNames:O,styles:A,unstyled:N,className:H,style:V,vars:$,autoContrast:F,mod:Q,attributes:Z,...ee}=l,re=la(h),[ne,j]=ra({value:s,defaultValue:a,finalValue:null,onChange:c}),I=He({name:"Tabs",props:l,classes:ji,className:H,style:V,classNames:O,styles:A,unstyled:N,attributes:Z,vars:$,varsResolver:CO});return g.jsx(xO,{value:{placement:R,value:ne,orientation:u,id:re,loop:m,activateTabWithKeyboard:v,getTabId:Ub(`${re}-tab`,py),getPanelId:Ub(`${re}-panel`,py),onChange:j,allowTabDeactivation:b,variant:x,color:S,radius:E,inverted:w,keepMounted:M,unstyled:N,getStyles:I},children:g.jsx(xe,{ref:o,id:re,variant:x,mod:[{orientation:u,inverted:u==="horizontal"&&w,placement:u==="vertical"&&R},Q],...I("root"),...ee,children:f})})});jo.classes=ji;jo.displayName="@mantine/core/Tabs";jo.Tab=vh;jo.Panel=gh;jo.List=hh;const Mu=Le((t,o)=>{const l=ue("TextInput",null,t);return g.jsx(ca,{component:"input",ref:o,...l,__staticSelector:"TextInput"})});Mu.classes=ca.classes;Mu.displayName="@mantine/core/TextInput";function wO(t){return ve({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}var pS=(t,o,l=!1)=>{let a=[];function s(c,u="--bn"){for(let f in c){let m=`${u}-${f.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`;typeof c[f]=="object"?s(c[f],m):(typeof c[f]=="number"&&(c[f]=`${c[f]}px`),l?o.style.removeProperty(m):o.style.setProperty(m,c[f].toString()))}}return s(t),a},hy=(t,o)=>pS(t,o),EO={colors:{editor:{text:void 0,background:void 0},menu:{text:void 0,background:void 0},tooltip:{text:void 0,background:void 0},hovered:{text:void 0,background:void 0},selected:{text:void 0,background:void 0},disabled:{text:void 0,background:void 0},shadow:void 0,border:void 0,sideMenu:void 0,highlights:{gray:{text:void 0,background:void 0},brown:{text:void 0,background:void 0},red:{text:void 0,background:void 0},orange:{text:void 0,background:void 0},yellow:{text:void 0,background:void 0},green:{text:void 0,background:void 0},blue:{text:void 0,background:void 0},purple:{text:void 0,background:void 0},pink:{text:void 0,background:void 0}}},borderRadius:void 0,fontFamily:void 0},RO=t=>pS(EO,t,!0),hS=t=>g.jsxs(Ni,{gap:0,className:"bn-tooltip",children:[g.jsx(so,{size:"sm",lineClamp:5,children:t.mainTooltip}),t.secondaryTooltip&&g.jsx(so,{size:"xs",lineClamp:5,children:t.secondaryTooltip})]}),Dm=y.forwardRef((t,o)=>{let{className:l,children:a,mainTooltip:s,secondaryTooltip:c,icon:u,isSelected:f,isDisabled:m,onClick:h,label:v,variant:b,...x}=t;Me(x,!1);let[S,E]=y.useState(!1),w=a?g.jsx(Gn,{"aria-label":v,className:l,onMouseDown:R=>{Vm()&&R.currentTarget.focus()},onClick:R=>{E(!0),h?.(R)},onPointerLeave:()=>E(!1),"aria-pressed":f,"data-selected":f||void 0,"data-test":s?s.slice(0,1).toLowerCase()+s.replace(/\s+/g,"").slice(1):void 0,size:b==="compact"?"compact-xs":"xs",disabled:m||!1,ref:o,...x,children:a}):g.jsx(Yl,{className:l,"aria-label":v,onMouseDown:R=>{Vm()&&R.currentTarget.focus()},onClick:R=>{E(!0),h?.(R)},onPointerLeave:()=>E(!1),"aria-pressed":f,"data-selected":f||void 0,"data-test":s?s.slice(0,1).toLowerCase()+s.replace(/\s+/g,"").slice(1):void 0,size:b==="compact"?20:30,disabled:m||!1,ref:o,...x,children:u});return s?g.jsx(da,{disabled:S,withinPortal:!1,label:g.jsx(hS,{mainTooltip:s,secondaryTooltip:c}),children:w}):w}),TO=y.forwardRef((t,o)=>{let{className:l,text:a,icon:s,isSelected:c,mainTooltip:u,secondaryTooltip:f,onClick:m,onMouseEnter:h,...v}=t;Me(v,!1);let[b,x]=y.useState(!1),S=g.jsxs(Eu,{className:l,checked:c===!0,wrapperProps:{onMouseEnter:h,onMouseLeave:()=>x(!1),onClick:E=>{x(!0),m?.(E)}},variant:"light",icon:null,ref:o,children:[g.jsx("span",{children:s}),g.jsx("span",{children:a})]});return!u||b?S:g.jsx(da,{refProp:"rootRef",withinPortal:!1,label:g.jsx(hS,{mainTooltip:u,secondaryTooltip:f}),children:S})}),MO=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s),g.jsx(At,{className:l,ref:o,children:a})}),OO=y.forwardRef((t,o)=>{let{className:l,children:a,headerText:s,selected:c,onFocus:u,onBlur:f,tabIndex:m,...h}=t;return Me(h,!1),g.jsxs(_i,{className:xt(l,c?"selected":""),onFocus:u,onBlur:f,tabIndex:m,ref:o,children:[s&&g.jsx(so,{className:"bn-header-text",children:s}),a]})}),AO=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s,!1),g.jsx(_i.Section,{className:l,ref:o,children:a})}),_O=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s,!1),g.jsx(oh,{className:l,label:g.jsx(so,{children:a}),ref:o})}),NO=y.forwardRef((t,o)=>{let{authorInfo:l,timeString:a,edited:s,...c}=t,u=Re();return Me(c,!1),l==="loading"?g.jsxs(At,{children:[g.jsx(Uc,{height:24,width:24}),g.jsx("div",{children:g.jsx(Uc,{height:12,width:100})})]}):g.jsxs(At,{children:[g.jsx(Cu,{src:l.avatarUrl,alt:l.username,radius:"xl",size:"sm",color:"initials"}),g.jsxs(so,{fz:"sm",fw:"bold",children:[l.username,g.jsxs(so,{fz:"xs",c:"dimmed",span:!0,ml:"xs",children:[a," ",s&&`(${u.comments.edited})`]})]})]})}),jO=y.forwardRef((t,o)=>{let{className:l,showActions:a,authorInfo:s,timeString:c,edited:u,actions:f,emojiPickerOpen:m,children:h,...v}=t,{hovered:b,ref:x}=D9(),S=a9([o,x]);return Me(v,!1),g.jsxs(At,{pos:"relative",ref:S,className:l,children:[f&&(a===!0||a===void 0||a==="hover"&&b||m)?g.jsx(At,{style:{position:"absolute",right:0,top:0,zIndex:10},children:f}):null,g.jsx(NO,{...t}),h]})}),DO=y.forwardRef((t,o)=>{let{className:l,autoFocus:a,onFocus:s,onBlur:c,editor:u,editable:f,...m}=t;Me(m,!1);let h=On();return g.jsx(dA,{autoFocus:a,className:l,editor:t.editor,sideMenu:!1,slashMenu:!1,tableHandles:!1,filePanel:!1,formattingToolbar:!1,editable:f,theme:h?.colorSchemePreference,ref:o,onFocus:s,onBlur:c,children:g.jsx(ox,{formattingToolbar:HO})})}),HO=()=>g.jsx(nx,{blockTypeSelectItems:[],children:tx([]).filter(t=>t.key!=="nestBlockButton"&&t.key!=="unnestBlockButton")}),LO=y.forwardRef((t,o)=>{let{className:l,name:a,label:s,variant:c,icon:u,value:f,autoFocus:m,placeholder:h,disabled:v,onKeyDown:b,onChange:x,onSubmit:S,autoComplete:E,"aria-activedescendant":w,rightSection:R,...M}=t;return Me(M),g.jsx(Mu,{size:"xs",className:xt(l||"",c==="large"?"bn-mt-input-large":""),ref:o,name:a,label:s,leftSection:u,value:f,autoFocus:m,"data-autofocus":m?"true":void 0,rightSection:R,placeholder:h,disabled:v,onKeyDown:b,onChange:x,onSubmit:S,autoComplete:E,"aria-activedescendant":w})}),zO=y.createContext(void 0),kO=t=>{let{children:o,onOpenChange:l,position:a,sub:s,...c}=t;return Me(c),s?g.jsx(ot.Sub,{transitionProps:{duration:250,exitDelay:250},withinPortal:!1,middlewares:{flip:!0,shift:!0,inline:!1,size:!0},onChange:l,position:a,children:o}):g.jsx(ot,{withinPortal:!1,middlewares:{flip:!0,shift:!0,inline:!1,size:!0},onChange:l,position:a,returnFocus:!1,children:o})},VO=y.forwardRef((t,o)=>{let{className:l,children:a,icon:s,checked:c,subTrigger:u,onClick:f,...m}=t;return Me(m,!1),g.jsx(u?ot.Sub.Item:ot.Item,{className:l,ref:o,leftSection:s,rightSection:c?g.jsx(Kp,{size:10}):c===!1?g.jsx("div",{className:"bn-tick-space"}):null,onClick:f,...m,children:a})}),BO=t=>{let{children:o,sub:l,...a}=t;return Me(a),g.jsx(l?ot.Sub.Target:ot.Target,{children:o})},$O=y.forwardRef((t,o)=>{let{className:l,children:a,sub:s,...c}=t;Me(c);let u=y.useContext(zO);return g.jsx(s?ot.Sub.Dropdown:ot.Dropdown,{className:l,ref:o,onMouseOver:u?.onMenuMouseOver,onMouseLeave:u?.onMenuMouseLeave,children:a})}),UO=y.forwardRef((t,o)=>{let{className:l,...a}=t;return Me(a),g.jsx(ot.Divider,{className:l,ref:o})}),PO=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s),g.jsx(ot.Label,{className:l,ref:o,children:a})}),GO=y.forwardRef((t,o)=>{let{className:l,children:a,icon:s,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,label:h,...v}=t;return Me(v,!1),s?g.jsx(Yl,{size:24,className:l,ref:o,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,"aria-label":h,...v,children:s}):g.jsx(Gn,{className:l,ref:o,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,"aria-label":h,...v,children:a})}),ZO=y.forwardRef((t,o)=>{let{className:l,tabs:a,defaultOpenTab:s,openTab:c,setOpenTab:u,loading:f,...m}=t;return Me(m),g.jsx(At,{className:l,ref:o,children:g.jsxs(jo,{value:c,defaultValue:s,onChange:u,children:[f&&g.jsx(rh,{visible:f}),g.jsx(jo.List,{children:a.map(h=>g.jsx(jo.Tab,{"data-test":`${h.name.toLowerCase()}-tab`,value:h.name,children:h.name},h.name))}),a.map(h=>g.jsx(jo.Panel,{value:h.name,children:h.tabPanel},h.name))]})})}),qO=y.forwardRef((t,o)=>{let{className:l,children:a,onClick:s,label:c,...u}=t;return Me(u),g.jsx(Gn,{size:"xs","aria-label":c,className:l,ref:o,onClick:s,...u,children:a})}),IO=y.forwardRef((t,o)=>{let{className:l,accept:a,value:s,placeholder:c,onChange:u,...f}=t;return Me(f),g.jsx(JM,{size:"xs",className:l,ref:o,accept:a,value:s,placeholder:c,onChange:u,...f})}),YO=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s),g.jsx("div",{className:l,ref:o,children:a})}),FO=y.forwardRef((t,o)=>{let{className:l,value:a,placeholder:s,onKeyDown:c,onChange:u,...f}=t;return Me(f),g.jsx(Mu,{size:"xs","data-test":"embed-input",className:l,ref:o,value:a,placeholder:s,onKeyDown:c,onChange:u})}),XO=t=>{let{open:o,onOpenChange:l,position:a,portalRoot:s,children:c,...u}=t;return Me(u),g.jsx(Pn,{middlewares:{size:{padding:20}},withinPortal:!!s,portalProps:s?{target:s}:void 0,opened:o,onChange:l,position:a,children:c})},QO=t=>{let{children:o,...l}=t;return Me(l),g.jsx(qp,{children:o})},KO=y.forwardRef((t,o)=>{let{className:l,children:a,variant:s,...c}=t;return Me(c),g.jsx(hu,{className:l,ref:o,children:a})}),JO=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s,!1),g.jsx(At,{align:"center",gap:0,className:l,ref:o,...s,children:a})}),WO=y.forwardRef((t,o)=>{let{className:l,children:a,icon:s,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,label:h,...v}=t;return Me(v,!1),s?g.jsx(Yl,{size:24,className:l,ref:o,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,"aria-label":h,...v,children:s}):g.jsx(Gn,{className:l,ref:o,onClick:c,onDragEnd:u,onDragStart:f,draggable:m,"aria-label":h,...v,children:a})}),eA=y.forwardRef((t,o)=>{let{className:l,children:a,id:s,...c}=t;return Me(c),g.jsx(Ni,{gap:0,className:l,ref:o,id:s,role:"listbox",children:a})}),tA=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s),g.jsx(At,{className:l,ref:o,children:g.jsx(At,{className:"bn-mt-suggestion-menu-item-title",children:a})})}),nA=y.forwardRef((t,o)=>{let{className:l,isSelected:a,onClick:s,item:c,id:u,...f}=t;Me(f);let m=y.useRef(null);return y.useEffect(()=>{!m.current||!a||sx(m.current,m.current.closest(".bn-suggestion-menu, #ai-suggestion-menu"))!=="none"&&m.current.scrollIntoView({block:"nearest"})},[a]),g.jsxs(At,{gap:0,className:l,ref:cu(o,m),id:u,role:"option",onMouseDown:h=>h.preventDefault(),onClick:s,"aria-selected":a||void 0,children:[c.icon&&g.jsx(At,{className:"bn-mt-suggestion-menu-item-section","data-position":"left",children:c.icon}),g.jsxs(Ni,{gap:0,className:"bn-mt-suggestion-menu-item-body",children:[g.jsx(so,{className:"bn-mt-suggestion-menu-item-title",children:c.title}),g.jsx(so,{className:"bn-mt-suggestion-menu-item-subtitle",children:c.subtext})]}),c.badge&&g.jsx(At,{"data-position":"right",className:"bn-mt-suggestion-menu-item-section",children:g.jsx(Wp,{size:"xs",children:c.badge})})]})}),oA=y.forwardRef((t,o)=>{let{className:l,children:a,...s}=t;return Me(s),g.jsx(At,{className:l,ref:o,children:a})}),lA=y.forwardRef((t,o)=>{let{className:l,...a}=t;return Me(a),g.jsx(yl,{className:l,type:"dots",size:16,ref:o})}),rA=y.forwardRef((t,o)=>{let{className:l,children:a,id:s,columns:c,...u}=t;return Me(u),g.jsx("div",{className:l,style:{gridTemplateColumns:`repeat(${c}, 1fr)`},ref:o,id:s,role:"grid",children:a})}),aA=y.forwardRef((t,o)=>{let{className:l,children:a,columns:s,...c}=t;return Me(c),g.jsx(At,{className:l,style:{gridColumn:`1 / ${s+1}`},ref:o,children:g.jsx(At,{className:"bn-mt-suggestion-menu-item-title",children:a})})}),iA=y.forwardRef((t,o)=>{let{className:l,isSelected:a,onClick:s,item:c,id:u,...f}=t;Me(f);let m=y.useRef(null);return y.useEffect(()=>{!m.current||!a||sx(m.current,m.current.closest(".bn-grid-suggestion-menu"))!=="none"&&m.current.scrollIntoView({block:"nearest"})},[a]),g.jsx("div",{className:l,ref:cu(o,m),id:u,role:"option",onClick:s,"aria-selected":a||void 0,children:c.icon})}),sA=y.forwardRef((t,o)=>{let{className:l,children:a,columns:s,...c}=t;return Me(c),g.jsx(yl,{className:l,style:{gridColumn:`1 / ${s+1}`},type:"dots",ref:o})}),cA=y.forwardRef((t,o)=>{let{children:l,className:a,onMouseDown:s,onClick:c,...u}=t;return Me(u,!1),g.jsx(Gn,{className:a,ref:o,onMouseDown:s,onClick:c,...u,children:l})}),uA=y.forwardRef((t,o)=>{let{className:l,children:a,draggable:s,onDragStart:c,onDragEnd:u,style:f,label:m,...h}=t;return Me(h,!1),g.jsx(Gn,{className:l,ref:o,"aria-label":m,draggable:s,onDragStart:c,onDragEnd:u,style:f,...h,children:a})}),Hm=y.forwardRef((t,o)=>{let{className:l,children:a,onMouseEnter:s,onMouseLeave:c,variant:u,...f}=t;Me(f);let{ref:m,focused:h}=z9();return g.jsx(Qp,{className:l,ref:cu(o,m,gx(h)),role:"toolbar",onMouseEnter:s,onMouseLeave:c,gap:u==="action-toolbar"?2:void 0,children:a})}),Lm=y.forwardRef((t,o)=>{let{className:l,items:a,isDisabled:s,...c}=t;Me(c);let u=a.filter(f=>f.isSelected)[0];return u?g.jsxs(ot,{withinPortal:!1,transitionProps:{exitDuration:0},disabled:s,middlewares:{flip:!0,shift:!0,inline:!1,size:!0},children:[g.jsx(ot.Target,{children:g.jsx(Gn,{onMouseDown:f=>{Vm()&&f.currentTarget.focus()},leftSection:u.icon,rightSection:g.jsx(wO,{}),size:"xs",variant:"subtle",disabled:s,children:u.text})}),g.jsx(ot.Dropdown,{className:l,ref:o,children:a.map(f=>g.jsx(ot.Item,{onClick:f.onClick,leftSection:f.icon,rightSection:f.isSelected?g.jsx(Kp,{size:10,className:"bn-tick-icon"}):g.jsx("div",{className:"bn-tick-space"}),disabled:f.isDisabled,children:f.text},f.text))})]}):null}),fA={FormattingToolbar:{Root:Hm,Button:Dm,Select:Lm},FilePanel:{Root:ZO,Button:qO,FileInput:IO,TabPanel:YO,TextInput:FO},GridSuggestionMenu:{Root:rA,Item:iA,EmptyItem:aA,Loader:sA},LinkToolbar:{Root:Hm,Button:Dm,Select:Lm},SideMenu:{Root:JO,Button:WO},SuggestionMenu:{Root:eA,Item:nA,EmptyItem:tA,Label:oA,Loader:lA},TableHandle:{Root:uA,ExtendButton:cA},Generic:{Badge:{Root:TO,Group:MO},Form:{Root:t=>g.jsx("div",{children:t.children}),TextInput:LO},Menu:{Root:kO,Trigger:BO,Dropdown:$O,Divider:UO,Label:PO,Item:VO,Button:GO},Popover:{Root:XO,Trigger:QO,Content:KO},Toolbar:{Root:Hm,Button:Dm,Select:Lm}},Comments:{Comment:jO,Editor:DO,Card:OO,CardSection:AO,ExpandSectionsPrompt:_O}},dA=t=>{let{className:o,theme:l,editor:a,...s}=t,c=On(),u=ax(),f=c?.colorSchemePreference||u,m=typeof l=="string"?l:f==="no-preference"?"light":f,h=y.useCallback(x=>{if(x&&(RO(x),typeof l=="object")){if("light"in l&&"dark"in l){hy(l[f==="dark"?"dark":"light"],x);return}hy(l,x);return}},[f,l]);y.useEffect(()=>{if(!a.portalElement)throw Error("Portal element not found");a.portalElement.setAttribute("data-mantine-color-scheme",m),h(a.portalElement)},[a,h,m]);let v=y.useContext(Np),b=g.jsx(E2.Provider,{value:fA,children:g.jsx(o9,{"data-mantine-color-scheme":m,className:xt("bn-mantine",o||""),theme:typeof l=="object"?void 0:l,editor:a,...s,ref:h})});return v?b:g.jsx(Cx,{withCssVariables:!1,getRootElement:()=>{},children:b})};export{Sp as K,xA as L,be as M,Ey as R,yA as Z,r5 as a,d3 as b,Vo as c,qy as d,Zm as e,xc as f,hA as g,m3 as h,jR as i,g as j,dA as k,Z0 as l,NR as m,Zy as o,kn as r,mp as s,u3 as u,wy as w};
|