From 41107b1040735fd20f503fbcbba96953e8172060 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 05:39:12 +0000 Subject: [PATCH 1/2] Fix GET_SHELL_ACTIVE_USERS query and data handling for Relay connection The `GET_SHELL_ACTIVE_USERS` query was incorrectly requesting fields directly on `activeUsers`, which is a Relay connection type (`UserConnection`). This caused GraphQL validation errors. This change: 1. Updates the query to request `edges { node { id name } }`. 2. Updates `useShellData` hook to flatten the connection edges back into an array of users for the component. This fixes the "Cannot query field \"id\" on type \"UserConnection\"" error. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> --- tavern/internal/www/src/pages/shellv2/graphql.ts | 8 ++++++-- .../internal/www/src/pages/shellv2/hooks/useShellData.ts | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tavern/internal/www/src/pages/shellv2/graphql.ts b/tavern/internal/www/src/pages/shellv2/graphql.ts index a9089608f..0af351e19 100644 --- a/tavern/internal/www/src/pages/shellv2/graphql.ts +++ b/tavern/internal/www/src/pages/shellv2/graphql.ts @@ -54,8 +54,12 @@ export const GET_SHELL_ACTIVE_USERS = gql` node(id: $id) { ... on Shell { activeUsers { - id - name + edges { + node { + id + name + } + } } } } diff --git a/tavern/internal/www/src/pages/shellv2/hooks/useShellData.ts b/tavern/internal/www/src/pages/shellv2/hooks/useShellData.ts index c7e6cdc67..9150d1657 100644 --- a/tavern/internal/www/src/pages/shellv2/hooks/useShellData.ts +++ b/tavern/internal/www/src/pages/shellv2/hooks/useShellData.ts @@ -51,6 +51,8 @@ export const useShellData = (shellId: string | undefined) => { } }, [portalData]); + const activeUsers = activeUsersData?.node?.activeUsers?.edges?.map((edge: any) => edge.node) || []; + return { loading, error, @@ -59,6 +61,6 @@ export const useShellData = (shellId: string | undefined) => { portalData, portalId, setPortalId, - activeUsers: activeUsersData?.node?.activeUsers || [] + activeUsers }; }; From dd925ae11822bdb3969a61fdef06233b4d8a15a3 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Fri, 27 Feb 2026 06:08:38 +0000 Subject: [PATCH 2/2] rebuild ui --- tavern/internal/www/build/asset-manifest.json | 6 +++--- tavern/internal/www/build/index.html | 2 +- .../build/static/js/{main.35b36bb4.js => main.f7c2b632.js} | 6 +++--- ...35b36bb4.js.LICENSE.txt => main.f7c2b632.js.LICENSE.txt} | 0 .../js/{main.35b36bb4.js.map => main.f7c2b632.js.map} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename tavern/internal/www/build/static/js/{main.35b36bb4.js => main.f7c2b632.js} (64%) rename tavern/internal/www/build/static/js/{main.35b36bb4.js.LICENSE.txt => main.f7c2b632.js.LICENSE.txt} (100%) rename tavern/internal/www/build/static/js/{main.35b36bb4.js.map => main.f7c2b632.js.map} (63%) diff --git a/tavern/internal/www/build/asset-manifest.json b/tavern/internal/www/build/asset-manifest.json index 019e653a6..9a28c0196 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.94f4668f.css", - "main.js": "/static/js/main.35b36bb4.js", + "main.js": "/static/js/main.f7c2b632.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.94f4668f.css.map": "/static/css/main.94f4668f.css.map", - "main.35b36bb4.js.map": "/static/js/main.35b36bb4.js.map", + "main.f7c2b632.js.map": "/static/js/main.f7c2b632.js.map", "787.5aa41665.chunk.js.map": "/static/js/787.5aa41665.chunk.js.map" }, "entrypoints": [ "static/css/main.94f4668f.css", - "static/js/main.35b36bb4.js" + "static/js/main.f7c2b632.js" ] } \ No newline at end of file diff --git a/tavern/internal/www/build/index.html b/tavern/internal/www/build/index.html index 0616cdc68..505b1a3bd 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.35b36bb4.js b/tavern/internal/www/build/static/js/main.f7c2b632.js similarity index 64% rename from tavern/internal/www/build/static/js/main.35b36bb4.js rename to tavern/internal/www/build/static/js/main.f7c2b632.js index df59179c9..82bae57a3 100644 --- a/tavern/internal/www/build/static/js/main.35b36bb4.js +++ b/tavern/internal/www/build/static/js/main.f7c2b632.js @@ -1,3 +1,3 @@ -/*! For license information please see main.35b36bb4.js.LICENSE.txt */ -(()=>{var e={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},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},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),u=n(2585),c=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,c.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),u=n(4725);let c=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=c=r([i(1,u.IMouseService),i(2,u.IRenderService),i(3,l.IBufferService),i(4,u.ILinkProviderService)],c)},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 u=-1,c=-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?(c=o,u=a.extended.urlId):(c=-1,u=-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),u=n(3107),c=n(5744),d=n(2950),h=n(1296),f=n(428),p=n(4269),m=n(5114),g=n(8934),v=n(3230),y=n(9312),b=n(4725),x=n(6731),w=n(8055),_=n(8969),S=n(8460),C=n(844),D=n(6114),E=n(8437),k=n(2584),T=n(7399),A=n(5941),O=n(9074),F=n(2585),R=n(5435),P=n(4567),I=n(779);class M extends _.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=D,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(O.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(I.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(k.C0.ESC,"]").concat(n,";").concat((0,A.toRgbString)(r)).concat(k.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(P.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(k.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(k.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)),D.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)})),D.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),D.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(m.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(x.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(v.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(u.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(P.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.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=k.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,T.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!==k.C0.ETX&&n.key!==k.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),u=n(2585);let c=t.Viewport=class extends l.Disposable{constructor(e,t,n,r,i,a,l,u){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(u.colors),this.register(u.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=c=r([i(2,u.IBufferService),i(3,u.IOptionsService),i(4,a.ICharSizeService),i(5,a.IRenderService),i(6,a.ICoreBrowserService),i(7,a.IThemeService)],c)},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),u={full:0,left:0,center:0,right:0},c={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 u;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===(u=this._viewportElement.parentElement)||void 0===u||u.insertBefore(this._canvas,this._viewportElement);const c=this._canvas.getContext("2d");if(!c)throw new Error("Ctx cannot be null");this._ctx=c,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);c.full=this._canvas.width,c.left=e,c.center=t,c.right=e,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=c.left,d.right=c.left+c.center}_refreshDrawHeightConstants(){u.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);u.left=t,u.center=t,u.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.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)-u[e.position||"full"]/2),c[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+u[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,u){if(!a)return;const c=n(e,t,r);return c?(c[0]=Math.ceil((c[0]+(u?s/2:0))/s),c[1]=Math.ceil(c[1]/l),c[0]=Math.min(Math.max(c[0],1),i+(u?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c):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),c=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 u(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",u(Math.abs(a-e),l(d,r));d=c>t?"D":"C";const h=Math.abs(c-t);return u(function(e,t){return t.cols-e}(c>t?e:a,n)+(h-1)*n.cols+1+((c>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),u=n(6052),c=n(4725),d=n(8055),h=n(8460),f=n(844),p=n(2585),m="xterm-dom-renderer-owner-",g="xterm-rows",v="xterm-fg-",y="xterm-bg-",b="xterm-focus",x="xterm-selection";let w=1,_=t.DomRenderer=class extends f.Disposable{constructor(e,t,n,r,i,s,c,d,p,v,y,b,_){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=s,this._linkifier2=c,this._charSizeService=p,this._optionsService=v,this._bufferService=y,this._coreBrowserService=b,this._themeService=_,this._terminalClass=w++,this._rowElements=[],this._selectionRenderModel=(0,u.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(x),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(m+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(m+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(x," { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}").concat(this._terminalSelector,".focus .").concat(x," div { position: absolute; background-color: ").concat(e.selectionBackgroundOpaque.css,";}").concat(this._terminalSelector," .").concat(x," div { position: absolute; background-color: ").concat(e.selectionInactiveBackgroundOpaque.css,";}");for(const[n,r]of e.ansi.entries())t+="".concat(this._terminalSelector," .").concat(v).concat(n," { color: ").concat(r.css,"; }").concat(this._terminalSelector," .").concat(v).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(v).concat(s.INVERTED_DEFAULT_COLOR," { color: ").concat(d.color.opaque(e.background).css,"; }").concat(this._terminalSelector," .").concat(v).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 u=a-o-1;if(s.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,u)),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],u=n.lines.get(e);if(!t||!u)break;t.replaceChildren(...this._rowFactory.createRow(u,e,e===r,a,s,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return".".concat(m).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,u=Math.min(s.x,i-1),c=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],m=s.lines.get(a);if(!p||!m)break;p.replaceChildren(...this._rowFactory.createRow(m,a,a===l,d,h,u,c,this.dimensions.css.cell.width,this._widthCache,o?f===n?e:0:-1,o?(f===r?t:i)-1:-1))}}};t.DomRenderer=_=r([i(7,p.IInstantiationService),i(8,c.ICharSizeService),i(9,p.IOptionsService),i(10,p.IBufferService),i(11,c.ICoreBrowserService),i(12,c.IThemeService)],_)},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),u=n(8055),c=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,c,h,p,g){const v=[],y=this._characterJoinerService.getJoinedCharacters(t),b=this._themeService.colors;let x,w=e.getNoBgTrimmedLength();n&&w0&&P===y[0][0]){I=!0;const t=y.shift();j=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),M=t[1]-1,w=j.getWidth()}const L=this._isCellInSelection(P,t),N=n&&P===s,B=R&&P>=p&&P<=g;let z=!1;this._decorationService.forEachDecorationAtCell(P,t,void 0,e=>{z=!0});let H=j.getChars()||a.WHITESPACE_CELL_CHAR;if(" "===H&&(j.isUnderline()||j.isOverline())&&(H="\xa0"),O=w*c-h.get(H,j.isBold(),j.isItalic()),x){if(_&&(L&&A||!L&&!A&&j.bg===C)&&(L&&A&&b.selectionForeground||j.fg===D)&&j.extended.ext===E&&B===k&&O===T&&!N&&!I&&!z){j.isInvisible()?S+=a.WHITESPACE_CELL_CHAR:S+=H,_++;continue}_&&(x.textContent=S),x=this._document.createElement("span"),_=0,S=""}else x=this._document.createElement("span");if(C=j.bg,D=j.fg,E=j.extended.ext,k=B,T=O,A=L,I&&s>=P&&s<=M&&(s=P),!this._coreService.isCursorHidden&&N&&this._coreService.isCursorInitialized)if(F.push("xterm-cursor"),this._coreBrowserService.isFocused)l&&F.push("xterm-cursor-blink"),F.push("bar"===r?"xterm-cursor-bar":"underline"===r?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":F.push("xterm-cursor-outline");break;case"block":F.push("xterm-cursor-block");break;case"bar":F.push("xterm-cursor-bar");break;case"underline":F.push("xterm-cursor-underline")}if(j.isBold()&&F.push("xterm-bold"),j.isItalic()&&F.push("xterm-italic"),j.isDim()&&F.push("xterm-dim"),S=j.isInvisible()?a.WHITESPACE_CELL_CHAR:j.getChars()||a.WHITESPACE_CELL_CHAR,j.isUnderline()&&(F.push("xterm-underline-".concat(j.extended.underlineStyle))," "===S&&(S="\xa0"),!j.isUnderlineColorDefault()))if(j.isUnderlineColorRGB())x.style.textDecorationColor="rgb(".concat(f.AttributeData.toColorRGB(j.getUnderlineColor()).join(","),")");else{let e=j.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&j.isBold()&&e<8&&(e+=8),x.style.textDecorationColor=b.ansi[e].css}j.isOverline()&&(F.push("xterm-overline")," "===S&&(S="\xa0")),j.isStrikethrough()&&F.push("xterm-strikethrough"),B&&(x.style.textDecoration="underline");let U=j.getFgColor(),V=j.getFgColorMode(),W=j.getBgColor(),G=j.getBgColorMode();const q=!!j.isInverse();if(q){const e=U;U=W,W=e;const t=V;V=G,G=t}let $,Y,Q,K=!1;switch(this._decorationService.forEachDecorationAtCell(P,t,void 0,e=>{"top"!==e.options.layer&&K||(e.backgroundColorRGB&&(G=50331648,W=e.backgroundColorRGB.rgba>>8&16777215,$=e.backgroundColorRGB),e.foregroundColorRGB&&(V=50331648,U=e.foregroundColorRGB.rgba>>8&16777215,Y=e.foregroundColorRGB),K="top"===e.options.layer)}),!K&&L&&($=this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque,W=$.rgba>>8&16777215,G=50331648,K=!0,b.selectionForeground&&(V=50331648,U=b.selectionForeground.rgba>>8&16777215,Y=b.selectionForeground)),K&&F.push("xterm-decoration-top"),G){case 16777216:case 33554432:Q=b.ansi[W],F.push("xterm-bg-".concat(W));break;case 50331648:Q=u.channels.toColor(W>>16,W>>8&255,255&W),this._addStyle(x,"background-color:#".concat(m((W>>>0).toString(16),"0",6)));break;default:q?(Q=b.foreground,F.push("xterm-bg-".concat(o.INVERTED_DEFAULT_COLOR))):Q=b.background}switch($||j.isDim()&&($=u.color.multiplyOpacity(Q,.5)),V){case 16777216:case 33554432:j.isBold()&&U<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(U+=8),this._applyMinimumContrast(x,Q,b.ansi[U],j,$,void 0)||F.push("xterm-fg-".concat(U));break;case 50331648:const e=u.channels.toColor(U>>16&255,U>>8&255,255&U);this._applyMinimumContrast(x,Q,e,j,$,Y)||this._addStyle(x,"color:#".concat(m(U.toString(16),"0",6)));break;default:this._applyMinimumContrast(x,Q,b.foreground,j,$,Y)||q&&F.push("xterm-fg-".concat(o.INVERTED_DEFAULT_COLOR))}F.length&&(x.className=F.join(" "),F.length=0),N||I||z?x.textContent=S:_++,O!==this.defaultSpacing&&(x.style.letterSpacing="".concat(O,"px")),v.push(x),P=M}return x&&_&&(x.textContent=S),v}_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=u.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 m(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 c(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 u 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 c extends u{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 u{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 u 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=u;let c=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),u=n(7226),c=n(2585);let d=t.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(e,t,n,r,i,a,c,d){super(),this._rowCount=e,this._charSizeService=r,this._renderer=this.register(new l.MutableDisposable),this._pausedResizeTask=new u.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),c),this.register(this._renderDebouncer),this.register(c.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(c.window,t),this.register(c.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,c.IOptionsService),i(3,a.ICharSizeService),i(4,c.IDecorationService),i(5,c.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),u=n(8460),c=n(844),d=n(6114),h=n(4841),f=n(511),p=n(2585),m=String.fromCharCode(160),g=new RegExp(m,"g");let v=t.SelectionService=class extends c.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 u.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new u.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new u.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new u.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,c.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 u=e[0]-s;let c=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()?(c++,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+u-c+h,m=Math.min(this._bufferService.cols,l-s+c+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,m+=e}}}if(r&&p+m===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&&(m+=t.length)}}return{start:p,length:m}}}_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=v=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)],v)},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),u=n(2585),c=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 m=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:c,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,c),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,u,c,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,u=t.rgba>>8&255,c=e.rgba>>24&255,d=e.rgba>>16&255,h=e.rgba>>8&255;return i=c+Math.round((n-c)*s),o=d+Math.round((r-d)*s),a=h+Math.round((u-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]}}(u||(t.color=u={})),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}}}(c||(t.css=c={})),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,u=p(d.relativeLuminance2(a,s,l),d.relativeLuminance2(r,i,o));for(;u0||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)),u=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,u=p(d.relativeLuminance2(a,s,l),d.relativeLuminance2(r,i,o));for(;u>>0}e.blend=function(e,t){if(s=(255&t)/255,1===s)return t;const n=t>>24&255,r=t>>16&255,u=t>>8&255,c=e>>24&255,d=e>>16&255,h=e>>8&255;return i=c+Math.round((n-c)*s),o=d+Math.round((r-d)*s),a=h+Math.round((u-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),u=n(6975),c=n(8460),d=n(1753),h=n(1480),f=n(7994),p=n(9282),m=n(5435),g=n(5981),v=n(2660);let y=!1;class b extends r.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.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 c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.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(u.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(v.OscLinkService),this._instantiationService.setService(i.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.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,c.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),u=n(482),c=n(8437),d=n(8460),h=n(643),f=n(511),p=n(3734),m=n(2585),g=n(1480),v=n(6242),y=n(6351),b=n(5941),x={"(":0,")":1,"*":2,"+":3,"-":1,".":2},w=131072;function _(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 D extends l.Disposable{getAttrData(){return this._curAttrData}constructor(e,t,n,r,i,l,h,p){let m=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=m,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new u.StringToUtf32,this._utf8Decoder=new u.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.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 v.OscHandler(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new v.OscHandler(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new v.OscHandler(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new v.OscHandler(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new v.OscHandler(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new v.OscHandler(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new v.OscHandler(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new v.OscHandler(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new v.OscHandler(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new v.OscHandler(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new v.OscHandler(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new v.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<=m.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<=m.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 u=o;u0&&2===p.getWidth(this._activeBuffer.x-1)&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let m=this._parser.precedingJoinState;for(let v=t;vs)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 c.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=m,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=>!_(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 v.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 u=1;u0||(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,m=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(u===c):2004===f?h(n.bracketedPasteMode):0,a.triggerDataEvent("".concat(o.C0.ESC,"[").concat(t?"":"?").concat(p,";").concat(m,"$y")),!0;var p,m}_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=c.DEFAULT_ATTR_DATA.fg,e.bg=c.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&c.DEFAULT_ATTR_DATA.fg):49===n?(r.bg&=-67108864,r.bg|=16777215&c.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&c.DEFAULT_ATTR_DATA.fg,r.bg&=-67108864,r.bg|=16777215&c.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=c.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(!_(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(k(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=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.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=D;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 k(e){return 0<=e&&e<256}E=r([i(0,m.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),u=n(643),c=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,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=l.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.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 u=[l];for(;l.isWrapped&&o>0;)l=this.lines.get(--o),u.unshift(l);const c=this.ybase+this.y;if(c>=o&&c0&&(r.push({start:o+u.length+i,newLines:m}),i+=m.length),u.push(...m);let g=h.length-1,v=h[g];0===v&&(g--,v=h[g]);let y=u.length-f-1,b=d;for(;y>=0;){const e=Math.min(b,v);if(void 0===u[g])break;if(u[g].copyCellsFrom(u[y],b-e,v-e,e,!0),v-=e,0===v&&(g--,v=h[g]),b-=e,0===b){y--;const e=Math.max(y,0);b=(0,s.getWrappedLineTrimmedLength)(u,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 u=0;for(let r=e.length-1;r>=0;r--)e[r].index+=u,this.lines.onInsertEmitter.fire(e[r]),u+=e[r].amount;const c=Math.max(0,n+i-this.lines.maxLength);c>0&&this.lines.onTrimEmitter.fire(c)}}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===c[e].getTrimmedLength());e--)m++;m>0&&(a.push(s+c.length-m),a.push(m)),s+=c.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(;lu&&(a-=u,s++);const c=2===e[s].getWidth(a-1);c&&a--;const d=c?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,u=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,c=l-a;for(;u=n)return 0;if(o=e[u++],128!=(192&o)){u--,r=!0;break}this.interim[a++]=o,i<<=6,i|=63&o}r||(2===l?i<128?u--: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 c=n-4;let d=u;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 u 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 u=this._escHandlers[this._collect<<8|i];let c=u?u.length-1:-1;for(;c>=0&&(r=u[c](),!0!==r);c--)if(r instanceof Promise)return this._preserveStack(4,u,c,o,s),r;c<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 u=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=u=r([i(0,l.IOptionsService)],u)},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 u(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 c=String.fromCharCode,d={DEFAULT:e=>{const t=[u(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":"\x1b[M".concat(c(t[0])).concat(c(t[1])).concat(c(t[2]))},SGR:e=>{const t=0===e.action&&4!==e.button?"m":"M";return"\x1b[<".concat(u(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(u(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),u=Object.freeze({insertMode:!1}),c=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)(u),this.decPrivateModes=(0,o.clone)(c)}reset(){this.modes=(0,o.clone)(u),this.decPrivateModes=(0,o.clone)(c)}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 u 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 c(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,u=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),u=n(7975),c=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 u.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new c.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=u.length)-(o=c.length)<0&&(o=l,r=c,c=u,u=r),n=0;o;)n=(u[--o]=u[o]+c[o]+n)/p|0,u[o]%=p;for(n&&(u.unshift(n),++i),l=u.length;0==u[--l];)u.pop();return t.d=u,t.e=i,s?T(t,h):t}function b(e,t,n){if(e!==~~e||en)throw Error(u+e)}function x(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},v.decimalPlaces=v.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},v.dividedBy=v.div=function(e){return w(this,new this.constructor(e))},v.dividedToIntegerBy=v.idiv=function(e){var t=this.constructor;return T(w(this,new t(e),0,1),t.precision)},v.equals=v.eq=function(e){return!this.cmp(e)},v.exponent=function(){return S(this)},v.greaterThan=v.gt=function(e){return this.cmp(e)>0},v.greaterThanOrEqualTo=v.gte=function(e){return this.cmp(e)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return 0===this.s},v.lessThan=v.lt=function(e){return this.cmp(e)<0},v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1},v.logarithm=v.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,T(t,o))},v.minus=v.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))},v.modulo=v.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)):T(new r(n),i)},v.naturalExponential=v.exp=function(){return _(this)},v.naturalLogarithm=v.ln=function(){return E(this)},v.negated=v.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},v.plus=v.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))},v.precision=v.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(u+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},v.squareRoot=v.sqrt=function(){var e,t,n,r,i,o,a,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(l+"NaN")}for(e=S(u),s=!1,0==(i=Math.sqrt(+u))||i==1/0?(((t=x(u.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new c(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new c(i.toString()),i=a=(n=c.precision)+3;;)if(r=(o=r).plus(w(u,o,a+2)).times(.5),x(o.d).slice(0,a)===(t=x(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(T(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,T(r,n)},v.times=v.mul=function(e){var t,n,r,i,o,a,l,u,c,d=this,h=d.constructor,f=d.d,m=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,(u=f.length)<(c=m.length)&&(o=f,f=m,m=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)l=o[i]+m[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?T(e,h.precision):e},v.toDecimalPlaces=v.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),T(n,e+S(n)+1,t))},v.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=O(r,!0):(b(e,0,o),void 0===t?t=i.rounding:b(t,0,8),n=O(r=T(new i(r),e+1,t),!0,e+1)),n},v.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?O(i):(b(e,0,o),void 0===t?t=a.rounding:b(t,0,8),n=O((r=T(new a(i),e+S(i)+1,t)).abs(),!1,e+S(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},v.toInteger=v.toint=function(){var e=this,t=e.constructor;return T(new t(e),S(e)+1,t.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(e){var t,n,r,o,a,u,c=this,h=c.constructor,f=+(e=new h(e));if(!e.s)return new h(i);if(!(c=new h(c)).s){if(e.s<1)throw Error(l+"Infinity");return c}if(c.eq(i))return c;if(r=h.precision,e.eq(i))return T(c,r);if(u=(t=e.e)>=(n=e.d.length-1),a=c.s,u){if((n=f<0?-f:f)<=m){for(o=new h(i),t=Math.ceil(r/7+4),s=!1;n%2&&F((o=o.times(c)).d,t),0!==(n=d(n/2));)F((c=c.times(c)).d,t);return s=!0,e.s<0?new h(i).div(o):T(o,r)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,c.s=1,s=!1,o=e.times(E(c,r+12)),s=!0,(o=_(o)).s=a,o},v.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=O(i,(n=S(i))<=a.toExpNeg||n>=a.toExpPos):(b(e,1,o),void 0===t?t=a.rounding:b(t,0,8),r=O(i=T(new a(i),e,t),e<=(n=S(i))||n<=a.toExpNeg,e)),r},v.toSignificantDigits=v.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)),T(new n(this),e,t)},v.toString=v.valueOf=v.val=v.toJSON=function(){var e=this,t=S(e),n=e.constructor;return O(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,u,c,d,h,f,m,g,v,y,b,x,w,_,C,D,E,k,A=r.constructor,O=r.s==i.s?1:-1,F=r.d,R=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(l+"Division by zero");for(u=r.e-i.e,E=R.length,C=F.length,g=(m=new A(O)).d=[],c=0;R[c]==(F[c]||0);)++c;if(R[c]>(F[c]||0)&&--u,(x=null==o?o=A.precision:a?o+(S(r)-S(i))+1:o)<0)return new A(0);if(x=x/7+2|0,c=0,1==E)for(d=0,R=R[0],x++;(c1&&(R=e(R,d),F=e(F,d),E=R.length,C=F.length),_=E,y=(v=F.slice(0,E)).length;y=p/2&&++D;do{d=0,(s=t(R,v,E,y))<0?(b=v[0],E!=y&&(b=b*p+(v[1]||0)),(d=b/D|0)>1?(d>=p&&(d=p-1),1==(s=t(h=e(R,d),v,f=h.length,y=v.length))&&(d--,n(h,E16)throw Error(c+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=T(r.times(e),l),n=n.times(++u),x((a=o.plus(w(r,n,l))).d).slice(0,l)===x(o.d).slice(0,l)){for(;d--;)o=T(o.times(o),l);return f.precision=p,null==t?(s=!0,T(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 T(new e(e.LN10),t)}function D(e){for(var t="";e--;)t+="0";return t}function E(e,t){var n,r,o,a,u,c,d,h,f,p=1,m=e,g=m.d,v=m.constructor,y=v.precision;if(m.s<1)throw Error(l+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new v(0);if(null==t?(s=!1,h=y):h=t,m.eq(10))return null==t&&(s=!0),C(v,h);if(h+=10,v.precision=h,r=(n=x(g)).charAt(0),a=S(m),!(Math.abs(a)<15e14))return d=C(v,h+2,y).times(a+""),m=E(new v(r+"."+n.slice(1)),h-10).plus(d),v.precision=y,null==t?(s=!0,T(m,y)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=x((m=m.times(e)).d)).charAt(0),p++;for(a=S(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1)),c=u=m=w(m.minus(i),m.plus(i),h),f=T(m.times(m),h),o=3;;){if(u=T(u.times(f),h),x((d=c.plus(w(u,new v(o),h))).d).slice(0,h)===x(c.d).slice(0,h))return c=c.times(2),0!==a&&(c=c.plus(C(v,h+2,y).times(a+""))),c=w(c,new v(p),h),v.precision=y,null==t?(s=!0,T(c,y)):c;c=d,o+=2}}function k(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(c+n)}else e.s=0,e.e=0,e.d=[0];return e}function T(e,t,n){var r,i,o,a,l,u,f,m,v=e.d;for(a=1,o=v[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,f=v[m=0];else{if((m=Math.ceil((r+1)/7))>=(o=v.length))return e;for(f=o=v[m],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,u=t<0||void 0!==v[m+1]||f%o,u=n<4?(l||u)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||u||6==n&&(r>0?i>0?f/h(10,a-i):0:v[m-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return u?(o=S(e),v.length=1,t=t-o-1,v[0]=h(10,(7-t%7)%7),e.e=d(-t/7)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(0==r?(v.length=m,o=1,m--):(v.length=m+1,o=h(10,7-r),v[m]=i>0?(f/h(10,a-i)%h(10,i)|0)*o:0),u)for(;;){if(0==m){(v[0]+=o)==p&&(v[0]=1,++e.e);break}if(v[m]+=o,v[m]!=p)break;v[m--]=0,o=1}for(r=v.length;0===v[--r];)v.pop();if(s&&(e.e>g||e.e<-g))throw Error(c+S(e));return e}function A(e,t){var n,r,i,o,a,l,u,c,d,h,f=e.constructor,m=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),s?T(t,m):t;if(u=e.d,h=t.d,r=t.e,c=e.e,u=u.slice(),a=c-r){for((d=a<0)?(n=u,a=-a,l=h.length):(n=h,r=c,l=u.length),a>(i=Math.max(Math.ceil(m/7),l)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=u.length)<(l=h.length))&&(l=i),i=0;i0;--i)u[l++]=0;for(i=h.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+D(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+D(-i-1)+o,n&&(r=n-a)>0&&(o+=D(r))):i>=a?(o+=D(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+D(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=D(r))),e.s<0?"-"+o:o}function F(e,t){if(e.length>t)return e.length=t,!0}function R(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(u+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(u+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(u+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])):k(t,e.toString())}if("string"!==typeof e)throw Error(u+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!f.test(e))throw Error(u+e);k(t,e)}if(o.prototype=v,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=R,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=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"===typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});h{"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,u,c=t(e),d=t(a);if(c&&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(c!=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,m=a instanceof RegExp;if(p!=m)return!1;if(p&&m)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"!==(u=g[s])||!e.$$typeof)&&!o(e[u],a[u]))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 u=Object.defineProperty,c=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=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=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,u=n?Symbol.for("react.context"):60110,c=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,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=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 c:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function _(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||w(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===u},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)===m},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===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},8309:(e,t,n)=>{"use strict";e.exports=n(746)},8902:e=>{"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u="";function c(e){return e?e.replace(l,u):u}e.exports=function(e,l){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function p(){var e={line:d,column:h};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}function g(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n}function v(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function y(){v(r)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return h+=2,f(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function w(){var e=p(),n=v(i);if(n){if(x(),!v(o))return g("property missing ':'");var r=v(a),l=e({type:"declaration",property:c(n[0].replace(t,u)),value:r?c(r[0].replace(t,u)):u});return v(s),l}}return m.prototype.content=e,y(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}},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\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[o]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[a]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[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,m=p&&e&&!e.nodeType&&e,g=m&&m.exports===p,v=g&&d.process,y=function(){try{var e=m&&m.require&&m.require("util").types;return e||v&&v.binding&&v.binding("util")}catch(t){}}(),b=y&&y.isTypedArray;var x,w,_=Array.prototype,S=Function.prototype,C=Object.prototype,D=f["__core-js_shared__"],E=S.toString,k=C.hasOwnProperty,T=function(){var e=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),A=C.toString,O=E.call(Object),F=RegExp("^"+E.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=g?f.Buffer:void 0,P=f.Symbol,I=f.Uint8Array,M=R?R.allocUnsafe:void 0,j=(x=Object.getPrototypeOf,w=Object,function(e){return x(w(e))}),L=Object.create,N=C.propertyIsEnumerable,B=_.splice,z=P?P.toStringTag:void 0,H=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),U=R?R.isBuffer:void 0,V=Math.max,W=Date.now,G=fe(f,"Map"),q=fe(Object,"create"),$=function(){function e(){}return function(t){if(!De(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Q.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},K.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(G||Q),string:new Y}},K.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},K.prototype.get=function(e){return he(this,e).get(e)},K.prototype.has=function(e){return he(this,e).has(e)},K.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 Q,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 Q){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new K(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=k.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!(!De(e)||function(e){return!!T&&T in e}(e))&&(Se(e)?F: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(!De(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=me(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}function ue(e,t,n,r,i){e!==t&&ie(t,function(o,a){if(i||(i=new X),De(o))!function(e,t,n,r,i,o,a){var l=ge(e,n),u=ge(t,n),c=a.get(u);if(c)return void J(e,n,c);var d=o?o(l,u,n+"",e,t,a):void 0,h=void 0===d;if(h){var f=xe(u),p=!f&&_e(u),m=!f&&!p&&ke(u);d=u,f||p||m?xe(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)&&k.call(e,"callee")&&!N.call(e,"callee")},xe=Array.isArray;function we(e){return null!=e&&Ce(e.length)&&!Se(e)}var _e=U||function(){return!1};function Se(e){if(!De(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 De(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var ke=b?function(e){return function(t){return e(t)}}(b):function(e){return Ee(e)&&Ce(e.length)&&!!c[oe(e)]};function Te(e){return we(e)?Z(e,!0):le(e)}var Ae,Oe=(Ae=function(e,t,n,r){ue(e,t,n,r)},ce(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(!De(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 u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},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),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),f=n||c||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)!t&&!u.call(e,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||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,u=t.length;for(o||(o=i),s||(s=[]);++l0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}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),u=n(5174),c=n(9102),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),b=l(t),x=y?h:s(e),w=b?h:s(t),_=(x=x==d?f:x)==f,S=(w=w==d?f:w)==f,C=x==w;if(C&&u(e)){if(!u(t))return!1;y=!0,_=!1}if(C&&!_)return v||(v=new r),y||c(e)?i(e,t,n,m,g,v):o(e,t,x,n,m,g,v);if(!(1&n)){var D=_&&p.call(e,"__wrapped__"),E=S&&p.call(t,"__wrapped__");if(D||E){var k=D?e.value():e,T=E?t.value():t;return v||(v=new r),g(k,T,n,m,v)}}return!!C&&(v||(v=new r),a(e,t,n,m,g,v))}},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 u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[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,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=RegExp("^"+c.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),u=n(9793);e.exports=function(e,t){return a(e)&&s(t)?l(u(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),u=n(4480),c=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}):[c];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 u(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 u=-1,c=i,d=e.length,h=!0,f=[],p=f;if(n)h=!1,c=o;else if(d>=200){var m=t?null:s(e);if(m)return l(m);h=!1,c=a,p=new r}else p=t?[]:f;e:for(;++u{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,u=t===t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&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?u:u*("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 u=e(t,n,a);return u>-1?s[l?t[u]:u]: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 u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!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),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,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 m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=a(f(e),f(t),r,u,d,h);return h.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.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,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[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 m=!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),u=n(3100),c="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",m=u(r),g=u(i),v=u(o),y=u(a),b=u(s),x=l;(r&&x(new r(new ArrayBuffer(1)))!=p||i&&x(new i)!=c||o&&x(o.resolve())!=d||a&&x(new a)!=h||s&&x(new s)!=f)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case m:return p;case g:return c;case v:return d;case y:return h;case b:return f}return t}),e.exports=x},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 u=-1,c=(t=r(t,e)).length,d=!1;++u{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+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+l+")*"),d="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+d+c,"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,u,c,d,h,f,p=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=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>=c}function x(){var e=i();if(b(e))return w(e);h=setTimeout(x,function(e){var n=t-(e-f);return g?s(n,c-(e-p)):n}(e))}function w(e){return h=void 0,v&&l?y(e):(l=u=void 0,d)}function _(){var e=i(),n=b(e);if(l=arguments,u=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(x,t),m?y(e):d}(f);if(g)return clearTimeout(h),h=setTimeout(x,t),y(f)}return void 0===h&&(h=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=u=h=void 0},_.flush=function(){return void 0===h?d:w(i())},_}},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,u=s.hasOwnProperty,c=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=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},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,u=32,c=64,d=128,h=256,f=1/0,p=9007199254740991,m=NaN,g=4294967295,v=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",c],["rearg",h]],y="[object Arguments]",b="[object Array]",x="[object Boolean]",w="[object Date]",_="[object Error]",S="[object Function]",C="[object GeneratorFunction]",D="[object Map]",E="[object Number]",k="[object Object]",T="[object Promise]",A="[object RegExp]",O="[object Set]",F="[object String]",R="[object Symbol]",P="[object WeakMap]",I="[object ArrayBuffer]",M="[object DataView]",j="[object Float32Array]",L="[object Float64Array]",N="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",U="[object Uint8ClampedArray]",V="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,K=RegExp(Y.source),X=RegExp(Q.source),Z=/<%-([\s\S]+?)%>/g,J=/<%([\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?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Ce="\\ud800-\\udfff",De="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Oe="\\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",Fe="['\u2019]",Re="["+Ce+"]",Pe="["+Oe+"]",Ie="["+De+"]",Me="\\d+",je="["+Ee+"]",Le="["+ke+"]",Ne="[^"+Ce+Oe+Me+Ee+ke+Te+"]",Be="\\ud83c[\\udffb-\\udfff]",ze="[^"+Ce+"]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Te+"]",We="\\u200d",Ge="(?:"+Le+"|"+Ne+")",qe="(?:"+Ve+"|"+Ne+")",$e="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ie+"|"+Be+")"+"?",Ke="["+Ae+"]?",Xe=Ke+Qe+("(?:"+We+"(?:"+[ze,He,Ue].join("|")+")"+Ke+Qe+")*"),Ze="(?:"+[je,He,Ue].join("|")+")"+Xe,Je="(?:"+[ze+Ie+"?",Ie,He,Ue,Re].join("|")+")",et=RegExp(Fe,"g"),tt=RegExp(Ie,"g"),nt=RegExp(Be+"(?="+Be+")|"+Je+Xe,"g"),rt=RegExp([Ve+"?"+Le+"+"+$e+"(?="+[Pe,Ve,"$"].join("|")+")",qe+"+"+Ye+"(?="+[Pe,Ve+Ge,"$"].join("|")+")",Ve+"?"+Ge+"+"+$e,Ve+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ze].join("|"),"g"),it=RegExp("["+We+Ce+De+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[j]=lt[L]=lt[N]=lt[B]=lt[z]=lt[H]=lt[U]=lt[V]=lt[W]=!0,lt[y]=lt[b]=lt[I]=lt[x]=lt[M]=lt[w]=lt[_]=lt[S]=lt[D]=lt[E]=lt[k]=lt[A]=lt[O]=lt[F]=lt[P]=!1;var ut={};ut[y]=ut[b]=ut[I]=ut[M]=ut[x]=ut[w]=ut[j]=ut[L]=ut[N]=ut[B]=ut[z]=ut[D]=ut[E]=ut[k]=ut[A]=ut[O]=ut[F]=ut[R]=ut[H]=ut[U]=ut[V]=ut[W]=!0,ut[_]=ut[S]=ut[P]=!1;var ct={"\\":"\\","'":"'","\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,mt=ft||pt||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===gt,bt=yt&&ft.process,xt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=xt&&xt.isArrayBuffer,_t=xt&&xt.isDate,St=xt&&xt.isMap,Ct=xt&&xt.isRegExp,Dt=xt&&xt.isSet,Et=xt&&xt.isTypedArray;function kt(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 Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function It(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--&&Vt(t,e[n],0)>-1;);return n}var on=Yt({"\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=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ct[e]}function ln(e){return it.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function cn(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?mt:yn.defaults(mt.Object(),t,yn.pick(mt,at))).Array,r=t.Date,se=t.Error,Ce=t.Function,De=t.Math,Ee=t.Object,ke=t.RegExp,Te=t.String,Ae=t.TypeError,Oe=n.prototype,Fe=Ce.prototype,Re=Ee.prototype,Pe=t["__core-js_shared__"],Ie=Fe.toString,Me=Re.hasOwnProperty,je=0,Le=function(){var e=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ne=Re.toString,Be=Ie.call(Ee),ze=mt._,He=ke("^"+Ie.call(Me).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=yt?t.Buffer:i,Ve=t.Symbol,We=t.Uint8Array,Ge=Ue?Ue.allocUnsafe:i,qe=cn(Ee.getPrototypeOf,Ee),$e=Ee.create,Ye=Re.propertyIsEnumerable,Qe=Oe.splice,Ke=Ve?Ve.isConcatSpreadable:i,Xe=Ve?Ve.iterator:i,Ze=Ve?Ve.toStringTag:i,Je=function(){try{var e=ho(Ee,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,it=r&&r.now!==mt.Date.now&&r.now,ct=t.setTimeout!==mt.setTimeout&&t.setTimeout,ft=De.ceil,pt=De.floor,gt=Ee.getOwnPropertySymbols,vt=Ue?Ue.isBuffer:i,bt=t.isFinite,xt=Oe.join,zt=cn(Ee.keys,Ee),Yt=De.max,bn=De.min,xn=r.now,wn=t.parseInt,_n=De.random,Sn=Oe.reverse,Cn=ho(t,"DataView"),Dn=ho(t,"Map"),En=ho(t,"Promise"),kn=ho(t,"Set"),Tn=ho(t,"WeakMap"),An=ho(Ee,"create"),On=Tn&&new Tn,Fn={},Rn=No(Cn),Pn=No(Dn),In=No(En),Mn=No(kn),jn=No(Tn),Ln=Ve?Ve.prototype:i,Nn=Ln?Ln.valueOf:i,Bn=Ln?Ln.toString:i;function zn(e){if(ts(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Vn)return e;if(Me.call(e,"__wrapped__"))return Bo(e)}return new Vn(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 Un(){}function Vn(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,u=2&t,c=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]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ai(e,s)}else{var h=mo(e),f=h==S||h==C;if(Ya(e))return Si(e,l);if(h==k||h==y||f&&!o){if(s=u||f?{}:vo(e),!l)return u?function(e,t){return Oi(e,po(e),t)}(e,function(e,t){return e&&Oi(t,Rs(t),e)}(s,e)):function(e,t){return Oi(e,fo(e),t)}(e,ir(s,e))}else{if(!ut[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case I:return Ci(e);case x:case w:return new r(+e);case M:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case L:case N:case B:case z:case H:case U:case V:case W:return Di(e,n);case D:return new r;case E:case F:return new r(e);case A:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new r;case R:return i=e,Nn?Ee(Nn.call(i)):{}}var i}(e,h,l)}}a||(a=new Qn);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 m=d?i:(c?u?io:ro:u?Rs:Fs)(e);return At(m||e,function(r,i){m&&(r=e[i=r]),tr(s,i,lr(r,t,n,i,e,a))}),s}function ur(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 cr(e,t,n){if("function"!=typeof e)throw new Ae(o);return Fo(function(){e.apply(i,n)},t)}function dr(e,t,n,r){var i=-1,o=Pt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Mt(t,Jt(n))),r?(o=It,a=!1):t.length>=200&&(o=tn,a=!1,t=new Yn(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(Dn||qn),string:new Gn}},$n.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return uo(this,e).get(e)},$n.prototype.has=function(e){return uo(this,e).has(e)},$n.prototype.set=function(e,t){var n=uo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new qn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Dn||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=Pi(xr),fr=Pi(wr,!0);function pr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function mr(e,t,n){for(var r=-1,o=e.length;++r0&&n(s)?t>1?vr(s,t-1,n,r,i):jt(i,s):r||(i[i.length]=s)}return i}var yr=Ii(),br=Ii(!0);function xr(e,t){return e&&yr(e,t,Fs)}function wr(e,t){return e&&br(e,t,Fs)}function _r(e,t){return Rt(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 kr(e,t){return null!=e&&Me.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(e)}function Ar(e,t,r){for(var o=r?It:Pt,a=e[0].length,s=e.length,l=s,u=n(s),c=1/0,d=[];l--;){var h=e[l];l&&t&&(h=Mt(h,Jt(t))),c=bn(h.length,c),u[l]=!r&&(t||a>=120&&h.length>=120)?new Yn(l&&h):i}h=e[0];var f=-1,p=u[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&&Qe.call(s,l,1),Qe.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)?Qe.call(e,i,1):di(e,i)}}return e}function Yr(e,t){return e+pt(_n()*(t-e+1))}function Qr(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 Kr(e,t){return Ro(ko(e,t,rl),e+"")}function Xr(e){return Xn(zs(e))}function Zr(e,t){var n=zs(e);return Mo(n,sr(t,0,n.length))}function Jr(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 u=t?null:Qi(e);if(u)return hn(u);a=!1,i=tn,l=new Yn}else l=t?[]:s;e:for(;++r=r?e:ri(e,t,n)}var _i=nt||function(e){return mt.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 Di(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,u=t===t,c=ls(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||r&&s&&u||!n&&u||!o)return 1;if(!r&&!a&&!c&&e1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&xo(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=Vn.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 Vn([],!0)}for(r=l?r:n;++r1&&x.reverse(),f&&cl))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var h=-1,f=!0,p=2&n?new Yn: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(v,function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Io(e){var t=0,n=0;return function(){var r=xn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mo(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 Vn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});var ma=Fi(function(e,t,n){Me.call(e,n)?++e[n]:or(e,n,1)});var ga=Ni(Vo),va=Ni(Wo);function ya(e,t){return(Wa(e)?At:hr)(e,lo(t,3))}function ba(e,t){return(Wa(e)?Ot:fr)(e,lo(t,3))}var xa=Fi(function(e,t,n){Me.call(e,n)?e[n].push(t):or(e,n,[t])});var wa=Kr(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?kt(t,e,r):Or(e,t,r)}),a}),_a=Fi(function(e,t,n){or(e,n,t)});function Sa(e,t){return(Wa(e)?Mt:Br)(e,lo(t,3))}var Ca=Fi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Da=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&xo(e,t[0],t[1])?t=[]:n>2&&xo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,vr(t,1),[])}),Ea=it||function(){return mt.Date.now()};function ka(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ta(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=Kr(function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Aa));r|=u}return Xi(e,r,t,n,i)}),Oa=Kr(function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Oa));r|=u}return Xi(t,r,e,n,i)});function Fa(e,t,n){var r,a,s,l,u,c,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function m(t){var n=r,o=a;return r=a=i,d=t,l=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||f&&e-d>=s}function v(){var e=Ea();if(g(e))return y(e);u=Fo(v,function(e){var n=t-(e-c);return f?bn(n,s-(e-d)):n}(e))}function y(e){return u=i,p&&r?m(e):(r=a=i,l)}function b(){var e=Ea(),n=g(e);if(r=arguments,a=this,c=e,n){if(u===i)return function(e){return d=e,u=Fo(v,t),h?m(e):l}(c);if(f)return _i(u),u=Fo(v,t),m(c)}return u===i&&(u=Fo(v,t)),l}return t=gs(t)||0,es(n)&&(h=!!n.leading,s=(f="maxWait"in n)?Yt(gs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==i&&_i(u),d=0,r=c=a=u=i},b.flush=function(){return u===i?l:y(Ea())},b}var Ra=Kr(function(e,t){return cr(e,1,t)}),Pa=Kr(function(e,t,n){return cr(e,gs(t)||0,n)});function Ia(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(Ia.Cache||$n),n}function Ma(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)}}Ia.Cache=$n;var ja=xi(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Mt(t[0],Jt(lo())):Mt(vr(t,1),Jt(lo()))).length;return Kr(function(r){for(var i=-1,o=bn(r.length,n);++i=t}),Va=Fr(function(){return arguments}())?Fr:function(e){return ts(e)&&Me.call(e,"callee")&&!Ye.call(e,"callee")},Wa=n.isArray,Ga=wt?Jt(wt):function(e){return ts(e)&&Dr(e)==I};function qa(e){return null!=e&&Ja(e.length)&&!Xa(e)}function $a(e){return ts(e)&&qa(e)}var Ya=vt||gl,Qa=_t?Jt(_t):function(e){return ts(e)&&Dr(e)==w};function Ka(e){if(!ts(e))return!1;var t=Dr(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Dr(e);return t==S||t==C||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==ps(e)}function Ja(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?Jt(St):function(e){return ts(e)&&mo(e)==D};function rs(e){return"number"==typeof e||ts(e)&&Dr(e)==E}function is(e){if(!ts(e)||Dr(e)!=k)return!1;var t=qe(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ie.call(n)==Be}var os=Ct?Jt(Ct):function(e){return ts(e)&&Dr(e)==A};var as=Dt?Jt(Dt):function(e){return ts(e)&&mo(e)==O};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&Dr(e)==F}function ls(e){return"symbol"==typeof e||ts(e)&&Dr(e)==R}var us=Et?Jt(Et):function(e){return ts(e)&&Ja(e.length)&&!!lt[Dr(e)]};var cs=qi(Nr),ds=qi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(qa(e))return ss(e)?mn(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=mo(e);return(t==D?un:t==O?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 ms(e){return e?sr(ps(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(ls(e))return m;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=Zt(e);var n=ve.test(e);return n||be.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?m:+e}function vs(e){return Oi(e,Rs(e))}function ys(e){return null==e?"":ui(e)}var bs=Ri(function(e,t){if(Co(t)||qa(t))Oi(t,Fs(t),e);else for(var n in t)Me.call(t,n)&&tr(e,n,t[n])}),xs=Ri(function(e,t){Oi(t,Rs(t),e)}),ws=Ri(function(e,t,n,r){Oi(t,Rs(t),e,r)}),_s=Ri(function(e,t,n,r){Oi(t,Fs(t),e,r)}),Ss=no(ar);var Cs=Kr(function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&xo(t[0],t[1],o)&&(r=1);++n1),t}),Oi(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n});var js=no(function(e,t){return null==e?{}:function(e,t){return Gr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Ls(e,t){if(null==e)return{};var n=Mt(io(e),function(e){return[e]});return t=lo(t),Gr(e,n,function(e,n){return t(e,n[0])})}var Ns=Ki(Fs),Bs=Ki(Rs);function zs(e){return null==e?[]:en(e,Fs(e))}var Hs=ji(function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)});function Us(e){return Ks(ys(e).toLowerCase())}function Vs(e){return(e=ys(e))&&e.replace(we,on).replace(tt,"")}var Ws=ji(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gs=ji(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Mi("toLowerCase");var $s=ji(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Ys=ji(function(e,t,n){return e+(n?" ":"")+Ks(t)});var Qs=ji(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Mi("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 Zs=Kr(function(e,t){try{return kt(e,i,t)}catch(n){return Ka(n)?n:new se(n)}}),Js=no(function(e,t){return At(t,function(t){t=Lo(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 Mr("function"==typeof e?e:lr(e,1))}var ol=Kr(function(e,t){return function(n){return Or(n,e,t)}}),al=Kr(function(e,t){return function(n){return Or(e,n,t)}});function sl(e,t,n){var r=Fs(t),i=_r(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Fs(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,jt([this.value()],arguments))})}),e}function ll(){}var ul=Vi(Mt),cl=Vi(Ft),dl=Vi(Bt);function hl(e){return wo(e)?$t(Lo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var fl=Gi(),pl=Gi(!0);function ml(){return[]}function gl(){return!1}var vl=Ui(function(e,t){return e+t},0),yl=Yi("ceil"),bl=Ui(function(e,t){return e/t},1),xl=Yi("floor");var wl=Ui(function(e,t){return e*t},1),_l=Yi("round"),Sl=Ui(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=ka,zn.assign=bs,zn.assignIn=xs,zn.assignInWith=ws,zn.assignWith=_s,zn.at=Ss,zn.before=Ta,zn.bind=Aa,zn.bindAll=Js,zn.bindKey=Oa,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?xo(e,t,r):t===i)?1:Yt(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:ms(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ui(t))&&ln(e)?wi(mn(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:Yt(ps(t),0),Kr(function(n){var r=n[t],i=wi(n,0,t);return r&&jt(i,r),kt(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),Fa(e,t,{leading:r,maxWait:t,trailing:i})},zn.thru=fa,zn.toArray=hs,zn.toPairs=Ns,zn.toPairsIn=Bs,zn.toPath=function(e){return Wa(e)?Mt(e,Lo):ls(e)?[e]:Ai(jo(ys(e)))},zn.toPlainObject=vs,zn.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||us(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:xr)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return ka(e,1)},zn.union=ta,zn.unionBy=na,zn.unionWith=ra,zn.uniq=function(e){return e&&e.length?ci(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ci(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,Rs(e))},zn.without=aa,zn.words=Xs,zn.wrap=function(e,t){return La(yi(t),e)},zn.xor=sa,zn.xorBy=la,zn.xorWith=ua,zn.zip=ca,zn.zipObject=function(e,t){return gi(e||[],t||[],tr)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},zn.zipWith=da,zn.entries=Ns,zn.entriesIn=Bs,zn.extend=xs,zn.extendWith=ws,sl(zn,zn),zn.add=vl,zn.attempt=Zs,zn.camelCase=Hs,zn.capitalize=Us,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||ur(e,t,Fs(t))},zn.deburr=Vs,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=ui(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(Q,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)?Ft:pr;return n&&xo(e,t,n)&&(t=i),r(e,lo(t,3))},zn.find=ga,zn.findIndex=Vo,zn.findKey=function(e,t){return Ht(e,lo(t,3),xr)},zn.findLast=va,zn.findLastIndex=Wo,zn.findLastKey=function(e,t){return Ht(e,lo(t,3),wr)},zn.floor=xl,zn.forEach=ya,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:yr(e,lo(t,3),Rs)},zn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Rs)},zn.forOwn=function(e,t){return e&&xr(e,lo(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,lo(t,3))},zn.get=Es,zn.gt=Ha,zn.gte=Ua,zn.has=function(e,t){return null!=e&&go(e,t,kr)},zn.hasIn=ks,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=Yt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Vt(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=Yt(r+i,0)),Vt(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=us,zn.isUndefined=function(e){return e===i},zn.isWeakMap=function(e){return ts(e)&&mo(e)==P},zn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Dr(e)},zn.join=function(e,t){return null==e?"":xt.call(e,t)},zn.kebabCase=Ws,zn.last=Ko,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?Yt(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):Ut(e,Gt,o,!0)},zn.lowerCase=Gs,zn.lowerFirst=qs,zn.lt=cs,zn.lte=ds,zn.max=function(e){return e&&e.length?mr(e,rl,Er):i},zn.maxBy=function(e,t){return e&&e.length?mr(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?mr(e,rl,Nr):i},zn.minBy=function(e,t){return e&&e.length?mr(e,lo(t,2),Nr):i},zn.stubArray=ml,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?Vr(e,ps(t)):i},zn.noConflict=function(){return mt._===this&&(mt._=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=_n();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Yr(e,t)},zn.reduce=function(e,t,n){var r=Wa(e)?Lt:Qt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},zn.reduceRight=function(e,t,n){var r=Wa(e)?Nt:Qt,i=arguments.length<3;return r(e,lo(t,4),n,i,fr)},zn.repeat=function(e,t,n){return t=(n?xo(e,t,n):t===i)?1:ps(t),Qr(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 u=s?wi(s,0,l).join(""):e.slice(0,l);if(o===i)return u+r;if(s&&(l+=u.length-l),os(o)){if(e.slice(l).search(o)){var c,d=u;for(o.global||(o=ke(o.source,ys(me.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var h=c.index;u=u.slice(0,h===i?l:h)}}else if(e.indexOf(ui(o),l)!=l){var f=u.lastIndexOf(o);f>-1&&(u=u.slice(0,f))}return u+r},zn.unescape=function(e){return(e=ys(e))&&K.test(e)?e.replace(Y,vn):e},zn.uniqueId=function(e){var t=++je;return ys(e)+t},zn.upperCase=Qs,zn.upperFirst=Ks,zn.each=ya,zn.eachRight=ba,zn.first=qo,sl(zn,function(){var e={};return xr(zn,function(t,n){Me.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:Yt(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=Kr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Or(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(Ma(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)},xr(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,u=s[0],c=l||Wa(t),d=function(e){var t=o.apply(zn,jt([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=l&&!f;if(!a&&c){t=m?t:new Wn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:i}),new Vn(g,h)}return p&&m?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=Oe[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)})}}),xr(Wn.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";Me.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:t,func:n})}}),Fn[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 Un;){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 Vn(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}();mt._=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,u=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)?u(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},2426:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},B={};function z(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(B[e]=i),t&&(B[t[0]]=function(){return M(i.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function H(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,n,r=e.match(j);for(t=0,n=r.length;t=0&&L.test(e);)e=e.replace(L,r),L.lastIndex=0,n-=1;return e}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(j).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var $="Invalid date";function Y(){return this._invalidDate}var Q="%d",K=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var i=this._relativeTime[n];return A(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)s(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function oe(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var ae,se=/\d/,le=/\d\d/,ue=/\d{3}/,ce=/\d{4}/,de=/[+-]?\d{6}/,he=/\d\d?/,fe=/\d\d\d\d?/,pe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ye=/\d+/,be=/[+-]?\d+/,xe=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,_e=/[+-]?\d+(\.\d{1,3})?/,Se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ce=/^[1-9]\d?/,De=/^([1-9]\d|\d)/;function Ee(e,t,n){ae[e]=A(t)?t:function(e,r){return e&&n?n:t}}function ke(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Te(e))}function Te(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Oe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Oe(t)),n}ae={};var Re={};function Pe(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=Fe(e)}),r=e.length,n=0;n68?1900:2e3)};var $e,Ye=Ke("FullYear",!0);function Qe(){return je(this.year())}function Ke(e,t){return function(n){return null!=n?(Ze(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ze(e,t,n){var r,i,o,a,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,a=e.month(),s=29!==(s=e.date())||1!==a||je(o)?s:28,i?r.setUTCFullYear(o,a,s):r.setFullYear(o,a,s)}}function Je(e){return A(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,r=oe(e=re(e)),i=r.length;for(n=0;n=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+xt(e,r,i);return s<=0?a=qe(o=e-1)+s:s>qe(e)?(o=e+1,a=s-qe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function _t(e,t,n){var r,i,o=xt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+St(i=e.year()-1,t,n):a>St(e.year(),t,n)?(r=a-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function St(e,t,n){var r=xt(e,t,n),i=xt(e+1,t,n);return(qe(e)-r+i)/7}function Ct(e){return _t(e,this._week.dow,this._week.doy).week}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),Ee("w",he,Ce),Ee("ww",he,le),Ee("W",he,Ce),Ee("WW",he,le),Ie(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Fe(e)});var Dt={dow:0,doy:6};function Et(){return this._week.dow}function kt(){return this._week.doy}function Tt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ft(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),Ee("d",he),Ee("e",he),Ee("E",he),Ee("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ee("dddd",function(e,t){return t.weekdaysRegex(e)}),Ie(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),Ie(["d","e","E"],function(e,t,n,r){t[r]=Fe(e)});var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jt=Se,Lt=Se,Nt=Se;function Bt(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function zt(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ht(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=$e.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=$e.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=$e.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=$e.call(this._weekdaysParse,a))||-1!==(i=$e.call(this._shortWeekdaysParse,a))||-1!==(i=$e.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=$e.call(this._shortWeekdaysParse,a))||-1!==(i=$e.call(this._weekdaysParse,a))||-1!==(i=$e.call(this._minWeekdaysParse,a))?i:null:-1!==(i=$e.call(this._minWeekdaysParse,a))||-1!==(i=$e.call(this._weekdaysParse,a))||-1!==(i=$e.call(this._shortWeekdaysParse,a))?i:null}function Vt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ut.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ft(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Lt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=Ae(this.weekdaysMin(n,"")),i=Ae(this.weekdaysShort(n,"")),o=Ae(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);a.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Jt(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Xt),z("k",["kk",2],0,Zt),z("hmm",0,0,function(){return""+Xt.apply(this)+M(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Xt.apply(this)+M(this.minutes(),2)+M(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+M(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+M(this.minutes(),2)+M(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ee("a",en),Ee("A",en),Ee("H",he,De),Ee("h",he,Ce),Ee("k",he,Ce),Ee("HH",he,le),Ee("hh",he,le),Ee("kk",he,le),Ee("hmm",fe),Ee("hmmss",pe),Ee("Hmm",fe),Ee("Hmmss",pe),Pe(["H","HH"],ze),Pe(["k","kk"],function(e,t,n){var r=Fe(e);t[ze]=24===r?0:r}),Pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Pe(["h","hh"],function(e,t,n){t[ze]=Fe(e),g(n).bigHour=!0}),Pe("hmm",function(e,t,n){var r=e.length-2;t[ze]=Fe(e.substr(0,r)),t[He]=Fe(e.substr(r)),g(n).bigHour=!0}),Pe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=Fe(e.substr(0,r)),t[He]=Fe(e.substr(r,2)),t[Ue]=Fe(e.substr(i)),g(n).bigHour=!0}),Pe("Hmm",function(e,t,n){var r=e.length-2;t[ze]=Fe(e.substr(0,r)),t[He]=Fe(e.substr(r))}),Pe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=Fe(e.substr(0,r)),t[He]=Fe(e.substr(r,2)),t[Ue]=Fe(e.substr(i))});var nn=/[ap]\.?m?\.?/i,rn=Ke("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:P,longDateFormat:G,invalidDate:$,ordinal:Q,dayOfMonthOrdinalParse:K,relativeTime:Z,months:rt,monthsShort:it,week:Dt,weekdays:Pt,weekdaysMin:Mt,weekdaysShort:It,meridiemParse:nn},ln={},un={};function cn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=pn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&cn(i,n)>=t-1)break;t--}o++}return an}function fn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function pn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=an._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),mn(n)}catch(r){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=u(t)?yn(e):gn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new R(F(r,t)),un[e]&&un[e].forEach(function(e){gn(e.name,e.config)}),mn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(F(ln[e]._config,t)):(null!=(r=pn(e))&&(i=r._config),t=F(i,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(t=pn(e))return t;e=[e]}return hn(e)}function bn(){return E(ln)}function xn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Ne]<0||n[Ne]>11?Ne:n[Be]<1||n[Be]>nt(n[Le],n[Ne])?Be:n[ze]<0||n[ze]>24||24===n[ze]&&(0!==n[He]||0!==n[Ue]||0!==n[Ve])?ze:n[He]<0||n[He]>59?He:n[Ue]<0||n[Ue]>59?Ue:n[Ve]<0||n[Ve]>999?Ve:-1,g(e)._overflowDayOfYear&&(tBe)&&(t=Be),g(e)._overflowWeeks&&-1===t&&(t=We),g(e)._overflowWeekday&&-1===t&&(t=Ge),g(e).overflow=t),e}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_n=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Cn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Dn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,kn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function An(e){var t,n,r,i,o,a,s=e._i,l=wn.exec(s)||_n.exec(s),u=Cn.length,c=Dn.length;if(l){for(g(e).iso=!0,t=0,n=u;tqe(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(o,0,e._dayOfYear),e._a[Ne]=n.getUTCMonth(),e._a[Be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ze]&&0===e._a[He]&&0===e._a[Ue]&&0===e._a[Ve]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?bt:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function zn(e){var t,n,r,i,o,a,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=Ln(t.GG,e._a[Le],_t(Qn(),1,4).year),r=Ln(t.W,1),((i=Ln(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=_t(Qn(),o,a),n=Ln(t.gg,e._a[Le],u.year),r=Ln(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>St(n,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=wt(n,r,i,o,a),e._a[Le]=s.year,e._dayOfYear=s.dayOfYear)}function Hn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,o,a,s,l,u=""+e._i,c=u.length,d=0;for(l=(i=W(e._f,e._locale).match(j)||[]).length,t=0;t0&&g(e).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),d+=n.length),B[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Me(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-d,u.length>0&&g(e).unusedInput.push(u),e._a[ze]<=12&&!0===g(e).bigHour&&e._a[ze]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ze]=Un(e._locale,e._a[ze],e._meridiem),null!==(s=g(e).era)&&(e._a[Le]=e._locale.erasConvertYear(s,e._a[Le])),Bn(e),xn(e)}else Mn(e);else An(e)}function Un(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Vn(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()});function Zn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Qn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _r(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=qn(t))._a?(e=t._isUTC?p(t._a):Qn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC}function Dr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Tr(e,t){var n,r,i,o=e,a=null;return sr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Er.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:Fe(a[Be])*n,h:Fe(a[ze])*n,m:Fe(a[He])*n,s:Fe(a[Ue])*n,ms:Fe(lr(1e3*a[Ve]))*n}):(a=kr.exec(e))?(n="-"===a[1]?-1:1,o={y:Ar(a[2],n),M:Ar(a[3],n),w:Ar(a[4],n),d:Ar(a[5],n),h:Ar(a[6],n),m:Ar(a[7],n),s:Ar(a[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=Fr(Qn(o.from),Qn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Ar(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Or(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Fr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Or(e,t):((n=Or(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Pr(this,Tr(n,r),e),this}}function Pr(e,t,n,i){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(i=null==i||i,s&&ht(e,Xe(e,"Month")+s*n),a&&Ze(e,"Date",Xe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,a||s))}Tr.fn=ar.prototype,Tr.invalid=or;var Ir=Rr(1,"add"),Mr=Rr(-1,"subtract");function jr(e){return"string"===typeof e||e instanceof String}function Lr(e){return S(e)||d(e)||jr(e)||c(e)||Br(e)||Nr(e)||null===e||void 0===e}function Nr(e){var t,n,r=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=o.length;for(t=0;tn.valueOf():n.valueOf()9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(S(e)&&e.isValid()||Qn(e).isValid())?Tr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Qn(),e)}function ii(e,t){return this.isValid()&&(S(e)&&e.isValid()||Qn(e).isValid())?Tr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Qn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function li(){return this._locale}var ui=1e3,ci=60*ui,di=60*ci,hi=3506328*di;function fi(e,t){return(e%t+t)%t}function pi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hi:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ci),di);break;case"minute":t=this._d.valueOf(),t-=fi(t,ci);break;case"second":t=this._d.valueOf(),t-=fi(t,ui)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:pi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-fi(t+(this._isUTC?0:this.utcOffset()*ci),di)-1;break;case"minute":t=this._d.valueOf(),t+=ci-fi(t,ci)-1;break;case"second":t=this._d.valueOf(),t+=ui-fi(t,ui)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function bi(){return Math.floor(this.valueOf()/1e3)}function xi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Si(){return this.isValid()?this.toISOString():null}function Ci(){return v(this)}function Di(){return f({},g(this))}function Ei(){return g(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ti(e,t){var n,i,o,a=this._eras||yn("en")._eras;for(n=0,i=a.length;n=0)return l[r]}function Oi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Fi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(o=St(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=wt(e,t,n,r,i),a=bt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),Ee("N",Ni),Ee("NN",Ni),Ee("NNN",Ni),Ee("NNNN",Bi),Ee("NNNNN",zi),Pe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),Ee("y",ye),Ee("yy",ye),Ee("yyy",ye),Ee("yyyy",ye),Ee("yo",Hi),Pe(["y","yy","yyy","yyyy"],Le),Pe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Le]=n._locale.eraYearOrdinalParse(e,i):t[Le]=parseInt(e,10)}),z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Vi("gggg","weekYear"),Vi("ggggg","weekYear"),Vi("GGGG","isoWeekYear"),Vi("GGGGG","isoWeekYear"),Ee("G",be),Ee("g",be),Ee("GG",he,le),Ee("gg",he,le),Ee("GGGG",ge,ce),Ee("gggg",ge,ce),Ee("GGGGG",ve,de),Ee("ggggg",ve,de),Ie(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Fe(e)}),Ie(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),z("Q",0,"Qo","quarter"),Ee("Q",se),Pe("Q",function(e,t){t[Ne]=3*(Fe(e)-1)}),z("D",["DD",2],"Do","date"),Ee("D",he,Ce),Ee("DD",he,le),Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Pe(["D","DD"],Be),Pe("Do",function(e,t){t[Be]=Fe(e.match(he)[0])});var Ji=Ke("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}z("DDD",["DDDD",3],"DDDo","dayOfYear"),Ee("DDD",me),Ee("DDDD",ue),Pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Fe(e)}),z("m",["mm",2],0,"minute"),Ee("m",he,De),Ee("mm",he,le),Pe(["m","mm"],He);var to=Ke("Minutes",!1);z("s",["ss",2],0,"second"),Ee("s",he,De),Ee("ss",he,le),Pe(["s","ss"],Ue);var no,ro,io=Ke("Seconds",!1);for(z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ee("S",me,se),Ee("SS",me,le),Ee("SSS",me,ue),no="SSSS";no.length<=9;no+="S")Ee(no,ye);function oo(e,t){t[Ve]=Fe(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")Pe(no,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}ro=Ke("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var lo=_.prototype;function uo(e){return Qn(1e3*e)}function co(){return Qn.apply(null,arguments).parseZone()}function ho(e){return e}lo.add=Ir,lo.calendar=Ur,lo.clone=Vr,lo.diff=Kr,lo.endOf=vi,lo.format=ti,lo.from=ni,lo.fromNow=ri,lo.to=ii,lo.toNow=oi,lo.get=Je,lo.invalidAt=Ei,lo.isAfter=Wr,lo.isBefore=Gr,lo.isBetween=qr,lo.isSame=$r,lo.isSameOrAfter=Yr,lo.isSameOrBefore=Qr,lo.isValid=Ci,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Xn,lo.min=Kn,lo.parsingFlags=Di,lo.set=et,lo.startOf=gi,lo.subtract=Mr,lo.toArray=wi,lo.toObject=_i,lo.toDate=xi,lo.toISOString=Jr,lo.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=Si,lo.toString=Zr,lo.unix=bi,lo.valueOf=yi,lo.creationData=ki,lo.eraName=Fi,lo.eraNarrow=Ri,lo.eraAbbr=Pi,lo.eraYear=Ii,lo.year=Ye,lo.isLeapYear=Qe,lo.weekYear=Wi,lo.isoWeekYear=Gi,lo.quarter=lo.quarters=Zi,lo.month=ft,lo.daysInMonth=pt,lo.week=lo.weeks=Tt,lo.isoWeek=lo.isoWeeks=At,lo.weeksInYear=Yi,lo.weeksInWeekYear=Qi,lo.isoWeeksInYear=qi,lo.isoWeeksInISOWeekYear=$i,lo.date=Ji,lo.day=lo.days=Wt,lo.weekday=Gt,lo.isoWeekday=qt,lo.dayOfYear=eo,lo.hour=lo.hours=rn,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=ro,lo.utcOffset=mr,lo.utc=vr,lo.local=yr,lo.parseZone=br,lo.hasAlignedHourOffset=xr,lo.isDST=wr,lo.isLocal=Sr,lo.isUtcOffset=Cr,lo.isUtc=Dr,lo.isUTC=Dr,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=D("dates accessor is deprecated. Use date instead.",Ji),lo.months=D("months accessor is deprecated. Use month instead",ft),lo.years=D("years accessor is deprecated. Use year instead",Ye),lo.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_r);var fo=R.prototype;function po(e,t,n,r){var i=yn(),o=p().set(r,t);return i[n](o,e)}function mo(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=po(e,r,n,"month");return i}function go(e,t,n,r){"boolean"===typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=yn(),a=e?o._week.dow:0,s=[];if(null!=n)return po(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,r,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function bo(e,t,n){return go(e,t,n,"weekdays")}function xo(e,t,n){return go(e,t,n,"weekdaysShort")}function wo(e,t,n){return go(e,t,n,"weekdaysMin")}fo.calendar=I,fo.longDateFormat=q,fo.invalidDate=Y,fo.ordinal=X,fo.preparse=ho,fo.postformat=ho,fo.relativeTime=J,fo.pastFuture=ee,fo.set=O,fo.eras=Ti,fo.erasParse=Ai,fo.erasConvertYear=Oi,fo.erasAbbrRegex=ji,fo.erasNameRegex=Mi,fo.erasNarrowRegex=Li,fo.months=lt,fo.monthsShort=ut,fo.monthsParse=dt,fo.monthsRegex=gt,fo.monthsShortRegex=mt,fo.week=Ct,fo.firstDayOfYear=kt,fo.firstDayOfWeek=Et,fo.weekdays=Bt,fo.weekdaysMin=Ht,fo.weekdaysShort=zt,fo.weekdaysParse=Vt,fo.weekdaysRegex=$t,fo.weekdaysShortRegex=Yt,fo.weekdaysMinRegex=Qt,fo.isPM=tn,fo.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Fe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=D("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=D("moment.langData is deprecated. Use moment.localeData instead.",yn);var _o=Math.abs;function So(){var e=this._data;return this._milliseconds=_o(this._milliseconds),this._days=_o(this._days),this._months=_o(this._months),e.milliseconds=_o(e.milliseconds),e.seconds=_o(e.seconds),e.minutes=_o(e.minutes),e.hours=_o(e.hours),e.months=_o(e.months),e.years=_o(e.years),this}function Co(e,t,n,r){var i=Tr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Do(e,t){return Co(this,e,t,1)}function Eo(e,t){return Co(this,e,t,-1)}function ko(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*ko(Oo(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Oe(o/1e3),l.seconds=e%60,t=Oe(e/60),l.minutes=t%60,n=Oe(t/60),l.hours=n%24,a+=Oe(n/24),s+=i=Oe(Ao(a)),a-=ko(Oo(i)),r=Oe(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function Ao(e){return 4800*e/146097}function Oo(e){return 146097*e/4800}function Fo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ao(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Oo(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ro(e){return function(){return this.as(e)}}var Po=Ro("ms"),Io=Ro("s"),Mo=Ro("m"),jo=Ro("h"),Lo=Ro("d"),No=Ro("w"),Bo=Ro("M"),zo=Ro("Q"),Ho=Ro("y"),Uo=Po;function Vo(){return Tr(this)}function Wo(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Go(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Go("milliseconds"),$o=Go("seconds"),Yo=Go("minutes"),Qo=Go("hours"),Ko=Go("days"),Xo=Go("months"),Zo=Go("years");function Jo(){return Oe(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var i=Tr(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),u=ea(i.as("M")),c=ea(i.as("w")),d=ea(i.as("y")),h=o<=n.ss&&["s",o]||o0,h[4]=r,na.apply(null,h)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ra(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ua(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=sa(this._milliseconds)/1e3,u=sa(this._days),c=sa(this._months),d=this.asSeconds();return d?(e=Oe(l/60),t=Oe(e/60),l%=60,e%=60,n=Oe(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ca=ar.prototype;return ca.isValid=ir,ca.abs=So,ca.add=Do,ca.subtract=Eo,ca.as=Fo,ca.asMilliseconds=Po,ca.asSeconds=Io,ca.asMinutes=Mo,ca.asHours=jo,ca.asDays=Lo,ca.asWeeks=No,ca.asMonths=Bo,ca.asQuarters=zo,ca.asYears=Ho,ca.valueOf=Uo,ca._bubble=To,ca.clone=Vo,ca.get=Wo,ca.milliseconds=qo,ca.seconds=$o,ca.minutes=Yo,ca.hours=Qo,ca.days=Ko,ca.weeks=Jo,ca.months=Xo,ca.years=Zo,ca.humanize=aa,ca.toISOString=ua,ca.toString=ua,ca.toJSON=ua,ca.locale=ai,ca.localeData=li,ca.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ca.lang=si,z("X",0,0,"unix"),z("x",0,0,"valueOf"),Ee("x",be),Ee("X",_e),Pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),Pe("x",function(e,t,n){n._d=new Date(Fe(e))}),r.version="2.30.1",i(Qn),r.fn=lo,r.min=Jn,r.max=er,r.now=tr,r.utc=p,r.unix=uo,r.months=vo,r.isDate=d,r.locale=mn,r.invalid=y,r.duration=Tr,r.isMoment=S,r.weekdays=bo,r.parseZone=co,r.localeData=yn,r.isDuration=sr,r.monthsShort=yo,r.weekdaysMin=wo,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=xo,r.normalizeUnits=ne,r.relativeTimeRounding=ia,r.relativeTimeThreshold=oa,r.calendarFormat=Hr,r.prototype=lo,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},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),u=new t(512);function c(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:c,setter:function(e){var t=c(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