From a8d182ea650c10018b517f0afa0f9051aa66f93e Mon Sep 17 00:00:00 2001 From: cmp5987 <32434695+cmp5987@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:02:27 +0000 Subject: [PATCH 1/3] fix(ui): Add useMemo and previousData swapping to hooks --- tavern/internal/www/src/App.tsx | 3 - .../page-wrapper/FullSidebarNav.tsx | 2 - .../page-wrapper/MinimizedSidebarNav.tsx | 2 - .../src/components/page-wrapper/MobileNav.tsx | 2 - .../src/pages/host-details/useHostTasks.ts | 96 +++++++------- .../www/src/pages/host-list/useHosts.ts | 41 +++--- .../www/src/pages/quest-list/useQuests.ts | 121 +++++++++--------- .../internal/www/src/pages/tasks/useTasks.ts | 88 +++++++------ 8 files changed, 180 insertions(+), 175 deletions(-) diff --git a/tavern/internal/www/src/App.tsx b/tavern/internal/www/src/App.tsx index 2ce3422ec..d952d18fe 100644 --- a/tavern/internal/www/src/App.tsx +++ b/tavern/internal/www/src/App.tsx @@ -9,7 +9,6 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import 'react-virtualized/styles.css'; import { TagContextProvider } from "./context/TagContext"; import { AuthorizationContextProvider } from "./context/AuthorizationContext"; -import { PollingProvider } from "./context/PollingContext"; import Tasks from "./pages/tasks/Tasks"; import HostList from "./pages/host-list/HostList"; import HostDetails from "./pages/host-details/HostDetails"; @@ -81,13 +80,11 @@ export const App = () => { return ( - - ) diff --git a/tavern/internal/www/src/components/page-wrapper/FullSidebarNav.tsx b/tavern/internal/www/src/components/page-wrapper/FullSidebarNav.tsx index 7a4bf7ca6..03a8956cc 100644 --- a/tavern/internal/www/src/components/page-wrapper/FullSidebarNav.tsx +++ b/tavern/internal/www/src/components/page-wrapper/FullSidebarNav.tsx @@ -3,7 +3,6 @@ import { classNames } from '../../utils/utils'; import logo from '../../assets/eldrich.png'; import { ArrowLeftOnRectangleIcon } from '@heroicons/react/24/outline'; import { usePageNavigation } from './usePageNavigation'; -import { PollingCountdown } from '../../context/PollingContext'; type FullSidebarNavProps = { currNavItem?: string; @@ -74,7 +73,6 @@ const FullSidebarNav = ({ currNavItem, handleSidebarMinimized }: FullSidebarNavP - ); diff --git a/tavern/internal/www/src/components/page-wrapper/MinimizedSidebarNav.tsx b/tavern/internal/www/src/components/page-wrapper/MinimizedSidebarNav.tsx index 45add19eb..0c1e63b70 100644 --- a/tavern/internal/www/src/components/page-wrapper/MinimizedSidebarNav.tsx +++ b/tavern/internal/www/src/components/page-wrapper/MinimizedSidebarNav.tsx @@ -3,7 +3,6 @@ import { classNames } from '../../utils/utils'; import { ArrowRightOnRectangleIcon } from '@heroicons/react/24/outline'; import logo from '../../assets/eldrich.png'; import { usePageNavigation } from './usePageNavigation'; -import { PollingCountdown } from '../../context/PollingContext'; type MinimizedSidebarNavProps = { currNavItem?: string; @@ -63,7 +62,6 @@ const MinimizedSidebarNav = ({ currNavItem, handleSidebarMinimized }: MinimizedS -
-
diff --git a/tavern/internal/www/src/pages/host-details/useHostTasks.ts b/tavern/internal/www/src/pages/host-details/useHostTasks.ts index ffef78364..68faa2119 100644 --- a/tavern/internal/www/src/pages/host-details/useHostTasks.ts +++ b/tavern/internal/www/src/pages/host-details/useHostTasks.ts @@ -1,10 +1,10 @@ -import { useQuery } from "@apollo/client"; -import { useCallback, useEffect, useState } from "react"; +import { useQuery, NetworkStatus } from "@apollo/client"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { PageNavItem, TableRowLimit } from "../../utils/enums"; import { GET_TASK_QUERY } from "../../utils/queries"; -import { useFilters } from "../../context/FilterContext"; +import { Filters, useFilters } from "../../context/FilterContext"; import { constructHostTaskFilterQuery } from "../../utils/constructQueryUtils"; -import { Cursor } from "../../utils/interfacesQuery"; +import { Cursor, OrderByField } from "../../utils/interfacesQuery"; import { useSorts } from "../../context/SortContext"; import { useTags } from "../../context/TagContext"; @@ -15,62 +15,68 @@ export const useHostTasks = (id?: string) => { const { lastFetchedTimestamp } = useTags(); const taskSort = sorts[PageNavItem.tasks]; - const constructDefaultQuery = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const defaultRowLimit = TableRowLimit.TaskRowLimit; - const filterQueryFields = constructHostTaskFilterQuery(filters, lastFetchedTimestamp); - - const query = { - "where": { - "hasBeaconWith": { - "hasHostWith": { - "id": id - } - }, - ...filterQueryFields && filterQueryFields.hasTasksWith, - }, - "first": beforeCursor ? null : defaultRowLimit, - "last": beforeCursor ? defaultRowLimit : null, - "after": afterCursor ? afterCursor : null, - "before": beforeCursor ? beforeCursor : null, - ...(taskSort && { orderBy: [taskSort] }) - } as any; - - return query; - }, [id, filters, taskSort, lastFetchedTimestamp]); - + const queryVariables = useMemo( + () => getDefaultHostTaskQuery(filters, undefined, undefined, id, taskSort, lastFetchedTimestamp), + [filters, id, taskSort, lastFetchedTimestamp] + ); - const { loading, error, data, refetch } = useQuery( + const { data, previousData, error, refetch, networkStatus } = useQuery( GET_TASK_QUERY, { - variables: constructDefaultQuery(), + variables: queryVariables, notifyOnNetworkStatusChange: true, + fetchPolicy: 'cache-and-network', } ); const updateTaskList = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const query = constructDefaultQuery(afterCursor, beforeCursor); - return refetch(query); - }, [constructDefaultQuery, refetch]); + return refetch( + getDefaultHostTaskQuery(filters, afterCursor, beforeCursor, id, taskSort, lastFetchedTimestamp) + ); + }, [filters, id, taskSort, lastFetchedTimestamp, refetch]); useEffect(() => { - const abortController = new AbortController(); - updateTaskList(); - - return () => { - abortController.abort(); - }; - }, [updateTaskList]); + setPage(prev => prev !== 1 ? 1 : prev); + }, [filters, taskSort]); - useEffect(() => { - setPage(1); - }, [filters, taskSort]) + const currentData = data ?? previousData; return { - data, - loading, + data: currentData, + loading: networkStatus === NetworkStatus.loading && !currentData, error, page, setPage, updateTaskList - } + }; +}; + +const getDefaultHostTaskQuery = ( + filters: Filters, + afterCursor?: Cursor, + beforeCursor?: Cursor, + id?: string, + sort?: OrderByField, + currentTimestamp?: Date +) => { + const defaultRowLimit = TableRowLimit.TaskRowLimit; + const filterQueryFields = constructHostTaskFilterQuery(filters, currentTimestamp); + + const query = { + "where": { + "hasBeaconWith": { + "hasHostWith": { + "id": id + } + }, + ...filterQueryFields && filterQueryFields.hasTasksWith, + }, + "first": beforeCursor ? null : defaultRowLimit, + "last": beforeCursor ? defaultRowLimit : null, + "after": afterCursor ? afterCursor : null, + "before": beforeCursor ? beforeCursor : null, + ...(sort && { orderBy: [sort] }) + } as any; + + return query; }; diff --git a/tavern/internal/www/src/pages/host-list/useHosts.ts b/tavern/internal/www/src/pages/host-list/useHosts.ts index 35a8d94c9..510fe7147 100644 --- a/tavern/internal/www/src/pages/host-list/useHosts.ts +++ b/tavern/internal/www/src/pages/host-list/useHosts.ts @@ -1,5 +1,5 @@ -import { useCallback, useEffect, useState } from "react"; -import { ApolloError, useQuery } from "@apollo/client"; +import { useCallback, useEffect, useMemo, useState } from "react"; +import { ApolloError, NetworkStatus, useQuery } from "@apollo/client"; import { GET_HOST_QUERY } from "../../utils/queries"; import { PageNavItem, TableRowLimit } from "../../utils/enums"; import { Filters, useFilters } from "../../context/FilterContext"; @@ -9,7 +9,7 @@ import { useSorts } from "../../context/SortContext"; import { useTags } from "../../context/TagContext"; interface HostsHook { - data: HostQueryTopLevel + data: HostQueryTopLevel | undefined loading: boolean, error: ApolloError | undefined, page: number, @@ -24,39 +24,36 @@ export const useHosts = (pagination: boolean, id?: string): HostsHook => { const { lastFetchedTimestamp } = useTags(); const hostSort = sorts[PageNavItem.hosts]; - const constructDefaultQuery = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - return getDefaultHostQuery(filters, pagination, afterCursor, beforeCursor, id, hostSort, lastFetchedTimestamp); - }, [pagination, id, filters, hostSort, lastFetchedTimestamp]); + const queryVariables = useMemo( + () => getDefaultHostQuery(filters, pagination, undefined, undefined, id, hostSort, lastFetchedTimestamp), + [filters, pagination, id, hostSort, lastFetchedTimestamp] + ); - const { loading, data, error, refetch } = useQuery( + const { data, previousData, error, refetch, networkStatus } = useQuery( GET_HOST_QUERY, { - variables: constructDefaultQuery(), + variables: queryVariables, notifyOnNetworkStatusChange: true, + fetchPolicy: 'cache-and-network', } ); const updateHosts = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const query = constructDefaultQuery(afterCursor, beforeCursor); - return refetch(query); - }, [constructDefaultQuery, refetch]); + return refetch( + getDefaultHostQuery(filters, pagination, afterCursor, beforeCursor, id, hostSort, lastFetchedTimestamp) + ); + }, [filters, pagination, id, hostSort, lastFetchedTimestamp, refetch]); useEffect(() => { - const abortController = new AbortController(); - updateHosts(); + setPage(prev => prev !== 1 ? 1 : prev); + }, [filters, hostSort]); - return () => { - abortController.abort(); - }; - }, [updateHosts]); + const currentData = data ?? previousData; - useEffect(() => { - setPage(1); - }, [filters, hostSort]) return { - data, - loading, + data: currentData, + loading: networkStatus === NetworkStatus.loading && !currentData, error, page, setPage, diff --git a/tavern/internal/www/src/pages/quest-list/useQuests.ts b/tavern/internal/www/src/pages/quest-list/useQuests.ts index 9a37ce1fb..4e210fb88 100644 --- a/tavern/internal/www/src/pages/quest-list/useQuests.ts +++ b/tavern/internal/www/src/pages/quest-list/useQuests.ts @@ -1,4 +1,4 @@ -import { useQuery } from "@apollo/client"; +import { useQuery, NetworkStatus } from "@apollo/client"; import { useCallback, useEffect, useMemo, useState } from "react"; import { PageNavItem, TableRowLimit } from "../../utils/enums"; import { GET_QUEST_QUERY } from "../../utils/queries"; @@ -13,81 +13,86 @@ export const useQuests = (pagination: boolean) => { const { filters } = useFilters(); const { sorts } = useSorts(); const { lastFetchedTimestamp } = useTags(); - - const constructDefaultQuery = useCallback((currentFilters: Filters, afterCursor?: Cursor, beforeCursor?: Cursor, sort?: OrderByField, currentTimestamp?: Date): GetQuestQueryVariables => { - const defaultRowLimit = TableRowLimit.QuestRowLimit; - const filterQueryTaskFields = constructTaskFilterQuery(currentFilters, currentTimestamp); - const questFilterFields = constructQuestFilterQuery(currentFilters); - - const query: GetQuestQueryVariables = { - where: { - ...(questFilterFields || {}), - ...(filterQueryTaskFields || {}) - }, - whereTotalTask: { - ...(filterQueryTaskFields?.hasTasksWith || {}) - }, - whereFinishedTask: { - execFinishedAtNotNil: true, - ...(filterQueryTaskFields?.hasTasksWith || {}) - }, - whereOutputTask: { - outputSizeGT: 0, - ...(filterQueryTaskFields?.hasTasksWith || {}) - }, - whereErrorTask: { - errorNotNil: true, - ...(filterQueryTaskFields?.hasTasksWith || {}) - }, - firstTask: 1, - ...(sort && { orderBy: [sort] }) - }; - - if (pagination) { - query.first = beforeCursor ? undefined : defaultRowLimit; - query.last = beforeCursor ? defaultRowLimit : undefined; - query.after = afterCursor || undefined; - query.before = beforeCursor || undefined; - } - - return query; - }, [pagination]); - const questSort = sorts[PageNavItem.quests]; - const queryVariables = useMemo(() => constructDefaultQuery(filters, undefined, undefined, questSort, lastFetchedTimestamp), [constructDefaultQuery, filters, questSort, lastFetchedTimestamp]); - const { loading, data, error, refetch } = useQuery( + const queryVariables = useMemo( + () => getDefaultQuestQuery(filters, pagination, undefined, undefined, questSort, lastFetchedTimestamp), + [filters, pagination, questSort, lastFetchedTimestamp] + ); + + const { data, previousData, error, refetch, networkStatus } = useQuery( GET_QUEST_QUERY, { variables: queryVariables, notifyOnNetworkStatusChange: true, + fetchPolicy: 'cache-and-network', } ); const updateQuestList = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const query = constructDefaultQuery(filters, afterCursor, beforeCursor, questSort, lastFetchedTimestamp); - return refetch(query); - }, [filters, questSort, constructDefaultQuery, refetch, lastFetchedTimestamp]); - - useEffect(() => { - const abortController = new AbortController(); - updateQuestList(); - - return () => { - abortController.abort(); - }; - }, [updateQuestList]); + return refetch( + getDefaultQuestQuery(filters, pagination, afterCursor, beforeCursor, questSort, lastFetchedTimestamp) + ); + }, [filters, pagination, questSort, lastFetchedTimestamp, refetch]); useEffect(() => { - setPage(1); + setPage(prev => prev !== 1 ? 1 : prev); }, [filters, questSort]); + const currentData = data ?? previousData; + return { - data, - loading, + data: currentData, + loading: networkStatus === NetworkStatus.loading && !currentData, error, page, setPage, updateQuestList }; }; + +const getDefaultQuestQuery = ( + filters: Filters, + pagination: boolean, + afterCursor?: Cursor, + beforeCursor?: Cursor, + sort?: OrderByField, + currentTimestamp?: Date +): GetQuestQueryVariables => { + const defaultRowLimit = TableRowLimit.QuestRowLimit; + const filterQueryTaskFields = constructTaskFilterQuery(filters, currentTimestamp); + const questFilterFields = constructQuestFilterQuery(filters); + + const query: GetQuestQueryVariables = { + where: { + ...(questFilterFields || {}), + ...(filterQueryTaskFields || {}) + }, + whereTotalTask: { + ...(filterQueryTaskFields?.hasTasksWith || {}) + }, + whereFinishedTask: { + execFinishedAtNotNil: true, + ...(filterQueryTaskFields?.hasTasksWith || {}) + }, + whereOutputTask: { + outputSizeGT: 0, + ...(filterQueryTaskFields?.hasTasksWith || {}) + }, + whereErrorTask: { + errorNotNil: true, + ...(filterQueryTaskFields?.hasTasksWith || {}) + }, + firstTask: 1, + ...(sort && { orderBy: [sort] }) + }; + + if (pagination) { + query.first = beforeCursor ? undefined : defaultRowLimit; + query.last = beforeCursor ? defaultRowLimit : undefined; + query.after = afterCursor || undefined; + query.before = beforeCursor || undefined; + } + + return query; +}; diff --git a/tavern/internal/www/src/pages/tasks/useTasks.ts b/tavern/internal/www/src/pages/tasks/useTasks.ts index dbcaa3218..3393a8583 100644 --- a/tavern/internal/www/src/pages/tasks/useTasks.ts +++ b/tavern/internal/www/src/pages/tasks/useTasks.ts @@ -1,10 +1,10 @@ -import { useQuery } from "@apollo/client"; -import { useCallback, useEffect, useState } from "react"; +import { useQuery, NetworkStatus } from "@apollo/client"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { PageNavItem, TableRowLimit } from "../../utils/enums"; import { GET_TASK_QUERY } from "../../utils/queries"; -import { useFilters } from "../../context/FilterContext"; +import { Filters, useFilters } from "../../context/FilterContext"; import { constructTaskFilterQuery } from "../../utils/constructQueryUtils"; -import { Cursor } from "../../utils/interfacesQuery"; +import { Cursor, OrderByField } from "../../utils/interfacesQuery"; import { useSorts } from "../../context/SortContext"; import { useTags } from "../../context/TagContext"; @@ -15,58 +15,64 @@ export const useTasks = (id?: string) => { const { lastFetchedTimestamp } = useTags(); const taskSort = sorts[PageNavItem.tasks]; - const constructDefaultQuery = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const defaultRowLimit = TableRowLimit.TaskRowLimit; - const filterQueryFields = constructTaskFilterQuery(filters, lastFetchedTimestamp); - - const query = { - "where": { - ...filterQueryFields && filterQueryFields.hasTasksWith, - "hasQuestWith": { "id": id }, - }, - "first": beforeCursor ? null : defaultRowLimit, - "last": beforeCursor ? defaultRowLimit : null, - "after": afterCursor ? afterCursor : null, - "before": beforeCursor ? beforeCursor : null, - ...(taskSort && { orderBy: [taskSort] }) - } as any; - - return query; - }, [id, filters, taskSort, lastFetchedTimestamp]); - + const queryVariables = useMemo( + () => getDefaultTaskQuery(filters, undefined, undefined, id, taskSort, lastFetchedTimestamp), + [filters, id, taskSort, lastFetchedTimestamp] + ); - const { loading, error, data, refetch } = useQuery( + const { data, previousData, error, refetch, networkStatus } = useQuery( GET_TASK_QUERY, { - variables: constructDefaultQuery(), + variables: queryVariables, notifyOnNetworkStatusChange: true, + fetchPolicy: 'cache-and-network', } ); const updateTaskList = useCallback((afterCursor?: Cursor, beforeCursor?: Cursor) => { - const query = constructDefaultQuery(afterCursor, beforeCursor); - return refetch(query); - }, [constructDefaultQuery, refetch]); + return refetch( + getDefaultTaskQuery(filters, afterCursor, beforeCursor, id, taskSort, lastFetchedTimestamp) + ); + }, [filters, id, taskSort, lastFetchedTimestamp, refetch]); useEffect(() => { - const abortController = new AbortController(); - updateTaskList(); - - return () => { - abortController.abort(); - }; - }, [updateTaskList]); + setPage(prev => prev !== 1 ? 1 : prev); + }, [filters, taskSort]); - useEffect(() => { - setPage(1); - }, [filters, taskSort]) + const currentData = data ?? previousData; return { - data, - loading, + data: currentData, + loading: networkStatus === NetworkStatus.loading && !currentData, error, page, setPage, updateTaskList - } + }; +}; + +const getDefaultTaskQuery = ( + filters: Filters, + afterCursor?: Cursor, + beforeCursor?: Cursor, + id?: string, + sort?: OrderByField, + currentTimestamp?: Date +) => { + const defaultRowLimit = TableRowLimit.TaskRowLimit; + const filterQueryFields = constructTaskFilterQuery(filters, currentTimestamp); + + const query = { + "where": { + ...filterQueryFields && filterQueryFields.hasTasksWith, + "hasQuestWith": { "id": id }, + }, + "first": beforeCursor ? null : defaultRowLimit, + "last": beforeCursor ? defaultRowLimit : null, + "after": afterCursor ? afterCursor : null, + "before": beforeCursor ? beforeCursor : null, + ...(sort && { orderBy: [sort] }) + } as any; + + return query; }; From 1769ed330110df6adcbbd9294b981f0445184249 Mon Sep 17 00:00:00 2001 From: cmp5987 <32434695+cmp5987@users.noreply.github.com> Date: Thu, 5 Feb 2026 01:38:20 +0000 Subject: [PATCH 2/3] fix(ui): Disable next/prev button when loading --- tavern/internal/www/build/asset-manifest.json | 6 ++--- tavern/internal/www/build/index.html | 2 +- .../js/{main.a34b85f2.js => main.a499d302.js} | 6 ++--- ...CENSE.txt => main.a499d302.js.LICENSE.txt} | 0 ...n.a34b85f2.js.map => main.a499d302.js.map} | 2 +- .../tavern-base-ui/table/TablePagination.tsx | 22 +++++++++++++------ .../host-details/components/HostTaskTab.tsx | 4 +++- .../src/pages/host-details/useHostTasks.ts | 5 +++-- .../www/src/pages/host-list/HostList.tsx | 5 +++-- .../www/src/pages/host-list/useHosts.ts | 6 +++-- .../www/src/pages/quest-list/Quests.tsx | 4 +++- .../www/src/pages/quest-list/useQuests.ts | 5 +++-- tavern/internal/www/src/pages/tasks/Tasks.tsx | 4 +++- .../internal/www/src/pages/tasks/useTasks.ts | 5 +++-- 14 files changed, 48 insertions(+), 28 deletions(-) rename tavern/internal/www/build/static/js/{main.a34b85f2.js => main.a499d302.js} (53%) rename tavern/internal/www/build/static/js/{main.a34b85f2.js.LICENSE.txt => main.a499d302.js.LICENSE.txt} (100%) rename tavern/internal/www/build/static/js/{main.a34b85f2.js.map => main.a499d302.js.map} (58%) diff --git a/tavern/internal/www/build/asset-manifest.json b/tavern/internal/www/build/asset-manifest.json index 9cb505251..fac570252 100644 --- a/tavern/internal/www/build/asset-manifest.json +++ b/tavern/internal/www/build/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { "main.css": "/static/css/main.5e73d3ed.css", - "main.js": "/static/js/main.a34b85f2.js", + "main.js": "/static/js/main.a499d302.js", "static/js/787.5aa41665.chunk.js": "/static/js/787.5aa41665.chunk.js", "static/media/eldrich.png": "/static/media/eldrich.a80c74e8249d2461e174.png", "index.html": "/index.html", "main.5e73d3ed.css.map": "/static/css/main.5e73d3ed.css.map", - "main.a34b85f2.js.map": "/static/js/main.a34b85f2.js.map", + "main.a499d302.js.map": "/static/js/main.a499d302.js.map", "787.5aa41665.chunk.js.map": "/static/js/787.5aa41665.chunk.js.map" }, "entrypoints": [ "static/css/main.5e73d3ed.css", - "static/js/main.a34b85f2.js" + "static/js/main.a499d302.js" ] } \ No newline at end of file diff --git a/tavern/internal/www/build/index.html b/tavern/internal/www/build/index.html index e2a4c51dc..59fec9221 100644 --- a/tavern/internal/www/build/index.html +++ b/tavern/internal/www/build/index.html @@ -1 +1 @@ -Realm - Red Team Engagement Platform
\ No newline at end of file +Realm - Red Team Engagement Platform
\ No newline at end of file diff --git a/tavern/internal/www/build/static/js/main.a34b85f2.js b/tavern/internal/www/build/static/js/main.a499d302.js similarity index 53% rename from tavern/internal/www/build/static/js/main.a34b85f2.js rename to tavern/internal/www/build/static/js/main.a499d302.js index 2f0473d47..d8cf4d9b9 100644 --- a/tavern/internal/www/build/static/js/main.a34b85f2.js +++ b/tavern/internal/www/build/static/js/main.a499d302.js @@ -1,3 +1,3 @@ -/*! For license information please see main.a34b85f2.js.LICENSE.txt */ -(()=>{var e={9195:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M2.24 6.8a.75.75 0 001.06-.04l1.95-2.1v8.59a.75.75 0 001.5 0V4.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.1 0L2.2 5.74a.75.75 0 00.04 1.06zm8 6.4a.75.75 0 00-.04 1.06l3.25 3.5a.75.75 0 001.1 0l3.25-3.5a.75.75 0 10-1.1-1.02l-1.95 2.1V6.75a.75.75 0 00-1.5 0v8.59l-1.95-2.1a.75.75 0 00-1.06-.04z",clipRule:"evenodd"}))});e.exports=a},2819:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"}))});e.exports=a},180:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"}))});e.exports=a},1843:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M18 5.25a2.25 2.25 0 00-2.012-2.238A2.25 2.25 0 0013.75 1h-1.5a2.25 2.25 0 00-2.238 2.012c-.875.092-1.6.686-1.884 1.488H11A2.5 2.5 0 0113.5 7v7h2.25A2.25 2.25 0 0018 11.75v-6.5zM12.25 2.5a.75.75 0 00-.75.75v.25h3v-.25a.75.75 0 00-.75-.75h-1.5z",clipRule:"evenodd"}),o.createElement("path",{fillRule:"evenodd",d:"M3 6a1 1 0 00-1 1v10a1 1 0 001 1h8a1 1 0 001-1V7a1 1 0 00-1-1H3zm6.874 4.166a.75.75 0 10-1.248-.832l-2.493 3.739-.853-.853a.75.75 0 00-1.06 1.06l1.5 1.5a.75.75 0 001.154-.114l3-4.5z",clipRule:"evenodd"}))});e.exports=a},1276:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M2 4.25A2.25 2.25 0 014.25 2h11.5A2.25 2.25 0 0118 4.25v8.5A2.25 2.25 0 0115.75 15h-3.105a3.501 3.501 0 001.1 1.677A.75.75 0 0113.26 18H6.74a.75.75 0 01-.484-1.323A3.501 3.501 0 007.355 15H4.25A2.25 2.25 0 012 12.75v-8.5zm1.5 0a.75.75 0 01.75-.75h11.5a.75.75 0 01.75.75v7.5a.75.75 0 01-.75.75H4.25a.75.75 0 01-.75-.75v-7.5z",clipRule:"evenodd"}))});e.exports=a},7571:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z",clipRule:"evenodd"}))});e.exports=a},1351:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z",clipRule:"evenodd"}))});e.exports=a},347:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{d:"M5.433 13.917l1.262-3.155A4 4 0 017.58 9.42l6.92-6.918a2.121 2.121 0 013 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 01-.65-.65z"}),o.createElement("path",{d:"M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0010 3H4.75A2.75 2.75 0 002 5.75v9.5A2.75 2.75 0 004.75 18h9.5A2.75 2.75 0 0017 15.25V10a.75.75 0 00-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5z"}))});e.exports=a},3634:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M5.5 3A2.5 2.5 0 003 5.5v2.879a2.5 2.5 0 00.732 1.767l6.5 6.5a2.5 2.5 0 003.536 0l2.878-2.878a2.5 2.5 0 000-3.536l-6.5-6.5A2.5 2.5 0 008.38 3H5.5zM6 7a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))});e.exports=a},5735:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"}))});e.exports=a},5188:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75"}))});e.exports=a},8610:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"}))});e.exports=a},9481:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"}))});e.exports=a},2094:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}))});e.exports=a},9344:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"}))});e.exports=a},1423:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))});e.exports=a},397:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25"}))});e.exports=a},5881:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"}))});e.exports=a},125:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"}))});e.exports=a},8831:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0112 12.75zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 01-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 002.248-2.354M12 12.75a2.25 2.25 0 01-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 00-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 01.4-2.253M12 8.25a2.25 2.25 0 00-2.248 2.146M12 8.25a2.25 2.25 0 012.248 2.146M8.683 5a6.032 6.032 0 01-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0115.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 00-.575-1.752M4.921 6a24.048 24.048 0 00-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 01-5.223 1.082"}))});e.exports=a},2329:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))});e.exports=a},3947:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"}))});e.exports=a},4350:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75"}))});e.exports=a},9842:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"}))});e.exports=a},87:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"}))});e.exports=a},436:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.exports=a},1242:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"}))});e.exports=a},2297:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"}))});e.exports=a},6706:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"}))});e.exports=a},9642:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))});e.exports=a},541:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"}))});e.exports=a},944:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"}))});e.exports=a},2697:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.exports=a},3679:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))});e.exports=a},1597:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5M9 11.25v1.5M12 9v3.75m3-6v6"}))});e.exports=a},5217:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"}))});e.exports=a},9530:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))});e.exports=a},2150:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))});e.exports=a},7907:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.exports=a},3366:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"}))});e.exports=a},6561:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{d:"M12 15a3 3 0 100-6 3 3 0 000 6z"}),o.createElement("path",{fillRule:"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z",clipRule:"evenodd"}))});e.exports=a},5153:(e,t,n)=>{var r=n(215).default;const i=["title","titleId"],o=n(2791);const a=o.forwardRef(function(e,t){let{title:n,titleId:a}=e,s=r(e,i);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":a},s),n?o.createElement("title",{id:a},n):null,o.createElement("path",{d:"M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z"}),o.createElement("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z"}),o.createElement("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z"}))});e.exports=a},383:(e,t,n)=>{var r,i=n(2122).default;globalThis,r=()=>(()=>{"use strict";var e={4567:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const o=n(9042),a=n(9924),s=n(844),l=n(4725),c=n(2585),u=n(3656);let d=t.AccessibilityManager=class extends s.Disposable{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;ithis._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new a.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(e=>this._handleResize(e.rows))),this.register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(e=>this._handleChar(e))),this.register(this._terminal.onLineFeed(()=>this._handleChar("\n"))),this.register(this._terminal.onA11yTab(e=>this._handleTab(e))),this.register(this._terminal.onKey(e=>this._handleKey(e.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,u.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,s.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/[\0-\x1F\x7F-\x9F]/.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){const e=n.lines.get(n.ydisp+i),t=[],o=(null===e||void 0===e?void 0:e.translateToString(!0,void 0,void 0,t))||"",a=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(0===o.length?(s.innerText="\xa0",this._rowColumns.set(s,[0,1])):(s.textContent=o,this._rowColumns.set(s,t)),s.setAttribute("aria-posinset",a),s.setAttribute("aria-setsize",r))}this._announceCharacters()}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const n=e.target,r=this._rowElements[0===t?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")===(0===t?"1":"".concat(this._terminal.buffer.lines.length)))return;if(e.relatedTarget!==r)return;let i,o;if(0===t?(i=n,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(i=this._rowElements.shift(),o=n,this._rowContainer.removeChild(i)),i.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){const e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement("afterbegin",e)}else{const e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var e,t;if(0===this._rowElements.length)return;const n=document.getSelection();if(!n)return;if(n.isCollapsed)return void(this._rowContainer.contains(n.anchorNode)&&this._terminal.clearSelection());if(!n.anchorNode||!n.focusNode)return void console.error("anchorNode and/or focusNode are null");let r={node:n.anchorNode,offset:n.anchorOffset},i={node:n.focusNode,offset:n.focusOffset};if((r.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||r.node===i.node&&r.offset>i.offset)&&([r,i]=[i,r]),r.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(r={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(r.node))return;const o=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(o)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:o,offset:null!==(e=null===(t=o.textContent)||void 0===t?void 0:t.length)&&void 0!==e?e:0}),!this._rowContainer.contains(i.node))return;const a=e=>{let{node:t,offset:n}=e;const r=t instanceof Text?t.parentNode:t;let i=parseInt(null===r||void 0===r?void 0:r.getAttribute("aria-posinset"),10)-1;if(isNaN(i))return console.warn("row is invalid. Race condition?"),null;const o=this._rowColumns.get(r);if(!o)return console.warn("columns is null. Race condition?"),null;let a=n=this._terminal.cols&&(++i,a=0),{row:i,column:a}},s=a(r),l=a(i);if(s&&l){if(s.row>l.row||s.row===l.row&&s.column>=l.column)throw new Error("invalid range");this._terminal.select(s.column,s.row,(l.row-s.row)*this._terminal.cols-s.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;te;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width="".concat(this._renderService.dimensions.css.canvas.width,"px"),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e{function n(e){return e.replace(/\r?\n/g,"\r")}function r(e,t){return t?"\x1b[200~"+e+"\x1b[201~":e}function i(e,t,i,o){e=r(e=n(e),i.decPrivateModes.bracketedPasteMode&&!0!==o.rawOptions.ignoreBracketedPasteMode),i.triggerDataEvent(e,!0),t.value=""}function o(e,t,n){const r=n.getBoundingClientRect(),i=e.clientX-r.left-10,o=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left="".concat(i,"px"),t.style.top="".concat(o,"px"),t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=n,t.bracketTextForPaste=r,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,n,r){e.stopPropagation(),e.clipboardData&&i(e.clipboardData.getData("text/plain"),t,n,r)},t.paste=i,t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,n,r,i){o(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}},7239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const r=n(1505);t.ColorContrastCache=class{constructor(){this._color=new r.TwoKeyMap,this._css=new r.TwoKeyMap}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,n,r){e.addEventListener(t,n,r);let i=!1;return{dispose:()=>{i||(i=!0,e.removeEventListener(t,n,r))}}}},3551:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier=void 0;const o=n(3656),a=n(8460),s=n(844),l=n(2585),c=n(4725);let u=t.Linkifier=class extends s.Disposable{get currentLink(){return this._currentLink}constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new a.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new a.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,s.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,s.toDisposable)(()=>{var e;this._lastMouseEvent=void 0,null===(e=this._activeProviderReplies)||void 0===e||e.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){this._lastMouseEvent=e;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;const n=e.composedPath();for(let r=0;r{null===e||void 0===e||e.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(const[o,a]of this._linkProviderService.linkProviders.entries())if(t){var i;(null===(i=this._activeProviderReplies)||void 0===i?void 0:i.get(o))&&(r=this._checkLinkProviderResult(o,e,r))}else a.provideLinks(e.y,t=>{var n,i;if(this._isMouseOut)return;const a=null===t||void 0===t?void 0:t.map(e=>({link:e}));null!==(n=this._activeProviderReplies)&&void 0!==n&&n.set(o,a),r=this._checkLinkProviderResult(o,e,r),(null===(i=this._activeProviderReplies)||void 0===i?void 0:i.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){const n=new Set;for(let r=0;re?this._bufferService.cols:r.link.range.end.x;for(let e=o;e<=a;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;const r=this._activeProviderReplies.get(e);let i=!1;for(let a=0;athis._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let a=0;athis._linkAtPosition(e.link,t));if(e){n=!0,this._handleNewLink(e);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,s.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._lastMouseEvent)return;const t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var e,t;return null===(e=this._currentLink)||void 0===e||null===(t=e.state)||void 0===t?void 0:t.decorations.pointerCursor},set:e=>{var t;(null===(t=this._currentLink)||void 0===t?void 0:t.state)&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",e))}},underline:{get:()=>{var e,t;return null===(e=this._currentLink)||void 0===e||null===(t=e.state)||void 0===t?void 0:t.decorations.underline},set:t=>{var n,r,i;(null===(n=this._currentLink)||void 0===n?void 0:n.state)&&(null===(r=this._currentLink)||void 0===r||null===(i=r.state)||void 0===i?void 0:i.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;const t=0===e.start?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){var r;null!==(r=this._currentLink)&&void 0!==r&&r.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){const n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){var r;null!==(r=this._currentLink)&&void 0!==r&&r.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){const n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){const r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};t.Linkifier=u=r([i(1,c.IMouseService),i(2,c.IRenderService),i(3,l.IBufferService),i(4,c.ILinkProviderService)],u)},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;const o=n(511),a=n(2585);let s=t.OscLinkProvider=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){const n=this._bufferService.buffer.lines.get(e-1);if(!n)return void t(void 0);const r=[],i=this._optionsService.rawOptions.linkHandler,a=new o.CellData,s=n.getTrimmedLength();let c=-1,u=-1,d=!1;for(let o=0;oi?i.activate(e,t,n):l(0,t),hover:(e,t)=>{var r;return null===i||void 0===i||null===(r=i.hover)||void 0===r?void 0:r.call(i,e,t,n)},leave:(e,t)=>{var r;return null===i||void 0===i||null===(r=i.leave)||void 0===r?void 0:r.call(i,e,t,n)}})}d=!1,a.hasExtendedAttrs()&&a.extended.urlId?(u=o,c=a.extended.urlId):(u=-1,c=-1)}}t(r)}};function l(e,t){if(confirm("Do you want to navigate to ".concat(t,"?\n\nWARNING: This link could potentially be dangerous"))){const e=window.open();if(e){try{e.opener=null}catch(n){}e.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}t.OscLinkProvider=s=r([i(0,a.IBufferService),i(1,a.IOptionsService),i(2,a.IOscLinkService)],s)},6193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return void this._runRefreshCallbacks();const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}}},3236:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;const r=n(3614),i=n(3656),o=n(3551),a=n(9042),s=n(3730),l=n(1680),c=n(3107),u=n(5744),d=n(2950),h=n(1296),f=n(428),p=n(4269),v=n(5114),g=n(8934),m=n(3230),y=n(9312),b=n(4725),_=n(6731),w=n(8055),x=n(8969),S=n(8460),C=n(844),k=n(6114),E=n(8437),T=n(2584),O=n(7399),A=n(5941),R=n(9074),P=n(2585),I=n(5435),j=n(4567),M=n(779);class D extends x.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.browser=k,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new C.MutableDisposable),this._onCursorMove=this.register(new S.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new S.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new S.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new S.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new S.EventEmitter),this._onBlur=this.register(new S.EventEmitter),this._onA11yCharEmitter=this.register(new S.EventEmitter),this._onA11yTabEmitter=this.register(new S.EventEmitter),this._onWillOpen=this.register(new S.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(R.DecorationService),this._instantiationService.setService(P.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(M.LinkProviderService),this._instantiationService.setService(b.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(s.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((e,t)=>this.refresh(e,t))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this.register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this.register((0,S.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,S.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,S.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,S.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this.register((0,C.toDisposable)(()=>{var e,t;this._customKeyEventHandler=void 0,null===(e=this.element)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(this.element)}))}_handleColorEvent(e){if(this._themeService)for(const t of e){let e,n="";switch(t.index){case 256:e="foreground",n="10";break;case 257:e="background",n="11";break;case 258:e="cursor",n="12";break;default:e="ansi",n="4;"+t.index}switch(t.type){case 0:const r=w.color.toColorRGB("ansi"===e?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent("".concat(T.C0.ESC,"]").concat(n,";").concat((0,A.toRgbString)(r)).concat(T.C1_ESCAPED.ST));break;case 1:if("ansi"===e)this._themeService.modifyColors(e=>e.ansi[t.index]=w.channels.toColor(...t.color));else{const n=e;this._themeService.modifyColors(e=>e[n]=w.channels.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(T.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return null===(e=this.textarea)||void 0===e?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(T.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;const n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),o=this._renderService.dimensions.css.cell.width*i,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=o+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,i.addDisposableDomListener)(this.element,"copy",e=>{this.hasSelection()&&(0,r.copyHandler)(e,this._selectionService)}));const e=e=>(0,r.handlePasteEvent)(e,this.textarea,this.coreService,this.optionsService);this.register((0,i.addDisposableDomListener)(this.textarea,"paste",e)),this.register((0,i.addDisposableDomListener)(this.element,"paste",e)),k.isFirefox?this.register((0,i.addDisposableDomListener)(this.element,"mousedown",e=>{2===e.button&&(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,i.addDisposableDomListener)(this.element,"contextmenu",e=>{(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),k.isLinux&&this.register((0,i.addDisposableDomListener)(this.element,"auxclick",e=>{1===e.button&&(0,r.moveTextAreaUnderMouseCursor)(e,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,i.addDisposableDomListener)(this.textarea,"keyup",e=>this._keyUp(e),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"keydown",e=>this._keyDown(e),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"keypress",e=>this._keyPress(e),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,i.addDisposableDomListener)(this.textarea,"input",e=>this._inputEvent(e),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var t,n,r;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),null!==(t=this.element)&&void 0!==t&&t.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);const s=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),s.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,i.addDisposableDomListener)(this.screenElement,"mousemove",e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),s.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",a.promptLabel),k.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(v.CoreBrowserService,this.textarea,null!==(n=e.ownerDocument.defaultView)&&void 0!==n?n:window,(null!==(r=this._document)&&void 0!==r?r:"undefined"!=typeof window)?window.document:null)),this._instantiationService.setService(b.ICoreBrowserService,this._coreBrowserService),this.register((0,i.addDisposableDomListener)(this.textarea,"focus",e=>this._handleTextAreaFocus(e))),this.register((0,i.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(f.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(b.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(_.ThemeService),this._instantiationService.setService(b.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(b.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(m.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(b.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(g.MouseService),this._instantiationService.setService(b.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild(s);try{this._onWillOpen.fire(this.element)}catch(h){}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(l.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(b.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(e=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,i.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,i.addDisposableDomListener)(this.element,"mousedown",e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(h.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const e=this,t=this.element;function n(t){const n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case"mousemove":i=32,void 0===t.buttons?(r=3,void 0!==t.button&&(r=t.button<3?t.button:3)):r=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case"mouseup":i=0,r=t.button<3?t.button:3;break;case"mousedown":i=1,r=t.button<3?t.button:3;break;case"wheel":if(e._customWheelEventHandler&&!1===e._customWheelEventHandler(t))return!1;if(0===e.viewport.getLinesScrolled(t))return!1;i=t.deltaY<0?0:1,r=4;break;default:return!1}return!(void 0===i||void 0===r||r>4)&&e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}const r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this.register(this.coreMouseService.onProtocolChange(e=>{e?("debug"===this.optionsService.rawOptions.logLevel&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(e)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&e?r.mousemove||(t.addEventListener("mousemove",o.mousemove),r.mousemove=o.mousemove):(t.removeEventListener("mousemove",r.mousemove),r.mousemove=null),16&e?r.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),r.wheel=o.wheel):(t.removeEventListener("wheel",r.wheel),r.wheel=null),2&e?r.mouseup||(r.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),4&e?r.mousedrag||(r.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,i.addDisposableDomListener)(t,"mousedown",e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return n(e),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(e)})),this.register((0,i.addDisposableDomListener)(t,"wheel",e=>{if(!r.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(e))return!1;if(!this.buffer.hasScrollback){const t=this.viewport.getLinesScrolled(e);if(0===t)return;const n=T.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(e.deltaY<0?"A":"B");let r="";for(let e=0;e{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(e),this.cancel(e)},{passive:!0})),this.register((0,i.addDisposableDomListener)(t,"touchmove",e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(e)?void 0:this.cancel(e)},{passive:!1}))}refresh(e,t){var n;null===(n=this._renderService)||void 0===n||n.refreshRows(e,t)}updateCursorStyle(e){var t;null!==(t=this._selectionService)&&void 0!==t&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;1===r?(super.scrollLines(e,t,r),this.refresh(0,this.rows-1)):null===(n=this.viewport)||void 0===n||n.scrollLines(e)}paste(e){(0,r.paste)(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()}selectAll(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()}selectLines(e,t){var n;null===(n=this._selectionService)||void 0===n||n.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;const t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;t||"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);const n=(0,O.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===n.type||2===n.type){const t=this.rows-1;return this.scrollLines(2===n.type?-t:t),this.cancel(e,!0)}return 1===n.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key||!!(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&1===e.key.length&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(n.key!==T.C0.ETX&&n.key!==T.C0.CR||(this.textarea.value=""),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey?this.cancel(e,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(e,t){const n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return"keypress"===t.type?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(e){if(e.data&&"insertText"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e!==this.cols||t!==this.rows?super.resize(e,t):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(e,t){var n,r;null!==(n=this._charSizeService)&&void 0!==n&&n.measure(),null===(r=this.viewport)||void 0===r||r.syncScrollArea(!0)}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){var e;this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;const r=Date.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){const e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return;const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}}},1680:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;const o=n(3656),a=n(4725),s=n(8460),l=n(844),c=n(2585);let u=t.Viewport=class extends l.Disposable{constructor(e,t,n,r,i,a,l,c){super(),this._viewportElement=e,this._scrollArea=t,this._bufferService=n,this._optionsService=r,this._charSizeService=i,this._renderService=a,this._coreBrowserService=l,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new s.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(e=>this._renderDimensions=e)),this._handleThemeChange(c.colors),this.register(c.onChangeColors(e=>this._handleThemeChange(e))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(e){this._viewportElement.style.backgroundColor=e.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(e){if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null}syncScrollArea(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(e)}_handleScroll(e){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:t,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||-1===this._smoothScrollState.origin||-1===this._smoothScrollState.target)return;const e=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(e*(this._smoothScrollState.target-this._smoothScrollState.origin)),e<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(e,t){const n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&n0&&(n=e),r=""}}return{bufferElements:i,cursorElement:n}}getLinesScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t}_applyScrollModifier(e,t){const n=this._optionsService.rawOptions.fastScrollModifier;return"alt"===n&&t.altKey||"ctrl"===n&&t.ctrlKey||"shift"===n&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(e){this._lastTouchY=e.touches[0].pageY}handleTouchMove(e){const t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}};t.Viewport=u=r([i(2,c.IBufferService),i(3,c.IOptionsService),i(4,a.ICharSizeService),i(5,a.IRenderService),i(6,a.ICoreBrowserService),i(7,a.IThemeService)],u)},3107:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;const o=n(4725),a=n(844),s=n(2585);let l=t.BufferDecorationRenderer=class extends a.Disposable{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this.register((0,a.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var t,n;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer","top"===(null===e||void 0===e||null===(t=e.options)||void 0===t?void 0:t.layer)),r.style.width="".concat(Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width),"px"),r.style.height=(e.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight="".concat(this._renderService.dimensions.css.cell.height,"px");const i=null!==(n=e.options.x)&&void 0!==n?n:0;return i&&i>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(e,r),r}_refreshStyle(e){const t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.top=t*this._renderService.dimensions.css.cell.height+"px",n.style.display=this._altBufferIsActive?"none":"block",e.onRenderEmitter.fire(n)}}_refreshXPosition(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.element;if(!n)return;const r=null!==(t=e.options.x)&&void 0!==t?t:0;"right"===(e.options.anchor||"left")?n.style.right=r?r*this._renderService.dimensions.css.cell.width+"px":"":n.style.left=r?r*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(e){var t;null!==(t=this._decorationElements.get(e))&&void 0!==t&&t.remove(),this._decorationElements.delete(e),e.dispose()}};t.BufferDecorationRenderer=l=r([i(1,s.IBufferService),i(2,o.ICoreBrowserService),i(3,s.IDecorationService),i(4,o.IRenderService)],l)},5871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(const t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(t,e.marker.line)}if(this._zonePoolIndex=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||"full"]&&t<=e.endBufferLine+this._linePadding[n||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}}},5744:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;const o=n(5871),a=n(4725),s=n(844),l=n(2585),c={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let h=t.OverviewRulerRenderer=class extends s.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(e,t,n,r,i,a,l){var c;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._coreBrowserService=l,this._colorZoneStore=new o.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),null===(c=this._viewportElement.parentElement)||void 0===c||c.insertBefore(this._canvas,this._viewportElement);const u=this._canvas.getContext("2d");if(!u)throw new Error("Ctx cannot be null");this._ctx=u,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,s.toDisposable)(()=>{var e;null===(e=this._canvas)||void 0===e||e.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=e,u.center=t,u.right=e,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=u.left,d.right=u.left+u.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);c.left=t,c.center=t,c.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width="".concat(this._width,"px"),this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height="".concat(this._screenElement.clientHeight,"px"),this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1;const e=this._colorZoneStore.zones;for(const t of e)"full"!==t.position&&this._renderColorZone(t);for(const t of e)"full"===t.position&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(d[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-c[e.position||"full"]/2),u[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};t.OverviewRulerRenderer=h=r([i(2,l.IBufferService),i(3,l.IDecorationService),i(4,a.IRenderService),i(5,l.IOptionsService),i(6,a.ICoreBrowserService)],h)},2950:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;const o=n(4725),a=n(2585),s=n(2584);let l=t.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(e,t,n,r,i,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){const e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let t;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;const e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){const e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const t=this._textarea.value,n=t.replace(e,"");this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.lengththis.updateCompositionElements(!0),0)}}};t.CompositionHelper=l=r([i(2,a.IBufferService),i(3,a.IOptionsService),i(4,a.ICoreService),i(5,o.IRenderService)],l)},9806:(e,t)=>{function n(e,t,n){const r=n.getBoundingClientRect(),i=e.getComputedStyle(n),o=parseInt(i.getPropertyValue("padding-left")),a=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-r.left-o,t.clientY-r.top-a]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=n,t.getCoords=function(e,t,r,i,o,a,s,l,c){if(!a)return;const u=n(e,t,r);return u?(u[0]=Math.ceil((u[0]+(c?s/2:0))/s),u[1]=Math.ceil(u[1]/l),u[0]=Math.min(Math.max(u[0],1),i+(c?1:0)),u[1]=Math.min(Math.max(u[1],1),o),u):void 0}},9504:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;const r=n(2584);function i(e,t,n,r){const i=e-o(e,n),s=t-o(t,n),u=Math.abs(i-s)-function(e,t,n){let r=0;const i=e-o(e,n),s=t-o(t,n);for(let o=0;o=0&&et?"A":"B"}function s(e,t,n,r,i,o){let a=e,s=t,l="";for(;a!==n||s!==r;)a+=i?1:-1,i&&a>o.cols-1?(l+=o.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!i&&a<0&&(l+=o.buffer.translateBufferLineToString(s,!1,0,e+1),a=o.cols-1,e=a,s--);return l+o.buffer.translateBufferLineToString(s,!1,e,a)}function l(e,t){const n=t?"O":"[";return r.C0.ESC+n+e}function c(e,t){e=Math.floor(e);let n="";for(let r=0;r0?r-o(r,a):t;const h=r,f=function(e,t,n,r,a,s){let l;return l=i(n,r,a,s).length>0?r-o(r,a):t,e=n&&le?"D":"C",c(Math.abs(a-e),l(d,r));d=u>t?"D":"C";const h=Math.abs(u-t);return c(function(e,t){return t.cols-e}(u>t?e:a,n)+(h-1)*n.cols+1+((u>t?a:e)-1),l(d,r))}},1296:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;const o=n(3787),a=n(2550),s=n(2223),l=n(6171),c=n(6052),u=n(4725),d=n(8055),h=n(8460),f=n(844),p=n(2585),v="xterm-dom-renderer-owner-",g="xterm-rows",m="xterm-fg-",y="xterm-bg-",b="xterm-focus",_="xterm-selection";let w=1,x=t.DomRenderer=class extends f.Disposable{constructor(e,t,n,r,i,s,u,d,p,m,y,b,x){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=s,this._linkifier2=u,this._charSizeService=p,this._optionsService=m,this._bufferService=y,this._coreBrowserService=b,this._themeService=x,this._terminalClass=w++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new h.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(g),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(_),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,l.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=d.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(v+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this.register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this.register((0,f.toDisposable)(()=>{this._element.classList.remove(v+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new a.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const n of this._rowElements)n.style.width="".concat(this.dimensions.css.canvas.width,"px"),n.style.height="".concat(this.dimensions.css.cell.height,"px"),n.style.lineHeight="".concat(this.dimensions.css.cell.height,"px"),n.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const t="".concat(this._terminalSelector," .").concat(g," span { display: inline-block; height: 100%; vertical-align: top;}");this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width="".concat(this.dimensions.css.canvas.width,"px"),this._screenElement.style.height="".concat(this.dimensions.css.canvas.height,"px")}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t="".concat(this._terminalSelector," .").concat(g," { color: ").concat(e.foreground.css,"; font-family: ").concat(this._optionsService.rawOptions.fontFamily,"; font-size: ").concat(this._optionsService.rawOptions.fontSize,"px; font-kerning: none; white-space: pre}");t+="".concat(this._terminalSelector," .").concat(g," .xterm-dim { color: ").concat(d.color.multiplyOpacity(e.foreground,.5).css,";}"),t+="".concat(this._terminalSelector," span:not(.xterm-bold) { font-weight: ").concat(this._optionsService.rawOptions.fontWeight,";}").concat(this._terminalSelector," span.xterm-bold { font-weight: ").concat(this._optionsService.rawOptions.fontWeightBold,";}").concat(this._terminalSelector," span.xterm-italic { font-style: italic;}"),t+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",t+="@keyframes blink_block_"+this._terminalClass+" { 0% {"+" background-color: ".concat(e.cursor.css,";")+" color: ".concat(e.cursorAccent.css,"; } 50% { background-color: inherit;")+" color: ".concat(e.cursor.css,"; }}"),t+="".concat(this._terminalSelector," .").concat(g,".").concat(b," .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_")+this._terminalClass+" 1s step-end infinite;}"+"".concat(this._terminalSelector," .").concat(g,".").concat(b," .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_")+this._terminalClass+" 1s step-end infinite;}"+"".concat(this._terminalSelector," .").concat(g," .xterm-cursor.xterm-cursor-block {")+" background-color: ".concat(e.cursor.css," !important;")+" color: ".concat(e.cursorAccent.css," !important;}")+"".concat(this._terminalSelector," .").concat(g," .xterm-cursor.xterm-cursor-outline {")+" outline: 1px solid ".concat(e.cursor.css,"; outline-offset: -1px;}")+"".concat(this._terminalSelector," .").concat(g," .xterm-cursor.xterm-cursor-bar {")+" box-shadow: ".concat(this._optionsService.rawOptions.cursorWidth,"px 0 0 ").concat(e.cursor.css," inset;}")+"".concat(this._terminalSelector," .").concat(g," .xterm-cursor.xterm-cursor-underline {")+" border-bottom: 1px ".concat(e.cursor.css,"; border-bottom-style: solid; height: calc(100% - 1px);}"),t+="".concat(this._terminalSelector," .").concat(_," { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}").concat(this._terminalSelector,".focus .").concat(_," div { position: absolute; background-color: ").concat(e.selectionBackgroundOpaque.css,";}").concat(this._terminalSelector," .").concat(_," div { position: absolute; background-color: ").concat(e.selectionInactiveBackgroundOpaque.css,";}");for(const[n,r]of e.ansi.entries())t+="".concat(this._terminalSelector," .").concat(m).concat(n," { color: ").concat(r.css,"; }").concat(this._terminalSelector," .").concat(m).concat(n,".xterm-dim { color: ").concat(d.color.multiplyOpacity(r,.5).css,"; }").concat(this._terminalSelector," .").concat(y).concat(n," { background-color: ").concat(r.css,"; }");t+="".concat(this._terminalSelector," .").concat(m).concat(s.INVERTED_DEFAULT_COLOR," { color: ").concat(d.color.opaque(e.background).css,"; }").concat(this._terminalSelector," .").concat(m).concat(s.INVERTED_DEFAULT_COLOR,".xterm-dim { color: ").concat(d.color.multiplyOpacity(d.color.opaque(e.background),.5).css,"; }").concat(this._terminalSelector," .").concat(y).concat(s.INVERTED_DEFAULT_COLOR," { background-color: ").concat(e.foreground.css,"; }"),this._themeStyleElement.textContent=t}_setDefaultSpacing(){const e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing="".concat(e,"px"),this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let n=this._rowElements.length;n<=t;n++){const e=this._document.createElement("div");this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(b),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(b),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t)return;this._selectionRenderModel.update(this._terminal,e,t,n);const r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow;if(o>=this._bufferService.rows||a<0)return;const s=this._document.createDocumentFragment();if(n){const n=e[0]>t[0];s.appendChild(this._createSelectionElement(o,n?t[0]:e[0],n?e[0]:t[0],a-o+1))}else{const n=r===o?e[0]:0,l=o===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,n,l));const c=a-o-1;if(s.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,c)),o!==a){const e=i===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=this._document.createElement("div"),o=t*this.dimensions.css.cell.width;let a=this.dimensions.css.cell.width*(n-t);return o+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-o),i.style.height=r*this.dimensions.css.cell.height+"px",i.style.top=e*this.dimensions.css.cell.height+"px",i.style.left="".concat(o,"px"),i.style.width="".concat(a,"px"),i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const e of this._rowElements)e.replaceChildren()}renderRows(e,t){const n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),o=this._optionsService.rawOptions.cursorBlink,a=this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){const e=l+n.ydisp,t=this._rowElements[l],c=n.lines.get(e);if(!t||!c)break;t.replaceChildren(...this._rowFactory.createRow(c,e,e===r,a,s,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return".".concat(v).concat(this._terminalClass)}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,o){n<0&&(e=0),r<0&&(t=0);const a=this._bufferService.rows-1;n=Math.max(Math.min(n,a),0),r=Math.max(Math.min(r,a),0),i=Math.min(i,this._bufferService.cols);const s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=n;f<=r;++f){const a=f+s.ydisp,p=this._rowElements[f],v=s.lines.get(a);if(!p||!v)break;p.replaceChildren(...this._rowFactory.createRow(v,a,a===l,d,h,c,u,this.dimensions.css.cell.width,this._widthCache,o?f===n?e:0:-1,o?(f===r?t:i)-1:-1))}}};t.DomRenderer=x=r([i(7,p.IInstantiationService),i(8,u.ICharSizeService),i(9,p.IOptionsService),i(10,p.IBufferService),i(11,u.ICoreBrowserService),i(12,u.IThemeService)],x)},3787:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=void 0;const o=n(2223),a=n(643),s=n(511),l=n(2585),c=n(8055),u=n(4725),d=n(4269),h=n(6171),f=n(3734);let p=t.DomRendererRowFactory=class{constructor(e,t,n,r,i,o,a){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=o,this._themeService=a,this._workCell=new s.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,s,l,u,h,p,g){const m=[],y=this._characterJoinerService.getJoinedCharacters(t),b=this._themeService.colors;let _,w=e.getNoBgTrimmedLength();n&&w0&&j===y[0][0]){M=!0;const t=y.shift();L=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),D=t[1]-1,w=L.getWidth()}const N=this._isCellInSelection(j,t),F=n&&j===s,B=I&&j>=p&&j<=g;let z=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,e=>{z=!0});let H=L.getChars()||a.WHITESPACE_CELL_CHAR;if(" "===H&&(L.isUnderline()||L.isOverline())&&(H="\xa0"),R=w*u-h.get(H,L.isBold(),L.isItalic()),_){if(x&&(N&&A||!N&&!A&&L.bg===C)&&(N&&A&&b.selectionForeground||L.fg===k)&&L.extended.ext===E&&B===T&&R===O&&!F&&!M&&!z){L.isInvisible()?S+=a.WHITESPACE_CELL_CHAR:S+=H,x++;continue}x&&(_.textContent=S),_=this._document.createElement("span"),x=0,S=""}else _=this._document.createElement("span");if(C=L.bg,k=L.fg,E=L.extended.ext,T=B,O=R,A=N,M&&s>=j&&s<=D&&(s=j),!this._coreService.isCursorHidden&&F&&this._coreService.isCursorInitialized)if(P.push("xterm-cursor"),this._coreBrowserService.isFocused)l&&P.push("xterm-cursor-blink"),P.push("bar"===r?"xterm-cursor-bar":"underline"===r?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":P.push("xterm-cursor-outline");break;case"block":P.push("xterm-cursor-block");break;case"bar":P.push("xterm-cursor-bar");break;case"underline":P.push("xterm-cursor-underline")}if(L.isBold()&&P.push("xterm-bold"),L.isItalic()&&P.push("xterm-italic"),L.isDim()&&P.push("xterm-dim"),S=L.isInvisible()?a.WHITESPACE_CELL_CHAR:L.getChars()||a.WHITESPACE_CELL_CHAR,L.isUnderline()&&(P.push("xterm-underline-".concat(L.extended.underlineStyle))," "===S&&(S="\xa0"),!L.isUnderlineColorDefault()))if(L.isUnderlineColorRGB())_.style.textDecorationColor="rgb(".concat(f.AttributeData.toColorRGB(L.getUnderlineColor()).join(","),")");else{let e=L.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&L.isBold()&&e<8&&(e+=8),_.style.textDecorationColor=b.ansi[e].css}L.isOverline()&&(P.push("xterm-overline")," "===S&&(S="\xa0")),L.isStrikethrough()&&P.push("xterm-strikethrough"),B&&(_.style.textDecoration="underline");let V=L.getFgColor(),U=L.getFgColorMode(),W=L.getBgColor(),G=L.getBgColorMode();const q=!!L.isInverse();if(q){const e=V;V=W,W=e;const t=U;U=G,G=t}let $,Q,K,Y=!1;switch(this._decorationService.forEachDecorationAtCell(j,t,void 0,e=>{"top"!==e.options.layer&&Y||(e.backgroundColorRGB&&(G=50331648,W=e.backgroundColorRGB.rgba>>8&16777215,$=e.backgroundColorRGB),e.foregroundColorRGB&&(U=50331648,V=e.foregroundColorRGB.rgba>>8&16777215,Q=e.foregroundColorRGB),Y="top"===e.options.layer)}),!Y&&N&&($=this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque,W=$.rgba>>8&16777215,G=50331648,Y=!0,b.selectionForeground&&(U=50331648,V=b.selectionForeground.rgba>>8&16777215,Q=b.selectionForeground)),Y&&P.push("xterm-decoration-top"),G){case 16777216:case 33554432:K=b.ansi[W],P.push("xterm-bg-".concat(W));break;case 50331648:K=c.channels.toColor(W>>16,W>>8&255,255&W),this._addStyle(_,"background-color:#".concat(v((W>>>0).toString(16),"0",6)));break;default:q?(K=b.foreground,P.push("xterm-bg-".concat(o.INVERTED_DEFAULT_COLOR))):K=b.background}switch($||L.isDim()&&($=c.color.multiplyOpacity(K,.5)),U){case 16777216:case 33554432:L.isBold()&&V<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(V+=8),this._applyMinimumContrast(_,K,b.ansi[V],L,$,void 0)||P.push("xterm-fg-".concat(V));break;case 50331648:const e=c.channels.toColor(V>>16&255,V>>8&255,255&V);this._applyMinimumContrast(_,K,e,L,$,Q)||this._addStyle(_,"color:#".concat(v(V.toString(16),"0",6)));break;default:this._applyMinimumContrast(_,K,b.foreground,L,$,Q)||q&&P.push("xterm-fg-".concat(o.INVERTED_DEFAULT_COLOR))}P.length&&(_.className=P.join(" "),P.length=0),F||M||z?_.textContent=S:x++,R!==this.defaultSpacing&&(_.style.letterSpacing="".concat(R,"px")),m.push(_),j=D}return _&&x&&(_.textContent=S),m}_applyMinimumContrast(e,t,n,r,i,o){if(1===this._optionsService.rawOptions.minimumContrastRatio||(0,h.treatGlyphAsBackgroundColor)(r.getCode()))return!1;const a=this._getContrastCache(r);let s;if(i||o||(s=a.getColor(t.rgba,n.rgba)),void 0===s){var l;const e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=c.color.ensureContrastRatio(i||t,o||n,e),a.setColor((i||t).rgba,(o||n).rgba,null!==(l=s)&&void 0!==l?l:null)}return!!s&&(this._addStyle(e,"color:".concat(s.css)),!0)}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style","".concat(e.getAttribute("style")||"").concat(t,";"))}_isCellInSelection(e,t){const n=this._selectionStart,r=this._selectionEnd;return!(!n||!r)&&(this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t=n[0]&&e=n[0])}};function v(e,t,n){for(;e.length{Object.defineProperty(t,"__esModule",{value:!0}),t.WidthCache=void 0,t.WidthCache=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const n=e.createElement("span");n.classList.add("xterm-char-measure-element");const r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontWeight="bold";const i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";const o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[n,r,i,o],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize="".concat(this._fontSize,"px"),this._measureElements[0].style.fontWeight="".concat(n),this._measureElements[1].style.fontWeight="".concat(r),this._measureElements[2].style.fontWeight="".concat(n),this._measureElements[3].style.fontWeight="".concat(r),this.clear())}get(e,t,n){let r=0;if(!t&&!n&&1===e.length&&(r=e.charCodeAt(0))<256){if(-9999!==this._flat[r])return this._flat[r];const t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+="B"),n&&(i+="I");let o=this._holey.get(i);if(void 0===o){let r=0;t&&(r|=1),n&&(r|=2),o=this._measure(e,r),o>0&&this._holey.set(i,o)}return o}_measure(e,t){const n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}}},2223:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const r=n(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=r.isFirefox||r.isLegacyEdge?"bottom":"ideographic"},6171:(e,t)=>{function n(e){return 57508<=e&&e<=57558}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e},t.isPowerlineGlyph=n,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.treatGlyphAsBackgroundColor=function(e){return n(e)||function(e){return 9472<=e&&e<=9631}(e)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(e-(2*Math.round(t)-n))%(2*Math.round(t))}},6052:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class n{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1])return void this.clear();const i=e.buffers.active.ydisp,o=t[1]-i,a=n[1]-i,s=Math.max(o,0),l=Math.min(a,e.rows-1);s>=e.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=o,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=n[0])}isCellSelected(e,t,n){return!!this.hasSelection&&(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n=this.startCol&&t=this.startCol)}}t.createSelectionRenderModel=function(){return new n}},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;const o=n(2585),a=n(8460),s=n(844);let l=t.CharSizeService=class extends s.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this.register(new a.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch(r){this._measureStrategy=this.register(new u(e,t,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};t.CharSizeService=l=r([i(2,o.IOptionsService)],l);class c extends s.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){void 0!==e&&e>0&&void 0!==t&&t>0&&(this._result.width=e,this._result.height=t)}}class u extends c{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize="".concat(this._optionsService.rawOptions.fontSize,"px"),this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class d extends c{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font="".concat(this._optionsService.rawOptions.fontSize,"px ").concat(this._optionsService.rawOptions.fontFamily);const e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}}},4269:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const o=n(3734),a=n(643),s=n(511),l=n(2585);class c extends o.AttributeData{constructor(e,t,n){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=c;let u=t.CharacterJoinerService=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}register(e){const t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t1){const e=this._getJoinedRanges(r,s,o,t,i);for(let t=0;t1){const e=this._getJoinedRanges(r,s,o,t,i);for(let t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;const r=n(844),i=n(8460),o=n(3656);class a extends r.Disposable{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new s(this._window),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new i.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this.register((0,i.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return void 0===this._cachedIsFocused&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}t.CoreBrowserService=a;class s extends r.Disposable{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this.register(new r.MutableDisposable),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,r.toDisposable)(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&(null!==(e=this._resolutionMediaMatchList)&&void 0!==e&&e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia("screen and (resolution: ".concat(this._parentWindow.devicePixelRatio,"dppx)")),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkProviderService=void 0;const r=n(844);class i extends r.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,r.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{const t=this.linkProviders.indexOf(e);-1!==t&&this.linkProviders.splice(t,1)}}}}t.LinkProviderService=i},8934:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;const o=n(4725),a=n(9806);let s=t.MouseService=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return(0,a.getCoords)(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){const n=(0,a.getCoordsRelativeToElement)(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};t.MouseService=s=r([i(0,o.IRenderService),i(1,o.ICharSizeService)],s)},3230:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;const o=n(6193),a=n(4725),s=n(8460),l=n(844),c=n(7226),u=n(2585);let d=t.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(e,t,n,r,i,a,u,d){super(),this._rowCount=e,this._charSizeService=r,this._renderer=this.register(new l.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,this._observerDisposable=this.register(new l.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new s.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new s.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new s.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new s.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new o.RenderDebouncer((e,t)=>this._renderRows(e,t),u),this.register(this._renderDebouncer),this.register(u.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(a.onResize(()=>this._fullRefresh())),this.register(a.buffers.onBufferActivate(()=>{var e;return null===(e=this._renderer.value)||void 0===e?void 0:e.clear()})),this.register(n.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(i.onDecorationRegistered(()=>this._fullRefresh())),this.register(i.onDecorationRemoved(()=>this._fullRefresh())),this.register(n.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this.register(n.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this.register(d.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(u.window,t),this.register(u.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){const n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=(0,l.toDisposable)(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._isPaused?this._needsFullRefresh=!0:(n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))}_renderRows(e,t){this._renderer.value&&(e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0)}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&(null!==(e=(t=this._renderer.value).clearTextureAtlas)&&void 0!==e&&e.call(t),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var n;return null===(n=this._renderer.value)||void 0===n?void 0:n.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;null===(e=this._renderer.value)||void 0===e||e.handleCharSizeChanged()}handleBlur(){var e;null===(e=this._renderer.value)||void 0===e||e.handleBlur()}handleFocus(){var e;null===(e=this._renderer.value)||void 0===e||e.handleFocus()}handleSelectionChanged(e,t,n){var r;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,null===(r=this._renderer.value)||void 0===r||r.handleSelectionChanged(e,t,n)}handleCursorMove(){var e;null===(e=this._renderer.value)||void 0===e||e.handleCursorMove()}clear(){var e;null===(e=this._renderer.value)||void 0===e||e.clear()}};t.RenderService=d=r([i(2,u.IOptionsService),i(3,a.ICharSizeService),i(4,u.IDecorationService),i(5,u.IBufferService),i(6,a.ICoreBrowserService),i(7,a.IThemeService)],d)},9312:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;const o=n(9806),a=n(9504),s=n(456),l=n(4725),c=n(8460),u=n(844),d=n(6114),h=n(4841),f=n(511),p=n(2585),v=String.fromCharCode(160),g=new RegExp(v,"g");let m=t.SelectionService=class extends u.Disposable{constructor(e,t,n,r,i,o,a,l,d){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=o,this._optionsService=a,this._renderService=l,this._coreBrowserService=d,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new f.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this.register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new s.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])}get selectionText(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";const n=this._bufferService.buffer,r=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";const i=e[0]e.replace(g," ")).join(d.isWindows?"\r\n":"\n")}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),d.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})}_isClickInSelection(e){const t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!!(n&&r&&t)&&this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){const n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!(!n||!r)&&this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]=t[0]&&e[0]=t[0]}_selectWordAtCursor(e,t){var n,r;const i=null===(n=this._linkifier.currentLink)||void 0===n||null===(r=n.link)||void 0===r?void 0:r.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=(0,h.getRangeLength)(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const o=this._getMouseBufferCoords(e);return!!o&&(this._selectWordAt(o,t),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){const t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,e,this._screenElement)[1];const n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-50),50),t/=50,t/Math.abs(t)+Math.round(14*t))}shouldForceSelection(e){return d.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):1===e.detail?this._handleSingleClick(e):2===e.detail?this._handleDoubleClick(e):3===e.detail&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){const t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;const t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd)return void this.refresh(!0);2===this._activeSelectionMode?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const n=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){const t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&void 0!==t[0]&&void 0!==t[1]){const e=(0,a.moveToCellSequence)(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);n?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,n)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(e=>this._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){const i=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e[0]>=this._bufferService.cols)return;const i=this._bufferService.buffer,o=i.lines.get(e[1]);if(!o)return;const a=i.translateBufferLineToString(e[1],!1);let s=this._convertViewportColToCharacterIndex(o,e[0]),l=s;const c=e[0]-s;let u=0,d=0,h=0,f=0;if(" "===a.charAt(s)){for(;s>0&&" "===a.charAt(s-1);)s--;for(;l1&&(f+=r-1,l+=r-1);t>0&&s>0&&!this._isCharWordSeparator(o.loadCell(t-1,this._workCell));){o.loadCell(t-1,this._workCell);const e=this._workCell.getChars().length;0===this._workCell.getWidth()?(u++,t--):e>1&&(h+=e-1,s-=e-1),s--,t--}for(;n1&&(f+=e-1,l+=e-1),l++,n++}}l++;let p=s+c-u+h,v=Math.min(this._bufferService.cols,l-s+u+d-h-f);if(t||""!==a.slice(s,l).trim()){if(n&&0===p&&32!==o.getCodePoint(0)){const t=i.lines.get(e[1]-1);if(t&&o.isWrapped&&32!==t.getCodePoint(this._bufferService.cols-1)){const t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){const e=this._bufferService.cols-t.start;p-=e,v+=e}}}if(r&&p+v===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){const t=i.lines.get(e[1]+1);if(null!==t&&void 0!==t&&t.isWrapped&&32!==t.getCodePoint(0)){const t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(v+=t.length)}}return{start:p,length:v}}}_selectWordAt(e,t){const n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){const t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){const t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,h.getRangeLength)(n,this._bufferService.cols)}};t.SelectionService=m=r([i(3,p.IBufferService),i(4,p.ICoreService),i(5,l.IMouseService),i(6,p.IOptionsService),i(7,l.IRenderService),i(8,l.ICoreBrowserService)],m)},4725:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ILinkProviderService=t.IThemeService=t.ICharacterJoinerService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;const r=n(8343);t.ICharSizeService=(0,r.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,r.createDecorator)("CoreBrowserService"),t.IMouseService=(0,r.createDecorator)("MouseService"),t.IRenderService=(0,r.createDecorator)("RenderService"),t.ISelectionService=(0,r.createDecorator)("SelectionService"),t.ICharacterJoinerService=(0,r.createDecorator)("CharacterJoinerService"),t.IThemeService=(0,r.createDecorator)("ThemeService"),t.ILinkProviderService=(0,r.createDecorator)("LinkProviderService")},6731:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeService=t.DEFAULT_ANSI_COLORS=void 0;const o=n(7239),a=n(8055),s=n(8460),l=n(844),c=n(2585),u=a.css.toColor("#ffffff"),d=a.css.toColor("#000000"),h=a.css.toColor("#ffffff"),f=a.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const e=[a.css.toColor("#2e3436"),a.css.toColor("#cc0000"),a.css.toColor("#4e9a06"),a.css.toColor("#c4a000"),a.css.toColor("#3465a4"),a.css.toColor("#75507b"),a.css.toColor("#06989a"),a.css.toColor("#d3d7cf"),a.css.toColor("#555753"),a.css.toColor("#ef2929"),a.css.toColor("#8ae234"),a.css.toColor("#fce94f"),a.css.toColor("#729fcf"),a.css.toColor("#ad7fa8"),a.css.toColor("#34e2e2"),a.css.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){const r=t[n/36%6|0],i=t[n/6%6|0],o=t[n%6];e.push({css:a.channels.toCss(r,i,o),rgba:a.channels.toRgba(r,i,o)})}for(let n=0;n<24;n++){const t=8+10*n;e.push({css:a.channels.toCss(t,t,t),rgba:a.channels.toRgba(t,t,t)})}return e})());let v=t.ThemeService=class extends l.Disposable{get colors(){return this._colors}constructor(e){super(),this._optionsService=e,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new s.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:d,cursor:h,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:a.color.blend(d,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:a.color.blend(d,p),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=this._colors;if(n.foreground=g(e.foreground,u),n.background=g(e.background,d),n.cursor=g(e.cursor,h),n.cursorAccent=g(e.cursorAccent,f),n.selectionBackgroundTransparent=g(e.selectionBackground,p),n.selectionBackgroundOpaque=a.color.blend(n.background,n.selectionBackgroundTransparent),n.selectionInactiveBackgroundTransparent=g(e.selectionInactiveBackground,n.selectionBackgroundTransparent),n.selectionInactiveBackgroundOpaque=a.color.blend(n.background,n.selectionInactiveBackgroundTransparent),n.selectionForeground=e.selectionForeground?g(e.selectionForeground,a.NULL_COLOR):void 0,n.selectionForeground===a.NULL_COLOR&&(n.selectionForeground=void 0),a.color.isOpaque(n.selectionBackgroundTransparent)){const e=.3;n.selectionBackgroundTransparent=a.color.opacity(n.selectionBackgroundTransparent,e)}if(a.color.isOpaque(n.selectionInactiveBackgroundTransparent)){const e=.3;n.selectionInactiveBackgroundTransparent=a.color.opacity(n.selectionInactiveBackgroundTransparent,e)}if(n.ansi=t.DEFAULT_ANSI_COLORS.slice(),n.ansi[0]=g(e.black,t.DEFAULT_ANSI_COLORS[0]),n.ansi[1]=g(e.red,t.DEFAULT_ANSI_COLORS[1]),n.ansi[2]=g(e.green,t.DEFAULT_ANSI_COLORS[2]),n.ansi[3]=g(e.yellow,t.DEFAULT_ANSI_COLORS[3]),n.ansi[4]=g(e.blue,t.DEFAULT_ANSI_COLORS[4]),n.ansi[5]=g(e.magenta,t.DEFAULT_ANSI_COLORS[5]),n.ansi[6]=g(e.cyan,t.DEFAULT_ANSI_COLORS[6]),n.ansi[7]=g(e.white,t.DEFAULT_ANSI_COLORS[7]),n.ansi[8]=g(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),n.ansi[9]=g(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),n.ansi[10]=g(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),n.ansi[11]=g(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),n.ansi[12]=g(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),n.ansi[13]=g(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),n.ansi[14]=g(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),n.ansi[15]=g(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),e.extendedAnsi){const r=Math.min(n.ansi.length-16,e.extendedAnsi.length);for(let i=0;i{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;const r=n(8460),i=n(844);class o extends i.Disposable{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this.register(new r.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new r.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new r.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;const t=new Array(e);for(let n=0;nthis._length)for(let t=this._length;t=e;n--)this._array[this._getCyclicIndex(n+(arguments.length<=2?0:arguments.length-2))]=this._array[this._getCyclicIndex(n)];for(let n=0;n<(arguments.length<=2?0:arguments.length-2);n++)this._array[this._getCyclicIndex(e+n)]=n+2<2||arguments.length<=n+2?void 0:arguments[n+2];if((arguments.length<=2?0:arguments.length-2)&&this.onInsertEmitter.fire({index:e,amount:arguments.length<=2?0:arguments.length-2}),this._length+(arguments.length<=2?0:arguments.length-2)>this._maxLength){const e=this._length+(arguments.length<=2?0:arguments.length-2)-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=arguments.length<=2?0:arguments.length-2}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(let i=t-1;i>=0;i--)this.set(e+i+n,this.get(e+i));const r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("object"!=typeof t)return t;const r=Array.isArray(t)?[]:{};for(const i in t)r[i]=n<=1?t[i]:t[i]&&e(t[i],n-1);return r}},8055:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;const r=n(6114);let i=0,o=0,a=0,s=0;var l,c,u,d,h;function f(e){const t=e.toString(16);return t.length<2?"0"+t:t}function p(e,t){return e3&&void 0!==arguments[3]?arguments[3]:255))>>>0},e.toColor=function(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}}(l||(t.channels=l={})),function(e){function t(e,t){return s=Math.round(255*t),[i,o,a]=h.toChannels(e.rgba),{css:l.toCss(i,o,a,s),rgba:l.toRgba(i,o,a,s)}}e.blend=function(e,t){if(s=(255&t.rgba)/255,1===s)return{css:t.css,rgba:t.rgba};const n=t.rgba>>24&255,r=t.rgba>>16&255,c=t.rgba>>8&255,u=e.rgba>>24&255,d=e.rgba>>16&255,h=e.rgba>>8&255;return i=u+Math.round((n-u)*s),o=d+Math.round((r-d)*s),a=h+Math.round((c-h)*s),{css:l.toCss(i,o,a),rgba:l.toRgba(i,o,a)}},e.isOpaque=function(e){return 255==(255&e.rgba)},e.ensureContrastRatio=function(e,t,n){const r=h.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return l.toColor(r>>24&255,r>>16&255,r>>8&255)},e.opaque=function(e){const t=(255|e.rgba)>>>0;return[i,o,a]=h.toChannels(t),{css:l.toCss(i,o,a),rgba:t}},e.opacity=t,e.multiplyOpacity=function(e,n){return s=255&e.rgba,t(e,s*n/255)},e.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}}(c||(t.color=c={})),function(e){let t,n;if(!r.isNode){const e=document.createElement("canvas");e.width=1,e.height=1;const r=e.getContext("2d",{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation="copy",n=t.createLinearGradient(0,0,1,1))}e.toColor=function(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return i=parseInt(e.slice(1,2).repeat(2),16),o=parseInt(e.slice(2,3).repeat(2),16),a=parseInt(e.slice(3,4).repeat(2),16),l.toColor(i,o,a);case 5:return i=parseInt(e.slice(1,2).repeat(2),16),o=parseInt(e.slice(2,3).repeat(2),16),a=parseInt(e.slice(3,4).repeat(2),16),s=parseInt(e.slice(4,5).repeat(2),16),l.toColor(i,o,a,s);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}const r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]),s=Math.round(255*(void 0===r[5]?1:parseFloat(r[5]))),l.toColor(i,o,a,s);if(!t||!n)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=n,t.fillStyle=e,"string"!=typeof t.fillStyle)throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[i,o,a,s]=t.getImageData(0,0,1,1).data,255!==s)throw new Error("css.toColor: Unsupported css format");return{rgba:l.toRgba(i,o,a,s),css:e}}}(u||(t.css=u={})),function(e){function t(e,t,n){const r=e/255,i=t/255,o=n/255;return.2126*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(d||(t.rgb=d={})),function(e){function t(e,t,n){const r=e>>24&255,i=e>>16&255,o=e>>8&255;let a=t>>24&255,s=t>>16&255,l=t>>8&255,c=p(d.relativeLuminance2(a,s,l),d.relativeLuminance2(r,i,o));for(;c0||s>0||l>0);)a-=Math.max(0,Math.ceil(.1*a)),s-=Math.max(0,Math.ceil(.1*s)),l-=Math.max(0,Math.ceil(.1*l)),c=p(d.relativeLuminance2(a,s,l),d.relativeLuminance2(r,i,o));return(a<<24|s<<16|l<<8|255)>>>0}function n(e,t,n){const r=e>>24&255,i=e>>16&255,o=e>>8&255;let a=t>>24&255,s=t>>16&255,l=t>>8&255,c=p(d.relativeLuminance2(a,s,l),d.relativeLuminance2(r,i,o));for(;c>>0}e.blend=function(e,t){if(s=(255&t)/255,1===s)return t;const n=t>>24&255,r=t>>16&255,c=t>>8&255,u=e>>24&255,d=e>>16&255,h=e>>8&255;return i=u+Math.round((n-u)*s),o=d+Math.round((r-d)*s),a=h+Math.round((c-h)*s),l.toRgba(i,o,a)},e.ensureContrastRatio=function(e,r,i){const o=d.relativeLuminance(e>>8),a=d.relativeLuminance(r>>8);if(p(o,a)>8));if(sp(o,d.relativeLuminance(t>>8))?a:t}return a}const s=n(e,r,i),l=p(o,d.relativeLuminance(s>>8));if(lp(o,d.relativeLuminance(n>>8))?s:n}return s}},e.reduceLuminance=t,e.increaseLuminance=n,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}}(h||(t.rgba=h={})),t.toPaddedHex=f,t.contrastRatio=p},8969:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;const r=n(844),i=n(2585),o=n(4348),a=n(7866),s=n(744),l=n(7302),c=n(6975),u=n(8460),d=n(1753),h=n(1480),f=n(7994),p=n(9282),v=n(5435),g=n(5981),m=n(2660);let y=!1;class b extends r.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event(e=>{var t;null===(t=this._onScrollApi)||void 0===t||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(const t in e)this.optionsService.options[t]=e[t]}constructor(e){super(),this._windowsWrappingHeuristics=this.register(new r.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new l.OptionsService(e)),this._instantiationService.setService(i.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(s.BufferService)),this._instantiationService.setService(i.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(a.LogService)),this._instantiationService.setService(i.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.CoreService)),this._instantiationService.setService(i.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(i.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(h.UnicodeService)),this._instantiationService.setService(i.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(i.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(m.OscLinkService),this._instantiationService.setService(i.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new v.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new g.WriteBuffer((e,t)=>this._inputHandler.parse(e,t))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=i.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(e,t)}input(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,s.MINIMUM_COLS),t=Math.max(t,s.MINIMUM_ROWS),this._bufferService.resize(e,t))}scroll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._bufferService.scroll(e,t)}scrollLines(e,t,n){this._bufferService.scrollLines(e,t,n)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){const t=e-this._bufferService.buffer.ydisp;0!==t&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1;const t=this.optionsService.rawOptions.windowsPty;t&&void 0!==t.buildNumber&&void 0!==t.buildNumber?e=!!("conpty"===t.backend&&t.buildNumber<21376):this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const e=[];e.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,r.toDisposable)(()=>{for(const t of e)t.dispose()})}}}t.CoreTerminal=b},8460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;tt.fire(e))},t.runAndSubscribe=function(e,t){return t(void 0),e(e=>t(e))}},5435:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;const o=n(2584),a=n(7116),s=n(2015),l=n(844),c=n(482),u=n(8437),d=n(8460),h=n(643),f=n(511),p=n(3734),v=n(2585),g=n(1480),m=n(6242),y=n(6351),b=n(5941),_={"(":0,")":1,"*":2,"+":3,"-":1,".":2},w=131072;function x(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var S;!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(S||(t.WindowsOptionsReportType=S={}));let C=0;class k extends l.Disposable{getAttrData(){return this._curAttrData}constructor(e,t,n,r,i,l,h,p){let v=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new s.EscapeSequenceParser;super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=l,this._coreMouseService=h,this._unicodeService=p,this._parser=v,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new E(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug("Unknown EXECUTE code: ",{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{"HOOK"===t&&(n=n.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:"@"},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:"A"},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:"B"},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:"C"},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:"D"},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:"E"},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:"F"},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:"G"},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:"H"},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:"I"},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:"J"},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:"K"},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:"L"},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:"M"},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:"P"},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:"S"},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:"T"},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:"X"},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:"Z"},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:"a"},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:"b"},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:"c"},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:">",final:"c"},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:"d"},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:"e"},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:"f"},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:"g"},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:"h"},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:"?",final:"h"},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:"l"},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:"?",final:"l"},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:"m"},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:"n"},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:"?",final:"n"},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},e=>this.softReset(e)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:"r"},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:"s"},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:"t"},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:"u"},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},e=>this.requestMode(e,!1)),this._parser.setExecuteHandler(o.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(o.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(o.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(o.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(o.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(o.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(o.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(o.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(o.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(o.C1.IND,()=>this.index()),this._parser.setExecuteHandler(o.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(o.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new m.OscHandler(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new m.OscHandler(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new m.OscHandler(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new m.OscHandler(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new m.OscHandler(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new m.OscHandler(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new m.OscHandler(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new m.OscHandler(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new m.OscHandler(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new m.OscHandler(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new m.OscHandler(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new m.OscHandler(e=>this.restoreCursorColor(e))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const o in a.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:o},()=>this.selectCharset("("+o)),this._parser.registerEscHandler({intermediates:")",final:o},()=>this.selectCharset(")"+o)),this._parser.registerEscHandler({intermediates:"*",final:o},()=>this.selectCharset("*"+o)),this._parser.registerEscHandler({intermediates:"+",final:o},()=>this.selectCharset("+"+o)),this._parser.registerEscHandler({intermediates:"-",final:o},()=>this.selectCharset("-"+o)),this._parser.registerEscHandler({intermediates:".",final:o},()=>this.selectCharset("."+o)),this._parser.registerEscHandler({intermediates:"/",final:o},()=>this.selectCharset("/"+o));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error("Parsing error: ",e),e)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new y.DcsHandler((e,t)=>this.requestStatusString(e,t)))}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=v.LogLevelEnum.WARN&&Promise.race([e,new Promise((e,t)=>setTimeout(()=>t("#SLOW_TIMEOUT"),5e3))]).catch(e=>{if("#SLOW_TIMEOUT"!==e)throw e;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,o=0;const a=this._parseStack.paused;if(a){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>w&&(o=this._parseStack.position+w)}if(this._logService.logLevel<=v.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+' "'.concat("string"==typeof e?e:Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(""),'"'),"string"==typeof e?e.split("").map(e=>e.charCodeAt(0)):e),this._parseBuffer.lengthw)for(let c=o;c0&&2===p.getWidth(this._activeBuffer.x-1)&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let v=this._parser.precedingJoinState;for(let m=t;ms)if(l){const e=p;let t=this._activeBuffer.x-y;for(this._activeBuffer.x=y,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),y>0&&p instanceof u.BufferLine&&p.copyCellsFrom(e,t,0,y,!1);t=0;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}else if(d&&(p.insertCells(this._activeBuffer.x,i-y,this._activeBuffer.getNullCell(f)),2===p.getWidth(s-1)&&p.setCellFromCodepoint(s-1,h.NULL_CELL_CODE,h.NULL_CELL_WIDTH,f)),p.setCellFromCodepoint(this._activeBuffer.x++,r,i,f),i>0)for(;--i;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}this._parser.precedingJoinState=v,this._activeBuffer.x0&&0===p.getWidth(this._activeBuffer.x)&&!p.hasContent(this._activeBuffer.x)&&p.setCellFromCodepoint(this._activeBuffer.x,0,1,f),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return"t"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,e=>!x(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e))}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new y.DcsHandler(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new m.OscHandler(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&null!==(e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))&&void 0!==e&&e.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._bufferService.cols-1;this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){const t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){const t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){const t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){const t=e.params[0];return 1===t&&(this._curAttrData.bg|=536870912),2!==t&&0!==t||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(o.isWrapped=!1)}_resetBufferLine(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(t=this._activeBuffer.y,this._dirtyRowTracker.markDirty(t),this._eraseInBufferLine(t++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,n);t=this._bufferService.cols&&(this._activeBuffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t,n);this._dirtyRowTracker.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowTracker.markDirty(t-1);t--;)this._resetBufferLine(t,n);this._dirtyRowTracker.markDirty(0);break;case 3:const e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0))}return!0}eraseInLine(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let l=s;for(let c=1;c0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(e){return 0===(this._optionsService.rawOptions.termName+"").indexOf(e)}setMode(e){for(let t=0;te?1:2,f=e.params[0];return p=f,v=t?2===f?4:4===f?h(a.modes.insertMode):12===f?3:20===f?h(d.convertEol):0:1===f?h(n.applicationCursorKeys):3===f?d.windowOptions.setWinLines?80===l?2:132===l?1:0:0:6===f?h(n.origin):7===f?h(n.wraparound):8===f?3:9===f?h("X10"===r):12===f?h(d.cursorBlink):25===f?h(!a.isCursorHidden):45===f?h(n.reverseWraparound):66===f?h(n.applicationKeypad):67===f?4:1e3===f?h("VT200"===r):1002===f?h("DRAG"===r):1003===f?h("ANY"===r):1004===f?h(n.sendFocus):1005===f?4:1006===f?h("SGR"===i):1015===f?4:1016===f?h("SGR_PIXELS"===i):1048===f?1:47===f||1047===f||1049===f?h(c===u):2004===f?h(n.bracketedPasteMode):0,a.triggerDataEvent("".concat(o.C0.ESC,"[").concat(t?"":"?").concat(p,";").concat(v,"$y")),!0;var p,v}_updateAttrColor(e,t,n,r,i){return 2===t?(e|=50331648,e&=-16777216,e|=p.AttributeData.fromColorRGB([n,r,i])):5===t&&(e&=-50331904,e|=33554432|255&n),e}_extractColor(e,t,n){const r=[0,0,-1,0,0,0];let i=0,o=0;do{if(r[o+i]=e.params[t+o],e.hasSubParams(t+o)){const n=e.getSubParams(t+o);let a=0;do{5===r[1]&&(i=1),r[o+a+1+i]=n[a]}while(++a=2||2===r[1]&&o+i>=5)break;r[1]&&(i=1)}while(++o+t5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=u.DEFAULT_ATTR_DATA.fg,e.bg=u.DEFAULT_ATTR_DATA.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(1===e.length&&0===e.params[0])return this._processSGR0(this._curAttrData),!0;const t=e.length;let n;const r=this._curAttrData;for(let i=0;i=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=16777224|n-90):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=16777224|n-100):0===n?this._processSGR0(r):1===n?r.fg|=134217728:3===n?r.bg|=67108864:4===n?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):5===n?r.fg|=536870912:7===n?r.fg|=67108864:8===n?r.fg|=1073741824:9===n?r.fg|=2147483648:2===n?r.bg|=134217728:21===n?this._processUnderline(2,r):22===n?(r.fg&=-134217729,r.bg&=-134217729):23===n?r.bg&=-67108865:24===n?(r.fg&=-268435457,this._processUnderline(0,r)):25===n?r.fg&=-536870913:27===n?r.fg&=-67108865:28===n?r.fg&=-1073741825:29===n?r.fg&=2147483647:39===n?(r.fg&=-67108864,r.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):49===n?(r.bg&=-67108864,r.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):38===n||48===n||58===n?i+=this._extractColor(e,i,r):53===n?r.bg|=1073741824:55===n?r.bg&=-1073741825:59===n?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):100===n?(r.fg&=-67108864,r.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,r.bg&=-67108864,r.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent("".concat(o.C0.ESC,"[0n"));break;case 6:const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent("".concat(o.C0.ESC,"[").concat(e,";").concat(t,"R"))}return!0}deviceStatusPrivate(e){if(6===e.params[0]){const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent("".concat(o.C0.ESC,"[?").concat(e,";").concat(t,"R"))}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){const t=e.params[0]||1;switch(t){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const n=t%2==1;return this._optionsService.options.cursorBlink=n,!0}setScrollRegion(e){const t=e.params[0]||1;let n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||0===n)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!x(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;const t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(S.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(S.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent("".concat(o.C0.ESC,"[8;").concat(this._bufferService.rows,";").concat(this._bufferService.cols,"t"));break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){const t=[],n=e.split(";");for(;n.length>1;){const e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){const n=parseInt(e);if(T(n))if("?"===r)t.push({type:0,index:n});else{const e=(0,b.parseColor)(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){const t=e.split(";");return!(t.length<2)&&(t[1]?this._createHyperlink(t[0],t[1]):!t[0]&&this._finishHyperlink())}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();const n=e.split(":");let r;const i=n.findIndex(e=>e.startsWith("id="));return-1!==i&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){const n=e.split(";");for(let r=0;r=this._specialColors.length);++r,++t)if("?"===n[r])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{const e=(0,b.parseColor)(n[r]);e&&this._onColor.fire([{type:1,index:this._specialColors[t],color:e}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;const t=[],n=e.split(";");for(let r=0;r=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){const e=new f.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t(this._coreService.triggerDataEvent("".concat(o.C0.ESC).concat(e).concat(o.C0.ESC,"\\")),!0))('"q'===e?"P1$r".concat(this._curAttrData.isProtected()?1:0,'"q'):'"p'===e?'P1$r61;1"p':"r"===e?"P1$r".concat(n.scrollTop+1,";").concat(n.scrollBottom+1,"r"):"m"===e?"P1$r0m":" q"===e?"P1$r".concat({block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)," q"):"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}}t.InputHandler=k;let E=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){ethis.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(C=e,e=t,t=C),ethis.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function T(e){return 0<=e&&e<256}E=r([i(0,v.IBufferService)],E)},844:(e,t)=>{function n(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null!==(t=this._value)&&void 0!==t&&t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null!==(e=this._value)&&void 0!==e&&e.dispose(),this._value=void 0}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=n,t.getDisposeArrayDisposable=function(e){return{dispose:()=>n(e)}}},1505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class n{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}}t.TwoKeyMap=n,t.FourKeyMap=class{constructor(){this._data=new n}set(e,t,r,i,o){this._data.get(e,t)||this._data.set(e,t,new n),this._data.get(e,t).set(r,i,o)}get(e,t,n,r){var i;return null===(i=this._data.get(e,t))||void 0===i?void 0:i.get(n,r)}clear(){this._data.clear()}}},6114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode="undefined"!=typeof process;const n=t.isNode?"node":navigator.userAgent,r=t.isNode?"node":navigator.platform;t.isFirefox=n.includes("Firefox"),t.isLegacyEdge=n.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.getSafariVersion=function(){if(!t.isSafari)return 0;const e=n.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),t.isLinux=r.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(n)},6106:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortedList=void 0;let n=0;t.SortedList=class{constructor(e){this._getKey=e,this._array=[]}clear(){this._array.length=0}insert(e){0!==this._array.length?(n=this._search(this._getKey(e)),this._array.splice(n,0,e)):this._array.push(e)}delete(e){if(0===this._array.length)return!1;const t=this._getKey(e);if(void 0===t)return!1;if(n=this._search(t),-1===n)return!1;if(this._getKey(this._array[n])!==t)return!1;do{if(this._array[n]===e)return this._array.splice(n,1),!0}while(++n=this._array.length)&&this._getKey(this._array[n])===e))do{yield this._array[n]}while(++n=this._array.length)&&this._getKey(this._array[n])===e))do{t(this._array[n])}while(++n=t;){let r=t+n>>1;const i=this._getKey(this._array[r]);if(i>e)n=r-1;else{if(!(i0&&this._getKey(this._array[r-1])===e;)r--;return r}t=r+1}}return t}}},7226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const r=n(6114);class i{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._ii)return r-t<-20&&console.warn("task queue exceeded allotted deadline by ".concat(Math.abs(Math.round(r-t)),"ms")),void this._start();r=i}this.clear()}}class o extends i{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){const t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}t.PriorityTaskQueue=o,t.IdleTaskQueue=!r.isNode&&"requestIdleCallback"in window?class extends i{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}}:o,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}}},9282:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;const r=n(643);t.updateWindowsModeWrappedState=function(e){const t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),n=null===t||void 0===t?void 0:t.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&n&&(i.isWrapped=n[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&n[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class n{constructor(){this.fg=0,this.bg=0,this.extended=new r}static toColorRGB(e){return[e>>>16&255,e>>>8&255,255&e]}static fromColorRGB(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]}clone(){const e=new n;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=n;class r{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(e){this._ext&=-67108864,this._ext|=67108863&e}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){const e=(3758096384&this._ext)>>29;return e<0?4294967288^e:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}clone(){return new r(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}t.ExtendedAttrs=r},9092:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Buffer=t.MAX_BUFFER_SIZE=void 0;const r=n(6349),i=n(7226),o=n(3734),a=n(8437),s=n(4634),l=n(511),c=n(643),u=n(4863),d=n(7116);t.MAX_BUFFER_SIZE=4294967295,t.Buffer=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=a.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=l.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=l.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new i.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(e,t){return new a.BufferLine(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const e=this.ybase+this.y-this.ydisp;return e>=0&&et.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:n}fillViewportRows(e){if(0===this.lines.length){void 0===e&&(e=a.DEFAULT_ATTR_DATA);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){const n=this.getNullCell(a.DEFAULT_ATTR_DATA);let r=0;const i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new a.BufferLine(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition100)return!0;return e}get _isReflowEnabled(){const e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&"conpty"===e.backend&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){const n=(0,s.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(a.DEFAULT_ATTR_DATA));if(n.length>0){const r=(0,s.reflowLargerCreateNewLayout)(this.lines,n);(0,s.reflowLargerApplyNewLayout)(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){const r=this.getNullCell(a.DEFAULT_ATTR_DATA);let i=n;for(;i-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length=0;o--){let l=this.lines.get(o);if(!l||!l.isWrapped&&l.getTrimmedLength()<=e)continue;const c=[l];for(;l.isWrapped&&o>0;)l=this.lines.get(--o),c.unshift(l);const u=this.ybase+this.y;if(u>=o&&u0&&(r.push({start:o+c.length+i,newLines:v}),i+=v.length),c.push(...v);let g=h.length-1,m=h[g];0===m&&(g--,m=h[g]);let y=c.length-f-1,b=d;for(;y>=0;){const e=Math.min(b,m);if(void 0===c[g])break;if(c[g].copyCellsFrom(c[y],b-e,m-e,e,!0),m-=e,0===m&&(g--,m=h[g]),b-=e,0===b){y--;const e=Math.max(y,0);b=(0,s.getWrappedLineTrimmedLength)(c,e,this._cols)}}for(let t=0;t0;)0===this.ybase?this.y0){const e=[],t=[];for(let r=0;r=0;d--)if(s&&s.start>o+l){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(d--,s.newLines[e]);d++,e.push({index:o+1,amount:s.newLines.length}),l+=s.newLines.length,s=r[++a]}else this.lines.set(d,t[o--]);let c=0;for(let r=e.length-1;r>=0;r--)e[r].index+=c,this.lines.onInsertEmitter.fire(e[r]),c+=e[r].amount;const u=Math.max(0,n+i-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;const i=this.lines.get(e);return i?i.translateToString(t,n,r):""}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+10;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.linee.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}}},8437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;const r=n(3734),i=n(511),o=n(643),a=n(482);t.DEFAULT_ATTR_DATA=Object.freeze(new r.AttributeData);let s=0;class l{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const r=t||i.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let i=0;i>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[3*e+1]=t[o.CHAR_DATA_ATTR_INDEX],t[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,a.stringFromCodePoint)(2097151&t):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,t){return s=3*e,t.content=this._data[s+0],t.fg=this._data[s+1],t.bg=this._data[s+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg}setCellFromCodepoint(e,t,n,r){268435456&r.bg&&(this._extendedAttrs[e]=r.extended),this._data[3*e+0]=t|n<<22,this._data[3*e+1]=r.fg,this._data[3*e+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[3*e+0];2097152&r?this._combined[e]+=(0,a.stringFromCodePoint)(t):2097151&r?(this._combined[e]=(0,a.stringFromCodePoint)(2097151&r)+(0,a.stringFromCodePoint)(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[3*e+0]=r}insertCells(e,t,n){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let i=0;i3&&void 0!==arguments[3]&&arguments[3])for(e&&2===this.getWidth(e-1)&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),tthis.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n=e&&delete this._combined[r]}const r=Object.keys(this._extendedAttrs);for(let n=0;n=e&&delete this._extendedAttrs[t]}}return this.length=e,4*n*21&&void 0!==arguments[1]&&arguments[1])for(let t=0;t=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){const o=e._data;if(i)for(let s=r-1;s>=0;s--){for(let e=0;e<3;e++)this._data[3*(n+s)+e]=o[3*(t+s)+e];268435456&o[3*(t+s)+2]&&(this._extendedAttrs[n+s]=e._extendedAttrs[t+s])}else for(let s=0;s=t&&(this._combined[r-t+n]=e._combined[r])}}translateToString(e,t,n,r){var i,s;t=null!==(i=t)&&void 0!==i?i:0,n=null!==(s=n)&&void 0!==s?s:this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let l="";for(;t>22||1}return r&&r.push(t),l}}t.BufferLine=l},4841:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error("Buffer range end (".concat(e.end.x,", ").concat(e.end.y,") cannot be before start (").concat(e.start.x,", ").concat(e.start.y,")"));return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function n(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();const r=!e[t].hasContent(n-1)&&1===e[t].getWidth(n-1),i=2===e[t+1].getWidth(0);return r&&i?n-1:n}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,r,i,o){const a=[];for(let s=0;s=s&&i0&&(e>d||0===u[e].getTrimmedLength());e--)v++;v>0&&(a.push(s+u.length-v),a.push(v)),s+=u.length-1}return a},t.reflowLargerCreateNewLayout=function(e,t){const n=[];let r=0,i=t[r],o=0;for(let a=0;an(e,i,t)).reduce((e,t)=>e+t);let a=0,s=0,l=0;for(;lc&&(a-=c,s++);const u=2===e[s].getWidth(a-1);u&&a--;const d=u?r-1:r;i.push(d),l+=d}return i},t.getWrappedLineTrimmedLength=n},5295:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;const r=n(8460),i=n(844),o=n(9092);class a extends i.Disposable{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this.register(new r.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}}t.BufferSet=a},511:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const r=n(482),i=n(643),o=n(3734);class a extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(e){const t=new a;return t.setFromCharData(e),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,r.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(e){this.fg=e[i.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(e[i.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[i.CHAR_DATA_CHAR_INDEX].length){const n=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const r=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(n-55296)+r-56320+65536|e[i.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[i.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[i.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[i.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=a},643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;const r=n(8460),i=n(844);class o{get id(){return this._id}constructor(e){this.line=e,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new r.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,i.disposeArray)(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}}t.Marker=o,o._nextId=1},7116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"\u25c6",a:"\u2592",b:"\u2409",c:"\u240c",d:"\u240d",e:"\u240a",f:"\xb0",g:"\xb1",h:"\u2424",i:"\u240b",j:"\u2518",k:"\u2510",l:"\u250c",m:"\u2514",n:"\u253c",o:"\u23ba",p:"\u23bb",q:"\u2500",r:"\u23bc",s:"\u23bd",t:"\u251c",u:"\u2524",v:"\u2534",w:"\u252c",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03c0","|":"\u2260","}":"\xa3","~":"\xb7"},t.CHARSETS.A={"#":"\xa3"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"\xa3","@":"\xbe","[":"ij","\\":"\xbd","]":"|","{":"\xa8","|":"f","}":"\xbc","~":"\xb4"},t.CHARSETS.C=t.CHARSETS[5]={"[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},t.CHARSETS.R={"#":"\xa3","@":"\xe0","[":"\xb0","\\":"\xe7","]":"\xa7","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xa8"},t.CHARSETS.Q={"@":"\xe0","[":"\xe2","\\":"\xe7","]":"\xea","^":"\xee","`":"\xf4","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xfb"},t.CHARSETS.K={"@":"\xa7","[":"\xc4","\\":"\xd6","]":"\xdc","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xdf"},t.CHARSETS.Y={"#":"\xa3","@":"\xa7","[":"\xb0","\\":"\xe7","]":"\xe9","`":"\xf9","{":"\xe0","|":"\xf2","}":"\xe8","~":"\xec"},t.CHARSETS.E=t.CHARSETS[6]={"@":"\xc4","[":"\xc6","\\":"\xd8","]":"\xc5","^":"\xdc","`":"\xe4","{":"\xe6","|":"\xf8","}":"\xe5","~":"\xfc"},t.CHARSETS.Z={"#":"\xa3","@":"\xa7","[":"\xa1","\\":"\xd1","]":"\xbf","{":"\xb0","|":"\xf1","}":"\xe7"},t.CHARSETS.H=t.CHARSETS[7]={"@":"\xc9","[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},t.CHARSETS["="]={"#":"\xf9","@":"\xe0","[":"\xe9","\\":"\xe7","]":"\xea","^":"\xee",_:"\xe8","`":"\xf4","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xfb"}},2584:(e,t)=>{var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(e){e.NUL="\0",e.SOH="\x01",e.STX="\x02",e.ETX="\x03",e.EOT="\x04",e.ENQ="\x05",e.ACK="\x06",e.BEL="\x07",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\v",e.FF="\f",e.CR="\r",e.SO="\x0e",e.SI="\x0f",e.DLE="\x10",e.DC1="\x11",e.DC2="\x12",e.DC3="\x13",e.DC4="\x14",e.NAK="\x15",e.SYN="\x16",e.ETB="\x17",e.CAN="\x18",e.EM="\x19",e.SUB="\x1a",e.ESC="\x1b",e.FS="\x1c",e.GS="\x1d",e.RS="\x1e",e.US="\x1f",e.SP=" ",e.DEL="\x7f"}(n||(t.C0=n={})),function(e){e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8a",e.PLD="\x8b",e.PLU="\x8c",e.RI="\x8d",e.SS2="\x8e",e.SS3="\x8f",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9a",e.CSI="\x9b",e.ST="\x9c",e.OSC="\x9d",e.PM="\x9e",e.APC="\x9f"}(r||(t.C1=r={})),function(e){e.ST="".concat(n.ESC,"\\")}(i||(t.C1_ESCAPED=i={}))},7399:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;const r=n(2584),i={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,n,o){const a={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?a.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?a.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?a.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(a.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B");break;case 8:a.key=e.ctrlKey?"\b":r.C0.DEL,e.altKey&&(a.key=r.C0.ESC+a.key);break;case 9:if(e.shiftKey){a.key=r.C0.ESC+"[Z";break}a.key=r.C0.HT,a.cancel=!0;break;case 13:a.key=e.altKey?r.C0.ESC+r.C0.CR:r.C0.CR,a.cancel=!0;break;case 27:a.key=r.C0.ESC,e.altKey&&(a.key=r.C0.ESC+r.C0.ESC),a.cancel=!0;break;case 37:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"D",a.key===r.C0.ESC+"[1;3D"&&(a.key=r.C0.ESC+(n?"b":"[1;5D"))):a.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D";break;case 39:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"C",a.key===r.C0.ESC+"[1;3C"&&(a.key=r.C0.ESC+(n?"f":"[1;5C"))):a.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C";break;case 38:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"A",n||a.key!==r.C0.ESC+"[1;3A"||(a.key=r.C0.ESC+"[1;5A")):a.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A";break;case 40:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"B",n||a.key!==r.C0.ESC+"[1;3B"||(a.key=r.C0.ESC+"[1;5B")):a.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(a.key=r.C0.ESC+"[2~");break;case 46:a.key=s?r.C0.ESC+"[3;"+(s+1)+"~":r.C0.ESC+"[3~";break;case 36:a.key=s?r.C0.ESC+"[1;"+(s+1)+"H":t?r.C0.ESC+"OH":r.C0.ESC+"[H";break;case 35:a.key=s?r.C0.ESC+"[1;"+(s+1)+"F":t?r.C0.ESC+"OF":r.C0.ESC+"[F";break;case 33:e.shiftKey?a.type=2:e.ctrlKey?a.key=r.C0.ESC+"[5;"+(s+1)+"~":a.key=r.C0.ESC+"[5~";break;case 34:e.shiftKey?a.type=3:e.ctrlKey?a.key=r.C0.ESC+"[6;"+(s+1)+"~":a.key=r.C0.ESC+"[6~";break;case 112:a.key=s?r.C0.ESC+"[1;"+(s+1)+"P":r.C0.ESC+"OP";break;case 113:a.key=s?r.C0.ESC+"[1;"+(s+1)+"Q":r.C0.ESC+"OQ";break;case 114:a.key=s?r.C0.ESC+"[1;"+(s+1)+"R":r.C0.ESC+"OR";break;case 115:a.key=s?r.C0.ESC+"[1;"+(s+1)+"S":r.C0.ESC+"OS";break;case 116:a.key=s?r.C0.ESC+"[15;"+(s+1)+"~":r.C0.ESC+"[15~";break;case 117:a.key=s?r.C0.ESC+"[17;"+(s+1)+"~":r.C0.ESC+"[17~";break;case 118:a.key=s?r.C0.ESC+"[18;"+(s+1)+"~":r.C0.ESC+"[18~";break;case 119:a.key=s?r.C0.ESC+"[19;"+(s+1)+"~":r.C0.ESC+"[19~";break;case 120:a.key=s?r.C0.ESC+"[20;"+(s+1)+"~":r.C0.ESC+"[20~";break;case 121:a.key=s?r.C0.ESC+"[21;"+(s+1)+"~":r.C0.ESC+"[21~";break;case 122:a.key=s?r.C0.ESC+"[23;"+(s+1)+"~":r.C0.ESC+"[23~";break;case 123:a.key=s?r.C0.ESC+"[24;"+(s+1)+"~":r.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(n&&!o||!e.altKey||e.metaKey)!n||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?a.key=e.key:e.key&&e.ctrlKey&&("_"===e.key&&(a.key=r.C0.US),"@"===e.key&&(a.key=r.C0.NUL)):65===e.keyCode&&(a.type=1);else{const t=i[e.keyCode],n=null===t||void 0===t?void 0:t[e.shiftKey?1:0];if(n)a.key=r.C0.ESC+n;else if(e.keyCode>=65&&e.keyCode<=90){const t=e.ctrlKey?e.keyCode-64:e.keyCode+32;let n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),a.key=r.C0.ESC+n}else if(32===e.keyCode)a.key=r.C0.ESC+(e.ctrlKey?r.C0.NUL:" ");else if("Dead"===e.key&&e.code.startsWith("Key")){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),a.key=r.C0.ESC+t,a.cancel=!0}}else e.keyCode>=65&&e.keyCode<=90?a.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?a.key=r.C0.NUL:e.keyCode>=51&&e.keyCode<=55?a.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?a.key=r.C0.DEL:219===e.keyCode?a.key=r.C0.ESC:220===e.keyCode?a.key=r.C0.FS:221===e.keyCode&&(a.key=r.C0.GS)}return a}},482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r="";for(let i=t;i65535?(t-=65536,r+=String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){const n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){const n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=1024*(this._interim-55296)+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let o=i;o=n)return this._interim=i,r;const a=e.charCodeAt(o);56320<=a&&a<=57343?t[r++]=1024*(i-55296)+a-56320+65536:(t[r++]=i,t[r++]=a)}else 65279!==i&&(t[r++]=i)}return r}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){const n=e.length;if(!n)return 0;let r,i,o,a,s=0,l=0,c=0;if(this.interim[0]){let r=!1,i=this.interim[0];i&=192==(224&i)?31:224==(240&i)?15:7;let o,a=0;for(;(o=63&this.interim[++a])&&a<4;)i<<=6,i|=o;const l=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,u=l-a;for(;c=n)return 0;if(o=e[c++],128!=(192&o)){c--,r=!0;break}this.interim[a++]=o,i<<=6,i|=63&o}r||(2===l?i<128?c--:t[s++]=i:3===l?i<2048||i>=55296&&i<=57343||65279===i||(t[s++]=i):i<65536||i>1114111||(t[s++]=i)),this.interim.fill(0)}const u=n-4;let d=c;for(;d=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(l=(31&r)<<6|63&i,l<128){d--;continue}t[s++]=l}else if(224==(240&r)){if(d>=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,s;if(o=e[d++],128!=(192&o)){d--;continue}if(l=(15&r)<<12|(63&i)<<6|63&o,l<2048||l>=55296&&l<=57343||65279===l)continue;t[s++]=l}else if(240==(248&r)){if(d>=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,s;if(o=e[d++],128!=(192&o)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=o,s;if(a=e[d++],128!=(192&a)){d--;continue}if(l=(7&r)<<18|(63&i)<<12|(63&o)<<6|63&a,l<65536||l>1114111)continue;t[s++]=l}}return s}}},225:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;const r=n(1480),i=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let a;t.UnicodeV6=class{constructor(){if(this.version="6",!a){a=new Uint8Array(65536),a.fill(1),a[0]=0,a.fill(0,1,32),a.fill(0,127,160),a.fill(2,4352,4448),a[9001]=2,a[9002]=2,a.fill(2,11904,42192),a[12351]=1,a.fill(2,44032,55204),a.fill(2,63744,64256),a.fill(2,65040,65050),a.fill(2,65072,65136),a.fill(2,65280,65377),a.fill(2,65504,65511);for(let e=0;et[i][1])return!1;for(;i>=r;)if(n=r+i>>1,e>t[n][1])r=n+1;else{if(!(e=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),i=0===n&&0!==t;if(i){const e=r.UnicodeService.extractWidth(t);0===e?i=!1:e>n&&(n=e)}return r.UnicodeService.createPropertyValue(0,n,i)}}},5981:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;const r=n(8460),i=n(844);class o extends i.Disposable{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(void 0!==t&&this._syncCalls>t)return void(this._syncCalls=0);if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let n;for(this._isSyncWriting=!0;n=this._writeBuffer.shift();){this._action(n);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],r=this._action(n,e);if(r){const e=e=>Date.now()-t>=12?setTimeout(()=>this._innerWrite(0,e)):this._innerWrite(t,e);return void r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e)}const i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-t>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}t.WriteBuffer=o},5941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;const n=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,r=/^[\da-f]+$/;function i(e,t){const n=e.toString(16),r=n.length<2?"0"+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}t.parseColor=function(e){if(!e)return;let t=e.toLowerCase();if(0===t.indexOf("rgb:")){t=t.slice(4);const e=n.exec(t);if(e){const t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(0===t.indexOf("#")&&(t=t.slice(1),r.exec(t)&&[3,6,9,12].includes(t.length))){const e=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){const i=parseInt(t.slice(e*r,e*r+e),16);n[r]=1===e?i<<4:2===e?i:3===e?i>>4:i>>8}return n}},t.toRgbString=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const[n,r,o]=e;return"rgb:".concat(i(n,t),"/").concat(i(r,t),"/").concat(i(o,t))}},5770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;const r=n(482),i=n(8742),o=n(5770),a=[];t.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=a,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const n=this._handlers[e];return n.push(t),{dispose:()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=a,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||a,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(t);else this._handlerFb(this._ident,"HOOK",t)}put(e,t,n){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n);else this._handlerFb(this._ident,"PUT",(0,r.utf32ToString)(e,t,n))}unhook(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._active.length){let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&!1===n){for(;r>=0&&(n=this._active[r].unhook(e),!0!==n);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",e);this._active=a,this._ident=0}};const s=new i.Params;s.addParam(0),t.DcsHandler=class{constructor(e){this._handler=e,this._data="",this._params=s,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():s,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=(0,r.utf32ToString)(e,t,n),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(e=>(this._params=s,this._data="",this._hitLimit=!1,e));return this._params=s,this._data="",this._hitLimit=!1,t}}},2015:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;const r=n(844),i=n(8742),o=n(6242),a=n(6351);class s{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;it),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));const o=n(0,14);let a;for(a in e.setDefault(1,0),e.addMany(r,0,2,0),o)e.addMany([24,26,153,154],a,3,0),e.addMany(n(128,144),a,3,0),e.addMany(n(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(l,0,2,0),e.add(l,8,5,8),e.add(l,6,0,6),e.add(l,11,0,11),e.add(l,13,13,13),e}();class c extends r.Disposable{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.VT500_TRANSITION_TABLE;super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new i.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,r.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new o.OscParser),this._dcsParser=this.register(new a.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[64,126],n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let t=0;tr||r>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=r}}if(1!==e.final.length)throw new Error("final must be a single byte");const r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw new Error("final must be in range ".concat(t[0]," .. ").concat(t[1]));return n<<=8,n|=r,n}identToString(e){const t=[];for(;e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){const n=this._identifier(e,[48,126]);void 0===this._escHandlers[n]&&(this._escHandlers[n]=[]);const r=this._escHandlers[n];return r.push(t),{dispose:()=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){const n=this._identifier(e);void 0===this._csiHandlers[n]&&(this._csiHandlers[n]=[]);const r=this._csiHandlers[n];return r.push(t),{dispose:()=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r,i=0,o=0,a=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(void 0===n||1===this._parseStack.state)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const t=this._parseStack.handlers;let o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===n&&o>-1)for(;o>=0&&(r=t[o](this._params),!0!==r);o--)if(r instanceof Promise)return this._parseStack.handlerPos=o,r;this._parseStack.handlers=[];break;case 4:if(!1===n&&o>-1)for(;o>=0&&(r=t[o](),!0!==r);o--)if(r instanceof Promise)return this._parseStack.handlerPos=o,r;this._parseStack.handlers=[];break;case 6:if(i=e[this._parseStack.chunkPos],r=this._dcsParser.unhook(24!==i&&26!==i,n),r)return r;27===i&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(i=e[this._parseStack.chunkPos],r=this._oscParser.end(24!==i&&26!==i,n),r)return r;27===i&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let s=a;s>4){case 2:for(let r=s+1;;++r){if(r>=t||(i=e[r])<32||i>126&&i=t||(i=e[r])<32||i>126&&i=t||(i=e[r])<32||i>126&&i=t||(i=e[r])<32||i>126&&i=0&&(r=n[a](this._params),!0!==r);a--)if(r instanceof Promise)return this._preserveStack(3,n,a,o,s),r;a<0&&this._csiHandlerFb(this._collect<<8|i,this._params),this.precedingJoinState=0;break;case 8:do{switch(i){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(i-48)}}while(++s47&&i<60);s--;break;case 9:this._collect<<=8,this._collect|=i;break;case 10:const c=this._escHandlers[this._collect<<8|i];let u=c?c.length-1:-1;for(;u>=0&&(r=c[u](),!0!==r);u--)if(r instanceof Promise)return this._preserveStack(4,c,u,o,s),r;u<0&&this._escHandlerFb(this._collect<<8|i),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|i,this._params);break;case 13:for(let r=s+1;;++r)if(r>=t||24===(i=e[r])||26===i||27===i||i>127&&i=t||(i=e[r])<32||i>127&&i{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;const r=n(5770),i=n(482),o=[];t.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const n=this._handlers[e];return n.push(t),{dispose:()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(2===this._state)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,"START")}_put(e,t,n){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n);else this._handlerFb(this._id,"PUT",(0,i.utf32ToString)(e,t,n))}start(){this.reset(),this._state=1}put(e,t,n){if(3!==this._state){if(1===this._state)for(;t0&&this._put(e,t,n)}}end(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&!1===n){for(;r>=0&&(n=this._active[r].end(e),!0!==n);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}else this._handlerFb(this._id,"END",e);this._active=o,this._id=-1,this._state=0}}},t.OscHandler=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=(0,i.utf32ToString)(e,t,n),this._data.length>r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(e=>(this._data="",this._hitLimit=!1,e));return this._data="",this._hitLimit=!1,t}}},8742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;const n=2147483647;class r{static fromArray(e){const t=new r;if(!e.length)return t;for(let n=Array.isArray(e[0])?1:0;n0&&void 0!==arguments[0]?arguments[0]:32,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;if(this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const e=new r(this.maxLength,this.maxSubParamsLength);return e.params.set(this.params),e.length=this.length,e._subParams.set(this._subParams),e._subParamsLength=this._subParamsLength,e._subParamsIdx.set(this._subParamsIdx),e._rejectDigits=this._rejectDigits,e._rejectSubDigits=this._rejectSubDigits,e._digitIsSub=this._digitIsSub,e}toArray(){const e=[];for(let t=0;t>8,r=255&this._subParamsIdx[t];r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>n?n:e}}addSubParam(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>n?n:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0}getSubParams(e){const t=this._subParamsIdx[e]>>8,n=255&this._subParamsIdx[e];return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){const e={};for(let t=0;t>8,r=255&this._subParamsIdx[t];r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const r=this._digitIsSub?this._subParams:this.params,i=r[t-1];r[t-1]=~i?Math.min(10*i+e,n):e}}t.Params=r},5741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0,t.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){const n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;const r=n(3785),i=n(511);t.BufferApiView=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){const t=this._buffer.lines.get(e);if(t)return new r.BufferLineApiView(t)}getNullCell(){return new i.CellData}}},3785:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;const r=n(511);t.BufferLineApiView=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}}},8285:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;const r=n(8771),i=n(8460),o=n(844);class a extends o.Disposable{constructor(e){super(),this._core=e,this._onBufferChange=this.register(new i.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new r.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new r.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}t.BufferNamespaceApi=a},7975:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0,t.ParserApi=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}}},7090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0,t.UnicodeApi=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}}},744:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;const o=n(8460),a=n(844),s=n(5295),l=n(2585);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;let c=t.BufferService=class extends a.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,t.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,t.MINIMUM_ROWS),this.buffers=this.register(new s.BufferSet(e,this))}resize(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.buffer;let r;r=this._cachedBlankLine,r&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;const i=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(0===n.scrollTop){const e=n.lines.isFull;o===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(o+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const e=o-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(o,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t,n){const r=this.buffer;if(e<0){if(0===r.ydisp)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);const i=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),i!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};t.BufferService=c=r([i(0,l.IOptionsService)],c)},7994:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0,t.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}}},1753:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;const o=n(2585),a=n(8460),s=n(844),l={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>32!==e.action},DRAG:{events:23,restrict:e=>32!==e.action||3!==e.button},ANY:{events:31,restrict:e=>!0}};function c(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(n|=64,n|=e.action):(n|=3&e.button,4&e.button&&(n|=64),8&e.button&&(n|=128),32===e.action?n|=32:0!==e.action||t||(n|=3)),n}const u=String.fromCharCode,d={DEFAULT:e=>{const t=[c(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":"\x1b[M".concat(u(t[0])).concat(u(t[1])).concat(u(t[2]))},SGR:e=>{const t=0===e.action&&4!==e.button?"m":"M";return"\x1b[<".concat(c(e,!0),";").concat(e.col,";").concat(e.row).concat(t)},SGR_PIXELS:e=>{const t=0===e.action&&4!==e.button?"m":"M";return"\x1b[<".concat(c(e,!0),";").concat(e.x,";").concat(e.y).concat(t)}};let h=t.CoreMouseService=class extends s.Disposable{constructor(e,t){super(),this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new a.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const n of Object.keys(l))this.addProtocol(n,l[n]);for(const n of Object.keys(d))this.addEncoding(n,d[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return 0!==this._protocols[this._activeProtocol].events}set activeProtocol(e){if(!this._protocols[e])throw new Error('unknown protocol "'.concat(e,'"'));this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error('unknown encoding "'.concat(e,'"'));this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._equalEvents(this._lastEvent,e,"SGR_PIXELS"===this._activeEncoding))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;const t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x)return!1;if(e.y!==t.y)return!1}else{if(e.col!==t.col)return!1;if(e.row!==t.row)return!1}return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};t.CoreMouseService=h=r([i(0,o.IBufferService),i(1,o.ICoreService)],h)},6975:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;const o=n(1439),a=n(8460),s=n(844),l=n(2585),c=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=t.CoreService=class extends s.Disposable{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new a.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new a.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new a.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new a.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,o.clone)(c),this.decPrivateModes=(0,o.clone)(u)}reset(){this.modes=(0,o.clone)(c),this.decPrivateModes=(0,o.clone)(u)}triggerDataEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._optionsService.rawOptions.disableStdin)return;const n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug('sending data "'.concat(e,'"'),()=>e.split("").map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'.concat(e,'"'),()=>e.split("").map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};t.CoreService=d=r([i(0,l.IBufferService),i(1,l.ILogService),i(2,l.IOptionsService)],d)},9074:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationService=void 0;const r=n(8055),i=n(8460),o=n(844),a=n(6106);let s=0,l=0;class c extends o.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new a.SortedList(e=>null===e||void 0===e?void 0:e.marker.line),this._onDecorationRegistered=this.register(new i.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new i.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,o.toDisposable)(()=>this.reset()))}registerDecoration(e){if(e.marker.isDisposed)return;const t=new u(e);if(t){const e=t.marker.onDispose(()=>t.dispose());t.onDispose(()=>{t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())}),this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(const e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(const l of this._decorations.getKeyIterator(t)){var o,a,s;r=null!==(o=l.options.x)&&void 0!==o?o:0,i=r+(null!==(a=l.options.width)&&void 0!==a?a:1),e>=r&&e{var i,o,a;s=null!==(i=t.options.x)&&void 0!==i?i:0,l=s+(null!==(o=t.options.width)&&void 0!==o?o:1),e>=s&&e{Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;const r=n(2585),i=n(8343);class o{constructor(){this._entries=new Map;for(var e=arguments.length,t=new Array(e),n=0;ne.index-t.index),n=[];for(const i of t){const t=this._services.get(i.id);if(!t)throw new Error("[createInstance] ".concat(e.name," depends on UNKNOWN service ").concat(i.id,"."));n.push(t)}for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a0?t[0].index:o.length;if(o.length!==s)throw new Error("[createInstance] First service dependency of ".concat(e.name," at position ").concat(s+1," conflicts with ").concat(o.length," static arguments"));return new e(...[...o,...n])}}},7866:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const o=n(844),a=n(2585),s={trace:a.LogLevelEnum.TRACE,debug:a.LogLevelEnum.DEBUG,info:a.LogLevelEnum.INFO,warn:a.LogLevelEnum.WARN,error:a.LogLevelEnum.ERROR,off:a.LogLevelEnum.OFF};let l,c=t.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=a.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),l=this}_updateLogLevel(){this._logLevel=s[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t1?r-1:0),o=1;o1?r-1:0),o=1;o1?r-1:0),o=1;o1?r-1:0),o=1;o1?r-1:0),o=1;oJSON.stringify(e)).join(", "),")"));const i=r.apply(this,t);return l.trace("GlyphRenderer#".concat(r.name," return"),i),i}}},7302:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=void 0;const r=n(8460),o=n(844),a=n(6114);t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const s=["normal","bold","100","200","300","400","500","600","700","800","900"];class l extends o.Disposable{constructor(e){super(),this._onOptionChange=this.register(new r.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n=i({},t.DEFAULT_OPTIONS);for(const t in e)if(t in n)try{const r=e[t];n[t]=this._sanitizeAndValidateOption(t,r)}catch(e){console.error(e)}this.rawOptions=n,this.options=i({},n),this._setupOptions(),this.register((0,o.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{-1!==e.indexOf(n)&&t()})}_setupOptions(){const e=e=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error('No option with key "'.concat(e,'"'));return this.rawOptions[e]},n=(e,n)=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error('No option with key "'.concat(e,'"'));n=this._sanitizeAndValidateOption(e,n),this.rawOptions[e]!==n&&(this.rawOptions[e]=n,this._onOptionChange.fire(e))};for(const t in this.rawOptions){const r={get:e.bind(this,t),set:n.bind(this,t)};Object.defineProperty(this.options,t,r)}}_sanitizeAndValidateOption(e,n){var r;switch(e){case"cursorStyle":if(n||(n=t.DEFAULT_OPTIONS[e]),!function(e){return"block"===e||"underline"===e||"bar"===e}(n))throw new Error('"'.concat(n,'" is not a valid value for ').concat(e));break;case"wordSeparator":n||(n=t.DEFAULT_OPTIONS[e]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof n&&1<=n&&n<=1e3)break;n=s.includes(n)?n:t.DEFAULT_OPTIONS[e];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error("".concat(e," cannot be less than 1, value: ").concat(n));break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error("".concat(e," cannot be less than 0, value: ").concat(n));break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error("".concat(e," cannot be less than or equal to 0, value: ").concat(n));break;case"rows":case"cols":if(!n&&0!==n)throw new Error("".concat(e," must be numeric, value: ").concat(n));break;case"windowsPty":n=null!==(r=n)&&void 0!==r?r:{}}return n}}t.OptionsService=l},2660:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkService=void 0;const o=n(2585);let a=t.OscLinkService=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){const t=this._bufferService.buffer;if(void 0===e.id){const n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}const n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;const o=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(a,o)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){const n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){const e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){var t;return null===(t=this._dataByLinkId.get(e))||void 0===t?void 0:t.data}_getEntryIdKey(e){return"".concat(e.id,";;").concat(e.uri)}_removeMarkerFromLink(e,t){const n=e.lines.indexOf(t);-1!==n&&(e.lines.splice(n,1),0===e.lines.length&&(void 0!==e.data.id&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};t.OscLinkService=a=r([i(0,o.IBufferService)],a)},8343:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const n="di$target",r="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[r]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);const i=function(e,t,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n]===t?t[r].push({id:e,index:i}):(t[r]=[{id:e,index:i}],t[n]=t)}(i,e,o)};return i.toString=()=>e,t.serviceRegistry.set(e,i),i}},2585:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const r=n(8343);var i;t.IBufferService=(0,r.createDecorator)("BufferService"),t.ICoreMouseService=(0,r.createDecorator)("CoreMouseService"),t.ICoreService=(0,r.createDecorator)("CoreService"),t.ICharsetService=(0,r.createDecorator)("CharsetService"),t.IInstantiationService=(0,r.createDecorator)("InstantiationService"),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.OFF=5]="OFF"}(i||(t.LogLevelEnum=i={})),t.ILogService=(0,r.createDecorator)("LogService"),t.IOptionsService=(0,r.createDecorator)("OptionsService"),t.IOscLinkService=(0,r.createDecorator)("OscLinkService"),t.IUnicodeService=(0,r.createDecorator)("UnicodeService"),t.IDecorationService=(0,r.createDecorator)("DecorationService")},1480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;const r=n(8460),i=n(225);class o{static extractShouldJoin(e){return 0!=(1&e)}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t){return(16777215&e)<<3|(3&t)<<1|(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter,this.onChange=this._onChange.event;const e=new i.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error('unknown Unicode version "'.concat(e,'"'));this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let t=0,n=0;const r=e.length;for(let i=0;i=r)return t+this.wcwidth(a);const n=e.charCodeAt(i);56320<=n&&n<=57343?a=1024*(a-55296)+n-56320+65536:t+=this.wcwidth(n)}const s=this.charProperties(a,n);let l=o.extractWidth(s);o.extractShouldJoin(s)&&(l-=o.extractWidth(n)),t+=l,n=s}return t}charProperties(e,t){return this._activeProvider.charProperties(e,t)}}t.UnicodeService=o}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Terminal=void 0;const t=n(9042),o=n(3236),a=n(844),s=n(5741),l=n(8285),c=n(7975),u=n(7090),d=["cols","rows"];class h extends a.Disposable{constructor(e){super(),this._core=this.register(new o.Terminal(e)),this._addonManager=this.register(new s.AddonManager),this._publicOptions=i({},this._core.options);const t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(const r in this._core.options){const e={get:t.bind(this,r),set:n.bind(this,r)};Object.defineProperty(this._publicOptions,r,e)}}_checkReadonlyOptions(e){if(d.includes(e))throw new Error('Option "'.concat(e,'" can only be set in the constructor'))}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new c.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new u.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const e=this._core.coreService.decPrivateModes;let t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(const t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){var t,n,r;return this._checkProposedApi(),this._verifyPositiveIntegers(null!==(t=e.x)&&void 0!==t?t:0,null!==(n=e.width)&&void 0!==n?n:0,null!==(r=e.height)&&void 0!==r?r:0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write("\r\n",t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return t}_verifyIntegers(){for(var e=arguments.length,t=new Array(e),n=0;n(l=(a=Math.ceil(h/7))>l?a+1:l+1)&&(o=l,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((l=c.length)-(o=u.length)<0&&(o=l,r=u,u=c,c=r),n=0;o;)n=(c[--o]=c[o]+u[o]+n)/p|0,c[o]%=p;for(n&&(c.unshift(n),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,s?O(t,h):t}function b(e,t,n){if(e!==~~e||en)throw Error(c+e)}function _(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;te.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;te.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},m.dividedBy=m.div=function(e){return w(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return O(w(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return S(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return this.cmp(e)<0},m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1},m.logarithm=m.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(s=!1,t=w(E(n,a),E(e,a),a),s=!0,O(t,o))},m.minus=m.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?A(t,e):y(t,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(s=!1,t=w(n,e,0,1).times(e),s=!0,n.minus(t)):O(new r(n),i)},m.naturalExponential=m.exp=function(){return x(this)},m.naturalLogarithm=m.ln=function(){return E(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):A(t,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=S(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},m.squareRoot=m.sqrt=function(){var e,t,n,r,i,o,a,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(l+"NaN")}for(e=S(c),s=!1,0==(i=Math.sqrt(+c))||i==1/0?(((t=_(c.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new u(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(i.toString()),i=a=(n=u.precision)+3;;)if(r=(o=r).plus(w(c,o,a+2)).times(.5),_(o.d).slice(0,a)===(t=_(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(O(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,O(r,n)},m.times=m.mul=function(e){var t,n,r,i,o,a,l,c,u,d=this,h=d.constructor,f=d.d,v=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,(c=f.length)<(u=v.length)&&(o=f,f=v,v=o,a=c,c=u,u=a),o=[],r=a=c+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)l=o[i]+v[r]*f[i-r-1]+t,o[i--]=l%p|0,t=l/p|0;o[i]=(o[i]+t)%p|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,s?O(e,h.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(b(e,0,o),void 0===t?t=r.rounding:b(t,0,8),O(n,e+S(n)+1,t))},m.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=R(r,!0):(b(e,0,o),void 0===t?t=i.rounding:b(t,0,8),n=R(r=O(new i(r),e+1,t),!0,e+1)),n},m.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?R(i):(b(e,0,o),void 0===t?t=a.rounding:b(t,0,8),n=R((r=O(new a(i),e+S(i)+1,t)).abs(),!1,e+S(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},m.toInteger=m.toint=function(){var e=this,t=e.constructor;return O(new t(e),S(e)+1,t.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,n,r,o,a,c,u=this,h=u.constructor,f=+(e=new h(e));if(!e.s)return new h(i);if(!(u=new h(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(i))return u;if(r=h.precision,e.eq(i))return O(u,r);if(c=(t=e.e)>=(n=e.d.length-1),a=u.s,c){if((n=f<0?-f:f)<=v){for(o=new h(i),t=Math.ceil(r/7+4),s=!1;n%2&&P((o=o.times(u)).d,t),0!==(n=d(n/2));)P((u=u.times(u)).d,t);return s=!0,e.s<0?new h(i).div(o):O(o,r)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,o=e.times(E(u,r+12)),s=!0,(o=x(o)).s=a,o},m.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=R(i,(n=S(i))<=a.toExpNeg||n>=a.toExpPos):(b(e,1,o),void 0===t?t=a.rounding:b(t,0,8),r=R(i=O(new a(i),e,t),e<=(n=S(i))||n<=a.toExpNeg,e)),r},m.toSignificantDigits=m.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(b(e,1,o),void 0===t?t=n.rounding:b(t,0,8)),O(new n(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=this,t=S(e),n=e.constructor;return R(e,t<=n.toExpNeg||t>=n.toExpPos)};var w=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%p|0,r=n/p|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,i,o,a){var s,c,u,d,h,f,v,g,m,y,b,_,w,x,C,k,E,T,A=r.constructor,R=r.s==i.s?1:-1,P=r.d,I=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(l+"Division by zero");for(c=r.e-i.e,E=I.length,C=P.length,g=(v=new A(R)).d=[],u=0;I[u]==(P[u]||0);)++u;if(I[u]>(P[u]||0)&&--c,(_=null==o?o=A.precision:a?o+(S(r)-S(i))+1:o)<0)return new A(0);if(_=_/7+2|0,u=0,1==E)for(d=0,I=I[0],_++;(u1&&(I=e(I,d),P=e(P,d),E=I.length,C=P.length),x=E,y=(m=P.slice(0,E)).length;y=p/2&&++k;do{d=0,(s=t(I,m,E,y))<0?(b=m[0],E!=y&&(b=b*p+(m[1]||0)),(d=b/k|0)>1?(d>=p&&(d=p-1),1==(s=t(h=e(I,d),m,f=h.length,y=m.length))&&(d--,n(h,E16)throw Error(u+S(e));if(!e.s)return new f(i);for(null==t?(s=!1,l=p):l=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(l+=Math.log(h(2,d))/Math.LN10*2+5|0,n=r=o=new f(i),f.precision=l;;){if(r=O(r.times(e),l),n=n.times(++c),_((a=o.plus(w(r,n,l))).d).slice(0,l)===_(o.d).slice(0,l)){for(;d--;)o=O(o.times(o),l);return f.precision=p,null==t?(s=!0,O(o,p)):o}o=a}}function S(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return O(new e(e.LN10),t)}function k(e){for(var t="";e--;)t+="0";return t}function E(e,t){var n,r,o,a,c,u,d,h,f,p=1,v=e,g=v.d,m=v.constructor,y=m.precision;if(v.s<1)throw Error(l+(v.s?"NaN":"-Infinity"));if(v.eq(i))return new m(0);if(null==t?(s=!1,h=y):h=t,v.eq(10))return null==t&&(s=!0),C(m,h);if(h+=10,m.precision=h,r=(n=_(g)).charAt(0),a=S(v),!(Math.abs(a)<15e14))return d=C(m,h+2,y).times(a+""),v=E(new m(r+"."+n.slice(1)),h-10).plus(d),m.precision=y,null==t?(s=!0,O(v,y)):v;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=_((v=v.times(e)).d)).charAt(0),p++;for(a=S(v),r>1?(v=new m("0."+n),a++):v=new m(r+"."+n.slice(1)),u=c=v=w(v.minus(i),v.plus(i),h),f=O(v.times(v),h),o=3;;){if(c=O(c.times(f),h),_((d=u.plus(w(c,new m(o),h))).d).slice(0,h)===_(u.d).slice(0,h))return u=u.times(2),0!==a&&(u=u.plus(C(m,h+2,y).times(a+""))),u=w(u,new m(p),h),m.precision=y,null==t?(s=!0,O(u,y)):u;u=d,o+=2}}function T(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),rg||e.e<-g))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,n){var r,i,o,a,l,c,f,v,m=e.d;for(a=1,o=m[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,f=m[v=0];else{if((v=Math.ceil((r+1)/7))>=(o=m.length))return e;for(f=o=m[v],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(l=f/(o=h(10,a-i-1))%10|0,c=t<0||void 0!==m[v+1]||f%o,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?i>0?f/h(10,a-i):0:m[v-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return c?(o=S(e),m.length=1,t=t-o-1,m[0]=h(10,(7-t%7)%7),e.e=d(-t/7)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(0==r?(m.length=v,o=1,v--):(m.length=v+1,o=h(10,7-r),m[v]=i>0?(f/h(10,a-i)%h(10,i)|0)*o:0),c)for(;;){if(0==v){(m[0]+=o)==p&&(m[0]=1,++e.e);break}if(m[v]+=o,m[v]!=p)break;m[v--]=0,o=1}for(r=m.length;0===m[--r];)m.pop();if(s&&(e.e>g||e.e<-g))throw Error(u+S(e));return e}function A(e,t){var n,r,i,o,a,l,c,u,d,h,f=e.constructor,v=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),s?O(t,v):t;if(c=e.d,h=t.d,r=t.e,u=e.e,c=c.slice(),a=u-r){for((d=a<0)?(n=c,a=-a,l=h.length):(n=h,r=u,l=c.length),a>(i=Math.max(Math.ceil(v/7),l)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=c.length)<(l=h.length))&&(l=i),i=0;i0;--i)c[l++]=0;for(i=h.length;i>a;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+k(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+k(-i-1)+o,n&&(r=n-a)>0&&(o+=k(r))):i>=a?(o+=k(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+k(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=k(r))),e.s<0?"-"+o:o}function P(e,t){if(e.length>t)return e.length=t,!0}function I(e){if(!e||"object"!==typeof e)throw Error(l+"Object expected");var t,n,r,i=["precision",1,o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&r<=i[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}a=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):T(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!f.test(e))throw Error(c+e);T(t,e)}if(o.prototype=m,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=I,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i{"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,i="undefined"!==typeof Element;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var s,l,c,u=t(e),d=t(a);if(u&&d){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(!o(e[s],a[s]))return!1;return!0}if(u!=d)return!1;var h=e instanceof Date,f=a instanceof Date;if(h!=f)return!1;if(h&&f)return e.getTime()==a.getTime();var p=e instanceof RegExp,v=a instanceof RegExp;if(p!=v)return!1;if(p&&v)return e.toString()==a.toString();var g=n(e);if((l=g.length)!==n(a).length)return!1;for(s=l;0!==s--;)if(!r.call(a,g[s]))return!1;if(i&&e instanceof Element&&a instanceof Element)return e===a;for(s=l;0!==s--;)if(("_owner"!==(c=g[s])||!e.$$typeof)&&!o(e[c],a[c]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return o(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},2110:(e,t,n)=>{"use strict";var r=n(8309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),v=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case v:case l:return e;default:return t}}case i:return t}}}function x(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||w(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===_||e.$$typeof===m)},t.typeOf=w},8309:(e,t,n)=>{"use strict";e.exports=n(746)},6198:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[o]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=t&&!t.nodeType&&t,v=p&&e&&!e.nodeType&&e,g=v&&v.exports===p,m=g&&d.process,y=function(){try{var e=v&&v.require&&v.require("util").types;return e||m&&m.binding&&m.binding("util")}catch(t){}}(),b=y&&y.isTypedArray;var _,w,x=Array.prototype,S=Function.prototype,C=Object.prototype,k=f["__core-js_shared__"],E=S.toString,T=C.hasOwnProperty,O=function(){var e=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),A=C.toString,R=E.call(Object),P=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=g?f.Buffer:void 0,j=f.Symbol,M=f.Uint8Array,D=I?I.allocUnsafe:void 0,L=(_=Object.getPrototypeOf,w=Object,function(e){return _(w(e))}),N=Object.create,F=C.propertyIsEnumerable,B=x.splice,z=j?j.toStringTag:void 0,H=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),V=I?I.isBuffer:void 0,U=Math.max,W=Date.now,G=fe(f,"Map"),q=fe(Object,"create"),$=function(){function e(){}return function(t){if(!ke(t))return{};if(N)return N(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},K.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(G||K),string:new Q}},Y.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return he(this,e).get(e)},Y.prototype.has=function(e){return he(this,e).has(e)},Y.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new K,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Y(r)}return n.set(e,t),this.size=n.size,this};var re,ie=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[re?a:++r];if(!1===t(i[s],s,i))break}return e};function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?function(e){var t=T.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch(o){}var i=A.call(e);r&&(t?e[z]=n:delete e[z]);return i}(e):function(e){return A.call(e)}(e)}function ae(e){return Ee(e)&&oe(e)==o}function se(e){return!(!ke(e)||function(e){return!!O&&O in e}(e))&&(Se(e)?P:l).test(function(e){if(null!=e){try{return E.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function le(e){if(!ke(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ve(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function ce(e,t,n,r,i){e!==t&&ie(t,function(o,a){if(i||(i=new X),ke(o))!function(e,t,n,r,i,o,a){var l=ge(e,n),c=ge(t,n),u=a.get(c);if(u)return void Z(e,n,u);var d=o?o(l,c,n+"",e,t,a):void 0,h=void 0===d;if(h){var f=_e(c),p=!f&&xe(c),v=!f&&!p&&Te(c);d=c,f||p||v?_e(l)?d=l:Ee(g=l)&&we(g)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function ye(e,t){return e===t||e!==e&&t!==t}var be=ae(function(){return arguments}())?ae:function(e){return Ee(e)&&T.call(e,"callee")&&!F.call(e,"callee")},_e=Array.isArray;function we(e){return null!=e&&Ce(e.length)&&!Se(e)}var xe=V||function(){return!1};function Se(e){if(!ke(e))return!1;var t=oe(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Te=b?function(e){return function(t){return e(t)}}(b):function(e){return Ee(e)&&Ce(e.length)&&!!u[oe(e)]};function Oe(e){return we(e)?J(e,!0):le(e)}var Ae,Re=(Ae=function(e,t,n,r){ce(e,t,n,r)},ue(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=Ae.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!ke(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&pe(t,n.length):"string"==r&&t in n)&&ye(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n{var r=n(8136)(n(7009),"DataView");e.exports=r},9676:(e,t,n)=>{var r=n(5403),i=n(2747),o=n(6037),a=n(4154),s=n(7728);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(3894),i=n(8699),o=n(4957),a=n(7184),s=n(7109);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(8136)(n(7009),"Map");e.exports=r},8059:(e,t,n)=>{var r=n(4086),i=n(9255),o=n(9186),a=n(3423),s=n(3739);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(8136)(n(7009),"Promise");e.exports=r},3924:(e,t,n)=>{var r=n(8136)(n(7009),"Set");e.exports=r},692:(e,t,n)=>{var r=n(8059),i=n(5774),o=n(1596);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(8384),i=n(511),o=n(835),a=n(707),s=n(8832),l=n(5077);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},7197:(e,t,n)=>{var r=n(7009).Symbol;e.exports=r},6219:(e,t,n)=>{var r=n(7009).Uint8Array;e.exports=r},7091:(e,t,n)=>{var r=n(8136)(n(7009),"WeakMap");e.exports=r},3665:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4277:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{var r=n(4842);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},2683:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r{var r=n(6478),i=n(4963),o=n(3629),a=n(5174),s=n(6800),l=n(9102),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],v=p.length;for(var g in e)!t&&!c.call(e,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},8950:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e){return e.split("")}},7112:(e,t,n)=>{var r=n(9231);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},2526:(e,t,n)=>{var r=n(8528);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},7927:(e,t,n)=>{var r=n(5358),i=n(7056)(r);e.exports=i},9863:(e,t,n)=>{var r=n(7927);e.exports=function(e,t){var n=!0;return r(e,function(e,r,i){return n=!!t(e,r,i)}),n}},3079:(e,t,n)=>{var r=n(152);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o{var r=n(1705),i=n(3529);e.exports=function e(t,n,o,a,s){var l=-1,c=t.length;for(o||(o=i),s||(s=[]);++l0&&o(u)?n>1?e(u,n-1,o,a,s):r(s,u):a||(s[s.length]=u)}return s}},5099:(e,t,n)=>{var r=n(372)();e.exports=r},5358:(e,t,n)=>{var r=n(5099),i=n(2742);e.exports=function(e,t){return e&&r(e,t,i)}},8667:(e,t,n)=>{var r=n(3082),i=n(9793);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n{var r=n(1705),i=n(3629);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},9066:(e,t,n)=>{var r=n(7197),i=n(1587),o=n(3581),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},1954:e=>{e.exports=function(e,t){return e>t}},529:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},4842:(e,t,n)=>{var r=n(2045),i=n(505),o=n(7167);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},4906:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},1848:(e,t,n)=>{var r=n(3355),i=n(3141);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,o,a,e,s))}},3355:(e,t,n)=>{var r=n(9424),i=n(5305),o=n(2206),a=n(8078),s=n(8383),l=n(3629),c=n(5174),u=n(9102),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,m){var y=l(e),b=l(t),_=y?h:s(e),w=b?h:s(t),x=(_=_==d?f:_)==f,S=(w=w==d?f:w)==f,C=_==w;if(C&&c(e)){if(!c(t))return!1;y=!0,x=!1}if(C&&!x)return m||(m=new r),y||u(e)?i(e,t,n,v,g,m):o(e,t,_,n,v,g,m);if(!(1&n)){var k=x&&p.call(e,"__wrapped__"),E=S&&p.call(t,"__wrapped__");if(k||E){var T=k?e.value():e,O=E?t.value():t;return m||(m=new r),g(T,O,n,v,m)}}return!!C&&(m||(m=new r),a(e,t,n,v,g,m))}},8856:(e,t,n)=>{var r=n(9424),i=n(1848);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a{e.exports=function(e){return e!==e}},6703:(e,t,n)=>{var r=n(4786),i=n(257),o=n(8092),a=n(3100),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:s).test(a(e))}},8150:(e,t,n)=>{var r=n(9066),i=n(4635),o=n(3141),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},6025:(e,t,n)=>{var r=n(7080),i=n(4322),o=n(2100),a=n(3629),s=n(38);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},3654:(e,t,n)=>{var r=n(2936),i=n(8836),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2580:e=>{e.exports=function(e,t){return e{var r=n(7927),i=n(1473);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},7080:(e,t,n)=>{var r=n(8856),i=n(9091),o=n(284);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},4322:(e,t,n)=>{var r=n(1848),i=n(6181),o=n(5658),a=n(5823),s=n(5072),l=n(284),c=n(9793);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},3226:(e,t,n)=>{var r=n(8950),i=n(8667),o=n(6025),a=n(3849),s=n(9179),l=n(6194),c=n(4480),u=n(2100),d=n(3629);e.exports=function(e,t,n){t=t.length?r(t,function(e){return d(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[u];var h=-1;t=r(t,l(o));var f=a(e,function(e,n,i){return{criteria:r(t,function(t){return t(e)}),index:++h,value:e}});return s(f,function(e,t){return c(e,t,n)})}},9586:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},4084:(e,t,n)=>{var r=n(8667);e.exports=function(e){return function(t){return r(t,e)}}},7255:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),l=Array(s);s--;)l[o?s:++a]=e,e+=i;return l}},8794:(e,t,n)=>{var r=n(2100),i=n(4262),o=n(9156);e.exports=function(e,t){return o(i(e,t,r),e+"")}},7532:(e,t,n)=>{var r=n(1547),i=n(8528),o=n(2100),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},2646:e=>{e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r{var r=n(7927);e.exports=function(e,t){var n;return r(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}},9179:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},6478:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(7197),i=n(8950),o=n(3629),a=n(152),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},821:(e,t,n)=>{var r=n(6050),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},6194:e=>{e.exports=function(e){return function(t){return e(t)}}},9602:(e,t,n)=>{var r=n(692),i=n(9055),o=n(2683),a=n(75),s=n(7730),l=n(2230);e.exports=function(e,t,n){var c=-1,u=i,d=e.length,h=!0,f=[],p=f;if(n)h=!1,u=o;else if(d>=200){var v=t?null:s(e);if(v)return l(v);h=!1,u=a,p=new r}else p=t?[]:f;e:for(;++c{e.exports=function(e,t){return e.has(t)}},3082:(e,t,n)=>{var r=n(3629),i=n(5823),o=n(170),a=n(3518);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},9813:(e,t,n)=>{var r=n(2646);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},8558:(e,t,n)=>{var r=n(152);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e===e,a=r(e),s=void 0!==t,l=null===t,c=t===t,u=r(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!u&&e{var r=n(8558);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=n.length;++i=l?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},5525:(e,t,n)=>{var r=n(7009)["__core-js_shared__"];e.exports=r},7056:(e,t,n)=>{var r=n(1473);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},322:(e,t,n)=>{var r=n(9813),i=n(7302),o=n(7580),a=n(3518);e.exports=function(e){return function(t){t=a(t);var n=i(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},5481:(e,t,n)=>{var r=n(6025),i=n(1473),o=n(2742);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[l?t[c]:c]:void 0}}},6381:(e,t,n)=>{var r=n(7255),i=n(3195),o=n(1495);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t{var r=n(3924),i=n(9694),o=n(2230),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},8528:(e,t,n)=>{var r=n(8136),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},5305:(e,t,n)=>{var r=n(692),i=n(7897),o=n(75);e.exports=function(e,t,n,a,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p{var r=n(7197),i=n(6219),o=n(9231),a=n(5305),s=n(234),l=n(2230),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)return!1;var v=h.get(e);if(v)return v==t;r|=2,h.set(e,t);var g=a(f(e),f(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},8078:(e,t,n)=>{var r=n(8248),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:i.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=l;++d{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8248:(e,t,n)=>{var r=n(1986),i=n(5918),o=n(2742);e.exports=function(e){return r(e,o,i)}},2799:(e,t,n)=>{var r=n(5964);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},9091:(e,t,n)=>{var r=n(5072),i=n(2742);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},8136:(e,t,n)=>{var r=n(6703),i=n(40);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},1137:(e,t,n)=>{var r=n(2709)(Object.getPrototypeOf,Object);e.exports=r},1587:(e,t,n)=>{var r=n(7197),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},5918:(e,t,n)=>{var r=n(4903),i=n(8174),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t)}))}:i;e.exports=s},8383:(e,t,n)=>{var r=n(908),i=n(5797),o=n(8319),a=n(3924),s=n(7091),l=n(9066),c=n(3100),u="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",v=c(r),g=c(i),m=c(o),y=c(a),b=c(s),_=l;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=u||o&&_(o.resolve())!=d||a&&_(new a)!=h||s&&_(new s)!=f)&&(_=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return p;case g:return u;case m:return d;case y:return h;case b:return f}return t}),e.exports=_},40:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6417:(e,t,n)=>{var r=n(3082),i=n(4963),o=n(3629),a=n(6800),s=n(4635),l=n(9793);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},5403:(e,t,n)=>{var r=n(9620);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2747:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6037:(e,t,n)=>{var r=n(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},4154:(e,t,n)=>{var r=n(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},7728:(e,t,n)=>{var r=n(9620);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3529:(e,t,n)=>{var r=n(7197),i=n(4963),o=n(3629),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},6800:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(9231),i=n(1473),o=n(6800),a=n(8092);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5823:(e,t,n)=>{var r=n(3629),i=n(152),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},5964:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},257:(e,t,n)=>{var r=n(5525),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},2936:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5072:(e,t,n)=>{var r=n(8092);e.exports=function(e){return e===e&&!r(e)}},3894:e=>{e.exports=function(){this.__data__=[],this.size=0}},8699:(e,t,n)=>{var r=n(7112),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},4957:(e,t,n)=>{var r=n(7112);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7184:(e,t,n)=>{var r=n(7112);e.exports=function(e){return r(this.__data__,e)>-1}},7109:(e,t,n)=>{var r=n(7112);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4086:(e,t,n)=>{var r=n(9676),i=n(8384),o=n(5797);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},9255:(e,t,n)=>{var r=n(2799);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},9186:(e,t,n)=>{var r=n(2799);e.exports=function(e){return r(this,e).get(e)}},3423:(e,t,n)=>{var r=n(2799);e.exports=function(e){return r(this,e).has(e)}},3739:(e,t,n)=>{var r=n(2799);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},234:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},284:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4634:(e,t,n)=>{var r=n(9151);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},9620:(e,t,n)=>{var r=n(8136)(Object,"create");e.exports=r},8836:(e,t,n)=>{var r=n(2709)(Object.keys,Object);e.exports=r},9494:(e,t,n)=>{e=n.nmd(e);var r=n(1032),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},3581:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2709:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4262:(e,t,n)=>{var r=n(3665),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a{var r=n(1032),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},5774:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1596:e=>{e.exports=function(e){return this.__data__.has(e)}},2230:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},9156:(e,t,n)=>{var r=n(7532),i=n(3197)(r);e.exports=i},3197:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},511:(e,t,n)=>{var r=n(8384);e.exports=function(){this.__data__=new r,this.size=0}},835:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},707:e=>{e.exports=function(e){return this.__data__.get(e)}},8832:e=>{e.exports=function(e){return this.__data__.has(e)}},5077:(e,t,n)=>{var r=n(8384),i=n(5797),o=n(8059);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},7167:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r{var r=n(4622),i=n(7302),o=n(2129);e.exports=function(e){return i(e)?o(e):r(e)}},170:(e,t,n)=>{var r=n(4634),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=a},9793:(e,t,n)=>{var r=n(152);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},3100:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},6050:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},2129:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+l+")*"),d="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+d+u,"g");e.exports=function(e){return e.match(h)||[]}},1547:e=>{e.exports=function(e){return function(){return e}}},8573:(e,t,n)=>{var r=n(8092),i=n(72),o=n(2582),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,h,f,p=0,v=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=c;return l=c=void 0,p=t,d=e.apply(r,n)}function b(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-p>=u}function _(){var e=i();if(b(e))return w(e);h=setTimeout(_,function(e){var n=t-(e-f);return g?s(n,u-(e-p)):n}(e))}function w(e){return h=void 0,m&&l?y(e):(l=c=void 0,d)}function x(){var e=i(),n=b(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(_,t),v?y(e):d}(f);if(g)return clearTimeout(h),h=setTimeout(_,t),y(f)}return void 0===h&&(h=setTimeout(_,t)),d}return t=o(t)||0,r(n)&&(v=!!n.leading,u=(g="maxWait"in n)?a(o(n.maxWait)||0,t):u,m="trailing"in n?!!n.trailing:m),x.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},x.flush=function(){return void 0===h?d:w(i())},x}},9231:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},2730:(e,t,n)=>{var r=n(4277),i=n(9863),o=n(6025),a=n(3629),s=n(3195);e.exports=function(e,t,n){var l=a(e)?r:i;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},1211:(e,t,n)=>{var r=n(5481)(n(1475));e.exports=r},1475:(e,t,n)=>{var r=n(2045),i=n(6025),o=n(9753),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=a(s+l,0)),r(e,i(t,3),l)}},5008:(e,t,n)=>{var r=n(5182),i=n(2034);e.exports=function(e,t){return r(i(e,t),1)}},6181:(e,t,n)=>{var r=n(8667);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},5658:(e,t,n)=>{var r=n(529),i=n(6417);e.exports=function(e,t){return null!=e&&i(e,t,r)}},2100:e=>{e.exports=function(e){return e}},4963:(e,t,n)=>{var r=n(4906),i=n(3141),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},3629:e=>{var t=Array.isArray;e.exports=t},1473:(e,t,n)=>{var r=n(4786),i=n(4635);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},5127:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==r(e)}},5174:(e,t,n)=>{e=n.nmd(e);var r=n(7009),i=n(9488),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},8111:(e,t,n)=>{var r=n(1848);e.exports=function(e,t){return r(e,t)}},4786:(e,t,n)=>{var r=n(9066),i=n(8092);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4635:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},2066:(e,t,n)=>{var r=n(298);e.exports=function(e){return r(e)&&e!=+e}},2854:e=>{e.exports=function(e){return null==e}},298:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},8092:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3141:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},3977:(e,t,n)=>{var r=n(9066),i=n(1137),o=n(3141),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},6769:(e,t,n)=>{var r=n(9066),i=n(3629),o=n(3141);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},152:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},9102:(e,t,n)=>{var r=n(8150),i=n(6194),o=n(9494),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},2742:(e,t,n)=>{var r=n(7538),i=n(3654),o=n(1473);e.exports=function(e){return o(e)?r(e):i(e)}},5727:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,c=32,u=64,d=128,h=256,f=1/0,p=9007199254740991,v=NaN,g=4294967295,m=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",u],["rearg",h]],y="[object Arguments]",b="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",S="[object Function]",C="[object GeneratorFunction]",k="[object Map]",E="[object Number]",T="[object Object]",O="[object Promise]",A="[object RegExp]",R="[object Set]",P="[object String]",I="[object Symbol]",j="[object WeakMap]",M="[object ArrayBuffer]",D="[object DataView]",L="[object Float32Array]",N="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",V="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(Q.source),X=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Ce="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="['\u2019]",Ie="["+Ce+"]",je="["+Re+"]",Me="["+ke+"]",De="\\d+",Le="["+Ee+"]",Ne="["+Te+"]",Fe="[^"+Ce+Re+De+Ee+Te+Oe+"]",Be="\\ud83c[\\udffb-\\udfff]",ze="[^"+Ce+"]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Oe+"]",We="\\u200d",Ge="(?:"+Ne+"|"+Fe+")",qe="(?:"+Ue+"|"+Fe+")",$e="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Qe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Me+"|"+Be+")"+"?",Ye="["+Ae+"]?",Xe=Ye+Ke+("(?:"+We+"(?:"+[ze,He,Ve].join("|")+")"+Ye+Ke+")*"),Je="(?:"+[Le,He,Ve].join("|")+")"+Xe,Ze="(?:"+[ze+Me+"?",Me,He,Ve,Ie].join("|")+")",et=RegExp(Pe,"g"),tt=RegExp(Me,"g"),nt=RegExp(Be+"(?="+Be+")|"+Ze+Xe,"g"),rt=RegExp([Ue+"?"+Ne+"+"+$e+"(?="+[je,Ue,"$"].join("|")+")",qe+"+"+Qe+"(?="+[je,Ue+Ge,"$"].join("|")+")",Ue+"?"+Ge+"+"+$e,Ue+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Je].join("|"),"g"),it=RegExp("["+We+Ce+ke+Ae+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,lt={};lt[L]=lt[N]=lt[F]=lt[B]=lt[z]=lt[H]=lt[V]=lt[U]=lt[W]=!0,lt[y]=lt[b]=lt[M]=lt[_]=lt[D]=lt[w]=lt[x]=lt[S]=lt[k]=lt[E]=lt[T]=lt[A]=lt[R]=lt[P]=lt[j]=!1;var ct={};ct[y]=ct[b]=ct[M]=ct[D]=ct[_]=ct[w]=ct[L]=ct[N]=ct[F]=ct[B]=ct[z]=ct[k]=ct[E]=ct[T]=ct[A]=ct[R]=ct[P]=ct[I]=ct[H]=ct[V]=ct[U]=ct[W]=!0,ct[x]=ct[S]=ct[j]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ht=parseInt,ft="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ft||pt||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&e&&!e.nodeType&&e,yt=mt&&mt.exports===gt,bt=yt&&ft.process,_t=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=_t&&_t.isArrayBuffer,xt=_t&&_t.isDate,St=_t&&_t.isMap,Ct=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=Qt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ut[e]}function ln(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,Ce=t.Function,ke=t.Math,Ee=t.Object,Te=t.RegExp,Oe=t.String,Ae=t.TypeError,Re=n.prototype,Pe=Ce.prototype,Ie=Ee.prototype,je=t["__core-js_shared__"],Me=Pe.toString,De=Ie.hasOwnProperty,Le=0,Ne=function(){var e=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Ie.toString,Be=Me.call(Ee),ze=vt._,He=Te("^"+Me.call(De).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=yt?t.Buffer:i,Ue=t.Symbol,We=t.Uint8Array,Ge=Ve?Ve.allocUnsafe:i,qe=un(Ee.getPrototypeOf,Ee),$e=Ee.create,Qe=Ie.propertyIsEnumerable,Ke=Re.splice,Ye=Ue?Ue.isConcatSpreadable:i,Xe=Ue?Ue.iterator:i,Je=Ue?Ue.toStringTag:i,Ze=function(){try{var e=ho(Ee,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,ut=t.setTimeout!==vt.setTimeout&&t.setTimeout,ft=ke.ceil,pt=ke.floor,gt=Ee.getOwnPropertySymbols,mt=Ve?Ve.isBuffer:i,bt=t.isFinite,_t=Re.join,zt=un(Ee.keys,Ee),Qt=ke.max,bn=ke.min,_n=r.now,wn=t.parseInt,xn=ke.random,Sn=Re.reverse,Cn=ho(t,"DataView"),kn=ho(t,"Map"),En=ho(t,"Promise"),Tn=ho(t,"Set"),On=ho(t,"WeakMap"),An=ho(Ee,"create"),Rn=On&&new On,Pn={},In=Fo(Cn),jn=Fo(kn),Mn=Fo(En),Dn=Fo(Tn),Ln=Fo(On),Nn=Ue?Ue.prototype:i,Fn=Nn?Nn.valueOf:i,Bn=Nn?Nn.toString:i;function zn(e){if(ts(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Un)return e;if(De.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var Hn=function(){function e(){}return function(t){if(!es(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function lr(e,t,n,r,o,a){var s,l=1&t,c=2&t,u=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ai(e,s)}else{var h=vo(e),f=h==S||h==C;if(Qa(e))return Si(e,l);if(h==T||h==y||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Ri(e,po(e),t)}(e,function(e,t){return e&&Ri(t,Is(t),e)}(s,e)):function(e,t){return Ri(e,fo(e),t)}(e,ir(s,e))}else{if(!ct[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return Ci(e);case _:case w:return new r(+e);case D:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case N:case F:case B:case z:case H:case V:case U:case W:return ki(e,n);case k:return new r;case E:case P:return new r(e);case A:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case I:return i=e,Fn?Ee(Fn.call(i)):{}}var i}(e,h,l)}}a||(a=new Kn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach(function(r){s.add(lr(r,t,n,r,e,a))}):ns(e)&&e.forEach(function(r,i){s.set(i,lr(r,t,n,i,e,a))});var v=d?i:(u?c?io:ro:c?Is:Ps)(e);return At(v||e,function(r,i){v&&(r=e[i=r]),tr(s,i,lr(r,t,n,i,e,a))}),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ae(o);return Po(function(){e.apply(i,n)},t)}function dr(e,t,n,r){var i=-1,o=jt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Dt(t,Zt(n))),r?(o=Mt,a=!1):t.length>=200&&(o=tn,a=!1,t=new Qn(t));e:for(;++i-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(kn||qn),string:new Gn}},$n.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return co(this,e).get(e)},$n.prototype.has=function(e){return co(this,e).has(e)},$n.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Qn.prototype.add=Qn.prototype.push=function(e){return this.__data__.set(e,a),this},Qn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new qn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=ji(_r),fr=ji(wr,!0);function pr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function vr(e,t,n){for(var r=-1,o=e.length;++r0&&n(s)?t>1?mr(s,t-1,n,r,i):Lt(i,s):r||(i[i.length]=s)}return i}var yr=Mi(),br=Mi(!0);function _r(e,t){return e&&yr(e,t,Ps)}function wr(e,t){return e&&br(e,t,Ps)}function xr(e,t){return It(t,function(t){return Xa(e[t])})}function Sr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&nt}function Tr(e,t){return null!=e&&De.call(e,t)}function Or(e,t){return null!=e&&t in Ee(e)}function Ar(e,t,r){for(var o=r?Mt:jt,a=e[0].length,s=e.length,l=s,c=n(s),u=1/0,d=[];l--;){var h=e[l];l&&t&&(h=Dt(h,Zt(t))),u=bn(h.length,u),c[l]=!r&&(t||a>=120&&h.length>=120)?new Qn(l&&h):i}h=e[0];var f=-1,p=c[0];e:for(;++f=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Ke.call(s,l,1),Ke.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ke.call(e,i,1):di(e,i)}}return e}function Qr(e,t){return e+pt(xn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Io(To(e,t,rl),e+"")}function Xr(e){return Xn(zs(e))}function Jr(e,t){var n=zs(e);return Do(n,sr(t,0,n.length))}function Zr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++oo?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a=200){var c=t?null:Ki(e);if(c)return hn(c);a=!1,i=tn,l=new Qn}else l=t?[]:s;e:for(;++r=r?e:ri(e,t,n)}var xi=nt||function(e){return vt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function ki(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=ls(e),s=t!==i,l=null===t,c=t===t,u=ls(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!u&&e1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&_o(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ee(t);++r-1?o[a?t[s]:s]:i}}function Bi(e){return no(function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ae(o);if(a&&!l&&"wrapper"==ao(s))var l=new Un([],!0)}for(r=l?r:n;++r1&&_.reverse(),f&&ul))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&n?new Qn:i;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(m,function(n){var r="_."+n[0];t&n[1]&&!jt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(ue):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var r=_n(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)});function ha(e){var t=zn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var pa=no(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[o],thisArg:i}),new Un(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});var va=Pi(function(e,t,n){De.call(e,n)?++e[n]:or(e,n,1)});var ga=Fi(Uo),ma=Fi(Wo);function ya(e,t){return(Wa(e)?At:hr)(e,lo(t,3))}function ba(e,t){return(Wa(e)?Rt:fr)(e,lo(t,3))}var _a=Pi(function(e,t,n){De.call(e,n)?e[n].push(t):or(e,n,[t])});var wa=Yr(function(e,t,r){var i=-1,o="function"==typeof t,a=qa(e)?n(e.length):[];return hr(e,function(e){a[++i]=o?Tt(t,e,r):Rr(e,t,r)}),a}),xa=Pi(function(e,t,n){or(e,n,t)});function Sa(e,t){return(Wa(e)?Dt:Br)(e,lo(t,3))}var Ca=Pi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var ka=Yr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&_o(e,t[0],t[1])?t=[]:n>2&&_o(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,mr(t,1),[])}),Ea=it||function(){return vt.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Oa(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Aa=Yr(function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Aa));r|=c}return Xi(e,r,t,n,i)}),Ra=Yr(function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Ra));r|=c}return Xi(t,r,e,n,i)});function Pa(e,t,n){var r,a,s,l,c,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function v(t){var n=r,o=a;return r=a=i,d=t,l=e.apply(o,n)}function g(e){var n=e-u;return u===i||n>=t||n<0||f&&e-d>=s}function m(){var e=Ea();if(g(e))return y(e);c=Po(m,function(e){var n=t-(e-u);return f?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,l)}function b(){var e=Ea(),n=g(e);if(r=arguments,a=this,u=e,n){if(c===i)return function(e){return d=e,c=Po(m,t),h?v(e):l}(u);if(f)return xi(c),c=Po(m,t),v(u)}return c===i&&(c=Po(m,t)),l}return t=gs(t)||0,es(n)&&(h=!!n.leading,s=(f="maxWait"in n)?Qt(gs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&xi(c),d=0,r=u=a=c=i},b.flush=function(){return c===i?l:y(Ea())},b}var Ia=Yr(function(e,t){return ur(e,1,t)}),ja=Yr(function(e,t,n){return ur(e,gs(t)||0,n)});function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||$n),n}function Da(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=$n;var La=_i(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Dt(t[0],Zt(lo())):Dt(mr(t,1),Zt(lo()))).length;return Yr(function(r){for(var i=-1,o=bn(r.length,n);++i=t}),Ua=Pr(function(){return arguments}())?Pr:function(e){return ts(e)&&De.call(e,"callee")&&!Qe.call(e,"callee")},Wa=n.isArray,Ga=wt?Zt(wt):function(e){return ts(e)&&kr(e)==M};function qa(e){return null!=e&&Za(e.length)&&!Xa(e)}function $a(e){return ts(e)&&qa(e)}var Qa=mt||gl,Ka=xt?Zt(xt):function(e){return ts(e)&&kr(e)==w};function Ya(e){if(!ts(e))return!1;var t=kr(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=kr(e);return t==S||t==C||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function Za(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=St?Zt(St):function(e){return ts(e)&&vo(e)==k};function rs(e){return"number"==typeof e||ts(e)&&kr(e)==E}function is(e){if(!ts(e)||kr(e)!=T)return!1;var t=qe(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Be}var os=Ct?Zt(Ct):function(e){return ts(e)&&kr(e)==A};var as=kt?Zt(kt):function(e){return ts(e)&&vo(e)==R};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&kr(e)==P}function ls(e){return"symbol"==typeof e||ts(e)&&kr(e)==I}var cs=Et?Zt(Et):function(e){return ts(e)&&Za(e.length)&&!!lt[kr(e)]};var us=qi(Fr),ds=qi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(qa(e))return ss(e)?vn(e):Ai(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==k?cn:t==R?hn:zs)(e)}function fs(e){return e?(e=gs(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=fs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(ls(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=me.test(e);return n||be.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?v:+e}function ms(e){return Ri(e,Is(e))}function ys(e){return null==e?"":ci(e)}var bs=Ii(function(e,t){if(Co(t)||qa(t))Ri(t,Ps(t),e);else for(var n in t)De.call(t,n)&&tr(e,n,t[n])}),_s=Ii(function(e,t){Ri(t,Is(t),e)}),ws=Ii(function(e,t,n,r){Ri(t,Is(t),e,r)}),xs=Ii(function(e,t,n,r){Ri(t,Ps(t),e,r)}),Ss=no(ar);var Cs=Yr(function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&_o(t[0],t[1],o)&&(r=1);++n1),t}),Ri(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n});var Ls=no(function(e,t){return null==e?{}:function(e,t){return Gr(e,t,function(t,n){return Ts(e,n)})}(e,t)});function Ns(e,t){if(null==e)return{};var n=Dt(io(e),function(e){return[e]});return t=lo(t),Gr(e,n,function(e,n){return t(e,n[0])})}var Fs=Yi(Ps),Bs=Yi(Is);function zs(e){return null==e?[]:en(e,Ps(e))}var Hs=Li(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ys(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(we,on).replace(tt,"")}var Ws=Li(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gs=Li(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Di("toLowerCase");var $s=Li(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Qs=Li(function(e,t,n){return e+(n?" ":"")+Ys(t)});var Ks=Li(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ys=Di("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Js=Yr(function(e,t){try{return Tt(e,i,t)}catch(n){return Ya(n)?n:new se(n)}}),Zs=no(function(e,t){return At(t,function(t){t=No(t),or(e,t,Aa(e[t],e))}),e});function el(e){return function(){return e}}var tl=Bi(),nl=Bi(!0);function rl(e){return e}function il(e){return Dr("function"==typeof e?e:lr(e,1))}var ol=Yr(function(e,t){return function(n){return Rr(n,e,t)}}),al=Yr(function(e,t){return function(n){return Rr(e,n,t)}});function sl(e,t,n){var r=Ps(t),i=xr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Ps(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return At(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ai(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function ll(){}var cl=Ui(Dt),ul=Ui(Pt),dl=Ui(Bt);function hl(e){return wo(e)?$t(No(e)):function(e){return function(t){return Sr(t,e)}}(e)}var fl=Gi(),pl=Gi(!0);function vl(){return[]}function gl(){return!1}var ml=Vi(function(e,t){return e+t},0),yl=Qi("ceil"),bl=Vi(function(e,t){return e/t},1),_l=Qi("floor");var wl=Vi(function(e,t){return e*t},1),xl=Qi("round"),Sl=Vi(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Ta,zn.assign=bs,zn.assignIn=_s,zn.assignInWith=ws,zn.assignWith=xs,zn.at=Ss,zn.before=Oa,zn.bind=Aa,zn.bindAll=Zs,zn.bindKey=Ra,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},zn.chain=ha,zn.chunk=function(e,t,r){t=(r?_o(e,t,r):t===i)?1:Qt(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=n(ft(o/t));ao?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&ln(e)?wi(vn(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:Qt(ps(t),0),Yr(function(n){var r=n[t],i=wi(n,0,t);return r&&Lt(i,r),Tt(e,this,i)})},zn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},zn.takeRightWhile=function(e,t){return e&&e.length?fi(e,lo(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?fi(e,lo(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:r,maxWait:t,trailing:i})},zn.thru=fa,zn.toArray=hs,zn.toPairs=Fs,zn.toPairsIn=Bs,zn.toPath=function(e){return Wa(e)?Dt(e,No):ls(e)?[e]:Ai(Lo(ys(e)))},zn.toPlainObject=ms,zn.transform=function(e,t,n){var r=Wa(e),i=r||Qa(e)||cs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?Hn(qe(e)):{}}return(i?At:_r)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return Ta(e,1)},zn.union=ta,zn.unionBy=na,zn.unionWith=ra,zn.uniq=function(e){return e&&e.length?ui(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ui(e,lo(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},zn.unset=function(e,t){return null==e||di(e,t)},zn.unzip=ia,zn.unzipWith=oa,zn.update=function(e,t,n){return null==e?e:hi(e,t,yi(n))},zn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:hi(e,t,yi(n),r)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:en(e,Is(e))},zn.without=aa,zn.words=Xs,zn.wrap=function(e,t){return Na(yi(t),e)},zn.xor=sa,zn.xorBy=la,zn.xorWith=ca,zn.zip=ua,zn.zipObject=function(e,t){return gi(e||[],t||[],tr)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Zr)},zn.zipWith=da,zn.entries=Fs,zn.entriesIn=Bs,zn.extend=_s,zn.extendWith=ws,sl(zn,zn),zn.add=ml,zn.attempt=Js,zn.camelCase=Hs,zn.capitalize=Vs,zn.ceil=yl,zn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))===n?n:0),t!==i&&(t=(t=gs(t))===t?t:0),sr(gs(e),t,n)},zn.clone=function(e){return lr(e,4)},zn.cloneDeep=function(e){return lr(e,5)},zn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},zn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},zn.conformsTo=function(e,t){return null==t||cr(e,t,Ps(t))},zn.deburr=Us,zn.defaultTo=function(e,t){return null==e||e!==e?t:e},zn.divide=bl,zn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},zn.eq=za,zn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(K,an):e},zn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},zn.every=function(e,t,n){var r=Wa(e)?Pt:pr;return n&&_o(e,t,n)&&(t=i),r(e,lo(t,3))},zn.find=ga,zn.findIndex=Uo,zn.findKey=function(e,t){return Ht(e,lo(t,3),_r)},zn.findLast=ma,zn.findLastIndex=Wo,zn.findLastKey=function(e,t){return Ht(e,lo(t,3),wr)},zn.floor=_l,zn.forEach=ya,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:yr(e,lo(t,3),Is)},zn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Is)},zn.forOwn=function(e,t){return e&&_r(e,lo(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,lo(t,3))},zn.get=Es,zn.gt=Ha,zn.gte=Va,zn.has=function(e,t){return null!=e&&go(e,t,Tr)},zn.hasIn=Ts,zn.head=qo,zn.identity=rl,zn.includes=function(e,t,n,r){e=qa(e)?e:zs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=Qt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Qt(r+i,0)),Ut(e,t,i)},zn.inRange=function(e,t,n){return t=fs(t),n===i?(n=t,t=0):n=fs(n),function(e,t,n){return e>=bn(t,n)&&e=-9007199254740991&&e<=p},zn.isSet=as,zn.isString=ss,zn.isSymbol=ls,zn.isTypedArray=cs,zn.isUndefined=function(e){return e===i},zn.isWeakMap=function(e){return ts(e)&&vo(e)==j},zn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==kr(e)},zn.join=function(e,t){return null==e?"":_t.call(e,t)},zn.kebabCase=Ws,zn.last=Yo,zn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?Qt(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Vt(e,Gt,o,!0)},zn.lowerCase=Gs,zn.lowerFirst=qs,zn.lt=us,zn.lte=ds,zn.max=function(e){return e&&e.length?vr(e,rl,Er):i},zn.maxBy=function(e,t){return e&&e.length?vr(e,lo(t,2),Er):i},zn.mean=function(e){return qt(e,rl)},zn.meanBy=function(e,t){return qt(e,lo(t,2))},zn.min=function(e){return e&&e.length?vr(e,rl,Fr):i},zn.minBy=function(e,t){return e&&e.length?vr(e,lo(t,2),Fr):i},zn.stubArray=vl,zn.stubFalse=gl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=wl,zn.nth=function(e,t){return e&&e.length?Ur(e,ps(t)):i},zn.noConflict=function(){return vt._===this&&(vt._=ze),this},zn.noop=ll,zn.now=Ea,zn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(pt(i),n)+e+Wi(ft(i),n)},zn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=xn();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Qr(e,t)},zn.reduce=function(e,t,n){var r=Wa(e)?Nt:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},zn.reduceRight=function(e,t,n){var r=Wa(e)?Ft:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,fr)},zn.repeat=function(e,t,n){return t=(n?_o(e,t,n):t===i)?1:ps(t),Kr(ys(e),t)},zn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++rp)return[];var n=g,r=bn(e,g);t=lo(t),e-=g;for(var i=Xt(r,t);++n=a)return e;var l=n-pn(r);if(l<1)return r;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),os(o)){if(e.slice(l).search(o)){var u,d=c;for(o.global||(o=Te(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;c=c.slice(0,h===i?l:h)}}else if(e.indexOf(ci(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+r},zn.unescape=function(e){return(e=ys(e))&&Y.test(e)?e.replace(Q,mn):e},zn.uniqueId=function(e){var t=++Le;return ys(e)+t},zn.upperCase=Ks,zn.upperFirst=Ys,zn.each=ya,zn.eachRight=ba,zn.first=qo,sl(zn,function(){var e={};return _r(zn,function(t,n){De.call(zn.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),zn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),At(["drop","take"],function(e,t){Wn.prototype[e]=function(n){n=n===i?1:Qt(ps(n),0);var r=this.__filtered__&&!t?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(rl)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Yr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Rr(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(Da(lo(e)))},Wn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(g)},_r(Wn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=zn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Wn,c=s[0],u=l||Wa(t),d=function(e){var t=o.apply(zn,Lt([e],s));return r&&h?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,v=l&&!f;if(!a&&u){t=v?t:new Wn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:i}),new Un(g,h)}return p&&v?e.apply(this,s):(g=this.thru(d),p?r?g.value()[0]:g.value():g)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Re[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),_r(Wn.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";De.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}}),Pn[zi(i,2).name]=[{name:"wrapper",func:i}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ea],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ea)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Xe&&(zn.prototype[Xe]=function(){return this}),zn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2034:(e,t,n)=>{var r=n(8950),i=n(6025),o=n(3849),a=n(3629);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},7702:(e,t,n)=>{var r=n(2526),i=n(5358),o=n(6025);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},9627:(e,t,n)=>{var r=n(3079),i=n(1954),o=n(2100);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},9151:(e,t,n)=>{var r=n(8059);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},6452:(e,t,n)=>{var r=n(3079),i=n(2580),o=n(2100);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},9694:e=>{e.exports=function(){}},72:(e,t,n)=>{var r=n(7009);e.exports=function(){return r.Date.now()}},38:(e,t,n)=>{var r=n(9586),i=n(4084),o=n(5823),a=n(9793);e.exports=function(e){return o(e)?r(a(e)):i(e)}},6222:(e,t,n)=>{var r=n(6381)();e.exports=r},4064:(e,t,n)=>{var r=n(7897),i=n(6025),o=n(9204),a=n(3629),s=n(3195);e.exports=function(e,t,n){var l=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,i(t,3))}},4286:(e,t,n)=>{var r=n(5182),i=n(3226),o=n(8794),a=n(3195),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},8174:e=>{e.exports=function(){return[]}},9488:e=>{e.exports=function(){return!1}},3038:(e,t,n)=>{var r=n(8573),i=n(8092);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},1495:(e,t,n)=>{var r=n(2582),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},9753:(e,t,n)=>{var r=n(1495);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},2582:(e,t,n)=>{var r=n(821),i=n(8092),o=n(152),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3518:(e,t,n)=>{var r=n(2446);e.exports=function(e){return null==e?"":r(e)}},6339:(e,t,n)=>{var r=n(6025),i=n(9602);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},2085:(e,t,n)=>{var r=n(322)("toUpperCase");e.exports=r},888:(e,t,n)=>{"use strict";var r=n(9047);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},2007:(e,t,n)=>{e.exports=n(888)()},9047:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2758:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),l=new t(512),c=new t(512);function u(e){return s.get(e)||s.set(e,d(e).map(function(e){return e.replace(a,"$2")}))}function d(e){return e.match(n)||[""]}function h(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function f(e){return!h(e)&&(function(e){return e.match(i)&&!e.match(r)}(e)||function(e){return o.test(e)}(e))}e.exports={Cache:t,split:d,normalizePath:u,setter:function(e){var t=u(e);return l.get(e)||l.set(e,function(e,n){for(var r=0,i=t.length,o=e;r{"use strict";var r=n(2791),i=n(5296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n