ryugi-artifacts 1.101.2 → 1.102.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.
Files changed (111) hide show
  1. package/dist/cli.cjs +7 -34
  2. package/dist/server.cjs +258 -258
  3. package/dist/viewer/{ActionBar-GEbMi4TD.js → ActionBar-DFtKepA7.js} +1 -1
  4. package/dist/viewer/{ActionIcon-RLJErXaL.js → ActionIcon-BmG7lBfd.js} +1 -1
  5. package/dist/viewer/{AgentStatusPill-DyrlWEmW.js → AgentStatusPill-Dr0IG63t.js} +1 -1
  6. package/dist/viewer/ArtboardLayout-Csu2pQ-T.js +14 -0
  7. package/dist/viewer/{ArtifactList-BWJ45-uL.js → ArtifactList-DsM43F_P.js} +1 -1
  8. package/dist/viewer/{ArtifactModal-Qn47mKCN.js → ArtifactModal-DjgA_mk-.js} +1 -1
  9. package/dist/viewer/{Avatar-A1oAz1XR.js → Avatar-OGhW38pt.js} +1 -1
  10. package/dist/viewer/{BottomSheet-BN9gyx7S.js → BottomSheet-wczv_s4I.js} +1 -1
  11. package/dist/viewer/{Canvas-B89LEvKt.js → Canvas-C9BgB5Vk.js} +1 -1
  12. package/dist/viewer/{CloudLegalNotice-BCTyYAWa.js → CloudLegalNotice-9Jrnaiz1.js} +1 -1
  13. package/dist/viewer/{CompositeItem-CSvIO8uB.js → CompositeItem-BLrDOuic.js} +1 -1
  14. package/dist/viewer/{DocumentExportMenu-DXxjkRFA.js → DocumentExportMenu-CxdmnnnP.js} +1 -1
  15. package/dist/viewer/DocumentLayout-Byaaj0lf.js +2 -0
  16. package/dist/viewer/{DocumentPage-B2UKgse3.js → DocumentPage-CrVLG3xw.js} +1 -1
  17. package/dist/viewer/{DraggablePanel-GGPnqMPs.js → DraggablePanel-D2U_w1Mh.js} +1 -1
  18. package/dist/viewer/{DropdownMenu-SGAC8XYI.js → DropdownMenu-D8PSw8rX.js} +1 -1
  19. package/dist/viewer/GroupVerdict-B4YWlFtx.js +1 -0
  20. package/dist/viewer/{HtmlLayout-CkyPc8Q7.js → HtmlLayout-p52oMbkD.js} +1 -1
  21. package/dist/viewer/{Input-CNcWZmH8.js → Input-BPP1bIR7.js} +1 -1
  22. package/dist/viewer/{MenuTrigger-OHGsk3Iu.js → MenuTrigger-CJXtjCtF.js} +1 -1
  23. package/dist/viewer/{PhoneArtboardBar-CdMJseRN.js → PhoneArtboardBar-BLmC5n92.js} +1 -1
  24. package/dist/viewer/{PhoneSheet-DHZCV8bd.js → PhoneSheet-RzYP9raH.js} +1 -1
  25. package/dist/viewer/{Popover-SE4RXx2B.js → Popover-CI2fBO-6.js} +1 -1
  26. package/dist/viewer/{PreviewArtifactLayout-BsIOQy80.js → PreviewArtifactLayout-BKcZov33.js} +1 -1
  27. package/dist/viewer/{PreviewLayout-DTAIcv0H.js → PreviewLayout-h2V6IEPR.js} +2 -2
  28. package/dist/viewer/{PublishMenu-D-u3yCNM.js → PublishMenu-I7yHr3IR.js} +1 -1
  29. package/dist/viewer/{ReportLayout-SZVzfC0J.js → ReportLayout-C1A2NXor.js} +1 -1
  30. package/dist/viewer/{RyugiMark-E1gFKvlG.js → RyugiMark-D6HsF-eP.js} +1 -1
  31. package/dist/viewer/{Segmented-Dd4wqUb4.js → Segmented-DWi3WMbI.js} +1 -1
  32. package/dist/viewer/{Select-BO3NR7PD.js → Select-C3XqBQ1N.js} +1 -1
  33. package/dist/viewer/{SelectScrollUpArrow-CGM1ElW0.js → SelectScrollUpArrow-DccpygLx.js} +1 -1
  34. package/dist/viewer/{SideDrawer-D9oZAAPW.js → SideDrawer-DtqMHMZa.js} +1 -1
  35. package/dist/viewer/{SlidesLayout-D1Sjqz7W.js → SlidesLayout-_aL_Wmn0.js} +3 -3
  36. package/dist/viewer/{SnapshotDocument-D0ymuHac.js → SnapshotDocument-BmyM7kKr.js} +1 -1
  37. package/dist/viewer/{SplitFrame-sFi3srWj.js → SplitFrame-DY4Pomig.js} +1 -1
  38. package/dist/viewer/{StoryboardLayout-BOCBT0dT.js → StoryboardLayout-DWmYoJbh.js} +1 -1
  39. package/dist/viewer/{StoryboardRender-DvDujY6-.js → StoryboardRender-Bz4HnHfj.js} +1 -1
  40. package/dist/viewer/{ThreadView-DgoYNafB.js → ThreadView-uYestFjK.js} +1 -1
  41. package/dist/viewer/VerifyLayout-B9e4RHAZ.css +1 -0
  42. package/dist/viewer/VerifyLayout-D3L_Nyhx.js +1 -0
  43. package/dist/viewer/{VirtualizedEditor-uWe43zaI-JDpZ-UaE.js → VirtualizedEditor-uWe43zaI-BRjchUcR.js} +1 -1
  44. package/dist/viewer/{VirtualizedRenderer-C_d95FXi-DpRLDZzT.js → VirtualizedRenderer-C_d95FXi-BiKuicf_.js} +1 -1
  45. package/dist/viewer/{WarningsBadge-B_8vwkt1.js → WarningsBadge-t_H3hA4c.js} +1 -1
  46. package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-ZVWL_tx_.js → WhiteboardEditor-cZ32fLqJ-DHGUDfT6.js} +1 -1
  47. package/dist/viewer/{WhiteboardLayout-CXcVyWLf.js → WhiteboardLayout-BwzWcl_v.js} +1 -1
  48. package/dist/viewer/{WritingCursor-Tz_0Kzrp.js → WritingCursor-BgZ_CXA8.js} +1 -1
  49. package/dist/viewer/{api-C8atBssM.js → api-DnU71xnS.js} +1 -1
  50. package/dist/viewer/{artifact-list-DYdFYJaa.js → artifact-list-DLC6w9uW.js} +1 -1
  51. package/dist/viewer/{auto-publish-B0M98Fca.js → auto-publish-I637YfTf.js} +1 -1
  52. package/dist/viewer/{channel-BO955bMH.js → channel-BzQy5yb9.js} +3 -3
  53. package/dist/viewer/{crop-encode-B86CUhHc.js → crop-encode-DKOXrrBx.js} +1 -1
  54. package/dist/viewer/{dist-BODFR1Jr.js → dist-B4EO2CPv.js} +1 -1
  55. package/dist/viewer/{dist-C2M3_G3-.js → dist-B8JYmYN_.js} +1 -1
  56. package/dist/viewer/{dist-CpFhTJdQ.js → dist-BHAJ5J6a.js} +1 -1
  57. package/dist/viewer/{dist-w46wmgZp.js → dist-BI7tUIez.js} +1 -1
  58. package/dist/viewer/{dist-CZGkzFCv.js → dist-BL7gVqxi.js} +1 -1
  59. package/dist/viewer/{dist-C01DUxTi.js → dist-BP8ay-gZ.js} +1 -1
  60. package/dist/viewer/{dist-P_tj0_YM.js → dist-Bo83M38T.js} +1 -1
  61. package/dist/viewer/{dist-DWXSGLTE.js → dist-CO1p9q1Z.js} +1 -1
  62. package/dist/viewer/{dist-DaPsw--V.js → dist-CVt5MFeC.js} +1 -1
  63. package/dist/viewer/{dist-kTp8pZMq.js → dist-CaBa68Xm.js} +1 -1
  64. package/dist/viewer/{dist-DznRRxrn.js → dist-Cdwc8_lc.js} +1 -1
  65. package/dist/viewer/{dist-BDu6AHeP.js → dist-ChnAy31A.js} +1 -1
  66. package/dist/viewer/{dist-CDlrNMXS.js → dist-Ckvl87v1.js} +1 -1
  67. package/dist/viewer/{dist-BpYfPdi5.js → dist-DBpGO_S5.js} +1 -1
  68. package/dist/viewer/{dist-DNL6Um7a.js → dist-DCj5-otB.js} +1 -1
  69. package/dist/viewer/{dist-4HoMYeED.js → dist-DJbqyYbr.js} +1 -1
  70. package/dist/viewer/{dist-YyMYbSB-.js → dist-DSiP1sno.js} +1 -1
  71. package/dist/viewer/{dist-HTuDq_aa.js → dist-DrVA7ut5.js} +1 -1
  72. package/dist/viewer/{dist-tObrbDpE.js → dist-DxrXYjGy.js} +1 -1
  73. package/dist/viewer/{dist-fjhXjUom.js → dist-EEnCrnE5.js} +1 -1
  74. package/dist/viewer/{dist-CRRvcFM-.js → dist-UhLZmzFt.js} +1 -1
  75. package/dist/viewer/{dist-BXm5Rfgj.js → dist-j0019Ujc.js} +1 -1
  76. package/dist/viewer/{dist-a0u-2S_l.js → dist-jEPSRJix.js} +2 -2
  77. package/dist/viewer/{dist-DUF2tfCf.js → dist-r4fmjkHw.js} +1 -1
  78. package/dist/viewer/{editor-BpnTfMcC.js → editor-2avuG1le.js} +4 -4
  79. package/dist/viewer/{icons-yzuVhXUP.js → icons-DWimed9E.js} +1 -1
  80. package/dist/viewer/index.html +3 -3
  81. package/dist/viewer/index.js +2 -2
  82. package/dist/viewer/index5.css +151 -76
  83. package/dist/viewer/{labels-BlxZjLTh.js → labels-6JqNXprT.js} +1 -1
  84. package/dist/viewer/{local-split-host-C2RW7m9m.js → local-split-host-kaL99YNI.js} +1 -1
  85. package/dist/viewer/{parseTrigger-fuIDIBGR.js → parseTrigger-dhvXKZoS.js} +1 -1
  86. package/dist/viewer/preview.html +5 -5
  87. package/dist/viewer/preview.js +1 -1
  88. package/dist/viewer/{printDocument-SgAybSS9.js → printDocument-Bob6oDU4.js} +1 -1
  89. package/dist/viewer/{read-resolutions-D1nnXtlv.js → read-resolutions-iX7kD7Xz.js} +1 -1
  90. package/dist/viewer/{ref-oE9hXZLB.js → ref-CG33owdM.js} +1 -1
  91. package/dist/viewer/{route-CmBbNmVb.js → route-CkVEiakc.js} +2 -2
  92. package/dist/viewer/{route-messages-CAzxmUWF.js → route-messages-BblikCub.js} +1 -1
  93. package/dist/viewer/{settings-BU73kkrW.js → settings-i1xE8pA8.js} +1 -1
  94. package/dist/viewer/{snap-C_E1z6AY.js → snap-BoMEN-8e.js} +1 -1
  95. package/dist/viewer/{split-DvTDpgJW.js → split-C-_Iw2K0.js} +2 -2
  96. package/dist/viewer/{stable-C9ggSXF9.js → stable-DqmWGuUk.js} +1 -1
  97. package/dist/viewer/{tokens.stylex-zG8haNmJ.js → tokens.stylex-No4bA13s.js} +1 -1
  98. package/dist/viewer/{url-Brz_p3MH.js → url-64-774qp.js} +1 -1
  99. package/dist/viewer/{useArtifactFeed-Vqt5fAyB.js → useArtifactFeed-CojHZEow.js} +1 -1
  100. package/dist/viewer/{useCloudStatus-DvxxuOq7.js → useCloudStatus-BngR4Pm7.js} +1 -1
  101. package/dist/viewer/{useLayerZIndex-CuKgxp6B.js → useLayerZIndex-t4BgGwYi.js} +1 -1
  102. package/dist/viewer/{useStoryboardData-CPlKQjJu.js → useStoryboardData-B1gfG0bU.js} +1 -1
  103. package/dist/viewer/{useTranslation-BGQ-vF4X.js → useTranslation-ByuUeDLl.js} +1 -1
  104. package/dist/viewer/{view-aVq9gyhB.js → view-BnFGOXLi.js} +1 -1
  105. package/dist/viewer/{viewport-CFJHn_Y6-CeUex0Or.js → viewport-CFJHn_Y6-NgtbO-g_.js} +1 -1
  106. package/package.json +1 -1
  107. package/dist/viewer/ArtboardLayout-BTX9NX6v.js +0 -14
  108. package/dist/viewer/DocumentLayout-Bc3IfTlz.js +0 -2
  109. package/dist/viewer/GroupVerdict-BbSPek24.js +0 -1
  110. package/dist/viewer/VerifyLayout-B3HHzVWF.js +0 -1
  111. package/dist/viewer/VerifyLayout-BH4hYui6.css +0 -1
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{b as t,v as n,w as r}from"./route-CmBbNmVb.js";import{t as i}from"./react-DlmbjZJV.js";import{$t as a,An as o,Bn as s,Cn as c,Cr as l,Dn as u,Dr as d,Er as f,Fn as p,G as m,Hn as h,In as g,J as _,K as v,Kn as y,Ln as b,Nn as x,On as S,Or as C,Pn as w,Qt as T,Rn as E,Sn as D,Tn as O,Tr as ee,Un as te,Vn as ne,X as re,Xn as ie,Xt as ae,Y as oe,Yn as se,Z as ce,Zn as le,Zt as ue,_r as de,an as fe,bn as pe,en as me,jn as he,nn as ge,pr as _e,q as ve,qt as ye,rn as be,rr as xe,tn as Se,vn as Ce,xn as we,yn as Te,zn as Ee}from"./url-Brz_p3MH.js";import{t as De}from"./jsx-runtime-LKYXHABd.js";import{$ as Oe,A as ke,B as Ae,C as je,E as Me,H as Ne,J as Pe,K as Fe,Q as Ie,S as Le,T as Re,V as ze,Z as Be,et as Ve,f as He,g as Ue,it as We,l as Ge,nt as Ke,rt as qe,s as Je,tt as Ye,v as Xe}from"./mergeRefs-BoWyGCK7.js";import{An as Ze,C as Qe,Cn as $e,E as et,Gt as tt,I as nt,In as rt,Jn as it,K as at,Nt as ot,Pt as st,R as ct,Tn as lt,Ut as ut,Vn as dt,Z as ft,Zn as pt,an as mt,b as ht,bn as gt,dt as _t,g as vt,gn as yt,hn as bt,i as xt,in as St,on as Ct,ot as wt,pn as Tt,rn as Et,un as Dt,z as Ot}from"./useLayerZIndex-CuKgxp6B.js";import{Tt as kt}from"./MotionConfigContext-B3czw3wn.js";import{A as At,C as jt,E as Mt,O as Nt,S as Pt,T as Ft,_ as It,b as Lt,c as Rt,d as zt,g as Bt,h as Vt,j as Ht,l as Ut,s as Wt,u as Gt,v as Kt,x as qt,y as k}from"./Popover-SE4RXx2B.js";import{t as Jt}from"./arrow-up-kdcWAnXX.js";import{d as Yt,f as Xt}from"./parseTrigger-fuIDIBGR.js";import{n as Zt,t as Qt}from"./type-DA3yqyzM.js";import{a as $t,i as en,n as tn,r as nn,t as rn}from"./minus-YVaskeP9.js";import{n as an,t as on}from"./ellipsis-BN0LovOQ.js";import{t as sn}from"./code-DZDLeByL.js";import{A as cn,M as ln,N as un,O as dn,P as fn,S as pn,_ as mn,a as hn,b as gn,c as _n,d as A,f as vn,g as yn,h as bn,i as xn,j as Sn,k as Cn,m as wn,n as Tn,o as En,p as Dn,r as On,s as kn,t as An,u as jn,v as Mn,w as Nn,x as Pn,y as Fn}from"./SelectScrollUpArrow-CGM1ElW0.js";import{a as In,c as Ln,i as Rn,n as zn,o as Bn,r as Vn,s as Hn,t as Un}from"./text-align-start-CvIfWAwj.js";import{a as Wn,i as Gn,n as Kn,t as qn}from"./ruler-C-6kncvn.js";import{t as Jn}from"./image-DSbKs3OG.js";import{n as Yn,r as Xn,t as Zn}from"./zoom-out-DsqNailP.js";import{t as Qn}from"./maximize-2-BEWXAYRs.js";import{t as $n}from"./mouse-pointer-2-FWjclmSy.js";import{i as er,n as tr,r as nr,t as rr}from"./stringifyLocale-Dx2d4AZJ.js";import{t as ir}from"./plus-DOEIgzPd.js";import{t as ar}from"./trash-BZS14NA2.js";import{t as or}from"./MenuTrigger-OHGsk3Iu.js";var sr={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};sr.node;var cr=kt(sr),lr={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};lr.node;var ur=kt(lr),dr={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};dr.node;var fr=kt(dr),pr={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};pr.node;var mr=kt(pr),hr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};hr.node;var gr=kt(hr),_r={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};_r.node;var vr=kt(_r),yr={name:`grip-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]};yr.node;var br=kt(yr),xr={name:`group`,size:24,node:[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]};xr.node;var Sr=kt(xr),Cr={name:`hash`,size:24,node:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]};Cr.node;var wr=kt(Cr),Tr={name:`highlighter`,size:24,node:[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]};Tr.node;var Er=kt(Tr),Dr={name:`letter-h`,size:24,node:[[`path`,{d:`M18 20V4`,key:`o2hl4u`}],[`path`,{d:`M6 12H18`,key:`1fx1vx`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}]],aliases:[`heading`]};Dr.node;var Or=kt(Dr),kr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};kr.node;var Ar=kt(kr),jr={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};jr.node;var Mr=kt(jr),Nr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Nr.node;var Pr=kt(Nr),Fr={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Fr.node;var Ir=kt(Fr),Lr={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};Lr.node;var Rr=kt(Lr),zr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};zr.node;var Br=kt(zr),Vr={name:`spline`,size:24,node:[[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}],[`path`,{d:`M5 17A12 12 0 0 1 17 5`,key:`1okkup`}]]};Vr.node;var Hr=kt(Vr),Ur={name:`squircle`,size:24,node:[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9`,key:`garfkc`}]]};Ur.node;var Wr=kt(Ur),Gr={name:`strikethrough`,size:24,node:[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]};Gr.node;var Kr=kt(Gr),qr={name:`ungroup`,size:24,node:[[`rect`,{x:`11`,y:`14`,width:`10`,height:`7`,rx:`2`,key:`nfm8rk`}],[`rect`,{x:`3`,y:`3`,width:`10`,height:`7`,rx:`2`,key:`1ljebb`}]]};qr.node;var Jr=kt(qr),Yr={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};Yr.node;var Xr=kt(Yr),j=e(i(),1),M=De(),Zr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=j.useMemo(()=>({open:t,close:n}),[t,n]);return(0,M.jsx)(k.Provider,{value:t,children:(0,M.jsx)(jt,{delay:i,timeoutMs:r,children:e.children})})},Qr=class extends Pt{constructor(){super(qt(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function $r(){return new Qr}var ei=j.createContext(void 0);function ti(){let e=j.useContext(ei);if(e===void 0)throw Error(Ie(34));return e}var ni=j.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=j.useState(void 0),[p,m]=C({controlled:i,default:a,name:`MenuRadioGroup`}),h=qe((e,t)=>{o?.(e,t),t.isCanceled||m(e)}),_=Fe(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),v=j.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,M.jsx)(g.Provider,{value:f,children:(0,M.jsx)(ei.Provider,{value:v,children:_})})}),ri=j.memo(j.forwardRef(function(e,t){let n=h()?.RadioGroup??ni;return(0,M.jsx)(n,{...e,ref:t})})),ii=j.createContext(void 0);function ai(){let e=j.useContext(ii);if(e===void 0)throw Error(Ie(35));return e}var oi=j.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:c=!1,closeOnClick:l=!1,value:u,style:d,...p}=e,{store:m}=y(),{value:h,setValue:g,disabled:_}=ti(),v=f({guess:!0,label:a}),b=Ne(i),x=m.useState(`isActive`,v.index),S=m.useState(`floatingNodeId`),C=m.useState(`itemProps`),w=m.useState(`disabled`),T=c||_||w,E=h===u,{getItemProps:D,itemRef:O}=ne({closeOnClick:l,disabled:T,highlighted:x,id:b,store:m,nativeButton:o,nodeId:S,itemMetadata:s}),ee=j.useMemo(()=>({disabled:T,highlighted:x,checked:E}),[T,x,E]);function te(e){let t=Ae(Me,e.nativeEvent,void 0,{preventUnmountOnClose:Ke});g(u,t)}let re=Fe(`div`,e,{state:ee,stateAttributesMapping:Ee,props:[C,{role:`menuitemradio`,"aria-checked":E,onClick:te},p,D],ref:[O,t,v.ref]});return(0,M.jsx)(ii.Provider,{value:ee,children:re})}),si=j.forwardRef(function(e,t){let n=te(e,t);return n.visible?(0,M.jsx)(oi,{...e,ref:n.ref}):null}),ci=j.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ai(),c=j.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=pt(s.checked);gt({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Fe(`span`,e,{state:f,stateAttributesMapping:Ee,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),li=e(r(),1),ui=new Map;function di(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${rr(t)}|${JSON.stringify(r)}`,a=ui.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=Sn(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Sn(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Sn(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return ui.set(i,s),s}var fi=`⁠`;function pi(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function mi(e=!0){let t=Ge(),n=j.useRef(null);return j.useEffect(()=>{if(!e||yt)return;let r=n.current;if(r==null)return;let i=pi(r);if(i==null)return;let a=i.data,o=`${a}${fi}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}function hi(e,t,n,r,i,a,o,s,c,l=2){let u=wt(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return _t(n.current,u)?void 0:u}var gi=j.createContext(void 0),_i=j.createContext(void 0),vi=j.createContext(void 0),yi=j.createContext(!1),bi=j.createContext(``);function xi(){let e=j.useContext(gi);if(!e)throw Error(Ie(22));return e}function Si(){let e=j.useContext(_i);if(!e)throw Error(Ie(23));return e}function Ci(){let e=j.useContext(vi);if(!e)throw Error(Ie(24));return e}function wi(){return j.useContext(bi)}function Ti(){return j.useContext(yi)}var Ei={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Cn(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>bn(t,e,n)):bn(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function Di(e){return e==null?void 0:`${e}-popup`}function Oi(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var ki=di;function Ai(e,t=!1){let{overflowY:n}=Ze(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var ji=Symbol(`none`),Mi={value:ji,index:-1};function Ni(e,t,n){let r=e.get(t);if(r!==void 0||n===yn)return r;for(let[r,i]of e)if(bn(r,t,n))return i}function Pi(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:l,defaultOpen:u=!1,selectionMode:d,onItemHighlighted:f,name:p,form:m,disabled:h=!1,readOnly:g=!1,required:_=!1,inputRef:v,grid:y=!1,items:b,filteredItems:x,filter:S,filterQuery:w,openOnInputClick:E=!0,autoHighlight:ee=!1,keepHighlight:te=!1,highlightItemOnHover:ne=!0,loopFocus:re=!0,itemToStringLabel:ie,itemToStringValue:ae,isItemEqualToValue:oe=yn,virtualized:se=!1,inline:ce=!1,fillInputOnItemPress:le=!0,modal:fe=!1,limit:pe=-1,autoComplete:me=`list`,formAutoComplete:he,locale:ve,submitOnItemClick:be=!1}=e,{clearErrors:Se}=ue(),{setDirty:Ce,validityData:we,setFilled:Te,name:Ee,disabled:De,setTouched:Ne,setFocused:Fe,validationMode:He,validation:Ue}=ge(),Ge=xe(),Je=ye({id:t}),Ze=ki({locale:ve}),tt=Array.isArray(b)?null:b;if(tt&&typeof tt.label!=`function`)throw Error(Ie(100));let it=tt?tt.data:b,at=tt?.value,lt=at?void 0:it,ut=j.useMemo(()=>{if(!x||!at)return;let e=dn(x),t=e.map(at),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Ni(n,r,i)}}},[x,at]),ft=j.useMemo(()=>tt?e=>tt.label(e,oe,e=>{let t=ut?.findItem(e,oe);return t==null?Sn(e,ie):tt.itemLabel(t)}):ie,[tt,ie,ut,oe]),pt=j.useMemo(()=>tt?Object.assign(e=>tt.itemLabel(e),{selected:e=>Sn(e,ft)}):ie,[tt,ft,ie]);function gt(e){return Sn(e,ft)}let[_t,vt]=j.useState(!1),[yt,bt]=j.useState(null),xt=j.useRef(yt),wt=j.useRef([]),Tt=j.useRef([]),Dt=j.useRef(null),Ot=j.useRef(null),kt=j.useRef(null),At=j.useRef(null),jt=j.useRef(null),Mt=j.useRef(!1),Nt=j.useRef(null),Pt=j.useRef(null),Ft=j.useRef(null),It=j.useRef(Mi),Lt=j.useRef(null),Rt=j.useRef([]),zt=j.useRef(null),Bt=De||h,Vt=Ee??p,Ht=d===`multiple`,Ut=d===`single`,Wt=s!==void 0||o!==void 0,Gt=it!==void 0,Kt=x!==void 0,qt;qt=ee===`always`?`always`:ee?`input-change`:!1;let[k,Jt]=C({controlled:i,default:Ht?r??Ve:r,name:`Combobox`,state:`selectedValue`}),Yt=j.useMemo(()=>S===null?()=>!0:S===void 0?Oi(Ze,pt):S,[S,Ze,pt]),Xt=We(()=>Wt?o??``:Ut?gt(k):``).current,[Zt,Qt]=C({controlled:s,default:Xt,name:`Combobox`,state:`inputValue`}),[$t,en]=C({controlled:l,default:u,name:`Combobox`,state:`open`}),tn=cn(it),nn=!$t&&yt!==null?yt:String(Zt).trim(),rn=Ut?gt(k):``,an=Ut&&!_t&&nn!==``&&rn.length===nn.length&&Ze.contains(rn,nn),on=an?``:w??nn,sn=Gt&&Kt&&an&&(!tt||tt.hasValue(k,oe)),fn=j.useMemo(()=>it?dn(it):Ve,[it]),hn=j.useMemo(()=>{if(x&&!sn)return x;if(!it)return Ve;if(tn){let e=it,t=[],n=0;for(let r of e){if(pe>-1&&n>=pe)break;let e=pe>-1?pe-n:1/0,i=on===``?r.items.slice(0,e):[];if(on!==``)for(let t of r.items){if(i.length>=e)break;Yt(t,on,pt)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(on===``)return pe>-1?fn.slice(0,pe):fn;let e=[];for(let t of fn){if(pe>-1&&e.length>=pe)break;Yt(t,on,pt)&&e.push(t)}return e},[x,sn,it,tn,on,pe,Yt,pt,fn]),_n=j.useMemo(()=>{if(ut&&hn===x)return ut.values;let e=dn(hn);return at?e.map(e=>at(e)):e},[hn,x,ut,at]),A=We(()=>{let e=null;return ce&&$t&&Gt&&d!==`none`&&(e=Mn(_n,k,oe,Ht)),new ht({id:Je,labelId:void 0,selectedValue:k,open:$t,items:lt,selectionMode:d,name:Vt,form:m,disabled:Bt,readOnly:g,required:_,grid:y,virtualized:se,openOnInputClick:E,itemToStringLabel:ft,isItemEqualToValue:oe,modal:fe,autoHighlight:qt,submitOnItemClick:be,hasInputValue:Wt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:ce,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:Ye,id:Je,selectionMode:d,disabled:Bt,readOnly:g,isItemEqualToValue:oe},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:d===`none`},{onOpenChangeComplete:Ke,setOpen:Ke,setInputValue:Ke,setSelectedValue:Ke,setIndices:Ke,handleSelection:Ke,forceMount:Ke,requestSubmit:Ke,listRef:wt,labelsRef:Tt,popupRef:Dt,emptyRef:jt,inputRef:Ot,startDismissRef:kt,endDismissRef:At,chipsContainerRef:Nt,clearRef:Pt,valuesRef:Rt,pointerDownItemRef:zt,selectionEventRef:Ft},Ei)}).current,vn=d===`none`?Zt:k,xn=j.useMemo(()=>d===`none`?vn:Array.isArray(k)?k.map(e=>ln(e,ae)):ln(k,ae),[vn,ae,d,k]),Cn=qe(f),wn=qe(n),Tn=A.useState(`activeIndex`),En=A.useState(`selectedIndex`),Dn=A.useState(`positionerElement`),On=A.useState(`listElement`),kn=A.useState(`triggerElement`),An=A.useState(`inputElement`),jn=A.useState(`inputGroupElement`),Pn=A.useState(`inline`),In=A.useState(`inputInsidePopup`),Ln=A.useState(`inputOwnsFormValue`),Rn=Ut&&!In&&Zt===rn,zn=$e(kn),{openMethod:Bn,triggerProps:Vn}=c($t),Hn=qe(()=>xn);T(In?zn:Ot,Je,vn,Hn,!Bt,p);let Un=qe(()=>{it?Tt.current=_n.map(gt):A.set(`forceMounted`,!0)}),Wn=qe((e,t,n,r)=>{if(t===-1){if(It.current===Mi)return;It.current=Mi}else It.current={value:e,index:t};Cn(e,ze(n,r,{index:t}))}),Gn=qe(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),A.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Wn(void 0,-1,r,e.event):Wn(Rt.current[n],n,r,e.event)}),Kn=qe((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Mt.current=n.reason===je,n.reason===`input-change`){$t&&yt!==null&&bt(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&vt(!0),Lt.current={hasQuery:e};let n=A.state.listElement;if(!A.state.virtualized&&n){let e=Dt.current;for(let t of rt(n.firstElementChild??n)){if(!dt(t)||(e?!mt(e,t):t.getAttribute(`role`)===`dialog`))break;if(Ai(t)){t.scrollTop=0;break}}}e&&qt&&A.state.activeIndex==null&&($t||Pn)&&A.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&A.state.inputInsidePopup&&(Lt.current={hasQuery:!1,selection:!0});Qt(t)}}),qn=qe(e=>{let t=!e&&In&&!Pn&&Zt!==``&&(String(Zt).trim()===yt||Zt===rn);!e&&(t||Zt===``||Rn)&&vt(!1),bt(null),t&&Kn(``,Ae(je))}),[Jn,Yn]=j.useState(!1),Xn=qe((t,n)=>{if($t===t)return;n.reason===`escape-key`&&Gt&&_n.length===0&&!jt.current&&n.allowPropagation();let r=n,i=et(r);if(e.onOpenChange?.(t,r),Lt.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Lt.current=null),!n.isCanceled&&(t&&yt!==null&&qn(n.reason===Le),!t&&_t&&(Ut?(Pn||bt(nn),nn===``&&vt(!1)):Ht&&(Pn||bt(nn),In&&Gn({activeIndex:null}),(!In||Pn)&&Kn(``,Ae(je,n.event,void 0,{isItemPress:n.reason===Me})))),t||Yn(i()),en(t),!t&&In&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(Ne(!0),Fe(!1),He===`onBlur`))){let e=d===`none`?Zt:k;Ue.commit(e)}}),Zn=qe((e,t)=>{a?.(e,t),t.isCanceled||(Jt(e),(d===`none`&&Dt.current&&le||Ut&&!A.state.inputInsidePopup)&&Kn(gt(e),Ae(t.reason,t.event)))}),Qn=qe((e,t)=>{let n=Ct(e),r=Ft.current??e;Ft.current=null;let i=Ae(Me,r),a=St(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Xn(!1,i);else if(Ht){let e=Array.isArray(k)?k:[],n=pn(e,t,oe),r=n?gn(e,t,oe):[...e,t];if(Zn(r,i),i.isCanceled||!(Ot.current&&Ot.current.value.trim()!==``))return;if(A.state.inputInsidePopup){Kn(``,Ae(je,i.event,void 0,{isItemPress:!0}));let e=Lt.current;e&&!n&&(e.toggledValue=t)}else Xn(!1,i)}else{if(Zn(t,i),i.isCanceled)return;Xn(!1,i)}}),$n=qe(()=>{let e=Ue.inputRef.current?.form??A.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),er=qe(()=>{if(wn?.(!1),vt(!1),bt(null),Gn(d===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ht&&Ot.current&&Ot.current.value!==``&&!Mt.current&&Kn(``,Ae(je)),Ut){if(A.state.inputInsidePopup)Ot.current&&Ot.current.value!==``&&Kn(``,Ae(je));else{let e=gt(k);Ot.current&&Ot.current.value!==e&&Kn(e,Ae(e===``?je:ke))}}}),tr=j.useMemo(()=>Pn&&Dn?{current:St(Dn,`[role="dialog"]`)}:Dt,[Pn,Dn]),{mounted:nr,transitionStatus:rr,forceUnmount:ir}=nt({open:$t,ref:tr,preventUnmountOnClose:Jn,setPreventUnmountOnClose:Yn,onUnmount:er});j.useImperativeHandle(e.actionsRef,()=>({unmount:ir,close:()=>Xn(!1,Ae(Xe))}),[ir,Xn]),Oe(function(){let e=xt.current!==null&&yt===null;if(xt.current=yt,$t&&(!e||!Gt)||($t||(zt.current=null),d===`none`))return;let t=Gt?_n:Rt.current;Gn({selectedIndex:Mn(t,k,oe,Ht)})},[$t,yt,k,d,Ht,Gt,_n,oe,Gn]),Oe(()=>{it&&(Rt.current=_n,wt.current.length=_n.length)},[it,_n]),Oe(()=>{!$t&&Lt.current?.hasQuery&&(Lt.current=null)},[$t]),Oe(()=>{if(!$t&&Pn&&tr.current){Lt.current=null;return}let e=Gt||Kt?_n:Rt.current,t=Lt.current;if(t){let n=$t||Pn||A.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Ot.current;!qt||String(Zt).trim()===``||Pn&&qt!==`always`&&(!t||Et(t.ownerDocument)!==t)?Lt.current=null:n&&(e[0]!==void 0||!Gt&&!Kt)&&(A.set(`activeIndex`,0),Lt.current=null)}else if(String(Zt).trim()===``&&(Lt.current=null,n)){let e=t.selection;qt===`always`&&!e&&A.state.selectionMode===`none`&&A.set(`activeIndex`,0),queueMicrotask(()=>{if(!A.state.open&&(!A.state.inline||tr.current)||Ot.current&&Ot.current.value.trim()!==``)return;let n=A.state.selectedValue,r=A.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:A.state.selectionMode!==`none`&&n!=null){let e=Gt||Kt?_n:Rt.current,i=mn(e,t.toggledValue,A.state.isItemEqualToValue);A.set(`activeIndex`,i===-1?Mn(e,n,A.state.isItemEqualToValue,r):i)}else e?A.set(`activeIndex`,null):qt===`always`&&A.set(`activeIndex`,0)})}}if(!$t&&!Pn)return;let n=A.state.activeIndex;if(n==null){if(qt===`always`&&e.length>0){A.set(`activeIndex`,0);return}Wn(void 0,-1,ke);return}if(n>=e.length){Wn(void 0,-1,ke),A.set(`activeIndex`,null);return}let r=e[n],i=It.current.value,a=i!==ji&&bn(r,i,A.state.isItemEqualToValue);It.current.index===n&&a||Wn(r,n,ke)},[Tn,qt,Wn,Kt,Gt,_n,Pn,$t,tr,A,Zt]),Oe(()=>{Te(d===`none`?String(Zt)!==``:Ht?Array.isArray(k)&&k.length>0:k!=null)},[Te,d,Zt,k,Ht]),j.useEffect(()=>{Gt&&qt&&_n.length===0&&Gn({activeIndex:null})},[Gt,qt,_n.length,Gn]);function ar(){$t&&nn!==``&&nn!==String(Xt)&&!Rn&&vt(!0)}function or(){$t&&yt!==null&&qn(!1)}let sr=!1;function cr(){!sr&&Zt!==rn&&(sr=!0,Kn(rn,Ae(ke)))}function lr(){d!==`none`&&(Se(Vt),Ce(Fn(k,we.initialValue,oe)),Ue.change(k),Ut&&!Wt&&!In&&cr())}function ur(){Ut&&!Wt&&!In&&!_t&&cr()}function dr(){d===`none`&&(Se(Vt),Ce(Zt!==we.initialValue),Ue.change(Zt))}O(nn,ar),O($t,or),O(k,lr),O(rn,ur),O(it,ur),O(Zt,dr);let fr=un({open:Pn?!0:$t,onOpenChange:Xn,elements:{reference:In?kn:An,floating:Dn}}),pr=y?`grid`:`listbox`,mr=$t||Pn,hr=mr?`true`:`false`,gr=j.useMemo(()=>{let e=An?.tagName===`INPUT`,t=An==null||e,n=t||mr,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=hr,r[`aria-haspopup`]=pr,r[`aria-controls`]=mr?On?.id:void 0,r[`aria-autocomplete`]=g?`none`:me),{reference:r,floating:{role:`presentation`}}},[An,mr,hr,pr,On?.id,me,g]),_r=de(fr,{enabled:!Bt&&E,event:`mousedown-only`,toggle:!1,touchOpenDelay:In?0:100,reason:Re}),vr=ct(fr,{enabled:!Bt&&!Pn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Pn?!0:void 0,outsidePress(e){let t=Ct(e);return!mt(kn,t)&&!mt(Pt.current,t)&&!mt(Nt.current,t)&&!mt(jn,t)}}),yr=_e(fr,{enabled:!Bt,id:Je,listRef:wt,activeIndex:Tn,selectedIndex:En,virtual:!0,loopFocus:re,allowEscape:re&&!qt,focusItemOnOpen:_t||d===`none`&&!qt?!1:`auto`,focusItemOnHover:ne,resetOnPointerLeave:!te,orientation:y?`horizontal`:void 0,rtl:Ge===`rtl`,disabledIndices:Ve,grid:y?hi:void 0,onNavigate(e,t){(t||$t||Pn&&e===null)&&rr!==`ending`&&Gn({activeIndex:e,type:D(t),event:t?.nativeEvent})}}),br=j.useMemo(()=>Pe(yr.reference,{onKeyDown(e){y&&A.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},vr.reference,_r.reference,gr.reference),[yr.reference,vr.reference,_r.reference,gr.reference,y,A]),xr=j.useMemo(()=>Pe(Qe,vr.floating),[vr.floating]),Sr=j.useMemo(()=>Pe(yr.floating,gr.floating),[yr.floating,gr.floating]),Cr=j.useMemo(()=>{let e=yr.item;return{props:e?{...e,onFocus:void 0}:Ye,id:Je,selectionMode:d,disabled:Bt,readOnly:g,isItemEqualToValue:oe}},[yr.item,Je,d,Bt,g,oe]);A.useContextCallback(`setOpen`,Xn),A.useContextCallback(`setInputValue`,Kn),A.useContextCallback(`setSelectedValue`,Zn),A.useContextCallback(`setIndices`,Gn),A.useContextCallback(`handleSelection`,Qn),A.useContextCallback(`forceMount`,Un),A.useContextCallback(`requestSubmit`,$n),A.useContextCallback(`onOpenChangeComplete`,n),Nn(()=>{A.update({inline:ce,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Vn,itemRoot:Cr})});let wr={id:Je,selectedValue:k,open:$t,mounted:nr,transitionStatus:rr,items:lt,inline:ce,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Vn,itemRoot:Cr,openMethod:Bn,selectionMode:d,name:Vt,form:m,disabled:Bt,readOnly:g,required:_,grid:y,virtualized:se,openOnInputClick:E,itemToStringLabel:ft,modal:fe,autoHighlight:qt,isItemEqualToValue:oe,submitOnItemClick:be,hasInputValue:Wt};Oe(()=>{A.update({...wr,inputOwnsFormValue:d===`none`&&(ce||!A.state.inputInsidePopup)})},[A,...Object.values(wr)]);let Tr=Be(v,Ue.inputRef),Er=j.useMemo(()=>({query:nn,hasItems:Gt,filteredItems:hn,flatFilteredValues:_n}),[nn,Gt,hn,_n]),Dr=j.useMemo(()=>Array.isArray(vn)?``:ln(vn,ae),[vn,ae]),Or=Ht&&Array.isArray(k)&&k.length>0,kr=Ht||d===`none`&&Ln?void 0:Vt,Ar=j.useMemo(()=>!Ht||!Array.isArray(k)||!Vt?null:k.map(e=>{let t=ln(e,ae);return(0,M.jsx)(`input`,{type:`hidden`,form:m,name:Vt,value:t,disabled:Bt},t)}),[Ht,k,m,Vt,ae,Bt]),jr=(0,M.jsxs)(j.Fragment,{children:[e.children,(0,M.jsx)(`input`,{...Ue.getValidationProps(Bt,{onFocus(){In?kn?.focus():(Ot.current||kn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Bt||g)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Ae(ke,e.nativeEvent),i=()=>Rt.current.findIndex(e=>ln(e,ae).toLowerCase()===n||gt(e).toLowerCase()===n);function a(){if(Ht)return;if(d===`none`){Kn(t,r);return}let e=i();e===-1&&(e=Rt.current.findIndex((e,t)=>{let r=Tt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Rt.current[e];a!=null&&Zn?.(a,r)}Ut&&(Un(),it&&i()===-1&&A.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Je&&kr==null?`${Je}-hidden-input`:void 0,form:m,name:kr,autoComplete:he,disabled:Bt,required:_&&!Or,readOnly:g,value:Dr,ref:Tr,style:kr?st:ot,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ar]});return(0,M.jsx)(gi.Provider,{value:A,children:(0,M.jsx)(_i.Provider,{value:fr,children:(0,M.jsx)(yi.Provider,{value:Gt,children:(0,M.jsx)(vi.Provider,{value:Er,children:(0,M.jsx)(bi.Provider,{value:Zt,children:jr})})})})})}var Fi=`data-popup-side`,Ii=`data-list-empty`,Li={...tt,...fe,popupSide:e=>e?{[Fi]:e}:null,listEmpty:e=>e?{[Ii]:``}:null};function Ri(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function zi(){return Ci().filteredItems.length===0}function Bi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Vi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Hi=j.createContext(void 0);function Ui(){return j.useContext(Hi)}var Wi=j.createContext(void 0);function Gi(e){let t=j.useContext(Wi);if(t===void 0&&!e)throw Error(Ie(21));return t}var Ki=j.forwardRef(function(e,t){let n=xi(),{buttonRef:r,getButtonProps:i}=lt({native:!1}),a=Be(t,r);function o(e){n.context.setOpen(!1,Ae(He,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,M.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:st})}),qi=j.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:p}=ge(),{labelId:m}=ae(),h=Ui(),g=!!Gi(!0),_=xi(),v=wi(),y=xe(),b=_.useState(`required`),x=_.useState(`disabled`),S=_.useState(`readOnly`),C=_.useState(`name`),w=_.useState(`form`),T=_.useState(`selectionMode`),E=_.useState(`autoHighlight`),O=_.useState(`inputProps`),ee=_.useState(`triggerProps`),te=_.useState(`open`),ne=_.useState(`mounted`),re=_.useState(`selectedValue`),ie=_.useState(`id`),oe=_.useState(`inline`),se=_.useState(`modal`),ce=!!E,le=Ri(_),ue=u||x||i,de=zi(),fe=a(ue,_.context.inputRef),pe=g||oe,he=!pe||se,_e=Ne(o??(pe?void 0:ie)),ve=g?be:l,[ye,Ce]=j.useState(null),we=j.useRef(!1),Te=j.useRef(null);Oe(()=>{te||(Te.current=null)},[te]);let Ee=T===`none`&&!g,De=qe(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.context.setInputValue(``,Ae(ke)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:Ee})}),Me=g?c:p.getValidationProps(ue,c);function Pe(e){_.context.setIndices({activeIndex:null,selectedIndex:null,type:D(e),event:e})}let Ie={...ve,open:te,disabled:ue,readOnly:S,popupSide:le,listEmpty:de};function Re(e){if(!h)return;let t,n=h.chipsRef.current.length,[r]=Bi(y);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&re.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let ze=Fe(`input`,e,{state:Ie,ref:[t,_.context.inputRef,De],props:[O,ee,{value:ye??v,"aria-readonly":S||void 0,"aria-required":b||void 0,"aria-labelledby":m,disabled:ue,readOnly:S,required:T===`none`?b:void 0,form:w,...Ee&&C&&{name:C},id:_e,onFocus(){if(fe(!0),!oe)return;let e=Te.current;Te.current=null,e!=null&&Object.hasOwn(_.context.valuesRef.current,e)&&_.context.setIndices({activeIndex:e})},onBlur(){d(!0),fe(!1);let e=_.state.activeIndex;if(oe&&e!==null&&E!==`always`&&(Te.current=e,_.context.setIndices({activeIndex:null})),f===`onBlur`){let e=T===`none`?v:re;p.commit(e)}},onCompositionStart(e){bt||(we.current=!0,Ce(e.currentTarget.value))},onCompositionEnd(e){we.current=!1;let t=e.currentTarget.value;Ce(null),_.context.setInputValue(t,Ae(Le,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=we.current||!r;function a(e){!S&&!ue&&e&&i&&(_.context.setOpen(!0,Ae(Le,t)),ce||Pe(t))}if(we.current){let n=e.currentTarget.value;Ce(n),n===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.context.setOpen(!1,Ae(je,t));let r=n.trim(),i=ce&&r!==``;a(r),te&&_.state.activeIndex!==null&&!i&&Pe(t);return}let o=Ae(Le,t);if(_.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Ae(je,t);s&&!_.state.inputInsidePopup&&(T===`single`&&_.context.setSelectedValue(null,c),_.state.openOnInputClick||_.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),te&&_.state.activeIndex!==null&&!ce&&Pe(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(ue||S){S&&e.key===`Enter`&&te&&_.state.activeIndex!==null&&Dt(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=y===`rtl`;if(e.key===`Home`){Dt(e);let n=Tt&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Dt(e);let i=Tt&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!ne&&e.key===`Escape`){let t=T===`multiple`&&Array.isArray(re)?re.length===0:re===null,n=Ae(Ue,e.nativeEvent),r=T===`multiple`?[]:null;_.context.setInputValue(``,n),_.context.setSelectedValue(r,n),t||_.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&Array.isArray(re)&&re.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:re.length-1,r=re.filter((e,t)=>t!==n);Pe(e.nativeEvent),_.context.setSelectedValue(r,Ae(ke,e.nativeEvent));return}let i=Re(e);if(i!==void 0&&h?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&te){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(oe)return;_.context.setOpen(!1,Ae(ke,n));return}Dt(e),Vi(_,t,n)}}},Me],stateAttributesMapping:Li}),Be=g?(0,M.jsx)(Se.Provider,{value:me,children:ze}):ze;return(0,M.jsxs)(j.Fragment,{children:[te&&he&&(0,M.jsx)(Ki,{ref:_.context.startDismissRef}),Be]})}),Ji=j.createContext(null);function Yi(){return j.useContext(Ji)}function Xi(e){let{children:t}=e,{filteredItems:n}=Ci(),r=Yi(),i=r?r.items:n;return(0,M.jsx)(j.Fragment,{children:i.map(t)})}var Zi=j.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=xi(),l=Si(),u=!!Gi(!0),{filteredItems:f,hasItems:p}=Ci(),m=c.useState(`selectionMode`),h=c.useState(`grid`),g=c.useState(`readOnly`),_=c.useState(`listProps`),v=c.useState(`virtualized`),y=c.useState(`forceMounted`),b=m===`multiple`,x=f.length===0,S=qe(e=>{c.set(`positionerElement`,e)}),C=qe(e=>{c.set(`listElement`,e)}),w=j.useMemo(()=>typeof o==`function`?n||=(0,M.jsx)(Xi,{children:o}):o,[o]),T={empty:x},E=l.useState(`floatingId`),D=Fe(`div`,e,{state:T,ref:[t,C,u?null:S],props:[_,{children:w,tabIndex:-1,id:E,role:h?`grid`:`listbox`,"aria-multiselectable":b?`true`:void 0,"aria-readonly":!h&&g?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Dt(e),Vi(c,t,e.nativeEvent)}}},s]});if(v)return D;let O=p&&!y?void 0:c.context.labelsRef;return(0,M.jsx)(d,{elementsRef:c.context.listRef,labelsRef:O,children:D})}),Qi=j.createContext(void 0);function $i(){let e=j.useContext(Qi);if(e===void 0)throw Error(Ie(20));return e}var ea=j.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=xi(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,M.jsx)(Qi.Provider,{value:n,children:(0,M.jsx)(at,{ref:t,...r})}):null}),ta=j.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=ft,style:g,..._}=e,v=xi(),y=Si(),b=$i(),x=v.useState(`modal`),C=v.useState(`open`),w=v.useState(`mounted`),T=v.useState(`openMethod`),E=v.useState(`positionerElement`),D=v.useState(`triggerElement`),O=v.useState(`inputElement`),ee=v.useState(`inputGroupElement`),te=v.useState(`inputInsidePopup`),ne=v.useState(`transitionStatus`),re=zi(),ie=le({anchor:i??(te?D:ee??O),floatingRootContext:y,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});S(C&&x,T===`touch`,E,D);let ae={open:C,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,empty:re};Oe(()=>{v.set(`popupSide`,ie.side)},[v,ie.side]);let oe=qe(e=>{v.set(`positionerElement`,e)}),ce=se(e,ae,{styles:ie.positionerStyles,transitionStatus:ne,props:_,refs:[t,oe],hidden:!w,inert:!C});return(0,M.jsxs)(Wi.Provider,{value:ie,children:[w&&x&&(0,M.jsx)(xt,{inert:vt(!C),cutout:ee??O??D}),ce]})}),na={...ut,...it},ra=j.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=xi(),l=Gi(),u=Si(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),v=c.useState(`modal`),y=c.useState(`id`),b=zi(),x=s.id??(g?Di(y):void 0);Oe(()=>(c.set(`popupId`,c.context.popupRef.current?.id||x),()=>{c.set(`popupId`,void 0)}),[c,x]),gt({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let S={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:b},C=Fe(`div`,e,{state:S,ref:[t,c.context.popupRef],props:[m,{id:x,role:g?`dialog`:`presentation`,onFocus(e){let t=Ct(e.nativeEvent);p!==`touch`&&(mt(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},ie(h),s],stateAttributesMapping:na}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,T;T=o??(g?void 0:!1);let E=!g||v;return(0,M.jsx)(Ot,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,M.jsxs)(j.Fragment,{children:[C,E&&(0,M.jsx)(Ki,{ref:c.context.endDismissRef})]})})}),ia=j.createContext(void 0),aa=j.createContext(!1);function oa(){return j.useContext(aa)}function sa(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...p}=t,m=j.useRef(null),h=f({guess:!0,index:l,textRef:m}),g=xi(),_=oa(),v=Ti(),{props:y,id:b,selectionMode:x,disabled:S,readOnly:C,isItemEqualToValue:w}=g.useState(`itemRoot`),T=S||u,E=x!==`none`,D=l??i??h.index,O=D!==-1,ee=g.useState(`isActive`,D),te=g.useState(`isSelected`,c),ne=j.useRef(null),re=b!=null&&O?`${b}-${D}`:void 0,ie=te&&E;Oe(()=>{if(!O||!r&&l==null)return;let e=g.context.listRef.current;return e[D]=ne.current,()=>{delete e[D]}},[O,r,D,l,g]),Oe(()=>{if(!O||v)return;let e=g.context.valuesRef.current;return e[D]=c,()=>{delete e[D]}},[O,v,D,c,g]),Oe(()=>{if(!O||v)return;let e=g.state.selectedValue,t=g.state.selectedIndex;g.state.selectionMode===`multiple`&&Array.isArray(e)?t=Pn(D,c,g.context.valuesRef.current,e,w,t):bn(c,e,w)&&(t=D),g.set(`selectedIndex`,t)},[O,v,g,D,c,w]);let{getButtonProps:ae,buttonRef:oe}=lt({disabled:T,focusableWhenDisabled:!0,native:d,composite:!0}),se={disabled:T,selected:ie,highlighted:ee};function ce(e){function t(){g.context.handleSelection(e,c)}g.state.submitOnItemClick?(li.flushSync(t),g.context.requestSubmit()):t()}let le={id:re,role:_?`gridcell`:`option`,"aria-selected":E?ie:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(g.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){T||C||ce(e.nativeEvent)},onMouseUp(e){let t=g.context.pointerDownItemRef.current===e.currentTarget;g.context.pointerDownItemRef.current=null,T||C||e.button!==0||t||!ee||ce(e.nativeEvent)}},ue=Fe(`div`,t,{ref:[oe,n,h.ref,ne],state:se,props:[y,le,p,ae]}),de=j.useMemo(()=>({selected:ie,textRef:m}),[ie,m]);return(0,M.jsx)(ia.Provider,{value:de,children:ue})}function ca(e){let{componentProps:t,forwardedRef:n}=e,r=xi().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Ci(),a=t.value??null,o=mn(i,a,r);return(0,M.jsx)(sa,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var la=j.memo(j.forwardRef(function(e,t){let n=xi().useState(`virtualized`);return n&&e.index==null?(0,M.jsx)(ca,{componentProps:e,forwardedRef:t}):(0,M.jsx)(sa,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),ua=j.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Ci(),c=xi(),l=mi(),u=s.length===0?a:null;return Fe(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),da=n(),fa=(0,j.createContext)(null);function pa(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function ma(){let e=(0,j.useContext)(fa);return e??function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}(8),e}function ha(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function N(e,...t){throw ha(e,...t)}function ga(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _a(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var va=_a();function ya(){return va&&`documentMode`in document?document.documentMode:null}var ba=ya();function xa(e){return va&&e.test(navigator.platform)}function Sa(e){return va&&e.test(navigator.userAgent)}var Ca=xa(/Mac|iPod|iPhone|iPad/),wa=Sa(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function Ta(){return!(!va||!(`InputEvent`in window)||ba)&&`getTargetRanges`in new window.InputEvent(`input`)}var Ea=Ta();function Da(){return va&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Oa=Da(),ka=Sa(/Android/),Aa=Sa(/Version\/[\d.]+.*Safari/)&&!ka,ja=Sa(/^(?=.*Chrome).*/i),Ma=va&&ka&&ja,Na=Sa(/AppleWebKit\/[\d.]+/)&&Ca&&!ja;function Pa(){return 2047}var Fa=Pa(),Ia=Aa||Oa||Na?`\xA0`:`​`,La=`
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{b as t,v as n,w as r}from"./route-CkVEiakc.js";import{t as i}from"./react-DlmbjZJV.js";import{$t as a,An as o,Bn as s,Cn as c,Cr as l,Dn as u,Dr as d,Er as f,Fn as p,G as m,Hn as h,In as g,J as _,K as v,Kn as y,Ln as b,Nn as x,On as S,Or as C,Pn as w,Qt as T,Rn as E,Sn as D,Tn as O,Tr as ee,Un as te,Vn as ne,X as re,Xn as ie,Xt as ae,Y as oe,Yn as se,Z as ce,Zn as le,Zt as ue,_r as de,an as fe,bn as pe,en as me,jn as he,nn as ge,pr as _e,q as ve,qt as ye,rn as be,rr as xe,tn as Se,vn as Ce,xn as we,yn as Te,zn as Ee}from"./url-64-774qp.js";import{t as De}from"./jsx-runtime-LKYXHABd.js";import{$ as Oe,A as ke,B as Ae,C as je,E as Me,H as Ne,J as Pe,K as Fe,Q as Ie,S as Le,T as Re,V as ze,Z as Be,et as Ve,f as He,g as Ue,it as We,l as Ge,nt as Ke,rt as qe,s as Je,tt as Ye,v as Xe}from"./mergeRefs-BoWyGCK7.js";import{An as Ze,C as Qe,Cn as $e,E as et,Gt as tt,I as nt,In as rt,Jn as it,K as at,Nt as ot,Pt as st,R as ct,Tn as lt,Ut as ut,Vn as dt,Z as ft,Zn as pt,an as mt,b as ht,bn as gt,dt as _t,g as vt,gn as yt,hn as bt,i as xt,in as St,on as Ct,ot as wt,pn as Tt,rn as Et,un as Dt,z as Ot}from"./useLayerZIndex-t4BgGwYi.js";import{Tt as kt}from"./MotionConfigContext-B3czw3wn.js";import{A as At,C as jt,E as Mt,O as Nt,S as Pt,T as Ft,_ as It,b as Lt,c as Rt,d as zt,g as Bt,h as Vt,j as Ht,l as Ut,s as Wt,u as Gt,v as Kt,x as qt,y as k}from"./Popover-CI2fBO-6.js";import{t as Jt}from"./arrow-up-kdcWAnXX.js";import{d as Yt,f as Xt}from"./parseTrigger-dhvXKZoS.js";import{n as Zt,t as Qt}from"./type-DA3yqyzM.js";import{a as $t,i as en,n as tn,r as nn,t as rn}from"./minus-YVaskeP9.js";import{n as an,t as on}from"./ellipsis-BN0LovOQ.js";import{t as sn}from"./code-DZDLeByL.js";import{A as cn,M as ln,N as un,O as dn,P as fn,S as pn,_ as mn,a as hn,b as gn,c as _n,d as A,f as vn,g as yn,h as bn,i as xn,j as Sn,k as Cn,m as wn,n as Tn,o as En,p as Dn,r as On,s as kn,t as An,u as jn,v as Mn,w as Nn,x as Pn,y as Fn}from"./SelectScrollUpArrow-DccpygLx.js";import{a as In,c as Ln,i as Rn,n as zn,o as Bn,r as Vn,s as Hn,t as Un}from"./text-align-start-CvIfWAwj.js";import{a as Wn,i as Gn,n as Kn,t as qn}from"./ruler-C-6kncvn.js";import{t as Jn}from"./image-DSbKs3OG.js";import{n as Yn,r as Xn,t as Zn}from"./zoom-out-DsqNailP.js";import{t as Qn}from"./maximize-2-BEWXAYRs.js";import{t as $n}from"./mouse-pointer-2-FWjclmSy.js";import{i as er,n as tr,r as nr,t as rr}from"./stringifyLocale-Dx2d4AZJ.js";import{t as ir}from"./plus-DOEIgzPd.js";import{t as ar}from"./trash-BZS14NA2.js";import{t as or}from"./MenuTrigger-CJXtjCtF.js";var sr={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};sr.node;var cr=kt(sr),lr={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};lr.node;var ur=kt(lr),dr={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};dr.node;var fr=kt(dr),pr={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};pr.node;var mr=kt(pr),hr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};hr.node;var gr=kt(hr),_r={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};_r.node;var vr=kt(_r),yr={name:`grip-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]};yr.node;var br=kt(yr),xr={name:`group`,size:24,node:[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]};xr.node;var Sr=kt(xr),Cr={name:`hash`,size:24,node:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]};Cr.node;var wr=kt(Cr),Tr={name:`highlighter`,size:24,node:[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]};Tr.node;var Er=kt(Tr),Dr={name:`letter-h`,size:24,node:[[`path`,{d:`M18 20V4`,key:`o2hl4u`}],[`path`,{d:`M6 12H18`,key:`1fx1vx`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}]],aliases:[`heading`]};Dr.node;var Or=kt(Dr),kr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};kr.node;var Ar=kt(kr),jr={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};jr.node;var Mr=kt(jr),Nr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Nr.node;var Pr=kt(Nr),Fr={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Fr.node;var Ir=kt(Fr),Lr={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};Lr.node;var Rr=kt(Lr),zr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};zr.node;var Br=kt(zr),Vr={name:`spline`,size:24,node:[[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}],[`path`,{d:`M5 17A12 12 0 0 1 17 5`,key:`1okkup`}]]};Vr.node;var Hr=kt(Vr),Ur={name:`squircle`,size:24,node:[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9`,key:`garfkc`}]]};Ur.node;var Wr=kt(Ur),Gr={name:`strikethrough`,size:24,node:[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]};Gr.node;var Kr=kt(Gr),qr={name:`ungroup`,size:24,node:[[`rect`,{x:`11`,y:`14`,width:`10`,height:`7`,rx:`2`,key:`nfm8rk`}],[`rect`,{x:`3`,y:`3`,width:`10`,height:`7`,rx:`2`,key:`1ljebb`}]]};qr.node;var Jr=kt(qr),Yr={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};Yr.node;var Xr=kt(Yr),j=e(i(),1),M=De(),Zr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=j.useMemo(()=>({open:t,close:n}),[t,n]);return(0,M.jsx)(k.Provider,{value:t,children:(0,M.jsx)(jt,{delay:i,timeoutMs:r,children:e.children})})},Qr=class extends Pt{constructor(){super(qt(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function $r(){return new Qr}var ei=j.createContext(void 0);function ti(){let e=j.useContext(ei);if(e===void 0)throw Error(Ie(34));return e}var ni=j.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=j.useState(void 0),[p,m]=C({controlled:i,default:a,name:`MenuRadioGroup`}),h=qe((e,t)=>{o?.(e,t),t.isCanceled||m(e)}),_=Fe(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),v=j.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,M.jsx)(g.Provider,{value:f,children:(0,M.jsx)(ei.Provider,{value:v,children:_})})}),ri=j.memo(j.forwardRef(function(e,t){let n=h()?.RadioGroup??ni;return(0,M.jsx)(n,{...e,ref:t})})),ii=j.createContext(void 0);function ai(){let e=j.useContext(ii);if(e===void 0)throw Error(Ie(35));return e}var oi=j.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:c=!1,closeOnClick:l=!1,value:u,style:d,...p}=e,{store:m}=y(),{value:h,setValue:g,disabled:_}=ti(),v=f({guess:!0,label:a}),b=Ne(i),x=m.useState(`isActive`,v.index),S=m.useState(`floatingNodeId`),C=m.useState(`itemProps`),w=m.useState(`disabled`),T=c||_||w,E=h===u,{getItemProps:D,itemRef:O}=ne({closeOnClick:l,disabled:T,highlighted:x,id:b,store:m,nativeButton:o,nodeId:S,itemMetadata:s}),ee=j.useMemo(()=>({disabled:T,highlighted:x,checked:E}),[T,x,E]);function te(e){let t=Ae(Me,e.nativeEvent,void 0,{preventUnmountOnClose:Ke});g(u,t)}let re=Fe(`div`,e,{state:ee,stateAttributesMapping:Ee,props:[C,{role:`menuitemradio`,"aria-checked":E,onClick:te},p,D],ref:[O,t,v.ref]});return(0,M.jsx)(ii.Provider,{value:ee,children:re})}),si=j.forwardRef(function(e,t){let n=te(e,t);return n.visible?(0,M.jsx)(oi,{...e,ref:n.ref}):null}),ci=j.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ai(),c=j.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=pt(s.checked);gt({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Fe(`span`,e,{state:f,stateAttributesMapping:Ee,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),li=e(r(),1),ui=new Map;function di(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${rr(t)}|${JSON.stringify(r)}`,a=ui.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=Sn(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Sn(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Sn(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return ui.set(i,s),s}var fi=`⁠`;function pi(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function mi(e=!0){let t=Ge(),n=j.useRef(null);return j.useEffect(()=>{if(!e||yt)return;let r=n.current;if(r==null)return;let i=pi(r);if(i==null)return;let a=i.data,o=`${a}${fi}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}function hi(e,t,n,r,i,a,o,s,c,l=2){let u=wt(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return _t(n.current,u)?void 0:u}var gi=j.createContext(void 0),_i=j.createContext(void 0),vi=j.createContext(void 0),yi=j.createContext(!1),bi=j.createContext(``);function xi(){let e=j.useContext(gi);if(!e)throw Error(Ie(22));return e}function Si(){let e=j.useContext(_i);if(!e)throw Error(Ie(23));return e}function Ci(){let e=j.useContext(vi);if(!e)throw Error(Ie(24));return e}function wi(){return j.useContext(bi)}function Ti(){return j.useContext(yi)}var Ei={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Cn(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>bn(t,e,n)):bn(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function Di(e){return e==null?void 0:`${e}-popup`}function Oi(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var ki=di;function Ai(e,t=!1){let{overflowY:n}=Ze(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var ji=Symbol(`none`),Mi={value:ji,index:-1};function Ni(e,t,n){let r=e.get(t);if(r!==void 0||n===yn)return r;for(let[r,i]of e)if(bn(r,t,n))return i}function Pi(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:l,defaultOpen:u=!1,selectionMode:d,onItemHighlighted:f,name:p,form:m,disabled:h=!1,readOnly:g=!1,required:_=!1,inputRef:v,grid:y=!1,items:b,filteredItems:x,filter:S,filterQuery:w,openOnInputClick:E=!0,autoHighlight:ee=!1,keepHighlight:te=!1,highlightItemOnHover:ne=!0,loopFocus:re=!0,itemToStringLabel:ie,itemToStringValue:ae,isItemEqualToValue:oe=yn,virtualized:se=!1,inline:ce=!1,fillInputOnItemPress:le=!0,modal:fe=!1,limit:pe=-1,autoComplete:me=`list`,formAutoComplete:he,locale:ve,submitOnItemClick:be=!1}=e,{clearErrors:Se}=ue(),{setDirty:Ce,validityData:we,setFilled:Te,name:Ee,disabled:De,setTouched:Ne,setFocused:Fe,validationMode:He,validation:Ue}=ge(),Ge=xe(),Je=ye({id:t}),Ze=ki({locale:ve}),tt=Array.isArray(b)?null:b;if(tt&&typeof tt.label!=`function`)throw Error(Ie(100));let it=tt?tt.data:b,at=tt?.value,lt=at?void 0:it,ut=j.useMemo(()=>{if(!x||!at)return;let e=dn(x),t=e.map(at),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Ni(n,r,i)}}},[x,at]),ft=j.useMemo(()=>tt?e=>tt.label(e,oe,e=>{let t=ut?.findItem(e,oe);return t==null?Sn(e,ie):tt.itemLabel(t)}):ie,[tt,ie,ut,oe]),pt=j.useMemo(()=>tt?Object.assign(e=>tt.itemLabel(e),{selected:e=>Sn(e,ft)}):ie,[tt,ft,ie]);function gt(e){return Sn(e,ft)}let[_t,vt]=j.useState(!1),[yt,bt]=j.useState(null),xt=j.useRef(yt),wt=j.useRef([]),Tt=j.useRef([]),Dt=j.useRef(null),Ot=j.useRef(null),kt=j.useRef(null),At=j.useRef(null),jt=j.useRef(null),Mt=j.useRef(!1),Nt=j.useRef(null),Pt=j.useRef(null),Ft=j.useRef(null),It=j.useRef(Mi),Lt=j.useRef(null),Rt=j.useRef([]),zt=j.useRef(null),Bt=De||h,Vt=Ee??p,Ht=d===`multiple`,Ut=d===`single`,Wt=s!==void 0||o!==void 0,Gt=it!==void 0,Kt=x!==void 0,qt;qt=ee===`always`?`always`:ee?`input-change`:!1;let[k,Jt]=C({controlled:i,default:Ht?r??Ve:r,name:`Combobox`,state:`selectedValue`}),Yt=j.useMemo(()=>S===null?()=>!0:S===void 0?Oi(Ze,pt):S,[S,Ze,pt]),Xt=We(()=>Wt?o??``:Ut?gt(k):``).current,[Zt,Qt]=C({controlled:s,default:Xt,name:`Combobox`,state:`inputValue`}),[$t,en]=C({controlled:l,default:u,name:`Combobox`,state:`open`}),tn=cn(it),nn=!$t&&yt!==null?yt:String(Zt).trim(),rn=Ut?gt(k):``,an=Ut&&!_t&&nn!==``&&rn.length===nn.length&&Ze.contains(rn,nn),on=an?``:w??nn,sn=Gt&&Kt&&an&&(!tt||tt.hasValue(k,oe)),fn=j.useMemo(()=>it?dn(it):Ve,[it]),hn=j.useMemo(()=>{if(x&&!sn)return x;if(!it)return Ve;if(tn){let e=it,t=[],n=0;for(let r of e){if(pe>-1&&n>=pe)break;let e=pe>-1?pe-n:1/0,i=on===``?r.items.slice(0,e):[];if(on!==``)for(let t of r.items){if(i.length>=e)break;Yt(t,on,pt)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(on===``)return pe>-1?fn.slice(0,pe):fn;let e=[];for(let t of fn){if(pe>-1&&e.length>=pe)break;Yt(t,on,pt)&&e.push(t)}return e},[x,sn,it,tn,on,pe,Yt,pt,fn]),_n=j.useMemo(()=>{if(ut&&hn===x)return ut.values;let e=dn(hn);return at?e.map(e=>at(e)):e},[hn,x,ut,at]),A=We(()=>{let e=null;return ce&&$t&&Gt&&d!==`none`&&(e=Mn(_n,k,oe,Ht)),new ht({id:Je,labelId:void 0,selectedValue:k,open:$t,items:lt,selectionMode:d,name:Vt,form:m,disabled:Bt,readOnly:g,required:_,grid:y,virtualized:se,openOnInputClick:E,itemToStringLabel:ft,isItemEqualToValue:oe,modal:fe,autoHighlight:qt,submitOnItemClick:be,hasInputValue:Wt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:ce,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:Ye,id:Je,selectionMode:d,disabled:Bt,readOnly:g,isItemEqualToValue:oe},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:d===`none`},{onOpenChangeComplete:Ke,setOpen:Ke,setInputValue:Ke,setSelectedValue:Ke,setIndices:Ke,handleSelection:Ke,forceMount:Ke,requestSubmit:Ke,listRef:wt,labelsRef:Tt,popupRef:Dt,emptyRef:jt,inputRef:Ot,startDismissRef:kt,endDismissRef:At,chipsContainerRef:Nt,clearRef:Pt,valuesRef:Rt,pointerDownItemRef:zt,selectionEventRef:Ft},Ei)}).current,vn=d===`none`?Zt:k,xn=j.useMemo(()=>d===`none`?vn:Array.isArray(k)?k.map(e=>ln(e,ae)):ln(k,ae),[vn,ae,d,k]),Cn=qe(f),wn=qe(n),Tn=A.useState(`activeIndex`),En=A.useState(`selectedIndex`),Dn=A.useState(`positionerElement`),On=A.useState(`listElement`),kn=A.useState(`triggerElement`),An=A.useState(`inputElement`),jn=A.useState(`inputGroupElement`),Pn=A.useState(`inline`),In=A.useState(`inputInsidePopup`),Ln=A.useState(`inputOwnsFormValue`),Rn=Ut&&!In&&Zt===rn,zn=$e(kn),{openMethod:Bn,triggerProps:Vn}=c($t),Hn=qe(()=>xn);T(In?zn:Ot,Je,vn,Hn,!Bt,p);let Un=qe(()=>{it?Tt.current=_n.map(gt):A.set(`forceMounted`,!0)}),Wn=qe((e,t,n,r)=>{if(t===-1){if(It.current===Mi)return;It.current=Mi}else It.current={value:e,index:t};Cn(e,ze(n,r,{index:t}))}),Gn=qe(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),A.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Wn(void 0,-1,r,e.event):Wn(Rt.current[n],n,r,e.event)}),Kn=qe((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Mt.current=n.reason===je,n.reason===`input-change`){$t&&yt!==null&&bt(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&vt(!0),Lt.current={hasQuery:e};let n=A.state.listElement;if(!A.state.virtualized&&n){let e=Dt.current;for(let t of rt(n.firstElementChild??n)){if(!dt(t)||(e?!mt(e,t):t.getAttribute(`role`)===`dialog`))break;if(Ai(t)){t.scrollTop=0;break}}}e&&qt&&A.state.activeIndex==null&&($t||Pn)&&A.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&A.state.inputInsidePopup&&(Lt.current={hasQuery:!1,selection:!0});Qt(t)}}),qn=qe(e=>{let t=!e&&In&&!Pn&&Zt!==``&&(String(Zt).trim()===yt||Zt===rn);!e&&(t||Zt===``||Rn)&&vt(!1),bt(null),t&&Kn(``,Ae(je))}),[Jn,Yn]=j.useState(!1),Xn=qe((t,n)=>{if($t===t)return;n.reason===`escape-key`&&Gt&&_n.length===0&&!jt.current&&n.allowPropagation();let r=n,i=et(r);if(e.onOpenChange?.(t,r),Lt.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Lt.current=null),!n.isCanceled&&(t&&yt!==null&&qn(n.reason===Le),!t&&_t&&(Ut?(Pn||bt(nn),nn===``&&vt(!1)):Ht&&(Pn||bt(nn),In&&Gn({activeIndex:null}),(!In||Pn)&&Kn(``,Ae(je,n.event,void 0,{isItemPress:n.reason===Me})))),t||Yn(i()),en(t),!t&&In&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(Ne(!0),Fe(!1),He===`onBlur`))){let e=d===`none`?Zt:k;Ue.commit(e)}}),Zn=qe((e,t)=>{a?.(e,t),t.isCanceled||(Jt(e),(d===`none`&&Dt.current&&le||Ut&&!A.state.inputInsidePopup)&&Kn(gt(e),Ae(t.reason,t.event)))}),Qn=qe((e,t)=>{let n=Ct(e),r=Ft.current??e;Ft.current=null;let i=Ae(Me,r),a=St(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Xn(!1,i);else if(Ht){let e=Array.isArray(k)?k:[],n=pn(e,t,oe),r=n?gn(e,t,oe):[...e,t];if(Zn(r,i),i.isCanceled||!(Ot.current&&Ot.current.value.trim()!==``))return;if(A.state.inputInsidePopup){Kn(``,Ae(je,i.event,void 0,{isItemPress:!0}));let e=Lt.current;e&&!n&&(e.toggledValue=t)}else Xn(!1,i)}else{if(Zn(t,i),i.isCanceled)return;Xn(!1,i)}}),$n=qe(()=>{let e=Ue.inputRef.current?.form??A.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),er=qe(()=>{if(wn?.(!1),vt(!1),bt(null),Gn(d===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ht&&Ot.current&&Ot.current.value!==``&&!Mt.current&&Kn(``,Ae(je)),Ut){if(A.state.inputInsidePopup)Ot.current&&Ot.current.value!==``&&Kn(``,Ae(je));else{let e=gt(k);Ot.current&&Ot.current.value!==e&&Kn(e,Ae(e===``?je:ke))}}}),tr=j.useMemo(()=>Pn&&Dn?{current:St(Dn,`[role="dialog"]`)}:Dt,[Pn,Dn]),{mounted:nr,transitionStatus:rr,forceUnmount:ir}=nt({open:$t,ref:tr,preventUnmountOnClose:Jn,setPreventUnmountOnClose:Yn,onUnmount:er});j.useImperativeHandle(e.actionsRef,()=>({unmount:ir,close:()=>Xn(!1,Ae(Xe))}),[ir,Xn]),Oe(function(){let e=xt.current!==null&&yt===null;if(xt.current=yt,$t&&(!e||!Gt)||($t||(zt.current=null),d===`none`))return;let t=Gt?_n:Rt.current;Gn({selectedIndex:Mn(t,k,oe,Ht)})},[$t,yt,k,d,Ht,Gt,_n,oe,Gn]),Oe(()=>{it&&(Rt.current=_n,wt.current.length=_n.length)},[it,_n]),Oe(()=>{!$t&&Lt.current?.hasQuery&&(Lt.current=null)},[$t]),Oe(()=>{if(!$t&&Pn&&tr.current){Lt.current=null;return}let e=Gt||Kt?_n:Rt.current,t=Lt.current;if(t){let n=$t||Pn||A.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Ot.current;!qt||String(Zt).trim()===``||Pn&&qt!==`always`&&(!t||Et(t.ownerDocument)!==t)?Lt.current=null:n&&(e[0]!==void 0||!Gt&&!Kt)&&(A.set(`activeIndex`,0),Lt.current=null)}else if(String(Zt).trim()===``&&(Lt.current=null,n)){let e=t.selection;qt===`always`&&!e&&A.state.selectionMode===`none`&&A.set(`activeIndex`,0),queueMicrotask(()=>{if(!A.state.open&&(!A.state.inline||tr.current)||Ot.current&&Ot.current.value.trim()!==``)return;let n=A.state.selectedValue,r=A.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:A.state.selectionMode!==`none`&&n!=null){let e=Gt||Kt?_n:Rt.current,i=mn(e,t.toggledValue,A.state.isItemEqualToValue);A.set(`activeIndex`,i===-1?Mn(e,n,A.state.isItemEqualToValue,r):i)}else e?A.set(`activeIndex`,null):qt===`always`&&A.set(`activeIndex`,0)})}}if(!$t&&!Pn)return;let n=A.state.activeIndex;if(n==null){if(qt===`always`&&e.length>0){A.set(`activeIndex`,0);return}Wn(void 0,-1,ke);return}if(n>=e.length){Wn(void 0,-1,ke),A.set(`activeIndex`,null);return}let r=e[n],i=It.current.value,a=i!==ji&&bn(r,i,A.state.isItemEqualToValue);It.current.index===n&&a||Wn(r,n,ke)},[Tn,qt,Wn,Kt,Gt,_n,Pn,$t,tr,A,Zt]),Oe(()=>{Te(d===`none`?String(Zt)!==``:Ht?Array.isArray(k)&&k.length>0:k!=null)},[Te,d,Zt,k,Ht]),j.useEffect(()=>{Gt&&qt&&_n.length===0&&Gn({activeIndex:null})},[Gt,qt,_n.length,Gn]);function ar(){$t&&nn!==``&&nn!==String(Xt)&&!Rn&&vt(!0)}function or(){$t&&yt!==null&&qn(!1)}let sr=!1;function cr(){!sr&&Zt!==rn&&(sr=!0,Kn(rn,Ae(ke)))}function lr(){d!==`none`&&(Se(Vt),Ce(Fn(k,we.initialValue,oe)),Ue.change(k),Ut&&!Wt&&!In&&cr())}function ur(){Ut&&!Wt&&!In&&!_t&&cr()}function dr(){d===`none`&&(Se(Vt),Ce(Zt!==we.initialValue),Ue.change(Zt))}O(nn,ar),O($t,or),O(k,lr),O(rn,ur),O(it,ur),O(Zt,dr);let fr=un({open:Pn?!0:$t,onOpenChange:Xn,elements:{reference:In?kn:An,floating:Dn}}),pr=y?`grid`:`listbox`,mr=$t||Pn,hr=mr?`true`:`false`,gr=j.useMemo(()=>{let e=An?.tagName===`INPUT`,t=An==null||e,n=t||mr,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=hr,r[`aria-haspopup`]=pr,r[`aria-controls`]=mr?On?.id:void 0,r[`aria-autocomplete`]=g?`none`:me),{reference:r,floating:{role:`presentation`}}},[An,mr,hr,pr,On?.id,me,g]),_r=de(fr,{enabled:!Bt&&E,event:`mousedown-only`,toggle:!1,touchOpenDelay:In?0:100,reason:Re}),vr=ct(fr,{enabled:!Bt&&!Pn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Pn?!0:void 0,outsidePress(e){let t=Ct(e);return!mt(kn,t)&&!mt(Pt.current,t)&&!mt(Nt.current,t)&&!mt(jn,t)}}),yr=_e(fr,{enabled:!Bt,id:Je,listRef:wt,activeIndex:Tn,selectedIndex:En,virtual:!0,loopFocus:re,allowEscape:re&&!qt,focusItemOnOpen:_t||d===`none`&&!qt?!1:`auto`,focusItemOnHover:ne,resetOnPointerLeave:!te,orientation:y?`horizontal`:void 0,rtl:Ge===`rtl`,disabledIndices:Ve,grid:y?hi:void 0,onNavigate(e,t){(t||$t||Pn&&e===null)&&rr!==`ending`&&Gn({activeIndex:e,type:D(t),event:t?.nativeEvent})}}),br=j.useMemo(()=>Pe(yr.reference,{onKeyDown(e){y&&A.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},vr.reference,_r.reference,gr.reference),[yr.reference,vr.reference,_r.reference,gr.reference,y,A]),xr=j.useMemo(()=>Pe(Qe,vr.floating),[vr.floating]),Sr=j.useMemo(()=>Pe(yr.floating,gr.floating),[yr.floating,gr.floating]),Cr=j.useMemo(()=>{let e=yr.item;return{props:e?{...e,onFocus:void 0}:Ye,id:Je,selectionMode:d,disabled:Bt,readOnly:g,isItemEqualToValue:oe}},[yr.item,Je,d,Bt,g,oe]);A.useContextCallback(`setOpen`,Xn),A.useContextCallback(`setInputValue`,Kn),A.useContextCallback(`setSelectedValue`,Zn),A.useContextCallback(`setIndices`,Gn),A.useContextCallback(`handleSelection`,Qn),A.useContextCallback(`forceMount`,Un),A.useContextCallback(`requestSubmit`,$n),A.useContextCallback(`onOpenChangeComplete`,n),Nn(()=>{A.update({inline:ce,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Vn,itemRoot:Cr})});let wr={id:Je,selectedValue:k,open:$t,mounted:nr,transitionStatus:rr,items:lt,inline:ce,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Vn,itemRoot:Cr,openMethod:Bn,selectionMode:d,name:Vt,form:m,disabled:Bt,readOnly:g,required:_,grid:y,virtualized:se,openOnInputClick:E,itemToStringLabel:ft,modal:fe,autoHighlight:qt,isItemEqualToValue:oe,submitOnItemClick:be,hasInputValue:Wt};Oe(()=>{A.update({...wr,inputOwnsFormValue:d===`none`&&(ce||!A.state.inputInsidePopup)})},[A,...Object.values(wr)]);let Tr=Be(v,Ue.inputRef),Er=j.useMemo(()=>({query:nn,hasItems:Gt,filteredItems:hn,flatFilteredValues:_n}),[nn,Gt,hn,_n]),Dr=j.useMemo(()=>Array.isArray(vn)?``:ln(vn,ae),[vn,ae]),Or=Ht&&Array.isArray(k)&&k.length>0,kr=Ht||d===`none`&&Ln?void 0:Vt,Ar=j.useMemo(()=>!Ht||!Array.isArray(k)||!Vt?null:k.map(e=>{let t=ln(e,ae);return(0,M.jsx)(`input`,{type:`hidden`,form:m,name:Vt,value:t,disabled:Bt},t)}),[Ht,k,m,Vt,ae,Bt]),jr=(0,M.jsxs)(j.Fragment,{children:[e.children,(0,M.jsx)(`input`,{...Ue.getValidationProps(Bt,{onFocus(){In?kn?.focus():(Ot.current||kn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Bt||g)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Ae(ke,e.nativeEvent),i=()=>Rt.current.findIndex(e=>ln(e,ae).toLowerCase()===n||gt(e).toLowerCase()===n);function a(){if(Ht)return;if(d===`none`){Kn(t,r);return}let e=i();e===-1&&(e=Rt.current.findIndex((e,t)=>{let r=Tt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Rt.current[e];a!=null&&Zn?.(a,r)}Ut&&(Un(),it&&i()===-1&&A.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Je&&kr==null?`${Je}-hidden-input`:void 0,form:m,name:kr,autoComplete:he,disabled:Bt,required:_&&!Or,readOnly:g,value:Dr,ref:Tr,style:kr?st:ot,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ar]});return(0,M.jsx)(gi.Provider,{value:A,children:(0,M.jsx)(_i.Provider,{value:fr,children:(0,M.jsx)(yi.Provider,{value:Gt,children:(0,M.jsx)(vi.Provider,{value:Er,children:(0,M.jsx)(bi.Provider,{value:Zt,children:jr})})})})})}var Fi=`data-popup-side`,Ii=`data-list-empty`,Li={...tt,...fe,popupSide:e=>e?{[Fi]:e}:null,listEmpty:e=>e?{[Ii]:``}:null};function Ri(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function zi(){return Ci().filteredItems.length===0}function Bi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Vi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Hi=j.createContext(void 0);function Ui(){return j.useContext(Hi)}var Wi=j.createContext(void 0);function Gi(e){let t=j.useContext(Wi);if(t===void 0&&!e)throw Error(Ie(21));return t}var Ki=j.forwardRef(function(e,t){let n=xi(),{buttonRef:r,getButtonProps:i}=lt({native:!1}),a=Be(t,r);function o(e){n.context.setOpen(!1,Ae(He,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,M.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:st})}),qi=j.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:p}=ge(),{labelId:m}=ae(),h=Ui(),g=!!Gi(!0),_=xi(),v=wi(),y=xe(),b=_.useState(`required`),x=_.useState(`disabled`),S=_.useState(`readOnly`),C=_.useState(`name`),w=_.useState(`form`),T=_.useState(`selectionMode`),E=_.useState(`autoHighlight`),O=_.useState(`inputProps`),ee=_.useState(`triggerProps`),te=_.useState(`open`),ne=_.useState(`mounted`),re=_.useState(`selectedValue`),ie=_.useState(`id`),oe=_.useState(`inline`),se=_.useState(`modal`),ce=!!E,le=Ri(_),ue=u||x||i,de=zi(),fe=a(ue,_.context.inputRef),pe=g||oe,he=!pe||se,_e=Ne(o??(pe?void 0:ie)),ve=g?be:l,[ye,Ce]=j.useState(null),we=j.useRef(!1),Te=j.useRef(null);Oe(()=>{te||(Te.current=null)},[te]);let Ee=T===`none`&&!g,De=qe(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.context.setInputValue(``,Ae(ke)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:Ee})}),Me=g?c:p.getValidationProps(ue,c);function Pe(e){_.context.setIndices({activeIndex:null,selectedIndex:null,type:D(e),event:e})}let Ie={...ve,open:te,disabled:ue,readOnly:S,popupSide:le,listEmpty:de};function Re(e){if(!h)return;let t,n=h.chipsRef.current.length,[r]=Bi(y);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&re.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let ze=Fe(`input`,e,{state:Ie,ref:[t,_.context.inputRef,De],props:[O,ee,{value:ye??v,"aria-readonly":S||void 0,"aria-required":b||void 0,"aria-labelledby":m,disabled:ue,readOnly:S,required:T===`none`?b:void 0,form:w,...Ee&&C&&{name:C},id:_e,onFocus(){if(fe(!0),!oe)return;let e=Te.current;Te.current=null,e!=null&&Object.hasOwn(_.context.valuesRef.current,e)&&_.context.setIndices({activeIndex:e})},onBlur(){d(!0),fe(!1);let e=_.state.activeIndex;if(oe&&e!==null&&E!==`always`&&(Te.current=e,_.context.setIndices({activeIndex:null})),f===`onBlur`){let e=T===`none`?v:re;p.commit(e)}},onCompositionStart(e){bt||(we.current=!0,Ce(e.currentTarget.value))},onCompositionEnd(e){we.current=!1;let t=e.currentTarget.value;Ce(null),_.context.setInputValue(t,Ae(Le,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=we.current||!r;function a(e){!S&&!ue&&e&&i&&(_.context.setOpen(!0,Ae(Le,t)),ce||Pe(t))}if(we.current){let n=e.currentTarget.value;Ce(n),n===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.context.setOpen(!1,Ae(je,t));let r=n.trim(),i=ce&&r!==``;a(r),te&&_.state.activeIndex!==null&&!i&&Pe(t);return}let o=Ae(Le,t);if(_.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Ae(je,t);s&&!_.state.inputInsidePopup&&(T===`single`&&_.context.setSelectedValue(null,c),_.state.openOnInputClick||_.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),te&&_.state.activeIndex!==null&&!ce&&Pe(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(ue||S){S&&e.key===`Enter`&&te&&_.state.activeIndex!==null&&Dt(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=y===`rtl`;if(e.key===`Home`){Dt(e);let n=Tt&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Dt(e);let i=Tt&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!ne&&e.key===`Escape`){let t=T===`multiple`&&Array.isArray(re)?re.length===0:re===null,n=Ae(Ue,e.nativeEvent),r=T===`multiple`?[]:null;_.context.setInputValue(``,n),_.context.setSelectedValue(r,n),t||_.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&Array.isArray(re)&&re.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:re.length-1,r=re.filter((e,t)=>t!==n);Pe(e.nativeEvent),_.context.setSelectedValue(r,Ae(ke,e.nativeEvent));return}let i=Re(e);if(i!==void 0&&h?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&te){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(oe)return;_.context.setOpen(!1,Ae(ke,n));return}Dt(e),Vi(_,t,n)}}},Me],stateAttributesMapping:Li}),Be=g?(0,M.jsx)(Se.Provider,{value:me,children:ze}):ze;return(0,M.jsxs)(j.Fragment,{children:[te&&he&&(0,M.jsx)(Ki,{ref:_.context.startDismissRef}),Be]})}),Ji=j.createContext(null);function Yi(){return j.useContext(Ji)}function Xi(e){let{children:t}=e,{filteredItems:n}=Ci(),r=Yi(),i=r?r.items:n;return(0,M.jsx)(j.Fragment,{children:i.map(t)})}var Zi=j.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=xi(),l=Si(),u=!!Gi(!0),{filteredItems:f,hasItems:p}=Ci(),m=c.useState(`selectionMode`),h=c.useState(`grid`),g=c.useState(`readOnly`),_=c.useState(`listProps`),v=c.useState(`virtualized`),y=c.useState(`forceMounted`),b=m===`multiple`,x=f.length===0,S=qe(e=>{c.set(`positionerElement`,e)}),C=qe(e=>{c.set(`listElement`,e)}),w=j.useMemo(()=>typeof o==`function`?n||=(0,M.jsx)(Xi,{children:o}):o,[o]),T={empty:x},E=l.useState(`floatingId`),D=Fe(`div`,e,{state:T,ref:[t,C,u?null:S],props:[_,{children:w,tabIndex:-1,id:E,role:h?`grid`:`listbox`,"aria-multiselectable":b?`true`:void 0,"aria-readonly":!h&&g?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Dt(e),Vi(c,t,e.nativeEvent)}}},s]});if(v)return D;let O=p&&!y?void 0:c.context.labelsRef;return(0,M.jsx)(d,{elementsRef:c.context.listRef,labelsRef:O,children:D})}),Qi=j.createContext(void 0);function $i(){let e=j.useContext(Qi);if(e===void 0)throw Error(Ie(20));return e}var ea=j.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=xi(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,M.jsx)(Qi.Provider,{value:n,children:(0,M.jsx)(at,{ref:t,...r})}):null}),ta=j.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=ft,style:g,..._}=e,v=xi(),y=Si(),b=$i(),x=v.useState(`modal`),C=v.useState(`open`),w=v.useState(`mounted`),T=v.useState(`openMethod`),E=v.useState(`positionerElement`),D=v.useState(`triggerElement`),O=v.useState(`inputElement`),ee=v.useState(`inputGroupElement`),te=v.useState(`inputInsidePopup`),ne=v.useState(`transitionStatus`),re=zi(),ie=le({anchor:i??(te?D:ee??O),floatingRootContext:y,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});S(C&&x,T===`touch`,E,D);let ae={open:C,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,empty:re};Oe(()=>{v.set(`popupSide`,ie.side)},[v,ie.side]);let oe=qe(e=>{v.set(`positionerElement`,e)}),ce=se(e,ae,{styles:ie.positionerStyles,transitionStatus:ne,props:_,refs:[t,oe],hidden:!w,inert:!C});return(0,M.jsxs)(Wi.Provider,{value:ie,children:[w&&x&&(0,M.jsx)(xt,{inert:vt(!C),cutout:ee??O??D}),ce]})}),na={...ut,...it},ra=j.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=xi(),l=Gi(),u=Si(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),v=c.useState(`modal`),y=c.useState(`id`),b=zi(),x=s.id??(g?Di(y):void 0);Oe(()=>(c.set(`popupId`,c.context.popupRef.current?.id||x),()=>{c.set(`popupId`,void 0)}),[c,x]),gt({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let S={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:b},C=Fe(`div`,e,{state:S,ref:[t,c.context.popupRef],props:[m,{id:x,role:g?`dialog`:`presentation`,onFocus(e){let t=Ct(e.nativeEvent);p!==`touch`&&(mt(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},ie(h),s],stateAttributesMapping:na}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,T;T=o??(g?void 0:!1);let E=!g||v;return(0,M.jsx)(Ot,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,M.jsxs)(j.Fragment,{children:[C,E&&(0,M.jsx)(Ki,{ref:c.context.endDismissRef})]})})}),ia=j.createContext(void 0),aa=j.createContext(!1);function oa(){return j.useContext(aa)}function sa(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...p}=t,m=j.useRef(null),h=f({guess:!0,index:l,textRef:m}),g=xi(),_=oa(),v=Ti(),{props:y,id:b,selectionMode:x,disabled:S,readOnly:C,isItemEqualToValue:w}=g.useState(`itemRoot`),T=S||u,E=x!==`none`,D=l??i??h.index,O=D!==-1,ee=g.useState(`isActive`,D),te=g.useState(`isSelected`,c),ne=j.useRef(null),re=b!=null&&O?`${b}-${D}`:void 0,ie=te&&E;Oe(()=>{if(!O||!r&&l==null)return;let e=g.context.listRef.current;return e[D]=ne.current,()=>{delete e[D]}},[O,r,D,l,g]),Oe(()=>{if(!O||v)return;let e=g.context.valuesRef.current;return e[D]=c,()=>{delete e[D]}},[O,v,D,c,g]),Oe(()=>{if(!O||v)return;let e=g.state.selectedValue,t=g.state.selectedIndex;g.state.selectionMode===`multiple`&&Array.isArray(e)?t=Pn(D,c,g.context.valuesRef.current,e,w,t):bn(c,e,w)&&(t=D),g.set(`selectedIndex`,t)},[O,v,g,D,c,w]);let{getButtonProps:ae,buttonRef:oe}=lt({disabled:T,focusableWhenDisabled:!0,native:d,composite:!0}),se={disabled:T,selected:ie,highlighted:ee};function ce(e){function t(){g.context.handleSelection(e,c)}g.state.submitOnItemClick?(li.flushSync(t),g.context.requestSubmit()):t()}let le={id:re,role:_?`gridcell`:`option`,"aria-selected":E?ie:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(g.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){T||C||ce(e.nativeEvent)},onMouseUp(e){let t=g.context.pointerDownItemRef.current===e.currentTarget;g.context.pointerDownItemRef.current=null,T||C||e.button!==0||t||!ee||ce(e.nativeEvent)}},ue=Fe(`div`,t,{ref:[oe,n,h.ref,ne],state:se,props:[y,le,p,ae]}),de=j.useMemo(()=>({selected:ie,textRef:m}),[ie,m]);return(0,M.jsx)(ia.Provider,{value:de,children:ue})}function ca(e){let{componentProps:t,forwardedRef:n}=e,r=xi().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Ci(),a=t.value??null,o=mn(i,a,r);return(0,M.jsx)(sa,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var la=j.memo(j.forwardRef(function(e,t){let n=xi().useState(`virtualized`);return n&&e.index==null?(0,M.jsx)(ca,{componentProps:e,forwardedRef:t}):(0,M.jsx)(sa,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),ua=j.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Ci(),c=xi(),l=mi(),u=s.length===0?a:null;return Fe(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),da=n(),fa=(0,j.createContext)(null);function pa(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function ma(){let e=(0,j.useContext)(fa);return e??function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}(8),e}function ha(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function N(e,...t){throw ha(e,...t)}function ga(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _a(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var va=_a();function ya(){return va&&`documentMode`in document?document.documentMode:null}var ba=ya();function xa(e){return va&&e.test(navigator.platform)}function Sa(e){return va&&e.test(navigator.userAgent)}var Ca=xa(/Mac|iPod|iPhone|iPad/),wa=Sa(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function Ta(){return!(!va||!(`InputEvent`in window)||ba)&&`getTargetRanges`in new window.InputEvent(`input`)}var Ea=Ta();function Da(){return va&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Oa=Da(),ka=Sa(/Android/),Aa=Sa(/Version\/[\d.]+.*Safari/)&&!ka,ja=Sa(/^(?=.*Chrome).*/i),Ma=va&&ka&&ja,Na=Sa(/AppleWebKit\/[\d.]+/)&&Ca&&!ja;function Pa(){return 2047}var Fa=Pa(),Ia=Aa||Oa||Na?`\xA0`:`​`,La=`
2
2
 
3
3
  `,Ra=wa?`\xA0`:Ia,za={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Ba={directionless:1,unmergeable:2},Va={center:2,end:6,justify:4,left:1,right:3,start:5};function Ha(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var Ua=Ha(Va),Wa={normal:0,segmented:2,token:1},Ga=Ha(Wa),Ka=Symbol.for(`@lexical/ctrlOrOtherKey`),qa=`$config`;function Ja(e){return()=>{}}function P(e){return{type:e}}var Ya=P(`SELECTION_CHANGE_COMMAND`),Xa=P(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),Za=P(`CLICK_COMMAND`),Qa=P(`BEFORE_INPUT_COMMAND`),$a=P(`INPUT_COMMAND`),eo=P(`COMPOSITION_START_COMMAND`),to=P(`COMPOSITION_END_COMMAND`),no=P(`DELETE_CHARACTER_COMMAND`),ro=P(`INSERT_LINE_BREAK_COMMAND`),io=P(`INSERT_PARAGRAPH_COMMAND`),ao=P(`CONTROLLED_TEXT_INSERTION_COMMAND`),oo=P(`PASTE_COMMAND`),so=P(`REMOVE_TEXT_COMMAND`),co=P(`DELETE_WORD_COMMAND`),lo=P(`DELETE_LINE_COMMAND`),uo=P(`FORMAT_TEXT_COMMAND`),fo=P(`SET_TEXT_FORMAT_COMMAND`),po=P(`UNDO_COMMAND`),mo=P(`REDO_COMMAND`),ho=P(`KEYDOWN_COMMAND`),go=P(`KEY_ARROW_RIGHT_COMMAND`),_o=P(`MOVE_TO_END`),vo=P(`KEY_ARROW_LEFT_COMMAND`),yo=P(`MOVE_TO_START`),bo=P(`KEY_ARROW_UP_COMMAND`),xo=P(`KEY_ARROW_DOWN_COMMAND`),So=P(`KEY_ENTER_COMMAND`),Co=P(`KEY_SPACE_COMMAND`),wo=P(`KEY_BACKSPACE_COMMAND`),To=P(`KEY_ESCAPE_COMMAND`),Eo=P(`KEY_DELETE_COMMAND`),Do=P(`KEY_TAB_COMMAND`),Oo=P(`INSERT_TAB_COMMAND`),ko=P(`INDENT_CONTENT_COMMAND`),Ao=P(`OUTDENT_CONTENT_COMMAND`),jo=P(`DROP_COMMAND`),Mo=P(`FORMAT_ELEMENT_COMMAND`),No=P(`DRAGSTART_COMMAND`),Po=P(`DRAGOVER_COMMAND`),Fo=P(`DRAGEND_COMMAND`),Io=P(`COPY_COMMAND`),Lo=P(`CUT_COMMAND`),Ro=P(`SELECT_ALL_COMMAND`),zo=P(`CLEAR_EDITOR_COMMAND`),Bo=P(`CLEAR_HISTORY_COMMAND`),Vo=P(`CAN_REDO_COMMAND`),Ho=P(`CAN_UNDO_COMMAND`),Uo=P(`FOCUS_COMMAND`),Wo=P(`BLUR_COMMAND`),Go=P(`KEY_MODIFIER_COMMAND`);function Ko(e,t){return{...t,[Ka]:e}}var qo=Ko(`metaKey`,{ctrlKey:!Ca,metaKey:Ca}),Jo=Ko(`altKey`,{altKey:Ca,ctrlKey:!Ca}),Yo=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function Xo(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var Zo=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||N(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of Yo){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))Xo(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?Xo(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&Xo(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of Yo)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function Qo(e){let t=new Zo;for(let n of e)t.add(n);return t}function $o(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function es(){let e;try{e=`0.53.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var ts=es(),ns=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},rs=null;function is(e,t=1e3){return e instanceof as?e.clone():e.size<t?new Map(e):new as().init(new Map(e),void 0,e.size)}var as=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===rs?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===rs?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==rs&&n!==void 0||(this._size++,n===rs&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,rs),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==rs&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===rs||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},os=!1;function ss(e,t,...n){let r=os,i;try{os=e,i=t()}finally{os=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||N(421),i}function cs(){return os}function ls(e){let t=e.exportJSON(os),n=e.constructor;return t.type!==n.getType()&&N(130,n.name),L(e)&&!Array.isArray(t.children)&&N(59,n.name),t}function us(){return Jf()._blockCursorElement}function ds(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var fs=Na||Oa||Aa;function ps(){let e=Af().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function ms(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var hs=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&N(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&N(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&N(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=gs(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=gs(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function gs(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var _s=class e extends hs{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;ds(t);)e=t,t=t.nextSibling;ms(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===us()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;ds(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===us()&&(t=t.previousSibling);return ms(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(ps(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(ps(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&ds(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&fs;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.element,t=this.getManagedLineBreak();if(t){t.remove();for(let t of e.querySelectorAll(`:scope > [data-lexical-managed-linebreak]`))t.remove();e.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.element,n=this.getManagedLineBreak();if(n){let r=e?n.nextSibling:n;if(r&&r===t.querySelector(`:scope > br[data-lexical-managed-linebreak]`))return;this.removeManagedLineBreak()}let r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=Af().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),t.insertBefore(i,r),e){let e=Af().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,t.insertBefore(e,i),t.__lexicalLineBreak=e}else t.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=us(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=vs(t,n);i.push(r);let a=vs(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function vs(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&N(225),n.reverse()}var ys=!1,bs=0;function xs(){bs=performance.now()}function Ss(e){return W(e)&&e.hasAttribute(`data-lexical-managed-linebreak`)}function Cs(e,t,n){let r=Cf(pf(n)),i=r&&Nf(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Gd(t,s,a,o,!1)}function ws(e,t,n){if(q(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return _d(t)&&n.isAttached()}function Ts(e,t,n){for(let r=e;r&&!cp(r);r=af(r)){let e=Ad(r,t);if(e!==void 0){let t=B(e,n);if(t)return R(t)||!W(r)?void 0:[r,t]}}}function Es(e,t,n,r){ys=!0;let i=e._inputState.unprocessedBeforeInputData===null&&performance.now()-bs>100;try{eh(e,()=>{let a=J()||function(e){return e.read(`latest`,()=>{let e=J();return e===null?null:e.clone()})}(e),o=new Map,s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n of t){let t=n.type,d=n.target,f=Ts(d,e,s);if(!f)continue;let[p,m]=f;if(t===`characterData`)r?z(m)&&m.isAttached()&&m.markDirty():i&&z(m)&&_d(d)&&ws(a,d,m)&&Cs(d,m,e);else{l=!0;for(let t of n.addedNodes){let n=Ad(t,e);if(t!==c&&t.parentNode===d&&(n?e.getElementByKey(n)!==t:!(e._slotsUsed&&W(t)&&t.hasAttribute(`data-lexical-slot`)||cp(t)))){if(wa){let e=(W(t)?t.innerText:null)||t.nodeValue;e&&(u+=e)}d.removeChild(t)}}for(let e of n.removedNodes){let t=c===e;if(t||ms(e)||Ss(e)){let t=n.nextSibling,r=n.previousSibling;d.insertBefore(e,t&&t.parentNode!==d?r?r.parentNode===d?r.nextSibling:null:d.firstChild:t)}t||o.set(p,m)}}}for(let[t,n]of o)n.reconcileObservedMutation(t,e);let d=n.takeRecords();for(let t of d)for(let n of t.addedNodes)n.nodeName!==`BR`||Ad(n,e)||Ss(n)||n.remove();n.takeRecords(),a!==null&&(l&&Id(a),wa&&nf(e)&&a.insertRawText(u))})}finally{ys=!1}}function Ds(e,t,n){let r=e._observer;if(r!==null){let i=r.takeRecords();(!n||i.length>0)&&Es(e,i,r,t)}}function Os(e){(function(e){pf(e).addEventListener(`textInput`,xs,!0)})(e),e._observer=new MutationObserver((t,n)=>{Es(e,t,n)})}function ks(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function As(e,t){return ks(e,t,e.defaultValue)}function js(e){return typeof e==`object`&&!!e}function Ms(e,t){let n=Ls(e,t).getter;return js(n)&&n.getterTable!==void 0||N(405,t),Is(n.getterTable)}function Ns(e,t){let n=Ls(e,t).setter;return js(n)&&n.setterTable!==void 0||N(406,t),Is(n.setterTable)}function Ps(e,t,n){let{meta:r}=Ls(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return Is(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:N(407,t,String(n))}function Fs(e,t){let n=Ls(e,t),{setter:r}=n;js(r)&&r.setterTable!==void 0||N(408,t);let i=String(n.defaultValue);return Ks(r.setterTable,i)||N(409,t,i),r.setterTable[i]}function Is(e){return Object.assign(Object.create(null),e)}function Ls(e,t){let n=e.get(t);return n===void 0&&N(410,t),n}function Rs(e,t,n,r,i){i!==void 0&&zs.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&Hs(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var zs=new WeakSet,Bs=new WeakSet;function Vs(e){return typeof e==`object`&&e&&Bs.add(e),e}function Hs(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!Bs.has(e)){Object.freeze(e);for(let t of Object.values(e))Hs(t)}}function Us(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function Ws(e,t){return n=>t(n)||Gs(e,n)}function Gs(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return Gs(e,t)?{parsed:e(t)}:void 0;let r=e(t);return As(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function Ks(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qs(e=``){return Rs(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var Js=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ys(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&Js.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return Rs(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function Xs(e=!1){return Rs(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function Zs(e,...t){let n=Vs(t.length===0?e[0]:t[0]),r=new Set(e);return Rs(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function Qs(e,t={}){let{defaultAsNull:n}=t;return Rs(t=>{if(t==null)return null;let r=e(t);return n&&As(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,Us(e),Ws(e,e=>e==null))}function $s(e,t={}){let{omitDefault:n}=t;return Rs(t=>{if(t===void 0)return;let r=e(t);return n&&As(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,Us(e),Ws(e,e=>e===void 0))}function ec(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function tc(e,t){let n=e=>typeof e==`string`&&Ks(t,e);return Rs(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||Gs(e,t))}function nc(e){return Rs(t=>{if(!Array.isArray(t))return[];let n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n},{item:e,kind:`array`},void 0,(t,n)=>{if(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!ks(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function rc(e,t){return ac(0,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}},!0===t.derived)}function ic(e,t){return ac(0,e,{getter:t.getter,setter:t.setter},!0===t.derived)}function ac(e,t,n,r=!1){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,...r?{derived:!0}:{},getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var oc=`latest`,sc=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;derived;schema;constructor(e,t){this.key=e,this.derived=!0===t.derived;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||vc).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>ks(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function cc(e,t){return new sc(e,t)}function lc(e,t,n=oc){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function uc(e,t,n){let r;if(Nm(),typeof n==`function`){let i=e.getLatest(),a=lc(i,t);if(r=dc(t,n(a)),t.isEqual(a,r))return i}else r=dc(t,n);let i=e.getWritable();return hc(i).updateFromKnown(t,r),i}function dc(e,t){let{schema:n}=e;return n!==void 0&&n.meta.kind===`set`?e.parse(t):t}function fc(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of Bp(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var pc=new Set([`__proto__`,`constructor`,`prototype`]),mc=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.knownState.set(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return _c(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(pc.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;i&&n in i?(delete i[n],this.unknownState=_c(i)):r.has(e)||this.size++,r.set(e,t)}updateFromUnknown(e,t){if(pc.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function hc(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new mc(t,function(e){return e.__state?e.__state.sharedNodeState:od(Jf(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function gc(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&hc(e).updateFromJSON(r),n}function _c(e){if(e)for(let t in e)return e}function vc(e){return e}function yc(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function bc(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function xc(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Sc(e){return!ru(e)&&e.getTextContent!==Ql.prototype.getTextContent}var Cc=Symbol.for(`@lexical/CachedTextSize`);function wc(e,t){return zc.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Rc.get(r);if(i===void 0&&N(345,r),L(i)){let a=Bc.get(r);if(a!==void 0&&L(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Vc.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&N(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else if(rl(i).size>0)n+=i.getTextContentSize();else{let e=i[Cc];e===void 0&&N(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:F})}function Tc(e){L(e)||rl(e).size>0||e[Cc]===void 0&&(e[Cc]=z(e)?e.__text.length:e.getTextContentSize())}var Ec=4,Dc,F,Oc,I=``,kc=null,Ac=null,jc=null;function Mc(){return{firstTextKey:jc,format:kc,style:Ac}}function Nc(e){e.firstTextKey!==null&&(kc=e.format,Ac=e.style,jc=e.firstTextKey)}function Pc(e){if(jc!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&N(348),t===null)return;let n=Bc.get(t);z(n)&&(kc=n.getFormat(),Ac=n.getStyle(),jc=t)}var Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc=!1,Kc=!1;function qc(e,t){let n=Rc.get(e),r=Bc.has(e);if(t!==null){let n=vl(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(F._keyToDOMMap.delete(e),L(n)){let e=Hp(n,Rc);Jc(e,0,e.length-1,null)}if(n!==void 0){for(let e of rl(n).values()){let t=al(e);qc(e,null),t!==null&&t.remove()}Qd(Uc,Oc,Fc,n,`destroyed`)}}}function Jc(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&qc(t,r)}}function Yc(e,t){e.setProperty(`text-align`,t)}var Xc=`40px`;function Zc(e,t){let n=Dc.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${Xc}))`),Xd(e,`class`),Xd(e,`style`)}function Qc(e,t){let n=e.style;t===0?Yc(n,``):t===1?Yc(n,`left`):t===2?Yc(n,`center`):t===3?Yc(n,`right`):t===4?Yc(n,`justify`):t===5?Yc(n,`start`):t===6&&Yc(n,`end`),Xd(e,`style`)}function $c(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(ru(e))return null;let n=e.getParent();return n===null||U(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function el(e){let t=Af().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function tl(e,t,n){t||e.contentEditable===`false`?lp(n,F):n.removeAttribute(`contenteditable`)}function nl(e,t,n){let r=I,i=Mc();I=``;let a=``,o=R(e);for(let[r,i]of n){let n=el(r);tl(t,o,n),t.appendChild(n),I=``;let s=Mc();sl(i,Xf(e,n,F)),Nc(s),il(e,r,t,n),a+=I}return Nc(i),I=r,a}function rl(e){return d_(e)&&e.__slots!==null?e.__slots:u_}function il(e,t,n,r){let i=Wc.$getSlotTargetElement(e,t,n,F);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function al(e){let t=Vc.get(e);return t===void 0?null:t.parentElement}function ol(e,t,n){let r=rl(e),i=rl(t);for(let[e,t]of r)if(!i.has(e)){let e=al(t);qc(t,null),e!==null&&e.remove()}let a=I,o=Mc(),s=``,c=null,l=R(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:al(i);I=``;let u=Mc();if(o===null){o=el(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),sl(a,Xf(t,o,F))}else i===a?pl(a,o):(i!==void 0&&qc(i,o),sl(a,Xf(t,o,F)));if(Nc(u),tl(n,l,o),il(t,e,n,o),s+=I,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Nc(o),I=a,s}function sl(e,t){let n=Bc.get(e);if(n===void 0&&N(60),t!==null){let r=Rc.get(e);if(r!==void 0){let i=Vc.get(e);if(i!==void 0){let a=f_(r)?r.__slotHost:null,o=f_(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),pl(e,t.element)}}}let r=Wc.$createDOM(n,F);if(function(e,t,n){let r=n._keyToDOMMap;kd(t,n,e),r.set(e,t)}(e,r,F),z(n)?r.setAttribute(`data-lexical-text`,`true`):R(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),sp(r,{captureSelection:!0})),L(n)){let e=I,t=n.__indent,i=n.__size;$c(r,n),t!==0&&Zc(r,t);let a=rl(n),o=a.size>0?nl(n,r,a):``;if(i===0)r.__lexicalTextContent=o,r.__lexicalFirstTextKey=null,I+=o,a.size>0&&(r.__lexicalSlotTextLength=o.length);else{let t=i-1;if(cl(Hp(n,Bc),n,0,t,Xf(n,r,F)),o!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=o+t,I=e+o+t}a.size>0&&(r.__lexicalSlotTextLength=o.length)}if(Sc(n)){let t=n.getTextContent();r.__lexicalTextContent=t,I=e+t}let s=n.__format;s!==0&&Qc(r,s),n.isInline()||(dl(0,n,r),ul(n,r))}else{let t=n.getTextContent();if(R(n)){let t=n.decorate(F,Dc);t!==null&&ml(e,t),r.contentEditable=`false`;let i=rl(n);i.size>0&&nl(n,r,i)}I+=t}return t!==null&&t.insertChild(r),Wc.$decorateDOM(n,null,r,F),Tc(n),Qd(Uc,Oc,Fc,n,`created`),r}function cl(e,t,n,r,i){let a=I,o=Mc();I=``,kc=null,Ac=null,jc=null;let s=n;for(;s<=r;++s){let t=Mc();sl(e[s],i);let n=Bc.get(e[s]);n!==null&&z(n)?kc===null&&(kc=n.getFormat(),Ac=n.getStyle(),jc=n.__key):L(n)&&s<r&&!n.isInline()&&(I+=La),Nc(t)}let c=F._keyToDOMMap.get(t.__key);c===void 0&&N(349,t.__key),c.__lexicalTextContent=I,c.__lexicalFirstTextKey=jc,I=a+I,Nc(o)}function ll(e){return R(e)&&!e.isInline()}function ul(e,t,n=Xf(e,t,F)){n.setDecoratorBoundaryAnchor(`leading`,ll(e.getFirstChild())),n.setDecoratorBoundaryAnchor(`trailing`,ll(e.getLastChild()))}function dl(e,t,n){let r=Xf(t,n,F),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return lm(e)?`line-break`:R(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,Bc);r.setManagedLineBreak(i)}function fl(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Bc.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Bc.get(r);if(z(e))return kc=e.getFormat(),void(Ac=e.getStyle())}}t.__lexicalFirstTextKey=jc}function pl(e,t){let n=Rc.get(e),r=Bc.get(e);n!==void 0&&r!==void 0||N(61);let i=Gc||Lc.has(e)||Ic.has(e),a=rf(F,e);if(n===r&&!i){let e;if(L(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&N(355,n.getType()),e=t,Pc(a)}else e=n.getTextContent();return I+=e,a}if(n!==r&&i&&Qd(Uc,Oc,Fc,r,`updated`),Wc.$updateDOM(r,n,a,F)){let n=sl(e,null);return t===null&&N(62),t.replaceChild(n,a),qc(e,null),n}if(L(n)){L(r)||N(334,e);let t=r.__indent;(Gc||t!==n.__indent)&&Zc(a,t);let o=r.__format;(Gc||o!==n.__format)&&Qc(a,o);let s=i&&(rl(r).size>0||rl(n).size>0)?ol(n,r,a):``;if(i){let e=I;if(function(e,t,n){var r;kc=null,Ac=null,jc=null,function(e,t,n){let r=I,i=e.__size,a=t.__size;I=``;let o=n.element,s=F._keyToDOMMap.get(t.__key);s===void 0&&N(351,t.__key);let c=a-i;if(!Gc&&Math.abs(c)<=1&&i>=Ec&&e.__first===t.__first&&(c!==0||!F._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=Hc.get(e.__key);if(!Gc&&!Sc(t)&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Bc.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=wc(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Bc.get(n);if(e===void 0)break;let t=Mc();pl(n,o),z(e)&&kc===null&&(kc=e.getFormat(),Ac=e.getStyle(),jc=e.__key),Nc(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Bc.get(n);if(e===void 0)break;let t;if(L(e)){let r=F._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&N(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&L(e)&&!e.isInline()&&(d+=La),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,I=r+m,fl(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Rc.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Bc.get(a),d=Rc.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Bc.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Rc.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=wc(l,c);for(let e of _){let t=Mc();if(e.kind===`reconcile`)pl(e.key,n.element);else if(e.kind===`destroy`)qc(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=F._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}sl(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Bc.get(e.key);t&&z(t)&&kc===null&&(kc=t.getFormat(),Ac=t.getStyle(),jc=t.__key)}Nc(t)}let x=``;for(let e=0;e<o;e++){let t=Bc.get(f[e]);if(t===void 0)return!1;let n;if(L(t)){let r=F._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&N(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&L(t)&&!t.isInline()&&(x+=La)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&N(353),I=r+e,fl(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Bc.get(t);if(e===void 0)break;let r=Gc||Lc.has(t)||Ic.has(t),i=Mc();if(r)pl(t,o);else{let n,r;if(L(e)){r=Vc.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&N(354,e.getType()),n=i}else n=e.getTextContent();I+=n,r!==void 0&&Pc(r)}z(e)?kc===null&&(kc=e.getFormat(),Ac=e.getStyle(),jc=e.__key):L(e)&&n<a-1&&!e.isInline()&&(I+=La),Nc(i),t=e.__next,n++}s.__lexicalTextContent=I,s.__lexicalFirstTextKey=jc,I=r+I;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)pl(r,o);else{let e=vl(r),t=sl(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}qc(r,null)}let a=Bc.get(i);z(a)&&kc===null&&(kc=a.getFormat(),Ac=a.getStyle(),jc=a.__key)}else{let r=Hp(e,Rc),s=Hp(t,Bc);if(r.length!==i&&N(227),s.length!==a&&N(228),i===0)a!==0&&cl(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&rl(t).size===0&&n.element.__lexicalLineBreak==null;Jc(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Mc();if(e===r)u=hl(pl(r,a.element)),d++,f++;else{if(l===void 0&&(l=gl(n,f)),c===void 0)c=gl(t,d);else if(!c.has(e)){d++,Nc(i);continue}if(!l.has(e)){let t=vl(e);t.parentNode===a.element&&(u=hl(t)),qc(e,a.element),d++,c.delete(e),Nc(i);continue}if(c.has(r)){let e=rf(F,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=hl(pl(r,a.element)),d++,f++}else sl(r,a.withBefore(u??a.before)),f++}let o=Bc.get(r);o!==null&&z(o)?kc===null&&(kc=o.getFormat(),Ac=o.getStyle(),jc=o.__key):L(o)&&f<=s&&!o.isInline()&&(I+=La),Nc(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:F.getElementByKey(t);cl(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&Jc(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=I,s.__lexicalFirstTextKey=jc,I=r+I}(e,t,Xf(t,n,F)),U(t)||(r=t,kc==null||kc===r.__textFormat||Kc||r.setTextFormat(kc),function(e){Ac==null||Ac===e.__textStyle||Kc||e.setTextStyle(Ac)}(t))}(n,r,a),r.isInline()||(ru(r)||dl(0,r,a),ul(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,I=e+s+t,a.__lexicalSlotTextLength=s.length}else(rl(r).size>0||rl(n).size>0)&&(a.__lexicalSlotTextLength=0);if(Sc(r)){let t=r.getTextContent();a.__lexicalTextContent=t,I=e+t}}else{let e=a.__lexicalTextContent;typeof e!=`string`&&N(356,n.getType()),I+=e,Pc(a)}if((Gc||r.__dir!==n.__dir||r.__parent!==n.__parent)&&($c(a,r),ru(r)&&!Gc))for(let e of r.getChildren())L(e)&&$c(rf(F,e.getKey()),e)}else{let t=r.getTextContent();if(R(r)){let t=r.decorate(F,Dc);t!==null&&ml(e,t),i&&(rl(r).size>0||rl(n).size>0)&&ol(n,r,a)}I+=t}if(!Kc&&ru(r)){let e=r.getLatest();if(e.__cachedText!==I){let t=e.getWritable();t.__cachedText=I,r=t}}return Wc.$decorateDOM(r,n,a,F),Tc(r),a}function ml(e,t){let n=F._pendingDecorators,r=F._decorators;if(n===null){if(r[e]===t)return;n=Md(F)}n[e]=t}function hl(e){let t=e.nextSibling;return t!==null&&t===F._blockCursorElement&&(t=t.nextSibling),t}function gl(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function _l(e,t,n,r,i,a){I=``,kc=null,Ac=null,jc=null,Gc=r===2,F=n,Dc=n._config,Wc=n._config.dom||gm,Oc=n._nodes,Fc=F._listeners.mutation,Ic=i,Lc=a,Rc=e._nodeMap,zc=e,Bc=t._nodeMap,Kc=t._readOnly,Vc=is(n._keyToDOMMap),Hc=function(){let e=new Map,t=t=>{for(let n of t){let t=Bc.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Ic.keys()),t(Lc),e}();let o=new Map;return Uc=o,pl(`root`,null),F=void 0,Oc=void 0,Ic=void 0,Lc=void 0,Rc=void 0,zc=void 0,Bc=void 0,Dc=void 0,Vc=void 0,Hc=void 0,Uc=void 0,Wc=gm,o}function vl(e){let t=Vc.get(e);return t===void 0&&N(75,e),t}function yl(e,t,n){Nm();let r=e.__key,i=e.getParent();if(i===null)return void(p_(e)!==null&&N(367,r,String(p_(e))));let a=function(e){let t=J();if(!q(t)||!L(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return df(i,e)&&n.set(e.__key,0,`element`),df(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(q(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(Hg(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(Hg(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else lg(a)&&t&&e.isSelected()&&e.selectPrevious();o_(e.getWritable(),t&&!o&&q(a)?a:null),n||U(i)||i.canBeEmpty()||!i.isEmpty()||yl(i,t),t&&a&&ru(i)&&i.isEmpty()&&i.selectEnd()}function bl(e){return e}var xl=Symbol.for(`ephemeral`);function Sl(e){return e[xl]||!1}var Cl={configurable:!0,enumerable:!1,value:void 0,writable:!0},wl=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=Mp(this);return e===void 0&&N(64,this.name),e}static clone(e){N(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Up(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",Cl),Object.defineProperty(this,Cc,Cl),Sd(this,e)}getType(){return this.__type}isInline(){N(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=B(e);if(t===null)break;e=t.__parent===null?p_(t):t.__parent}return!1}isSelected(e){let t=e||J();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(z(this))return n;if(q(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(R(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:B(e)}getParentOrThrow(){let e=this.getParent();return e===null&&N(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(U(t)||p_(e)!==null)return L(e)||e===this&&R(e)||N(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&N(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:B(e)}getPreviousSiblings(){return l_(this.getPreviousSibling(),`previous`).reverse()}getNextSibling(){let e=this.getLatest().__next;return e===null?null:B(e)}getNextSiblings(){return l_(this.getNextSibling(),`next`)}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=dv(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?cv(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&N(279),!1)))}isParentOf(e){return df(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=this,i=!0,a=0;for(;r!==null&&((i||a===0)&&n.push(r),!r.is(e));){!i&&a>0&&a--;let e=i&&L(r)?t?r.getFirstChild():r.getLastChild():null;e!==null&&a++;let n=e||(t?r.getNextSibling():r.getPreviousSibling());i=n!==null,r=n||r.getParent()}return t?n:n.reverse()}isDirty(){let e=K()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Sl(this))return this;let e=B(this.__key);return e===null&&N(442,this.__key,this.__type),e}getWritable(){if(Sl(this))return this;Nm();let e=Fm(),t=K(),n=this.__key,r=t._cloneNotNeeded,i=r.get(n),a=e._selection;if(a!==null&&a.setCachedNodes(null),i!==void 0)return wd(i),i;let o=e._nodeMap,s=o.get(n);s===void 0&&N(442,n,this.__type);let c=np(s);return r.set(n,c),o.set(n,c),wd(c),c}getTextContent(){return D_(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){N(70)}updateDOM(e,t,n){N(71)}getDOMSlot(e){return new hs(e)}exportDOM(e){return{element:Yf(e).$createDOM(this,e)}}exportJSON(e=!1){let t=function(e,t){let n=mp(pp(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return L(e)&&(r.children=[]),function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=Dp(e)[a.field];o=a.getterTable===void 0?t:Ks(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!Op(a,o)&&a.when.call(e)||(o=void 0)),r&&Op(a,o)||(n[a.key]=o)}}(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){N(18,this.name)}updateFromJSON(e){return jp(gc(this,e),e)}static transform(){return null}remove(e){yl(this,!0,e)}replace(e,t){Nm();let n=J();n!==null&&(n=n.clone()),yf(this,e);let r=this.getLatest(),i=this.__key,a=m_(r);a!==null&&N(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent();o_(s,q(n)?n:null);let d=r.getPreviousSibling(),f=r.getNextSibling();yl(r,!1,!0),i_(c,s,d&&d.getWritable(),f&&f.getWritable()),c.__size=u!==null&&u.is(c)?l-1:l;let p=0;if(t&&(L(this)&&L(s)||N(139),p=s.getChildrenSize(),s.splice(p,0,this.getChildren())),q(n)){Id(n);for(let e of[n.anchor,n.focus])e.key===i&&(t&&e.type===`element`?e.set(s.__key,p+e.offset,`element`):ng(e,s))}return Ed()===i&&Td(o),s}insertAfter(e,t=!0){return s_(this,`next`,e,t)}insertBefore(e,t=!0){return s_(this,`previous`,e,t)}isParentRequired(){return!1}createParentElementNode(){return Xu()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){return c_(Y(this,`previous`),e,t)}selectNext(e,t){return c_(Y(this,`next`),e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function Tl(e){return e instanceof wl}function El(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&yc(n,e,t)||t&&yc(n,t,e)||e&&bc(n,e,t)||t&&bc(n,t,e))}(c,l))}function Dl(e,t){let n=e.mergeWithSibling(t),r=K()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Ol(e){let t,n,r=e;if(!Dd(r)){if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable()&&!Dd(t);){if(t.__text!==``){if(El(t,r)){r=Dl(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable()&&!Dd(n);){if(n.__text!==``){if(El(r,n)){r=Dl(r,n);break}break}n.remove()}}else r.remove()}}function kl(e){return Al(e.anchor),Al(e.focus),e}function Al(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),z(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!L(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var jl=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ml(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!jl.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function Nl(e,t,n,r,i){let a=Ml(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var Pl=e=>{let t=Ms(e,`format`),n=Ns(e,`format`),r=Fs(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Nl(t.indent,0,0,1/0),e.__textFormat=Ml(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function Fl(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var Il=e=>{let t=Ms(e,`mode`),n=Ps(e,`detail`,0),r=Ps(e,`format`,0),i=Ns(e,`mode`),a=Fs(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:Ml(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:Ml(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:Fl}},Ll=e=>{let t=Ms(e,`format`),n=Ns(e,`format`),r=Fs(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Nl(t.indent,0,0,1/0),e.__textFormat=Ml(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},Rl=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),zl=e=>{let t=Ms(e,`mode`),n=Ps(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:Ml(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},Bl=new WeakMap;function Vl(e,t){for(let n=e;n!==null&&n!==t;n=Object.getPrototypeOf(n)){let t=n.prototype;if(t!==void 0&&Object.prototype.hasOwnProperty.call(t,`isInline`)&&typeof t.isInline==`function`&&!Fp(t.isInline))try{let t=e.prototype.isInline.call(Object.create(e.prototype));return typeof t==`boolean`?t:null}catch{return null}}}function Hl(e){for(let{ownNodeConfig:t}of Bp(e))if(t&&t.children!==void 0)return t.children}function Ul(e){let t=Bl.get(e);if(t===void 0){let n={},r={},i=!1;for(let{klass:t,ownNodeConfig:a}of Bp(e))a&&(r.inline===void 0&&a.inline!==void 0&&(n.inline=a.inline,r.inline=t),r.children===void 0&&a.children!==void 0&&(n.children=a.children,r.children=t),i||a.mergeAdjacent===void 0||(i=!0,!1!==a.mergeAdjacent&&(n.mergeAdjacent=a.mergeAdjacent,r.mergeAdjacent=t)));let a=function(e){let t=new Set,n=Cp(e);for(let e of Object.keys(n))!0===n[e].derived&&t.add(e);for(let{ownNodeConfig:n}of Bp(e)){let e=n&&n.stateConfigs;if(e)for(let n of e){let e=n instanceof sc?n:n.stateConfig;e.derived&&t.add(e.key)}}return t}(e);r.inline!==void 0&&r.inline!==e&&Vl(e,r.inline)!==void 0&&Vl(e,r.inline)!==n.inline&&(delete n.inline,delete r.inline),r.mergeAdjacent===void 0||r.mergeAdjacent===e||function(e,t,n){let r=Cp(e);for(let e of t.by)if(typeof e==`string`){if(!(e in r))return{entry:e,reason:`unknown`};if(n.has(e))return{entry:e,reason:`derived`}}else if(e.derived)return{entry:String(e.key),reason:`derived-state`};return null}(e,n.mergeAdjacent,a)===null&&function(e,t){if(!Array.isArray(t)||t.includes(`inline`))return null;for(let n of t){if(n===`inline`)continue;let t=Hl(n);if(!(t===`inline`||Array.isArray(t)&&t.includes(`inline`)&&t.every(t=>t===`inline`||t===e||e.prototype instanceof t)))return n}return null}(e,n.children)===null||(delete n.mergeAdjacent,delete r.mergeAdjacent),t=Object.freeze({...n,declaredBy:Object.freeze(r),derived:a,derivedNames:a}),Bl.set(e,t)}return t}function Wl(e){let{derivedNames:t,...n}=Ul(e);return Object.freeze({...n,derived:new Set(t)})}function Gl(e){return!1}function Kl(){return{...Ua,0:``}}function ql(){return{...Va,"":0}}var Jl=Kl(),Yl=ql(),Xl=ec()({direction:rc(Zs([null,`ltr`,`rtl`]),{field:`__dir`}),format:rc(Zs([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:Jl,setter:`setFormat`,setterTable:Yl}),indent:rc(Ys(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:ic(Ys(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:ic(qs(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function Zl(e){if(U(e)&&!Gl(K())){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var Ql=class extends wl{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:Zl,extends:wl,generated:Pl,json:Xl})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&N(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return Ua[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){return l_(this.getFirstChild(),`next`)}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&y_(this).length===0}isDirty(){let e=K()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of y_(this)){let n=b_(this,t);if(L(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(z(t)&&e.push(t),L(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;L(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;L(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=e>=this.getChildrenSize(),n=t?this.getLastChild():this.getChildAtIndex(e);return L(n)&&(t?n.getLastDescendant():n.getFirstDescendant())||n}getFirstChild(){let e=this.getLatest().__first;return e===null?null:B(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&N(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:B(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&N(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=D_(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),L(i)&&r!==n-1&&!i.isInline()&&(e+=La)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of v_(e).values()){let e=B(n);e!==null&&(t+=e.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),L(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=Va[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=za[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return bd(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Nm();let n=J(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(z(e)||L(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(z(e)||L(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return q(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):Mg(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&Va[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){Sl(this)&&N(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||N(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}t>0&&(s=function(e,t,n,r){let i=[],a=t;for(let e=0;e<n;e++){a===null&&N(100);let e=a.getNextSibling();i.push(a.getWritable()),a=e}return n_(e,r&&r.getWritable(),a&&a.getWritable()),e.__size-=i.length,i.map(e=>(r_(e),e.__prev=null,e.__next=null,e.__parent=null,e.__key))}(i,l===null?this.getFirstChild():l.getNextSibling(),t,l));let d=n.length>0&&l!==null?l.getWritable():null;for(let e of n){d!==null&&e.is(d)&&(l=d.getPreviousSibling(),d=l&&l.getWritable()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,a_(t);let n=e.__key;i_(i,t,d,c&&c.getWritable()),e.__key===a&&N(76),o.push(n),d=t}if(i.__size=u,s.length){let e=J();if(q(e)){let t=new Set(s),n=new Set(o);for(let r of[e.anchor,e.focus])$l(r,t,n)&&Hg(r,r.getNode(),this,l,c);u!==0||this.canBeEmpty()||U(this)||this.remove()}}return i}getDOMSlot(e){return new _s(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(W(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(U(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(z(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){t.read(`latest`,()=>{let n=Xf(this,e,t),r=n.element;n.after&&n.after.parentNode!==r&&(n=n.withAfter(null)),n.before&&n.before.parentNode!==r&&(n=n.withBefore(null));let i=n.getManagedLineBreak();i&&n.insertManagedLineBreak(i.nodeName===`IMG`);let a=n.getFirstChild();for(let e of this.getChildrenKeys()){let i=t.getElementByKey(e);if(!i)continue;let o,s=a;for(;s&&!(o=Ad(s,t))&&cp(s);)s=s.nextSibling;s!==i&&r.insertBefore(i,o?s:a||n.getInsertionAnchor()),a=i.nextSibling}ul(this,e,n)})}};function L(e){return e instanceof Ql}function $l(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var eu=class extends wl{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&N(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function R(e){return e instanceof eu}function tu(e){let t=e.getLatest().__cachedText;return t===null||!Mm()&&K()._dirtyType!==0?null:t}var nu=class extends Ql{__cachedText;$config(){return this.config(`root`,{extends:Ql})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){N(51)}getTextContent(){let e=tu(this);return e===null?super.getTextContent():e}getTextContentSize(){let e=tu(this);return e===null?super.getTextContentSize():e.length}remove(){N(52)}replace(e){N(53)}insertBefore(e){N(54)}insertAfter(e){N(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)L(e)||R(e)||N(282);return super.splice(e,t,n)}static importJSON(e){return V().updateFromJSON(e)}collapseAtStart(){return!0}};function ru(e){return e instanceof nu}function iu(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function au(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===`!important`?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function ou(e,t,n=``){if(t===n)return;let r=iu(n),i=iu(t);for(let t in i)delete r[t],au(e,t,i[t]);for(let t in r)e.removeProperty(t)}var su=ec()({detail:rc(tc(Ys(),Ba),{field:`__detail`}),format:rc(tc(Ys(),za),{field:`__format`}),mode:rc(Zs([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:Ga,setterTable:Wa}),style:rc(qs(),{field:`__style`}),text:rc(qs(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function cu(e,t){return 16&t?`code`:128&t?`mark`:32&t?`sub`:64&t?`sup`:null}function lu(e,t){return 1&t?`strong`:2&t?`em`:`span`}function uu(e,t,n,r,i){let a=r.classList,o=Zd(i,`base`);o!==void 0&&a.add(...o),o=Zd(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in za){let r=za[e];if(o=Zd(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}Xd(r,`class`)}function du(e,t,n){let r=n.isComposing(),i=e+(r?Ia:``),a=Jf(),o=Yf(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(Af().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||wa||ja){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);c.replaceData(e,t,n)}else c.nodeValue=i}}function fu(e,t,n,r,i,a){du(i,e,t);let o=a.theme.text;o!==void 0&&uu(0,0,r,e,o)}function pu(e,t){let n=Af().createElement(t);return n.appendChild(e),n}function mu(e){return e!=null&&!0===e.__isInlineFormattable}var hu=class extends wl{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:wl,generated:Il,importDOM:{"#text":()=>({conversion:bu,priority:0}),b:()=>({conversion:_u,priority:0}),code:()=>({conversion:Cu,priority:0}),em:()=>({conversion:Cu,priority:0}),i:()=>({conversion:Cu,priority:0}),mark:()=>({conversion:Cu,priority:0}),s:()=>({conversion:Cu,priority:0}),span:()=>({conversion:gu,priority:0}),strong:()=>({conversion:Cu,priority:0}),sub:()=>({conversion:Cu,priority:0}),sup:()=>({conversion:Cu,priority:0}),u:()=>({conversion:Cu,priority:0})},json:su})}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return Ga[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Ed()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=za[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return bd(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=cu(0,n),i=lu(0,n),a=r===null?i:r,o=Af().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=Af().createElement(i),o.appendChild(s)),fu(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&ou(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=cu(0,i),s=cu(0,a),c=lu(0,i),l=lu(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??N(48);let i=Af().createElement(l);return fu(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??N(49)),du(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&uu(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(ou(t.style,p,f),Xd(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return W(t)||N(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=pu(t,`b`)),this.hasFormat(`italic`)&&(t=pu(t,`i`)),this.hasFormat(`strikethrough`)&&(t=pu(t,`s`)),this.hasFormat(`underline`)&&(t=pu(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?za[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?Ba[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=bd(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=Wa[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){Nm();let n=e,r=t,i=J(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!q(i))return Mg(o,n,o,r,`text`,`text`);{let e=Ed();e!==i.anchor.key&&e!==i.focus.key||Td(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=J();if(r&&q(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Nm();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Ed(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=J();if(q(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=wu(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=xc(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=wu(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=xc(t,n);let a=n.__key;i===r&&Td(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&wd(t),n!==null&&wd(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),q(v)&&Vg(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||N(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Ed()===r&&Td(n);let o=J();if(q(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&Ug(i,t,n,e,a),s!==null&&s.key===r&&Ug(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function gu(e){return{forChild:Tu(e.style),node:null}}function _u(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:Tu(t.style,n?void 0:`bold`),node:null}}var vu=new WeakMap;function yu(e){if(!W(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function bu(e){let t=e;e.parentElement===null&&N(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=vu.get(n))===void 0&&!yu(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)vu.set(r[e],i);return i}(t)!==null)return{node:Yg(n)};if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=xu(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=xu(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:wu(n)}}function xu(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,W(n)){let e=n.style.display;if(e===``&&!Wf(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(_d(n))return n;if(n.nodeName===`BR`)return null}}var Su={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Cu(e){let t=Su[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Tu(e.style,t),node:null}}function wu(e=``){return vf(new hu(e))}function z(e){return e instanceof hu}function Tu(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>((z(e)||mu(e))&&(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}function Eu(e,t){let{type:n,key:r,offset:i}=e,a=bf(e.key);return n===`text`?(z(a)||N(266,a.getType(),r),G_(a,t,i)):(L(a)||N(267,a.getType(),r),zu(a,e.offset,t))}function Du(e,t){let{origin:n,direction:r}=t,i=r===`next`;z_(t)?e.set(n.getKey(),t.offset,`text`):B_(t)?z(n)?e.set(n.getKey(),K_(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(V_(t)&&L(n)||N(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function Ou(e){let t=J(),n=q(t)?t:Ng();return ku(n,e),Id(n),n}function ku(e,t){Du(e.anchor,t.anchor),Du(e.focus,t.focus)}function Au(e){let{anchor:t,focus:n}=e,r=Eu(t,`next`),i=Eu(n,`next`),a=av(r,i)<=0?`next`:`previous`;return rv(ev(r,a),ev(i,a))}function ju(e){let{direction:t,origin:n}=e,r=Y(n,F_(t)).getNodeAtCaret();return r?Y(r,t):J_(n.getParentOrThrow(),t)}function Mu(e,t=`root`){let n=[e];for(let r=V_(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(ju(r));return n}function Nu(e){return!!e&&e.origin.isAttached()}function Pu(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Ru(e,r),o=a.anchor.origin;for(;o!==null&&!U(o);)o=o.getParent();let s=L(o)?o.getFirstChild():null,c=Mu(a.anchor,n),l=Mu(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(V_(e))u.add(e.origin.getKey());else if(B_(e)){let{origin:t}=e;L(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),Cd(e)}for(let e of f)!e.canBeEmpty()&&!U(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=ju(Y(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=wu(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=G_(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p=Fu(c),m=Fu(l),h=function(e,t,n){let r=e&&e.getParentAtCaret(),i=t&&t.getParentAtCaret(),a=r&&i&&dv(r,i);if(!a||a.type!==`branch`)return null;let o=(e,t)=>{let r;for(let i=e;i&&!i.is(a.commonAncestor);i=i.getParent()){if(U(i))return;t&&!n.has(i.__key)||!qf(i)||(r=i)}return r},s=o(r,!1),c=s&&o(i,!0);return s&&c&&y_(c).length===0?[s,c]:null}(p,m,u);if(h){let[e,t]=h;J_(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(V_(e)){let t=e.origin;if(qf(t))return t}else{let t=e.getParentAtCaret();if(t&&qf(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(gf);if(e&&t&&!ru(t)&&e.isEmpty()&&u.has(e.getKey())&&y_(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!ru(n)&&n.isEmpty();){let e=n.getParent();if(e&&ru(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Fd(o,s)!==null||o===null||o.isAttached()||Fd(V(),null);let g=Fu([p,m,...c,...l]);if(g)return nv(ev(g,e.direction));N(269,JSON.stringify(c.map(e=>e.origin.__key)))}function Fu(e){let t=e.find(Nu);return t&&Iu(t)}function Iu(e){let t=function(e){let t=e;for(;V_(t);){let e=X_(t);if(!V_(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(z(t.origin))return z_(t)?t:G_(t.origin,n,n);let r=t.getAdjacentCaret();return B_(r)&&z(r.origin)?G_(r.origin,n,F_(n)):t}function Lu(e){return z_(e)&&e.offset!==K_(e.origin,e.direction)}function Ru(e,t){return e.direction===t?e:rv(ev(e.focus,t),ev(e.anchor,t))}function zu(e,t,n){let r=e.getChildrenSize(),i=(t>0?Math.min(Math.ceil(t),r):0)-+(n===`next`),a=i<0||i>=r?null:e.getChildAtIndex(i);return a===null?J_(e,n):Y(a,n)}function Bu(e,t=`root`){let n=0,r=e,i=X_(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=X_(r)}return i&&[i,n]}function Vu(e){let{origin:t,offset:n,direction:r}=e;if(n===K_(t,r))return e.getSiblingCaret();if(n===K_(t,F_(r)))return ju(e.getSiblingCaret());let[i]=t.splitText(n);return z(i)||N(281),ev(Y(i,`next`),r)}function Hu(e,t){for(let n of e)if(n!==null&&n.caret.origin.is(t))return n}function Uu(e,t=null){let{origin:n}=e.caret,[r,i]=e.getSliceIndices();if(r===i)return null;if(r===0&&i===n.getTextContentSize())return n;let a=n.getParent(),o=t&&a&&Bg(t,a)?n.getIndexWithinParent():-1,s=t?[t.anchor,t.focus].map(e=>[e,e.key===n.__key&&e.type===`text`?e.offset-r:a!==null&&e.key===a.__key&&e.offset===o?0:null]):[],c=n.splitText(r,i),l=c[r===0?0:1];a&&t&&t!==J()&&Vg(t,a,o,c.length-1);for(let[e,t]of s)t!==null&&e.set(l.__key,t,`text`);return l}function Wu(e,t){return!0}function Gu(e,{$copyElementNode:t=_f,$splitTextPointCaretNext:n=Vu,rootMode:r=`shadowRoot`,$shouldSplit:i=Wu,removeEmptyDestination:a=!1}={}){if(z_(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(V_(e)){let e=ju(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=l_((s=e).getNodeAtCaret(),s.direction);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}var s;return o}function Ku(e,t,n){let r=ev(t,`next`);z_(r)&&(r.offset===0?r=Y(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Y(r.origin,`next`))),r.origin.is(e)&&(B_(r)||N(342,e.getKey(),e.getType()),r=ju(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=Gu(e,n))r=e;return z_(r)&&N(283),r.insert(e.isInline()?Xu().append(e):e),ev(Y(e.getLatest(),`next`),t.direction)}function qu(e,t){let n=Ru(q(t)?Au(t):t,`next`),r=g_(n.anchor.origin),i=g_(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=Iu(J_(e,`next`)),o=ev(Iu(J_(e,`previous`)),`next`);return av(n.anchor,a)<=0&&av(n.focus,o)>=0}var Ju=class extends Ql{$config(){return this.config(`paragraph`,{children:`inline`,extends:Ql,generated:Ll,importDOM:{p:()=>({conversion:Yu,priority:0})}})}createDOM(e){let t=Af().createElement(`p`),n=Zd(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(W(t)){this.isEmpty()&&t.append(Af().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(z),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!q(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(qu(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=Xu();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>z(e)&&!/\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function Yu(e){let t=Xu();if(op(t,e),ip(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in Va&&t.setFormat(n)}return ap(t,e),{node:t}}function Xu(){return vf(new Ju)}function Zu(e){return e instanceof Ju}var Qu=ec()({detail:ic(Ys(2),{getter:{field:`__detail`},setter:null}),mode:ic(Zs([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:ic(qs(` `),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),$u=class extends hu{$config(){return this.config(`tab`,{extends:hu,generated:zl,json:Qu})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=Zd(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||N(286),this}setDetail(e){return e!==2&&N(127),this}setMode(e){return e!==`normal`&&N(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function ed(){return vf(new $u)}function td(e){return e instanceof $u}var nd=null;function rd(e){nd=e}var id=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),ad=1;function od(e,t){let n=sd(e,t);return n===void 0&&N(30,t),n}function sd(e,t){return e._nodes.get(t)}var cd=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function ld(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return vd(t)||Tf(t)?Rf(t):null})():t;if(!W(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=jd(n),i=n.nodeName;return Tl(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&md(n)==null)}function ud(e){let t=e===null?null:zf(e);return Vf(t)&&ld(t)}function dd(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return pd(t)===e&&e.read(`latest`,()=>!ld(t))}function fd(e){return e instanceof bm}function pd(e){let t=e;for(;t!=null;){let e=md(t);if(fd(e))return e;t=af(t)}return null}function md(e){return e?e.__lexicalEditor:null}function hd(e){return td(e)||e.isToken()}function gd(e){return hd(e)||e.isSegmented()}function _d(e){return Vf(e)&&e.nodeType===3}function vd(e){return Vf(e)&&e.nodeType===9}function yd(e){let t=e;for(;t!=null;){if(_d(t))return t;t=t.firstChild}return null}function bd(e,t,n){let r=za[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~za.superscript:t===`superscript`?i&=~za.subscript:t===`lowercase`?(i&=~za.uppercase,i&=~za.capitalize):t===`uppercase`?(i&=~za.lowercase,i&=~za.capitalize):t===`capitalize`&&(i&=~za.lowercase,i&=~za.uppercase),i}function xd(e){return z(e)||lm(e)||R(e)}function Sd(e,t){let n=function(){let e=nd;return nd=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);Nm(),Pm();let r=K(),i=Fm(),a=``+ad++;i._nodeMap.set(a,e),L(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.set(a,e),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function Cd(e){a_(e.getParent()===null?e:e.getWritable())}function wd(e){Pm(),Sl(e)&&N(323,e.__key,e.__type);let t=e.__parent===null?f_(e)?e.__slotHost:null:e.__parent,n=Fm(),r=K(),i=n._nodeMap,a=r._dirtyElements;t!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?f_(e)?e.__slotHost:null:e.__parent}}(t,i,a);let o=e.__key;r._dirtyType===0&&(r._dirtyType=1),L(e)?a.set(o,!0):r._dirtyLeaves.add(o)}function Td(e){Nm();let t=K(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=B(n);e!==null&&e.getWritable()}if(e!==null){let t=B(e);t!==null&&t.getWritable()}}}function Ed(){return Mm()?null:K()._compositionKey}function Dd(e){return!Oa&&(Aa||Na)&&e.__text===``&&e.__key===K()._compositionKey}function B(e,t){let n=(t||Fm())._nodeMap.get(e);return n===void 0?null:n}function Od(e,t){let n=Ad(e,K());return n===void 0?null:B(n,t)}function kd(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Ad(e,t){return e[`__lexicalKey_${t._key}`]}function jd(e,t){let n=e;for(;n!=null;){let e=Od(n,t);if(e!==null)return e;n=af(n)}return null}function Md(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Nd(e){return e.read(()=>V().getTextContent())}function Pd(e,t){let n=tp(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=B(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:`history-merge`}:void 0)}function V(){return Fm()._nodeMap.get(`root`)}function Fd(e,t){if(!(U(e)&&e.isAttached()&&(ru(e)?e.getChildrenSize()===0:e.isEmpty())&&(ru(e)||t!==null&&qf(t))))return null;let n=Xu();return e.append(n),n}function Id(e){Nm();let t=Fm();e!==null&&(e.dirty=!0,e.setCachedNodes(null),q(e)&&K()._slotsUsed&&Og(e)),t._selection=e}function Ld(e){Nm(),Ds(K(),e)}function Rd(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Ad(n,t);if(e!==void 0)return e;n=af(n)}return null}(e,K());return t===null?null:B(t)}function zd(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Bd(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}var Vd=0;function Hd(){return va?Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5):`s${(++Vd).toString(36)}`}function Ud(e){return _d(e)?e.nodeValue:null}function Wd(e,t,n){let r=Cf(pf(t));if(r===null)return;let i=Nf(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=Ud(a),r=jd(a);if(t!==null&&z(r)){if((t===Ia||t===Ra)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&Gd(r,t,o,s,e)}}}function Gd(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=!Oa&&(Aa||Na);if(a.isToken()&&o)return;let c=t;if((o||i)&&(!t.endsWith(Ia)||s&&t===a.getTextContent()||(c=t.slice(0,-Ia.length)),i&&!s)){let e=Ra,t;for(;(t=c.indexOf(e))!==-1;)c=c.slice(0,t)+c.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let l=a.getTextContent();if(i||c!==l){let t=J();if(c===``){if(o&&!i&&s)return void Kd(a,``,t);if(Td(null),Aa||Oa||Na)a.remove();else{let e=K();Kd(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let l=a.getParent(),u=zg(),d=a.getTextContentSize(),f=Ed(),p=a.getKey();if(a.isToken()&&!o||f!==null&&p===f&&!o||q(u)&&(l!==null&&!l.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!a.canInsertTextBefore()&&!o||u.focus.key===e.__key&&u.focus.offset===d&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!q(t)||n===null||r===null)return void Kd(a,c,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=wu(a.getTextContent());a.replace(e),a=e}Kd(a,c,t)}}}function Kd(e,t,n){if(e.setTextContent(t),q(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=K_(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function qd(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(ru(e))return t;t=e}return null}function Jd(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(kl(e),!ru(t))return e;let u=qd(n.getNode());return L(u)&&u.isShadowRoot()&&u.is(qd(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function Yd(e){let t=V();if(q(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(ru(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Jd(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(L(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),Jd(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),Jd(e,a),e)}{let e=t.select(0,t.getChildrenSize());return Id(Jd(e,t)),e}}function Xd(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function Zd(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=pv(i);return n[t]=e,e}return i}function Qd(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&N(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function $d(e){let t=e.getType(),n=Fm();if(n._readOnly){let e=tp(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function ef(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function tf(e,t){let n=e.offset;if(e.type===`element`)return ef(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?ef(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function nf(e){let t=pf(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function H(e,t,...n){return Ym(e,t,n[0],e)}function rf(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&N(75,t),n}function af(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return Tf(n)?n.host:null}function of(e){return vd(e)?e:W(e)?e.ownerDocument:null}function sf(e,t){let n=parseFloat(e);return isFinite(n)?e.endsWith(`%`)?n*t/100:n:0}function cf(e,t,n,r){let i=t.clientWidth,a=t.scrollWidth-i;if(a<=0)return 0;let o=e.getComputedStyle(t);if(o.overflowX!==`auto`&&o.overflowX!==`scroll`)return 0;let s=t.getBoundingClientRect(),c=t.offsetWidth,l=c>0&&Math.abs(s.width-c)>1?s.width/c:1,u=o.direction===`rtl`,d=s.left+t.clientLeft*l,f=d+sf(o.scrollPaddingLeft,i)*l,p=d+(i-sf(o.scrollPaddingRight,i))*l,m=n,h=Math.max(r,n+1);h-m>p-f&&(u?m=h-1:h=m+1);let g=0;if(m<f?g=m-f:h>p&&(g=h-p),g===0)return 0;let _=t.scrollLeft,v=_+g/l,y=g>0?Math.ceil(v):Math.floor(v),b=u?Math.min(0,Math.max(-a,y)):Math.max(0,Math.min(a,y)),x=_*l;return Math.abs(b)<Math.abs(_)&&m+x>=f&&h+x<=p&&(b=0),b===_?0:(t.scrollLeft=b,(t.scrollLeft-_)*l)}function lf(e){Nm(),K()._updateTags.add(e)}function uf(e){Nm(),K()._deferred.push(e)}function df(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function ff(e){let t=of(e);return t?t.defaultView:null}function pf(e){let t=e._window;return t===null&&N(78),t}function mf(e){return L(e)&&e.isInline()||R(e)&&e.isInline()}function hf(e){let t=e.getLatest();for(;t!==null;){if(p_(t)!==null&&L(t))return t;let e=t.getParentOrThrow();if(U(e))return e;t=e}return t}function gf(e){return L(e)&&e.isShadowRoot()}function U(e){return ru(e)||gf(e)}function _f(e,t=!1){let n=e.constructor.clone(e,id);return Sd(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function vf(e){let t=K(),n=e.getType(),r=sd(t,n);r===void 0&&N(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||N(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||N(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&N(203,e.constructor.name,n,r.name,r.getType()),t}return e}function yf(e,t){!ru(e.getParent())||L(t)||R(t)||N(99)}function bf(e){let t=B(e);return t===null&&N(63,e),t}function xf(e){if(!e||e.isInline())return!1;if(R(e))return!0;if(L(e)){if(e.isShadowRoot()){let t=e.getParent();return!(L(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Sf(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function Cf(e){return va?(e||window).getSelection():null}function wf(e){let t=ff(e);return t?t.getSelection():null}function Tf(e){return Hf(e)&&`host`in e}var Ef=[];function Df(e){let t=e.getRootNode();if(t===e||!Tf(t))return Ef;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!Tf(e))break;n.push(e),r=e.host}return n}function*Of(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(vd(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function kf(e){return e===null?document:e.ownerDocument}function Af(){let e=zm();return kf(e===null?null:e._rootElement)}function jf(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=Df(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function Mf(e,t){let n=jf(e,t);if(n!==null){let e=Pf(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function Nf(e,t){let n=jf(e,t);return n===null?e:Ff(n,If(e))}function Pf(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function Ff(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function If(e){return e.direction}function Lf(e){let t=e.getRootNode();return vd(t)||Tf(t)?t.activeElement:null}function Rf(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function zf(e){let t=e.target;if(t!==null&&W(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function Bf(e){return W(e)&&e.tagName===`A`}function W(e){return Vf(e)&&e.nodeType===1}function Vf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function Hf(e){return Vf(e)&&e.nodeType===11}var Uf=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Wf(e){return!(!W(e)||!e.style.display.startsWith(`inline`))||Uf.test(e.nodeName)}var Gf=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Kf(e){return(!W(e)||!e.style.display.startsWith(`inline`))&&Gf.test(e.nodeName)}function qf(e){if(R(e)&&!e.isInline())return!0;if(!L(e)||U(e))return!1;let t=e.getFirstChild(),n=t===null||lm(t)||z(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Jf(){return K()}function Yf(e=Jf()){return e._config.dom||gm}function Xf(e,t,n=Jf()){let r=Yf(n).$getDOMSlot(e,t,n);return L(e)&&(Zf(r)||N(344,e.getKey(),e.getType())),r}function Zf(e){return e instanceof _s}function Qf(e,t,n=Jf()){return yd(Xf(e,t,n).element)}var $f=new WeakMap,ep=new Map;function tp(e){if(!e._readOnly&&e.isEmpty())return ep;e._readOnly||N(192);let t=$f.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),$f.set(e,t)),t}function np(e){let t=e.constructor.clone(e,id);return t.afterCloneFrom(e),t}function rp(e){return(t=np(e))[xl]=!0,t;var t}function ip(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function ap(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function op(e,t){let n=t.style.textAlign;return n&&n in Va?e.setFormat(n):e}function sp(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function cp(e){return!0===e.__lexicalUnmanaged}function lp(e,t=Jf()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function up(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(W(n)&&n.hasAttribute(`data-lexical-slot`)||Ad(n,t)!==void 0)return!1;n=af(n)}return!1}function dp(e,t){return Ks(e,t)&&e[t]!==wl[t]}var fp=new WeakMap;function pp(e){let t=fp.get(e);return t===void 0?function(e){let t=e.prototype!=null&&qa in e.prototype?e.prototype[qa]():void 0,n=function(e){if(!(e===wl||e.prototype instanceof wl)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{bm.version&&(n=JSON.parse(bm.version))}catch{}N(290,e.name,t,n)}return e===eu||e===Ql||e===wl}(e),r=!n&&dp(e,`getType`)?e.getType:void 0,i=r&&!(hp in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:Ks(e.prototype,qa),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};fp.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=Sp(e);for(let[i,a]of r){let r=Ep(e,i,a);if(r===null)continue;if(js(r)){let t=r.field;if(t===`__proto__`&&N(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])Ks(t,String(r))||N(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&N(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?gp:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of Sp(e).fieldsDerivedFirst){let a=Tp(e,r,i);if(a===null)continue;if(js(a)){let o=a.field;o===`__proto__`&&N(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&N(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&N(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?wp:[...n.values()]}(e),i=Sp(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of Bp(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,mp(pp(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:kp(r),setters:t},function(e,t,n,r){if(!t&&n){if(!dp(e,`getType`)){let t=e,r=function(){return this===t?n:wl.getType.call(this)};r[hp]=!0,e.getType=r}if(dp(e,`clone`)||(e.clone=(t,n)=>{rd(t);let r=new e;return n!==id&&r.afterCloneFrom(t),r}),dp(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=Vp(e);return n.updateFromJSON===wl.prototype.updateFromJSON?function(e,t){return jp(e.__state||t.$!==void 0?gc(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!dp(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}let t=e.prototype;Ks(t,`getTextContent`)&&!Ks(t,`getTextContentSize`)&&(e.prototype.getTextContentSize=wl.prototype.getTextContentSize)}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of Bp(e)){let e=t.prototype;if(Ks(e,`afterCloneFrom`))continue;let r=zp(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?mp(pp(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[Lp]=!0}}(e),function(e,t){t&&t.inline!==void 0&&Ks(e.prototype,qa)&&!Object.prototype.hasOwnProperty.call(e.prototype,`isInline`)&&Object.defineProperty(e.prototype,"isInline",{configurable:!0,value:t.inline?Np:Pp,writable:!0})}(e,a)}catch(t){throw fp.delete(e),t}return s}(e):t}function mp(e){let{compiled:t}=e;return t===void 0&&N(422,e.config.klass.name),t}var hp=Symbol(`lexical.synthesizedGetType`),gp=[];function _p(e,t,n,r){let i=n.method===void 0?r:n.method,a=Sp(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return vp(o,s,i)&&vp(o,s,r)?n:i}function vp(e,t,n){return e[n]===t[n]}function yp(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function bp(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var xp={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function Sp(e){let t=pp(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of Bp(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?xp:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}function Cp(e){let{fieldsDerivedFirst:t,flatStates:n}=Sp(e),r={};for(let e of n)e.schema&&(r[e.key]=e.schema);for(let[e,n]of t)r[e]=n;return r}var wp=[];function Tp(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?bp(t):r;return js(i)?_p(e,t,i,bp(t)):i}function Ep(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?yp(t):r;return js(i)?_p(e,t,i,yp(t)):i}function Dp(e){return e}function Op(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function kp(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&Op(i,r)}}function Ap(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function jp(e,t){let{flatStates:n,generated:r,setters:i}=mp(pp(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=uc(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?Dp(e)[i.field]=i.setterTable===void 0?a:Ks(i.setterTable,a)?i.setterTable[a]:Ap(i):i.setter.call(e,a)}return e}(a,t,i)}function Mp(e){return pp(e).config}function Np(){return!0}function Pp(){return!1}function Fp(e){return e===Np||e===Pp}function Ip(e){let t=[];for(let n of[e.getter,e.setter])js(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var Lp=`__lexicalSynthesizedAfterCloneFrom`;function Rp(e){let{declaredBy:t,fieldsBaseFirst:n}=Sp(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of Ip(a))r.includes(e)||r.push(e);return r}function zp(e){let t=Rp(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of Bp(e))if(t!==e)for(let e of Rp(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*Bp(e){for(let t=e;t&&(t===wl||Tl(t.prototype));){let e=Mp(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||Up(t)}}function Vp(e){let t=Jf();Nm();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:vf(r)}var G=(e,t)=>{let n=e;for(;n!=null&&!ru(n);){if(t(n))return n;n=n.getParent()}return null};function Hp(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?B(r):t.get(r);e??N(174),n.push(r),r=e.__next}return n}function Up(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}function Wp(e){return new Jp(is(e._nodeMap),null,e._slotsUsed)}function Gp(){return new Jp(new Map([[`root`,new nu]]),null,!1)}function Kp(e){let t=e.constructor,n=ls(e);if(L(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(Kp(r[e]))}let r=y_(e);if(r.length>0){let i={};for(let n of r){let r=b_(e,n);r===null&&N(366,t.name,n),i[n]=Kp(r)}n.$slots=i}return n}function qp(e){return e instanceof Jp}var Jp=class e{_nodeMap;_movedNodes;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._movedNodes=null,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return Gm(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return ss(typeof e==`boolean`&&e,()=>Gm(null,this,()=>({root:Kp(V())})))}},Yp=`historic`,Xp=`history-push`,Zp=`history-merge`,Qp=`paste`,$p=`collaboration`,em=`skip-collab`,tm=`skip-scroll-into-view`,nm=`skip-dom-selection`,rm=`skip-selection-focus`,im=`composition-end`,am=class extends Ql{$config(){return this.config(`artificial`,{extends:Ql})}createDOM(e){return Af().createElement(`div`)}},om=class extends wl{$config(){return this.config(`linebreak`,{extends:wl,generated:Rl,importDOM:{br:e=>um(e)||dm(e)?null:{conversion:sm,priority:0}}})}getTextContent(){return`
4
4
  `}createDOM(){return Af().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function sm(e){return{node:cm()}}function cm(){return vf(new om)}function lm(e){return e instanceof om}function um(e){let t=e.parentElement;if(t!==null&&Kf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&fm(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&fm(n))return!0}}return!1}function dm(e){let t=e.parentElement;if(t!==null&&Kf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&fm(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&fm(r))return!0}return!1}function fm(e){return _d(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function pm(e){console.warn(e)}function mm(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=Gp(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),t!==null&&yh(e,t),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){delete e[`__lexicalKey_${t._key}`]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),kd(n,e,`root`))}function hm(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of Bp(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var gm={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=sd(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>L(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>L(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function _m(e){let t=e||{},n=zm(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Gp(),s=t.namespace||(i===null?Hd():i._config.namespace),c=t.editorState,l=[nu,hu,om,$u,Ju,am,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===wl||n.prototype instanceof wl)){let r=`<unknown>`;try{r=JSON.parse(ts)}catch{}N(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}Mp(n);let a=n.getType(),o=hm(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:fc(l[e]),transforms:o})}}let h=new bm(o,i,m,{disableEvents:a,dom:{...gm,...e&&e.dom},namespace:s,theme:r},u||console.error,d||pm,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(Qa,kh,0),e.registerCommand($a,jh,0),e.registerCommand(eo,Nh,0),e.registerCommand(to,Ph,0),e.registerCommand(ho,Gh,0)}(h),h}function vm(e,t){let n=e.get(t);e.delete(t),n&&n()}function ym(e,t,n){return e.set(t,n),vm.bind(null,e,t)}var bm=class{static version=ts;_headless;_recordNodeMoves;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_keyDownShortcuts;_inputState;_lastNotifiedSelection;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new as,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Map,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Hd(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._recordNodeMoves=!1,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null},this._lastNotifiedSelection=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return ym(this._listeners.update,e)}registerEditableListener(e){return ym(this._listeners.editable,e)}registerDecoratorListener(e){return ym(this._listeners.decorator,e)}registerTextContentListener(e){return ym(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return th(ym(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&N(35);let r=this._commands;r.has(e)||r.set(e,[new ns,new ns,new ns,new ns,new ns]);let i=r.get(e);i===void 0&&N(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&N(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=tp(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return Pd(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return H(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=Zd(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,mm(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||function(e){let t=ah.get(e);if(t===void 0)return void Qh();let n=oh.get(t);if(n===void 0)return void Qh();ah.delete(e);let r=md(e);fd(r)?(function(e){if(e._parentEditor!==null){let t=Bd(e),n=t[t.length-1]._key;Jh.get(n)===e&&Jh.delete(n)}else Jh.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&N(198);let i=Kh(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),n!=null&&t.classList.remove(...n)),e!==null){let t=ff(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,Os(this),this._updateTags.add(Zp),Km(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;ah.set(e,n);let r=oh.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},oh.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=Kh(e);i.push(sh.register(n));let a={blur:Wo,click:mh,compositionend:Lh,compositionstart:Mh,copy:Io,cut:Lo,dragend:Fo,dragover:Po,dragstart:No,drop:jo,focus:Uo,input:Ah,keydown:Rh,paste:oo,pointerdown:bh,...Ea&&{beforeinput:Oh},...Oa&&{keyup:zh,mousedown:_h}};for(let[n,r]of Object.entries(a))i.push(nh(e,n,i=>{Zh(i)||(Xh(i),n===`blur`&&(yh(t,e),t._inputState.isShiftKeyDown=!1,t._inputState.isInsertLineBreak=!1),(t.isEditable()||n===`click`||n===`copy`)&&(typeof r==`function`?r(i,t):H(t,r,i)))}));let o,s=()=>{t._inputState.mouseDrag=null},c=n=>{let i=t._inputState,a=i.mouseDrag;if(o&&o.defaultPrevented&&!n.buttons&&(i.isSelectionChangeFromMouseDown=!1),!a||n.pointerType!==`mouse`)return;let c=n.type===`pointerup`;if(n.type===`pointercancel`||!c&&n.buttons!==1)return s();i.mouseDrag=c?null:n,eh(t,()=>{let o=Cf(pf(t));if(a.type!==`mousedown`){let r=c&&o&&q(J())&&Lg(zg(),o,t,new Event(`selectionchange`));return r&&Id(r),Sh(t,n,c&&o?Nf(o,e).focusNode:null)}let l=Fg(o,t);if(a.defaultPrevented||!a.shiftKey&&l&&!l.isCollapsed())s();else if(o&&i.isSelectionChangeFromMouseDown){qh(t,o,new Event(`selectionchange`),r),Sh(t,a,Nf(o,e).focusNode);let n=J();q(n)&&n.isCollapsed()&&!n.is(zg())&&ph(t,n)}})};i.push(rh(n,{pointercancel:c,pointermove:c,pointerup:c},!0),nh(pf(t),`blur`,s),t.registerEditableListener(s),rh(e,{contextmenu:s,dragstart:s,keydown:e=>e.getModifierState&&e.getModifierState(e.key)||s(),mousedown:e=>{let n=t._inputState;n.mouseDrag=e.button!==0||e.detail!==1||e.defaultPrevented||n.lastPointerType!==`mouse`||!t.isEditable()||t.isComposing()||up(zf(e),t)?null:e}}),nh(e,`pointerdown`,e=>{o=e,t._inputState.lastPointerType=e.pointerType},!0)),Oa&&i.push(function(e,t){let n=null,r={capture:!0,passive:!0};return th(nh(e,`touchstart`,e=>{let t=e.touches.length===1?e.touches[0]:null;n=t?{x:t.clientX,y:t.clientY}:null},r),nh(e,`touchend`,e=>{let r=e.changedTouches[0];n!==null&&r&&e.touches.length===0&&Math.abs(r.clientX-n.x)<=hh&&Math.abs(r.clientY-n.y)<=hh&&t(e),n=null},r))}(e,n=>function(e,t,n){t._inputState.savedInputMode!==void 0&&(vh(e,t,n)||(Rf(n.ownerDocument)===n&&n.blur(),yh(t,n)))}(n,t,e)))}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Zp),Km(this);qm(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){let n=e.isEmpty(),r=e;r._readOnly&&(r=Wp(e),r._selection=e._selection?e._selection.clone():null),Ds(this);let i=this._pendingEditorState,a=t===void 0?null:t.tag;i===null||i.isEmpty()||(a!=null&&this._updateTags.add(a),Km(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,eh(this,()=>{if(a&&this._updateTags.add(a),n&&(ga(38),V().append(Xu())),e._parsed)for(let[e,t]of r._nodeMap.entries())L(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=Gp(),i=Sm,a=wm,o=Cm,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Map,t._dirtyType=0,Sm=r,wm=!1,Cm=t,rd(null);try{let i=t._nodes;Wm(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,Sm=i,wm=a,Cm=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&(km.has(this)||Km(this)),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):$m(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),eh(this,()=>{let r=J(),i=V();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Id(r.clone()),lf(`focus`),uf(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=Cf(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,qm(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Lm()))}toJSON(){return{editorState:this._editorState.toJSON(cs())}}};function xm(e,t,n,r,i,a){if(L(e)){let o=e.__first;for(;o!==null;){let e=r.get(o);if(e===void 0)break;let s=L(e);e.__parent!==t||s&&a.has(o)||((s||d_(e)&&e.__slots!==null)&&xm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o)),o=e.__next}}for(let o of d_(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&f_(e)&&e.__slotHost===t&&((L(e)||d_(e)&&e.__slots!==null)&&xm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var Sm=null,Cm=null,wm=!1,Tm=!1,Em=!1,Dm=new Set,Om=new Set,km=new Set,Am=0,jm={characterData:!0,childList:!0,subtree:!0};function Mm(){return wm||Sm!==null&&Sm._readOnly}function Nm(){wm&&N(13)}function Pm(){Am>99&&N(14)}function Fm(){return Sm===null&&N(195,Rm()),Sm}function Im(e){Fm()!==null&&Cm===null&&(Cm=e),Cm!==e&&ga(378)}function K(){return Cm===null&&N(337,Rm()),Cm}function Lm(){K()._dirtyType=2}function Rm(){let e=0,t=new Set,n=bm.version;if(typeof window<`u`)for(let r of Of(document)){let i=md(r);if(fd(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function zm(){return Cm}function Bm(e,t,n){let r=t.__type,i=od(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Vm(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Hm(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Um(e){return Wm(e,K()._nodes)}function Wm(e,t){let n=e.type,r=t.get(n);r===void 0&&N(17,n);let i=r.klass;e.type!==i.getType()&&N(18,i.name);let a=i.importJSON(e),o=e.children;if(L(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Wm(o[e],t);a.append(n)}let s=e.$slots;if(s){d_(a)||N(379,i.name);for(let e in s)k_(a,e,Wm(s[e],t))}return a}function Gm(e,t,n){let r=Sm,i=wm,a=Cm;Sm=t,wm=!0,Cm=e;try{return n()}finally{Sm=r,wm=i,Cm=a}}function Km(e,t){e._pendingEditorState!==null&&Cm!==e&&Ds(e,!1,!0);let n=Em;Em=!0;try{let n=function(e){if(Om.has(e))return!1;Om.add(e);try{for(let t=0;e._pendingEditorState!==null;t++){let n=e._pendingEditorState._selection,r=e._rootElement;if(!Jm(e,n))return!1;let i=(n===null||q(n))&&(e._headless||r===null||!r.isConnected);if(i||t===100)return e._lastNotifiedSelection=n===null?null:n.clone(),!i;$m(e,()=>e.dispatchCommand(Ya),void 0,!0)}return!1}finally{Om.delete(e)}}(e);(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&Xm(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=Sm,u=wm,d=Cm,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){Cm=e,Sm=n,wm=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=_l(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),Tm)throw t;mm(e,null,r,n),Os(e),e._dirtyType=2,Tm=!0,Km(e,a),Tm=!1;return}finally{p.observe(r,jm),e._updating=f,Sm=l,wm=u,Cm=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set;let y=e._deferred;f||(e._deferred=[]),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=Md(e)),delete r[a])}(e,n);let b=i?null:Cf(pf(e));if(e._editable&&b!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){Cm=e,Sm=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&Sf(t,e,r),Kg(o,s,e,b,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(q(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(Lf(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())xf(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&xf(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=Xf(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=Af().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=pv(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&Sf(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,jm),Cm=d,Sm=l}}let x=km.has(e);km.add(e);try{m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a);let r=e._pendingDecorators;r!==null&&(e._decorators=r,e._pendingDecorators=null,qm(`decorator`,e,!0,r)),function(e,t,n){let r=Nd(t),i=Nd(n);r!==i&&qm(`textcontent`,e,!0,i)}(e,t||a,n),qm(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v})}finally{x||km.delete(e)}f||Xm(e,y),function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Dm.has(e)||(Dm.add(e),setTimeout(()=>{Dm.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(ha(437,e._config.namespace));let n=t.shift();if(n){let[t,r]=n;$m(e,t,r)}}(e)})(e,t),n&&e._onWarn(ha(436))}finally{Em=n}}function qm(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function Jm(e,t){let n=e._lastNotifiedSelection;return t===null?n!==null:!t.is(n)}function Ym(e,t,n,r){let i=Bd(e),a;if(!Em)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);if(t===Ya){if(Cm!==e||wm){let i=!1;return eh(e,()=>{i=Ym(e,t,n,r)}),i}let i=Fm()._selection;e._lastNotifiedSelection=i===null?null:i.clone()}for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(eh(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{Ym(a,t,n,r)}),!1}function Xm(e,t){if(e._deferred===t&&(e._deferred=[]),t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Zm(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&N(191),a._flushSync=!0),o&&e._deferred.push(o),Hm(e,i.tag)),a==null?$m(e,n,i):n()}}return r}function Qm(){let e=Fm();Nm(),e._flushSync=!0}function $m(e,t,n,r=!1){let i=e._updateTags,a,o=!1,s=!1;n!==void 0&&(a=n.onUpdate,Hm(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),a&&e._deferred.push(a);let c=e._editorState,l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=Wp(l||c),u=!0),l._flushSync=s;let d=Sm,f=wm,p=Cm,m=e._updating,h=e._lastNotifiedSelection;Sm=l,wm=!1,e._updating=!0,Cm=e;let g=e._headless||e.getRootElement()===null;rd(null);try{u&&(g?c._selection!==null&&(l._selection=c._selection.clone()):l._selection=function(e,t){let n=e.getEditorState()._selection,r=Cf(pf(e));return q(n)||n==null?Lg(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),o=Zm(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(q(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(l,e),e._dirtyType!==0&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Ol(t)}}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Ed(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);z(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Ol(r),r!==void 0&&Vm(r,a)&&Bm(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){Am++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Vm(c,a)&&Bm(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,Am++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Zm(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(L(t)&&xm(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(d_(t)&&t.__slots!==null&&xm(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}let s=K(),c=s._cloneNotNeeded;for(let e of o)a.delete(e),c.delete(e);let l=s._compositionKey;l===null||a.has(l)||(s._compositionKey=null)}(c,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let i=l._selection;if(q(i)){e._slotsUsed&&Og(i);let t=l._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||N(19)}else lg(i)&&i._nodes.size===0&&(l._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=c;let n=c._selection;e._lastNotifiedSelection=n===null?null:n.clone(),e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Km(e);return}finally{Sm=d,wm=f,Cm=p,e._updating=m,Am=0}r||(e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,Km(e)):u&&cd(()=>{Km(e)}):(l._flushSync=!1,u&&(i.clear(),e._deferred=[],e._pendingEditorState=null,e._lastNotifiedSelection=h)))}function eh(e,t,n){Cm===e&&n===void 0?Mm()?$m(e,t,n):t():$m(e,t,n)}function th(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function nh(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}function rh(e,t,n){return th(...Object.entries(t).map(([t,r])=>nh(e,t,r,n)))}var ih=30,ah=new WeakMap,oh=new WeakMap,sh=$o(e=>(e.addEventListener(`selectionchange`,Yh),()=>e.removeEventListener(`selectionchange`,Yh)));function ch(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=K(),u;if(a!==void 0)u=a;else{let e=Cf(pf(l));u=e===null?null:Nf(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!z(c)||(!i&&(!Ea||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||zd(n))&&o.offset!==s.offset&&!c.isComposing()||gd(c)||c.isDirty()&&m>1||(i||!Ea)&&p!==null&&!c.isComposing()&&d!==Qf(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=hd(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(z(t)||L(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function lh(e,t){return _d(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function uh(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=Nf(e,t._rootElement),s=t._inputState;if(s.isSelectionChangeFromDOMUpdate){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,lh(r,i)&&lh(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}eh(t,()=>{if(!n)return void Id(null);if(!dd(t,r,a))return;let c=s.mouseDrag;!c||c.type===`mousedown`&&c.defaultPrevented||Sh(t,c,a);let l=xh.has(c),u=J();if(s.postDeleteSelectionToRestore&&q(u)&&u.isCollapsed()){let e=u.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(u=s.postDeleteSelectionToRestore.clone(),Id(u))}if(s.postDeleteSelectionToRestore=null,q(u)){let n=u.anchor;if(u.isCollapsed())e.type===`Range`&&r===a&&(u.dirty=!0),ph(t,u);else{let e=n.key,t=u.focus,r=t.key,a=u.getNodes(),s=a.length,c=u.isBackward(),[d,f]=l?[n.offset,t.offset]:[i,o],p=c?f:d,m=c?d:f,h=c?r:e,g=c?e:r,_=Fa,v=!1;for(let e=0;e<s;e++){let t=a[e],n=t.getTextContentSize();if(z(t)&&n!==0&&!(e===0&&t.__key===h&&p===n||e===s-1&&t.__key===g&&m===0)&&(v=!0,_&=t.getFormat(),_===0))break}u.format=v?_:0}}(function(e,t,n=!1){(n||Jm(e,t))&&e.dispatchCommand(Ya)})(t,u,u!==null&&(u.dirty&&!l||!q(u)))})}function dh(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function fh(e,t){dh(e,t.getFormat(),t.getStyle())}function ph(e,t){let n=t.anchor,r=n.getNode(),i=pf(e).event,a=i?i.timeStamp:performance.now(),{format:o,style:s,offset:c,key:l,timeStamp:u}=e._inputState.collapsedSelectionFormat;a<u+200&&n.offset===c&&n.key===l?dh(t,o,s):n.type===`text`?(z(r)||N(141),fh(t,r)):(e.isComposing()||V().getTextContent()!==``)&&(L(r)||N(259),r.isEmpty()?Rg(t,``):dh(t,t.format,``))}function mh(e,t){eh(t,()=>{let n=J(),r=Cf(pf(t)),i=zg();if(r){if(q(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!ru(t)&&V().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`||Oa&&t._inputState.lastPointerType!==`mouse`){let n=Nf(r,t._rootElement).anchorNode;(W(n)||_d(n))&&Id(Lg(i,r,t,e))}}if(wa&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(W(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=Lg(i,r,t,e);s===null?r.removeAllRanges():Id(s)}}H(t,Za,e)})}var hh=10,gh=`input:not(:disabled),textarea:not(:disabled),select:not(:disabled),button:not(:disabled),a[href],area[href],label,summary,iframe,object,embed,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])`;function _h(e,t){let n=t.getRootElement();n!==null&&(vh(e,t,n)?(e.preventDefault(),Rf(n.ownerDocument)!==n&&(t._inputState.savedInputMode===void 0&&(t._inputState.savedInputMode=n.getAttribute(`inputmode`)),n.setAttribute(`inputmode`,`none`),n.focus({preventScroll:!0}))):yh(t,n))}function vh(e,t,n){if(t._inputState.lastPointerType===`mouse`)return!1;let r=zf(e);if(!Vf(r))return!1;let i=!1;for(let e=r;e!==null;e=af(e)){if(e===n)return i;if(e.nodeType===1){let t=e;if(t.matches(gh))return!1;t.getAttribute(`data-lexical-decorator`)===`true`&&(i=!0)}}return!1}function yh(e,t){let n=e._inputState.savedInputMode;n!==void 0&&(e._inputState.savedInputMode=void 0,n===null?t.removeAttribute(`inputmode`):t.setAttribute(`inputmode`,n))}function bh(e,t){let n=zf(e),r=e.pointerType;Vf(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&eh(t,()=>{up(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}var xh=new WeakSet;function Sh(e,t,n=null){let r=J(),i=r&&r.clone();(function(e,t,n){let r=zg(),i=t.type===`mousedown`,a=i&&!t.shiftKey,o=n&&jd(n);R(o)&&(i?a&&o.isInline()&&o.selectPrevious():q(r)&&Id(r.clone()));let s=J(),c=s||(a?Ng():q(r)?r.clone():null),l=e.getRootElement(),u=l&&l.getRootNode();if(!q(c)||a&&!c.isCollapsed()||!vd(u)&&!Tf(u))return;let{anchor:d,focus:f}=c;if(!i&&q(r)){let{key:e,offset:t,type:n}=r.anchor;d.set(e,t,n,!0)}let{clientX:p,clientY:m}=t,h=u.elementFromPoint&&u.elementFromPoint(p,m),g=h&&jd(h),_=(e,t)=>L(e)?t===`next`?e.getLastDescendant():e.getFirstDescendant():e,v=[null],y=L(g)&&!g.isInline()&&(ru(g)?G(f.getNode(),jg):g);for(let e of y?J_(y,`next`):[])v.push(Y(e.origin,`previous`),e);let b=pf(e),x=b.document.createRange(),S=null;for(let t of v){let n=t?_(t.origin,t.direction):g;if(!R(n)||!n.isInline()||n===S)continue;let r=e.getElementByKey(n.getKey());if(!r)continue;x.selectNodeContents(r);let i=x.getBoundingClientRect(),o=r.getBoundingClientRect(),{bottom:l,left:u,right:h,top:v}=i.height>o.height?i:o;if(t&&(m<v||m>l)){S=n;continue}let y=b.getComputedStyle(af(r)||r).direction===`rtl`,C=2*p>u+h!==y,w=C?`next`:`previous`,T=t&&t.getNodeAtCaret(),E=T&&e.getElementByKey(T.getKey()),D=E?E.getClientRects():[],O=D[C?0:D.length-1];if(!t||t.direction===w&&b.getComputedStyle(r).cssFloat===`none`&&(!T||lm(T)||O&&(C===y?2*O.right>u+h:2*O.left<u+h))){if(!n.is(_(tf(f,C),w))){let e=Y(n,w);Du(f,e),a&&Du(d,e)}s||Id(c);return}}if(R(o)&&!i){let t=b.document,n=t.caretPositionFromPoint&&t.caretPositionFromPoint(p,m,{shadowRoots:Tf(u)?[u]:[]}),r=n&&Cg(n.offsetNode,n.offset,null,e);if(r){let[{key:e,offset:t,type:n}]=r;f.set(e,t,n)}}})(e,t,n);let a=J(),o=e._inputState.mouseDrag;o&&a&&!a.is(i)&&xh.add(o),t.type===`mousedown`&&q(a)&&Rg(a,q(i)?i.anchor.key:``)}function Ch(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function wh(e){let{lastKeyCode:t}=K()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`