@tickernelz/wardmote-ui 2026.1113.0 → 2026.1114.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (834) hide show
  1. package/dist/announcement-preview.svg +1 -1
  2. package/dist/assets/AccessSelectIdentity-Dp--1kWe.js +1 -0
  3. package/dist/assets/ActiveAgentsPanel-CKzCe8AC.js +1 -0
  4. package/dist/assets/AdapterManager-DFPaPUUr.js +1 -0
  5. package/dist/assets/AdvancedToolsRoute-CN5fWS4T.js +39 -0
  6. package/dist/assets/AgentActionButtons-a9LacJPP.js +1 -0
  7. package/dist/assets/AgentAvatar-DgGEobSY.js +1 -0
  8. package/dist/assets/AgentBubbleActionRow-DIr3TdR9.js +1 -0
  9. package/dist/assets/AgentCharacter-BTEn5MBu.js +2 -0
  10. package/dist/assets/AgentChat-D5FDUYuV.js +1 -0
  11. package/dist/assets/AgentChats-TN5SE_gN.js +1 -0
  12. package/dist/assets/AgentDefaults-CiVVS_pQ.js +1 -0
  13. package/dist/assets/AgentDetail-bCAmWRXs.js +38 -0
  14. package/dist/assets/AgentIconPicker-D87bSkxE.js +1 -0
  15. package/dist/assets/AgentIdentity-I_kB4rMX.js +1 -0
  16. package/dist/assets/AgentMailCredentialField-L4T0REEW.js +1 -0
  17. package/dist/assets/AgentMultiSelect-DsJfZtR2.js +1 -0
  18. package/dist/assets/AgentRoleEditor-DTKNKZXs.js +1 -0
  19. package/dist/assets/AgentSetupPrompt-DYBB5Med.js +30 -0
  20. package/dist/assets/AgentTodoCard-BpmvHEsm.js +1 -0
  21. package/dist/assets/Agents-CToMMxGu.js +3 -0
  22. package/dist/assets/AppDetail-P807ou0a.js +5 -0
  23. package/dist/assets/AppLogo-CZr1Y48O.js +1 -0
  24. package/dist/assets/AppNotConnected-DuA4PukX.js +1 -0
  25. package/dist/assets/ApprovalCard-BDdZDBMj.js +1 -0
  26. package/dist/assets/ApprovalDetail-CVgy1uNi.js +1 -0
  27. package/dist/assets/ApprovalPayload-H5zW6yQ4.js +1 -0
  28. package/dist/assets/Approvals-DL6kx45P.js +1 -0
  29. package/dist/assets/AppsConnect-DH7aSjtS.js +1 -0
  30. package/dist/assets/AppsReview-Bf7oB0ES.js +1 -0
  31. package/dist/assets/ArtifactCard-Cp4KPgZl.js +1 -0
  32. package/dist/assets/Artifacts-Dz3eHCaQ.js +1 -0
  33. package/dist/assets/AssistantConnection-5Y4fBVXq.js +1 -0
  34. package/dist/assets/AttentionInteractionResolver-DlP6a6AG.js +1 -0
  35. package/dist/assets/AuditHub-Dz2UXl0c.js +1 -0
  36. package/dist/assets/Auth-_P9t1YSS.js +3 -0
  37. package/dist/assets/BoardChat-DsMVXf5M.js +18 -0
  38. package/dist/assets/BoardClaim-CsomHmd6.js +1 -0
  39. package/dist/assets/BootstrapSetupUxLab-CWWisaHp.js +1 -0
  40. package/dist/assets/BreadcrumbContext-BVZDZoC0.js +1 -0
  41. package/dist/assets/Browse-Be6aSv-F.js +1 -0
  42. package/dist/assets/BudgetPolicyCard-Dka022-Z.js +1 -0
  43. package/dist/assets/CaseDetail-DdJrlm0m.js +2 -0
  44. package/dist/assets/CaseIdentifierKey-D8Xi16PS.js +1 -0
  45. package/dist/assets/Cases-Da1szfrr.js +2 -0
  46. package/dist/assets/ChatEndpointDetail-DSOH-zfs.js +5 -0
  47. package/dist/assets/ChatEndpointSetup-J23lq-xi.js +1 -0
  48. package/dist/assets/ChatIdentityConfirm-DCI5BnWo.js +1 -0
  49. package/dist/assets/ChoiceControls-B9yrYshK.js +1 -0
  50. package/dist/assets/CliAuth-CRG0c0EH.js +1 -0
  51. package/dist/assets/CommentAttributionChip-fz5Mn0RW.js +1 -0
  52. package/dist/assets/Companies-BkHWSxdB.js +1 -0
  53. package/dist/assets/CompanyAccess-BaiGlxY1.js +1 -0
  54. package/dist/assets/CompanyActivity-CMBXXwCw.js +1 -0
  55. package/dist/assets/CompanyConnections-CVzsivTW.js +1 -0
  56. package/dist/assets/CompanyContext-CSrVsSze.js +1 -0
  57. package/dist/assets/CompanyEnvironments-K7piWRrx.js +3 -0
  58. package/dist/assets/CompanyExport-Bo8tUPaY.js +4 -0
  59. package/dist/assets/CompanyImport-CBVjSXPA.js +1 -0
  60. package/dist/assets/CompanySettings-CuU9qSp5.js +1 -0
  61. package/dist/assets/CompanySettingsPluginPage-59_bMQQ3.js +1 -0
  62. package/dist/assets/CompanySkills-GBJMThWx.js +10 -0
  63. package/dist/assets/ComposerAddMenu-D9z2INup.js +3 -0
  64. package/dist/assets/ConfigureBuiltInAgentModal-D8Xnl51H.js +1 -0
  65. package/dist/assets/ConnectionSetupFlow-DKjP5RBZ.js +40 -0
  66. package/dist/assets/CopyText-Cr673_Kx.js +1 -0
  67. package/dist/assets/CopyableGatewayUrl-GuvA-DoQ.js +1 -0
  68. package/dist/assets/CrossIssueCollaborationUxLab-CEh5B2iJ.js +1 -0
  69. package/dist/assets/Dashboard-Cgj9BeTt.js +2 -0
  70. package/dist/assets/DashboardLive-Ku1cHAj9.js +1 -0
  71. package/dist/assets/DecisionDateChips-Z97mgInq.js +1 -0
  72. package/dist/assets/DecisionModelSettings-NrNERkaW.js +1 -0
  73. package/dist/assets/DecisionQueuePage-D8cyKm4V.js +1 -0
  74. package/dist/assets/DesignGuide-DvO3NaE-.js +23 -0
  75. package/dist/assets/DocumentFrameHeader-DTSqcw4Q.js +1 -0
  76. package/dist/assets/EmailConnectionAccess-DAFMofYX.js +1 -0
  77. package/dist/assets/EmailEndpointSetup-Cm_KKjjw.js +1 -0
  78. package/dist/assets/EnforcementBanner-DWPluRU0.js +1 -0
  79. package/dist/assets/EntityRow-BIfupmlZ.js +1 -0
  80. package/dist/assets/ExecutionWorkspaceDetail-CVB4ZY8I.js +19 -0
  81. package/dist/assets/FilterBar-5ta25FCb.js +1 -0
  82. package/dist/assets/FoldCurtain-DUAOdtCt.js +1 -0
  83. package/dist/assets/FolderControls-B7TWghGc.js +1 -0
  84. package/dist/assets/GatewayDetail-DB1J44bF.js +2 -0
  85. package/dist/assets/GatewaysList-CKSwMmOi.js +1 -0
  86. package/dist/assets/GoalDetail-Bscma2qU.js +1 -0
  87. package/dist/assets/GoalTree-jEFB788p.js +1 -0
  88. package/dist/assets/Goals-jLNZ4UKT.js +1 -0
  89. package/dist/assets/Identity-Cv_2a9qJ.js +1 -0
  90. package/dist/assets/ImageGalleryModal-CghUxjQC.js +1 -0
  91. package/dist/assets/Inbox-DHwNNh-Z.js +2 -0
  92. package/dist/assets/InlineBanner-VQ5mstsR.js +1 -0
  93. package/dist/assets/InlineEditor-BKBqNA21.js +1 -0
  94. package/dist/assets/InlineEntitySelector-v2Q4C8oT.js +1 -0
  95. package/dist/assets/InstanceAccess-Ns2rAmva.js +1 -0
  96. package/dist/assets/InstanceAdvanced-C5IIPBwh.js +1 -0
  97. package/dist/assets/InstanceFeatures-DUQnBkxy.js +1 -0
  98. package/dist/assets/InviteLanding-BHmCRaWY.js +1 -0
  99. package/dist/assets/IssueChatLongThreadPerf-JH8rtLk0.js +2 -0
  100. package/dist/assets/IssueChatThread-ByTyrsxz.js +40 -0
  101. package/dist/assets/IssueDetail-BIif8Swu.js +9 -0
  102. package/dist/assets/IssueDocumentAnnotations-BVdH4RTa.js +2 -0
  103. package/dist/assets/IssueOutputSection-CFE6aU9L.js +1 -0
  104. package/dist/assets/IssueRecoveryActionCard-DBgE7aMm.js +1 -0
  105. package/dist/assets/IssueReferenceActivitySummary-CbpSjmdV.js +1 -0
  106. package/dist/assets/IssueReferencePill-DAEplgLd.js +1 -0
  107. package/dist/assets/IssueThreadInteractionCard-C3LFe8cu.js +9 -0
  108. package/dist/assets/IssueWriteDenialNotice-BCJ74Czu.js +1 -0
  109. package/dist/assets/Issues-B5QG33RC.js +3 -0
  110. package/dist/assets/JoinRequestQueue-ZZq3jWW-.js +1 -0
  111. package/dist/assets/JsonSchemaForm-ixDd6e-N.js +1 -0
  112. package/dist/assets/LiveNowTodoLine-D52WDE8-.js +1 -0
  113. package/dist/assets/ManagedAiConnectionDetails-C9nV0oIT.js +1 -0
  114. package/dist/assets/MarkdownBody-BTjuUgFa.js +16 -0
  115. package/dist/assets/MarkdownEditor-DXD-Cu3u.js +85 -0
  116. package/dist/assets/McpConnect-Bk8Qskqw.js +1 -0
  117. package/dist/assets/MembershipAction-DjdBY6Bk.js +1 -0
  118. package/dist/assets/MetricCard-DaAh5x_N.js +1 -0
  119. package/dist/assets/MissingPluginTabPlaceholder-DT47WyQq.js +1 -0
  120. package/dist/assets/ModelsAndProviders-BtbhNxf_.js +1 -0
  121. package/dist/assets/MootMark-DZAfkwdv.js +1 -0
  122. package/dist/assets/NewAgent-C4JqnMkp.js +1 -0
  123. package/dist/assets/OmpAllSettings-aHENTYf5.js +1 -0
  124. package/dist/assets/OpenwaGatewayManager-DH3bF7fa.js +2 -0
  125. package/dist/assets/PathInstructionsModal-D4GUYKIT.js +1 -0
  126. package/dist/assets/PipelineSettings-CCoxV9Es.js +2 -0
  127. package/dist/assets/Pipelines-DaQPh688.js +1 -0
  128. package/dist/assets/PixelsOffice-D1X7mdpk.js +2 -0
  129. package/dist/assets/PluginManager-4rrrAOLG.js +1 -0
  130. package/dist/assets/PluginPage-B4kdPADI.js +1 -0
  131. package/dist/assets/PluginSettings-yP8NX-sM.js +1 -0
  132. package/dist/assets/ProfileDetailRoute-DMdAvFmb.js +1 -0
  133. package/dist/assets/ProfileSettings-DVm3Tqzs.js +1 -0
  134. package/dist/assets/ProfileWizardRoute-CijS7-aN.js +1 -0
  135. package/dist/assets/ProjectDetail-DeLSGbmz.js +1 -0
  136. package/dist/assets/ProjectWorkspaceDetail-DPajDjA-.js +29 -0
  137. package/dist/assets/ProjectWorkspacesContent-BCATCcZI.js +1 -0
  138. package/dist/assets/Projects-DPmo6PFV.js +1 -0
  139. package/dist/assets/PublicIssueSharePage-B_W1Qpy_.js +1 -0
  140. package/dist/assets/QuestionForm-B8-PWz3B.js +7 -0
  141. package/dist/assets/QuotaBar-_ok6Pek4.js +1 -0
  142. package/dist/assets/RepositoryEditor-CFt-HPgf.js +1 -0
  143. package/dist/assets/ResponsibleUserDenialNotice-DKNk1-BK.js +1 -0
  144. package/dist/assets/ResponsibleUserDenialUxLab-Bt9vnHJz.js +1 -0
  145. package/dist/assets/ReviewQueueCard-DhfCjwYP.js +1 -0
  146. package/dist/assets/RichWorkProductCard-rJC8tWnB.js +1 -0
  147. package/dist/assets/RoutineActivityRow-B69N6Hcy.js +1 -0
  148. package/dist/assets/RoutineDetail-Cb0oYk5B.js +2 -0
  149. package/dist/assets/RoutineRunVariablesDialog-CWNUGmiH.js +1 -0
  150. package/dist/assets/RoutineVariablesEditor-0dQ10yPY.js +1 -0
  151. package/dist/assets/Routines-Ct6W3Ht-.js +1 -0
  152. package/dist/assets/ScrollToBottom-BvL4b3BQ.js +1 -0
  153. package/dist/assets/Search-CXiBakEC.js +1 -0
  154. package/dist/assets/SearchableSelect-CIJ5K8ih.js +1 -0
  155. package/dist/assets/Secrets-XUpMCMhK.js +4 -0
  156. package/dist/assets/SetupWizard-C8qzkJn1.js +1 -0
  157. package/dist/assets/SidebarContext-CF3RWLxh.js +1 -0
  158. package/dist/assets/SidebarNavItem-DV9nmC7O.js +1 -0
  159. package/dist/assets/SkillBinaryFile-DNe-MmCv.js +1 -0
  160. package/dist/assets/SkillCardIcon-BTCafp8l.js +2 -0
  161. package/dist/assets/SkillSourceTree-Brg47aIX.js +2 -0
  162. package/dist/assets/SkillSources-C3kuN9Hz.js +2 -0
  163. package/dist/assets/SkillStudio-DVVVKjdn.js +9 -0
  164. package/dist/assets/SourceTrustBadge-D-MXuX_l.js +1 -0
  165. package/dist/assets/StatusCards-BmNOGr1d.js +1 -0
  166. package/dist/assets/StatusIcon-0GcYXDdN.js +1 -0
  167. package/dist/assets/SummarySlotCard-DiTaQ4km.js +1 -0
  168. package/dist/assets/TaskChatComposerTakeoverContext-BJAHPHve.js +1 -0
  169. package/dist/assets/TaskChatLab-fOJfHKjI.js +11 -0
  170. package/dist/assets/TaskChatMarker-Cgyrmeab.js +2 -0
  171. package/dist/assets/TaskChatProtocolCard-DrIe_IYV.js +1 -0
  172. package/dist/assets/TaskChatThreadView-DKqNA1fZ.js +4 -0
  173. package/dist/assets/TaskDetailRelationsPanel-C9mJfMvL.js +1 -0
  174. package/dist/assets/TaskTreeControls-B1CSnDVK.js +3 -0
  175. package/dist/assets/Terminal-CGmILZtz.js +1 -0
  176. package/dist/assets/TerminalView-BqCU9Vc3.js +58 -0
  177. package/dist/assets/ThemeContext-DYRUK81c.js +1 -0
  178. package/dist/assets/ThemeToggle-BWFlFnSX.js +1 -0
  179. package/dist/assets/ToastContext-DMdt9oTd.js +1 -0
  180. package/dist/assets/ToolsAdminGate-BI5-WYC3.js +1 -0
  181. package/dist/assets/TrustPresetSection-D4qB_VZo.js +1 -0
  182. package/dist/assets/UserProfile-Cavc3nhB.js +1 -0
  183. package/dist/assets/WebhookUrlWarning-D0GLAS0A.js +1 -0
  184. package/dist/assets/WhatNeedsMe-B7BSt_wb.js +1 -0
  185. package/dist/assets/WorkspaceRuntimeControls-T4YUoZvK.js +1 -0
  186. package/dist/assets/Workspaces-CDTiwIHd.js +1 -0
  187. package/dist/assets/access-GAosX22P.js +1 -0
  188. package/dist/assets/activity-BVYJmFzR.js +1 -0
  189. package/dist/assets/activity-CB9AQzZO.js +1 -0
  190. package/dist/assets/activity-format-zP89NM00.js +1 -0
  191. package/dist/assets/adapter-display-registry-Bk0KWAHT.js +1 -0
  192. package/dist/assets/adapters-Dp0USyWg.js +1 -0
  193. package/dist/assets/agent-avatar-url-C-slYk2A.js +1 -0
  194. package/dist/assets/agent-config-primitives-BsZUnbf2.js +1 -0
  195. package/dist/assets/agentChats-CjHr739f.js +1 -0
  196. package/dist/assets/agents-DmlgUVso.js +1 -0
  197. package/dist/assets/alert-dialog-Blls2GnU.js +1 -0
  198. package/dist/assets/app-connect-policy-CUzbEnhU.js +1 -0
  199. package/dist/assets/archive-CTfe4zq5.js +1 -0
  200. package/dist/assets/archive-restore-DeLPtKS0.js +1 -0
  201. package/dist/assets/arrow-down-Dg4PKbmt.js +1 -0
  202. package/dist/assets/arrow-down-left-C8jhGqM0.js +1 -0
  203. package/dist/assets/arrow-left-Ce_LIut0.js +1 -0
  204. package/dist/assets/arrow-right-BL5kYtCZ.js +1 -0
  205. package/dist/assets/arrow-up-D_YoSnQD.js +1 -0
  206. package/dist/assets/arrow-up-down-Bpe9xqCo.js +1 -0
  207. package/dist/assets/arrow-up-right-BLYWl-we.js +1 -0
  208. package/dist/assets/artifacts-9HWeqVeB.js +1 -0
  209. package/dist/assets/assets-TRDkBfss.js +1 -0
  210. package/dist/assets/attachment-icon-4xDiQblX.js +1 -0
  211. package/dist/assets/avatar-UO226cef.js +1 -0
  212. package/dist/assets/badge-DuA2EgZC.js +1 -0
  213. package/dist/assets/badge-check-Bd7IYIB2.js +1 -0
  214. package/dist/assets/bot-C9arfJWx.js +1 -0
  215. package/dist/assets/boxes-fV98p9-r.js +1 -0
  216. package/dist/assets/braces-BEVhwPeU.js +1 -0
  217. package/dist/assets/browser-use-D2HTf8rD.js +1 -0
  218. package/dist/assets/budgets-DvML2uxG.js +1 -0
  219. package/dist/assets/button-CMwV3L1P.js +1 -0
  220. package/dist/assets/calendar-clock-BVFltraz.js +1 -0
  221. package/dist/assets/card-Bru3x_SJ.js +1 -0
  222. package/dist/assets/cases-m9RZ5Cym.js +1 -0
  223. package/dist/assets/chatEndpoints-BKsIHowE.js +1 -0
  224. package/dist/assets/check-Ctsrlfa-.js +1 -0
  225. package/dist/assets/checkbox-BHQhs41k.js +1 -0
  226. package/dist/assets/chevron-down-BCvxsWfI.js +1 -0
  227. package/dist/assets/chevron-left-DP4zwC0G.js +1 -0
  228. package/dist/assets/chevron-right-s7L6hXXq.js +1 -0
  229. package/dist/assets/chevron-up-rFDQGA-7.js +1 -0
  230. package/dist/assets/chip-DsDe6yck.js +1 -0
  231. package/dist/assets/circle-IAHLDvLO.js +1 -0
  232. package/dist/assets/circle-alert-C-L4OsHh.js +1 -0
  233. package/dist/assets/circle-dot-zr8GONq2.js +1 -0
  234. package/dist/assets/circle-question-mark-B1jR2is9.js +1 -0
  235. package/dist/assets/circle-slash-Bx5HrFMb.js +1 -0
  236. package/dist/assets/circle-x-CFlSbYzD.js +1 -0
  237. package/dist/assets/clipboard-paste-D9rNPVFj.js +1 -0
  238. package/dist/assets/clock-CzrJT_cP.js +1 -0
  239. package/dist/assets/cloud-BktKFMPI.js +1 -0
  240. package/dist/assets/code-xml-BWc3OvMt.js +1 -0
  241. package/dist/assets/coins-C6QoCoLN.js +1 -0
  242. package/dist/assets/collapsible-CqjPlqOa.js +1 -0
  243. package/dist/assets/columns-3-CqC5nP-p.js +1 -0
  244. package/dist/assets/command-Ca3v36Mu.js +5 -0
  245. package/dist/assets/companies-query-D9PxIiMT.js +1 -0
  246. package/dist/assets/connection-identity-YKZfppDS.js +1 -0
  247. package/dist/assets/connection-owner-Cx9obLlP.js +1 -0
  248. package/dist/assets/copy-_wvZOjTe.js +1 -0
  249. package/dist/assets/createLucideIcon-DJi9suAC.js +94 -0
  250. package/dist/assets/decision-models-CD2AFC2a.js +1 -0
  251. package/dist/assets/definition-DZi-yBK2.js +1 -0
  252. package/dist/assets/dialog-CKUblzlR.js +1 -0
  253. package/dist/assets/dist-BNOqBr2U.js +1 -0
  254. package/dist/assets/dist-Bm2igrAN.js +1 -0
  255. package/dist/assets/dist-BuHnL0GV.js +1 -0
  256. package/dist/assets/dist-CClcSLHe.js +1 -0
  257. package/dist/assets/dist-CtvMIwRC.js +1 -0
  258. package/dist/assets/dist-CvHBQVAC.js +1 -0
  259. package/dist/assets/dist-DC4EOH0g.js +1 -0
  260. package/dist/assets/dist-DMg_vOQs.js +1 -0
  261. package/dist/assets/dist-DOIzg2vq.js +1 -0
  262. package/dist/assets/dist-DTFX_1D6.js +1 -0
  263. package/dist/assets/dist-DcOFbG-W.js +1 -0
  264. package/dist/assets/dist-SzpVz8Pd.js +1 -0
  265. package/dist/assets/dropdown-menu-CqRAF7Oj.js +1 -0
  266. package/dist/assets/ellipsis-BTiLRUn4.js +1 -0
  267. package/dist/assets/ellipsis-vertical-DWXPf6Ow.js +1 -0
  268. package/dist/assets/email-BNu4jmOH.js +1 -0
  269. package/dist/assets/environment-variables-editor-CCxeFKKk.js +1 -0
  270. package/dist/assets/environments-BLQs1ScE.js +1 -0
  271. package/dist/assets/es2015-C3hhXnTu.js +41 -0
  272. package/dist/assets/external-link-nl1b263c.js +1 -0
  273. package/dist/assets/eye-DRS7RbEp.js +1 -0
  274. package/dist/assets/eye-off-CVVA-EWh.js +1 -0
  275. package/dist/assets/fast-responses-DZodQpLv.js +1 -0
  276. package/dist/assets/file-N19tC0jj.js +1 -0
  277. package/dist/assets/file-code-corner-CmZ_RihF.js +1 -0
  278. package/dist/assets/file-pen-line-DX6PZQXR.js +1 -0
  279. package/dist/assets/file-question-mark-CTomlKBX.js +1 -0
  280. package/dist/assets/file-search-DZpRLS-j.js +1 -0
  281. package/dist/assets/file-text-Cw7ntqRx.js +1 -0
  282. package/dist/assets/flag-R0AVTKGk.js +1 -0
  283. package/dist/assets/flask-conical-CEYKkO5k.js +1 -0
  284. package/dist/assets/folder-git-2-D2Hz-CeQ.js +1 -0
  285. package/dist/assets/folder-open-8WDYv4mw.js +1 -0
  286. package/dist/assets/folder-search-D0WkVTZt.js +1 -0
  287. package/dist/assets/funnel-DWwD2WCu.js +1 -0
  288. package/dist/assets/git-pull-request-CdCSG7CL.js +1 -0
  289. package/dist/assets/github-icon-Bbgf67tg.js +1 -0
  290. package/dist/assets/health-DF7yrggW.js +1 -0
  291. package/dist/assets/heartbeats-DOyojsaN.js +1 -0
  292. package/dist/assets/inbox-C08arfF_.js +1 -0
  293. package/dist/assets/inboxArchiveCache-D8QGdg49.js +1 -0
  294. package/dist/assets/index-B7mmhFG7.js +67 -0
  295. package/dist/assets/index-KZ2bEg2H.css +2 -0
  296. package/dist/assets/info-DXpx_HA2.js +1 -0
  297. package/dist/assets/input-DobnTAyB.js +1 -0
  298. package/dist/assets/instanceSettings-D8g_QlS-.js +1 -0
  299. package/dist/assets/interaction-audience-BRS_4X7S.js +1 -0
  300. package/dist/assets/interaction-card-visibility-DcyO470L.js +1 -0
  301. package/dist/assets/issue-blockers-DLfa24KC.js +1 -0
  302. package/dist/assets/issue-output-CU3gasZ1.js +1 -0
  303. package/dist/assets/issue-properties-C_y5-tny.js +4 -0
  304. package/dist/assets/issue-share-j9E_vLuf.js +1 -0
  305. package/dist/assets/issue-workspace-selection-ChtddJZC.js +1 -0
  306. package/dist/assets/key-round-0RqEOB_C.js +1 -0
  307. package/dist/assets/label-BPz3pg9_.js +1 -0
  308. package/dist/assets/layout-dashboard-DClZjSaR.js +1 -0
  309. package/dist/assets/link-2-CND-9QZ2.js +1 -0
  310. package/dist/assets/link-BITB8yRp.js +1 -0
  311. package/dist/assets/list-filter-h7_mdWEH.js +1 -0
  312. package/dist/assets/list-todo-BmObdeVq.js +1 -0
  313. package/dist/assets/log-in-nSyhNjrD.js +1 -0
  314. package/dist/assets/maximize-2-DgliXYEr.js +1 -0
  315. package/dist/assets/mention-chips-D8856Q0_.js +17 -0
  316. package/dist/assets/message-square-plus-yRlSBxPl.js +1 -0
  317. package/dist/assets/minus-WOgDAWiC.js +1 -0
  318. package/dist/assets/model-fallback-X_YvC3rj.js +1 -0
  319. package/dist/assets/model-picker-fields-235ien8Z.js +1 -0
  320. package/dist/assets/network-RCsafDTP.js +1 -0
  321. package/dist/assets/octagon-alert-CeNhknXC.js +1 -0
  322. package/dist/assets/octagon-x-CBcXy1zJ.js +1 -0
  323. package/dist/assets/omp-settings-model-uqWvMNr2.js +1 -0
  324. package/dist/assets/package-CYC5MDhY.js +1 -0
  325. package/dist/assets/pause-CJSwJvLv.js +1 -0
  326. package/dist/assets/pen-line-CxWwoiP_.js +1 -0
  327. package/dist/assets/pipeline-stage-presentation-jxAxpF6f.js +2 -0
  328. package/dist/assets/pipelines-vN196fc4.js +1 -0
  329. package/dist/assets/play-CJNuUj69.js +1 -0
  330. package/dist/assets/plug-VjpaJcMq.js +1 -0
  331. package/dist/assets/plugins-CF2QITJB.js +1 -0
  332. package/dist/assets/plus-C6fnr28l.js +1 -0
  333. package/dist/assets/popover-BhYHYj7q.js +1 -0
  334. package/dist/assets/power-B3xsPeS4.js +1 -0
  335. package/dist/assets/presentation-mode-Bk6TnKr9.js +1 -0
  336. package/dist/assets/profile-summary-unutni_7.js +1 -0
  337. package/dist/assets/projects-mixWrT5q.js +1 -0
  338. package/dist/assets/proposal-review-kucrRJgS.js +1 -0
  339. package/dist/assets/queryClient-BOli2vjj.js +1 -0
  340. package/dist/assets/queryKeys-DYV5MhM_.js +1 -0
  341. package/dist/assets/radio-DnDOdgWd.js +1 -0
  342. package/dist/assets/radio-card-DVZaXlw0.js +1 -0
  343. package/dist/assets/recent-agent-chats-DIU_z_qg.js +1 -0
  344. package/dist/assets/refresh-cw-B_Oki9wZ.js +1 -0
  345. package/dist/assets/repeat-DGPKlc5I.js +1 -0
  346. package/dist/assets/resizable-panels-Qjbo0P05.js +1 -0
  347. package/dist/assets/review-policy-BL48kYvb.js +1 -0
  348. package/dist/assets/rotate-ccw-CQEJ4ewP.js +1 -0
  349. package/dist/assets/rotate-cw-DnCrcS38.js +1 -0
  350. package/dist/assets/router-2UfGeejU.js +1 -0
  351. package/dist/assets/routines-KPtwxuS7.js +1 -0
  352. package/dist/assets/runRetryState-BdjK4QQj.js +1 -0
  353. package/dist/assets/save-CJ1Iqyew.js +1 -0
  354. package/dist/assets/schema-config-fields-DggSrP5S.js +1 -0
  355. package/dist/assets/scroll-area-P1KpIQWe.js +1 -0
  356. package/dist/assets/scroll-text-BpkOrME3.js +1 -0
  357. package/dist/assets/search-04O7m-IF.js +1 -0
  358. package/dist/assets/secrets-CZifgF0J.js +1 -0
  359. package/dist/assets/select-V0Hm_q4f.js +1 -0
  360. package/dist/assets/send-mNwfi_F1.js +1 -0
  361. package/dist/assets/separator-B2LFqBpM.js +1 -0
  362. package/dist/assets/server-DIhG4RDC.js +1 -0
  363. package/dist/assets/server-cog-DV4ua9lY.js +1 -0
  364. package/dist/assets/settings-DuZndeX2.js +1 -0
  365. package/dist/assets/shared-hwt7Xn4W.js +1 -0
  366. package/dist/assets/sheet-jd7y5x4-.js +1 -0
  367. package/dist/assets/shield-BhaVQdWV.js +1 -0
  368. package/dist/assets/shield-alert-Be9GuMrS.js +1 -0
  369. package/dist/assets/shield-check-B0HVjzM_.js +1 -0
  370. package/dist/assets/shield-question-mark-D1_en6pn.js +1 -0
  371. package/dist/assets/shield-x-D-Ice3nf.js +1 -0
  372. package/dist/assets/sidebarPreferences-vEHBC54I.js +1 -0
  373. package/dist/assets/skeleton-Bv_lQagE.js +1 -0
  374. package/dist/assets/slots-Dw517dxP.js +49 -0
  375. package/dist/assets/smoke-lab-matrix-0BhnGQeo.js +1 -0
  376. package/dist/assets/square-B2aH51tE.js +1 -0
  377. package/dist/assets/star-BZgQbzhV.js +15 -0
  378. package/dist/assets/sun-_NIddwh7.js +1 -0
  379. package/dist/assets/system-notice-comment-CL_SWj_f.js +1 -0
  380. package/dist/assets/tabs-B2Os_leL.js +1 -0
  381. package/dist/assets/task-chat-attachments-jZNCAKd4.js +10 -0
  382. package/dist/assets/terminal-C0CKe_Zz.js +1 -0
  383. package/dist/assets/textarea-BRPEfJ-g.js +1 -0
  384. package/dist/assets/thumbs-down-C2BkjZOy.js +1 -0
  385. package/dist/assets/thumbs-up-OW2IsTL7.js +1 -0
  386. package/dist/assets/toggle-switch-BHxNtSq9.js +1 -0
  387. package/dist/assets/tool-taxonomy-6170LibQ.js +1 -0
  388. package/dist/assets/tools-B-L_sU_9.js +1 -0
  389. package/dist/assets/tooltip-B5WQ3lq5.js +1 -0
  390. package/dist/assets/transcript-adapter-C9uEslxp.js +5 -0
  391. package/dist/assets/trash-D7zTaHTj.js +1 -0
  392. package/dist/assets/triangle-alert-CBVKiaXB.js +1 -0
  393. package/dist/assets/use-adapter-capabilities-Bu8XkVZ9.js +1 -0
  394. package/dist/assets/use-copy-action-D5dEzo6L.js +1 -0
  395. package/dist/assets/useAgentChatEnabled-Chi_JXJj.js +1 -0
  396. package/dist/assets/useAutosaveIndicator-DttGFwx7.js +1 -0
  397. package/dist/assets/useHiddenSettings-CcaZfHLD.js +1 -0
  398. package/dist/assets/useInfiniteQuery-B28xptxn.js +1 -0
  399. package/dist/assets/useInstanceFeatureSettings-CEK6Xn3o.js +1 -0
  400. package/dist/assets/useManagedSandboxOnly-CO01cDK4.js +1 -0
  401. package/dist/assets/useMobileEntityPickerViewportStyle-C3R37KtS.js +1 -0
  402. package/dist/assets/usePrefersReducedMotion-Dw81-akd.js +1 -0
  403. package/dist/assets/useProfilesData-2L3_71Ql.js +1 -0
  404. package/dist/assets/useQueries-BIJ7zVTy.js +1 -0
  405. package/dist/assets/useSecondTick-Gige2l0t.js +1 -0
  406. package/dist/assets/useSharedPolling-D4Xn8mY2.js +1 -0
  407. package/dist/assets/useSummaryDraftStream-BulT3Wwh.js +3 -0
  408. package/dist/assets/user-Ccom_Ph0.js +1 -0
  409. package/dist/assets/user-check-BoBa1Xs_.js +1 -0
  410. package/dist/assets/user-minus-B4F-9ccK.js +1 -0
  411. package/dist/assets/user-round-CGxsJ0K8.js +1 -0
  412. package/dist/assets/user-x-CRO9YVVi.js +1 -0
  413. package/dist/assets/users-DyKzwIh4.js +1 -0
  414. package/dist/assets/wand-sparkles-BqnbLKl3.js +1 -0
  415. package/dist/assets/webhook-BVBCKjlU.js +1 -0
  416. package/dist/assets/x-DRDFdlYE.js +1 -0
  417. package/dist/index.html +189 -189
  418. package/dist/sw.js +1 -1
  419. package/package.json +1 -1
  420. package/dist/assets/AccessSelectIdentity-DIav0gZE.js +0 -1
  421. package/dist/assets/ActiveAgentsPanel-DODomPoX.js +0 -1
  422. package/dist/assets/AdapterManager-CTBnao0q.js +0 -1
  423. package/dist/assets/AdvancedToolsRoute-Br0jOb5g.js +0 -39
  424. package/dist/assets/AgentActionButtons-DVLa7zTO.js +0 -1
  425. package/dist/assets/AgentAvatar-Gd8yQg10.js +0 -1
  426. package/dist/assets/AgentBubbleActionRow-Bh3eeshJ.js +0 -1
  427. package/dist/assets/AgentCharacter-ee_q30tQ.js +0 -2
  428. package/dist/assets/AgentChat-DkSAUDeW.js +0 -1
  429. package/dist/assets/AgentChats-CrAUe5wo.js +0 -1
  430. package/dist/assets/AgentDefaults-BPwsNMnA.js +0 -1
  431. package/dist/assets/AgentDetail-CMr5ag7a.js +0 -38
  432. package/dist/assets/AgentIconPicker-COxkLVGK.js +0 -1
  433. package/dist/assets/AgentIdentity-DpmOyHwU.js +0 -1
  434. package/dist/assets/AgentMailCredentialField-ClYmMa2s.js +0 -1
  435. package/dist/assets/AgentMultiSelect-B0fbTO_V.js +0 -1
  436. package/dist/assets/AgentRoleEditor-BK4YgMI2.js +0 -1
  437. package/dist/assets/AgentSetupPrompt-CgKmqdR1.js +0 -30
  438. package/dist/assets/AgentTodoCard-CT8mRkQA.js +0 -1
  439. package/dist/assets/Agents-Dcb5Z499.js +0 -3
  440. package/dist/assets/AppDetail-nGpuYVYT.js +0 -5
  441. package/dist/assets/AppLogo-BTLkT6uL.js +0 -1
  442. package/dist/assets/AppNotConnected-D8uvCMCj.js +0 -1
  443. package/dist/assets/ApprovalCard-CE94YMwA.js +0 -1
  444. package/dist/assets/ApprovalDetail-BxYXq_PF.js +0 -1
  445. package/dist/assets/ApprovalPayload-F3spcbjc.js +0 -1
  446. package/dist/assets/Approvals-CJ-b_bcg.js +0 -1
  447. package/dist/assets/AppsConnect-DX35vaTI.js +0 -1
  448. package/dist/assets/AppsReview-CBuLmkMv.js +0 -1
  449. package/dist/assets/ArtifactCard-DyBoD-3M.js +0 -1
  450. package/dist/assets/Artifacts-CnjhWE5K.js +0 -1
  451. package/dist/assets/AssistantConnection-VR0iVTc_.js +0 -1
  452. package/dist/assets/AttentionInteractionResolver-DBN5Czv-.js +0 -1
  453. package/dist/assets/AuditHub-CUmVxyOi.js +0 -1
  454. package/dist/assets/Auth-BabO0CiD.js +0 -3
  455. package/dist/assets/BoardChat-CvGvJ35d.js +0 -18
  456. package/dist/assets/BoardClaim-xE5IG7-V.js +0 -1
  457. package/dist/assets/BootstrapSetupUxLab-DhCtU5V1.js +0 -1
  458. package/dist/assets/BreadcrumbContext-B9FRC6qG.js +0 -1
  459. package/dist/assets/Browse-D3rvs6t6.js +0 -1
  460. package/dist/assets/BudgetPolicyCard-6GeasQKC.js +0 -1
  461. package/dist/assets/CaseDetail-ByRpwG1_.js +0 -2
  462. package/dist/assets/CaseIdentifierKey-CGHxVwQ8.js +0 -1
  463. package/dist/assets/Cases-CMTvC9zy.js +0 -2
  464. package/dist/assets/ChatEndpointDetail-J1s6UFkQ.js +0 -5
  465. package/dist/assets/ChatEndpointSetup-CMYXMM5k.js +0 -1
  466. package/dist/assets/ChatIdentityConfirm-ZekEcH9C.js +0 -1
  467. package/dist/assets/ChoiceControls-DljvGvGH.js +0 -1
  468. package/dist/assets/CliAuth-COsmqViq.js +0 -1
  469. package/dist/assets/CommentAttributionChip-BbE_yccd.js +0 -1
  470. package/dist/assets/Companies-yqhRzlET.js +0 -1
  471. package/dist/assets/CompanyAccess-D0oCU5pn.js +0 -1
  472. package/dist/assets/CompanyActivity-YsTY3ijP.js +0 -1
  473. package/dist/assets/CompanyConnections-CPW8v9H_.js +0 -1
  474. package/dist/assets/CompanyContext-DFChh6Ft.js +0 -1
  475. package/dist/assets/CompanyEnvironments-DaXmUkvZ.js +0 -3
  476. package/dist/assets/CompanyExport-BDUsuadR.js +0 -4
  477. package/dist/assets/CompanyImport-CwvxlLDa.js +0 -1
  478. package/dist/assets/CompanySettings-CaXXQRGx.js +0 -1
  479. package/dist/assets/CompanySettingsPluginPage-65ac0VUu.js +0 -1
  480. package/dist/assets/CompanySkills-DqS0ONBo.js +0 -10
  481. package/dist/assets/ComposerAddMenu-D5uZzV_t.js +0 -3
  482. package/dist/assets/ConfigureBuiltInAgentModal-BHZ-zviV.js +0 -1
  483. package/dist/assets/ConnectionSetupFlow-DJTT9JG-.js +0 -40
  484. package/dist/assets/CopyText-Bx__5n_s.js +0 -1
  485. package/dist/assets/CopyableGatewayUrl-I2ODkjbk.js +0 -1
  486. package/dist/assets/CrossIssueCollaborationUxLab-BAuj-sZZ.js +0 -1
  487. package/dist/assets/Dashboard-BR1dH4TI.js +0 -2
  488. package/dist/assets/DashboardLive-BmdYpfBS.js +0 -1
  489. package/dist/assets/DecisionDateChips-DdIvHtba.js +0 -1
  490. package/dist/assets/DecisionModelSettings-B5L_gaw-.js +0 -1
  491. package/dist/assets/DecisionQueuePage-DWSxadlt.js +0 -1
  492. package/dist/assets/DesignGuide-ffzVvNgx.js +0 -23
  493. package/dist/assets/DocumentFrameHeader-CLg1WwGP.js +0 -1
  494. package/dist/assets/EmailConnectionAccess-CfSg541w.js +0 -1
  495. package/dist/assets/EmailEndpointSetup-CdvfuTSr.js +0 -1
  496. package/dist/assets/EnforcementBanner-CisiW5sx.js +0 -1
  497. package/dist/assets/EntityRow-DRa56P0o.js +0 -1
  498. package/dist/assets/ExecutionWorkspaceDetail-ShHxHZpz.js +0 -19
  499. package/dist/assets/FilterBar-BEDd2ibn.js +0 -1
  500. package/dist/assets/FoldCurtain-D8qGLn9D.js +0 -1
  501. package/dist/assets/FolderControls-mmliDHyg.js +0 -1
  502. package/dist/assets/GatewayDetail-DdOeRX4W.js +0 -2
  503. package/dist/assets/GatewaysList-DcqO9mzi.js +0 -1
  504. package/dist/assets/GoalDetail-CFkgaH-d.js +0 -1
  505. package/dist/assets/GoalTree-D2zE3Dsu.js +0 -1
  506. package/dist/assets/Goals-C2bC5zh0.js +0 -1
  507. package/dist/assets/Identity-C6h0NeMo.js +0 -1
  508. package/dist/assets/ImageGalleryModal-Bps3SpPd.js +0 -1
  509. package/dist/assets/Inbox-C6yFayfO.js +0 -2
  510. package/dist/assets/InlineBanner-B4LiMLV-.js +0 -1
  511. package/dist/assets/InlineEditor-DuYhgU_P.js +0 -1
  512. package/dist/assets/InlineEntitySelector-BuvRGJRk.js +0 -1
  513. package/dist/assets/InstanceAccess-CemN_K1n.js +0 -1
  514. package/dist/assets/InstanceAdvanced-B3Bh8aiH.js +0 -1
  515. package/dist/assets/InstanceFeatures-C8IB5ljR.js +0 -1
  516. package/dist/assets/InviteLanding-Cla495QA.js +0 -1
  517. package/dist/assets/IssueChatLongThreadPerf-uO_rmRQe.js +0 -2
  518. package/dist/assets/IssueChatThread-BRREm8_j.js +0 -40
  519. package/dist/assets/IssueDetail-B_vLMBiQ.js +0 -9
  520. package/dist/assets/IssueDocumentAnnotations-Lm45ojW8.js +0 -2
  521. package/dist/assets/IssueOutputSection-CFTYmxmd.js +0 -1
  522. package/dist/assets/IssueRecoveryActionCard-CRpErumR.js +0 -1
  523. package/dist/assets/IssueReferenceActivitySummary-Cyfhhera.js +0 -1
  524. package/dist/assets/IssueReferencePill-BkcvNU12.js +0 -1
  525. package/dist/assets/IssueThreadInteractionCard-B_2B3kIu.js +0 -9
  526. package/dist/assets/IssueWriteDenialNotice-CSjvjQKw.js +0 -1
  527. package/dist/assets/Issues-CKsNIN52.js +0 -3
  528. package/dist/assets/JoinRequestQueue-Jt3KlEAg.js +0 -1
  529. package/dist/assets/JsonSchemaForm-4IjTrWGW.js +0 -1
  530. package/dist/assets/LiveNowTodoLine-DHJqE78s.js +0 -1
  531. package/dist/assets/ManagedAiConnectionDetails-Ycav9ZJj.js +0 -1
  532. package/dist/assets/MarkdownBody-8B6dBcR2.js +0 -16
  533. package/dist/assets/MarkdownEditor-CkRJ6H6B.js +0 -85
  534. package/dist/assets/McpConnect-B-W0JY0R.js +0 -1
  535. package/dist/assets/MembershipAction-Dqxw3gRv.js +0 -1
  536. package/dist/assets/MetricCard-DjbVol1G.js +0 -1
  537. package/dist/assets/MissingPluginTabPlaceholder-Cf4mQxH1.js +0 -1
  538. package/dist/assets/ModelsAndProviders-DE2zZm6Y.js +0 -1
  539. package/dist/assets/MootMark-hJKMWZtF.js +0 -1
  540. package/dist/assets/NewAgent-BShkR_Ke.js +0 -1
  541. package/dist/assets/OmpAllSettings-CYye7NGI.js +0 -1
  542. package/dist/assets/OpenwaGatewayManager-BqjZV1FF.js +0 -2
  543. package/dist/assets/PathInstructionsModal-B2FyEdme.js +0 -1
  544. package/dist/assets/PipelineSettings-B6CsNVyo.js +0 -2
  545. package/dist/assets/Pipelines-BxzF7Z9e.js +0 -1
  546. package/dist/assets/PixelsOffice-D1zUuavs.js +0 -2
  547. package/dist/assets/PluginManager-DyKcIT12.js +0 -1
  548. package/dist/assets/PluginPage-cgktDwiZ.js +0 -1
  549. package/dist/assets/PluginSettings-CPLD3thj.js +0 -1
  550. package/dist/assets/ProfileDetailRoute-BMnjkHsH.js +0 -1
  551. package/dist/assets/ProfileSettings-C6D90JLB.js +0 -1
  552. package/dist/assets/ProfileWizardRoute-BUoFfh9_.js +0 -1
  553. package/dist/assets/ProjectDetail-Ckbhd1sY.js +0 -1
  554. package/dist/assets/ProjectWorkspaceDetail-DcgVcjOm.js +0 -29
  555. package/dist/assets/ProjectWorkspacesContent-znx0pvxb.js +0 -1
  556. package/dist/assets/Projects-CykB98_K.js +0 -1
  557. package/dist/assets/PublicIssueSharePage-BnpJ09-x.js +0 -1
  558. package/dist/assets/QuestionForm-CEo6LNIm.js +0 -7
  559. package/dist/assets/QuotaBar-1xoA8XAU.js +0 -1
  560. package/dist/assets/RepositoryEditor-DuP7s92L.js +0 -1
  561. package/dist/assets/ResponsibleUserDenialNotice-CuNRmNcx.js +0 -1
  562. package/dist/assets/ResponsibleUserDenialUxLab-CRH_RXZG.js +0 -1
  563. package/dist/assets/ReviewQueueCard-xAycOrjn.js +0 -1
  564. package/dist/assets/RichWorkProductCard-DqgtPYJE.js +0 -1
  565. package/dist/assets/RoutineActivityRow-CiclGLEG.js +0 -1
  566. package/dist/assets/RoutineDetail-t83J4teU.js +0 -2
  567. package/dist/assets/RoutineRunVariablesDialog-B-vqqEh9.js +0 -1
  568. package/dist/assets/RoutineVariablesEditor-CUWGfnN5.js +0 -1
  569. package/dist/assets/Routines-DxyAKMYO.js +0 -1
  570. package/dist/assets/ScrollToBottom-CO1RfHB5.js +0 -1
  571. package/dist/assets/Search-BpFRFykq.js +0 -1
  572. package/dist/assets/SearchableSelect-Ctcb2Ch6.js +0 -1
  573. package/dist/assets/Secrets-Bl5LK-Z4.js +0 -4
  574. package/dist/assets/SetupWizard-B6LpFOFU.js +0 -1
  575. package/dist/assets/SidebarContext-RMJ2b4Ea.js +0 -1
  576. package/dist/assets/SidebarNavItem-BpyBJ_Dm.js +0 -1
  577. package/dist/assets/SkillBinaryFile-CkdvRjWj.js +0 -1
  578. package/dist/assets/SkillCardIcon-D4YoeYo3.js +0 -2
  579. package/dist/assets/SkillSourceTree-D7sttLjM.js +0 -2
  580. package/dist/assets/SkillSources-C-Jt2L6i.js +0 -2
  581. package/dist/assets/SkillStudio-DZjE4IH0.js +0 -9
  582. package/dist/assets/SourceTrustBadge-Be7p_UW5.js +0 -1
  583. package/dist/assets/StatusCards-BAtrwmPw.js +0 -1
  584. package/dist/assets/StatusIcon-dwwI_BsK.js +0 -1
  585. package/dist/assets/SummarySlotCard-DRkr8qDs.js +0 -1
  586. package/dist/assets/TaskChatComposerTakeoverContext-D69odNDz.js +0 -1
  587. package/dist/assets/TaskChatLab-rlVk8kLb.js +0 -11
  588. package/dist/assets/TaskChatMarker-BPyBbYOM.js +0 -2
  589. package/dist/assets/TaskChatProtocolCard-B4WKJ60_.js +0 -1
  590. package/dist/assets/TaskChatThreadView-CS8svXPt.js +0 -4
  591. package/dist/assets/TaskDetailRelationsPanel-nHXcEy87.js +0 -1
  592. package/dist/assets/TaskTreeControls-qGrghgT5.js +0 -3
  593. package/dist/assets/Terminal-DciVpkrv.js +0 -1
  594. package/dist/assets/TerminalView-Yja_bLyI.js +0 -58
  595. package/dist/assets/ThemeContext-CpfHG-__.js +0 -1
  596. package/dist/assets/ThemeToggle-BB7CTYm0.js +0 -1
  597. package/dist/assets/ToastContext-05ZKd1Tv.js +0 -1
  598. package/dist/assets/ToolsAdminGate-C_J3WTPB.js +0 -1
  599. package/dist/assets/TrustPresetSection-D6F_gT9T.js +0 -1
  600. package/dist/assets/UserProfile-C7xr2TZ1.js +0 -1
  601. package/dist/assets/WebhookUrlWarning-BKRCWDvK.js +0 -1
  602. package/dist/assets/WhatNeedsMe-B46ig7oA.js +0 -1
  603. package/dist/assets/WorkspaceRuntimeControls-BgEwk8O9.js +0 -1
  604. package/dist/assets/Workspaces-B40MWML3.js +0 -1
  605. package/dist/assets/access-MTh4IRg3.js +0 -1
  606. package/dist/assets/activity-BQM6ha0H.js +0 -1
  607. package/dist/assets/activity-W4RaYVoe.js +0 -1
  608. package/dist/assets/activity-format-Dr_Bfg-I.js +0 -1
  609. package/dist/assets/adapter-display-registry-DMBag1Pp.js +0 -1
  610. package/dist/assets/adapters-B6tt7vV1.js +0 -1
  611. package/dist/assets/agent-avatar-url-Dyh00TBD.js +0 -1
  612. package/dist/assets/agent-config-primitives-UuU38ZXq.js +0 -1
  613. package/dist/assets/agentChats-DAnpQfZP.js +0 -1
  614. package/dist/assets/agents-DQjjbPeA.js +0 -1
  615. package/dist/assets/alert-dialog-BPbJCNT3.js +0 -1
  616. package/dist/assets/app-connect-policy--vCWXfMH.js +0 -1
  617. package/dist/assets/archive-CXN2Nt0v.js +0 -1
  618. package/dist/assets/archive-restore-BRnwXoAU.js +0 -1
  619. package/dist/assets/arrow-down-Q4pS2Ica.js +0 -1
  620. package/dist/assets/arrow-down-left-CkYvhx3o.js +0 -1
  621. package/dist/assets/arrow-left-DAATGw_s.js +0 -1
  622. package/dist/assets/arrow-right-GZfpY7aS.js +0 -1
  623. package/dist/assets/arrow-up-BZIaQQ4z.js +0 -1
  624. package/dist/assets/arrow-up-down-EdNbp9Xn.js +0 -1
  625. package/dist/assets/arrow-up-right-Bq192gvb.js +0 -1
  626. package/dist/assets/artifacts-3De9CoOF.js +0 -1
  627. package/dist/assets/assets-W1TrQ-CF.js +0 -1
  628. package/dist/assets/attachment-icon-CqmYoKk3.js +0 -1
  629. package/dist/assets/avatar-C56xeO-a.js +0 -1
  630. package/dist/assets/badge-DS9NilxT.js +0 -1
  631. package/dist/assets/badge-check-Bj52LBOu.js +0 -1
  632. package/dist/assets/bot-ECqGz5Kx.js +0 -1
  633. package/dist/assets/boxes-BiGQnGz8.js +0 -1
  634. package/dist/assets/braces-C5lD4p5L.js +0 -1
  635. package/dist/assets/browser-use-BACQQTEd.js +0 -1
  636. package/dist/assets/budgets-CiM2CGL5.js +0 -1
  637. package/dist/assets/button-CPbWwhwS.js +0 -1
  638. package/dist/assets/calendar-clock-1_JiCVSO.js +0 -1
  639. package/dist/assets/card-ComZLyGF.js +0 -1
  640. package/dist/assets/cases-DUfeP2uZ.js +0 -1
  641. package/dist/assets/chatEndpoints-BxCeKjZl.js +0 -1
  642. package/dist/assets/check-DpKBgTVM.js +0 -1
  643. package/dist/assets/checkbox-C6Ner4x0.js +0 -1
  644. package/dist/assets/chevron-down-Bl5n9yJ6.js +0 -1
  645. package/dist/assets/chevron-left-4Xh9XTg8.js +0 -1
  646. package/dist/assets/chevron-right-tqONaHXH.js +0 -1
  647. package/dist/assets/chevron-up-Bl6M7JcS.js +0 -1
  648. package/dist/assets/chip-A6yCbIX-.js +0 -1
  649. package/dist/assets/circle-Cd5C5tyz.js +0 -1
  650. package/dist/assets/circle-alert-SaFPwBUR.js +0 -1
  651. package/dist/assets/circle-dot-BmPAA-Y4.js +0 -1
  652. package/dist/assets/circle-question-mark-CPVj2C31.js +0 -1
  653. package/dist/assets/circle-slash-GoqH3xOr.js +0 -1
  654. package/dist/assets/circle-x-Cq3Jjygw.js +0 -1
  655. package/dist/assets/clipboard-paste-CjK4NNK4.js +0 -1
  656. package/dist/assets/clock-DD6vczyW.js +0 -1
  657. package/dist/assets/cloud-DJXER6ZI.js +0 -1
  658. package/dist/assets/code-xml-HwumtIXq.js +0 -1
  659. package/dist/assets/coins-C9m0tXWu.js +0 -1
  660. package/dist/assets/collapsible-DyFYO78a.js +0 -1
  661. package/dist/assets/columns-3-Bzg8zppo.js +0 -1
  662. package/dist/assets/command-CVc84Pkp.js +0 -5
  663. package/dist/assets/companies-query-CtA3RxqJ.js +0 -1
  664. package/dist/assets/connection-identity-yi_a3p9x.js +0 -1
  665. package/dist/assets/connection-owner-hDB0sIx-.js +0 -1
  666. package/dist/assets/copy-BPLXGxnI.js +0 -1
  667. package/dist/assets/createLucideIcon-D4os2LjW.js +0 -94
  668. package/dist/assets/decision-models-KR0N8eAY.js +0 -1
  669. package/dist/assets/definition-CP66xiVi.js +0 -1
  670. package/dist/assets/dialog-DTF5ORhG.js +0 -1
  671. package/dist/assets/dist-A1QjRW6n.js +0 -1
  672. package/dist/assets/dist-BGkJL7cL.js +0 -1
  673. package/dist/assets/dist-BvtnvAAs.js +0 -1
  674. package/dist/assets/dist-CV3LWSgu.js +0 -1
  675. package/dist/assets/dist-CW9WKlP9.js +0 -1
  676. package/dist/assets/dist-Cd-Ajdsj.js +0 -1
  677. package/dist/assets/dist-D8x-gpn0.js +0 -1
  678. package/dist/assets/dist-DWN34QXj.js +0 -1
  679. package/dist/assets/dist-Dkt9lRgq.js +0 -1
  680. package/dist/assets/dist-Fo32CqOK.js +0 -1
  681. package/dist/assets/dist-H1ZdtKiI.js +0 -1
  682. package/dist/assets/dist-TrQM7xcF.js +0 -1
  683. package/dist/assets/dropdown-menu-BHbifkF5.js +0 -1
  684. package/dist/assets/ellipsis-BmcwyLRX.js +0 -1
  685. package/dist/assets/ellipsis-vertical-C87PXGLL.js +0 -1
  686. package/dist/assets/email-BpEbAqEu.js +0 -1
  687. package/dist/assets/environment-variables-editor-D_SX7lag.js +0 -1
  688. package/dist/assets/environments-BnrW0_s2.js +0 -1
  689. package/dist/assets/es2015-b6T6qGbn.js +0 -41
  690. package/dist/assets/external-link-r-bdeyyB.js +0 -1
  691. package/dist/assets/eye-DzGzO5cS.js +0 -1
  692. package/dist/assets/eye-off-D391VrPw.js +0 -1
  693. package/dist/assets/fast-responses-J4a2UjiY.js +0 -1
  694. package/dist/assets/file-BhWhLLmU.js +0 -1
  695. package/dist/assets/file-code-corner-ljdTcmQq.js +0 -1
  696. package/dist/assets/file-pen-line-BO9IHTMe.js +0 -1
  697. package/dist/assets/file-question-mark-BDQZXwJM.js +0 -1
  698. package/dist/assets/file-search-BjM7I9jk.js +0 -1
  699. package/dist/assets/file-text-DxZaT6_4.js +0 -1
  700. package/dist/assets/flag-Dz_mzBxj.js +0 -1
  701. package/dist/assets/flask-conical-BLLpnSE_.js +0 -1
  702. package/dist/assets/folder-git-2-DqhpjZWg.js +0 -1
  703. package/dist/assets/folder-open-DePwyX7Q.js +0 -1
  704. package/dist/assets/folder-search-BrzzpgbQ.js +0 -1
  705. package/dist/assets/funnel-CrsJwt8n.js +0 -1
  706. package/dist/assets/git-pull-request-BhjKzOx4.js +0 -1
  707. package/dist/assets/github-icon-4iQqY5Ra.js +0 -1
  708. package/dist/assets/health-BB9eTWUz.js +0 -1
  709. package/dist/assets/heartbeats-ZrxDs5RN.js +0 -1
  710. package/dist/assets/inbox-CHWFKF6H.js +0 -1
  711. package/dist/assets/inboxArchiveCache-BUVJhlPA.js +0 -1
  712. package/dist/assets/index-6gpRzgjB.css +0 -2
  713. package/dist/assets/index-BnIGPoha.js +0 -67
  714. package/dist/assets/info-gRipDo17.js +0 -1
  715. package/dist/assets/input-CFDuRmUf.js +0 -1
  716. package/dist/assets/instanceSettings-_fg2-qd_.js +0 -1
  717. package/dist/assets/interaction-audience-CeubTYgI.js +0 -1
  718. package/dist/assets/interaction-card-visibility-Bbbh2Wwj.js +0 -1
  719. package/dist/assets/issue-blockers-Ca444GPA.js +0 -1
  720. package/dist/assets/issue-output-eaaXZbls.js +0 -1
  721. package/dist/assets/issue-properties-yCFLf1AV.js +0 -4
  722. package/dist/assets/issue-share-DeEsnkZb.js +0 -1
  723. package/dist/assets/issue-workspace-selection-CpEHV9Cs.js +0 -1
  724. package/dist/assets/key-round-KbRY0Tqi.js +0 -1
  725. package/dist/assets/label-YFSQ7Lrd.js +0 -1
  726. package/dist/assets/layout-dashboard-BCbjIJyW.js +0 -1
  727. package/dist/assets/link-2-CjwYDOz8.js +0 -1
  728. package/dist/assets/link-BI9hMo4E.js +0 -1
  729. package/dist/assets/list-filter-BXrUTs4r.js +0 -1
  730. package/dist/assets/list-todo-CUAjYMs2.js +0 -1
  731. package/dist/assets/log-in-DGzk9Qt3.js +0 -1
  732. package/dist/assets/maximize-2-oJKwXAIv.js +0 -1
  733. package/dist/assets/mention-chips-oxWHtr64.js +0 -17
  734. package/dist/assets/message-square-plus-DLVAyD02.js +0 -1
  735. package/dist/assets/minus-CakDUIGZ.js +0 -1
  736. package/dist/assets/model-fallback-DOz7naAS.js +0 -1
  737. package/dist/assets/model-picker-fields-B-Qrajvc.js +0 -1
  738. package/dist/assets/network-CwVFmBPA.js +0 -1
  739. package/dist/assets/octagon-alert-PbQVfJuN.js +0 -1
  740. package/dist/assets/octagon-x-bm3cUbQL.js +0 -1
  741. package/dist/assets/omp-settings-model-CHNAOJJ4.js +0 -1
  742. package/dist/assets/package-CQDzAAyu.js +0 -1
  743. package/dist/assets/pause-CjSl7uZ5.js +0 -1
  744. package/dist/assets/pen-line-BxW7xWDp.js +0 -1
  745. package/dist/assets/pipeline-stage-presentation-CSpDEhTt.js +0 -2
  746. package/dist/assets/pipelines-Bsug4SBl.js +0 -1
  747. package/dist/assets/play-Bas3WLLu.js +0 -1
  748. package/dist/assets/plug-B1REHYRm.js +0 -1
  749. package/dist/assets/plugins-C__978WW.js +0 -1
  750. package/dist/assets/plus-BXgNB9iC.js +0 -1
  751. package/dist/assets/popover-Ds74US92.js +0 -1
  752. package/dist/assets/power-BLRxihvP.js +0 -1
  753. package/dist/assets/presentation-mode-CUCu1lx5.js +0 -1
  754. package/dist/assets/profile-summary-D4Y3aCqu.js +0 -1
  755. package/dist/assets/projects-BfCNlLrN.js +0 -1
  756. package/dist/assets/proposal-review-Cn-enTrA.js +0 -1
  757. package/dist/assets/queryClient-CR6xLY50.js +0 -1
  758. package/dist/assets/queryKeys-CLRfivuU.js +0 -1
  759. package/dist/assets/radio-BxemlgFr.js +0 -1
  760. package/dist/assets/radio-card-BKS1P1G5.js +0 -1
  761. package/dist/assets/recent-agent-chats-Dy1o3QTX.js +0 -1
  762. package/dist/assets/refresh-cw-BlJROkRs.js +0 -1
  763. package/dist/assets/repeat-Bu7JE49X.js +0 -1
  764. package/dist/assets/resizable-panels-CkcFa_Sa.js +0 -1
  765. package/dist/assets/review-policy-DXCAJOgz.js +0 -1
  766. package/dist/assets/rotate-ccw-DYnfuNBe.js +0 -1
  767. package/dist/assets/rotate-cw-ePKA-8uz.js +0 -1
  768. package/dist/assets/router-B7e3bBCC.js +0 -1
  769. package/dist/assets/routines-CfU0wGo3.js +0 -1
  770. package/dist/assets/runRetryState-BWDdGOjb.js +0 -1
  771. package/dist/assets/save-ITFfrY8D.js +0 -1
  772. package/dist/assets/schema-config-fields-BrxjdyN7.js +0 -1
  773. package/dist/assets/scroll-area-CE4Zkezp.js +0 -1
  774. package/dist/assets/scroll-text-CRJZrr4W.js +0 -1
  775. package/dist/assets/search-DcNCy4nw.js +0 -1
  776. package/dist/assets/secrets-VHdso8NO.js +0 -1
  777. package/dist/assets/select-D5gnsM3o.js +0 -1
  778. package/dist/assets/send-kcCvVYwH.js +0 -1
  779. package/dist/assets/separator-DRi1s7MH.js +0 -1
  780. package/dist/assets/server-BxnX4cQx.js +0 -1
  781. package/dist/assets/server-cog-DBkJ6zJm.js +0 -1
  782. package/dist/assets/settings-B0MZcOjA.js +0 -1
  783. package/dist/assets/shared-lJ5Wm0H-.js +0 -1
  784. package/dist/assets/sheet-DMv7iisP.js +0 -1
  785. package/dist/assets/shield-DiTWWtf6.js +0 -1
  786. package/dist/assets/shield-alert-GhGXizDi.js +0 -1
  787. package/dist/assets/shield-check-Bltg6oV1.js +0 -1
  788. package/dist/assets/shield-question-mark-Co_hD1e7.js +0 -1
  789. package/dist/assets/shield-x-DvPRQg3j.js +0 -1
  790. package/dist/assets/sidebarPreferences-BzuyKm8Q.js +0 -1
  791. package/dist/assets/skeleton-C-0aXkCA.js +0 -1
  792. package/dist/assets/slots-CZ4PXj0A.js +0 -49
  793. package/dist/assets/smoke-lab-matrix-BvPOYndq.js +0 -1
  794. package/dist/assets/square-BmkboRt7.js +0 -1
  795. package/dist/assets/star-1rHay_hF.js +0 -15
  796. package/dist/assets/sun-DYJlsH8b.js +0 -1
  797. package/dist/assets/system-notice-comment-J038wxKr.js +0 -1
  798. package/dist/assets/tabs-7Z7oRF9q.js +0 -1
  799. package/dist/assets/task-chat-attachments-Bd5Ktid4.js +0 -10
  800. package/dist/assets/terminal-CpHhoK6t.js +0 -1
  801. package/dist/assets/textarea-C5haibei.js +0 -1
  802. package/dist/assets/thumbs-down-CThrhmNY.js +0 -1
  803. package/dist/assets/thumbs-up-CaCMQEKZ.js +0 -1
  804. package/dist/assets/toggle-switch-jdiUy3ak.js +0 -1
  805. package/dist/assets/tool-taxonomy-hcm2Ycyy.js +0 -1
  806. package/dist/assets/tools-BaG2wrxn.js +0 -1
  807. package/dist/assets/tooltip-A1QKxHoM.js +0 -1
  808. package/dist/assets/transcript-adapter-qUIWrYhR.js +0 -5
  809. package/dist/assets/trash-B9CcxB8n.js +0 -1
  810. package/dist/assets/triangle-alert-BH69iaPW.js +0 -1
  811. package/dist/assets/use-adapter-capabilities-0qPdQDtF.js +0 -1
  812. package/dist/assets/use-copy-action-BHOBMjjL.js +0 -1
  813. package/dist/assets/useAgentChatEnabled-BVubLVb-.js +0 -1
  814. package/dist/assets/useAutosaveIndicator-Db01ut6Z.js +0 -1
  815. package/dist/assets/useHiddenSettings-B8Delw9E.js +0 -1
  816. package/dist/assets/useInfiniteQuery-DOgqWRqx.js +0 -1
  817. package/dist/assets/useInstanceFeatureSettings-BkFxJU8v.js +0 -1
  818. package/dist/assets/useManagedSandboxOnly-B8hnorvR.js +0 -1
  819. package/dist/assets/useMobileEntityPickerViewportStyle-D1VLOE73.js +0 -1
  820. package/dist/assets/usePrefersReducedMotion-YdQ72Di3.js +0 -1
  821. package/dist/assets/useProfilesData-BoFCazdY.js +0 -1
  822. package/dist/assets/useQueries-BwPGB0l1.js +0 -1
  823. package/dist/assets/useSecondTick-DVYNhWvt.js +0 -1
  824. package/dist/assets/useSharedPolling-BvL9Pt94.js +0 -1
  825. package/dist/assets/useSummaryDraftStream-DYOYHAIW.js +0 -3
  826. package/dist/assets/user-check-rA9xvd1j.js +0 -1
  827. package/dist/assets/user-minus-Cn7EDbk6.js +0 -1
  828. package/dist/assets/user-prKyJ96H.js +0 -1
  829. package/dist/assets/user-round-B29o2CfH.js +0 -1
  830. package/dist/assets/user-x-BYhS9OD7.js +0 -1
  831. package/dist/assets/users-CiE-8mMp.js +0 -1
  832. package/dist/assets/wand-sparkles-BdvA5Dlz.js +0 -1
  833. package/dist/assets/webhook-CFYjj4FL.js +0 -1
  834. package/dist/assets/x-CnRlQlxy.js +0 -1
@@ -0,0 +1,85 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-BEo-uoE2.js","assets/dist-BhxPxuMy.js","assets/dist-BX4PSqp4.js","assets/dist-Wi1mdRva.js","assets/dist-DTj_cM7l.js","assets/dist-D4qkWMdz.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/dist-DTwCbVsv.js","assets/dist-Bp5Y-deP.js","assets/dist-ds5P5TFe.js","assets/dist-BAtkULn4.js","assets/dist-DrXWoUSy.js","assets/dist-Uvf9OORN.js","assets/dist-CcBZFMdg.js","assets/dist-D61jI6QA.js","assets/dist-CN5Rg9XU.js","assets/dist-DY5RRJBY.js","assets/dist-Bc6S4vv3.js","assets/dist-CD47N__7.js","assets/dist-yKrp-Qew.js","assets/dist-CdFTLNcc.js","assets/dist-Cv1Aw0YM.js","assets/dist-B6TpBrd3.js","assets/dockerfile-BttNdtK0.js","assets/simple-mode-B79cVo-x.js","assets/factor-CM3-9V3b.js","assets/nsis-KFC6hioG.js","assets/pug-C20tNwmy.js","assets/javascript-Cblpdx44.js","assets/dist-BPuuaNc6.js","assets/dist-BY93_d3Z.js"])))=>i.map(i=>d[i]);
2
+ var ok=Object.defineProperty;var s=(e,t)=>ok(e,"name",{value:t,configurable:!0});import{i as da,n as _x,t as Ts}from"./rolldown-runtime-ZpX3ckPj.js";import{l as Yi,na as sk,t as lk,ta as ak}from"./createLucideIcon-DJi9suAC.js";import{a as ck,l as uk,o as vx,r as Kg,s as Al}from"./dist-SzpVz8Pd.js";import{t as V}from"./preload-helper-CceJXRIF.js";import{r as Ie,t as G1,v as q1}from"./queryKeys-DYV5MhM_.js";import{$ as dk,A as Z1,C as fk,D as rr,F as hk,H as Tr,I as gk,J as pk,K as yi,L as mk,N as Y1,O as an,P as _k,Q as yx,R as X1,S as Q1,T as zs,U as Xi,W as Pc,X as vk,Z as yk,_ as xk,a as Ck,c as bk,d as Ek,et as Sk,g as Tk,h as wk,i as Ug,j as Ye,k as Ka,l as kk,n as Mk,o as Ak,q as zd,s as Ik,t as Ua,u as Nk,w as Wg,x as zf}from"./mention-chips-D8856Q0_.js";import{n as Ok}from"./CompanyContext-CSrVsSze.js";import{t as xx}from"./dist-DTFX_1D6.js";import{r as e0}from"./es2015-C3hhXnTu.js";import{a as Dk,n as Rk,o as Lk,r as $k,s as Pk,t as Fk}from"./dist-DC4EOH0g.js";import{n as Cx,r as Gu,t as bx}from"./dist-DOIzg2vq.js";import{d as Vk,f as Bk,i as Hk,n as Kk,o as Uk,p as Wk,r as zk,s as jk,t as Jk,u as Gk}from"./dist-DcOFbG-W.js";import{a as Ex,i as Sx,n as zg,o as jg,r as qk,s as Jg,t as Zk}from"./dist-Bm2igrAN.js";import{t as Yk}from"./dist-CvHBQVAC.js";import{a as Tx,i as wx,n as kx,o as Mx,r as Ax,t as Xk}from"./dist-BNOqBr2U.js";import{t as Qk}from"./boxes-fV98p9-r.js";import{t as e9}from"./calendar-clock-BVFltraz.js";import{t as t9}from"./flag-R0AVTKGk.js";import{t as n9}from"./user-Ccom_Ph0.js";import{t as r9}from"./x-DRDFdlYE.js";import{t as i9}from"./AgentAvatar-DgGEobSY.js";import{t as o9}from"./routines-KPtwxuS7.js";import{$ as s9,A as Ix,B as l9,Ct as qu,E as Nx,F as Dt,G as a9,H as c9,I as Ox,J as u9,K as d9,L as ct,O as Zo,Ot as jf,P as _e,Q as f9,R as Gg,S as Dx,St as fa,T as Il,Tt as qg,U as Zg,V as h9,W as Rx,X as Lx,Y as Yg,Z as Jf,_t as ha,a as P,at as $x,bt as Fn,c as g9,ct as Se,dt as p9,et as m9,f as _9,ft as Xg,g as v9,gt as nn,ht as y9,it as Zu,j as ws,l as x9,lt as Fc,mt as Px,n as Fx,nt as C9,o as b9,ot as Vx,pt as E9,q as S9,rt as Ct,st as cn,t as T9,tt as Bx,ut as Io,v as w9,vt as Hx,w as k9,wt as vo,x as Vc,xt as Jr,yt as jd,z as M9}from"./dist-BhxPxuMy.js";var Bc=da(uk(),1),m=da(sk(),1),ee=da(ak(),1),A9=Object.defineProperty,I9=s((e,t)=>A9(e,"name",{value:t,configurable:!0}),"__name$2"),N9="Toggle",O9=m.forwardRef(I9(s(function(t,n){const{pressed:r,defaultPressed:i,onPressedChange:o,...l}=t,[a,c]=Kg({prop:r,onChange:o,defaultProp:i??!1,caller:N9});return(0,ee.jsx)(Al.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":t.disabled?"":void 0,...l,ref:n,onClick:ck(t.onClick,()=>{t.disabled||c(!a)})})},"Toggle2"),"Toggle")),D9=Object.defineProperty,Li=s((e,t)=>D9(e,"name",{value:t,configurable:!0}),"__name$1"),ks="ToggleGroup",[Kx,Ux]=vx(ks,[Gu]),Wx=Gu(),R9=m.forwardRef(Li(s(function(t,n){const{type:r,...i}=t;if(r==="single")return(0,ee.jsx)(L9,{role:"radiogroup",...i,ref:n});if(r==="multiple")return(0,ee.jsx)($9,{role:"toolbar",...i,ref:n});throw new Error(`Missing prop \`type\` expected on \`${ks}\``)},"ToggleGroup2"),"ToggleGroup")),[zx,jx]=Kx(ks),L9=m.forwardRef(Li(s(function(t,n){const{value:r,defaultValue:i,onValueChange:o=Li(()=>{},"onValueChange"),...l}=t,[a,c]=Kg({prop:r,defaultProp:i??"",onChange:o,caller:ks});return(0,ee.jsx)(zx,{scope:t.__scopeToggleGroup,type:"single",value:m.useMemo(()=>a?[a]:[],[a]),onItemActivate:c,onItemDeactivate:m.useCallback(()=>c(""),[c]),children:(0,ee.jsx)(Jx,{...l,ref:n})})},"ToggleGroupImplSingle2"),"ToggleGroupImplSingle")),$9=m.forwardRef(Li(s(function(t,n){const{value:r,defaultValue:i,onValueChange:o=Li(()=>{},"onValueChange"),...l}=t,[a,c]=Kg({prop:r,defaultProp:i??[],onChange:o,caller:ks}),u=m.useCallback(f=>c((h=[])=>[...h,f]),[c]),d=m.useCallback(f=>c((h=[])=>h.filter(g=>g!==f)),[c]);return(0,ee.jsx)(zx,{scope:t.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:u,onItemDeactivate:d,children:(0,ee.jsx)(Jx,{...l,ref:n})})},"ToggleGroupImplMultiple2"),"ToggleGroupImplMultiple")),[P9,F9]=Kx(ks),Jx=m.forwardRef(Li(s(function(t,n){const{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:o=!0,orientation:l,dir:a,loop:c=!0,...u}=t,d=Wx(r),f=xx(a),h={dir:f,...u};return(0,ee.jsx)(P9,{scope:r,rovingFocus:o,disabled:i,children:o?(0,ee.jsx)(Cx,{asChild:!0,...d,orientation:l,dir:f,loop:c,children:(0,ee.jsx)(Al.div,{...h,ref:n})}):(0,ee.jsx)(Al.div,{...h,ref:n})})},"ToggleGroupImpl2"),"ToggleGroupImpl")),Gf="ToggleGroupItem",V9=m.forwardRef(Li(s(function(t,n){const r=jx(Gf,t.__scopeToggleGroup),i=F9(Gf,t.__scopeToggleGroup),o=Wx(t.__scopeToggleGroup),l=r.value.includes(t.value),a=i.disabled||t.disabled,c={...t,pressed:l,disabled:a},u=m.useRef(null);return i.rovingFocus?(0,ee.jsx)(bx,{asChild:!0,...o,focusable:!a,active:l,ref:u,children:(0,ee.jsx)(t0,{...c,ref:n})}):(0,ee.jsx)(t0,{...c,ref:n})},"ToggleGroupItem2"),"ToggleGroupItem")),t0=m.forwardRef(Li(s(function(t,n){const{__scopeToggleGroup:r,value:i,...o}=t,l=jx(Gf,r),a={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},c=l.type==="single"?a:void 0;return(0,ee.jsx)(O9,{...c,...o,ref:n,onPressedChange:s(u=>{u?l.onItemActivate(i):l.onItemDeactivate(i)},"onPressedChange")})},"ToggleGroupItemImpl2"),"ToggleGroupItemImpl")),B9=Object.defineProperty,ga=s((e,t)=>B9(e,"name",{value:t,configurable:!0}),"__name"),Gx="Toolbar",[H9,MU]=vx(Gx,[Gu,Ux]),qx=Gu(),Zx=Ux(),[K9,Yx]=H9(Gx),U9=m.forwardRef(ga(s(function(t,n){const{__scopeToolbar:r,orientation:i="horizontal",dir:o,loop:l=!0,...a}=t,c=qx(r),u=xx(o);return(0,ee.jsx)(K9,{scope:r,orientation:i,dir:u,children:(0,ee.jsx)(Cx,{asChild:!0,...c,orientation:i,dir:u,loop:l,children:(0,ee.jsx)(Al.div,{role:"toolbar","aria-orientation":i,dir:u,...a,ref:n})})})},"Toolbar2"),"Toolbar")),W9="ToolbarSeparator",z9=m.forwardRef(ga(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=Yx(W9,r);return(0,ee.jsx)(Yk,{orientation:o.orientation==="horizontal"?"vertical":"horizontal",...i,ref:n})},"ToolbarSeparator2"),"ToolbarSeparator")),Xx=m.forwardRef(ga(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=qx(r);return(0,ee.jsx)(bx,{asChild:!0,...o,focusable:!t.disabled,children:(0,ee.jsx)(Al.button,{type:"button",...i,ref:n})})},"ToolbarButton2"),"ToolbarButton")),j9="ToolbarToggleGroup",J9=m.forwardRef(ga(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=Yx(j9,r),l=Zx(r);return(0,ee.jsx)(R9,{"data-orientation":o.orientation,dir:o.dir,...l,...i,ref:n,rovingFocus:!1})},"ToolbarToggleGroup2"),"ToolbarToggleGroup")),G9=m.forwardRef(ga(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=Zx(r),l={__scopeToolbar:t.__scopeToolbar};return(0,ee.jsx)(Xx,{asChild:!0,...l,children:(0,ee.jsx)(V9,{...o,...i,ref:n})})},"ToolbarToggleItem2"),"ToolbarToggleItem")),Qx=U9,q9=z9,os=Xx,Z9=J9,Jd=G9,eC={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"}]]};eC.node;var Y9=lk(eC),X9=Object.defineProperty,Q9=s((e,t,n)=>t in e?X9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"P$1"),zr=s((e,t,n)=>Q9(e,typeof t!="symbol"?t+"":t,n),"p$6"),eM=class tC{static{s(this,"S$1")}constructor(t=new Map){this.map=t}clone(){return new tC(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},Wa=class{static{s(this,"k$1")}constructor(){zr(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return t===void 0&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){const n=this.get(e);n!==void 0&&t(n)}delete(e){return this.map.delete(e)}};function ss(e,t){return t(e),e}s(ss,"d$4");function Qg(){}s(Qg,"x$6");var nC="cell";function n0(e,t){return e===t}s(n0,"O$3");var Yu=new Map,Gd,tM=class{static{s(this,"T$1")}constructor(e={}){zr(this,"subscriptions",new Wa),zr(this,"singletonSubscriptions",new Map),zr(this,"graph",new Wa),zr(this,"state",new Map),zr(this,"distinctNodes",new Map),zr(this,"executionMaps",new Map),zr(this,"definitionRegistry",new Set),zr(this,"combinedCells",[]);for(const t of Object.getOwnPropertySymbols(e))this.state.set(t,e[t])}cellInstance(e,t=!0,n=Symbol()){return this.state.has(n)||this.state.set(n,e),t!==!1&&!this.distinctNodes.has(n)&&this.distinctNodes.set(n,t===!0?n0:t),n}signalInstance(e=!0,t=Symbol()){return e!==!1&&this.distinctNodes.set(t,e===!0?n0:e),t}sub(e,t){this.register(e);const n=this.subscriptions.getOrCreate(e);return n.add(t),()=>n.delete(t)}singletonSub(e,t){return this.register(e),t===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){const n=this.signalInstance();return this.connect({map:s(r=>(...i)=>{r(i)},"map"),sink:n,sources:e}),this.sub(n,t)}pubIn(e){var t;const n=Reflect.ownKeys(e),r=this.getExecutionMap(n),i=r.refCount.clone(),o=r.participatingNodes.slice(),l=new Map(this.state),a=s(c=>{this.graph.use(c,u=>{for(const{sources:d,sink:f}of u)d.has(c)&&i.decrement(f,()=>{o.splice(o.indexOf(f),1),a(f)})})},"l");for(;;){const c=o.shift();if(c===void 0)break;const u=c;let d=!1;const f=s(h=>{const g=this.distinctNodes.get(u);if(g!=null&&g(l.get(u),h)){d=!1;return}d=!0,l.set(u,h),this.state.has(u)&&this.state.set(u,h)},"y");if(Object.prototype.hasOwnProperty.call(e,u)?f(e[u]):r.projections.use(u,h=>{for(const g of h){const p=[...Array.from(g.sources),...Array.from(g.pulls)].map(_=>l.get(_));g.map(f)(...p)}}),d){const h=l.get(u);this.inContext(()=>{this.subscriptions.use(u,g=>{for(const p of g)p(h)})}),(t=this.singletonSubscriptions.get(u))==null||t(h)}else a(u)}}connect({sources:e,pulls:t=[],map:n,sink:r}){const i={map:n,pulls:new Set(t),sink:this.register(r),sources:new Set(e)};for(const o of[...e,...t])this.register(o),this.graph.getOrCreate(o).add(i);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>ss(this.signalInstance(),n=>(this.link(this.pipe(n,...e),t),n))}link(e,t){this.connect({map:s(n=>r=>{n(r)},"map"),sink:t,sources:[e]})}combine(...e){return ss(this.signalInstance(),t=>{this.connect({map:s(n=>(...r)=>{n(r)},"map"),sink:t,sources:e})})}combineCells(...e){const t=this.combinedCells.find(r=>e.length===r.sources.length&&e.every((i,o)=>i===r.sources[o]));if(t)return t.cell;const n=this.cellInstance(e.map(r=>this.getValue(r)),!0);return this.connect({map:s(r=>(...i)=>{r(i)},"map"),sink:n,sources:e}),this.combinedCells.push({sources:e,cell:n}),n}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(t=>this.getValue(t))}register(e){const t=Yu.get(e);return t===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),ss(t.type===nC?this.cellInstance(t.initial,t.distinct,e):this.signalInstance(t.distinct,e),n=>{this.inContext(()=>{t.init(this,n)})}))}inContext(e){const t=Gd;Gd=this;const n=e();return Gd=t,n}changeWith(e,t,n){this.connect({sources:[t],pulls:[e],sink:e,map:s(r=>(i,o)=>{r(n(o,i))},"map")})}calculateExecutionMap(e){const t=[],n=new Set,r=new Wa,i=new eM,o=new Wa,l=s((a,c=0)=>{i.increment(a),!n.has(a)&&(this.register(a),r.use(a,u=>{c=Math.max(...Array.from(u).map(d=>t.indexOf(d)))+1}),this.graph.use(a,u=>{for(const d of u)d.sources.has(a)?(o.getOrCreate(d.sink).add(d),l(d.sink,c)):r.getOrCreate(d.sink).add(a)}),n.add(a),t.splice(c,0,a))},"l");return e.forEach(l),{participatingNodes:t,pendingPulls:r,projections:o,refCount:i}}getExecutionMap(e){let t=e;if(e.length===1){t=e[0];const r=this.executionMaps.get(t);if(r!==void 0)return r}else for(const[r,i]of this.executionMaps.entries())if(Array.isArray(r)&&r.length===e.length&&r.every(o=>e.includes(o)))return i;const n=this.calculateExecutionMap(e);return this.executionMaps.set(t,n),n}combineOperators(...e){return t=>{for(const n of e)t=n(t,this);return t}}};function he(e,t=Qg,n=!0){return ss(Symbol(),r=>{Yu.set(r,{type:nC,distinct:n,initial:e,init:t})})}s(he,"$$2");function wt(e=Qg,t=!1){return ss(Symbol(),n=>{Yu.set(n,{type:"signal",distinct:t,init:e})})}s(wt,"K$1");function Ji(e=Qg){return ss(Symbol(),t=>{Yu.set(t,{type:"signal",distinct:!1,init:e})})}s(Ji,"q$3");var rC=m.createContext(null);function Xu(){const e=m.useContext(rC);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}s(Xu,"R$2");function ni(e){const t=Xu();t.register(e);const n=m.useCallback(r=>t.sub(e,r),[t,e]);return m.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}s(ni,"E$3");function vr(...e){const t=Xu();return ni(m.useMemo(()=>t.combineCells.apply(t,e),[t,...e]))}s(vr,"X$4");function Mn(e){const t=Xu();return t.register(e),m.useCallback(n=>{t.pub(e,n)},[t,e])}s(Mn,"A$1");function $i(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>o=>{i(e(o))},"map"),sink:r,sources:[t]}),r}}s($i,"_$2");function mt(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>(...o)=>{i(o)},"map"),pulls:e,sink:r,sources:[t]}),r}}s(mt,"tt$2");function iC(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>()=>{i(e)},"map"),sink:r,sources:[t]}),r}}s(iC,"et$3");function Qu(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>o=>{e(o)&&i(o)},"map"),sink:r,sources:[t]}),r}}s(Qu,"nt$5");function oC(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:s(o=>l=>{o(t=e(t,l))},"map"),sink:i,sources:[n]}),i}}s(oC,"it$4");var Hc=new WeakMap;function r0(e,t){let n=Hc.get(e);return n||(n=new Set,Hc.set(e,n)),n.add(t),()=>{n.delete(t)}}s(r0,"registerRealmCleanup");function i0(e){const t=Hc.get(e);if(Hc.delete(e),!t)return;let n=!1,r;for(const i of[...t].reverse())try{i()}catch(o){n||(n=!0,r=o)}if(n)throw r instanceof Error?r:new Error("Realm cleanup failed with a non-Error value")}s(i0,"disposeRealmSession");function En(e){return function(t){return{init:s(n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},"init"),postInit:s(n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},"postInit"),update:s(n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)},"update")}}}s(En,"realmPlugin");function nM({children:e,plugins:t}){const[n,r]=m.useState(null);return m.useEffect(()=>{var i,o;const l=new tM;try{for(const a of t)(i=a.init)==null||i.call(a,l);for(const a of t)(o=a.postInit)==null||o.call(a,l)}catch(a){try{i0(l)}catch(c){throw new AggregateError([a,c],"Realm plugin initialization and cleanup both failed")}throw a}return r(l),()=>{i0(l)}},[]),m.useEffect(()=>{var i;if(n)for(const o of t)(i=o.update)==null||i.call(o,n)}),n?m.createElement(rC.Provider,{value:n},e):null}s(nM,"RealmWithPlugins");var rM=_x({$addUpdateTag:s(()=>Eo,"$addUpdateTag"),$applyNodeReplacement:s(()=>ba,"$applyNodeReplacement"),$assumeActiveEditor:s(()=>b8,"$assumeActiveEditor"),$caretFromPoint:s(()=>ei,"$caretFromPoint"),$caretRangeFromSelection:s(()=>Sh,"$caretRangeFromSelection"),$cloneWithProperties:s(()=>Bp,"$cloneWithProperties"),$cloneWithPropertiesEphemeral:s(()=>Y8,"$cloneWithPropertiesEphemeral"),$comparePointCaretNext:s(()=>jp,"$comparePointCaretNext"),$copyNode:s(()=>$p,"$copyNode"),$create:s(()=>Q8,"$create"),$createChildrenArray:s(()=>zl,"$createChildrenArray"),$createLineBreakNode:s(()=>ya,"$createLineBreakNode"),$createNodeSelection:s(()=>Yc,"$createNodeSelection"),$createParagraphNode:s(()=>mn,"$createParagraphNode"),$createPoint:s(()=>gr,"$createPoint"),$createRangeSelection:s(()=>S5,"$createRangeSelection"),$createRangeSelectionFromDom:s(()=>v8,"$createRangeSelectionFromDom"),$createTabNode:s(()=>xp,"$createTabNode"),$createTextNode:s(()=>Ft,"$createTextNode"),$extendCaretToRange:s(()=>Wp,"$extendCaretToRange"),$findMatchingParent:s(()=>bi,"$findMatchingParent"),$formatText:s(()=>g5,"$formatText"),$fullReconcile:s(()=>M5,"$fullReconcile"),$generateNodesFromRawText:s(()=>Cp,"$generateNodesFromRawText"),$getAdjacentChildCaret:s(()=>ms,"$getAdjacentChildCaret"),$getAdjacentNode:s(()=>Q5,"$getAdjacentNode"),$getAdjacentSiblingOrParentSiblingCaret:s(()=>dA,"$getAdjacentSiblingOrParentSiblingCaret"),$getCaretInDirection:s(()=>Nr,"$getCaretInDirection"),$getCaretRange:s(()=>Ki,"$getCaretRange"),$getCaretRangeInDirection:s(()=>Gp,"$getCaretRangeInDirection"),$getCharacterOffsets:s(()=>hh,"$getCharacterOffsets"),$getChildCaret:s(()=>oi,"$getChildCaret"),$getChildCaretAtIndex:s(()=>$2,"$getChildCaretAtIndex"),$getChildCaretOrSelf:s(()=>A2,"$getChildCaretOrSelf"),$getCollapsedCaretRange:s(()=>O2,"$getCollapsedCaretRange"),$getCommonAncestor:s(()=>au,"$getCommonAncestor"),$getCommonAncestorResultBranchOrder:s(()=>Jp,"$getCommonAncestorResultBranchOrder"),$getDOMSlot:s(()=>Rn,"$getDOMSlot"),$getDOMTextNode:s(()=>Qr,"$getDOMTextNode"),$getDocument:s(()=>vn,"$getDocument"),$getEditor:s(()=>xr,"$getEditor"),$getEditorDOMRenderConfig:s(()=>Vp,"$getEditorDOMRenderConfig"),$getNearestNodeFromDOMNode:s(()=>Mp,"$getNearestNodeFromDOMNode"),$getNearestRootOrShadowRoot:s(()=>Rp,"$getNearestRootOrShadowRoot"),$getNodeByKey:s(()=>nt,"$getNodeByKey"),$getNodeByKeyOrThrow:s(()=>r2,"$getNodeByKeyOrThrow"),$getNodeFromDOMNode:s(()=>kp,"$getNodeFromDOMNode"),$getPreviousSelection:s(()=>No,"$getPreviousSelection"),$getRoot:s(()=>Dn,"$getRoot"),$getSelection:s(()=>Ve,"$getSelection"),$getSiblingCaret:s(()=>_t,"$getSiblingCaret"),$getSlot:s(()=>Vi,"$getSlot"),$getSlotFrame:s(()=>E2,"$getSlotFrame"),$getSlotHost:s(()=>Kn,"$getSlotHost"),$getSlotNameWithinHost:s(()=>b2,"$getSlotNameWithinHost"),$getSlotNames:s(()=>Jn,"$getSlotNames"),$getState:s(()=>Wc,"$getState"),$getStateChange:s(()=>MM,"$getStateChange"),$getTextContent:s(()=>x8,"$getTextContent"),$getTextNodeOffset:s(()=>hr,"$getTextNodeOffset"),$getTextPointCaret:s(()=>Hi,"$getTextPointCaret"),$getTextPointCaretSlice:s(()=>Eh,"$getTextPointCaretSlice"),$getWritableNodeState:s(()=>ip,"$getWritableNodeState"),$hasAncestor:s(()=>Ul,"$hasAncestor"),$hasUpdateTag:s(()=>V8,"$hasUpdateTag"),$insertNodeToNearestRootAtCaret:s(()=>F2,"$insertNodeToNearestRootAtCaret"),$insertNodes:s(()=>y8,"$insertNodes"),$isBlockElementNode:s(()=>b5,"$isBlockElementNode"),$isChildCaret:s(()=>Gn,"$isChildCaret"),$isDecoratorNode:s(()=>We,"$isDecoratorNode"),$isEditorState:s(()=>T8,"$isEditorState"),$isElementDOMSlot:s(()=>g2,"$isElementDOMSlot"),$isElementNode:s(()=>F,"$isElementNode"),$isExtendableTextPointCaret:s(()=>L2,"$isExtendableTextPointCaret"),$isInlineElementOrDecoratorNode:s(()=>n2,"$isInlineElementOrDecoratorNode"),$isInlineFormattable:s(()=>Zc,"$isInlineFormattable"),$isLeafNode:s(()=>L8,"$isLeafNode"),$isLexicalNode:s(()=>_p,"$isLexicalNode"),$isLineBreakNode:s(()=>Ir,"$isLineBreakNode"),$isNodeCaret:s(()=>oA,"$isNodeCaret"),$isNodeSelection:s(()=>Ms,"$isNodeSelection"),$isParagraphNode:s(()=>H5,"$isParagraphNode"),$isRangeSelection:s(()=>ve,"$isRangeSelection"),$isRootNode:s(()=>Mt,"$isRootNode"),$isRootOrShadowRoot:s(()=>kt,"$isRootOrShadowRoot"),$isSelectionCapturedInDecoratorInput:s(()=>cd,"$isSelectionCapturedInDecoratorInput"),$isShadowRootNode:s(()=>Lp,"$isShadowRootNode"),$isSiblingCaret:s(()=>Bi,"$isSiblingCaret"),$isSlotChild:s(()=>Fi,"$isSlotChild"),$isSlotHost:s(()=>Mr,"$isSlotHost"),$isTabNode:s(()=>nd,"$isTabNode"),$isTextNode:s(()=>X,"$isTextNode"),$isTextPointCaret:s(()=>fr,"$isTextPointCaret"),$isTextPointCaretSlice:s(()=>uA,"$isTextPointCaretSlice"),$isTokenOrSegmented:s(()=>An,"$isTokenOrSegmented"),$isTokenOrTab:s(()=>Di,"$isTokenOrTab"),$markSlotEditable:s(()=>y2,"$markSlotEditable"),$needsBlockCursorBeside:s(()=>Ec,"$needsBlockCursorBeside"),$nodesOfType:s(()=>F8,"$nodesOfType"),$normalizeCaret:s(()=>dr,"$normalizeCaret"),$normalizeSelection__EXPERIMENTAL:s(()=>Yo,"$normalizeSelection__EXPERIMENTAL"),$onUpdate:s(()=>t2,"$onUpdate"),$parseSerializedNode:s(()=>E8,"$parseSerializedNode"),$removeFromParent:s(()=>ur,"$removeFromParent"),$removeSlot:s(()=>w2,"$removeSlot"),$removeTextFromCaretRange:s(()=>R2,"$removeTextFromCaretRange"),$rewindSiblingCaret:s(()=>Do,"$rewindSiblingCaret"),$selectAll:s(()=>P8,"$selectAll"),$setCompositionKey:s(()=>Rt,"$setCompositionKey"),$setDirectionFromDOM:s(()=>m2,"$setDirectionFromDOM"),$setFormatFromDOM:s(()=>_2,"$setFormatFromDOM"),$setPointFromCaret:s(()=>_s,"$setPointFromCaret"),$setSelection:s(()=>dn,"$setSelection"),$setSelectionFromCaretRange:s(()=>D2,"$setSelectionFromCaretRange"),$setSlot:s(()=>Kp,"$setSlot"),$setState:s(()=>AM,"$setState"),$setTextFormat:s(()=>m8,"$setTextFormat"),$splitAtPointCaretNext:s(()=>P2,"$splitAtPointCaretNext"),$splitNode:s(()=>K8,"$splitNode"),$updateDOMSelection:s(()=>T5,"$updateDOMSelection"),$updateRangeSelectionFromCaretRange:s(()=>vl,"$updateRangeSelectionFromCaretRange"),ArtificialNode__DO_NOT_USE:s(()=>$5,"ArtificialNode__DO_NOT_USE"),BEFORE_INPUT_COMMAND:s(()=>sp,"BEFORE_INPUT_COMMAND"),BLUR_COMMAND:s(()=>GC,"BLUR_COMMAND"),CAN_REDO_COMMAND:s(()=>WM,"CAN_REDO_COMMAND"),CAN_UNDO_COMMAND:s(()=>zM,"CAN_UNDO_COMMAND"),CAN_USE_BEFORE_INPUT:s(()=>Nl,"CAN_USE_BEFORE_INPUT"),CAN_USE_DOM:s(()=>er,"CAN_USE_DOM"),CLEAR_EDITOR_COMMAND:s(()=>KM,"CLEAR_EDITOR_COMMAND"),CLEAR_HISTORY_COMMAND:s(()=>UM,"CLEAR_HISTORY_COMMAND"),CLICK_COMMAND:s(()=>IC,"CLICK_COMMAND"),COLLABORATION_TAG:s(()=>r8,"COLLABORATION_TAG"),COMMAND_PRIORITY_BEFORE_CRITICAL:s(()=>-4,"COMMAND_PRIORITY_BEFORE_CRITICAL"),COMMAND_PRIORITY_BEFORE_EDITOR:s(()=>-8,"COMMAND_PRIORITY_BEFORE_EDITOR"),COMMAND_PRIORITY_BEFORE_HIGH:s(()=>-5,"COMMAND_PRIORITY_BEFORE_HIGH"),COMMAND_PRIORITY_BEFORE_LOW:s(()=>-7,"COMMAND_PRIORITY_BEFORE_LOW"),COMMAND_PRIORITY_BEFORE_NORMAL:s(()=>-6,"COMMAND_PRIORITY_BEFORE_NORMAL"),COMMAND_PRIORITY_CRITICAL:s(()=>4,"COMMAND_PRIORITY_CRITICAL"),COMMAND_PRIORITY_EDITOR:s(()=>0,"COMMAND_PRIORITY_EDITOR"),COMMAND_PRIORITY_HIGH:s(()=>3,"COMMAND_PRIORITY_HIGH"),COMMAND_PRIORITY_LOW:s(()=>1,"COMMAND_PRIORITY_LOW"),COMMAND_PRIORITY_NORMAL:s(()=>2,"COMMAND_PRIORITY_NORMAL"),COMPOSITION_END_COMMAND:s(()=>cp,"COMPOSITION_END_COMMAND"),COMPOSITION_END_TAG:s(()=>vp,"COMPOSITION_END_TAG"),COMPOSITION_START_COMMAND:s(()=>ap,"COMPOSITION_START_COMMAND"),COMPOSITION_START_TAG:s(()=>l8,"COMPOSITION_START_TAG"),CONTROLLED_TEXT_INSERTION_COMMAND:s(()=>ls,"CONTROLLED_TEXT_INSERTION_COMMAND"),COPY_COMMAND:s(()=>gp,"COPY_COMMAND"),CUT_COMMAND:s(()=>pp,"CUT_COMMAND"),CUT_TAG:s(()=>"cut","CUT_TAG"),DEFAULT_EDITOR_DOM_CONFIG:s(()=>Kl,"DEFAULT_EDITOR_DOM_CONFIG"),DELETE_CHARACTER_COMMAND:s(()=>Fl,"DELETE_CHARACTER_COMMAND"),DELETE_LINE_COMMAND:s(()=>Bl,"DELETE_LINE_COMMAND"),DELETE_WORD_COMMAND:s(()=>Vl,"DELETE_WORD_COMMAND"),DRAGEND_COMMAND:s(()=>zC,"DRAGEND_COMMAND"),DRAGOVER_COMMAND:s(()=>WC,"DRAGOVER_COMMAND"),DRAGSTART_COMMAND:s(()=>UC,"DRAGSTART_COMMAND"),DROP_COMMAND:s(()=>KC,"DROP_COMMAND"),DecoratorNode:s(()=>bp,"DecoratorNode"),ElementNode:s(()=>As,"ElementNode"),FOCUS_COMMAND:s(()=>JC,"FOCUS_COMMAND"),FORMAT_ELEMENT_COMMAND:s(()=>HM,"FORMAT_ELEMENT_COMMAND"),FORMAT_TEXT_COMMAND:s(()=>Ti,"FORMAT_TEXT_COMMAND"),HISTORIC_TAG:s(()=>e8,"HISTORIC_TAG"),HISTORY_MERGE_TAG:s(()=>xc,"HISTORY_MERGE_TAG"),HISTORY_PUSH_TAG:s(()=>t8,"HISTORY_PUSH_TAG"),INDENT_CONTENT_COMMAND:s(()=>VM,"INDENT_CONTENT_COMMAND"),INPUT_COMMAND:s(()=>lp,"INPUT_COMMAND"),INSERT_LINE_BREAK_COMMAND:s(()=>ml,"INSERT_LINE_BREAK_COMMAND"),INSERT_PARAGRAPH_COMMAND:s(()=>sh,"INSERT_PARAGRAPH_COMMAND"),INSERT_TAB_COMMAND:s(()=>FM,"INSERT_TAB_COMMAND"),INTERNAL_$isBlock:s(()=>hn,"INTERNAL_$isBlock"),IS_ALL_FORMATTING:s(()=>aM,"IS_ALL_FORMATTING"),IS_ANDROID:s(()=>ep,"IS_ANDROID"),IS_ANDROID_CHROME:s(()=>Ol,"IS_ANDROID_CHROME"),IS_APPLE:s(()=>Vn,"IS_APPLE"),IS_APPLE_WEBKIT:s(()=>ma,"IS_APPLE_WEBKIT"),IS_BOLD:s(()=>1,"IS_BOLD"),IS_CHROME:s(()=>tp,"IS_CHROME"),IS_CODE:s(()=>16,"IS_CODE"),IS_FIREFOX:s(()=>ri,"IS_FIREFOX"),IS_HIGHLIGHT:s(()=>128,"IS_HIGHLIGHT"),IS_IOS:s(()=>yo,"IS_IOS"),IS_ITALIC:s(()=>2,"IS_ITALIC"),IS_SAFARI:s(()=>pa,"IS_SAFARI"),IS_STRIKETHROUGH:s(()=>4,"IS_STRIKETHROUGH"),IS_SUBSCRIPT:s(()=>32,"IS_SUBSCRIPT"),IS_SUPERSCRIPT:s(()=>64,"IS_SUPERSCRIPT"),IS_UNDERLINE:s(()=>8,"IS_UNDERLINE"),KEY_ARROW_DOWN_COMMAND:s(()=>$C,"KEY_ARROW_DOWN_COMMAND"),KEY_ARROW_LEFT_COMMAND:s(()=>DC,"KEY_ARROW_LEFT_COMMAND"),KEY_ARROW_RIGHT_COMMAND:s(()=>NC,"KEY_ARROW_RIGHT_COMMAND"),KEY_ARROW_UP_COMMAND:s(()=>LC,"KEY_ARROW_UP_COMMAND"),KEY_BACKSPACE_COMMAND:s(()=>FC,"KEY_BACKSPACE_COMMAND"),KEY_DELETE_COMMAND:s(()=>BC,"KEY_DELETE_COMMAND"),KEY_DOWN_COMMAND:s(()=>hp,"KEY_DOWN_COMMAND"),KEY_ENTER_COMMAND:s(()=>jc,"KEY_ENTER_COMMAND"),KEY_ESCAPE_COMMAND:s(()=>VC,"KEY_ESCAPE_COMMAND"),KEY_MODIFIER_COMMAND:s(()=>qC,"KEY_MODIFIER_COMMAND"),KEY_SPACE_COMMAND:s(()=>PC,"KEY_SPACE_COMMAND"),KEY_TAB_COMMAND:s(()=>HC,"KEY_TAB_COMMAND"),LineBreakNode:s(()=>sd,"LineBreakNode"),MOVE_TO_END:s(()=>OC,"MOVE_TO_END"),MOVE_TO_START:s(()=>RC,"MOVE_TO_START"),NODE_STATE_DIRECT:s(()=>Yf,"NODE_STATE_DIRECT"),NODE_STATE_KEY:s(()=>"$","NODE_STATE_KEY"),NODE_STATE_LATEST:s(()=>vC,"NODE_STATE_LATEST"),OUTDENT_CONTENT_COMMAND:s(()=>BM,"OUTDENT_CONTENT_COMMAND"),PASTE_COMMAND:s(()=>up,"PASTE_COMMAND"),PASTE_TAG:s(()=>n8,"PASTE_TAG"),ParagraphNode:s(()=>ld,"ParagraphNode"),REDO_COMMAND:s(()=>fp,"REDO_COMMAND"),REMOVE_TEXT_COMMAND:s(()=>_c,"REMOVE_TEXT_COMMAND"),RootNode:s(()=>od,"RootNode"),SELECTION_CHANGE_COMMAND:s(()=>op,"SELECTION_CHANGE_COMMAND"),SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:s(()=>$M,"SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),SELECT_ALL_COMMAND:s(()=>jC,"SELECT_ALL_COMMAND"),SET_TEXT_FORMAT_COMMAND:s(()=>PM,"SET_TEXT_FORMAT_COMMAND"),SKIP_COLLAB_TAG:s(()=>i8,"SKIP_COLLAB_TAG"),SKIP_DOM_SELECTION_TAG:s(()=>s8,"SKIP_DOM_SELECTION_TAG"),SKIP_SCROLL_INTO_VIEW_TAG:s(()=>o8,"SKIP_SCROLL_INTO_VIEW_TAG"),SKIP_SELECTION_FOCUS_TAG:s(()=>r5,"SKIP_SELECTION_FOCUS_TAG"),TEXT_TYPE_TO_FORMAT:s(()=>Gt,"TEXT_TYPE_TO_FORMAT"),TabNode:s(()=>td,"TabNode"),TextNode:s(()=>_a,"TextNode"),UNDO_COMMAND:s(()=>dp,"UNDO_COMMAND"),addClassNamesToElement:s(()=>yA,"addClassNamesToElement"),buildImportMap:s(()=>QM,"buildImportMap"),configExtension:s(()=>pA,"configExtension"),createCommand:s(()=>we,"createCommand"),createEditor:s(()=>A8,"createEditor"),createRefCountedRegistry:s(()=>ZC,"createRefCountedRegistry"),createSharedNodeState:s(()=>yC,"createSharedNodeState"),createState:s(()=>kM,"createState"),declarePeerDependency:s(()=>mA,"declarePeerDependency"),defineExtension:s(()=>gA,"defineExtension"),findAllLexicalElementsDeep:s(()=>s2,"findAllLexicalElementsDeep"),flipDirection:s(()=>Gi,"flipDirection"),getActiveElement:s(()=>ou,"getActiveElement"),getActiveElementDeep:s(()=>ps,"getActiveElementDeep"),getComposedEventTarget:s(()=>Pp,"getComposedEventTarget"),getComposedStaticRange:s(()=>Os,"getComposedStaticRange"),getDOMOwnerDocument:s(()=>dd,"getDOMOwnerDocument"),getDOMSelection:s(()=>tr,"getDOMSelection"),getDOMSelectionFromTarget:s(()=>i2,"getDOMSelectionFromTarget"),getDOMSelectionPoints:s(()=>Yn,"getDOMSelectionPoints"),getDOMSelectionRange:s(()=>a2,"getDOMSelectionRange"),getDOMSelectionRangeAndPoints:s(()=>H8,"getDOMSelectionRangeAndPoints"),getDOMShadowRoots:s(()=>o2,"getDOMShadowRoots"),getDOMTextNode:s(()=>z5,"getDOMTextNode"),getDeclaredSlots:s(()=>S2,"getDeclaredSlots"),getEditorPropertyFromDOMNode:s(()=>Ca,"getEditorPropertyFromDOMNode"),getNearestEditorFromDOMNode:s(()=>fo,"getNearestEditorFromDOMNode"),getParentElement:s(()=>Oo,"getParentElement"),getRegisteredNode:s(()=>ad,"getRegisteredNode"),getRegisteredNodeOrThrow:s(()=>wp,"getRegisteredNodeOrThrow"),getRegisteredSubtypeMap:s(()=>X8,"getRegisteredSubtypeMap"),getRootOwnerDocument:s(()=>l2,"getRootOwnerDocument"),getStaticNodeConfig:s(()=>Ea,"getStaticNodeConfig"),getStyleObjectFromCSS:s(()=>dh,"getStyleObjectFromCSS"),getTextDirection:s(()=>R8,"getTextDirection"),getTransformSetFromKlass:s(()=>U5,"getTransformSetFromKlass"),isBlockDomNode:s(()=>Fp,"isBlockDomNode"),isCurrentlyReadOnlyMode:s(()=>bo,"isCurrentlyReadOnlyMode"),isDOMCapturingSelection:s(()=>Wl,"isDOMCapturingSelection"),isDOMDocumentNode:s(()=>Is,"isDOMDocumentNode"),isDOMNode:s(()=>Ds,"isDOMNode"),isDOMShadowRoot:s(()=>ii,"isDOMShadowRoot"),isDOMTextNode:s(()=>yr,"isDOMTextNode"),isDOMUnmanaged:s(()=>Hp,"isDOMUnmanaged"),isDocumentFragment:s(()=>f2,"isDocumentFragment"),isExactShortcutMatch:s(()=>qe,"isExactShortcutMatch"),isHTMLAnchorElement:s(()=>U8,"isHTMLAnchorElement"),isHTMLElement:s(()=>vt,"isHTMLElement"),isHTMLTableCellElement:s(()=>z8,"isHTMLTableCellElement"),isHTMLTableRowElement:s(()=>W8,"isHTMLTableRowElement"),isInlineDomNode:s(()=>h2,"isInlineDomNode"),isLastChildInBlockNode:s(()=>V5,"isLastChildInBlockNode"),isLexicalEditor:s(()=>ud,"isLexicalEditor"),isModifierMatch:s(()=>X5,"isModifierMatch"),isOnlyChildInBlockNode:s(()=>F5,"isOnlyChildInBlockNode"),isSelectionCapturedInDecoratorInput:s(()=>D8,"isSelectionCapturedInDecoratorInput"),isSelectionWithinEditor:s(()=>xa,"isSelectionWithinEditor"),iterStaticNodeConfigChain:s(()=>Sa,"iterStaticNodeConfigChain"),makeStepwiseIterator:s(()=>zp,"makeStepwiseIterator"),mergeRegister:s(()=>qp,"mergeRegister"),mountSlotContainer:s(()=>G8,"mountSlotContainer"),normalizeClassNames:s(()=>Ta,"normalizeClassNames"),registerEventListener:s(()=>mp,"registerEventListener"),registerEventListeners:s(()=>CA,"registerEventListeners"),removeClassNamesFromElement:s(()=>xA,"removeClassNamesFromElement"),removeFromParent:s(()=>$8,"removeFromParent"),resetRandomKey:s(()=>N8,"resetRandomKey"),safeCast:s(()=>_A,"safeCast"),setDOMStyleFromCSS:s(()=>fh,"setDOMStyleFromCSS"),setDOMStyleObject:s(()=>c8,"setDOMStyleObject"),setDOMUnmanaged:s(()=>v2,"setDOMUnmanaged"),setNodeIndentFromDOM:s(()=>p2,"setNodeIndentFromDOM"),shallowMergeConfig:s(()=>vA,"shallowMergeConfig"),stopLexicalPropagation:s(()=>ch,"stopLexicalPropagation"),toggleTextFormatType:s(()=>Pi,"toggleTextFormatType"),tokenizeRawText:s(()=>w5,"tokenizeRawText"),unmountSlotContainer:s(()=>q8,"unmountSlotContainer")});function B(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(B,"t$5");function sC(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);n.search=r.toString()}s(sC,"e$4");var er=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,iM=er&&"documentMode"in document?document.documentMode:null,Vn=er&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ri=er&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Nl=!(!er||!("InputEvent"in window)||iM)&&"getTargetRanges"in new window.InputEvent("input"),yo=er&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ep=er&&/Android/.test(navigator.userAgent),pa=er&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!ep,tp=er&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Ol=er&&ep&&tp,ma=er&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Vn&&!tp,oM=0,sM=1,lM=2;var aM=2047,cM=1,uM=2,dM=3,fM=4,hM=5,gM=6,Dl=pa||yo||ma?" ":"​",lo=`
3
+
4
+ `,np=ri?" ":Dl,lC="֑-߿יִ-﷽ﹰ-ﻼ",aC="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",pM=new RegExp("^[^"+aC+"]*["+lC+"]"),mM=new RegExp("^[^"+lC+"]*["+aC+"]"),Gt={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},_M={directionless:1,unmergeable:2},Kc={center:2,end:6,justify:4,left:1,right:3,start:5},vM={[uM]:"center",[gM]:"end",[fM]:"justify",[cM]:"left",[dM]:"right",[hM]:"start"},yM={normal:0,segmented:2,token:1},xM={[oM]:"normal",[lM]:"segmented",[sM]:"token"};var o0="$config";function s0(){return xr()._blockCursorElement}s(s0,"j$1");function CM(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}s(CM,"V$2");var cC=class pc{static{s(this,"q$2")}element;before;after;constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new pc(this.element,t,this.after)}withAfter(t){return new pc(this.element,this.before,t)}withElement(t){return this.element===t?this:new pc(t,this.before,this.after)}insertChild(t){const n=this.getInsertionAnchor();return n!==null&&n.parentElement!==this.element&&B(357),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&B(358),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&B(359),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;return n===this.getInsertionAnchor()?null:n}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,n,r){if(this.element===t)return n===t&&r===0?"before":"after";const i=l0(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(n===t)return r<=o?"before":"after";const l=l0(t,n);if(l===null)return"after";const a=Array.prototype.indexOf.call(t.childNodes,l);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function l0(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}s(l0,"Y$1");var uC=class mc extends cC{static{s(this,"G$1")}withBefore(t){return new mc(this.element,t,this.after)}withAfter(t){return new mc(this.element,this.before,t)}withElement(t){return this.element===t?this:new mc(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;for(;CM(n);)t=n,n=n.nextSibling;const r=t?t.nextSibling:this.element.firstChild;return r!==null&&r===s0()?r:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(ma||yo||pa);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=vn().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(o,i),t){const l=vn().createElement("img");l.setAttribute("data-lexical-managed-linebreak","true"),l.style.setProperty("display","inline","important"),l.style.setProperty("border","0px","important"),l.style.setProperty("margin","0px","important"),l.alt="",r.insertBefore(l,o),r.__lexicalLineBreak=l}else r.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),n=this.getInsertionAnchor();let r=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==n;i=i.nextSibling)r++;return r}resolveChildIndex(t,n,r,i){if(r===this.element){const c=this.getFirstChildOffset(),u=s0(),d=this.element.childNodes,f=Math.min(i,d.length);let h=0;for(let g=c;g<f;g++)d[g]!==u&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=a0(n,r);o.push(i);const l=a0(n,this.element);let a=t.getIndexWithinParent();for(let c=0;c<l.length;c++){const u=o[c],d=l[c];if(u===void 0||u<d)break;if(u>d){a+=1;break}}return[t.getParentOrThrow(),a]}};function a0(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==e&&B(225),n.reverse()}s(a0,"X$3");var dC;try{dC="0.48.0+prod.esm"}catch{}var fC=dC??'"<unknown>+source"',js=class{static{s(this,"tt$1")}_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(){const e=Array.from(this._front).reverse();for(const 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]()}},Qi=null;function hC(e,t=1e3){return e instanceof qf?e.clone():e.size<t?new Map(e):new qf().init(new Map(e),void 0,e.size)}s(hC,"nt$4");var qf=class gC{static{s(this,"ot$4")}_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new gC().init(this._old,this._nursery,this._size)}init(t,n,r){return this._old=t,this._nursery=n,this._size=r,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const n=this._nursery&&this._nursery.get(t);return n!==void 0?n:this._old&&this._old.get(t)}get(t){const n=this.getWithTombstone(t);return n===Qi?void 0:n}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(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const n=new Map(this._old);for(const[r,i]of this._nursery)i!==Qi?n.set(r,i):n.delete(r);this._old=n,this._nursery=void 0}return this._mutable=!1,this}set(t,n){const r=this.getWithTombstone(t);if(r===n)return this;const i=this.getNursery();return r!==Qi&&r!==void 0||(this._size++,r===Qi&&i.delete(t)),i.set(t,n),this}delete(t){const n=this.has(t);return n&&(this.getNursery().set(t,Qi),this._size--),n}getOrInsert(t,n){const r=this.get(t);return r!==void 0?r:(this.set(t,n),n)}getOrInsertComputed(t,n){const r=this.get(t);if(r!==void 0)return r;const i=n(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,n=this._old;if(n)for(const r of n){const i=r[0],o=t?t.get(i):void 0;o!==Qi&&(o!==void 0&&(r[1]=o),yield r)}if(t)for(const r of t)r[1]===Qi||n&&n.has(r[0])||(yield r)}forEach(t,n){n!==void 0&&(t=t.bind(n));for(const[r,i]of this.entries())t(i,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Uc(e,t,n,r,i,o){if(F(e)){let l=e.getFirstChild();for(;l!==null;){const a=l.__key;l.__parent===t&&((F(l)||Mr(l)&&l.__slots!==null)&&Uc(l,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),l=l.getNextSibling()}}for(const l of Mr(e)&&e.__slots!==null?e.__slots.values():[]){const a=r.get(l);a!==void 0&&Fi(a)&&a.__slotHost===t&&((F(a)||Mr(a)&&a.__slots!==null)&&Uc(a,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l))}}s(Uc,"rt$4");var Zf=!1,rp=0;function bM(e){rp=e.timeStamp}s(bM,"lt$4");function qd(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Ns(e,n)!==void 0}s(qd,"ct$3");function EM(e,t,n){const r=tr(Sn(n)),i=r&&Yn(r,n._rootElement);let o=null,l=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,l=i.focusOffset);const a=e.nodeValue;a!==null&&Np(t,a,o,l,!1)}s(EM,"at$1");function SM(e,t,n){if(ve(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return yr(t)&&n.isAttached()}s(SM,"ut$3");function TM(e,t,n){for(let r=e;r&&!Hp(r);r=Oo(r)){const i=Ns(r,t);if(i!==void 0){const o=nt(i,n);if(o)return We(o)||!vt(r)?void 0:[r,o]}}}s(TM,"ft$3");function pC(e,t,n){Zf=!0;const r=performance.now()-rp>100;try{jn(e,()=>{const i=Ve()||(function(f){return f.read("latest",()=>{const h=Ve();return h!==null?h.clone():null})})(e),o=new Map,l=e._editorState,a=e._blockCursorElement;let c=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],g=h.type,p=h.target,_=TM(p,e,l);if(!_)continue;const[y,v]=_;if(g==="characterData")r&&X(v)&&yr(p)&&SM(i,p,v)&&EM(p,v,e);else if(g==="childList"){c=!0;const x=h.addedNodes;for(let S=0;S<x.length;S++){const M=x[S],T=kp(M),E=M.parentNode;if(!(E==null||M===a||T!==null||qd(M,E,e)||e._slotsUsed&&vt(M)&&M.hasAttribute("data-lexical-slot")||Hp(M))){if(ri){const A=(vt(M)?M.innerText:null)||M.nodeValue;A&&(u+=A)}E.removeChild(M)}}const C=h.removedNodes,b=C.length;if(b>0){let S=0;for(let M=0;M<b;M++){const T=C[M];(qd(T,p,e)||a===T)&&(p.appendChild(T),S++)}b!==S&&o.set(y,v)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],g=h.addedNodes,p=h.target;for(let _=0;_<g.length;_++){const y=g[_],v=y.parentNode;v==null||y.nodeName!=="BR"||qd(y,p,e)||v.removeChild(y)}}n.takeRecords()}i!==null&&(c&&dn(i),ri&&e2(e)&&i.insertRawText(u))})}finally{Zf=!1}}s(pC,"dt$5");function mC(e){const t=e._observer;t!==null&&pC(e,t.takeRecords(),t)}s(mC,"ht$4");function _C(e){(function(t){rp===0&&Sn(t).addEventListener("textInput",bM,!0)})(e),e._observer=new MutationObserver((t,n)=>{pC(e,t,n)})}s(_C,"gt$1");var Yf="direct",vC="latest",wM=class{static{s(this,"yt$4")}key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||NM).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function kM(e,t){return new wM(e,t)}s(kM,"mt$5");function Wc(e,t,n=vC){const r=(n==="latest"?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}s(Wc,"xt$5");function MM(e,t,n){const r=Wc(e,n,Yf),i=Wc(t,n,Yf);return n.isEqual(r,i)?null:[r,i]}s(MM,"Ct$5");function AM(e,t,n){let r;if(Ht(),typeof n=="function"){const o=e.getLatest(),l=Wc(o,t);if(r=n(l),t.isEqual(l,r))return o}else r=n;const i=e.getWritable();return ip(i).updateFromKnown(t,r),i}s(AM,"St$6");function yC(e){const t=new Map,n=new Set;for(const{ownNodeConfig:r}of Sa(typeof e=="function"?e:e.replace))if(r&&r.stateConfigs)for(const i of r.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&n.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:n,sharedConfigMap:t}}s(yC,"vt$5");var c0=new Set(["__proto__","constructor","prototype"]),IM=class xC{static{s(this,"kt$6")}node;knownState;unknownState;sharedNodeState;size;constructor(t,n,r=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:l}=this.sharedNodeState,a=o!==void 0?o:(function(c,u,d){let f=d.size;if(u)for(const h in u){const g=c.get(h);g&&d.has(g)||f++}return f})(l,r,i);this.size=a}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return u0(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new xC(t,n,(function(o,l,a){let c;if(a)for(const[u,d]of Object.entries(a)){if(c0.has(u))continue;const f=o.get(u);f?l.has(f)||l.set(f,f.parse(d)):(c=c||{},c[u]=d)}return c})(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&r in o||(o&&(delete o[r],this.unknownState=u0(o)),this.size++),i.set(t,n)}updateFromUnknown(t,n){if(c0.has(t))return;const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function ip(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new IM(t,CC(t));return t.__state=n,n}s(ip,"bt$4");function CC(e){return e.__state?e.__state.sharedNodeState:wp(xr(),e.getType()).sharedNodeState}s(CC,"Nt$6");function u0(e){if(e)for(const t in e)return e}s(u0,"wt$4");function NM(e){return e}s(NM,"Et$5");function d0(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}s(d0,"Ot$6");function f0(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[o,l]of Object.entries(r))if(!e.has(o)&&(e.add(o),l!==(i?i[o]:void 0)))return!0}return!1}s(f0,"Mt$5");function h0(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}s(h0,"At$4");function g0(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,l=t.__format,a=t.__style,c=e.__state,u=t.__state;return(n===null||n===o)&&(r===null||r===l)&&(i===null||i===a)&&(e.__state===null||c===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&d0(h,d,f)||f&&d0(h,f,d)||d&&f0(h,d,f)||f&&f0(h,f,d))})(c,u))}s(g0,"Dt$5");function p0(e,t){const n=e.mergeWithSibling(t),r=Ue()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}s(p0,"Pt$5");function m0(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&X(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(g0(t,r)){r=p0(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&X(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(g0(r,n)){r=p0(r,n);break}break}n.remove()}}else r.remove()}s(m0,"Ft$5");function Yo(e){return _0(e.anchor),_0(e.focus),e}s(Yo,"It$4");function _0(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),X(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!F(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}s(_0,"Lt$4");var Rl=Symbol.for("@lexical/CachedTextSize");function v0(e,t){return Qf.read(()=>{let n=0,r=e;for(let i=0;i<t&&r!==null;i++){const o=cr.get(r);if(o===void 0&&B(345,r),F(o)){const l=ht.get(r);if(l!==void 0&&F(l)&&l.__parent!==o.__parent)n+=o.getTextContentSize();else{const a=xo.get(r),c=a&&a.__lexicalTextContent;typeof c!="string"&&B(346,o.getType()),n+=c.length}i<t-1&&!o.isInline()&&(n+=2)}else{const l=o[Rl];l===void 0&&B(347,o.getType(),r),n+=l}r=o.__next}return n},{editor:Be})}s(v0,"zt$4");function bC(e){F(e)||e[Rl]===void 0&&(e[Rl]=X(e)?e.__text.length:e.getTextContentSize())}s(bC,"Bt$4");var OM=4,Ll,Be,$l,Oe="",xt=null,Qt=null,qt=null;function wr(){return{firstTextKey:qt,format:xt,style:Qt}}s(wr,"qt$3");function Bn(e){e.firstTextKey!==null&&(xt=e.format,Qt=e.style,qt=e.firstTextKey)}s(Bn,"Yt$2");function Xf(e){if(qt!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&B(348),t===null)return;const n=ht.get(t);X(n)&&(xt=n.getFormat(),Qt=n.getStyle(),qt=t)}s(Xf,"Gt$2");var ed,gl,pl,cr,Qf,ht,xo,eh,Pl,Co,Gr=!1,zc=!1;function Ni(e,t){const n=cr.get(e),r=ht.has(e);if(t!==null){const i=oh(e);i.parentNode===t&&t.removeChild(i)}if(!r){if(Be._keyToDOMMap.delete(e),F(n)){const i=zl(n,cr);th(i,0,i.length-1,null)}if(n!==void 0){for(const i of kn(n).values()){const o=rh(i);Ni(i,null),o!==null&&o.remove()}Op(Pl,$l,ed,n,"destroyed")}}}s(Ni,"ae$2");function th(e,t,n,r){for(let i=t;i<=n;++i){const o=e[i];o!==void 0&&Ni(o,r)}}s(th,"ue$3");function eo(e,t){e.setProperty("text-align",t)}s(eo,"fe$1");var DM="40px";function EC(e,t){const n=Ll.theme.indent;if(typeof n=="string"){const 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, ${DM}))`)}s(EC,"he$2");function SC(e,t){const n=e.style;t===0?eo(n,""):t===1?eo(n,"left"):t===2?eo(n,"center"):t===3?eo(n,"right"):t===4?eo(n,"justify"):t===5?eo(n,"start"):t===6&&eo(n,"end")}s(SC,"ge$2");function nh(e,t){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(Mt(r))return null;const o=r.getParent();return o===null||kt(o)&&o.__dir===null?"auto":null})(t);n!==null?e.dir=n:e.removeAttribute("dir")}s(nh,"_e$2");function TC(e){const t=vn().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}s(TC,"pe$2");function wC(e,t,n){t||e.contentEditable==="false"?y2(n,Be):n.removeAttribute("contenteditable")}s(wC,"ye$2");function y0(e,t,n){const r=Oe,i=wr();Oe="";let o="";const l=We(e);for(const[a,c]of n){const u=TC(a);wC(t,l,u),t.appendChild(u),Oe="";const d=wr();Oi(c,Rn(e,u,Be)),Bn(d),kC(e,a,t,u),o+=Oe}return Bn(i),Oe=r,o}s(y0,"me$2");function kn(e){return Mr(e)&&e.__slots!==null?e.__slots:C2}s(kn,"xe$3");function kC(e,t,n,r){const i=Co.$getSlotTargetElement(e,t,n,Be);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display="")}s(kC,"Ce$2");function rh(e){const t=xo.get(e);return t!==void 0?t.parentElement:null}s(rh,"Se$2");function x0(e,t,n){const r=kn(e),i=kn(t);for(const[d,f]of r)if(!i.has(d)){const h=rh(f);Ni(f,null),h!==null&&h.remove()}const o=Oe,l=wr();let a="",c=null;const u=We(t);for(const[d,f]of i){const h=r.get(d);let g=h!==void 0?rh(h):null;Oe="";const p=wr();if(g===null){g=TC(d);let _=null;for(const y of n.children)if(!y.hasAttribute("data-lexical-slot")){_=y;break}n.insertBefore(g,_),Oi(f,Rn(t,g,Be))}else h===f?jr(f,g):(h!==void 0&&Ni(h,g),Oi(f,Rn(t,g,Be)));if(Bn(p),wC(n,u,g),kC(t,d,n,g),a+=Oe,g.parentElement===n){const _=c===null?n.firstChild:c.nextSibling;_!==g&&n.insertBefore(g,_),c=g}}return Bn(l),Oe=o,a}s(x0,"ve$2");function Oi(e,t){const n=ht.get(e);if(n===void 0&&B(60),t!==null){const i=cr.get(e);if(i!==void 0){const o=xo.get(e);if(o!==void 0){const l=Fi(i)?i.__slotHost:null,a=Fi(n)?n.__slotHost:null,c=i.__parent!==n.__parent||l!==a,u=a!==null&&o.parentElement!==t.element;if(c||u)return t.insertChild(o),jr(e,t.element)}}}const r=Co.$createDOM(n,Be);if((function(i,o,l){const a=l._keyToDOMMap;J5(o,l,i),a.set(i,o)})(e,r,Be),X(n)?r.setAttribute("data-lexical-text","true"):We(n)&&(r.setAttribute("data-lexical-decorator","true"),v2(r,{captureSelection:!0})),F(n)){const i=n.__indent,o=n.__size;nh(r,n),i!==0&&EC(r,i);const l=kn(n),a=l.size>0?y0(n,r,l):"";if(o===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Oe+=a,l.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=Oe,d=o-1;if(ih(zl(n,ht),n,0,d,Rn(n,r,Be)),a!==""){const f=r.__lexicalTextContent||"";r.__lexicalTextContent=a+f,Oe=u+a+f}l.size>0&&(r.__lexicalSlotTextLength=a.length)}const c=n.__format;c!==0&&SC(r,c),n.isInline()||MC(null,n,r)}else{const i=n.getTextContent();if(We(n)){const o=n.decorate(Be,Ll);o!==null&&AC(e,o),r.contentEditable="false";const l=kn(n);l.size>0&&y0(n,r,l)}Oe+=i}return t!==null&&t.insertChild(r),Co.$decorateDOM(n,null,r,Be),bC(n),Op(Pl,$l,ed,n,"created"),r}s(Oi,"Te$3");function ih(e,t,n,r,i){const o=Oe,l=wr();Oe="",xt=null,Qt=null,qt=null;let a=n;for(;a<=r;++a){const u=wr();Oi(e[a],i);const d=ht.get(e[a]);d!==null&&X(d)?xt===null&&(xt=d.getFormat(),Qt=d.getStyle(),qt=d.__key):F(d)&&a<r&&!d.isInline()&&(Oe+=lo),Bn(u)}const c=Be._keyToDOMMap.get(t.__key);c===void 0&&B(349,t.__key),c.__lexicalTextContent=Oe,c.__lexicalFirstTextKey=qt,Oe=o+Oe,Bn(l)}s(ih,"ke$3");function MC(e,t,n){const r=Rn(t,n,Be),i=r.element.__lexicalLastChildKind??null,o=(function(l,a){if(l){const c=l.__last;if(c){const u=a.get(c);if(u)return Ir(u)?"line-break":We(u)&&u.isInline()?"decorator":null}return kn(l).size>0?null:"empty"}return null})(t,ht);i!==o&&r.setManagedLineBreak(o)}s(MC,"be$1");function RM(e,t,n){var r;xt=null,Qt=null,qt=null,(function(i,o,l){const a=Oe,c=i.__size,u=o.__size;Oe="";const d=l.element,f=Be._keyToDOMMap.get(o.__key);f===void 0&&B(351,o.__key);const h=u-c;if(!Gr&&Math.abs(h)<=1&&c>=OM&&i.__first===o.__first&&(h!==0||!Be._cloneNotNeeded.has(i.__key))){const g=f.__lexicalTextContent,p=eh.get(i.__key);if(!Gr&&typeof g=="string"&&p!==void 0){const _=(function(y,v){const x=v.size;if(x===0||x>=y.__size)return null;let C=y.__last,b=null,S=0;for(;C!==null&&S<x;){if(!v.has(C))return null;b=C;const M=ht.get(C);if(M===void 0)return null;C=M.__prev,S++}return S!==x||C!==null&&v.has(C)?null:b})(o,p);if(_!==null){const y=p.size;if(h===0){const v=v0(_,y);let x=_,C=0;for(;x!==null&&C<y;){const E=ht.get(x);if(E===void 0)break;const A=wr();jr(x,d),X(E)&&xt===null&&(xt=E.getFormat(),Qt=E.getStyle(),qt=E.__key),Bn(A),x=E.__next,C++}let b="";for(x=_,C=0;x!==null&&C<y;){const E=ht.get(x);if(E===void 0)break;let A;if(F(E)){const D=Be._keyToDOMMap.get(x),L=D&&D.__lexicalTextContent;typeof L!="string"&&B(352,E.getType()),A=L}else A=E.getTextContent();b+=A,C<y-1&&F(E)&&!E.isInline()&&(b+=lo),x=E.__next,C++}const S=f.__lexicalSlotTextLength||0,M=S>0?g.slice(S):g,T=M.slice(0,M.length-v)+b;f.__lexicalTextContent=T,Oe=a+T,C0(o,f,p);return}if((function(v,x,C,b,S,M,T,E){if(E!==1&&E!==-1||T!==(E===1?2:1))return!1;const A=T-E;let D=v.__last;for(let j=0;j<A-1;j++){if(D===null)return!1;const ne=cr.get(D);if(ne===void 0)return!1;D=ne.__prev}if(D===null)return!1;const L=ht.get(M),G=cr.get(D);if(L===void 0||G===void 0||L.__prev!==G.__prev)return!1;const $=[];let z=M;for(let j=0;j<T;j++){if(z===null)return!1;$.push(z);const ne=ht.get(z);z=ne?ne.__next:null}const W=[];z=D;for(let j=0;j<A;j++){if(z===null)return!1;W.push(z);const ne=cr.get(z);z=ne?ne.__next:null}const ye=new Set(W),q=new Set($),ge=[];let me=0,oe=0;for(;me<A&&oe<T;)if($[oe]===W[me])ge.push({key:$[oe],kind:"reconcile"}),me++,oe++;else if(q.has(W[me])){if(ye.has($[oe]))return!1;ge.push({key:$[oe],kind:"create",nextIndex:oe}),oe++}else ge.push({key:W[me],kind:"destroy"}),me++;for(;me<A;)ge.push({key:W[me++],kind:"destroy"});for(;oe<T;)ge.push({key:$[oe],kind:"create",nextIndex:oe}),oe++;const Z=v0(D,A);for(const j of ge){const ne=wr();if(j.kind==="reconcile")jr(j.key,C.element);else if(j.kind==="destroy")Ni(j.key,C.element);else{let ue=null;for(let Ne=j.nextIndex+1;Ne<T;Ne++){const $e=Be._keyToDOMMap.get($[Ne]);if($e!==void 0){ue=$e;break}}Oi(j.key,C.withBefore(ue??C.before))}if(j.kind!=="destroy"){const ue=ht.get(j.key);ue&&X(ue)&&xt===null&&(xt=ue.getFormat(),Qt=ue.getStyle(),qt=ue.__key)}Bn(ne)}let pe="";for(let j=0;j<T;j++){const ne=ht.get($[j]);if(ne===void 0)return!1;let ue;if(F(ne)){const Ne=Be._keyToDOMMap.get($[j]),$e=Ne&&Ne.__lexicalTextContent;typeof $e!="string"&&B(350,ne.getType()),ue=$e}else ue=ne.getTextContent();pe+=ue,j<T-1&&F(ne)&&!ne.isInline()&&(pe+=lo)}const de=b.__lexicalSlotTextLength||0,ce=de>0?S.slice(de):S;return b.__lexicalTextContent=ce.slice(0,ce.length-Z)+pe,!0})(i,0,l,f,g,_,y,h)){const v=f.__lexicalTextContent;typeof v!="string"&&B(353),Oe=a+v,C0(o,f,p);return}}}if(h===0){let _=i.__first,y=0;for(;_!==null;){const v=ht.get(_);if(v===void 0)break;const x=Gr||pl.has(_)||gl.has(_),C=wr();if(x)jr(_,d);else{let b,S;if(F(v)){S=xo.get(_);const M=S&&S.__lexicalTextContent;typeof M!="string"&&B(354,v.getType()),b=M}else b=v.getTextContent();Oe+=b,S!==void 0&&Xf(S)}X(v)?xt===null&&(xt=v.getFormat(),Qt=v.getStyle(),qt=v.__key):F(v)&&y<u-1&&!v.isInline()&&(Oe+=lo),Bn(C),_=v.__next,y++}f.__lexicalTextContent=Oe,f.__lexicalFirstTextKey=qt,Oe=a+Oe;return}}if(c===1&&u===1){const g=i.__first,p=o.__first;if(g===p)jr(g,d);else{const y=oh(g),v=Oi(p,null);try{y.parentNode===d?d.replaceChild(v,y):l.insertChild(v)}catch(x){if(typeof x=="object"&&x!=null){const C=`${x.toString()} Parent: ${d.tagName}, new child: {tag: ${v.tagName} key: ${p}}, old child: {tag: ${y.tagName}, key: ${g}}.`;throw new Error(C)}throw x}Ni(g,null)}const _=ht.get(p);X(_)&&xt===null&&(xt=_.getFormat(),Qt=_.getStyle(),qt=_.__key)}else{const g=zl(i,cr),p=zl(o,ht);if(g.length!==c&&B(227),p.length!==u&&B(228),c===0)u!==0&&ih(p,o,0,u-1,l);else if(u===0){if(c!==0){const _=l.after==null&&l.before==null&&kn(o).size===0&&l.element.__lexicalLineBreak==null;th(g,0,c-1,_?null:d),_&&(d.textContent="")}}else(function(_,y,v,x,C,b){const S=x-1,M=C-1;let T,E,A=b.getFirstChild(),D=0,L=0;for(;D<=S&&L<=M;){const z=y[D],W=v[L],ye=wr();if(z===W)A=Zd(jr(W,b.element)),D++,L++;else{if(E===void 0&&(E=b0(v,L)),T===void 0)T=b0(y,D);else if(!T.has(z)){D++,Bn(ye);continue}if(!E.has(z)){A=Zd(oh(z)),Ni(z,b.element),D++,T.delete(z),Bn(ye);continue}if(T.has(W)){const ge=gs(Be,W);ge!==A&&b.withBefore(A??b.before).insertChild(ge),A=Zd(jr(W,b.element)),D++,L++}else Oi(W,b.withBefore(A??b.before)),L++}const q=ht.get(W);q!==null&&X(q)?xt===null&&(xt=q.getFormat(),Qt=q.getStyle(),qt=q.__key):F(q)&&L<=M&&!q.isInline()&&(Oe+=lo),Bn(ye)}const G=D>S,$=L>M;if(G&&!$){const z=v[M+1],W=z===void 0?null:Be.getElementByKey(z);ih(v,_,L,M,b.withBefore(W??b.before))}else $&&!G&&th(y,D,S,b.element)})(o,g,p,c,u,l)}f.__lexicalTextContent=Oe,f.__lexicalFirstTextKey=qt,Oe=a+Oe})(e,t,Rn(t,n,Be)),kt(t)||(r=t,xt==null||xt===r.__textFormat||zc||r.setTextFormat(xt),(function(i){Qt==null||Qt===i.__textStyle||zc||i.setTextStyle(Qt)})(t))}s(RM,"Ne$2");function C0(e,t,n){const r=t.__lexicalFirstTextKey;if(r!=null){const i=e.__key;let o=r;for(;o!==null;){const l=ht.get(o);if(l===void 0){o=null;break}if(l.__parent===i)break;o=l.__parent}if(o!==null&&!n.has(o)){const l=ht.get(r);if(X(l))return xt=l.getFormat(),void(Qt=l.getStyle())}}t.__lexicalFirstTextKey=qt}s(C0,"we$2");function jr(e,t){const n=cr.get(e);let r=ht.get(e);n!==void 0&&r!==void 0||B(61);const i=Gr||pl.has(e)||gl.has(e),o=gs(Be,e);if(n===r&&!i){let l;if(F(n)){const a=o.__lexicalTextContent;typeof a!="string"&&B(355,n.getType()),l=a,Xf(o)}else l=n.getTextContent();return Oe+=l,o}if(n!==r&&i&&Op(Pl,$l,ed,r,"updated"),Co.$updateDOM(r,n,o,Be)){const l=Oi(e,null);return t===null&&B(62),t.replaceChild(l,o),Ni(e,null),l}if(F(n)){F(r)||B(334,e);const l=r.__indent;(Gr||l!==n.__indent)&&EC(o,l);const a=r.__format;(Gr||a!==n.__format)&&SC(o,a);const c=i&&(kn(r).size>0||kn(n).size>0)?x0(n,r,o):"";if(i){const u=Oe;if(RM(n,r,o),Mt(r)||r.isInline()||MC(0,r,o),c!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=c+d,Oe=u+c+d,o.__lexicalSlotTextLength=c.length}else(kn(r).size>0||kn(n).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&B(356,n.getType()),Oe+=u,Xf(o)}if((Gr||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(nh(o,r),Mt(r)&&!Gr))for(const u of r.getChildren())F(u)&&nh(gs(Be,u.getKey()),u)}else{const l=r.getTextContent();if(We(r)){const a=r.decorate(Be,Ll);a!==null&&AC(e,a),i&&(kn(r).size>0||kn(n).size>0)&&x0(n,r,o)}Oe+=l}if(!zc&&Mt(r)){const l=r.getLatest();if(l.__cachedText!==Oe){const a=l.getWritable();a.__cachedText=Oe,r=a}}return Co.$decorateDOM(r,n,o,Be),bC(r),o}s(jr,"Ee$1");function AC(e,t){let n=Be._pendingDecorators;const r=Be._decorators;if(n===null){if(r[e]===t)return;n=G5(Be)}n[e]=t}s(AC,"Oe$2");function Zd(e){let t=e.nextSibling;return t!==null&&t===Be._blockCursorElement&&(t=t.nextSibling),t}s(Zd,"Me$2");function b0(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}s(b0,"Ae$2");function LM(e,t,n,r,i,o){Oe="",xt=null,Qt=null,qt=null,Gr=r===2,Be=n,Ll=n._config,Co=n._config.dom||Kl,$l=n._nodes,ed=Be._listeners.mutation,gl=i,pl=o,cr=e._nodeMap,Qf=e,ht=t._nodeMap,zc=t._readOnly,xo=hC(n._keyToDOMMap),eh=(function(){const a=new Map,c=s(u=>{for(const d of u){const f=ht.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let g=a.get(h);g===void 0&&(g=new Set,a.set(h,g)),g.add(d)}},"e");return c(gl.keys()),c(pl),a})();const l=new Map;return Pl=l,jr("root",null),Be=void 0,$l=void 0,gl=void 0,pl=void 0,cr=void 0,Qf=void 0,ht=void 0,Ll=void 0,xo=void 0,eh=void 0,Pl=void 0,Co=Kl,l}s(LM,"De$2");function oh(e){const t=xo.get(e);return t===void 0&&B(75,e),t}s(oh,"Pe$3");function we(e){return{type:e}}s(we,"Fe$3");var op=we("SELECTION_CHANGE_COMMAND"),$M=we("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),IC=we("CLICK_COMMAND"),sp=we("BEFORE_INPUT_COMMAND"),lp=we("INPUT_COMMAND"),ap=we("COMPOSITION_START_COMMAND"),cp=we("COMPOSITION_END_COMMAND"),Fl=we("DELETE_CHARACTER_COMMAND"),ml=we("INSERT_LINE_BREAK_COMMAND"),sh=we("INSERT_PARAGRAPH_COMMAND"),ls=we("CONTROLLED_TEXT_INSERTION_COMMAND"),up=we("PASTE_COMMAND"),_c=we("REMOVE_TEXT_COMMAND"),Vl=we("DELETE_WORD_COMMAND"),Bl=we("DELETE_LINE_COMMAND"),Ti=we("FORMAT_TEXT_COMMAND"),PM=we("SET_TEXT_FORMAT_COMMAND"),dp=we("UNDO_COMMAND"),fp=we("REDO_COMMAND"),hp=we("KEYDOWN_COMMAND"),NC=we("KEY_ARROW_RIGHT_COMMAND"),OC=we("MOVE_TO_END"),DC=we("KEY_ARROW_LEFT_COMMAND"),RC=we("MOVE_TO_START"),LC=we("KEY_ARROW_UP_COMMAND"),$C=we("KEY_ARROW_DOWN_COMMAND"),jc=we("KEY_ENTER_COMMAND"),PC=we("KEY_SPACE_COMMAND"),FC=we("KEY_BACKSPACE_COMMAND"),VC=we("KEY_ESCAPE_COMMAND"),BC=we("KEY_DELETE_COMMAND"),HC=we("KEY_TAB_COMMAND"),FM=we("INSERT_TAB_COMMAND"),VM=we("INDENT_CONTENT_COMMAND"),BM=we("OUTDENT_CONTENT_COMMAND"),KC=we("DROP_COMMAND"),HM=we("FORMAT_ELEMENT_COMMAND"),UC=we("DRAGSTART_COMMAND"),WC=we("DRAGOVER_COMMAND"),zC=we("DRAGEND_COMMAND"),gp=we("COPY_COMMAND"),pp=we("CUT_COMMAND"),jC=we("SELECT_ALL_COMMAND"),KM=we("CLEAR_EDITOR_COMMAND"),UM=we("CLEAR_HISTORY_COMMAND"),WM=we("CAN_REDO_COMMAND"),zM=we("CAN_UNDO_COMMAND"),JC=we("FOCUS_COMMAND"),GC=we("BLUR_COMMAND"),qC=we("KEY_MODIFIER_COMMAND");function ZC(e){const t=new Map;return{dispose(){for(const n of t.values())n.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));const o=s(()=>{const l=t.get(n);l&&l.holders.delete(o)&&l.holders.size===0&&(t.delete(n),l.dispose())},"i");return i.holders.add(o),o}}}s(ZC,"Dn$1");function mp(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}s(mp,"Pn");var Kr=Object.freeze({}),lh=[["keydown",function(e,t){const n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!=="Backspace"&&Hl(n),!t.isComposing()&&fe(t,hp,e)}],["pointerdown",function(e,t){const n=Pp(e),r=e.pointerType;Ds(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&jn(t,()=>{Wl(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){fe(t,ap,e)}],["compositionend",function(e,t){const n=t._inputState;ri?n.compositionPhase="ending-firefox":yo||!pa&&!ma?fe(t,cp,e):(n.compositionPhase="ending-safari",n.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const n=t._inputState;Hl(n),jn(t,()=>{e5(e,t)||t.dispatchCommand(lp,e)},{event:e}),n.unprocessedBeforeInputData=null}],["click",function(e,t){jn(t,()=>{const n=Ve(),r=tr(Sn(t)),i=No();if(r){if(ve(n)){const o=n.anchor,l=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Mt(l)&&Dn().getChildrenSize()===1&&l.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=Yn(r,t._rootElement).anchorNode;(vt(o)||yr(o))&&dn(rd(i,r,t,e))}}fe(t,IC,e)})}],["cut",Kr],["copy",Kr],["dragstart",Kr],["dragover",Kr],["dragend",Kr],["paste",Kr],["focus",Kr],["blur",Kr],["drop",Kr]];Nl&&lh.push(["beforeinput",(e,t)=>(function(n,r){const i=n.inputType;i==="deleteCompositionText"||ri&&e2(r)||i!=="insertCompositionText"&&jn(r,()=>{e5(n,r)||fe(r,sp,n)},{event:n})})(e,t)]);var ah=new WeakMap,Jc=new WeakMap,jM=ZC(e=>(e.addEventListener("selectionchange",k0),()=>e.removeEventListener("selectionchange",k0)));function YC(e,t,n,r,i,o){const l=e.anchor,a=e.focus,c=l.getNode(),u=Ue();let d;if(o!==void 0)d=o;else{const _=tr(Sn(u));d=_!==null?Yn(_,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=l.key,g=u.getElementByKey(h),p=n.length;return h!==a.key||!X(c)||(!i&&(!Nl||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&p<2||q5(n))&&l.offset!==a.offset&&!c.isComposing()||An(c)||c.isDirty()&&p>1||(i||!Nl)&&g!==null&&!c.isComposing()&&f!==Qr(c,g,u)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||(function(_,y){if(y.isSegmented())return!0;if(!_.isCollapsed())return!1;const v=_.anchor.offset,x=y.getParentOrThrow(),C=Di(y);return v===0?!y.canInsertTextBefore()||!x.canInsertTextBefore()&&!y.isComposing()||C||(function(b){const S=b.getPreviousSibling();return(X(S)||F(S)&&S.isInline())&&!S.canInsertTextAfter()})(y):v===y.getTextContentSize()&&(!y.canInsertTextAfter()||!x.canInsertTextAfter()&&!y.isComposing()||C)})(e,c)}s(YC,"Bn");function E0(e,t){return yr(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}s(E0,"Rn");function S0(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:l}=Yn(e,t._rootElement),a=t._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,E0(r,i)&&E0(o,l)&&!a.postDeleteSelectionToRestore)||jn(t,()=>{if(!n)return void dn(null);if(!xa(t,r,o))return;let c=Ve();if(a.postDeleteSelectionToRestore&&ve(c)&&c.isCollapsed()){const u=c.anchor,d=a.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(c=a.postDeleteSelectionToRestore.clone(),dn(c))}if(a.postDeleteSelectionToRestore=null,ve(c)){const u=c.anchor,d=u.getNode();if(c.isCollapsed()){e.type==="Range"&&r===o&&(c.dirty=!0);const f=Sn(t).event,h=f?f.timeStamp:performance.now(),{format:g,style:p,offset:_,key:y,timeStamp:v}=a.collapsedSelectionFormat,x=Dn(),C=t.isComposing()===!1&&x.getTextContent()==="";if(h<v+200&&u.offset===_&&u.key===y)vc(c,g,p);else if(u.type==="text")X(d)||B(141),XC(c,d);else if(u.type==="element"&&!C){F(d)||B(259);const b=u.getNode();b.isEmpty()?(function(S,M){vc(S,M.getTextFormat(),M.getTextStyle())})(c,b):vc(c,c.format,"")}}else{const f=u.key,h=c.focus.key,g=c.getNodes(),p=g.length,_=c.isBackward(),y=_?l:i,v=_?i:l,x=_?h:f,C=_?f:h;let b=2047,S=!1;for(let M=0;M<p;M++){const T=g[M],E=T.getTextContentSize();if(X(T)&&E!==0&&!(M===0&&T.__key===x&&y===E||M===p-1&&T.__key===C&&v===0)&&(S=!0,b&=T.getFormat(),b===0))break}c.format=S?b:0}}fe(t,op,void 0)})}s(S0,"Wn");function vc(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}s(vc,"Un");function XC(e,t){vc(e,t.getFormat(),t.getStyle())}s(XC,"$n");function QC(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}s(QC,"Hn");function T0(e){const{lastKeyCode:t}=Ue()._inputState;if(e==null||e.length<=1||t==null)return;const n=t.length===1?t:t==="Enter"?`
5
+ `:t==="Tab"?" ":null;if(!n)return;const r=Ve();if(!ve(r)||!r.isCollapsed())return;const i=r.anchor.getNode();if(!X(i))return;const{offset:o}=r.anchor;if(i.getTextContentSize()===o){const l=i.getNextSibling();if(n===`
6
+ `){if(Ir(l))l.selectEnd();else if(!l){const a=bi(i,b5),c=a&&a.getNextSibling();F(c)&&c.selectStart()}}else n===" "?nd(l)&&l.selectEnd():X(l)&&l.getTextContent()[0]===n&&l.select(1,1)}else i.getTextContent()[o]===n&&i.select(o+1,o+1)}s(T0,"Jn");function Hl(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}s(Hl,"jn");function w0(e){Hl(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>Hl(e),0)}s(w0,"Vn");function e5(e,t){const n=Pp(e);if(vt(n)&&Wl(n,t))return!0;const r=t.getRootElement();if(r===null)return!1;const i=ps(r.ownerDocument);return i!==null&&r.contains(i)&&Wl(i,t)}s(e5,"qn");function JM(e){const t=e.inputType,n=QC(e),r=Ue(),i=r._inputState,o=Ve();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Hl(i),e.preventDefault(),ve(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=No();if(!ve(f))return!0;dn(f.clone())}if(ve(o)){const f=o.anchor.key===o.focus.key;if((function(h,g){return h.lastKeyCode==="MediaLast"&&g<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&r.isComposing()&&f){if(Rt(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{jn(r,()=>{Rt(null)})},30),ve(o)){const h=o.anchor.getNode();h.markDirty(),X(h)||B(142),XC(o,h)}}else{if(Rt(null),yo&&n!==null&&!n.collapsed&&(o.applyDOMRange(n),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),g=h.getTextContent(),p=h.canInsertTextAfter(),_=o.anchor.offset===0&&o.focus.offset===g.length;let y=Ol&&f&&!_&&p;if(y&&o.isCollapsed()&&(y=!We(Q5(o.anchor,!0))),!y){fe(r,Fl,!0);const v=Ve();Ol&&ve(v)&&v.isCollapsed()&&(i.postDeleteSelectionToRestore=v,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ve(o))return!0;const l=e.data;i.unprocessedBeforeInputData!==null&&Ip(!1,r,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Mt(o.anchor.getNode())||n===null||o.applyDOMRange(n),i.unprocessedBeforeInputData=null;const a=o.anchor,c=o.focus,u=a.getNode(),d=c.getNode();if(t==="insertText"||t==="insertTranspose"){if(l===`
7
+ `)e.preventDefault(),fe(r,ml,!1);else if(l===lo)e.preventDefault(),fe(r,sh,void 0);else if(l==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else l!=null&&YC(o,n,l,e.timeStamp,!0)?(e.preventDefault(),fe(r,ls,l),T0(l)):i.unprocessedBeforeInputData=l;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":fe(r,ls,e),T0((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=r._compositionKey;Rt(null),f||fe(r,ls,e),yc(h);break}case"insertLineBreak":Rt(null),fe(r,ml,!1);break;case"insertParagraph":Rt(null),i.isInsertLineBreak&&!yo?(i.isInsertLineBreak=!1,fe(r,ml,!1)):fe(r,sh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":fe(r,up,e);break;case"deleteByComposition":(function(f,h){return f!==h||F(f)||F(h)||!Di(f)||!Di(h)})(u,d)&&fe(r,_c,e);break;case"deleteByDrag":Eo(r5),fe(r,_c,e);break;case"deleteByCut":fe(r,_c,e);break;case"deleteContent":fe(r,Fl,!1);break;case"deleteWordBackward":fe(r,Vl,!0);break;case"deleteWordForward":fe(r,Vl,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":fe(r,Bl,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":fe(r,Bl,!1);break;case"formatStrikeThrough":fe(r,Ti,"strikethrough");break;case"formatBold":fe(r,Ti,"bold");break;case"formatItalic":fe(r,Ti,"italic");break;case"formatUnderline":fe(r,Ti,"underline");break;case"historyUndo":fe(r,dp,void 0);break;case"historyRedo":fe(r,fp,void 0)}return!0}s(JM,"Yn");function GM(e){const t=Ue(),n=t._inputState,r=Ve(),i=e.data,o=QC(e);let l=!1;if(i!=null&&ve(r)){const a=tr(Sn(t)),c=a!==null?Yn(a,t._rootElement):null,u=e.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&!t.isComposing();u&&(n.hadOrphanedCompositionEvents=!0);const d=r.anchor.getNode(),f=e.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&t.isComposing()&&X(d)&&An(d);if(!u&&!f&&YC(r,o,i,e.timeStamp,!1,c)){if(l=!0,n.compositionPhase==="ending-firefox"){const v=Gc(t,i);if(n.compositionPhase="idle",v)return Eo(vp),Y0(),!0}const h=r.anchor.getNode();if(a===null||c===null)return!0;const g=r.isBackward(),p=g?r.anchor.offset:r.focus.offset,_=g?r.focus.offset:r.anchor.offset;Nl&&!r.isCollapsed()&&X(h)&&c.anchorNode!==null&&h.getTextContent().slice(0,p)+i+h.getTextContent().slice(p+_)===Y5(c.anchorNode)||fe(t,ls,i);const y=i.length;ri&&y>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(r.anchor.offset-=y,r._cachedNodes=null,r._cachedIsBackward=null),Ol&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,Rt(null))}}return l||(Ip(!1,t,i!==null?i:void 0),n.compositionPhase==="ending-firefox"&&(Gc(t,i||void 0),Eo("composition-end"),n.compositionPhase="idle")),Y0(),!0}s(GM,"Gn");function qM(e){const t=Ue(),n=t._inputState,r=Ve();if(ve(r)&&!t.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const i=r.anchor,o=r.anchor.getNode();if(Rt(i.key),Eo("composition-start"),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type==="element"||!r.isCollapsed()||!Ol&&(o.getFormat()!==r.format||X(o)&&o.getStyle()!==r.style)||X(o)&&(An(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){fe(t,ls,np);const l=Ve();ve(l)&&Rt(l.anchor.key)}}return!0}s(qM,"Xn");function ZM(e){const t=Ue();return t._inputState.compositionPhase="idle",Gc(t,e.data),Eo(vp),!0}s(ZM,"Qn");function yc(e){if(e===null)return;const t=nt(e);if(!X(t)||t.getType()==="text"||An(t)||!t.isAttached())return;const n=Ve(),r=ve(n)&&n.anchor.key===e?n.anchor.offset:null,i=Ft(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){const o=Math.min(r,i.getTextContentSize());i.select(o,o)}}s(yc,"Zn");function Gc(e,t){const n=e._compositionKey;if(Rt(null),n!==null&&t!=null){if(t===""){const i=nt(n),o=e.getElementByKey(n),l=o!==null&&X(i)?Qr(i,o,e):null;if(l!==null&&l.nodeValue!==null&&X(i)){const a=tr(Sn(e)),c=a&&Yn(a,e._rootElement);let u=null,d=null;c!==null&&c.anchorNode===l&&(u=c.anchorOffset,d=c.focusOffset),Np(i,l.nodeValue,u,d,!0)}return yc(n),!1}if(t[t.length-1]===`
8
+ `){const i=Ve();if(ve(i)||Ms(i)){if(ve(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return fe(e,jc,null),yc(n),!1}}const r=nt(n);if(r!==null&&X(r)&&An(r)){r.markDirty();const i=Ve(),o=r.getTextContentSize(),l=ve(i)&&i.anchor.key===n?i.anchor.offset:o;return r.select(l,l).insertText(t),!0}}return Ip(!0,e,t),yc(n),!1}s(Gc,"to");function YM(e){const t=Ue(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase==="ending-safari"){const r=Q0(e);if(r&&jn(t,()=>{Gc(t,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",r)return!0}if((function(r){return qe(r,"ArrowRight",{shiftKey:"any"})})(e))fe(t,NC,e);else if((function(r){return qe(r,"ArrowRight",{...Wr,shiftKey:"any"})})(e))fe(t,OC,e);else if((function(r){return qe(r,"ArrowLeft",{shiftKey:"any"})})(e))fe(t,DC,e);else if((function(r){return qe(r,"ArrowLeft",{...Wr,shiftKey:"any"})})(e))fe(t,RC,e);else if((function(r){return qe(r,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))fe(t,LC,e);else if((function(r){return qe(r,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))fe(t,$C,e);else if((function(r){return qe(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))n.isInsertLineBreak=!0,fe(t,jc,e);else if((function(r){return r.key===" "})(e))fe(t,PC,e);else if((function(r){return Vn&&qe(r,"o",{ctrlKey:!0})})(e))e.preventDefault(),n.isInsertLineBreak=!0,fe(t,ml,!0);else if((function(r){return qe(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))n.isInsertLineBreak=!1,fe(t,jc,e);else if((function(r){return qe(r,"Backspace",{shiftKey:"any"})||Vn&&qe(r,"h",{ctrlKey:!0})})(e))Q0(e)?fe(t,FC,e)&&w0(n):(e.preventDefault(),fe(t,Fl,!0));else if((function(r){return r.key==="Escape"})(e))fe(t,VC,e);else if((function(r){return qe(r,"Delete",{})||Vn&&qe(r,"d",{ctrlKey:!0})})(e))(function(r){return r.key==="Delete"})(e)?fe(t,BC,e):(e.preventDefault(),fe(t,Fl,!1));else if((function(r){return qe(r,"Backspace",X0)})(e))e.preventDefault(),fe(t,Vl,!0);else if((function(r){return qe(r,"Delete",X0)})(e))e.preventDefault(),fe(t,Vl,!1);else if((function(r){return Vn&&qe(r,"Backspace",{metaKey:!0})})(e))e.preventDefault(),fe(t,Bl,!0);else if((function(r){return Vn&&(qe(r,"Delete",{metaKey:!0})||qe(r,"k",{ctrlKey:!0}))})(e))e.preventDefault(),fe(t,Bl,!1);else if((function(r){return qe(r,"b",Wr)})(e))e.preventDefault(),fe(t,Ti,"bold");else if((function(r){return qe(r,"u",Wr)})(e))e.preventDefault(),fe(t,Ti,"underline");else if((function(r){return qe(r,"i",Wr)})(e))e.preventDefault(),fe(t,Ti,"italic");else if((function(r){return qe(r,"Tab",{shiftKey:"any"})})(e))fe(t,HC,e);else if((function(r){return qe(r,"z",Wr)})(e))e.preventDefault(),fe(t,dp,void 0);else if((function(r){return Vn?qe(r,"z",{metaKey:!0,shiftKey:!0}):qe(r,"y",{ctrlKey:!0})||qe(r,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),fe(t,fp,void 0);else{const r=t._editorState._selection;(function(i){return qe(i,"a",Wr)})(e)?(e.preventDefault(),fe(t,jC,e)&&w0(n)):r===null||ve(r)||((function(i){return qe(i,"c",Wr)})(e)?(e.preventDefault(),fe(t,gp,e)):(function(i){return qe(i,"x",Wr)})(e)&&(e.preventDefault(),fe(t,pp,e)))}return(function(r){return r.ctrlKey||r.shiftKey||r.altKey||r.metaKey})(e)&&t.dispatchCommand(qC,e),!0}s(YM,"eo");function t5(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}s(t5,"no");var as=new Map;function k0(e){const t=i2(e.target);if(t===null)return;const n=dd(e.target);let r=null,i=null;const o=n!==null?Jc.get(n):void 0;if(n!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const g of f)if(g._rootElement!==null&&ii(g._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let g=null,p=null;for(const _ of f){const y=_._rootElement;if(y===null)continue;const v=Yn(t,y).anchorNode;if(v!==null&&fo(v)===_){if(ii(y.getRootNode())){r=_,i=v;break}g===null&&(g=_,p=v)}}r===null&&g!==null&&(r=g,i=p)}else{const g=t.anchorNode;g===null||vt(g)&&g.shadowRoot!==null||(r=fo(g),r!==null&&(i=g))}}if(r===null){const f=ps(n);r=f!==null?fo(f):null}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;jn(r,()=>{const f=No(),h=i??Yn(t,r._rootElement).anchorNode;(vt(h)||yr(h))&&dn(rd(f,t,r,e))})}const l=Ap(r),a=l[l.length-1],c=a._key,u=as.get(c),d=u||a;d!==r&&S0(t,d,!1),S0(t,r,!0),r!==a?as.set(c,r):u&&as.delete(c)}s(k0,"ro");function ch(e){e._lexicalHandled=!0}s(ch,"io");function M0(e){return e._lexicalHandled===!0}s(M0,"so");function XM(e){const t=ah.get(e);if(t===void 0)return;const n=Jc.get(t);if(n===void 0)return;ah.delete(e);const r=Ca(e);ud(r)?((function(o){if(o._parentEditor!==null){const l=Ap(o),a=l[l.length-1]._key;as.get(a)===o&&as.delete(a)}else as.delete(o._key)})(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&B(198);const i=t5(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}s(XM,"co");function uh(e,t,n){Ht();const r=e.__key,i=e.getParent();if(i===null)return void(Zt(e)!==null&&B(367,r,String(Zt(e))));const o=(function(a){const c=Ve();if(!ve(c)||!F(a))return c;const{anchor:u,focus:d}=c,f=u.getNode(),h=d.getNode();return Ul(f,a)&&u.set(a.__key,0,"element"),Ul(h,a)&&d.set(a.__key,0,"element"),c})(e);let l=!1;if(ve(o)&&t){const a=o.anchor,c=o.focus;a.key===r&&(Xc(a,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0),c.key===r&&(Xc(c,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0)}else Ms(o)&&t&&e.isSelected()&&e.selectPrevious();if(ve(o)&&t&&!l){const a=e.getIndexWithinParent();ur(e),oo(o,i,a,-1)}else ur(e);n||kt(i)||i.canBeEmpty()||!i.isEmpty()||uh(i,t),t&&o&&Mt(i)&&i.isEmpty()&&i.selectEnd()}s(uh,"ao");function QM(e){return e}s(QM,"uo");var n5=Symbol.for("ephemeral");function qc(e){return e[n5]||!1}s(qc,"ho");var A0={configurable:!0,enumerable:!1,value:void 0,writable:!0},On=class{static{s(this,"_o")}__type;__key;__parent;__prev;__next;__state;[Rl];static getType(){const{ownNodeType:e}=Ea(this);return e===void 0&&B(64,this.name),e}static clone(e){B(65,this.name)}$config(){return{}}config(e,t){const n=t.extends||x2(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=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",A0),Object.defineProperty(this,Rl,A0),j5(this,e)}getType(){return this.__type}isInline(){B(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=nt(e);if(t===null)break;e=t.__parent!==null?t.__parent:Zt(t)}return!1}isSelected(e){const t=e||Ve();if(t==null)return!1;const n=t.getNodes().some(r=>r.__key===this.__key);if(X(this))return n;if(ve(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const r=this.getParent();if(We(this)&&this.isInline()&&r){const i=t.isBackward()?t.focus:t.anchor;if(r.is(i.getNode())&&i.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const 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(){const e=this.getLatest().__parent;return e===null?null:nt(e)}getParentOrThrow(){const e=this.getParent();return e===null&&B(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(kt(t)||Zt(e)!==null)return F(e)||e===this&&We(e)||B(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&B(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:nt(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:nt(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=F(this)?this:this.getParent(),n=F(e)?e:e.getParent(),r=t&&n?au(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=au(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Jp(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&B(279),!1)))}isParentOf(e){return Ul(e,this)}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let i=this;for(;i!==null;){const o=i.__key;if(r.has(o)||(r.add(o),n.push(i)),i===e)break;const l=F(i)?t?i.getFirstChild():i.getLastChild():null;if(l!==null){i=l;continue}const a=t?i.getNextSibling():i.getPreviousSibling();if(a!==null){i=a;continue}const c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let u=null,d=c;do{if(d===null&&B(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||r.has(d.__key)||n.push(d)}while(u===null);i=u}return t||n.reverse(),n}isDirty(){const e=Ue()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(qc(this))return this;const e=nt(this.__key);return e===null&&B(113),e}getWritable(){if(qc(this))return this;Ht();const e=Pr(),t=Ue(),n=e._nodeMap,r=this.__key,i=this.getLatest(),o=t._cloneNotNeeded,l=Ve();if(l!==null&&l.setCachedNodes(null),o.has(r))return ru(i),i;const a=Bp(i);return o.add(r),ru(a),n.set(r,a),a}getTextContent(){return T2(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){B(70)}updateDOM(e,t,n){B(71)}getDOMSlot(e){return new cC(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){B(18,this.name)}updateFromJSON(e){return(function(t,n){const r=t.getWritable(),i=n.$;let o=i;for(const l of CC(r).flatKeys)l in n&&(o!==void 0&&o!==i||(o={...i}),o[l]=n[l]);return(r.__state||o)&&ip(t).updateFromJSON(o),r})(this,e)}static transform(){return null}remove(e){uh(this,!0,e)}replace(e,t){Ht();let n=Ve();n!==null&&(n=n.clone()),sf(this,e);const r=this.getLatest(),i=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size,u=l.getParent(),d=u!==null?l.getIndexWithinParent():-1;ur(l),u!==null&&ve(n)&&oo(n,u,d,-1);const f=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,p=r.__next,_=r.__parent;uh(r,!1,!0),f===null?a.__first=o:f.getWritable().__next=o,l.__prev=g,h===null?a.__last=o:h.getWritable().__prev=o,l.__next=p,l.__parent=_,a.__size=c;let y=0;t&&(F(this)&&F(l)||B(139),y=l.getChildrenSize(),l.splice(y,0,this.getChildren()));const v=Jn(this);if(v.length>0){Mr(this)&&Mr(l)||B(368,this.__key,l.__key);for(const x of v){const C=Vi(this,x);C!==null&&(w2(this,x),Kp(l,x,C))}}if(ve(n)){dn(n);const x=n.anchor,C=n.focus;x.key===i&&(t&&x.type==="element"?x.set(l.__key,y+x.offset,"element"):D0(x,l)),C.key===i&&(t&&C.type==="element"?C.set(l.__key,y+C.offset,"element"):D0(C,l))}return qr()===i&&Rt(o),l}insertAfter(e,t=!0){Ht(),sf(this,e);const n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const i=r.getParent(),o=Ve();let l=!1,a=!1;if(i!==null){const h=e.getIndexWithinParent();if(ve(o)){const g=i.__key,p=o.anchor,_=o.focus;l=p.type==="element"&&p.key===g&&p.offset===h+1,a=_.type==="element"&&_.key===g&&_.offset===h+1}ur(r),t&&ve(o)&&oo(o,i,h,-1)}else ur(r);const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,f=n.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,n.__next=d,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&ve(o)){const h=this.getIndexWithinParent();oo(o,u,h+1);const g=u.__key;l&&o.anchor.set(g,h+2,"element"),a&&o.focus.set(g,h+2,"element")}return e}insertBefore(e,t=!0){Ht(),sf(this,e);const n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const i=r.__key,o=Ve(),l=r.getParent(),a=l!==null?r.getIndexWithinParent():-1;ur(r),l!==null&&t&&ve(o)&&oo(o,l,a,-1);const c=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),d=n.__prev,f=this.getIndexWithinParent();return c===null?u.__first=i:c.getWritable().__next=i,u.__size++,n.__prev=i,r.__prev=d,r.__next=n.__key,r.__parent=n.__parent,t&&ve(o)&&oo(o,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return mn()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Ht();const n=Kn(this);if(n!==null)return n.selectPrevious(e,t);const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(F(r))return r.select();if(!X(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,t)}selectNext(e,t){Ht();const n=Kn(this);if(n!==null)return n.selectNext(e,t);const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(F(r))return r.select(0,0);if(!X(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function _p(e){return e instanceof On}s(_p,"po");var e8="historic",t8="history-push",xc="history-merge",n8="paste";var r8="collaboration",i8="skip-collab",o8="skip-scroll-into-view",s8="skip-dom-selection",r5="skip-selection-focus",l8="composition-start",vp="composition-end",a8="!important";function dh(e){const t={};if(!e)return t;let n="",r="",i=null,o=!1,l=!1,a=!1,c=0;const u=e.length;let d=-1;for(let g=0;g<u;g++){const p=e[g];if(o)p==="*"&&e[g+1]==="/"&&(o=!1,g++);else if(l)d===-1&&(d=g),l=!1;else if(i===null)if(p!=="/"||e[g+1]!=="*")if(p!=='"'&&p!=="'")if(p!=="(")if(p!==")")if(a||p!==":"||c!==0){if(p===";"&&c===0){d!==-1&&(a?r+=e.slice(d,g):n+=e.slice(d,g),d=-1);const _=n.trim(),y=r.trim();_!==""&&y!==""&&(t[_]=y),n="",r="",a=!1;continue}d===-1&&(d=g)}else d!==-1&&(n+=e.slice(d,g),d=-1),a=!0;else d===-1&&(d=g),c=Math.max(0,c-1);else d===-1&&(d=g),c++;else d===-1&&(d=g),i=p;else d!==-1&&(a?r+=e.slice(d,g):n+=e.slice(d,g),d=-1),o=!0,g++;else d===-1&&(d=g),p==="\\"?l=!0:p===i&&(i=null)}d!==-1&&(a?r+=e.slice(d,u):n+=e.slice(d,u));const f=n.trim(),h=r.trim();return f!==""&&h!==""&&(t[f]=h),t}s(dh,"Mo");function i5(e,t,n){const r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===a8?e.setProperty(t,r.slice(0,i).trim(),"important"):e.setProperty(t,n,"")}s(i5,"Ao");function c8(e,t){for(const n in t){const r=t[n];r==null?e.removeProperty(n):i5(e,n,r)}}s(c8,"Do");function fh(e,t,n=""){if(t===n)return;const r=dh(n),i=dh(t);for(const o in i)delete r[o],i5(e,o,i[o]);for(const o in r)e.removeProperty(o)}s(fh,"Po");function Yd(e,t){return 16&t?"code":t&128?"mark":32&t?"sub":64&t?"sup":null}s(Yd,"Fo");function Xd(e,t){return 1&t?"strong":2&t?"em":"span"}s(Xd,"Io");function o5(e,t,n,r,i){const o=r.classList;let l=cs(i,"base");l!==void 0&&o.add(...l),l=cs(i,"underlineStrikethrough");let a=!1;const c=8&t&&4&t;l!==void 0&&(8&n&&4&n?(a=!0,c||o.add(...l)):c&&o.remove(...l));for(const u in Gt){const d=Gt[u];if(l=cs(i,u),l!==void 0)if(n&d){if(a&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...l);continue}((t&d)===0||c&&u==="underline"||u==="strikethrough")&&o.add(...l)}else t&d&&o.remove(...l)}}s(o5,"Lo");function s5(e,t,n){const r=n.isComposing(),i=e+(r?Dl:""),o=xr(),l=Vp(o).$getDOMSlot(n,t,o),a=l.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void l.insertChild(vn().createTextNode(i));const c=a,u=c.nodeValue;if(u!==i)if(r||ri){const[d,f,h]=(function(g,p){const _=g.length,y=p.length;let v=0,x=0;for(;v<_&&v<y&&g[v]===p[v];)v++;for(;x+v<_&&x+v<y&&g[_-x-1]===p[y-x-1];)x++;return[v,_-v-x,p.slice(v,y-x)]})(u,i);f!==0&&c.deleteData(d,f),c.insertData(d,h)}else c.nodeValue=i}s(s5,"Ko");function I0(e,t,n,r,i,o){s5(i,e,t);const l=o.theme.text;l!==void 0&&o5(0,0,r,e,l)}s(I0,"zo");function za(e,t){const n=vn().createElement(t);return n.appendChild(e),n}s(za,"Bo");function Zc(e){return e!=null&&e.__isInlineFormattable===!0}s(Zc,"Ro");var _a=class l5 extends On{static{s(this,"Wo")}__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new l5(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return xM[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===qr()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Gt[t];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return Pi(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=Yd(0,r),o=Xd(0,r),l=i===null?o:i,a=vn().createElement(l);let c=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(c=vn().createElement(o),a.appendChild(c)),I0(c,this,0,r,this.__text,t);const u=this.__style;return u!==""&&fh(a.style,u),a}updateDOM(t,n,r){const i=this.__text,o=t.__format,l=this.__format,a=Yd(0,o),c=Yd(0,l),u=Xd(0,o),d=Xd(0,l);if((a===null?u:a)!==(c===null?d:c))return!0;if(a===c&&u!==d){const _=n.firstChild;_??B(48);const y=vn().createElement(d);return I0(y,this,0,l,i,r),n.replaceChild(y,_),!1}let f=n;c!==null&&a!==null&&(f=n.firstChild,f??B(49)),s5(i,f,this);const h=r.theme.text;h!==void 0&&o!==l&&o5(0,o,l,f,h);const g=t.__style,p=this.__style;return g!==p&&fh(n.style,p,g),!1}static importDOM(){return{"#text":s(()=>({conversion:h8,priority:0}),"#text"),b:s(()=>({conversion:d8,priority:0}),"b"),code:s(()=>({conversion:Ur,priority:0}),"code"),em:s(()=>({conversion:Ur,priority:0}),"em"),i:s(()=>({conversion:Ur,priority:0}),"i"),mark:s(()=>({conversion:Ur,priority:0}),"mark"),s:s(()=>({conversion:Ur,priority:0}),"s"),span:s(()=>({conversion:u8,priority:0}),"span"),strong:s(()=>({conversion:Ur,priority:0}),"strong"),sub:s(()=>({conversion:Ur,priority:0}),"sub"),sup:s(()=>({conversion:Ur,priority:0}),"sup"),u:s(()=>({conversion:Ur,priority:0}),"u")}}static importJSON(t){return Ft().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return vt(n)||B(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=za(n,"b")),this.hasFormat("italic")&&(n=za(n,"i")),this.hasFormat("strikethrough")&&(n=za(n,"s")),this.hasFormat("underline")&&(n=za(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?Gt[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?_M[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=Pi(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=yM[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){Ht();let r=t,i=n;const o=Ve(),l=this.getTextContent(),a=this.__key;if(typeof l=="string"){const c=l.length;r===void 0&&(r=c),i===void 0&&(i=c)}else r=0,i=0;if(!ve(o))return E5(a,r,a,i,"text","text");{const c=qr();c!==o.anchor.key&&c!==o.focus.key||Rt(a),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),l=o.__text,a=r.length;let c=t;c<0&&(c=a+c,c<0&&(c=0));const u=Ve();if(i&&ve(u)){const d=t+a;u.setTextNodeRange(o,d,o,d)}return o.__text=l.slice(0,c)+r+l.slice(c+n),o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Ht();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=qr(),l=r.length;t.sort((E,A)=>E-A),t.push(l);const a=[],c=t.length;for(let E=0,A=0;E<l&&A<=c;A++){const D=t[A];D>E&&(a.push(r.slice(E,D)),E=D)}const u=a.length;if(u===1)return[n];const d=a[0],f=n.getParent();let h;const g=n.getFormat(),p=n.getStyle(),_=n.__detail;let y=!1,v=null,x=null;const C=Ve();if(ve(C)){const[E,A]=C.isBackward()?[C.focus,C.anchor]:[C.anchor,C.focus];E.type==="text"&&E.key===i&&(v=E),A.type==="text"&&A.key===i&&(x=A)}n.isSegmented()?(h=Ft(d),h.__format=g,h.__style=p,h.__detail=_,h.__state=h0(n,h),y=!0):h=n.setTextContent(d);const b=[h];for(let E=1;E<u;E++){const A=Ft(a[E]);A.__format=g,A.__style=p,A.__detail=_,A.__state=h0(n,A);const D=A.__key;o===i&&Rt(D),b.push(A)}const S=v?v.offset:null,M=x?x.offset:null;let T=0;for(const E of b){if(!v&&!x)break;const A=T+E.getTextContentSize();if(v!==null&&S!==null&&S<=A&&S>=T&&(v.set(E.getKey(),S-T,"text"),S<A&&(v=null)),x!==null&&M!==null&&M<=A&&M>=T){x.set(E.getKey(),M-T,"text");break}T=A}if(f!==null){(function(D){const L=D.getPreviousSibling(),G=D.getNextSibling();L!==null&&ru(L),G!==null&&ru(G)})(this);const E=f.getWritable(),A=this.getIndexWithinParent();y?(E.splice(A,0,b),this.remove()):E.splice(A,1,b),ve(C)&&oo(C,f,A,u-1)}return b}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||B(50);const r=this.__key,i=t.__key,o=this.__text,l=o.length;qr()===i&&Rt(r);const a=Ve();if(ve(a)){const f=a.anchor,h=a.focus;f!==null&&f.key===i&&B0(f,n,r,t,l),h!==null&&h.key===i&&B0(h,n,r,t,l)}const c=t.__text,u=n?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}};function u8(e){return{forChild:yp(e.style),node:null}}s(u8,"Uo");function d8(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:yp(t.style,n?void 0:"bold"),node:null}}s(d8,"$o");var N0=new WeakMap;function f8(e){if(!vt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}s(f8,"Jo");function h8(e){const t=e;e.parentElement===null&&B(129);let n=t.textContent||"";if((function(r){let i,o=r.parentNode;const l=[r];for(;o!==null&&(i=N0.get(o))===void 0&&!f8(o);)l.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let c=0;c<l.length;c++)N0.set(l[c],a);return a})(t)!==null)return{node:Cp(n)};if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=O0(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=O0(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Ft(n)}}s(h8,"jo");function O0(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,vt(n)){const o=n.style.display;if(o===""&&!h2(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(yr(n))return n;if(n.nodeName==="BR")return null}}s(O0,"Vo");var g8={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ur(e){const t=g8[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:yp(e.style,t),node:null}}s(Ur,"Yo");function Ft(e=""){return ba(new _a(e))}s(Ft,"Go");function X(e){return e instanceof _a}s(X,"Xo");function yp(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),l=e.fontStyle==="italic",a=r.includes("underline"),c=e.verticalAlign;return u=>((X(u)||Zc(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),l&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),c!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),c!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}s(yp,"Qo");var td=class a5 extends _a{static{s(this,"Zo")}static getType(){return"tab"}static clone(t){return new a5(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=cs(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return xp().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||B(286),this}setDetail(t){return t!==2&&B(127),this}setMode(t){return t!=="normal"&&B(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function xp(){return ba(new td)}s(xp,"tr");function nd(e){return e instanceof td}s(nd,"er");var p8=class{static{s(this,"nr")}key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:jp(dr(ei(this,"next")),dr(ei(e,"next")))<0}getNode(){const e=nt(this.key);return e===null&&B(20),e}set(e,t,n,r){const i=this._selection,o=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,bo()||(qr()===o&&Rt(e),i!==null&&(i.setCachedNodes(null),ve(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function gr(e,t,n){return new p8(e,t,n)}s(gr,"or");function Qd(e,t){let n=t.__key,r=e.offset,i="element";if(X(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!F(t)){const o=t.getNextSibling();if(X(o))n=o.__key,r=0,i="text";else{const l=t.getParent();l&&(n=l.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}s(Qd,"rr");function D0(e,t){if(F(t)){const n=t.getLastDescendant();F(n)||X(n)?Qd(e,n):Qd(e,t)}else Qd(e,t)}s(D0,"ir");var c5=class u5{static{s(this,"sr")}_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Ms(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new u5(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes().filter(l=>Zt(l)===null),r=n.length;if(r===0)return;const i=n[r-1];let o;if(X(i))o=i.select();else{const l=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(l,l)}o.insertNodes(t);for(let l=0;l<r;l++)n[l].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=nt(i);o!==null&&r.push(o)}return bo()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes().filter(n=>Zt(n)===null);if((Ve()||No())===this&&t[0]){const n=_t(t[0],"next");D2(Ki(n,n))}for(const n of t)n.remove();d5()}};function d5(){const e=Dn();if(e.isEmpty()){const t=mn();e.append(t),t.select()}}s(d5,"lr");function ve(e){return e instanceof va}s(ve,"cr");var va=class f5{static{s(this,"ar")}format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ve(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=(function(r){const i=[],[o,l]=r.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,c=new Set;for(const u of r)if(Gn(u)){const{origin:d}=u;i.length===0?a.add(d):(c.add(d),i.push(d))}else{const{origin:d}=u;F(d)&&c.has(d)||i.push(d)}if(l&&i.push(l.caret.origin),Bi(r.focus)&&F(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=oi(r.focus.origin,"previous");Gn(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=ms(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!F(u)||c.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=dr(r.anchor),d=dr(r.anchor.getFlipped()),f=s(g=>fr(g)?g.origin:g.getNodeAtCaret(),"r"),h=f(u)||f(d)||(r.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(Gp(Sh(this),"next"));return bo()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){return this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,l=i.isBefore(o),[a,c]=hh(this);let u="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(F(h)&&!h.isInline()){d||(u+=`
9
+ `);let g="";for(const p of Jn(h)){const _=Vi(h,p);_!==null&&(g+=_.getTextContent())}g!==""?(u+=g,d=!1):d=!h.isEmpty()}else if(d=!1,X(h)){let g=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(g=a<c?g.slice(a,c):g.slice(c,a)):g=l?g.slice(a):g.slice(c):h===r&&(g=l?g.slice(0,c):g.slice(0,a)),u+=g}else!We(h)&&!Ir(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const n=Ue(),r=n.getEditorState()._selection,i=C5(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,l,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(l.key,l.offset,l.type,!0),a&&(this.dirty=!0),Yo(this)}clone(){const t=this.anchor,n=this.focus;return new f5(gr(t.key,t.offset,t.type),gr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Pi(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Gt[t];return(this.format&n)!==0}insertRawText(t){this.insertNodes(Cp(t))}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let l=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(l=r,a=n),l.type==="element"&&(function(y,v,x,C){const b=y.getNode(),S=b.getChildAtIndex(y.offset),M=Ft();if(M.setFormat(x),M.setStyle(C),H5(S))S.splice(0,0,[M]);else if(S!==null){const T=kt(b)?mn().append(M):M;S.insertBefore(T)}else if(kt(b)){const T=b.getLastChild();F(T)&&!T.isInline()&&T.isEmpty()?T.append(M):b.append(mn().append(M))}else b.append(M);y.is(v)&&v.set(M.__key,0,"text"),y.set(M.__key,0,"text")})(l,a,i,o),a.type==="element"&&_s(a,dr(ei(a,"next")));const c=l.offset;let u=a.offset;const d=this.getNodes(),f=d.length;let h=d[0];X(h)||B(26);const g=h.getTextContent().length,p=h.getParentOrThrow();let _=d[f-1];if(f===1&&a.type==="element"&&(u=g,a.set(l.key,u,"text")),this.isCollapsed()&&c===g&&(An(h)||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){const y=h.getNextSibling();let v;if(X(y)&&y.canInsertTextBefore()&&!An(y)?v=y:(v=Ft(),v.setFormat(i),v.setStyle(o),p.canInsertTextAfter()?h.insertAfter(v):p.insertAfter(v)),v.select(0,0),h=v,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&c===0&&(An(h)||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){const y=h.getPreviousSibling();let v;if(!X(y)||An(y)?(v=Ft(),v.setFormat(i),p.canInsertTextBefore()?h.insertBefore(v):p.insertBefore(v)):v=y,v.select(),h=v,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&c!==g)if(qr()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const y=Ft(h.getTextContent());y.setFormat(i),h.replace(y),h=y}else if(!this.isCollapsed()&&t!==""){const y=_.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||F(y)&&(!y.canInsertTextBefore()||!y.canInsertTextAfter()))return this.insertText(""),v5(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Di(h)){const C=Ft(t);C.select(),h.replace(C);return}const y=h.getFormat(),v=h.getStyle();if(c!==u||y===i&&v===o){if(nd(h)){const C=Ft(t);C.setFormat(i),C.setStyle(o),C.select(),h.replace(C);return}}else{if(h.getTextContent()!==""){const C=Ft(t);if(C.setFormat(i),C.setStyle(o),C.select(),c===0)h.insertBefore(C,!1);else{const[b]=h.splitText(c);b.insertAfter(C,!1)}C.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null);return}h.setFormat(i),h.setStyle(o)}const x=u-c;h=h.spliceText(c,x,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=y,this.style=v,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const y=new Set([...h.getParentKeys(),..._.getParentKeys()]),v=F(h)?h:h.getParentOrThrow();let x=F(_)?_:_.getParentOrThrow(),C=_;if(!v.is(x)&&x.isInline())do C=x,x=x.getParentOrThrow();while(x.isInline());if(a.type==="text"&&(u!==0||_.getTextContent()==="")||a.type==="element"&&_.getIndexWithinParent()<u)if(X(_)&&!Di(_)&&u!==_.getTextContentSize()){if(_.isSegmented()){const E=Ft(_.getTextContent());_.replace(E),_=E}Mt(a.getNode())||a.type!=="text"||(X(_)||B(395),_=_.spliceText(0,u,"")),y.add(_.__key)}else{const E=_.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?_.remove():E.remove()}else y.add(_.__key);const b=x.getChildren(),S=new Set(d),M=v.is(x),T=v.isInline()&&h.getNextSibling()===null?v:h;for(let E=b.length-1;E>=0;E--){const A=b[E];if(A.is(h)||F(A)&&A.isParentOf(h))break;A.isAttached()&&(!S.has(A)||A.is(C)?M||T.insertAfter(A,!1):A.remove())}if(!M){let E=x,A=null;for(;E!==null;){const D=E.getChildren(),L=D.length;(L===0||D[L-1].is(A))&&(y.delete(E.__key),A=E),E=E.getParent()}}if(Di(h))if(c===g)h.select();else{const E=Ft(t);E.select(),h.replace(E)}else h=h.spliceText(c,g-c,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let E=1;E<f;E++){const A=d[E],D=A.__key;y.has(D)||A.remove()}}}removeText(){const t=Ve()===this;vl(this,R2(Sh(this))),t&&Ve()!==this&&dn(this)}formatText(t,n=null){g5(this,t,n)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const n=this.anchor.getNode();if(this.anchor.type==="element"&&F(n)&&Zt(n)!==null){let _=n.isShadowRoot()?n.getFirstChild()??n.append(mn()).getFirstChild():n.getFirstChild();if(n.isShadowRoot()&&_!==null&&!F(_)){const y=mn();_.insertBefore(y),_=y}if(_!==null){_.selectStart();const y=Ve();return ve(y)||B(369),y.insertNodes(t)}}if(this.anchor.type==="element"&&kt(n)){const _=tf(t),y=_.getLastDescendant();n.splice(this.anchor.offset,0,_.getChildren()),y!==null&&y.selectEnd();return}let r=(this.isBackward()?this.focus:this.anchor).getNode(),i=bi(r,hn);const o=t[t.length-1];if(F(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const _=Js(this);i.splice(_,0,t),o.selectEnd()}return}if(!t.some(_=>(F(_)||We(_))&&!_.isInline())){F(i)||B(211,r.constructor.name,r.getType());const _=Js(this);i.splice(_,0,t),o.selectEnd();return}if(F(i)&&Zt(i)!==null){const _=Js(this),y=ph(t);i.splice(_,0,y);const v=y[y.length-1];v!==void 0?v.selectEnd():i.select(_,_);return}if(i===null){const _=tf(t),y=_.getLastDescendant();let v=ei(this.anchor,"next");for(const x of _.getChildren())v=F2(x,v);y!==null&&y.selectEnd();return}if(F(i)&&!i.isParentRequired()&&!kt(i.getParentOrThrow())){const _=Js(this),y=ph(t);i.splice(_,0,y);const v=y[y.length-1];v!==void 0?v.selectEnd():i.select(_,_);return}const l=tf(t),a=l.getLastDescendant(),c=l.getChildren(),u=!F(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(r=this.anchor.getNode(),i=bi(r,hn));const d=c[c.length-1];let f=c[0];var h;F(h=f)&&hn(h)&&!h.isEmpty()&&F(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(F(i)||B(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&B(212,r.constructor.name,r.getType()),(function(_,y){const v=y.getParentOrThrow().getLastChild();let x=y;const C=[y];for(;x!==v;)x.getNextSibling()||B(140),x=x.getNextSibling(),C.push(x);let b=_;for(const S of C)b=b.insertAfter(S)})(i,f));const g=bi(a,hn);u&&F(g)&&(u.canMergeWhenEmpty()||hn(d))&&(g.append(...u.getChildren()),u.remove()),F(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const p=F(i)?i.getLastChild():null;Ir(p)&&g!==i&&p.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&kt(t)){const a=mn();return t.splice(this.anchor.offset,0,[a]),a.select(),a}const n=Js(this),r=bi(this.anchor.getNode(),hn);if(r!==null&&Zt(r)!==null)return null;F(r)||B(213);const i=r.getChildAtIndex(n),o=i?[i,...i.getNextSiblings()]:[],l=r.insertNewAfter(this,!1);return l?(l.append(...o),l.selectStart(),l):null}insertLineBreak(t){const n=ya();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],i=t[n-1];const[o,l]=hh(this),a=this.isBackward(),[c,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=a?[l,o]:[o,l];if(n===0)return[];if(n===1){if(X(r)&&!this.isCollapsed()){const h=r.splitText(d,f),g=d===0?h[0]:h[1];return g?(c.set(g.getKey(),0,"text"),u.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(X(r)&&(d===r.getTextContentSize()?t.shift():d!==0&&([,r]=r.splitText(d),t[0]=r,c.set(r.getKey(),0,"text"))),X(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,n,r){if(eu(this,t,n,r))return;const i=t==="move",o=Ue(),l=tr(Sn(o));if(!l)return;const a=o._blockCursorElement,c=o._rootElement,u=this.focus.getNode();c===null||a===null||!F(u)||u.isInline()||u.canBeEmpty()||iu(a,o,c);const d=gs(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=X(u)?Qr(u,d,o):null),this.dirty){const h=gs(o,this.anchor.key);let g=h;if(this.anchor.type==="text"){const p=this.anchor.getNode();g=X(p)?Qr(p,h,o):null}g&&f&&Qc(l,g,this.anchor.offset,f,this.focus.offset)}if(r==="character"&&X(u)&&u.isUnmergeable()&&(n?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=_t(u,n?"previous":"next").getNodeAtCaret();if(X(h)){if(!i){const g=h.getTextContentSize();n?this.focus.set(h.__key,g-1,"text"):this.focus.set(h.__key,1,"text"),this.dirty=!0;return}{const g=o.getElementByKey(h.getKey()),p=g?Qr(h,g,o):null;if(p){const _=n?p.length:0;Qc(l,p,_,p,_)}}}}if(m5(l,t,n?"backward":"forward",r),l.rangeCount>0){const h=Os(l,o._rootElement),g=h||l.getRangeAt(0),p=this.anchor.getNode(),_=Mt(p)?p:Rp(p);this.applyDOMRange(g),this.dirty=!0,!i&&(_5(this,n,_),(h?l.direction!=="backward":l.anchorNode===g.startContainer&&l.anchorOffset===g.startOffset)||p5(this))}r==="lineboundary"&&eu(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&F(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(F(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=Wp(ei(r,t?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const c of o.iterNodeCarets("shadowRoot"))if(Gn(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(a.type==="merge-block")break;if(F(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=dr(c);vl(this,Ki(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:c,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(Bi(c)){if(F(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(o.anchor.origin))break}else a={block:c.origin,type:"merge-next-block"};continue}if(We(c.origin)){if(!c.origin.isIsolated())if(Jn(c.origin).length>0){if(F(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=Yc();u.add(c.origin.getKey()),dn(u)}}else if(a.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&F(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=Yc();u.add(c.origin.getKey()),dn(u)}else c.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:c,block:u}=a;return Jn(u).length>0?void 0:c.origin.isEmpty()&&!u.isEmpty()&&c.origin.getParent()===u.getParent()?void c.origin.remove(!0):(vl(this,Ki(!c.origin.isEmpty()&&u.isEmpty()?Do(_t(u,c.direction)):o.anchor,c)),this.removeText())}for(let c=r.getNode();c!==null;){if(Zt(c)!==null)return;if(F(c)&&c.isShadowRoot())break;c=c.getParent()}}const l=this.focus;if(ef(this,t,"character"),this.isCollapsed()){if(t&&r.offset===0&&L0(this,r.getNode()))return}else{const a=l.type==="text"?l.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const c=l.offset,u=a.getTextContentSize();if(a.is(i)||t&&c!==u||!t&&c!==0)return void $0(a,t,c)}else if(i!==null&&i.isSegmented()){const c=r.offset,u=i.getTextContentSize();if(i.is(a)||t&&c!==0||!t&&c!==u)return void $0(i,t,c)}(function(c,u){const d=c.anchor,f=c.focus,h=d.getNode();if(h===f.getNode()&&d.type==="text"&&f.type==="text"){const g=d.offset,p=f.offset,_=g<p,y=_?g:p,v=_?p:g,x=v-1;y!==x&&(function(C){return!(q5(C)||_8(C))})(h.getTextContent().slice(y,v))&&(u?f.set(f.key,x,f.type):d.set(d.key,x,d.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Mt(r.getParent())&&r.getPreviousSibling()===null&&L0(this,r),d5()}}deleteLine(t){const n=gh(this.anchor);if(n!==null&&We(Kn(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&ef(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):bi(this.anchor.getNode(),hn)!==bi(this.focus.getNode(),hn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;ef(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const n=this.focus.isBefore(this.anchor);return bo()||(this._cachedIsBackward=n),n}getStartEndPoints(){return[this.anchor,this.focus]}};function Ms(e){return e instanceof c5}s(Ms,"ur");function h5(e,t){if(Ms(e)){for(const v of e.getNodes())Zc(v)&&v.setFormat(t(v.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Rt(null);const n=[];for(const v of e.getNodes())X(v)?n.push(v):F(v)?v.setTextFormat(t(v.getTextFormat())):Zc(v)&&v.setFormat(t(v.getFormat()));const r=n.length;if(r===0)return e.setFormat(t(e.format)),void Rt(null);const i=e.anchor,o=e.focus,l=e.isBackward(),a=l?o:i,c=l?i:o;let u=0,d=n[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===d.getTextContentSize()&&(u=1,d=n[1],f=0),d==null)return;const h=r-1;let g=n[h];const p=c.type==="text"?c.offset:g.getTextContentSize();if(d.is(g)){if(f===p)return;const v=t(d.getFormat());if(An(d)||f===0&&p===d.getTextContentSize())d.setFormat(v);else{const x=d.splitText(f,p),C=f===0?x[0]:x[1];C.setFormat(v),a.type==="text"&&a.set(C.__key,0,"text"),c.type==="text"&&c.set(C.__key,p-f,"text")}e.format=v;return}f===0||An(d)||([,d]=d.splitText(f),f=0);const _=t(d.getFormat());d.setFormat(_);const y=t(g.getFormat());p>0&&(p===g.getTextContentSize()||An(g)||([g]=g.splitText(p)),g.setFormat(y));for(let v=u+1;v<h;v++){const x=n[v];x.setFormat(t(x.getFormat()))}a.type==="text"&&a.set(d.__key,f,"text"),c.type==="text"&&c.set(g.__key,p,"text"),e.format=_|y}s(h5,"fr");function m8(e,t){const n=[];for(const[r,i]of Object.entries(t))typeof i=="boolean"&&n.push([r,i]);n.length!==0&&h5(e,r=>{for(const[i,o]of n)r=Pi(r,i,o?Gt[i]:0);return r})}s(m8,"dr");function g5(e,t,n=null){const r=n===null&&ve(e)?Pi(e.format,t,null):n;h5(e,i=>Pi(i,t,r))}s(g5,"hr");function R0(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}s(R0,"gr");function hh(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[R0(n),R0(r)]}s(hh,"_r");function L0(e,t){for(let n=t;n;n=n.getParent()){if(F(n)){if(n.collapseAtStart(e))return!0;if(kt(n))break}if(n.getPreviousSibling())break}return!1}s(L0,"pr");function p5(e){const t=e.focus,n=e.anchor,r=n.key,i=n.offset,o=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,o,!0)}s(p5,"yr");function m5(e,t,n,r){e.modify(t,n,r)}s(m5,"mr");function _5(e,t,n){const r=e.getNodes(),i=r.filter(a=>Ul(a,n));if(i.length===0||i.length===r.length)return!1;const o=t?i[0]:i[i.length-1],l=F(o)?o:o.getParentOrThrow();return t?l.selectStart():l.selectEnd(),!0}s(_5,"xr");function ef(e,t,n){if(eu(e,"extend",t,n))return;const r=Ue(),i=tr(Sn(r));if(!i||typeof i.modify!="function")return;const o=r._blockCursorElement,l=r._rootElement,a=e.anchor,c=e.focus.getNode();l===null||o===null||!F(c)||c.isInline()||c.canBeEmpty()||iu(o,r,l);const u=s(A=>{const D=A.getNode(),L=r.getElementByKey(A.key);return L!==null&&A.type==="text"&&X(D)?Qr(D,L,r):L},"a"),d=a.getNode(),f=u(a);if(f===null)return;const h=a.offset,g=e.isCollapsed(),p=e.focus,_=g?f:u(p);if(_===null)return;const y=p.offset;if(Qc(i,_,y,_,y),m5(i,"move",t?"backward":"forward",n),i.rangeCount===0)return;const v=Os(i,l)||i.getRangeAt(0),x=v.startContainer,C=v.startOffset;if(g&&n==="character"&&a.type==="text"&&X(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const A=_t(d,t?"previous":"next").getNodeAtCaret();if(X(A)){const D=t?A.getTextContentSize()-1:1;e.focus.set(A.__key,D,"text"),e.dirty=!0;return}}if(g&&n==="character"&&a.type==="text"){const A=t?0:d.getTextContentSize(),D=x===f?C:h!==A?A:-1;if(D>=0)return void(D!==h&&(e.focus.set(a.key,D,"text"),e.dirty=!0))}const[b,S,M,T]=t?[x,C,f,h]:[f,h,x,C],E=Mt(d)?d:Rp(d);e.applyDOMRange({collapsed:!1,endContainer:M,endOffset:T,startContainer:b,startOffset:S}),e.dirty=!0,!_5(e,t,E)&&t&&p5(e),n==="lineboundary"&&eu(e,"extend",t,n,"decorators")}s(ef,"Cr");var _8=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function $0(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let l=0,a=0;for(let u=0;u<o;u++){const d=u===o-1;if(a=l,l+=i[u].length,t&&l===n||l>n||d){i.splice(u,1),d&&(a=void 0);break}}const c=i.join("").trim();c===""?r.remove():(r.setTextContent(c),r.select(a,a))}s($0,"vr");function P0(e,t,n,r){let i,o=t,l=!1;if(vt(e)){let a=!1;const c=e.childNodes,u=c.length,d=r._blockCursorElement;o===u&&u>0&&(a=!0,o=u-1),Ns(e,r)!==void 0||Wl(e,r)||(l=!0);let f=c[o],h=!1;if(f===d)f=c[o+1],h=!0;else if(d!==null){const g=d.parentNode;e===g&&t>Array.prototype.indexOf.call(g.children,d)&&o--}if(i=Xo(f),X(i))o=hr(i,a?"next":"previous");else{let g=Xo(e);if(g===null)return null;if(F(g)){const p=r.getElementByKey(g.getKey());p===null&&B(214),[g,o]=Rn(g,p,r).resolveChildIndex(g,p,e,t),F(g)||B(215),a&&o>=g.getChildrenSize()&&(o=Math.max(0,g.getChildrenSize()-1));let y=g.getChildAtIndex(o);if(F(y)&&(function(v,x,C){const b=v.getParent();return C===null||b===null||!b.canBeEmpty()||b!==C.getNode()})(y,0,n)){const v=a?y.getLastDescendant():y.getFirstDescendant();v===null?g=y:(y=v,g=F(y)?y:y.getParentOrThrow()),o=0}X(y)?(i=y,g=null,o=hr(y,a?"next":"previous")):y!==g&&a&&!h&&(F(g)||B(216),o=Math.min(g.getChildrenSize(),o+1))}else{const p=Kn(g),_=p!==null?p:g,y=_.getIndexWithinParent(),v=r.getElementByKey(g.getKey());let x="after";if(v!==null&&Xo(e)===g){const C=Rn(g,v,r);C.element!==v?x=C.resolveLeafPosition(v,e,t):t===0&&We(g)&&(x="before")}o=x==="before"?y:y+1,g=_.getParentOrThrow()}if(F(g))return[gr(g.__key,o,"element"),l]}}else i=Xo(e);return X(i)?[gr(i.__key,hr(i,o,"clamp"),"text"),l]:null}s(P0,"Tr");function F0(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),l=i.getParent();if(t){if((n||!t)&&o===null&&F(l)&&l.isInline()){const a=l.getPreviousSibling();X(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else F(o)&&!n&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):X(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),l=i.getParent();if(t&&F(o)&&o.isInline())e.set(o.__key,0,"element");else if((n||t)&&o===null&&F(l)&&l.isInline()&&!l.canInsertTextAfter()&&l.getTextContentSize()>1){const a=l.getNextSibling();X(a)&&e.set(a.__key,0,"text")}}}s(F0,"kr");function v5(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);F0(e,r,i),F0(t,!r,i),i&&t.set(e.key,e.offset,e.type)}}s(v5,"br");function gh(e){const t=nt(e.key);return t===null?null:E2(t)}s(gh,"Nr");function y5(e,t,n){const r=gh(e),i=gh(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;const o=n(r,i);if(r!==null)return F(r)?t.set(r.getKey(),o?r.getChildrenSize():0,"element"):t.set(r.getKey(),o?r.getTextContentSize():0,"text"),!0;const l=Kn(i);if(l===null)return!1;const a=l.getParent();if(a===null)return!1;const c=l.getIndexWithinParent();return t.set(a.getKey(),o?c+1:c,"element"),!0}s(y5,"wr");function x5(e){const t=y5(e.anchor,e.focus,(n,r)=>(function(i,o,l,a){if(l!==null&&a!==null){const d=Kn(l),f=Kn(a);if(d!==null&&d.is(f)){for(const h of fd(d).values()){if(h===l.getKey())return!0;if(h===a.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(l!==null){const d=Kn(l),f=nt(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const c=Kn(a),u=nt(i.key);return c!==null&&u!==null&&!c.is(u)&&!c.isParentOf(u)&&u.isBefore(c)})(e.anchor,e.focus,n,r));return t&&(e.dirty=!0),t}s(x5,"Er");function C5(e,t,n,r,i,o){if(e===null||n===null||!xa(i,e,n))return null;const l=P0(e,t,ve(o)?o.anchor:null,i);if(l===null)return null;const a=P0(n,r,ve(o)?o.focus:null,i);if(a===null)return null;const[c,u]=l,[d,f]=a;if(c.type==="element"&&d.type==="element"){const g=Xo(e),p=Xo(n);if(We(g)&&We(p))return null}const h=i._slotsUsed&&y5(c,d,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return v5(c,d),[c,d,u||f||h]}s(C5,"Or");function b5(e){return F(e)&&!e.isInline()}s(b5,"Mr");function E5(e,t,n,r,i,o){const l=Pr(),a=new va(gr(e,t,i),gr(n,r,o),0,"");return a.dirty=!0,l._selection=a,a}s(E5,"Ar");function S5(){const e=gr("root",0,"element"),t=gr("root",0,"element");return new va(e,t,0,"")}s(S5,"Dr");function Yc(){return new c5(new Set)}s(Yc,"Pr");function v8(e,t){return rd(null,e,t,null)}s(v8,"Fr");function rd(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,l=o?o.type:void 0,a=l==="selectionchange",c=!Zf&&(a||l==="beforeinput"||l==="compositionstart"||l==="compositionend"||l==="click"&&o&&o.detail===3||l==="drop"||l===void 0);let u,d,f,h;if(ve(e)&&!c)return e.clone();{if(t===null)return null;const b=Yn(t,n._rootElement);if(u=b.anchorNode,d=b.focusNode,f=b.anchorOffset,h=b.focusOffset,(a||l===void 0)&&ve(e)&&!xa(n,u,d))return e.clone()}const g=C5(u,f,d,h,n,e);if(g===null)return null;const[p,_,y]=g;let v=0,x="";if(ve(e)){const b=e.anchor;if(p.key===b.key)v=e.format,x=e.style;else{const S=p.getNode();X(S)?(v=S.getFormat(),x=S.getStyle()):F(S)&&(v=S.getTextFormat(),x=S.getTextStyle())}}const C=new va(p,_,v,x);return y&&(C.dirty=!0),C}s(rd,"Ir");function Ve(){return Pr()._selection}s(Ve,"Lr");function No(){return Ue()._editorState._selection}s(No,"Kr");function oo(e,t,n,r=1){const i=e.anchor,o=e.focus,l=i.getNode(),a=o.getNode();if(!t.is(l)&&!t.is(a))return;const c=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(c,d,"element"),o.set(c,d,"element"),V0(e)}}else{const u=e.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,g=h.getNode();if(t.is(f)){const p=d.offset;(n<=p&&r>0||n<p&&r<0)&&d.set(c,Math.max(0,p+r),"element")}if(t.is(g)){const p=h.offset;(n<=p&&r>0||n<p&&r<0)&&h.set(c,Math.max(0,p+r),"element")}}V0(e)}s(oo,"zr");function V0(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed()){if(!F(o))return;const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(X(u)){let d=0;c&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),r.set(u.__key,d,"text")}return}if(F(o)){const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(X(u)){let d=0;c&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(F(l)){const a=l.getChildrenSize(),c=i>=a,u=c?l.getChildAtIndex(a-1):l.getChildAtIndex(i);if(X(u)){let d=0;c&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}s(V0,"Br");function Xc(e,t,n,r,i){let o=null,l=0,a=null;r!==null?(o=r.__key,X(r)?(l=r.getTextContentSize(),a="text"):F(r)&&(l=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,X(i)?a="text":F(i)&&(a="element")),o!==null&&a!==null?e.set(o,l,a):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}s(Xc,"Rr");function B0(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}s(B0,"Wr");function Qc(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}s(Qc,"Ur");function H0(e,t,n){const r=gs(e,t.getKey());if(F(t)){const i=Rn(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}s(H0,"$r");function T5(e,t,n,r,i,o){const l=o.getRootNode(),a=Is(l)||ii(l)?ps(l):null;if(i.has("collaboration")&&a!==o||a!==null&&cd(a,a))return;const c=Yn(r,o);let u;if(!ve(t))return void(e!==null&&xa(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),g=f.getNode(),[p,_]=H0(n,h,d.offset),[y,v]=H0(n,g,f.offset),x=t.format,C=t.style,b=t.isCollapsed();let S=p,M=y,T=!1;if(d.type==="text"?(S=X(h)?Qr(h,p,n):null,T=h.getFormat()!==x||h.getStyle()!==C):ve(e)&&e.anchor.type==="text"&&(T=!0),f.type==="text"&&(M=X(g)?Qr(g,y,n):null),S!==null&&M!==null){if(b&&(e===null||T||ve(e)&&(e.format!==x||e.style!==C))&&(function(E,A,D,L,G,$){E._inputState.collapsedSelectionFormat={format:A,key:G,offset:L,style:D,timeStamp:$}})(n,x,C,_,d.key,performance.now()),(r.type!=="Range"||!b)&&c.anchorOffset===_&&c.focusOffset===v&&c.anchorNode===S&&c.focusNode===M){if(a===null||!o.contains(a)){const E=a!==null?fo(a):null;E!==null&&E!==n||i.has("skip-selection-focus")||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(Qc(r,S,_,M,v),ri&&t.isCollapsed()&&o!==null&&!i.has("skip-selection-focus")){const E=ou(o);if(E===null||!o.contains(E)){const A=ps(o.ownerDocument),D=A!==null?fo(A):null;D!==null&&D!==n||o.focus({preventScroll:!0})}}if(!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===ou(o)){const E=ve(t)&&t.anchor.type==="element"?S.childNodes[_]||null:(u===void 0&&(u=a2(r,o)),u);if(E!==null){let A;if(yr(E)){const D=E.ownerDocument.createRange();D.selectNode(E),A=D.getBoundingClientRect()}else A=E.getBoundingClientRect();(function(D,L,G){const $=dd(G),z=Dp($);if($===null||z===null)return;const W=G.getBoundingClientRect();if(L.bottom<W.top)return;let{top:ye,bottom:q}=L,ge=0,me=0,oe=G;for(;oe!==null;){const Z=oe===$.body;if(Z){const de=z.visualViewport;if(de){const ue=de.offsetTop;ge=ue,me=ue+de.height}else ge=0,me=Sn(D).innerHeight;const ce=z.getComputedStyle($.documentElement),j=parseFloat(ce.scrollPaddingTop),ne=parseFloat(ce.scrollPaddingBottom);isFinite(j)&&(ge+=j),isFinite(ne)&&(me-=ne)}else{const de=oe===G?W:oe.getBoundingClientRect();ge=de.top,me=de.bottom}let pe=0;if(ye<ge?pe=-(ge-ye):q>me&&(pe=q-me),pe!==0)if(Z)z.scrollBy(0,pe);else{const de=oe.scrollTop;oe.scrollTop+=pe;const ce=oe.scrollTop-de;ye-=ce,q-=ce}if(Z)break;oe=Oo(oe)}})(n,A,o)}}(function(E){E._inputState.isSelectionChangeFromDOMUpdate=!0})(n)}}s(T5,"Hr");function y8(e){let t=Ve()||No();t===null&&(t=Dn().selectEnd()),t.insertNodes(e)}s(y8,"Jr");function w5(e,t){for(const n of e.split(/(\r?\n|\t)/))n===`
10
+ `||n===`\r
11
+ `?t.linebreak():n===" "?t.tab():n!==""&&t.text(n)}s(w5,"jr");function Cp(e){const t=[];return w5(e,{linebreak:s(()=>t.push(ya()),"linebreak"),tab:s(()=>t.push(xp()),"tab"),text:s(n=>t.push(Ft(n)),"text")}),t}s(Cp,"Vr");function x8(){const e=Ve();return e===null?"":e.getTextContent()}s(x8,"qr");function ph(e){const t=[];for(const n of e)Ir(n)||(!F(n)&&!We(n)||n.isInline()?t.push(n):F(n)&&t.push(...ph(n.getChildren())));return t}s(ph,"Yr");function Js(e){let t=e;e.isCollapsed()||t.removeText();const n=Ve();ve(n)&&(t=n),ve(t)||B(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!hn(i)&&Zt(i)===null;){const l=i;if([i,o]=C8(i,o),l.is(i))break}return o}s(Js,"Gr");function C8(e,t){const n=e.getParent();if(!n){const i=mn();return Dn().append(i),i.select(),[Dn(),0]}if(X(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!F(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new va(gr(e.__key,t,"element"),gr(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}s(C8,"Xr");function K0(e){return Ir(e)||n2(e)||X(e)||e.isParentRequired()}s(K0,"Qr");function tf(e){const t=mn();let n=null;for(let r=0;r<e.length;r++){const i=e[r];if(K0(i)){if(n===null){n=i.createParentElementNode(),t.append(n);const o=e[r+1];if(Ir(i)&&(o===void 0||!K0(o)))continue}n.append(i)}else t.append(i),n=null}return t}s(tf,"Zr");function eu(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[d,f]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=ei(e.focus,n?"previous":"next"),l=r==="lineboundary",a=t==="move";let c=o,u=i==="decorators-and-blocks";if(!L2(c)){for(const d of c){u=!1;const{origin:f}=d;if(!We(f)||f.isIsolated()||(c=d,!l||!f.isInline()))break}if(u)for(const d of Wp(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Gn(d))d.origin.isInline()||(c=d);else{if(F(d.origin))continue;We(d.origin)&&!d.origin.isInline()&&(c=d)}break}}if(c===o)return!1;if(a&&!l&&We(c.origin)&&c.origin.isKeyboardSelectable()){const d=Yc();return d.add(c.origin.getKey()),dn(d),!0}return c=dr(c),a&&_s(e.anchor,c),_s(e.focus,c),u||!l}s(eu,"ti");var Kt=null,Tt=null,_n=!1,nf=!1,Cc=!1,rf=new Set,bc=0,U0={characterData:!0,childList:!0,subtree:!0};function bo(){return _n||Kt!==null&&Kt._readOnly}s(bo,"ai");function Ht(){_n&&B(13)}s(Ht,"ui");function k5(){bc>99&&B(14)}s(k5,"fi");function Pr(){return Kt===null&&B(195,A5()),Kt}s(Pr,"di");function b8(e){Pr()!==null&&Tt===null&&(Tt=e),Tt!==e&&sC(378)}s(b8,"hi");function Ue(){return Tt===null&&B(337,A5()),Tt}s(Ue,"gi");function M5(){Ue()._dirtyType=2}s(M5,"_i");function A5(){let e=0;const t=new Set,n=hs.version;if(typeof window<"u")for(const i of s2(document)){const o=Ca(i);if(ud(o))e++;else if(o){let l=String(o.constructor.version||"<0.17.1");l===n&&(l+=" (separately built, likely a bundler configuration issue)"),t.add(l)}}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}s(A5,"pi");function I5(){return Tt}s(I5,"yi");function W0(e,t,n){const r=t.__type,i=wp(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const l=o.length;for(let a=0;a<l&&(o[a](t),t.isAttached());a++);}s(W0,"mi");function z0(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}s(z0,"xi");function N5(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}s(N5,"Ci");function E8(e){return tu(e,Ue()._nodes)}s(E8,"Si");function tu(e,t){const n=e.type,r=t.get(n);r===void 0&&B(17,n);const i=r.klass;e.type!==i.getType()&&B(18,i.name);const o=i.importJSON(e),l=e.children;if(F(o)&&Array.isArray(l))for(let c=0;c<l.length;c++){const u=tu(l[c],t);o.append(u)}const a=e.$slots;if(a){Mr(o)||B(379,i.name);for(const c in a)Kp(o,c,tu(a[c],t))}return o}s(tu,"vi");function j0(e,t,n){const r=Kt,i=_n,o=Tt;Kt=t,_n=!0,Tt=e;try{return n()}finally{Kt=r,_n=i,Tt=o}}s(j0,"Ti");function wi(e,t){const n=Cc;Cc=!0;try{(function(r,i){const o=r._pendingEditorState,l=r._rootElement,a=r._headless||l===null;if(o===null)return void(!r._updating&&r._deferred.length>0&&J0(r,r._deferred));const c=r._editorState,u=c._selection,d=o._selection,f=r._dirtyType!==0,h=Kt,g=_n,p=Tt,_=r._updating,y=r._observer;let v=null;if(r._pendingEditorState=null,r._editorState=o,!a&&f&&y!==null){Tt=r,Kt=o,_n=!1,r._updating=!0;try{const E=r._dirtyType,A=r._dirtyElements,D=r._dirtyLeaves;y.disconnect(),v=LM(c,o,r,E,A,D)}catch(E){if(E instanceof Error&&r._onError(E),nf)throw E;K5(r,null,l,o),_C(r),r._dirtyType=2,nf=!0,wi(r,c),nf=!1;return}finally{y.observe(l,U0),r._updating=_,Kt=h,_n=g,Tt=p}}o._readOnly||(o._readOnly=!0);const x=r._dirtyLeaves,C=r._dirtyElements,b=r._normalizedNodes,S=r._updateTags;f&&(r._dirtyType=0,r._cloneNotNeeded.clear(),r._dirtyLeaves=new Set,r._dirtyElements=new Map,r._normalizedNodes=new Set),r._updateTags=new Set,(function(E,A){const D=E._decorators;let L=E._pendingDecorators||D;const G=A._nodeMap;let $;for($ in L)G.has($)||(L===D&&(L=G5(E)),delete L[$])})(r,o);const M=a?null:tr(Sn(r));if(r._editable&&M!==null&&(f||d===null||d.dirty||!d.is(u))&&l!==null&&!S.has("skip-dom-selection")){Tt=r,Kt=o;try{if(y!==null&&y.disconnect(),f||d===null||d.dirty){const E=r._blockCursorElement;E!==null&&iu(E,r,l),T5(u,d,r,M,S,l)}(function(E,A,D){let L=E._blockCursorElement;if(ve(D)&&D.isCollapsed()&&D.anchor.type==="element"&&A.contains(ou(A))){const G=D.anchor,$=G.getNode(),z=G.offset;let W=!1,ye=null;if(z===$.getChildrenSize())Ec($.getChildAtIndex(z-1))&&(W=!0);else{const q=$.getChildAtIndex(z);if(q!==null&&Ec(q)){const ge=q.getPreviousSibling();(ge===null||Ec(ge))&&(W=!0,ye=E.getElementByKey(q.__key))}}if(W){const q=Rn($,E.getElementByKey($.__key),E).element;L===null&&(E._blockCursorElement=L=(function(ge){const me=ge.theme,oe=vn().createElement("div");oe.contentEditable="false",oe.setAttribute("data-lexical-cursor","true");let Z=me.blockCursor;return Z!==void 0&&(typeof Z=="string"&&(Z=me.blockCursor=Ta(Z)),Z!==void 0&&oe.classList.add(...Z)),oe})(E._config)),A.style.caretColor="transparent",ye===null?q.appendChild(L):q.insertBefore(L,ye);return}}L!==null&&iu(L,E,A)})(r,l,d)}finally{y!==null&&y.observe(l,U0),Tt=p,Kt=h}}v!==null&&(function(E,A,D,L,G){const $=Array.from(E._listeners.mutation),z=$.length;for(let W=0;W<z;W++){const[ye,q]=$[W];for(const ge of q){const me=A.get(ge);me!==void 0&&ye(me,{dirtyLeaves:L,prevEditorState:G,updateTags:D})}}})(r,v,S,x,c),ve(d)||d===null||u!==null&&u.is(d)||r.dispatchCommand(op,void 0);const T=r._pendingDecorators;T!==null&&(r._decorators=T,r._pendingDecorators=null,_l("decorator",r,!0,T)),(function(E,A,D){const L=Z0(A),G=Z0(D);L!==G&&_l("textcontent",E,!0,G)})(r,i||c,o),_l("update",r,!0,{dirtyElements:C,dirtyLeaves:x,editorState:o,mutatedNodes:v,normalizedNodes:b,prevEditorState:i||c,tags:S}),!_&&J0(r,r._deferred),(function(E){const A=E._updates;if(A.length===0)return void(E._cascadeCount=0);if((function(L){rf.has(L)||(rf.add(L),setTimeout(()=>{rf.delete(L),L._cascadeCount=0},0))})(E),E._cascadeCount++>99)return E._updates=[],E._cascadeCount=0,void E._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${E._config.namespace}`));const D=A.shift();if(D){const[L,G]=D;id(E,L,G)}})(r)})(e,t)}finally{Cc=n}}s(wi,"ki");function _l(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=t._listeners[e],l=Array.from(o);for(const[a,c]of l){c&&c();const u=a(...r);o.has(a)?o.set(a,u):u&&u()}}finally{t._updating=i}}s(_l,"bi");function O5(e,t,n,r){const i=Ap(e);let o;if(!Cc)for(let l=0;l<i.length;l++)i[l]._updating||(i[l]._cascadeCount=0);for(let l=4;l>=0;l--)for(let a=0;a<i.length;a++){const c=i[a];if(a>0&&c._updating){o=c;break}const u=c._commands.get(t);if(u!==void 0){const d=u[l];if(d.size>0){let f=!1;if(jn(c,()=>{for(const h of d)if(h(n,r))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{O5(o,t,n,r)}),!1}s(O5,"Ni");function J0(e,t){if(e._deferred=[],t.length!==0){const n=e._updating;e._updating=!0;try{for(let r=0;r<t.length;r++)t[r]()}finally{e._updating=n}}}s(J0,"wi");function G0(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,l]=i,a=e._pendingEditorState;let c;l!==void 0&&(c=l.onUpdate,l.skipTransforms&&(r=!0),l.discrete&&(a===null&&B(191),a._flushSync=!0),c&&e._deferred.push(c),N5(e,l.tag)),a==null?id(e,o,l):o()}}return r}s(G0,"Ei");function id(e,t,n){const r=e._updateTags;let i,o=!1,l=!1;n!==void 0&&(i=n.onUpdate,N5(e,n.tag),o=n.skipTransforms||!1,l=n.discrete||!1),i&&e._deferred.push(i);const a=e._editorState;let c=e._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=R5(c||a),u=!0),c._flushSync=l;const d=Kt,f=_n,h=Tt,g=e._updating;Kt=c,_n=!1,e._updating=!0,Tt=e;const p=e._headless||e.getRootElement()===null;Tp(null);try{u&&(p?a._selection!==null&&(c._selection=a._selection.clone()):c._selection=(function(v,x){const C=v.getEditorState()._selection,b=tr(Sn(v));return ve(C)||C==null?rd(C,b,v,x):C.clone()})(e,n&&n.event||null));const _=e._compositionKey;t(),o=G0(e,o),(function(v,x){const C=x.getEditorState()._selection,b=v._selection;if(ve(b)){const S=b.anchor,M=b.focus;let T;if(S.type==="text"&&(T=S.getNode(),T.selectionTransform(C,b)),M.type==="text"){const E=M.getNode();T!==E&&E.selectionTransform(C,b)}}})(c,e),e._dirtyType!==0&&(o?(function(v,x){const C=x._dirtyLeaves,b=v._nodeMap;for(const S of C){const M=b.get(S);X(M)&&M.isAttached()&&M.isSimpleText()&&!M.isUnmergeable()&&m0(M)}})(c,e):(function(v,x){const C=x._dirtyLeaves,b=x._dirtyElements,S=v._nodeMap,M=qr(),T=new Map;let E=C,A=E.size,D=b,L=D.size;for(;A>0||L>0;){if(A>0){x._dirtyLeaves=new Set;for(const G of E){const $=S.get(G);X($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&m0($),$!==void 0&&z0($,M)&&W0(x,$,T),C.add(G)}if(E=x._dirtyLeaves,A=E.size,A>0){bc++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,D.delete("root")&&D.set("root",!0);for(const G of D){const $=G[0],z=G[1];if(b.set($,z),!z)continue;const W=S.get($);W!==void 0&&z0(W,M)&&W0(x,W,T)}E=x._dirtyLeaves,A=E.size,D=x._dirtyElements,L=D.size,bc++}x._dirtyLeaves=C,x._dirtyElements=b})(c,e),G0(e),(function(v,x,C,b){const S=v._nodeMap,M=x._nodeMap,T=[];for(const[D]of b){const L=M.get(D);L!==void 0&&(L.isAttached()||(F(L)&&Uc(L,D,S,M,T,b),S.has(D)||b.delete(D),T.push(D)))}for(const D of C){const L=M.get(D);L===void 0||L.isAttached()||(Mr(L)&&L.__slots!==null&&Uc(L,D,S,M,T,C),S.has(D)||C.delete(D),T.push(D))}for(const D of T)M.delete(D);const E=Ue(),A=E._compositionKey;A===null||M.has(A)||(E._compositionKey=null)})(a,c,e._dirtyLeaves,e._dirtyElements)),_!==e._compositionKey&&(c._flushSync=!0);const y=c._selection;if(ve(y)){e._slotsUsed&&x5(y);const v=c._nodeMap,x=y.anchor.key,C=y.focus.key;v.get(x)!==void 0&&v.get(C)!==void 0||B(19)}else Ms(y)&&y._nodes.size===0&&(c._selection=null)}catch(_){_ instanceof Error&&e._onError(_),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),wi(e);return}finally{Kt=d,_n=f,Tt=h,e._updating=g,bc=0}e._dirtyType!==0||e._deferred.length>0||(function(_,y){const v=y.getEditorState()._selection,x=_._selection;if(x!==null){if(x.dirty||!x.is(v))return!0}else if(v!==null)return!0;return!1})(c,e)?c._flushSync?(c._flushSync=!1,wi(e)):u&&O8(()=>{wi(e)}):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}s(id,"Oi");function jn(e,t,n){Tt===e&&n===void 0?t():id(e,t,n)}s(jn,"Mi");function S8(e){if(kt(e)){let t=null;for(const n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}s(S8,"Ai");var As=class extends On{static{s(this,"Di")}__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:S8,extends:On})}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&&B(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return vM[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let 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&&Jn(this).length===0}isDirty(){const e=Ue()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];for(const n of Jn(this)){const r=Vi(this,n);F(r)&&e.push(...r.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if(X(t)&&e.push(t),F(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;F(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;F(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const i=t[n-1];return F(i)&&i.getLastDescendant()||i||null}const r=t[e];return F(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:nt(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&B(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:nt(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&B(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let 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=T2(this);const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=i.getTextContent(),F(i)&&r!==n-1&&!i.isInline()&&(e+=lo)}return e}getTextContentSize(){let e=(function(r){let i=0;for(const o of Jn(r)){const l=Vi(r,o);l!==null&&(i+=l.getTextContentSize())}return i})(this);const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=i.getTextContentSize(),F(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Kc[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=Gt[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Pi(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Ht();const n=Ve();let r=e,i=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(X(a)||F(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const a=this.getLastChild();if(X(a)||F(a))return a.select()}}r===void 0&&(r=o),i===void 0&&(i=o);const l=this.__key;return ve(n)?(n.anchor.set(l,r,"element"),n.focus.set(l,i,"element"),n.dirty=!0,n):E5(l,r,l,i,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""&&Kc[e]||0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){qc(this)&&B(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+t<=r||B(226,String(e),String(t),String(r));for(const h of n);const o=i.__key,l=[],a=[],c=this.getChildAtIndex(e+t);let u=null,d=r-t+n.length;if(e!==0)if(e===r)u=this.getLastChild();else{const h=this.getChildAtIndex(e);h!==null&&(u=h.getPreviousSibling())}if(t>0){let h=u===null?this.getFirstChild():u.getNextSibling();for(let g=0;g<t;g++){h===null&&B(100);const p=h.getNextSibling(),_=h.__key;ur(h.getWritable()),a.push(_),h=p}}let f=u;for(const h of n){f!==null&&h.is(f)&&(u=f=f.getPreviousSibling());const g=h.getWritable();g.__parent===o&&d--,ur(g);const p=h.__key;if(f===null)i.__first=p,g.__prev=null;else{const _=f.getWritable();_.__next=p,g.__prev=_.__key}h.__key===o&&B(76),g.__parent=o,l.push(p),f=h}if(e+t===r)f!==null&&(f.getWritable().__next=null,i.__last=f.__key);else if(c!==null){const h=c.getWritable();if(f!==null){const g=f.getWritable();h.__prev=f.__key,g.__next=c.__key}else h.__prev=null}if(i.__size=d,a.length){const h=Ve();if(ve(h)){const g=new Set(a),p=new Set(l),{anchor:_,focus:y}=h;q0(_,g,p)&&Xc(_,_.getNode(),this,u,c),q0(y,g,p)&&Xc(y,y.getNode(),this,u,c),d!==0||this.canBeEmpty()||kt(this)||this.remove()}}return i}getDOMSlot(e){return new uC(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(vt(t)){const n=this.getIndent();n>0&&(t.style.paddingInlineStart=40*n+"px",t.setAttribute("data-lexical-indent",String(n)));const r=this.getDirection();r&&(t.dir=r)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===""||kt(this)||this.getChildren().some(X)||(t!==0&&(e.textFormat=t),n!==""&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}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){const n=Rn(this,e,t);let r=n.getFirstChild();for(let i=this.getFirstChild();i;i=i.getNextSibling()){const o=t.getElementByKey(i.getKey());o!==null&&(r==null?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}};function F(e){return e instanceof As}s(F,"Pi");function q0(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}s(q0,"Fi");var bp=class extends On{static{s(this,"Ii")}__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&&B(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 We(e){return e instanceof bp}s(We,"Li");var od=class D5 extends As{static{s(this,"Ki")}__cachedText;static getType(){return"root"}static clone(){return new D5}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){const t=this.__cachedText;return t===null||!bo()&&Ue()._dirtyType!==0?super.getTextContent():t}remove(){B(52)}replace(t){B(53)}insertBefore(t){B(54)}insertAfter(t){B(55)}updateDOM(t,n){return!1}splice(t,n,r){for(const i of r)F(i)||We(i)||B(282);return super.splice(t,n,r)}static importJSON(t){return Dn().updateFromJSON(t)}collapseAtStart(){return!0}};function Mt(e){return e instanceof od}s(Mt,"zi");function R5(e){return new Sp(hC(e._nodeMap),null,e._slotsUsed)}s(R5,"Bi");function Ep(){return new Sp(new Map([["root",new od]]),null,!1)}s(Ep,"Ri");function mh(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&B(130,n.name),F(e)){const i=t.children;Array.isArray(i)||B(59,n.name);const o=e.getChildren();for(let l=0;l<o.length;l++){const a=mh(o[l]);i.push(a)}}const r=Jn(e);if(r.length>0){const i={};for(const o of r){const l=Vi(e,o);l===null&&B(366,n.name,o),i[o]=mh(l)}t.$slots=i}return t}s(mh,"Wi");function T8(e){return e instanceof Sp}s(T8,"Ui");var Sp=class L5{static{s(this,"$i")}_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,n=null,r=!1){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=r}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return j0(n&&n.editor||null,this,t)}clone(t){const n=new L5(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n}toJSON(){return j0(null,this,()=>({root:mh(Dn())}))}},$5=class extends As{static{s(this,"Hi")}static getType(){return"artificial"}createDOM(e){return vn().createElement("div")}},sd=class P5 extends On{static{s(this,"Ji")}static getType(){return"linebreak"}static clone(t){return new P5(t.__key)}constructor(t){super(t)}getTextContent(){return`
12
+ `}createDOM(){return vn().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:s(t=>F5(t)||V5(t)?null:{conversion:w8,priority:0},"br")}}static importJSON(t){return ya().updateFromJSON(t)}};function w8(e){return{node:ya()}}s(w8,"ji");function ya(){return ba(new sd)}s(ya,"Vi");function Ir(e){return e instanceof sd}s(Ir,"qi");function F5(e){const t=e.parentElement;if(t!==null&&Fp(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&nu(n)){const r=t.lastChild;if(r===e||r.previousSibling===e&&nu(r))return!0}}return!1}s(F5,"Yi");function V5(e){const t=e.parentElement;if(t!==null&&Fp(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&nu(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&nu(r))return!0}return!1}s(V5,"Gi");function nu(e){return yr(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}s(nu,"Xi");var ld=class B5 extends As{static{s(this,"Qi")}static getType(){return"paragraph"}static clone(t){return new B5(t.__key)}createDOM(t){const n=vn().createElement("p"),r=cs(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:s(t=>({conversion:k8,priority:0}),"p")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(vt(n)){this.isEmpty()&&n.append(vn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return mn().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(X);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=mn();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||X(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function k8(e){const t=mn();if(_2(t,e),p2(e,t),t.getFormatType()===""){const n=e.getAttribute("align");n&&n&&n in Kc&&t.setFormat(n)}return m2(t,e),{node:t}}s(k8,"Zi");function mn(){return ba(new ld)}s(mn,"ts");function H5(e){return e instanceof ld}s(H5,"es");function M8(e){}s(M8,"ns");function K5(e,t,n,r,i){const o=e._keyToDOMMap;o.clear(),e._editorState=Ep(),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),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const l=e._observer;l!==null&&(l.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(a,c){const u=`__lexicalKey_${c._key}`;delete a[u]})(t,e)),n!==null&&(n.textContent="",o.set("root",n),J5(n,e,"root"))}s(K5,"hs");function U5(e){const t=new Set,n=new Set;for(const{klass:r,ownNodeConfig:i}of Sa(e)){const o=r.transform;if(!n.has(o)){n.add(o);const l=r.transform();l&&t.add(l)}if(i){const l=i.$transform;l&&t.add(l)}}return t}s(U5,"gs");var Kl={$createDOM:s((e,t)=>e.createDOM(t._config,t),"$createDOM"),$decorateDOM:s((e,t,n,r)=>{},"$decorateDOM"),$exportDOM:s((e,t)=>{const n=ad(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},"$exportDOM"),$extractWithChild:s((e,t,n,r,i)=>F(e)&&e.extractWithChild(t,n,r),"$extractWithChild"),$getDOMSlot:s((e,t,n)=>e.getDOMSlot(t),"$getDOMSlot"),$getSlotTargetElement:s((e,t,n,r)=>null,"$getSlotTargetElement"),$shouldExclude:s((e,t,n)=>F(e)&&e.excludeFromCopy("html"),"$shouldExclude"),$shouldInclude:s((e,t,n)=>!t||e.isSelected(t),"$shouldInclude"),$updateDOM:s((e,t,n,r)=>e.updateDOM(t,n,r._config),"$updateDOM")};function A8(e){const t=e||{},n=I5(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,l=Ep(),a=t.namespace||(i!==null?i._config.namespace:Z5()),c=t.editorState,u=[od,_a,sd,td,ld,$5,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,g=t.editable===void 0||t.editable;let p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let y=0;y<u.length;y++){let v=u[y],x=null,C=null;if(v&&typeof v=="object"){const M=v;v=M.replace,x=M.with,C=M.withKlass||null}if(typeof v!="function"||!v.prototype||!(v===On||v.prototype instanceof On)){let M="<unknown>";try{M=JSON.parse(fC)}catch{}B(365,String(y-u.length+(t.nodes?t.nodes.length:0)),typeof v=="function"?`${v.name}${typeof v.getType=="function"?` (type ${String(v.getType())})`:""}`:String(v),String(M))}Ea(v);const b=v.getType(),S=U5(v);p.set(b,{exportDOM:h&&h.export?h.export.get(v):void 0,klass:v,replace:x,replaceWithKlass:C,sharedNodeState:yC(u[y]),transforms:S})}}const _=new hs(l,i,p,{disableEvents:o,dom:{...Kl,...e&&e.dom},namespace:a,theme:r},d||console.error,f||M8,(function(y,v){const x=new Map,C=new Set,b=s(S=>{Object.keys(S).forEach(M=>{let T=x.get(M);T===void 0&&(T=[],x.set(M,T)),T.push(S[M])})},"r");return y.forEach(S=>{const M=S.klass.importDOM;if(M==null||C.has(M))return;C.add(M);const T=M.call(S.klass);T!==null&&b(T)}),v&&b(v),x})(p,h?h.import:void 0),g,e);return c!==void 0&&(_._pendingEditorState=c,_._dirtyType=2),(function(y){y.registerCommand(sp,JM,0),y.registerCommand(lp,GM,0),y.registerCommand(ap,qM,0),y.registerCommand(cp,ZM,0),y.registerCommand(hp,YM,0)})(_),_}s(A8,"ps");function I8(e,t){const n=e.get(t);e.delete(t),n&&n()}s(I8,"ys");function Gs(e,t,n){return e.set(t,n),I8.bind(null,e,t)}s(Gs,"ms");var hs=class{static{s(this,"xs")}static version;_headless;_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;_inputState;_createEditorArgs;constructor(e,t,n,r,i,o,l,a,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new qf,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 Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Z5(),this._onError=i,this._onWarn=o,this._htmlConversions=l,this._editable=a,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return Gs(this._listeners.update,e)}registerEditableListener(e){return Gs(this._listeners.editable,e)}registerDecoratorListener(e){return Gs(this._listeners.decorator,e)}registerTextContentListener(e){return Gs(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return qp(Gs(t,e,e(this._rootElement,null)||void 0),()=>(function(n,r,i){const o=n.get(r);o&&o(),n.set(r,r(...i)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&B(35);const r=this._commands;r.has(e)||r.set(e,[new js,new js,new js,new js,new js]);const i=r.get(e);i===void 0&&B(36,String(e));const o=(function(a){return 7&a})(n),l=i[o];return o!==n?l.addFront(t):l.addBack(t),()=>{l.delete(t),i.every(a=>a.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;let o=i.get(t);o===void 0&&(o=new Set,i.set(t,o)),o.add(r);const l=n&&n.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(t,r),()=>{o.delete(r),o.size===0&&i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&B(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=vh(n).get(t.getType());if(!r)return;const i=new Map;for(const o of r.keys())i.set(o,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){const o=this.registerNodeTransformToKlass(i,t);r.push(o)}return(function(o,l){const a=vh(o.getEditorState()),c=[];for(const u of l){const d=a.get(u);d&&c.push(d)}c.length!==0&&o.update(()=>{for(const u of c)for(const d of u.keys()){const f=nt(d);f&&f.markDirty()}},o._pendingEditorState===null?{tag:xc}:void 0)})(this,r.map(o=>o.klass.getType())),()=>{r.forEach(o=>o.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return fe(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=cs(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,K5(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||XM(t),n!=null&&t.classList.remove(...n)),e!==null){const i=Dp(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,_C(this),this._updateTags.add(xc),wi(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument;ah.set(l,c);let u=Jc.get(c);u===void 0&&(u={editors:new Set,hasShadowEditor:void 0},Jc.set(c,u)),u.editors.add(a),u.hasShadowEditor=void 0,l.__lexicalEditor=a;const d=t5(l);d.push(jM.register(c));for(let f=0;f<lh.length;f++){const[h,g]=lh[f],p=typeof g=="function"?_=>{M0(_)||(ch(_),(a.isEditable()||h==="click")&&g(_,a))}:_=>{if(M0(_))return;ch(_);const y=a.isEditable();switch(h){case"cut":return y&&fe(a,pp,_);case"copy":return fe(a,gp,_);case"paste":return y&&fe(a,up,_);case"dragstart":return y&&fe(a,UC,_);case"dragover":return y&&fe(a,WC,_);case"dragend":return y&&fe(a,zC,_);case"focus":return y&&fe(a,JC,_);case"blur":return y&&fe(a,GC,_);case"drop":return y&&fe(a,KC,_)}};d.push(mp(l,h,p))}})(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(xc),wi(this);_l("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&B(38);let n=e;n._readOnly&&(n=R5(e),n._selection=e._selection?e._selection.clone():null),mC(this);const r=this._pendingEditorState,i=t!==void 0?t.tag:null;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),wi(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,jn(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[o,l]of n._nodeMap.entries())F(l)?this._dirtyElements.set(o,!0):this._dirtyLeaves.add(o)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return(function(n,r,i){const o=Ep(),l=Kt,a=_n,c=Tt,u=r._dirtyElements,d=r._dirtyLeaves,f=r._cloneNotNeeded,h=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,Kt=o,_n=!1,Tt=r,Tp(null);try{const g=r._nodes;tu(n.root,g),i&&i(),o._readOnly=!0,o._parsed=!0}catch(g){g instanceof Error&&r._onError(g)}finally{r._dirtyElements=u,r._dirtyLeaves=d,r._cloneNotNeeded=f,r._dirtyType=h,Kt=l,_n=a,Tt=c}return o})(typeof e=="string"?JSON.parse(e):e,this,t)}read(...e){const[t,n]=e.length===1?["force-commit",e[0]]:e;return t==="force-commit"&&wi(this),(t==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(n,r,i){n._updating?n._updates.push([r,i]):id(n,r,i)})(this,e,t)}focus(e,t={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),jn(this,()=>{const r=Ve(),i=Dn();r!==null?r.dirty||dn(r.clone()):i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),Eo("focus"),t2(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=tr(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,_l("editable",this,!0,e),this._slotsUsed&&this.update(()=>M5()))}toJSON(){return{editorState:this._editorState.toJSON()}}};hs.version=fC;var _h=null;function Tp(e){_h=e}s(Tp,"Ss");var W5=1;function N8(){W5=1}s(N8,"Ts");function wp(e,t){const n=ad(e,t);return n===void 0&&B(30,t),n}s(wp,"ks");function ad(e,t){return e._nodes.get(t)}s(ad,"bs");var O8=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function cd(e,t){const n=t!==void 0?t:(()=>{const o=e.getRootNode();return Is(o)||ii(o)?ps(o):null})();if(!vt(n)||n.hasAttribute("data-lexical-slot"))return!1;const r=Mp(n),i=n.nodeName;return _p(r)&&(i==="INPUT"||i==="TEXTAREA"||n.contentEditable==="true"&&Ca(n)==null)}s(cd,"ws");var D8=cd;function xa(e,t,n){const r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return fo(t)===e&&e.read("latest",()=>!cd(t))}s(xa,"Os");function ud(e){return e instanceof hs}s(ud,"Ms");function fo(e){let t=e;for(;t!=null;){const n=Ca(t);if(ud(n))return n;t=Oo(t)}return null}s(fo,"As");function Ca(e){return e?e.__lexicalEditor:null}s(Ca,"Ds");function R8(e){return pM.test(e)?"rtl":mM.test(e)?"ltr":null}s(R8,"Ps");function Di(e){return nd(e)||e.isToken()}s(Di,"Fs");function An(e){return Di(e)||e.isSegmented()}s(An,"Is");function yr(e){return Ds(e)&&e.nodeType===3}s(yr,"Ls");function Is(e){return Ds(e)&&e.nodeType===9}s(Is,"Ks");function z5(e){let t=e;for(;t!=null;){if(yr(t))return t;t=t.firstChild}return null}s(z5,"zs");function Pi(e,t,n){const r=Gt[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t==="subscript"?i&=~Gt.superscript:t==="superscript"?i&=~Gt.subscript:t==="lowercase"?(i&=~Gt.uppercase,i&=~Gt.capitalize):t==="uppercase"?(i&=~Gt.lowercase,i&=~Gt.capitalize):t==="capitalize"&&(i&=~Gt.lowercase,i&=~Gt.uppercase),i}s(Pi,"Bs");function L8(e){return X(e)||Ir(e)||We(e)}s(L8,"Rs");function j5(e,t){const n=(function(){const l=_h;return _h=null,l})();if((t=t||n&&n.__key)!=null)return void(e.__key=t);Ht(),k5();const r=Ue(),i=Pr(),o=""+W5++;i._nodeMap.set(o,e),F(e)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType===0&&(r._dirtyType=1),e.__key=o}s(j5,"Ws");function ur(e){Zt(e)!==null&&B(380,e.__key,String(Zt(e)));const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),l=o!==null?o.__key:null,a=i!==null?i.__key:null,c=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=l),o===null&&(r.__last=a),c!==null&&(c.__next=l),u!==null&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}s(ur,"Us");var $8=ur;function ru(e){k5(),qc(e)&&B(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent!==null?t.__parent:Fi(t)?t.__slotHost:null,r=Pr(),i=Ue(),o=r._nodeMap,l=i._dirtyElements;n!==null&&(function(c,u,d){let f=c;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:Fi(h)?h.__slotHost:null}})(n,o,l);const a=t.__key;i._dirtyType===0&&(i._dirtyType=1),F(e)?l.set(a,!0):i._dirtyLeaves.add(a)}s(ru,"Hs");function Rt(e){Ht();const t=Ue(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=nt(n);r!==null&&r.getWritable()}if(e!==null){const r=nt(e);r!==null&&r.getWritable()}}}s(Rt,"Js");function qr(){return bo()?null:Ue()._compositionKey}s(qr,"js");function nt(e,t){const n=(t||Pr())._nodeMap.get(e);return n===void 0?null:n}s(nt,"Vs");function kp(e,t){const n=Ns(e,Ue());return n!==void 0?nt(n,t):null}s(kp,"qs");function J5(e,t,n){e[`__lexicalKey_${t._key}`]=n}s(J5,"Ys");function Ns(e,t){return e[`__lexicalKey_${t._key}`]}s(Ns,"Gs");function Mp(e,t){let n=e;for(;n!=null;){const r=kp(n,t);if(r!==null)return r;n=Oo(n)}return null}s(Mp,"Xs");function G5(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}s(G5,"Qs");function Z0(e){return e.read(()=>Dn().getTextContent())}s(Z0,"Zs");function Dn(){return Pr()._nodeMap.get("root")}s(Dn,"tl");function dn(e){Ht();const t=Pr();e!==null&&(e.dirty=!0,e.setCachedNodes(null),ve(e)&&Ue()._slotsUsed&&x5(e)),t._selection=e}s(dn,"el");function Y0(){Ht(),mC(Ue())}s(Y0,"nl");function Xo(e){const t=(function(n,r){let i=n;for(;i!=null;){const o=Ns(i,r);if(o!==void 0)return o;i=Oo(i)}return null})(e,Ue());return t===null?null:nt(t)}s(Xo,"ol");function q5(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}s(q5,"rl");function Ap(e){const t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}s(Ap,"il");function Z5(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}s(Z5,"sl");function Y5(e){return yr(e)?e.nodeValue:null}s(Y5,"ll");function Ip(e,t,n){const r=tr(Sn(t));if(r===null)return;const i=Yn(r,t._rootElement),o=i.anchorNode;let{anchorOffset:l,focusOffset:a}=i;if(o!==null){let c=Y5(o);const u=Mp(o);if(c!==null&&X(u)){if((c===Dl||c===np)&&n){const d=n.length;c=n,l=d,a=d}c!==null&&Np(u,c,l,a,e)}}}s(Ip,"cl");function Np(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const l=o.isComposing();if(o.isToken()&&l)return;let a=t;if((l||i)&&(t.endsWith(Dl)&&(a=t.slice(0,-Dl.length)),i)){const u=np;let d;for(;(d=a.indexOf(u))!==-1;)a=a.slice(0,d)+a.slice(d+u.length),n!==null&&n>d&&(n=Math.max(d,n-u.length)),r!==null&&r>d&&(r=Math.max(d,r-u.length))}const c=o.getTextContent();if(i||a!==c){const u=Ve();if(a===""){if(Rt(null),pa||yo||ma)o.remove();else{const _=Ue();of(o,"",u),setTimeout(()=>{_.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=No(),h=o.getTextContentSize(),g=qr(),p=o.getKey();if(o.isToken()&&!l||g!==null&&p===g&&!l||ve(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!l||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!l))return void o.markDirty();if(!ve(u)||n===null||r===null)return void of(o,a,u);if(u.setTextNodeRange(o,n,o,r),o.isSegmented()){const _=Ft(o.getTextContent());o.replace(_),o=_}of(o,a,u)}}}s(Np,"al");function of(e,t,n){if(e.setTextContent(t),ve(n)){const r=e.getKey();let i=!1;for(const o of["anchor","focus"]){const l=n[o];l.type==="text"&&l.key===r&&(l.offset=hr(e,l.offset,"clamp"),i=!0)}i&&(n._cachedNodes=null,n._cachedIsBackward=null)}}s(of,"ul");function ja(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}s(ja,"fl");function X5(e,t){return ja(e,t,"altKey")&&ja(e,t,"ctrlKey")&&ja(e,t,"shiftKey")&&ja(e,t,"metaKey")}s(X5,"dl");function qe(e,t,n){if(!X5(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const r="Key"+t.toUpperCase();return e.code===r}s(qe,"hl");var Wr={ctrlKey:!Vn,metaKey:Vn},X0={altKey:Vn,ctrlKey:!Vn};function Q0(e){return e.key==="Backspace"}s(Q0,"pl");function P8(e){const t=Dn();if(ve(e)){const n=e.anchor,r=e.focus,i=n.getNode();if(Mt(i))return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Yo(e),e;const o=i.getTopLevelElementOrThrow(),l=o.getParent();if(l===null)return F(o)&&(n.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Yo(e)),e;const a=l;return n.set(a.getKey(),0,"element"),r.set(a.getKey(),a.getChildrenSize(),"element"),Yo(e),e}{const n=t.select(0,t.getChildrenSize());return dn(Yo(n)),n}}s(P8,"yl");function cs(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=Ta(i);return n[t]=o,o}return i}s(cs,"ml");function Op(e,t,n,r,i){if(n.size===0)return;const o=r.__type,l=r.__key,a=t.get(o);a===void 0&&B(33,o);const c=a.klass;let u=e.get(c);u===void 0&&(u=new Map,e.set(c,u));const d=u.get(l),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(l,f?"updated":i)}s(Op,"xl");function F8(e){const t=e.getType(),n=Pr();if(n._readOnly){const o=vh(n).get(t);return o?Array.from(o.values()):[]}const r=n._nodeMap,i=[];for(const[,o]of r)o instanceof e&&o.__type===t&&o.isAttached()&&i.push(o);return i}s(F8,"Cl");function e_(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}s(e_,"Sl");function Q5(e,t){const n=e.offset;if(e.type==="element")return e_(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?e_(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}s(Q5,"vl");function e2(e){const t=Sn(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}s(e2,"Tl");function fe(e,t,n){return O5(e,t,n,e)}s(fe,"kl");function gs(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&B(75,t),n}s(gs,"bl");function Oo(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const n=e.parentNode;return ii(n)?n.host:null}s(Oo,"Nl");function dd(e){return Is(e)?e:vt(e)?e.ownerDocument:null}s(dd,"wl");function V8(e){return Ue()._updateTags.has(e)}s(V8,"El");function Eo(e){Ht(),Ue()._updateTags.add(e)}s(Eo,"Ol");function t2(e){Ht(),Ue()._deferred.push(e)}s(t2,"Ml");function Ul(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}s(Ul,"Al");function Dp(e){const t=dd(e);return t?t.defaultView:null}s(Dp,"Dl");function Sn(e){const t=e._window;return t===null&&B(78),t}s(Sn,"Pl");function n2(e){return F(e)&&e.isInline()||We(e)&&e.isInline()}s(n2,"Fl");function Rp(e){let t=e.getLatest();for(;t!==null;){if(Zt(t)!==null&&F(t))return t;const n=t.getParentOrThrow();if(kt(n))return n;t=n}return t}s(Rp,"Il");function Lp(e){return F(e)&&e.isShadowRoot()}s(Lp,"Ll");function kt(e){return Mt(e)||Lp(e)}s(kt,"Kl");function $p(e,t=!1){const n=e.constructor.clone(e);return j5(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}s($p,"zl");function ba(e){const t=Ue(),n=e.getType(),r=ad(t,n);r===void 0&&B(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const l=i(e),a=l.constructor;return o!==null?l instanceof o||B(201,o.name,o.getType(),a.name,a.getType(),e.constructor.name,n):l instanceof e.constructor&&a!==e.constructor||B(202,a.name,a.getType(),e.constructor.name,n),l.__key===e.__key&&B(203,e.constructor.name,n,a.name,a.getType()),l}return e}s(ba,"Bl");function sf(e,t){!Mt(e.getParent())||F(t)||We(t)||B(99)}s(sf,"Rl");function r2(e){const t=nt(e);return t===null&&B(63,e),t}s(r2,"Wl");function Ec(e){if(!e||e.isInline())return!1;if(We(e))return!0;if(F(e)){if(e.isShadowRoot()){const t=e.getParent();return!(F(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}s(Ec,"Ul");function iu(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}s(iu,"$l");function tr(e){return er?(e||window).getSelection():null}s(tr,"Hl");function i2(e){const t=Dp(e);return t?t.getSelection():null}s(i2,"Jl");function ii(e){return f2(e)&&"host"in e}s(ii,"jl");var B8=[];function o2(e){const t=e.getRootNode();if(t===e||!ii(t))return B8;const n=[t];let r=t.host;for(;;){const i=r.getRootNode();if(i===r||!ii(i))break;n.push(i),r=i.host}return n}s(o2,"ql");function*s2(e){const t=[e];let n;for(;n=t.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const r=(Is(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let i;for(;i=r.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}s(s2,"Yl");function l2(e){return e!==null?e.ownerDocument:document}s(l2,"Gl");function vn(){const e=I5();return l2(e!==null?e._rootElement:null)}s(vn,"Xl");function Os(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const n=o2(t);if(n.length===0)return null;const r=e.getComposedRanges;try{const i=r.call(e,{shadowRoots:n})[0];if(i!==void 0)return i}catch{}try{const i=r.apply(e,n)[0];if(i!==void 0)return i}catch{}return null}s(Os,"Ql");function a2(e,t){const n=Os(e,t);if(n!==null){const r=c2(n);if(r!==null)return r}return e.rangeCount>0?e.getRangeAt(0):null}s(a2,"Zl");function Yn(e,t){const n=Os(e,t);return n===null?e:u2(n,d2(e))}s(Yn,"tc");function H8(e,t){const n=Os(e,t);if(n===null)return{points:e,range:e.rangeCount>0?e.getRangeAt(0):null};const r=c2(n)??(e.rangeCount>0?e.getRangeAt(0):null);return{points:u2(n,d2(e)),range:r}}s(H8,"ec");function c2(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}s(c2,"nc");function u2(e,t){const{startContainer:n,startOffset:r,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:o}}s(u2,"oc");function d2(e){return e.direction}s(d2,"rc");function ou(e){const t=e.getRootNode();return Is(t)||ii(t)?t.activeElement:null}s(ou,"ic");function ps(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const n=t.shadowRoot.activeElement;if(n===null)break;t=n}return t}s(ps,"sc");function Pp(e){const t=e.target;if(t!==null&&vt(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const n=e.composedPath();if(n.length>0)return n[0]}return t}s(Pp,"lc");function K8(e,t){let n=e.getChildAtIndex(t);n??=e,kt(e)&&B(102);const r=s(l=>{const a=l.getParentOrThrow(),c=kt(a),u=l!==n||c?$p(l):l;if(c)return F(l)&&F(u)||B(133),l.insertAfter(u),[l,u,u];{const[d,f,h]=r(a),g=l.getNextSiblings();return h.append(u,...g),[d,f,u]}},"r"),[i,o]=r(n);return[i,o]}s(K8,"cc");function U8(e){return vt(e)&&e.tagName==="A"}s(U8,"ac");function W8(e){return vt(e)&&e.tagName==="TR"}s(W8,"uc");function z8(e){return vt(e)&&(e.tagName==="TD"||e.tagName==="TH")}s(z8,"fc");function vt(e){return Ds(e)&&e.nodeType===1}s(vt,"dc");function Ds(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}s(Ds,"hc");function f2(e){return Ds(e)&&e.nodeType===11}s(f2,"gc");var j8=/^(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 h2(e){return!(!vt(e)||!e.style.display.startsWith("inline"))||j8.test(e.nodeName)}s(h2,"pc");var J8=/^(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 Fp(e){return(!vt(e)||!e.style.display.startsWith("inline"))&&J8.test(e.nodeName)}s(Fp,"mc");function hn(e){if(We(e)&&!e.isInline())return!0;if(!F(e)||kt(e))return!1;const t=e.getFirstChild(),n=t===null||Ir(t)||X(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}s(hn,"xc");function xr(){return Ue()}s(xr,"Cc");function Vp(e=xr()){return e._config.dom||Kl}s(Vp,"Sc");function Rn(e,t,n=xr()){const r=Vp(n).$getDOMSlot(e,t,n);return F(e)&&(g2(r)||B(344,e.getKey(),e.getType())),r}s(Rn,"vc");function G8(e,t,n,r){const i=e.read("latest",()=>{const o=nt(t);return o!==null?(function(l,a,c=xr()){const u=Vi(l,a);if(u===null)return null;const d=c.getElementByKey(u.getKey());return d!==null?d.parentElement:null})(o,n,e):null});return i!==null&&(i.parentElement!==r&&r.appendChild(i),i.style.display=""),i}s(G8,"Tc");function q8(e,t,n){n.style.display="none";const r=e.getElementByKey(t);r!==null&&n.parentElement!==r&&r.insertBefore(n,r.firstChild)}s(q8,"kc");function g2(e){return e instanceof uC}s(g2,"bc");function Qr(e,t,n=xr()){return z5(Rn(e,t,n).element)}s(Qr,"Nc");var t_=new WeakMap,Z8=new Map;function vh(e){if(!e._readOnly&&e.isEmpty())return Z8;e._readOnly||B(192);let t=t_.get(e);return t||(t=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const l=o.__type;let a=r.get(l);a||(a=new Map,r.set(l,a)),a.set(i,o)}return r})(e),t_.set(e,t)),t}s(vh,"Oc");function Bp(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}s(Bp,"Mc");function Y8(e){return(t=Bp(e))[n5]=!0,t;var t}s(Y8,"Ac");function p2(e,t){const n=e.getAttribute("data-lexical-indent");if(n!==null){const o=parseInt(n,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}s(p2,"Dc");function m2(e,t){const n=t.getAttribute("dir");return n==="ltr"||n==="rtl"?e.setDirection(n):e}s(m2,"Pc");function _2(e,t){const n=t.style.textAlign;return n&&n in Kc?e.setFormat(n):e}s(_2,"Fc");function v2(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}s(v2,"Ic");function Hp(e){return e.__lexicalUnmanaged===!0}s(Hp,"Lc");function y2(e,t=xr()){const n=t.isEditable();e.contentEditable=n?"true":"false",n?e.__lexicalEditor=t:delete e.__lexicalEditor}s(y2,"Kc");function Wl(e,t){let n=e;for(;n!=null;){if(n.__lexicalCapturedSelection===!0)return!0;if(vt(n)&&n.hasAttribute("data-lexical-slot")||Ns(n,t)!==void 0)return!1;n=Oo(n)}return!1}s(Wl,"zc");function qs(e,t){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(e,t)&&e[t]!==On[t]}s(qs,"Bc");var n_=new WeakMap;function Ea(e){const t=n_.get(e);if(t)return t;const n=e.prototype!=null&&o0 in e.prototype?e.prototype[o0]():void 0,r=(function(c){if(!(c===On||c.prototype instanceof On)){let u="<unknown>",d="<unknown>";try{u=c.getType()}catch{}try{hs.version&&(d=JSON.parse(hs.version))}catch{}B(290,c.name,u,d)}return c===bp||c===As||c===On})(e),i=!r&&qs(e,"getType")?e.getType():void 0;let o,l=i;if(n)if(i)o=n[i];else{for(const[c,u]of Object.entries(n))l=c,o=u;if(!o)for(const c of Object.getOwnPropertySymbols(n)){const u=n[c];if(u){o=u;break}}}if(!r&&l&&(qs(e,"getType")||(e.getType=()=>l),qs(e,"clone")||(e.clone=c=>(Tp(c),new e)),qs(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(c=>new e().updateFromJSON(c))),!qs(e,"importDOM")&&o)){const{importDOM:c}=o;c&&(e.importDOM=()=>c)}const a={klass:e,ownNodeConfig:o,ownNodeType:l};return n_.set(e,a),a}s(Ea,"Wc");function*Sa(e){for(let t=e;t&&(t===On||_p(t.prototype));){const n=Ea(t);yield n,t=n.ownNodeConfig&&n.ownNodeConfig.extends||x2(t)}}s(Sa,"Uc");function X8(e){const t=new Map,n=new Map;for(const r of e){const{ownNodeType:i}=Ea(r);i&&(n.set(i,r),t.set(i,new Set))}for(const[r,i]of n)for(const{ownNodeType:o}of Sa(i)){const l=o&&t.get(o);l&&l.add(r)}return t}s(X8,"$c");function Q8(e){const t=xr();return Ht(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}s(Q8,"Hc");var bi=s((e,t)=>{let n=e;for(;n!=null&&!Mt(n);){if(t(n))return n;n=n.getParent()}return null},"Jc");function zl(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t===null?nt(r):t.get(r);i??B(174),n.push(r),r=i.__next}return n}s(zl,"jc");function x2(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}s(x2,"Vc");var C2=new Map;function Mr(e){return F(e)||We(e)}s(Mr,"Yc");function Fi(e){return F(e)||We(e)}s(Fi,"Gc");function Zt(e){const t=e.getLatest();return Fi(t)?t.__slotHost:null}s(Zt,"Xc");function Kn(e){const t=Zt(e);if(t===null)return null;const n=nt(t);return F(n)||We(n)||B(370),n}s(Kn,"Qc");function b2(e){const t=Kn(e);if(t===null)return null;const n=e.getLatest().__key;for(const[r,i]of fd(t))if(i===n)return r;return null}s(b2,"Zc");function E2(e){let t=e.getLatest();for(;t!==null;){if(Zt(t)!==null)return t;t=t.getParent()}return null}s(E2,"ta");function fd(e){const t=e.getLatest();return Mr(t)&&t.__slots!==null?t.__slots:C2}s(fd,"ea");function Jn(e){return Array.from(fd(e).keys())}s(Jn,"na");function Vi(e,t){const n=fd(e).get(t);return n===void 0?null:nt(n)}s(Vi,"oa");var eA=["__proto__","constructor","prototype"],r_=Symbol("slotMapOwner");function yh(e){let t=e.__slots;return t!==null&&t[r_]===e||(t=new Map(t),t[r_]=e,e.__slots=t),t}s(yh,"sa");var i_=new WeakMap,tA=[];function S2(e){for(const{ownNodeConfig:t}of Sa(e)){const n=t&&t.slots;if(n)return n}return tA}s(S2,"aa");function T2(e){let t="";for(const n of Jn(e)){const r=Vi(e,n);r!==null&&(t+=r.getTextContent())}return t}s(T2,"ua");function o_(e,t,n){const r=n.get(e),i=n.get(t);return r!==void 0?i!==void 0?r-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}s(o_,"fa");function nA(e){const t=e.__slots;if(t===null||t.size<2)return;const n=(function(l){let a=i_.get(l);if(a===void 0){const c=S2(l),u=new Map;for(const d of c)eA.includes(d)&&B(371,l.name,d),u.has(d)&&B(372,l.name,d),u.set(d,u.size);a=u,i_.set(l,a)}return a})(e.constructor);let r=null,i=!0;for(const l of t.keys()){if(r!==null&&o_(r,l,n)>0){i=!1;break}r=l}if(i)return;const o=Array.from(t).sort(([l],[a])=>o_(l,a,n));t.clear();for(const[l,a]of o)t.set(l,a)}s(nA,"da");function Kp(e,t,n){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||B(373,t);const r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!F(n)&&!We(n)||n.isInline())&&B(374,n.__key);const i=e.getWritable(),o=yh(i),l=o.get(t);l!==void 0&&k2(l);const a=n.getWritable(),c=Kn(a);if(c!==null){const u=b2(a);u!==null&&yh(c.getWritable()).delete(u),a.__slotHost=null}return ur(a),a.__slotHost=i.__key,o.set(t,a.__key),nA(i),(function(){const u=xr();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}s(Kp,"ha");function w2(e,t){const n=e.getWritable();if(n.__slots===null)return n;const r=n.__slots.get(t);return r!==void 0&&(k2(r),yh(n).delete(t)),n}s(w2,"ga");function k2(e){const t=nt(e);if(t===null)return;const n=t.getWritable();Fi(n)||B(377,e),n.__slotHost=null,n.remove()}s(k2,"pa");var rA={next:"previous",previous:"next"},hd=class{static{s(this,"ma")}origin;constructor(e){this.origin=e}[Symbol.iterator](){return zp({hasNext:Bi,initial:this.getAdjacentCaret(),map:s(e=>e,"map"),step:s(e=>e.getAdjacentCaret(),"step")})}getAdjacentCaret(){return _t(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return _t(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){const r=n===this.direction?t:Array.from(t).reverse();let i=this;const o=this.getParentAtCaret(),l=new Map;for(let a=i.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of r){if(l.size>0){const c=i.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||i.origin.is(a))){const u=a.getParent();u&&u.is(o)&&a.remove(),c.replace(a)}}else c===null&&B(263,Array.from(l).join(" "))}else i.insert(a);i=_t(a,this.direction)}for(const a of l.values())a.remove();return this}},xh=class M2 extends hd{static{s(this,"xa")}type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:oi(t,this.direction)}getParentCaret(t="root"){return _t(Up(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Gi(this.direction);return _t(this.getNodeAtCaret(),t)||oi(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof M2&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}},iA={root:Mt,shadowRoot:kt};function Gi(e){return rA[e]}s(Gi,"Sa");function Up(e,t="root"){return e===null||iA[t](e)?null:Zt(e)===null?e:null}s(Up,"va");var su=class Ch extends hd{static{s(this,"Ta")}type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:_t(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return F(this.origin)?oi(this.origin,this.direction):null}getParentCaret(t="root"){return _t(Up(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Gi(this.direction);return _t(this.getNodeAtCaret(),t)||oi(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Ch&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Ch||t instanceof lu)&&this.direction===t.direction&&this.origin.is(t.origin)}},lu=class bh extends hd{static{s(this,"ka")}type="text";offset;constructor(t,n){super(t),this.offset=n}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Hi(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return _t(Up(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Hi(this.origin,Gi(this.direction),this.offset)}isSamePointCaret(t){return t instanceof bh&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof su||t instanceof bh)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return _t(this.origin,this.direction)}};function fr(e){return e instanceof lu}s(fr,"ba");function oA(e){return e instanceof hd}s(oA,"Na");function Bi(e){return e instanceof su}s(Bi,"wa");function Gn(e){return e instanceof xh}s(Gn,"Ea");var sA={next:class extends lu{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends lu{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},lA={next:class extends su{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends su{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},aA={next:class extends xh{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends xh{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function _t(e,t){return e?new lA[t](e):null}s(_t,"Da");function Hi(e,t,n){return e?new sA[t](e,hr(e,n)):null}s(Hi,"Pa");function hr(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&sC(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}s(hr,"Fa");function Eh(e,t){return new N2(e,t)}s(Eh,"Ia");function oi(e,t){return F(e)?new aA[t](e):null}s(oi,"La");function A2(e){return e&&e.getChildCaret()||e}s(A2,"Ka");function ms(e){return e&&A2(e.getAdjacentCaret())}s(ms,"za");var cA=class I2{static{s(this,"Ba")}type="node-caret-range";direction;anchor;focus;constructor(t,n,r){this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new I2(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=s(i=>{const o=this[i].getLatest();return fr(o)?(function(l,a){const{direction:c,origin:u}=l;return Eh(l,hr(u,a==="focus"?Gi(c):c)-l.offset)})(o,i):null},"t"),n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[Eh(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=fr(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=fr(r),o=s(l=>l.isSameNodeCaret(r)?null:ms(l)||l.getParentCaret(t),"r");return zp({hasNext:s(l=>l!==null&&!(i&&r.isSameNodeCaret(l)),"hasNext"),initial:n.isSameNodeCaret(r)?null:o(n),map:s(l=>l,"map"),step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}},N2=class{static{s(this,"Ra")}type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return Hi(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function uA(e){return e instanceof N2}s(uA,"Wa");function Wp(e){return Ki(e,_t(Dn(),e.direction))}s(Wp,"Ua");function O2(e){return Ki(e,e)}s(O2,"$a");function Ki(e,t){return e.direction!==t.direction&&B(265),new cA(e,t,e.direction)}s(Ki,"Ha");function zp(e){const{initial:t,hasNext:n,step:r,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const l={done:!1,value:i(o)};return o=r(o),l}}}s(zp,"Ja");function jp(e,t){const n=au(e.origin,t.origin);switch(n===null&&B(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?(function(o,l){return Math.sign(o-l)})(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return Jp(n)}}s(jp,"ja");function Jp(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let o=t,l=n;for(;o&&l;o=o.getNextSibling(),l=l.getNextSibling()){if(o.__key===i)return-1;if(l.__key===r)return 1}return o===null?1:-1}s(Jp,"Va");function Ja(e,t){return t.is(e)}s(Ja,"qa");function s_(e){return F(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}s(s_,"Ya");function au(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=s_(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=s_(t);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Ja(e,r)||B(276),{commonAncestor:r,type:"ancestor"}):i===null?(Ja(t,r)||B(277),{commonAncestor:r,type:"descendant"}):((F(o)||Ja(e,o))&&(F(i)||Ja(t,i))&&r.is(o.getParent())&&r.is(i.getParent())||B(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}s(au,"Ga");function ei(e,t){const{type:n,key:r,offset:i}=e,o=r2(e.key);return n==="text"?(X(o)||B(266,o.getType(),r),Hi(o,t,i)):(F(o)||B(267,o.getType(),r),$2(o,e.offset,t))}s(ei,"Xa");function _s(e,t){const{origin:n,direction:r}=t,i=r==="next";fr(t)?e.set(n.getKey(),t.offset,"text"):Bi(t)?X(n)?e.set(n.getKey(),hr(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Gn(t)&&F(n)||B(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}s(_s,"Qa");function D2(e){const t=Ve(),n=ve(t)?t:S5();return vl(n,e),dn(n),n}s(D2,"Za");function vl(e,t){_s(e.anchor,t.anchor),_s(e.focus,t.focus)}s(vl,"tu");function Sh(e){const{anchor:t,focus:n}=e,r=ei(t,"next"),i=ei(n,"next"),o=jp(r,i)<=0?"next":"previous";return Ki(Nr(r,o),Nr(i,o))}s(Sh,"eu");function Do(e){const{direction:t,origin:n}=e,r=_t(n,Gi(t)).getNodeAtCaret();return r?_t(r,t):oi(n.getParentOrThrow(),t)}s(Do,"nu");function l_(e,t="root"){const n=[e];for(let r=Gn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Do(r));return n}s(l_,"ou");function lf(e){return!!e&&e.origin.isAttached()}s(lf,"ru");function R2(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const o=Gp(e,r),l=l_(o.anchor,n),a=l_(o.focus.getFlipped(),n),c=new Set,u=[];for(const p of o.iterNodeCarets(n))if(Gn(p))c.add(p.origin.getKey());else if(Bi(p)){const{origin:_}=p;F(_)&&!c.has(_.getKey())||u.push(_)}for(const p of u)p.remove();for(const p of o.getTextSlices()){if(!p)continue;const{origin:_}=p.caret,y=_.getTextContentSize(),v=Do(_t(_,r)),x=_.getMode();if(Math.abs(p.distance)===y&&i==="removeEmptySlices"||x==="token"&&p.distance!==0)v.remove();else if(p.distance!==0){i="removeEmptySlices";let C=p.removeTextSlice();const b=p.caret.origin;if(x==="segmented"){const S=C.origin,M=Ft(S.getTextContent()).setStyle(S.getStyle()).setFormat(S.getFormat());v.replaceOrInsert(M),C=Hi(M,r,C.offset)}b.is(l[0].origin)&&(l[0]=C),b.is(a[0].origin)&&(a[0]=C.getFlipped())}}let d,f;for(const p of l)if(lf(p)){d=dr(p);break}for(const p of a)if(lf(p)){f=dr(p);break}const h=(function(p,_,y){if(!p||!_)return null;const v=p.getParentAtCaret(),x=_.getParentAtCaret();if(!v||!x)return null;const C=v.getParents().reverse();C.push(v);const b=x.getParents().reverse();b.push(x);const S=Math.min(C.length,b.length);let M;for(M=0;M<S&&C[M]===b[M];M++);const T=s((D,L)=>{let G;for(let $=M;$<D.length;$++){const z=D[$];if(kt(z))return;!G&&L(z)&&(G=z)}return G},"a"),E=T(C,hn),A=E&&T(b,D=>y.has(D.getKey())&&hn(D));return A&&Jn(A).length>0?null:E&&A?[E,A]:null})(d,f,c);if(h){const[p,_]=h;oi(p,"previous").splice(0,_.getChildren());let y=_.getParent();for(_.remove(!0);y&&y.isEmpty();){const v=y;y=y.getParent(),v.remove(!0)}}else if(f){const p=(function(v){if(Gn(v)){const x=v.origin;if(hn(x))return x}else{const x=v.getParentAtCaret();if(x&&hn(x))return x}return null})(f),_=p&&p.getParent(),y=p&&p.getParents().findLast(Lp);if(p&&_&&!Mt(_)&&p.isEmpty()&&c.has(p.getKey())&&Jn(p).length===0&&(!y||c.has(y.getKey()))){p.remove(!0);let v=_;for(;v&&!Mt(v)&&v.isEmpty();){const x=v.getParent();if(x&&Mt(x)&&x.getChildrenSize()<=1)break;const C=v;v=x,C.remove(!0)}}}const g=[d,f,...l,...a].find(lf);if(g)return O2(Nr(dr(g),e.direction));B(269,JSON.stringify(l.map(p=>p.origin.__key)))}s(R2,"iu");function dr(e){const t=(function(i){let o=i;for(;Gn(o);){const l=ms(o);if(!Gn(l))break;o=l}return o})(e.getLatest()),{direction:n}=t;if(X(t.origin))return fr(t)?t:Hi(t.origin,n,n);const r=t.getAdjacentCaret();return Bi(r)&&X(r.origin)?Hi(r.origin,n,Gi(n)):t}s(dr,"su");function L2(e){return fr(e)&&e.offset!==hr(e.origin,e.direction)}s(L2,"lu");function Nr(e,t){return e.direction===t?e:e.getFlipped()}s(Nr,"cu");function Gp(e,t){return e.direction===t?e:Ki(Nr(e.focus,t),Nr(e.anchor,t))}s(Gp,"au");function $2(e,t,n){let r=oi(e,"next");for(let i=0;i<t;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return Nr(r,n)}s($2,"uu");function dA(e,t="root"){let n=0,r=e,i=ms(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=ms(r)}return i&&[i,n]}s(dA,"fu");function fA(e){const{origin:t,offset:n,direction:r}=e;if(n===hr(t,r))return e.getSiblingCaret();if(n===hr(t,Gi(r)))return Do(e.getSiblingCaret());const[i]=t.splitText(n);return X(i)||B(281),Nr(_t(i,"next"),r)}s(fA,"du");function hA(e,t){return!0}s(hA,"hu");function P2(e,{$copyElementNode:t=$p,$splitTextPointCaretNext:n=fA,rootMode:r="shadowRoot",$shouldSplit:i=hA,removeEmptyDestination:o=!1}={}){if(fr(e))return n(e);const l=e.getParentCaret(r);if(l){const{origin:a}=l;if(Gn(e)){const u=Do(l);if(o&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!i(a,"first"))return u}const c=(function(u){const d=[];for(let f=u.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(c.length>0||!o&&a.canBeEmpty()&&i(a,"last"))&&l.insert(t(a).splice(0,0,c))}return l}s(P2,"gu");function F2(e,t,n){let r=Nr(t,"next");fr(r)&&(r.offset===0?r=_t(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=_t(r.origin,"next"))),r.origin.is(e)&&(Bi(r)||B(342,e.getKey(),e.getType()),r=Do(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=r;i;i=P2(i,n))r=i;return fr(r)&&B(283),r.insert(e.isInline()?mn().append(e):e),Nr(_t(e.getLatest(),"next"),t.direction)}s(F2,"_u");function gA(e){return e}s(gA,"pu");function pA(...e){return e}s(pA,"yu");function mA(e,t){return[e,t]}s(mA,"mu");function _A(e){return e}s(_A,"xu");function vA(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}s(vA,"Cu");function Ta(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}s(Ta,"Su");function yA(e,...t){const n=Ta(...t);n.length>0&&e.classList.add(...n)}s(yA,"vu");function xA(e,...t){const n=Ta(...t);n.length>0&&e.classList.remove(...n)}s(xA,"Tu");function qp(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}s(qp,"ku");function CA(e,t,n){return qp(...Object.entries(t).map(([r,i])=>mp(e,r,i,n)))}s(CA,"bu");var w=rM,Th=w.$addUpdateTag,ci=w.$applyNodeReplacement,bA=w.$assumeActiveEditor,Ui=w.$caretFromPoint,V2=w.$caretRangeFromSelection,AU=w.$cloneWithProperties,EA=w.$cloneWithPropertiesEphemeral,wh=w.$comparePointCaretNext,tn=w.$copyNode,B2=w.$create,IU=w.$createChildrenArray,Or=w.$createLineBreakNode,cu=w.$createNodeSelection,Xe=w.$createParagraphNode,NU=w.$createPoint,gd=w.$createRangeSelection,OU=w.$createRangeSelectionFromDom,Zp=w.$createTabNode,pr=w.$createTextNode,H2=w.$extendCaretToRange,dt=w.$findMatchingParent,SA=w.$formatText,DU=w.$fullReconcile,kh=w.$generateNodesFromRawText,TA=w.$getAdjacentChildCaret,RU=w.$getAdjacentNode,LU=w.$getAdjacentSiblingOrParentSiblingCaret,$U=w.$getCaretInDirection,yl=w.$getCaretRange,K2=w.$getCaretRangeInDirection,wA=w.$getCharacterOffsets,Wi=w.$getChildCaret,a_=w.$getChildCaretAtIndex,PU=w.$getChildCaretOrSelf,pd=w.$getCollapsedCaretRange,FU=w.$getCommonAncestor,VU=w.$getCommonAncestorResultBranchOrder,BU=w.$getDOMSlot,HU=w.$getDOMTextNode,bn=w.$getDocument,Wt=w.$getEditor,U2=w.$getEditorDOMRenderConfig,si=w.$getNearestNodeFromDOMNode,KU=w.$getNearestRootOrShadowRoot,yn=w.$getNodeByKey,UU=w.$getNodeByKeyOrThrow,WU=w.$getNodeFromDOMNode,W2=w.$getPreviousSelection,Lt=w.$getRoot,re=w.$getSelection,qn=w.$getSiblingCaret,kA=w.$getSlot,Yp=w.$getSlotFrame,zU=w.$getSlotHost,jU=w.$getSlotNameWithinHost,MA=w.$getSlotNames,Xp=w.$getState,JU=w.$getStateChange,GU=w.$getTextContent,qU=w.$getTextNodeOffset,AA=w.$getTextPointCaret,ZU=w.$getTextPointCaretSlice,YU=w.$getWritableNodeState,z2=w.$hasAncestor,XU=w.$hasUpdateTag,Qp=w.$insertNodeToNearestRootAtCaret,Rs=w.$insertNodes,vs=w.$isBlockElementNode,em=w.$isChildCaret,Un=w.$isDecoratorNode,IA=w.$isEditorState,QU=w.$isElementDOMSlot,xe=w.$isElementNode,j2=w.$isExtendableTextPointCaret,eW=w.$isInlineElementOrDecoratorNode,tW=w.$isInlineFormattable,J2=w.$isLeafNode,nW=w.$isLexicalNode,Dr=w.$isLineBreakNode,rW=w.$isNodeCaret,He=w.$isNodeSelection,wa=w.$isParagraphNode,ie=w.$isRangeSelection,ka=w.$isRootNode,xn=w.$isRootOrShadowRoot,NA=w.$isSelectionCapturedInDecoratorInput,Sc=w.$isShadowRootNode,uu=w.$isSiblingCaret,iW=w.$isSlotChild,oW=w.$isSlotHost,du=w.$isTabNode,Ae=w.$isTextNode,tm=w.$isTextPointCaret,sW=w.$isTextPointCaretSlice,OA=w.$isTokenOrSegmented,lW=w.$isTokenOrTab,aW=w.$markSlotEditable,DA=w.$needsBlockCursorBeside,cW=w.$nodesOfType,zi=w.$normalizeCaret,jl=w.$normalizeSelection__EXPERIMENTAL,uW=w.$onUpdate,RA=w.$parseSerializedNode,dW=w.$removeFromParent,fW=w.$removeSlot,hW=w.$removeTextFromCaretRange,xl=w.$rewindSiblingCaret,LA=w.$selectAll,gW=w.$setCompositionKey,Cr=w.$setDirectionFromDOM,ui=w.$setFormatFromDOM,Mh=w.$setPointFromCaret,Xn=w.$setSelection,ys=w.$setSelectionFromCaretRange,pW=w.$setSlot,us=w.$setState,$A=w.$setTextFormat,PA=w.$splitAtPointCaretNext,mW=w.$splitNode,FA=w.$updateDOMSelection,_W=w.$updateRangeSelectionFromCaretRange,G2=w.ArtificialNode__DO_NOT_USE,vW=w.BEFORE_INPUT_COMMAND,q2=w.BLUR_COMMAND,Qo=w.CAN_REDO_COMMAND,es=w.CAN_UNDO_COMMAND,c_=w.CAN_USE_BEFORE_INPUT,md=w.CAN_USE_DOM,VA=w.CLEAR_EDITOR_COMMAND,BA=w.CLEAR_HISTORY_COMMAND,nm=w.CLICK_COMMAND,HA=w.COLLABORATION_TAG,KA=w.COMMAND_PRIORITY_BEFORE_CRITICAL,UA=w.COMMAND_PRIORITY_BEFORE_EDITOR,yW=w.COMMAND_PRIORITY_BEFORE_HIGH,xW=w.COMMAND_PRIORITY_BEFORE_LOW,CW=w.COMMAND_PRIORITY_BEFORE_NORMAL,Rr=w.COMMAND_PRIORITY_CRITICAL,Me=w.COMMAND_PRIORITY_EDITOR,Jl=w.COMMAND_PRIORITY_HIGH,st=w.COMMAND_PRIORITY_LOW,bW=w.COMMAND_PRIORITY_NORMAL,EW=w.COMPOSITION_END_COMMAND,Z2=w.COMPOSITION_END_TAG,SW=w.COMPOSITION_START_COMMAND,WA=w.COMPOSITION_START_TAG,zA=w.CONTROLLED_TEXT_INSERTION_COMMAND,Y2=w.COPY_COMMAND,jA=w.CUT_COMMAND,X2=w.CUT_TAG,TW=w.DEFAULT_EDITOR_DOM_CONFIG,af=w.DELETE_CHARACTER_COMMAND,JA=w.DELETE_LINE_COMMAND,GA=w.DELETE_WORD_COMMAND,wW=w.DRAGEND_COMMAND,Q2=w.DRAGOVER_COMMAND,rm=w.DRAGSTART_COMMAND,eb=w.DROP_COMMAND,Ma=w.DecoratorNode,Lr=w.ElementNode,im=w.FOCUS_COMMAND,qA=w.FORMAT_ELEMENT_COMMAND,tb=w.FORMAT_TEXT_COMMAND,ho=w.HISTORIC_TAG,nb=w.HISTORY_MERGE_TAG,rb=w.HISTORY_PUSH_TAG,fu=w.INDENT_CONTENT_COMMAND,kW=w.INPUT_COMMAND,u_=w.INSERT_LINE_BREAK_COMMAND,Ah=w.INSERT_PARAGRAPH_COMMAND,ib=w.INSERT_TAB_COMMAND,Ga=w.INTERNAL_$isBlock,MW=w.IS_ALL_FORMATTING,AW=w.IS_ANDROID,IW=w.IS_ANDROID_CHROME,NW=w.IS_APPLE,ZA=w.IS_APPLE_WEBKIT,d_=w.IS_BOLD,OW=w.IS_CHROME,YA=w.IS_CODE,XA=w.IS_FIREFOX,QA=w.IS_HIGHLIGHT,f_=w.IS_IOS,h_=w.IS_ITALIC,e7=w.IS_SAFARI,g_=w.IS_STRIKETHROUGH,cf=w.IS_SUBSCRIPT,uf=w.IS_SUPERSCRIPT,p_=w.IS_UNDERLINE,ob=w.KEY_ARROW_DOWN_COMMAND,sb=w.KEY_ARROW_LEFT_COMMAND,t7=w.KEY_ARROW_RIGHT_COMMAND,lb=w.KEY_ARROW_UP_COMMAND,_d=w.KEY_BACKSPACE_COMMAND,om=w.KEY_DELETE_COMMAND,ab=w.KEY_DOWN_COMMAND,vd=w.KEY_ENTER_COMMAND,yd=w.KEY_ESCAPE_COMMAND,DW=w.KEY_MODIFIER_COMMAND,cb=w.KEY_SPACE_COMMAND,sm=w.KEY_TAB_COMMAND,ub=w.LineBreakNode,n7=w.MOVE_TO_END,r7=w.MOVE_TO_START,RW=w.NODE_STATE_DIRECT,LW=w.NODE_STATE_KEY,$W=w.NODE_STATE_LATEST,Ih=w.OUTDENT_CONTENT_COMMAND,Gl=w.PASTE_COMMAND,db=w.PASTE_TAG,lm=w.ParagraphNode,i7=w.REDO_COMMAND,o7=w.REMOVE_TEXT_COMMAND,fb=w.RootNode,am=w.SELECTION_CHANGE_COMMAND,s7=w.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,l7=w.SELECT_ALL_COMMAND,a7=w.SET_TEXT_FORMAT_COMMAND,PW=w.SKIP_COLLAB_TAG,c7=w.SKIP_DOM_SELECTION_TAG,u7=w.SKIP_SCROLL_INTO_VIEW_TAG,hb=w.SKIP_SELECTION_FOCUS_TAG,d7=w.TEXT_TYPE_TO_FORMAT,gb=w.TabNode,Ls=w.TextNode,f7=w.UNDO_COMMAND,mr=w.addClassNamesToElement,pb=w.buildImportMap,ts=w.configExtension,br=w.createCommand,mb=w.createEditor,FW=w.createRefCountedRegistry,VW=w.createSharedNodeState,Aa=w.createState,h7=w.declarePeerDependency,Fr=w.defineExtension,g7=w.findAllLexicalElementsDeep,p7=w.flipDirection,_b=w.getActiveElement,m7=w.getActiveElementDeep,_7=w.getComposedEventTarget,BW=w.getComposedStaticRange,HW=w.getDOMOwnerDocument,Ia=w.getDOMSelection,KW=w.getDOMSelectionFromTarget,v7=w.getDOMSelectionPoints,UW=w.getDOMSelectionRange,WW=w.getDOMSelectionRangeAndPoints,y7=w.getDOMShadowRoots,zW=w.getDOMTextNode,jW=w.getDeclaredSlots,vb=w.getEditorPropertyFromDOMNode,x7=w.getNearestEditorFromDOMNode,yb=w.getParentElement,JW=w.getRegisteredNode,GW=w.getRegisteredNodeOrThrow,qW=w.getRegisteredSubtypeMap,C7=w.getRootOwnerDocument,ZW=w.getStaticNodeConfig,m_=w.getStyleObjectFromCSS,YW=w.getTextDirection,XW=w.getTransformSetFromKlass,hu=w.isBlockDomNode,QW=w.isCurrentlyReadOnlyMode,ez=w.isDOMCapturingSelection,xb=w.isDOMDocumentNode,b7=w.isDOMNode,E7=w.isDOMShadowRoot,xd=w.isDOMTextNode,tz=w.isDOMUnmanaged,__=w.isDocumentFragment,nz=w.isExactShortcutMatch,Cb=w.isHTMLAnchorElement,Ke=w.isHTMLElement,rz=w.isHTMLTableCellElement,iz=w.isHTMLTableRowElement,Nh=w.isInlineDomNode,S7=w.isLastChildInBlockNode,bb=w.isLexicalEditor,oz=w.isModifierMatch,T7=w.isOnlyChildInBlockNode,sz=w.isSelectionCapturedInDecoratorInput,w7=w.isSelectionWithinEditor,lz=w.iterStaticNodeConfigChain,az=w.makeStepwiseIterator,At=w.mergeRegister,cz=w.mountSlotContainer,Cl=w.normalizeClassNames,k7=w.registerEventListener,Oh=w.registerEventListeners,Cd=w.removeClassNamesFromElement,uz=w.removeFromParent,dz=w.resetRandomKey,Ro=w.safeCast,Tc=w.setDOMStyleFromCSS,fz=w.setDOMStyleObject,hz=w.setDOMUnmanaged,$s=w.setNodeIndentFromDOM,bd=w.shallowMergeConfig,gz=w.stopLexicalPropagation,pz=w.toggleTextFormatType,M7=w.tokenizeRawText,mz=w.unmountSlotContainer;function A7(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(A7,"B$1");function Eb(e){const t=Wt().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}s(Eb,"R");function Sb(e){return Eb(ka(e)?e:e.getParentOrThrow())}s(Sb,"O$1");function qa(e){const t=Sb(e);return t!==null&&t.direction==="rtl"}s(qa,"_");function Tb(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!OA(t)&&r!==null){const[i,o]=r,l=e.isBackward(),a=i.getNode(),c=o.getNode(),u=t.is(a),d=t.is(c);if(u||d){const[f,h]=wA(e),g=a.is(c),p=t.is(l?c:a),_=t.is(l?a:c);let y,v=0;g?(v=f>h?h:f,y=f>h?f:h):p?(v=l?h:f,y=void 0):_&&(v=0,y=l?f:h);const x=t.__text.slice(v,y);x!==t.__text&&(n==="clone"&&(t=EA(t)),t.__text=x)}}return t}s(Tb,"L$1");function v_(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return xe(t)||A7(177),e.offset===t.getChildrenSize()}s(v_,"M$1");function I7(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}s(I7,"W");function N7(e,t,n){let r=Ui(e,n);if(j2(r))return!1;for(;r;r=r.getParentCaret()){const i=r.getParentAtCaret();if(!i||r.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}s(N7,"X$2");function O7(e,t,n=I7){if(!e)return;const r=e.getStartEndPoints();let i=!1,o=null;const l=new Map;if(r){const[a,c]=r,u=dt(a.getNode(),Ga);o=dt(c.getNode(),Ga);const d=e.isBackward()?"previous":"next";i=xe(o)&&!o.is(u)&&(function(f,h,g){const p=f.getNode();return(!xe(p)||!p.isEmpty())&&N7(f,h,g)})(c,o,p7(d)),xe(u)&&l.set(u.getKey(),u),xe(o)&&!i&&l.set(o.getKey(),o)}for(const a of e.getNodes())if(xe(a)&&Ga(a)){if(i&&a.is(o))continue;l.set(a.getKey(),a)}else if(!r){const c=dt(a,Ga);xe(c)&&l.set(c.getKey(),c)}for(const a of l.values()){const c=t();n(a,c),a.replace(c,!0)}}s(O7,"q$1");function wb(e){const t=kb(e);return t!==null&&t.writingMode==="vertical-rl"}s(wb,"Z$2");function kb(e){const t=e.anchor.getNode();return xe(t)?Eb(t):Sb(t)}s(kb,"ee$2");function y_(e,t){let n=wb(e)?!t:t;Mb(e)&&(n=!n);const r=Ui(e.focus,n?"previous":"next");if(j2(r))return!1;if(tm(r)&&!du(r.origin)&&r.origin.isUnmergeable()){const i=r.getNodeAtCaret();if(Ae(i)&&!du(i))return!0}for(const i of H2(r)){if(em(i))return!i.origin.isInline();if(!xe(i.origin)){if(Un(i.origin))return!0;break}}return!1}s(y_,"te$2");function D7(e,t,n,r){e.modify(t?"extend":"move",n,r)}s(D7,"ne$1");function Mb(e){const t=kb(e);return t!==null&&t.direction==="rtl"}s(Mb,"oe$1");function x_(e,t,n){const r=Mb(e);let i;i=wb(e)||r?!n:n,D7(e,t,i,"character")}s(x_,"le$2");function R7(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(R7,"Z$1");function Ab(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}s(Ab,"_t$4");function Ib(e){const t=dt(e,n=>xe(n)&&!n.isInline());return xe(t)||R7(4,e.__key),t}s(Ib,"It$3");function Nb(e){const t=re()||W2();let n;if(ie(t))n=Ui(t.focus,"next");else{if(t!=null){const l=t.getNodes(),a=l[l.length-1];a&&(n=qn(a,"next"))}n=n||Wi(Lt(),"previous").getFlipped().insert(Xe())}const r=Qp(e,n),i=TA(r),o=em(i)?zi(i):r;return ys(pd(o)),e.getLatest()}s(Nb,"Bt$3");function cm(e,t){const n=t();return e.replace(n),n.append(e),n}s(cm,"Tt$6");function Zr(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}s(Zr,"Mt$4");function Za(e){let t=null;if(Zr(e,DragEvent)?t=e.dataTransfer:Zr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}s(Za,"Ft$4");function Dh(e){const t=re();if(!ie(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],l=o.getKey();if(n.has(l))continue;const a=dt(o,u=>xe(u)&&!u.isInline());if(a===null)continue;const c=a.getKey();a.canIndent()&&!n.has(c)&&(n.add(c),e(a))}return n.size>0}s(Dh,"$t$6");var df=!(XA||!md)&&void 0;function L7(e,t=!1){let n=1;if((function(){if(df===void 0){const r=document.createElement("div");r.style.position="absolute",r.style.opacity="0",r.style.width="100px",r.style.left="-1000px",document.body.appendChild(r);const i=r.getBoundingClientRect();r.style.setProperty("zoom","2"),df=r.getBoundingClientRect().width===i.width,document.body.removeChild(r)}return df})()||t){const r=e&&e.ownerDocument.defaultView||window;for(;e;)n*=Number(r.getComputedStyle(e).getPropertyValue("zoom")),e=yb(e)}return n}s(L7,"Ut$4");var $7=Symbol.for("preact-signals");function Ed(){if(ti>1)return void ti--;let e,t=!1;for((function(){let n=gu;for(gu=void 0;n!==void 0;)n.S.v===n.v&&(n.S.i=n.i),n=n.o})();bl!==void 0;){let n=bl;for(bl=void 0,pu++;n!==void 0;){const r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Db(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(pu=0,ti--,t)throw e}s(Ed,"$t$5");function Ob(e){if(ti>0)return e();Rh=++P7,ti++;try{return e()}finally{Ed()}}s(Ob,"Tt$5");var Ze,bl;function C_(e){const t=Ze;Ze=void 0;try{return e()}finally{Ze=t}}s(C_,"Ut$3");var gu,ti=0,pu=0,P7=0,Rh=0,wc=0;function b_(e){if(Ze===void 0)return;let t=e.n;return t===void 0||t.t!==Ze?(t={i:0,S:e,p:Ze.s,n:void 0,t:Ze,e:void 0,x:void 0,r:t},Ze.s!==void 0&&(Ze.s.n=t),Ze.s=t,e.n=t,32&Ze.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ze.s,t.n=void 0,Ze.s.n=t,Ze.s=t),t):void 0}s(b_,"Ht$2");function sn(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}s(sn,"Xt$1");function ql(e,t){return new sn(e,t)}s(ql,"Yt$1");function Db(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}s(Db,"qt$2");function E_(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}s(E_,"Qt");function Rb(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}s(Rb,"te$1");function Vo(e,t){sn.call(this,void 0),this.x=e,this.s=void 0,this.g=wc-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}s(Vo,"ee$1");function Lb(e){const t=e.m;if(e.m=void 0,typeof t=="function"){ti++;const n=Ze;Ze=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,um(e),r}finally{Ze=n,Ed()}}}s(Lb,"ie$2");function um(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Lb(e)}s(um,"oe");function F7(e){if(Ze!==this)throw new Error("Out-of-order effect");Rb(this),Ze=e,this.f&=-2,8&this.f&&um(this),Ed()}s(F7,"se$2");function Jo(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}s(Jo,"re$2");function Lo(e,t){const n=new Jo(e,t);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}s(Lo,"ce$1");function Na(e,t={}){const n={};for(const r in e){const i=t[r];n[r]=ql(i===void 0?e[r]:i)}return n}s(Na,"ae$1");sn.prototype.brand=$7,sn.prototype.h=function(){return!0},sn.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:C_(()=>{var n;(n=this.W)==null||n.call(this)}))},sn.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&C_(()=>{var r;(r=this.Z)==null||r.call(this)}))}},sn.prototype.subscribe=function(e){return Lo(()=>{const t=this.value,n=Ze;Ze=void 0;try{e(t)}finally{Ze=n}},{name:"sub"})},sn.prototype.valueOf=function(){return this.value},sn.prototype.toString=function(){return this.value+""},sn.prototype.toJSON=function(){return this.value},sn.prototype.peek=function(){const e=Ze;Ze=void 0;try{return this.value}finally{Ze=e}},Object.defineProperty(sn.prototype,"value",{get(){const e=b_(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(pu>100)throw new Error("Cycle detected");(function(t){ti!==0&&pu===0&&t.l!==Rh&&(t.l=Rh,gu={S:t,v:t.v,i:t.i,o:gu})})(this),this.v=e,this.i++,wc++,ti++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ed()}}}}),Vo.prototype=new sn,Vo.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===wc))return!0;if(this.g=wc,this.f|=1,this.i>0&&!Db(this))return this.f&=-2,!0;const e=Ze;try{E_(this),Ze=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Ze=e,Rb(this),this.f&=-2,!0},Vo.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}sn.prototype.S.call(this,e)},Vo.prototype.U=function(e){if(this.t!==void 0&&(sn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Vo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Vo.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=b_(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Jo.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},Jo.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Lb(this),E_(this),ti++;const e=Ze;return Ze=this,F7.bind(this,e)},Jo.prototype.N=function(){2&this.f||(this.f|=2,this.u=bl,bl=this)},Jo.prototype.d=function(){this.f|=8,1&this.f||um(this)},Jo.prototype.dispose=function(){this.d()};function V7(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}s(V7,"ve$1");function B7(e,t){let n;return ql(e(),{unwatched(){n&&(n(),n=void 0)},watched(){this.value=e(),n=t(this)}})}s(B7,"Ce$1");function et(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(et,"Ie$2");var $b;try{$b="0.48.0+prod.esm"}catch{}var H7=$b??'"<unknown>+source"',K7=new Set(["__proto__","constructor","prototype"]);function Pb(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const i in r)!K7.has(i)&&Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=Pb(n[i],r[i]));return e}return t}s(Pb,"ke$2");var dm=0,Lh=1,Fb=2,ff=3,Ya=4,Bo=5,hf=6,Zs=7;function gf(e){return e.id===dm}s(gf,"Ue$2");function Vb(e){return e.id===Fb}s(Vb,"We$2");function U7(e){return(function(t){return t.id===Lh})(e)||et(305,String(e.id),String(Lh)),Object.assign(e,{id:Fb})}s(U7,"Be$2");var W7=new Set,z7=class{static{s(this,"Ge$1")}builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:dm}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):bd;for(const n of this.configs)e=t(e,n);return e}init(e){const t=this.state;Vb(t)||et(306,String(t.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(l,a,c){return Object.assign(l,{config:a,id:ff,registerState:c})})(t,this.mergeConfigs(),n);let o;this.state=i,this.extension.init&&(o=this.extension.init(e,i.config,n)),this.state=(function(l,a,c){return Object.assign(l,{id:Ya,initResult:a,registerState:c})})(i,o,r)}build(e){const t=this.state;let n;t.id!==Ya&&et(307,String(t.id),String(Bo)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));const r={...t.registerState,getOutput:s(()=>n,"getOutput"),getSignal:this.getSignal.bind(this)};this.state=(function(i,o,l){return Object.assign(i,{id:Bo,output:o,registerState:l})})(t,n,r)}register(e,t){this._signal=t;const n=this.state;n.id!==Bo&&et(308,String(n.id),String(Bo));const r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=(function(i){return Object.assign(i,{id:hf})})(n),()=>{const i=this.state;i.id!==Zs&&et(309,String(n.id),String(Zs)),this.state=(function(o){return Object.assign(o,{id:Bo})})(i),r&&r()}}afterRegistration(e){const t=this.state;let n;return t.id!==hf&&et(310,String(t.id),String(hf)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(r){return Object.assign(r,{id:Zs})})(t),n}getSignal(){return this._signal===void 0&&et(311),this._signal}getInitResult(){this.extension.init===void 0&&et(312,this.extension.name);const e=this.state;return(function(t){return t.id>=Ya})(e)||et(313,String(e.id),String(Ya)),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(t){return t.id>=ff})(e)||et(314,String(e.id),String(ff)),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&et(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&et(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=Zs})(e)||et(316,String(e.id),String(Zs)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||W7}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(t){return t.id>=Bo})(e)||et(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},S_={tag:nb};function j7(){const e=Lt();e.isEmpty()&&e.append(Xe())}s(j7,"Je$2");var Bb=Fr({config:Ro({setOptions:S_,updateOptions:S_}),init:s(({$initialEditorState:e=j7})=>({$initialEditorState:e,initialized:!1}),"init"),afterRegistration(e,{updateOptions:t,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(IA(o))e.setEditorState(o,n);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const l=e.parseEditorState(o);e.setEditorState(l,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[fb,Ls,ub,gb,lm]}),T_=Symbol.for("@lexical/extension/LexicalBuilder");function J7(...e){return Oa.fromExtensions(e).buildEditor()}s(J7,"Ye$1");function w_(){}s(w_,"qe$2");function G7(e){throw e}s(G7,"Qe$1");function Xa(e){return Array.isArray(e)?e:[e]}s(Xa,"tn$1");var pf=H7,Oa=class kc{static{s(this,"nn$1")}roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=pf,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Xa(Bb)];for(const r of t)n.push(Xa(r));return new kc(n)}static maybeFromEditor(t){const n=t[T_];return n&&(n.PACKAGE_VERSION!==pf&&et(292,n.PACKAGE_VERSION,pf),n instanceof kc||et(293)),n}static fromEditor(t){const n=kc.maybeFromEditor(t);return n===void 0&&et(294),n}constructEditor(){const{$initialEditorState:t,onError:n,onWarn:r,...i}=this.buildCreateEditorArgs(),o=Object.assign(mb({...i,...n?{onError:s(l=>{n(l,o)},"onError")}:{},...r?{onWarn:s(l=>{r(l,o)},"onWarn")}:{}}),{[T_]:this});for(const l of this.sortedExtensionReps())l.build(o);return o}buildEditor(){let t=w_;function n(){try{t()}finally{t=w_}}s(n,"e");const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=At(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&et(295,t.name),n}addEdge(t,n,r){const i=this.outgoingConfigEdges.get(t);i?i.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const o=this.incomingEdges.get(n);o?o.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&et(296);const[n]=Xa(t);typeof n.name!="string"&&et(297,typeof n.name);let r=this.extensionNameMap.get(n.name);if(r!==void 0&&r.extension!==n&&et(298,n.name),!r){r=new z7(this,n),this.extensionNameMap.set(n.name,r);const i=this.conflicts.get(n.name);typeof i=="string"&&et(299,n.name,i);for(const o of n.conflictsWith||[])this.extensionNameMap.has(o)&&et(299,n.name,o),this.conflicts.set(o,n.name);for(const o of n.dependencies||[]){const l=Xa(o);this.addEdge(n.name,l[0].name,l.slice(1)),this.addExtension(l)}for(const[o,l]of n.peerDependencies||[])this.addEdge(n.name,o,l?[l]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=s((r,i)=>{let o=r.state;if(Vb(o))return;const l=r.extension.name;var a;gf(o)||et(300,l,i||"[unknown]"),gf(a=o)||et(304,String(a.id),String(dm)),o=Object.assign(a,{id:Lh}),r.state=o;const c=this.outgoingConfigEdges.get(l);if(c)for(const u of c.keys()){const d=this.extensionNameMap.get(u);d&&n(d,l)}o=U7(o),r.state=o,t.push(r)},"e");for(const r of this.extensionNameMap.values())gf(r.state)&&n(r);for(const r of t)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const l=this.extensionNameMap.get(i);if(l)for(const a of o)l.configs.add(a)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&et(301,r.name);for(const l of i)o.configs.add(l)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const l of n){const a=l.register(t,o);a&&i.push(a)}for(const l of n){const a=l.afterRegistration(t);a&&i.push(a)}return At(...i)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,i=new Map,o={},l={},a=this.sortedExtensionReps();for(const d of a){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of V7(f)){if(typeof h!="function"){const g=r.get(h.replace);g&&et(302,f.name,h.replace.name,g.extension.name),r.set(h.replace,d)}n.add(h)}if(f.html){if(f.html.export)for(const[h,g]of f.html.export.entries())i.set(h,g);f.html.import&&Object.assign(o,f.html.import)}f.theme&&Pb(l,f.theme)}Object.keys(l).length>0&&(t.theme=l),n.size&&(t.nodes=[...n]);const c=Object.keys(o).length>0,u=i.size>0;(c||u)&&(t.html={},c&&(t.html.import=o),u&&(t.html.export=i));for(const d of a)d.init(t);return t.onError||(t.onError=G7),t}};function q7(e,t){const n=Oa.fromEditor(e).getExtensionRep(t);return n===void 0&&et(303,t.name),n.getExtensionDependency()}s(q7,"on$1");function qi(e,t){const n=Oa.maybeFromEditor(e);if(!n)return;const r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}s(qi,"sn");function Z7(e){return qi(Wt(),e)}s(Z7,"dn");var Hb=br("INSERT_HORIZONTAL_RULE_COMMAND"),Da=class Kb extends Ma{static{s(this,"hn")}static getType(){return"horizontalrule"}static clone(t){return new Kb(t.__key)}static importJSON(t){return Sd().updateFromJSON(t)}static importDOM(){return{hr:s(()=>({conversion:Y7,priority:0}),"hr")}}exportDOM(){return{element:bn().createElement("hr")}}createDOM(t){const n=bn().createElement("hr");return mr(n,t.theme.hr),n}getTextContent(){return`
13
+ `}isInline(){return!1}updateDOM(){return!1}};function Y7(){return{node:Sd()}}s(Y7,"gn");function Sd(){return B2(Da)}s(Sd,"pn");function Ub(e){return e instanceof Da}s(Ub,"mn$1");var X7=Fr({build:s((e,t)=>Na({inheritEditableFromParent:t.inheritEditableFromParent}),"build"),config:Ro({$getParentEditor:s(function(){const e=Wt();return Oa.fromEditor(e),e},"$getParentEditor"),inheritEditableFromParent:!1}),init:s((e,t,n)=>{const r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},"init"),name:"@lexical/extension/NestedEditor",register:s((e,t,n)=>Lo(()=>{const r=e._parentEditor;if(r&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(r.isEditable()),r.registerEditableListener(e.setEditable.bind(e))}),"register")}),Q7=new Set([hb,u7]),_z=Fr({build:s((e,t,n)=>Na(t),"build"),config:Ro({$fixFocusOverselection:s(function(){const e=re();if(ie(e)&&!e.isCollapsed()){const t=K2(V2(e),"next");let n=t.focus;for(tm(n)&&t.anchor.origin!==n.origin&&n.offset===0&&(n=xl(n.getSiblingCaret())),uu(n)&&t.anchor.origin!==n.origin&&Dr(n.origin)&&(n=xl(n));em(n)&&t.anchor.origin!==n.origin;)n=xl(qn(n.origin,"next"));if(uu(n)&&xe(n.origin)&&(n=zi(Wi(n.origin,"previous")).getFlipped()),n=zi(n),!n.isSamePointCaret(t.focus)){const r=ys(yl(t.anchor,n)),i=Wt().getRootElement(),o=i&&Ia(i.ownerDocument.defaultView);o&&FA(W2(),r,Wt(),o,Q7,i)}}},"$fixFocusOverselection"),dateNow:Date.now,disabled:!1,thresholdMsec:100}),name:"@lexical/NormalizeTripleClickSelection",register:s((e,t,n)=>Lo(()=>{const r=n.getOutput();if(!r.disabled.value)return e.registerRootListener(i=>{if(!i)return;let o=0;const l=s(a=>{if(a?a.detail===3:o>0){const c=r.dateNow.peek()();o=a&&a.type==="mousedown"||c-o<=r.thresholdMsec.peek()?c:0}return o},"o");return At(e.registerCommand(am,()=>(l(null)&&(o=0,r.$fixFocusOverselection.peek()()),!1),KA),Oh(i,{mousedown:l,mouseup:l},!0))})}),"register")});function eI(e){return e.canIndent()}s(eI,"Fn");function tI(e,t,n=eI){return At(e.registerCommand(sm,r=>{const i=re();if(!ie(i))return!1;r.preventDefault();const o=(function(l){if(l.getNodes().filter(h=>vs(h)&&h.canIndent()).length>0)return!0;const a=l.anchor,c=l.focus,u=c.isBefore(a)?c:a,d=u.getNode(),f=Ib(d);if(f.canIndent()){const h=f.getKey();let g=gd();if(g.anchor.set(h,0,"element"),g.focus.set(h,0,"element"),g=jl(g),g.anchor.is(u))return!0}return!1})(i)?r.shiftKey?Ih:fu:ib;return e.dispatchCommand(o,void 0)},Me),e.registerCommand(fu,()=>{const r=typeof t=="number"?t:t?t.peek():null,i=re();if(!ie(i))return!1;const o=typeof n=="function"?n:n.peek();return Dh(l=>{if(o(l)){const a=l.getIndent()+1;(!r||a<r)&&l.setIndent(a)}})},Rr))}s(tI,"Mn$1");function nI(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;const o=t._selection,l=e._selection;if(i)return 1;if(!(ie(o)&&ie(l)&&l.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(v,x,C){const b=v._nodeMap,S=[];for(const M of x){const T=b.get(M);T!==void 0&&S.push(T)}for(const[M,T]of C){if(!T)continue;const E=b.get(M);E===void 0||ka(E)||S.push(E)}return S})(t,n,r);if(a.length===0)return 0;if(a.length>1){const v=t._nodeMap,x=v.get(o.anchor.key),C=v.get(l.anchor.key);return x&&C&&!e._nodeMap.has(x.__key)&&Ae(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const c=a[0],u=e._nodeMap.get(c.__key);if(!Ae(u)||!Ae(c)||u.__mode!==c.__mode)return 0;const d=u.__text,f=c.__text;if(d===f)return 0;const h=o.anchor,g=l.anchor;if(h.key!==g.key||h.type!=="text")return 0;const p=h.offset,_=g.offset,y=f.length-d.length;return y===1&&_===p-1?2:y===-1&&_===p+1?3:y===-1&&_===p?4:0}s(nI,"E$1");function rI(e,t,n){let r=n(),i=0,o=r,l=0,a=null;return(c,u,d,f,h,g)=>{const p=n();if(g.has(WA)&&(o=r,l=i,a=c),g.has(ho))return i=0,r=p,2;g.has(Z2)&&a&&(r=o,i=l,c=a);const _=g.has(db)||g.has(X2)?0:nI(c,u,f,h,e.isComposing()),y=(()=>{const v=d===null||d.editor===e,x=g.has(rb);if(!x&&v&&g.has(nb))return 0;if(_===1)return 2;if(c===null)return 1;const C=u._selection;if(!(f.size>0||h.size>0))return C!==null?0:2;const b=typeof t=="number"?t:t.peek();return x===!1&&_!==0&&_===i&&p<r+b&&v||f.size===1&&(function(S,M,T){const E=M._nodeMap.get(S),A=T._nodeMap.get(S),D=M._selection,L=T._selection;return!(ie(D)&&ie(L)&&D.anchor.type==="element"&&D.focus.type==="element"&&L.anchor.type==="text"&&L.focus.type==="text"||!Ae(E)||!Ae(A)||E.__parent!==A.__parent)&&JSON.stringify(M.read(()=>E.exportJSON()))===JSON.stringify(T.read(()=>A.exportJSON()))})(Array.from(f)[0],c,u)?0:1})();return r=p,i=_,y}}s(rI,"D");function k_(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}s(k_,"M");function iI(e,t,n,r=Date.now,i,o=null){const l=rI(e,n,r),a=s(()=>{i&&i(t)},"m");return a(),At(e.registerCommand(f7,()=>((function(c,u,d){const f=u.redoStack,h=u.undoStack;if(h.length!==0){const g=u.current,p=h.pop();g!==null&&(f.push(g),c.dispatchCommand(Qo,!0)),h.length===0&&c.dispatchCommand(es,!1),u.current=p||null,d&&d(u),p&&p.editor.setEditorState(p.editorState,{tag:ho})}})(e,t,i),!0),Me),e.registerCommand(i7,()=>((function(c,u,d){const f=u.redoStack,h=u.undoStack;if(f.length!==0){const g=u.current;g!==null&&(h.push(g),c.dispatchCommand(es,!0));const p=f.pop();f.length===0&&c.dispatchCommand(Qo,!1),u.current=p||null,d&&d(u),p&&p.editor.setEditorState(p.editorState,{tag:ho})}})(e,t,i),!0),Me),e.registerCommand(VA,()=>(k_(t,i),!1),Me),e.registerCommand(BA,()=>(k_(t,i),e.dispatchCommand(Qo,!1),e.dispatchCommand(es,!1),!0),Me),e.registerUpdateListener(({editorState:c,prevEditorState:u,dirtyLeaves:d,dirtyElements:f,tags:h})=>{const g=t.current,p=t.redoStack,_=t.undoStack,y=g===null?null:g.editorState;if(g!==null&&c===y)return;const v=l(u,c,g,d,f,h);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Qo,!1)),g!==null){_.push({...g});const x=typeof o=="number"||o===null?o:o.peek();x!==null&&_.length>x&&_.splice(0,_.length-x),e.dispatchCommand(es,!0)}}else if(v===2)return;t.current={editor:e,editorState:c},a()}))}s(iI,"O");function fm(){return{current:null,redoStack:[],undoStack:[]}}s(fm,"z");var ds=Fr({build:s((e,{delay:t,createInitialHistoryState:n,disabled:r,maxDepth:i,now:o},l)=>({...Na({delay:t,disabled:r,historyState:n(e),maxDepth:i,now:o}),...l.getInitResult()}),"build"),config:Ro({createInitialHistoryState:fm,delay:300,disabled:typeof window>"u",maxDepth:null,now:Date.now}),init:s(()=>({canRedo:ql(!1),canUndo:ql(!1)}),"init"),name:"@lexical/history/History",register:s((e,t,n)=>{const{canUndo:r,canRedo:i}=n.getInitResult(),o=n.getOutput(),l=s(a=>Ob(()=>{r.value=a!=null&&a.undoStack.length>0,i.value=a!=null&&a.redoStack.length>0}),"s");return Lo(()=>{if(!o.disabled.value)return iI(e,o.historyState.value,o.delay,()=>o.now.peek()(),l,o.maxDepth);l(null)})},"register")}),oI=Fr({build:s((e,{disabled:t,parentEditor:n})=>Na({disabled:t,parentEditor:n||e._parentEditor}),"build"),config:Ro({disabled:!1,parentEditor:null}),dependencies:[ts(ds,{disabled:!0})],name:"@lexical/history/SharedHistory",register:s((e,t,n)=>Lo(()=>{const{disabled:r,parentEditor:i}=n.getOutput();if(!r.value){const{output:o}=n.getDependency(ds),l=(function(c){return c?qi(c,ds.name):null})(i.value);if(!l)return;const a=l.output;Ob(()=>{o.delay.value=a.delay.value,o.historyState.value=a.historyState.value,o.now.value=a.now.value,o.disabled.value=a.disabled.value})}}),"register")});function Ps(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(Ps,"nt$3");var fs;function Wb(e,t){const{key:n}=t;return e&&n in e?e[n]:t.defaultValue}s(Wb,"rt$3");function zb(e){return fs&&fs.editor===e?fs:void 0}s(zb,"st$3");function sI(e,t){if("cfg"in t){const{cfg:n,updater:r}=t;return[n,r(Wb(e,n))]}return t}s(sI,"ct$2");function lI(e,t){let n=t;for(const r of e){const[i,o]=sI(n,r),l=i.key;if(n===t&&Wb(n,i)===o)continue;const a=n===t||n===void 0?aI(t):n;a[l]=o,n=a}return n}s(lI,"lt$3");function aI(e){return Object.create(e||null)}s(aI,"ut$2");function jb(e,t){return[e,t]}s(jb,"ft$2");function cI(e,t,n,r=Wt()){const i=fs,o=zb(r);try{return fs={...o,editor:r,[e]:t},n()}finally{fs=i}}s(cI,"dt$4");function Jb(e,t=()=>{}){return(n,r=Wt())=>i=>{const o=zb(r),l=o&&o[e],a=lI(n,l||t(r));return a&&a!==l?cI(e,a,i,r):i()}}s(Jb,"pt$3");function Gb(e,t,n,r){return Object.assign(Aa(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}s(Gb,"ht$3");function uI(e){if(!xb(e))return;const t=e;if(t.querySelector("style")===null)return;const n=new Map;function r(i){let o=n.get(i);if(o===void 0){o=new Set;for(let l=0;l<i.style.length;l++)o.add(i.style[l]);n.set(i,o)}return o}s(r,"s");try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const l of Array.from(o)){if(!Zr(l,CSSStyleRule))continue;let a;try{a=t.querySelectorAll(l.selectorText)}catch{continue}for(const c of Array.from(a)){if(!Ke(c))continue;const u=r(c);for(let d=0;d<l.style.length;d++){const f=l.style[d];u.has(f)||c.style.setProperty(f,l.style.getPropertyValue(f),l.style.getPropertyPriority(f))}}}}}catch{}}s(uI,"mt$4");var qb="@lexical/html/DOM",Zb=Symbol.for("@lexical/html/DOMExportContext"),dI="@lexical/html/DOMImport",Yb=Symbol.for("@lexical/html/DOMImportContext");function fI(e,t,n){return Gb(Zb,e,t,n)}s(fI,"Ct$4");var hI=fI("isExport",Boolean);function gI(e){const t=qi(e,qb);return t?t.output.defaults:void 0}s(gI,"Dt$4");function pI(e){const t=qi(e,qb);return t?t.output.runtime:void 0}s(pI,"Ot$5");function mI(e=Wt()){const t=pI(e);return t?t.getSessionConfig():U2(e)}s(mI,"Nt$5");var _I=Jb(Zb,gI),Td=Symbol.for("@lexical/html/SelectorImpl");function Zl(e,t){const n={kind:"element",predicate:(r=t,r.length===0?Ke:r.length===1?r[0]:(o,l)=>{for(const a of r)if(!a(o,l))return!1;return!0}),tags:e};var r;const i=s(o=>Zl(e,[...t,o]),"s");return{[Td]:n,attr:s((o,l,a)=>i($h(o,l,a)),"attr"),classAll:s((...o)=>i(Qb(o)),"classAll"),classAny:s((...o)=>i((function(l){const a=Xb(l);return a.length===0?()=>!1:c=>{if(!Ke(c))return!1;const u=c.classList;for(const d of a)if(u.contains(d))return!0;return!1}})(o)),"classAny"),styleAny:s((o,l,a)=>i((function(c,u,d){if(typeof u=="string")return f=>Ke(f)&&f.style.getPropertyValue(c)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(g,p)=>{if(!Ke(g))return!1;const _=g.style.getPropertyValue(c);if(!_)return!1;const y=_.match(h);return y!==null&&(f!==void 0&&(p[f]=y),!0)}}Ps(362,JSON.stringify(c))})(o,l,a)),"styleAny")}}s(Zl,"se$1");function Xb(e){const t=[];for(const n of e)n&&t.push(n);return t}s(Xb,"ie$1");function Qb(e){const t=Xb(e);return t.length===0?()=>!0:n=>{if(!Ke(n))return!1;const r=n.classList;for(const i of t)if(!r.contains(i))return!1;return!0}}s(Qb,"ce");function $h(e,t,n){if(t===!0)return r=>Ke(r)&&r.hasAttribute(e);if(typeof t=="string")return r=>Ke(r)&&r.getAttribute(e)===t;if(t instanceof RegExp){const r=n&&n.capture,i=t;return(o,l)=>{if(!Ke(o))return!1;const a=o.getAttribute(e);if(a==null)return!1;const c=a.match(i);return c!==null&&(r!==void 0&&(l[r]=c),!0)}}Ps(361,JSON.stringify(e))}s($h,"le$1");var vI={kind:"text",predicate:xd,tags:new Set},yI={[Td]:vI},xI={kind:"comment",predicate:s(e=>e.nodeType===8,"predicate"),tags:new Set},CI={[Td]:xI},ns={any:s(()=>Zl(new Set,[]),"any"),comment:s(()=>CI,"comment"),tag(...e){e.length>0||Ps(363);const t=new Set;for(const n of e)t.add(n.toUpperCase());return Zl(t,[])},text:s(()=>yI,"text")};function eE(e,t){return Ke(e)&&e.nodeName===t.toUpperCase()}s(eE,"he$1");var tE=/[A-Za-z0-9_-]/,bI=class{static{s(this,"me$1")}constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const e=this.pos;for(;!this.eof()&&tE.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){const e=this.consume();this.assert(e==='"'||e==="'","expected quote");const t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(e,t){e||Ps(364,String(this.pos+1),t,this.source)}};function EI(e){const t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(tE.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),r.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),n.push($h("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let l=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const a=e.peek();a==='"'||a==="'"?l=e.readQuoted():(l=e.readIdent(),e.assert(l!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),n.push($h(o,l))}}}return r.length>0&&n.push(Qb(r)),{predicates:n,tags:t}}s(EI,"ye$1");function SI(e){const t=new bI(e,0),n=[];for(;;){const i=EI(t);if(n.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(n.length===1)return Zl(n[0].tags,n[0].predicates);const r=new Set;for(const i of n)for(const o of i.tags)r.add(o);return Zl(r,[(i,o)=>{for(const l of n){const a=i.nodeName;if(l.tags.size>0&&!l.tags.has(a))continue;let c=!0;for(const u of l.predicates)if(!u(i,o)){c=!1;break}if(c)return!0}return!1}])}s(SI,"xe$2");function hm(e,t,n){return Gb(Yb,e,t,n)}s(hm,"$e$1");var Ph=hm("textFormat",()=>0),TI=hm("textStyle",()=>({}));function wI(e){if(!Ke(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}s(wI,"De$1");function kI(e){if(xd(e))return!0;if(!Ke(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!hu(e)&&Nh(e)}s(kI,"we$1");var MI=hm("whitespaceConfig",()=>({isInline:kI,preservesWhitespace:wI}));function AI(e){const t=qi(e,dI);return t?t.output.defaults:void 0}s(AI,"Ne$1");var vz=Jb(Yb,AI);function gm(e){return vs(e)||Un(e)&&!e.isInline()}s(gm,"We$1");function nE(e,t){const n=[];let r=[];const i=s(()=>{r.length!==0&&(n.push(t().splice(0,0,r)),r=[])},"r");for(const o of e)if(gm(o)){if(i(),xe(o)){const l=nE(o.getChildren(),t);o.splice(0,o.getChildrenSize(),l)}n.push(o)}else r.push(o);return i(),n}s(nE,"Re");function rE(e,t){if(!Ke(t))return e;const n=t.style.textAlign;if(!pm(n))return e;for(const r of e)vs(r)&&r.getFormatType()===""&&r.setFormat(n);return e}s(rE,"Fe$1");function II(e,t,n){e.length===1&&Dr(e[0])&&(e=[]);const r=Xe();if(Ke(n)){const i=n.style.textAlign;pm(i)&&r.setFormat(i)}return[r.splice(0,0,e)]}s(II,"Te$1");var iE={$accepts:gm,$packageRun:II,name:"BlockSchema"},$o=ns,NI=new Set(["center","end","justify","left","right","start"]);function pm(e){return NI.has(e)}s(pm,"Be$1");var OI={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},DI={CODE:YA,MARK:QA},RI=new Set(["font-weight","font-style","text-decoration","vertical-align"]),LI={$import:s((e,t)=>{const n=e.get(Ph),r=OI[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=r?(l=r,{fontStyle:(a=i).fontStyle||l.fontStyle,fontWeight:a.fontWeight||l.fontWeight,textDecoration:a.textDecoration||l.textDecoration,verticalAlign:a.verticalAlign||l.verticalAlign}):i;var l,a;let c=(u=n,d=(function(h){let g=0,p=0;const{fontWeight:_,fontStyle:y,textDecoration:v,verticalAlign:x}=h;if(_==="700"||_==="bold"?g|=d_:_!=="normal"&&_!=="400"||(p|=d_),y==="italic"?g|=h_:y==="normal"&&(p|=h_),v){const C=v.split(" ");C.includes("underline")&&(g|=p_),C.includes("line-through")&&(g|=g_),C.includes("none")&&(p|=p_|g_)}return x==="sub"?(g|=cf,p|=uf):x==="super"?(g|=uf,p|=cf):x==="baseline"&&(p|=cf|uf),{clear:p,set:g}})(o),u&~d.clear|d.set);var u,d;const f=DI[t.nodeName];return f&&(c|=f),c===n?e.$importChildren(t):e.$importChildren(t,{context:[jb(Ph,c)]})},"$import"),match:$o.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function M_(e,t,n){let r=e;for(;;){let i=null;for(;(i=t?r.nextSibling:r.previousSibling)===null;){const l=r.parentNode;if(l===null)return null;r=l}if(r=i,!n.isInline(r))return null;let o=r;for(;(o=t?r.firstChild:r.lastChild)!==null;)r=o;if(xd(r))return r;if(r.nodeName==="BR")return null}}s(M_,"Je$1");function A_(e,t){return t!==0&&Ae(e)?e.setFormat(t):e}s(A_,"Qe");function I_(e,t){if(Ae(e)){const n=(function(r){let i="";for(const o in r)RI.has(o)||(i+=`${o}: ${r[o]}; `);return i.trimEnd()})(t);n!==""&&e.setStyle(n)}return e}s(I_,"Ke$1");var $I={$import:s((e,t)=>{const n=e.get(Ph),r=e.get(TI),i=e.get(MI);if((function(a,c){let u=a.parentNode;for(;u!==null;){if(c.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const a=kh(t.textContent||"");for(const c of a)A_(c,n),I_(c,r);return a}const o=(function(a,c){let u=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=a,f=!0;for(;d!==null&&(d=M_(d,!1,c))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(u=u.slice(1)),f=!1;break}}f&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let d=a,f=!0;for(;d!==null&&(d=M_(d,!0,c))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(u=u.slice(0,-1))}return u})(t,i);if(o==="")return[];const l=pr(o);return A_(l,n),I_(l,r),[l]},"$import"),match:$o.text(),name:"@lexical/html/#text"},PI={$import:s(()=>[],"$import"),match:$o.tag("script","style"),name:"@lexical/html/script-style-ignore"},FI={$import:s((e,t)=>T7(t)||S7(t)?[]:[Or()],"$import"),match:$o.tag("br"),name:"@lexical/html/br"},VI={$import:s((e,t)=>{const n=Xe();if(ui(n,t),$s(t,n),n.getFormatType()===""){const r=t.getAttribute("align");r&&pm(r)&&n.setFormat(r)}return Cr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:$o.tag("p"),name:"@lexical/html/p"},BI={$import:s((e,t,n)=>Wt().hasNode(Da)?[Sd()]:n(),"$import"),match:$o.tag("hr"),name:"@lexical/html/hr"},yz=[PI,VI,BI,{$import:s((e,t,n)=>hu(t)?rE(e.$importChildren(t,{schema:iE}),t):n(),"$import"),match:$o.any(),name:"@lexical/html/transparent-block"},$I,FI,LI];function HI(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}s(HI,"on");function KI(e){const t=[],n=new Map,r=[],i=[],o=[],l=new Set;e.forEach((c,u)=>{const d=(function(h){const g=h[Td];return g===void 0&&Ps(360),g})(c.match),f=c.name||(function(h,g){return h.kind==="text"?`#text@${g}`:h.kind==="comment"?`#comment@${g}`:h.tags.size===0?`*@${g}`:`${Array.from(h.tags).join(",").toLowerCase()}@${g}`})(d,u);if(c.name&&l.add(c.name),t.push({$import:c.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(u);else if(d.kind==="comment")o.push(u);else if(d.tags.size===0)r.push(u);else for(const h of d.tags){let g=n.get(h);g||(g=[],n.set(h,g)),g.push(u)}});const a=new Map;if(r.length===0)for(const[c,u]of n)a.set(c,u);else for(const[c,u]of n)a.set(c,HI(u,r));return{byTag:a,commentIndices:o,rules:t,textIndices:i,wildcardIndices:r}}s(KI,"rn");var xz=Object.freeze([]);function UI(e){const t=[];for(const n of e)if(WI(n))for(const r of n.rules)t.push(r);else t.push(n);return t}s(UI,"ln");function WI(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}s(WI,"un");function oE(e){const t=UI(e);return{__type:"CompiledOverlayRules",dispatch:KI(t),rules:t}}s(oE,"fn");var Cz=Object.freeze({}),bz={$import:s((e,t)=>e.$importChildren(t),"$import"),match:ns.any(),name:"@lexical/html/default-hoist"},zt={any:ns.any,comment:ns.comment,css:SI,tag:ns.tag,text:ns.text},sE=new Set(["STYLE","SCRIPT"]);function zI(e,t){uI(t);const n=xb(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(const o of n)if(!sE.has(o.nodeName)){const l=aE(o,e,i,!1);if(l!==null)for(const a of l)r.push(a)}return(function(o){for(const l of o)l.getParent()&&l.getNextSibling()instanceof G2&&l.insertAfter(Or());for(const l of o){const a=l.getParent();a&&a.splice(l.getIndexWithinParent(),1,l.getChildren())}})(i),r}s(zI,"kn");function jI(e,t=null,n=Wt()){return _I([jb(hI,!0)],n)(()=>{const r=Lt(),i=mI(n),o=ie(t)?Yp(t.anchor.getNode()):null,l=e.append.bind(e);for(const a of(xe(o)?o:r).getChildren())lE(n,a,l,t,i);return e})}s(jI,"Dn");function JI(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Ps(338),bA(e),jI(bn().createElement("div"),t,e).innerHTML}s(JI,"On");function lE(e,t,n,r=null,i=U2(e)){let o=i.$shouldInclude(t,r,e);const l=i.$shouldExclude(t,r,e);let a=t;r!==null&&Ae(t)&&(a=Tb(r,t,"clone"));const{element:c,after:u,append:d,$getChildNodes:f}=i.$exportDOM(a,e);if(!c)return!1;const h=bn().createDocumentFragment(),g=f?f():xe(a)?a.getChildren():[],p=o&&He(r)&&xe(t)?null:r,_=h.append.bind(h);for(const y of g){const v=lE(e,y,_,p,i);!o&&v&&i.$extractWithChild(t,y,r,"html",e)&&(o=!0)}if(o&&!l){if((Ke(c)||__(c))&&(d?d(h):c.append(h)),n(c),u){const y=u.call(a,c);y&&(__(c)?c.replaceChildren(y):c.replaceWith(y))}}else n(h);return o}s(lE,"Mn");function aE(e,t,n,r,i=new Map,o){const l=[];if(sE.has(e.nodeName))return l;let a=null;const c=(function(p,_){const{nodeName:y}=p,v=_._htmlConversions.get(y.toLowerCase());let x=null;if(v!==void 0)for(const C of v){const b=C(p);b!==null&&(x===null||(x.priority||0)<=(b.priority||0))&&(x=b)}return x!==null?x.conversion:null})(e,t),u=c?c(e):null;let d=null;if(u!==null){d=u.after;const p=u.node;if(a=Array.isArray(p)?p[p.length-1]:p,a!==null){for(const[,_]of i)if(a=_(a,o),!a)break;a&&l.push(...Array.isArray(p)?p:[a])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const g=(a==null||!xn(a))&&(a!=null&&vs(a)||r);for(let p=0;p<f.length;p++)h.push(...aE(f[p],t,n,g,new Map(i),a));if(d!=null&&(h=d(h)),hu(e)&&(h=GI(e,h,g?()=>{const p=new G2;return n.push(p),p}:Xe)),a==null)if(h.length>0)for(const p of h)l.push(p);else hu(e)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:Nh(p.nextSibling)&&Nh(p.previousSibling)})(e)&&l.push(Or());else xe(a)&&a.append(...h);return l}s(aE,"Nn");function GI(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let l=0;l<t.length;l++){const a=t[l];if(vs(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(o.push(a),l===t.length-1||l<t.length-1&&vs(t[l+1])){const c=n();c.setFormat(r),c.append(...o),i.push(c),o=[]}}return i}s(GI,"En");function mu(e,t,n=null){const r=C7(n),i=n?y7(n):[],o=n!==null&&i.length>0;if(o&&typeof r.caretPositionFromPoint=="function"){const l=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(l!==null&&(function(a,c){for(let u=a;u!==null;){if(u===c)return!0;u=yb(u)}return!1})(l.offsetNode,n))return{node:l.offsetNode,offset:l.offset}}if(o){const l=n.getRootNode();if(E7(l)){const a=l.elementFromPoint(e,t);if(a!==null&&n.contains(a)){const c=(function(u,d,f,h){const g=h.createRange(),p=s(T=>d<T.top?T.top-d:d>T.bottom?d-T.bottom:0,"i"),_=s(T=>u<T.left?T.left-u:u>T.right?u-T.right:0,"l"),y=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let v=null,x=1/0,C=1/0;for(let T=y.nextNode();T;T=y.nextNode()){g.selectNodeContents(T);for(const E of g.getClientRects()){const A=p(E),D=_(E);(A<x||A===x&&D<C)&&(x=A,C=D,v=T)}}if(v===null)return null;let b=0,S=1/0,M=1/0;for(let T=0;T<=v.length;T++){g.setStart(v,T),g.collapse(!0);const E=g.getBoundingClientRect(),A=p(E),D=Math.abs(u-E.left);(A<S||A===S&&D<M)&&(S=A,M=D,b=T)}return{node:v,offset:b}})(e,t,a,r);if(c!==null)return c}}}if(typeof r.caretRangeFromPoint=="function"){const l=r.caretRangeFromPoint(e,t);return l===null?null:{node:l.startContainer,offset:l.startOffset}}if(typeof r.caretPositionFromPoint=="function"){const l=r.caretPositionFromPoint(e,t);return l===null?null:{node:l.offsetNode,offset:l.offset}}return null}s(mu,"et$1");function rs(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(rs,"nt$2");var Fh={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function qI(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:s(t=>t,"createHTML")}).createHTML(e):e}s(qI,"rt$2");var N_=s((e,t)=>{if(!ie(t))return t.insertRawText(e),!0;const n=s(r=>{const i=re();ie(i)&&r(i)},"n");return M7(e,{linebreak:s(()=>n(r=>r.insertParagraph()),"linebreak"),tab:s(()=>n(r=>r.insertNodes([Zp()])),"tab"),text:s(r=>n(i=>i.insertText(r)),"text")}),!0},"it$2"),Vh={"application/x-lexical-editor":[(e,t,n)=>{try{const r=Wt(),i=JSON.parse(e);if(i&&i.namespace===r._config.namespace&&Array.isArray(i.nodes))return O_(r,gE(i.nodes),t),!0}catch{}return n()}],"text/html":[(e,t,n)=>{try{const r=Wt(),i=new DOMParser().parseFromString(qI(e),"text/html");return O_(r,zI(r,i),t),!0}catch{return n()}}],"text/plain":[N_],"text/uri-list":[N_]};function ZI(e,t,n,r){if(!e)return!1;const i=s(o=>!!e[o]&&e[o](t,n,i.bind(null,o-1),r),"r");return i(e.length-1)}s(ZI,"ct$1");function cE(e,t,n){const r=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(l=>o.$importMimeType[l]!==void 0).sort((l,a)=>{const c=o.priority[l],u=o.priority[a];return c===void 0&&u===void 0?l<a?-1:l>a?1:0:c===void 0?1:u===void 0?-1:c-u})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==r)&&ZI(e.$importMimeType[i],o,n,t))return!0}return!1}s(cE,"st$2");var YI={$importMimeType:Vh,$insertDataTransfer:s((e,t)=>cE({$importMimeType:Vh,priority:Fh},e,t),"$insertDataTransfer"),priority:Fh},XI=Fr({build:s((e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:s((n,r)=>cE(t,n,r),"$insertDataTransfer"),priority:t.priority}),"build"),config:Ro({$importMimeType:Vh,priority:Fh}),mergeConfig(e,t){const n=bd(e,t);if(t.$importMimeType){const r={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const l=r[i];r[i]=l?[...l,...o]:o}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:"@lexical/clipboard/Import"});function uE(e,t=re()){return t??rs(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?"":JI(e,t)}s(uE,"pt$2");function dE(e,t=re()){return t??rs(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(hE(e,t))}s(dE,"dt$3");function Bh(e,t,n){(function(){const r=Z7(XI.name);return r?r.output:YI})().$insertDataTransfer(e,t)}s(Bh,"gt");var fE="application/x-lexical-drag";function QI(e,t){const n={editorKey:t.getKey()};e.setData(fE,JSON.stringify(n))}s(QI,"xt$3");function e6(e,t,n){const r=e.dataTransfer;if(r===null)return!1;const i=(function(u){const d=u.getData(fE);if(!d)return null;let f;try{f=JSON.parse(d)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(r);if(i===null)return!1;const o=(function(u,d){const f=mu(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=si(f.node);if(h===null)return null;if(Ae(h))return AA(h,"next",f.offset);if(xe(h))return a_(h,f.offset,"next");const g=h.getParent();return g===null?null:a_(g,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const l=PA(o);if(l===null)return!1;const a=i.editorKey===t.getKey(),c=re();if(a){if(!ie(c)||c.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=K2(V2(d),"next");return wh(f,u)<0&&wh(u,h)<0})(o,c))return e.preventDefault(),!0;c.removeText()}if(!l.origin.isAttached())return e.preventDefault(),!0;if(n(r,ys(pd(l)),t),!a){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,g){for(const p of g7(g)){const _=vb(p);if(bb(_)&&_.getKey()===h&&Ke(p))return p}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}s(e6,"ht$2");function t6(e,t){return e6(e,t,Bh)}s(t6,"Tt$4");function O_(e,t,n){e.dispatchCommand(s7,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if(ie(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const l=Ui(i,"previous");if(l)if(tm(l))o=l.origin;else{const a=yl(l,Wi(Lt(),"next").getFlipped());for(const c of a){if(Ae(c.origin)){o=c.origin;break}if(xe(c.origin)&&!c.origin.isInline())break}}if(o&&Ae(o)){const a=o.getFormat(),c=o.getStyle();r.format===a&&r.style===c||(r.format=a,r.style=c,r.dirty=!0)}}})(n))}s(O_,"Mt$3");function Hh(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=xe(n)&&n.excludeFromCopy("html");let l=n;t!==null&&Ae(l)&&(l=Tb(t,l,"clone"));const a=xe(l)?l.getChildren():[],c=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&rs(58,h.name),xe(d)){const g=f.children;Array.isArray(g)||rs(59,h.name)}return f})(l);Ae(l)&&l.getTextContentSize()===0&&(i=!1);const u=i&&He(t)&&xe(n)?null:t;for(let d=0;d<a.length;d++){const f=a[d],h=Hh(e,u,f,c.children);!i&&xe(n)&&h&&n.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=MA(l);if(d.length>0){const f={};for(const h of d){const g=kA(l,h);g===null&&rs(366,l.constructor.name,h);const p=[];Hh(e,null,g,p),p.length===1&&p[0].type===g.getType()||rs(385,h,l.constructor.name,String(p.length),String(p.length>0?p[0].type:"none")),f[h]=p[0]}c.$slots=f}}if(i&&!o)r.push(c);else if(Array.isArray(c.children))for(let d=0;d<c.children.length;d++){const f=c.children[d];r.push(f)}return i}s(Hh,"vt$4");function hE(e,t){const n=[],r=Lt(),i=ie(t)?t.anchor.getNode():He(t)?t.getNodes()[0]??null:null,o=i!==null?Yp(i):null,l=(xe(o)?o:r).getChildren();for(let a=0;a<l.length;a++)Hh(e,t,l[a],n);return{namespace:e._config.namespace,nodes:n}}s(hE,"wt$3");function gE(e){const t=[];for(const n of e)t.push(RA(n));return t}s(gE,"$t$3");var Ho=null;async function D_(e,t,n){if(Ho!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(R_(e,t,n))})});const r=e.getRootElement(),i=e._window||window,o=i.document,l=Ia(i);if(r===null||l===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),r.append(a);const c=o.createRange();return c.setStart(a,0),c.setEnd(a,1),l.removeAllRanges(),l.addRange(c),new Promise((u,d)=>{const f=e.registerCommand(Y2,h=>(Zr(h,ClipboardEvent)&&(f(),Ho!==null&&(i.clearTimeout(Ho),Ho=null),u(R_(e,h,n))),!0),Rr);Ho=i.setTimeout(()=>{f(),Ho=null,u(!1)},50),o.execCommand("copy"),a.remove()})}s(D_,"Dt$3");function R_(e,t,n){if(n===void 0){const i=Ia(e._window),o=re();if(!o||o.isCollapsed()||!i)return!1;const l=v7(i,e.getRootElement()),a=l.anchorNode,c=l.focusNode;if(a!==null&&c!==null&&!w7(e,a,c))return!1;n=pE(o)}t.preventDefault();const r=t.clipboardData;return r!==null&&(mE(r,n),!0)}s(R_,"Nt$4");var n6=[["text/html",uE],["application/x-lexical-editor",dE]];function pE(e=re()){return(function(t,n){const r={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const l=i6(o,n);l!==null&&(r[i]=l)}return r})(r6(),e)}s(pE,"Rt$3");function mE(e,t){for(const[n]of n6)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}s(mE,"St$4");function r6(e=Wt()){const t=qi(e,o6.name);return t?t.output:_E}s(r6,"Ot$4");var _E={"application/x-lexical-editor":[(e,t)=>e?dE(Wt(),e):t()],"text/html":[(e,t)=>e?uE(Wt(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function i6(e,t){const n=s(r=>e[r]?e[r](t,n.bind(null,r-1)):null,"n");return n(e.length-1)}s(i6,"Et$3");var o6=Fr({build:s((e,t,n)=>t.$exportMimeType,"build"),config:Ro({$exportMimeType:_E}),mergeConfig(e,t){const n=bd(e,t);if(t.$exportMimeType){const r={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const l=r[i];r[i]=l?[...l,...o]:o}n.$exportMimeType=r}return n},name:"@lexical/clipboard/GetClipboardData"}),s6={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},_u=Symbol.for("@lexical/dragon/WindowState");function l6(e,t,n){const r=(function(i){let o=i[_u];return o===void 0&&(o={dispose:s(()=>{},"dispose"),editors:new Map,installs:new Set},i[_u]=o),o})(e);if(r.installs.size===0){const i=u6.bind(e);e.addEventListener("message",i,!0),r.dispose=()=>{e.removeEventListener("message",i,!0)}}if(r.installs.add(t),n){const i=r.editors.get(n)||new Set;i.add(t),r.editors.set(n,i)}return a6.bind(null,e,r,t,n)}s(l6,"p$4");function a6(e,t,n,r){if(r){const i=t.editors.get(r);i&&i.delete(n)&&i.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[_u])}s(a6,"m$3");function L_(e){return e&&e.ownerDocument.defaultView}s(L_,"y$2");function c6(e){const t=B7(()=>L_(e.getRootElement()),n=>e.registerRootListener(r=>{n.value=L_(r)}));return Lo(()=>{const n=t.value;if(n)return l6(n,Symbol("@lexical/dragon/editorInstall"),e)})}s(c6,"b$2");function u6(e){if(e.origin!==this.location.origin)return;const t=(function(r){const i=r[_u];if(i===void 0)return null;const o=vb(m7(r.document));return bb(o)&&i.editors.has(o)?o:null})(this);if(t===null)return;const n=e.data;if(typeof n=="string"){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol==="nuanria_messaging"&&r.type==="request"){const i=r.payload;if(i&&i.functionId==="makeChanges"){const o=i.args;if(Array.isArray(o)){const[l,a,c,u,d,f]=o;if(![l,a,u,d].every(Number.isFinite)||typeof c!="string"&&c!==-1)return;t.update(()=>{const h=re();if(ie(h)){const g=h.anchor;let p=g.getNode(),_=0,y=0;if(Ae(p)&&l>=0&&a>=0&&(_=l,y=l+a,h.setTextNodeRange(p,_,p,y)),typeof c!="string"||_===y&&c===""||(h.insertRawText(c),p=g.getNode()),Ae(p)){const v=p.getTextContentSize();_=Math.min(Math.max(u,0),v),y=u<0||d<0?_:Math.min(u+d,v),h.setTextNodeRange(p,_,p,y)}if(typeof f=="string"&&d>0&&!h.isCollapsed()){const v=s6[f];v!==void 0&&h.formatText(v)}e.stopImmediatePropagation()}})}}}}}s(u6,"x$4");var d6={$import:s((e,t)=>{const n=Ar(t.nodeName.toLowerCase());return $s(t,n),ui(n,t),Cr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:zt.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},f6={$import:s((e,t)=>{const n=Fs();return ui(n,t),$s(t,n),Cr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:zt.tag("blockquote"),name:"@lexical/rich-text/blockquote"},Ez={$import:s((e,t)=>{const n=Fs({shadowRoot:!0});return ui(n,t),$s(t,n),Cr(n,t),[n.splice(0,0,e.$importChildren(t,{schema:iE}))]},"$import"),match:zt.tag("blockquote"),name:"@lexical/rich-text/blockquote-shadow-root"},Sz=[d6,f6,{$import:s((e,t,n)=>{const r=t.firstChild;return r&&Ke(i=r)&&i.nodeName==="SPAN"&&i.style.fontSize==="26pt"?e.$importChildren(t):n();var i},"$import"),match:zt.tag("p"),name:"@lexical/rich-text/google-docs-title-p"},{$import:s((e,t,n)=>t.style.fontSize!=="26pt"?n():[Ar("h1").splice(0,0,e.$importChildren(t))],"$import"),match:zt.tag("span"),name:"@lexical/rich-text/google-docs-title-span"}],$_=br("DRAG_DROP_PASTE_FILE"),mf=Aa("shadowRoot",{parse:Boolean}),wd=class vE extends Lr{static{s(this,"Nt$3")}static getType(){return"quote"}static clone(t){return new vE(t.__key)}$config(){return this.config("quote",{extends:Lr,stateConfigs:[{flat:!0,stateConfig:mf}]})}isShadowRoot(){return Xp(this,mf)}setIsShadowRoot(t){return us(this,mf,t)}createDOM(t){const n=bn().createElement("blockquote");return mr(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:s(t=>({conversion:h6,priority:0}),"blockquote")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(bn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Fs().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,n){const r=Xe(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){if(this.isShadowRoot()){for(const n of this.getChildren())this.insertBefore(n);return this.remove(),!0}const t=Xe();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function Fs(e){const t=ci(new wd);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}s(Fs,"St$3");function Kh(e){return e instanceof wd}s(Kh,"bt$3");var Ra=class yE extends Lr{static{s(this,"_t$3")}__tag;static getType(){return"heading"}static clone(t){return new yE(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",n){super(n),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const n=this.getWritable();return n.__tag=t,n}createDOM(t){const n=this.__tag,r=bn().createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];mr(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:s(t=>({conversion:Ko,priority:0}),"h1"),h2:s(t=>({conversion:Ko,priority:0}),"h2"),h3:s(t=>({conversion:Ko,priority:0}),"h3"),h4:s(t=>({conversion:Ko,priority:0}),"h4"),h5:s(t=>({conversion:Ko,priority:0}),"h5"),h6:s(t=>({conversion:Ko,priority:0}),"h6"),p:s(t=>{const n=t.firstChild;return n!==null&&P_(n)?{conversion:s(()=>({node:null}),"conversion"),priority:3}:null},"p"),span:s(t=>P_(t)?{conversion:s(n=>({node:Ar("h1")}),"conversion"),priority:3}:null,"span")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(bn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Ar(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?Xe():Ar(this.getTag()),l=this.getDirection();if(o.setDirection(l),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const a=Xe();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Xe();this.getChildren().forEach(n=>t.append(n)),this.replace(t)}return!0}extractWithChild(){return!0}};function P_(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}s(P_,"Tt$3");function Ko(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=Ar(t),$s(e,n),ui(n,e),Cr(n,e)),{node:n}}s(Ko,"wt$2");function h6(e){const t=Fs();return ui(t,e),$s(e,t),Cr(t,e),{node:t}}s(h6,"Ot$3");function Ar(e="h1"){return ci(new Ra(e))}s(Ar,"kt$3");function kd(e){return e instanceof Ra}s(kd,"Kt$2");function F_(e){const t=si(e);return Un(t)}s(F_,"Et$2");function Uo(e,t,n,r){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const a=e.anchor.getNode();if(Ae(a)){o=a;const c=e.anchor.offset,u=c===a.getTextContentSize()&&a.getNextSibling()===null,d=c===0&&a.getPreviousSibling()===null;i=n==="end"&&u||n==="start"&&d||n==="both"&&(u||d)}}let l=!1;for(const[a,c]of Object.entries(r)){if(c==null||!c[t])continue;const u=a;if(c.onlyAtBoundary){if(!(i&&o&&Ae(o)&&o.hasFormat(u)))continue;l=!0}e.hasFormat(u)&&e.toggleFormat(u)}l&&e.setStyle("")}s(Uo,"Ft$2");var g6={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Qa(e,t){return(function(n,r){if(!n.isCollapsed())return!1;const i=Ui(n.focus,r),o=dt(i.origin,Sc);if(!o)return!1;const l=n.focus.getNode();if(!o.is(l)&&!z2(l,o))return!1;const a=yl(i,qn(o,r));if(a.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const c=yl(a.anchor.getSiblingCaret(),a.focus);let u=c.anchor.origin;for(const f of c){if(!uu(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let d=o;for(const f of H2(qn(o,r))){if(!f.origin.is(d.getParent())){if(DA(f.origin)){const h=qn(d,r);return ys(yl(h,h)),!0}break}if(!Sc(f.origin))break;d=f.origin}return!1})(e,t)||(function(n,r){if(!n.isCollapsed()||n.anchor.type!=="element")return!1;const i=Ui(n.anchor,r).getNodeAtCaret();return!(!Sc(i)||i.isInline()||(ys(pd(zi(Wi(i,r)))),0))})(e,t)}s(Qa,"Rt$2");function V_(e){return Un(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}s(V_,"At$3");function ec(e){const t=cu();t.add(e),Xn(t)}s(ec,"Pt$3");function B_(e,t){if(!e.isCollapsed())return!1;const n=e.focus,r=n.getNode(),i=t?"previous":"next",o=Ui(n,i);if(n.type==="element"&&xe(r)&&(ka(r)||Sc(r))){const v=o.getNodeAtCaret();return!(v===null||!V_(v))&&(ec(v.__key),!0)}const l=dt(xe(r)?r:r.getParentOrThrow(),v=>xe(v)&&!v.isInline()&&xn(v.getParent()));if(l===null)return!1;const a=qn(l,i).getNodeAtCaret();if(a===null||!V_(a))return!1;if(l.getTextContentSize()===0)return ec(a.__key),!0;const c=Wt().getRootElement();if(c===null)return!1;const u=Ia(c.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const d=u.anchorNode,f=u.anchorOffset,h=u.focusNode,g=u.focusOffset;u.modify("move",t?"backward":"forward","line");const p=u.anchorNode,_=u.anchorOffset;if(p===null)return H_(u,d,f,h,g),!1;const y=si(p);return H_(u,d,f,h,g),y===null?!1:(p===d&&_===f||!y.is(l)&&!z2(y,l))&&(ec(a.__key),!0)}s(B_,"zt$2");function H_(e,t,n,r,i){t!==null&&r!==null&&e.setBaseAndExtent(t,n,r,i)}s(H_,"Mt$2");function K_(e,t){if(!e.isCollapsed())return!1;const n=e.focus.getNode(),r=dt(xe(n)?n:n.getParentOrThrow(),y=>xe(y)&&!y.isInline());if(r===null)return!1;const i=Wt(),o=i.getRootElement();if(o===null)return!1;const l=o.ownerDocument.defaultView;if(l===null)return!1;let a=!1;for(const y of r.getChildren())if(xe(y)&&y.isInline()){const v=i.getElementByKey(y.getKey());if(v!==null){const x=l.getComputedStyle(v).display;if(x==="inline-grid"||x==="inline-flex"){a=!0;break}}}if(!a)return!1;const c=qn(r,t?"previous":"next").getNodeAtCaret();if(c===null||!xe(c)){if(t){const y=r.getFirstDescendant();Ae(y)?y.select(0,0):r.select(0,0)}else{const y=r.getLastDescendant();if(Ae(y)){const v=y.getTextContentSize();y.select(v,v)}else{const v=r.getChildrenSize();r.select(v,v)}}return!0}const u=i.getElementByKey(c.getKey());if(u===null)return!1;const d=Ia(l);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),g=u.getBoundingClientRect(),p=g.top+g.height/2;if(h.height>0){const y=mu(h.left,p,o);if(y!==null&&u.contains(y.node)){const v=o.ownerDocument.createRange();return v.setStart(y.node,y.offset),v.collapse(!0),e.applyDOMRange(v),e.dirty=!0,!0}}const _=t?c.getLastDescendant():c.getFirstDescendant();if(Ae(_)){const y=t?_.getTextContentSize():0;_.select(y,y)}else{const y=c.getChildrenSize();c.select(t?y:0,t?y:0)}return!0}s(K_,"$t$2");function tc(e,t){const n=qn(e,t),r=n.getAdjacentCaret();r!==null&&xe(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?ys(pd(n)):t==="next"?e.selectNext(0,0):e.selectPrevious()}s(tc,"Jt$1");function U_(e,t,n){n.preventDefault(),n.stopPropagation();const r=e.getNodes();if(r.length===0)return!0;const i=r.map(c=>qn(c,"next")).sort(wh),o=(t?i[0]:i[i.length-1]).origin,l=dt(o,c=>c!==o&&xe(c)&&!c.isInline())??Lt(),a=t?0:l.getChildrenSize();return l.select(a,a),!0}s(U_,"Lt$3");function p6(e,t=ql(g6)){return At(e.registerCommand(nm,()=>{const n=re();return He(n)?(n.clear(),!0):(ie(n)&&Uo(n,"click","both",t.peek()),!1)},Me),e.registerCommand(af,n=>{const r=re();return ie(r)?(r.deleteCharacter(n),!0):!!He(r)&&(r.deleteNodes(),!0)},Me),e.registerCommand(GA,n=>{const r=re();return!!ie(r)&&(r.deleteWord(n),!0)},Me),e.registerCommand(JA,n=>{const r=re();return!!ie(r)&&(r.deleteLine(n),!0)},Me),e.registerCommand(zA,n=>{const r=re();if(typeof n=="string")r!==null&&r.insertText(n);else{if(r===null)return!1;const i=n.dataTransfer;if(i!=null)Bh(i,r,e);else if(ie(r)){const o=n.data;return o&&r.insertText(o),!0}}return!0},Me),e.registerCommand(o7,()=>{const n=re();return!!ie(n)&&(n.removeText(),!0)},Me),e.registerCommand(tb,n=>{const r=re();return!(!ie(r)&&!He(r))&&(SA(r,n),!0)},Me),e.registerCommand(a7,n=>{const r=re();return!(!ie(r)&&!He(r))&&($A(r,n),!0)},Me),e.registerCommand(qA,n=>{const r=re();if(!ie(r)&&!He(r))return!1;const i=r.getNodes();for(const o of i){const l=dt(o,a=>xe(a)&&!a.isInline());l!==null&&l.setFormat(n)}return!0},Me),e.registerCommand(u_,n=>{const r=re();return!!ie(r)&&(r.insertLineBreak(n),!0)},Me),e.registerCommand(Ah,()=>{const n=re();return!!ie(n)&&(n.insertParagraph(),!0)},Me),e.registerCommand(ib,()=>{const n=Zp(),r=re();return ie(r)&&(n.setFormat(r.format),n.setStyle(r.style)),Rs([n]),!0},Me),e.registerCommand(fu,()=>Dh(n=>{const r=n.getIndent();n.setIndent(r+1)}),Me),e.registerCommand(Ih,()=>Dh(n=>{const r=n.getIndent();r>0&&n.setIndent(Math.max(0,r-1))}),Me),e.registerCommand(lb,n=>{const r=re();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),tc(i[0],"previous"),!0}else if(ie(r)&&(!n.shiftKey&&Qa(r,"previous")||!n.shiftKey&&B_(r,!0)||!n.shiftKey&&K_(r,!0)))return n.preventDefault(),!0;return!1},Me),e.registerCommand(ob,n=>{const r=re();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),tc(i[0],"next"),!0}else if(ie(r)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===Lt().getChildrenSize()})(r)||!n.shiftKey&&Qa(r,"next")||!n.shiftKey&&B_(r,!1)||!n.shiftKey&&K_(r,!1)))return n.preventDefault(),!0;return!1},Me),e.registerCommand(sb,n=>{const r=re();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),tc(i[0],qa(i[0])?"next":"previous"),!0}if(!ie(r))return!1;if(!n.shiftKey&&Qa(r,qa(r.anchor.getNode())?"next":"previous"))return n.preventDefault(),!0;if(n.shiftKey||Uo(r,"arrow","start",t.peek()),y_(r,!0)){const i=n.shiftKey;return n.preventDefault(),x_(r,i,!0),!0}return!1},Me),e.registerCommand(t7,n=>{const r=re();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),tc(i[0],qa(i[0])?"previous":"next"),!0}if(!ie(r))return!1;if(!n.shiftKey&&Qa(r,qa(r.anchor.getNode())?"previous":"next"))return n.preventDefault(),!0;if(n.shiftKey||Uo(r,"arrow","end",t.peek()),y_(r,!1)){const i=n.shiftKey;return n.preventDefault(),x_(r,i,!1),!0}return!1},Me),e.registerCommand(_d,n=>{const r=re();if(!He(r)&&F_(n.target))return!1;if(ie(r)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const l=o.getNode();if(ka(l))return!1;const a=Ib(l);return a.getIndent()>0&&(a.is(l)||l.is(a.getFirstDescendant()))})(r))return n.preventDefault(),e.dispatchCommand(Ih,void 0);if(f_&&c_)return!1}else if(!He(r))return!1;return n.preventDefault(),e.dispatchCommand(af,!0)},Me),e.registerCommand(om,n=>{const r=re();return!(!He(r)&&F_(n.target))&&!(!ie(r)&&!He(r))&&(n.preventDefault(),e.dispatchCommand(af,!1))},Me),e.registerCommand(vd,n=>{let r=re();if(He(r)){const i=r.getNodes();i.length===1&&Un(i[0])&&!i[0].isInline()&&(r=i[0].selectNext())}if(!ie(r))return!1;if(Uo(r,"enter","both",t.peek()),n!==null){if((f_||e7||ZA)&&c_)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(u_,!1)}return e.dispatchCommand(Ah,void 0)},Me),e.registerCommand(yd,()=>{const n=re();return!!ie(n)&&(e.blur(),!0)},Me),e.registerCommand(eb,n=>{const[,r]=Za(n);if(r.length>0){const i=n.clientX,o=n.clientY,l=mu(i,o,e.getRootElement());if(l!==null){const{offset:a,node:c}=l,u=si(c);if(u!==null){const d=gd();if(Ae(u))d.anchor.set(u.getKey(),a,"text"),d.focus.set(u.getKey(),a,"text");else{const h=u.getParentOrThrow().getKey(),g=u.getIndexWithinParent()+1;d.anchor.set(h,g,"element"),d.focus.set(h,g,"element")}const f=jl(d);Xn(f)}e.dispatchCommand($_,r)}return n.preventDefault(),!0}return t6(n,e)},Me),e.registerCommand(rm,n=>{const[r]=Za(n),i=re();return!(r&&!ie(i))&&(ie(i)&&!i.isCollapsed()&&n.dataTransfer!==null&&(mE(n.dataTransfer,pE(i)),QI(n.dataTransfer,e)),!0)},Me),e.registerCommand(Q2,n=>{const[r]=Za(n),i=re();if(r&&!ie(i))return!1;const o=n.clientX,l=n.clientY,a=mu(o,l,e.getRootElement());if(a!==null){const c=si(a.node);Un(c)&&n.preventDefault()}return!0},Me),e.registerCommand(l7,()=>{const n=re();return LA(ie(n)&&Yp(n.anchor.getNode())!==null?n:null),!0},Me),e.registerCommand(Y2,n=>(D_(e,Zr(n,ClipboardEvent)?n:null),!0),Me),e.registerCommand(jA,n=>((async function(r,i){await D_(i,Zr(r,ClipboardEvent)?r:null),i.update(()=>{const o=re();ie(o)?o.removeText():He(o)&&o.getNodes().forEach(l=>l.remove())},{tag:X2})})(n,e),!0),Me),e.registerCommand(Gl,n=>{const[,r,i]=Za(n);return r.length>0&&!i?(e.dispatchCommand($_,r),!0):b7(n.target)&&NA(n.target)?!1:re()!==null&&((function(o,l){o.preventDefault(),l.update(()=>{const a=re(),c=Zr(o,InputEvent)||Zr(o,KeyboardEvent)?null:o.clipboardData;c!=null&&a!==null&&Bh(c,a,l)},{tag:db})})(n,e),!0)},Me),e.registerCommand(cb,()=>{const n=re();return ie(n)&&Uo(n,"space","both",t.peek()),!1},Me),e.registerCommand(sm,()=>{const n=re();return ie(n)&&Uo(n,"tab","both",t.peek()),!1},Me),e.registerCommand(n7,n=>{const r=re();if(He(r))return U_(r,!1,n);if(!ie(r))return!1;const{anchor:i}=r;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!xe(o))return!1;const l=o.getFirstChild();if(!Un(l)||!l.isInline())return!1;const a=o.getKey(),c=o.selectEnd();return n.shiftKey&&c.anchor.set(a,0,"element"),n.preventDefault(),n.stopPropagation(),!0},Me),e.registerCommand(r7,n=>{const r=re();if(He(r))return U_(r,!0,n);if(!ie(r))return!1;const{anchor:i,focus:o}=r,l=dt(o.getNode(),u=>xe(u)&&!u.isInline());if(l===null)return!1;const a=l.getFirstChild();if(!Un(a)||!a.isInline()||dt(i.getNode(),u=>xe(u)&&!u.isInline())!==l)return!1;const c=l.getKey();return(o.type!=="element"||o.key!==c||o.offset!==0)&&(r.focus.set(c,0,"element"),n.shiftKey||r.anchor.set(c,0,"element"),n.preventDefault(),n.stopPropagation(),!0)},Me))}s(p6,"qt$1");xE.peek=C6;var m6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],_6={canContainEols:["highlight"],enter:{highlight:v6},exit:{highlight:y6}};function v6(e){this.enter({type:"highlight",children:[]},e)}s(v6,"enterHighlight");function y6(e){this.exit(e)}s(y6,"exitHighlight");var x6={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:m6}],handlers:{highlight:xE}};function xE(e,t,n,r){const o=n.createTracker(r),l=n.enter("highlight");let a=o.move("==");return a+=o.move(n.containerPhrasing(e,{before:a,after:"=",...o.current()})),a+=o.move("=="),l(),a}s(xE,"handleMark");function C6(){return"="}s(C6,"peekMark");var b6=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],W_={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function CE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}s(CE,"isDecimal");function E6(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}s(E6,"isHexadecimal");function S6(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}s(S6,"isAlphabetical");function z_(e){return S6(e)||CE(e)}s(z_,"isAlphanumerical");var T6=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function w6(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,l=-1,a="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,h=p(),g;for(o--;++o<=e.length;)if(g===10&&(f=(u?u[l]:0)||1),g=e.charCodeAt(o),g===38){const v=e.charCodeAt(o+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){a+=String.fromCharCode(g),f++;continue}const x=o+1;let C=x,b=x,S;if(v===35){b=++C;const $=e.charCodeAt(b);$===88||$===120?(S="hexadecimal",b=++C):S="decimal"}else S="named";let M="",T="",E="";const A=S==="named"?z_:S==="decimal"?CE:E6;for(b--;++b<=e.length;){const $=e.charCodeAt(b);if(!A($))break;E+=String.fromCharCode($),S==="named"&&b6.includes(E)&&(M=E,T=Z1(E))}let D=e.charCodeAt(b)===59;if(D){b++;const $=S==="named"?Z1(E):!1;$&&(M=E,T=$)}let L=1+b-x,G="";if(!(!D&&n.nonTerminated===!1))if(!E)S!=="named"&&_(4,L);else if(S==="named"){if(D&&!T)_(5,1);else if(M!==E&&(b=C+M.length,L=1+b-C,D=!1),!D){const $=M?1:3;if(n.attribute){const z=e.charCodeAt(b);z===61?(_($,L),T=""):z_(z)?T="":_($,L)}else _($,L)}G=T}else{D||_(2,L);let $=Number.parseInt(E,S==="hexadecimal"?16:10);if(k6($))_(7,L),G="�";else if($ in W_)_(6,L),G=W_[$];else{let z="";M6($)&&_(6,L),$>65535&&($-=65536,z+=String.fromCharCode($>>>10|55296),$=56320|$&1023),G=z+String.fromCharCode($)}}if(G){y(),h=p(),o=b-1,f+=b-x+1,i.push(G);const $=p();$.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,G,{start:h,end:$},e.slice(x-1,b)),h=$}else E=e.slice(x-1,b),a+=E,f+=E.length,o=b-1}else g===10&&(d++,l++,f=0),Number.isNaN(g)?y():(a+=String.fromCharCode(g),f++);return i.join("");function p(){return{line:d,column:f,offset:o+((c?c.offset:0)||0)}}function _(v,x){let C;n.warning&&(C=p(),C.column+=x,C.offset+=x,n.warning.call(n.warningContext||void 0,T6[v],C,v))}function y(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:p()}),a="")}}s(w6,"parseEntities");function k6(e){return e>=55296&&e<=57343||e>1114111}s(k6,"prohibited");function M6(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}s(M6,"disallowed");var A6=/["&'<>`]/g,I6=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N6=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,O6=/[|\\{}()[\]^$+*?.]/g,j_=new WeakMap;function D6(e,t){if(e=e.replace(t.subset?R6(t.subset):A6,r),t.subset||t.escapeOnly)return e;return e.replace(I6,n).replace(N6,r);function n(i,o,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(i,o,l){return t.format(i.charCodeAt(0),l.charCodeAt(o+1),t)}}s(D6,"core");function R6(e){let t=j_.get(e);return t||(t=L6(e),j_.set(e,t)),t}s(R6,"charactersToExpressionCached");function L6(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(O6,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}s(L6,"charactersToExpression");function $6(e){return"&#x"+e.toString(16).toUpperCase()+";"}s($6,"formatBasic");function P6(e,t){return D6(e,Object.assign({format:$6},t))}s(P6,"stringifyEntitiesLight");var bE=" ";function F6(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:f,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:l,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:f,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:l},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:d,mdxJsxFlowTagExpressionAttribute:g,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:_,mdxJsxFlowTagAttributeValueLiteral:y,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:v,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:x,mdxJsxFlowTag:C,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:d,mdxJsxTextTagExpressionAttribute:g,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:_,mdxJsxTextTagAttributeValueLiteral:y,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:v,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:x,mdxJsxTextTag:C}};function e(){this.buffer()}function t(T){return{line:T.line,column:T.column,offset:T.offset}}function n(T){this.config.enter.data.call(this,T),this.config.exit.data.call(this,T)}function r(T){const E={name:void 0,attributes:[],close:!1,selfClosing:!1,start:T.start,end:T.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=E,this.buffer()}function i(T){const E=this.data.mdxJsxTagStack;if(E.length===0)throw new an("Unexpected closing slash `/` in tag, expected an open tag first",{start:T.start,end:T.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(T){const E=this.data.mdxJsxTag;if(E.close)throw new an("Unexpected attribute in closing tag, expected the end of the tag",{start:T.start,end:T.end},"mdast-util-mdx-jsx:unexpected-attribute")}function l(T){const E=this.data.mdxJsxTag;if(E.close)throw new an("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:T.start,end:T.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){const T=this.data.mdxJsxTag;T.close=!0}function c(T){const E=this.data.mdxJsxTag;E.name=this.sliceSerialize(T)}function u(T){const E=this.data.mdxJsxTag;E.name+="."+this.sliceSerialize(T)}function d(T){const E=this.data.mdxJsxTag;E.name+=":"+this.sliceSerialize(T)}function f(T){const E=this.data.mdxJsxTag;o.call(this,T),E.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(T.start),end:void 0}})}function h(T){const E=this.data.mdxJsxTag;o.call(this,T),E.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(T.start),end:void 0}}),this.buffer()}function g(T){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type;const D=T.estree;A.value=this.resume(),A.position,A.position.end=t(T.end),D&&(A.data={estree:D})}function p(T){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type,A.name=this.sliceSerialize(T),A.position,A.position.end=t(T.end)}function _(T){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type,A.name+=":"+this.sliceSerialize(T),A.position,A.position.end=t(T.end)}function y(T){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.value=w6(this.resume(),{nonTerminated:!1}),A.position,A.position.end=t(T.end)}function v(T){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type;const D={type:"mdxJsxAttributeValueExpression",value:this.resume()},L=T.estree;L&&(D.data={estree:L}),A.value=D,A.position,A.position.end=t(T.end)}function x(){const T=this.data.mdxJsxTag;T.selfClosing=!0}function C(T){const E=this.data.mdxJsxTag,A=this.data.mdxJsxTagStack,D=A[A.length-1];if(E.close&&D.name!==E.name)throw new an("Unexpected closing tag `"+M(E)+"`, expected corresponding closing tag for `"+M(D)+"` ("+Ka(D)+")",{start:T.start,end:T.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),E.close?A.pop():this.enter({type:T.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:E.name||null,attributes:E.attributes,children:[]},T,b),E.selfClosing||E.close?this.exit(T,S):A.push(E)}function b(T,E){const A=this.data.mdxJsxTagStack,D=A[A.length-1],L=T?" before the end of `"+T.type+"`":"",G=T?{start:T.start,end:T.end}:void 0;throw new an("Expected a closing tag for `"+M(D)+"` ("+Ka({start:E.start,end:E.end})+")"+L,G,"mdast-util-mdx-jsx:end-tag-mismatch")}function S(T,E){const A=this.data.mdxJsxTag;throw new an("Expected the closing tag `"+M(A)+"` either after the end of `"+E.type+"` ("+Ka(E.end)+") or another opening tag after the start of `"+E.type+"` ("+Ka(E.start)+")",{start:T.start,end:T.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function M(T){return"<"+(T.close?"/":"")+(T.name||"")+">"}}s(F6,"mdxJsxFromMarkdown");function V6(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,l=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=H6,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(c,u,d,f){const h=c.type==="mdxJsxFlowElement",g=c.name?!c.children||c.children.length===0:!1,p=SE(EE(d)),_=d.createTracker(f),y=d.createTracker(f),v=[],x=(h?p:"")+"<"+(c.name||""),C=d.enter(c.type);if(_.move(x),y.move(x),c.attributes&&c.attributes.length>0){if(!c.name)throw new Error("Cannot serialize fragment w/ attributes");let E=-1;for(;++E<c.attributes.length;){const A=c.attributes[E];let D;if(A.type==="mdxJsxExpressionAttribute")D="{"+(A.value||"")+"}";else{if(!A.name)throw new Error("Cannot serialize attribute w/o name");const L=A.value,G=A.name;let $="";if(L!=null)if(typeof L=="object")$="{"+(L.value||"")+"}";else{const z=r&&Y1(L,n)>Y1(L,l)?l:n;$=z+P6(L,{subset:[z]})+z}D=G+($?"=":"")+$}v.push(D)}}let b=!1;const S=v.join(" ");h&&(/\r?\n|\r/.test(S)||_.current().now.column+S.length+(g?i?2:3:1)>o)&&(b=!0);let M=_,T=x;if(b){M=y;let E=-1;for(;++E<v.length;)v[E]=p+bE+v[E];T+=M.move(`
14
+ `+v.join(`
15
+ `)+`
16
+ `+p)}else S&&(T+=M.move(" "+S));return g&&(T+=M.move((i||b?"":" ")+"/")),T+=M.move(">"),c.children&&c.children.length>0&&(c.type==="mdxJsxTextElement"?T+=M.move(d.containerPhrasing(c,{...M.current(),before:">",after:"<"})):(M.shift(2),T+=M.move(`
17
+ `),T+=M.move(B6(c,d,M.current())),T+=M.move(`
18
+ `))),g||(T+=M.move((h?p:"")+"</"+(c.name||"")+">")),C(),T}s(a,"mdxElement")}s(V6,"mdxJsxToMarkdown");function B6(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),l=SE(EE(t)),a=[];let c=-1;for(r.push(-1);++c<i.length;){const u=i[c];r[r.length-1]=c;const d={before:`
19
+ `,after:`
20
+ `,...o.current()},f=t.handle(u,e,t,d),h=u.type==="mdxJsxFlowElement"?f:t.indentLines(f,function(g,p,_){return(_?"":l)+g});a.push(o.move(h)),u.type!=="list"&&(t.bulletLastUsed=void 0),c<i.length-1&&a.push(o.move(`
21
+
22
+ `))}return r.pop(),a.join("")}s(B6,"containerFlow$1");function EE(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}s(EE,"inferDepth");function SE(e){return bE.repeat(e)}s(SE,"createIndent");function H6(){return"<"}s(H6,"peekElement");var J_=Object.prototype.hasOwnProperty;function G_(e,t,n){for(n of e.keys())if(El(n,t))return n}s(G_,"find");function El(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&El(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=G_(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=G_(t,i),!i)||!El(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(J_.call(e,n)&&++r&&!J_.call(t,n)||!(n in t)||!El(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}s(El,"dequal");var Uh,TE,wE,kE,ME=!0;typeof process<"u"&&({FORCE_COLOR:Uh,NODE_DISABLE_COLORS:TE,NO_COLOR:wE,TERM:kE}={},ME=process.stdout&&process.stdout.isTTY);var De={enabled:!TE&&wE==null&&kE!=="dumb"&&(Uh!=null&&Uh!=="0"||ME),reset:lt(0,0),bold:lt(1,22),dim:lt(2,22),italic:lt(3,23),underline:lt(4,24),inverse:lt(7,27),hidden:lt(8,28),strikethrough:lt(9,29),black:lt(30,39),red:lt(31,39),green:lt(32,39),yellow:lt(33,39),blue:lt(34,39),magenta:lt(35,39),cyan:lt(36,39),white:lt(37,39),gray:lt(90,39),grey:lt(90,39),bgBlack:lt(40,49),bgRed:lt(41,49),bgGreen:lt(42,49),bgYellow:lt(43,49),bgBlue:lt(44,49),bgMagenta:lt(45,49),bgCyan:lt(46,49),bgWhite:lt(47,49)};function q_(e,t){let n=0,r,i="",o="";for(;n<e.length;n++)r=e[n],i+=r.open,o+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+o}s(q_,"run");function K6(e,t){let n={has:e,keys:t};return n.reset=De.reset.bind(n),n.bold=De.bold.bind(n),n.dim=De.dim.bind(n),n.italic=De.italic.bind(n),n.underline=De.underline.bind(n),n.inverse=De.inverse.bind(n),n.hidden=De.hidden.bind(n),n.strikethrough=De.strikethrough.bind(n),n.black=De.black.bind(n),n.red=De.red.bind(n),n.green=De.green.bind(n),n.yellow=De.yellow.bind(n),n.blue=De.blue.bind(n),n.magenta=De.magenta.bind(n),n.cyan=De.cyan.bind(n),n.white=De.white.bind(n),n.gray=De.gray.bind(n),n.grey=De.grey.bind(n),n.bgBlack=De.bgBlack.bind(n),n.bgRed=De.bgRed.bind(n),n.bgGreen=De.bgGreen.bind(n),n.bgYellow=De.bgYellow.bind(n),n.bgBlue=De.bgBlue.bind(n),n.bgMagenta=De.bgMagenta.bind(n),n.bgCyan=De.bgCyan.bind(n),n.bgWhite=De.bgWhite.bind(n),n}s(K6,"chain");function lt(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:De.enabled?q_(this.keys,r+""):r+""):r===void 0?K6([e],[n]):De.enabled?q_([n],r+""):r+""}}s(lt,"init");function di(){}s(di,"Diff");di.prototype={diff:s(function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var l=this;function a(b){return o?(setTimeout(function(){o(void 0,b)},0),!0):b}s(a,"done"),t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var c=n.length,u=t.length,d=1,f=c+u;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var h=(r=i.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+h,p=[{oldPos:-1,lastComponent:void 0}],_=this.extractCommon(p[0],n,t,0);if(p[0].oldPos+1>=u&&_+1>=c)return a([{value:this.join(n),count:n.length}]);var y=-1/0,v=1/0;function x(){for(var b=Math.max(y,-d);b<=Math.min(v,d);b+=2){var S=void 0,M=p[b-1],T=p[b+1];M&&(p[b-1]=void 0);var E=!1;if(T){var A=T.oldPos-b;E=T&&0<=A&&A<c}var D=M&&M.oldPos+1<u;if(!E&&!D){p[b]=void 0;continue}if(!D||E&&M.oldPos+1<T.oldPos?S=l.addToPath(T,!0,void 0,0):S=l.addToPath(M,void 0,!0,1),_=l.extractCommon(S,n,t,b),S.oldPos+1>=u&&_+1>=c)return a(U6(l,S.lastComponent,n,t,l.useLongestToken));p[b]=S,S.oldPos+1>=u&&(v=Math.min(v,b-1)),_+1>=c&&(y=Math.max(y,b+1))}d++}if(s(x,"execEditLength"),o)s((function b(){setTimeout(function(){if(d>f||Date.now()>g)return o();x()||b()},0)}),"exec")();else for(;d<=f&&Date.now()<=g;){var C=x();if(C)return C}},"diff"),addToPath:s(function(t,n,r,i){var o=t.lastComponent;return o&&o.added===n&&o.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:n,removed:r,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:o}}},"addToPath"),extractCommon:s(function(t,n,r,i){for(var o=n.length,l=r.length,a=t.oldPos,c=a-i,u=0;c+1<o&&a+1<l&&this.equals(n[c+1],r[a+1]);)c++,a++,u++;return u&&(t.lastComponent={count:u,previousComponent:t.lastComponent}),t.oldPos=a,c},"extractCommon"),equals:s(function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},"equals"),removeEmpty:s(function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},"removeEmpty"),castInput:s(function(t){return t},"castInput"),tokenize:s(function(t){return t.split("")},"tokenize"),join:s(function(t){return t.join("")},"join")};function U6(e,t,n,r,i){for(var o=[],l;t;)o.push(t),l=t.previousComponent,delete t.previousComponent,t=l;o.reverse();for(var a=0,c=o.length,u=0,d=0;a<c;a++){var f=o[a];if(f.removed){if(f.value=e.join(r.slice(d,d+f.count)),d+=f.count,a&&o[a-1].added){var g=o[a-1];o[a-1]=o[a],o[a]=g}}else{if(!f.added&&i){var h=n.slice(u,u+f.count);h=h.map(function(_,y){var v=r[d+y];return v.length>_.length?v:_}),f.value=e.join(h)}else f.value=e.join(n.slice(u,u+f.count));u+=f.count,f.added||(d+=f.count)}}var p=o[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(o[c-2].value+=p.value,o.pop()),o}s(U6,"buildValues");var W6=new di;function z6(e,t,n){return W6.diff(e,t,n)}s(z6,"diffChars");var Z_=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Y_=/\S/,AE=new di;AE.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Y_.test(e)&&!Y_.test(t)};AE.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Z_.test(t[n])&&Z_.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var mm=new di;mm.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
23
+ `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function j6(e,t,n){return mm.diff(e,t,n)}s(j6,"diffLines");var J6=new di;J6.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var G6=new di;G6.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Mc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mc=s(function(t){return typeof t},"_typeof"):Mc=s(function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},"_typeof"),Mc(e)}s(Mc,"_typeof");var q6=Object.prototype.toString,Yl=new di;Yl.useLongestToken=!0;Yl.tokenize=mm.tokenize;Yl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(o,l){return typeof l>"u"?n:l}:r;return typeof e=="string"?e:JSON.stringify(Wh(e,null,null,i),i," ")};Yl.equals=function(e,t){return di.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Wh(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var l;if(q6.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),o=0;o<e.length;o+=1)l[o]=Wh(e[o],t,n,r,i);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),Mc(e)==="object"&&e!==null){t.push(e),l={},n.push(l);var a=[],c;for(c in e)e.hasOwnProperty(c)&&a.push(c);for(a.sort(),o=0;o<a.length;o+=1)c=a[o],l[c]=Wh(e[c],t,n,r,c);t.pop(),n.pop()}else l=e;return l}s(Wh,"canonicalize");var vu=new di;vu.tokenize=function(e){return e.slice()};vu.join=vu.removeEmpty=function(e){return e};function Z6(e,t,n){return vu.diff(e,t,n)}s(Z6,"diffArrays");var So={"--":De.red,"··":De.grey,"++":De.green},xs=De.dim().italic,Y6=De.dim("→"),X6=De.dim("·"),Q6=De.dim("↵"),Ac=s((e,t)=>So[e](e+zh(t))+`
24
+ `,"LOG"),eN=s((e,t)=>De.dim("L"+String(e).padStart(t,"0")+" "),"LINE"),zh=s(e=>e.replace(/[ ]/g,X6).replace(/\t/g,Y6).replace(/(\r?\n)/g,Q6),"PRETTY");function tN(e,t,n){let r=e.removed?"--":e.added?"++":"··",i=e.value.replace(/\r?\n$/,"").split(`
25
+ `),o=0,l,a="";for(e.added?a+=So[r]().underline(xs("Expected:"))+`
26
+ `:e.removed&&(a+=So[r]().underline(xs("Actual:"))+`
27
+ `);o<i.length;o++)l=i[o],l!=null&&(t&&(a+=eN(t+o,n)),a+=Ac(r,l||`
28
+ `));return a}s(tN,"line");function nN(e,t){let n=Z6(e,t),r=0,i=0,o=0,l,a,c,u,d,f=Ac("··","[");for(;r<n.length;r++)for(c=(l=n[r]).removed?"--":l.added?"++":"··",l.added?f+=So[c]().underline(xs("Expected:"))+`
29
+ `:l.removed&&(f+=So[c]().underline(xs("Actual:"))+`
30
+ `),i=0;i<l.value.length;i++)for(u=l.value[i]&&typeof l.value[i]=="object",a=il(l.value[i]).split(/\r?\n/g),o=0;o<a.length;)d=" "+a[o++]+(u?"":","),u&&o===a.length&&i+1<l.value.length&&(d+=","),f+=Ac(c,d);return f+Ac("··","]")}s(nN,"arrays");function X_(e,t,n=0){let r=0,i,o="",l=j6(e,t),a=String(t.split(/\r?\n/g).length-n).length;for(;r<l.length;r++)o+=tN(i=l[r],n,a),n&&!i.removed&&(n+=i.count);return o}s(X_,"lines");function Q_(e,t){let n=z6(e,t),r=0,i="",o,l=e.length,a=t.length,c=zh(e),u=zh(t);if(o=n[r],l!==a){if(o.removed&&n[r+1]){let d=o.count-n[r+1].count;d==0||(d>0?(t=" ".repeat(d)+t,u=" ".repeat(d)+u,a+=d):d<0&&(e=" ".repeat(-d)+e,c=" ".repeat(-d)+c,l+=-d))}}if(i+=IE(c,u,l,a),l===a)for(o=" ";r<l;r++)o+=e[r]===t[r]?" ":"^";else for(o=" ";r<n.length;r++)o+=(n[r].added||n[r].removed?"^":" ").repeat(Math.max(n[r].count,0)),r+1<n.length&&(n[r].added&&n[r+1].removed||n[r].removed&&n[r+1].added)&&(n[r+1].count-=n[r].count);return i+De.red(o)}s(Q_,"chars");function IE(e,t,n=String(e).length,r=String(t).length){let i=4,o=Math.max(n,r),l=typeof e,a=typeof t;if(l!==a){i=2;let c=i+o-n,u=i+o-r;e+=" ".repeat(c)+De.dim(`[${l}]`),t+=" ".repeat(u)+De.dim(`[${a}]`),n+=c+l.length+2,r+=u+a.length+2,o=Math.max(n,r)}return So["++"]("++"+t+" ".repeat(i+o-r)+xs("(Expected)"))+`
31
+ `+So["--"]("--"+e+" ".repeat(i+o-n)+xs("(Actual)"))+`
32
+ `}s(IE,"direct");function yu(e,t){var n,r=0,i,o=Array.isArray(e),l=[],a=o?Array(e.length):{};if(o)for(r=0;r<a.length;r++)i=e[r],!i||typeof i!="object"?a[r]=i:a[r]=yu(i,t[r]);else{for(n in t)l.push(n);for(;r<l.length;r++)Object.prototype.hasOwnProperty.call(e,n=l[r])&&(!(i=e[n])||typeof i!="object"?a[n]=i:a[n]=yu(i,t[n]));for(n in e)a.hasOwnProperty(n)||(a[n]=e[n])}return a}s(yu,"sort");function rN(){var e=new Set;return s(function(n,r){return r===void 0?"[__VOID__]":typeof r=="number"&&r!==r?"[__NAN__]":typeof r=="bigint"?r.toString():!r||typeof r!="object"?r:e.has(r)?"[Circular]":(e.add(r),r)},"print")}s(rN,"circular");function il(e){return JSON.stringify(e,rN(),2).replace(/"\[__NAN__\]"/g,"NaN").replace(/"\[__VOID__\]"/g,"undefined")}s(il,"stringify");function iN(e,t){if(Array.isArray(t)&&Array.isArray(e))return nN(e,t);if(t instanceof RegExp)return Q_(""+e,""+t);let n=e&&typeof e=="object",r=t&&typeof t=="object";return n&&r&&(e=yu(e,t)),r&&(t=il(t)),n&&(e=il(e)),t&&typeof t=="object"&&(e=il(yu(e,t)),t=il(t)),n=typeof e=="string",r=typeof t=="string",n&&/\r?\n/.test(e)?X_(e,""+t):r&&/\r?\n/.test(t)?X_(""+e,t):n&&r?Q_(e,t):IE(e,t)}s(iN,"compare");function xu(e){e=e.replace(/\r?\n/g,`
33
+ `);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}s(xu,"dedent");var oN=class extends Error{static{s(this,"Assertion")}constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}};function Cn(e,t,n,r,i,o,l){if(e)return;let a=l||o;if(l instanceof Error)throw l;let c=i&&i(t,n);throw new oN({actual:t,expects:n,operator:r,message:a,details:c,generated:!l})}s(Cn,"assert");function sN(e,t){Cn(!!e,!1,!0,"ok",!1,"Expected value to be truthy",t)}s(sN,"ok");function lN(e,t,n){Cn(e===t,e,t,"is",iN,"Expected values to be strictly equal:",n)}s(lN,"is");function li(e,t){Cn(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}s(li,"not");li.ok=li;lN.not=function(e,t,n){Cn(e!==t,e,t,"is.not",!1,"Expected values not to be strictly equal",n)};li.equal=function(e,t,n){Cn(!El(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};li.type=function(e,t,n){let r=typeof e;Cn(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};li.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Cn(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};li.snapshot=function(e,t,n){e=xu(e),t=xu(t),Cn(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};li.fixture=function(e,t,n){e=xu(e),t=xu(t),Cn(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};li.match=function(e,t,n){typeof t=="string"?Cn(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Cn(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};li.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Cn(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Cn(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Cn(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};var Ys={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},ev={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},tv={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},Xs="highlightSequenceTemporary",nv="highlightSequence",aN="highlight",cN="highlightText";function uN(){const e={name:"highlight",tokenize:n,resolveAll:t};return{text:{[Ys.equalsTo]:e},insideSpan:{null:[e]},attentionMarkers:{null:[Ys.equalsTo]}};function t(r,i){let o=-1;for(;++o<r.length;)if(r[o][0]==="enter"&&r[o][1].type===Xs&&r[o][1]._close){let l=o;for(;l--;)if(r[l][0]==="exit"&&r[l][1].type===Xs&&r[l][1]._open&&r[o][1].end.offset-r[o][1].start.offset===r[l][1].end.offset-r[l][1].start.offset){r[o][1].type=nv,r[l][1].type=nv;const a={type:aN,start:Object.assign({},r[l][1].start),end:Object.assign({},r[o][1].end)},c={type:cN,start:Object.assign({},r[l][1].end),end:Object.assign({},r[o][1].start)},u=[["enter",a,i],["enter",r[l][1],i],["exit",r[l][1],i],["enter",c,i]],d=i.parser.constructs.insideSpan.null;d&&zd(u,u.length,0,mk(d,r.slice(l+1,o),i)),zd(u,u.length,0,[["exit",c,i],["enter",r[o][1],i],["exit",r[o][1],i],["exit",a,i]]),zd(r,l-1,o-l+3,u),o=l+u.length-2;break}}for(o=-1;++o<r.length;)r[o][1].type===Xs&&(r[o][1].type=tv.data);return r}function n(r,i,o){const l=this.previous,a=this.events;let c=0;return u;function u(f){return sN(f===Ys.equalsTo,"expected `=`"),l===Ys.equalsTo&&a[a.length-1][1].type!==tv.characterEscape?o(f):(r.enter(Xs),d(f))}function d(f){const h=X1(l);if(f===Ys.equalsTo)return c>1?o(f):(r.consume(f),c++,d);if(c<2)return o(f);const g=r.exit(Xs),p=X1(f);return g._open=!p||p===ev.attentionSideAfter&&!!h,g._close=!h||h===ev.attentionSideAfter&&!!p,i(f)}}}s(uN,"highlightMark");var dN={}.hasOwnProperty,fN=Symbol("continue"),_f=Symbol("exit"),hN=Symbol("skip");function gN(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,l,a,c){return vf(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const d=n?rv(n(o,l,a,c)):[];if(d[0]===_f)return d;if(d[0]!==hN){let f;for(f in o)if(dN.call(o,f)&&o[f]&&typeof o[f]=="object"&&f!=="data"&&f!=="position"){const h=c.concat(o),g=o[f];if(Array.isArray(g)){const p=g;let _=0;for(;_>-1&&_<p.length;){const y=p[_];if(vf(y)){const v=i(y,f,_,h)();if(v[0]===_f)return v;_=typeof v[1]=="number"?v[1]:_+1}else _++}}else if(vf(g)){const p=i(g,f,void 0,h)();if(p[0]===_f)return p}}}return r?rv(r(o,l,a,c)):d}s(u,"visit")}s(i,"build")}s(gN,"visit");function rv(e){return Array.isArray(e)?e:typeof e=="number"?[fN,e]:[e]}s(rv,"toResult");function vf(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}s(vf,"nodelike");function pN(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],l=[],a=i.onComment,c=i.onToken;let u=!1,d,f;const h=Object.assign({},i,{onComment:o,preserveParens:!0});c&&(h.onToken=l);const g=mN(e,t.tokenTypes),p=g.value,_=n+p+r,y=t.expression&&iv(p);if(y&&!t.allowEmpty)throw new an("Unexpected empty expression",{place:x(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{d=t.expression&&!y?t.acorn.parseExpressionAt(_,0,h):t.acorn.parse(_,h)}catch(C){const b=C,S=x(b.pos);b.message=String(b.message).replace(/ \(\d+:\d+\)$/,""),b.pos=S.offset,b.loc={line:S.line,column:S.column-1},f=b,u=b.raisedAt>=n.length+p.length||b.message==="Unterminated comment"}if(d&&t.expression&&!y)if(iv(_.slice(d.end,_.length-r.length)))d={type:"Program",start:0,end:n.length+p.length,body:[{type:"ExpressionStatement",expression:d,start:0,end:n.length+p.length}],sourceType:"module",comments:[]};else{const C=x(d.end),b=new Error("Unexpected content after expression");b.pos=C.offset,b.loc={line:C.line,column:C.column-1},f=b,d=void 0}if(d){if(d.comments=o,gN(d,function(C,b,S,M){let T=M[M.length-1],E=b;C.type==="ParenthesizedExpression"&&T&&E&&(typeof S=="number"&&(T=T[E],E=S),T[E]=C.expression),v(C)}),Array.isArray(a))a.push(...o);else if(typeof a=="function")for(const C of o)a(C.type==="Block",C.value,C.start,C.end,C.loc.start,C.loc.end);for(const C of l)C.end<=n.length||C.start-n.length>=p.length||(v(C),Array.isArray(c)?c.push(C):c(C))}return{estree:d,error:f,swallow:u};function v(C){const b=x(C.start),S=x(C.end);C.start=b.offset,C.end=S.offset,C.loc={start:{line:b.line,column:b.column-1,offset:b.offset},end:{line:S.line,column:S.column-1,offset:S.offset}},C.range=[C.start,C.end]}function x(C){let b=C-n.length;b<0?b=0:b>p.length&&(b=p.length);let S=_N(g.stops,b);return S||(S={line:t.start.line,column:t.start.column,offset:t.start.offset}),S}}s(pN,"eventsToAcorn");function iv(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}s(iv,"empty$1");function mN(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const l=i[2].sliceStream(i[1]);for(;l.length>0&&l[0]===-1;)l.shift();const a=vN(l);n.stops.push([n.value.length,i[1].start]),n.value+=a,n.stops.push([n.value.length,i[1].end])}}}return n}s(mN,"collect");function _N(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}s(_N,"relativeToPoint");function vN(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:o="\r";break;case-4:o=`
34
+ `;break;case-3:o=`\r
35
+ `;break;case-2:o=" ";break;case-1:if(r)continue;o=" ";break;default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}s(vN,"serializeChunks");function yf(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=ov(n.start,r[0]||t.start),o=ov(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}s(yf,"positionFromEstree");function ov(e,t){if(e&&typeof e=="object"){const n="line"in e?xf(e.line):void 0,r="column"in e?xf(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:xf(t)}}}s(ov,"pointOrUndefined");function xf(e){return typeof e=="number"&&e>-1?e:void 0}s(xf,"numberOrUndefined");var is="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",yN="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",xN="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",sv="#unexpected-type-in-code-expected-an-object-spread-spread",CN="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",bN="#could-not-parse-expression-with-acorn";function lv(e,t,n,r,i,o,l,a,c,u,d){const f=this,h=this.events.length+3;let g=0,p,_;return y;function y(b){return e.enter(n),e.enter(r),e.consume(b),e.exit(r),p=f.now(),v}function v(b){if(b===null){if(_)throw _;const S=new an("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:f.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw S.url=is+yN,S}if(Tr(b))return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),C;if(b===125&&g===0){const S=o?EN.call(f,o,l,i,h,p,u||!1,c||!1):{type:"ok",estree:void 0};if(S.type==="ok"){e.enter(r),e.consume(b),e.exit(r);const M=e.exit(n);return a&&S.estree&&Object.assign(M,{estree:S.estree}),t}return _=S.message,e.enter(i),e.consume(b),x}return e.enter(i),x(b)}function x(b){return b===125&&g===0||b===null||Tr(b)?(e.exit(i),v(b)):(b===123&&!o?g+=1:b===125&&(g-=1),e.consume(b),x)}function C(b){const S=f.now();if(S.line!==p.line&&!d&&f.parser.lazy[S.line]){const M=new an("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:f.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw M.url=is+xN,M}return Pc(b)?Wg(e,v,"linePrefix",3)(b):v(b)}}s(lv,"factoryMdxExpression");function EN(e,t,n,r,i,o,l){const a=pN(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:l?"({":"",suffix:l?"})":""}),c=a.estree;if(l&&c){const u=c.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const d=yf(u),f=new an("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:d.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=is+sv,f}if(u.expression.properties[1]){const d=yf(u.expression.properties[1]),f=new an("Unexpected extra content in spread: only a single spread is supported",{place:d.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw f.url=is+CN,f}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const d=yf(u.expression.properties[0]),f=new an("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:d.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=is+sv,f}}if(a.error){const u=new an("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=is+bN,{type:"nok",message:u}}return{type:"ok",estree:c}}s(EN,"mdxExpressionParse");var av="https://github.com/micromark/micromark-extension-mdx-jsx";function NE(e,t,n,r,i,o,l,a,c,u,d,f,h,g,p,_,y,v,x,C,b,S,M,T,E,A,D,L,G,$,z,W){const ye=this;let q,ge;return me;function me(I){return e.enter(a),e.enter(c),e.consume(I),e.exit(c),oe}function oe(I){return Xi(I)?n(I):(q=Z,Fe(I))}function Z(I){if(I===47)return e.enter(u),e.consume(I),e.exit(u),q=pe,Fe;if(I===62)return Ln(I);if(I!==null&&I>=0&&rr(I))return e.enter(f),e.enter(h),e.consume(I),de;ze(I,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(I===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function pe(I){if(I===62)return Ln(I);if(I!==null&&I>=0&&rr(I))return e.enter(f),e.enter(h),e.consume(I),de;ze(I,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(I===42||I===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function de(I){if(I!==null&&I>=0&&zs(I,{jsx:!0}))return e.consume(I),de;if(I===46||I===47||I===58||I===62||I===123||Xi(I)||yi(I))return e.exit(h),q=ce,Fe(I);ze(I,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(I===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function ce(I){if(I===46)return e.enter(g),e.consume(I),e.exit(g),q=j,Fe;if(I===58)return e.enter(_),e.consume(I),e.exit(_),q=Ne,Fe;if(I===47||I===62||I===123||I!==null&&I>=0&&rr(I))return e.exit(f),Pe(I);ze(I,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function j(I){if(I!==null&&I>=0&&rr(I))return e.enter(p),e.consume(I),ne;ze(I,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ne(I){if(I!==null&&I>=0&&zs(I,{jsx:!0}))return e.consume(I),ne;if(I===46||I===47||I===62||I===123||Xi(I)||yi(I))return e.exit(p),q=ue,Fe(I);ze(I,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(I===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function ue(I){if(I===46)return e.enter(g),e.consume(I),e.exit(g),q=j,Fe;if(I===47||I===62||I===123||I!==null&&I>=0&&rr(I))return e.exit(f),Pe(I);ze(I,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ne(I){if(I!==null&&I>=0&&rr(I))return e.enter(y),e.consume(I),$e;ze(I,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(I===43||I!==null&&I>46&&I<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function $e(I){if(I!==null&&I>=0&&zs(I,{jsx:!0}))return e.consume(I),$e;if(I===47||I===62||I===123||Xi(I)||yi(I))return e.exit(y),q=Re,Fe(I);ze(I,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Re(I){if(I===47||I===62||I===123||I!==null&&I>=0&&rr(I))return e.exit(f),Pe(I);ze(I,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Pe(I){if(I===47)return e.enter(d),e.consume(I),e.exit(d),q=Yt,Fe;if(I===62)return Ln(I);if(I===123)return lv.call(ye,e,rt,v,x,C,r,i,o,!0,!1,l)(I);if(I!==null&&I>=0&&rr(I))return e.enter(b),e.enter(S),e.enter(M),e.consume(I),Je;ze(I,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function rt(I){return q=Pe,Fe(I)}function Je(I){if(I!==null&&I>=0&&zs(I,{jsx:!0}))return e.consume(I),Je;if(I===47||I===58||I===61||I===62||I===123||Xi(I)||yi(I))return e.exit(M),q=pt,Fe(I);ze(I,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function pt(I){if(I===58)return e.enter(T),e.consume(I),e.exit(T),q=It,Fe;if(I===61)return e.exit(S),e.enter(A),e.consume(I),e.exit(A),q=Ge,Fe;if(I===47||I===62||I===123||Xi(I)||yi(I)||I!==null&&I>=0&&rr(I))return e.exit(S),e.exit(b),q=Pe,Fe(I);ze(I,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function It(I){if(I!==null&&I>=0&&rr(I))return e.enter(E),e.consume(I),ut;ze(I,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ut(I){if(I!==null&&I>=0&&zs(I,{jsx:!0}))return e.consume(I),ut;if(I===47||I===61||I===62||I===123||Xi(I)||yi(I))return e.exit(E),e.exit(S),q=jt,Fe(I);ze(I,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function jt(I){if(I===61)return e.enter(A),e.consume(I),e.exit(A),q=Ge,Fe;if(I===47||I===62||I===123||I!==null&&I>=0&&rr(I))return e.exit(b),Pe(I);ze(I,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ge(I){if(I===34||I===39)return e.enter(D),e.enter(L),e.consume(I),e.exit(L),ge=I,Nt;if(I===123)return lv.call(ye,e,yt,$,z,W,r,i,o,!1,!1,l)(I);ze(I,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(I===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function yt(I){return e.exit(b),q=Pe,Fe(I)}function Nt(I){return I===null&&ze(I,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ge)+"`"),I===ge?(e.enter(L),e.consume(I),e.exit(L),e.exit(D),e.exit(b),ge=void 0,q=Pe,Fe):Tr(I)?(q=Nt,Fe(I)):(e.enter(G),it(I))}function it(I){return I===null||I===ge||Tr(I)?(e.exit(G),Nt(I)):(e.consume(I),it)}function Yt(I){if(I===62)return Ln(I);ze(I,"after self-closing slash","`>` to end the tag"+(I===42||I===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Ln(I){return e.enter(c),e.consume(I),e.exit(c),e.exit(a),t}function Fe(I){return Tr(I)?(e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),$n):Pc(I)||yi(I)?(e.enter("esWhitespace"),$t(I)):q(I)}function $t(I){return Tr(I)?(e.exit("esWhitespace"),Fe(I)):Pc(I)||yi(I)?(e.consume(I),$t):(e.exit("esWhitespace"),q(I))}function $n(I){if(!l&&ye.parser.lazy[ye.now().line]){const Pn=new an("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ye.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw Pn.url=av+"#unexpected-lazy-line-in-container-expected-line-to-be",Pn}return Fe(I)}function ze(I,Pn,R){const Y=new an("Unexpected "+(I===null?"end of file":"character `"+(I===96?"` ` `":String.fromCodePoint(I))+"` ("+SN(I)+")")+" "+Pn+", expected "+R,ye.now(),"micromark-extension-mdx-jsx:unexpected-"+(I===null?"eof":"character"));throw Y.url=av+(I===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Y}}s(NE,"factoryTag");function SN(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}s(SN,"serializeCharCode");function TN(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return NE.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}s(TN,"jsxText");function wN(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,o){const l=this;return a;function a(f){return c(f)}function c(f){return NE.call(l,r,u,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(f)}function u(f){return Pc(f)?Wg(r,d,"whitespace")(f):d(f)}function d(f){const h=l.parser.constructs.flow[123],g=Array.isArray(h)?h:h?[h]:[];let p;for(const _ of g)if(_.name==="mdxFlowExpression"){p=_;break}return f===60?a(f):f===123&&p?r.attempt(p,d,o)(f):f===null||Tr(f)?i(f):o(f)}}}s(wN,"jsxFlow");function kN(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:wN(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:TN(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}s(kN,"mdxJsx");function MN(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}s(MN,"mdxMd");var cv={}.hasOwnProperty;function AN(e,t){const n=t||{};function r(i,...o){let l=r.invalid;const a=r.handlers;if(i&&cv.call(i,e)){const c=String(i[e]);l=cv.call(a,c)?a[c]:r.unknown}if(l)return l.call(this,i,...o)}return s(r,"one"),r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}s(AN,"zwitch");var IN={}.hasOwnProperty;function OE(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)OE(e,t.extensions[n]);for(r in t)if(IN.call(t,r))switch(r){case"extensions":break;case"unsafe":uv(e[r],t[r]);break;case"join":uv(e[r],t[r]);break;case"handlers":NN(e[r],t[r]);break;default:e.options[r]=t[r]}return e}s(OE,"configure");function uv(e,t){t&&e.push(...t)}s(uv,"list");function NN(e,t){t&&Object.assign(e,t)}s(NN,"map");var ON=[DN];function DN(e,t,n,r){if(t.type==="code"&&Q1(t,r)&&(e.type==="list"||e.type===t.type&&Q1(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&xk(t,r))?void 0:n.spread?1:0}s(DN,"joinDefaults");var to=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],RN=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
36
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:to},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
37
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:to},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
38
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:to},{atBreak:!0,character:"+",after:`(?:[ \r
39
+ ])`},{atBreak:!0,character:"-",after:`(?:[ \r
40
+ -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
41
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:to},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:to},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:to},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:to},{atBreak:!0,character:"~"}];function LN(e){return e.label||!e.identifier?e.label||"":wk(e.identifier)}s(LN,"association");function $N(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}s($N,"compilePattern");function PN(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let l=-1,a=n.before,c;r.push(-1);let u=t.createTracker(n);for(;++l<i.length;){const d=i[l];let f;if(r[r.length-1]=l,l+1<i.length){let p=t.handle.handlers[i[l+1].type];p&&p.peek&&(p=p.peek),f=p?p(i[l+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else f=n.after;o.length>0&&(a==="\r"||a===`
42
+ `)&&d.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",u=t.createTracker(n),u.move(o.join("")));let h=t.handle(d,e,t,{...u.current(),after:f,before:a});c&&c===h.slice(0,1)&&(h=zf(c.charCodeAt(0))+h.slice(1));const g=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,g&&(o.length>0&&g.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+zf(a.charCodeAt(0))),g.after&&(c=f)),u.move(h),o.push(h),a=h.slice(-1)}return r.pop(),o.join("")}s(PN,"containerPhrasing");function FN(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),l=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a,l.push(o.move(t.handle(c,e,t,{before:`
43
+ `,after:`
44
+ `,...o.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(VN(c,i[a+1],e,t)))}return r.pop(),l.join("")}s(FN,"containerFlow");function VN(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
45
+ `.repeat(1+o);if(o===!1)return`
46
+
47
+ <!---->
48
+
49
+ `}return`
50
+
51
+ `}s(VN,"between");var BN=/\r?\n|\r/g;function HN(e,t){const n=[];let r=0,i=0,o;for(;o=BN.exec(e);)l(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return l(e.slice(r)),n.join("");function l(a){n.push(t(a,i,!a))}s(l,"one")}s(HN,"indentLines");function KN(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],l={};let a=-1;for(;++a<e.unsafe.length;){const d=e.unsafe[a];if(!fk(e.stack,d))continue;const f=e.compilePattern(d);let h;for(;h=f.exec(r);){const g="before"in d||!!d.atBreak,p="after"in d,_=h.index+(g?h[1].length:0);i.includes(_)?(l[_].before&&!g&&(l[_].before=!1),l[_].after&&!p&&(l[_].after=!1)):(i.push(_),l[_]={before:g,after:p})}}i.sort(UN);let c=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const d=i[a];d<c||d>=u||d+1<u&&i[a+1]===d+1&&l[d].after&&!l[d+1].before&&!l[d+1].after||i[a-1]===d-1&&l[d].before&&!l[d-1].before&&!l[d-1].after||(c!==d&&o.push(dv(r.slice(c,d),"\\")),c=d,/[!-/:-@[-`{-~]/.test(r.charAt(d))&&(!n.encode||!n.encode.includes(r.charAt(d)))?o.push("\\"):(o.push(zf(r.charCodeAt(d))),c++))}return o.push(dv(r.slice(c,u),n.after)),o.join("")}s(KN,"safe");function UN(e,t){return e-t}s(UN,"numerical");function dv(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let l=-1,a=0,c;for(;c=n.exec(o);)r.push(c.index);for(;++l<r.length;)a!==r[l]&&i.push(e.slice(a,r[l])),i.push("\\"),a=r[l];return i.push(e.slice(a)),i.join("")}s(dv,"escapeBackslashes");function WN(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:c,current:l,shift:a};function l(){return{now:{line:i,column:o},lineShift:r}}function a(u){r+=u}function c(u){const d=u||"",f=d.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,o=f.length===1?o+h.length:1+h.length+r,d}}s(WN,"track");function DE(e,t){const n=t||{},r={associationId:LN,containerPhrasing:GN,containerFlow:qN,createTracker:WN,compilePattern:$N,enter:o,handlers:{...Tk},handle:void 0,indentLines:HN,indexStack:[],join:[...ON],options:{},safe:ZN,stack:[],unsafe:[...RN]};OE(r,n),r.options.tightDefinitions&&r.join.push(JN),r.handle=AN("type",{invalid:zN,unknown:jN,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
52
+ `,after:`
53
+ `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
54
+ `),i;function o(l){return r.stack.push(l),a;function a(){r.stack.pop()}s(a,"exit")}s(o,"enter")}s(DE,"toMarkdown");function zN(e){throw new Error("Cannot handle value `"+e+"`, expected node")}s(zN,"invalid$1");function jN(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}s(jN,"unknown");function JN(e,t){if(e.type==="definition"&&e.type===t.type)return 0}s(JN,"joinDefinition");function GN(e,t){return PN(e,this,t)}s(GN,"containerPhrasingBound");function qN(e,t){return FN(e,this,t)}s(qN,"containerFlowBound");function ZN(e,t){return KN(this,e,t)}s(ZN,"safeBound");var YN=["mdxJsxTextElement","mdxJsxFlowElement"];function RE(e){return YN.includes(e.type)&&XN.includes(e.name)}s(RE,"isMdastHTMLNode");var XN=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function QN(e,t){const n=fv(e),r=fv(t);return e4({...n,...r})}s(QN,"mergeStyleAttributes");function fv(e){const t={};return e.split(";").filter(n=>n.trim()!=="").forEach(n=>{const[r,i]=n.split(":").map(o=>o.trim());t[r]=i}),t}s(fv,"styleToObject");function e4(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}s(e4,"objectToStyle");function t4(e){return e.children instanceof Array}s(t4,"isParent$1");function LE({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const l=new Set,a=new Map;t=[...t].sort((v,x)=>(x.priority??0)-(v.priority??0)),f(e,null);function c(v,x){l.add(v),x&&a.set(v,{...x})}s(c,"registerReferredComponent");function u(v,x){if(o===null)return o=x,o;if(!t4(v))throw new Error("Attempting to append children to a non-parent");const C=v.children,b=C.at(-1);if(b){const S=t.find(M=>{var T;return(T=M.shouldJoin)==null?void 0:T.call(M,b,x)});if(S){const M=S.join(b,x);return C.splice(C.length-1,1,M),M}}return C.push(x),x}s(u,"appendToParent");function d(v,x){v.getChildren().forEach(C=>{f(C,x)})}s(d,"visitChildren");function f(v,x,C=null){var b;const S=t.find((M,T)=>{var E;return C?.has(T)?!1:(E=M.testLexicalNode)==null?void 0:E.call(M,v)});if(!S)throw new Error(`no lexical visitor found for ${v.getType()}`,{cause:v});(b=S.visitLexicalNode)==null||b.call(S,{lexicalNode:v,mdastParent:x,actions:{addAndStepInto(M,T={},E=!0){const A={type:M,...T,...E?{children:[]}:{}};u(x,A),xe(v)&&E&&d(v,A)},appendToParent:u,visitChildren:d,visit:f,registerReferredComponent:c,nextVisitor(){f(v,x,(C??new Set).add(t.indexOf(S)))}}})}if(s(f,"visit"),o===null)throw new Error("traversal ended with no root element");const h=new Map,g=new Map;for(const v of l){const x=n.find(C=>C.name===v)??a.get(v)??n.find(C=>C.name==="*");if(!x)throw new Error(`Component ${v} is used but not imported`);if(x.source)if(x.defaultExport)g.set(v,x.source);else{const{source:C}=x,b=h.get(C);b?b.push(v):h.set(C,[v])}}if(!i){for(const[v,x]of h.entries()){const C=x.filter(b=>a.has(b));C.length>0?h.set(v,C):h.delete(v)}for(const v of g.keys())a.has(v)||g.delete(v)}const p=Array.from(h).map(([v,x])=>({type:"mdxjsEsm",value:`import { ${x.join(", ")} } from '${v}'`}));p.push(...Array.from(g).map(([v,x])=>({type:"mdxjsEsm",value:`import ${v} from '${x}'`})));const _=o,y=_.children.find(v=>v.type==="yaml");return y?_.children.splice(_.children.indexOf(y)+1,0,...p):_.children.unshift(...p),Ic(_,[]),$E(_),r||PE(_),_}s(LE,"exportLexicalTreeToMdast");function $E(e){if("children"in e&&e.children.length>0){if(RE(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=QN(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{$E(t)})}}s($E,"collapseNestedHtmlTags");function PE(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),PE(r))}),t.children=n}}s(PE,"convertUnderlineJsxToHtml");var hv=/\s+$/,gv=/^\s+/;function Ic(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if(n?.type==="text"){const i=hv.exec(n.value);if(i){n.value=n.value.replace(hv,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),Ic(o,t.slice(0,-1)))}}const r=e.children.at(0);if(r?.type==="text"){const i=gv.exec(r.value);if(i){r.value=r.value.replace(gv,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),Ic(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{Ic(r,[...t,n])})}}s(Ic,"fixWrappingWhitespace");function FE({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return DE(LE({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
55
+ `}s(FE,"exportMarkdownFromLexical");var so=class extends Error{static{s(this,"JsxKindMismatchError")}constructor(e,t,n,r){const i=e.name??"Fragment",o=e.type==="mdxJsxFlowElement"?"flow":"text",l=r?` ${r}`:"";super(`JSX component "${i}" was parsed as ${o} but is declared as ${t.kind} (kindMismatchPolicy: "${n}").${l}`),this.name="JsxKindMismatchError"}},n4=new Set(["paragraph","heading","emphasis","strong","delete","link","linkReference","tableCell","footnote","mdxJsxTextElement","textDirective","leafDirective"]),r4=new Set(["root","blockquote","listItem","footnoteDefinition","mdxJsxFlowElement","containerDirective"]);function Nc(e){return e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement"}s(Nc,"isJsxNode");function VE(e,t){return t.find(n=>n.name===e.name)??t.find(n=>n.name==="*")}s(VE,"findDescriptor");function Oc(e,t){return(e.type==="mdxJsxFlowElement"?"flow":"text")!==t.kind}s(Oc,"isMismatch");function BE(e,t,n){if(Nc(e)){const r=VE(e,t);if(r&&n(e)&&Oc(e,r))throw new so(e,r,"error")}"children"in e&&e.children.forEach(r=>{BE(r,t,n)})}s(BE,"assertNoMismatches");function i4(e,t,n){const r=s(f=>n(f)?VE(f,t):void 0,"findOwnedDescriptor");function i(f){const h=n4.has(f.type)?"phrasing":r4.has(f.type)?"flow":"structural";return h==="phrasing"?f.children=f.children.flatMap(g=>a(g,f.type)):h==="flow"?f.children=f.children.flatMap(g=>u(g)):f.children=f.children.map(g=>l(g,f.type)),f}s(i,"normalizeParent");function o(f){return"children"in f&&i(f),f}s(o,"normalizeDescendants");function l(f,h){if(Nc(f)){const g=r(f);if(g&&Oc(f,g))throw new so(f,g,"normalize",`The ${h} parent does not declare whether its children are flow or phrasing content.`)}return o(f)}s(l,"normalizeStructuralChild");function a(f,h){if(!Nc(f))return[o(f)];const g=r(f);if(!g||!Oc(f,g))return[o(f)];if(f.type==="mdxJsxTextElement")throw new so(f,g,"normalize",`It cannot be lifted from ${h} without changing surrounding phrasing content.`);return[o(d(f,g))]}s(a,"normalizePhrasingChild");function c(f){const h=f.children.find(p=>{if(p.type!=="mdxJsxTextElement")return!1;const _=r(p);return _?.kind==="flow"});if(!h)return[i(f)];const g=r(h);if(f.children.length!==1)throw new so(h,g,"normalize","It has surrounding phrasing content, and normalization would need to split the paragraph.");return[o({...h,type:"mdxJsxFlowElement",children:h.children.length===0?[]:[{type:"paragraph",children:h.children}]})]}s(c,"normalizeParagraph");function u(f){if(f.type==="paragraph")return c(f);if(!Nc(f))return[o(f)];const h=r(f);if(!h||!Oc(f,h))return[o(f)];if(f.type==="mdxJsxTextElement")throw new so(f,h,"normalize","A text JSX node can be normalized to flow only when it is the sole child of a paragraph.");return[{type:"paragraph",children:[o(d(f,h))]}]}s(u,"normalizeFlowChild");function d(f,h){if(f.children.length===0)return{...f,type:"mdxJsxTextElement",children:[]};if(f.children.length!==1||f.children[0].type!=="paragraph")throw new so(f,h,"normalize","Its block children cannot be represented as one phrasing-content sequence without data loss.");return{...f,type:"mdxJsxTextElement",children:f.children[0].children}}return s(d,"convertFlowToText"),i(e)}s(i4,"normalizeTree");function o4(e,t,n,r=()=>!0){return n==="source"?e:n==="error"?(BE(e,t,r),e):i4(structuredClone(e),t,r)}s(o4,"reconcileJsxKindMismatches");function Qs(e){return e.children instanceof Array}s(Qs,"isParent");var jh=class extends Error{static{s(this,"MarkdownParseError")}constructor(e,t){super(e),this.name="MarkdownParseError",this.cause=t}},Jh=class extends Error{static{s(this,"UnrecognizedMarkdownConstructError")}constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}};function s4(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(n=>n.type==="mdxjsEsm").filter(n=>n.value.startsWith("import ")).forEach(n=>{var r,i;(((i=(r=n.data)==null?void 0:r.estree)==null?void 0:i.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(l=>{t.set(l.local.name,{source:`${o.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}s(s4,"gatherMetadata");function l4({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var l;let a;try{a=Ek(t,{extensions:r,mdastExtensions:i})}catch(c){throw c instanceof Error?new jh(`Error parsing markdown: ${c.message}`,c):new jh(`Error parsing markdown: ${c}`,c)}a.children.length===0&&a.children.push({type:"paragraph",children:[]}),((l=a.children.at(-1))==null?void 0:l.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),HE({root:e,mdastRoot:a,visitors:n,...o})}s(l4,"importMarkdownToLexical");function HE({root:e,mdastRoot:t,visitors:n,...r}){n=n.sort((d,f)=>(f.priority??0)-(d.priority??0));function i(d,f=null){return n.find((h,g)=>f?.has(g)?!1:typeof h.testNode=="string"?h.testNode===d.type:h.testNode(d,r))}s(i,"findVisitor"),t=o4(t,r.jsxComponentDescriptors,r.jsxKindMismatchPolicy??"source",d=>{var f;return((f=i(d))==null?void 0:f.jsxKindReconciliationOwner)===!0});const o=new WeakMap,l=new WeakMap,a=s4(t);function c(d,f){if(!Qs(d))throw new Error("Attempting to visit children of a non-parent");d.children.forEach(h=>{u(h,f,d)})}s(c,"visitChildren");function u(d,f,h,g=null){const p=i(d,g);if(!p)try{throw new Jh(`Unsupported markdown syntax: ${DE(d)}`)}catch{throw new Jh(`Parsing of the following markdown structure failed: ${JSON.stringify({type:d.type,name:"name"in d?d.name:"N/A"})}`)}p.visitNode({mdastNode:d,lexicalParent:f,mdastParent:h,descriptors:r,metaData:a,actions:{visitChildren:c,nextVisitor(){u(d,f,h,(g??new Set).add(n.indexOf(p)))},addAndStepInto(_){f.append(_),Qs(d)&&c(d,_)},addFormatting(_,y){y||Qs(d)&&(y=d),y&&o.set(y,_|(o.get(h)??0))},removeFormatting(_,y){y||Qs(d)&&(y=d),y&&o.set(y,_^(o.get(h)??0))},getParentFormatting(){return o.get(h)??0},addStyle(_,y){y||Qs(d)&&(y=d),y&&l.set(y,_)},getParentStyle(){return l.get(h)??""}}})}s(u,"visit"),u(t,e,null)}s(HE,"importMdastTreeToLexical");function go(){}s(go,"noop$1");var a4=Object.defineProperty,c4=s((e,t,n)=>t in e?a4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$3"),Cf=s((e,t,n)=>c4(e,typeof t!="symbol"?t+"":t,n),"__publicField$3"),pv="generic-html",_m=class KE extends Lr{static{s(this,"GenericHTMLNode")}constructor(t,n,r,i){super(i),Cf(this,"__tag"),Cf(this,"__nodeType"),Cf(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return pv}static clone(t){return new KE(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=UE(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:pv,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}};function UE(e,t,n){return ci(new _m(e,t,n))}s(UE,"$createGenericHTMLNode");function u4(e){return e instanceof _m}s(u4,"$isGenericHTMLNode");var d4={testLexicalNode:u4,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},f4={testLexicalNode:Dr,visitLexicalNode:s(({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
56
+ `})},"visitLexicalNode")},h4={testLexicalNode:wa,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("paragraph")},"visitLexicalNode")},g4={testLexicalNode:ka,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("root")},"visitLexicalNode")};function mv(e){return e.type==="text"}s(mv,"isMdastText");var p4=["u","span","sub","sup"],m4={shouldJoin:s((e,t)=>{if(["text","emphasis","strong","highlight"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&p4.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},"shouldJoin"),join(e,t){return mv(e)&&mv(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:Ae,visitLexicalNode:s(({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=Ae(r)?r.getFormat():0,o=e.getTextContent(),l=e.getFormat(),a=e.getStyle();let c=t;if(a&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:a}]})),i&l&8&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&l&64&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&l&32&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&l&2&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),i&l&1&&(c=n.appendToParent(c,{type:"strong",children:[]})),i&l&4&&(c=n.appendToParent(c,{type:"delete",children:[]})),i&l&128&&(c=n.appendToParent(c,{type:"highlight",children:[]})),l&8&&!(i&8)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),l&64&&!(i&64)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),l&32&&!(i&32)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),l&2&&!(i&2)&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),l&1&&!(i&1)&&(c=n.appendToParent(c,{type:"strong",children:[]})),l&4&&!(i&4)&&(c=n.appendToParent(c,{type:"delete",children:[]})),l&128&&!(i&128)&&(c=n.appendToParent(c,{type:"highlight",children:[]})),l&16){n.appendToParent(c,{type:"inlineCode",value:o});return}n.appendToParent(c,{type:"text",value:o})},"visitLexicalNode")},_4={testNode:"break",visitNode:s(function({lexicalParent:e}){e.append(Or())},"visitNode")};function nc(e,t){return[{testNode:s(n=>n.type==="mdxJsxTextElement"&&n.name===e,"testNode"),visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:s(n=>n.type==="html"&&n.value===`<${e}>`,"testNode"),visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:s(n=>n.type==="html"&&n.value===`</${e}>`,"testNode"),visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}s(nc,"buildFormattingVisitors");var v4={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(4),t.visitChildren(e,n)}},y4={testNode:"highlight",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(128),t.visitChildren(e,n)}},x4={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(pr(e.value).setFormat(t.getParentFormatting()|16))}},C4=[{testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(2),t.visitChildren(e,n)}},{testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(1),t.visitChildren(e,n)}},...nc("u",8),...nc("code",16),x4,v4,y4,...nc("sup",64),...nc("sub",32)],b4={testNode:RE,visitNode:s(function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(UE(e.name,e.type,e.attributes))},"visitNode"),priority:-100},E4=["listitem","admonition"],S4={testNode:"paragraph",visitNode:s(function({mdastNode:e,mdastParent:t,lexicalParent:n,actions:r}){const i=n.getType();if(E4.includes(i)){const o=t?.children.indexOf(e)??-1,l=o>0?t?.children.at(o-1):void 0;i==="listitem"&&l?.type==="paragraph"&&n.append(Or(),Or()),r.visitChildren(e,n)}else r.addAndStepInto(Xe())},"visitNode")},T4={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},w4={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=pr(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},ir={dash:45,eof:null,exclamationMark:33,greaterThan:62},no={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function k4(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}s(k4,"commentFromMarkdown");var _v=s((e,t,n)=>{return r;function r(p){return e.enter("comment"),e.consume(p),i}function i(p){return p===ir.exclamationMark?(e.consume(p),o):n(p)}function o(p){return p===ir.dash?(e.consume(p),l):n(p)}function l(p){return p===ir.dash?(e.consume(p),a):n(p)}function a(p){return p===ir.greaterThan?n(p):Tr(p)?d(p):(e.enter(no.data),p===ir.dash?(e.consume(p),c):u(p))}function c(p){return p===ir.greaterThan?n(p):u(p)}function u(p){return p===ir.eof?n(p):p===ir.dash?(e.consume(p),h):Tr(p)?(e.exit(no.data),d(p)):(e.consume(p),u)}function d(p){return e.enter(no.lineEnding),e.consume(p),e.exit(no.lineEnding),Wg(e,f,no.linePrefix)}function f(p){return Tr(p)?d(p):(e.enter(no.data),u(p))}function h(p){return p===ir.dash?(e.consume(p),g):u(p)}function g(p){return p===ir.greaterThan?(e.exit(no.data),e.enter("commentEnd"),e.consume(p),e.exit("commentEnd"),e.exit("comment"),t(p)):p===ir.dash?(e.consume(p),g):u(p)}},"tokenize"),M4={flow:{60:{tokenize:_v,concrete:!0}},text:{60:{tokenize:_v}}},A4="_bold_6j9u9_10",I4="_italic_6j9u9_14",N4="_underline_6j9u9_18",O4="_strikethrough_6j9u9_34",D4="_underlineStrikethrough_6j9u9_38",R4="_subscript_6j9u9_42",L4="_superscript_6j9u9_47",$4="_code_6j9u9_52",P4="_quote_6j9u9_59",F4="_nestedListItem_6j9u9_66",V4="_listitem_6j9u9_76",B4="_listItemChecked_6j9u9_80",H4="_listItemUnchecked_6j9u9_81",K4="_admonitionDanger_6j9u9_158",U4="_admonitionInfo_6j9u9_159",W4="_admonitionNote_6j9u9_160",z4="_admonitionTip_6j9u9_161",j4="_admonitionCaution_6j9u9_162",J4="_mdxExpression_6j9u9_195",Pt={bold:A4,italic:I4,underline:N4,strikethrough:O4,underlineStrikethrough:D4,subscript:R4,superscript:L4,code:$4,quote:P4,nestedListItem:F4,listitem:V4,listItemChecked:B4,listItemUnchecked:H4,admonitionDanger:K4,admonitionInfo:U4,admonitionNote:W4,admonitionTip:z4,admonitionCaution:j4,mdxExpression:J4},WE={quote:Pt.quote,text:{bold:Pt.bold,italic:Pt.italic,underline:Pt.underline,code:Pt.code,strikethrough:Pt.strikethrough,subscript:Pt.subscript,superscript:Pt.superscript,underlineStrikethrough:Pt.underlineStrikethrough},list:{listitem:Pt.listitem,listitemChecked:Pt.listItemChecked,listitemUnchecked:Pt.listItemUnchecked,nested:{listitem:Pt.nestedListItem}},admonition:{danger:Pt.admonitionDanger,info:Pt.admonitionInfo,note:Pt.admonitionNote,tip:Pt.admonitionTip,caution:Pt.admonitionCaution}},zE=(0,m.createContext)(null);function fn(){const e=(0,m.useContext)(zE);return e??(function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const o of n)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),e}s(fn,"o$6");function G4(){return Lt().getTextContent()}s(G4,"s$6");function q4(e,t=!0){if(e)return!1;let n=G4();return t&&(n=n.trim()),n===""}s(q4,"f$3");function Z4(e){if(!q4(e,!1))return!1;const t=Lt().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Un(i))return!1;if(xe(i)){if(!wa(i)||i.__indent!==0)return!1;const o=i.getChildren(),l=o.length;for(let a=0;a<l;a++){const c=o[r];if(!Ae(c))return!1}}}return!0}s(Z4,"c$4");function jE(e){return()=>Z4(e)}s(jE,"g");var JE=md?m.useLayoutEffect:m.useEffect;function Y4({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:l,ariaInvalid:a,ariaLabel:c,ariaLabelledBy:u,ariaMultiline:d,ariaOwns:f,ariaRequired:h,autoCapitalize:g,className:p,id:_,role:y="textbox",spellCheck:v=!0,style:x,tabIndex:C,"data-testid":b,...S},M){const[T,E]=(0,m.useState)(e.isEditable()),A=(0,m.useCallback)(L=>{L&&L.ownerDocument&&L.ownerDocument.defaultView?e.setRootElement(L):e.setRootElement(null)},[e]),D=(0,m.useMemo)(()=>(function(...L){return G=>{for(const $ of L)typeof $=="function"?$(G):$!=null&&($.current=G)}})(M,A),[A,M]);return JE(()=>(E(e.isEditable()),e.registerEditableListener(L=>{E(L)})),[e]),(0,ee.jsx)("div",{"aria-activedescendant":T?t:void 0,"aria-autocomplete":T?n:"none","aria-controls":T?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":T&&y==="combobox"?!!l:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":c,"aria-labelledby":u,"aria-multiline":d,"aria-owns":T?f:void 0,"aria-readonly":!T||void 0,"aria-required":h,autoCapitalize:g,className:p,contentEditable:T,"data-testid":b,id:_,ref:D,role:y,spellCheck:v,style:x,tabIndex:C??(T?void 0:-1),...S})}s(Y4,"b$1");var X4=(0,m.forwardRef)(Y4);function vv(e){return e.read("latest",jE(e.isComposing()))}s(vv,"x$3");var vm=(0,m.forwardRef)(Q4);function Q4(e,t){const{placeholder:n,...r}=e,[i]=fn();return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(X4,{editor:i,...r,ref:t}),n!=null&&(0,ee.jsx)(eO,{editor:i,content:n})]})}s(Q4,"E");function eO({content:e,editor:t}){const n=(function(l){const[a,c]=(0,m.useState)(()=>vv(l));return JE(()=>{function u(){const d=vv(l);c(d)}return s(u,"t"),u(),At(l.registerUpdateListener(()=>{u()}),l.registerEditableListener(()=>{u()}))},[l]),a})(t),[r,i]=(0,m.useState)(t.isEditable());if((0,m.useLayoutEffect)(()=>(i(t.isEditable()),t.registerEditableListener(l=>{i(l)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:(0,ee.jsx)("div",{"aria-hidden":!0,children:o})}s(eO,"y$1");var tO=class extends m.Component{static{s(this,"t$3")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:new Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function ym({children:e,fallback:t,onError:n}){return(0,ee.jsx)(tO,{fallback:t===void 0?(0,ee.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):t,onError:n,children:e})}s(ym,"e$2");var Cu=Fr({name:"@lexical/react/ReactProvider"});function nO(e,t){const[n]=t,r=e.decorators.map(i=>typeof i=="function"?(0,ee.jsx)(i,{context:t}):i);return function(i){const{EditorChildrenComponent:o=e.EditorChildrenComponent,ErrorBoundary:l=e.ErrorBoundary,contentEditable:a=e.contentEditable,children:c}=i,u=(function(f,h){const[g,p]=(0,m.useMemo)(()=>[y=>f.registerDecoratorListener(y),()=>f.getDecorators()],[f]),_=(0,m.useSyncExternalStore)(g,p,p);return(0,m.useMemo)(()=>{const y=[];for(const v in _){const x=f.getElementByKey(v);if(x!==null){const C=(0,ee.jsx)(h,{onError:s(b=>{f._onError(b)},"onError"),children:(0,ee.jsx)(m.Suspense,{fallback:null,children:_[v]})});y.push((0,Bc.createPortal)(C,x,v))}}return y},[h,_,f])})(n,l),d=(0,m.useMemo)(()=>r.map((f,h)=>(0,ee.jsx)(l,{onError:s(g=>{n._onError(g)},"onError"),children:(0,ee.jsx)(m.Suspense,{fallback:null,children:f})},h)),[l]);return(0,ee.jsx)(zE.Provider,{value:t,children:(0,ee.jsxs)(o,{context:t,contentEditable:a,children:[c,d,u]})})}}s(nO,"p$2");function rO({contentEditable:e,children:t}){return(0,ee.jsxs)(ee.Fragment,{children:[e,t]})}s(rO,"h");var GE=Fr({build(e,t,n){n.getPeer(Cu.name)||(function(i,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",i);for(const c of o)a.append("v",c);throw l.search=a.toString(),Error(`Minified Lexical error #${i}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(321,[...n.getDirectDependentNames()].join(" "));const r=[e,{getTheme:s(()=>e._config.theme,"getTheme")}];return{Component:nO(t,r),context:r}},config:{EditorChildrenComponent:rO,ErrorBoundary:ym,contentEditable:(0,ee.jsx)(vm,{}),decorators:[]},mergeConfig(e,t){const n=bd(e,t);return t.decorators&&(n.decorators=t.decorators.length>0?[...e.decorators,...t.decorators]:e.decorators),n},name:"@lexical/react/React",peerDependencies:[h7(Cu.name)]}),iO=new WeakSet,oO=new WeakMap,sO=new Set([fb,Ls,ub,gb,lm]),ro=new WeakMap;function lO(e){return ts(ds,{createInitialHistoryState:s(()=>e,"createInitialHistoryState"),disabled:!1})}s(lO,"externalHistoryExtension");function qE({name:e,namespace:t,nodes:n,theme:r,editable:i=!0,parentEditor:o,historyMode:l,historyState:a,initialEditorState:c,onError:u=s(d=>{throw d},"onError")}){const d=[Cu,ts(GE,{contentEditable:null}),ts(Bb,{setOptions:{tag:ho},updateOptions:{tag:ho}})];if(o&&d.push(ts(X7,{$getParentEditor:s(()=>o,"$getParentEditor"),inheritEditableFromParent:!0})),l==="nested-shared")d.push(oI);else if(l==="root-shared"||l==="nested-external"){if(!a)throw new Error(`${l} requires a historyState`);d.push(lO(a))}else l==="table-local"&&d.push(ts(ds,{disabled:!1}));const f=Fr({name:e,namespace:t,nodes:n?.filter(b=>!sO.has(b)),theme:r,editable:i,$initialEditorState:c,onError:u,dependencies:d}),h=J7(f),g=qi(h,ds.name),p=g?.output.historyState.value;p&&oO.set(h,p),p&&(ro.has(p)||ro.set(p,p.current));const _=p?h.registerUpdateListener(({dirtyElements:b,dirtyLeaves:S,tags:M})=>{const T=p.current;if(M.has(ho)){ro.set(p,T);return}if(b.size>0||S.size>0){ro.set(p,T);return}const E=ro.get(p);T?.editor===h&&E&&E.editor!==h&&(p.undoStack.push({...E}),p.redoStack=[],h.dispatchCommand(es,!0),h.dispatchCommand(Qo,!1)),ro.set(p,T)}):()=>{},y=new Set,v=p?h.registerCommand(im,()=>{const b=setTimeout(()=>{y.delete(b),h.dispatchCommand(es,p.undoStack.length>0),h.dispatchCommand(Qo,p.redoStack.length>0)});return y.add(b),!1},st):()=>{},x=h.dispose.bind(h);let C=!1;return h.dispose=()=>{C||(C=!0,y.forEach(clearTimeout),y.clear(),v(),_(),x())},l==="root-shared"&&iO.add(h),h}s(qE,"createExtensionEditor");var Xl=br("NESTED_EDITOR_UPDATED_COMMAND"),fi=he(null),gt=he(null),Gh=he(""),qh=he(!0),_r=he(!1,e=>{e.sub(e.pipe(_r,mt(fi)),([t,n])=>{n?.setEditable(!t)})}),Zh=he(""),yv=he(!1),Ql=he(!1),aO=he(0),bu=he(null),Yh=wt(e=>{e.link(e.pipe(bu,Qu(t=>t!==null)),Yh)}),cO=wt(e=>{e.sub(e.pipe(cO,mt(gt)),([t,n])=>{n?.dispatchCommand(tb,t)})}),Cs=he(null,e=>{e.sub(e.pipe(Cs,mt(gt)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:dt(r,l=>{const a=l.getParent();return a!==null&&xn(a)});i??(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const l=kd(i)?i.getTag():i.getType();e.pub(gO,l)}})}),ZE=he(""),To=he(""),Eu=he(!1),Md=wt(e=>{e.link(To,Md),e.sub(ZE,t=>{e.pubIn({[Eu]:!0,[To]:t})})}),Xh=wt(e=>{e.link(e.pipe(Md,mt(Qh),Qu(([,t])=>!t),$i(([t])=>t)),Xh)},!0),xm=he([]),Cm=he([]),YE=he([]),XE=he([]),Ad=he([]),bm=he([]),Su=he({}),Em=he(!1),Id=he([]),uO=he("source"),QE=he([]),La=he([]),bs=he(""),Po=he(null),dO=he(null),eS=he(null),hi=rn(Cm),$r=rn(xm),Tu=rn(YE),wu=rn(XE),gi=rn(Ad),Sm=rn(bm),Qh=he(!1),Tm=wt(e=>{e.sub(e.pipe(Tm,mt(To,fi,Ql),Qu(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(Qh,!0),n?.update(()=>{Lt().clear(),wm(e,Lt(),t),r?n.focus():Xn(null)},{onUpdate:s(()=>{e.pub(Qh,!1)},"onUpdate")})})}),tS=wt(e=>{e.sub(e.pipe(tS,mt(gt,Ql)),([t,n,r])=>{n?.update(()=>{const i=re();if(i!==null){const o={children:[],append(l){this.children.push(l)},getType(){return i.getNodes()[0].getType()}};wm(e,o,t),Rs(o.children)}r?n.focus():Xn(null)})})});function nS(){return oC((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}s(nS,"rebind");var rS=he(null),iS=he([],e=>{e.pipe(e.combine(iS,gt),nS())}),oS=he([],e=>{e.pipe(e.combine(oS,fi),nS())}),sS=he(null,go,(e,t)=>!!(e&&t&&e.editorRef===t.editorRef)),eg=wt(),pi=he(e=>{throw new Error(`No icon component for ${e}`)});function rn(e,t){return wt((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let l=i;for(const a of o)i.includes(a)||(l=[...l,a]);return l}),t?.(n,r)})}s(rn,"Appender");function lS(e){const t=re();ie(t)&&e.pubIn({[Cs]:t,[aO]:t.format})}s(lS,"handleSelectionChange");var Nd=rn(oS,(e,t)=>{e.pub(t,[n=>n.registerCommand(am,(r,i)=>(e.pubIn({[gt]:i,[Ql]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(sS,{rootNode:Lt(),editorType:"lexical",editorRef:i})}),lS(e),!1),Rr),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(bu)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{Lt().getLastChild()instanceof Ma&&n.update(()=>{Lt().append(Xe())},{discrete:!0}),l=FE({root:Lt(),visitors:e.getValue(Ad),jsxComponentDescriptors:e.getValue(Id),toMarkdownExtensions:e.getValue(bm),toMarkdownOptions:e.getValue(Su),jsxIsAvailable:e.getValue(Em)})}),e.pub(To,l.trim()),e.pub(Eu,!1)}),n=>n.registerCommand(im,()=>(e.pub(Ql,!0),!1),Rr)])}),ea=rn(iS,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{lS(e)})}),n=>n.registerCommand(q2,r=>{var i;const o=e.getValue(fi);return o&&((i=o.getRootElement())!=null&&i.contains(r.relatedTarget)||e.pubIn({[Ql]:!1,[eg]:r})),!1},Rr)])});function wm(e,t,n){try{l4({root:t,visitors:e.getValue(xm),mdastExtensions:e.getValue(XE),markdown:n,syntaxExtensions:e.getValue(YE),jsxComponentDescriptors:e.getValue(Id),jsxKindMismatchPolicy:e.getValue(uO),directiveDescriptors:e.getValue(QE),codeBlockEditorDescriptors:e.getValue(La),defaultCodeBlockLanguage:e.getValue(bs)}),e.pub(bu,null)}catch(r){if(r instanceof jh||r instanceof Jh||r instanceof so)e.pubIn({[To]:n,[bu]:{error:r.message,source:n}});else throw r}}s(wm,"tryImportingMarkdown");var aS=he([]),Vs=rn(aS),cS=he([]),Tz=rn(cS),uS=he([]),wz=rn(uS),dS=he([]),kz=rn(dS),fO=he([]),km=rn(fO),fS=he([]),hS=rn(fS),hO=he(!1,e=>{e.link(e.pipe(gt,$i(t=>{var n,r;return["td","th"].includes(((r=(n=t?.getRootElement())==null?void 0:n.parentNode)==null?void 0:r.nodeName.toLowerCase())??"")})),hO)}),xv=he(fm()),gO=he(""),Mz=wt(),tg=wt(e=>{e.sub(e.pipe(tg,mt(gt)),([t,n])=>{n?.update(()=>{const r=re();ie(r)&&(O7(r,t),setTimeout(()=>{n.focus()}))})})}),Mm=wt(e=>{e.sub(e.pipe(Mm,mt(gt)),([t,n])=>{n?.focus(()=>{n.getEditorState().read(()=>{const r=re();ie(r)&&(n.update(()=>{const i=t();i.isInline()?(Rs([i]),xn(i.getParentOrThrow())&&cm(i,Xe).selectEnd()):Nb(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(Xl,void 0)}))})},{defaultSelection:"rootEnd"})})}),ta=he("rich-text",e=>{function t(){return oC((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}s(t,"currentNextViewMode"),e.sub(e.pipe(ta,t(),mt(na)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(Tm,r)}),e.sub(e.pipe(ta,t(),Qu(n=>n.current==="rich-text"),mt(gt)),([,n])=>{n?.dispatchCommand(Xl,void 0)})}),na=he("",e=>{e.link(To,na),e.link(na,Md)},!0),gS=he([]),Bs=rn(gS),pS=he(()=>{throw new Error("No translation function provided")}),Cv=he(WE),pO=En({init(e,t){const n=t?.initialMarkdown??"";e.register(Nd),e.register(ea),e.register(Md),e.register(na),e.pubIn({[ZE]:t?.trim?n.trim():n,[pi]:t?.iconComponentFor,[$r]:[T4,S4,w4,_4,...C4],[hi]:[lm,Ls,_m],[gi]:[g4,h4,m4,f4,d4],[Gh]:t?.contentEditableClassName,[qh]:t?.spellCheck,[Su]:t?.toMarkdownOptions,[yv]:t?.autoFocus,[Zh]:t?.placeholder,[_r]:t?.readOnly,[pS]:t?.translation,[xv]:fm(),[wu]:[_k(),_6],[Tu]:[gk(),uN()],[Sm]:[V6(),hk(),x6],[Cv]:t?.lexicalTheme??WE}),e.singletonSub(Yh,t?.onError),e.singletonSub(Xh,r=>{t?.onChange(r,e.getValue(Eu))}),e.singletonSub(eg,t?.onBlur),t?.suppressHtmlProcessing||e.pubIn({[wu]:[F6(),k4()],[Tu]:[kN(),MN(),M4],[$r]:b4})},postInit(e,t){const n=qE({name:"@mdxeditor/root",editable:t?.readOnly!==!0,namespace:t?.lexicalEditorNamespace??"MDXEditor",nodes:[...e.getValue(Cm),...t?.additionalLexicalNodes??[]],theme:e.getValue(Cv),historyMode:t?.suppressSharedHistory?"none":"root-shared",historyState:e.getValue(xv),initialEditorState:t?.editorState===null?null:()=>{const i=t?.initialMarkdown.trim()??"";wm(e,Lt(),i)}});r0(e,()=>{n.dispose()});const r=t?.autoFocus;if(t?.editorState!==null&&r){const i=setTimeout(()=>{n.focus(go,{defaultSelection:r===!0?"rootStart":r.defaultSelection??"rootStart"})});r0(e,()=>{clearTimeout(i)})}e.pub(fi,n),e.pub(gt,n)},update(e,t){e.pubIn({[Gh]:t?.contentEditableClassName,[qh]:t?.spellCheck,[Su]:t?.toMarkdownOptions,[yv]:t?.autoFocus,[Zh]:t?.placeholder,[_r]:t?.readOnly}),e.singletonSub(Xh,n=>{t?.onChange(n,e.getValue(Eu))}),e.singletonSub(eg,t?.onBlur),e.singletonSub(Yh,t?.onError)}});function mi(){return ni(pS)}s(mi,"useTranslation");function mS({initialEditor:e,children:t}){const{Component:n}=q7(e,GE).output;return(0,ee.jsx)(n,{children:t})}s(mS,"r");var mO=md?m.useLayoutEffect:m.useEffect;function _O(e){return{initialValueFn:s(()=>e.isEditable(),"initialValueFn"),subscribe:s(t=>e.registerEditableListener(t),"subscribe")}}s(_O,"a$2");function vO(){return(function(e){const[t]=fn(),n=(0,m.useMemo)(()=>e(t),[t,e]),[r,i]=(0,m.useState)(()=>n.initialValueFn()),o=(0,m.useRef)(r);return mO(()=>{const{initialValueFn:l,subscribe:a}=n,c=l();return o.current!==c&&(o.current=c,i(c)),a(u=>{o.current=u,i(u)})},[n,e]),r})(_O)}s(vO,"l$6");function yO(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(yO,"y");var Am=md?m.useLayoutEffect:m.useEffect;function xO({editor:e,ErrorBoundary:t}){return(function(n,r){const[i,o]=(0,m.useState)(()=>n.getDecorators());return Am(()=>n.registerDecoratorListener(l=>{(0,Bc.flushSync)(()=>{o(l)})}),[n]),(0,m.useEffect)(()=>{o(n.getDecorators())},[n]),(0,m.useMemo)(()=>{const l=[],a=Object.keys(i);for(let c=0;c<a.length;c++){const u=a[c],d=(0,ee.jsx)(r,{onError:s(h=>n._onError(h),"onError"),children:(0,ee.jsx)(m.Suspense,{fallback:null,children:i[u]})}),f=n.getElementByKey(u);f!==null&&l.push((0,Bc.createPortal)(d,f,u))}return l},[r,i,n])})(e,t)}s(xO,"L");function CO({editor:e,ErrorBoundary:t}){return(function(n){const r=Oa.maybeFromEditor(n);if(r&&r.hasExtensionByName(Cu.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&yO(320,i);return!0}return!1})(e)?null:(0,ee.jsx)(xO,{editor:e,ErrorBoundary:t})}s(CO,"b");function bv(e){return e.read("latest",jE(e.isComposing()))}s(bv,"v");function _S({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=fn();return(function(i){Am(()=>At(p6(i),c6(i)),[i])})(r),(0,ee.jsxs)(ee.Fragment,{children:[e,(0,ee.jsx)(bO,{content:t}),(0,ee.jsx)(CO,{editor:r,ErrorBoundary:n})]})}s(_S,"w");function bO({content:e}){const[t]=fn(),n=(function(i){const[o,l]=(0,m.useState)(()=>bv(i));return Am(()=>{function a(){const c=bv(i);l(c)}return s(a,"e"),a(),At(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),o})(t),r=vO();return n?typeof e=="function"?e(r):e:null}s(bO,"C");var EO=Ts(((e,t)=>{(function(){"use strict";var n={}.hasOwnProperty;function r(){for(var l="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(l=o(l,i(c)))}return l}s(r,"classNames");function i(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return r.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var a="";for(var c in l)n.call(l,c)&&l[c]&&(a=o(a,c));return a}s(i,"parseValue");function o(l,a){return a?l?l+" "+a:l+a:l}s(o,"appendClass"),typeof t<"u"&&t.exports?(r.default=r,t.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()})),tt=da(EO(),1),vS={undo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),m.createElement("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"})),code:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),m.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),m.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),m.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),m.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),m.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),rich_text:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),m.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),m.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),m.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),m.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),m.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),m.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),m.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),m.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),m.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},SO="_editorRoot_er3ed_53",TO="_editorWrapper_er3ed_155",wO="_toolbarRoot_er3ed_162",kO="_readOnlyToolbarRoot_er3ed_189",MO="_toolbarToggleItem_er3ed_208",AO="_toolbarGroupOfGroups_er3ed_219",IO="_toolbarToggleSingleGroup_er3ed_224",NO="_toolbarButton_er3ed_239",OO="_activeToolbarButton_er3ed_275",DO="_toolbarButtonDropdownContainer_er3ed_286",RO="_selectContainer_er3ed_288",LO="_selectItem_er3ed_301",$O="_toolbarButtonSelectTrigger_er3ed_307",PO="_selectTrigger_er3ed_308",FO="_selectDropdownArrow_er3ed_373",VO="_contentEditable_er3ed_379",BO="_codeMirrorWrapper_er3ed_391",HO="_codeMirrorToolbar_er3ed_408",KO="_propertyPanelTitle_er3ed_430",UO="_propertyEditorTable_er3ed_438",WO="_iconButton_er3ed_456",zO="_readOnlyColumnCell_er3ed_461",jO="_buttonsFooter_er3ed_474",JO="_propertyEditorInput_er3ed_480",GO="_primaryButton_er3ed_506",qO="_secondaryButton_er3ed_507",ZO="_smallButton_er3ed_522",YO="_dialogForm_er3ed_534",XO="_linkDialogEditForm_er3ed_540",QO="_linkDialogInputContainer_er3ed_548",eD="_linkDialogInputWrapper_er3ed_554",tD="_linkDialogInput_er3ed_548",nD="_linkDialogAnchor_er3ed_586",rD="_linkDialogPopoverContent_er3ed_600",iD="_tableColumnEditorPopoverContent_er3ed_601",oD="_dialogContent_er3ed_602",sD="_largeDialogContent_er3ed_614",lD="_dialogTitle_er3ed_624",aD="_dialogCloseButton_er3ed_630",cD="_popoverContent_er3ed_637",uD="_popoverArrow_er3ed_649",dD="_linkDialogPreviewAnchor_er3ed_653",fD="_tooltipTrigger_er3ed_676",hD="_tooltipContent_er3ed_680",gD="_actionButton_er3ed_694",pD="_primaryActionButton_er3ed_701",mD="_tableEditor_er3ed_713",_D="_toolCell_er3ed_724",vD="_tableColumnEditorTrigger_er3ed_743",yD="_addRowButton_er3ed_745",xD="_addColumnButton_er3ed_746",CD="_tableColumnEditorToolbar_er3ed_788",bD="_toggleGroupRoot_er3ed_801",ED="_tableToolsColumn_er3ed_819",SD="_leftAlignedCell_er3ed_828",TD="_rightAlignedCell_er3ed_832",wD="_centeredCell_er3ed_836",kD="_dialogOverlay_er3ed_869",MD="_focusedImage_er3ed_915",AD="_imageWrapper_er3ed_919",ID="_editImageToolbar_er3ed_932",ND="_editImageButton_er3ed_936",OD="_inlineEditor_er3ed_942",DD="_blockEditor_er3ed_951",RD="_nestedEditor_er3ed_960",LD="_genericComponentName_er3ed_979",$D="_diffSourceToggleWrapper_er3ed_985",PD="_ggDiffSourceToggle_er3ed_993",FD="_diffSourceToggle_er3ed_985",VD="_selectWithLabel_er3ed_1011",BD="_toolbarTitleMode_er3ed_1026",HD="_imageControlWrapperResizing_er3ed_1031",KD="_imageResizer_er3ed_1035",UD="_imageResizerN_er3ed_1044",WD="_imageResizerNe_er3ed_1050",zD="_imageResizerE_er3ed_1056",jD="_imageResizerSe_er3ed_1062",JD="_imageResizerS_er3ed_1062",GD="_imageResizerSw_er3ed_1074",qD="_imageResizerW_er3ed_1080",ZD="_imageResizerNw_er3ed_1086",YD="_imagePlaceholder_er3ed_1092",XD="_imageDimensionsContainer_er3ed_1100",QD="_placeholder_er3ed_1105",eR="_rootContentEditableWrapper_er3ed_1118",tR="_downshiftInputWrapper_er3ed_1128",nR="_downshiftInput_er3ed_1128",rR="_downshiftAutocompleteContainer_er3ed_1159",iR="_textInput_er3ed_1205",oR="_multiFieldForm_er3ed_1213",sR="_formField_er3ed_1219",lR="_markdownParseError_er3ed_1230",aR="_popupContainer_er3ed_1239",cR="_inputSizer_er3ed_1244",J={editorRoot:SO,editorWrapper:TO,toolbarRoot:wO,readOnlyToolbarRoot:kO,toolbarToggleItem:MO,toolbarGroupOfGroups:AO,toolbarToggleSingleGroup:IO,toolbarButton:NO,activeToolbarButton:OO,toolbarButtonDropdownContainer:DO,selectContainer:RO,selectItem:LO,toolbarButtonSelectTrigger:$O,selectTrigger:PO,selectDropdownArrow:FO,contentEditable:VO,codeMirrorWrapper:BO,codeMirrorToolbar:HO,propertyPanelTitle:KO,propertyEditorTable:UO,iconButton:WO,readOnlyColumnCell:zO,buttonsFooter:jO,propertyEditorInput:JO,primaryButton:GO,secondaryButton:qO,smallButton:ZO,dialogForm:YO,linkDialogEditForm:XO,linkDialogInputContainer:QO,linkDialogInputWrapper:eD,linkDialogInput:tD,linkDialogAnchor:nD,linkDialogPopoverContent:rD,tableColumnEditorPopoverContent:iD,dialogContent:oD,largeDialogContent:sD,dialogTitle:lD,dialogCloseButton:aD,popoverContent:cD,popoverArrow:uD,linkDialogPreviewAnchor:dD,tooltipTrigger:fD,tooltipContent:hD,actionButton:gD,primaryActionButton:pD,tableEditor:mD,toolCell:_D,tableColumnEditorTrigger:vD,addRowButton:yD,addColumnButton:xD,tableColumnEditorToolbar:CD,toggleGroupRoot:bD,tableToolsColumn:ED,leftAlignedCell:SD,rightAlignedCell:TD,centeredCell:wD,dialogOverlay:kD,focusedImage:MD,imageWrapper:AD,editImageToolbar:ID,editImageButton:ND,inlineEditor:OD,blockEditor:DD,nestedEditor:RD,genericComponentName:LD,diffSourceToggleWrapper:$D,ggDiffSourceToggle:PD,diffSourceToggle:FD,selectWithLabel:VD,toolbarTitleMode:BD,imageControlWrapperResizing:HD,imageResizer:KD,imageResizerN:UD,imageResizerNe:WD,imageResizerE:zD,imageResizerSe:jD,imageResizerS:JD,imageResizerSw:GD,imageResizerW:qD,imageResizerNw:ZD,imagePlaceholder:YD,imageDimensionsContainer:XD,placeholder:QD,rootContentEditableWrapper:eR,downshiftInputWrapper:tR,downshiftInput:nR,downshiftAutocompleteContainer:rR,textInput:iR,multiFieldForm:oR,formField:sR,markdownParseError:lR,popupContainer:aR,inputSizer:cR};function uR(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?v_(n)?r:i:v_(t)?r:i}catch{return null}}s(uR,"getSelectedNode");var dR=["transform","perspective","filter","backdrop-filter","contain","container-type"],fR=["layout","paint","strict","content"];function hR(e){let t=e?.parentElement;for(;t;){const n=window.getComputedStyle(t),r=n.willChange.split(",").map(i=>i.trim()).some(i=>dR.includes(i));if(n.transform!=="none"||n.perspective!=="none"||n.filter!=="none"||n.backdropFilter!=="none"||fR.includes(n.contain)||n.containerType!=="normal"||n.contentVisibility==="auto"||r)return t;t=t.parentElement}return null}s(hR,"getFixedContainingBlock");function yS(e,t){const n=hR(t);if(n){const r=n.getBoundingClientRect();return{top:Math.round(e.top-r.top),left:Math.round(e.left-r.left),width:Math.round(e.width),height:Math.round(e.height)}}return{top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)}}s(yS,"adjustedRectangle");function xS(e,t){const n=e.getRootElement(),r=e.getElementByKey(t);return n===null||r===null?null:yS(r.getBoundingClientRect(),n)}s(xS,"getNodeRectangle");function CS(e){const t=re(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let l;if(n.isCollapsed){let a=n.anchorNode;a?.nodeType==3&&(a=a.parentNode),l=a.getBoundingClientRect(),l.width=0}else if(n.anchorNode===i){let a=i;for(;a.firstElementChild!=null;)a=a.firstElementChild;l=a.getBoundingClientRect()}else l=o.getBoundingClientRect();return yS(l,i)}else if(r?.className!=="link-input")return null;return null}s(CS,"getSelectionRectangle");function gR(e,t){let n=null,r=[],i="";e.getEditorState().read(()=>{const a=re();!a||ie(a)&&a.isCollapsed()||a.getNodes().length===0||(r=hE(e,a).nodes,r.length>0&&(n=mb()))},{editor:e});const o=n;if(!o||r.length===0)return"";const l={error:void 0,failed:!1};if(o.update(()=>{try{const a=Lt(),c=gE(r);let u=Xe();const d=s(()=>{u.isEmpty()||(a.append(u),u=Xe())},"appendInlineContainer");for(const f of c)f.isInline()?u.append(f):(d(),a.append(f));d(),i=FE({root:a,...t})}catch(a){l.failed=!0,l.error=a}},{discrete:!0,skipTransforms:!0}),l.failed)throw l.error;return i.replace(/\n+$/u,"")}s(gR,"getSelectionAsMarkdown");var pR=s(({children:e})=>{const t=ni(fi);return m.createElement(mS,{initialEditor:t},e)},"LexicalProvider"),mR=s(()=>{const e=mi(),t=Mn(eS),n=Mn(rS),r=s(f=>{n(f),t(f?{current:f}:null)},"onRef"),[i,o,l,a,c,u,d]=vr(Gh,qh,aS,cS,dS,Zh,uS);return m.createElement(m.Fragment,null,a.map((f,h)=>m.createElement(f,{key:h})),m.createElement(bS,{wrappers:c},m.createElement("div",{className:(0,tt.default)(J.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},m.createElement(_S,{contentEditable:m.createElement("div",{ref:r,className:"mdxeditor-contenteditable-wrapper"},m.createElement(vm,{className:(0,tt.default)(J.contentEditable,i),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:o})),placeholder:m.createElement("div",{className:(0,tt.default)(J.contentEditable,J.placeholder,i)},m.createElement("p",null,u)),ErrorBoundary:ym}))),l.map((f,h)=>m.createElement(f,{key:h})),d.map((f,h)=>m.createElement(f,{key:h})))},"RichTextEditor"),_R={listItemIndent:"one"},vR=s(e=>vS[e],"defaultIconComponentFor");function yR(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}s(yR,"defaultTranslation");var bS=s(({wrappers:e,children:t})=>{if(e.length===0)return m.createElement(m.Fragment,null,t);const n=e[0];return m.createElement(n,null,m.createElement(bS,{wrappers:e.slice(1)},t))},"RenderRecursiveWrappers"),xR=s(({children:e,className:t,overlayContainer:n})=>{const r=m.useRef(null),i=m.useRef(null),o=Mn(Po),l=Mn(dO);return m.useEffect(()=>{const a=document.createElement("div");return a.classList.add("mdxeditor-popup-container",J.editorRoot,J.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(a),r.current=a,o(r),l(i),()=>{a.remove()}},[t,r,n,o,l]),m.createElement("div",{className:(0,tt.default)("mdxeditor",J.editorRoot,J.editorWrapper,t),ref:i},e)},"EditorRootElement");function CR(e){return{getMarkdown:s(()=>{const t=e.getValue(ta);return t==="source"||t==="diff"?e.getValue(na):e.getValue(To)},"getMarkdown"),setMarkdown:s(t=>{e.pub(Tm,t)},"setMarkdown"),insertMarkdown:s(t=>{e.pub(tS,t)},"insertMarkdown"),focus:s((t,n)=>{var r;(r=e.getValue(fi))==null||r.focus(t,n)},"focus"),getContentEditableHTML:s(()=>{var t;return((t=e.getValue(eS))==null?void 0:t.current.innerHTML)??""},"getContentEditableHTML"),getSelectionMarkdown:s(()=>{const t=e.getValue(ta);if(t==="source"||t==="diff")return"";const n=e.getValue(gt);if(!n)return"";const r=e.getValue(Ad),i=e.getValue(bm),o=e.getValue(Su),l=e.getValue(Id),a=e.getValue(Em);return gR(n,{visitors:r,toMarkdownExtensions:i,toMarkdownOptions:o,jsxComponentDescriptors:l,jsxIsAvailable:a})},"getSelectionMarkdown")}}s(CR,"createMethods");var bR=s(({onReady:e,onDispose:t})=>{const n=Xu(),r=m.useMemo(()=>CR(n),[n]);return m.useLayoutEffect(()=>(e(r),()=>{t(r)}),[r,t,e]),null},"Methods"),ER=m.forwardRef((e,t)=>{const n=m.useRef(null),r=m.useRef(null),i=m.useRef([]),o=m.useRef(e.trim===!1?e.markdown:e.markdown.trim()),l=m.useCallback(d=>{const f=n.current;f&&r.current===null?d(f):i.current.push(d)},[]),a=m.useMemo(()=>({getMarkdown:s(()=>{var d;return((d=n.current)==null?void 0:d.getMarkdown())??o.current},"getMarkdown"),setMarkdown:s(d=>{o.current=d,l(f=>{f.setMarkdown(d)})},"setMarkdown"),insertMarkdown:s(d=>{l(f=>{f.insertMarkdown(d)})},"insertMarkdown"),focus:s((d,f)=>{l(h=>{h.focus(d,f)})},"focus"),getContentEditableHTML:s(()=>{var d;return((d=n.current)==null?void 0:d.getContentEditableHTML())??""},"getContentEditableHTML"),getSelectionMarkdown:s(()=>{var d;return((d=n.current)==null?void 0:d.getSelectionMarkdown())??""},"getSelectionMarkdown")}),[l]),c=m.useCallback(d=>{if(n.current=d,r.current===d)return;if(i.current.length===0){o.current=d.getMarkdown();return}r.current=d;const f=s(()=>{if(n.current!==d){r.current===d&&(r.current=null);return}const h=i.current.shift();if(!h){r.current=null,o.current=d.getMarkdown();return}h(d),queueMicrotask(f)},"replayNext");f()},[]),u=m.useCallback(d=>{n.current===d&&(o.current=d.getMarkdown(),n.current=null)},[]);return m.useImperativeHandle(t,()=>a,[a]),m.createElement(nM,{plugins:[pO({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??go,onBlur:e.onBlur??go,toMarkdownOptions:e.toMarkdownOptions??_R,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??vR,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??go,translation:e.translation??yR,trim:e.trim??!0,lexicalTheme:e.lexicalTheme,..."editorState"in e?{editorState:e.editorState}:{},suppressSharedHistory:e.suppressSharedHistory??!1,additionalLexicalNodes:e.additionalLexicalNodes??[],lexicalEditorNamespace:e.lexicalEditorNamespace??"MDXEditor"}),...e.plugins??[]]},m.createElement(xR,{className:e.className,overlayContainer:e.overlayContainer},m.createElement(pR,null,m.createElement(mR,null))),m.createElement(bR,{onReady:c,onDispose:u}))}),ES=typeof window<"u"&&typeof window.document.createElement<"u",SS=ES&&(()=>{var e;const t=(e=navigator.userAgentData)==null?void 0:e.platform;return t?/mac/i.test(t):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function SR(e,t){return SS?e:t}s(SR,"controlOrMeta");var TR={testLexicalNode:kd,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})},"visitLexicalNode")},wR={testNode:"heading",visitNode:s(function({mdastNode:e,actions:t}){t.addAndStepInto(Ar(`h${e.depth}`))},"visitNode")},kR=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],ng=[1,2,3,4,5,6],MR={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},ku=he(ng,e=>{e.pub(Nd,t=>t.registerCommand(ab,n=>{const{code:r,ctrlKey:i,metaKey:o,altKey:l}=n;return kR.includes(r)&&SR(o,i)&&l?(n.preventDefault(),t.update(()=>{if(r==="Digit0")e.pub(tg,()=>Xe());else{const a=e.getValue(ku),c=MR[r];a.includes(c)&&e.pub(tg,()=>Ar(`h${c}`))}}),!0):!1},st))}),AR=En({init(e,t){e.pubIn({[Bs]:"headings",[$r]:wR,[hi]:Ra,[gi]:TR}),e.pub(ku,t?.allowedHeadingLevels??ng)},update(e,t){e.pub(ku,t?.allowedHeadingLevels??ng)}});function Ev(e,t){return e.read("latest",()=>{const n=yn(t);return n!==null&&n.isSelected()})}s(Ev,"s$2");function TS(e){const[t]=fn(),[n,r]=(0,m.useState)(()=>Ev(t,e));return(0,m.useEffect)(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(Ev(t,e))});return()=>{i=!1,o()}},[t,e]),[n,(0,m.useCallback)(i=>{t.update(()=>{let o=re();He(o)||(o=cu(),Xn(o)),He(o)&&(i?o.add(e):o.delete(e))})},[t,e]),(0,m.useCallback)(()=>{t.update(()=>{const i=re();He(i)&&i.clear()})},[t])]}s(TS,"u$1");function IR({nodeKey:e}){const[t]=fn(),[n,r,i]=TS(e);return(0,m.useEffect)(()=>At(t.registerCommand(nm,o=>{const l=t.getElementByKey(e);return _7(o)===l&&(o.shiftKey||i(),r(!n),!0)},st)),[i,t,n,e,r]),(0,m.useEffect)(()=>{const o=t.getElementByKey(e),l=t._config.theme.hrSelected??"selected";o!==null&&(n?mr(o,l):Cd(o,l))},[t,n,e]),null}s(IR,"p");var Od=class wS extends Da{static{s(this,"x")}static getType(){return"horizontalrule"}static clone(t){return new wS(t.__key)}static importJSON(t){return $a().updateFromJSON(t)}static importDOM(){return{hr:s(()=>({conversion:NR,priority:0}),"hr")}}decorate(){return(0,ee.jsx)(IR,{nodeKey:this.__key})}};function NR(){return{node:$a()}}s(NR,"d");function $a(){return ci(new Od)}s($a,"f");function OR(){const[e]=fn();return(0,m.useEffect)(()=>e.registerCommand(Hb,t=>{const n=re();if(!ie(n))return!1;if(n.focus.getNode()!==null){const r=$a();Nb(r)}return!0},Me),[e]),null}s(OR,"n$2");var DR={testLexicalNode:s(e=>e instanceof Od,"testLexicalNode"),visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},RR={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto($a())}},LR=Ji(e=>{e.sub(e.pipe(LR,mt(gt)),([,t])=>{t?.dispatchCommand(Hb,void 0)})}),$R=En({init(e){e.pubIn({[Bs]:"thematicBreak",[$r]:RR,[hi]:Od,[gi]:DR,[Vs]:OR})}});function Si(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(Si,"ht");function ra(e){let t=1,n=e.getParent();for(;n!=null;){if(ke(n)){const r=n.getParent();if(Ee(r)){t++,n=r.getParent();continue}Si(40)}return t}return t}s(ra,"ft$1");function rg(e){const t=e.getParent();Ee(t)||Si(40);let n=t,r=t;for(;r!==null;)r=r.getParent(),Ee(r)&&(n=r);return n}s(rg,"dt$1");function kS(e){let t=[];const n=e.getChildren().filter(ke);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();Ee(o)?t=t.concat(kS(o)):t.push(i)}return t}s(kS,"pt");function Hn(e){return ke(e)&&Ee(e.getFirstChild())}s(Hn,"mt$2");function MS(e,t){return ke(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}s(MS,"_t$2");function ig(e){const t=re();if(t!==null){let n=t.getNodes();if(ie(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),l=o.getParent();if(xn(o)){const a=o.getFirstChild();if(a)n=a.selectStart().getNodes();else{const c=Xe();o.append(c),n=c.select().getNodes()}}else if(MS(o,n)){const a=Zn(e);if(xn(l)){o.replace(a);const c=Qn();xe(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),a.append(c)}else if(ke(o)){const c=o.getParentOrThrow();wo(a,c.getChildren()),c.replace(a)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(xe(o)&&o.isEmpty()&&!ke(o)&&!r.has(o.getKey())){Sv(o,e);continue}let l=J2(o)?o.getParent():ke(o)&&o.isEmpty()?o:null;for(;l!=null;){const a=l.getKey();if(Ee(l)){if(!r.has(a)){const c=Zn(e);wo(c,l.getChildren()),l.replace(c),r.add(a)}break}{const c=l.getParent();if(xn(c)&&!r.has(a)){r.add(a),Sv(l,e);break}l=c}}}}}s(ig,"yt$1");function wo(e,t){e.splice(e.getChildrenSize(),0,t)}s(wo,"Ct$2");function Sv(e,t){if(Ee(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=Qn();let o;if(wo(i,e.getChildren()),Ee(n)&&t===n.getListType())n.append(i),Ee(r)&&t===r.getListType()&&(wo(n,r.getChildren()),r.remove()),o=n;else if(Ee(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const a=Zn(t);a.append(i),e.replace(a),o=a}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const l=re();return ie(l)&&(o.getKey()===l.anchor.key&&l.anchor.set(i.getKey(),l.anchor.offset,"element"),o.getKey()===l.focus.key&&l.focus.set(i.getKey(),l.focus.offset,"element")),e.remove(),o}s(Sv,"kt$2");function Im(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&Hn(n)&&Hn(r)&&(Im(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}s(Im,"bt$2");function PR(){const e=re();if(ie(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(MS(r,n))t.add(rg(r));else for(let i=0;i<n.length;i++){const o=n[i];if(J2(o)){const l=Ab(o,_i);l!=null&&t.add(rg(l))}}for(const i of t){let o=i;const l=kS(i);for(const a of l){const c=Xe().setTextStyle(e.style).setTextFormat(e.format);wo(c,a.getChildren()),o.insertAfter(c),o=c,a.__key===e.anchor.key&&Mh(e.anchor,zi(Wi(c,"next"))),a.__key===e.focus.key&&Mh(e.focus,zi(Wi(c,"next"))),a.remove()}i.remove()}}}s(PR,"St$2");function AS(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())ke(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ee(r.getFirstChild())||n++)}s(AS,"vt$2");function FR(e){const t=new Set;if(Hn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Hn(r)&&Hn(i)){const o=i.getFirstChild();if(Ee(o)){o.append(e);const l=r.getFirstChild();Ee(l)&&(wo(o,l.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Hn(r)){const o=r.getFirstChild();if(Ee(o)){const l=o.getFirstChild();l!==null&&l.insertBefore(e)}}else if(Hn(i)){const o=i.getFirstChild();Ee(o)&&o.append(e)}else if(Ee(n)){const o=tn(e),l=tn(n);o.append(l),l.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}s(FR,"Tt$2");function Tv(e){if(Hn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(Ee(n?n.getParent():void 0)&&ke(n)&&Ee(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=tn(e),l=tn(t);o.append(l),e.getPreviousSiblings().forEach(u=>l.append(u));const a=tn(e),c=tn(t);a.append(c),wo(c,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(e)}}}s(Tv,"xt$2");function VR(e=!1){const t=re();if(!ie(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode();let r=null;if(ke(n)&&n.getChildrenSize()===0)r=n;else if(Ae(n)){const u=n.getParent();ke(u)&&u.getChildren().every(d=>Ae(d)&&d.getTextContent().trim()==="")&&(r=u)}if(r===null)return!1;const i=rg(r),o=r.getParent();Ee(o)||Si(40);const l=o.getParent();let a;if(xn(l))a=Xe(),i.insertAfter(a);else{if(!ke(l))return!1;a=tn(l),l.insertAfter(a)}a.setTextStyle(t.style).setTextFormat(t.format).select();const c=r.getNextSiblings();if(c.length>0){const u=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,r):1,d=tn(o).setStart(u);if(ke(a)){const f=tn(a);f.append(d),a.insertAfter(f)}else a.insertAfter(d);d.append(...c)}return(function(u){let d=u;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!ke(f)&&!Ee(f))break;d=f}d.remove()})(r),!0}s(VR,"Nt$2");var _i=class extends Lr{static{s(this,"Pt$2")}__value;__checked;$config(){return this.config("listitem",{$transform:s(e=>{const t=e.getParent();if(Ee(t))t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){const n=e.createParentElementNode();Ee(n)||Si(340);const r=[e];for(const i of["previous","next"]){r.reverse();for(const{origin:o}of qn(e,i)){if(!ke(o))break;r.push(o)}}e.insertBefore(n),n.splice(0,0,r),xn(t)||(Qp(n,xl(qn(n,"next")),{$shouldSplit:s(()=>!1,"$shouldSplit"),removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},"$transform"),extends:Lr,importDOM:pb({li:s(()=>({conversion:BR,priority:0}),"li")})})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=bn().createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(o,l){const a=l.getParent();!Ee(a)||a.getListType()!=="check"||Ee(l.getFirstChild())?(o.removeAttribute("role"),o.removeAttribute("tabIndex"),o.removeAttribute("aria-checked")):(o.setAttribute("role","checkbox"),o.setAttribute("tabIndex","-1"),o.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(t,this),t.value=this.__value,(function(o,l,a){const c=l.list;if(!c)return;const u=c.listitem,d=c.nested&&c.nested.listitem,f=a.getParent(),h=Ee(f)&&f.getListType()==="check",g=a.getChecked(),p=a.getChildren().some(v=>Ee(v)),_=[];c.listitemChecked!==void 0&&_.push(c.listitemChecked),c.listitemUnchecked!==void 0&&_.push(c.listitemUnchecked),d!==void 0&&_.push(...Cl(d)),_.length>0&&Cd(o,..._);const y=[];if(u!==void 0&&y.push(...Cl(u)),h){const v=g?c.listitemChecked:c.listitemUnchecked;v!==void 0&&y.push(v)}d!==void 0&&p&&y.push(...Cl(d)),y.length>0&&mr(o,...y)})(t,n.theme,this);const r=e?e.__style:"",i=this.__style;r!==i&&Tc(t.style,i,r),(function(o,l,a){const c=l.__textStyle,u=a?a.__textStyle:"";if(a!==null&&u===c)return;const d=m_(c);for(const f in d)o.style.setProperty(`--listitem-marker-${f}`,d[f]);if(u!=="")for(const f in m_(u))f in d||o.style.removeProperty(`--listitem-marker-${f}`)})(t,this,e)}updateDOM(e,t,n){const r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);const r=this.getDirection();return r&&(t.dir=r),Hn(this)?{after(i){if(Ke(i)){const o=i.previousElementSibling;if(Ke(o)&&o.nodeName==="LI"){for(;i.firstChild;)o.append(i.firstChild);i.remove()}}return i},element:t}:{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(xe(n)&&this.canMergeWith(n)){const r=n.getChildren();this.append(...r),n.remove()}else super.append(n)}return this}replace(e,t){if(ke(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!Ee(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const o=tn(n);let l=this.getNextSibling();for(;l;){const a=l;l=l.getNextSibling(),o.append(a)}n.insertAfter(e),e.insertAfter(o)}const r=this.__key;let i=0;if(t&&(xe(e)||Si(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&xe(e)){const o=re();if(ie(o))for(const l of o.getStartEndPoints())l.key===r&&l.type==="element"&&l.set(e.getKey(),i+l.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(Ee(n)||Si(39),ke(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){const i=tn(n);r.forEach(o=>i.append(o)),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&Hn(t)&&Hn(n)&&(Im(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){const n=tn(this);return this.insertAfter(n,t),n}collapseAtStart(e){if(Hn(this))return!1;const t=this.getParentOrThrow();if(ke(t.getParentOrThrow()))return Tv(this),!0;const n=Xe().append(...this.getChildren()),r=this.getNextSiblings();if(r.length>0){const i=tn(t);i.append(...r),t.insertAfter(i)}return t.insertAfter(n),this.remove(),t.getChildrenSize()===0&&t.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return Ee(n)&&(t=n.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;ke(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!="number"&&Si(117),(e=Math.floor(e))>=0||Si(199);let t=this.getIndent();for(;t!==e;)t<e?(FR(this),t++):(Tv(this),t--);return this}canInsertAfter(e){return ke(e)}canReplaceWith(e){return ke(e)}canMergeWith(e){return ke(e)||wa(e)}extractWithChild(e,t){if(!ie(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Zn("bullet")}canMergeWhenEmpty(){return!0}};function BR(e){if(e.classList.contains("task-list-item")){for(const r of e.children)if(r.tagName==="INPUT")return wv(r)}if(e.classList.contains("joplin-checkbox")){for(const r of e.children)if(r.classList.contains("checkbox-wrapper")&&r.children.length>0&&r.children[0].tagName==="INPUT")return wv(r.children[0])}const t=e.getAttribute("aria-checked"),n=Qn(t==="true"||t!=="false"&&void 0);return ui(n,e),{after:IS.bind(null,n),node:Cr(n,e)}}s(BR,"Ft$1");function wv(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Qn(e.hasAttribute("checked"));return{after:IS.bind(null,t),node:t}}s(wv,"Lt$2");function IS(e,t){const n=t[0];return t.length===1&&wa(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}s(IS,"At$2");function Qn(e){return ci(new _i(void 0,e))}s(Qn,"Ot$2");function ke(e){return e instanceof _i}s(ke,"It$1");var vi=class extends Lr{static{s(this,"Et$1")}__tag;__start;__listType;$config(){return this.config("list",{$transform:s(e=>{(function(t){const n=t.getNextSibling();Ee(n)&&t.getListType()===n.getListType()&&Im(t,n)})(e),AS(e)},"$transform"),extends:Lr,importDOM:pb({ol:s(()=>({conversion:Mv,priority:0}),"ol"),ul:s(()=>({conversion:Mv,priority:0}),"ul")})})}constructor(e="number",t=1,n){super(n);const r=HR[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=bn().createElement(n);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,kv(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(kv(t,n.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return Ke(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let i=0;i<n.length;i++){const o=n[i];ke(o)||(r===n&&(r=[...n]),r[i]=this.createListItemNode().append(!xe(o)||Ee(o)||o.isInline()?o:pr(o.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return ke(e)}createListItemNode(){return Qn()}};function kv(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const l=o[`${n.__tag}Depth`]||[],a=ra(n)-1,c=a%l.length,u=l[c],d=o[n.__tag];let f;const h=o.nested,g=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&r.push(d),g!==void 0&&n.__listType==="check"&&r.push(g),u!==void 0){r.push(...Cl(u));for(let p=0;p<l.length;p++)p!==c&&i.push(n.__tag+p)}if(f!==void 0){const p=Cl(f);a>1?r.push(...p):i.push(...p)}}i.length>0&&Cd(e,...i),r.length>0&&mr(e,...r)}s(kv,"Dt$1");function Mv(e){let t;if((function(n){return Ke(n)&&n.nodeName.toLowerCase()==="ol"})(e)){const n=e.start;t=Zn("number",n)}else t=(function(n){if(n.getAttribute("__lexicallisttype")==="check"||n.classList.contains("contains-task-list")||n.getAttribute("data-is-checklist")==="1")return!0;for(const r of n.childNodes)if(Ke(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(e)?Zn("check"):Zn("bullet");return Cr(t,e),{after:s(n=>(function(r,i){const o=i.createListItemNode.bind(i),l=[];for(let a=0;a<r.length;a++){const c=r[a];if(ke(c)){l.push(c);const u=c.getChildren();u.length>1&&u.forEach(d=>{Ee(d)&&l.push(o().append(d))})}else l.push(o().append(c))}return l})(n,t),"after"),node:t}}s(Mv,"wt$1");var HR={ol:"number",ul:"bullet"};function Zn(e="number",t=1){return ci(new vi(e,t))}s(Zn,"$t$1");function Ee(e){return e instanceof vi}s(Ee,"Rt$1");var NS=br("INSERT_CHECK_LIST_COMMAND");function KR(e,t){const n=t&&t.disableTakeFocusOnClick||!1,r=typeof n=="boolean"?()=>n:n.peek.bind(n),i=s(u=>{const d=u.target;if(!Ke(d))return!1;const f=d.__lexicalCheckListLastHandled;return f!==void 0&&u.timeStamp-f<500},"o"),o=s(u=>{const d=u.target;Ke(d)&&(d.__lexicalCheckListLastHandled=u.timeStamp)},"l"),l=s(u=>{i(u)||(o(u),Av(u,r()))},"a"),a=s(u=>{u.pointerType==="touch"&&(i(u)||(o(u),Av(u,r())))},"u"),c=s(u=>{(function(d,f){OS(d,()=>{d.preventDefault(),f&&d.stopPropagation()})})(u,r())},"g");return At(e.registerCommand(NS,()=>(ig("check"),!0),st),e.registerCommand(ob,u=>Iv(u,e,!1),st),e.registerCommand(lb,u=>Iv(u,e,!0),st),e.registerCommand(yd,()=>og(e)!=null?(e.getRootElement()?.focus(),!0):!1,st),e.registerCommand(cb,u=>{const d=og(e);return!(d==null||!e.isEditable())&&(e.update(()=>{const f=si(d);ke(f)&&(u.preventDefault(),f.toggleChecked())}),!0)},st),e.registerCommand(sb,u=>e.read("latest",()=>{const d=re();if(ie(d)&&d.isCollapsed()){const{anchor:f}=d,h=f.type==="element";if(h||f.offset===0){const g=f.getNode(),p=dt(g,_=>xe(_)&&!_.isInline());if(ke(p)){const _=p.getParent();if(Ee(_)&&_.getListType()==="check"&&(h||p.getFirstDescendant()===g)){const y=e.getElementByKey(p.__key);if(y!=null&&_b(y)!==y)return y.focus(),u.preventDefault(),!0}}}}return!1}),st),e.registerRootListener(u=>{if(u!==null)return At(Oh(u,{click:l,pointerup:a}),Oh(u,{mousedown:c,pointerdown:c},{capture:!0}),k7(u,"touchstart",c,{capture:!0,passive:!1}))}))}s(KR,"Bt$1");function OS(e,t){const n=e.target;if(!Ke(n))return;const r=n.firstChild;if(Ke(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;let o=null,l=null;if("clientX"in e)o=e.clientX;else if("touches"in e){const g=e.touches;g.length>0&&(o=g[0].clientX,l="touch")}if(o==null)return;const a=n.getBoundingClientRect(),c=o/L7(n),u=n.ownerDocument.defaultView,d=u?u.getComputedStyle(n,"::before"):{width:"0px"},f=parseFloat(d.width),h=l==="touch"||"pointerType"in e&&e.pointerType==="touch"?32:0;(n.dir==="rtl"?c<a.right+h&&c>a.right-f-h:c>a.left-h&&c<a.left+f+h)&&t()}s(OS,"Wt$1");function Av(e,t){OS(e,()=>{if(Ke(e.target)){const n=e.target,r=x7(n);r!=null&&r.isEditable()&&r.update(()=>{const i=si(n);ke(i)&&(t?(Th(hb),Th(c7)):n.focus(),i.toggleChecked())})}})}s(Av,"Ut$2");function og(e){const t=e.getRootElement(),n=t?_b(t):null;return Ke(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}s(og,"Jt");function Iv(e,t,n){const r=og(t);return r!=null&&t.update(()=>{const i=si(r);if(!ke(i))return;const o=(function(l,a){let c=a?l.getPreviousSibling():l.getNextSibling(),u=l;for(;c==null&&ke(u);)u=u.getParentOrThrow().getParent(),u!=null&&(c=a?u.getPreviousSibling():u.getNextSibling());for(;ke(c);){const d=a?c.getLastChild():c.getFirstChild();if(!Ee(d))return c;c=a?d.getLastChild():d.getFirstChild()}return null})(i,n);if(o!=null){o.selectStart();const l=t.getElementByKey(o.__key);l!=null&&(e.preventDefault(),setTimeout(()=>{l.focus()},0))}}),!1}s(Iv,"Vt");function UR(e){const t=[];for(const n of e)if(ke(n)){t.push(n);const r=n.getChildren();if(r.length>1)for(const i of r)Ee(i)&&t.push(Qn().append(i))}else t.push(Qn().append(n));return t}s(UR,"qt");var WR={$import:s((e,t)=>{let n;var r;return eE(t,"ol")?n=Zn("number",t.start):n=(r=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||r.querySelector(":scope > [aria-checked]")!==null?Zn("check"):Zn("bullet"),Cr(n,t),[n.splice(0,0,rE(UR(e.$importChildren(t)),t))]},"$import"),match:zt.tag("ol","ul"),name:"@lexical/list/list"};function DS(e,t){if(t.length!==1)return t;const n=t[0];return wa(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}s(DS,"jt$1");function RS(e){const t=s(l=>gm(l)&&!Ee(l),"e");if(!e.some(t))return e;const n=[];let r=[];const i=s(()=>{r.length>0&&(n.push(r),r=[])},"i");for(const l of e)t(l)?(i(),n.push(xe(l)?l.getChildren():[l])):r.push(l);i();const o=[];for(const l of n)o.length>0&&o.push(Or()),o.push(...l);return o}s(RS,"Ht$1");var zR={$import:s((e,t)=>{const n=t.getAttribute("aria-checked"),r=Qn(n==="true"||n!=="false"&&void 0);return ui(r,t),Cr(r,t),[r.splice(0,0,RS(DS(r,e.$importChildren(t))))]},"$import"),match:zt.tag("li"),name:"@lexical/list/li"};function Nv(e,t,n){const r=eE(n,"input")?n:n.querySelector('input[type="checkbox"]');if(!r||r.getAttribute("type")!=="checkbox")return[];const i=Qn(r.hasAttribute("checked"));return ui(i,t),Cr(i,t),[i.splice(0,0,RS(DS(i,e.$importChildren(t))))]}s(Nv,"Gt");var Az=[{$import:s((e,t,n)=>{const r=t.querySelector(':scope > input[type="checkbox"]');return r?Nv(e,t,r):n()},"$import"),match:zt.tag("li").classAll("task-list-item"),name:"@lexical/list/li-task-list-item"},{$import:s((e,t,n)=>{const r=t.querySelector(":scope > .checkbox-wrapper");if(!r)return n();const i=r.querySelector(':scope > input[type="checkbox"]');return i?Nv(e,t,i):n()},"$import"),match:zt.tag("li").classAll("joplin-checkbox"),name:"@lexical/list/li-joplin-checkbox"},WR,zR],jR=br("UPDATE_LIST_START_COMMAND"),LS=br("INSERT_UNORDERED_LIST_COMMAND"),$S=br("INSERT_ORDERED_LIST_COMMAND"),PS=br("REMOVE_LIST_COMMAND");function Ov(e,t){return At(e.registerCommand($S,()=>(ig("number"),!0),st),e.registerCommand(jR,n=>{const{listNodeKey:r,newStart:i}=n,o=yn(r);return!!Ee(o)&&(o.getListType()==="number"&&(o.setStart(i),AS(o)),!0)},st),e.registerCommand(LS,()=>(ig("bullet"),!0),st),e.registerCommand(PS,()=>(PR(),!0),st),e.registerCommand(Ah,()=>VR(!!(t&&t.restoreNumbering)),st),e.registerCommand(_d,n=>{if((function(){const l=re();if(!ie(l)||!l.isCollapsed()||l.anchor.offset!==0)return!1;const a=l.anchor.getNode(),c=dt(a,ke);if(!ke(c))return!1;const u=c.getFirstDescendant();if(u===null||!c.is(a)&&!u.is(a))return!1;const d=c.getParent();if(!Ee(d)||!c.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!Un(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Xe().append(...c.getChildren());return d.insertBefore(h),c.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return n.preventDefault(),!0;const r=re();if(!ie(r)||!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;let o=i.getNode();for(;!ke(o);){if(o.getPreviousSibling()!==null)return!1;const l=o.getParent();if(l===null)return!1;o=l}return!(!ke(o)||!o.collapseAtStart(r))&&(n.preventDefault(),!0)},UA),e.registerNodeTransform(_i,n=>{const r=n.getFirstChild();if(r){if(Ae(r)){const i=r.getStyle(),o=r.getFormat();n.getTextStyle()!==i&&n.setTextStyle(i),n.getTextFormat()!==o&&n.setTextFormat(o)}}else{const i=re();ie(i)&&(i.style!==n.getTextStyle()||i.format!==n.getTextFormat())&&i.isCollapsed()&&n.is(i.anchor.getNode())&&n.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Ls,n=>{const r=n.getParent();if(ke(r)&&n.is(r.getFirstChild())){const i=n.getStyle(),o=n.getFormat();i===r.getTextStyle()&&o===r.getTextFormat()||r.setTextStyle(i).setTextFormat(o)}}))}s(Ov,"re");function JR(e){const t=s(n=>{const r=n.getParent();if(Ee(n.getFirstChild())||!Ee(r))return;const i=dt(n,o=>ke(o)&&Ee(o.getParent())&&ke(o.getPreviousSibling()));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(ke(i)){const o=i.getPreviousSibling();if(ke(o)){const l=(function(a){let c=a,u=c.getFirstChild();for(;Ee(u);){const d=u.getLastChild();if(!ke(d))break;c=d,u=c.getFirstChild()}return c})(o).getParent();if(Ee(l)){const a=ra(l);a+1<ra(r)&&n.setIndent(a)}}}},"e");return e.registerNodeTransform(vi,n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Ee(i)){for(const o of i.getChildren())if(ke(o)){t(o);const l=o.getFirstChild();Ee(l)&&r.push(l)}}}})}s(JR,"ie");var GR={testNode:"list",visitNode:s(function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=Zn(r);if(ke(t)){const o=Qn();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)},"visitNode")},qR={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(Qn(r))}},ZR={testLexicalNode:Ee,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})},"visitLexicalNode")},YR={testLexicalNode:ke,visitLexicalNode:s(({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&Ee(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),l=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let a=null;for(const c of e.getChildren())Ae(c)||Dr(c)||c.isInline()&&(xe(c)||Un(c))?(a??(a=n.appendToParent(l,{type:"paragraph",children:[]})),n.visit(c,a)):(a=null,n.visit(c,l))}},"visitLexicalNode")};function Dv({maxIndent:e,$canIndent:t}){const[n]=fn();return(0,m.useEffect)(()=>tI(n,e,t),[n,e,t]),null}s(Dv,"o$2");function Rv({disableTakeFocusOnClick:e=!1}){const[t]=fn();return(0,m.useEffect)(()=>KR(t,{disableTakeFocusOnClick:e}),[t,e]),null}s(Rv,"l$3");function Lv({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){const[n]=fn();return(0,m.useEffect)(()=>{if(!n.hasNodes([vi,_i]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),(0,m.useEffect)(()=>At(Ov(n,{restoreNumbering:t}),e?JR(n):()=>{}),[n,e,t]),(function(r){(0,m.useEffect)(()=>Ov(r),[r])})(n),null}s(Lv,"l$2");var XR=new Map([["number",$S],["bullet",LS],["check",NS],["",PS]]),$v=he("",e=>{e.sub(e.pipe(Cs,mt(gt)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:dt(r,l=>{const a=l.getParent();return a!==null&&xn(a)});i??(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(Ee(i)){const l=Ab(r,vi),a=l?l.getListType():i.getListType();e.pub($v,a)}else e.pub($v,"")})}),QR=wt(e=>{e.sub(e.pipe(QR,mt(gt)),([t,n])=>{n?.dispatchCommand(XR.get(t),void 0)})}),eL=En({init(e){var t;(t=e.getValue(fi))==null||t.registerCommand(fu,()=>!nL(7),Rr),e.pubIn({[Bs]:"lists",[wu]:bk(),[Tu]:Nk(),[$r]:[GR,qR],[hi]:[_i,vi],[gi]:[ZR,YR],[Sm]:kk(),[Vs]:[Dv,Lv,Rv],[km]:[Dv,Lv,Rv]})}});function tL(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>xe(n)?n:n.getParentOrThrow()))}s(tL,"getElementNodesInSelection");function nL(e){const t=re();if(!ie(t))return!1;const n=tL(t);let r=0;for(const i of n)if(Ee(i))r=Math.max(ra(i)+1,r);else if(ke(i)){const o=i.getParent();if(o?.getChildren().length===1){const l=o.getParent();if(ke(l)&&l.getChildren().length===1)return!1}if(!Ee(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(ra(o)+1,r)}return r<=e}s(nL,"isIndentPermitted");function FS(e,t){return e===null||e===t?!1:e.dataset.editorDialog!==void 0||e.dataset.toolbarItem!==void 0||e.dataset.editorDropdown?!0:FS(e.parentElement,t)}s(FS,"isPartOftheEditorUI");function rL(){const e=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),t=crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,[...t.entries()].map(([n,r])=>[4,6,8,10].includes(n)?`-${e[r]}`:e[r]).join("")}s(rL,"uuidv4");var VS=s(e=>e===0?"th":"td","getCellType"),BS={center:J.centeredCell,left:J.leftAlignedCell,right:J.rightAlignedCell};function lr(e){const t=yn(e);return KS(t)?t:null}s(lr,"$getTableNodeByKey");var iL=s(({mdastNode:e,parentEditor:t,lexicalTable:n})=>{const r=n.getKey(),[i,o]=m.useState(null),[l,a]=vr(pi,_r),c=m.useMemo(()=>y=>(y.__cacheKey??(y.__cacheKey=rL()),y.__cacheKey),[]),u=m.useCallback(y=>{const v=n.getColCount();if(y===null){o(null);return}let[x,C]=y;if(x>v-1&&(x=0,C++),x<0&&(x=v-1,C-=1),C>n.getRowCount()-1){o(null),t.update(()=>{const b=lr(r);if(b)if(b.getNextSibling())b.selectNext();else{const S=Xe();b.insertAfter(S),S.select()}});return}if(C<0){o(null),t.update(()=>{var b;(b=lr(r))==null||b.selectPrevious()});return}o([x,C])},[n,t,r]);m.useEffect(()=>{n.focusEmitter.subscribe(u)},[n,u]);const d=m.useCallback(y=>{y.preventDefault(),t.update(()=>{const v=lr(r);v&&(v.addRowToBottom(),o([0,v.getRowCount()]))})},[t,r]),f=m.useCallback(y=>{y.preventDefault(),t.update(()=>{const v=lr(r);v&&(v.addColumnToRight(),o([v.getColCount(),0]))})},[t,r]),[h,g]=m.useState([-1,-1]),p=m.useCallback(y=>{let v=y.target;for(;v&&!["TH","TD"].includes(v.tagName);){if(v===y.currentTarget)return;v=v.parentElement}if(v===null)return;const x=v.parentElement,C=x.parentElement.tagName==="TFOOT"?-1:Array.from(x.children).indexOf(v),b=v.tagName==="TH"?-1:Array.from(x.parentElement.children).indexOf(x);g([C,b])},[]),_=mi();return m.createElement("table",{className:J.tableEditor,onMouseOver:p,onMouseLeave:s(()=>{g([-1,-1])},"onMouseLeave")},m.createElement("colgroup",null,a?null:m.createElement("col",null),Array.from({length:e.children[0].children.length},(y,v)=>{const x=(e.align??[])[v]??"left",C=BS[x];return m.createElement("col",{key:v,className:C})}),a?null:m.createElement("col",null)),a||m.createElement("thead",null,m.createElement("tr",null,m.createElement("th",{className:J.tableToolsColumn}),Array.from({length:e.children[0].children.length},(y,v)=>m.createElement("th",{key:v,"data-tool-cell":!0},m.createElement(lL,{setActiveCellWithBoundaries:u,parentEditor:t,colIndex:v,highlightedCoordinates:h,lexicalTable:n,align:(e.align??[])[v]}))),m.createElement("th",{className:J.tableToolsColumn,"data-tool-cell":!0},m.createElement("button",{className:J.iconButton,type:"button",title:_("table.deleteTable","Delete table"),onClick:s(y=>{y.preventDefault(),t.update(()=>{const v=lr(r);v&&(v.selectNext(),v.remove())})},"onClick")},l("delete_small"))))),m.createElement("tbody",null,e.children.map((y,v)=>{const x=VS(v);return m.createElement("tr",{key:v},a||m.createElement(x,{className:J.toolCell,"data-tool-cell":!0},m.createElement(aL,{setActiveCellWithBoundaries:u,parentEditor:t,rowIndex:v,highlightedCoordinates:h,lexicalTable:n})),y.children.map((C,b)=>{var S;return m.createElement(oL,{align:(S=e.align)==null?void 0:S[b],key:c(C),contents:C.children,setActiveCell:u,rowIndex:v,colIndex:b,lexicalTable:n,parentEditor:t,activeCell:a?[-1,-1]:i})}),a||v===0&&m.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},m.createElement("button",{type:"button",className:J.addColumnButton,onClick:f},l("add_column"))))})),a||m.createElement("tfoot",null,m.createElement("tr",null,m.createElement("th",null),m.createElement("th",{colSpan:n.getColCount(),"data-tool-cell":!0},m.createElement("button",{type:"button",className:J.addRowButton,onClick:d},l("add_row"))),m.createElement("th",null))))},"TableEditor"),oL=s(({align:e,...t})=>{const{activeCell:n,setActiveCell:r}=t,i=n?.[0]===t.colIndex&&n[1]===t.rowIndex,o=BS[e??"left"],l=VS(t.rowIndex);return m.createElement(l,{className:o,"data-active":i,onClick:s(()=>{r([t.colIndex,t.rowIndex])},"onClick")},m.createElement(sL,{...t,focus:i}))},"Cell"),sL=s(({focus:e,setActiveCell:t,parentEditor:n,lexicalTable:r,contents:i,colIndex:o,rowIndex:l})=>{const a=r.getKey(),[c,u,d,f,h,g,p,_,y,v]=vr(xm,Ad,Cm,Id,QE,La,bs,Em,fi,fS),[x,C]=m.useState(null);m.useEffect(()=>{const S=qE({name:"@mdxeditor/table-cell",nodes:d,namespace:"TableCellEditor",parentEditor:n,historyMode:"table-local",initialEditorState:s(()=>{HE({root:Lt(),mdastRoot:{type:"root",children:[{type:"paragraph",children:i}]},visitors:c,jsxComponentDescriptors:f,directiveDescriptors:h,codeBlockEditorDescriptors:g,defaultCodeBlockLanguage:p})},"initialEditorState")});return C(S),()=>{S.dispose()}},[]);const b=m.useCallback(S=>{x&&(x.getEditorState().read(()=>{const M=LE({root:Lt(),jsxComponentDescriptors:f,visitors:u,jsxIsAvailable:_});n.update(()=>{const T=lr(a);T&&T.updateCellContents(o,l,M.children[0].children)},{discrete:!0}),n.dispatchCommand(Xl,void 0)}),t(S))},[o,x,u,f,_,n,l,t,a]);return m.useEffect(()=>{if(x)return At(x.registerCommand(sm,S=>{S.preventDefault();const M=S.shiftKey?[o-1,l]:[o+1,l];return b(M),!0},Rr),x.registerCommand(im,()=>(t([o,l]),!1),st),x.registerCommand(vd,S=>{S?.preventDefault();const M=S?.shiftKey?[o,l-1]:[o,l+1];return b(M),!0},Rr),x.registerCommand(q2,S=>{const M=S.relatedTarget;return FS(M,y.getRootElement())?!1:(b(null),!0)},Me),x.registerCommand(Xl,()=>(b(null),!0),Me))},[o,x,y,l,b,t]),m.useEffect(()=>{e&&x&&x.focus()},[e,x]),x?m.createElement(mS,{initialEditor:x},m.createElement(_S,{contentEditable:m.createElement(vm,null),placeholder:m.createElement("div",null),ErrorBoundary:ym}),v.map((S,M)=>m.createElement(S,{key:M}))):null},"CellEditor"),lL=s(({parentEditor:e,highlightedCoordinates:t,align:n,lexicalTable:r,colIndex:i,setActiveCellWithBoundaries:o})=>{const l=r.getKey(),[a,c]=vr(Po,pi),u=m.useCallback(g=>{e.update(()=>{const p=lr(l);p&&(p.insertColumnAt(g),o([g,0]))})},[e,o,l]),d=m.useCallback(g=>{e.update(()=>{var p;(p=lr(l))==null||p.deleteColumnAt(g)})},[e,l]),f=m.useCallback((g,p)=>{e.update(()=>{var _;(_=lr(l))==null||_.setColumnAlign(g,p)})},[e,l]),h=mi();return m.createElement(Jg,null,m.createElement(Ex,{className:J.tableColumnEditorTrigger,"data-active":t[0]===i+1,title:h("table.columnMenu","Column menu")},c("more_horiz")),m.createElement(jg,{container:a?.current},m.createElement(Sx,{className:(0,tt.default)(J.tableColumnEditorPopoverContent),onOpenAutoFocus:s(g=>{g.preventDefault()},"onOpenAutoFocus"),sideOffset:5,side:"top"},m.createElement(Qx,{className:J.tableColumnEditorToolbar},m.createElement(Z9,{className:J.toggleGroupRoot,onValueChange:s(g=>{f(i,g)},"onValueChange"),value:n??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},m.createElement(Jd,{value:"left",title:h("table.alignLeft","Align left")},c("format_align_left")),m.createElement(Jd,{value:"center",title:h("table.alignCenter","Align center")},c("format_align_center")),m.createElement(Jd,{value:"right",title:h("table.alignRight","Align right")},c("format_align_right"))),m.createElement(q9,null),m.createElement(os,{onClick:u.bind(null,i),title:h("table.insertColumnLeft","Insert a column to the left of this one")},c("insert_col_left")),m.createElement(os,{onClick:u.bind(null,i+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},c("insert_col_right")),m.createElement(os,{onClick:d.bind(null,i),title:h("table.deleteColumn","Delete this column")},c("delete_small"))),m.createElement(zg,{className:J.popoverArrow}))))},"ColumnEditor"),aL=s(({parentEditor:e,highlightedCoordinates:t,lexicalTable:n,rowIndex:r,setActiveCellWithBoundaries:i})=>{const o=n.getKey(),[l,a]=vr(Po,pi),c=m.useCallback(f=>{e.update(()=>{const h=lr(o);h&&(h.insertRowAt(f),i([0,f]))})},[e,i,o]),u=m.useCallback(f=>{e.update(()=>{var h;(h=lr(o))==null||h.deleteRowAt(f)})},[e,o]),d=mi();return m.createElement(Jg,null,m.createElement(Ex,{className:J.tableColumnEditorTrigger,"data-active":t[1]===r,title:d("table.rowMenu","Row menu")},a("more_horiz")),m.createElement(jg,{container:l?.current},m.createElement(Sx,{className:(0,tt.default)(J.tableColumnEditorPopoverContent),onOpenAutoFocus:s(f=>{f.preventDefault()},"onOpenAutoFocus"),sideOffset:5,side:"bottom"},m.createElement(Qx,{className:J.tableColumnEditorToolbar},m.createElement(os,{onClick:c.bind(null,r),title:d("table.insertRowAbove","Insert a row above this one")},a("insert_row_above")),m.createElement(os,{onClick:c.bind(null,r+1),title:d("table.insertRowBelow","Insert a row below this one")},a("insert_row_below")),m.createElement(os,{onClick:u.bind(null,r),title:d("table.deleteRow","Delete this row")},a("delete_small"))),m.createElement(zg,{className:J.popoverArrow}))))},"RowEditor"),cL=Object.defineProperty,uL=s((e,t,n)=>t in e?cL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$2"),Pv=s((e,t,n)=>uL(e,typeof t!="symbol"?t+"":t,n),"__publicField$2"),Fv={type:"tableCell",children:[]};function dL(){let e=go;return{publish:s(t=>{e(t)},"publish"),subscribe:s(t=>{e=t},"subscribe")}}s(dL,"coordinatesEmitter");var Dd=class HS extends Ma{static{s(this,"TableNode")}constructor(t,n){super(n),Pv(this,"__mdastNode"),Pv(this,"focusEmitter",dL()),this.__mdastNode=t??{type:"table",children:[]}}static getType(){return"table"}static clone(t){return new HS(structuredClone(t.__mdastNode),t.__key)}static importJSON(t){return Nm(t.mdastNode)}static importDOM(){return{table:s(()=>({conversion:fL,priority:3}),"table")}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var t;return((t=this.__mdastNode.children[0])==null?void 0:t.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(t,n,r){const i=this.getWritable().__mdastNode,o=i.children[n],l=o.children,a=l[t],c=Array.from(l),u={...a,children:r},d={...o,children:c};c[t]=u,i.children[n]=d}insertColumnAt(t){const n=this.getWritable().__mdastNode;for(let r=0;r<n.children.length;r++){const i=n.children[r],o=i.children,l=Array.from(o),a={...i,children:l};l.splice(t,0,structuredClone(Fv)),n.children[r]=a}n.align&&n.align.length>0&&n.align.splice(t,0,"left")}deleteColumnAt(t){const n=this.getWritable().__mdastNode;for(let r=0;r<n.children.length;r++){const i=n.children[r],o=i.children,l=Array.from(o),a={...i,children:l};l.splice(t,1),n.children[r]=a}}insertRowAt(t){const n=this.getWritable().__mdastNode,r={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(Fv))};n.children.splice(t,0,r)}deleteRowAt(t){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(t,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(t,n){const r=this.getWritable().__mdastNode;r.align??(r.align=[]),r.align[t]=n}decorate(t){return m.createElement(iL,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:t})}select(t){this.focusEmitter.publish(t??[0,0])}isInline(){return!1}};function KS(e){return e instanceof Dd}s(KS,"$isTableNode");function Nm(e){return new Dd(e)}s(Nm,"$createTableNode");function fL(e){const t=e.querySelectorAll("tr"),n=Array.from(t).map(r=>({type:"tableRow",children:Array.from(r.querySelectorAll("td, th")).map(i=>({type:"tableCell",children:[{type:"text",value:i.textContent}]}))}));return{node:new Dd({type:"table",children:n})}}s(fL,"$convertTableElement");var hL={testLexicalNode:KS,visitLexicalNode({actions:e,mdastParent:t,lexicalNode:n}){e.appendToParent(t,n.getMdastNode())}},gL={testNode:"table",visitNode({mdastNode:e,lexicalParent:t}){t.append(Nm(e))}};function pL(e=1,t=1){const n={type:"table",children:[]};for(let r=0;r<e;r++){const i={type:"tableRow",children:[]};for(let o=0;o<t;o++)i.children.push({type:"tableCell",children:[]});n.children.push(i)}return n}s(pL,"seedTable");var mL=wt(e=>{e.link(e.pipe(mL,$i(({rows:t,columns:n})=>()=>Nm(pL(t,n)))),Mm)}),_L=En({init(e,t){e.pubIn({[wu]:Ak(),[Tu]:Ck(),[$r]:gL,[hi]:Dd,[gi]:hL,[Sm]:Ik({tableCellPadding:t?.tableCellPadding??!0,tablePipeAlign:t?.tablePipeAlign??!0})})}}),Vv=new Set(["http:","https:","mailto:","sms:","tel:"]),Vr=class US extends Lr{static{s(this,"Z")}__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new US(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:l=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=l}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const n=bn().createElement("a");return this.updateLinkDOM(null,n,t),mr(n,t.theme.link),n}updateLinkDOM(t,n,r){if(Cb(n)){t&&t.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,l=this[o];t&&t[o]===l||(l?n[i]=l:n.removeAttribute(i))}}}updateDOM(t,n,r){return this.updateLinkDOM(t,n,r),!1}static importDOM(){return{a:s(t=>({conversion:yL,priority:1}),"a")}}static importJSON(t){return ai().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const n=t;t=Uv(t);try{const r=new URL(Uv(t));if(!Vv.has(r.protocol))return"about:blank"}catch{const i=n.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!Vv.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=tn(this);return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!ie(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function Bv(e){const t=Ui(e,"next");return[t,t.getFlipped()]}s(Bv,"H");function Hv(e,t){for(const n of t)if(n.origin.isAttached()){const r=zi(n);Mh(e,r);return}}s(Hv,"G");function vL(e){const t=re();let n=null,r=null;function i(){ie(t)&&(Hv(t.anchor,n),Hv(t.focus,r),jl(t))}s(i,"i"),ie(t)&&(n=Bv(t.anchor),r=Bv(t.focus));let o=!1;for(const a of Wi(e,"next")){const c=a.origin;if(xe(c)&&!c.isInline()){const u=c.getChildren();if(u.length>0){const d=tn(e);d.append(...u),c.append(d),o=!0}Qp(c,xl(a),{$shouldSplit:s(()=>!1,"$shouldSplit")})}}function l(a,c,u){const[d,f]=a,h=s(p=>uu(p)&&p.origin.is(c),"l");if(!h(d)&&!h(f))return a;const g=zi(Wi(u,"next"));return[g,g.getFlipped()]}if(s(l,"u"),e.isAttached()){const a=e.getPreviousSibling();if(St(a)&&a.shouldMergeAdjacentLink(e))return n&&(n=l(n,a,e)),r&&(r=l(r,a,e)),a.append(...e.getChildren()),e.remove(),void i();const c=e.getNextSibling();St(c)&&e.shouldMergeAdjacentLink(c)&&(n&&(n=l(n,e,c)),r&&(r=l(r,e,c)),e.append(...c.getChildren()),c.remove(),o=!0)}if(o){if(!e.canBeEmpty()&&e.isEmpty()){const a=e.getParent();e.remove(),a&&a.isEmpty()&&a.remove()}i()}}s(vL,"q");function yL(e){let t=null;if(Cb(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=ai(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}s(yL,"Q$1");function ai(e="",t){return ci(new Vr(e,t))}s(ai,"V$1");function St(e){return e instanceof Vr}s(St,"X$1");var Rd=class WS extends Vr{static{s(this,"Y")}__isUnlinked;constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new WS(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?bn().createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return sg().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=sg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}};function sg(e="",t){return ci(new Rd(e,t))}s(sg,"tt");function ln(e){return e instanceof Rd}s(ln,"et");var ki=br("TOGGLE_LINK_COMMAND");function Kv(e,t){if(e.type==="element"){const n=e.getNode();return xe(n)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",r);for(const a of i)l.append("v",a);throw o.search=l.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}s(Kv,"rt$1");function bf(e,t={}){let n;if(e&&typeof e=="object"){const{url:d,...f}=e;n=d,t={...f,...t}}else n=e;const{target:r,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,l=re();if(l===null||!ie(l)&&!He(l))return;if(He(l)){const d=l.getNodes();if(d.length===0)return;d.forEach(f=>{if(n===null){const h=dt(f,g=>!ln(g)&&St(g));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=dt(f,g=>!ln(g)&&St(g));if(h)h.setURL(n),r!==void 0&&h.setTarget(r),o!==void 0&&h.setRel(o);else{const g=ai(n,{rel:o,target:r});f.insertBefore(g),g.append(f)}}});return}if(l.isCollapsed()&&n===null)for(const d of l.getNodes()){const f=dt(d,h=>!ln(h)&&St(h));f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove());return}const a=l.extract();if(n===null){const d=new Set;a.forEach(f=>{const h=dt(f,g=>!ln(g)&&St(g));if(h!==null){const g=h.getKey();if(d.has(g))return;(function(p,_){const y=new Set(_.filter(E=>p.isParentOf(E)).map(E=>E.getKey())),v=p.getChildren(),x=s(E=>y.has(E.getKey())||xe(E)&&_.some(A=>p.isParentOf(A)&&E.isParentOf(A)),"i"),C=v.filter(x);if(C.length===v.length)return v.forEach(E=>p.insertBefore(E)),void p.remove();const b=v.findIndex(x),S=v.findLastIndex(x),M=b===0,T=S===v.length-1;if(M)C.forEach(E=>p.insertBefore(E));else if(T)for(let E=C.length-1;E>=0;E--)p.insertAfter(C[E]);else{for(let A=C.length-1;A>=0;A--)p.insertAfter(C[A]);const E=v.slice(S+1);if(E.length>0){const A=tn(p);C[C.length-1].insertAfter(A),E.forEach(D=>A.append(D))}}})(h,a),d.add(g)}});return}const c=new Set,u=s(d=>{c.has(d.getKey())||(c.add(d.getKey()),d.setURL(n),r!==void 0&&d.setTarget(r),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))},"m");if(a.length===1){const d=a[0],f=dt(d,St);if(f!==null)return u(f)}(function(d){const f=re();if(!ie(f))return d();const h=jl(f),g=h.isBackward(),p=Kv(h.anchor,g?-1:0),_=Kv(h.focus,g?0:-1);if(d(),p||_){const y=re();if(ie(y)){const v=y.clone();if(p){const x=p.getParent();x&&v.anchor.set(x.getKey(),p.getIndexWithinParent()+(g?1:0),"element")}if(_){const x=_.getParent();x&&v.focus.set(x.getKey(),_.getIndexWithinParent()+(g?0:1),"element")}Xn(jl(v))}}})(()=>{let d=null;for(const f of a){if(!f.isAttached())continue;const h=dt(f,St);if(h){u(h);continue}if(xe(f)){if(!f.isInline())continue;if(St(f)){if(!(ln(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const p of f.getChildren())f.insertBefore(p);f.remove();continue}}const g=f.getPreviousSibling();St(g)&&g.is(d)?g.append(f):(d=ai(n,{rel:o,target:r,title:i}),f.insertAfter(d),d.append(f))}})}s(bf,"it$1");var xL=/^\+?[0-9\s()-]{5,}$/;function Uv(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:xL.test(e)?`tel:${e}`:`https://${e}`}s(Uv,"st$1");var Iz=[{$import:s((e,t)=>{if(!t.textContent&&t.children.length===0)return[];const n=t.getAttribute("href")||"",r={rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")};return nE(e.$importChildren(t),()=>ai(n,r))},"$import"),match:zt.tag("a"),name:"@lexical/link/a"}];function CL(e,t){return At(e.registerNodeTransform(Vr,vL),e.registerCommand(ki,n=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(n===null)return bf(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(bf(n,i),!0);{const{url:o,target:l,rel:a,title:c}=n;return bf(o,{...i,rel:a,target:l,title:c}),!0}},Me),Lo(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Gl,i=>{const o=re();if(!ie(o)||o.isCollapsed()||!Zr(i,ClipboardEvent)||i.clipboardData===null)return!1;const l=i.clipboardData.getData("text");return n(l)?!o.getNodes().some(a=>xe(a)||Ae(a)&&!a.isSimpleText())&&(e.dispatchCommand(ki,{...r,url:l}),i.preventDefault(),!0):!1},st)}))}s(CL,"ut");function lg(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}s(lg,"dt");var Nz=lg(/(([^<>()[\]\\.,;:\s@"]{1,64}(\.[^<>()[\]\\.,;:\s@"]{1,64}){0,63})|(".{1,255}"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]{1,63}\.){1,127}[a-zA-Z]{2,63}))/,e=>`mailto:${e}`);function ag(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}s(ag,"mt$1");var zS=/[.,;\s]/;function Mu(e,t){return t.test(e)}s(Mu,"bt$1");function jS(e,t){return Mu(e[e.length-1],t)}s(jS,"kt$1");function cg(e,t){return Mu(e[0],t)}s(cg,"Ut$1");function JS(e,t){let n=e.getPreviousSibling();return xe(n)&&(n=n.getLastDescendant()),n===null||Dr(n)||Ae(n)&&jS(n.getTextContent(),t)}s(JS,"vt$1");function GS(e,t){let n=e.getNextSibling();return xe(n)&&(n=n.getFirstDescendant()),n===null||Dr(n)||Ae(n)&&cg(n.getTextContent(),t)}s(GS,"Tt$1");function bL(e,t,n,r,i){return(e>0?Mu(r[e-1],n):JS(i[0],n))?t<r.length?Mu(r[t],n):GS(i[i.length-1],n):!1}s(bL,"Ct$1");function EL(e,t,n){const r=[],i=[],o=[];let l=0,a=0;const c=[...e];for(;c.length>0;){const u=c[0],d=u.getTextContent().length,f=a;a+d<=t?(r.push(u),l+=d):f>=n?o.push(u):i.push(u),a+=d,c.shift()}return[l,r,i,o]}s(EL,"Lt$1");function SL(e,t,n,r){const i=sg(r.url,r.attributes);if(e.length===1){let o,l=e[0];t===0?[o,l]=l.splitText(n):[,o,l]=l.splitText(t,n);const a=pr(r.text);return a.setFormat(o.getFormat()),a.setDetail(o.getDetail()),a.setStyle(o.getStyle()),i.append(a),o.replace(i),l}if(e.length>1){const o=e[0];let l,a=o.getTextContent().length;t===0?l=o:[,l]=o.splitText(t);const c=[];let u;for(let g=1;g<e.length;g++){const p=e[g],_=p.getTextContent().length,y=a;if(y<n)if(a+_<=n)c.push(p);else{const[v,x]=p.splitText(n-y);c.push(v),u=x}a+=_}const d=re(),f=d?d.getNodes().find(Ae):void 0,h=pr(l.getTextContent());return h.setFormat(l.getFormat()),h.setDetail(l.getDetail()),h.setStyle(l.getStyle()),i.append(h,...c),f&&f===l&&(ie(d)?h.select(d.anchor.offset,d.focus.offset):He(d)&&h.select(0,h.getTextContent().length)),l.replace(i),u}}s(SL,"St$1");function Wv(e,t,n,r){const i=e.getChildren(),o=i.length;for(let u=0;u<o;u++){const d=i[u];if(!Ae(d)||!d.isSimpleText())return Sl(e),void n(null,e.getURL())}const l=e.getTextContent(),a=ag(l,t);if(a===null||a.text!==l||!JS(e,r)||!GS(e,r))return Sl(e),void n(null,e.getURL());const c=e.getURL();if(c!==a.url&&(e.setURL(a.url),n(a.url,c)),a.attributes){const u=e.getRel();u!==a.attributes.rel&&(e.setRel(a.attributes.rel||null),n(a.attributes.rel||null,u));const d=e.getTarget();d!==a.attributes.target&&(e.setTarget(a.attributes.target||null),n(a.attributes.target||null,d))}}s(Wv,"Nt$1");function Sl(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}s(Sl,"Ot$1");var TL={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:zS};function wL(e,t=TL){const{matchers:n,changeHandlers:r,excludeParents:i,separatorRegex:o=zS}=t,l=s((a,c)=>{for(const u of r)u(a,c)},"s");return At(e.registerNodeTransform(Ls,a=>{const c=a.getParentOrThrow(),u=a.getPreviousSibling();ln(c)?Wv(c,n,l,o):!St(c)&&!i.some(d=>d(c))&&(a.isSimpleText()&&(cg(a.getTextContent(),o)||!ln(u))&&(function(d,f,h,g){for(const C of d){const b=C.getParent();if(ln(b)&&!b.getIsUnlinked())return}let p=[...d];const _=p.map(C=>C.getTextContent()).join("");let y,v=_,x=0;for(;(y=ag(v,f))&&y!==null;){const C=y.index,b=C+y.length;if(bL(x+C,x+b,g,_,p)){const[S,,M,T]=EL(p,x+C,x+b);let E=!1;for(const D of M){const L=D.getParent();if(ln(L)&&!L.getIsUnlinked()){E=!0;break}}if(E){x+=b,v=v.substring(b);continue}const A=SL(M,x+C-S,x+b-S,y);p=A?[A,...T]:T,h(y.url,null),x=0}else x+=b;v=v.substring(b)}})((function(d){const f=[d];let h=d.getNextSibling();for(;h!==null&&Ae(h)&&h.isSimpleText()&&(f.push(h),!/[\s]/.test(h.getTextContent()));)h=h.getNextSibling();return f})(a),n,l,o),(function(d,f,h,g){const p=d.getParent(),_=d.getPreviousSibling(),y=d.getNextSibling(),v=d.getTextContent();if(!ln(p)||p.getIsUnlinked()){if(ln(_)&&!_.getIsUnlinked()&&_.is(d.getPreviousSibling())&&d.getParent()===_.getParent()){if(!cg(v,g))return Sl(_),void h(null,_.getURL());if(x=v,_.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(x):/^\.[a-zA-Z0-9]{1,}/.test(x)){const C=_.getTextContent()+v,b=ag(C,f);b!==null&&b.text===C&&(_.append(d),Wv(_,f,h,g),h(null,_.getURL()))}}var x;!ln(y)||y.getIsUnlinked()||jS(v,g)||y.is(d.getNextSibling())&&d.getParent()===y.getParent()&&(Sl(y),h(null,y.getURL()))}})(a,n,l,o))}),e.registerCommand(ki,a=>{const c=re();return a!==null||!ie(c)||c.extract().forEach(u=>{const d=u.getParent();ln(d)&&(d.setIsUnlinked(!d.getIsUnlinked()),d.markDirty())}),!1},st))}s(wL,"Pt$1");var kL={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ai(e.url,{title:e.title}))}},ML={testLexicalNode:St,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})},"visitLexicalNode")};function AL({validateUrl:e,attributes:t}){const[n]=fn();return(0,m.useEffect)(()=>{if(!n.hasNodes([Vr]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),(0,m.useEffect)(()=>CL(n,Na({attributes:t,validateUrl:e})),[n,e,t]),null}s(AL,"l$1");function IL(e,t,n,r){(0,m.useEffect)(()=>{e.hasNodes([Rd])||(function(i,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",i);for(const c of o)a.append("v",c);throw l.search=a.toString(),Error(`Minified Lexical error #${i}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77)}),(0,m.useEffect)(()=>wL(e,{changeHandlers:n?[n]:[],excludeParents:r??[],matchers:t}),[e,t,n,r])}s(IL,"t$1");function NL({matchers:e,onChange:t,excludeParents:n}){const[r]=fn();return IL(r,e,t,n),null}s(NL,"i$2");var OL=[lg(/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,e=>e.startsWith("http")?e:`https://${e}`),lg(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,e=>`mailto:${e}`)],DL=s(()=>m.createElement(NL,{matchers:OL}),"LexicalAutoLinkPlugin"),RL=he(!1),LL=En({init(e,t){const n=!!t?.disableAutoLink,r=t?.validateUrl?{validateUrl:t.validateUrl}:{},i=s(()=>m.createElement(m.Fragment,null,m.createElement(AL,{...r}),n?null:m.createElement(DL,null)),"EditorChild");e.pubIn({[Bs]:"link",[$r]:kL,[hi]:[Vr,Rd],[gi]:ML,[RL]:n,[km]:i,[hS]:i,[Vs]:i})}});function $L(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}s($L,"_objectWithoutPropertiesLoose$1");var PL=["color"],FL=(0,m.forwardRef)(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=$L(e,PL);return(0,m.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),(0,m.createElement)("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),zv=s(()=>m.createElement("div",{className:J.imagePlaceholder},m.createElement(FL,null)),"ImagePlaceholder");function ug(e){const{nodeKey:t,imageSource:n,initialImagePath:r,title:i,alt:o,width:l,height:a}=e,[c,u,d]=vr(JT,pi,_r),[f]=fn(),h=Mn(zT),g=mi();return m.createElement("div",{className:J.editImageToolbar},m.createElement("button",{className:J.iconButton,type:"button",title:g("imageEditor.deleteImage","Delete image"),disabled:d,onClick:s(p=>{p.preventDefault(),f.update(()=>{var _;(_=yn(t))==null||_.remove()})},"onClick")},u("delete_small")),!c&&m.createElement("button",{type:"button",className:(0,tt.default)(J.iconButton,J.editImageButton),title:g("imageEditor.editImage","Edit image"),disabled:d,onClick:s(()=>{h({nodeKey:t,initialValues:{src:r??n,title:i,altText:o,width:Es(l),height:Es(a)}})},"onClick")},u("settings")))}s(ug,"EditImageToolbar");var Pa=s(e=>e.type==="checkbox","isCheckBoxInput"),Ld=s(e=>e.type==="file","isFileInput"),Mi=s(e=>e instanceof Date,"isDateObject"),Vt=s(e=>e==null,"isNullOrUndefined"),Om=s(e=>typeof e=="object","isObjectType"),bt=s(e=>!Vt(e)&&!Array.isArray(e)&&Om(e)&&!Mi(e),"isObject"),dg=s(e=>bt(e)&&e.target?Pa(e.target)?e.target.checked:Ld(e.target)?e.target.files:e.target.value:e,"getEventValue"),VL=/[.[\]'"]/,ko=s(e=>e.split(VL).filter(Boolean),"stringToPath");function BL(e,t){const n=ko(t);let r=e._formValues,i=e._defaultValues;for(let o=0;o<n.length-1;o++){const l=n[o];if(r=r==null?r:r[l],i=i==null?i:i[l],r===null||i===null)return null}}s(BL,"getNullAncestorValue");var qS=s((e,t)=>t.split(".").some((n,r,i)=>!isNaN(Number(n))&&e.has(i.slice(0,r).join("."))),"isNameInFieldArray"),$d=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function at(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if($d&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&e.constructor!==Object)return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=at(e[i]));return r}s(at,"cloneObject");var Ei={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},ar={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},sr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ZS="root",Dm=["__proto__","constructor","prototype"],HL=/^\w*$/,Mo=s(e=>HL.test(e),"isKey"),je=s(e=>e===void 0,"isUndefined"),te=s((e,t,n)=>{if(!t||!bt(e))return n;const r=Mo(t)?[t]:ko(t);if(r.some(o=>Dm.includes(o)))return n;const i=r.reduce((o,l)=>Vt(o)?void 0:o[l],e);return je(i)||i===e?je(e[t])?n:e[t]:i},"get"),wn=s(e=>typeof e=="boolean","isBoolean"),en=s(e=>typeof e=="function","isFunction"),Qe=s((e,t,n)=>{let r=-1;const i=Mo(t)?[t]:ko(t),o=i.length,l=o-1;for(;++r<o;){const a=i[r];let c=n;if(r!==l){const u=e[a];c=bt(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(Dm.includes(a))return;e[a]=c,e=e[a]}},"set"),YS=m.createContext(null);YS.displayName="HookFormControlContext";var Rm=s(()=>m.useContext(YS),"useFormControlContext"),XS=s((e,t,n,r=!0)=>{const i={};for(const o in e)Object.defineProperty(i,o,{get:s(()=>{const l=o;return t._proxyFormState[l]!==ar.all&&(t._proxyFormState[l]=!r||ar.all),n&&(n[l]=!0),e[l]},"get")});return i},"getProxyFormState"),Lm=$d?m.useLayoutEffect:m.useEffect,KL=s(e=>{const t=e.constructor&&e.constructor.prototype;return bt(t)&&t.hasOwnProperty("isPrototypeOf")},"isPlainObject"),fg=s(e=>Vt(e)||!Om(e),"isPrimitive"),jv=s((e,t)=>t.length===0&&!Array.isArray(e)&&!KL(e),"isEmptyObjectWithCustomPrototype");function gn(e,t,n=new WeakMap){if(e===t)return!0;if(fg(e)||fg(t))return Object.is(e,t);if(Mi(e)&&Mi(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(jv(e,r)||jv(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const o=n.get(e);if(o&&o.has(t))return!0;if(o)o.add(t);else{const l=new WeakSet;l.add(t),n.set(e,l)}for(const l of r){const a=e[l];if(!(l in t))return!1;if(l!=="ref"){const c=t[l];if(Mi(a)&&Mi(c)||(bt(a)||Array.isArray(a))&&(bt(c)||Array.isArray(c))?!gn(a,c,n):!Object.is(a,c))return!1}}return!0}s(gn,"deepEqual");function $m(e){const t=m.useRef(!1),n=m.useRef(!1),r=m.useRef(void 0),i=m.useRef(0);return i.current++,!n.current&&e&&(n.current=!0,r.current=at(e())),{resyncIfNeeded:m.useCallback((o,l,a)=>{if(o&&(t.current||n.current&&i.current>1)){const c=l();gn(r.current,c)||a(c)}t.current=!0},[]),snapshot:m.useCallback((o,l)=>{o&&(r.current=at(l()))},[])}}s($m,"useResyncOnReconnect");function UL(e){const t=Rm(),{control:n=t,disabled:r,name:i,exact:o}=e||{},l=s(()=>({...n._formState,defaultValues:n._defaultValues}),"getCurrentFormState"),[a,c]=m.useState(l),u=m.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:d,snapshot:f}=$m(l);return Lm(()=>{d(!r,l,c);const h=n._subscribe({name:i,formState:u.current,exact:o,callback:s(g=>{!r&&c({...n._formState,...g,defaultValues:n._defaultValues})},"callback")});return()=>{h(),f(!r,l)}},[i,r,o,d,f]),m.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),m.useMemo(()=>XS(a,n,u.current,!1),[a,n])}s(UL,"useFormState");var Bt=s(e=>typeof e=="string","isString"),hg=s((e,t,n,r,i)=>Bt(e)?(r&&t.watch.add(e),te(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),te(n,o,te(i,o)))):(r&&(t.watchAll=!0),n),"generateWatchOutput");function WL(e){const t=Rm(),{control:n=t,name:r,defaultValue:i,disabled:o,exact:l,compute:a}=e||{},c=m.useRef(i),u=m.useRef(a),d=m.useRef(void 0),f=m.useRef(n),h=m.useRef(r);u.current=a;const g=s(()=>{const E=n._getWatch(r,c.current);return u.current?u.current(E):E},"getInitialOutput"),[p,_]=m.useState(g),y=m.useCallback(E=>{const A=hg(r,n._names,E||n._formValues,!1,c.current);return u.current?u.current(A):A},[n._formValues,n._names,r]),v=m.useCallback(E=>{if(!o){const A=hg(r,n._names,E||n._formValues,!1,c.current);if(u.current){const D=u.current(A);gn(D,d.current)||(_(D),d.current=D)}else _(A)}},[n._formValues,n._names,o,r]),{resyncIfNeeded:x,snapshot:C}=$m(g),b=m.useRef(v);b.current=v;const S=m.useRef(y);S.current=y,Lm(()=>{f.current!==n||!gn(h.current,r)?(f.current=n,h.current=r,b.current()):x(!o,()=>S.current(),A=>{_(A),d.current=A});const E=n._subscribe({name:r,formState:{values:!0},exact:l,callback:s(A=>{b.current(A.values)},"callback")});return()=>{E(),C(!o,()=>S.current())}},[n,l,r,o,x,C]),m.useEffect(()=>n._removeUnmounted());const M=f.current!==n,T=h.current;return m.useMemo(()=>{if(o)return!1;const E=!M&&!gn(T,r);return M||E},[o,M,r,T])?y():p}s(WL,"useWatch");function zL(e){const t=Rm(),{name:n,disabled:r,control:i=t,shouldUnregister:o,defaultValue:l,exact:a=!0}=e,c=qS(i._names.array,n),u=WL({control:i,name:n,defaultValue:m.useMemo(()=>{const C=te(i._formValues,n,te(i._defaultValues,n,l));return je(C)?BL(i,n):C},[i,n,l]),exact:a}),d=UL({control:i,name:n,exact:a}),f=m.useRef(e),h=m.useRef(null),g=m.useRef(i.register(n,{...e.rules,value:u,...wn(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const p=m.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:s(()=>!!te(d.errors,n),"get")},isDirty:{enumerable:!0,get:s(()=>!!te(d.dirtyFields,n),"get")},isTouched:{enumerable:!0,get:s(()=>!!te(d.touchedFields,n),"get")},isValidating:{enumerable:!0,get:s(()=>!!te(d.validatingFields,n),"get")},error:{enumerable:!0,get:s(()=>te(d.errors,n),"get")}}),[d,n]),_=m.useCallback(C=>{const b=dg(C);return te(i._fields,n)||(g.current=i.register(n,{...f.current.rules,value:b})),g.current.onChange({target:{value:dg(C),name:n},type:Ei.CHANGE})},[n,i]),y=m.useCallback(()=>g.current.onBlur({target:{value:te(i._formValues,n),name:n},type:Ei.BLUR}),[n,i._formValues]),v=m.useCallback(C=>{C&&(h.current={focus:s(()=>en(C.focus)&&C.focus(),"focus"),select:s(()=>en(C.select)&&C.select(),"select"),setCustomValidity:s(S=>en(C.setCustomValidity)&&C.setCustomValidity(S),"setCustomValidity"),reportValidity:s(()=>en(C.reportValidity)&&C.reportValidity(),"reportValidity")});const b=te(i._fields,n);b&&b._f&&C&&(b._f.ref=h.current)},[i._fields,n]),x=m.useMemo(()=>({name:n,value:u,...wn(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:_,onBlur:y,ref:v}),[n,r,d.disabled,_,y,v,u]);return m.useEffect(()=>{const C=i._options.shouldUnregister||o;g.current=i.register(n,{...f.current.rules,...wn(f.current.disabled)?{disabled:f.current.disabled}:{}});const b=s((S,M)=>{const T=te(i._fields,S);T&&T._f&&(T._f.mount=M)},"updateMounted");if(b(n,!0),C){const S=at(te(o?i._defaultValues:i._options.values||i._defaultValues,n,te(i._options.defaultValues,n,f.current.defaultValue)));Qe(i._defaultValues,n,S),je(te(i._formValues,n))&&Qe(i._formValues,n,S)}if(!c&&i.register(n),h.current){const S=te(i._fields,n);S&&S._f&&(S._f.ref=h.current)}return()=>{(c?C&&!i._state.action:C)?i.unregister(n):b(n,!1)}},[n,i,c,o]),m.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),m.useMemo(()=>({field:x,formState:d,fieldState:p}),[x,d,p])}s(zL,"useController");var jL=s(e=>e.render(zL(e)),"Controller"),rc=s(e=>({isOnSubmit:!e||e===ar.onSubmit,isOnBlur:e===ar.onBlur,isOnChange:e===ar.onChange,isOnAll:e===ar.all,isOnTouch:e===ar.onTouched}),"getValidationModes"),Ef=s((e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1},"isWatched"),Tl=s((e,t,n,r)=>{for(const i of n||Object.keys(e)){if(i==="_f")continue;const o=n?te(e,i):e[i];if(o){const{_f:l}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],i)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Tl(o,t))break}else if((bt(o)||Array.isArray(o))&&Tl(o,t))break}}},"iterateFieldsByAction"),Jv=s((e,t,n)=>{const r=te(e,n),i=Array.isArray(r)?r:[];return Qe(i,ZS,t[n]),Qe(e,n,i),e},"updateFieldArrayRootError"),Jt=s(e=>bt(e)&&!Object.keys(e).length,"isEmptyObject"),Au=s(e=>{if(!$d)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},"isHTMLElement"),Pm=s(e=>e.type==="radio","isRadioInput"),Iu=s(e=>e instanceof RegExp,"isRegex"),JL=s((e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},"appendErrors"),Gv={value:!1,isValid:!1},qv={value:!0,isValid:!0},QS=s(e=>{if(!Array.isArray(e))return Gv;if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}const t=e[0];return!t||!t.checked||t.disabled?Gv:!t.attributes||!("value"in t.attributes)||je(t.value)||t.value===""?qv:{value:t.value,isValid:!0}},"getCheckboxValue"),Zv={isValid:!1,value:null},eT=s(e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Zv):Zv,"getRadioValue");function Yv(e,t,n="validate"){if(Bt(e)||Array.isArray(e)&&e.every(Bt)||wn(e)&&!e)return{type:n,message:Bt(e)?e:"",ref:t}}s(Yv,"getValidateError");var Wo=s(e=>bt(e)&&!Iu(e)?e:{value:e,message:""},"getValueAndMessage"),Xv=s(async(e,t,n,r,i,o)=>{const{ref:l,refs:a,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:g,validate:p,name:_,valueAsNumber:y,mount:v}=e._f,x=te(n,_);if(!v||t.has(_))return{};const C=a?a[0]:l,b=s($=>{if(i&&C.reportValidity){const z=wn($)?"":$||"";a?a.forEach(W=>W.setCustomValidity(z)):C.setCustomValidity(z),C.reportValidity()}},"setCustomValidity"),S={},M=Pm(l),T=Pa(l),E=M||T,A=(y||Ld(l))&&je(l.value)&&je(x)||Au(l)&&l.value===""||x===""||Array.isArray(x)&&!x.length,D=JL.bind(null,_,r,S),L=s(($,z,W,ye=sr.maxLength,q=sr.minLength)=>{const ge=$?z:W;S[_]={type:$?ye:q,message:ge,ref:l,...D($?ye:q,ge)}},"getMinMaxMessage");if(o?!Array.isArray(x)||!x.length:c&&(!E&&(A||Vt(x))||wn(x)&&!x||T&&!QS(a).isValid||M&&!eT(a).isValid)){const{value:$,message:z}=Bt(c)?{value:!!c,message:c}:Wo(c);if($&&(S[_]={type:sr.required,message:z,ref:C,...D(sr.required,z)},!r))return b(z),S}if(!A&&(!Vt(f)||!Vt(h))){let $,z;const W=Wo(h),ye=Wo(f);if(!Vt(x)&&!Mi(x)&&!isNaN(x)){const q=l.valueAsNumber||x&&+x;Vt(W.value)||($=q>W.value),Vt(ye.value)||(z=q<ye.value)}else{const q=l.valueAsDate||new Date(x),ge=s(Z=>new Date(new Date().toDateString()+" "+Z),"convertTimeToDate"),me=l.type=="time",oe=l.type=="week";Bt(W.value)&&x&&($=me?ge(x)>ge(W.value):oe?x>W.value:q>new Date(W.value)),Bt(ye.value)&&x&&(z=me?ge(x)<ge(ye.value):oe?x<ye.value:q<new Date(ye.value))}if(($||z)&&(L(!!$,W.message,ye.message,sr.max,sr.min),!r))return b(S[_].message),S}if((u||d)&&!A&&(Bt(x)||o&&Array.isArray(x))){const $=Wo(u),z=Wo(d),W=!Vt($.value)&&x.length>+$.value,ye=!Vt(z.value)&&x.length<+z.value;if((W||ye)&&(L(W,$.message,z.message),!r))return b(S[_].message),S}if(g&&!A&&Bt(x)){const{value:$,message:z}=Wo(g);if(Iu($)&&!x.match($)&&(S[_]={type:sr.pattern,message:z,ref:l,...D(sr.pattern,z)},!r))return b(z),S}if(p){if(en(p)){const $=Yv(await p(x,n),C);if($&&(S[_]={...$,...D(sr.validate,$.message)},!r))return b($.message),S}else if(bt(p)){let $={};for(const z in p){if(!Jt($)&&!r)break;const W=Yv(await p[z](x,n),C,z);W&&($={...W,...D(z,W.message)},b(W.message),r&&(S[_]=$))}if(!Jt($)&&(S[_]={ref:C,...$},!r))return S}}const G=S[_];return b(G?G.message:!0),S},"validateField"),Dc=s(e=>Array.isArray(e)?e:[e],"convertToArrayPayload"),tT=s(e=>Array.isArray(e)?e.filter(Boolean):[],"compact");function GL(e,t){const n=t.length-1;let r=0;for(;r<n;){if(Vt(e)){e=void 0;break}e=e[t[r]],r++}return e}s(GL,"baseGet");function qL(e){for(const t in e)if(e.hasOwnProperty(t)&&!je(e[t]))return!1;return!0}s(qL,"isEmptyArray");function Et(e,t){if(Bt(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Mo(t)?[t]:ko(t);if(n.some(l=>Dm.includes(String(l))))return e;const r=n.length===1?e:GL(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(bt(r)&&Jt(r)||Array.isArray(r)&&qL(r))&&Et(e,n.slice(0,-1)),e}s(Et,"unset");var ZL=m.createContext(null);ZL.displayName="HookFormContext";var Qv=s(()=>{let e=[];return{get observers(){return e},next:s(i=>{for(const o of e)o.next&&o.next(i)},"next"),subscribe:s(i=>(e.push(i),{unsubscribe:s(()=>{e=e.filter(o=>o!==i)},"unsubscribe")}),"subscribe"),unsubscribe:s(()=>{e=[]},"unsubscribe")}},"createSubject");function nT(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],o=t[r];if(i&&bt(i)&&o){const l=nT(i,o);bt(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}s(nT,"extractFormValues");var ey=s((e,t)=>e!==null&&Om(e)&&Object.prototype.hasOwnProperty.call(e,t),"hasOwn"),YL=s((e,t)=>{if(!t)return!1;let n=e;for(const r of Mo(t)?[t]:ko(t)){if(!ey(n,r))return ey(e,t);n=n[r]}return!0},"has"),rT=s(e=>e.type==="select-multiple","isMultipleSelect"),XL=s(e=>Pm(e)||Pa(e),"isRadioOrCheckbox"),Sf=s(e=>Au(e)&&e.isConnected,"live");function ty(e){return Array.isArray(e)||bt(e)}s(ty,"isDirtyContainer");function iT(e,t,n="",r=[]){for(const i in e){const o=n?`${n}.${i}`:i,l=e[i];ty(l)&&ty(te(t,o))?iT(l,t,o,r):r.push(o)}return r}s(iT,"collectDirtyFieldNames");var QL=s(e=>{for(const t in e)if(en(e[t]))return!0;return!1},"objectHasFunction");function oT(e){return Array.isArray(e)||bt(e)&&!QL(e)}s(oT,"isTraversable");function sT(e){return!!(e&&"_f"in e)}s(sT,"isRegisteredLeaf");function lT(e){return Array.isArray(e)?!e.some(t=>!je(t)):!Object.keys(e).length}s(lT,"isEmptyDirtyContainer");function gg(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}s(gg,"clearDirtyField");function pg(e,t={},n){for(const r in e){const i=e[r],o=n&&n[r];oT(i)&&(!Array.isArray(i)||!sT(o))?(t[r]=Array.isArray(i)?[]:{},pg(i,t[r],o),lT(t[r])&&gg(t,r)):je(i)||(t[r]=!0)}return t}s(pg,"markFieldsDirty");function io(e,t,n,r){n||(n=pg(t,{},r));for(const i in e){const o=e[i],l=r&&r[i];oT(o)&&(!Array.isArray(o)||!sT(l))?(je(t)||fg(n[i])?n[i]=pg(o,Array.isArray(o)?[]:{},l):io(o,Vt(t)?{}:t[i],n[i],l),lT(n[i])&&gg(n,i)):gn(o,t[i])?gg(n,i):n[i]=!0}return n}s(io,"getDirtyFields");var e$=s((e,t)=>{const n=t.split("."),r=[];let i=n[0];for(let o=1;o<n.length;i+="."+n[o++])!isNaN(+n[o])&&e.has(i)&&r.push(`${i}.${n[o]}`);return r},"getFieldArrayItemNames"),aT=s((e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>je(e)?e:t?e===""?NaN:e&&+e:n&&Bt(e)?new Date(e):r?r(e):e,"getFieldValueAs");function ny(e){const t=e.ref;return Ld(t)?t.files:Pm(t)?eT(e.refs).value:rT(t)?[...t.selectedOptions].map(({value:n})=>n):Pa(t)?QS(e.refs).value:aT(t.value,e)}s(ny,"getFieldValue");var t$=s((e,t,n,r)=>{const i={};for(const o of e){const l=te(t,o);l&&Qe(i,o,l._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},"getResolverOptions"),el=s(e=>je(e)?e:Iu(e)?e.source:bt(e)?Iu(e.value)?e.value.source:e.value:e,"getRuleValue"),ry="AsyncFunction",n$=s(e=>{if(!e||!e.validate)return!1;if(en(e.validate))return e.validate.constructor.name===ry;if(bt(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===ry)return!0}return!1},"hasPromiseValidation"),r$=s(e=>e.mount&&(e.required||!je(e.required)&&e.required!==!1||!je(e.min)||!je(e.max)||!je(e.maxLength)||!je(e.minLength)||e.pattern||e.validate),"hasValidation");function iy(e,t,n){const r=te(e,n);if(r||Mo(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),l=te(t,o),a=te(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};if(a&&a.root&&a.root.type)return{name:`${o}.root`,error:a.root};i.pop()}return{name:n}}s(iy,"schemaErrorLookup");var i$=s((e,t,n,r)=>{n(e);const i=Object.keys(e).filter(o=>o!=="name");return!i.length||r&&i.length>=Object.keys(t).length||i.find(o=>t[o]===(!r||ar.all))},"shouldRenderFormState"),o$=s((e,t,n)=>!e||!t||e===t||Dc(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),"shouldSubscribeByName"),s$=s((e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,"skipValidation"),l$=s((e,t)=>{const n=te(e,t);!tT(n).length&&!(n!=null&&n.root)&&Et(e,t)},"unsetEmptyArray"),a$={mode:ar.onSubmit,reValidateMode:ar.onChange,shouldFocusError:!0},Tf="form",c$=s((e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},"updateDirtyFields"),cT={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function u$(e={}){let t={...a$,...e},n={...at(cT),isLoading:en(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=bt(t.defaultValues)||bt(t.values)?at(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:at(i),l={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const c={},u={};let d=0,f=rc(t.mode),h=rc(t.reValidateMode);const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...g};let _={...p};const y={array:Qv(),state:Qv()};let v=0;const x=t.criteriaMode===ar.all,C=s((k,N)=>O=>{clearTimeout(u[k]),u[k]=setTimeout(N,O)},"debounce"),b=s(async k=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||_.isValid||k)){const N=++v;let O;t.resolver?(O=Jt((await W()).errors),N===v&&S()):O=await ge({fields:r,onlyCheckValid:!0,eventType:Ei.VALID}),N===v&&O!==n.isValid&&y.state.next({isValid:O})}},"_setValid"),S=s((k,N)=>{!t.disabled&&(p.isValidating||p.validatingFields||_.isValidating||_.validatingFields)&&((k||a.mount).forEach(O=>{O&&(N?Qe(n.validatingFields,O,N):Et(n.validatingFields,O))}),y.state.next({validatingFields:n.validatingFields,isValidating:!Jt(n.validatingFields)}))},"_updateIsValidating"),M=s(()=>{n.dirtyFields=io(i,o,void 0,r)},"_updateDirtyFields"),T=s((k,N=[],O,H,U=!0,se=!0)=>{if(H&&O&&!t.disabled){l.action=!0;const le=te(r,k);if(l.actionArrayLengths.has(k)||l.actionArrayLengths.set(k,Array.isArray(le)?le.length:0),se&&Array.isArray(le)){const Te=O(le,H.argA,H.argB);U&&Qe(r,k,Te)}const ae=te(n.errors,k);if(se&&Array.isArray(ae)){const Te=ae.root,ft=O(ae,H.argA,H.argB)||ae;Te&&(ft.root=Te),U&&Qe(n.errors,k,ft),l$(n.errors,k)}const be=te(n.touchedFields,k);if((p.touchedFields||_.touchedFields)&&se&&Array.isArray(be)){const Te=O(be,H.argA,H.argB);U&&Qe(n.touchedFields,k,Te)}(p.dirtyFields||_.dirtyFields)&&M(),y.state.next({name:k,isDirty:oe(k,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Qe(o,k,N)},"_setFieldArray"),E=s((k,N)=>{Qe(n.errors,k,N),n.errors={...n.errors},y.state.next({errors:n.errors})},"updateErrors"),A=s(k=>{n.errors=k,y.state.next({errors:n.errors,isValid:!1})},"_setErrors"),D=s(k=>{const N=Mo(k)?[k]:ko(k);let O=o,H=i;for(let U=0;U<N.length-1;U++){const se=N[U];if(O=Vt(O)?O:O[se],H=Vt(H)?H:H[se],O===null&&H!==null)return!0}return!1},"hasExplicitNullIntermediate"),L=s(k=>{if(!l.actionArrayLengths.size)return!1;const N=Mo(k)?[k]:ko(k);let O=o,H="",U=-1,se=0;for(let le=0;le<N.length;le++){if(Vt(O))return!1;const ae=N[le];if(H=H?`${H}.${ae}`:ae,Array.isArray(O)&&+ae>=O.length)return U===-1?!1:le===U?+ae<se:!0;l.actionArrayLengths.has(H)&&(U=le+1,se=l.actionArrayLengths.get(H)),O=O[ae]}return!1},"isStaleArrayIndex"),G=s((k,N,O,H)=>{const U=te(r,k);if(U){if(D(k)||L(k))return;const se=je(te(o,k)),le=te(o,k,je(O)?te(i,k):O);je(le)||H&&H.defaultChecked||N?Qe(o,k,N?le:ny(U._f)):de(k,le),l.mount&&!l.action&&(b(),se&&n.isDirty&&(p.isDirty||_.isDirty)&&(oe()||(n.isDirty=!1,y.state.next({...n}))),e.shouldUnregister&&se&&!je(te(o,k))&&Ef(k,a)&&(l.watch=!0))}},"updateValidAndValue"),$=s((k,N,O,H,U)=>{let se=!1,le=!1;const ae={name:k};if(!t.disabled||H===!0){if(!O||H){const be=gn(te(i,k),N);(p.isDirty||_.isDirty)&&(le=n.isDirty,n.isDirty=ae.isDirty=!be||oe(),se=le!==ae.isDirty),le=!!te(n.dirtyFields,k),be!==n.isDirty?c$(n.dirtyFields,io(i,o,void 0,r)):be?Et(n.dirtyFields,k):Qe(n.dirtyFields,k,!0),ae.dirtyFields=n.dirtyFields,se=se||(p.dirtyFields||_.dirtyFields)&&le!==!be}if(O){const be=te(n.touchedFields,k);be||(Qe(n.touchedFields,k,O),ae.touchedFields=n.touchedFields,se=se||(p.touchedFields||_.touchedFields)&&be!==O)}se&&U&&y.state.next(ae)}return se?ae:{}},"updateTouchAndDirty"),z=s((k,N,O,H)=>{const U=te(n.errors,k),se=(p.isValid||_.isValid)&&wn(N)&&n.isValid!==N;if(t.delayError&&O?(c[k]=C(k,()=>E(k,O)),c[k](t.delayError)):(clearTimeout(u[k]),delete c[k],O?Qe(n.errors,k,O):Et(n.errors,k),n.errors={...n.errors}),(O?!gn(U,O):U)||!Jt(H)||se){const le={...H,...se&&wn(N)?{isValid:N}:{},errors:n.errors,name:k};y.state.next(le)}},"shouldRenderByError"),W=s(async k=>(S(k,!0),await t.resolver(o,t.context,t$(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),"_runSchema"),ye=s(async k=>{const{errors:N}=await W(k);if(S(k),k){for(const O of k){const H=te(N,O);H?a.array.has(O)&&bt(H)&&!Object.keys(H).some(U=>!Number.isNaN(Number(U)))?Jv(n.errors,{[O]:H},O):Qe(n.errors,O,H):Et(n.errors,O)}n.errors={...n.errors}}else n.errors=N;return N},"executeSchemaAndUpdateState"),q=s(async({name:k,eventType:N})=>{if(e.validate){const O=await e.validate({formValues:o,formState:n,name:k,eventType:N});if(bt(O))for(const H in O){const U=O[H];U&&It(`${Tf}.${H}`,{message:Bt(U.message)?U.message:"",type:U.type||sr.validate})}else Bt(O)||!O?It(Tf,{message:O||"",type:sr.validate}):pt(Tf);return O}return!0},"validateForm"),ge=s(async({fields:k,onlyCheckValid:N,name:O,eventType:H,context:U={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(U.runRootValidation=!0,!await q({name:O,eventType:H})&&(U.valid=!1,N)))return U.valid;for(const se in k){const le=k[se];if(le){const{_f:ae,...be}=le;if(ae){const Te=a.array.has(ae.name),ft=le._f&&n$(le._f),Br=p.validatingFields||p.isValidating||_.validatingFields||_.isValidating;ft&&Br&&S([ae.name],!0);const Hr=await Xv(le,a.disabled,o,x,t.shouldUseNativeValidation&&!N,Te);if(ft&&Br&&S([ae.name]),Hr[ae.name]&&(U.valid=!1,N)||(!N&&(te(Hr,ae.name)?Te?Jv(n.errors,Hr,ae.name):Qe(n.errors,ae.name,Hr[ae.name]):Et(n.errors,ae.name)),e.shouldUseNativeValidation&&Hr[ae.name]))break}!Jt(be)&&await ge({context:U,onlyCheckValid:N,fields:be,name:se,eventType:H})}}return U.valid},"executeBuiltInValidation"),me=s(()=>{for(const k of a.unMount){const N=te(r,k);N&&(N._f.refs?N._f.refs.every(O=>!Sf(O)):!Sf(N._f.ref))&&yt(k)}a.unMount=new Set},"_removeUnmounted"),oe=s((k,N)=>(k&&N&&Qe(o,k,N),!gn(l.mount?o:i,i)),"_getDirty"),Z=s((k,N,O)=>hg(k,a,{...l.mount?o:je(N)||Bt(k)?i:N},O,N),"_getWatch"),pe=s(k=>tT(te(l.mount?o:i,k,t.shouldUnregister?te(i,k,[]):[])),"_getFieldArray"),de=s((k,N,O={},H=!1,U=!1,se=!1)=>{const le=te(r,k);let ae=N;if(le){const be=le._f;be&&(!be.disabled&&Qe(o,k,aT(N,be)),ae=Au(be.ref)&&Vt(N)?"":N,rT(be.ref)?[...be.ref.options].forEach(Te=>Te.selected=ae.includes(Te.value)):be.refs?Pa(be.ref)?be.refs.forEach(Te=>{(!Te.defaultChecked||!Te.disabled)&&(Array.isArray(ae)?Te.checked=!!ae.find(ft=>ft===Te.value):Te.checked=ae===Te.value||!!ae)}):be.refs.forEach(Te=>Te.checked=Te.value===ae):Ld(be.ref)?be.ref.value="":(be.ref.value=ae,!be.ref.type&&!U&&!se&&y.state.next({name:k,values:H?o:at(o)})))}(O.shouldDirty||O.shouldTouch)&&$(k,ae,O.shouldTouch,O.shouldDirty,!U),O.shouldValidate&&Re(k,{delayError:O.delayError})},"setFieldValue"),ce=s((k,N,O,H=!1,U=!1,se=!1)=>{a.array.has(k)&&y.array.next({name:k,values:H?o:at(o)});for(const le in N){if(!N.hasOwnProperty(le))continue;const ae=N[le],be=k+"."+le,Te=te(r,be);(a.array.has(k)||bt(ae)||Te&&!Te._f)&&!Mi(ae)?ce(be,ae,O,H,U,se):de(be,ae,O,H,U,se)}},"setFieldValues"),j=s((k,N,O,H,U=!1)=>{const se=te(r,k),le=a.array.has(k),ae=H?N:at(N),be=gn(te(o,k),ae);if(be||Qe(o,k,ae),le)y.array.next({name:k,values:H?o:at(o)}),(p.isDirty||p.dirtyFields||_.isDirty||_.dirtyFields)&&O.shouldDirty&&(M(),U||y.state.next({name:k,dirtyFields:n.dirtyFields,isDirty:oe(k,ae)}));else{const Te=Array.isArray(ae)&&!ae.length||Jt(ae),ft=!be&&!U;!se||se._f||Vt(ae)||Te?de(k,ae,O,H,U,ft):ce(k,ae,O,H,U,ft)}if(!be&&!U){const Te=Ef(k,a),ft=H?o:at(o);if(y.state.next({...Te&&n,name:l.mount||Te?k:void 0,values:ft}),!le)for(const Br of e$(a.array,k))y.state.next({name:Br,values:ft})}},"_setValue"),ne=s((k,N,O={})=>j(k,N,O,!1),"setValue"),ue=s((k,N={})=>{const O=en(k)?k(o):k;if(!gn(o,O)){o={...o,...O};for(const H of a.mount)YL(O,H)&&j(H,te(O,H),N,!0,!0);y.state.next({...n,name:void 0,type:void 0,...d?{values:o}:{}}),N.shouldValidate&&b()}},"setValues"),Ne=s(async k=>{l.mount=!0;const N=k.target;let O=N.name,H=!0;const U=te(r,O),se=s(le=>{H=Number.isNaN(le)||Mi(le)&&isNaN(le.getTime())||gn(le,te(o,O,le))},"_updateIsFieldValueUpdated");if(U){let le,ae;const be=N.type?ny(U._f):dg(k),Te=k.type===Ei.BLUR||k.type===Ei.FOCUS_OUT,ft=!r$(U._f)&&!e.validate&&!t.resolver&&!te(n.errors,O)&&!U._f.deps,Br=ft||s$(Te,te(n.touchedFields,O),n.isSubmitted,h,f),Hr=Ef(O,a,Te);if(Qe(o,O,at(be)),Te){if(!N||!N.readOnly){U._f.onBlur&&U._f.onBlur(k);const Ws=c[O];Ws&&Ws(0)}}else U._f.onChange&&U._f.onChange(k);const Us=$(O,be,Te),rk=!Jt(Us)||Hr;if(!Te&&y.state.next({name:O,type:k.type,...d?{values:at(o)}:{}}),Br)return(!ft||!n.isValid)&&(p.isValid||_.isValid)&&(t.mode==="onBlur"?Te&&b():Te||b()),rk&&y.state.next({name:O,...Hr?{}:Us});if(!t.resolver&&e.validate&&await q({name:O,eventType:k.type}),!Te&&Hr&&y.state.next({...n}),t.resolver){const{errors:Ws}=await W([O]);if(S([O]),se(be),!H){!Jt(Us)&&y.state.next(Us);return}const ik=iy(n.errors,r,O),J1=iy(Ws,r,ik.name||O);le=J1.error,O=J1.name,ae=Jt(Ws)}else S([O],!0),le=(await Xv(U,a.disabled,o,x,t.shouldUseNativeValidation))[O],S([O]),se(be),H&&(le?ae=!1:(p.isValid||_.isValid)&&(ae=await ge({fields:r,onlyCheckValid:!0,name:O,eventType:k.type})));H&&(U._f.deps&&(!Array.isArray(U._f.deps)||U._f.deps.length>0)&&Re(U._f.deps),z(O,ae,le,Us))}},"onChange"),$e=s((k,N)=>{if(te(n.errors,N)&&k.focus)return k.focus(),1},"_focusInput"),Re=s(async(k,N={})=>{let O,H;const U=Dc(k);if(t.resolver){const se=await ye(je(k)?k:U);O=Jt(se),H=k?!U.some(le=>te(se,le)):O}else k?(H=(await Promise.all(U.map(async se=>{const le=te(r,se);return await ge({fields:le&&le._f?{[se]:le}:le,eventType:Ei.TRIGGER})}))).every(Boolean),!(!H&&!n.isValid)&&b()):H=O=await ge({fields:r,name:k,eventType:Ei.TRIGGER});if(N.delayError&&t.delayError&&Bt(k)){const se=te(n.errors,k);se?(Et(n.errors,k),c[k]=C(k,()=>E(k,se)),c[k](t.delayError)):(clearTimeout(u[k]),delete c[k])}if(N.shouldTouch)for(const se of k?U:a.mount)!a.array.has(se)&&Qe(n.touchedFields,se,!0);return y.state.next({...!Bt(k)||(p.isValid||_.isValid)&&O!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:O}:{},...N.shouldTouch&&(p.touchedFields||_.touchedFields)?{touchedFields:n.touchedFields}:{},errors:n.errors}),N.shouldFocus&&!H&&Tl(r,$e,k?U:a.mount),H},"trigger"),Pe=s((k,N)=>{let O={...l.mount?o:i};return N&&(O=nT(N.dirtyFields?n.dirtyFields:n.touchedFields,O)),je(k)?O:Bt(k)?te(O,k):k.map(H=>te(O,H))},"getValues"),rt=s(k=>je(k)?{...n.errors}:Bt(k)?te(n.errors,k):k.map(N=>te(n.errors,N)),"getErrors"),Je=s((k,N)=>{const O=N||n,H=te(O.errors,k);return{invalid:!!H,isDirty:!!te(O.dirtyFields,k),error:H,isValidating:!!te(n.validatingFields,k),isTouched:!!te(O.touchedFields,k)}},"getFieldState"),pt=s(k=>{const N=k?Dc(k):void 0;N?.forEach(O=>Et(n.errors,O)),N?N.forEach(O=>{y.state.next({name:O,errors:n.errors})}):(n.errors={},y.state.next({errors:n.errors}))},"clearErrors"),It=s((k,N,O)=>{const H=(te(r,k,{_f:{}})._f||{}).ref,{ref:U,message:se,type:le,...ae}=te(n.errors,k)||{};Qe(n.errors,k,{...ae,...N,ref:H}),y.state.next({name:k,errors:n.errors,isValid:!1}),O&&O.shouldFocus&&H&&H.focus&&H.focus()},"setError"),ut=s((k,N)=>{if(en(k)){d++;const{unsubscribe:O}=y.state.subscribe({next:s(U=>"values"in U&&k(U.values||Z(void 0,N),U),"next")});let H=!1;return{unsubscribe:s(()=>{H||(H=!0,d--,O())},"unsubscribe")}}return Z(k,N,!0)},"watch"),jt=s(k=>{var N;const O=!!(!((N=k.formState)===null||N===void 0)&&N.values);O&&d++;const{unsubscribe:H}=y.state.subscribe({next:s(se=>{if(o$(k.name,se.name,k.exact)&&i$(se,k.formState||p,Pn,k.reRenderRoot)){const le={...o};k.callback({values:le,...n,...se,defaultValues:i})}},"next")});if(!O)return H;let U=!1;return()=>{U||(U=!0,d--,H())}},"_subscribe"),Ge=s(k=>(l.mount=!0,_={..._,...k.formState},jt({...k,formState:{...g,...k.formState}})),"subscribe"),yt=s((k,N={})=>{for(const O of k?Dc(k):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(Et(r,O),Et(o,O)),!N.keepError&&Et(n.errors,O),!N.keepDirty&&Et(n.dirtyFields,O),!N.keepTouched&&Et(n.touchedFields,O),!N.keepIsValidating&&Et(n.validatingFields,O),!t.shouldUnregister&&!N.keepDefaultValue&&Et(i,O);d&&y.state.next({values:at(o)}),y.state.next({...n,...N.keepDirty?{}:{isDirty:oe()}}),!N.keepIsValid&&b()},"unregister"),Nt=s(({disabled:k,name:N})=>{if(wn(k)&&l.mount||k||a.disabled.has(N)){const O=a.disabled.has(N)!==!!k;k?a.disabled.add(N):a.disabled.delete(N),O&&l.mount&&!l.action&&b()}},"_setDisabledField"),it=s((k,N={})=>{let O=te(r,k);const H=wn(N.disabled)||wn(t.disabled),U=!a.registerName.has(k)&&O&&O._f&&!O._f.mount;return Qe(r,k,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:k}},name:k,mount:!0,...N}}),a.mount.add(k),O&&!U?Nt({disabled:wn(N.disabled)?N.disabled:t.disabled,name:k}):G(k,!0,N.value),{...H?{disabled:N.disabled||t.disabled}:{},...t.progressive?{required:!!N.required,min:el(N.min),max:el(N.max),minLength:el(N.minLength),maxLength:el(N.maxLength),pattern:el(N.pattern)}:{},name:k,onChange:Ne,onBlur:Ne,ref:s(se=>{if(se){a.registerName.add(k),it(k,N),a.registerName.delete(k),O=te(r,k);const le=je(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ae=XL(le),be=O._f.refs||[];if(ae?be.find(ft=>ft===le):le===O._f.ref)return;const Te={...O._f};ae?(Te.refs=[...be.filter(Sf),le,...Array.isArray(te(i,k))?[{}]:[]],Te.ref={type:le.type,name:k}):(Te.ref=le,delete Te.refs),Qe(r,k,{_f:Te}),G(k,!1,void 0,le)}else O=te(r,k,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(qS(a.array,k)&&l.action)&&a.unMount.add(k)},"ref")}},"register"),Yt=s(()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Tl(r,$e,a.mount),"_focusError"),Ln=s(k=>{wn(k)&&(y.state.next({disabled:k}),Tl(r,(N,O)=>{const H=te(r,O);H&&(N.disabled=H._f.disabled||k,Array.isArray(H._f.refs)&&H._f.refs.forEach(U=>{U.disabled=H._f.disabled||k}))},0,!1))},"_disableForm"),Fe=s((k,N)=>async O=>{let H,U;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let se=at(o);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:le,values:ae}=await W();S(),n.errors=le,se=at(ae)}else await ge({fields:r,eventType:Ei.SUBMIT});if(a.disabled.size)for(const le of a.disabled)Et(se,le);if(Et(n.errors,ZS),Jt(n.errors)){y.state.next({errors:{}});try{H=await k(se,O)}catch(le){U=le}}else N&&await N({...n.errors},O),Yt(),setTimeout(Yt);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Jt(n.errors)&&!U,submitCount:n.submitCount+1,errors:n.errors}),U)throw U;return H},"handleSubmit"),$t=s((k,N={})=>{te(r,k)&&(je(N.defaultValue)?ne(k,at(te(i,k))):(ne(k,N.defaultValue),Qe(i,k,at(N.defaultValue))),N.keepTouched||Et(n.touchedFields,k),N.keepDirty||(Et(n.dirtyFields,k),n.isDirty=N.defaultValue?oe(k,at(te(i,k))):oe()),N.keepError||(Et(n.errors,k),b()),y.state.next({...n}))},"resetField"),$n=s((k,N={})=>{const O=k?at(k):i,H=at(O),U=Jt(k),se=H,le=r;if(N.keepDefaultValues||(i=O),!N.keepValues){if(N.keepDirtyValues){const ae=new Set([...a.mount,...iT(io(i,o,void 0,le),n.dirtyFields)]);for(const be of ae){const Te=te(n.dirtyFields,be),ft=te(o,be),Br=te(se,be);Te&&!je(ft)?Qe(se,be,ft):!Te&&!je(Br)&&ne(be,Br)}}else{if($d&&je(k))for(const ae of a.mount){const be=te(r,ae);if(be&&be._f){const Te=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(Au(Te)){const ft=Te.closest("form");if(ft){ft.reset();break}}}}if(N.keepFieldsRef)for(const ae of a.mount)ne(ae,te(se,ae));else r={}}if(t.shouldUnregister){if(o=N.keepDefaultValues?at(i):{},N.keepFieldsRef)for(const ae of a.mount)Qe(o,ae,te(se,ae))}else o=at(se);y.array.next({values:{...se}}),y.state.next({name:void 0,type:void 0,values:{...se}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!N.keepIsValid||!!N.keepDirtyValues||!t.shouldUnregister&&!Jt(se),l.watch=!!t.shouldUnregister,l.keepIsValid=!!N.keepIsValid,l.action=!1,l.actionArrayLengths.clear(),N.keepErrors||(n.errors={}),y.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:U?!1:N.keepDirty?n.isDirty:N.keepValues?oe():!!(N.keepDefaultValues&&!gn(k,i)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U?{}:N.keepDirtyValues?N.keepDefaultValues&&o?io(i,o,void 0,le):n.dirtyFields:N.keepDefaultValues&&k?io(i,k,void 0,le):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},"_reset"),ze=s((k,N)=>$n(en(k)?k(o):k,{...t.resetOptions,...N}),"reset"),I=s((k,N={})=>{const O=te(r,k),H=O&&O._f;if(H){const U=H.refs?H.refs[0]:H.ref;U.focus&&setTimeout(()=>{U.focus(),N.shouldSelect&&en(U.select)&&U.select()})}},"setFocus"),Pn=s(k=>{const{name:N,type:O,values:H,...U}=k;n={...n,...U}},"_setFormState");y.state.subscribe({next:Pn});const Ce={control:{register:it,unregister:yt,getFieldState:Je,handleSubmit:Fe,setError:It,_subscribe:jt,_runSchema:W,_updateIsValidating:S,_focusError:Yt,_getWatch:Z,_getDirty:oe,_setValid:b,_setFieldArray:T,_setDisabledField:Nt,_setErrors:A,_getFieldArray:pe,_reset:$n,_resetDefaultValues:s(()=>en(t.defaultValues)&&t.defaultValues().then(k=>{ze(k,t.resetOptions),y.state.next({isLoading:!1})}),"_resetDefaultValues"),_removeUnmounted:me,_disableForm:Ln,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(k){l=k},get _defaultValues(){return i},get _names(){return a},set _names(k){a=k},get _formState(){return n},get _options(){return t},set _options(k){t={...t,...k},f=rc(t.mode),h=rc(t.reValidateMode)}},subscribe:Ge,trigger:Re,register:it,handleSubmit:Fe,watch:ut,setValue:ne,setValues:ue,getValues:Pe,getErrors:rt,reset:ze,resetField:$t,resetDefaultValues:s((k,N={})=>{if(i=at(k),!N.keepDirty){const O=io(i,o,void 0,r);n.dirtyFields=O,n.isDirty=!Jt(O)}N.keepIsValid||b(),y.state.next({...n,defaultValues:i})},"resetDefaultValues"),clearErrors:pt,unregister:yt,setError:It,setFocus:I,getFieldState:Je};return{...Ce,formControl:Ce}}s(u$,"createFormControl");function uT(e={}){const t=m.useRef(void 0),n=m.useRef(void 0),r=m.useRef(e.formControl),[i,o]=m.useState(()=>({...at(cT),isLoading:en(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:en(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!en(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=u$(e);t.current={...d,formState:i}}const l=t.current.control;l._options=e;const{resyncIfNeeded:a,snapshot:c}=$m();return Lm(()=>{const u=s(()=>({...l._formState,defaultValues:l._defaultValues}),"getCurrentFormState");a(!0,u,o);const d=l._subscribe({formState:l._proxyFormState,callback:s(()=>o({...l._formState,defaultValues:l._defaultValues}),"callback"),reRenderRoot:!0});return o(f=>({...f,isReady:!0})),l._formState.isReady=!0,()=>{d(),c(!0,u)}},[l,a,c]),m.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),m.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),m.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),m.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),m.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==i.isDirty&&l._subjects.state.next({isDirty:u})}},[l,i.isDirty]),m.useEffect(()=>{var u;e.values&&!gn(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),m.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=m.useMemo(()=>XS(i,l),[l,i]),t.current}s(uT,"useForm");function kr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}s(kr,"_objectWithoutPropertiesLoose");function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le.apply(null,arguments)}s(Le,"_extends");var d$=Ts(((e,t)=>{var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n})),f$=Ts(((e,t)=>{var n=d$();function r(){}s(r,"emptyFunction");function i(){}s(i,"emptyFunctionWithReset"),i.resetWarningCache=r,t.exports=function(){function o(c,u,d,f,h,g){if(g!==n){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}s(o,"shim"),o.isRequired=o;function l(){return o}s(l,"getShim");var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:l,element:o,elementType:o,instanceOf:l,node:o,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),h$=Ts(((e,t)=>{t.exports=f$()()})),g$=Ts((e=>{var t=60103,n=60106,r=60107,i=60108,o=60114,l=60109,a=60110,c=60112,u=60113,d=60120,f=60115,h=60116,g=60121,p=60122,_=60117,y=60129,v=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;t=x("react.element"),n=x("react.portal"),r=x("react.fragment"),i=x("react.strict_mode"),o=x("react.profiler"),l=x("react.provider"),a=x("react.context"),c=x("react.forward_ref"),u=x("react.suspense"),d=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),g=x("react.block"),p=x("react.server.block"),_=x("react.fundamental"),y=x("react.debug_trace_mode"),v=x("react.legacy_hidden")}})),p$=Ts(((e,t)=>{t.exports=g$()})),oy=s(e=>typeof e=="object"&&e!=null&&e.nodeType===1,"e"),sy=s((e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip","t"),wf=s((e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return sy(n.overflowY,t)||sy(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},"n"),ic=s((e,t,n,r,i,o,l,a)=>o<e&&l>t||o>e&&l<t?0:o<=e&&a<=n||l>=t&&a>=n?o-e-r:l>t&&a<n||o<e&&a>n?l-t+i:0,"l"),m$=s(e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},"i$1"),_$=s((e,t)=>{var n,r,i,o,l,a;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:d,boundary:f,skipOverflowHiddenElements:h}=t,g=typeof f=="function"?f:z=>z!==f;if(!oy(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,_=[],y=e;for(;oy(y)&&g(y);){if(y=m$(y),y===p){_.push(y);break}y!=null&&y===document.body&&wf(y)&&!wf(document.documentElement)||y!=null&&wf(y,h)&&_.push(y)}let v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,x=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,C=(l=window.scrollX)!=null?l:pageXOffset,b=(a=window.scrollY)!=null?a:pageYOffset,{height:S,width:M,top:T,right:E,bottom:A,left:D}=e.getBoundingClientRect(),L=u==="start"||u==="nearest"?T:u==="end"?A:T+S/2,G=d==="center"?D+M/2:d==="end"?E:D,$=[];for(let z=0;z<_.length;z++){let W=_[z],{height:ye,width:q,top:ge,right:me,bottom:oe,left:Z}=W.getBoundingClientRect();if(c==="if-needed"&&T>=0&&D>=0&&A<=x&&E<=v&&T>=ge&&A<=oe&&D>=Z&&E<=me)return $;let pe=getComputedStyle(W),de=parseInt(pe.borderLeftWidth,10),ce=parseInt(pe.borderTopWidth,10),j=parseInt(pe.borderRightWidth,10),ne=parseInt(pe.borderBottomWidth,10),ue=0,Ne=0,$e="offsetWidth"in W?W.offsetWidth-W.clientWidth-de-j:0,Re="offsetHeight"in W?W.offsetHeight-W.clientHeight-ce-ne:0,Pe="offsetWidth"in W?W.offsetWidth===0?0:q/W.offsetWidth:0,rt="offsetHeight"in W?W.offsetHeight===0?0:ye/W.offsetHeight:0;if(p===W)ue=u==="start"?L:u==="end"?L-x:u==="nearest"?ic(b,b+x,x,ce,ne,b+L,b+L+S,S):L-x/2,Ne=d==="start"?G:d==="center"?G-v/2:d==="end"?G-v:ic(C,C+v,v,de,j,C+G,C+G+M,M),ue=Math.max(0,ue+b),Ne=Math.max(0,Ne+C);else{ue=u==="start"?L-ge-ce:u==="end"?L-oe+ne+Re:u==="nearest"?ic(ge,oe,ye,ce,ne+Re,L,L+S,S):L-(ge+ye/2)+Re/2,Ne=d==="start"?G-Z-de:d==="center"?G-(Z+q/2)+$e/2:d==="end"?G-me+j+$e:ic(Z,me,q,de,j+$e,G,G+M,M);let{scrollLeft:Je,scrollTop:pt}=W;ue=Math.max(0,Math.min(pt+ue/rt,W.scrollHeight-ye/rt+Re)),Ne=Math.max(0,Math.min(Je+Ne/Pe,W.scrollWidth-q/Pe+$e)),L+=pt-ue,G+=Je-Ne}$.push({el:W,top:ue,left:Ne})}return $},"o"),Q=da(h$()),Oz=p$(),v$=0;function Fa(){}s(Fa,"noop");function y$(e,t){e&&_$(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach(function(n){var r=n.el,i=n.top,o=n.left;r.scrollTop=i,r.scrollLeft=o})}s(y$,"scrollIntoView$1");function ly(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}s(ly,"isOrContainsNode");function Fm(e,t){var n;function r(){n&&clearTimeout(n)}s(r,"cancel");function i(){for(var o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,l)},t)}return s(i,"wrapper"),i.cancel=r,i}s(Fm,"debounce");function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return t.some(function(a){return a&&a.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}s(Ot,"callAllEventHandlers");function Yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}s(Yr,"handleRefs");function x$(){return String(v$++)}s(x$,"generateId");function C$(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}s(C$,"getA11yStatusMessage$1");function Nu(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=dT(t,r)?t[r]:e[r],n},{})}s(Nu,"getState");function dT(e,t){return e[t]!==void 0}s(dT,"isControlledProp");function Ou(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}s(Ou,"normalizeArrowKey");function Ai(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var l=t+e;l<0?l=i?o:0:l>o&&(l=i?0:o);var a=Ao(e,l,n,r,i);return a===-1?t>=n?-1:t:a}s(Ai,"getNextWrappingIndex");function Ao(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var l=t+1;l<n;l++)if(!r(l).hasAttribute("disabled"))return l}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?Ao(1,0,n,r,!1):Ao(-1,n-1,n,r,!1):-1}s(Ao,"getNextNonDisabledIndex");function ay(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(ly(i,e,n)||r&&ly(i,n.document.activeElement,n))})}s(ay,"targetWithinDownshift");var b$=Fm(function(e){hT(e).textContent=""},500);function fT(e,t){var n=hT(t);e&&(n.textContent=e,b$(t))}s(fT,"setStatus");function hT(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}s(hT,"getStatusDiv");var E$=["isInitialMount","highlightedIndex","items","environment"],gT={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function S$(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(l){T$(l,e,t,n),n[l]!==t[l]&&(o[l]=n[l])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Le({type:i},o))}s(S$,"callOnChangeProps");function T$(e,t,n,r){var i=t.props,o=t.type,l="on"+Bm(e)+"Change";i[l]&&r[e]!==void 0&&r[e]!==n[e]&&i[l](Le({type:o},r))}s(T$,"invokeOnChangeHandler");function w$(e,t){return t.changes}s(w$,"stateReducer");function k$(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}s(k$,"getA11ySelectionMessage");var M$=Fm(function(e,t){fT(e(),t)},200),A$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?m.useLayoutEffect:m.useEffect;function pT(e){var t=e.id,n=t===void 0?"downshift-"+x$():t,r=e.labelId,i=e.menuId,o=e.getItemId,l=e.toggleButtonId,a=e.inputId;return(0,m.useRef)({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(c){return n+"-item-"+c},toggleButtonId:l||n+"-toggle-button",inputId:a||n+"-input"}).current}s(pT,"useElementIds");function Vm(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}s(Vm,"getItemAndIndex");function I$(e){return e?String(e):""}s(I$,"itemToString");function N$(e){return/^\S{1}$/.test(e)}s(N$,"isAcceptedCharacterKey");function Bm(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}s(Bm,"capitalizeString");function Pd(e){var t=(0,m.useRef)(e);return t.current=e,t}s(Pd,"useLatestRef");function mT(e,t,n){var r=(0,m.useRef)(),i=(0,m.useRef)(),o=(0,m.useCallback)(function(h,g){i.current=g,h=Nu(h,g.props);var p=e(h,g);return g.props.stateReducer(h,Le({},g,{changes:p}))},[e]),l=(0,m.useReducer)(o,t),a=l[0],c=l[1],u=Pd(n),d=(0,m.useCallback)(function(h){return c(Le({props:u.current},h))},[u]),f=i.current;return(0,m.useEffect)(function(){f&&r.current&&r.current!==a&&S$(f,Nu(r.current,f.props),a),r.current=a},[a,n,f]),[a,d]}s(mT,"useEnhancedReducer");function _T(e,t,n){var r=mT(e,t,n),i=r[0],o=r[1];return[Nu(i,n),o]}s(_T,"useControlledReducer$1");var wl={itemToString:I$,stateReducer:w$,getA11ySelectionMessage:k$,scrollIntoView:y$,environment:typeof window>"u"?{}:window};function In(e,t,n){n===void 0&&(n=gT);var r=e["default"+Bm(t)];return r!==void 0?r:n[t]}s(In,"getDefaultValue$1");function ol(e,t,n){n===void 0&&(n=gT);var r=e[t];if(r!==void 0)return r;var i=e["initial"+Bm(t)];return i!==void 0?i:In(e,t,n)}s(ol,"getInitialValue$1");function vT(e){var t=ol(e,"selectedItem"),n=ol(e,"isOpen"),r=ol(e,"highlightedIndex"),i=ol(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}s(vT,"getInitialState$2");function po(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,l=t.selectedItem,a=t.highlightedIndex;return r.length===0?-1:i!==void 0&&a===i?i:o!==void 0?o:l?r.indexOf(l):n===0?-1:n<0?r.length-1:0}s(po,"getHighlightedIndexOnOpen");function yT(e,t,n,r){var i=(0,m.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,m.useEffect)(function(){if(n?.addEventListener!=null){var o=s(function(){i.current.isMouseDown=!0},"onMouseDown"),l=s(function(f){i.current.isMouseDown=!1,e&&!ay(f.target,t.map(function(h){return h.current}),n)&&r()},"onMouseUp"),a=s(function(){i.current.isTouchMove=!1},"onTouchStart"),c=s(function(){i.current.isTouchMove=!0},"onTouchMove"),u=s(function(f){e&&!i.current.isTouchMove&&!ay(f.target,t.map(function(h){return h.current}),n,!1)&&r()},"onTouchEnd");return n.addEventListener("mousedown",o),n.addEventListener("mouseup",l),n.addEventListener("touchstart",a),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),s(function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",l),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)},"cleanup")}},[e,n]),i}s(yT,"useMouseAndTouchTracker");var Hm=s(function(){return Fa},"useGetterPropsCalledChecker");function Du(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,l=n.environment,a=kr(n,E$);(0,m.useEffect)(function(){r||M$(function(){return e(Le({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},a))},l.document)},t)}s(Du,"useA11yMessageSetter");function xT(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,l=e.scrollIntoView,a=(0,m.useRef)(!0);return A$(function(){t<0||!n||!Object.keys(r.current).length||(a.current===!1?a.current=!0:l(i(t),o))},[t]),a}s(xT,"useScrollIntoView");var Km=Fa;function Ru(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Le({isOpen:!1,highlightedIndex:-1},i&&Le({selectedItem:e.items[t],isOpen:In(e,"isOpen"),highlightedIndex:In(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}s(Ru,"getChangesOnSelection");function CT(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:po(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:po(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:In(i,"highlightedIndex"),isOpen:In(i,"isOpen"),selectedItem:In(i,"selectedItem"),inputValue:In(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Le({},e,o)}s(CT,"downshiftCommonReducer");function O$(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,o=e.getItemNodeFromIndex,l=t.toLowerCase(),a=0;a<r.length;a++){var c=(a+n+(t.length<2?1:0))%r.length,u=r[c];if(u!==void 0&&i(u).toLowerCase().startsWith(l)){var d=o(c);if(!d?.hasAttribute("disabled"))return c}}return n}s(O$,"getItemIndexByCharacterKey");Q.default.array.isRequired,Q.default.func,Q.default.func,Q.default.func,Q.default.number,Q.default.number,Q.default.number,Q.default.bool,Q.default.bool,Q.default.bool,Q.default.any,Q.default.any,Q.default.any,Q.default.string,Q.default.string,Q.default.string,Q.default.func,Q.default.string,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.shape({addEventListener:Q.default.func,removeEventListener:Q.default.func,document:Q.default.shape({getElementById:Q.default.func,activeElement:Q.default.any,body:Q.default.any})});function D$(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}s(D$,"getA11yStatusMessage");var R$=e0(e0({},wl),{getA11yStatusMessage:D$}),L$=Fa,Rc=0,Um=1,Wm=2,Lu=3,zm=4,jm=5,Jm=6,Gm=7,qm=8,Zm=9,Ym=10,$u=11,bT=12,ET=13,Xm=14,ST=15,TT=16,wT=17,kT=18,Qm=19,mg=20,MT=21,AT=Object.freeze({__proto__:null,ToggleButtonClick:Rc,ToggleButtonKeyDownArrowDown:Um,ToggleButtonKeyDownArrowUp:Wm,ToggleButtonKeyDownCharacter:Lu,ToggleButtonKeyDownEscape:zm,ToggleButtonKeyDownHome:jm,ToggleButtonKeyDownEnd:Jm,ToggleButtonKeyDownEnter:Gm,ToggleButtonKeyDownSpaceButton:qm,ToggleButtonKeyDownPageUp:Zm,ToggleButtonKeyDownPageDown:Ym,ToggleButtonBlur:$u,MenuMouseLeave:bT,ItemMouseMove:ET,ItemClick:Xm,FunctionToggleMenu:ST,FunctionOpenMenu:TT,FunctionCloseMenu:wT,FunctionSetHighlightedIndex:kT,FunctionSelectItem:Qm,FunctionSetInputValue:mg,FunctionReset:MT});function $$(e,t){var n,r=t.type,i=t.props,o=t.altKey,l;switch(r){case Xm:l={isOpen:In(i,"isOpen"),highlightedIndex:In(i,"highlightedIndex"),selectedItem:i.items[t.index]};break;case Lu:var a=t.key,c=""+e.inputValue+a;l={inputValue:c,highlightedIndex:O$({keysSoFar:c,highlightedIndex:!e.isOpen&&e.selectedItem?i.items.indexOf(e.selectedItem):e.highlightedIndex,items:i.items,itemToString:i.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex}),isOpen:!0};break;case Um:l={highlightedIndex:e.isOpen?Ai(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1):o&&e.selectedItem==null?-1:po(i,e,1),isOpen:!0};break;case Wm:e.isOpen&&o?l=Ru(i,e.highlightedIndex,!1):l={highlightedIndex:e.isOpen?Ai(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1):po(i,e,-1),isOpen:!0};break;case Gm:case qm:l=Ru(i,e.highlightedIndex,!1);break;case jm:l={highlightedIndex:Ao(1,0,i.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case Jm:l={highlightedIndex:Ao(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case Zm:l={highlightedIndex:Ai(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Ym:l={highlightedIndex:Ai(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case zm:l={isOpen:!1,highlightedIndex:-1};break;case $u:l=Le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case Qm:l={selectedItem:t.selectedItem};break;default:return CT(e,t,AT)}return Le({},e,l)}s($$,"downshiftSelectReducer");var P$=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],F$=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],V$=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];IT.stateChangeTypes=AT;function IT(e){e===void 0&&(e={}),L$(e,IT);var t=Le({},R$,e),n=t.items,r=t.scrollIntoView,i=t.environment,o=t.itemToString,l=t.getA11ySelectionMessage,a=t.getA11yStatusMessage,c=_T($$,vT(t),t),u=c[0],d=c[1],f=u.isOpen,h=u.highlightedIndex,g=u.selectedItem,p=u.inputValue,_=(0,m.useRef)(null),y=(0,m.useRef)(null),v=(0,m.useRef)({}),x=(0,m.useRef)(null),C=pT(t),b=(0,m.useRef)(),S=(0,m.useRef)(!0),M=Pd({state:u,props:t}),T=(0,m.useCallback)(function(Z){return v.current[C.getItemId(Z)]},[C]);Du(a,[f,h,p,n],Le({isInitialMount:S.current,previousResultCount:b.current,items:n,environment:i,itemToString:o},u)),Du(l,[g],Le({isInitialMount:S.current,previousResultCount:b.current,items:n,environment:i,itemToString:o},u));var E=xT({menuElement:y.current,highlightedIndex:h,isOpen:f,itemRefs:v,scrollIntoView:r,getItemNodeFromIndex:T});(0,m.useEffect)(function(){return x.current=Fm(function(Z){Z({type:mg,inputValue:""})},500),function(){x.current.cancel()}},[]),(0,m.useEffect)(function(){p&&x.current(d)},[d,p]),Km({isInitialMount:S.current,props:t,state:u}),(0,m.useEffect)(function(){S.current||(b.current=n.length)});var A=yT(f,[y,_],i,function(){d({type:$u})}),D=Hm("getMenuProps","getToggleButtonProps");(0,m.useEffect)(function(){return S.current=!1,function(){S.current=!0}},[]),(0,m.useEffect)(function(){f||(v.current={})},[f]);var L=(0,m.useMemo)(function(){return{ArrowDown:s(function(pe){pe.preventDefault(),d({type:Um,getItemNodeFromIndex:T,altKey:pe.altKey})},"ArrowDown"),ArrowUp:s(function(pe){pe.preventDefault(),d({type:Wm,getItemNodeFromIndex:T,altKey:pe.altKey})},"ArrowUp"),Home:s(function(pe){pe.preventDefault(),d({type:jm,getItemNodeFromIndex:T})},"Home"),End:s(function(pe){pe.preventDefault(),d({type:Jm,getItemNodeFromIndex:T})},"End"),Escape:s(function(){M.current.state.isOpen&&d({type:zm})},"Escape"),Enter:s(function(pe){pe.preventDefault(),d({type:M.current.state.isOpen?Gm:Rc})},"Enter"),PageUp:s(function(pe){M.current.state.isOpen&&(pe.preventDefault(),d({type:Zm,getItemNodeFromIndex:T}))},"PageUp"),PageDown:s(function(pe){M.current.state.isOpen&&(pe.preventDefault(),d({type:Ym,getItemNodeFromIndex:T}))},"PageDown")," ":s(function(pe){pe.preventDefault();var de=M.current.state;if(!de.isOpen){d({type:Rc});return}de.inputValue?d({type:Lu,key:" ",getItemNodeFromIndex:T}):d({type:qm})},"_")}},[d,T,M]),G=(0,m.useCallback)(function(){d({type:ST})},[d]),$=(0,m.useCallback)(function(){d({type:wT})},[d]),z=(0,m.useCallback)(function(){d({type:TT})},[d]),W=(0,m.useCallback)(function(Z){d({type:kT,highlightedIndex:Z})},[d]),ye=(0,m.useCallback)(function(Z){d({type:Qm,selectedItem:Z})},[d]),q=(0,m.useCallback)(function(){d({type:MT})},[d]),ge=(0,m.useCallback)(function(Z){d({type:mg,inputValue:Z})},[d]),me=(0,m.useCallback)(function(Z){return Le({id:C.labelId,htmlFor:C.toggleButtonId},Z)},[C]),oe=(0,m.useCallback)(function(Z,pe){var de,ce=Z===void 0?{}:Z,j=ce.onMouseLeave,ne=ce.refKey,ue=ne===void 0?"ref":ne;ce.onKeyDown,ce.onBlur;var Ne=ce.ref,$e=kr(ce,P$),Re=(pe===void 0?{}:pe).suppressRefError,Pe=Re===void 0?!1:Re,rt=s(function(){d({type:bT})},"menuHandleMouseLeave");return D("getMenuProps",Pe,ue,y),Le((de={},de[ue]=Yr(Ne,function(Je){y.current=Je}),de.id=C.menuId,de.role="listbox",de["aria-labelledby"]=$e&&$e["aria-label"]?void 0:""+C.labelId,de.onMouseLeave=Ot(j,rt),de),$e)},[d,D,C]);return{getToggleButtonProps:(0,m.useCallback)(function(Z,pe){var de,ce=Z===void 0?{}:Z,j=ce.onBlur,ne=ce.onClick;ce.onPress;var ue=ce.onKeyDown,Ne=ce.refKey,$e=Ne===void 0?"ref":Ne,Re=ce.ref,Pe=kr(ce,F$),rt=(pe===void 0?{}:pe).suppressRefError,Je=rt===void 0?!1:rt,pt=M.current.state,It=s(function(){d({type:Rc})},"toggleButtonHandleClick"),ut=s(function(){pt.isOpen&&!A.current.isMouseDown&&d({type:$u})},"toggleButtonHandleBlur"),jt=s(function(Nt){var it=Ou(Nt);it&&L[it]?L[it](Nt):N$(it)&&d({type:Lu,key:it,getItemNodeFromIndex:T})},"toggleButtonHandleKeyDown"),Ge=Le((de={},de[$e]=Yr(Re,function(yt){_.current=yt}),de["aria-activedescendant"]=pt.isOpen&&pt.highlightedIndex>-1?C.getItemId(pt.highlightedIndex):"",de["aria-controls"]=C.menuId,de["aria-expanded"]=M.current.state.isOpen,de["aria-haspopup"]="listbox",de["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+C.labelId,de.id=C.toggleButtonId,de.role="combobox",de.tabIndex=0,de.onBlur=Ot(j,ut),de),Pe);return Pe.disabled||(Ge.onClick=Ot(ne,It),Ge.onKeyDown=Ot(ue,jt)),D("getToggleButtonProps",Je,$e,_),Ge},[M,C,D,d,A,L,T]),getLabelProps:me,getMenuProps:oe,getItemProps:(0,m.useCallback)(function(Z){var pe,de=Z===void 0?{}:Z,ce=de.item,j=de.index,ne=de.onMouseMove,ue=de.onClick;de.onPress;var Ne=de.refKey,$e=Ne===void 0?"ref":Ne,Re=de.ref,Pe=de.disabled,rt=kr(de,V$),Je=M.current,pt=Je.state,It=Je.props,ut=Vm(ce,j,It.items,"Pass either item or index to getItemProps!"),jt=ut[0],Ge=ut[1],yt=s(function(){Ge!==pt.highlightedIndex&&(E.current=!1,d({type:ET,index:Ge,disabled:Pe}))},"itemHandleMouseMove"),Nt=s(function(){d({type:Xm,index:Ge})},"itemHandleClick"),it=Le((pe={disabled:Pe,role:"option","aria-selected":""+(jt===g),id:C.getItemId(Ge)},pe[$e]=Yr(Re,function(Yt){Yt&&(v.current[C.getItemId(Ge)]=Yt)}),pe),rt);return Pe||(it.onClick=Ot(ue,Nt)),it.onMouseMove=Ot(ne,yt),it},[M,g,C,E,d]),toggleMenu:G,openMenu:z,closeMenu:$,setHighlightedIndex:W,selectItem:ye,reset:q,setInputValue:ge,highlightedIndex:h,isOpen:f,selectedItem:g,inputValue:p}}s(IT,"useSelect");var e1=0,t1=1,n1=2,r1=3,i1=4,o1=5,s1=6,l1=7,a1=8,Pu=9,c1=10,NT=11,OT=12,u1=13,DT=14,RT=15,LT=16,$T=17,PT=18,d1=19,FT=20,VT=21,f1=22,BT=Object.freeze({__proto__:null,InputKeyDownArrowDown:e1,InputKeyDownArrowUp:t1,InputKeyDownEscape:n1,InputKeyDownHome:r1,InputKeyDownEnd:i1,InputKeyDownPageUp:o1,InputKeyDownPageDown:s1,InputKeyDownEnter:l1,InputChange:a1,InputBlur:Pu,InputFocus:c1,MenuMouseLeave:NT,ItemMouseMove:OT,ItemClick:u1,ToggleButtonClick:DT,FunctionToggleMenu:RT,FunctionOpenMenu:LT,FunctionCloseMenu:$T,FunctionSetHighlightedIndex:PT,FunctionSelectItem:d1,FunctionSetInputValue:FT,FunctionReset:VT,ControlledPropUpdatedSelectedItem:f1});function B$(e){var t=vT(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Le({},t,{inputValue:r})}s(B$,"getInitialState$1");Q.default.array.isRequired,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.number,Q.default.number,Q.default.number,Q.default.bool,Q.default.bool,Q.default.bool,Q.default.any,Q.default.any,Q.default.any,Q.default.string,Q.default.string,Q.default.string,Q.default.string,Q.default.string,Q.default.string,Q.default.func,Q.default.string,Q.default.string,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.func,Q.default.shape({addEventListener:Q.default.func,removeEventListener:Q.default.func,document:Q.default.shape({getElementById:Q.default.func,activeElement:Q.default.any,body:Q.default.any})});function H$(e,t,n){var r=(0,m.useRef)(),i=mT(e,t,n),o=i[0],l=i[1];return(0,m.useEffect)(function(){dT(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&l({type:f1,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Nu(o,n),l]}s(H$,"useControlledReducer");var K$=Fa,U$=Le({},wl,{selectedItemChanged:s(function(t,n){return t!==n},"selectedItemChanged"),getA11yStatusMessage:C$});function W$(e,t){var n,r=t.type,i=t.props,o=t.altKey,l;switch(r){case u1:l={isOpen:In(i,"isOpen"),highlightedIndex:In(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case e1:e.isOpen?l={highlightedIndex:Ai(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:l={highlightedIndex:o&&e.selectedItem==null?-1:po(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case t1:e.isOpen?o?l=Ru(i,e.highlightedIndex):l={highlightedIndex:Ai(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:l={highlightedIndex:po(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case l1:l=Ru(i,e.highlightedIndex);break;case n1:l=Le({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case o1:l={highlightedIndex:Ai(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case s1:l={highlightedIndex:Ai(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case r1:l={highlightedIndex:Ao(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case i1:l={highlightedIndex:Ao(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Pu:l=Le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case a1:l={isOpen:!0,highlightedIndex:In(i,"highlightedIndex"),inputValue:t.inputValue};break;case c1:l={isOpen:!0,highlightedIndex:po(i,e,0)};break;case d1:l={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case f1:l={inputValue:t.inputValue};break;default:return CT(e,t,BT)}return Le({},e,l)}s(W$,"downshiftUseComboboxReducer");var z$=["onMouseLeave","refKey","ref"],j$=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],J$=["onClick","onPress","refKey","ref"],G$=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];h1.stateChangeTypes=BT;function h1(e){e===void 0&&(e={}),K$(e,h1);var t=Le({},U$,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,l=t.environment,a=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=H$(W$,B$(t),t),f=d[0],h=d[1],g=f.isOpen,p=f.highlightedIndex,_=f.selectedItem,y=f.inputValue,v=(0,m.useRef)(null),x=(0,m.useRef)({}),C=(0,m.useRef)(null),b=(0,m.useRef)(null),S=(0,m.useRef)(!0),M=pT(t),T=(0,m.useRef)(),E=Pd({state:f,props:t}),A=(0,m.useCallback)(function(ce){return x.current[M.getItemId(ce)]},[M]);Du(a,[g,p,y,i],Le({isInitialMount:S.current,previousResultCount:T.current,items:i,environment:l,itemToString:u},f)),Du(c,[_],Le({isInitialMount:S.current,previousResultCount:T.current,items:i,environment:l,itemToString:u},f));var D=xT({menuElement:v.current,highlightedIndex:p,isOpen:g,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:A});Km({isInitialMount:S.current,props:t,state:f}),(0,m.useEffect)(function(){(n||r||g)&&C.current&&C.current.focus()},[]),(0,m.useEffect)(function(){S.current||(T.current=i.length)});var L=yT(g,[C,v,b],l,function(){h({type:Pu,selectItem:!1})}),G=Hm("getInputProps","getMenuProps");(0,m.useEffect)(function(){return S.current=!1,function(){S.current=!0}},[]),(0,m.useEffect)(function(){var ce;if(!g)x.current={};else if(((ce=l.document)==null?void 0:ce.activeElement)!==C.current){var j;C==null||(j=C.current)==null||j.focus()}},[g,l]);var $=(0,m.useMemo)(function(){return{ArrowDown:s(function(j){j.preventDefault(),h({type:e1,altKey:j.altKey,getItemNodeFromIndex:A})},"ArrowDown"),ArrowUp:s(function(j){j.preventDefault(),h({type:t1,altKey:j.altKey,getItemNodeFromIndex:A})},"ArrowUp"),Home:s(function(j){E.current.state.isOpen&&(j.preventDefault(),h({type:r1,getItemNodeFromIndex:A}))},"Home"),End:s(function(j){E.current.state.isOpen&&(j.preventDefault(),h({type:i1,getItemNodeFromIndex:A}))},"End"),Escape:s(function(j){var ne=E.current.state;(ne.isOpen||ne.inputValue||ne.selectedItem||ne.highlightedIndex>-1)&&(j.preventDefault(),h({type:n1}))},"Escape"),Enter:s(function(j){!E.current.state.isOpen||j.which===229||(j.preventDefault(),h({type:l1,getItemNodeFromIndex:A}))},"Enter"),PageUp:s(function(j){E.current.state.isOpen&&(j.preventDefault(),h({type:o1,getItemNodeFromIndex:A}))},"PageUp"),PageDown:s(function(j){E.current.state.isOpen&&(j.preventDefault(),h({type:s1,getItemNodeFromIndex:A}))},"PageDown")}},[h,E,A]),z=(0,m.useCallback)(function(ce){return Le({id:M.labelId,htmlFor:M.inputId},ce)},[M]),W=(0,m.useCallback)(function(ce,j){var ne,ue=ce===void 0?{}:ce,Ne=ue.onMouseLeave,$e=ue.refKey,Re=$e===void 0?"ref":$e,Pe=ue.ref,rt=kr(ue,z$),Je=(j===void 0?{}:j).suppressRefError;return G("getMenuProps",Je===void 0?!1:Je,Re,v),Le((ne={},ne[Re]=Yr(Pe,function(pt){v.current=pt}),ne.id=M.menuId,ne.role="listbox",ne["aria-labelledby"]=rt&&rt["aria-label"]?void 0:""+M.labelId,ne.onMouseLeave=Ot(Ne,function(){h({type:NT})}),ne),rt)},[h,G,M]),ye=(0,m.useCallback)(function(ce){var j,ne,ue=ce===void 0?{}:ce,Ne=ue.item,$e=ue.index,Re=ue.refKey,Pe=Re===void 0?"ref":Re,rt=ue.ref,Je=ue.onMouseMove,pt=ue.onMouseDown,It=ue.onClick;ue.onPress;var ut=ue.disabled,jt=kr(ue,j$),Ge=E.current,yt=Ge.props,Nt=Ge.state,it=Vm(Ne,$e,yt.items,"Pass either item or index to getItemProps!")[1],Yt="onClick",Ln=It;return Le((j={},j[Pe]=Yr(rt,function(Fe){Fe&&(x.current[M.getItemId(it)]=Fe)}),j.disabled=ut,j.role="option",j["aria-selected"]=""+(it===Nt.highlightedIndex),j.id=M.getItemId(it),j),!ut&&(ne={},ne[Yt]=Ot(Ln,s(function(){h({type:u1,index:it})},"itemHandleClick")),ne),{onMouseMove:Ot(Je,s(function(){it!==Nt.highlightedIndex&&(D.current=!1,h({type:OT,index:it,disabled:ut}))},"itemHandleMouseMove")),onMouseDown:Ot(pt,s(function($t){return $t.preventDefault()},"itemHandleMouseDown"))},jt)},[h,E,D,M]),q=(0,m.useCallback)(function(ce){var j,ne=ce===void 0?{}:ce,ue=ne.onClick;ne.onPress;var Ne=ne.refKey,$e=Ne===void 0?"ref":Ne,Re=ne.ref,Pe=kr(ne,J$),rt=E.current.state;return Le((j={},j[$e]=Yr(Re,function(Je){b.current=Je}),j["aria-controls"]=M.menuId,j["aria-expanded"]=rt.isOpen,j.id=M.toggleButtonId,j.tabIndex=-1,j),!Pe.disabled&&Le({},{onClick:Ot(ue,s(function(){h({type:DT})},"toggleButtonHandleClick"))}),Pe)},[h,E,M]),ge=(0,m.useCallback)(function(ce,j){var ne,ue=ce===void 0?{}:ce,Ne=ue.onKeyDown,$e=ue.onChange,Re=ue.onInput,Pe=ue.onFocus,rt=ue.onBlur;ue.onChangeText;var Je=ue.refKey,pt=Je===void 0?"ref":Je,It=ue.ref,ut=kr(ue,G$),jt=(j===void 0?{}:j).suppressRefError;G("getInputProps",jt===void 0?!1:jt,pt,C);var Ge=E.current.state,yt=s(function(ze){var I=Ou(ze);I&&$[I]&&$[I](ze)},"inputHandleKeyDown"),Nt=s(function(ze){h({type:a1,inputValue:ze.target.value})},"inputHandleChange"),it=s(function(ze){Ge.isOpen&&!L.current.isMouseDown&&h({type:Pu,selectItem:!(ze.relatedTarget===null&&l.document.activeElement!==l.document.body)})},"inputHandleBlur"),Yt=s(function(){Ge.isOpen||h({type:c1})},"inputHandleFocus"),Ln="onChange",Fe={};if(!ut.disabled){var $t;Fe=($t={},$t[Ln]=Ot($e,Re,Nt),$t.onKeyDown=Ot(Ne,yt),$t.onBlur=Ot(rt,it),$t.onFocus=Ot(Pe,Yt),$t)}return Le((ne={},ne[pt]=Yr(It,function($n){C.current=$n}),ne["aria-activedescendant"]=Ge.isOpen&&Ge.highlightedIndex>-1?M.getItemId(Ge.highlightedIndex):"",ne["aria-autocomplete"]="list",ne["aria-controls"]=M.menuId,ne["aria-expanded"]=Ge.isOpen,ne["aria-labelledby"]=ut&&ut["aria-label"]?void 0:""+M.labelId,ne.autoComplete="off",ne.id=M.inputId,ne.role="combobox",ne.value=Ge.inputValue,ne),Fe,ut)},[G,E,M,$,h,L,l]),me=(0,m.useCallback)(function(){h({type:RT})},[h]),oe=(0,m.useCallback)(function(){h({type:$T})},[h]),Z=(0,m.useCallback)(function(){h({type:LT})},[h]),pe=(0,m.useCallback)(function(ce){h({type:PT,highlightedIndex:ce})},[h]),de=(0,m.useCallback)(function(ce){h({type:d1,selectedItem:ce})},[h]);return{getItemProps:ye,getLabelProps:z,getMenuProps:W,getInputProps:ge,getToggleButtonProps:q,toggleMenu:me,openMenu:Z,closeMenu:oe,setHighlightedIndex:pe,setInputValue:(0,m.useCallback)(function(ce){h({type:FT,inputValue:ce})},[h]),selectItem:de,reset:(0,m.useCallback)(function(){h({type:VT})},[h]),highlightedIndex:p,isOpen:g,selectedItem:_,inputValue:y}}s(h1,"useCombobox");var HT={activeIndex:-1,selectedItems:[]};function cy(e,t){return ol(e,t,HT)}s(cy,"getInitialValue");function uy(e,t){return In(e,t,HT)}s(uy,"getDefaultValue");function q$(e){return{activeIndex:cy(e,"activeIndex"),selectedItems:cy(e,"selectedItems")}}s(q$,"getInitialState");function dy(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}s(dy,"isKeyDownOperationPermitted");function Z$(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}s(Z$,"getA11yRemovalMessage");Q.default.array,Q.default.array,Q.default.array,Q.default.func,Q.default.func,Q.default.func,Q.default.number,Q.default.number,Q.default.number,Q.default.func,Q.default.func,Q.default.string,Q.default.string,Q.default.shape({addEventListener:Q.default.func,removeEventListener:Q.default.func,document:Q.default.shape({getElementById:Q.default.func,activeElement:Q.default.any,body:Q.default.any})});var Y$={itemToString:wl.itemToString,stateReducer:wl.stateReducer,environment:wl.environment,getA11yRemovalMessage:Z$,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},X$=Fa,g1=0,p1=1,m1=2,_1=3,v1=4,y1=5,x1=6,C1=7,b1=8,E1=9,S1=10,T1=11,w1=12,Q$=Object.freeze({__proto__:null,SelectedItemClick:g1,SelectedItemKeyDownDelete:p1,SelectedItemKeyDownBackspace:m1,SelectedItemKeyDownNavigationNext:_1,SelectedItemKeyDownNavigationPrevious:v1,DropdownKeyDownNavigationPrevious:y1,DropdownKeyDownBackspace:x1,DropdownClick:C1,FunctionAddSelectedItem:b1,FunctionRemoveSelectedItem:E1,FunctionSetSelectedItems:S1,FunctionSetActiveIndex:T1,FunctionReset:w1});function eP(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,l=e.activeIndex,a=e.selectedItems,c;switch(n){case g1:c={activeIndex:r};break;case v1:c={activeIndex:l-1<0?0:l-1};break;case _1:c={activeIndex:l+1>=a.length?-1:l+1};break;case m1:case p1:if(l<0)break;var u=l;a.length===1?u=-1:l===a.length-1&&(u=a.length-2),c=Le({selectedItems:[].concat(a.slice(0,l),a.slice(l+1))},{activeIndex:u});break;case y1:c={activeIndex:a.length-1};break;case x1:c={selectedItems:a.slice(0,a.length-1)};break;case b1:c={selectedItems:[].concat(a,[o])};break;case C1:c={activeIndex:-1};break;case E1:var d=l,f=a.indexOf(o);if(f<0)break;a.length===1?d=-1:f===a.length-1&&(d=a.length-2),c={selectedItems:[].concat(a.slice(0,f),a.slice(f+1)),activeIndex:d};break;case S1:c={selectedItems:t.selectedItems};break;case T1:c={activeIndex:t.activeIndex};break;case w1:c={activeIndex:uy(i,"activeIndex"),selectedItems:uy(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return Le({},e,c)}s(eP,"downshiftMultipleSelectionReducer");var tP=["refKey","ref","onClick","onKeyDown","selectedItem","index"],nP=["refKey","ref","onKeyDown","onClick","preventKeyAction"];KT.stateChangeTypes=Q$;function KT(e){e===void 0&&(e={}),X$(e,KT);var t=Le({},Y$,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,l=t.keyNavigationPrevious,a=_T(eP,q$(t),t),c=a[0],u=a[1],d=c.activeIndex,f=c.selectedItems,h=(0,m.useRef)(!0),g=(0,m.useRef)(null),p=(0,m.useRef)(f),_=(0,m.useRef)();_.current=[];var y=Pd({state:c,props:t});(0,m.useEffect)(function(){if(!h.current){if(f.length<p.current.length){var b=p.current.find(function(S){return f.indexOf(S)<0});fT(n({itemToString:r,resultCount:f.length,removedSelectedItem:b,activeIndex:d,activeSelectedItem:f[d]}),i.document)}p.current=f}},[f.length]),(0,m.useEffect)(function(){h.current||(d===-1&&g.current?g.current.focus():_.current[d]&&_.current[d].focus())},[d]),Km({isInitialMount:h.current,props:t,state:c});var v=Hm("getDropdownProps");(0,m.useEffect)(function(){return h.current=!1,function(){h.current=!0}},[]);var x=(0,m.useMemo)(function(){var b;return b={},b[l]=function(){u({type:v1})},b[o]=function(){u({type:_1})},b.Delete=s(function(){u({type:p1})},"Delete"),b.Backspace=s(function(){u({type:m1})},"Backspace"),b},[u,o,l]),C=(0,m.useMemo)(function(){var b;return b={},b[l]=function(S){dy(S)&&u({type:y1})},b.Backspace=s(function(M){dy(M)&&u({type:x1})},"Backspace"),b},[u,l]);return{getSelectedItemProps:(0,m.useCallback)(function(b){var S,M=b===void 0?{}:b,T=M.refKey,E=T===void 0?"ref":T,A=M.ref,D=M.onClick,L=M.onKeyDown,G=M.selectedItem,$=M.index,z=kr(M,tP),W=y.current.state,ye=Vm(G,$,W.selectedItems,"Pass either item or index to getSelectedItemProps!")[1],q=ye>-1&&ye===W.activeIndex;return Le((S={},S[E]=Yr(A,function(ge){ge&&_.current.push(ge)}),S.tabIndex=q?0:-1,S.onClick=Ot(D,s(function(){u({type:g1,index:ye})},"selectedItemHandleClick")),S.onKeyDown=Ot(L,s(function(me){var oe=Ou(me);oe&&x[oe]&&x[oe](me)},"selectedItemHandleKeyDown")),S),z)},[u,y,x]),getDropdownProps:(0,m.useCallback)(function(b,S){var M,T=b===void 0?{}:b,E=T.refKey,A=E===void 0?"ref":E,D=T.ref,L=T.onKeyDown,G=T.onClick,$=T.preventKeyAction,z=$===void 0?!1:$,W=kr(T,nP),ye=(S===void 0?{}:S).suppressRefError;return v("getDropdownProps",ye===void 0?!1:ye,A,g),Le((M={},M[A]=Yr(D,function(q){q&&(g.current=q)}),M),!z&&{onKeyDown:Ot(L,s(function(ge){var me=Ou(ge);me&&C[me]&&C[me](ge)},"dropdownHandleKeyDown")),onClick:Ot(G,s(function(){u({type:C1})},"dropdownHandleClick"))},W)},[u,C,v]),addSelectedItem:(0,m.useCallback)(function(b){u({type:b1,selectedItem:b})},[u]),removeSelectedItem:(0,m.useCallback)(function(b){u({type:E1,selectedItem:b})},[u]),setSelectedItems:(0,m.useCallback)(function(b){u({type:S1,selectedItems:b})},[u]),setActiveIndex:(0,m.useCallback)(function(b){u({type:T1,activeIndex:b})},[u]),reset:(0,m.useCallback)(function(){u({type:w1})},[u]),selectedItems:f,activeIndex:d}}s(KT,"useMultipleSelection");var fy=20,UT=s(e=>e.suggestions.length>0?m.createElement(rP,{...e}):m.createElement("input",{className:J.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),"DownshiftAutoComplete"),rP=s(({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:l})=>{const[a,c]=m.useState(t.slice(0,fy)),u=ni(pi),d=t.length>0,{isOpen:f,getToggleButtonProps:h,getMenuProps:g,getInputProps:p,highlightedIndex:_,getItemProps:y,selectedItem:v}=h1({initialInputValue:o,onInputValueChange({inputValue:C=""}){l(r,C),C=C.toLowerCase()||"";const b=[];for(const S of t)if(S.toLowerCase().includes(C)&&(b.push(S),b.length>=fy))break;c(b)},items:a,itemToString(C){return C??""}}),x=f&&a.length>0;return m.createElement("div",{className:J.downshiftAutocompleteContainer},m.createElement("div",{"data-visible-dropdown":x,className:J.downshiftInputWrapper},m.createElement(jL,{name:r,control:n,render:s(({field:C})=>{const b=p();return m.createElement("input",{...b,name:C.name,placeholder:i,className:J.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})},"render")}),d&&m.createElement("button",{"aria-label":"toggle menu",type:"button",...h()},u("arrow_drop_down"))),m.createElement("div",{className:J.downshiftAutocompleteContainer},m.createElement("ul",{...g(),"data-visible":x},a.map((C,b)=>m.createElement("li",{"data-selected":v===C,"data-highlighted":_===b,key:`${C}${b}`,...y({item:C,index:b})},C)))))},"DownshiftAutoCompleteWithSuggestions"),iP=s(()=>{const[e,t,n,r,i]=vr(_g,mo,Po,Ii,ia),o=Mn(GT),l=Mn(jT),a=mi(),{register:c,handleSubmit:u,control:d,setValue:f,reset:h}=uT({values:t.type==="editing"?t.initialValues:{}}),g=s(()=>{h({src:"",title:"",altText:"",width:void 0,height:void 0})},"resetFormState");return t.type==="inactive"?null:m.createElement(Fk,{open:!0,onOpenChange:s(p=>{p||(l(),g())},"onOpenChange")},m.createElement(Lk,{container:n?.current},m.createElement(Dk,{className:J.dialogOverlay}),m.createElement($k,{className:J.dialogContent,onOpenAutoFocus:s(p=>{p.preventDefault()},"onOpenAutoFocus")},m.createElement(Pk,null,a("uploadImage.dialogTitle","Upload an image")),m.createElement("form",{onSubmit:s(async p=>{p.preventDefault(),p.stopPropagation(),await u(o)(p),g()},"onSubmit"),className:J.multiFieldForm},r===null?m.createElement("input",{type:"hidden",accept:"image/*",...c("file")}):m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"file"},a("uploadImage.uploadInstructions","Upload an image from your device:")),m.createElement("input",{type:"file",accept:"image/*",...c("file")})),m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"src"},r!==null?a("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):a("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),m.createElement(UT,{register:c,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:f,control:d,placeholder:a("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"alt"},a("uploadImage.alt","Alt:")),m.createElement("input",{type:"text",...c("altText"),className:J.textInput})),m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"title"},a("uploadImage.title","Title:")),m.createElement("input",{type:"text",...c("title"),className:J.textInput})),i&&m.createElement("div",{className:J.imageDimensionsContainer},m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"width"},a("uploadImage.width","Width:")),m.createElement("input",{type:"number",min:0,...c("width"),className:J.textInput})),m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"height"},a("uploadImage.height","Height:")),m.createElement("input",{type:"number",min:0,...c("height"),className:J.textInput}))),m.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},m.createElement("button",{type:"submit",title:a("dialogControls.save","Save"),"aria-label":a("dialogControls.save","Save"),className:(0,tt.default)(J.primaryButton)},a("dialogControls.save","Save")),m.createElement(Rk,{asChild:!0},m.createElement("button",{type:"reset",title:a("dialogControls.cancel","Cancel"),"aria-label":a("dialogControls.cancel","Cancel"),className:(0,tt.default)(J.secondaryButton)},a("dialogControls.cancel","Cancel"))))))))},"ImageDialog");function kf(e,t,n){return Math.min(Math.max(e,t),n)}s(kf,"clamp");var ot={east:1,north:8,south:2,west:4};function oP({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=(0,m.useRef)(null),l=(0,m.useRef)({priority:"",value:"default"}),a=(0,m.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),c=i.getRootElement(),u=r??(c!==null?c.getBoundingClientRect().width-20:100),d=c!==null?c.getBoundingClientRect().height-20:100,f=100,h=100,g=s(x=>{const C=x===ot.east||x===ot.west,b=x===ot.north||x===ot.south,S=x&ot.north&&x&ot.west||x&ot.south&&x&ot.east,M=C?"ew":b?"ns":S?"nwse":"nesw";c!==null&&c.style.setProperty("cursor",`${M}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${M}-resize`,"important"),l.current.value=document.body.style.getPropertyValue("-webkit-user-select"),l.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},"setStartCursor"),p=s(()=>{c!==null&&c.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",l.current.value,l.current.priority))},"setEndCursor"),_=s((x,C)=>{if(!i.isEditable())return;const b=n.current,S=o.current;if(b!==null&&S!==null){x.preventDefault();const{width:M,height:T}=b.getBoundingClientRect(),E=a.current;E.startWidth=M,E.startHeight=T,E.ratio=M/T,E.currentWidth=M,E.currentHeight=T,E.startX=x.clientX,E.startY=x.clientY,E.isResizing=!0,E.direction=C,g(C),e(),S.classList.add(J.imageControlWrapperResizing),b.style.height=`${T}px`,b.style.width=`${M}px`,document.addEventListener("pointermove",y),document.addEventListener("pointerup",v)}},"handlePointerDown"),y=s(x=>{const C=n.current,b=a.current,S=b.direction&(ot.east|ot.west),M=b.direction&(ot.south|ot.north);if(C!==null&&b.isResizing)if(S&&M){let T=Math.floor(b.startX-x.clientX);T=b.direction&ot.east?-T:T;const E=kf(b.startWidth+T,f,u),A=E/b.ratio;C.style.width=`${E}px`,C.style.height=`${A}px`,b.currentHeight=A,b.currentWidth=E}else if(M){let T=Math.floor(b.startY-x.clientY);T=b.direction&ot.south?-T:T;const E=kf(b.startHeight+T,h,d);C.style.height=`${E}px`,b.currentHeight=E}else{let T=Math.floor(b.startX-x.clientX);T=b.direction&ot.east?-T:T;const E=kf(b.startWidth+T,f,u);C.style.width=`${E}px`,b.currentWidth=E}},"handlePointerMove"),v=s(()=>{const x=n.current,C=a.current,b=o.current;if(x!==null&&b!==null&&C.isResizing){const S=C.currentWidth,M=C.currentHeight;C.startWidth=0,C.startHeight=0,C.ratio=0,C.startX=0,C.startY=0,C.currentWidth=0,C.currentHeight=0,C.isResizing=!1,b.classList.remove(J.imageControlWrapperResizing),p(),t(S,M),document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",v)}},"handlePointerUp");return m.createElement("div",{ref:o},m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerN),onPointerDown:s(x=>{_(x,ot.north)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerNe),onPointerDown:s(x=>{_(x,ot.north|ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerE),onPointerDown:s(x=>{_(x,ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerSe),onPointerDown:s(x=>{_(x,ot.south|ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerS),onPointerDown:s(x=>{_(x,ot.south)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerSw),onPointerDown:s(x=>{_(x,ot.south|ot.west)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerW),onPointerDown:s(x=>{_(x,ot.west)},"onPointerDown")}),m.createElement("div",{className:(0,tt.default)(J.imageResizer,J.imageResizerNw),onPointerDown:s(x=>{_(x,ot.north|ot.west)},"onPointerDown")}))}s(oP,"ImageResizer");var sP="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
57
+ <svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
58
+ <rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
59
+ <text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
60
+ </svg>
61
+ `),lP={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=sP,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function aP({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:l}){return m.createElement("img",{className:n??void 0,alt:t,src:lP.read(i),title:e,ref:r,draggable:"false",width:o,height:l})}s(aP,"LazyImage");function cP({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:l}){const[a,c,u,d,f,h]=vr(xg,vg,ia,yg,_r,Cg),g=m.useRef(null),p=m.useRef(null),[_,y,v]=TS(r),[x]=fn(),[C,b]=m.useState(null),S=m.useRef(null),[M,T]=m.useState(!1),[E,A]=m.useState(null),[D,L]=m.useState(null),G=m.useCallback(oe=>{if(_&&He(re())){oe.preventDefault();const Z=yn(r);Fu(Z)&&Z.remove()}return!1},[_,r]),$=m.useCallback(oe=>{const Z=re(),pe=p.current;return _&&He(Z)&&Z.getNodes().length===1&&pe!==null&&pe!==document.activeElement?(oe.preventDefault(),pe.focus(),!0):!1},[_]),z=m.useCallback(oe=>p.current===oe.target?(Xn(null),x.update(()=>{y(!0);const Z=x.getRootElement();Z!==null&&Z.focus()}),!0):!1,[x,y]);m.useEffect(()=>{d?s(async()=>{D||L(e);const Z=await d(e);A(Z)},"callPreviewHandler")().catch(Z=>{}):A(e)},[e,d,D]),m.useEffect(()=>{if(u&&g.current){const{current:oe}=g;hy(oe,"width",i),hy(oe,"height",o)}},[u,i,o]),m.useEffect(()=>{let oe=!0;const Z=At(x.registerUpdateListener(({editorState:pe})=>{oe&&b(pe.read(()=>re()))}),x.registerCommand(am,(pe,de)=>(S.current=de,!1),st),x.registerCommand(nm,pe=>{const de=pe;return M?!0:de.target===g.current?(de.shiftKey?y(!_):(v(),y(!0)),!0):!1},st),x.registerCommand(rm,pe=>pe.target===g.current?(pe.preventDefault(),!0):!1,st),x.registerCommand(om,G,st),x.registerCommand(_d,G,st),x.registerCommand(vd,$,st),x.registerCommand(yd,z,st));return()=>{oe=!1,Z()}},[v,x,M,_,r,G,$,z,y]);const W=s((oe,Z)=>{setTimeout(()=>{T(!1)},200),x.update(()=>{const pe=yn(r);Fu(pe)&&pe.setWidthAndHeight(oe,Z)})},"onResizeEnd"),ye=s(()=>{T(!0)},"onResizeStart"),q=He(C),ge=_,me=m.useMemo(()=>{if(l.length===0)return null;const oe=l.find(Z=>Z.type==="mdxJsxAttribute"&&(Z.name==="class"||Z.name==="className"));return oe?oe.value:null},[l]);return E!==null?m.createElement(m.Suspense,{fallback:a?m.createElement(a,null):null},m.createElement("div",{className:J.imageWrapper,"data-editor-block-type":"image"},m.createElement("div",{draggable:q},m.createElement(aP,{width:i,height:o,className:(0,tt.default)({[J.focusedImage]:ge},me),src:E,title:t??"",alt:n??"",imageRef:g})),q&&ge&&!c&&m.createElement(oP,{editor:x,imageRef:g,onResizeStart:ye,onResizeEnd:W}),f||m.createElement(h,{nodeKey:r,imageSource:E,initialImagePath:D,title:t??"",alt:n??"",width:i,height:o}))):null}s(cP,"ImageEditor");var hy=s((e,t,n)=>{typeof n=="number"?e.style[t]=`${n}px`:e.style.removeProperty(t)},"syncDimensionWithImageResizer"),uP=Object.defineProperty,dP=s((e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$1"),zo=s((e,t,n)=>dP(e,typeof t!="symbol"?t+"":t,n),"__publicField$1");function fP(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:Fo({altText:t,src:n,title:r,width:i||void 0,height:o||void 0})}}return null}s(fP,"convertImageElement");var k1=class WT extends Ma{static{s(this,"ImageNode")}constructor(t,n,r,i,o,l,a){super(a),zo(this,"__src"),zo(this,"__altText"),zo(this,"__title"),zo(this,"__width"),zo(this,"__height"),zo(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i??"inherit",this.__height=o??"inherit",this.__rest=l??[]}static getType(){return"image"}static clone(t){return new WT(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__src=t.__src,this.__altText=t.__altText,this.__title=t.__title,this.__width=t.__width,this.__height=t.__height,this.__rest=t.__rest}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:l,height:a}=t;return Fo({altText:n,title:r,src:i,height:a,width:o,rest:l})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width!=="inherit"&&this.__width&&t.setAttribute("width",this.__width.toString()),this.__height!=="inherit"&&this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:s(()=>({conversion:fP,priority:0}),"img")}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?void 0:this.__height,width:this.__width==="inherit"?void 0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t,n){const r=document.createElement("span"),i=t.theme.image;return i!==void 0&&(r.className=i),r}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return m.createElement(cP,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}};function Fo(e){const{altText:t,title:n,src:r,key:i,width:o,height:l,rest:a}=e;return new k1(r,t,n,o,l,a,i)}s(Fo,"$createImageNode");function Fu(e){return e instanceof k1}s(Fu,"$isImageNode");var hP={testLexicalNode:Fu,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},gP={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Fo({src:e.url,altText:e.alt??"",title:e.title??""}))}},pP={testNode:s(e=>e.type==="html"&&e.value.trim().startsWith("<img"),"testNode"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,l=r.title,a=r.width,c=r.height,u=Fo({src:i||"",altText:o,title:l,width:a||void 0,height:c||void 0});if(t.getType()==="root"){const d=Xe();d.append(u),t.append(d)}else t.append(u)}};function tl(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}s(tl,"getAttributeValue");var mP={testNode:s(e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img","testNode"),visitNode({mdastNode:e,lexicalParent:t}){const n=tl(e,"src");if(!n)return;const r=tl(e,"alt")??"",i=tl(e,"title"),o=tl(e,"height"),l=tl(e,"width"),a=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),c=Fo({src:n,altText:r,title:i,width:l?parseInt(l,10):void 0,height:o?parseInt(o,10):void 0,rest:a});if(t.getType()==="root"){const u=Xe();u.append(c),t.append(u)}else t.append(c)}},M1=wt(e=>{e.sub(e.pipe(M1,mt(gt)),([t,n])=>{n?.update(()=>{const r=Fo({altText:t.altText??"",src:t.src,title:t.title??"",width:Es(t.width),height:Es(t.height)});Rs([r]),xn(r.getParentOrThrow())&&cm(r,Xe).selectEnd()})})}),_P=wt(e=>{e.sub(e.pipe(_P,mt(Ii)),([t,n])=>{const r=s(i=>{e.pub(M1,{...t,src:i})},"handler");"file"in t?n?.(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),_g=he([]),vg=he(!1),Ii=he(null),yg=he(null),xg=he(null),mo=he({type:"inactive"},e=>{e.sub(e.pipe(GT,mt(gt,Ii,mo,ia)),([t,n,r,i,o])=>{const l=i.type==="editing"?a=>{n?.update(()=>{const{nodeKey:c}=i,u=yn(c);if(u.setTitle(t.title),u.setAltText(t.altText),u.setSrc(a),o){const d=Es(t.width),f=Es(t.height);u.setWidthAndHeight(d??"inherit",f??"inherit")}}),e.pub(mo,{type:"inactive"})}:a=>{e.pub(M1,{...t,src:a}),e.pub(mo,{type:"inactive"})};t.file&&t.file.length>0?r?.(t.file.item(0)).then(l).catch(a=>{throw a}):t.src&&l(t.src)}),e.pub(ea,t=>{const n=e.getValue(Ii);return At(t.registerCommand(Vu,r=>{const i=Fo(r);return Rs([i]),xn(i.getParentOrThrow())&&cm(i,Xe).selectEnd(),!0},Me),t.registerCommand(rm,r=>bP(r),Jl),t.registerCommand(Q2,r=>EP(r,!!n),st),t.registerCommand(eb,r=>SP(r,t,e.getValue(Ii)),Jl),t.registerCommand(Gl,r=>{var i,o;if(!n){let c=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return c=c.filter(u=>u.type.includes("text")),!c.length||c.length===0}const l=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(l.some(c=>!c.type.includes("image"))||!l.length||l.length===0)return!1;const a=e.getValue(Ii);return Promise.all(l.map(c=>a(c.getAsFile()))).then(c=>{c.forEach(u=>{t.dispatchCommand(Vu,{src:u,altText:""})})}).catch(c=>{throw c}),!0},Rr))})}),vP=Ji(e=>{e.link(e.pipe(vP,iC({type:"new"})),mo)}),zT=wt(e=>{e.link(e.pipe(zT,$i(t=>({type:"editing",...t}))),mo)}),jT=Ji(e=>{e.link(e.pipe(jT,iC({type:"inactive"})),mo)}),JT=he(!1),ia=he(!1),GT=wt(),Cg=he(ug),Es=s(e=>{if(typeof e>"u")return;const t=parseInt(String(e),10);return Number.isNaN(t)?void 0:t},"parseImageDimension"),yP=En({init(e,t){e.pubIn({[$r]:[gP,pP,mP],[hi]:k1,[gi]:hP,[Vs]:t?.ImageDialog??iP,[Ii]:t?.imageUploadHandler??null,[_g]:t?.imageAutocompleteSuggestions??[],[vg]:!!t?.disableImageResize,[JT]:!!t?.disableImageSettingsButton,[ia]:!!t?.allowSetImageDimensions,[yg]:t?.imagePreviewHandler??null,[Cg]:t?.EditImageToolbar??ug,[xg]:t?.imagePlaceholder??zv})},update(e,t){e.pubIn({[Ii]:t?.imageUploadHandler??null,[_g]:t?.imageAutocompleteSuggestions??[],[vg]:!!t?.disableImageResize,[yg]:t?.imagePreviewHandler??null,[ia]:!!t?.allowSetImageDimensions,[Cg]:t?.EditImageToolbar??ug,[xg]:t?.imagePlaceholder??zv})}}),xP=s(e=>ES?(e??window).getSelection():null,"getDOMSelection"),Vu=br("INSERT_IMAGE_COMMAND"),CP="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function bP(e){const t=A1();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=CP,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}s(bP,"onDragStart");function EP(e,t){var n;if(t){let r=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(r=r.filter(i=>i.type.includes("image")),r.length>0)return e.preventDefault(),!0}return A1()?(qT(e)||e.preventDefault(),!0):!1}s(EP,"onDragover");function SP(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(a=>a.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(a=>a.kind==="string"?new Promise(c=>{a.getAsString(c)}):n(a.getAsFile()))).then(a=>{a.forEach(c=>{t.dispatchCommand(Vu,{src:c,altText:""})})}).catch(a=>{throw a}),!0;const o=A1();if(!o)return!1;const l=TP(e);if(!l)return!1;if(e.preventDefault(),qT(e)){const a=wP(e);o.remove();const c=gd();a!=null&&c.applyDOMRange(a),Xn(c),t.dispatchCommand(Vu,l)}return!0}s(SP,"onDrop");function A1(){const e=re();if(!He(e))return null;const t=e.getNodes()[0];return Fu(t)?t:null}s(A1,"getImageNodeInSelection");function TP(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}s(TP,"getDragImageData");function qT(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}s(qT,"canDropImage");function wP(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=xP(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}s(wP,"getDragSelection");var kP={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(Fs())}},MP={testLexicalNode:Kh,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("blockquote")},"visitLexicalNode")},AP=En({init(e){e.pubIn({[Bs]:"quote",[$r]:kP,[hi]:wd,[gi]:MP})}});function gy(){let e=go;return{publish:s(()=>{e()},"publish"),subscribe:s(t=>{e=t},"subscribe")}}s(gy,"voidEmitter");function ZT(e,t,n,r){const i=[...e].sort((l,a)=>a.priority-l.priority),o=n??"";return i.find(l=>l.match(t??"",o))??i.find(l=>l.match(r??"",o))}s(ZT,"findCodeBlockDescriptor");var IP=Object.defineProperty,NP=s((e,t,n)=>t in e?IP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp"),xi=s((e,t,n)=>NP(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Fd=class YT extends Ma{static{s(this,"CodeBlockNode")}constructor(t,n,r,i){super(i),xi(this,"__code"),xi(this,"__meta"),xi(this,"__language"),xi(this,"__focusEmitter",gy()),xi(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),xi(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),xi(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),xi(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new YT(t.__code,t.__language,t.__meta,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__code=t.__code,this.__meta=t.__meta,this.__language=t.__language,this.__focusEmitter=gy()}static importJSON(t){return Va({code:typeof t.code=="string"?t.code:"",language:typeof t.language=="string"?t.language:"",meta:typeof t.meta=="string"?t.meta:""})}static importDOM(){return{pre:s(()=>({conversion:LP,priority:3}),"pre")}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t,n){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return m.createElement(DP,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}},XT=m.createContext(null),OP=s(({parentEditor:e,lexicalNode:t,children:n})=>{const r=m.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:s(i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(Xl,void 0)},0)})},"setCode"),setLanguage:s(i=>{e.update(()=>{t.setLanguage(i)})},"setLanguage"),setMeta:s(i=>{e.update(()=>{t.setMeta(i)})},"setMeta")}),[t,e]);return m.createElement(XT.Provider,{value:r},n)},"CodeBlockEditorContextProvider");function bg(){const e=m.useContext(XT);if(!e)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return e}s(bg,"useCodeBlockEditorContext");var DP=s(e=>{const t=ni(La),n=ni(bs),r=ZT(t,e.language,e.meta,n);if(!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:l,...a}=e;return m.createElement(OP,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},m.createElement(i,{...a}))},"CodeBlockEditorContainer");function Va(e){const{code:t="",language:n="",meta:r=""}=e;return new Fd(t,n,r)}s(Va,"$createCodeBlockNode");function RP(e){return e instanceof Fd}s(RP,"$isCodeBlockNode");function LP(e){const t=e,n=t.textContent,r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",o=/language-(\w+)/.exec(r);return{node:Va({code:n,language:o?o[1]:i,meta:t.getAttribute("data-meta")??""})}}s(LP,"$convertPreElement");var $P={testLexicalNode:RP,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("code",{value:e.getCode(),lang:e.getLanguage(),meta:e.getMeta()})},"visitLexicalNode")},PP={testNode:s((e,{codeBlockEditorDescriptors:t,defaultCodeBlockLanguage:n})=>e.type==="code"?ZT(t,e.lang,e.meta,n)!==void 0:!1,"testNode"),visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Va({code:e.value,language:e.lang??"",meta:e.meta??""}))}},QT=wt(e=>{e.link(e.pipe(QT,mt(bs),$i(([t,n])=>()=>Va({language:n,...t}))),Mm)}),FP=rn(La),VP=En({update(e,t){e.pub(bs,t?.defaultCodeBlockLanguage??"")},init(e,t){e.pubIn({[Bs]:"codeblock",[bs]:t?.defaultCodeBlockLanguage??"",[La]:t?.codeBlockEditorDescriptors??[],[$r]:PP,[hi]:Fd,[gi]:$P})}});function K(e){return new b9(g9.define(e))}s(K,"legacy");function Ci(e){return V(()=>import("./dist-BEo-uoE2.js").then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]))}s(Ci,"sql");var BP=[P.of({name:"C",extensions:["c","h","ino"],load(){return V(()=>import("./dist-DTj_cM7l.js").then(e=>e.cpp()),__vite__mapDeps([4,1,3]))}}),P.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return V(()=>import("./dist-DTj_cM7l.js").then(e=>e.cpp()),__vite__mapDeps([4,1,3]))}}),P.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ci("Cassandra")}}),P.of({name:"CSS",extensions:["css"],load(){return V(()=>import("./dist-D4qkWMdz.js").then(e=>e.i).then(e=>e.css()),__vite__mapDeps([5,6,1,3]))}}),P.of({name:"Go",extensions:["go"],load(){return V(()=>import("./dist-DTwCbVsv.js").then(e=>e.go()),__vite__mapDeps([7,1,2,3]))}}),P.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return V(()=>import("./dist-Bp5Y-deP.js").then(e=>e.html()),__vite__mapDeps([8,1,3,5,6,9,2]))}}),P.of({name:"Java",extensions:["java"],load(){return V(()=>import("./dist-BAtkULn4.js").then(e=>e.java()),__vite__mapDeps([10,1,3]))}}),P.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return V(()=>import("./dist-ds5P5TFe.js").then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return V(()=>import("./dist-DrXWoUSy.js").then(e=>e.jinja()),__vite__mapDeps([11,1,3,8,5,6,9,2]))}}),P.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return V(()=>import("./dist-Uvf9OORN.js").then(e=>e.json()),__vite__mapDeps([12,1,3]))}}),P.of({name:"JSX",extensions:["jsx"],load(){return V(()=>import("./dist-ds5P5TFe.js").then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"LESS",extensions:["less"],load(){return V(()=>import("./dist-CcBZFMdg.js").then(e=>e.less()),__vite__mapDeps([13,1,3,5,6]))}}),P.of({name:"Liquid",extensions:["liquid"],load(){return V(()=>import("./dist-D61jI6QA.js").then(e=>e.liquid()),__vite__mapDeps([14,1,3,8,5,6,9,2]))}}),P.of({name:"MariaDB SQL",load(){return Ci("MariaSQL")}}),P.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return V(()=>import("./dist-CN5Rg9XU.js").then(e=>e.markdown()),__vite__mapDeps([15,1,2,8,3,5,6,9]))}}),P.of({name:"MS SQL",load(){return Ci("MSSQL")}}),P.of({name:"MySQL",load(){return Ci("MySQL")}}),P.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return V(()=>import("./dist-DY5RRJBY.js").then(e=>e.php()),__vite__mapDeps([16,1,3,8,5,6,9,2]))}}),P.of({name:"PLSQL",extensions:["pls"],load(){return Ci("PLSQL")}}),P.of({name:"PostgreSQL",load(){return Ci("PostgreSQL")}}),P.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return V(()=>import("./dist-Bc6S4vv3.js").then(e=>e.python()),__vite__mapDeps([17,1,2,3]))}}),P.of({name:"Rust",extensions:["rs"],load(){return V(()=>import("./dist-CD47N__7.js").then(e=>e.rust()),__vite__mapDeps([18,1,3]))}}),P.of({name:"Sass",extensions:["sass"],load(){return V(()=>import("./dist-yKrp-Qew.js").then(e=>e.sass({indented:!0})),__vite__mapDeps([19,1,3,5,6]))}}),P.of({name:"SCSS",extensions:["scss"],load(){return V(()=>import("./dist-yKrp-Qew.js").then(e=>e.sass()),__vite__mapDeps([19,1,3,5,6]))}}),P.of({name:"SQL",extensions:["sql"],load(){return Ci("StandardSQL")}}),P.of({name:"SQLite",load(){return Ci("SQLite")}}),P.of({name:"TSX",extensions:["tsx"],load(){return V(()=>import("./dist-ds5P5TFe.js").then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return V(()=>import("./dist-ds5P5TFe.js").then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"WebAssembly",extensions:["wat","wast"],load(){return V(()=>import("./dist-CdFTLNcc.js").then(e=>e.wast()),__vite__mapDeps([20,1,3]))}}),P.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return V(()=>import("./dist-Cv1Aw0YM.js").then(e=>e.xml()),__vite__mapDeps([21,1,3]))}}),P.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return V(()=>import("./dist-B6TpBrd3.js").then(e=>e.yaml()),__vite__mapDeps([22,1,3]))}}),P.of({name:"APL",extensions:["dyalog","apl"],load(){return V(()=>import("./apl-MHzTCvfx.js").then(e=>K(e.apl)),[])}}),P.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return V(()=>import("./asciiarmor-DFLNSgns.js").then(e=>K(e.asciiArmor)),[])}}),P.of({name:"ASN.1",extensions:["asn","asn1"],load(){return V(()=>import("./asn1-CfPVWRYE.js").then(e=>K(e.asn1({}))),[])}}),P.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return V(()=>import("./asterisk-CJ4OeA7Y.js").then(e=>K(e.asterisk)),[])}}),P.of({name:"Brainfuck",extensions:["b","bf"],load(){return V(()=>import("./brainfuck-NEHkmXMc.js").then(e=>K(e.brainfuck)),[])}}),P.of({name:"Cobol",extensions:["cob","cpy"],load(){return V(()=>import("./cobol-Bo8Zw9gB.js").then(e=>K(e.cobol)),[])}}),P.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.csharp)),[])}}),P.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>K(e.clojure)),[])}}),P.of({name:"ClojureScript",extensions:["cljs"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>K(e.clojure)),[])}}),P.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return V(()=>import("./css-DEZwfVpY.js").then(e=>K(e.gss)),[])}}),P.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return V(()=>import("./cmake-koz-qBlo.js").then(e=>K(e.cmake)),[])}}),P.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return V(()=>import("./coffeescript-CXYzYf-Y.js").then(e=>K(e.coffeeScript)),[])}}),P.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return V(()=>import("./commonlisp-C4OOCwkD.js").then(e=>K(e.commonLisp)),[])}}),P.of({name:"Cypher",extensions:["cyp","cypher"],load(){return V(()=>import("./cypher-z2oFsVv2.js").then(e=>K(e.cypher)),[])}}),P.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return V(()=>import("./python-C2DOnsac.js").then(e=>K(e.cython)),[])}}),P.of({name:"Crystal",extensions:["cr"],load(){return V(()=>import("./crystal-BlJXQDvy.js").then(e=>K(e.crystal)),[])}}),P.of({name:"D",extensions:["d"],load(){return V(()=>import("./d-Dkt6y7AQ.js").then(e=>K(e.d)),[])}}),P.of({name:"Dart",extensions:["dart"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.dart)),[])}}),P.of({name:"diff",extensions:["diff","patch"],load(){return V(()=>import("./diff-C60bAYOU.js").then(e=>K(e.diff)),[])}}),P.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return V(()=>import("./dockerfile-BttNdtK0.js").then(e=>K(e.dockerFile)),__vite__mapDeps([23,24]))}}),P.of({name:"DTD",extensions:["dtd"],load(){return V(()=>import("./dtd-CCVZU5Da.js").then(e=>K(e.dtd)),[])}}),P.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return V(()=>import("./dylan-3pmV5wzs.js").then(e=>K(e.dylan)),[])}}),P.of({name:"EBNF",load(){return V(()=>import("./ebnf-bm-I2WIh.js").then(e=>K(e.ebnf)),[])}}),P.of({name:"ECL",extensions:["ecl"],load(){return V(()=>import("./ecl-BIv3PrZb.js").then(e=>K(e.ecl)),[])}}),P.of({name:"edn",extensions:["edn"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>K(e.clojure)),[])}}),P.of({name:"Eiffel",extensions:["e"],load(){return V(()=>import("./eiffel-DuLnr4-r.js").then(e=>K(e.eiffel)),[])}}),P.of({name:"Elm",extensions:["elm"],load(){return V(()=>import("./elm-njbaCU-L.js").then(e=>K(e.elm)),[])}}),P.of({name:"Erlang",extensions:["erl"],load(){return V(()=>import("./erlang-CuhOC2I8.js").then(e=>K(e.erlang)),[])}}),P.of({name:"Esper",load(){return V(()=>import("./sql-C3kWxFGw.js").then(e=>K(e.esper)),[])}}),P.of({name:"Factor",extensions:["factor"],load(){return V(()=>import("./factor-CM3-9V3b.js").then(e=>K(e.factor)),__vite__mapDeps([25,24]))}}),P.of({name:"FCL",load(){return V(()=>import("./fcl-nWsMJ92o.js").then(e=>K(e.fcl)),[])}}),P.of({name:"Forth",extensions:["forth","fth","4th"],load(){return V(()=>import("./forth-BQ9HrCVY.js").then(e=>K(e.forth)),[])}}),P.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return V(()=>import("./fortran-DHJe28ev.js").then(e=>K(e.fortran)),[])}}),P.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>K(e.fSharp)),[])}}),P.of({name:"Gas",extensions:["s"],load(){return V(()=>import("./gas-ByO0qYMr.js").then(e=>K(e.gas)),[])}}),P.of({name:"Gherkin",extensions:["feature"],load(){return V(()=>import("./gherkin-CwOmHL5K.js").then(e=>K(e.gherkin)),[])}}),P.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return V(()=>import("./groovy-ByXGF8cx.js").then(e=>K(e.groovy)),[])}}),P.of({name:"Haskell",extensions:["hs"],load(){return V(()=>import("./haskell-CHSpCNOy.js").then(e=>K(e.haskell)),[])}}),P.of({name:"Haxe",extensions:["hx"],load(){return V(()=>import("./haxe-P2jh68ck.js").then(e=>K(e.haxe)),[])}}),P.of({name:"HXML",extensions:["hxml"],load(){return V(()=>import("./haxe-P2jh68ck.js").then(e=>K(e.hxml)),[])}}),P.of({name:"HTTP",load(){return V(()=>import("./http-0jwMmfWP.js").then(e=>K(e.http)),[])}}),P.of({name:"IDL",extensions:["pro"],load(){return V(()=>import("./idl-DTVVj6r5.js").then(e=>K(e.idl)),[])}}),P.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return V(()=>import("./javascript-Cblpdx44.js").then(e=>K(e.jsonld)),[])}}),P.of({name:"Julia",extensions:["jl"],load(){return V(()=>import("./julia-KVJvUu_F.js").then(e=>K(e.julia)),[])}}),P.of({name:"Kotlin",extensions:["kt","kts"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.kotlin)),[])}}),P.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return V(()=>import("./livescript-DSHsJPcD.js").then(e=>K(e.liveScript)),[])}}),P.of({name:"Lua",extensions:["lua"],load(){return V(()=>import("./lua-Vher-70I.js").then(e=>K(e.lua)),[])}}),P.of({name:"mIRC",extensions:["mrc"],load(){return V(()=>import("./mirc-BGWbO906.js").then(e=>K(e.mirc)),[])}}),P.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return V(()=>import("./mathematica-CE9SaVsW.js").then(e=>K(e.mathematica)),[])}}),P.of({name:"Modelica",extensions:["mo"],load(){return V(()=>import("./modelica-5XCgKQt8.js").then(e=>K(e.modelica)),[])}}),P.of({name:"MUMPS",extensions:["mps"],load(){return V(()=>import("./mumps-C7oS353s.js").then(e=>K(e.mumps)),[])}}),P.of({name:"Mbox",extensions:["mbox"],load(){return V(()=>import("./mbox-JGl1Fgvq.js").then(e=>K(e.mbox)),[])}}),P.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return V(()=>import("./nginx-DXVlpyCz.js").then(e=>K(e.nginx)),[])}}),P.of({name:"NSIS",extensions:["nsh","nsi"],load(){return V(()=>import("./nsis-KFC6hioG.js").then(e=>K(e.nsis)),__vite__mapDeps([26,24]))}}),P.of({name:"NTriples",extensions:["nt","nq"],load(){return V(()=>import("./ntriples-5ckCopnn.js").then(e=>K(e.ntriples)),[])}}),P.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.objectiveC)),[])}}),P.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.objectiveCpp)),[])}}),P.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>K(e.oCaml)),[])}}),P.of({name:"Octave",extensions:["m"],load(){return V(()=>import("./octave-D1J2QQNt.js").then(e=>K(e.octave)),[])}}),P.of({name:"Oz",extensions:["oz"],load(){return V(()=>import("./oz-CPsllMDD.js").then(e=>K(e.oz)),[])}}),P.of({name:"Pascal",extensions:["p","pas"],load(){return V(()=>import("./pascal-B-I6JP0Y.js").then(e=>K(e.pascal)),[])}}),P.of({name:"Perl",extensions:["pl","pm"],load(){return V(()=>import("./perl-CI8WIWBi.js").then(e=>K(e.perl)),[])}}),P.of({name:"Pig",extensions:["pig"],load(){return V(()=>import("./pig-FQI0W3S3.js").then(e=>K(e.pig)),[])}}),P.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return V(()=>import("./powershell-BAu6x78A.js").then(e=>K(e.powerShell)),[])}}),P.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return V(()=>import("./properties-BKTTDgau.js").then(e=>K(e.properties)),[])}}),P.of({name:"ProtoBuf",extensions:["proto"],load(){return V(()=>import("./protobuf-UWh8gh_j.js").then(e=>K(e.protobuf)),[])}}),P.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return V(()=>import("./pug-C20tNwmy.js").then(e=>K(e.pug)),__vite__mapDeps([27,28]))}}),P.of({name:"Puppet",extensions:["pp"],load(){return V(()=>import("./puppet-BAHVzCkO.js").then(e=>K(e.puppet)),[])}}),P.of({name:"Q",extensions:["q"],load(){return V(()=>import("./q-Cooe-Nh8.js").then(e=>K(e.q)),[])}}),P.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return V(()=>import("./r-CktBKya9.js").then(e=>K(e.r)),[])}}),P.of({name:"RPM Changes",load(){return V(()=>import("./rpm-Csj9nLHl.js").then(e=>K(e.rpmChanges)),[])}}),P.of({name:"RPM Spec",extensions:["spec"],load(){return V(()=>import("./rpm-Csj9nLHl.js").then(e=>K(e.rpmSpec)),[])}}),P.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return V(()=>import("./ruby-bGx9eo-K.js").then(e=>K(e.ruby)),[])}}),P.of({name:"SAS",extensions:["sas"],load(){return V(()=>import("./sas-Drou_EQ9.js").then(e=>K(e.sas)),[])}}),P.of({name:"Scala",extensions:["scala"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.scala)),[])}}),P.of({name:"Scheme",extensions:["scm","ss"],load(){return V(()=>import("./scheme-DcjG9bAf.js").then(e=>K(e.scheme)),[])}}),P.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return V(()=>import("./shell-BSKClwid.js").then(e=>K(e.shell)),[])}}),P.of({name:"Sieve",extensions:["siv","sieve"],load(){return V(()=>import("./sieve-CcvsXPZo.js").then(e=>K(e.sieve)),[])}}),P.of({name:"Smalltalk",extensions:["st"],load(){return V(()=>import("./smalltalk-Cmg-4mjQ.js").then(e=>K(e.smalltalk)),[])}}),P.of({name:"Solr",load(){return V(()=>import("./solr-Dj8ahEwG.js").then(e=>K(e.solr)),[])}}),P.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>K(e.sml)),[])}}),P.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return V(()=>import("./sparql-LAJYmgfk.js").then(e=>K(e.sparql)),[])}}),P.of({name:"Spreadsheet",alias:["excel","formula"],load(){return V(()=>import("./spreadsheet-B8doD_pL.js").then(e=>K(e.spreadsheet)),[])}}),P.of({name:"Squirrel",extensions:["nut"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>K(e.squirrel)),[])}}),P.of({name:"Stylus",extensions:["styl"],load(){return V(()=>import("./stylus-BS-Ienrc.js").then(e=>K(e.stylus)),[])}}),P.of({name:"Swift",extensions:["swift"],load(){return V(()=>import("./swift-BD82LMDK.js").then(e=>K(e.swift)),[])}}),P.of({name:"sTeX",load(){return V(()=>import("./stex-CW6K5Nmu.js").then(e=>K(e.stex)),[])}}),P.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return V(()=>import("./stex-CW6K5Nmu.js").then(e=>K(e.stex)),[])}}),P.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return V(()=>import("./verilog-BVYlmXGg.js").then(e=>K(e.verilog)),[])}}),P.of({name:"Tcl",extensions:["tcl"],load(){return V(()=>import("./tcl-RZa1cqc-.js").then(e=>K(e.tcl)),[])}}),P.of({name:"Textile",extensions:["textile"],load(){return V(()=>import("./textile-C-BY_OGF.js").then(e=>K(e.textile)),[])}}),P.of({name:"TiddlyWiki",load(){return V(()=>import("./tiddlywiki-C9bm_Oju.js").then(e=>K(e.tiddlyWiki)),[])}}),P.of({name:"Tiki wiki",load(){return V(()=>import("./tiki-DJOT-rFT.js").then(e=>K(e.tiki)),[])}}),P.of({name:"TOML",extensions:["toml"],load(){return V(()=>import("./toml-Civ2fTsu.js").then(e=>K(e.toml)),[])}}),P.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return V(()=>import("./troff-Lns35Xcq.js").then(e=>K(e.troff)),[])}}),P.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return V(()=>import("./ttcn-7vlxVTUK.js").then(e=>K(e.ttcn)),[])}}),P.of({name:"TTCN_CFG",extensions:["cfg"],load(){return V(()=>import("./ttcn-cfg-B8qhhp6o.js").then(e=>K(e.ttcnCfg)),[])}}),P.of({name:"Turtle",extensions:["ttl"],load(){return V(()=>import("./turtle-DTIS1YQ7.js").then(e=>K(e.turtle)),[])}}),P.of({name:"Web IDL",extensions:["webidl"],load(){return V(()=>import("./webidl-ChvzbZ5-.js").then(e=>K(e.webIDL)),[])}}),P.of({name:"VB.NET",extensions:["vb"],load(){return V(()=>import("./vb-BO8UacKu.js").then(e=>K(e.vb)),[])}}),P.of({name:"VBScript",extensions:["vbs"],load(){return V(()=>import("./vbscript-DWLru3lT.js").then(e=>K(e.vbScript)),[])}}),P.of({name:"Velocity",extensions:["vtl"],load(){return V(()=>import("./velocity-BIIn-Nl2.js").then(e=>K(e.velocity)),[])}}),P.of({name:"Verilog",extensions:["v"],load(){return V(()=>import("./verilog-BVYlmXGg.js").then(e=>K(e.verilog)),[])}}),P.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return V(()=>import("./vhdl-Cn8cC8Yb.js").then(e=>K(e.vhdl)),[])}}),P.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return V(()=>import("./xquery-BKN7qEbU.js").then(e=>K(e.xQuery)),[])}}),P.of({name:"Yacas",extensions:["ys"],load(){return V(()=>import("./yacas-BG9ha7tU.js").then(e=>K(e.yacas)),[])}}),P.of({name:"Z80",extensions:["z80"],load(){return V(()=>import("./z80-CB2cGLew.js").then(e=>K(e.z80)),[])}}),P.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>K(e.mscgen)),[])}}),P.of({name:"Xù",extensions:["xu"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>K(e.xu)),[])}}),P.of({name:"MsGenny",extensions:["msgenny"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>K(e.msgenny)),[])}}),P.of({name:"Vue",extensions:["vue"],load(){return V(()=>import("./dist-BPuuaNc6.js").then(e=>e.vue()),__vite__mapDeps([29,1,3,9,6,2,8,5]))}}),P.of({name:"Angular Template",load(){return V(()=>import("./dist-BY93_d3Z.js").then(e=>e.angular()),__vite__mapDeps([30,1,3,9,6,2,8,5]))}})],py=Zu.define(),HP=Io.define(),oa=class sl{static{s(this,"HistEvent$1")}constructor(t,n,r,i,o){this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(t){return new sl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new sl(t.changes&&Vx.fromJSON(t.changes),[],t.mapped&&$x.fromJSON(t.mapped),t.startSelection&&Se.fromJSON(t.startSelection),t.selectionsAfter.map(Se.fromJSON))}static fromTransaction(t,n){let r=Wn;for(let i of t.startState.facet(HP)){let o=i(t);o.length&&(r=r.concat(o))}return!r.length&&t.changes.empty?null:new sl(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Wn)}static selection(t){return new sl(void 0,Wn,void 0,void 0,t)}};function Eg(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}s(Eg,"updateBranch$1");function KP(e,t){let n=[],r=!1;return e.iterChangedRanges((i,o)=>n.push(i,o)),t.iterChangedRanges((i,o,l,a)=>{for(let c=0;c<n.length;){let u=n[c++],d=n[c++];a>=u&&l<=d&&(r=!0)}}),r}s(KP,"isAdjacent$1");function UP(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}s(UP,"eqSelectionShape$1");function ew(e,t){return e.length?t.length?e.concat(t):e:t}s(ew,"conc$1");var Wn=[],WP=200;function zP(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-WP));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Eg(e,e.length-1,1e9,n.setSelAfter(r)))}else return[oa.selection([t])]}s(zP,"addSelection$1");function jP(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}s(jP,"popSelection$1");function Mf(e,t){if(!e.length)return e;let n=e.length,r=Wn;for(;n;){let i=JP(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=e.slice(0,n);return o[n-1]=i,o}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[oa.selection(r)]:Wn}s(Mf,"addMappingToBranch$1");function JP(e,t,n){let r=ew(e.selectionsAfter.length?e.selectionsAfter.map(a=>a.map(t)):Wn,n);if(!e.changes)return oa.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new oa(i,nn.mapEffects(e.effects,t),l,e.startSelection.map(o),r)}s(JP,"mapEvent$1");var GP=/^(input\.type|delete)($|\.)/,my=class ll{static{s(this,"HistoryState$1")}constructor(t,n,r=0,i=void 0){this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ll(this.done,this.undone):this}addChanges(t,n,r,i,o){let l=this.done,a=l[l.length-1];return a&&a.changes&&!a.changes.empty&&t.changes&&(!r||GP.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,KP(a.changes,t.changes))||r=="input.type.compose")?l=Eg(l,l.length-1,i.minDepth,new oa(t.changes.compose(a.changes),ew(nn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Wn)):l=Eg(l,l.length,i.minDepth,t),new ll(l,Wn,n,r)}addSelection(t,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Wn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&UP(o[o.length-1],t)?this:new ll(zP(this.done,t),this.undone,n,r)}addMapping(t){return new ll(Mf(this.done,t),Mf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,r){let i=t==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],l=o.selectionsAfter[0]||(o.startSelection?o.startSelection.map(o.changes.invertedDesc,1):n.selection);if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:py.of({side:t,rest:jP(i),selection:l}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Wn:i.slice(0,i.length-1);return o.mapped&&(a=Mf(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:py.of({side:t,rest:a,selection:l}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}};my.empty=new my(Wn,Wn);var Dz=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function tw(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let l=r.from;l<=r.to;){let a=e.doc.lineAt(l);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),l=a.to+1}let o=e.changes(i);return{changes:i,range:Se.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}s(tw,"changeBySelectedLine$1");var qP=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(tw(e,(n,r)=>{r.push({from:n.from,insert:e.facet(Nx)})}),{userEvent:"input.indent"})),!0),"indentMore$1"),ZP=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(tw(e,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=qu(i,e.tabSize),l=0,a=Il(e,Math.max(0,o-Vc(e)));for(;l<i.length&&l<a.length&&i.charCodeAt(l)==a.charCodeAt(l);)l++;r.push({from:n.from+l,to:n.from+i.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0),"indentLess$1"),YP={key:"Tab",run:qP,shift:ZP},_y="#2e3440",I1="#3b4252",vy="#434c5e",oc="#4c566a",yy="#e5e9f0",Sg="#eceff4",Af="#8fbcbb",xy="#88c0d0",XP="#81a1c1",or="#5e81ac",QP="#bf616a",jo="#d08770",If="#ebcb8b",Cy="#a3be8c",eF="#b48ead",by="#d30102",N1=Sg,Nf=N1,tF="#ffffff",Of=I1,nF=N1,Ey=I1,rF=ct.theme({"&":{color:_y,backgroundColor:tF},".cm-content":{caretColor:Ey},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ey},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:nF},".cm-panels":{backgroundColor:N1,color:oc},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${oc}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:yy},".cm-activeLine":{backgroundColor:Nf},".cm-selectionMatch":{backgroundColor:yy},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${oc}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Sg},".cm-gutters":{backgroundColor:Sg,color:_y,border:"none"},".cm-activeLineGutter":{backgroundColor:Nf},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Of},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Of,borderBottomColor:Of},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Nf,color:oc}}},{dark:!1}),iF=T9.define([{tag:_e.keyword,color:or},{tag:[_e.name,_e.deleted,_e.character,_e.propertyName,_e.macroName],color:jo},{tag:[_e.variableName],color:jo},{tag:[_e.function(_e.variableName)],color:or},{tag:[_e.labelName],color:XP},{tag:[_e.color,_e.constant(_e.name),_e.standard(_e.name)],color:or},{tag:[_e.definition(_e.name),_e.separator],color:Cy},{tag:[_e.brace],color:Af},{tag:[_e.annotation],color:by},{tag:[_e.number,_e.changed,_e.annotation,_e.modifier,_e.self,_e.namespace],color:xy},{tag:[_e.typeName,_e.className],color:If},{tag:[_e.operator,_e.operatorKeyword],color:Cy},{tag:[_e.tagName],color:eF},{tag:[_e.squareBracket],color:QP},{tag:[_e.angleBracket],color:jo},{tag:[_e.attributeName],color:If},{tag:[_e.regexp],color:or},{tag:[_e.quote],color:I1},{tag:[_e.string],color:jo},{tag:_e.link,color:Af,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[_e.url,_e.escape,_e.special(_e.string)],color:jo},{tag:[_e.meta],color:xy},{tag:[_e.comment],color:vy,fontStyle:"italic"},{tag:_e.strong,fontWeight:"bold",color:or},{tag:_e.emphasis,fontStyle:"italic",color:or},{tag:_e.strikethrough,textDecoration:"line-through"},{tag:_e.heading,fontWeight:"bold",color:or},{tag:_e.special(_e.heading1),fontWeight:"bold",color:or},{tag:_e.heading1,fontWeight:"bold",color:or},{tag:[_e.heading2,_e.heading3,_e.heading4],fontWeight:"bold",color:or},{tag:[_e.heading5,_e.heading6],color:or},{tag:[_e.atom,_e.bool,_e.special(_e.variableName)],color:jo},{tag:[_e.processingInstruction,_e.inserted],color:Af},{tag:[_e.contentSeparator],color:If},{tag:_e.invalid,color:vy,borderBottom:`1px dotted ${by}`}]),oF=[rF,Ix(iF)],sF=s(e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=D1(e.state,n.from);return r.line?lF(e):r.block?cF(e):!1},"toggleComment");function O1(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}s(O1,"command");var lF=O1(fF,0),aF=O1(nw,0),cF=O1((e,t)=>nw(e,t,dF(t)),0);function D1(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}s(D1,"getConfig");var sc=50;function uF(e,{open:t,close:n},r,i){let o=e.sliceDoc(r-sc,r),l=e.sliceDoc(i,i+sc),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(l)[0].length,u=o.length-a;if(o.slice(u-t.length,u)==t&&l.slice(c,c+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+c,margin:c&&1}};let d,f;i-r<=100?d=f=e.sliceDoc(r,i):(d=e.sliceDoc(r,r+sc),f=e.sliceDoc(i-sc,i));let h=/^\s*/.exec(d)[0].length,g=/\s*$/.exec(f)[0].length,p=f.length-g-n.length;return d.slice(h,h+t.length)==t&&f.slice(p,p+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(d.charAt(h+t.length))?1:0},close:{pos:i-g-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}s(uF,"findBlockComment");function dF(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}s(dF,"selectedLineRanges");function nw(e,t,n=t.selection.ranges){let r=n.map(o=>D1(t,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,l)=>uF(t,r[l],o.from,o.to));if(e!=2&&!i.every(o=>o))return{changes:t.changes(n.map((o,l)=>i[l]?[]:[{from:o.from,insert:r[l].open+" "},{from:o.to,insert:" "+r[l].close}]))};if(e!=1&&i.some(o=>o)){let o=[];for(let l=0,a;l<i.length;l++)if(a=i[l]){let c=r[l],{open:u,close:d}=a;o.push({from:u.pos-c.open.length,to:u.pos+u.margin},{from:d.pos-d.margin,to:d.pos+c.close.length})}return{changes:o}}return null}s(nw,"changeBlockComment");function fF(e,t,n=t.selection.ranges){let r=[],i=-1;e:for(let{from:o,to:l}of n){let a=r.length,c=1e9,u;for(let d=o;d<=l;){let f=t.doc.lineAt(d);if(u==null&&(u=D1(t,f.from).line,!u))continue e;if(f.from>i&&(o==l||l>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,g=h==f.length,p=f.text.slice(h,h+u.length)==u?h:-1;h<f.text.length&&h<c&&(c=h),r.push({line:f,comment:p,token:u,indent:h,empty:g,single:!1})}d=f.to+1}if(c<1e9)for(let d=a;d<r.length;d++)r[d].indent<r[d].line.text.length&&(r[d].indent=c);r.length==a+1&&(r[a].single=!0)}if(e!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:u,empty:d,single:f}of r)(f||!d)&&o.push({from:a.from+u,insert:c+" "});let l=t.changes(o);return{changes:l,selection:t.selection.map(l,1)}}else if(e!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:l,comment:a,token:c}of r)if(a>=0){let u=l.from+a,d=u+c.length;l.text[d-l.from]==" "&&d++,o.push({from:u,to:d})}return{changes:o}}return null}s(fF,"changeLineComment");var Tg=Zu.define(),hF=Zu.define(),gF=Io.define(),rw=Io.define({combine(e){return fa(e,{minDepth:100,newGroupDelay:500,joinToEvent:s((t,n)=>n,"joinToEvent")},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:s((t,n)=>(r,i)=>t(r,i)||n(r,i),"joinToEvent")})}}),iw=ha.define({create(){return kl.empty},update(e,t){let n=t.state.facet(rw),r=t.annotation(Tg);if(r){let c=Xr.fromTransaction(t,r.selection),u=r.side,d=u==0?e.undone:e.done;return c?d=Bu(d,d.length,n.minDepth,c):d=lw(d,t.startState.selection),new kl(u==0?r.rest:d,u==0?d:r.rest)}let i=t.annotation(hF);if((i=="full"||i=="before")&&(e=e.isolate()),t.annotation(jd.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let o=Xr.fromTransaction(t),l=t.annotation(jd.time),a=t.annotation(jd.userEvent);return o?e=e.addChanges(o,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),(i=="full"||i=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new kl(e.done.map(Xr.fromJSON),e.undone.map(Xr.fromJSON))}});function pF(e={}){return[iw,rw.of(e),ct.domEventHandlers({beforeinput(t,n){let r=t.inputType=="historyUndo"?ow:t.inputType=="historyRedo"?wg:null;return r?(t.preventDefault(),r(n)):!1}})]}s(pF,"history");function Vd(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(iw,!1);if(!i)return!1;let o=i.pop(e,n,t);return o?(r(o),!0):!1}}s(Vd,"cmd");var ow=Vd(0,!1),wg=Vd(1,!1),mF=Vd(0,!0),_F=Vd(1,!0),Xr=class al{static{s(this,"HistEvent")}constructor(t,n,r,i,o){this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(t){return new al(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new al(t.changes&&Vx.fromJSON(t.changes),[],t.mapped&&$x.fromJSON(t.mapped),t.startSelection&&Se.fromJSON(t.startSelection),t.selectionsAfter.map(Se.fromJSON))}static fromTransaction(t,n){let r=zn;for(let i of t.startState.facet(gF)){let o=i(t);o.length&&(r=r.concat(o))}return!r.length&&t.changes.empty?null:new al(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,zn)}static selection(t){return new al(void 0,zn,void 0,void 0,t)}};function Bu(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}s(Bu,"updateBranch");function vF(e,t){let n=[],r=!1;return e.iterChangedRanges((i,o)=>n.push(i,o)),t.iterChangedRanges((i,o,l,a)=>{for(let c=0;c<n.length;){let u=n[c++],d=n[c++];a>=u&&l<=d&&(r=!0)}}),r}s(vF,"isAdjacent");function yF(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}s(yF,"eqSelectionShape");function sw(e,t){return e.length?t.length?e.concat(t):e:t}s(sw,"conc");var zn=[],xF=200;function lw(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-xF));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Bu(e,e.length-1,1e9,n.setSelAfter(r)))}else return[Xr.selection([t])]}s(lw,"addSelection");function CF(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}s(CF,"popSelection");function Df(e,t){if(!e.length)return e;let n=e.length,r=zn;for(;n;){let i=bF(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=e.slice(0,n);return o[n-1]=i,o}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Xr.selection(r)]:zn}s(Df,"addMappingToBranch");function bF(e,t,n){let r=sw(e.selectionsAfter.length?e.selectionsAfter.map(a=>a.map(t)):zn,n);if(!e.changes)return Xr.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new Xr(i,nn.mapEffects(e.effects,t),l,e.startSelection.map(o),r)}s(bF,"mapEvent");var EF=/^(input\.type|delete)($|\.)/,kl=class cl{static{s(this,"HistoryState")}constructor(t,n,r=0,i=void 0){this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new cl(this.done,this.undone):this}addChanges(t,n,r,i,o){let l=this.done,a=l[l.length-1];return a&&a.changes&&!a.changes.empty&&t.changes&&(!r||EF.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,vF(a.changes,t.changes))||r=="input.type.compose")?l=Bu(l,l.length-1,i.minDepth,new Xr(t.changes.compose(a.changes),sw(nn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,zn)):l=Bu(l,l.length,i.minDepth,t),new cl(l,zn,n,r)}addSelection(t,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:zn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&yF(o[o.length-1],t)?this:new cl(lw(this.done,t),this.undone,n,r)}addMapping(t){return new cl(Df(this.done,t),Df(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,r){let i=t==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],l=o.selectionsAfter[0]||(o.startSelection?o.startSelection.map(o.changes.invertedDesc,1):n.selection);if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Tg.of({side:t,rest:CF(i),selection:l}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?zn:i.slice(0,i.length-1);return o.mapped&&(a=Df(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Tg.of({side:t,rest:a,selection:l}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}};kl.empty=new kl(zn,zn);var SF=[{key:"Mod-z",run:ow,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:wg,preventDefault:!0},{linux:"Ctrl-Shift-z",run:wg,preventDefault:!0},{key:"Mod-u",run:mF,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:_F,preventDefault:!0}];function Hs(e,t){return Se.create(e.ranges.map(t),e.mainIndex)}s(Hs,"updateSel");function Er(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}s(Er,"setSel");function Sr({state:e,dispatch:t},n){let r=Hs(e.selection,n);return r.eq(e.selection,!0)?!1:(t(Er(e,r)),!0)}s(Sr,"moveSel");function Bd(e,t){return Se.cursor(t?e.to:e.from)}s(Bd,"rangeEnd");function aw(e,t){return Sr(e,n=>n.empty?e.moveByChar(n,t):Bd(n,t))}s(aw,"cursorByChar");function on(e){return e.textDirectionAt(e.state.selection.main.head)==Ox.LTR}s(on,"ltrAtCursor");var cw=s(e=>aw(e,!on(e)),"cursorCharLeft"),uw=s(e=>aw(e,on(e)),"cursorCharRight");function dw(e,t){return Sr(e,n=>n.empty?e.moveByGroup(n,t):Bd(n,t))}s(dw,"cursorByGroup");var TF=s(e=>dw(e,!on(e)),"cursorGroupLeft"),wF=s(e=>dw(e,on(e)),"cursorGroupRight"),Rz=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function kF(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}s(kF,"interestingNode");function Hd(e,t,n){let r=ws(e).resolveInner(t.head),i=n?jf.closedBy:jf.openedBy;for(let c=t.head;;){let u=n?r.childAfter(c):r.childBefore(c);if(!u)break;kF(e,u,i)?r=u:c=n?u.to:u.from}let o=r.type.prop(i),l,a;return o&&(l=n?Zo(e,r.from,1):Zo(e,r.to,-1))&&l.matched?a=n?l.end.to:l.end.from:a=n?r.to:r.from,Se.cursor(a,n?-1:1)}s(Hd,"moveBySyntax");var MF=s(e=>Sr(e,t=>Hd(e.state,t,!on(e))),"cursorSyntaxLeft"),AF=s(e=>Sr(e,t=>Hd(e.state,t,on(e))),"cursorSyntaxRight");function fw(e,t){return Sr(e,n=>{if(!n.empty)return Bd(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}s(fw,"cursorByLine");var hw=s(e=>fw(e,!1),"cursorLineUp"),gw=s(e=>fw(e,!0),"cursorLineDown");function pw(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let o of e.state.facet(ct.scrollMargins)){let l=o(e);l?.top&&(n=Math.max(l?.top,n)),l?.bottom&&(r=Math.max(l?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}s(pw,"pageInfo");function mw(e,t){let n=pw(e),{state:r}=e,i=Hs(r.selection,l=>l.empty?e.moveVertically(l,t,n.height):Bd(l,t));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let l=e.coordsAtPos(r.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),c=a.top+n.marginTop,u=a.bottom-n.marginBottom;l&&l.top>c&&l.bottom<u&&(o=ct.scrollIntoView(i.main.head,{y:"start",yMargin:l.top-c}))}return e.dispatch(Er(r,i),{effects:o}),!0}s(mw,"cursorByPage");var Sy=s(e=>mw(e,!1),"cursorPageUp"),kg=s(e=>mw(e,!0),"cursorPageDown");function Zi(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&t.head!=r.from+o&&(i=Se.cursor(r.from+o))}return i}s(Zi,"moveByLineBoundary");var IF=s(e=>Sr(e,t=>Zi(e,t,!0)),"cursorLineBoundaryForward"),NF=s(e=>Sr(e,t=>Zi(e,t,!1)),"cursorLineBoundaryBackward"),OF=s(e=>Sr(e,t=>Zi(e,t,!on(e))),"cursorLineBoundaryLeft"),DF=s(e=>Sr(e,t=>Zi(e,t,on(e))),"cursorLineBoundaryRight"),RF=s(e=>Sr(e,t=>Se.cursor(e.lineBlockAt(t.head).from,1)),"cursorLineStart"),LF=s(e=>Sr(e,t=>Se.cursor(e.lineBlockAt(t.head).to,-1)),"cursorLineEnd");function $F(e,t,n){let r=!1,i=Hs(e.selection,o=>{let l=Zo(e,o.head,-1)||Zo(e,o.head,1)||o.head>0&&Zo(e,o.head-1,1)||o.head<e.doc.length&&Zo(e,o.head+1,-1);if(!l||!l.end)return o;r=!0;let a=l.start.from==o.head?l.end.to:l.end.from;return n?Se.range(o.anchor,a):Se.cursor(a)});return r?(t(Er(e,i)),!0):!1}s($F,"toMatchingBracket");var PF=s(({state:e,dispatch:t})=>$F(e,t,!1),"cursorMatchingBracket");function nr(e,t){let n=Hs(e.state.selection,r=>{let i=t(r);return Se.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(e.state.selection)?!1:(e.dispatch(Er(e.state,n)),!0)}s(nr,"extendSel");function _w(e,t){return nr(e,n=>e.moveByChar(n,t))}s(_w,"selectByChar");var vw=s(e=>_w(e,!on(e)),"selectCharLeft"),yw=s(e=>_w(e,on(e)),"selectCharRight");function xw(e,t){return nr(e,n=>e.moveByGroup(n,t))}s(xw,"selectByGroup");var FF=s(e=>xw(e,!on(e)),"selectGroupLeft"),VF=s(e=>xw(e,on(e)),"selectGroupRight"),BF=s(e=>nr(e,t=>Hd(e.state,t,!on(e))),"selectSyntaxLeft"),HF=s(e=>nr(e,t=>Hd(e.state,t,on(e))),"selectSyntaxRight");function Cw(e,t){return nr(e,n=>e.moveVertically(n,t))}s(Cw,"selectByLine");var bw=s(e=>Cw(e,!1),"selectLineUp"),Ew=s(e=>Cw(e,!0),"selectLineDown");function Sw(e,t){return nr(e,n=>e.moveVertically(n,t,pw(e).height))}s(Sw,"selectByPage");var Ty=s(e=>Sw(e,!1),"selectPageUp"),wy=s(e=>Sw(e,!0),"selectPageDown"),KF=s(e=>nr(e,t=>Zi(e,t,!0)),"selectLineBoundaryForward"),UF=s(e=>nr(e,t=>Zi(e,t,!1)),"selectLineBoundaryBackward"),WF=s(e=>nr(e,t=>Zi(e,t,!on(e))),"selectLineBoundaryLeft"),zF=s(e=>nr(e,t=>Zi(e,t,on(e))),"selectLineBoundaryRight"),jF=s(e=>nr(e,t=>Se.cursor(e.lineBlockAt(t.head).from)),"selectLineStart"),JF=s(e=>nr(e,t=>Se.cursor(e.lineBlockAt(t.head).to)),"selectLineEnd"),ky=s(({state:e,dispatch:t})=>(t(Er(e,{anchor:0})),!0),"cursorDocStart"),My=s(({state:e,dispatch:t})=>(t(Er(e,{anchor:e.doc.length})),!0),"cursorDocEnd"),Ay=s(({state:e,dispatch:t})=>(t(Er(e,{anchor:e.selection.main.anchor,head:0})),!0),"selectDocStart"),Iy=s(({state:e,dispatch:t})=>(t(Er(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),"selectDocEnd"),GF=s(({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),"selectAll"),qF=s(({state:e,dispatch:t})=>{let n=Kd(e).map(({from:r,to:i})=>Se.range(r,Math.min(i+1,e.doc.length)));return t(e.update({selection:Se.create(n),userEvent:"select"})),!0},"selectLine"),ZF=s(({state:e,dispatch:t})=>{let n=Hs(e.selection,r=>{let i=ws(e),o=i.resolveStack(r.from,1);if(r.empty){let l=i.resolveStack(r.from,-1);l.node.from>=o.node.from&&l.node.to<=o.node.to&&(o=l)}for(let l=o;l;l=l.next){let{node:a}=l;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&l.next)return Se.range(a.to,a.from)}return r});return n.eq(e.selection)?!1:(t(Er(e,n)),!0)},"selectParentSyntax");function Tw(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let o of n.selection.ranges){let l=n.doc.lineAt(o.head);if(t?l.to<e.state.doc.length:l.from>0)for(let a=o;;){let c=e.moveVertically(a,t);if(c.head<l.from||c.head>l.to){i.some(u=>u.head==c.head)||i.push(c);break}else{if(c.head==a.head)break;a=c}}}return i.length==r.ranges.length?!1:(e.dispatch(Er(n,Se.create(i,i.length-1))),!0)}s(Tw,"addCursorVertically");var YF=s(e=>Tw(e,!1),"addCursorAbove"),XF=s(e=>Tw(e,!0),"addCursorBelow"),QF=s(({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=Se.create([n.main]):n.main.empty||(r=Se.create([Se.cursor(n.main.head)])),r?(t(Er(e,r)),!0):!1},"simplifySelection");function Ba(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(o=>{let{from:l,to:a}=o;if(l==a){let c=t(o);c<l?(n="delete.backward",c=lc(e,c,!1)):c>l&&(n="delete.forward",c=lc(e,c,!0)),l=Math.min(l,c),a=Math.max(a,c)}else l=lc(e,l,!1),a=lc(e,a,!0);return l==a?{range:o}:{changes:{from:l,to:a},range:Se.cursor(l,l<o.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ct.announce.of(r.phrase("Selection deleted")):void 0})),!0)}s(Ba,"deleteBy");function lc(e,t,n){if(e instanceof ct)for(let r of e.state.facet(ct.atomicRanges).map(i=>i(e)))r.between(t,t,(i,o)=>{i<t&&o>t&&(t=n?o:i)});return t}s(lc,"skipAtomic");var ww=s((e,t,n)=>Ba(e,r=>{let i=r.from,{state:o}=e,l=o.doc.lineAt(i),a,c;if(n&&!t&&i>l.from&&i<l.from+200&&!/[^ \t]/.test(a=l.text.slice(0,i-l.from))){if(a[a.length-1]==" ")return i-1;let u=qu(a,o.tabSize)%Vc(o)||Vc(o);for(let d=0;d<u&&a[a.length-1-d]==" ";d++)i--;c=i}else c=vo(l.text,i-l.from,t,t)+l.from,c==i&&l.number!=(t?o.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(c-l.from,i-l.from))&&(c=vo(l.text,c-l.from,!1,!1)+l.from);return c}),"deleteByChar"),Mg=s(e=>ww(e,!1,!0),"deleteCharBackward"),kw=s(e=>ww(e,!0,!1),"deleteCharForward"),Mw=s((e,t)=>Ba(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),l=i.charCategorizer(r);for(let a=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let c=vo(o.text,r-o.from,t)+o.from,u=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),d=l(u);if(a!=null&&d!=a)break;(u!=" "||r!=n.head)&&(a=d),r=c}return r}),"deleteByGroup"),Aw=s(e=>Mw(e,!1),"deleteGroupBackward"),eV=s(e=>Mw(e,!0),"deleteGroupForward"),tV=s(e=>Ba(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),"deleteToLineEnd"),nV=s(e=>Ba(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),"deleteLineBoundaryBackward"),rV=s(e=>Ba(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),"deleteLineBoundaryForward"),iV=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Hx.of(["",""])},range:Se.cursor(r.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},"splitLine"),oV=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>{if(!r.empty||r.from==0||r.from==e.doc.length)return{range:r};let i=r.from,o=e.doc.lineAt(i),l=i==o.from?i-1:vo(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:vo(o.text,i-o.from,!0)+o.from;return{changes:{from:l,to:a,insert:e.doc.slice(i,a).append(e.doc.slice(l,i))},range:Se.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)},"transposeChars");function Kd(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=e.doc.lineAt(r.to-1)),n>=i.number){let l=t[t.length-1];l.to=o.to,l.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}s(Kd,"selectedLineBlocks");function Iw(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let o of Kd(e)){if(n?o.to==e.doc.length:o.from==0)continue;let l=e.doc.lineAt(n?o.to+1:o.from-1),a=l.length+1;if(n){r.push({from:o.to,to:l.to},{from:o.from,insert:l.text+e.lineBreak});for(let c of o.ranges)i.push(Se.range(Math.min(e.doc.length,c.anchor+a),Math.min(e.doc.length,c.head+a)))}else{r.push({from:l.from,to:o.from},{from:o.to,insert:e.lineBreak+l.text});for(let c of o.ranges)i.push(Se.range(c.anchor-a,c.head-a))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:Se.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}s(Iw,"moveLine");var sV=s(({state:e,dispatch:t})=>Iw(e,t,!1),"moveLineUp"),lV=s(({state:e,dispatch:t})=>Iw(e,t,!0),"moveLineDown");function Nw(e,t,n){if(e.readOnly)return!1;let r=[];for(let o of Kd(e))n?r.push({from:o.from,insert:e.doc.slice(o.from,o.to)+e.lineBreak}):r.push({from:o.to,insert:e.lineBreak+e.doc.slice(o.from,o.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}s(Nw,"copyLine");var aV=s(({state:e,dispatch:t})=>Nw(e,t,!1),"copyLineUp"),cV=s(({state:e,dispatch:t})=>Nw(e,t,!0),"copyLineDown"),uV=s(e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Kd(t).map(({from:i,to:o})=>(i>0?i--:o<t.doc.length&&o++,{from:i,to:o}))),r=Hs(t.selection,i=>{let o;if(e.lineWrapping){let l=e.lineBlockAt(i.head),a=e.coordsAtPos(i.head,i.assoc||1);a&&(o=l.bottom+e.documentTop-a.bottom+e.defaultLineHeight/2)}return e.moveVertically(i,!0,o)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0},"deleteLine");function dV(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=ws(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),o;return r&&i&&r.to<=t&&i.from>=t&&(o=r.type.prop(jf.closedBy))&&o.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}s(dV,"isBetweenBrackets");var Ny=Ow(!1),fV=Ow(!0);function Ow(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(i=>{let{from:o,to:l}=i,a=t.doc.lineAt(o),c=!e&&o==l&&dV(t,o);e&&(o=l=(l<=a.to?a:t.doc.lineAt(l)).to);let u=new Fx(t,{simulateBreak:o,simulateDoubleBreak:!!c}),d=Dx(u,o);for(d==null&&(d=qu(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;c?{from:o,to:l}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",Il(t,d)];return c&&f.push(Il(t,u.lineIndent(a.from,-1))),{changes:{from:o,to:l,insert:Hx.of(f)},range:Se.cursor(o+1+f[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}s(Ow,"newlineAndIndent");function R1(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let l=r.from;l<=r.to;){let a=e.doc.lineAt(l);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),l=a.to+1}let o=e.changes(i);return{changes:i,range:Se.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}s(R1,"changeBySelectedLine");var hV=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Fx(e,{overrideIndentation:s(o=>{let l=n[o];return l??-1},"overrideIndentation")}),i=R1(e,(o,l,a)=>{let c=Dx(r,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let u=/^\s*/.exec(o.text)[0],d=Il(e,c);(u!=d||a.from<o.from+u.length)&&(n[o.from]=c,l.push({from:o.from,to:o.from+u.length,insert:d}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0},"indentSelection"),gV=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(R1(e,(n,r)=>{r.push({from:n.from,insert:e.facet(Nx)})}),{userEvent:"input.indent"})),!0),"indentMore"),pV=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(R1(e,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=qu(i,e.tabSize),l=0,a=Il(e,Math.max(0,o-Vc(e)));for(;l<i.length&&l<a.length&&i.charCodeAt(l)==a.charCodeAt(l);)l++;r.push({from:n.from+l,to:n.from+i.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0),"indentLess"),mV=s(e=>(e.setTabFocusMode(),!0),"toggleTabFocusMode"),_V=[{key:"Ctrl-b",run:cw,shift:vw,preventDefault:!0},{key:"Ctrl-f",run:uw,shift:yw},{key:"Ctrl-p",run:hw,shift:bw},{key:"Ctrl-n",run:gw,shift:Ew},{key:"Ctrl-a",run:RF,shift:jF},{key:"Ctrl-e",run:LF,shift:JF},{key:"Ctrl-d",run:kw},{key:"Ctrl-h",run:Mg},{key:"Ctrl-k",run:tV},{key:"Ctrl-Alt-h",run:Aw},{key:"Ctrl-o",run:iV},{key:"Ctrl-t",run:oV},{key:"Ctrl-v",run:kg}],vV=[{key:"ArrowLeft",run:cw,shift:vw,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:TF,shift:FF,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:OF,shift:WF,preventDefault:!0},{key:"ArrowRight",run:uw,shift:yw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:wF,shift:VF,preventDefault:!0},{mac:"Cmd-ArrowRight",run:DF,shift:zF,preventDefault:!0},{key:"ArrowUp",run:hw,shift:bw,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ky,shift:Ay},{mac:"Ctrl-ArrowUp",run:Sy,shift:Ty},{key:"ArrowDown",run:gw,shift:Ew,preventDefault:!0},{mac:"Cmd-ArrowDown",run:My,shift:Iy},{mac:"Ctrl-ArrowDown",run:kg,shift:wy},{key:"PageUp",run:Sy,shift:Ty},{key:"PageDown",run:kg,shift:wy},{key:"Home",run:NF,shift:UF,preventDefault:!0},{key:"Mod-Home",run:ky,shift:Ay},{key:"End",run:IF,shift:KF,preventDefault:!0},{key:"Mod-End",run:My,shift:Iy},{key:"Enter",run:Ny,shift:Ny},{key:"Mod-a",run:GF},{key:"Backspace",run:Mg,shift:Mg,preventDefault:!0},{key:"Delete",run:kw,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Aw,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:eV,preventDefault:!0},{mac:"Mod-Backspace",run:nV,preventDefault:!0},{mac:"Mod-Delete",run:rV,preventDefault:!0}].concat(_V.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),yV=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:MF,shift:BF},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:AF,shift:HF},{key:"Alt-ArrowUp",run:sV},{key:"Shift-Alt-ArrowUp",run:aV},{key:"Alt-ArrowDown",run:lV},{key:"Shift-Alt-ArrowDown",run:cV},{key:"Mod-Alt-ArrowUp",run:YF},{key:"Mod-Alt-ArrowDown",run:XF},{key:"Escape",run:QF},{key:"Mod-Enter",run:fV},{key:"Alt-l",mac:"Ctrl-l",run:qF},{key:"Mod-i",run:ZF,preventDefault:!0},{key:"Mod-[",run:pV},{key:"Mod-]",run:gV},{key:"Mod-Alt-\\",run:hV},{key:"Shift-Mod-k",run:uV},{key:"Shift-Mod-\\",run:PF},{key:"Mod-/",run:sF},{key:"Alt-A",run:aF},{key:"Ctrl-m",mac:"Shift-Alt-m",run:mV}].concat(vV),Oy=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e,Ss=class{static{s(this,"SearchCursor")}constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?l=>i(Oy(l)):Oy,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Fn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=qg(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Jr(e);let r=this.normalize(t);if(r.length)for(let i=0,o=n;;i++){let l=r.charCodeAt(i),a=this.match(l,o,this.bufferPos+this.bufferStart);if(i==r.length-1){if(a)return this.value=a,this;break}o==n&&i<t.length&&t.charCodeAt(i)==l&&o++}}}match(e,t,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n}:(this.matches[i]++,l=!0)),l||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<"u"&&(Ss.prototype[Symbol.iterator]=function(){return this});var Dw={from:-1,to:-1,match:/.*/.exec("")},L1="gm"+(/x/.unicode==null?"":"u"),Rw=class{static{s(this,"RegExpCursor")}constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=Dw,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Lw(e,t,n,r,i);this.re=new RegExp(t,L1+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=Hu(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Hu(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Rf=new WeakMap,Dy=class Lc{static{s(this,"FlattenedDoc")}constructor(t,n){this.from=t,this.text=n}get to(){return this.from+this.text.length}static get(t,n,r){let i=Rf.get(t);if(!i||i.from>=r||i.to<=n){let a=new Lc(n,t.sliceString(n,r));return Rf.set(t,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:l}=i;return l>n&&(o=t.sliceString(n,l)+o,l=n),i.to<r&&(o+=t.sliceString(i.to,r)),Rf.set(t,new Lc(l,o)),new Lc(n,o.slice(n-l,r-l))}},Lw=class{static{s(this,"MultilineRegExpCursor")}constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Dw,this.matchPos=Hu(e,r),this.re=new RegExp(t,L1+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=Dy.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=Hu(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Dy.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(Rw.prototype[Symbol.iterator]=Lw.prototype[Symbol.iterator]=function(){return this});function xV(e){try{return new RegExp(e,L1),!0}catch{return!1}}s(xV,"validRegExp");function Hu(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}s(Hu,"toCharEnd");var CV=s(e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=m9(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return i.then(o=>{let l=o&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(o.elements.line.value);if(!l){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,c,u,d,f]=l,h=d?+d.slice(1):0,g=u?+u:a.number;if(u&&f){let y=g/100;c&&(y=y*(c=="-"?-1:1)+a.number/t.doc.lines),g=Math.round(t.doc.lines*y)}else u&&c&&(g=g*(c=="-"?-1:1)+a.number);let p=t.doc.line(Math.max(1,Math.min(t.doc.lines,g))),_=Se.cursor(p.from+Math.max(0,Math.min(h,p.length)));e.dispatch({effects:[r,ct.scrollIntoView(_.from,{y:"center"})],selection:_})}),!0},"gotoLine"),bV={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},$w=Io.define({combine(e){return fa(e,bV,{highlightWordAroundCursor:s((t,n)=>t||n,"highlightWordAroundCursor"),minSelectionLength:Math.min,maxMatches:Math.min})}});function EV(e){let t=[MV,kV];return e&&t.push($w.of(e)),t}s(EV,"highlightSelectionMatches");var SV=Dt.mark({class:"cm-selectionMatch"}),TV=Dt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ry(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=cn.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=cn.Word)}s(Ry,"insideWordBoundaries");function wV(e,t,n,r){return e(t.sliceDoc(n,n+1))==cn.Word&&e(t.sliceDoc(r-1,r))==cn.Word}s(wV,"insideWord");var kV=Gg.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet($w),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Dt.none;let i=r.main,o,l=null;if(i.empty){if(!t.highlightWordAroundCursor)return Dt.none;let c=n.wordAt(i.head);if(!c)return Dt.none;l=n.charCategorizer(i.head),o=n.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<t.minSelectionLength||c>200)return Dt.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),l=n.charCategorizer(i.head),!(Ry(l,n,i.from,i.to)&&wV(l,n,i.from,i.to)))return Dt.none}else if(o=n.sliceDoc(i.from,i.to),!o)return Dt.none}let a=[];for(let c of e.visibleRanges){let u=new Ss(n.doc,o,c.from,c.to);for(;!u.next().done;){let{from:d,to:f}=u.value;if((!l||Ry(l,n,d,f))&&(i.empty&&d<=i.from&&f>=i.to?a.push(TV.range(d,f)):(d>=i.to||f<=i.from)&&a.push(SV.range(d,f)),a.length>t.maxMatches))return Dt.none}}return Dt.set(a)}},{decorations:s(e=>e.decorations,"decorations")}),MV=ct.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),AV=s(({state:e,dispatch:t})=>{let{selection:n}=e,r=Se.create(n.ranges.map(i=>e.wordAt(i.head)||Se.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)},"selectWord");function IV(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let l=!1,a=new Ss(e.doc,t,r[r.length-1].to);;)if(a.next(),a.done){if(l)return null;a=new Ss(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),l=!0}else{if(l&&r.some(c=>c.from==a.value.from))continue;if(o){let c=e.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}s(IV,"findNextOccurrence");var NV=s(({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(o=>o.from===o.to))return AV({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(o=>e.sliceDoc(o.from,o.to)!=r))return!1;let i=IV(e,r);return i?(t(e.update({selection:e.selection.addRange(Se.range(i.from,i.to),!1),effects:ct.scrollIntoView(i.to)})),!0):!1},"selectNextOccurrence"),Ks=Io.define({combine(e){return fa(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:s(t=>new zV(t),"createPanel"),scrollToMatch:s(t=>ct.scrollIntoView(t),"scrollToMatch")})}}),Pw=class{static{s(this,"SearchQuery")}constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||xV(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
62
+ `:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new PV(this):new RV(this)}getCursor(e,t=0,n){let r=e.doc?e:Fc.create({doc:e});return n==null&&(n=r.doc.length),this.regexp?qo(this,r,t,n):Go(this,r,t,n)}},Fw=class{static{s(this,"QueryType")}constructor(e){this.spec=e}};function OV(e,t,n){return(r,i,o,l)=>n&&!n(r,i,o,l)?!1:e(r>=l&&i<=l+o.length?o.slice(r-l,i-l):t.doc.sliceString(r,i),t,r,i)}s(OV,"wrapStringTest");function Go(e,t,n,r){let i;return e.wholeWord&&(i=DV(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=OV(e.test,t,i)),new Ss(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:o=>o.toLowerCase(),i)}s(Go,"stringCursor");function DV(e,t){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=e.sliceString(o,Math.min(e.length,r+2))),(t(Ku(i,n-o))!=cn.Word||t(Uu(i,n-o))!=cn.Word)&&(t(Uu(i,r-o))!=cn.Word||t(Ku(i,r-o))!=cn.Word))}s(DV,"stringWordTest");var RV=class extends Fw{static{s(this,"StringQuery")}constructor(e){super(e)}nextMatch(e,t,n){let r=Go(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let i=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Go(this.spec,e,0,i).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let i=Math.max(t,r-1e4-this.spec.unquoted.length),o=Go(this.spec,e,i,r),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(i==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Go(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Go(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function LV(e,t,n){return(r,i,o)=>(!n||n(r,i,o))&&e(o[0],t,r,i)}s(LV,"wrapRegexpTest");function qo(e,t,n,r){let i;return e.wholeWord&&(i=$V(t.charCategorizer(t.selection.main.head))),e.test&&(i=LV(e.test,t,i)),new Rw(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}s(qo,"regexpCursor");function Ku(e,t){return e.slice(vo(e,t,!1),t)}s(Ku,"charBefore");function Uu(e,t){return e.slice(t,vo(e,t))}s(Uu,"charAfter");function $V(e){return(t,n,r)=>!r[0].length||(e(Ku(r.input,r.index))!=cn.Word||e(Uu(r.input,r.index))!=cn.Word)&&(e(Uu(r.input,r.index+r[0].length))!=cn.Word||e(Ku(r.input,r.index+r[0].length))!=cn.Word)}s($V,"regexpWordTest");var PV=class extends Fw{static{s(this,"RegExpQuery")}nextMatch(e,t,n){let r=qo(this.spec,e,n,e.doc.length).next();return r.done&&(r=qo(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),o=qo(this.spec,e,i,n),l=null;for(;!o.next().done;)l=o.value;if(l&&(i==t||l.from>i+10))return l;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let r=n.length;r>0;r--){let i=+n.slice(0,r);if(i>0&&i<e.match.length)return e.match[i]+n.slice(r)}return t})}matchAll(e,t){let n=qo(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=qo(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},sa=nn.define(),$1=nn.define(),Ri=ha.define({create(e){return new Lf(Ag(e).create(),null)},update(e,t){for(let n of t.effects)n.is(sa)?e=new Lf(n.value.create(),e.panel):n.is($1)&&(e=new Lf(e.query,n.value?P1:null));return e},provide:s(e=>Bx.from(e,t=>t.panel),"provide")}),Lf=class{static{s(this,"SearchState")}constructor(e,t){this.query=e,this.panel=t}},FV=Dt.mark({class:"cm-searchMatch"}),VV=Dt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),BV=Gg.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Ri))}update(e){let t=e.state.field(Ri);(t!=e.startState.field(Ri)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Dt.none;let{view:n}=this,r=new Px;for(let i=0,o=n.visibleRanges,l=o.length;i<l;i++){let{from:a,to:c}=o[i];for(;i<l-1&&c>o[i+1].from-500;)c=o[++i].to;e.highlight(n.state,a,c,(u,d)=>{let f=n.state.selection.ranges.some(h=>h.from==u&&h.to==d);r.add(u,d,f?VV:FV)})}return r.finish()}},{decorations:s(e=>e.decorations,"decorations")});function Ha(e){return t=>{let n=t.state.field(Ri,!1);return n&&n.query.spec.valid?e(t,n):Hw(t)}}s(Ha,"searchCommand");var Wu=Ha((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=Se.single(r.from,r.to),o=e.state.facet(Ks);return e.dispatch({selection:i,effects:[F1(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),Bw(e),!0}),zu=Ha((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=Se.single(i.from,i.to),l=e.state.facet(Ks);return e.dispatch({selection:o,effects:[F1(e,i),l.scrollToMatch(o.main,e)],userEvent:"select.search"}),Bw(e),!0}),HV=Ha((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:Se.create(n.map(r=>Se.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),KV=s(({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],l=0;for(let a=new Ss(e.doc,e.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(l=o.length),o.push(Se.range(a.value.from,a.value.to))}return t(e.update({selection:Se.create(o,l),userEvent:"select.search.matches"})),!0},"selectSelectionMatches"),Ly=Ha((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let l=o,a=[],c,u,d=[];l.from==r&&l.to==i&&(u=n.toText(t.getReplacement(l)),a.push({from:l.from,to:l.to,insert:u}),l=t.nextMatch(n,l.from,l.to),d.push(ct.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=e.state.changes(a);return l&&(c=Se.single(l.from,l.to).map(f),d.push(F1(e,l)),d.push(n.facet(Ks).scrollToMatch(c.main,e))),e.dispatch({changes:f,selection:c,effects:d,userEvent:"input.replace"}),!0}),UV=Ha((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(i=>{let{from:o,to:l}=i;return{from:o,to:l,insert:t.getReplacement(i)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:ct.announce.of(r),userEvent:"input.replace.all"}),!0});function P1(e){return e.state.facet(Ks).createPanel(e)}s(P1,"createSearchPanel");function Ag(e,t){var n,r,i,o,l;let a=e.selection.main,c=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!c)return t;let u=e.facet(Ks);return new Pw({search:((n=t?.literal)!==null&&n!==void 0?n:u.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=t?.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=t?.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=t?.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(l=t?.wholeWord)!==null&&l!==void 0?l:u.wholeWord})}s(Ag,"defaultQuery");function Vw(e){let t=Zg(e,P1);return t&&t.dom.querySelector("[main-field]")}s(Vw,"getSearchInput");function Bw(e){let t=Vw(e);t&&t==e.root.activeElement&&t.select()}s(Bw,"selectSearchInput");var Hw=s(e=>{let t=e.state.field(Ri,!1);if(t&&t.panel){let n=Vw(e);if(n&&n!=e.root.activeElement){let r=Ag(e.state,t.query.spec);r.valid&&e.dispatch({effects:sa.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[$1.of(!0),t?sa.of(Ag(e.state,t.query.spec)):nn.appendConfig.of(JV)]});return!0},"openSearchPanel"),Kw=s(e=>{let t=e.state.field(Ri,!1);if(!t||!t.panel)return!1;let n=Zg(e,P1);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:$1.of(!1)}),!0},"closeSearchPanel"),WV=[{key:"Mod-f",run:Hw,scope:"editor search-panel"},{key:"F3",run:Wu,shift:zu,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wu,shift:zu,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Kw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:KV},{key:"Mod-Alt-g",run:CV},{key:"Mod-d",run:NV,preventDefault:!0}],zV=class{static{s(this,"SearchPanel")}constructor(e){this.view=e;let t=this.query=e.state.field(Ri).query.spec;this.commit=this.commit.bind(this),this.searchField=Ct("input",{value:t.search,placeholder:Tn(e,"Find"),"aria-label":Tn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ct("input",{value:t.replace,placeholder:Tn(e,"Replace"),"aria-label":Tn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ct("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ct("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ct("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(r,i,o){return Ct("button",{class:"cm-button",name:r,onclick:i,type:"button"},o)}s(n,"button"),this.dom=Ct("div",{onkeydown:s(r=>this.keydown(r),"onkeydown"),class:"cm-search"},[this.searchField,n("next",()=>Wu(e),[Tn(e,"next")]),n("prev",()=>zu(e),[Tn(e,"previous")]),n("select",()=>HV(e),[Tn(e,"all")]),Ct("label",null,[this.caseField,Tn(e,"match case")]),Ct("label",null,[this.reField,Tn(e,"regexp")]),Ct("label",null,[this.wordField,Tn(e,"by word")]),...e.state.readOnly?[]:[Ct("br"),this.replaceField,n("replace",()=>Ly(e),[Tn(e,"replace")]),n("replaceAll",()=>UV(e),[Tn(e,"replace all")])],Ct("button",{name:"close",onclick:s(()=>Kw(e),"onclick"),"aria-label":Tn(e,"close"),type:"button"},["×"])])}commit(){let e=new Pw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:sa.of(e)}))}keydown(e){s9(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?zu:Wu)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ly(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(sa)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ks).top}};function Tn(e,t){return e.state.phrase(t)}s(Tn,"phrase");var ac=30,cc=/[\s\.,:;?!]/;function F1(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-ac),l=Math.min(i,n+ac),a=e.state.sliceDoc(o,l);if(o!=r.from){for(let c=0;c<ac;c++)if(!cc.test(a[c+1])&&cc.test(a[c])){a=a.slice(c);break}}if(l!=i){for(let c=a.length-1;c>a.length-ac;c--)if(!cc.test(a[c-1])&&cc.test(a[c])){a=a.slice(0,c);break}}return ct.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}s(F1,"announceMatch");var jV=ct.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),JV=[Ri,Xg.low(BV),jV],Uw=class{static{s(this,"CompletionContext")}constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ws(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Ww(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function $y(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}s($y,"toSet");function GV(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=$y(t)+$y(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}s(GV,"prefixMatch");function qV(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:GV(t);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:t,validFor:n}:null}}s(qV,"completeFromList");var Py=class{static{s(this,"Option")}constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function _o(e){return e.selection.main.from}s(_o,"cur");function Ww(e,t){var n;let{source:r}=e,i=t&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?e:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}s(Ww,"ensureAnchor");var zw=Zu.define();function ZV(e,t,n,r){let{main:i}=e.selection,o=n-i.from,l=r-i.from;return{...e.changeByRange(a=>{if(a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+l)!=e.sliceDoc(n,r))return{range:a};let c=e.toText(t);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+l,insert:c},range:Se.cursor(a.from+o+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}s(ZV,"insertCompletionText");var Fy=new WeakMap;function YV(e){if(!Array.isArray(e))return e;let t=Fy.get(e);return t||Fy.set(e,t=qV(e)),t}s(YV,"asSource");var ju=nn.define(),la=nn.define(),XV=class{static{s(this,"FuzzyMatcher")}constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Fn(e,t),r=Jr(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(Fn(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(t.length==1){let v=Fn(e,0),x=Jr(v),C=x==e.length?0:-100;if(v!=t[0])if(v==n[0])C+=-200;else return null;return this.ret(C,[0,x])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(l<0){for(let v=0,x=Math.min(e.length,200);v<x&&c<a;){let C=Fn(e,v);(C==t[c]||C==n[c])&&(r[c++]=v),v+=Jr(C)}if(c<a)return null}let u=0,d=0,f=!1,h=0,g=-1,p=-1,_=/[a-z]/.test(e),y=!0;for(let v=0,x=Math.min(e.length,200),C=0;v<x&&d<a;){let b=Fn(e,v);l<0&&(u<a&&b==t[u]&&(i[u++]=v),h<a&&(b==t[h]||b==n[h]?(h==0&&(g=v),p=v+1,h++):h=0));let S,M=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(S=qg(b))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!v||M==1&&_||C==0&&M!=0)&&(t[d]==b||n[d]==b&&(f=!0)?o[d++]=v:o.length&&(y=!1)),C=M,v+=Jr(b)}return d==a&&o[0]==0&&y?this.result(-100+(f?-200:0),o,e):h==a&&g==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):h==a?this.ret(-900-e.length,[g,p]):d==a?this.result(-100+(f?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let o of t){let l=o+(this.astral?Jr(Fn(n,o)):1);i&&r[i-1]==o?r[i-1]=l:(r[i++]=o,r[i++]=l)}return this.ret(e-n.length,r)}},QV=class{static{s(this,"StrictMatcher")}constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},Ut=Io.define({combine(e){return fa(e,{activateOnTyping:!0,activateOnCompletion:s(()=>!1,"activateOnCompletion"),activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:s(()=>"","tooltipClass"),optionClass:s(()=>"","optionClass"),aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:eB,filterStrict:!1,compareCompletions:s((t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),"compareCompletions"),interactionDelay:75,updateSyncTime:100},{defaultKeymap:s((t,n)=>t&&n,"defaultKeymap"),closeOnBlur:s((t,n)=>t&&n,"closeOnBlur"),icons:s((t,n)=>t&&n,"icons"),tooltipClass:s((t,n)=>r=>Vy(t(r),n(r)),"tooltipClass"),optionClass:s((t,n)=>r=>Vy(t(r),n(r)),"optionClass"),addToOptions:s((t,n)=>t.concat(n),"addToOptions"),filterStrict:s((t,n)=>t||n,"filterStrict")})}});function Vy(e,t){return e?t?e+" "+t:e:t}s(Vy,"joinClass");function eB(e,t,n,r,i,o){let l=e.textDirection==Ox.RTL,a=l,c=!1,u="top",d,f,h=t.left-i.left,g=i.right-t.right,p=r.right-r.left,_=r.bottom-r.top;if(a&&h<Math.min(p,g)?a=!1:!a&&g<Math.min(p,h)&&(a=!0),p<=(a?h:g))d=Math.max(i.top,Math.min(n.top,i.bottom-_))-t.top,f=Math.min(400,a?h:g);else{c=!0,f=Math.min(400,(l?t.right:i.right-t.left)-30);let x=i.bottom-t.bottom;x>=_||x>t.top?d=n.bottom-t.top:(u="bottom",d=t.bottom-n.top)}let y=(t.bottom-t.top)/o.offsetHeight,v=(t.right-t.left)/o.offsetWidth;return{style:`${u}: ${d/y}px; max-width: ${f/v}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":a?"left":"right")}}s(eB,"defaultPositionInfo");function tB(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),t.push({render(n,r,i,o){let l=document.createElement("span");l.className="cm-completionLabel";let a=n.displayLabel||n.label,c=0;for(let u=0;u<o.length;){let d=o[u++],f=o[u++];d>c&&l.appendChild(document.createTextNode(a.slice(c,d)));let h=l.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(d,f))),h.className="cm-completionMatchedText",c=f}return c<a.length&&l.appendChild(document.createTextNode(a.slice(c))),l},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),t.sort((n,r)=>n.position-r.position).map(n=>n.render)}s(tB,"optionContent");function $f(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let i=Math.floor(t/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}s($f,"rangeAroundSelected");var nB=class{static{s(this,"CompletionTooltip")}constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:s(()=>this.measureInfo(),"read"),write:s(a=>this.placeInfo(a),"write"),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:o}=r.open,l=e.state.facet(Ut);this.optionContent=tB(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=$f(i.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(t).open;for(let u=a.target,d;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(d=/-(\d+)$/.exec(u.id))&&+d[1]<c.length){this.applyCompletion(e,c[+d[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Ut).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:la.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:l}=n.open;(!r.open||r.open.options!=i)&&(this.range=$f(i.length,o,e.state.facet(Ut).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),l!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=$f(t.options.length,t.selected,this.view.state.facet(Ut).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,r)}).catch(l=>Jf(this.view.state,l,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:i}=e;n.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!="LI"||!n.id?r--:r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&iB(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let o=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(Ut).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",o=>{o.target==r&&o.preventDefault()});let i=null;for(let o=n.from;o<n.to;o++){let{completion:l,match:a}=e[o],{section:c}=l;if(c){let f=typeof c=="string"?c:c.name;if(f!=i&&(o>n.from||n.from==0))if(i=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let h=r.appendChild(document.createElement("completion-section"));h.textContent=f}}const u=r.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let d=this.optionClass(l);d&&(u.className=d);for(let f of this.optionContent){let h=f(l,this.view.state,this.view,a);h&&u.appendChild(h)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}};function rB(e,t){return n=>new nB(n,e,t)}s(rB,"completionTooltip");function iB(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}s(iB,"scrollIntoView");function By(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}s(By,"score");function oB(e,t){let n=[],r=null,i=null,o=s(d=>{n.push(d);let{section:f}=d.completion;if(f){r||(r=[]);let h=typeof f=="string"?f:f.name;r.some(g=>g.name==h)||r.push(typeof f=="string"?{name:h}:f)}},"addOption"),l=t.facet(Ut);for(let d of e)if(d.hasResult()){let f=d.result.getMatch;if(d.result.filter===!1)for(let h of d.result.options)o(new Py(h,d.source,f?f(h):[],1e9-n.length));else{let h=t.sliceDoc(d.from,d.to),g,p=l.filterStrict?new QV(h):new XV(h);for(let _ of d.result.options)if(g=p.match(_.label)){let y=_.displayLabel?f?f(_,g.matched):[]:g.matched,v=g.score+(_.boost||0);if(o(new Py(_,d.source,y,v)),typeof _.section=="object"&&_.section.rank==="dynamic"){let{name:x}=_.section;i||(i=Object.create(null)),i[x]=Math.max(v,i[x]||-1e9)}}}}if(r){let d=Object.create(null),f=0,h=s((g,p)=>(g.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[g.name]:0)||(typeof g.rank=="number"?g.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(g.name<p.name?-1:1),"cmp");for(let g of r.sort(h))f-=1e5,d[g.name]=f;for(let g of n){let{section:p}=g.completion;p&&(g.score+=d[typeof p=="string"?p:p.name])}}let a=[],c=null,u=l.compareCompletions;for(let d of n.sort((f,h)=>h.score-f.score||u(f.completion,h.completion))){let f=d.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?a.push(d):By(d.completion)>By(c)&&(a[a.length-1]=d),c=d.completion}return a}s(oB,"sortOptions");var sB=class ul{static{s(this,"CompletionDialog")}constructor(t,n,r,i,o,l){this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=l}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new ul(this.options,Hy(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,o,l){if(i&&!l&&t.some(u=>u.isPending))return i.setDisabled();let a=oB(t,n);if(!a.length)return i&&t.some(u=>u.isPending)?i.setDisabled():null;let c=n.facet(Ut).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let u=i.options[i.selected].completion;for(let d=0;d<a.length;d++)if(a[d].completion==u){c=d;break}}return new ul(a,Hy(r,c),{pos:t.reduce((u,d)=>d.hasResult()?Math.min(u,d.from):u,1e8),create:hB,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new ul(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ul(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},lB=class Ig{static{s(this,"CompletionState")}constructor(t,n,r){this.active=t,this.id=n,this.open=r}static start(){return new Ig(dB,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(Ut),i=(r.override||n.languageDataAt("autocomplete",_o(n)).map(YV)).map(a=>(this.active.find(c=>c.source==a)||new ao(a,this.active.some(c=>c.state!=0)?1:0)).update(t,r));i.length==this.active.length&&i.every((a,c)=>a==this.active[c])&&(i=this.active);let o=this.open,l=t.effects.some(a=>a.is(V1));o&&t.docChanged&&(o=o.map(t.changes)),t.selection||i.some(a=>a.hasResult()&&t.changes.touchesRange(a.from,a.to))||!aB(i,this.active)||l?o=sB.build(i,n,this.id,o,r,l):o&&o.disabled&&!i.some(a=>a.isPending)&&(o=null),!o&&i.every(a=>!a.isPending)&&i.some(a=>a.hasResult())&&(i=i.map(a=>a.hasResult()?new ao(a.source,0):a));for(let a of t.effects)a.is(Gw)&&(o=o&&o.setSelected(a.value,this.id));return i==this.active&&o==this.open?this:new Ig(i,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?cB:uB}};function aB(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}s(aB,"sameResults");var cB={"aria-autocomplete":"list"},uB={};function Hy(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}s(Hy,"makeAttrs");var dB=[];function jw(e,t){if(e.isUserEvent("input.complete")){let r=e.annotation(zw);if(r&&t.activateOnCompletion(r))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}s(jw,"getUpdateType");var ao=class dl{static{s(this,"ActiveSource")}constructor(t,n,r=!1){this.source=t,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=jw(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new dl(i.source,0)),r&4&&i.state==0&&(i=new dl(this.source,1)),i=i.updateFor(t,r);for(let o of t.effects)if(o.is(ju))i=new dl(i.source,1,o.value);else if(o.is(la))i=new dl(i.source,0);else if(o.is(V1))for(let l of o.value)l.source==i.source&&(i=l);return i}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(_o(t.state))}},Jw=class $c extends ao{static{s(this,"ActiveResult")}constructor(t,n,r,i,o,l){super(t,3,n),this.limit=r,this.result=i,this.from=o,this.to=l}hasResult(){return!0}updateFor(t,n){var r;if(!(n&3))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let o=t.changes.mapPos(this.from),l=t.changes.mapPos(this.to,1),a=_o(t.state);if(a>l||!i||n&2&&(_o(t.startState)==this.from||a<this.limit))return new ao(this.source,n&4?1:0);let c=t.changes.mapPos(this.limit);return fB(i.validFor,t.state,o,l)?new $c(this.source,this.explicit,c,i,o,l):i.update&&(i=i.update(i,o,l,new Uw(t.state,a,!1)))?new $c(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:_o(t.state)):new ao(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new $c(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new ao(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}};function fB(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e=="function"?e(i,n,r,t):Ww(e,!0).test(i)}s(fB,"checkValid");var V1=nn.define({map(e,t){return e.map(n=>n.map(t))}}),Gw=nn.define(),pn=ha.define({create(){return lB.start()},update(e,t){return e.update(t)},provide:s(e=>[C9.from(e,t=>t.tooltip),ct.contentAttributes.from(e,t=>t.attrs)],"provide")});function B1(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(pn).active.find(i=>i.source==t.source);return r instanceof Jw?(typeof n=="string"?e.dispatch({...ZV(e.state,n,r.from,r.to),annotations:zw.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}s(B1,"applyCompletion");var hB=rB(pn,B1);function uc(e,t="option"){return n=>{let r=n.state.field(pn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Ut).interactionDelay)return!1;let i=1,o;t=="page"&&(o=Rx(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:l-1;return a<0?a=t=="page"?0:l-1:a>=l&&(a=t=="page"?l-1:0),n.dispatch({effects:Gw.of(a)}),!0}}s(uc,"moveCompletionSelection");var gB=s(e=>{let t=e.state.field(pn,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Ut).interactionDelay?!1:B1(e,t.open.options[t.open.selected])},"acceptCompletion"),Pf=s(e=>e.state.field(pn,!1)?(e.dispatch({effects:ju.of(!0)}),!0):!1,"startCompletion"),pB=s(e=>{let t=e.state.field(pn,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:la.of(null)}),!0)},"closeCompletion"),mB=class{static{s(this,"RunningQuery")}constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},_B=50,vB=1e3,yB=Gg.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(pn).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(pn),n=e.state.facet(Ut);if(!e.selectionSet&&!e.docChanged&&e.startState.field(pn)==t)return;let r=e.transactions.some(o=>{let l=jw(o,n);return l&8||(o.selection||o.docChanged)&&!(l&3)});for(let o=0;o<this.running.length;o++){let l=this.running[o];if(r||l.context.abortOnDocChange&&e.docChanged||l.updates.length+e.transactions.length>_B&&Date.now()-l.time>vB){for(let a of l.context.abortListeners)try{a()}catch(c){Jf(this.view.state,c)}l.context.abortListeners=null,this.running.splice(o--,1)}else l.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(o=>o.effects.some(l=>l.is(ju)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(o=>o.isPending&&!this.running.some(l=>l.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of e.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(pn);for(let n of t.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ut).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=_o(t),r=new Uw(t,n,e.explicit,this.view),i=new mB(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:la.of(null)}),Jf(this.view.state,o)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ut).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Ut),r=this.view.state.field(pn);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let a=_o(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),u=new Jw(o.active.source,o.active.explicit,c,o.done,o.done.from,(e=o.done.to)!==null&&e!==void 0?e:a);for(let d of o.updates)u=u.update(d,n);if(u.hasResult()){t.push(u);continue}}let l=r.active.find(a=>a.source==o.active.source);if(l&&l.isPending)if(o.done==null){let a=new ao(o.active.source,0);for(let c of o.updates)a=a.update(c,n);a.isPending||t.push(a)}else this.startQuery(l)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:V1.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(pn,!1);if(t&&t.tooltip&&this.view.state.facet(Ut).closeOnBlur){let n=t.open&&Rx(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:la.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ju.of(!1)}),20),this.composing=0}}}),xB=typeof navigator=="object"&&/Win/.test(navigator.platform),CB=Xg.highest(ct.domEventHandlers({keydown(e,t){let n=t.state.field(pn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(xB&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(l=>l.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&B1(t,r),!1}})),bB=ct.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),aa={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},co=nn.define({map(e,t){let n=t.mapPos(e,-1,p9.TrackAfter);return n??void 0}}),H1=new class extends y9{};H1.startSide=1;H1.endSide=-1;var qw=ha.define({create(){return E9.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:s(r=>r>=n.from&&r<=n.to,"filter")})}for(let n of t.effects)n.is(co)&&(e=e.update({add:[H1.range(n.value,n.value+1)]}));return e}});function EB(){return[TB,qw]}s(EB,"closeBrackets");var Ky="()[]{}<>«»»«[]{}";function Zw(e){for(let t=0;t<16;t+=2)if(Ky.charCodeAt(t)==e)return Ky.charAt(t+1);return qg(e<128?e:e+1)}s(Zw,"closing");function Yw(e,t){return e.languageDataAt("closeBrackets",t)[0]||aa}s(Yw,"config");var SB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),TB=ct.inputHandler.of((e,t,n,r)=>{if((SB?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&Jr(Fn(r,0))==1||t!=i.from||n!=i.to)return!1;let o=MB(e.state,r);return o?(e.dispatch(o),!0):!1}),wB=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Yw(e,e.selection.main.head).brackets||aa.brackets,r=null,i=e.changeByRange(o=>{if(o.empty){let l=AB(e.doc,o.head);for(let a of n)if(a==l&&Ud(e.doc,o.head)==Zw(Fn(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:Se.cursor(o.head-a.length)}}return{range:r=o}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},"deleteBracketPair"),kB=[{key:"Backspace",run:wB}];function MB(e,t){let n=Yw(e,e.selection.main.head),r=n.brackets||aa.brackets;for(let i of r){let o=Zw(Fn(i,0));if(t==i)return o==i?OB(e,i,r.indexOf(i+i+i)>-1,n):IB(e,i,o,n.before||aa.before);if(t==o&&Xw(e,e.selection.main.from))return NB(e,i,o)}return null}s(MB,"insertBracket");function Xw(e,t){let n=!1;return e.field(qw).between(0,e.doc.length,r=>{r==t&&(n=!0)}),n}s(Xw,"closedBracketAt");function Ud(e,t){let n=e.sliceString(t,t+2);return n.slice(0,Jr(Fn(n,0)))}s(Ud,"nextChar");function AB(e,t){let n=e.sliceString(t-2,t);return Jr(Fn(n,0))==n.length?n:n.slice(1)}s(AB,"prevChar");function IB(e,t,n,r){let i=null,o=e.changeByRange(l=>{if(!l.empty)return{changes:[{insert:t,from:l.from},{insert:n,from:l.to}],effects:co.of(l.to+t.length),range:Se.range(l.anchor+t.length,l.head+t.length)};let a=Ud(e.doc,l.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:l.head},effects:co.of(l.head+t.length),range:Se.cursor(l.head+t.length)}:{range:i=l}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}s(IB,"handleOpen");function NB(e,t,n){let r=null,i=e.changeByRange(o=>o.empty&&Ud(e.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Se.cursor(o.head+n.length)}:r={range:o});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}s(NB,"handleClose");function OB(e,t,n,r){let i=r.stringPrefixes||aa.stringPrefixes,o=null,l=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:t,from:a.to}],effects:co.of(a.to+t.length),range:Se.range(a.anchor+t.length,a.head+t.length)};let c=a.head,u=Ud(e.doc,c),d;if(u==t){if(Uy(e,c))return{changes:{insert:t+t,from:c},effects:co.of(c+t.length),range:Se.cursor(c+t.length)};if(Xw(e,c)){let f=n&&e.sliceDoc(c,c+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+f.length,insert:f},range:Se.cursor(c+f.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(d=Wy(e,c-2*t.length,i))>-1&&Uy(e,d))return{changes:{insert:t+t+t+t,from:c},effects:co.of(c+t.length),range:Se.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=cn.Word&&Wy(e,c,i)>-1&&!DB(e,c,t,i))return{changes:{insert:t+t,from:c},effects:co.of(c+t.length),range:Se.cursor(c+t.length)}}return{range:o=a}});return o?null:e.update(l,{scrollIntoView:!0,userEvent:"input.type"})}s(OB,"handleSame");function Uy(e,t){let n=ws(e).resolveInner(t+1);return n.parent&&n.from==t}s(Uy,"nodeStart");function DB(e,t,n,r){let i=ws(e).resolveInner(t,-1),o=r.reduce((l,a)=>Math.max(l,a.length),0);for(let l=0;l<5;l++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=a.indexOf(n);if(!c||c>-1&&r.indexOf(a.slice(0,c))>-1){let d=i.firstChild;for(;d&&d.from==i.from&&d.to-d.from>n.length+c;){if(e.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let u=i.to==t&&i.parent;if(!u)break;i=u}return!1}s(DB,"probablyInString");function Wy(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=cn.Word)return t;for(let i of n){let o=t-i.length;if(e.sliceDoc(o,t)==i&&r(e.sliceDoc(o-1,o))!=cn.Word)return o}return-1}s(Wy,"canStartStringAt");function RB(e={}){return[CB,pn,Ut.of(e),yB,LB,bB]}s(RB,"autocompletion");var Qw=[{key:"Ctrl-Space",run:Pf},{mac:"Alt-`",run:Pf},{mac:"Alt-i",run:Pf},{key:"Escape",run:pB},{key:"ArrowDown",run:uc(!0)},{key:"ArrowUp",run:uc(!1)},{key:"PageDown",run:uc(!0,"page")},{key:"PageUp",run:uc(!1,"page")},{key:"Enter",run:gB}],LB=Xg.highest(Yg.computeN([Ut],e=>e.facet(Ut).defaultKeymap?[Qw]:[])),zy=class{static{s(this,"SelectedDiagnostic")}constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},nl=class e3{static{s(this,"LintState")}constructor(t,n,r){this.diagnostics=t,this.panel=n,this.selected=r}static init(t,n,r){let i=r.facet(ca).markerFilter;i&&(t=i(t,r));let o=t.slice().sort((g,p)=>g.from-p.from||g.to-p.to),l=new Px,a=[],c=0,u=r.doc.iter(),d=0,f=r.doc.length;for(let g=0;;){let p=g==o.length?null:o[g];if(!p&&!a.length)break;let _,y;if(a.length)_=c,y=a.reduce((C,b)=>Math.min(C,b.to),p&&p.from>_?p.from:1e8);else{if(_=p.from,_>f)break;y=p.to,a.push(p),g++}for(;g<o.length;){let C=o[g];if(C.from==_&&(C.to>C.from||C.to==_))a.push(C),g++,y=Math.min(C.to,y);else{y=Math.min(C.from,y);break}}y=Math.min(y,f);let v=!1;if(a.some(C=>C.from==_&&(C.to==y||y==f))&&(v=_==y,!v&&y-_<10)){let C=_-(d+u.value.length);C>0&&(u.next(C),d=_);for(let b=_;;){if(b>=y){v=!0;break}if(!u.lineBreak&&d+u.value.length>b)break;b=d+u.value.length,d+=u.value.length,u.next()}}let x=GB(a);if(v)l.add(_,_,Dt.widget({widget:new WB(x),diagnostics:a.slice()}));else{let C=a.reduce((b,S)=>S.markClass?b+" "+S.markClass:b,"");l.add(_,y,Dt.mark({class:"cm-lintRange cm-lintRange-"+x+C,diagnostics:a.slice(),inclusiveEnd:a.some(b=>b.to>y)}))}if(c=y,c==f)break;for(let C=0;C<a.length;C++)a[C].to<=c&&a.splice(C--,1)}let h=l.finish();return new e3(h,n,ji(h))}};function ji(e,t=null,n=0){let r=null;return e.between(n,1e9,(i,o,{spec:l})=>{if(!(t&&l.diagnostics.indexOf(t)<0))if(!r)r=new zy(i,o,t||l.diagnostics[0]);else{if(l.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new zy(r.from,o,r.diagnostic)}}),r}s(ji,"findDiagnostic");function $B(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(ca).hideOn(e,n,r);if(i!=null)return i;let o=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(l=>l.is(t3))||e.changes.touchesRange(o.from,Math.max(o.to,r)))}s($B,"hideTooltip");function PB(e,t){return e.field(Nn,!1)?t:t.concat(nn.appendConfig.of(qB))}s(PB,"maybeEnableLint");var t3=nn.define(),K1=nn.define(),n3=nn.define(),Nn=ha.define({create(){return new nl(Dt.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=ji(n,e.selected.diagnostic,o)||ji(n,null,o)}!n.size&&i&&t.state.facet(ca).autoPanel&&(i=null),e=new nl(n,i,r)}for(let n of t.effects)if(n.is(t3)){let r=t.state.facet(ca).autoPanel?n.value.length?Ng.open:null:e.panel;e=nl.init(n.value,r,t.state)}else n.is(K1)?e=new nl(e.diagnostics,n.value?Ng.open:null,e.selected):n.is(n3)&&(e=new nl(e.diagnostics,e.panel,n.value));return e},provide:s(e=>[Bx.from(e,t=>t.panel),ct.decorations.from(e,t=>t.diagnostics)],"provide")}),FB=Dt.mark({class:"cm-lintRange cm-lintRange-active"});function VB(e,t,n){let{diagnostics:r}=e.state.field(Nn),i,o=-1,l=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),(c,u,{spec:d})=>{if(t>=c&&t<=u&&(c==u||(t>c||n>0)&&(t<u||n<0)))return i=d.diagnostics,o=c,l=u,!1});let a=e.state.facet(ca).tooltipFilter;return i&&a&&(i=a(i,e.state)),i?{pos:o,end:l,above:e.state.doc.lineAt(o).to<l,create(){return{dom:BB(e,i)}}}:null}s(VB,"lintTooltip");function BB(e,t){return Ct("ul",{class:"cm-tooltip-lint"},t.map(n=>i3(e,n,!1)))}s(BB,"diagnosticsTooltip");var HB=s(e=>{let t=e.state.field(Nn,!1);(!t||!t.panel)&&e.dispatch({effects:PB(e.state,[K1.of(!0)])});let n=Zg(e,Ng.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},"openLintPanel"),jy=s(e=>{let t=e.state.field(Nn,!1);return!t||!t.panel?!1:(e.dispatch({effects:K1.of(!1)}),!0)},"closeLintPanel"),KB=s(e=>{let t=e.state.field(Nn,!1);if(!t)return!1;let n=e.state.selection.main,r=ji(t.diagnostics,null,n.to+1);return!r&&(r=ji(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},"nextDiagnostic"),UB=[{key:"Mod-Shift-m",run:HB,preventDefault:!0},{key:"F8",run:KB}],ca=Io.define({combine(e){return{sources:e.map(t=>t.source).filter(t=>t!=null),...fa(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:s(()=>null,"hideOn")},{delay:Math.max,markerFilter:Jy,tooltipFilter:Jy,needsRefresh:s((t,n)=>t?n?r=>t(r)||n(r):t:n,"needsRefresh"),hideOn:s((t,n)=>t?n?(r,i,o)=>t(r,i,o)||n(r,i,o):t:n,"hideOn"),autoPanel:s((t,n)=>t||n,"autoPanel")})}}});function Jy(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}s(Jy,"combineFilter");function r3(e){let t=[];if(e)e:for(let{name:n}of e){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!t.some(o=>o.toLowerCase()==i.toLowerCase())){t.push(i);continue e}}t.push("")}return t}s(r3,"assignKeys");function i3(e,t,n){var r;let i=n?r3(t.actions):[];return Ct("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Ct("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(r=t.actions)===null||r===void 0?void 0:r.map((o,l)=>{let a=!1,c=s(g=>{if(g.preventDefault(),a)return;a=!0;let p=ji(e.state.field(Nn).diagnostics,t);p&&o.apply(e,p.from,p.to)},"click"),{name:u}=o,d=i[l]?u.indexOf(i[l]):-1,f=d<0?u:[u.slice(0,d),Ct("u",u.slice(d,d+1)),u.slice(d+1)],h=o.markClass?" "+o.markClass:"";return Ct("button",{type:"button",class:"cm-diagnosticAction"+h,onclick:c,onmousedown:c,"aria-label":` Action: ${u}${d<0?"":` (access key "${i[l]})"`}.`},f)}),t.source&&Ct("div",{class:"cm-diagnosticSource"},t.source))}s(i3,"renderDiagnostic");var WB=class extends M9{static{s(this,"DiagnosticWidget")}constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}},Gy=class{static{s(this,"PanelItem")}constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=i3(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}},Ng=class o3{static{s(this,"LintPanel")}constructor(t){this.view=t,this.items=[];let n=s(i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)jy(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],l=r3(o.actions);for(let a=0;a<l.length;a++)if(l[a].toUpperCase().charCodeAt(0)==i.keyCode){let c=ji(this.view.state.field(Nn).diagnostics,o);c&&o.actions[a].apply(t,c.from,c.to)}}else return;i.preventDefault()}},"onkeydown"),r=s(i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)},"onclick");this.list=Ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Ct("div",{class:"cm-panel-lint"},this.list,Ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:s(()=>jy(this.view),"onclick")},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Nn).selected;if(!t)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}update(){let{diagnostics:t,selected:n}=this.view.state.field(Nn),r=0,i=!1,o=null,l=new Set;for(t.between(0,this.view.state.doc.length,(a,c,{spec:u})=>{for(let d of u.diagnostics){if(l.has(d))continue;l.add(d);let f=-1,h;for(let g=r;g<this.items.length;g++)if(this.items[g].diagnostic==d){f=g;break}f<0?(h=new Gy(this.view,d),this.items.splice(r,0,h),i=!0):(h=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&h.diagnostic==n.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),o=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new Gy(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:s(()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),"read"),write:s(({sel:a,panel:c})=>{let u=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/u:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/u)},"write")})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function n(){let r=t;t=r.nextSibling,r.remove()}s(n,"rm");for(let r of this.items)if(r.dom.parentNode==this.list){for(;t!=r.dom;)n();t=r.dom.nextSibling}else this.list.insertBefore(r.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=ji(this.view.state.field(Nn).diagnostics,this.items[t].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:n3.of(n)})}static open(t){return new o3(t)}};function zB(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}s(zB,"svg");function dc(e){return zB(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}s(dc,"underline");var jB=ct.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:dc("#d11")},".cm-lintRange-warning":{backgroundImage:dc("orange")},".cm-lintRange-info":{backgroundImage:dc("#999")},".cm-lintRange-hint":{backgroundImage:dc("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function JB(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}s(JB,"severityWeight");function GB(e){let t="hint",n=1;for(let r of e){let i=JB(r.severity);i>n&&(n=i,t=r.severity)}return t}s(GB,"maxSeverity");var qB=[Nn,ct.decorations.compute([Nn],e=>{let{selected:t,panel:n}=e.field(Nn);return!t||!n||t.from==t.to?Dt.none:Dt.set([FB.range(t.from,t.to)])}),u9(VB,{hideOn:$B}),jB],ZB=[Lx(),d9(),S9(),pF(),v9(),h9(),c9(),Fc.allowMultipleSelections.of(!0),k9(),Ix(_9,{fallback:!0}),x9(),EB(),RB(),f9(),l9(),a9(),EV(),Yg.of([...kB,...yV,...WV,...SF,...w9,...Qw,...UB])];function YB(e,t,n){const r=ni(gt),i=Mn(sS),o=m.useRef(null),{lexicalNode:l}=bg(),a=m.useRef(!1),c=m.useRef(!1),u=m.useCallback(()=>{i({editorType:"codeblock",rootNode:l,editorRef:o.current})},[l,i]),d=m.useCallback(f=>{var h,g,p,_,y,v;if(f.key==="ArrowDown"){const x=(g=(h=o.current)==null?void 0:h.getCodemirror())==null?void 0:g.state;x&&x.doc.length===x.selection.ranges[0].to&&(a.current?(r?.update(()=>{var C,b;const S=yn(e);S.getNextSibling()?((b=(C=o.current)==null?void 0:C.getCodemirror())==null||b.contentDOM.blur(),S.selectNext()):S.insertAfter(Xe())}),a.current=!1):a.current=!0)}else if(f.key==="ArrowUp"){const x=(_=(p=o.current)==null?void 0:p.getCodemirror())==null?void 0:_.state;x&&x.selection.ranges[0].from===0&&(c.current?(r?.update(()=>{var C,b;const S=yn(e);S.getPreviousSibling()&&((b=(C=o.current)==null?void 0:C.getCodemirror())==null||b.contentDOM.blur(),S.selectPrevious())}),c.current=!1):c.current=!0)}else if(f.key==="Enter")f.stopPropagation();else if(f.key==="Backspace"||f.key==="Delete"){const x=(v=(y=o.current)==null?void 0:y.getCodemirror())==null?void 0:v.state;x?.doc.length===0&&r?.update(()=>{yn(e).remove()})}},[r,e]);return m.useEffect(()=>{const f=o.current;return setTimeout(()=>{var h,g;(h=f?.getCodemirror())==null||h.contentDOM.addEventListener("focus",u),(g=f?.getCodemirror())==null||g.contentDOM.addEventListener("keydown",d)},300),()=>{var h,g;(h=f?.getCodemirror())==null||h.contentDOM.removeEventListener("focus",u),(g=f?.getCodemirror())==null||g.contentDOM.removeEventListener("keydown",d)}},[o,u,d,t]),m.useEffect(()=>{n.subscribe(()=>{var f,h;(h=(f=o.current)==null?void 0:f.getCodemirror())==null||h.focus(),u()})},[n,o,e,u]),o}s(YB,"useCodeMirrorRef");var XB=m.forwardRef(({title:e,children:t},n)=>{const r=ni(Po);return m.createElement(wx,{delayDuration:100},m.createElement(Tx,null,m.createElement(Mx,{ref:n,asChild:!0},m.createElement("span",{className:J.tooltipTrigger},t)),m.createElement(Ax,{container:r?.current},m.createElement(kx,{className:(0,tt.default)(J.tooltipContent),sideOffset:10},e))))}),QB=m.forwardRef(({children:e,className:t,...n},r)=>m.createElement(Hk,{...n,ref:r,className:(0,tt.default)(t,J.selectItem)},m.createElement(Uk,null,e))),eH=s(({title:e,placeholder:t,className:n})=>{const[r,i]=vr(_r,pi);return m.createElement(XB,{title:e},m.createElement(Vk,{"aria-label":t,className:(0,tt.default)(J.selectTrigger,n),"data-toolbar-item":!0,disabled:r},m.createElement(Bk,{placeholder:t}),m.createElement(zk,{className:J.selectDropdownArrow},i("arrow_drop_down"))))},"SelectTrigger"),tH=s(({children:e,className:t=J.selectContainer})=>{const n=ni(Po);return m.createElement(jk,{container:n?.current},m.createElement(Kk,{className:(0,tt.default)(t,"mdxeditor-select-content"),onCloseAutoFocus:s(r=>{r.preventDefault()},"onCloseAutoFocus"),position:"popper"},m.createElement(Wk,{"data-editor-dropdown":!0,style:{maxHeight:"var(--radix-select-content-available-height)"}},e)))},"SelectContent"),nH=s(e=>m.createElement(Jk,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},m.createElement(eH,{title:e.triggerTitle,placeholder:e.placeholder}),m.createElement(tH,null,e.items.map((t,n)=>t==="separator"?m.createElement(Gk,{key:n}):m.createElement(QB,{key:n,value:t.value},t.label)))),"Select"),s3=s(({language:e,nodeKey:t,code:n,focusEmitter:r})=>{const i=mi(),{parentEditor:o,lexicalNode:l}=bg(),[a,c,u,d,f]=vr(_r,Rg,Lg,pi,Dg),h=YB(t,e,r),{setCode:g}=bg(),p=m.useRef(null),_=m.useRef(null),{value:y,items:v}=m.useMemo(()=>rH(f,e),[f,e]),x=m.useRef(g);return x.current=g,h.current={getCodemirror:s(()=>p.current,"getCodemirror")},m.useEffect(()=>{const C=_.current;return(async()=>{const b=[...c,ZB,oF,Lx(),Yg.of([YP]),ct.lineWrapping,ct.updateListener.of(({state:S})=>{x.current(S.doc.toString())}),ct.domEventHandlers({focus:s(()=>{o.update(()=>{Xn(null)})},"focus")})];if(a&&b.push(Fc.readOnly.of(!0)),e!==""){const S=f.keyMap[e]??e,M=f.supportMap[S];if(M)b.push(M.extension);else if(u){const T=BP.find(E=>E.name===e||E.alias.includes(e)||E.extensions.includes(e));if(T)try{const E=await T.load();b.push(E.extension)}catch{}}}C.innerHTML="",p.current=new ct({parent:C,state:Fc.create({doc:n,extensions:b})}),C.addEventListener("keydown",qy)})(),()=>{var b;(b=p.current)==null||b.destroy(),p.current=null,C.removeEventListener("keydown",qy)}},[a,e,...c]),m.createElement("div",{className:J.codeMirrorWrapper},m.createElement("div",{className:J.codeMirrorToolbar},m.createElement(nH,{disabled:a,value:y,onChange:s(C=>{o.update(()=>{l.setLanguage(C==="__EMPTY_VALUE__"?"":C),setTimeout(()=>{o.update(()=>{l.getLatest().select()})})})},"onChange"),triggerTitle:i("codeBlock.selectLanguage","Select code block language"),placeholder:i("codeBlock.inlineLanguage","Language"),items:v}),m.createElement("button",{className:J.iconButton,type:"button",disabled:a,title:i("codeblock.delete","Delete code block"),onClick:s(C=>{C.preventDefault(),o.update(()=>{l.remove()})},"onClick")},d("delete_small"))),m.createElement("div",{ref:_}))},"CodeMirrorEditor");function qy(e){e.stopPropagation()}s(qy,"stopPropagationHandler");function Og(e){var t;const n=[],r={},i={};if(Array.isArray(e))for(const o of e){const l=((t=o.alias)==null?void 0:t[0])??o.name.toLowerCase(),a=l||"__EMPTY_VALUE__";if(n.push({value:a,label:o.name}),r[l]=a,o.alias)for(const c of o.alias)r[c]=a;if(o.extensions)for(const c of o.extensions)r[c]=a;r[o.name.toLowerCase()]=a,o.support&&(i[a]=o.support)}else{const o={};for(const[l,a]of Object.entries(e))a in o||(o[a]=l,n.push({value:l||"__EMPTY_VALUE__",label:a})),r[l]=o[a]||"__EMPTY_VALUE__"}return{items:n,keyMap:r,supportMap:i}}s(Og,"normalizeCodeBlockLanguages");function rH(e,t){const n=e.keyMap[t]??t;return!n||e.items.some(r=>r.value===n)?{value:n,items:e.items}:{value:n,items:[...e.items,{value:n,label:t}]}}s(rH,"getCodeBlockLanguageSelectData");var Dg=he(Og({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"})),iH=wt(e=>{e.link(e.pipe(iH,$i(({language:t,code:n})=>({code:n,language:t,meta:""}))),QT)}),Rg=he([]),Lg=he(!0),oH=En({update(e,t){e.pubIn({[Dg]:Og(t?.codeBlockLanguages??{}),[Rg]:t?.codeMirrorExtensions??[],[Lg]:t?.autoLoadLanguageSupport??!0})},init(e,t){const n=Og(t?.codeBlockLanguages??{});e.pubIn({[Dg]:n,[Rg]:t?.codeMirrorExtensions??[],[FP]:sH(n),[Lg]:t?.autoLoadLanguageSupport??!0})}});function sH(e){return{match(t,n){return!n||Object.hasOwn(e.keyMap,t??"")},priority:1,Editor:s3}}s(sH,"buildCodeBlockDescriptor");br();function lH({url:e,title:t,text:n,onSubmit:r,onCancel:i,linkAutocompleteSuggestions:o,showLinkTitleField:l,showAnchorTextField:a}){const{register:c,handleSubmit:u,control:d,setValue:f,reset:h}=uT({values:{url:e,title:t,text:n}}),g=mi();return m.createElement("form",{onSubmit:s(p=>{u(r)(p),p.stopPropagation(),p.preventDefault()},"onSubmit"),onReset:s(p=>{p.stopPropagation(),i()},"onReset"),onKeyDown:s(p=>{p.key==="Escape"&&(p.stopPropagation(),i())},"onKeyDown"),className:(0,tt.default)(J.multiFieldForm,J.linkDialogEditForm)},m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"link-url"},g("createLink.url","URL")),m.createElement(UT,{register:c,initialInputValue:e,inputName:"url",suggestions:o,setValue:f,control:d,placeholder:g("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),a?m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"link-text",title:g("createLink.textTooltip","The text to be displayed for the link")},g("createLink.text","Anchor text")),m.createElement("input",{id:"link-text",className:J.textInput,size:40,...c("text")})):null,l?m.createElement("div",{className:J.formField},m.createElement("label",{htmlFor:"link-title",title:g("createLink.titleTooltip","The link's title attribute, shown on hover")},g("createLink.title","Link title")),m.createElement("input",{id:"link-title",className:J.textInput,size:40,...c("title")})):null,m.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},m.createElement("button",{type:"submit",title:g("createLink.saveTooltip","Set URL"),"aria-label":g("createLink.saveTooltip","Set URL"),className:(0,tt.default)(J.primaryButton)},g("dialogControls.save","Save")),m.createElement("button",{type:"reset",title:g("createLink.cancelTooltip","Cancel change"),"aria-label":g("createLink.cancelTooltip","Cancel change"),className:(0,tt.default)(J.secondaryButton)},g("dialogControls.cancel","Cancel"))))}s(lH,"LinkEditForm");var aH=s(()=>{const[e,t,n,r,i,o,l,a]=vr(Po,rS,gt,pi,Xt,g3,p3,_3),c=Mn(a3),u=Mn(c3),d=Mn(u3),f=Mn(d3),h=Mn(f3);m.useEffect(()=>{const x=t?.closest(".mdxeditor-root-contenteditable"),C=s(()=>{n?.getEditorState().read(()=>{c(!0)})},"update");return window.addEventListener("resize",C),window.addEventListener("scroll",C),x?.addEventListener("scroll",C),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C),x?.removeEventListener("scroll",C)}},[n,t,c]);const[g,p]=m.useState(!1),_=mi();if(i.type==="inactive")return null;const y=i.rectangle,v=i.type==="preview"&&i.url.startsWith("http");return m.createElement(Jg,{open:!0},m.createElement(Zk,{"data-visible":i.type==="edit",className:J.linkDialogAnchor,style:{top:`${y.top}px`,left:`${y.left}px`,width:`${y.width}px`,height:`${y.height}px`}}),m.createElement(jg,{container:e?.current},m.createElement(qk,{className:(0,tt.default)(J.linkDialogPopoverContent),sideOffset:5,updatePositionStrategy:"always",onOpenAutoFocus:s(x=>{x.preventDefault()},"onOpenAutoFocus"),key:i.linkNodeKey},i.type==="edit"&&m.createElement(lH,{url:i.url,title:i.title,text:i.text,onSubmit:u,onCancel:d.bind(null),linkAutocompleteSuggestions:o,showLinkTitleField:a,showAnchorTextField:i.withAnchorText}),i.type==="preview"&&m.createElement(m.Fragment,null,m.createElement("a",{className:J.linkDialogPreviewAnchor,"data-testid":"link-dialog-preview",href:i.href??"about:blank",...v?{target:"_blank",rel:"noreferrer"}:{},onClick:s(x=>{l!==null&&(x.preventDefault(),l(i.url))},"onClick"),title:v?_("linkPreview.open","Open {{url}} in new window",{url:i.url}):i.url},m.createElement("span",null,i.url),v&&r("open_in_new")),m.createElement(Ff,{onClick:s(()=>{f()},"onClick"),title:_("linkPreview.edit","Edit link URL"),"aria-label":_("linkPreview.edit","Edit link URL")},r("edit")),m.createElement(wx,null,m.createElement(Tx,{open:g},m.createElement(Mx,{asChild:!0},m.createElement(Ff,{title:_("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":_("linkPreview.copyToClipboard","Copy to clipboard"),onClick:s(()=>{window.navigator.clipboard.writeText(i.url).then(()=>{p(!0),setTimeout(()=>{p(!1)},1e3)})},"onClick")},r(g?"check":"content_copy"))),m.createElement(Ax,{container:e?.current},m.createElement(kx,{className:(0,tt.default)(J.tooltipContent),sideOffset:5},_("linkPreview.copied","Copied!"),m.createElement(Xk,null))))),m.createElement(Ff,{title:_("linkPreview.remove","Remove link"),"aria-label":_("linkPreview.remove","Remove link"),onClick:s(()=>{h()},"onClick")},r("link_off"))),m.createElement(zg,{className:J.popoverArrow}))))},"LinkDialog"),Ff=m.forwardRef(({className:e,...t},n)=>m.createElement("button",{className:(0,tt.default)(J.actionButton,e),ref:n,...t}));function Ju(e){if(!e)return null;const t=uR(e);if(t===null)return null;const n=t.getParent();return St(n)?n:St(t)?t:null}s(Ju,"getLinkNodeInSelection");function l3(e=re()){if(!He(e))return null;const t=e.getNodes(),n=t.length===1?t[0]:null;return Un(n)&&n.isInline()?n:null}s(l3,"getSelectedInlineDecorator");function Vf(e,t,n){return e?e.getEditorState().read(()=>{const r=t===""?null:yn(t),i=re(),o=ie(i)?Ju(i):null,l=St(r)?r:o;return l?.sanitizeUrl(n)??"about:blank"}):"about:blank"}s(Vf,"getPreviewHref");var a3=wt(),Xt=he({type:"inactive"},e=>{e.pub(ea,t=>t.registerCommand(yd,()=>e.getValue(Xt).type==="preview"?(e.pub(Xt,{type:"inactive"}),!0):!1,st)),e.sub(e.pipe(ta),t=>{t!=="rich-text"&&e.pub(Xt,{type:"inactive"})}),e.pub(ea,t=>t.registerCommand(ab,n=>{if(n.key==="k"&&(SS?n.metaKey:n.ctrlKey)&&!e.getValue(_r)){const r=re();return ie(r)||l3(r)!==null?(e.pub(h3),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Jl)),e.sub(e.pipe(d3,mt(Xt,gt)),([,t,n])=>{if(t.type==="preview")setTimeout(()=>{n?.getEditorState().read(()=>{const r=yn(t.linkNodeKey),i=St(r)?r.getTextContent().length>0&&r.getChildrenSize()<=1:!1,o=i&&r?r.getTextContent():"";e.pub(Xt,{type:"edit",initialUrl:t.url,url:t.url,title:t.title,text:o,withAnchorText:i,linkNodeKey:t.linkNodeKey,decoratorNodeKey:t.decoratorNodeKey,rectangle:t.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),e.sub(e.pipe(c3,mt(gt,Xt,Cs)),([t,n,r,i])=>{var o,l,a;const c=((o=t.text)==null?void 0:o.trim())??"",u=((l=t.url)==null?void 0:l.trim())??"",d=((a=t.title)==null?void 0:a.trim())??"";if(u!==""){if(r.decoratorNodeKey!==void 0){let f="",h=!1;if(n?.update(()=>{const g=yn(r.decoratorNodeKey);if(g===null)return;const p=cu();if(p.add(g.getKey()),Xn(p),h=n.dispatchCommand(ki,u),!h)return;const _=g.getParent();St(_)&&(_.setTitle(d),f=_.getKey())},{discrete:!0}),f==="")return;e.pub(Xt,{type:"preview",linkNodeKey:f,decoratorNodeKey:r.decoratorNodeKey,rectangle:r.rectangle,title:d,url:u,href:Vf(n,f,u)});return}if(i?.isCollapsed()){const f=c||d||u;n?.update(()=>{const h=Ju(i);if(h)if(ln(h)){const g=ai(u,{title:d});g.append(pr(c)),h.replace(g),g.select()}else h.setURL(u),h.setTitle(d),Zy(h.getFirstChild(),c);else{const g=ai(u,{title:d});g.append(pr(f)),Rs([g]),g.select()}},{discrete:!0})}else n?.update(()=>{Zy(i?.anchor.getNode(),c)}),n?.dispatchCommand(ki,{url:u,title:d});e.pub(Xt,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:d,url:u,href:Vf(n,r.linkNodeKey??"",u)})}else r.type==="edit"&&r.initialUrl!==""&&(r.decoratorNodeKey!==void 0?n?.update(()=>{const f=yn(r.decoratorNodeKey);if(f===null)return;const h=cu();h.add(f.getKey()),Xn(h),n.dispatchCommand(ki,null)}):n?.dispatchCommand(ki,null)),e.pub(Xt,{type:"inactive"})}),e.link(e.pipe(u3,mt(Xt,gt),$i(([,t,n])=>{if(t.type==="edit")return n?.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,href:Vf(n,t.linkNodeKey,t.initialUrl),linkNodeKey:t.linkNodeKey,decoratorNodeKey:t.decoratorNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),Xt),e.link(e.pipe(e.combine(Cs,a3),mt(gt,Xt,_r),$i(([[t],n,r,i])=>{if(r.decoratorNodeKey!==void 0&&n&&!i){if(n.getEditorState().read(()=>{const l=re();if(!He(l))return null;const a=l.getNodes();return a.length===1?a[0].getKey():null})!==r.decoratorNodeKey)return{type:"inactive"};const o=xS(n,r.decoratorNodeKey);return o===null?{type:"inactive"}:{...r,rectangle:o}}if(ie(t)&&n&&!i){const o=Ju(t);if(!t.isCollapsed())return{type:"inactive"};if(o){const l=CS(n);return l?{type:"preview",url:o.getURL(),href:o.sanitizeUrl(o.getURL()),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:l}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),Xt)}),c3=wt(),u3=Ji(),Lz=Ji(),d3=Ji(),f3=Ji(e=>{e.sub(e.pipe(f3,mt(gt)),([,t])=>{t?.dispatchCommand(ki,null)})}),h3=Ji(e=>{e.sub(e.pipe(h3,mt(Cs,gt)),([,t,n])=>{if(!n)return;const r=n.getEditorState().read(()=>{const i=l3();if(i===null)return null;const o=i.getParent(),l=St(o)?o:null;return{nodeKey:i.getKey(),url:l?.getURL()??"",title:l?.getTitle()??"",linkNodeKey:l?.getKey()??""}});if(r!==null){const i=xS(n,r.nodeKey);if(i===null)return;e.pub(Xt,{type:"edit",initialUrl:r.url,url:r.url,title:r.title,text:"",withAnchorText:!1,linkNodeKey:r.linkNodeKey,decoratorNodeKey:r.nodeKey,rectangle:i});return}ie(t)&&n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const i=Ju(t),o=CS(n);if(o===null)return;const l=i?.getURL()??"",a=i?.getURL()??"",c=i?.getTitle()??"",u=i?.getKey()??"",d=i?i.getTextContent().length>0&&i.getChildrenSize()<=1:t.isCollapsed(),f=d&&i?i.getTextContent():"";e.pub(Xt,{type:"edit",initialUrl:l,url:a,title:c,text:f,withAnchorText:d,linkNodeKey:u,rectangle:o})})})})})}),g3=he([]),p3=he(null),m3=he(null,e=>{e.pub(ea,t=>{function n(r){const[i,o]=e.getValues([_r,m3]);!i||o===null||t.update(()=>{const l=si(r.target);if(l!==null){const a=dt(l,c=>c instanceof Vr);a!==null&&o(r,a,a.getURL())}})}return s(n,"onClick"),t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})});function Zy(e,t){Ae(e)&&t&&(e.setTextContent(t),e.selectStart())}s(Zy,"updateLinkText");var _3=he(!0),cH=En({init(e,t){e.pub(Vs,t?.LinkDialog??aH),e.pub(p3,t?.onClickLinkCallback??null),e.pub(m3,t?.onReadOnlyClickLinkCallback??null),e.pub(_3,t?.showLinkTitleField??!0)},update(e,t={}){e.pub(g3,t.linkAutocompleteSuggestions??[])}});function uH(e,t){let n=e;for(let r=qn(e,t);r&&(E3(r.origin)||du(r.origin));r=r.getAdjacentCaret())n=r.origin;return n}s(uH,"le");function dH(e){return uH(e,"previous")}s(dH,"ue$1");function v3(e,t){for(const n of e.childNodes)if(Ke(n)&&n.tagName===t||v3(n,t))return!0;return!1}s(v3,"xe$1");var fl="data-language",rl="data-highlight-language",fc="data-theme",U1=class y3 extends Lr{static{s(this,"ve")}__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new y3(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const n=bn().createElement("code");mr(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(fl,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(rl,r));const i=this.getTheme();i&&n.setAttribute(fc,i);const o=this.getStyle();return o&&Tc(n.style,o),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;i?i!==o&&n.setAttribute(fl,i):o&&n.removeAttribute(fl);const l=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?l&&i?i!==o&&n.setAttribute(rl,i):n.removeAttribute(rl):l&&i&&n.setAttribute(rl,i);const a=this.__theme,c=t.__theme;a?a!==c&&n.setAttribute(fc,a):c&&n.removeAttribute(fc);const u=this.__style,d=t.__style;return u!==d&&Tc(n.style,u,d),!1}exportDOM(t){const n=bn().createElement("pre");mr(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(fl,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(rl,r));const i=this.getTheme();i&&n.setAttribute(fc,i);const o=this.getStyle();return o&&Tc(n.style,o),{element:n}}static importDOM(){return{code:s(t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||v3(t,"BR"))?{conversion:Yy,priority:1}:null,"code"),div:s(()=>({conversion:fH,priority:1}),"div"),pre:s(()=>({conversion:Yy,priority:0}),"pre"),table:s(t=>Bf(t)?{conversion:hH,priority:3}:null,"table"),td:s(t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Bf(r)?{conversion:Xy,priority:3}:null},"td"),tr:s(t=>{const n=t.closest("table");return n&&Bf(n)?{conversion:Xy,priority:3}:null},"tr")}}static importJSON(t){return un().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,n=!0){if(!qi(Wt(),"@lexical/code")){const l=gH(t);if(l)return l}const{anchor:r,focus:i}=t,o=(r.isBefore(i)?r:i).getNode();if(Ae(o)){let l=dH(o);const a=[];for(;;)if(du(l))a.push(Zp()),l=l.getNextSibling();else{if(!E3(l))break;{let p=0;const _=l.getTextContent(),y=l.getTextContentSize();for(;p<y&&_[p]===" ";)p++;if(p!==0&&a.push(b3(" ".repeat(p))),p!==y)break;l=l.getNextSibling()}}const c=o.splitText(r.offset)[0],u=r.offset===0?0:1,d=c.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[Or(),...a];f.splice(d,0,h);const g=a[a.length-1];g?g.select():r.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(ua(o)){const{offset:l}=t.anchor;o.splice(l,0,[Or()]),o.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Xe();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const n=this.getWritable();return n.__isSyntaxHighlightSupported=t,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const n=this.getWritable();return n.__theme=t||void 0,n}getTheme(){return this.getLatest().__theme}};function un(e,t){return B2(U1).setLanguage(e).setTheme(t)}s(un,"Ce");function ua(e){return e instanceof U1}s(ua,"Ne");function Yy(e){return{node:un(e.getAttribute(fl))}}s(Yy,"Te");function fH(e){const t=e,n=Qy(t);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(Qy(i))return!0;i=i.parentElement}return!1})(t)?{node:n?un():null}:{node:null}}s(fH,"Ae");function hH(){return{node:un()}}s(hH,"Oe");function Xy(){return{node:null}}s(Xy,"Pe");function Qy(e){return e.style.fontFamily.match("monospace")!==null}s(Qy,"we");function Bf(e){return e.classList.contains("js-file-line-container")}s(Bf,"He");function gH(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const n=t.getNode();if(ua(n)){const r=n.getChildrenSize();if(r>=2&&t.offset===r){const i=n.getLastChild();if(Dr(i)&&Dr(i.getPreviousSibling())){const o=Xe();return n.splice(r-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}s(gH,"De");var x3=class C3 extends Ls{static{s(this,"ke")}__highlightType;constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new C3(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=Hf(t.theme,this.__highlightType);return mr(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=Hf(r.theme,t.__highlightType),l=Hf(r.theme,this.__highlightType);return o!==l&&(o&&Cd(n,o),l&&mr(n,l)),i}static importJSON(t){return b3().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return un()}};function Hf(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}s(Hf,"Be");function b3(e="",t){return ci(new x3(e,t))}s(b3,"Fe");function E3(e){return e instanceof x3}s(E3,"Le");var S3="data-language";function T3(e){return e.style.fontFamily.match("monospace")!==null}s(T3,"Ee");function $g(e){let t=e.parentElement;for(;t!==null;){if(T3(t))return!0;t=t.parentElement}return!1}s($g,"Me");var pH=oE([{$import:s((e,t)=>e.$importChildren(t),"$import"),match:zt.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),mH={$import:s((e,t)=>[un(t.getAttribute(S3)).splice(0,0,e.$importChildren(t))],"$import"),match:zt.tag("pre"),name:"@lexical/code/pre"},_H={$import:s((e,t,n)=>{const r=t.textContent||"";return/\r?\n/.test(r)||t.querySelector("br")!==null?[un(t.getAttribute(S3)).splice(0,0,e.$importChildren(t))]:n()},"$import"),match:zt.tag("code"),name:"@lexical/code/code-multiline"};function hc(e){if(!Ke(e))return!1;const t=e.style.fontFamily,n=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof n=="string"&&n.startsWith("pre")}s(hc,"Ie");function vH(e){let t=!1;const n=[];let r="",i=!1;const o=s(()=>{i&&(n.push(r),r="",i=!1)},"o");for(const l of Array.from(e.childNodes))if(Ke(l))l.tagName==="DIV"?(o(),n.push(l.textContent||""),t=!0):l.tagName==="BR"?(o(),n.push(""),t=!0):(r+=l.textContent||"",i=!0);else if(xd(l)){const a=l.textContent||"";a.length>0&&(r+=a,i=!0)}return o(),t?n:null}s(vH,"je");var $z=oE([{$import:s((e,t,n)=>{if(!hc(t)||$g(t))return n();const r=vH(t);return r===null||r.length===0?n():[un().splice(0,0,kh(r.join(`
63
+ `)))]},"$import"),match:zt.tag("div"),name:"@lexical/code/vscode-wrapper"},{$import:s((e,t,n)=>{if(!hc(t)||$g(t))return n();const r=t.previousElementSibling;if(r&&hc(r))return[];const i=[];let o=t;for(;o&&hc(o);)i.push(o.tagName==="BR"?"":o.textContent||""),o=o.nextElementSibling;return i.length<2?n():[un().splice(0,0,kh(i.join(`
64
+ `)))]},"$import"),match:zt.tag("div","br"),name:"@lexical/code/vscode-line-run"}]),yH={$import:s((e,t,n)=>T3(t)?[un().splice(0,0,e.$importChildren(t))]:$g(t)?e.$importChildren(t):n(),"$import"),match:zt.tag("div"),name:"@lexical/code/div"},Pz=[{$import:s((e,t)=>[un().splice(0,0,e.$importChildren(t,{rules:pH}))],"$import"),match:zt.tag("table").classAll("js-file-line-container"),name:"@lexical/code/github-code-table"},{$import:s((e,t)=>e.$importChildren(t),"$import"),match:zt.tag("td").classAll("js-file-line"),name:"@lexical/code/github-code-cell-by-class"},_H,mH,yH];function Pg(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}s(Pg,"Q");function xH(e){const t=Pg(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}s(xH,"V");var ex=/[!-/:-@[-`{-~\s]/;function tx(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,n)=>String.fromCodePoint(Number(n)))}s(tx,"nt");var CH=/^(\s*)(\d{1,})\.\s/,bH=/^(\s*)[-*+]\s/,EH=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,SH=/^(#{1,6})\s/,TH=/^>\s/,wH=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,kH=/^[ \t]*`{3,}$/,hl=Aa("mdListMarker",{parse:s(e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-","parse"),resetOnCopyNode:!0}),nx=Aa("mdCodeFence",{parse:s(e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```","parse"),resetOnCopyNode:!0}),MH=Aa("mdHardLineBreak",{parse:s(e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"","parse"),resetOnCopyNode:!0});function AH(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}s(AH,"It");function IH(e){const t=e.getChildren(),n=t.length-1,r=t[n];if(!Ae(r))return null;const i=r.getTextContent(),o=AH(i);if(o!==null){const[l,a]=o;return r.setTextContent(l),a}return/^ {2,}$/.test(i)&&(function(l,a){for(let c=a-1;c>=0;c--){if(Dr(l[c]))return!1;if(/\S/.test(l[c].getTextContent()))return!0}return!1})(t,n)?(r.setTextContent(""),i):null}s(IH,"Tt");function NH(e){const t=Or(),n=IH(e);return n!==null&&us(t,MH,n),t}s(NH,"$t");var w3=s(e=>(t,n,r,i)=>{const o=e(r);o.append(...n),t.replace(o),i||o.select(0,0)},"Et"),W1=s(e=>(t,n,r,i)=>{const o=t.getPreviousSibling(),l=t.getNextSibling(),a=Qn(e==="check"?r[3]==="x":void 0),c=r[0].trim()[0],u=e!=="bullet"&&e!=="check"||c!==hl.parse(c)?void 0:c;if(Ee(l)&&l.getListType()===e){u&&us(l,hl,u);const f=l.getFirstChild();f!==null?f.insertBefore(a):l.append(a),e==="number"&&l.setStart(Number(r[2])),t.remove()}else if(Ee(o)&&o.getListType()===e)u&&us(o,hl,u),o.append(a),t.remove();else{const f=Zn(e,e==="number"?Number(r[2]):void 0);u&&us(f,hl,u),f.append(a),t.replace(f)}a.append(...n),i||a.select(0,0);const d=(function(f){const h=f.match(/\t/g),g=f.match(/ /g);let p=0;return h&&(p+=h.length),g&&(p+=Math.floor(g.length/4)),p})(r[1]);d&&a.setIndent(d)},"vt"),Wd=s((e,t,n,r)=>{const i=[],o=e.getChildren();let l=0;for(const a of o)if(ke(a)){if(a.getChildrenSize()===1){const g=a.getFirstChild();if(Ee(g)){const p=Wd(g,t,n+1,r);p&&i.push(p);continue}}if(r&&!a.getChildren().some(g=>g.isSelected(r)))continue;const c=" ".repeat(4*n),u=e.getListType(),d=Xp(e,hl),f=u==="number"?`${e.getStart()+l}. `:u==="check"?`${d} [${a.getChecked()?"x":" "}] `:d+" ";let h=t(a);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(c+f+h),l++}return i.join(`
65
+ `)},"yt"),OH={dependencies:[Ra],export:s((e,t)=>{if(!kd(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},"export"),regExp:SH,replace:w3(e=>{const t="h"+e[1].length;return Ar(t)}),triggerOnEnter:!0,type:"element"},k3={dependencies:[wd],export:s((e,t)=>{if(!Kh(e))return null;const n=t(e).split(`
66
+ `),r=[];for(const i of n)r.push("> "+i);return r.join(`
67
+ `)},"export"),regExp:TH,replace:s((e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(Kh(o))return o.splice(o.getChildrenSize(),0,[NH(o),...t]),void e.remove()}const i=Fs();i.append(...t),e.replace(i),r||i.select(0,0)},"replace"),triggerOnEnter:!0,type:"element"},Ml={dependencies:[U1],export:s(e=>{if(!ua(e))return null;const t=e.getTextContent();let n=Xp(e,nx);if(t.indexOf(n)>-1){const r=t.match(/`{3,}/g);if(r){const i=Math.max(...r.map(o=>o.length));n="`".repeat(i+1)}}return n+(e.getLanguage()||"")+(t?`
68
+ `+t:"")+`
69
+ `+n},"export"),handleImportAfterStartMatch:s(({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{const i=r[1],o=i.trim().length,l=e[n],a=r.index+i.length,c=l.slice(a),u=new RegExp(`\`{${o},}$`);if(u.test(c)){const g=c.match(u),p=c.slice(0,c.lastIndexOf(g[0])),_=[...r];return _[2]="",Ml.replace(t,null,_,g,[p],!0),[!0,n]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let g=n+1;g<e.length;g++){const p=e[g];if(d.test(p)){const _=p.match(d),y=e.slice(n+1,g),v=l.slice(r[0].length);return v.length>0&&y.unshift(v),Ml.replace(t,null,r,_,y,!0),[!0,g]}}const f=e.slice(n+1),h=l.slice(r[0].length);return h.length>0&&f.unshift(h),Ml.replace(t,null,r,null,f,!0),[!0,e.length-1]},"handleImportAfterStartMatch"),regExpEnd:{optional:!0,regExp:kH},regExpStart:wH,replace:s((e,t,n,r,i,o)=>{let l,a;const c=n[1]?n[1].trim():"```",u=n[2]||void 0;if(!t&&i){if(i.length===1)r?(l=un(u),a=i[0]):(l=un(u),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(l=un(u),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();a=i.join(`
70
+ `)}us(l,nx,c);const d=pr(a);l.append(d),e.append(l)}else t&&w3(d=>un(d?d[2]:void 0))(e,t,n,o)},"replace"),type:"multiline-element"},z1={dependencies:[vi,_i],export:s((e,t,n)=>Ee(e)?Wd(e,t,0,n):null,"export"),regExp:bH,replace:W1("bullet"),triggerOnEnter:!0,type:"element"},M3={dependencies:[vi,_i],export:s((e,t,n)=>Ee(e)?Wd(e,t,0,n):null,"export"),regExp:EH,replace:W1("check"),triggerOnEnter:!0,type:"element"},j1={dependencies:[vi,_i],export:s((e,t,n)=>Ee(e)?Wd(e,t,0,n):null,"export"),regExp:CH,replace:W1("number"),triggerOnEnter:!0,type:"element"},A3={format:["code"],tag:"`",type:"text-format"},DH={format:["highlight"],tag:"==",type:"text-format"},I3={format:["bold","italic"],tag:"***",type:"text-format"},N3={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},O3={format:["bold"],tag:"**",type:"text-format"},D3={format:["bold"],intraword:!1,tag:"__",type:"text-format"},RH={format:["strikethrough"],tag:"~~",type:"text-format"},R3={format:["italic"],tag:"*",type:"text-format"},L3={format:["italic"],intraword:!1,tag:"_",type:"text-format"},$3={dependencies:[Vr],export:s((e,t,n)=>{if(!St(e)||ln(e))return null;const r=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${r}](${e.getURL()} "${i}")`:`[${r}](${e.getURL()})`},"export"),importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:s((e,t)=>{if(dt(e,St))return;const[,n,r,i]=t,o=r!=null?tx(r):void 0,l=i!=null?tx(i):void 0,a=ai(o,{title:l}),c=n.split("[").length-1,u=n.split("]").length-1;let d=n,f="";if(c<u)return;if(c>u){const g=n.split("[");f="["+g[0],d=g.slice(1).join("[")}const h=pr(d);return h.setFormat(e.getFormat()),a.append(h),e.replace(a),f&&a.insertBefore(pr(f)),h},"replace"),trigger:")",type:"text-match"},LH=[OH,k3,z1,j1],$H=[Ml],PH=[A3,I3,N3,O3,D3,DH,R3,L3,RH],FH=[$3],P3=[...LH,...$H,...PH,...FH];function rx(e){return Ae(e)&&!e.hasFormat("code")}s(rx,"se");function VH(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw 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.`)}s(VH,"ue");function ix(e,t,n,r,i){const o=e.getParent();if(!xn(o)||e.getFirstChild()!==t)return!1;const l=t.getTextContent();if(!i&&l[n-1]!==" ")return!1;for(const{regExp:a,replace:c}of r){const u=l.match(a),d=i||u&&u[0].endsWith(" ")?n:n-1;if(u&&u[0].length===d){const f=t.getNextSiblings(),[h,g]=t.splitText(n);if(c(e,g?[g,...f]:f,u,!1)!==!1)return h.remove(),!0}}return!1}s(ix,"de");function ox(e,t,n,r,i){const o=e.getParent();if(!xn(o)||e.getFirstChild()!==t)return!1;const l=t.getTextContent();if(!i&&l[n-1]!==" ")return!1;for(const{regExpStart:a,replace:c,regExpEnd:u}of r){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=l.match(a);if(d){const f=i||d[0].endsWith(" ")?n:n-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[g,p]=t.splitText(n);if(c(e,p?[p,...h]:h,d,null,null,!1)!==!1)return g.remove(),!0}}return!1}s(ox,"ge");function BH(e,t){let n=0;const r=e.getTextContent();for(let i=0;i<t;i++)r[i]==="`"&&n++;return n%2!=0}s(BH,"he");function sx(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(F3(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}s(sx,"pe");function F3(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}s(F3,"xe");function HH(e,t=P3){const n=xH(t),r=n.element.filter(c=>c.triggerOnEnter),i=Pg(n.textFormat,({tag:c})=>c[c.length-1]),o=Pg(n.textMatch,({trigger:c})=>c),l=new Set([" "]);for(const c of n.textFormat)l.add(c.tag.slice(-1));for(const c of n.textMatch)c.trigger!==void 0&&l.add(c.trigger);for(const c of t){const u=c.type;if(u==="element"||u==="text-match"||u==="multiline-element"){const d=c.dependencies;for(const f of d)e.hasNode(f)||VH(173,f.getType())}}const a=s((c,u,d)=>!!ix(c,u,d,n.element)||!!ox(c,u,d,n.multilineElement)||!!(function(f,h,g){let p=f.getTextContent();const _=g[p[h-1]];if(_==null)return!1;h<p.length&&(p=p.slice(0,h));for(const y of _){if(!y.replace||!y.regExp)continue;const v=p.match(y.regExp);if(v===null)continue;const x=v.index||0,C=x+v[0].length;let b;return x===0?[b]=f.splitText(C):[,b]=f.splitText(x,C),b.selectNext(0,0),y.replace(b,v),!0}return!1})(u,d,o)||!!(function(f,h,g){const p=f.getTextContent(),_=h-1,y=p[_],v=g[y];if(!v)return!1;for(const x of v){const{tag:C}=x,b=C.length,S=_-b+1;if(b>1&&!F3(p,S,C,0,b)||p[S-1]===" ")continue;const M=p[_+1];if(x.intraword===!1&&M&&!ex.test(M))continue;const T=f;let E=T,A=sx(p,S,C),D=E;for(;A<0&&(D=D.getPreviousSibling())&&!Dr(D);)if(Ae(D)){if(D.hasFormat("code"))continue;const me=D.getTextContent();E=D,A=sx(me,me.length,C)}if(A<0||E===T&&A+b===S)continue;const L=E.getTextContent();if(A>0&&L[A-1]===y)continue;const G=L[A-1];if(x.intraword===!1&&G&&!ex.test(G)||!x.format.includes("code")&&BH(E,A))continue;const $=T.getTextContent(),z=$.slice(0,S)+$.slice(_+1);T.setTextContent(z);const W=E===T?z:L;E.setTextContent(W.slice(0,A)+W.slice(A+b));const ye=re(),q=gd();Xn(q);const ge=_-b*(E===T?2:1)+1;q.anchor.set(E.__key,A,"text"),q.focus.set(T.__key,ge,"text");for(const me of x.format)q.formatText(me,d7[me]);q.anchor.set(q.focus.key,q.focus.offset,q.focus.type);for(const me of x.format)q.hasFormat(me)&&q.toggleFormat(me);return ie(ye)&&(q.format=ye.format),!0}return!1})(u,d,i),"f");return At(e.registerUpdateListener(({tags:c,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(c.has(HA)||c.has(ho)||e.isComposing())return;const h=c.has(Z2),g=d.read(re),p=f.read(re);if(!ie(p)||!ie(g)||!g.isCollapsed()||g.is(p)&&!h)return;const _=g.anchor.key,y=g.anchor.offset,v=d._nodeMap.get(_);if(Ae(v)&&u.has(_)&&(h||y===1||!(y>p.anchor.offset+1))){if(h){const x=d.read(()=>v.getTextContent())[y-1];if(!l.has(x))return}e.update(()=>{if(!rx(v))return;const x=v.getParent();x===null||ua(x)||a(x,v,g.anchor.offset)&&Th(rb)})}}),e.registerCommand(vd,c=>{if(c!==null&&c.shiftKey)return!1;const u=re();if(!ie(u)||!u.isCollapsed())return!1;const d=u.anchor.offset,f=u.anchor.getNode();if(!Ae(f)||!rx(f))return!1;const h=f.getParent();return h===null||ua(h)?!1:d===f.getTextContent().length&&!(!ox(h,f,d,n.multilineElement,!0)&&!ix(h,f,d,r,!0))&&(c!==null&&c.preventDefault(),!0)},st))}s(HH,"me");var KH=[{dependencies:[Da],export:s(e=>Ub(e)?"***":null,"export"),regExp:/^(---|\*\*\*|___)\s?$/,replace:s((e,t,n,r)=>{const i=Sd();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},"replace"),triggerOnEnter:!0,type:"element"},...P3];function Kf({transformers:e=KH}){const[t]=fn();return(0,m.useEffect)(()=>HH(t,e),[t,e]),null}s(Kf,"m");var UH=En({init(e){const t=e.getValue(gS),n=JH(t,t.includes("headings")?e.getValue(ku):[]),r=n.filter(i=>!jH.has(i));e.pubIn({[Vs]:()=>m.createElement(Kf,{transformers:n}),[km]:()=>m.createElement(Kf,{transformers:n}),[hS]:()=>m.createElement(Kf,{transformers:r})})}}),WH=s(e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},"createBlockNode"),zH={dependencies:[Od],export:s(e=>Ub(e)?"***":null,"export"),regExp:/^(---|\*\*\*|___)\s?$/,replace:s((e,t,n,r)=>{const i=$a();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},"replace"),type:"element"},jH=new Set([j1,z1,M3]);function JH(e,t){const n=[I3,N3,O3,D3,A3,R3,L3];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),l={dependencies:[Ra],export:s((a,c)=>{if(!kd(a))return null;const u=Number(a.getTag().slice(1));return"#".repeat(u)+" "+c(a)},"export"),regExp:o,replace:WH(a=>{const c=`h${a[1].length}`;return Ar(c)}),type:"element"};n.push(l)}if(e.includes("thematicBreak")&&n.push(zH),e.includes("quote")&&n.push(k3),e.includes("link")&&n.push($3),e.includes("lists")&&n.push(j1,z1,M3),e.includes("codeblock")){const r={...Ml,dependencies:[Fd],replace:s((i,o,l)=>{const a=Va({code:"",language:l[1]??"",meta:""});i.selectPrevious(),i.replace(a),setTimeout(()=>{a.select()},80)},"replace")};n.push(r)}return n}s(JH,"pickTransformersForActivePlugins");var GH=/^(agent|project|user|skill|routine):\/\//,Fg=class Vg extends Vr{static{s(this,"MentionAwareLinkNode")}static getType(){return"mention-aware-link"}static clone(t){return new Vg(t.getURL(),{rel:t.getRel(),target:t.getTarget(),title:t.getTitle()},t.getKey())}static importJSON(t){return new Vg(t.url??"",{rel:t.rel??null,target:t.target??null,title:t.title??null})}constructor(t,n,r){super(t,n,r)}sanitizeUrl(t){return GH.test(t)?t:super.sanitizeUrl(t)}};function qH(e){return{url:e.getURL(),attributes:{rel:e.getRel(),target:e.getTarget(),title:e.getTitle()}}}s(qH,"getMentionAwareLinkNodeInit");var ZH={replace:Vr,with:s(e=>{const{url:t,attributes:n}=qH(e);return new Fg(t,n)},"with"),withKlass:Fg};function lx(e){return!!(e&&St(e)&&Ug(e.getURL()))}s(lx,"isMentionLinkNode");function uo(e){if(!e)return null;if(lx(e))return e;let t=e.getParent();for(;t;){if(lx(t))return t;t=t.getParent()}return null}s(uo,"findMentionLinkNode");function YH(e,t){const n=e.getNode(),r=uo(n);if(r)return r;if(e.type==="element"&&xe(n)){const i=t==="backward"?e.offset-1:e.offset;return i<0?null:uo(n.getChildAtIndex(i))}if(e.type==="text"&&Ae(n)){if(t==="backward"&&e.offset===0)return uo(n.getPreviousSibling());if(t==="forward"&&e.offset===n.getTextContentSize())return uo(n.getNextSibling())}return null}s(YH,"findMentionLinkNodeAtPoint");function XH(e){const t=re();if(!t)return null;if(He(t)){const[i]=t.getNodes();return i?uo(i):null}if(!ie(t))return null;const n=uo(t.anchor.getNode()),r=uo(t.focus.getNode());return n&&r&&n.is(r)?n:t.isCollapsed()?YH(t.anchor,e):null}s(XH,"findMentionLinkForDeletion");function QH(e){const t=XH(e);if(!t)return!1;const n=t.getPreviousSibling(),r=t.getNextSibling(),i=t.getParentOrThrow();return t.remove(),e==="backward"?n?(n.selectEnd(),!0):r?(r.selectStart(),!0):(i.selectStart(),!0):r?(r.selectStart(),!0):n?(n.selectEnd(),!0):(i.selectEnd(),!0)}s(QH,"deleteSelectedMentionChip");function ax(e,t){return QH(e)?(t?.preventDefault(),t?.stopPropagation(),!0):!1}s(ax,"handleMentionDelete");var eK=En({init(e){e.pub(Nd,[t=>t.registerCommand(_d,n=>ax("backward",n),Jl),t=>t.registerCommand(om,n=>ax("forward",n),Jl)])}}),tK=[/^#{1,6}\s+/m,/^>\s+/m,/^[-*+]\s+/m,/^\d+\.\s+/m,/^```/m,/^~~~/m,/^\|.+\|$/m,/^---$/m,/^\*\*\*$/m,/^___$/m];function nK(e){return e.replace(/\r\n?/g,`
71
+ `)}s(nK,"normalizePastedMarkdown");function V3(e){const t=nK(e).trim();return t?tK.some(n=>n.test(t)):!1}s(V3,"looksLikeMarkdownPaste");function B3(e){let t=e.replace(/\r\n/g,`
72
+ `).replace(/\r/g,`
73
+ `);const n=t.split(`
74
+ `);if(n.length<=1)return t;let r=1/0,i=null;for(const o of n){if(o.trim()==="")continue;const l=o.match(/^(\s+)/);if(l){const a=l[1],c=a.includes(" ")?"tabs":"spaces";if(i&&i!==c)return t;i=c,r=Math.min(r,a.length)}else{r=0;break}}return r>0&&r<1/0&&(t=n.map(o=>o.trim()===""?"":o.slice(r)).join(`
75
+ `)),t}s(B3,"normalizeMarkdown");var rK=/[A-Za-z!/?]/,iK=/^( {0,3}(?:(?:> ?|(?:[-+*]|\d{1,9}[.)]) +))*)(`{3,}|~{3,})(.*)$/,oK=/(?:[-+*]|\d{1,9}[.)]) +/g,sK=/>/g,lK=/^( *)(`{3,}|~{3,})[ \t]*$/,aK=/^ {0,3}(?:> ?)+/,cK=/^(?: {4}|\t)/,uK=/^<[A-Za-z][A-Za-z0-9+.-]{1,31}:[^\s<>\x00-\x1f]*>/,dK=/^<[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*>/,fK=/^<[^<>\n]*>/;function cx(e){return e!==void 0&&rK.test(e)}s(cx,"isHtmlOpener");function hK(e,t){let n=e;for(let r=0;r<t;r+=1){const i=/^ {0,3}> ?/.exec(n);if(!i)return null;n=n.slice(i[0].length)}return n}s(hK,"stripBlockquotePrefix$1");function gK(e,t,n){let r=t;for(;r<e.length;){if(e[r]!=="`"){r+=1;continue}let i=1;for(;e[r+i]==="`";)i+=1;if(i===n)return r+i;r+=i}return-1}s(gK,"findCodeSpanEnd");function ux(e,t){const n=uK.exec(e)??dK.exec(e);if(n)return n[0];if(t.endsWith("](")){const r=fK.exec(e);if(r)return r[0]}return null}s(ux,"matchProtectedConstruct");function pK(e,t){let n="",r=0;for(;r<e.length;){const i=e[r];if(i==="`"){let o=1;for(;e[r+o]==="`";)o+=1;const l=gK(e,r+o,o);if(l!==-1){n+=e.slice(r,l),r=l;continue}n+=e.slice(r,r+o),r+=o;continue}if(i==="\\"){if(t==="unescape"&&e[r+1]==="<"&&cx(e[r+2])&&ux(e.slice(r+1),n)===null){n+="<",r+=2;continue}n+=e.slice(r,r+2),r+=2;continue}if(t==="escape"&&i==="<"&&cx(e[r+1])){const o=ux(e.slice(r),n);if(o){n+=o,r+=o.length;continue}n+="\\<",r+=1;continue}n+=i,r+=1}return n}s(pK,"transformInlineChunk");function H3(e,t){const n=e.split(`
76
+ `),r=[];let i=[];const o=s(()=>{i.length!==0&&(r.push(pK(i.join(`
77
+ `),t)),i=[])},"flushChunk");let l="",a=0,c=0,u=3,d=!1;for(const f of n){if(l){o(),r.push(f);const p=hK(f,c),_=p?lK.exec(p):null;if(_){const y=_[1].length,v=_[2];y<=u&&v[0]===l&&v.length>=a&&(l="",a=0,c=0,u=3)}continue}const h=iK.exec(f);if(h){const p=h[1],_=h[2],y=_[0],v=h[3];if(!(y==="`"&&v.includes("`"))){const x=p.match(oK)??[];o(),r.push(f),l=y,a=_.length,c=(p.match(sK)??[]).length,u=(x.length>0?x.reduce((C,b)=>C+b.length,0):0)+3,d=!1;continue}}const g=f.replace(aK,"");if(g.trim().length===0){o(),r.push(f),d=!1;continue}if(!d&&cK.test(g)){o(),r.push(f);continue}d=!0,i.push(f)}return o(),r.join(`
78
+ `)}s(H3,"transformAngleBrackets");function Bg(e){return e.includes("<")?H3(e,"escape"):e}s(Bg,"escapeUnsupportedAngleBrackets");function mK(e){return e.includes("\\<")?H3(e,"unescape"):e}s(mK,"unescapeAngleBracketEscapes");var _K=/^( {0,3}(?:(?:> ?|(?:[-+*]|\d{1,9}[.)]) +))*)(`{3,}|~{3,})(.*)$/,vK=/(?:[-+*]|\d{1,9}[.)]) +/g,yK=/>/g,xK=/^( *)(`{3,}|~{3,})[ \t]*$/,dx=/^( {0,3})\\>/;function CK(e,t){let n=e;for(let r=0;r<t;r+=1){const i=/^ {0,3}> ?/.exec(n);if(!i)return null;n=n.slice(i[0].length)}return n}s(CK,"stripBlockquotePrefix");function K3(e){if(!e.includes("\\>"))return e;const t=e.split(`
79
+ `);let n="",r=0,i=0,o=3;for(let l=0;l<t.length;l+=1){const a=t[l];if(n){const u=CK(a,i),d=u?xK.exec(u):null;if(d){const f=d[1].length,h=d[2];f<=o&&h[0]===n&&h.length>=r&&(n="",r=0,i=0,o=3)}continue}const c=_K.exec(a);if(c){const u=c[1],d=c[2],f=d[0],h=c[3];if(!(f==="`"&&h.includes("`"))){const g=u.match(vK)??[];n=f,r=d.length,i=(u.match(yK)??[]).length,o=(g.length>0?g.reduce((p,_)=>p+_.length,0):0)+3;continue}}dx.test(a)&&(t[l]=a.replace(dx,"$1>"))}return t.join(`
80
+ `)}s(K3,"unescapeBlockquoteMarkers");var bK=En({init(e){e.pub(Nd,[t=>{let n=!1;return t.registerCommand(Gl,r=>{if(n)return n=!1,!1;const i=r instanceof ClipboardEvent?r.clipboardData:null;if(!i)return!1;const o=i.getData("text/plain");if(!o||i.getData("text/html")||V3(o))return!1;const l=B3(o);if(l===o)return!1;r instanceof ClipboardEvent&&r.preventDefault();const a=new DataTransfer;a.setData("text/plain",l);const c=new ClipboardEvent("paste",{clipboardData:a,bubbles:!0,cancelable:!0});return n=!0,t.dispatchCommand(Gl,c),!0},Rr)}])}}),EK={list:s((e,t={})=>{const n=new URLSearchParams;t.q&&n.set("q",t.q),t.sort&&n.set("sort",t.sort),t.scope&&n.set("scope",t.scope);for(const i of t.categories??[])n.append("categories[]",i);for(const i of t.include??[])n.append("include[]",i);const r=n.toString();return Ie.get(`/companies/${encodeURIComponent(e)}/skills${r?`?${r}`:""}`)},"list"),categories:s(e=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/categories`),"categories"),detail:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`),"detail"),versions:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions`),"versions"),version:s((e,t,n)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions/${encodeURIComponent(n)}`),"version"),createVersion:s((e,t,n={})=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions`,n),"createVersion"),testInputs:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs`),"testInputs"),createTestInput:s((e,t,n)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs`,n),"createTestInput"),updateTestInput:s((e,t,n,r)=>Ie.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs/${encodeURIComponent(n)}`,r),"updateTestInput"),deleteTestInput:s((e,t,n)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs/${encodeURIComponent(n)}`),"deleteTestInput"),testRunTemplates:s(e=>Ie.get(`/companies/${encodeURIComponent(e)}/skill-test-run-templates`),"testRunTemplates"),createTestRunTemplate:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skill-test-run-templates`,t),"createTestRunTemplate"),updateTestRunTemplate:s((e,t,n)=>Ie.patch(`/companies/${encodeURIComponent(e)}/skill-test-run-templates/${encodeURIComponent(t)}`,n),"updateTestRunTemplate"),deleteTestRunTemplate:s((e,t)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skill-test-run-templates/${encodeURIComponent(t)}`),"deleteTestRunTemplate"),testRuns:s((e,t,n={})=>{const r=new URLSearchParams;n.inputId&&r.set("inputId",n.inputId);const i=r.toString();return Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs${i?`?${i}`:""}`)},"testRuns"),testRunDetail:s((e,t,n)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}`),"testRunDetail"),createTestRun:s((e,t,n)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs`,n),"createTestRun"),cancelTestRun:s((e,t,n)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}/cancel`,{}),"cancelTestRun"),deleteTestRun:s((e,t,n)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}`),"deleteTestRun"),star:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/star`,{}),"star"),unstar:s((e,t)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/star`),"unstar"),fork:s((e,t,n={})=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/fork`,n),"fork"),forkPrecheck:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/fork-precheck`),"forkPrecheck"),comments:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments`),"comments"),createComment:s((e,t,n)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments`,n),"createComment"),updateComment:s((e,t,n,r)=>Ie.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments/${encodeURIComponent(n)}`,r),"updateComment"),deleteComment:s((e,t,n)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments/${encodeURIComponent(n)}`),"deleteComment"),updateStatus:s((e,t)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/update-status`),"updateStatus"),file:s((e,t,n)=>Ie.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files?path=${encodeURIComponent(n)}`),"file"),updateFile:s((e,t,n,r,i={})=>Ie.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files`,{path:n,content:r,...i}),"updateFile"),deleteFile:s((e,t,n)=>Ie.deleteWithBody(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files`,n),"deleteFile"),create:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills`,t),"create"),update:s((e,t,n)=>Ie.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`,n),"update"),importFromSource:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/import`,{source:t}),"importFromSource"),browseProject:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/browse-project`,t),"browseProject"),scanProjects:s((e,t={})=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/scan-projects`,t),"scanProjects"),installUpdate:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/install-update`,{}),"installUpdate"),delete:s((e,t)=>Ie.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`),"delete"),catalogList:s((e={})=>{const t=new URLSearchParams;e.kind&&t.set("kind",e.kind),e.category&&t.set("category",e.category),e.q&&t.set("q",e.q);const n=t.toString();return Ie.get(`/skills/catalog${n?`?${n}`:""}`)},"catalogList"),catalogDetail:s(e=>Ie.get(`/skills/catalog/${encodeURIComponent(e)}`),"catalogDetail"),catalogFile:s((e,t="SKILL.md")=>Ie.get(`/skills/catalog/${encodeURIComponent(e)}/files?path=${encodeURIComponent(t)}`),"catalogFile"),installCatalog:s((e,t)=>Ie.post(`/companies/${encodeURIComponent(e)}/skills/install-catalog`,t),"installCatalog")},SK=["/steer","/queue"];function TK(e){return SK.includes(e)}s(TK,"isDeliveryCommand");var wK=["goal","steer","queue"];function fx(e){return wK.includes(e)}s(fx,"isAbsorbableCommand");function hx(e,t){return e===""||e===t?!0:t==="goal"&&e==="go"}s(hx,"labelMatchesCommand");function kK(e){const t=e.trim(),n=t.match(/^\[\/([A-Za-z]*)[ \t\u00a0]*\]\(<(\/[A-Za-z]+(?:[ \t\u00a0].*)?)>\)$/s);if(n){const i=n[1],o=n[2].replaceAll(" "," "),l=o.slice(1).split(/[ \t]/)[0]??"";return fx(l)&&hx(i,l)?o:t.replaceAll(" "," ")}const r=t.match(/^\[\/([A-Za-z]*)[ \t\u00a0]*\]\((\/[A-Za-z]+(?:%20|%C2%A0).*)\)$/s);if(r){const i=r[1],o=r[2],l=decodeURIComponent(o.slice(1).split(/(?:%20|%C2%A0)/)[0]??"");if(fx(l)&&hx(i,l))try{return decodeURIComponent(o).replaceAll(" "," ")}catch{return t}}return t.replaceAll(" "," ")}s(kK,"normalizeComposerCommandText");function Fz(e){const t=kK(e);if(!t)return{matched:!1};const n=t.search(/\s/),r=n===-1?t:t.slice(0,n);if(!TK(r))return{matched:!1};const i=n===-1?"":t.slice(n).trim();return i?{matched:!0,command:{mode:r.slice(1),prompt:i}}:{matched:!0,error:`${r} needs a message. Type ${r} followed by what you want to send.`}}s(Fz,"parseMessageDeliveryCommand");var MK=[{id:"action:steer",kind:"action",command:"steer",name:"Steer",description:"Send into the agent's running turn now.",aliases:["steer","steering","steered","now"]},{id:"action:queue",kind:"action",command:"queue",name:"Queue",description:"Queue for the next turn boundary.",aliases:["queue","queued","later","next"]}],AK={not_requested:"",board_only:"an agent cannot steer the turn running its own task, and board steering needs a signed-in board user.",identity_mismatch:"the message answers to a different user than the running turn does.",no_active_run:"there was no active run to steer.",legacy_protocol:"this runner's session protocol cannot accept a mid-turn steer.",conversation_order:"an earlier chat message is still waiting, or this message resets the chat, so it keeps its place in line.",steering_failed:"the steer did not land, so the message is queued and will be read at the next turn."},IK="this task could not be steered mid-turn.";function Vz(e){if(!e||e.deliveredAs==="steered")return null;const t=e.steeringUnavailable??null;return!t||t==="not_requested"?null:`Queued instead of steering the running turn — ${AK[t]??IK}`}s(Vz,"describeDeliveryDowngrade");function Bz(e){return e?.comment??void 0}s(Bz,"deliveryDispositionFromIssueUpdate");var U3=(0,m.createContext)({slashCommands:[]});function Hz({children:e}){const{selectedCompanyId:t}=Ok(),{data:n=[]}=q1({queryKey:t?G1.companySkills.list(t):["company-skills","__none__"],queryFn:s(()=>EK.list(t),"queryFn"),enabled:!!t}),{data:r=[]}=q1({queryKey:t?G1.routines.list(t):["routines","__none__","__all-projects__"],queryFn:s(()=>o9.list(t),"queryFn"),enabled:!!t}),i=(0,m.useMemo)(()=>({slashCommands:[...MK,...n.map(o=>({id:`skill:${o.id}`,kind:"skill",skillId:o.id,key:o.key,name:o.name,slug:o.slug,description:o.description??null,href:dk(o.id,o.slug),aliases:[o.slug,o.name,o.key]})),...r.filter(o=>o.status!=="archived").sort((o,l)=>o.title.localeCompare(l.title)).map(o=>({id:`routine:${o.id}`,kind:"routine",routineId:o.id,name:o.title,status:o.status,href:yx(o.id),aliases:[`routine:${o.title}`,o.title,o.id]}))]}),[n,r]);return(0,ee.jsx)(U3.Provider,{value:i,children:e})}s(Hz,"EditorAutocompleteProvider");function NK(){return(0,m.useContext)(U3)}s(NK,"useEditorAutocomplete");var Kz=_x({MarkdownEditor:s(()=>rU,"MarkdownEditor"),computeMentionMenuPosition:s(()=>G3,"computeMentionMenuPosition"),findClosestAutocompleteAnchor:s(()=>ek,"findClosestAutocompleteAnchor"),findMentionMatch:s(()=>J3,"findMentionMatch"),isSameAutocompleteSession:s(()=>Q3,"isSameAutocompleteSession"),issueMentionTitle:s(()=>Z3,"issueMentionTitle"),placeCaretAfterMentionAnchor:s(()=>tk,"placeCaretAfterMentionAnchor"),placeCaretAtEditableEnd:s(()=>nk,"placeCaretAtEditableEnd"),shouldAcceptAutocompleteKey:s(()=>X3,"shouldAcceptAutocompleteKey")}),OK=class extends m.Component{static{s(this,"MarkdownEditorRichErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e)}render(){return this.state.hasError?null:this.props.children}};function Uf(e,t){const n=new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);return n?.[2]??n?.[3]??n?.[4]??null}s(Uf,"readHtmlAttribute");function DK(e){return e==="delete_small"?(0,ee.jsx)(r9,{"aria-hidden":!0}):vS[e]}s(DK,"editorIconFor");function RK(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(t,n)=>{const r=Uf(n,"src");if(!r)return t;const i=Uf(n,"alt")??"image",o=Uf(n,"title"),l=i.replace(/[[\]]/g,"\\$&"),a=o?.replace(/"/g,'\\"');return a?`![${l}](${r} "${a}")`:`![${l}](${r})`})}s(RK,"convertHtmlImagesToMarkdown");function gx(e){const t=e.replace(/\r\n/g,`
81
+ `).replace(/\r/g,`
82
+ `),n=RK(K3(t));return Bg(n)}s(gx,"prepareMarkdownForEditor");function gc(e){return mK(K3(e))}s(gc,"toStoredMarkdown");function LK(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(LK,"escapeRegExp");function W3(e){if(!e)return!1;if(e.nodeType===Node.TEXT_NODE)return(e.textContent??"").trim().length>0;if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return["IMG","HR","TABLE","VIDEO","IFRAME"].includes(t.tagName)?!0:Array.from(t.childNodes).some(n=>W3(n))}s(W3,"hasMeaningfulEditorContent");function $K(e){return/!\[[\s\S]*?\]\([^)]+\)/.test(e)}s($K,"hasMarkdownImage");function PK(e,t,n){const r=t.trim();if(!r)return!1;const i=$K(r),o=(e.textContent??"").trim();if(o.length===0)return i?!1:!Array.from(e.childNodes).some(a=>W3(a));const l=n?.trim();return l&&o===l&&r!==l?!i:!1}s(PK,"isRichEditorDomEmpty");function FK(e){const t=e.trim();return t?!/^(javascript|data|vbscript):/i.test(t):!0}s(FK,"isSafeMarkdownLinkUrl");function px(e){return e instanceof Error?e.message:typeof e=="string"?e:"Rich editor failed to render"}s(px,"richEditorErrorMessage");var VK=100,BK=200,z3=188,j3=208,Wf=8,HK=34,KK=8,mx=50,UK=10,WK={txt:"Text",md:"Markdown",js:"JavaScript",jsx:"JavaScript (JSX)",ts:"TypeScript",tsx:"TypeScript (TSX)",json:"JSON",bash:"Bash",sh:"Shell",python:"Python",go:"Go",rust:"Rust",sql:"SQL",html:"HTML",css:"CSS",yaml:"YAML",yml:"YAML"},zK={priority:0,match:s(()=>!0,"match"),Editor:s3};function J3(e,t){let n=-1,r=null,i=null;for(let l=t-1;l>=0;l--){const a=e[l];if(a==="@"||a==="/"){(l===0||/\s/.test(e[l-1]))&&(n=l,r=a==="@"?"mention":"skill",i=a);break}if(a===`
83
+ `||a==="\r")break}if(n===-1)return null;const o=e.slice(n+1,t);return r==="skill"&&/\s/.test(o)&&!o.toLowerCase().startsWith("routine:")?null:{trigger:r??"mention",marker:i??"@",query:o,atPos:n,endPos:t}}s(J3,"findMentionMatch");function jK(e,t,n){const r=e.textContent?.length??0,i=s((o,l,a)=>{if(o<0||l>r||l<=o)return null;const c=document.createRange();c.setStart(e,o),c.setEnd(e,l);const u=c.getBoundingClientRect();return u.width===0&&u.height===0?null:{top:u.top,bottom:u.bottom,x:a==="right"?u.right:u.left}},"rectFromRange");return i(Math.max(0,t-1),t,"right")??i(t,Math.min(r,t+1),"left")??i(n,n+1,"right")??{top:0,bottom:0,x:0}}s(jK,"measureCaretRect");function JK(e){const t=window.getSelection();if(!t||t.rangeCount===0||!t.isCollapsed)return null;const n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType!==Node.TEXT_NODE||!e.contains(r))return null;const i=r.textContent??"",o=n.startOffset,l=J3(i,o);if(!l)return null;const a=jK(r,o,l.atPos),c=e.getBoundingClientRect();return{trigger:l.trigger,marker:l.marker,query:l.query,top:a.top-c.top,left:a.x-c.left,viewportTop:a.top,viewportBottom:a.bottom,viewportLeft:a.x,textNode:r,atPos:l.atPos,endPos:l.endPos}}s(JK,"detectMention");function GK(){const e=window.visualViewport;return e?{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,width:e.width,height:e.height}:{offsetLeft:0,offsetTop:0,width:window.innerWidth,height:window.innerHeight}}s(GK,"getMentionMenuViewport");function G3(e,t,n={width:z3,height:j3}){const r=t.offsetLeft+Wf,i=t.offsetLeft+t.width-n.width,o=t.offsetTop+Wf,l=t.offsetTop+t.height-n.height,a=t.offsetTop+e.viewportTop;let c;if(a>l){const h=t.offsetTop+e.viewportBottom-n.height;c=Math.max(o,Math.min(h,l))}else c=Math.max(o,a);const u=t.offsetLeft+e.viewportLeft+UK,d=Math.max(r,Math.min(u,i)),f=Math.max(0,t.offsetLeft+t.width-Wf-d);return{top:c,left:d,maxWidth:f}}s(G3,"computeMentionMenuPosition");function qK(e){return{width:z3,height:Math.min(j3,Math.max(1,Math.min(e,8))*HK+KK)}}s(qK,"getMentionMenuSize");var ZK=["pre","code",".cm-editor",".cm-content","[class*='codeMirrorWrapper']","[class*='codeBlockEditor']"].join(",");function Hg(e,t){return!t||!e.contains(t)?!1:!!(t instanceof Element?t:t.parentElement)?.closest(ZK)}s(Hg,"nodeInsideCodeLike");function q3(e){if(!e)return!1;const t=window.getSelection();if(!t)return!1;for(const n of[t.anchorNode,t.focusNode])if(Hg(e,n))return!0;return!1}s(q3,"isSelectionInsideCodeLikeElement");function YK(e,t){if(!e)return!1;if(t.target instanceof Node&&Hg(e,t.target))return!0;const n=typeof document<"u"?document.activeElement:null;return n instanceof Node&&Hg(e,n)?!0:q3(e)}s(YK,"isPasteInsideCodeLikeElement");function Z3(e){const t=e.name.trim(),n=e.issueIdentifier?.trim();return n&&t.toLowerCase().startsWith(n.toLowerCase())?t.slice(n.length).trim():t}s(Z3,"issueMentionTitle");function XK(e){if(e.kind==="issue"&&e.issueIdentifier)return`[${e.issueIdentifier}](${pk(e.issueIdentifier)}) `;if(e.kind==="project"&&e.projectId)return`[@${e.name}](${yk(e.projectId,e.projectColor??null)}) `;if(e.kind==="user"&&e.userId)return`[@${e.name}](${Sk(e.userId)}) `;const t=e.agentId??e.id.replace(/^agent:/,"");return`[@${e.name}](${vk(t,e.agentIcon??null)}) `}s(XK,"mentionMarkdown");function Y3(e){return e.kind==="routine"?`/routine:${e.name}`:e.kind==="action"?`/${e.command}`:`/${e.slug}`}s(Y3,"slashCommandLabel");function QK(e){return e.kind==="action"?`/${e.command} `:e.kind==="routine"?`[${Y3(e)}](${yx(e.routineId)}) `:`[/${e.slug}](${e.href}) `}s(QK,"slashCommandMarkdown");function eU(e){return e.kind==="skill"||e.kind==="routine"||e.kind==="action"?QK(e):XK(e)}s(eU,"autocompleteMarkdown");function X3(e,t,n=!1){return e==="Tab"?!0:e!=="Enter"?!1:t==="mention"||t==="skill"&&n}s(X3,"shouldAcceptAutocompleteKey");function Q3(e,t){return!e||!t?!1:e.trigger===t.trigger&&e.marker===t.marker&&e.query===t.query&&e.textNode===t.textNode&&e.atPos===t.atPos&&e.endPos===t.endPos}s(Q3,"isSameAutocompleteSession");function tU(e,t){if(e.kind==="action")return!1;const n=Ug(t);if(!n)return!1;if(e.kind==="skill")return n.kind==="skill"&&n.skillId===e.skillId;if(e.kind==="routine")return n.kind==="routine"&&n.routineId===e.routineId;if(e.kind==="issue"&&e.issueIdentifier)return n.kind==="issue"&&n.identifier===e.issueIdentifier;if(e.kind==="project"&&e.projectId)return n.kind==="project"&&n.projectId===e.projectId;if(e.kind==="user"&&e.userId)return n.kind==="user"&&n.userId===e.userId;const r=e.agentId??e.id.replace(/^agent:/,"");return n.kind==="agent"&&n.agentId===r}s(tU,"autocompleteOptionMatchesLink");function ek(e,t,n){const r=Array.from(e.querySelectorAll("a")).filter(o=>o instanceof HTMLAnchorElement).filter(o=>tU(t,o.getAttribute("href")??""));if(r.length===0)return null;if(!n)return r[0]??null;const i=e.getBoundingClientRect();return r.sort((o,l)=>{const a=o.getBoundingClientRect(),c=l.getBoundingClientRect(),u=a.left-i.left,d=a.top-i.top,f=c.left-i.left,h=c.top-i.top;return Math.hypot(u-n.left,d-n.top)-Math.hypot(f-n.left,h-n.top)})[0]??null}s(ek,"findClosestAutocompleteAnchor");function tk(e){const t=window.getSelection();if(!t)return!1;const n=document.createRange(),r=e.nextSibling;if(r?.nodeType===Node.TEXT_NODE){const i=r.textContent??"";if(i.startsWith(" "))return n.setStart(r,1),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0;if(i.length>0)return n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0}return n.setStartAfter(e),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0}s(tk,"placeCaretAfterMentionAnchor");function nk(e){const t=window.getSelection();if(!t)return!1;const n=document.createRange();return n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!0}s(nk,"placeCaretAtEditableEnd");function nU(e,t,n){const r=`${t.marker}${t.query}`,i=eU(n),o=e.lastIndexOf(r);return o===-1?e:e.slice(0,o)+i+e.slice(o+r.length)}s(nU,"applyMention");var rU=(0,m.forwardRef)(s(function({value:t,onChange:n,ariaLabel:r,placeholder:i,className:o,contentClassName:l,onBlur:a,imageUploadHandler:c,onDropFile:u,fileDropTarget:d="editor",bordered:f=!0,mentions:h,actionCommands:g=[],onSubmit:p,readOnly:_=!1},y){const v=(0,m.useMemo)(()=>gx(t),[t]),{slashCommands:x}=NK(),C=(0,m.useMemo)(()=>[...g,...x],[g,x]),b=(0,m.useRef)(null),S=(0,m.useRef)(null),M=(0,m.useRef)(null),T=(0,m.useRef)(v);T.current=v;const E=(0,m.useRef)(v),A=(0,m.useRef)(!0),D=(0,m.useRef)(null),[L,G]=(0,m.useState)(null),[$,z]=(0,m.useState)(!1),[W,ye]=(0,m.useState)(null),q=(0,m.useRef)(0),ge=(0,m.useRef)(c);ge.current=c;const[me,oe]=(0,m.useState)(null),Z=(0,m.useRef)(null),[pe,de]=(0,m.useState)(0),ce=(0,m.useRef)([]),j=(0,m.useRef)(!1),ne=(0,m.useRef)(!1),ue=me!==null&&(me.trigger==="mention"&&!!h?.length||me.trigger==="skill"&&C.length>0),Ne=(0,m.useMemo)(()=>{const R=new Map;for(const Y of h??[]){if(Y.kind==="agent"){const Ce=Y.agentId??Y.id.replace(/^agent:/,"");R.set(`agent:${Ce}`,Y)}Y.kind==="user"&&Y.userId&&R.set(`user:${Y.userId}`,Y),Y.kind==="project"&&Y.projectId&&R.set(`project:${Y.projectId}`,Y)}return R},[h]),$e=(0,m.useCallback)(R=>{S.current=R,R&&T.current!==E.current&&(D.current=T.current,R.setMarkdown(T.current),E.current=T.current)},[]),Re=(0,m.useMemo)(()=>{if(!me)return[];const R=me.query.trim().toLowerCase();return me.trigger==="skill"?C.filter(Y=>R?Y.aliases.some(Ce=>Ce.toLowerCase().includes(R)):!0).slice(0,mx):h?h.filter(Y=>Y.name.toLowerCase().includes(R)).slice(0,mx):[]},[me,h,C]),Pe=(0,m.useCallback)(R=>{if(_)return;if(!W&&S.current){const N=S.current,O=Bg(R);N.focus(()=>N.insertMarkdown(O),{defaultSelection:"rootEnd"});return}const Y=M.current;if(!Y){n(`${t}${R}`);return}const Ce=Y.selectionStart??t.length,k=Y.selectionEnd??t.length;n(`${t.slice(0,Ce)}${R}${t.slice(k)}`),requestAnimationFrame(()=>{Y.focus();const N=Ce+R.length;Y.setSelectionRange(N,N)})},[n,_,W,t]);(0,m.useImperativeHandle)(y,()=>({focus:s(()=>{if(W){M.current?.focus();return}S.current?.focus(void 0,{defaultSelection:"rootEnd"})},"focus"),insertMarkdown:Pe,clear:s(()=>{E.current="",D.current="",S.current?.setMarkdown(""),M.current&&(M.current.value="")},"clear")}),[Pe,W]);const rt=(0,m.useCallback)(R=>{R&&(R.style.height="auto",R.style.height=`${R.scrollHeight}px`)},[]);(0,m.useEffect)(()=>{W&&rt(M.current)},[rt,W,t]),(0,m.useEffect)(()=>{if(W||v.trim().length===0)return;const R=b.current;if(!R)return;let Y=0,Ce=0,k=0;const N=s(()=>{const U=R.querySelector('[contenteditable="true"]');if(!(U instanceof HTMLElement))return!1;const se=document.activeElement;return se===U||U.contains(se)?!1:PK(U,v,i)},"looksEmpty"),O=s(()=>{window.clearTimeout(Y),window.clearTimeout(Ce),Y=window.setTimeout(()=>{if(!N())return;const U=k;Ce=window.setTimeout(()=>{k===U&&N()&&ye({code:"MDE-EMPTY",message:"Rich editor failed to load content"})},BK)},VK)},"scheduleCheck");O();const H=new MutationObserver(()=>{k+=1,O()});return H.observe(R,{subtree:!0,childList:!0,characterData:!0}),()=>{window.clearTimeout(Y),window.clearTimeout(Ce),H.disconnect()}},[v,i,W]);const Je=!!c,pt=(0,m.useMemo)(()=>{const R=Je?async Ce=>{const k=ge.current;if(!k)throw new Error("No image upload handler");try{const N=await k(Ce);return G(null),setTimeout(()=>{const O=E.current,H=LK(N),U=O.replace(new RegExp(`(!\\[[^\\]]*\\]\\(${H}\\))(?!\\n\\n)`,"g"),`$1
84
+
85
+ `);U!==O&&(E.current=U,D.current=U,S.current?.setMarkdown(U),n(gc(U)),requestAnimationFrame(()=>{S.current?.focus(void 0,{defaultSelection:"rootEnd"})}))},100),N}catch(N){const O=N instanceof Error?N.message:"Image upload failed";throw G(O),N}}:void 0,Y=[AR(),eL(),AP(),_L(),LL({validateUrl:FK}),cH(),eK(),bK(),$R(),VP({defaultCodeBlockLanguage:"txt",codeBlockEditorDescriptors:[zK]}),oH({codeBlockLanguages:WK}),UH()];return R&&Y.push(yP({imageUploadHandler:R,disableImageSettingsButton:!0})),Y},[Je]);(0,m.useEffect)(()=>{v!==E.current&&S.current&&(D.current=v,S.current.setMarkdown(v),E.current=v)},[v]);const It=(0,m.useCallback)(()=>{const R=b.current?.querySelector('[contenteditable="true"]');if(!R)return;const Y=R.querySelectorAll("a");for(const Ce of Y){const k=Ce,N=Ug(k.getAttribute("href")??"");if(!N){Mk(k);continue}if(N.kind==="project"){const H=Ne.get(`project:${N.projectId}`);Ua(k,{...N,color:N.color??H?.projectColor??null});continue}if(N.kind==="skill"||N.kind==="routine"){Ua(k,N);continue}if(N.kind==="user"||N.kind==="issue"){Ua(k,N);continue}const O=Ne.get(`agent:${N.agentId}`);Ua(k,{...N,appearance:O?.agentAppearance})}},[Ne]),ut=(0,m.useCallback)(()=>{if(!b.current||q3(b.current)){Z.current=null,j.current=!1,oe(null);return}const R=JK(b.current);if(R&&R.trigger==="mention"&&(!h||h.length===0)){Z.current=null,j.current=!1,oe(null);return}if(R&&R.trigger==="skill"&&C.length===0){Z.current=null,j.current=!1,oe(null);return}const Y=Z.current,Ce=Q3(Y,R);Z.current=R,Ce||(j.current=!1,de(0)),oe(R)},[h,C.length]);(0,m.useEffect)(()=>{if((!h||h.length===0)&&C.length===0)return;const R=b.current,Y=s(()=>requestAnimationFrame(ut),"onInput");return document.addEventListener("selectionchange",ut),R?.addEventListener("input",Y,!0),()=>{document.removeEventListener("selectionchange",ut),R?.removeEventListener("input",Y,!0)}},[ut,h,C.length]),(0,m.useEffect)(()=>{if(!ue)return;const R=s(()=>requestAnimationFrame(ut),"updatePosition"),Y=window.visualViewport;return Y?.addEventListener("resize",R),Y?.addEventListener("scroll",R),window.addEventListener("resize",R),window.addEventListener("scroll",R,!0),()=>{Y?.removeEventListener("resize",R),Y?.removeEventListener("scroll",R),window.removeEventListener("resize",R),window.removeEventListener("scroll",R,!0)}},[ut,ue]),(0,m.useEffect)(()=>{if(!ue)return;if(ce.current.length=Re.length,pe>=Re.length){de(Math.max(0,Re.length-1));return}const R=ce.current[pe];!R||typeof R.scrollIntoView!="function"||R.scrollIntoView({block:"nearest"})},[Re.length,ue,pe]),(0,m.useEffect)(()=>{ue||(ne.current=!1)},[ue]),(0,m.useEffect)(()=>{const R=b.current?.querySelector('[contenteditable="true"]');if(!R)return;let Y=null,Ce=!1;const k=s(()=>{H.observe(R,{subtree:!0,childList:!0,characterData:!0})},"observe"),N=s(()=>{Y=null,!Ce&&(H.disconnect(),It(),Ce||k())},"flushDecorations"),O=s(()=>{Y===null&&(Y=requestAnimationFrame(N))},"scheduleDecorations"),H=new MutationObserver(()=>{O()});return N(),()=>{Ce=!0,H.disconnect(),Y!==null&&cancelAnimationFrame(Y)}},[It]);const jt=(0,m.useCallback)(R=>{const Y=Z.current;if(!Y||R.kind==="action"&&R.disabled)return!1;const Ce=E.current,k=nU(Ce,Y,R);k!==Ce&&(E.current=k,D.current=k,S.current?.setMarkdown(k),n(gc(k)));const N=s(O=>{const H=b.current?.querySelector('[contenteditable="true"]');if(!(H instanceof HTMLElement))return;if(It(),H.focus(),R.kind==="action"){nk(H);return}const U=ek(H,R,Y);if(!U){O>0&&requestAnimationFrame(()=>N(O-1));return}tk(U)},"restoreSelection");return requestAnimationFrame(()=>N(4)),Z.current=null,j.current=!1,oe(null),!0},[It,n]),Ge=(0,m.useCallback)((R,Y)=>{R.preventDefault(),R.stopPropagation(),!ne.current&&jt(Y)&&(ne.current=!0)},[jt]),yt=(0,m.useRef)(null),Nt=8,it=(0,m.useCallback)(R=>{const Y=R.touches[0];Y&&(yt.current={x:Y.clientX,y:Y.clientY})},[]),Yt=(0,m.useCallback)(R=>{const Y=yt.current;if(!Y)return;const Ce=R.touches[0];Ce&&Math.hypot(Ce.clientX-Y.x,Ce.clientY-Y.y)>Nt&&(yt.current=null)},[]),Ln=(0,m.useCallback)((R,Y)=>{const Ce=yt.current;if(yt.current=null,!Ce)return;const k=R.changedTouches[0];k&&(Math.hypot(k.clientX-Ce.x,k.clientY-Ce.y)>Nt||Ge(R,Y))},[Ge]);function Fe(R){return Array.from(R.dataTransfer?.types??[]).includes("Files")}s(Fe,"hasFilePayload");const $t=d==="editor"&&!!(c||u),$n=(0,m.useCallback)(R=>{const Y=R.clipboardData;if(!Y||!S.current)return;const Ce=new Set(Array.from(Y.types));if(Ce.has("Files")||Ce.has("text/html")||YK(b.current,R))return;const k=Y.getData("text/plain");V3(k)&&(R.preventDefault(),R.stopPropagation(),S.current.insertMarkdown(Bg(B3(k))))},[]),ze=(0,m.useCallback)(R=>{ye({code:"MDE-RENDER",message:px(R)})},[]),I=(0,m.useCallback)(R=>{ye({code:"MDE-PARSE",message:px(R)})},[]),Pn=me?G3(me,GK(),qK(Re.length)):null;return W?(0,ee.jsxs)("div",{ref:b,className:Yi("relative wardmote-mdxeditor-scope",f?"rounded-md border border-line bg-transparent":"bg-transparent",o),children:[(0,ee.jsxs)("div",{className:"flex items-start justify-between gap-3 px-3 pt-2 text-xs text-ink-3",children:[(0,ee.jsxs)("p",{children:["Rich editor unavailable for this markdown. Showing raw source instead."," ",(0,ee.jsx)("span",{"data-testid":"markdown-editor-fallback-code",className:"font-mono",children:W.code})]}),(0,ee.jsx)("button",{type:"button",className:"shrink-0 underline underline-offset-2 hover:text-ink",onClick:s(()=>{A.current=!0,ye(null)},"onClick"),children:"Retry rich editor"})]}),(0,ee.jsx)("textarea",{ref:M,"aria-label":r,value:t,placeholder:i,readOnly:_,onChange:s(R=>{_||(n(R.target.value),rt(R.target))},"onChange"),onBlur:s(()=>a?.(),"onBlur"),onKeyDown:s(R=>{p&&R.key==="Enter"&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),p())},"onKeyDown"),className:Yi("min-h-(--sz-12rem) w-full resize-none bg-transparent px-3 pb-3 pt-2 font-mono text-sm leading-6 outline-none",l)})]}):(0,ee.jsxs)("div",{ref:b,className:Yi("relative wardmote-mdxeditor-scope",f?"rounded-md border border-line bg-transparent":"bg-transparent",$&&"ring-1 ring-accent/60 bg-bg-3/20",o),onInputCapture:s(R=>{!_&&R.target instanceof HTMLElement&&R.target.closest('[contenteditable="true"]')&&(A.current=!1)},"onInputCapture"),onKeyDownCapture:s(R=>{if(!_){if((R.key==="Backspace"||R.key==="Delete")&&R.target instanceof HTMLElement&&R.target.closest('[contenteditable="true"]')&&(A.current=!1),p&&R.key==="Enter"&&(R.metaKey||R.ctrlKey)){R.preventDefault(),R.stopPropagation(),p();return}if(ue){if(R.key===" "&&Z.current?.trigger==="skill"){Z.current=null,j.current=!1,oe(null);return}if(R.key==="Escape"){R.preventDefault(),R.stopPropagation(),Z.current=null,j.current=!1,oe(null);return}if(Re.length>0){if(R.key==="ArrowDown"){R.preventDefault(),R.stopPropagation(),j.current=Z.current?.trigger==="skill",de(Y=>Math.min(Y+1,Re.length-1));return}if(R.key==="ArrowUp"){R.preventDefault(),R.stopPropagation(),j.current=Z.current?.trigger==="skill",de(Y=>Math.max(Y-1,0));return}if(X3(R.key,Z.current?.trigger??null,j.current)){R.preventDefault(),R.stopPropagation(),jt(Re[pe]);return}}}}},"onKeyDownCapture"),onDragEnter:s(R=>{_||!$t||!Fe(R)||(q.current+=1,z(!0))},"onDragEnter"),onDragOver:s(R=>{_||!$t||!Fe(R)||(R.preventDefault(),R.dataTransfer.dropEffect="copy")},"onDragOver"),onDragLeave:s(()=>{_||$t&&(q.current=Math.max(0,q.current-1),q.current===0&&z(!1))},"onDragLeave"),onDrop:s(R=>{if(_||(q.current=0,z(!1),!u))return;const Y=R.dataTransfer?.files;if(!Y||Y.length===0)return;const Ce=Array.from(Y),k=Ce.filter(N=>!N.type.startsWith("image/"));if(k.length!==0){k.length===Ce.length&&(R.preventDefault(),R.stopPropagation());for(const N of k)u(N)}},"onDrop"),onPasteCapture:$n,children:[(0,ee.jsx)(OK,{onError:ze,children:(0,ee.jsx)(ER,{ref:$e,translation:s((R,Y,Ce={})=>R==="contentArea.editableMarkdown"&&r?r:Object.entries(Ce).reduce((k,[N,O])=>k.replaceAll(`{{${N}}}`,String(O)),Y),"translation"),markdown:v,iconComponentFor:DK,suppressHtmlProcessing:!0,placeholder:i,readOnly:_,onChange:s(R=>{if(_)return;const Y=gc(R),Ce=D.current;if(Ce!==null&&(D.current=null,Y===Ce||Y===gc(Ce))){E.current=Ce;return}if(A.current&&(A.current=!1,Y===""&&v!=="")){D.current=v,S.current?.setMarkdown(v);return}E.current=gx(Y),n(Y)},"onChange"),onBlur:s(()=>a?.(),"onBlur"),onError:s(R=>{I(R.error)},"onError"),className:Yi("wardmote-mdxeditor",!f&&"wardmote-mdxeditor--borderless"),contentEditableClassName:Yi("wardmote-mdxeditor-content focus:outline-none [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:list-item",l),additionalLexicalNodes:[Fg,ZH],plugins:pt})}),ue&&Re.length>0&&Pn&&(0,Bc.createPortal)((0,ee.jsx)("div",{"data-wardmote-floating-ui":"","data-testid":"mention-autocomplete-menu",className:"pointer-events-auto fixed z-(--z-9999) min-w-(--sz-180px) max-w-(--sz-calc-15) max-h-(--sz-208px) overflow-y-auto overscroll-contain rounded-md border border-line bg-bg-2 shadow-md",style:{top:Pn.top,left:Pn.left,maxWidth:Pn.maxWidth,touchAction:"pan-y",WebkitOverflowScrolling:"touch"},onWheelCapture:s(R=>{R.stopPropagation()},"onWheelCapture"),onTouchMove:s(R=>{R.stopPropagation()},"onTouchMove"),children:Re.map((R,Y)=>(0,ee.jsxs)("button",{type:"button",tabIndex:-1,disabled:R.kind==="action"&&R.disabled===!0,"aria-disabled":R.kind==="action"&&R.disabled===!0,title:R.kind==="action"&&R.disabled?R.disabledReason??void 0:void 0,ref:s(Ce=>{ce.current[Y]=Ce},"ref"),className:Yi("flex items-center gap-2 w-full px-3 py-1.5 text-sm text-left hover:bg-bg-3/50 transition-colors",Y===pe&&"bg-bg-3",R.kind==="action"&&R.disabled&&"cursor-not-allowed opacity-60 hover:bg-transparent"),onPointerDown:s(Ce=>{Ce.pointerType!=="touch"&&Ge(Ce,R)},"onPointerDown"),onMouseDown:s(Ce=>Ge(Ce,R),"onMouseDown"),onTouchStart:it,onTouchMove:Yt,onTouchEnd:s(Ce=>Ln(Ce,R),"onTouchEnd"),onMouseEnter:s(()=>{Z.current?.trigger==="skill"&&(j.current=!0),de(Y)},"onMouseEnter"),children:[R.kind==="routine"?(0,ee.jsx)(e9,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):R.kind==="action"?(0,ee.jsx)(t9,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):R.kind==="skill"?(0,ee.jsx)(Qk,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):R.kind==="issue"?(0,ee.jsx)(Y9,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):R.kind==="project"&&R.projectId?(0,ee.jsx)("span",{className:"inline-flex h-2 w-2 rounded-full border border-line/50",style:{backgroundColor:R.projectColor??"var(--project-none)"}}):R.kind==="user"?(0,ee.jsx)(n9,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,ee.jsx)(i9,{agent:{id:R.agentId??R.id,name:R.name,appearance:R.agentAppearance},size:16}),R.kind==="issue"&&R.issueIdentifier?(0,ee.jsxs)("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[(0,ee.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-ink-3",children:R.issueIdentifier}),(0,ee.jsx)("span",{className:"truncate",children:Z3(R)})]}):(0,ee.jsx)("span",{className:"truncate",children:R.kind==="skill"||R.kind==="routine"||R.kind==="action"?Y3(R):R.name}),R.kind==="issue"&&(0,ee.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-ink-3",children:"Task"}),R.kind==="project"&&R.projectId&&(0,ee.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-ink-3",children:"Project"}),R.kind==="user"&&(0,ee.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-ink-3",children:"User"}),R.kind==="skill"&&(0,ee.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-ink-3",children:"Skill"}),R.kind==="routine"&&(0,ee.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-ink-3",children:"Routine"}),R.kind==="action"&&(0,ee.jsx)("span",{className:"ml-auto max-w-28 truncate text-(length:--text-nano) text-ink-3",children:R.disabled?R.disabledReason:R.description})]},R.id))}),document.body),$&&$t&&(0,ee.jsxs)("div",{className:Yi("pointer-events-none absolute inset-1 z-40 flex items-center justify-center rounded-md border border-dashed border-accent/80 bg-accent/10 text-xs font-medium text-accent",!f&&"inset-0 rounded-sm"),children:["Drop ",u?"file":"image"," to upload"]}),L&&(0,ee.jsx)("p",{className:"px-3 pb-2 text-xs text-bad",children:L})]})},"MarkdownEditor"));export{Vz as a,EK as c,Bz as i,Y9 as l,Kz as n,kK as o,Hz as r,Fz as s,rU as t};