ryugi-artifacts 1.108.7 → 1.109.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +209 -352
- package/dist/document-engine.cjs +1160 -301
- package/dist/loro_wasm_bg.wasm +0 -0
- package/dist/runtime/icons/a.json +1 -0
- package/dist/runtime/icons/b.json +1 -0
- package/dist/runtime/icons/c.json +1 -0
- package/dist/runtime/icons/d.json +1 -0
- package/dist/runtime/icons/e.json +1 -0
- package/dist/runtime/icons/f.json +1 -0
- package/dist/runtime/icons/g.json +1 -0
- package/dist/runtime/icons/h.json +1 -0
- package/dist/runtime/icons/i.json +1 -0
- package/dist/runtime/icons/index.json +1 -0
- package/dist/runtime/icons/j.json +1 -0
- package/dist/runtime/icons/k.json +1 -0
- package/dist/runtime/icons/l.json +1 -0
- package/dist/runtime/icons/m.json +1 -0
- package/dist/runtime/icons/n.json +1 -0
- package/dist/runtime/icons/o.json +1 -0
- package/dist/runtime/icons/p.json +1 -0
- package/dist/runtime/icons/q.json +1 -0
- package/dist/runtime/icons/r.json +1 -0
- package/dist/runtime/icons/s.json +1 -0
- package/dist/runtime/icons/t.json +1 -0
- package/dist/runtime/icons/u.json +1 -0
- package/dist/runtime/icons/v.json +1 -0
- package/dist/runtime/icons/w.json +1 -0
- package/dist/runtime/icons/x.json +1 -0
- package/dist/runtime/icons/z.json +1 -0
- package/dist/runtime/ryugi-icons.js +1 -1
- package/dist/viewer/{AgentDock-fdzdI0YU.js → AgentDock-6un7g6EW.js} +1 -1
- package/dist/viewer/ArtboardLayout-DcLjfTW5.js +14 -0
- package/dist/viewer/{ArtifactList-D1Cv2wcz.js → ArtifactList-CguprV5S.js} +1 -1
- package/dist/viewer/{ArtifactModal-BRPuHjh3.js → ArtifactModal-BthavXPQ.js} +1 -1
- package/dist/viewer/{BottomSheet-DksTxPPS.js → BottomSheet-BFmMmz0e.js} +1 -1
- package/dist/viewer/Canvas-BQvfuFH9.js +1 -0
- package/dist/viewer/{CommentPopover-Bz3qXsBS.js → CommentPopover-wKdHWvEk.js} +1 -1
- package/dist/viewer/{DocumentExportMenu-Cb03PJdE.js → DocumentExportMenu-DXQAge-h.js} +1 -1
- package/dist/viewer/DocumentLayout-DPB6Byav.js +2 -0
- package/dist/viewer/DocumentPage-BStsS6oE.js +3 -0
- package/dist/viewer/{DraggablePanel-BlNQ_JOj.js → DraggablePanel-WnQa4WqJ.js} +1 -1
- package/dist/viewer/{DropdownMenu-DhVZ3e22.js → DropdownMenu-C-RgiXH5.js} +1 -1
- package/dist/viewer/{GroupVerdict-DkOR7Neo.js → GroupVerdict-BhUpCp5w.js} +1 -1
- package/dist/viewer/{HtmlLayout-BQS68lEe.js → HtmlLayout-Ykt8uvx5.js} +1 -1
- package/dist/viewer/{Input-YumXWTse.js → Input-C1Nrx6NW.js} +1 -1
- package/dist/viewer/{MenuSubmenuTrigger-DZ2Nb6Hm.js → MenuSubmenuTrigger-C3Y6EJ1a.js} +1 -1
- package/dist/viewer/{PhoneArtboardBar-CZKL18gK.js → PhoneArtboardBar-BMkMYKEH.js} +1 -1
- package/dist/viewer/{Popover-i0m3nwq7.js → Popover-cB2rLdue.js} +1 -1
- package/dist/viewer/{PreviewArtifactLayout-B4SZfLvw.js → PreviewArtifactLayout-H6NV96nq.js} +1 -1
- package/dist/viewer/{PreviewLayout-DiIQthoy.js → PreviewLayout-CFXMPAXR.js} +2 -2
- package/dist/viewer/{ReportLayout-DPnqWYPZ.js → ReportLayout-gDr83HaK.js} +1 -1
- package/dist/viewer/{RyugiMark-Ch2tF00h.js → RyugiMark-BxkKQ5lq.js} +1 -1
- package/dist/viewer/{Segmented-BV_iofkK.js → Segmented-Beqk813u.js} +1 -1
- package/dist/viewer/{SelectScrollUpArrow-BNSyHMPX.js → SelectScrollUpArrow-DuDh2HJ_.js} +1 -1
- package/dist/viewer/{SlidesLayout-CSeSindR.js → SlidesLayout-CWZjcfO3.js} +3 -3
- package/dist/viewer/{SnapshotDocument-TIzAsI0l.js → SnapshotDocument-B2cxzqyH.js} +1 -1
- package/dist/viewer/{SplitFrame-C3Mr0Ehv.js → SplitFrame-Czb4TISP.js} +1 -1
- package/dist/viewer/{StoryboardLayout-DZVJbnzc.js → StoryboardLayout-C1AqDRge.js} +1 -1
- package/dist/viewer/{StoryboardRender-DORxY44d.js → StoryboardRender-0BHiMypp.js} +1 -1
- package/dist/viewer/{ThreadView-CbKzFwUf.js → ThreadView-C7soHy8_.js} +1 -1
- package/dist/viewer/{Tooltip-81DgA1Zr.js → Tooltip-B0Ehf6Z5.js} +1 -1
- package/dist/viewer/{VerifyLayout--deiRi4o.js → VerifyLayout-9xD_W0-c.js} +1 -1
- package/dist/viewer/{VirtualizedEditor-uWe43zaI-1EQ0fdB8.js → VirtualizedEditor-uWe43zaI-DT4GAFpm.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-CixG8E4F.js → VirtualizedRenderer-C_d95FXi-ealkku86.js} +1 -1
- package/dist/viewer/{WarningsBadge-fEXkyk3t.js → WarningsBadge-BbJdjQpt.js} +1 -1
- package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-BRt-wSEn.js → WhiteboardEditor-cZ32fLqJ-BfKRGbqm.js} +1 -1
- package/dist/viewer/{WhiteboardLayout-qGm-CExy.js → WhiteboardLayout-C-RLaui_.js} +1 -1
- package/dist/viewer/{WritingCursor-OdCSWg_M.js → WritingCursor-oPoIsKUb.js} +1 -1
- package/dist/viewer/{agentLook-EhrjbD1n.js → agentLook-D4riQJ8C.js} +1 -1
- package/dist/viewer/{artifact-list-D22lTyyh.js → artifact-list-CpPtgMEK.js} +1 -1
- package/dist/viewer/{auto-publish-BXmqx8BX.js → auto-publish-DVEHOTT5.js} +1 -1
- package/dist/viewer/channel-CVsrQP9s.js +4 -0
- package/dist/viewer/{crop-encode-Udgh8S7r.js → crop-encode-hNMFMj6m.js} +1 -1
- package/dist/viewer/{dist-DRmbQ1f0.js → dist--v3nH0C2.js} +1 -1
- package/dist/viewer/{dist-o-mpdm3Q.js → dist-B0ILD5bC.js} +1 -1
- package/dist/viewer/{dist-BNiHzkc8.js → dist-BHWbRf2s.js} +1 -1
- package/dist/viewer/{dist-R6N8uqUg.js → dist-BVmgdxIk.js} +1 -1
- package/dist/viewer/{dist-vjczWTJX.js → dist-Bqxw-VPi.js} +1 -1
- package/dist/viewer/{dist-C0Fbwkds.js → dist-CAMOMDy7.js} +1 -1
- package/dist/viewer/{dist-G4Vj4mFX.js → dist-CIggNRs9.js} +1 -1
- package/dist/viewer/{dist-DurHsNXj.js → dist-CKyjD35S.js} +1 -1
- package/dist/viewer/{dist-DD00JDtU.js → dist-CLk1Bth7.js} +1 -1
- package/dist/viewer/{dist-i-_vhfnL.js → dist-CNxdwhOg.js} +1 -1
- package/dist/viewer/{dist-B-RrlmaY.js → dist-CQ22WAIU.js} +1 -1
- package/dist/viewer/{dist-DKWARfq1.js → dist-CRi3Ep6t.js} +1 -1
- package/dist/viewer/{dist-rs8SY6NP.js → dist-CWG86Qx7.js} +1 -1
- package/dist/viewer/{dist-C4fPBi1f.js → dist-CyGunPGS.js} +1 -1
- package/dist/viewer/{dist-CjVeWopx.js → dist-DHHkE5Pc.js} +1 -1
- package/dist/viewer/{dist-CuWYFfBf.js → dist-DN1H79Ip.js} +1 -1
- package/dist/viewer/{dist-kzNj8Wks.js → dist-DXt-rGJU.js} +1 -1
- package/dist/viewer/{dist-DBnvEq5g.js → dist-Dc7UOYbo.js} +1 -1
- package/dist/viewer/dist-DiSjof8e.js +1 -0
- package/dist/viewer/{dist-DzmIJXNR.js → dist-Dk6bIGuf.js} +1 -1
- package/dist/viewer/{dist-DRUJxMS6.js → dist-DmKVt1TO.js} +1 -1
- package/dist/viewer/{dist-0JlH-iFk.js → dist-DuQFs8bS.js} +1 -1
- package/dist/viewer/{dist-C81vCo2L.js → dist-E38Xe3MQ.js} +1 -1
- package/dist/viewer/{dist-BMJWStKC.js → dist-H8MUbNB6.js} +1 -1
- package/dist/viewer/{editor-BabkJ7hH.js → editor-B_dmAT7r.js} +5 -5
- package/dist/viewer/fit-Dy3EIsBE.js +1 -0
- package/dist/viewer/{icons-8mizjIXE.js → icons-BurfZgbO.js} +1 -1
- package/dist/viewer/{imperative-iclc26pT.js → imperative-Cgz8hoz-.js} +1 -1
- package/dist/viewer/index.html +13 -13
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index4.css +1 -1
- package/dist/viewer/index5.css +4 -0
- package/dist/viewer/{local-DzHVL3fo.js → local-DXaScWD4.js} +1 -1
- package/dist/viewer/{local-split-host-DaeACaX5.js → local-split-host--Swu-YgH.js} +1 -1
- package/dist/viewer/plugin-_bGVeqI0-CTywTig9.js +2 -0
- package/dist/viewer/preview.html +4 -4
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{printDocument-Bh1qUAf9.js → printDocument-CC2oNEVO.js} +1 -1
- package/dist/viewer/{ref-JbqCEGXp.js → ref-B-yJaA1I.js} +1 -1
- package/dist/viewer/{route-DdpUUY_w.js → route-McOpomU2.js} +4 -4
- package/dist/viewer/{route-messages-BMv2jmvl.js → route-messages-CVVJCGbw.js} +1 -1
- package/dist/viewer/{settings-wKTRexHi.js → settings-CiU-sro0.js} +1 -1
- package/dist/viewer/{snap-1DJNMR4r.js → snap-Dxg6-ulS.js} +1 -1
- package/dist/viewer/split-Dnd6CUMX.js +2 -0
- package/dist/viewer/{stable-CZy_447C.js → stable-D0V-nxn7.js} +1 -1
- package/dist/viewer/{styles-BHI9FTnz.js → styles-B6PpuJxT.js} +1 -1
- package/dist/viewer/{transport-Djlo7-HU.js → transport-Cs-vGiPz.js} +1 -1
- package/dist/viewer/types-BCsOeYI6.js +1 -0
- package/dist/viewer/{url-B_fuREEU.js → url-BO9cF4cS.js} +1 -1
- package/dist/viewer/{useArtifactFeed-B9RfhN8_.js → useArtifactFeed-CeKgpdgq.js} +1 -1
- package/dist/viewer/{useArtifactSocket-ns9zjgVa.js → useArtifactSocket-Dp2OBZFo.js} +1 -1
- package/dist/viewer/{useLayerZIndex-VAxAVO-V.js → useLayerZIndex-DzJy6vhi.js} +1 -1
- package/dist/viewer/{useStoryboardData-DCPDhUMO.js → useStoryboardData-C7PSl2I4.js} +1 -1
- package/dist/viewer/{view-DLrABahQ.js → view-BQdRX9O6.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-B0Ka3uWP.js → viewport-CFJHn_Y6-Cz8ocWMP.js} +1 -1
- package/package.json +4 -3
- package/dist/server.cjs +0 -995
- package/dist/viewer/ArtboardLayout-CyP7z5iV.js +0 -14
- package/dist/viewer/Canvas-DA9wKktu.js +0 -1
- package/dist/viewer/DocumentLayout-16zcY3cg.js +0 -2
- package/dist/viewer/DocumentPage-B__O7sY3.js +0 -3
- package/dist/viewer/channel-CaUFZV2H.js +0 -4
- package/dist/viewer/dist-CY11yEtD.js +0 -1
- package/dist/viewer/fit-BJ0VxRML.js +0 -1
- package/dist/viewer/plugin-_bGVeqI0-BkU-g6bb.js +0 -2
- package/dist/viewer/split-BJA_5Rtf.js +0 -2
- package/dist/viewer/split-C1umM5Fz.css +0 -1
- package/dist/viewer/types-DAs-xbqr.js +0 -1
package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-BRt-wSEn.js → WhiteboardEditor-cZ32fLqJ-BfKRGbqm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,T as n,k as r}from"./route-DdpUUY_w.js";import{t as i}from"./react-DlmbjZJV.js";import{$ as a,$t as o,Ar as s,Cn as c,Cr as l,Dr as u,En as d,Er as f,Gn as p,Ln as m,Or as h,Q as g,Qt as _,Rn as v,Tn as y,Tr as b,X as x,Xt as S,Z as C,Zt as w,an as T,dr as E,en as D,er as O,et as ee,gr as te,hr as ne,kr as re,mr as ie,nn as ae,nt as oe,or as se,qt as ce,rn as le,tn as ue,tt as de,wr as fe,yr as pe,zn as me}from"./url-B_fuREEU.js";import{t as he}from"./jsx-runtime-LKYXHABd.js";import{$ as ge,$r as _e,An as ve,B as ye,Br as be,Dn as xe,En as Se,Ft as Ce,Gn as we,Gr as Te,Gt as Ee,It as De,J as Oe,Kr as ke,Mn as Ae,O as je,Pn as Me,Qr as Ne,R as Pe,S as Fe,Sr as Ie,T as Le,Tr as Re,V as ze,Vr as Be,Xn as Ve,Xr as He,Yr as Ue,Zr as We,_n as Ge,_r as Ke,an as qe,cn as Je,ct as Ye,dr as Xe,ei as Ze,fn as Qe,hn as $e,hr as et,i as tt,kr as nt,ni as rt,on as it,or as at,pt as ot,qt as st,rr as ct,sn as lt,ti as ut,v as dt,vn as ft,wr as pt,xr as mt,zn as ht,zr as gt}from"./useLayerZIndex-VAxAVO-V.js";import{Dt as _t}from"./MotionConfigContext-HC2vqcJO.js";import{A as vt,C as yt,D as bt,E as xt,M as St,N as Ct,P as wt,S as Tt,T as Et,_ as Dt,b as Ot,c as kt,d as At,j as jt,k as Mt,l as Nt,s as Pt,u as Ft,v as It,w as Lt}from"./Popover-i0m3nwq7.js";import{t as Rt}from"./chevron-right-xNdXLJg6.js";import{i as zt,n as Bt,r as Vt,t as Ht}from"./stringifyLocale-D0juOOnH.js";import{t as Ut}from"./code-DnmQyGiF.js";import{A as Wt,F as Gt,M as Kt,N as qt,O as Jt,P as Yt,S as Xt,_ as Zt,a as Qt,b as $t,c as k,d as en,f as tn,g as nn,h as rn,i as an,j as on,k as sn,m as cn,n as ln,o as un,p as dn,r as fn,s as pn,t as mn,u as hn,v as gn,w as _n,x as vn,y as yn}from"./SelectScrollUpArrow-BNSyHMPX.js";import{i as bn,n as xn,r as Sn,t as A}from"./zoom-out-DsmGFv1v.js";import{a as Cn,c as wn,i as Tn,n as En,o as Dn,r as On,s as kn,t as An}from"./text-align-start-CRhecbJR.js";import{a as jn,i as Mn,n as Nn,t as Pn}from"./ruler-CYb0HZGT.js";import{t as Fn}from"./maximize-2-Bc0lXBg6.js";import{t as In}from"./mouse-pointer-2-B-OF_fcG.js";import{n as Ln,r as Rn,t as zn}from"./undo-2-B-JiyKIl.js";import{t as Bn}from"./plus-DZJ2BVkK.js";import{C as Vn,_ as Hn,a as Un,b as Wn,c as Gn,d as Kn,f as qn,g as Jn,h as Yn,i as Xn,l as Zn,m as Qn,n as $n,o as er,p as tr,r as nr,s as rr,t as ir,u as ar,v as or,y as sr}from"./MenuSubmenuTrigger-DZ2Nb6Hm.js";var cr={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`}]]};cr.node;var lr=_t(cr),ur={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`}]]};ur.node;var dr=_t(ur),fr={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`}]]};fr.node;var pr=_t(fr),mr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};mr.node;var hr=_t(mr),gr={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`}]]};gr.node;var _r=_t(gr),vr={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`}]]};vr.node;var yr=_t(vr),br={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`}]]};br.node;var xr=_t(br),Sr={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`}]]};Sr.node;var Cr=_t(Sr),wr={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`}]]};wr.node;var Tr=_t(wr),Er={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`]};Er.node;var Dr=_t(Er),Or={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`}]]};Or.node;var kr=_t(Or),Ar={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Ar.node;var jr=_t(Ar),Mr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Mr.node;var Nr=_t(Mr),Pr={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`}]]};Pr.node;var Fr=_t(Pr),Ir={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`}]]};Ir.node;var Lr=_t(Ir),Rr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};Rr.node;var zr=_t(Rr),Br={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`}]]};Br.node;var Vr=_t(Br),Hr={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`}]]};Hr.node;var Ur=_t(Hr),Wr={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`}]]};Wr.node;var Gr=_t(Wr),Kr={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`}]]};Kr.node;var qr=_t(Kr),Jr={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`}]]};Jr.node;var Yr=_t(Jr),j=e(i(),1),M=he(),Xr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=j.useMemo(()=>({open:t,close:n}),[t,n]);return(0,M.jsx)(yt.Provider,{value:t,children:(0,M.jsx)(bt,{delay:i,timeoutMs:r,children:e.children})})},Zr=class extends xt{constructor(){super(Et(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function Qr(){return new Zr}var $r=j.createContext(void 0);function ei(){let e=j.useContext($r);if(e===void 0)throw Error(He(34));return e}var ti=j.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:c=!1,style:l,"aria-labelledby":u,...d}=e,[f,p]=j.useState(void 0),[m,h]=s({controlled:i,default:a,name:`MenuRadioGroup`}),g=ut((e,t)=>{o?.(e,t),t.isCanceled||h(e)}),_=Te(`div`,e,{state:{disabled:c},ref:t,props:{role:`group`,"aria-labelledby":u??f,"aria-disabled":c||void 0,...d}}),v=j.useMemo(()=>({value:m,setValue:g,disabled:c}),[m,g,c]);return(0,M.jsx)(tr.Provider,{value:p,children:(0,M.jsx)($r.Provider,{value:v,children:_})})}),ni=j.memo(j.forwardRef(function(e,t){let n=sr()?.RadioGroup??ti;return(0,M.jsx)(n,{...e,ref:t})})),ri=j.createContext(void 0);function ii(){let e=j.useContext(ri);if(e===void 0)throw Error(He(35));return e}var ai=j.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,{store:f}=Vn(),{value:p,setValue:m,disabled:g}=ei(),_=h({guess:!0,label:a}),v=Be(i),y=f.useState(`isActive`,_.index),b=f.useState(`floatingNodeId`),x=f.useState(`itemProps`),S=f.useState(`disabled`),C=s||g||S,w=p===l,{getItemProps:T,itemRef:E}=or({closeOnClick:c,disabled:C,highlighted:y,id:v,store:f,nativeButton:o,nodeId:b,itemMetadata:Hn}),D=j.useMemo(()=>({disabled:C,highlighted:y,checked:w}),[C,y,w]);function O(e){let t=gt(Re,e.nativeEvent,void 0,{preventUnmountOnClose:Ze});m(l,t)}let ee=Te(`div`,e,{state:D,stateAttributesMapping:Jn,props:[x,{role:`menuitemradio`,"aria-checked":w,onClick:O},d,T],ref:[E,t,_.ref]});return(0,M.jsx)(ri.Provider,{value:D,children:ee})}),oi=j.forwardRef(function(e,t){let n=Wn(e,t);return n.visible?(0,M.jsx)(ai,{...e,ref:n.ref}):null}),si=j.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ii(),c=j.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=at(s.checked);xe({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 Te(`span`,e,{state:f,stateAttributesMapping:Jn,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),ci=e(r(),1),li=new Map;function ui(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${Ht(t)}|${JSON.stringify(r)}`,a=li.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=on(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=on(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=on(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return li.set(i,s),s}var di=``;function fi(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 pi(e=!0){let t=Ae(),n=j.useRef(null);return j.useEffect(()=>{if(!e||ft)return;let r=n.current;if(r==null)return;let i=fi(r);if(i==null)return;let a=i.data,o=`${a}${di}`;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 mi(e,t,n,r,i,a,o,s,c,l=2){let u=Ye(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 ot(n.current,u)?void 0:u}var hi=j.createContext(void 0),gi=j.createContext(void 0),_i=j.createContext(void 0),vi=j.createContext(!1),yi=j.createContext(``);function bi(){let e=j.useContext(hi);if(!e)throw Error(He(22));return e}function xi(){let e=j.useContext(gi);if(!e)throw Error(He(23));return e}function Si(){let e=j.useContext(_i);if(!e)throw Error(He(24));return e}function Ci(){return j.useContext(yi)}function wi(){return j.useContext(vi)}var Ti={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?sn(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=>rn(t,e,n)):rn(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 Ei(e){return e==null?void 0:`${e}-popup`}function Di(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var Oi=ui;function ki(e,t=!1){let{overflowY:n}=ht(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Ai=Symbol(`none`),ji={value:Ai,index:-1};function Mi(e,t,n){let r=e.get(t);if(r!==void 0||n===nn)return r;for(let[r,i]of e)if(rn(r,t,n))return i}function Ni(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:l,open:u,defaultOpen:d=!1,selectionMode:f,onItemHighlighted:m,name:h,form:g,disabled:v=!1,readOnly:b=!1,required:x=!1,inputRef:S,grid:C=!1,items:T,filteredItems:E,filter:D,filterQuery:ee,openOnInputClick:te=!0,autoHighlight:ne=!1,keepHighlight:re=!1,highlightItemOnHover:ie=!0,loopFocus:oe=!0,itemToStringLabel:le,itemToStringValue:ue,isItemEqualToValue:de=nn,virtualized:fe=!1,inline:pe=!1,fillInputOnItemPress:me=!0,modal:he=!1,limit:ge=-1,autoComplete:xe=`list`,formAutoComplete:Se,locale:Te,submitOnItemClick:Ee=!1}=e,{clearErrors:Oe}=w(),{setDirty:Ae,validityData:Me,setFilled:ze,name:Be,disabled:Ge,setTouched:Ye,setFocused:Xe,validationMode:Qe,validation:$e}=ae(),et=p(),tt=ce({id:t}),at=Oi({locale:Te}),ot=Array.isArray(T)?null:T;if(ot&&typeof ot.label!=`function`)throw Error(He(100));let st=ot?ot.data:T,ct=ot?.value,dt=ct?void 0:st,ft=j.useMemo(()=>{if(!E||!ct)return;let e=Jt(E),t=e.map(ct),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 Mi(n,r,i)}}},[E,ct]),ht=j.useMemo(()=>ot?e=>ot.label(e,de,e=>{let t=ft?.findItem(e,de);return t==null?on(e,le):ot.itemLabel(t)}):le,[ot,le,ft,de]),_t=j.useMemo(()=>ot?Object.assign(e=>ot.itemLabel(e),{selected:e=>on(e,ht)}):le,[ot,ht,le]);function vt(e){return on(e,ht)}let[yt,bt]=j.useState(!1),[xt,St]=j.useState(null),Ct=j.useRef(xt),wt=j.useRef([]),Tt=j.useRef([]),Et=j.useRef(null),Dt=j.useRef(null),Ot=j.useRef(null),kt=j.useRef(null),At=j.useRef(null),jt=j.useRef(!1),Mt=j.useRef(null),Nt=j.useRef(null),Pt=j.useRef(null),Ft=j.useRef(ji),It=j.useRef(null),Lt=j.useRef([]),Rt=j.useRef(null),zt=Ge||v,Bt=Be??h,Vt=f===`multiple`,Ht=f===`single`,Ut=l!==void 0||o!==void 0,Gt=st!==void 0,Yt=E!==void 0,Qt;Qt=ne===`always`?`always`:ne?`input-change`:!1;let[k,en]=s({controlled:i,default:Vt?r??Ne:r,name:`Combobox`,state:`selectedValue`}),tn=j.useMemo(()=>D===null?()=>!0:D===void 0?Di(at,_t):D,[D,at,_t]),an=rt(()=>Ut?o??``:Ht?vt(k):``).current,[sn,cn]=s({controlled:l,default:an,name:`Combobox`,state:`inputValue`}),[ln,un]=s({controlled:u,default:d,name:`Combobox`,state:`open`}),dn=Wt(st),fn=!ln&&xt!==null?xt:String(sn).trim(),pn=Ht?vt(k):``,mn=Ht&&!yt&&fn!==``&&pn.length===fn.length&&at.contains(pn,fn),hn=mn?``:ee??fn,vn=Gt&&Yt&&mn&&(!ot||ot.hasValue(k,de)),bn=j.useMemo(()=>st?Jt(st):Ne,[st]),xn=j.useMemo(()=>{if(E&&!vn)return E;if(!st)return Ne;if(dn){let e=st,t=[],n=0;for(let r of e){if(ge>-1&&n>=ge)break;let e=ge>-1?ge-n:1/0,i=hn===``?r.items.slice(0,e):[];if(hn!==``)for(let t of r.items){if(i.length>=e)break;tn(t,hn,_t)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(hn===``)return ge>-1?bn.slice(0,ge):bn;let e=[];for(let t of bn){if(ge>-1&&e.length>=ge)break;tn(t,hn,_t)&&e.push(t)}return e},[E,vn,st,dn,hn,ge,tn,_t,bn]),Sn=j.useMemo(()=>{if(ft&&xn===E)return ft.values;let e=Jt(xn);return ct?e.map(e=>ct(e)):e},[xn,E,ft,ct]),A=rt(()=>{let e=null;return pe&&ln&&Gt&&f!==`none`&&(e=gn(Sn,k,de,Vt)),new Fe({id:tt,labelId:void 0,selectedValue:k,open:ln,items:dt,selectionMode:f,name:Bt,form:g,disabled:zt,readOnly:b,required:x,grid:C,virtualized:fe,openOnInputClick:te,itemToStringLabel:ht,isItemEqualToValue:de,modal:he,autoHighlight:Qt,submitOnItemClick:Ee,hasInputValue:Ut,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:pe,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:_e,id:tt,selectionMode:f,disabled:zt,readOnly:b,isItemEqualToValue:de},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:f===`none`},{onOpenChangeComplete:Ze,setOpen:Ze,setInputValue:Ze,setSelectedValue:Ze,setIndices:Ze,handleSelection:Ze,forceMount:Ze,requestSubmit:Ze,listRef:wt,labelsRef:Tt,popupRef:Et,emptyRef:At,inputRef:Dt,startDismissRef:Ot,endDismissRef:kt,chipsContainerRef:Mt,clearRef:Nt,valuesRef:Lt,pointerDownItemRef:Rt,selectionEventRef:Pt},Ti)}).current,Cn=f===`none`?sn:k,wn=j.useMemo(()=>f===`none`?Cn:Array.isArray(k)?k.map(e=>Kt(e,ue)):Kt(k,ue),[Cn,ue,f,k]),Tn=ut(m),En=ut(n),Dn=A.useState(`activeIndex`),On=A.useState(`selectedIndex`),kn=A.useState(`positionerElement`),An=A.useState(`listElement`),jn=A.useState(`triggerElement`),Mn=A.useState(`inputElement`),Nn=A.useState(`inputGroupElement`),Pn=A.useState(`inline`),Fn=A.useState(`inputInsidePopup`),In=A.useState(`inputOwnsFormValue`),Ln=Ht&&!Fn&&sn===pn,Rn=ve(jn),{openMethod:zn,triggerProps:Bn}=c(ln),Vn=ut(()=>wn);_(Fn?Rn:Dt,tt,Cn,Vn,!zt,h);let Hn=ut(()=>{st?Tt.current=Sn.map(vt):A.set(`forceMounted`,!0)}),Un=ut((e,t,n,r)=>{if(t===-1){if(Ft.current===ji)return;Ft.current=ji}else Ft.current={value:e,index:t};Tn(e,be(n,r,{index:t}))}),Wn=ut(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?Un(void 0,-1,r,e.event):Un(Lt.current[n],n,r,e.event)}),Gn=ut((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(jt.current=n.reason===Ie,n.reason===`input-change`){ln&&xt!==null&&St(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&bt(!0),It.current={hasQuery:e};let n=A.state.listElement;if(!A.state.virtualized&&n){let e=Et.current;for(let t of we(n.firstElementChild??n)){if(!Ve(t)||(e?!lt(e,t):t.getAttribute(`role`)===`dialog`))break;if(ki(t)){t.scrollTop=0;break}}}e&&Qt&&A.state.activeIndex==null&&(ln||Pn)&&A.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&A.state.inputInsidePopup&&(It.current={hasQuery:!1,selection:!0});cn(t)}}),Kn=ut(e=>{let t=!e&&Fn&&!Pn&&sn!==``&&(String(sn).trim()===xt||sn===pn);!e&&(t||sn===``||Ln)&&bt(!1),St(null),t&&Gn(``,gt(Ie))}),[qn,Jn]=j.useState(!1),Yn=ut((t,n)=>{if(ln===t)return;n.reason===`escape-key`&&Gt&&Sn.length===0&&!At.current&&n.allowPropagation();let r=n,i=je(r);if(e.onOpenChange?.(t,r),It.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(It.current=null),!n.isCanceled&&(t&&xt!==null&&Kn(n.reason===mt),!t&&yt&&(Ht?(Pn||St(fn),fn===``&&bt(!1)):Vt&&(Pn||St(fn),Fn&&Wn({activeIndex:null}),(!Fn||Pn)&&Gn(``,gt(Ie,n.event,void 0,{isItemPress:n.reason===Re})))),t||Jn(i()),un(t),!t&&Fn&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(Ye(!0),Xe(!1),Qe===`onBlur`))){let e=f===`none`?sn:k;$e.commit(e)}}),Xn=ut((e,t)=>{a?.(e,t),t.isCanceled||(en(e),(f===`none`&&Et.current&&me||Ht&&!A.state.inputInsidePopup)&&Gn(vt(e),gt(t.reason,t.event)))}),Zn=ut((e,t)=>{let n=Je(e),r=Pt.current??e;Pt.current=null;let i=gt(Re,r),a=it(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Yn(!1,i);else if(Vt){let e=Array.isArray(k)?k:[],n=Xt(e,t,de),r=n?$t(e,t,de):[...e,t];if(Xn(r,i),i.isCanceled||!(Dt.current&&Dt.current.value.trim()!==``))return;if(A.state.inputInsidePopup){Gn(``,gt(Ie,i.event,void 0,{isItemPress:!0}));let e=It.current;e&&!n&&(e.toggledValue=t)}else Yn(!1,i)}else{if(Xn(t,i),i.isCanceled)return;Yn(!1,i)}}),Qn=ut(()=>{let e=$e.inputRef.current?.form??A.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),$n=ut(()=>{if(En?.(!1),bt(!1),St(null),Wn(f===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Vt&&Dt.current&&Dt.current.value!==``&&!jt.current&&Gn(``,gt(Ie)),Ht){if(A.state.inputInsidePopup)Dt.current&&Dt.current.value!==``&&Gn(``,gt(Ie));else{let e=vt(k);Dt.current&&Dt.current.value!==e&&Gn(e,gt(e===``?Ie:nt))}}}),tr=j.useMemo(()=>Pn&&kn?{current:it(kn,`[role="dialog"]`)}:Et,[Pn,kn]),{mounted:nr,transitionStatus:rr,forceUnmount:ir}=Pe({open:ln,ref:tr,preventUnmountOnClose:qn,setPreventUnmountOnClose:Jn,onUnmount:$n});j.useImperativeHandle(e.actionsRef,()=>({unmount:ir,close:()=>Yn(!1,gt(Ke))}),[ir,Yn]),We(function(){let e=Ct.current!==null&&xt===null;if(Ct.current=xt,ln&&(!e||!Gt)||(ln||(Rt.current=null),f===`none`))return;let t=Gt?Sn:Lt.current;Wn({selectedIndex:gn(t,k,de,Vt)})},[ln,xt,k,f,Vt,Gt,Sn,de,Wn]),We(()=>{st&&(Lt.current=Sn,wt.current.length=Sn.length)},[st,Sn]),We(()=>{!ln&&It.current?.hasQuery&&(It.current=null)},[ln]),We(()=>{if(!ln&&Pn&&tr.current){It.current=null;return}let e=Gt||Yt?Sn:Lt.current,t=It.current;if(t){let n=ln||Pn||A.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Dt.current;!Qt||String(sn).trim()===``||Pn&&Qt!==`always`&&(!t||qe(t.ownerDocument)!==t)?It.current=null:n&&(e[0]!==void 0||!Gt&&!Yt)&&(A.set(`activeIndex`,0),It.current=null)}else if(String(sn).trim()===``&&(It.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)||Dt.current&&Dt.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||Yt?Sn:Lt.current,i=Zt(e,t.toggledValue,A.state.isItemEqualToValue);A.set(`activeIndex`,i===-1?gn(e,n,A.state.isItemEqualToValue,r):i)}else e?A.set(`activeIndex`,null):Qt===`always`&&A.set(`activeIndex`,0)})}}if(!ln&&!Pn)return;let n=A.state.activeIndex;if(n==null){if(Qt===`always`&&e.length>0){A.set(`activeIndex`,0);return}Un(void 0,-1,nt);return}if(n>=e.length){Un(void 0,-1,nt),A.set(`activeIndex`,null);return}let r=e[n],i=Ft.current.value,a=i!==Ai&&rn(r,i,A.state.isItemEqualToValue);Ft.current.index===n&&a||Un(r,n,nt)},[Dn,Qt,Un,Yt,Gt,Sn,Pn,ln,tr,A,sn]),We(()=>{ze(f===`none`?String(sn)!==``:Vt?Array.isArray(k)&&k.length>0:k!=null)},[ze,f,sn,k,Vt]),j.useEffect(()=>{Gt&&Qt&&Sn.length===0&&Wn({activeIndex:null})},[Gt,Qt,Sn.length,Wn]);function ar(){ln&&fn!==``&&fn!==String(an)&&!Ln&&bt(!0)}function or(){ln&&xt!==null&&Kn(!1)}let sr=!1;function cr(){!sr&&sn!==pn&&(sr=!0,Gn(pn,gt(nt)))}function lr(){f!==`none`&&(Oe(Bt),Ae(yn(k,Me.initialValue,de)),$e.change(k),Ht&&!Ut&&!Fn&&cr())}function ur(){Ht&&!Ut&&!Fn&&!yt&&cr()}function dr(){f===`none`&&(Oe(Bt),Ae(sn!==Me.initialValue),$e.change(sn))}y(fn,ar),y(ln,or),y(k,lr),y(pn,ur),y(st,ur),y(sn,dr);let fr=qt({open:Pn?!0:ln,onOpenChange:Yn,elements:{reference:Fn?jn:Mn,floating:kn}}),pr=C?`grid`:`listbox`,mr=ln||Pn,hr=mr?`true`:`false`,gr=j.useMemo(()=>{let e=Mn?.tagName===`INPUT`,t=Mn==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?An?.id:void 0,r[`aria-autocomplete`]=b?`none`:xe),{reference:r,floating:{role:`presentation`}}},[Mn,mr,hr,pr,An?.id,xe,b]),_r=se(fr,{enabled:!zt&&te,event:`mousedown-only`,toggle:!1,touchOpenDelay:Fn?0:100,reason:pt}),vr=ye(fr,{enabled:!zt&&!Pn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Pn?!0:void 0,outsidePress(e){let t=Je(e);return!lt(jn,t)&&!lt(Nt.current,t)&&!lt(Mt.current,t)&&!lt(Nn,t)}}),yr=O(fr,{enabled:!zt,id:tt,listRef:wt,activeIndex:Dn,selectedIndex:On,virtual:!0,loopFocus:oe,allowEscape:oe&&!Qt,focusItemOnOpen:yt||f===`none`&&!Qt?!1:`auto`,focusItemOnHover:ie,resetOnPointerLeave:!re,orientation:C?`horizontal`:void 0,rtl:et===`rtl`,disabledIndices:Ne,grid:C?mi:void 0,onNavigate(e,t){(t||ln||Pn&&e===null)&&rr!==`ending`&&Wn({activeIndex:e,type:er(t),event:t?.nativeEvent})}}),br=j.useMemo(()=>ke(yr.reference,{onKeyDown(e){C&&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,C,A]),xr=j.useMemo(()=>ke(Le,vr.floating),[vr.floating]),Sr=j.useMemo(()=>ke(yr.floating,gr.floating),[yr.floating,gr.floating]),Cr=j.useMemo(()=>{let e=yr.item;return{props:e?{...e,onFocus:void 0}:_e,id:tt,selectionMode:f,disabled:zt,readOnly:b,isItemEqualToValue:de}},[yr.item,tt,f,zt,b,de]);A.useContextCallback(`setOpen`,Yn),A.useContextCallback(`setInputValue`,Gn),A.useContextCallback(`setSelectedValue`,Xn),A.useContextCallback(`setIndices`,Wn),A.useContextCallback(`handleSelection`,Zn),A.useContextCallback(`forceMount`,Hn),A.useContextCallback(`requestSubmit`,Qn),A.useContextCallback(`onOpenChangeComplete`,n),_n(()=>{A.update({inline:pe,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Bn,itemRoot:Cr})});let wr={id:tt,selectedValue:k,open:ln,mounted:nr,transitionStatus:rr,items:dt,inline:pe,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Bn,itemRoot:Cr,openMethod:zn,selectionMode:f,name:Bt,form:g,disabled:zt,readOnly:b,required:x,grid:C,virtualized:fe,openOnInputClick:te,itemToStringLabel:ht,modal:he,autoHighlight:Qt,isItemEqualToValue:de,submitOnItemClick:Ee,hasInputValue:Ut};We(()=>{A.update({...wr,inputOwnsFormValue:f===`none`&&(pe||!A.state.inputInsidePopup)})},[A,...Object.values(wr)]);let Tr=Ue(S,$e.inputRef),Er=j.useMemo(()=>({query:fn,hasItems:Gt,filteredItems:xn,flatFilteredValues:Sn}),[fn,Gt,xn,Sn]),Dr=j.useMemo(()=>Array.isArray(Cn)?``:Kt(Cn,ue),[Cn,ue]),Or=Vt&&Array.isArray(k)&&k.length>0,kr=Vt||f===`none`&&In?void 0:Bt,Ar=j.useMemo(()=>!Vt||!Array.isArray(k)||!Bt?null:k.map(e=>{let t=Kt(e,ue);return(0,M.jsx)(`input`,{type:`hidden`,form:g,name:Bt,value:t,disabled:zt},t)}),[Vt,k,g,Bt,ue,zt]),jr=(0,M.jsxs)(j.Fragment,{children:[e.children,(0,M.jsx)(`input`,{...$e.getValidationProps(zt,{onFocus(){Fn?jn?.focus():(Dt.current||jn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||zt||b)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=gt(nt,e.nativeEvent),i=()=>Lt.current.findIndex(e=>Kt(e,ue).toLowerCase()===n||vt(e).toLowerCase()===n);function a(){if(Vt)return;if(f===`none`){Gn(t,r);return}let e=i();e===-1&&(e=Lt.current.findIndex((e,t)=>{let r=Tt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Lt.current[e];a!=null&&Xn?.(a,r)}Ht&&(Hn(),st&&i()===-1&&A.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:tt&&kr==null?`${tt}-hidden-input`:void 0,form:g,name:kr,autoComplete:Se,disabled:zt,required:x&&!Or,readOnly:b,value:Dr,ref:Tr,style:kr?De:Ce,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ar]});return(0,M.jsx)(hi.Provider,{value:A,children:(0,M.jsx)(gi.Provider,{value:fr,children:(0,M.jsx)(vi.Provider,{value:Gt,children:(0,M.jsx)(_i.Provider,{value:Er,children:(0,M.jsx)(yi.Provider,{value:sn,children:jr})})})})})}var Pi=`data-popup-side`,Fi=`data-list-empty`,Ii={...st,...T,popupSide:e=>e?{[Pi]:e}:null,listEmpty:e=>e?{[Fi]:``}:null};function Li(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function Ri(){return Si().filteredItems.length===0}function zi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Bi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Vi=j.createContext(void 0);function Hi(){return j.useContext(Vi)}var Ui=j.createContext(void 0);function Wi(e){let t=j.useContext(Ui);if(t===void 0&&!e)throw Error(He(21));return t}var Gi=j.forwardRef(function(e,t){let n=bi(),{buttonRef:r,getButtonProps:i}=Me({native:!1}),a=Ue(t,r);function o(e){n.context.setOpen(!1,gt(Xe,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,M.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:De})}),Ki=j.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:m}=ae(),{labelId:h}=S(),g=Hi(),_=!!Wi(!0),v=bi(),y=Ci(),b=p(),x=v.useState(`required`),C=v.useState(`disabled`),w=v.useState(`readOnly`),T=v.useState(`name`),E=v.useState(`form`),O=v.useState(`selectionMode`),ee=v.useState(`autoHighlight`),te=v.useState(`inputProps`),ne=v.useState(`triggerProps`),re=v.useState(`open`),ie=v.useState(`mounted`),oe=v.useState(`selectedValue`),se=v.useState(`id`),ce=v.useState(`inline`),de=v.useState(`modal`),fe=!!ee,pe=Li(v),me=u||C||i,he=Ri(),ge=o(me,v.context.inputRef),_e=_||ce,ve=!_e||de,ye=Be(a??(_e?void 0:se)),be=_?le:l,[xe,Se]=j.useState(null),Ce=j.useRef(!1),we=j.useRef(null);We(()=>{re||(we.current=null)},[re]);let Ee=O===`none`&&!_,De=ut(e=>{let t=_||v.state.inline;t&&!v.state.hasInputValue&&v.context.setInputValue(``,gt(nt)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:Ee})}),Oe=_?c:m.getValidationProps(me,c);function ke(e){v.context.setIndices({activeIndex:null,selectedIndex:null,type:er(e),event:e})}let Ae={...be,open:re,disabled:me,readOnly:w,popupSide:pe,listEmpty:he};function je(e){if(!g)return;let t,n=g.chipsRef.current.length,[r]=zi(b);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&oe.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let Me=Te(`input`,e,{state:Ae,ref:[t,v.context.inputRef,De],props:[te,ne,{value:xe??y,"aria-readonly":w||void 0,"aria-required":x||void 0,"aria-labelledby":h,disabled:me,readOnly:w,required:O===`none`?x:void 0,form:E,...Ee&&T&&{name:T},id:ye,onFocus(){if(ge(!0),!ce)return;let e=we.current;we.current=null,e!=null&&Object.hasOwn(v.context.valuesRef.current,e)&&v.context.setIndices({activeIndex:e})},onBlur(){d(!0),ge(!1);let e=v.state.activeIndex;if(ce&&e!==null&&ee!==`always`&&(we.current=e,v.context.setIndices({activeIndex:null})),f===`onBlur`){let e=O===`none`?y:oe;m.commit(e)}},onCompositionStart(e){Ge||(Ce.current=!0,Se(e.currentTarget.value))},onCompositionEnd(e){Ce.current=!1;let t=e.currentTarget.value;Se(null),v.context.setInputValue(t,gt(mt,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=Ce.current||!r;function a(e){!w&&!me&&e&&i&&(v.context.setOpen(!0,gt(mt,t)),fe||ke(t))}if(Ce.current){let n=e.currentTarget.value;Se(n),n===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.context.setOpen(!1,gt(Ie,t));let r=n.trim(),i=fe&&r!==``;a(r),re&&v.state.activeIndex!==null&&!i&&ke(t);return}let o=gt(mt,t);if(v.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=gt(Ie,t);s&&!v.state.inputInsidePopup&&(O===`single`&&v.context.setSelectedValue(null,c),v.state.openOnInputClick||v.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),re&&v.state.activeIndex!==null&&!fe&&ke(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(me||w){w&&e.key===`Enter`&&re&&v.state.activeIndex!==null&&Qe(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){Qe(e);let n=$e&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Qe(e);let i=$e&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!ie&&e.key===`Escape`){let t=O===`multiple`&&Array.isArray(oe)?oe.length===0:oe===null,n=gt(et,e.nativeEvent),r=O===`multiple`?[]:null;v.context.setInputValue(``,n),v.context.setSelectedValue(r,n),t||v.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&Array.isArray(oe)&&oe.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:oe.length-1,r=oe.filter((e,t)=>t!==n);ke(e.nativeEvent),v.context.setSelectedValue(r,gt(nt,e.nativeEvent));return}let i=je(e);if(i!==void 0&&g?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&re){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(ce)return;v.context.setOpen(!1,gt(nt,n));return}Qe(e),Bi(v,t,n)}}},Oe],stateAttributesMapping:Ii}),Ne=_?(0,M.jsx)(ue.Provider,{value:D,children:Me}):Me;return(0,M.jsxs)(j.Fragment,{children:[re&&ve&&(0,M.jsx)(Gi,{ref:v.context.startDismissRef}),Ne]})}),qi=j.createContext(null);function Ji(){return j.useContext(qi)}function Yi(e){let{children:t}=e,{filteredItems:n}=Si(),r=Ji(),i=r?r.items:n;return(0,M.jsx)(j.Fragment,{children:i.map(t)})}var Xi=j.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=bi(),l=xi(),u=!!Wi(!0),{filteredItems:d,hasItems:f}=Si(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,b=d.length===0,x=ut(e=>{c.set(`positionerElement`,e)}),S=ut(e=>{c.set(`listElement`,e)}),C=j.useMemo(()=>typeof o==`function`?n||=(0,M.jsx)(Yi,{children:o}):o,[o]),w={empty:b},T=l.useState(`floatingId`),E=Te(`div`,e,{state:w,ref:[t,S,u?null:x],props:[g,{children:C,tabIndex:-1,id:T,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Qe(e),Bi(c,t,e.nativeEvent)}}},s]});if(_)return E;let D=f&&!v?void 0:c.context.labelsRef;return(0,M.jsx)(re,{elementsRef:c.context.listRef,labelsRef:D,children:E})}),Zi=j.createContext(void 0);function Qi(){let e=j.useContext(Zi);if(e===void 0)throw Error(He(20));return e}var $i=j.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=bi(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,M.jsx)(Zi.Provider,{value:n,children:(0,M.jsx)(Oe,{ref:t,...r})}):null}),ea=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:f,arrowPadding:p,sticky:h,disableAnchorTracking:g=!1,collisionAvoidance:_=ge,style:v,...y}=e,b=bi(),x=xi(),S=Qi(),C=b.useState(`modal`),w=b.useState(`open`),T=b.useState(`mounted`),E=b.useState(`openMethod`),D=b.useState(`positionerElement`),O=b.useState(`triggerElement`),ee=b.useState(`inputElement`),te=b.useState(`inputGroupElement`),ne=b.useState(`inputInsidePopup`),re=b.useState(`transitionStatus`),ie=Ri(),ae=me({anchor:i??(ne?O:te??ee),floatingRootContext:x,positionMethod:a,mounted:T,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:p,collisionBoundary:u,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:_,lazyFlip:!0});d(w&&C,E===`touch`,D,O);let oe={open:w,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,empty:ie};We(()=>{b.set(`popupSide`,ae.side)},[b,ae.side]);let se=ut(e=>{b.set(`positionerElement`,e)}),ce=m(e,oe,{styles:ae.positionerStyles,transitionStatus:re,props:y,refs:[t,se],hidden:!T,inert:!w});return(0,M.jsxs)(Ui.Provider,{value:ae,children:[T&&C&&(0,M.jsx)(tt,{inert:dt(!w),cutout:te??ee??O}),ce]})}),ta={...Ee,...ct},na=j.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=bi(),l=Wi(),u=xi(),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`),y=c.useState(`modal`),b=c.useState(`id`),x=Ri(),S=s.id??(g?Ei(b):void 0);We(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),xe({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},w=Te(`div`,e,{state:C,ref:[t,c.context.popupRef],props:[m,{id:S,role:g?`dialog`:`presentation`,onFocus(e){let t=Je(e.nativeEvent);p!==`touch`&&(lt(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},v(h),s],stateAttributesMapping:ta}),T=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,E;E=o??(g?void 0:!1);let D=!g||y;return(0,M.jsx)(ze,{context:u,disabled:!d,modal:D,openInteractionType:p,initialFocus:T,returnFocus:E,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,M.jsxs)(j.Fragment,{children:[w,D&&(0,M.jsx)(Gi,{ref:c.context.endDismissRef})]})})}),ra=j.createContext(void 0),ia=j.createContext(!1);function aa(){return j.useContext(ia)}function oa(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,...f}=t,p=j.useRef(null),m=h({guess:!0,index:l,textRef:p}),g=bi(),_=aa(),v=wi(),{props:y,id:b,selectionMode:x,disabled:S,readOnly:C,isItemEqualToValue:w}=g.useState(`itemRoot`),T=S||u,E=x!==`none`,D=l??i??m.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;We(()=>{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]),We(()=>{if(!O||v)return;let e=g.context.valuesRef.current;return e[D]=c,()=>{delete e[D]}},[O,v,D,c,g]),We(()=>{if(!O||v)return;let e=g.state.selectedValue,t=g.state.selectedIndex;g.state.selectionMode===`multiple`&&Array.isArray(e)?t=vn(D,c,g.context.valuesRef.current,e,w,t):rn(c,e,w)&&(t=D),g.set(`selectedIndex`,t)},[O,v,g,D,c,w]);let{getButtonProps:ae,buttonRef:oe}=Me({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?(ci.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=Te(`div`,t,{ref:[oe,n,m.ref,ne],state:se,props:[y,le,f,ae]}),de=j.useMemo(()=>({selected:ie,textRef:p}),[ie,p]);return(0,M.jsx)(ra.Provider,{value:de,children:ue})}function sa(e){let{componentProps:t,forwardedRef:n}=e,r=bi().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Si(),a=t.value??null,o=Zt(i,a,r);return(0,M.jsx)(oa,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var ca=j.memo(j.forwardRef(function(e,t){let n=bi().useState(`virtualized`);return n&&e.index==null?(0,M.jsx)(sa,{componentProps:e,forwardedRef:t}):(0,M.jsx)(oa,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),la=j.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Si(),c=bi(),l=pi(),u=s.length===0?a:null;return Te(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),ua=t(),da=(0,j.createContext)(null);function fa(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function pa(){let e=(0,j.useContext)(da);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 ma(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 ma(e,...t)}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);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 ga(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var _a=ga();function va(){return _a&&`documentMode`in document?document.documentMode:null}var ya=va();function ba(e){return _a&&e.test(navigator.platform)}function xa(e){return _a&&e.test(navigator.userAgent)}var Sa=ba(/Mac|iPod|iPhone|iPad/),Ca=xa(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function wa(){return!(!_a||!(`InputEvent`in window)||ya)&&`getTargetRanges`in new window.InputEvent(`input`)}var Ta=wa();function Ea(){return _a&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Da=Ea(),Oa=xa(/Android/),ka=xa(/Version\/[\d.]+.*Safari/)&&!Oa,Aa=xa(/^(?=.*Chrome).*/i),ja=_a&&Oa&&Aa,Ma=xa(/AppleWebKit\/[\d.]+/)&&Sa&&!Aa;function Na(){return 2047}var Pa=Na(),Fa=ka||Da||Ma?`\xA0`:``,Ia=`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,T as n,k as r}from"./route-McOpomU2.js";import{t as i}from"./react-DlmbjZJV.js";import{$ as a,$t as o,Ar as s,Cn as c,Cr as l,Dr as u,En as d,Er as f,Gn as p,Ln as m,Or as h,Q as g,Qt as _,Rn as v,Tn as y,Tr as b,X as x,Xt as S,Z as C,Zt as w,an as T,dr as E,en as D,er as O,et as ee,gr as te,hr as ne,kr as re,mr as ie,nn as ae,nt as oe,or as se,qt as ce,rn as le,tn as ue,tt as de,wr as fe,yr as pe,zn as me}from"./url-BO9cF4cS.js";import{t as he}from"./jsx-runtime-LKYXHABd.js";import{$ as ge,$r as _e,An as ve,B as ye,Br as be,Dn as xe,En as Se,Ft as Ce,Gn as we,Gr as Te,Gt as Ee,It as De,J as Oe,Kr as ke,Mn as Ae,O as je,Pn as Me,Qr as Ne,R as Pe,S as Fe,Sr as Ie,T as Le,Tr as Re,V as ze,Vr as Be,Xn as Ve,Xr as He,Yr as Ue,Zr as We,_n as Ge,_r as Ke,an as qe,cn as Je,ct as Ye,dr as Xe,ei as Ze,fn as Qe,hn as $e,hr as et,i as tt,kr as nt,ni as rt,on as it,or as at,pt as ot,qt as st,rr as ct,sn as lt,ti as ut,v as dt,vn as ft,wr as pt,xr as mt,zn as ht,zr as gt}from"./useLayerZIndex-DzJy6vhi.js";import{Dt as _t}from"./MotionConfigContext-HC2vqcJO.js";import{A as vt,C as yt,D as bt,E as xt,M as St,N as Ct,P as wt,S as Tt,T as Et,_ as Dt,b as Ot,c as kt,d as At,j as jt,k as Mt,l as Nt,s as Pt,u as Ft,v as It,w as Lt}from"./Popover-cB2rLdue.js";import{t as Rt}from"./chevron-right-xNdXLJg6.js";import{i as zt,n as Bt,r as Vt,t as Ht}from"./stringifyLocale-D0juOOnH.js";import{t as Ut}from"./code-DnmQyGiF.js";import{A as Wt,F as Gt,M as Kt,N as qt,O as Jt,P as Yt,S as Xt,_ as Zt,a as Qt,b as $t,c as k,d as en,f as tn,g as nn,h as rn,i as an,j as on,k as sn,m as cn,n as ln,o as un,p as dn,r as fn,s as pn,t as mn,u as hn,v as gn,w as _n,x as vn,y as yn}from"./SelectScrollUpArrow-DuDh2HJ_.js";import{i as bn,n as xn,r as Sn,t as A}from"./zoom-out-DsmGFv1v.js";import{a as Cn,c as wn,i as Tn,n as En,o as Dn,r as On,s as kn,t as An}from"./text-align-start-CRhecbJR.js";import{a as jn,i as Mn,n as Nn,t as Pn}from"./ruler-CYb0HZGT.js";import{t as Fn}from"./maximize-2-Bc0lXBg6.js";import{t as In}from"./mouse-pointer-2-B-OF_fcG.js";import{n as Ln,r as Rn,t as zn}from"./undo-2-B-JiyKIl.js";import{t as Bn}from"./plus-DZJ2BVkK.js";import{C as Vn,_ as Hn,a as Un,b as Wn,c as Gn,d as Kn,f as qn,g as Jn,h as Yn,i as Xn,l as Zn,m as Qn,n as $n,o as er,p as tr,r as nr,s as rr,t as ir,u as ar,v as or,y as sr}from"./MenuSubmenuTrigger-C3Y6EJ1a.js";var cr={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`}]]};cr.node;var lr=_t(cr),ur={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`}]]};ur.node;var dr=_t(ur),fr={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`}]]};fr.node;var pr=_t(fr),mr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};mr.node;var hr=_t(mr),gr={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`}]]};gr.node;var _r=_t(gr),vr={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`}]]};vr.node;var yr=_t(vr),br={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`}]]};br.node;var xr=_t(br),Sr={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`}]]};Sr.node;var Cr=_t(Sr),wr={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`}]]};wr.node;var Tr=_t(wr),Er={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`]};Er.node;var Dr=_t(Er),Or={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`}]]};Or.node;var kr=_t(Or),Ar={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Ar.node;var jr=_t(Ar),Mr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Mr.node;var Nr=_t(Mr),Pr={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`}]]};Pr.node;var Fr=_t(Pr),Ir={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`}]]};Ir.node;var Lr=_t(Ir),Rr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};Rr.node;var zr=_t(Rr),Br={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`}]]};Br.node;var Vr=_t(Br),Hr={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`}]]};Hr.node;var Ur=_t(Hr),Wr={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`}]]};Wr.node;var Gr=_t(Wr),Kr={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`}]]};Kr.node;var qr=_t(Kr),Jr={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`}]]};Jr.node;var Yr=_t(Jr),j=e(i(),1),M=he(),Xr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=j.useMemo(()=>({open:t,close:n}),[t,n]);return(0,M.jsx)(yt.Provider,{value:t,children:(0,M.jsx)(bt,{delay:i,timeoutMs:r,children:e.children})})},Zr=class extends xt{constructor(){super(Et(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function Qr(){return new Zr}var $r=j.createContext(void 0);function ei(){let e=j.useContext($r);if(e===void 0)throw Error(He(34));return e}var ti=j.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:c=!1,style:l,"aria-labelledby":u,...d}=e,[f,p]=j.useState(void 0),[m,h]=s({controlled:i,default:a,name:`MenuRadioGroup`}),g=ut((e,t)=>{o?.(e,t),t.isCanceled||h(e)}),_=Te(`div`,e,{state:{disabled:c},ref:t,props:{role:`group`,"aria-labelledby":u??f,"aria-disabled":c||void 0,...d}}),v=j.useMemo(()=>({value:m,setValue:g,disabled:c}),[m,g,c]);return(0,M.jsx)(tr.Provider,{value:p,children:(0,M.jsx)($r.Provider,{value:v,children:_})})}),ni=j.memo(j.forwardRef(function(e,t){let n=sr()?.RadioGroup??ti;return(0,M.jsx)(n,{...e,ref:t})})),ri=j.createContext(void 0);function ii(){let e=j.useContext(ri);if(e===void 0)throw Error(He(35));return e}var ai=j.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,{store:f}=Vn(),{value:p,setValue:m,disabled:g}=ei(),_=h({guess:!0,label:a}),v=Be(i),y=f.useState(`isActive`,_.index),b=f.useState(`floatingNodeId`),x=f.useState(`itemProps`),S=f.useState(`disabled`),C=s||g||S,w=p===l,{getItemProps:T,itemRef:E}=or({closeOnClick:c,disabled:C,highlighted:y,id:v,store:f,nativeButton:o,nodeId:b,itemMetadata:Hn}),D=j.useMemo(()=>({disabled:C,highlighted:y,checked:w}),[C,y,w]);function O(e){let t=gt(Re,e.nativeEvent,void 0,{preventUnmountOnClose:Ze});m(l,t)}let ee=Te(`div`,e,{state:D,stateAttributesMapping:Jn,props:[x,{role:`menuitemradio`,"aria-checked":w,onClick:O},d,T],ref:[E,t,_.ref]});return(0,M.jsx)(ri.Provider,{value:D,children:ee})}),oi=j.forwardRef(function(e,t){let n=Wn(e,t);return n.visible?(0,M.jsx)(ai,{...e,ref:n.ref}):null}),si=j.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ii(),c=j.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=at(s.checked);xe({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 Te(`span`,e,{state:f,stateAttributesMapping:Jn,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),ci=e(r(),1),li=new Map;function ui(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${Ht(t)}|${JSON.stringify(r)}`,a=li.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=on(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=on(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=on(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return li.set(i,s),s}var di=``;function fi(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 pi(e=!0){let t=Ae(),n=j.useRef(null);return j.useEffect(()=>{if(!e||ft)return;let r=n.current;if(r==null)return;let i=fi(r);if(i==null)return;let a=i.data,o=`${a}${di}`;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 mi(e,t,n,r,i,a,o,s,c,l=2){let u=Ye(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 ot(n.current,u)?void 0:u}var hi=j.createContext(void 0),gi=j.createContext(void 0),_i=j.createContext(void 0),vi=j.createContext(!1),yi=j.createContext(``);function bi(){let e=j.useContext(hi);if(!e)throw Error(He(22));return e}function xi(){let e=j.useContext(gi);if(!e)throw Error(He(23));return e}function Si(){let e=j.useContext(_i);if(!e)throw Error(He(24));return e}function Ci(){return j.useContext(yi)}function wi(){return j.useContext(vi)}var Ti={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?sn(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=>rn(t,e,n)):rn(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 Ei(e){return e==null?void 0:`${e}-popup`}function Di(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var Oi=ui;function ki(e,t=!1){let{overflowY:n}=ht(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Ai=Symbol(`none`),ji={value:Ai,index:-1};function Mi(e,t,n){let r=e.get(t);if(r!==void 0||n===nn)return r;for(let[r,i]of e)if(rn(r,t,n))return i}function Ni(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:l,open:u,defaultOpen:d=!1,selectionMode:f,onItemHighlighted:m,name:h,form:g,disabled:v=!1,readOnly:b=!1,required:x=!1,inputRef:S,grid:C=!1,items:T,filteredItems:E,filter:D,filterQuery:ee,openOnInputClick:te=!0,autoHighlight:ne=!1,keepHighlight:re=!1,highlightItemOnHover:ie=!0,loopFocus:oe=!0,itemToStringLabel:le,itemToStringValue:ue,isItemEqualToValue:de=nn,virtualized:fe=!1,inline:pe=!1,fillInputOnItemPress:me=!0,modal:he=!1,limit:ge=-1,autoComplete:xe=`list`,formAutoComplete:Se,locale:Te,submitOnItemClick:Ee=!1}=e,{clearErrors:Oe}=w(),{setDirty:Ae,validityData:Me,setFilled:ze,name:Be,disabled:Ge,setTouched:Ye,setFocused:Xe,validationMode:Qe,validation:$e}=ae(),et=p(),tt=ce({id:t}),at=Oi({locale:Te}),ot=Array.isArray(T)?null:T;if(ot&&typeof ot.label!=`function`)throw Error(He(100));let st=ot?ot.data:T,ct=ot?.value,dt=ct?void 0:st,ft=j.useMemo(()=>{if(!E||!ct)return;let e=Jt(E),t=e.map(ct),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 Mi(n,r,i)}}},[E,ct]),ht=j.useMemo(()=>ot?e=>ot.label(e,de,e=>{let t=ft?.findItem(e,de);return t==null?on(e,le):ot.itemLabel(t)}):le,[ot,le,ft,de]),_t=j.useMemo(()=>ot?Object.assign(e=>ot.itemLabel(e),{selected:e=>on(e,ht)}):le,[ot,ht,le]);function vt(e){return on(e,ht)}let[yt,bt]=j.useState(!1),[xt,St]=j.useState(null),Ct=j.useRef(xt),wt=j.useRef([]),Tt=j.useRef([]),Et=j.useRef(null),Dt=j.useRef(null),Ot=j.useRef(null),kt=j.useRef(null),At=j.useRef(null),jt=j.useRef(!1),Mt=j.useRef(null),Nt=j.useRef(null),Pt=j.useRef(null),Ft=j.useRef(ji),It=j.useRef(null),Lt=j.useRef([]),Rt=j.useRef(null),zt=Ge||v,Bt=Be??h,Vt=f===`multiple`,Ht=f===`single`,Ut=l!==void 0||o!==void 0,Gt=st!==void 0,Yt=E!==void 0,Qt;Qt=ne===`always`?`always`:ne?`input-change`:!1;let[k,en]=s({controlled:i,default:Vt?r??Ne:r,name:`Combobox`,state:`selectedValue`}),tn=j.useMemo(()=>D===null?()=>!0:D===void 0?Di(at,_t):D,[D,at,_t]),an=rt(()=>Ut?o??``:Ht?vt(k):``).current,[sn,cn]=s({controlled:l,default:an,name:`Combobox`,state:`inputValue`}),[ln,un]=s({controlled:u,default:d,name:`Combobox`,state:`open`}),dn=Wt(st),fn=!ln&&xt!==null?xt:String(sn).trim(),pn=Ht?vt(k):``,mn=Ht&&!yt&&fn!==``&&pn.length===fn.length&&at.contains(pn,fn),hn=mn?``:ee??fn,vn=Gt&&Yt&&mn&&(!ot||ot.hasValue(k,de)),bn=j.useMemo(()=>st?Jt(st):Ne,[st]),xn=j.useMemo(()=>{if(E&&!vn)return E;if(!st)return Ne;if(dn){let e=st,t=[],n=0;for(let r of e){if(ge>-1&&n>=ge)break;let e=ge>-1?ge-n:1/0,i=hn===``?r.items.slice(0,e):[];if(hn!==``)for(let t of r.items){if(i.length>=e)break;tn(t,hn,_t)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(hn===``)return ge>-1?bn.slice(0,ge):bn;let e=[];for(let t of bn){if(ge>-1&&e.length>=ge)break;tn(t,hn,_t)&&e.push(t)}return e},[E,vn,st,dn,hn,ge,tn,_t,bn]),Sn=j.useMemo(()=>{if(ft&&xn===E)return ft.values;let e=Jt(xn);return ct?e.map(e=>ct(e)):e},[xn,E,ft,ct]),A=rt(()=>{let e=null;return pe&&ln&&Gt&&f!==`none`&&(e=gn(Sn,k,de,Vt)),new Fe({id:tt,labelId:void 0,selectedValue:k,open:ln,items:dt,selectionMode:f,name:Bt,form:g,disabled:zt,readOnly:b,required:x,grid:C,virtualized:fe,openOnInputClick:te,itemToStringLabel:ht,isItemEqualToValue:de,modal:he,autoHighlight:Qt,submitOnItemClick:Ee,hasInputValue:Ut,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:pe,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:_e,id:tt,selectionMode:f,disabled:zt,readOnly:b,isItemEqualToValue:de},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:f===`none`},{onOpenChangeComplete:Ze,setOpen:Ze,setInputValue:Ze,setSelectedValue:Ze,setIndices:Ze,handleSelection:Ze,forceMount:Ze,requestSubmit:Ze,listRef:wt,labelsRef:Tt,popupRef:Et,emptyRef:At,inputRef:Dt,startDismissRef:Ot,endDismissRef:kt,chipsContainerRef:Mt,clearRef:Nt,valuesRef:Lt,pointerDownItemRef:Rt,selectionEventRef:Pt},Ti)}).current,Cn=f===`none`?sn:k,wn=j.useMemo(()=>f===`none`?Cn:Array.isArray(k)?k.map(e=>Kt(e,ue)):Kt(k,ue),[Cn,ue,f,k]),Tn=ut(m),En=ut(n),Dn=A.useState(`activeIndex`),On=A.useState(`selectedIndex`),kn=A.useState(`positionerElement`),An=A.useState(`listElement`),jn=A.useState(`triggerElement`),Mn=A.useState(`inputElement`),Nn=A.useState(`inputGroupElement`),Pn=A.useState(`inline`),Fn=A.useState(`inputInsidePopup`),In=A.useState(`inputOwnsFormValue`),Ln=Ht&&!Fn&&sn===pn,Rn=ve(jn),{openMethod:zn,triggerProps:Bn}=c(ln),Vn=ut(()=>wn);_(Fn?Rn:Dt,tt,Cn,Vn,!zt,h);let Hn=ut(()=>{st?Tt.current=Sn.map(vt):A.set(`forceMounted`,!0)}),Un=ut((e,t,n,r)=>{if(t===-1){if(Ft.current===ji)return;Ft.current=ji}else Ft.current={value:e,index:t};Tn(e,be(n,r,{index:t}))}),Wn=ut(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?Un(void 0,-1,r,e.event):Un(Lt.current[n],n,r,e.event)}),Gn=ut((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(jt.current=n.reason===Ie,n.reason===`input-change`){ln&&xt!==null&&St(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&bt(!0),It.current={hasQuery:e};let n=A.state.listElement;if(!A.state.virtualized&&n){let e=Et.current;for(let t of we(n.firstElementChild??n)){if(!Ve(t)||(e?!lt(e,t):t.getAttribute(`role`)===`dialog`))break;if(ki(t)){t.scrollTop=0;break}}}e&&Qt&&A.state.activeIndex==null&&(ln||Pn)&&A.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&A.state.inputInsidePopup&&(It.current={hasQuery:!1,selection:!0});cn(t)}}),Kn=ut(e=>{let t=!e&&Fn&&!Pn&&sn!==``&&(String(sn).trim()===xt||sn===pn);!e&&(t||sn===``||Ln)&&bt(!1),St(null),t&&Gn(``,gt(Ie))}),[qn,Jn]=j.useState(!1),Yn=ut((t,n)=>{if(ln===t)return;n.reason===`escape-key`&&Gt&&Sn.length===0&&!At.current&&n.allowPropagation();let r=n,i=je(r);if(e.onOpenChange?.(t,r),It.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(It.current=null),!n.isCanceled&&(t&&xt!==null&&Kn(n.reason===mt),!t&&yt&&(Ht?(Pn||St(fn),fn===``&&bt(!1)):Vt&&(Pn||St(fn),Fn&&Wn({activeIndex:null}),(!Fn||Pn)&&Gn(``,gt(Ie,n.event,void 0,{isItemPress:n.reason===Re})))),t||Jn(i()),un(t),!t&&Fn&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(Ye(!0),Xe(!1),Qe===`onBlur`))){let e=f===`none`?sn:k;$e.commit(e)}}),Xn=ut((e,t)=>{a?.(e,t),t.isCanceled||(en(e),(f===`none`&&Et.current&&me||Ht&&!A.state.inputInsidePopup)&&Gn(vt(e),gt(t.reason,t.event)))}),Zn=ut((e,t)=>{let n=Je(e),r=Pt.current??e;Pt.current=null;let i=gt(Re,r),a=it(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Yn(!1,i);else if(Vt){let e=Array.isArray(k)?k:[],n=Xt(e,t,de),r=n?$t(e,t,de):[...e,t];if(Xn(r,i),i.isCanceled||!(Dt.current&&Dt.current.value.trim()!==``))return;if(A.state.inputInsidePopup){Gn(``,gt(Ie,i.event,void 0,{isItemPress:!0}));let e=It.current;e&&!n&&(e.toggledValue=t)}else Yn(!1,i)}else{if(Xn(t,i),i.isCanceled)return;Yn(!1,i)}}),Qn=ut(()=>{let e=$e.inputRef.current?.form??A.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),$n=ut(()=>{if(En?.(!1),bt(!1),St(null),Wn(f===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Vt&&Dt.current&&Dt.current.value!==``&&!jt.current&&Gn(``,gt(Ie)),Ht){if(A.state.inputInsidePopup)Dt.current&&Dt.current.value!==``&&Gn(``,gt(Ie));else{let e=vt(k);Dt.current&&Dt.current.value!==e&&Gn(e,gt(e===``?Ie:nt))}}}),tr=j.useMemo(()=>Pn&&kn?{current:it(kn,`[role="dialog"]`)}:Et,[Pn,kn]),{mounted:nr,transitionStatus:rr,forceUnmount:ir}=Pe({open:ln,ref:tr,preventUnmountOnClose:qn,setPreventUnmountOnClose:Jn,onUnmount:$n});j.useImperativeHandle(e.actionsRef,()=>({unmount:ir,close:()=>Yn(!1,gt(Ke))}),[ir,Yn]),We(function(){let e=Ct.current!==null&&xt===null;if(Ct.current=xt,ln&&(!e||!Gt)||(ln||(Rt.current=null),f===`none`))return;let t=Gt?Sn:Lt.current;Wn({selectedIndex:gn(t,k,de,Vt)})},[ln,xt,k,f,Vt,Gt,Sn,de,Wn]),We(()=>{st&&(Lt.current=Sn,wt.current.length=Sn.length)},[st,Sn]),We(()=>{!ln&&It.current?.hasQuery&&(It.current=null)},[ln]),We(()=>{if(!ln&&Pn&&tr.current){It.current=null;return}let e=Gt||Yt?Sn:Lt.current,t=It.current;if(t){let n=ln||Pn||A.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Dt.current;!Qt||String(sn).trim()===``||Pn&&Qt!==`always`&&(!t||qe(t.ownerDocument)!==t)?It.current=null:n&&(e[0]!==void 0||!Gt&&!Yt)&&(A.set(`activeIndex`,0),It.current=null)}else if(String(sn).trim()===``&&(It.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)||Dt.current&&Dt.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||Yt?Sn:Lt.current,i=Zt(e,t.toggledValue,A.state.isItemEqualToValue);A.set(`activeIndex`,i===-1?gn(e,n,A.state.isItemEqualToValue,r):i)}else e?A.set(`activeIndex`,null):Qt===`always`&&A.set(`activeIndex`,0)})}}if(!ln&&!Pn)return;let n=A.state.activeIndex;if(n==null){if(Qt===`always`&&e.length>0){A.set(`activeIndex`,0);return}Un(void 0,-1,nt);return}if(n>=e.length){Un(void 0,-1,nt),A.set(`activeIndex`,null);return}let r=e[n],i=Ft.current.value,a=i!==Ai&&rn(r,i,A.state.isItemEqualToValue);Ft.current.index===n&&a||Un(r,n,nt)},[Dn,Qt,Un,Yt,Gt,Sn,Pn,ln,tr,A,sn]),We(()=>{ze(f===`none`?String(sn)!==``:Vt?Array.isArray(k)&&k.length>0:k!=null)},[ze,f,sn,k,Vt]),j.useEffect(()=>{Gt&&Qt&&Sn.length===0&&Wn({activeIndex:null})},[Gt,Qt,Sn.length,Wn]);function ar(){ln&&fn!==``&&fn!==String(an)&&!Ln&&bt(!0)}function or(){ln&&xt!==null&&Kn(!1)}let sr=!1;function cr(){!sr&&sn!==pn&&(sr=!0,Gn(pn,gt(nt)))}function lr(){f!==`none`&&(Oe(Bt),Ae(yn(k,Me.initialValue,de)),$e.change(k),Ht&&!Ut&&!Fn&&cr())}function ur(){Ht&&!Ut&&!Fn&&!yt&&cr()}function dr(){f===`none`&&(Oe(Bt),Ae(sn!==Me.initialValue),$e.change(sn))}y(fn,ar),y(ln,or),y(k,lr),y(pn,ur),y(st,ur),y(sn,dr);let fr=qt({open:Pn?!0:ln,onOpenChange:Yn,elements:{reference:Fn?jn:Mn,floating:kn}}),pr=C?`grid`:`listbox`,mr=ln||Pn,hr=mr?`true`:`false`,gr=j.useMemo(()=>{let e=Mn?.tagName===`INPUT`,t=Mn==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?An?.id:void 0,r[`aria-autocomplete`]=b?`none`:xe),{reference:r,floating:{role:`presentation`}}},[Mn,mr,hr,pr,An?.id,xe,b]),_r=se(fr,{enabled:!zt&&te,event:`mousedown-only`,toggle:!1,touchOpenDelay:Fn?0:100,reason:pt}),vr=ye(fr,{enabled:!zt&&!Pn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Pn?!0:void 0,outsidePress(e){let t=Je(e);return!lt(jn,t)&&!lt(Nt.current,t)&&!lt(Mt.current,t)&&!lt(Nn,t)}}),yr=O(fr,{enabled:!zt,id:tt,listRef:wt,activeIndex:Dn,selectedIndex:On,virtual:!0,loopFocus:oe,allowEscape:oe&&!Qt,focusItemOnOpen:yt||f===`none`&&!Qt?!1:`auto`,focusItemOnHover:ie,resetOnPointerLeave:!re,orientation:C?`horizontal`:void 0,rtl:et===`rtl`,disabledIndices:Ne,grid:C?mi:void 0,onNavigate(e,t){(t||ln||Pn&&e===null)&&rr!==`ending`&&Wn({activeIndex:e,type:er(t),event:t?.nativeEvent})}}),br=j.useMemo(()=>ke(yr.reference,{onKeyDown(e){C&&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,C,A]),xr=j.useMemo(()=>ke(Le,vr.floating),[vr.floating]),Sr=j.useMemo(()=>ke(yr.floating,gr.floating),[yr.floating,gr.floating]),Cr=j.useMemo(()=>{let e=yr.item;return{props:e?{...e,onFocus:void 0}:_e,id:tt,selectionMode:f,disabled:zt,readOnly:b,isItemEqualToValue:de}},[yr.item,tt,f,zt,b,de]);A.useContextCallback(`setOpen`,Yn),A.useContextCallback(`setInputValue`,Gn),A.useContextCallback(`setSelectedValue`,Xn),A.useContextCallback(`setIndices`,Wn),A.useContextCallback(`handleSelection`,Zn),A.useContextCallback(`forceMount`,Hn),A.useContextCallback(`requestSubmit`,Qn),A.useContextCallback(`onOpenChangeComplete`,n),_n(()=>{A.update({inline:pe,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Bn,itemRoot:Cr})});let wr={id:tt,selectedValue:k,open:ln,mounted:nr,transitionStatus:rr,items:dt,inline:pe,popupProps:xr,listProps:Sr,inputProps:br,triggerProps:Bn,itemRoot:Cr,openMethod:zn,selectionMode:f,name:Bt,form:g,disabled:zt,readOnly:b,required:x,grid:C,virtualized:fe,openOnInputClick:te,itemToStringLabel:ht,modal:he,autoHighlight:Qt,isItemEqualToValue:de,submitOnItemClick:Ee,hasInputValue:Ut};We(()=>{A.update({...wr,inputOwnsFormValue:f===`none`&&(pe||!A.state.inputInsidePopup)})},[A,...Object.values(wr)]);let Tr=Ue(S,$e.inputRef),Er=j.useMemo(()=>({query:fn,hasItems:Gt,filteredItems:xn,flatFilteredValues:Sn}),[fn,Gt,xn,Sn]),Dr=j.useMemo(()=>Array.isArray(Cn)?``:Kt(Cn,ue),[Cn,ue]),Or=Vt&&Array.isArray(k)&&k.length>0,kr=Vt||f===`none`&&In?void 0:Bt,Ar=j.useMemo(()=>!Vt||!Array.isArray(k)||!Bt?null:k.map(e=>{let t=Kt(e,ue);return(0,M.jsx)(`input`,{type:`hidden`,form:g,name:Bt,value:t,disabled:zt},t)}),[Vt,k,g,Bt,ue,zt]),jr=(0,M.jsxs)(j.Fragment,{children:[e.children,(0,M.jsx)(`input`,{...$e.getValidationProps(zt,{onFocus(){Fn?jn?.focus():(Dt.current||jn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||zt||b)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=gt(nt,e.nativeEvent),i=()=>Lt.current.findIndex(e=>Kt(e,ue).toLowerCase()===n||vt(e).toLowerCase()===n);function a(){if(Vt)return;if(f===`none`){Gn(t,r);return}let e=i();e===-1&&(e=Lt.current.findIndex((e,t)=>{let r=Tt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Lt.current[e];a!=null&&Xn?.(a,r)}Ht&&(Hn(),st&&i()===-1&&A.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:tt&&kr==null?`${tt}-hidden-input`:void 0,form:g,name:kr,autoComplete:Se,disabled:zt,required:x&&!Or,readOnly:b,value:Dr,ref:Tr,style:kr?De:Ce,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ar]});return(0,M.jsx)(hi.Provider,{value:A,children:(0,M.jsx)(gi.Provider,{value:fr,children:(0,M.jsx)(vi.Provider,{value:Gt,children:(0,M.jsx)(_i.Provider,{value:Er,children:(0,M.jsx)(yi.Provider,{value:sn,children:jr})})})})})}var Pi=`data-popup-side`,Fi=`data-list-empty`,Ii={...st,...T,popupSide:e=>e?{[Pi]:e}:null,listEmpty:e=>e?{[Fi]:``}:null};function Li(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function Ri(){return Si().filteredItems.length===0}function zi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Bi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Vi=j.createContext(void 0);function Hi(){return j.useContext(Vi)}var Ui=j.createContext(void 0);function Wi(e){let t=j.useContext(Ui);if(t===void 0&&!e)throw Error(He(21));return t}var Gi=j.forwardRef(function(e,t){let n=bi(),{buttonRef:r,getButtonProps:i}=Me({native:!1}),a=Ue(t,r);function o(e){n.context.setOpen(!1,gt(Xe,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,M.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:De})}),Ki=j.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:m}=ae(),{labelId:h}=S(),g=Hi(),_=!!Wi(!0),v=bi(),y=Ci(),b=p(),x=v.useState(`required`),C=v.useState(`disabled`),w=v.useState(`readOnly`),T=v.useState(`name`),E=v.useState(`form`),O=v.useState(`selectionMode`),ee=v.useState(`autoHighlight`),te=v.useState(`inputProps`),ne=v.useState(`triggerProps`),re=v.useState(`open`),ie=v.useState(`mounted`),oe=v.useState(`selectedValue`),se=v.useState(`id`),ce=v.useState(`inline`),de=v.useState(`modal`),fe=!!ee,pe=Li(v),me=u||C||i,he=Ri(),ge=o(me,v.context.inputRef),_e=_||ce,ve=!_e||de,ye=Be(a??(_e?void 0:se)),be=_?le:l,[xe,Se]=j.useState(null),Ce=j.useRef(!1),we=j.useRef(null);We(()=>{re||(we.current=null)},[re]);let Ee=O===`none`&&!_,De=ut(e=>{let t=_||v.state.inline;t&&!v.state.hasInputValue&&v.context.setInputValue(``,gt(nt)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:Ee})}),Oe=_?c:m.getValidationProps(me,c);function ke(e){v.context.setIndices({activeIndex:null,selectedIndex:null,type:er(e),event:e})}let Ae={...be,open:re,disabled:me,readOnly:w,popupSide:pe,listEmpty:he};function je(e){if(!g)return;let t,n=g.chipsRef.current.length,[r]=zi(b);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&oe.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let Me=Te(`input`,e,{state:Ae,ref:[t,v.context.inputRef,De],props:[te,ne,{value:xe??y,"aria-readonly":w||void 0,"aria-required":x||void 0,"aria-labelledby":h,disabled:me,readOnly:w,required:O===`none`?x:void 0,form:E,...Ee&&T&&{name:T},id:ye,onFocus(){if(ge(!0),!ce)return;let e=we.current;we.current=null,e!=null&&Object.hasOwn(v.context.valuesRef.current,e)&&v.context.setIndices({activeIndex:e})},onBlur(){d(!0),ge(!1);let e=v.state.activeIndex;if(ce&&e!==null&&ee!==`always`&&(we.current=e,v.context.setIndices({activeIndex:null})),f===`onBlur`){let e=O===`none`?y:oe;m.commit(e)}},onCompositionStart(e){Ge||(Ce.current=!0,Se(e.currentTarget.value))},onCompositionEnd(e){Ce.current=!1;let t=e.currentTarget.value;Se(null),v.context.setInputValue(t,gt(mt,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=Ce.current||!r;function a(e){!w&&!me&&e&&i&&(v.context.setOpen(!0,gt(mt,t)),fe||ke(t))}if(Ce.current){let n=e.currentTarget.value;Se(n),n===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.context.setOpen(!1,gt(Ie,t));let r=n.trim(),i=fe&&r!==``;a(r),re&&v.state.activeIndex!==null&&!i&&ke(t);return}let o=gt(mt,t);if(v.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=gt(Ie,t);s&&!v.state.inputInsidePopup&&(O===`single`&&v.context.setSelectedValue(null,c),v.state.openOnInputClick||v.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),re&&v.state.activeIndex!==null&&!fe&&ke(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(me||w){w&&e.key===`Enter`&&re&&v.state.activeIndex!==null&&Qe(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){Qe(e);let n=$e&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Qe(e);let i=$e&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!ie&&e.key===`Escape`){let t=O===`multiple`&&Array.isArray(oe)?oe.length===0:oe===null,n=gt(et,e.nativeEvent),r=O===`multiple`?[]:null;v.context.setInputValue(``,n),v.context.setSelectedValue(r,n),t||v.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&Array.isArray(oe)&&oe.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:oe.length-1,r=oe.filter((e,t)=>t!==n);ke(e.nativeEvent),v.context.setSelectedValue(r,gt(nt,e.nativeEvent));return}let i=je(e);if(i!==void 0&&g?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&re){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(ce)return;v.context.setOpen(!1,gt(nt,n));return}Qe(e),Bi(v,t,n)}}},Oe],stateAttributesMapping:Ii}),Ne=_?(0,M.jsx)(ue.Provider,{value:D,children:Me}):Me;return(0,M.jsxs)(j.Fragment,{children:[re&&ve&&(0,M.jsx)(Gi,{ref:v.context.startDismissRef}),Ne]})}),qi=j.createContext(null);function Ji(){return j.useContext(qi)}function Yi(e){let{children:t}=e,{filteredItems:n}=Si(),r=Ji(),i=r?r.items:n;return(0,M.jsx)(j.Fragment,{children:i.map(t)})}var Xi=j.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=bi(),l=xi(),u=!!Wi(!0),{filteredItems:d,hasItems:f}=Si(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,b=d.length===0,x=ut(e=>{c.set(`positionerElement`,e)}),S=ut(e=>{c.set(`listElement`,e)}),C=j.useMemo(()=>typeof o==`function`?n||=(0,M.jsx)(Yi,{children:o}):o,[o]),w={empty:b},T=l.useState(`floatingId`),E=Te(`div`,e,{state:w,ref:[t,S,u?null:x],props:[g,{children:C,tabIndex:-1,id:T,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Qe(e),Bi(c,t,e.nativeEvent)}}},s]});if(_)return E;let D=f&&!v?void 0:c.context.labelsRef;return(0,M.jsx)(re,{elementsRef:c.context.listRef,labelsRef:D,children:E})}),Zi=j.createContext(void 0);function Qi(){let e=j.useContext(Zi);if(e===void 0)throw Error(He(20));return e}var $i=j.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=bi(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,M.jsx)(Zi.Provider,{value:n,children:(0,M.jsx)(Oe,{ref:t,...r})}):null}),ea=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:f,arrowPadding:p,sticky:h,disableAnchorTracking:g=!1,collisionAvoidance:_=ge,style:v,...y}=e,b=bi(),x=xi(),S=Qi(),C=b.useState(`modal`),w=b.useState(`open`),T=b.useState(`mounted`),E=b.useState(`openMethod`),D=b.useState(`positionerElement`),O=b.useState(`triggerElement`),ee=b.useState(`inputElement`),te=b.useState(`inputGroupElement`),ne=b.useState(`inputInsidePopup`),re=b.useState(`transitionStatus`),ie=Ri(),ae=me({anchor:i??(ne?O:te??ee),floatingRootContext:x,positionMethod:a,mounted:T,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:p,collisionBoundary:u,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:_,lazyFlip:!0});d(w&&C,E===`touch`,D,O);let oe={open:w,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,empty:ie};We(()=>{b.set(`popupSide`,ae.side)},[b,ae.side]);let se=ut(e=>{b.set(`positionerElement`,e)}),ce=m(e,oe,{styles:ae.positionerStyles,transitionStatus:re,props:y,refs:[t,se],hidden:!T,inert:!w});return(0,M.jsxs)(Ui.Provider,{value:ae,children:[T&&C&&(0,M.jsx)(tt,{inert:dt(!w),cutout:te??ee??O}),ce]})}),ta={...Ee,...ct},na=j.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=bi(),l=Wi(),u=xi(),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`),y=c.useState(`modal`),b=c.useState(`id`),x=Ri(),S=s.id??(g?Ei(b):void 0);We(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),xe({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},w=Te(`div`,e,{state:C,ref:[t,c.context.popupRef],props:[m,{id:S,role:g?`dialog`:`presentation`,onFocus(e){let t=Je(e.nativeEvent);p!==`touch`&&(lt(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},v(h),s],stateAttributesMapping:ta}),T=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,E;E=o??(g?void 0:!1);let D=!g||y;return(0,M.jsx)(ze,{context:u,disabled:!d,modal:D,openInteractionType:p,initialFocus:T,returnFocus:E,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,M.jsxs)(j.Fragment,{children:[w,D&&(0,M.jsx)(Gi,{ref:c.context.endDismissRef})]})})}),ra=j.createContext(void 0),ia=j.createContext(!1);function aa(){return j.useContext(ia)}function oa(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,...f}=t,p=j.useRef(null),m=h({guess:!0,index:l,textRef:p}),g=bi(),_=aa(),v=wi(),{props:y,id:b,selectionMode:x,disabled:S,readOnly:C,isItemEqualToValue:w}=g.useState(`itemRoot`),T=S||u,E=x!==`none`,D=l??i??m.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;We(()=>{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]),We(()=>{if(!O||v)return;let e=g.context.valuesRef.current;return e[D]=c,()=>{delete e[D]}},[O,v,D,c,g]),We(()=>{if(!O||v)return;let e=g.state.selectedValue,t=g.state.selectedIndex;g.state.selectionMode===`multiple`&&Array.isArray(e)?t=vn(D,c,g.context.valuesRef.current,e,w,t):rn(c,e,w)&&(t=D),g.set(`selectedIndex`,t)},[O,v,g,D,c,w]);let{getButtonProps:ae,buttonRef:oe}=Me({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?(ci.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=Te(`div`,t,{ref:[oe,n,m.ref,ne],state:se,props:[y,le,f,ae]}),de=j.useMemo(()=>({selected:ie,textRef:p}),[ie,p]);return(0,M.jsx)(ra.Provider,{value:de,children:ue})}function sa(e){let{componentProps:t,forwardedRef:n}=e,r=bi().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Si(),a=t.value??null,o=Zt(i,a,r);return(0,M.jsx)(oa,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var ca=j.memo(j.forwardRef(function(e,t){let n=bi().useState(`virtualized`);return n&&e.index==null?(0,M.jsx)(sa,{componentProps:e,forwardedRef:t}):(0,M.jsx)(oa,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),la=j.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Si(),c=bi(),l=pi(),u=s.length===0?a:null;return Te(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),ua=t(),da=(0,j.createContext)(null);function fa(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function pa(){let e=(0,j.useContext)(da);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 ma(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 ma(e,...t)}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);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 ga(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var _a=ga();function va(){return _a&&`documentMode`in document?document.documentMode:null}var ya=va();function ba(e){return _a&&e.test(navigator.platform)}function xa(e){return _a&&e.test(navigator.userAgent)}var Sa=ba(/Mac|iPod|iPhone|iPad/),Ca=xa(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function wa(){return!(!_a||!(`InputEvent`in window)||ya)&&`getTargetRanges`in new window.InputEvent(`input`)}var Ta=wa();function Ea(){return _a&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Da=Ea(),Oa=xa(/Android/),ka=xa(/Version\/[\d.]+.*Safari/)&&!Oa,Aa=xa(/^(?=.*Chrome).*/i),ja=_a&&Oa&&Aa,Ma=xa(/AppleWebKit\/[\d.]+/)&&Sa&&!Aa;function Na(){return 2047}var Pa=Na(),Fa=ka||Da||Ma?`\xA0`:``,Ia=`
|
|
2
2
|
|
|
3
3
|
`,La=Ca?`\xA0`:Fa,Ra={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},za={directionless:1,unmergeable:2},Ba={center:2,end:6,justify:4,left:1,right:3,start:5};function Va(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var Ha=Va(Ba),Ua={normal:0,segmented:2,token:1},Wa=Va(Ua),Ga=Symbol.for(`@lexical/ctrlOrOtherKey`),Ka=`$config`;function qa(e){return()=>{}}function P(e){return{type:e}}var Ja=P(`SELECTION_CHANGE_COMMAND`),Ya=P(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),Xa=P(`CLICK_COMMAND`),Za=P(`BEFORE_INPUT_COMMAND`),Qa=P(`INPUT_COMMAND`),$a=P(`COMPOSITION_START_COMMAND`),eo=P(`COMPOSITION_END_COMMAND`),to=P(`DELETE_CHARACTER_COMMAND`),no=P(`INSERT_LINE_BREAK_COMMAND`),ro=P(`INSERT_PARAGRAPH_COMMAND`),io=P(`CONTROLLED_TEXT_INSERTION_COMMAND`),ao=P(`PASTE_COMMAND`),oo=P(`REMOVE_TEXT_COMMAND`),so=P(`DELETE_WORD_COMMAND`),co=P(`DELETE_LINE_COMMAND`),lo=P(`FORMAT_TEXT_COMMAND`),uo=P(`SET_TEXT_FORMAT_COMMAND`),fo=P(`UNDO_COMMAND`),po=P(`REDO_COMMAND`),mo=P(`KEYDOWN_COMMAND`),ho=P(`KEY_ARROW_RIGHT_COMMAND`),go=P(`MOVE_TO_END`),_o=P(`KEY_ARROW_LEFT_COMMAND`),vo=P(`MOVE_TO_START`),yo=P(`KEY_ARROW_UP_COMMAND`),bo=P(`KEY_ARROW_DOWN_COMMAND`),xo=P(`KEY_ENTER_COMMAND`),So=P(`KEY_SPACE_COMMAND`),Co=P(`KEY_BACKSPACE_COMMAND`),wo=P(`KEY_ESCAPE_COMMAND`),To=P(`KEY_DELETE_COMMAND`),Eo=P(`KEY_TAB_COMMAND`),Do=P(`INSERT_TAB_COMMAND`),Oo=P(`INDENT_CONTENT_COMMAND`),ko=P(`OUTDENT_CONTENT_COMMAND`),Ao=P(`DROP_COMMAND`),jo=P(`FORMAT_ELEMENT_COMMAND`),Mo=P(`DRAGSTART_COMMAND`),No=P(`DRAGOVER_COMMAND`),Po=P(`DRAGEND_COMMAND`),Fo=P(`COPY_COMMAND`),Io=P(`CUT_COMMAND`),Lo=P(`SELECT_ALL_COMMAND`),Ro=P(`CLEAR_EDITOR_COMMAND`),zo=P(`CLEAR_HISTORY_COMMAND`),Bo=P(`CAN_REDO_COMMAND`),Vo=P(`CAN_UNDO_COMMAND`),Ho=P(`FOCUS_COMMAND`),Uo=P(`BLUR_COMMAND`),Wo=P(`KEY_MODIFIER_COMMAND`);function Go(e,t){return{...t,[Ga]:e}}var Ko=Go(`metaKey`,{ctrlKey:!Sa,metaKey:Sa}),qo=Go(`altKey`,{altKey:Sa,ctrlKey:!Sa}),Jo=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function Yo(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var Xo=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 Jo){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))Yo(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?Yo(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&Yo(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 Jo)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 Zo(e){let t=new Xo;for(let n of e)t.add(n);return t}function Qo(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 $o(){let e;try{e=`0.53.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var es=$o(),ts=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]()}},ns=null;function rs(e,t=1e3){return e instanceof is?e.clone():e.size<t?new Map(e):new is().init(new Map(e),void 0,e.size)}var is=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===ns?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===ns?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!==ns&&n!==void 0||(this._size++,n===ns&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,ns),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!==ns&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===ns||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()}},as=!1;function os(e,t,...n){let r=as,i;try{as=e,i=t()}finally{as=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||N(421),i}function ss(){return as}function cs(e){let t=e.exportJSON(as),n=e.constructor;return t.type!==n.getType()&&N(130,n.name),L(e)&&!Array.isArray(t.children)&&N(59,n.name),t}function ls(){return Kf()._blockCursorElement}function us(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var ds=Ma||Da||ka;function fs(){let e=Of().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 ps(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var ms=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=hs(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=hs(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 hs(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var gs=class e extends ms{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(;us(t);)e=t,t=t.nextSibling;ps(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===ls()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;us(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===ls()&&(t=t.previousSibling);return ps(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(fs(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(fs(),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`&&us(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&ds;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=Of().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),t.insertBefore(i,r),e){let e=Of().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=ls(),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=_s(t,n);i.push(r);let a=_s(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 _s(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 vs=!1,ys=0;function bs(){ys=performance.now()}function xs(e){return G(e)&&e.hasAttribute(`data-lexical-managed-linebreak`)}function Ss(e,t,n){let r=xf(df(n)),i=r&&jf(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Ud(t,s,a,o,!1)}function Cs(e,t,n){if(q(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return hd(t)&&n.isAttached()}function ws(e,t,n){for(let r=e;r&&!op(r);r=nf(r)){let e=Od(r,t);if(e!==void 0){let t=V(e,n);if(t)return R(t)||!G(r)?void 0:[r,t]}}}function Ts(e,t,n,r){vs=!0;let i=e._inputState.unprocessedBeforeInputData===null&&performance.now()-ys>100;try{$m(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=ws(d,e,s);if(!f)continue;let[p,m]=f;if(t===`characterData`)r?z(m)&&m.isAttached()&&m.markDirty():i&&z(m)&&hd(d)&&Cs(a,d,m)&&Ss(d,m,e);else{l=!0;for(let t of n.addedNodes){let n=Od(t,e);if(t!==c&&t.parentNode===d&&(n?e.getElementByKey(n)!==t:!(e._slotsUsed&&G(t)&&t.hasAttribute(`data-lexical-slot`)||op(t)))){if(Ca){let e=(G(t)?t.innerText:null)||t.nodeValue;e&&(u+=e)}d.removeChild(t)}}for(let e of n.removedNodes){let t=c===e;if(t||ps(e)||xs(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`||Od(n,e)||xs(n)||n.remove();n.takeRecords(),a!==null&&(l&&Pd(a),Ca&&ef(e)&&a.insertRawText(u))})}finally{vs=!1}}function Es(e,t,n){let r=e._observer;if(r!==null){let i=r.takeRecords();(!n||i.length>0)&&Ts(e,i,r,t)}}function Ds(e){(function(e){df(e).addEventListener(`textInput`,bs,!0)})(e),e._observer=new MutationObserver((t,n)=>{Ts(e,t,n)})}function Os(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function ks(e,t){return Os(e,t,e.defaultValue)}function As(e){return typeof e==`object`&&!!e}function js(e,t){let n=Is(e,t).getter;return As(n)&&n.getterTable!==void 0||N(405,t),Fs(n.getterTable)}function Ms(e,t){let n=Is(e,t).setter;return As(n)&&n.setterTable!==void 0||N(406,t),Fs(n.setterTable)}function Ns(e,t,n){let{meta:r}=Is(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return Fs(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 Ps(e,t){let n=Is(e,t),{setter:r}=n;As(r)&&r.setterTable!==void 0||N(408,t);let i=String(n.defaultValue);return Gs(r.setterTable,i)||N(409,t,i),r.setterTable[i]}function Fs(e){return Object.assign(Object.create(null),e)}function Is(e,t){let n=e.get(t);return n===void 0&&N(410,t),n}function Ls(e,t,n,r,i){i!==void 0&&Rs.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&Vs(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var Rs=new WeakSet,zs=new WeakSet;function Bs(e){return typeof e==`object`&&e&&zs.add(e),e}function Vs(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!zs.has(e)){Object.freeze(e);for(let t of Object.values(e))Vs(t)}}function Hs(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function Us(e,t){return n=>t(n)||Ws(e,n)}function Ws(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return Ws(e,t)?{parsed:e(t)}:void 0;let r=e(t);return ks(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function Gs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ks(e=``){return Ls(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var qs=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Js(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`&&qs.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 Ls(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 Ys(e=!1){return Ls(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function Xs(e,...t){let n=Bs(t.length===0?e[0]:t[0]),r=new Set(e);return Ls(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 Zs(e,t={}){let{defaultAsNull:n}=t;return Ls(t=>{if(t==null)return null;let r=e(t);return n&&ks(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,Hs(e),Us(e,e=>e==null))}function Qs(e,t={}){let{omitDefault:n}=t;return Ls(t=>{if(t===void 0)return;let r=e(t);return n&&ks(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,Hs(e),Us(e,e=>e===void 0))}function $s(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function ec(e,t){let n=e=>typeof e==`string`&&Gs(t,e);return Ls(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||Ws(e,t))}function tc(e){return Ls(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(!Os(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function nc(e,t){return ic(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 rc(e,t){return ic(0,e,{getter:t.getter,setter:t.setter},!0===t.derived)}function ic(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 ac=`latest`,oc=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||_c).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>Os(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function sc(e,t){return new oc(e,t)}function cc(e,t,n=ac){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function lc(e,t,n){let r;if(Mm(),typeof n==`function`){let i=e.getLatest(),a=cc(i,t);if(r=uc(t,n(a)),t.isEqual(a,r))return i}else r=uc(t,n);let i=e.getWritable();return mc(i).updateFromKnown(t,r),i}function uc(e,t){let{schema:n}=e;return n!==void 0&&n.meta.kind===`set`?e.parse(t):t}function dc(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of Rp(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 fc=new Set([`__proto__`,`constructor`,`prototype`]),pc=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 gc(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(fc.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=gc(i)):r.has(e)||this.size++,r.set(e,t)}updateFromUnknown(e,t){if(fc.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 mc(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new pc(t,function(e){return e.__state?e.__state.sharedNodeState:id(Kf(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function hc(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&mc(e).updateFromJSON(r),n}function gc(e){if(e)for(let t in e)return e}function _c(e){return e}function vc(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 yc(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 bc(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function xc(e){return!nu(e)&&e.getTextContent!==Zl.prototype.getTextContent}var Sc=Symbol.for(`@lexical/CachedTextSize`);function Cc(e,t){return Rc.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Lc.get(r);if(i===void 0&&N(345,r),L(i)){let a=zc.get(r);if(a!==void 0&&L(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Bc.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(nl(i).size>0)n+=i.getTextContentSize();else{let e=i[Sc];e===void 0&&N(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:F})}function wc(e){L(e)||nl(e).size>0||e[Sc]===void 0&&(e[Sc]=z(e)?e.__text.length:e.getTextContentSize())}var Tc=4,Ec,F,Dc,I=``,Oc=null,kc=null,Ac=null;function jc(){return{firstTextKey:Ac,format:Oc,style:kc}}function Mc(e){e.firstTextKey!==null&&(Oc=e.format,kc=e.style,Ac=e.firstTextKey)}function Nc(e){if(Ac!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&N(348),t===null)return;let n=zc.get(t);z(n)&&(Oc=n.getFormat(),kc=n.getStyle(),Ac=t)}var Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc=!1,Gc=!1;function Kc(e,t){let n=Lc.get(e),r=zc.has(e);if(t!==null){let n=_l(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(F._keyToDOMMap.delete(e),L(n)){let e=Vp(n,Lc);qc(e,0,e.length-1,null)}if(n!==void 0){for(let e of nl(n).values()){let t=il(e);Kc(e,null),t!==null&&t.remove()}Xd(Hc,Dc,Pc,n,`destroyed`)}}}function qc(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Kc(t,r)}}function Jc(e,t){e.setProperty(`text-align`,t)}var Yc=`40px`;function Xc(e,t){let n=Ec.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, ${Yc}))`),Jd(e,`class`),Jd(e,`style`)}function Zc(e,t){let n=e.style;t===0?Jc(n,``):t===1?Jc(n,`left`):t===2?Jc(n,`center`):t===3?Jc(n,`right`):t===4?Jc(n,`justify`):t===5?Jc(n,`start`):t===6&&Jc(n,`end`),Jd(e,`style`)}function Qc(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(nu(e))return null;let n=e.getParent();return n===null||W(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function $c(e){let t=Of().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function el(e,t,n){t||e.contentEditable===`false`?sp(n,F):n.removeAttribute(`contenteditable`)}function tl(e,t,n){let r=I,i=jc();I=``;let a=``,o=R(e);for(let[r,i]of n){let n=$c(r);el(t,o,n),t.appendChild(n),I=``;let s=jc();ol(i,Jf(e,n,F)),Mc(s),rl(e,r,t,n),a+=I}return Mc(i),I=r,a}function nl(e){return u_(e)&&e.__slots!==null?e.__slots:l_}function rl(e,t,n,r){let i=Uc.$getSlotTargetElement(e,t,n,F);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function il(e){let t=Bc.get(e);return t===void 0?null:t.parentElement}function al(e,t,n){let r=nl(e),i=nl(t);for(let[e,t]of r)if(!i.has(e)){let e=il(t);Kc(t,null),e!==null&&e.remove()}let a=I,o=jc(),s=``,c=null,l=R(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:il(i);I=``;let u=jc();if(o===null){o=$c(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),ol(a,Jf(t,o,F))}else i===a?fl(a,o):(i!==void 0&&Kc(i,o),ol(a,Jf(t,o,F)));if(Mc(u),el(n,l,o),rl(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 Mc(o),I=a,s}function ol(e,t){let n=zc.get(e);if(n===void 0&&N(60),t!==null){let r=Lc.get(e);if(r!==void 0){let i=Bc.get(e);if(i!==void 0){let a=d_(r)?r.__slotHost:null,o=d_(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),fl(e,t.element)}}}let r=Uc.$createDOM(n,F);if(function(e,t,n){let r=n._keyToDOMMap;Dd(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`),ap(r,{captureSelection:!0})),L(n)){let e=I,t=n.__indent,i=n.__size;Qc(r,n),t!==0&&Xc(r,t);let a=nl(n),o=a.size>0?tl(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(sl(Vp(n,zc),n,0,t,Jf(n,r,F)),o!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=o+t,I=e+o+t}a.size>0&&(r.__lexicalSlotTextLength=o.length)}if(xc(n)){let t=n.getTextContent();r.__lexicalTextContent=t,I=e+t}let s=n.__format;s!==0&&Zc(r,s),n.isInline()||(ul(0,n,r),ll(n,r))}else{let t=n.getTextContent();if(R(n)){let t=n.decorate(F,Ec);t!==null&&pl(e,t),r.contentEditable=`false`;let i=nl(n);i.size>0&&tl(n,r,i)}I+=t}return t!==null&&t.insertChild(r),Uc.$decorateDOM(n,null,r,F),wc(n),Xd(Hc,Dc,Pc,n,`created`),r}function sl(e,t,n,r,i){let a=I,o=jc();I=``,Oc=null,kc=null,Ac=null;let s=n;for(;s<=r;++s){let t=jc();ol(e[s],i);let n=zc.get(e[s]);n!==null&&z(n)?Oc===null&&(Oc=n.getFormat(),kc=n.getStyle(),Ac=n.__key):L(n)&&s<r&&!n.isInline()&&(I+=Ia),Mc(t)}let c=F._keyToDOMMap.get(t.__key);c===void 0&&N(349,t.__key),c.__lexicalTextContent=I,c.__lexicalFirstTextKey=Ac,I=a+I,Mc(o)}function cl(e){return R(e)&&!e.isInline()}function ll(e,t,n=Jf(e,t,F)){n.setDecoratorBoundaryAnchor(`leading`,cl(e.getFirstChild())),n.setDecoratorBoundaryAnchor(`trailing`,cl(e.getLastChild()))}function ul(e,t,n){let r=Jf(t,n,F),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return cm(e)?`line-break`:R(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,zc);r.setManagedLineBreak(i)}function dl(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=zc.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=zc.get(r);if(z(e))return Oc=e.getFormat(),void(kc=e.getStyle())}}t.__lexicalFirstTextKey=Ac}function fl(e,t){let n=Lc.get(e),r=zc.get(e);n!==void 0&&r!==void 0||N(61);let i=Wc||Ic.has(e)||Fc.has(e),a=tf(F,e);if(n===r&&!i){let e;if(L(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&N(355,n.getType()),e=t,Nc(a)}else e=n.getTextContent();return I+=e,a}if(n!==r&&i&&Xd(Hc,Dc,Pc,r,`updated`),Uc.$updateDOM(r,n,a,F)){let n=ol(e,null);return t===null&&N(62),t.replaceChild(n,a),Kc(e,null),n}if(L(n)){L(r)||N(334,e);let t=r.__indent;(Wc||t!==n.__indent)&&Xc(a,t);let o=r.__format;(Wc||o!==n.__format)&&Zc(a,o);let s=i&&(nl(r).size>0||nl(n).size>0)?al(n,r,a):``;if(i){let e=I;if(function(e,t,n){var r;Oc=null,kc=null,Ac=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(!Wc&&Math.abs(c)<=1&&i>=Tc&&e.__first===t.__first&&(c!==0||!F._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=Vc.get(e.__key);if(!Wc&&!xc(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=zc.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=Cc(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=zc.get(n);if(e===void 0)break;let t=jc();fl(n,o),z(e)&&Oc===null&&(Oc=e.getFormat(),kc=e.getStyle(),Ac=e.__key),Mc(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=zc.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+=Ia),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,dl(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=Lc.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=zc.get(a),d=Lc.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=zc.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=Lc.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=Cc(l,c);for(let e of _){let t=jc();if(e.kind===`reconcile`)fl(e.key,n.element);else if(e.kind===`destroy`)Kc(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}}ol(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=zc.get(e.key);t&&z(t)&&Oc===null&&(Oc=t.getFormat(),kc=t.getStyle(),Ac=t.__key)}Mc(t)}let x=``;for(let e=0;e<o;e++){let t=zc.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+=Ia)}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,dl(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=zc.get(t);if(e===void 0)break;let r=Wc||Ic.has(t)||Fc.has(t),i=jc();if(r)fl(t,o);else{let n,r;if(L(e)){r=Bc.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&&Nc(r)}z(e)?Oc===null&&(Oc=e.getFormat(),kc=e.getStyle(),Ac=e.__key):L(e)&&n<a-1&&!e.isInline()&&(I+=Ia),Mc(i),t=e.__next,n++}s.__lexicalTextContent=I,s.__lexicalFirstTextKey=Ac,I=r+I;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)fl(r,o);else{let e=_l(r),t=ol(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}Kc(r,null)}let a=zc.get(i);z(a)&&Oc===null&&(Oc=a.getFormat(),kc=a.getStyle(),Ac=a.__key)}else{let r=Vp(e,Lc),s=Vp(t,zc);if(r.length!==i&&N(227),s.length!==a&&N(228),i===0)a!==0&&sl(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&nl(t).size===0&&n.element.__lexicalLineBreak==null;qc(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=jc();if(e===r)u=ml(fl(r,a.element)),d++,f++;else{if(l===void 0&&(l=hl(n,f)),c===void 0)c=hl(t,d);else if(!c.has(e)){d++,Mc(i);continue}if(!l.has(e)){let t=_l(e);t.parentNode===a.element&&(u=ml(t)),Kc(e,a.element),d++,c.delete(e),Mc(i);continue}if(c.has(r)){let e=tf(F,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=ml(fl(r,a.element)),d++,f++}else ol(r,a.withBefore(u??a.before)),f++}let o=zc.get(r);o!==null&&z(o)?Oc===null&&(Oc=o.getFormat(),kc=o.getStyle(),Ac=o.__key):L(o)&&f<=s&&!o.isInline()&&(I+=Ia),Mc(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:F.getElementByKey(t);sl(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&qc(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=I,s.__lexicalFirstTextKey=Ac,I=r+I}(e,t,Jf(t,n,F)),W(t)||(r=t,Oc==null||Oc===r.__textFormat||Gc||r.setTextFormat(Oc),function(e){kc==null||kc===e.__textStyle||Gc||e.setTextStyle(kc)}(t))}(n,r,a),r.isInline()||(nu(r)||ul(0,r,a),ll(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,I=e+s+t,a.__lexicalSlotTextLength=s.length}else(nl(r).size>0||nl(n).size>0)&&(a.__lexicalSlotTextLength=0);if(xc(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,Nc(a)}if((Wc||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(Qc(a,r),nu(r)&&!Wc))for(let e of r.getChildren())L(e)&&Qc(tf(F,e.getKey()),e)}else{let t=r.getTextContent();if(R(r)){let t=r.decorate(F,Ec);t!==null&&pl(e,t),i&&(nl(r).size>0||nl(n).size>0)&&al(n,r,a)}I+=t}if(!Gc&&nu(r)){let e=r.getLatest();if(e.__cachedText!==I){let t=e.getWritable();t.__cachedText=I,r=t}}return Uc.$decorateDOM(r,n,a,F),wc(r),a}function pl(e,t){let n=F._pendingDecorators,r=F._decorators;if(n===null){if(r[e]===t)return;n=Ad(F)}n[e]=t}function ml(e){let t=e.nextSibling;return t!==null&&t===F._blockCursorElement&&(t=t.nextSibling),t}function hl(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function gl(e,t,n,r,i,a){I=``,Oc=null,kc=null,Ac=null,Wc=r===2,F=n,Ec=n._config,Uc=n._config.dom||hm,Dc=n._nodes,Pc=F._listeners.mutation,Fc=i,Ic=a,Lc=e._nodeMap,Rc=e,zc=t._nodeMap,Gc=t._readOnly,Bc=rs(n._keyToDOMMap),Vc=function(){let e=new Map,t=t=>{for(let n of t){let t=zc.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(Fc.keys()),t(Ic),e}();let o=new Map;return Hc=o,fl(`root`,null),F=void 0,Dc=void 0,Fc=void 0,Ic=void 0,Lc=void 0,Rc=void 0,zc=void 0,Ec=void 0,Bc=void 0,Vc=void 0,Hc=void 0,Uc=hm,o}function _l(e){let t=Bc.get(e);return t===void 0&&N(75,e),t}function vl(e,t,n){Mm();let r=e.__key,i=e.getParent();if(i===null)return void(f_(e)!==null&&N(367,r,String(f_(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 lf(i,e)&&n.set(e.__key,0,`element`),lf(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&&(Vg(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(Vg(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else cg(a)&&t&&e.isSelected()&&e.selectPrevious();a_(e.getWritable(),t&&!o&&q(a)?a:null),n||W(i)||i.canBeEmpty()||!i.isEmpty()||vl(i,t),t&&a&&nu(i)&&i.isEmpty()&&i.selectEnd()}function yl(e){return e}var bl=Symbol.for(`ephemeral`);function xl(e){return e[bl]||!1}var Sl={configurable:!0,enumerable:!1,value:void 0,writable:!0},Cl=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=Ap(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||Hp(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",Sl),Object.defineProperty(this,Sc,Sl),bd(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=V(e);if(t===null)break;e=t.__parent===null?f_(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:V(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(W(t)||f_(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:V(e)}getPreviousSiblings(){return c_(this.getPreviousSibling(),`previous`).reverse()}getNextSibling(){let e=this.getLatest().__next;return e===null?null:V(e)}getNextSiblings(){return c_(this.getNextSibling(),`next`)}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=uv(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?sv(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&N(279),!1)))}isParentOf(e){return lf(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(xl(this))return this;let e=V(this.__key);return e===null&&N(442,this.__key,this.__type),e}getWritable(){if(xl(this))return this;Mm();let e=Pm(),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 Sd(i),i;let o=e._nodeMap,s=o.get(n);s===void 0&&N(442,n,this.__type);let c=ep(s);return r.set(n,c),o.set(n,c),Sd(c),c}getTextContent(){return E_(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){N(70)}updateDOM(e,t,n){N(71)}getDOMSlot(e){return new ms(e)}exportDOM(e){return{element:qf(e).$createDOM(this,e)}}exportJSON(e=!1){let t=function(e,t){let n=fp(dp(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=Tp(e)[a.field];o=a.getterTable===void 0?t:Gs(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!Ep(a,o)&&a.when.call(e)||(o=void 0)),r&&Ep(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 kp(hc(this,e),e)}static transform(){return null}remove(e){vl(this,!0,e)}replace(e,t){Mm();let n=J();n!==null&&(n=n.clone()),_f(this,e);let r=this.getLatest(),i=this.__key,a=p_(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();a_(s,q(n)?n:null);let d=r.getPreviousSibling(),f=r.getNextSibling();vl(r,!1,!0),r_(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)){Pd(n);for(let e of[n.anchor,n.focus])e.key===i&&(t&&e.type===`element`?e.set(s.__key,p+e.offset,`element`):tg(e,s))}return wd()===i&&Cd(o),s}insertAfter(e,t=!0){return o_(this,`next`,e,t)}insertBefore(e,t=!0){return o_(this,`previous`,e,t)}isParentRequired(){return!1}createParentElementNode(){return B()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){return s_(Y(this,`previous`),e,t)}selectNext(e,t){return s_(Y(this,`next`),e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function wl(e){return e instanceof Cl}function Tl(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&&vc(n,e,t)||t&&vc(n,t,e)||e&&yc(n,e,t)||t&&yc(n,t,e))}(c,l))}function El(e,t){let n=e.mergeWithSibling(t),r=K()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Dl(e){let t,n,r=e;if(!Td(r)){if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable()&&!Td(t);){if(t.__text!==``){if(Tl(t,r)){r=El(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable()&&!Td(n);){if(n.__text!==``){if(Tl(r,n)){r=El(r,n);break}break}n.remove()}}else r.remove()}}function Ol(e){return kl(e.anchor),kl(e.focus),e}function kl(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 Al=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function jl(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!Al.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function Ml(e,t,n,r,i){let a=jl(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var Nl=e=>{let t=js(e,`format`),n=Ms(e,`format`),r=Ps(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=Ml(t.indent,0,0,1/0),e.__textFormat=jl(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function Pl(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var Fl=e=>{let t=js(e,`mode`),n=Ns(e,`detail`,0),r=Ns(e,`format`,0),i=Ms(e,`mode`),a=Ps(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]:jl(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:jl(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:Pl}},Il=e=>{let t=js(e,`format`),n=Ms(e,`format`),r=Ps(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=Ml(t.indent,0,0,1/0),e.__textFormat=jl(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},Ll=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),Rl=e=>{let t=js(e,`mode`),n=Ns(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]:jl(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},zl=new WeakMap;function Bl(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`&&!Np(t.isInline))try{let t=e.prototype.isInline.call(Object.create(e.prototype));return typeof t==`boolean`?t:null}catch{return null}}}function Vl(e){for(let{ownNodeConfig:t}of Rp(e))if(t&&t.children!==void 0)return t.children}function Hl(e){let t=zl.get(e);if(t===void 0){let n={},r={},i=!1;for(let{klass:t,ownNodeConfig:a}of Rp(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=xp(e);for(let e of Object.keys(n))!0===n[e].derived&&t.add(e);for(let{ownNodeConfig:n}of Rp(e)){let e=n&&n.stateConfigs;if(e)for(let n of e){let e=n instanceof oc?n:n.stateConfig;e.derived&&t.add(e.key)}}return t}(e);r.inline!==void 0&&r.inline!==e&&Bl(e,r.inline)!==void 0&&Bl(e,r.inline)!==n.inline&&(delete n.inline,delete r.inline),r.mergeAdjacent===void 0||r.mergeAdjacent===e||function(e,t,n){let r=xp(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=Vl(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}),zl.set(e,t)}return t}function Ul(e){let{derivedNames:t,...n}=Hl(e);return Object.freeze({...n,derived:new Set(t)})}function Wl(e){return!1}function Gl(){return{...Ha,0:``}}function Kl(){return{...Ba,"":0}}var ql=Gl(),Jl=Kl(),Yl=$s()({direction:nc(Xs([null,`ltr`,`rtl`]),{field:`__dir`}),format:nc(Xs([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:ql,setter:`setFormat`,setterTable:Jl}),indent:nc(Js(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:rc(Js(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:rc(Ks(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function Xl(e){if(W(e)&&!Wl(K())){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var Zl=class extends Cl{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:Xl,extends:Cl,generated:Nl,json:Yl})}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 Ha[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){return c_(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&&v_(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 v_(this)){let n=y_(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:V(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&N(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:V(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=E_(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+=Ia)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of __(e).values()){let e=V(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=Ba[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=Ra[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return vd(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Mm();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):jg(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!==``&&Ba[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){xl(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 t_(e,r&&r.getWritable(),a&&a.getWritable()),e.__size-=i.length,i.map(e=>(n_(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--,i_(t);let n=e.__key;r_(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])Ql(r,t,n)&&Vg(r,r.getNode(),this,l,c);u!==0||this.canBeEmpty()||W(this)||this.remove()}}return i}getDOMSlot(e){return new gs(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(G(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(W(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=Jf(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=Od(s,t))&&op(s);)s=s.nextSibling;s!==i&&r.insertBefore(i,o?s:a||n.getInsertionAnchor()),a=i.nextSibling}ll(this,e,n)})}};function L(e){return e instanceof Zl}function Ql(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 $l=class extends Cl{__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 $l}function eu(e){let t=e.getLatest().__cachedText;return t===null||!jm()&&K()._dirtyType!==0?null:t}var tu=class extends Zl{__cachedText;$config(){return this.config(`root`,{extends:Zl})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){N(51)}getTextContent(){let e=eu(this);return e===null?super.getTextContent():e}getTextContentSize(){let e=eu(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 H().updateFromJSON(e)}collapseAtStart(){return!0}};function nu(e){return e instanceof tu}function ru(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 iu(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 au(e,t,n=``){if(t===n)return;let r=ru(n),i=ru(t);for(let t in i)delete r[t],iu(e,t,i[t]);for(let t in r)e.removeProperty(t)}var ou=$s()({detail:nc(ec(Js(),za),{field:`__detail`}),format:nc(ec(Js(),Ra),{field:`__format`}),mode:nc(Xs([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:Wa,setterTable:Ua}),style:nc(Ks(),{field:`__style`}),text:nc(Ks(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function su(e,t){return 16&t?`code`:128&t?`mark`:32&t?`sub`:64&t?`sup`:null}function cu(e,t){return 1&t?`strong`:2&t?`em`:`span`}function lu(e,t,n,r,i){let a=r.classList,o=Yd(i,`base`);o!==void 0&&a.add(...o),o=Yd(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 Ra){let r=Ra[e];if(o=Yd(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)}}Jd(r,`class`)}function uu(e,t,n){let r=n.isComposing(),i=e+(r?Fa:``),a=Kf(),o=qf(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(Of().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||Ca||Aa){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 du(e,t,n,r,i,a){uu(i,e,t);let o=a.theme.text;o!==void 0&&lu(0,0,r,e,o)}function fu(e,t){let n=Of().createElement(t);return n.appendChild(e),n}function pu(e){return e!=null&&!0===e.__isInlineFormattable}var mu=class extends Cl{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:Cl,generated:Fl,importDOM:{"#text":()=>({conversion:yu,priority:0}),b:()=>({conversion:gu,priority:0}),code:()=>({conversion:Su,priority:0}),em:()=>({conversion:Su,priority:0}),i:()=>({conversion:Su,priority:0}),mark:()=>({conversion:Su,priority:0}),s:()=>({conversion:Su,priority:0}),span:()=>({conversion:hu,priority:0}),strong:()=>({conversion:Su,priority:0}),sub:()=>({conversion:Su,priority:0}),sup:()=>({conversion:Su,priority:0}),u:()=>({conversion:Su,priority:0})},json:ou})}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 Wa[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===wd()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=Ra[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 vd(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=su(0,n),i=cu(0,n),a=r===null?i:r,o=Of().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=Of().createElement(i),o.appendChild(s)),du(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&au(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=su(0,i),s=su(0,a),c=cu(0,i),l=cu(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=Of().createElement(l);return du(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??N(49)),uu(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&lu(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(au(t.style,p,f),Jd(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return G(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=fu(t,`b`)),this.hasFormat(`italic`)&&(t=fu(t,`i`)),this.hasFormat(`strikethrough`)&&(t=fu(t,`s`)),this.hasFormat(`underline`)&&(t=fu(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?Ra[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?za[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=vd(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=Ua[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){Mm();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 jg(o,n,o,r,`text`,`text`);{let e=wd();e!==i.anchor.key&&e!==i.focus.key||Cd(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){Mm();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=wd(),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=Cu(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=bc(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=Cu(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=bc(t,n);let a=n.__key;i===r&&Cd(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&&Sd(t),n!==null&&Sd(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),q(v)&&Bg(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;wd()===r&&Cd(n);let o=J();if(q(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&Hg(i,t,n,e,a),s!==null&&s.key===r&&Hg(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 hu(e){return{forChild:wu(e.style),node:null}}function gu(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:wu(t.style,n?void 0:`bold`),node:null}}var _u=new WeakMap;function vu(e){if(!G(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function yu(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=_u.get(n))===void 0&&!vu(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)_u.set(r[e],i);return i}(t)!==null)return{node:Jg(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=bu(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=bu(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:Cu(n)}}function bu(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,G(n)){let e=n.style.display;if(e===``&&!Hf(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(hd(n))return n;if(n.nodeName===`BR`)return null}}var xu={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Su(e){let t=xu[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:wu(e.style,t),node:null}}function Cu(e=``){return gf(new mu(e))}function z(e){return e instanceof mu}function wu(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)||pu(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 Tu(e,t){let{type:n,key:r,offset:i}=e,a=vf(e.key);return n===`text`?(z(a)||N(266,a.getType(),r),W_(a,t,i)):(L(a)||N(267,a.getType(),r),Ru(a,e.offset,t))}function Eu(e,t){let{origin:n,direction:r}=t,i=r===`next`;R_(t)?e.set(n.getKey(),t.offset,`text`):z_(t)?z(n)?e.set(n.getKey(),G_(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(B_(t)&&L(n)||N(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function Du(e){let t=J(),n=q(t)?t:Mg();return Ou(n,e),Pd(n),n}function Ou(e,t){Eu(e.anchor,t.anchor),Eu(e.focus,t.focus)}function ku(e){let{anchor:t,focus:n}=e,r=Tu(t,`next`),i=Tu(n,`next`),a=iv(r,i)<=0?`next`:`previous`;return nv($_(r,a),$_(i,a))}function Au(e){let{direction:t,origin:n}=e,r=Y(n,P_(t)).getNodeAtCaret();return r?Y(r,t):q_(n.getParentOrThrow(),t)}function ju(e,t=`root`){let n=[e];for(let r=B_(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Au(r));return n}function Mu(e){return!!e&&e.origin.isAttached()}function Nu(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Lu(e,r),o=a.anchor.origin;for(;o!==null&&!W(o);)o=o.getParent();let s=L(o)?o.getFirstChild():null,c=ju(a.anchor,n),l=ju(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(B_(e))u.add(e.origin.getKey());else if(z_(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),xd(e)}for(let e of f)!e.canBeEmpty()&&!W(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=Au(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=Cu(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=W_(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p=Pu(c),m=Pu(l),h=function(e,t,n){let r=e&&e.getParentAtCaret(),i=t&&t.getParentAtCaret(),a=r&&i&&uv(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(W(i))return;t&&!n.has(i.__key)||!Gf(i)||(r=i)}return r},s=o(r,!1),c=s&&o(i,!0);return s&&c&&v_(c).length===0?[s,c]:null}(p,m,u);if(h){let[e,t]=h;q_(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(B_(e)){let t=e.origin;if(Gf(t))return t}else{let t=e.getParentAtCaret();if(t&&Gf(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(mf);if(e&&t&&!nu(t)&&e.isEmpty()&&u.has(e.getKey())&&v_(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!nu(n)&&n.isEmpty();){let e=n.getParent();if(e&&nu(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Nd(o,s)!==null||o===null||o.isAttached()||Nd(H(),null);let g=Pu([p,m,...c,...l]);if(g)return tv($_(g,e.direction));N(269,JSON.stringify(c.map(e=>e.origin.__key)))}function Pu(e){let t=e.find(Mu);return t&&Fu(t)}function Fu(e){let t=function(e){let t=e;for(;B_(t);){let e=Y_(t);if(!B_(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(z(t.origin))return R_(t)?t:W_(t.origin,n,n);let r=t.getAdjacentCaret();return z_(r)&&z(r.origin)?W_(r.origin,n,P_(n)):t}function Iu(e){return R_(e)&&e.offset!==G_(e.origin,e.direction)}function Lu(e,t){return e.direction===t?e:nv($_(e.focus,t),$_(e.anchor,t))}function Ru(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?q_(e,n):Y(a,n)}function zu(e,t=`root`){let n=0,r=e,i=Y_(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=Y_(r)}return i&&[i,n]}function Bu(e){let{origin:t,offset:n,direction:r}=e;if(n===G_(t,r))return e.getSiblingCaret();if(n===G_(t,P_(r)))return Au(e.getSiblingCaret());let[i]=t.splitText(n);return z(i)||N(281),$_(Y(i,`next`),r)}function Vu(e,t){for(let n of e)if(n!==null&&n.caret.origin.is(t))return n}function Hu(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&&zg(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()&&Bg(t,a,o,c.length-1);for(let[e,t]of s)t!==null&&e.set(l.__key,t,`text`);return l}function Uu(e,t){return!0}function Wu(e,{$copyElementNode:t=hf,$splitTextPointCaretNext:n=Bu,rootMode:r=`shadowRoot`,$shouldSplit:i=Uu,removeEmptyDestination:a=!1}={}){if(R_(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(B_(e)){let e=Au(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=c_((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 Gu(e,t,n){let r=$_(t,`next`);R_(r)&&(r.offset===0?r=Y(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Y(r.origin,`next`))),r.origin.is(e)&&(z_(r)||N(342,e.getKey(),e.getType()),r=Au(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=Wu(e,n))r=e;return R_(r)&&N(283),r.insert(e.isInline()?B().append(e):e),$_(Y(e.getLatest(),`next`),t.direction)}function Ku(e,t){let n=Lu(q(t)?ku(t):t,`next`),r=h_(n.anchor.origin),i=h_(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=Fu(q_(e,`next`)),o=$_(Fu(q_(e,`previous`)),`next`);return iv(n.anchor,a)<=0&&iv(n.focus,o)>=0}var qu=class extends Zl{$config(){return this.config(`paragraph`,{children:`inline`,extends:Zl,generated:Il,importDOM:{p:()=>({conversion:Ju,priority:0})}})}createDOM(e){let t=Of().createElement(`p`),n=Yd(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(G(t)){this.isEmpty()&&t.append(Of().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(Ku(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=B();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 Ju(e){let t=B();if(ip(t,e),np(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in Ba&&t.setFormat(n)}return rp(t,e),{node:t}}function B(){return gf(new qu)}function Yu(e){return e instanceof qu}var Xu=$s()({detail:rc(Js(2),{getter:{field:`__detail`},setter:null}),mode:rc(Xs([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:rc(Ks(` `),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),Zu=class extends mu{$config(){return this.config(`tab`,{extends:mu,generated:Rl,json:Xu})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=Yd(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 Qu(){return gf(new Zu)}function $u(e){return e instanceof Zu}var ed=null;function td(e){ed=e}var nd=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),rd=1;function id(e,t){let n=ad(e,t);return n===void 0&&N(30,t),n}function ad(e,t){return e._nodes.get(t)}var od=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function sd(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return gd(t)||Cf(t)?If(t):null})():t;if(!G(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=kd(n),i=n.nodeName;return wl(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&fd(n)==null)}function cd(e){let t=e===null?null:Lf(e);return zf(t)&&sd(t)}function ld(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 dd(t)===e&&e.read(`latest`,()=>!sd(t))}function ud(e){return e instanceof ym}function dd(e){let t=e;for(;t!=null;){let e=fd(t);if(ud(e))return e;t=nf(t)}return null}function fd(e){return e?e.__lexicalEditor:null}function pd(e){return $u(e)||e.isToken()}function md(e){return pd(e)||e.isSegmented()}function hd(e){return zf(e)&&e.nodeType===3}function gd(e){return zf(e)&&e.nodeType===9}function _d(e){let t=e;for(;t!=null;){if(hd(t))return t;t=t.firstChild}return null}function vd(e,t,n){let r=Ra[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~Ra.superscript:t===`superscript`?i&=~Ra.subscript:t===`lowercase`?(i&=~Ra.uppercase,i&=~Ra.capitalize):t===`uppercase`?(i&=~Ra.lowercase,i&=~Ra.capitalize):t===`capitalize`&&(i&=~Ra.lowercase,i&=~Ra.uppercase),i}function yd(e){return z(e)||cm(e)||R(e)}function bd(e,t){let n=function(){let e=ed;return ed=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);Mm(),Nm();let r=K(),i=Pm(),a=``+rd++;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 xd(e){i_(e.getParent()===null?e:e.getWritable())}function Sd(e){Nm(),xl(e)&&N(323,e.__key,e.__type);let t=e.__parent===null?d_(e)?e.__slotHost:null:e.__parent,n=Pm(),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?d_(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 Cd(e){Mm();let t=K(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=V(n);e!==null&&e.getWritable()}if(e!==null){let t=V(e);t!==null&&t.getWritable()}}}function wd(){return jm()?null:K()._compositionKey}function Td(e){return!Da&&(ka||Ma)&&e.__text===``&&e.__key===K()._compositionKey}function V(e,t){let n=(t||Pm())._nodeMap.get(e);return n===void 0?null:n}function Ed(e,t){let n=Od(e,K());return n===void 0?null:V(n,t)}function Dd(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Od(e,t){return e[`__lexicalKey_${t._key}`]}function kd(e,t){let n=e;for(;n!=null;){let e=Ed(n,t);if(e!==null)return e;n=nf(n)}return null}function Ad(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function jd(e){return e.read(()=>H().getTextContent())}function Md(e,t){let n=$f(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=V(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:`history-merge`}:void 0)}function H(){return Pm()._nodeMap.get(`root`)}function Nd(e,t){if(!(W(e)&&e.isAttached()&&(nu(e)?e.getChildrenSize()===0:e.isEmpty())&&(nu(e)||t!==null&&Gf(t))))return null;let n=B();return e.append(n),n}function Pd(e){Mm();let t=Pm();e!==null&&(e.dirty=!0,e.setCachedNodes(null),q(e)&&K()._slotsUsed&&Dg(e)),t._selection=e}function Fd(e){Mm(),Es(K(),e)}function Id(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Od(n,t);if(e!==void 0)return e;n=nf(n)}return null}(e,K());return t===null?null:V(t)}function Ld(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Rd(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}var zd=0;function Bd(){return _a?Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5):`s${(++zd).toString(36)}`}function Vd(e){return hd(e)?e.nodeValue:null}function Hd(e,t,n){let r=xf(df(t));if(r===null)return;let i=jf(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=Vd(a),r=kd(a);if(t!==null&&z(r)){if((t===Fa||t===La)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&Ud(r,t,o,s,e)}}}function Ud(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=!Da&&(ka||Ma);if(a.isToken()&&o)return;let c=t;if((o||i)&&(!t.endsWith(Fa)||s&&t===a.getTextContent()||(c=t.slice(0,-Fa.length)),i&&!s)){let e=La,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 Wd(a,``,t);if(Cd(null),ka||Da||Ma)a.remove();else{let e=K();Wd(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let l=a.getParent(),u=Rg(),d=a.getTextContentSize(),f=wd(),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 Wd(a,c,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=Cu(a.getTextContent());a.replace(e),a=e}Wd(a,c,t)}}}function Wd(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=G_(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Gd(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(nu(e))return t;t=e}return null}function Kd(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(Ol(e),!nu(t))return e;let u=Gd(n.getNode());return L(u)&&u.isShadowRoot()&&u.is(Gd(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function qd(e){let t=H();if(q(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(nu(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Kd(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`),Kd(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),Kd(e,a),e)}{let e=t.select(0,t.getChildrenSize());return Pd(Kd(e,t)),e}}function Jd(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function Yd(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=fv(i);return n[t]=e,e}return i}function Xd(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 Zd(e){let t=e.getType(),n=Pm();if(n._readOnly){let e=$f(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 Qd(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 $d(e,t){let n=e.offset;if(e.type===`element`)return Qd(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?Qd(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function ef(e){let t=df(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function U(e,t,...n){return Jm(e,t,n[0],e)}function tf(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&N(75,t),n}function nf(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return Cf(n)?n.host:null}function rf(e){return gd(e)?e:G(e)?e.ownerDocument:null}function af(e,t){let n=parseFloat(e);return isFinite(n)?e.endsWith(`%`)?n*t/100:n:0}function of(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+af(o.scrollPaddingLeft,i)*l,p=d+(i-af(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 sf(e){Mm(),K()._updateTags.add(e)}function cf(e){Mm(),K()._deferred.push(e)}function lf(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function uf(e){let t=rf(e);return t?t.defaultView:null}function df(e){let t=e._window;return t===null&&N(78),t}function ff(e){return L(e)&&e.isInline()||R(e)&&e.isInline()}function pf(e){let t=e.getLatest();for(;t!==null;){if(f_(t)!==null&&L(t))return t;let e=t.getParentOrThrow();if(W(e))return e;t=e}return t}function mf(e){return L(e)&&e.isShadowRoot()}function W(e){return nu(e)||mf(e)}function hf(e,t=!1){let n=e.constructor.clone(e,nd);return bd(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function gf(e){let t=K(),n=e.getType(),r=ad(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 _f(e,t){!nu(e.getParent())||L(t)||R(t)||N(99)}function vf(e){let t=V(e);return t===null&&N(63,e),t}function yf(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 bf(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function xf(e){return _a?(e||window).getSelection():null}function Sf(e){let t=uf(e);return t?t.getSelection():null}function Cf(e){return Bf(e)&&`host`in e}var wf=[];function Tf(e){let t=e.getRootNode();if(t===e||!Cf(t))return wf;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!Cf(e))break;n.push(e),r=e.host}return n}function*Ef(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(gd(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function Df(e){return e===null?document:e.ownerDocument}function Of(){let e=Rm();return Df(e===null?null:e._rootElement)}function kf(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=Tf(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 Af(e,t){let n=kf(e,t);if(n!==null){let e=Mf(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function jf(e,t){let n=kf(e,t);return n===null?e:Nf(n,Pf(e))}function Mf(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 Nf(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 Pf(e){return e.direction}function Ff(e){let t=e.getRootNode();return gd(t)||Cf(t)?t.activeElement:null}function If(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 Lf(e){let t=e.target;if(t!==null&&G(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function Rf(e){return G(e)&&e.tagName===`A`}function G(e){return zf(e)&&e.nodeType===1}function zf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function Bf(e){return zf(e)&&e.nodeType===11}var Vf=/^(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 Hf(e){return!(!G(e)||!e.style.display.startsWith(`inline`))||Vf.test(e.nodeName)}var Uf=/^(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 Wf(e){return(!G(e)||!e.style.display.startsWith(`inline`))&&Uf.test(e.nodeName)}function Gf(e){if(R(e)&&!e.isInline())return!0;if(!L(e)||W(e))return!1;let t=e.getFirstChild(),n=t===null||cm(t)||z(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Kf(){return K()}function qf(e=Kf()){return e._config.dom||hm}function Jf(e,t,n=Kf()){let r=qf(n).$getDOMSlot(e,t,n);return L(e)&&(Yf(r)||N(344,e.getKey(),e.getType())),r}function Yf(e){return e instanceof gs}function Xf(e,t,n=Kf()){return _d(Jf(e,t,n).element)}var Zf=new WeakMap,Qf=new Map;function $f(e){if(!e._readOnly&&e.isEmpty())return Qf;e._readOnly||N(192);let t=Zf.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),Zf.set(e,t)),t}function ep(e){let t=e.constructor.clone(e,nd);return t.afterCloneFrom(e),t}function tp(e){return(t=ep(e))[bl]=!0,t;var t}function np(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 rp(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function ip(e,t){let n=t.style.textAlign;return n&&n in Ba?e.setFormat(n):e}function ap(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function op(e){return!0===e.__lexicalUnmanaged}function sp(e,t=Kf()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function cp(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(G(n)&&n.hasAttribute(`data-lexical-slot`)||Od(n,t)!==void 0)return!1;n=nf(n)}return!1}function lp(e,t){return Gs(e,t)&&e[t]!==Cl[t]}var up=new WeakMap;function dp(e){let t=up.get(e);return t===void 0?function(e){let t=e.prototype!=null&&Ka in e.prototype?e.prototype[Ka]():void 0,n=function(e){if(!(e===Cl||e.prototype instanceof Cl)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{ym.version&&(n=JSON.parse(ym.version))}catch{}N(290,e.name,t,n)}return e===$l||e===Zl||e===Cl}(e),r=!n&&lp(e,`getType`)?e.getType:void 0,i=r&&!(pp 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:Gs(e.prototype,Ka),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};up.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=bp(e);for(let[i,a]of r){let r=wp(e,i,a);if(r===null)continue;if(As(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])Gs(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?mp:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of bp(e).fieldsDerivedFirst){let a=Cp(e,r,i);if(a===null)continue;if(As(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?Sp:[...n.values()]}(e),i=bp(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of Rp(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,fp(dp(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:Dp(r),setters:t},function(e,t,n,r){if(!t&&n){if(!lp(e,`getType`)){let t=e,r=function(){return this===t?n:Cl.getType.call(this)};r[pp]=!0,e.getType=r}if(lp(e,`clone`)||(e.clone=(t,n)=>{td(t);let r=new e;return n!==nd&&r.afterCloneFrom(t),r}),lp(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=zp(e);return n.updateFromJSON===Cl.prototype.updateFromJSON?function(e,t){return kp(e.__state||t.$!==void 0?hc(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!lp(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}let t=e.prototype;Gs(t,`getTextContent`)&&!Gs(t,`getTextContentSize`)&&(e.prototype.getTextContentSize=Cl.prototype.getTextContentSize)}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of Rp(e)){let e=t.prototype;if(Gs(e,`afterCloneFrom`))continue;let r=Lp(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?fp(dp(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[Fp]=!0}}(e),function(e,t){t&&t.inline!==void 0&&Gs(e.prototype,Ka)&&!Object.prototype.hasOwnProperty.call(e.prototype,`isInline`)&&Object.defineProperty(e.prototype,"isInline",{configurable:!0,value:t.inline?jp:Mp,writable:!0})}(e,a)}catch(t){throw up.delete(e),t}return s}(e):t}function fp(e){let{compiled:t}=e;return t===void 0&&N(422,e.config.klass.name),t}var pp=Symbol(`lexical.synthesizedGetType`),mp=[];function hp(e,t,n,r){let i=n.method===void 0?r:n.method,a=bp(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return gp(o,s,i)&&gp(o,s,r)?n:i}function gp(e,t,n){return e[n]===t[n]}function _p(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function vp(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var yp={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function bp(e){let t=dp(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of Rp(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?yp:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}function xp(e){let{fieldsDerivedFirst:t,flatStates:n}=bp(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 Sp=[];function Cp(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?vp(t):r;return As(i)?hp(e,t,i,vp(t)):i}function wp(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?_p(t):r;return As(i)?hp(e,t,i,_p(t)):i}function Tp(e){return e}function Ep(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function Dp(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&&Ep(i,r)}}function Op(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function kp(e,t){let{flatStates:n,generated:r,setters:i}=fp(dp(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=lc(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`?Tp(e)[i.field]=i.setterTable===void 0?a:Gs(i.setterTable,a)?i.setterTable[a]:Op(i):i.setter.call(e,a)}return e}(a,t,i)}function Ap(e){return dp(e).config}function jp(){return!0}function Mp(){return!1}function Np(e){return e===jp||e===Mp}function Pp(e){let t=[];for(let n of[e.getter,e.setter])As(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var Fp=`__lexicalSynthesizedAfterCloneFrom`;function Ip(e){let{declaredBy:t,fieldsBaseFirst:n}=bp(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of Pp(a))r.includes(e)||r.push(e);return r}function Lp(e){let t=Ip(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of Rp(e))if(t!==e)for(let e of Ip(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*Rp(e){for(let t=e;t&&(t===Cl||wl(t.prototype));){let e=Ap(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||Hp(t)}}function zp(e){let t=Kf();Mm();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:gf(r)}var Bp=(e,t)=>{let n=e;for(;n!=null&&!nu(n);){if(t(n))return n;n=n.getParent()}return null};function Vp(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?V(r):t.get(r);e??N(174),n.push(r),r=e.__next}return n}function Hp(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 Up(e){return new qp(rs(e._nodeMap),null,e._slotsUsed)}function Wp(){return new qp(new Map([[`root`,new tu]]),null,!1)}function Gp(e){let t=e.constructor,n=cs(e);if(L(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(Gp(r[e]))}let r=v_(e);if(r.length>0){let i={};for(let n of r){let r=y_(e,n);r===null&&N(366,t.name,n),i[n]=Gp(r)}n.$slots=i}return n}function Kp(e){return e instanceof qp}var qp=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 Wm(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 os(typeof e==`boolean`&&e,()=>Wm(null,this,()=>({root:Gp(H())})))}},Jp=`historic`,Yp=`history-push`,Xp=`history-merge`,Zp=`paste`,Qp=`collaboration`,$p=`skip-collab`,em=`skip-scroll-into-view`,tm=`skip-dom-selection`,nm=`skip-selection-focus`,rm=`composition-end`,im=class extends Zl{$config(){return this.config(`artificial`,{extends:Zl})}createDOM(e){return Of().createElement(`div`)}},am=class extends Cl{$config(){return this.config(`linebreak`,{extends:Cl,generated:Ll,importDOM:{br:e=>lm(e)||um(e)?null:{conversion:om,priority:0}}})}getTextContent(){return`
|
|
4
4
|
`}createDOM(){return Of().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function om(e){return{node:sm()}}function sm(){return gf(new am)}function cm(e){return e instanceof am}function lm(e){let t=e.parentElement;if(t!==null&&Wf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&dm(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&dm(n))return!0}}return!1}function um(e){let t=e.parentElement;if(t!==null&&Wf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&dm(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&dm(r))return!0}return!1}function dm(e){return hd(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function fm(e){console.warn(e)}function pm(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=Wp(),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&&vh(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),Dd(n,e,`root`))}function mm(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of Rp(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 hm={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=ad(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 gm(e){let t=e||{},n=Rm(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Wp(),s=t.namespace||(i===null?Bd():i._config.namespace),c=t.editorState,l=[tu,mu,am,Zu,qu,im,...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===Cl||n.prototype instanceof Cl)){let r=`<unknown>`;try{r=JSON.parse(es)}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))}Ap(n);let a=n.getType(),o=mm(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:dc(l[e]),transforms:o})}}let h=new ym(o,i,m,{disableEvents:a,dom:{...hm,...e&&e.dom},namespace:s,theme:r},u||console.error,d||fm,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(Za,Oh,0),e.registerCommand(Qa,Ah,0),e.registerCommand($a,Mh,0),e.registerCommand(eo,Nh,0),e.registerCommand(mo,Wh,0)}(h),h}function _m(e,t){let n=e.get(t);e.delete(t),n&&n()}function vm(e,t,n){return e.set(t,n),_m.bind(null,e,t)}var ym=class{static version=es;_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 is,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=Bd(),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 vm(this._listeners.update,e)}registerEditableListener(e){return vm(this._listeners.editable,e)}registerDecoratorListener(e){return vm(this._listeners.decorator,e)}registerTextContentListener(e){return vm(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return eh(vm(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 ts,new ts,new ts,new ts,new ts]);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=$f(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 Md(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 U(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=Yd(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,pm(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||function(e){let t=ih.get(e);if(t===void 0)return void Zh();let n=ah.get(t);if(n===void 0)return void Zh();ih.delete(e);let r=fd(e);ud(r)?(function(e){if(e._parentEditor!==null){let t=Rd(e),n=t[t.length-1]._key;qh.get(n)===e&&qh.delete(n)}else qh.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&N(198);let i=Gh(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),n!=null&&t.classList.remove(...n)),e!==null){let t=uf(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,Ds(this),this._updateTags.add(Xp),Gm(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;ih.set(e,n);let r=ah.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},ah.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=Gh(e);i.push(oh.register(n));let a={blur:Uo,click:ph,compositionend:Ih,compositionstart:jh,copy:Fo,cut:Io,dragend:Po,dragover:No,dragstart:Mo,drop:Ao,focus:Ho,input:kh,keydown:Lh,paste:ao,pointerdown:yh,...Ta&&{beforeinput:Dh},...Da&&{keyup:Rh,mousedown:gh}};for(let[n,r]of Object.entries(a))i.push(th(e,n,i=>{Xh(i)||(Yh(i),n===`blur`&&(vh(t,e),t._inputState.isShiftKeyDown=!1,t._inputState.isInsertLineBreak=!1),(t.isEditable()||n===`click`||n===`copy`)&&(typeof r==`function`?r(i,t):U(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,$m(t,()=>{let o=xf(df(t));if(a.type!==`mousedown`){let r=c&&o&&q(J())&&Ig(Rg(),o,t,new Event(`selectionchange`));return r&&Pd(r),xh(t,n,c&&o?jf(o,e).focusNode:null)}let l=Pg(o,t);if(a.defaultPrevented||!a.shiftKey&&l&&!l.isCollapsed())s();else if(o&&i.isSelectionChangeFromMouseDown){Kh(t,o,new Event(`selectionchange`),r),xh(t,a,jf(o,e).focusNode);let n=J();q(n)&&n.isCollapsed()&&!n.is(Rg())&&fh(t,n)}})};i.push(nh(n,{pointercancel:c,pointermove:c,pointerup:c},!0),th(df(t),`blur`,s),t.registerEditableListener(s),nh(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()||cp(Lf(e),t)?null:e}}),th(e,`pointerdown`,e=>{o=e,t._inputState.lastPointerType=e.pointerType},!0)),Da&&i.push(function(e,t){let n=null,r={capture:!0,passive:!0};return eh(th(e,`touchstart`,e=>{let t=e.touches.length===1?e.touches[0]:null;n=t?{x:t.clientX,y:t.clientY}:null},r),th(e,`touchend`,e=>{let r=e.changedTouches[0];n!==null&&r&&e.touches.length===0&&Math.abs(r.clientX-n.x)<=mh&&Math.abs(r.clientY-n.y)<=mh&&t(e),n=null},r))}(e,n=>function(e,t,n){t._inputState.savedInputMode!==void 0&&(_h(e,t,n)||(If(n.ownerDocument)===n&&n.blur(),vh(t,n)))}(n,t,e)))}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Xp),Gm(this);Km(`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=Up(e),r._selection=e._selection?e._selection.clone():null),Es(this);let i=this._pendingEditorState,a=t===void 0?null:t.tag;i===null||i.isEmpty()||(a!=null&&this._updateTags.add(a),Gm(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,$m(this,()=>{if(a&&this._updateTags.add(a),n&&(ha(38),H().append(B())),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=Wp(),i=xm,a=Cm,o=Sm,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,xm=r,Cm=!1,Sm=t,td(null);try{let i=t._nodes;Um(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,xm=i,Cm=a,Sm=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`&&(Om.has(this)||Gm(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]):Qm(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),$m(this,()=>{let r=J(),i=H();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Pd(r.clone()),sf(`focus`),cf(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=xf(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Km(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Im()))}toJSON(){return{editorState:this._editorState.toJSON(ss())}}};function bm(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||u_(e)&&e.__slots!==null)&&bm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o)),o=e.__next}}for(let o of u_(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&d_(e)&&e.__slotHost===t&&((L(e)||u_(e)&&e.__slots!==null)&&bm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var xm=null,Sm=null,Cm=!1,wm=!1,Tm=!1,Em=new Set,Dm=new Set,Om=new Set,km=0,Am={characterData:!0,childList:!0,subtree:!0};function jm(){return Cm||xm!==null&&xm._readOnly}function Mm(){Cm&&N(13)}function Nm(){km>99&&N(14)}function Pm(){return xm===null&&N(195,Lm()),xm}function Fm(e){Pm()!==null&&Sm===null&&(Sm=e),Sm!==e&&ha(378)}function K(){return Sm===null&&N(337,Lm()),Sm}function Im(){K()._dirtyType=2}function Lm(){let e=0,t=new Set,n=ym.version;if(typeof window<`u`)for(let r of Ef(document)){let i=fd(r);if(ud(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 Rm(){return Sm}function zm(e,t,n){let r=t.__type,i=id(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 Bm(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Vm(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 Hm(e){return Um(e,K()._nodes)}function Um(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=Um(o[e],t);a.append(n)}let s=e.$slots;if(s){u_(a)||N(379,i.name);for(let e in s)O_(a,e,Um(s[e],t))}return a}function Wm(e,t,n){let r=xm,i=Cm,a=Sm;xm=t,Cm=!0,Sm=e;try{return n()}finally{xm=r,Cm=i,Sm=a}}function Gm(e,t){e._pendingEditorState!==null&&Sm!==e&&Es(e,!1,!0);let n=Tm;Tm=!0;try{let n=function(e){if(Dm.has(e))return!1;Dm.add(e);try{for(let t=0;e._pendingEditorState!==null;t++){let n=e._pendingEditorState._selection,r=e._rootElement;if(!qm(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;Qm(e,()=>e.dispatchCommand(Ja),void 0,!0)}return!1}finally{Dm.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&&Ym(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=xm,u=Cm,d=Sm,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){Sm=e,xm=n,Cm=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=gl(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),wm)throw t;pm(e,null,r,n),Ds(e),e._dirtyType=2,wm=!0,Gm(e,a),wm=!1;return}finally{p.observe(r,Am),e._updating=f,xm=l,Cm=u,Sm=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=Ad(e)),delete r[a])}(e,n);let b=i?null:xf(df(e));if(e._editable&&b!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){Sm=e,xm=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&bf(t,e,r),Gg(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(Ff(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())yf(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&yf(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=Jf(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=Of().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=fv(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&&bf(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,Am),Sm=d,xm=l}}let x=Om.has(e);Om.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,Km(`decorator`,e,!0,r)),function(e,t,n){let r=jd(t),i=jd(n);r!==i&&Km(`textcontent`,e,!0,i)}(e,t||a,n),Km(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v})}finally{x||Om.delete(e)}f||Ym(e,y),function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Em.has(e)||(Em.add(e),setTimeout(()=>{Em.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(ma(437,e._config.namespace));let n=t.shift();if(n){let[t,r]=n;Qm(e,t,r)}}(e)})(e,t),n&&e._onWarn(ma(436))}finally{Tm=n}}function Km(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 qm(e,t){let n=e._lastNotifiedSelection;return t===null?n!==null:!t.is(n)}function Jm(e,t,n,r){let i=Rd(e),a;if(!Tm)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);if(t===Ja){if(Sm!==e||Cm){let i=!1;return $m(e,()=>{i=Jm(e,t,n,r)}),i}let i=Pm()._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($m(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{Jm(a,t,n,r)}),!1}function Ym(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 Xm(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),Vm(e,i.tag)),a==null?Qm(e,n,i):n()}}return r}function Zm(){let e=Pm();Mm(),e._flushSync=!0}function Qm(e,t,n,r=!1){let i=e._updateTags,a,o=!1,s=!1;n!==void 0&&(a=n.onUpdate,Vm(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=Up(l||c),u=!0),l._flushSync=s;let d=xm,f=Cm,p=Sm,m=e._updating,h=e._lastNotifiedSelection;xm=l,Cm=!1,e._updating=!0,Sm=e;let g=e._headless||e.getRootElement()===null;td(null);try{u&&(g?c._selection!==null&&(l._selection=c._selection.clone()):l._selection=function(e,t){let n=e.getEditorState()._selection,r=xf(df(e));return q(n)||n==null?Ig(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),o=Xm(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()&&Dl(t)}}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=wd(),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()&&Dl(r),r!==void 0&&Bm(r,a)&&zm(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){km++;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&&Bm(c,a)&&zm(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,km++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Xm(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)&&bm(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()||(u_(t)&&t.__slots!==null&&bm(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&&Dg(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 cg(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(),Gm(e);return}finally{xm=d,Cm=f,Sm=p,e._updating=m,km=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,Gm(e)):u&&od(()=>{Gm(e)}):(l._flushSync=!1,u&&(i.clear(),e._deferred=[],e._pendingEditorState=null,e._lastNotifiedSelection=h)))}function $m(e,t,n){Sm===e&&n===void 0?jm()?Qm(e,t,n):t():Qm(e,t,n)}function eh(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function th(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}function nh(e,t,n){return eh(...Object.entries(t).map(([t,r])=>th(e,t,r,n)))}var rh=30,ih=new WeakMap,ah=new WeakMap,oh=Qo(e=>(e.addEventListener(`selectionchange`,Jh),()=>e.removeEventListener(`selectionchange`,Jh)));function sh(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=xf(df(l));u=e===null?null:jf(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&&(!Ta||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Ld(n))&&o.offset!==s.offset&&!c.isComposing()||md(c)||c.isDirty()&&m>1||(i||!Ta)&&p!==null&&!c.isComposing()&&d!==Xf(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=pd(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 ch(e,t){return hd(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function lh(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=jf(e,t._rootElement),s=t._inputState;if(s.isSelectionChangeFromDOMUpdate){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,ch(r,i)&&ch(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}$m(t,()=>{if(!n)return void Pd(null);if(!ld(t,r,a))return;let c=s.mouseDrag;!c||c.type===`mousedown`&&c.defaultPrevented||xh(t,c,a);let l=bh.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(),Pd(u))}if(s.postDeleteSelectionToRestore=null,q(u)){let n=u.anchor;if(u.isCollapsed())e.type===`Range`&&r===a&&(u.dirty=!0),fh(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,_=Pa,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||qm(e,t))&&e.dispatchCommand(Ja)})(t,u,u!==null&&(u.dirty&&!l||!q(u)))})}function uh(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function dh(e,t){uh(e,t.getFormat(),t.getStyle())}function fh(e,t){let n=t.anchor,r=n.getNode(),i=df(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?uh(t,o,s):n.type===`text`?(z(r)||N(141),dh(t,r)):(e.isComposing()||H().getTextContent()!==``)&&(L(r)||N(259),r.isEmpty()?Lg(t,``):uh(t,t.format,``))}function ph(e,t){$m(t,()=>{let n=J(),r=xf(df(t)),i=Rg();if(r){if(q(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!nu(t)&&H().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`||Da&&t._inputState.lastPointerType!==`mouse`){let n=jf(r,t._rootElement).anchorNode;(G(n)||hd(n))&&Pd(Ig(i,r,t,e))}}if(Ca&&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(G(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=Ig(i,r,t,e);s===null?r.removeAllRanges():Pd(s)}}U(t,Xa,e)})}var mh=10,hh=`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 gh(e,t){let n=t.getRootElement();n!==null&&(_h(e,t,n)?(e.preventDefault(),If(n.ownerDocument)!==n&&(t._inputState.savedInputMode===void 0&&(t._inputState.savedInputMode=n.getAttribute(`inputmode`)),n.setAttribute(`inputmode`,`none`),n.focus({preventScroll:!0}))):vh(t,n))}function _h(e,t,n){if(t._inputState.lastPointerType===`mouse`)return!1;let r=Lf(e);if(!zf(r))return!1;let i=!1;for(let e=r;e!==null;e=nf(e)){if(e===n)return i;if(e.nodeType===1){let t=e;if(t.matches(hh))return!1;t.getAttribute(`data-lexical-decorator`)===`true`&&(i=!0)}}return!1}function vh(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 yh(e,t){let n=Lf(e),r=e.pointerType;zf(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&$m(t,()=>{cp(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}var bh=new WeakSet;function xh(e,t,n=null){let r=J(),i=r&&r.clone();(function(e,t,n){let r=Rg(),i=t.type===`mousedown`,a=i&&!t.shiftKey,o=n&&kd(n);R(o)&&(i?a&&o.isInline()&&o.selectPrevious():q(r)&&Pd(r.clone()));let s=J(),c=s||(a?Mg():q(r)?r.clone():null),l=e.getRootElement(),u=l&&l.getRootNode();if(!q(c)||a&&!c.isCollapsed()||!gd(u)&&!Cf(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&&kd(h),_=(e,t)=>L(e)?t===`next`?e.getLastDescendant():e.getFirstDescendant():e,v=[null],y=L(g)&&!g.isInline()&&(nu(g)?Bp(f.getNode(),Ag):g);for(let e of y?q_(y,`next`):[])v.push(Y(e.origin,`previous`),e);let b=df(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(nf(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||cm(T)||O&&(C===y?2*O.right>u+h:2*O.left<u+h))){if(!n.is(_($d(f,C),w))){let e=Y(n,w);Eu(f,e),a&&Eu(d,e)}s||Pd(c);return}}if(R(o)&&!i){let t=b.document,n=t.caretPositionFromPoint&&t.caretPositionFromPoint(p,m,{shadowRoots:Cf(u)?[u]:[]}),r=n&&Sg(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)&&bh.add(o),t.type===`mousedown`&&q(a)&&Lg(a,q(i)?i.anchor.key:``)}function Sh(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Ch(e){let{lastKeyCode:t}=K()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
|