@vokril/ui-solid 0.9.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/{AttributeGrid-Bnn1w5XX.cjs → AttributeGrid-Bg88JYZI.cjs} +1 -1
- package/dist/{AttributeGrid-DJdW32LQ.js → AttributeGrid-BypjAajJ.js} +4 -4
- package/dist/{Button-BZWXPn8y.js → Button-Db6wMY-3.js} +2 -2
- package/dist/{Button-X8QR6llv.cjs → Button-d9jJBibg.cjs} +1 -1
- package/dist/CommandPalette-DeEImZ8D.cjs +2 -0
- package/dist/{CommandPalette-ZCFlLqrP.js → CommandPalette-yqvM9AuU.js} +1372 -1425
- package/dist/{CopyButton-D3dIRRnn.js → CopyButton-C93PFyYK.js} +1 -1
- package/dist/{CopyButton-3cX5MHAf.cjs → CopyButton-CXaZRU7b.cjs} +1 -1
- package/dist/{DateRangePicker-DHI3SNna.cjs → DateRangePicker-7t4JKCp1.cjs} +1 -1
- package/dist/{DateRangePicker-BcqoUao4.js → DateRangePicker-D-5rg3h1.js} +4 -4
- package/dist/{GuidedTour-c7XiyOmE.cjs → GuidedTour-C_Lxe1t_.cjs} +10 -10
- package/dist/{GuidedTour-B-BXe3ul.js → GuidedTour-lsljVkPL.js} +1489 -1487
- package/dist/{IconPicker-CXbFmJ3y.js → IconPicker-C3ZwWkB1.js} +4 -4
- package/dist/{IconPicker-9tjEtmqt.cjs → IconPicker-DPT-QfsC.cjs} +1 -1
- package/dist/{Input-BEnk4FCF.cjs → Input-Ca8fLm_s.cjs} +1 -1
- package/dist/{Input-PZ5wRvPx.js → Input-gq8EcQao.js} +1 -1
- package/dist/{Modal-CsiV55WW.js → Modal-C4l_yuY9.js} +3 -3
- package/dist/{Modal-DpDHzCWT.cjs → Modal-CJhd27dM.cjs} +1 -1
- package/dist/{PageSkeleton-CyTXvZYm.js → PageSkeleton-C95fXUUk.js} +56 -56
- package/dist/{PageSkeleton-DzKYTuNy.cjs → PageSkeleton-SYSL4Adl.cjs} +1 -1
- package/dist/{SearchableSelect-C6KL7e42.js → SearchableSelect-BpOD2_A-.js} +3 -3
- package/dist/{SearchableSelect-zT8XNpmt.cjs → SearchableSelect-MN5azo9r.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-CZmym2gV.js → StatusBarNotificationBell-B1bvE_SO.js} +45 -45
- package/dist/{StatusBarNotificationBell-DG8Pe6R-.cjs → StatusBarNotificationBell-Cqo6cZbO.cjs} +1 -1
- package/dist/{Stepper-BxXwbDq4.js → Stepper-BgDx1cPX.js} +1 -1
- package/dist/{Stepper-DoJFCfC7.cjs → Stepper-D7rXGxdg.cjs} +1 -1
- package/dist/{Textarea-BunKEY68.cjs → Textarea-BltpSavs.cjs} +1 -1
- package/dist/{Textarea-BUxibzkR.js → Textarea-BueHsjOk.js} +1 -1
- package/dist/{TimeSeriesChart-DBrDzBGE.js → TimeSeriesChart-C3o7NZPh.js} +1 -1
- package/dist/{TimeSeriesChart-CS4jQflv.cjs → TimeSeriesChart-DhYtrAgX.cjs} +1 -1
- package/dist/{ToggleButton-Bjxv8KGH.cjs → ToggleButton-BmwDfsn4.cjs} +1 -1
- package/dist/{ToggleButton-BfjXnp-P.js → ToggleButton-DCP7f6Uo.js} +6 -6
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.cts +23 -14
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.ts +23 -14
- package/dist/_internal/platform/a11y/announcerService.d.cts +9 -13
- package/dist/_internal/platform/a11y/announcerService.d.ts +9 -13
- package/dist/_internal/platform/settings/settingsTypes.d.cts +0 -5
- package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -5
- package/dist/a11y/index.cjs +1 -1
- package/dist/a11y/index.js +1 -1
- package/dist/{catalogNotify-CIhFuJ1b.js → catalogNotify-BcY9oqVy.js} +287 -274
- package/dist/catalogNotify-DacJjC-p.cjs +27 -0
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{createResizableSidebar-pDoO-7q9.cjs → createResizableSidebar-BIhyo5zN.cjs} +1 -1
- package/dist/{createResizableSidebar-2TgiFZp1.js → createResizableSidebar-Cqv-1IXG.js} +6 -6
- package/dist/{server/defineSettings-By5ell8e.js → defineSettings-CcYXt2Jf.js} +1 -1
- package/dist/{defineSettings-DRv1FRbv.cjs → defineSettings-yHQdUwxI.cjs} +1 -1
- package/dist/{descriptor-B1MaujhY.js → descriptor-CrCl515S.js} +2 -2
- package/dist/{descriptor-lw1fA9mi.cjs → descriptor-Dmch-3AF.cjs} +1 -1
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +5 -5
- package/dist/{displayOwner-BNw2Foa_.cjs → displayOwner-eYQHHvjt.cjs} +1 -1
- package/dist/{server/displayOwner-B_ezJv-O.js → displayOwner-mT80Oyi-.js} +1 -1
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +3 -3
- package/dist/focusModality-BNjYldd9.cjs +1 -0
- package/dist/focusModality-DxudpWPs.js +135 -0
- package/dist/{format-UGlMj0HW.js → format-BS7oDguE.js} +3 -3
- package/dist/{format-Dih0q9gm.cjs → format-CuANkXXB.cjs} +1 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/{server/headerIconOverrides-BCzeaBA1.js → headerIconOverrides-B7TQUBmD.js} +1 -1
- package/dist/{headerIconOverrides-64lFnqTt.cjs → headerIconOverrides-DY3BTuca.cjs} +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.d.cts +1 -0
- package/dist/host/index.d.ts +1 -0
- package/dist/host/index.js +94 -91
- package/dist/host/kitHost.d.cts +23 -0
- package/dist/host/kitHost.d.ts +23 -0
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{i18n-CYq-dVvv.js → i18n-D9k9xwuD.js} +1 -1
- package/dist/{i18n-B9ccWgcR.cjs → i18n-DXXArz-m.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1049 -995
- package/dist/kitHost-BfJExE1G.cjs +1 -0
- package/dist/kitHost-CVAEi9sF.js +23 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/{mainRealmDom-DijAgSXt.cjs → mainRealmDom-CkoRyNhZ.cjs} +1 -1
- package/dist/{mainRealmDom-COGBiX78.js → mainRealmDom-kEStLHIY.js} +1 -1
- package/dist/{menuFavorites-Db1DpHX6.js → menuFavorites-BmdM_qV5.js} +1 -1
- package/dist/{menuFavorites-EluLLTfi.cjs → menuFavorites-DoDFvtlQ.cjs} +1 -1
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/{notification-DFbp3S_f.js → notification-CpDYN_iu.js} +1 -1
- package/dist/{notification-CrxHMXsk.cjs → notification-DygvQB_o.cjs} +1 -1
- package/dist/{notificationSuppressions-DFbFpayS.cjs → notificationSuppressions-DGfo2QKG.cjs} +1 -1
- package/dist/{notificationSuppressions-CBIJ4bC4.js → notificationSuppressions-ddyK85cB.js} +2 -2
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +83 -77
- package/dist/overlay/ConfirmDialog.d.cts +22 -4
- package/dist/overlay/ConfirmDialog.d.ts +22 -4
- package/dist/overlay/DangerousActionDialog.d.cts +2 -2
- package/dist/overlay/DangerousActionDialog.d.ts +2 -2
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +38 -38
- package/dist/{server/preferencesCache-BhUd3K9p.js → preferencesCache-Bow6TxP1.js} +1 -1
- package/dist/{preferencesCache-DJPCTPYx.cjs → preferencesCache-D7mm43_n.cjs} +1 -1
- package/dist/rendererLogging-Dt5FZ8mq.cjs +7 -0
- package/dist/{rendererLogging-Edo4ALXU.js → rendererLogging-gAhiHWkA.js} +65 -65
- package/dist/server/{AttributeGrid-BVAQshm3.cjs → AttributeGrid-CyMsR4GC.cjs} +1 -1
- package/dist/server/{AttributeGrid-BCYNwNjw.js → AttributeGrid-UJtHTip2.js} +3 -3
- package/dist/server/{Button-BhqhjFpY.js → Button-BesBg6eW.js} +1 -1
- package/dist/server/{Button-CFOM8pOv.cjs → Button-PZulLru4.cjs} +1 -1
- package/dist/server/CommandPalette-C8treS8g.cjs +1 -0
- package/dist/server/CommandPalette-Dslsq5Ez.js +3155 -0
- package/dist/server/{CopyButton-C2jzn9tR.cjs → CopyButton-D_sN2Ggp.cjs} +1 -1
- package/dist/server/{CopyButton-CChDa2p3.js → CopyButton-I5xsXV07.js} +1 -1
- package/dist/server/{DateRangePicker-sX2m4194.cjs → DateRangePicker-CDKi9BAf.cjs} +1 -1
- package/dist/server/{DateRangePicker-QV6U1adB.js → DateRangePicker-DGUl2aE3.js} +3 -3
- package/dist/server/GuidedTour-B3T9rAPX.cjs +20 -0
- package/dist/server/{GuidedTour-BhJGkoPa.js → GuidedTour-DSoSZZby.js} +1559 -1557
- package/dist/server/{IconPicker-BEACrT09.cjs → IconPicker-BlD0VBca.cjs} +1 -1
- package/dist/server/{IconPicker-at_coEi6.js → IconPicker-o8hUxjYU.js} +4 -4
- package/dist/server/{Modal-CAVr4DU6.cjs → Modal-CCUwQYso.cjs} +1 -1
- package/dist/server/{Modal-usxkqDtK.js → Modal-DmF6CwfY.js} +2 -2
- package/dist/server/{PageSkeleton-Bpgep9QW.js → PageSkeleton-BigztY5i.js} +21 -21
- package/dist/server/{PageSkeleton-KwYRrZua.cjs → PageSkeleton-DdpXfZoC.cjs} +1 -1
- package/dist/server/{SearchableSelect-0dP7bp0a.js → SearchableSelect-Dn-cssWx.js} +2 -2
- package/dist/server/{SearchableSelect-nMecJAYS.cjs → SearchableSelect-R0Dwz9rz.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-C9MCuKT6.js → StatusBarNotificationBell-C64Odn2C.js} +169 -169
- package/dist/server/{StatusBarNotificationBell-BJyGqDCX.cjs → StatusBarNotificationBell-DY0Q27su.cjs} +1 -1
- package/dist/server/{Stepper-B8hDDujj.js → Stepper-BaQ6Kexj.js} +1 -1
- package/dist/server/{Stepper-DvoJXLcM.cjs → Stepper-dBm8YaCw.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-C1LbL_xp.js → TimeSeriesChart-BbbfDyeA.js} +1 -1
- package/dist/server/{TimeSeriesChart-DtldQrxS.cjs → TimeSeriesChart-qPgMkkaW.cjs} +1 -1
- package/dist/server/{ToggleButton-DTI2HB97.cjs → ToggleButton-1bNYk35x.cjs} +1 -1
- package/dist/server/{ToggleButton--G4HCOTD.js → ToggleButton-C0_QpslP.js} +4 -4
- package/dist/server/a11y/index.cjs +1 -1
- package/dist/server/a11y/index.js +1 -1
- package/dist/server/catalogNotify-MCW2sa2e.cjs +27 -0
- package/dist/server/{catalogNotify-mUcKuUmZ.js → catalogNotify-s3YymAe8.js} +289 -276
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{createResizableSidebar-CCrAgu_K.js → createResizableSidebar-MIzUlfdd.js} +5 -5
- package/dist/server/{createResizableSidebar-DGd-3PrM.cjs → createResizableSidebar-TdxLuiY8.cjs} +1 -1
- package/dist/{defineSettings-By5ell8e.js → server/defineSettings-CcYXt2Jf.js} +1 -1
- package/dist/server/{defineSettings-DRv1FRbv.cjs → defineSettings-yHQdUwxI.cjs} +1 -1
- package/dist/server/{descriptor-IJq9wdXK.cjs → descriptor-DAyyoF-I.cjs} +1 -1
- package/dist/server/{descriptor-DWkJAggS.js → descriptor-DtZDXBe6.js} +2 -2
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +4 -4
- package/dist/server/{displayOwner-BNw2Foa_.cjs → displayOwner-eYQHHvjt.cjs} +1 -1
- package/dist/{displayOwner-B_ezJv-O.js → server/displayOwner-mT80Oyi-.js} +1 -1
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +2 -2
- package/dist/server/{focusModality-DmOZptla.js → focusModality-BCX5GH0P.js} +31 -29
- package/dist/server/focusModality-BKgJWRlC.cjs +1 -0
- package/dist/server/{format-CW_FVfq2.js → format-CYCi8g4r.js} +1 -1
- package/dist/server/{format-x-8syaS2.cjs → format-WfZycMBL.cjs} +1 -1
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/{headerIconOverrides-BCzeaBA1.js → server/headerIconOverrides-B7TQUBmD.js} +1 -1
- package/dist/server/{headerIconOverrides-64lFnqTt.cjs → headerIconOverrides-DY3BTuca.cjs} +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +94 -91
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/server/{i18n-CYq-dVvv.js → i18n-D9k9xwuD.js} +1 -1
- package/dist/server/{i18n-B9ccWgcR.cjs → i18n-DXXArz-m.cjs} +1 -1
- package/dist/server/{index-BFT4Uh9D.js → index-B4epvfiq.js} +1 -1
- package/dist/server/{index-Xlas73iC.cjs → index-DlQYWckZ.cjs} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1026 -972
- package/dist/server/kitHost-BfJExE1G.cjs +1 -0
- package/dist/server/kitHost-CVAEi9sF.js +23 -0
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/{menuFavorites-Db1DpHX6.js → menuFavorites-BmdM_qV5.js} +1 -1
- package/dist/server/{menuFavorites-EluLLTfi.cjs → menuFavorites-DoDFvtlQ.cjs} +1 -1
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/{notification-DFbp3S_f.js → notification-CpDYN_iu.js} +1 -1
- package/dist/server/{notification-CrxHMXsk.cjs → notification-DygvQB_o.cjs} +1 -1
- package/dist/server/{notificationSuppressions-DkrUMXHx.js → notificationSuppressions-B-LKq9ZU.js} +2 -2
- package/dist/server/{notificationSuppressions-D7FZmJy8.cjs → notificationSuppressions-Dcc2WFBZ.cjs} +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +81 -75
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +27 -27
- package/dist/{preferencesCache-BhUd3K9p.js → server/preferencesCache-Bow6TxP1.js} +1 -1
- package/dist/server/{preferencesCache-DJPCTPYx.cjs → preferencesCache-D7mm43_n.cjs} +1 -1
- package/dist/server/rendererLogging-Dt5FZ8mq.cjs +7 -0
- package/dist/server/{rendererLogging-Edo4ALXU.js → rendererLogging-gAhiHWkA.js} +65 -65
- package/dist/server/settings/index.cjs +1 -1
- package/dist/server/settings/index.js +3 -3
- package/dist/server/{settingsSearchContributor-DeMn-njw.js → settingsSearchContributor-CRZsl2Q_.js} +2 -2
- package/dist/server/{settingsSearchContributor-DZj7Wc8l.cjs → settingsSearchContributor-DH8UFpp2.cjs} +1 -1
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +3 -3
- package/dist/{settingsSearchContributor-C-UJc7Xc.js → settingsSearchContributor-DWP5dwn3.js} +2 -2
- package/dist/{settingsSearchContributor-Du0SDpJt.cjs → settingsSearchContributor-Dltbs1j_.cjs} +1 -1
- package/dist/solid/_internal/app/settings/secrets/notificationSecrets.js +20 -28
- package/dist/solid/_internal/platform/a11y/announcerService.js +0 -24
- package/dist/solid/a11y/AriaAnnouncer.jsx +4 -4
- package/dist/solid/host/index.js +1 -0
- package/dist/solid/host/kitHost.jsx +15 -0
- package/dist/solid/notifications/NotificationItem.jsx +4 -3
- package/dist/solid/notifications/emailDigest.js +2 -2
- package/dist/solid/notifications/index.js +1 -0
- package/dist/solid/notifications/webhookDelivery.js +2 -2
- package/dist/solid/overlay/ConfirmDialog.jsx +1 -21
- package/dist/style.css +1 -1
- package/dist/{tooltipCoordinator-y5YP3tsJ.cjs → tooltipCoordinator-Causlcgt.cjs} +1 -1
- package/dist/{tooltipCoordinator-GV0L9lXH.js → tooltipCoordinator-Zim5pWzk.js} +1 -1
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-DToM9pUp.cjs +0 -2
- package/dist/_internal/platform/instantiation/common/descriptors.d.cts +0 -9
- package/dist/_internal/platform/instantiation/common/descriptors.d.ts +0 -9
- package/dist/_internal/platform/instantiation/common/instantiation.d.cts +0 -99
- package/dist/_internal/platform/instantiation/common/instantiation.d.ts +0 -99
- package/dist/_internal/platform/instantiation/common/serviceCollection.d.cts +0 -8
- package/dist/_internal/platform/instantiation/common/serviceCollection.d.ts +0 -8
- package/dist/announcerService-B7yicxvU.js +0 -97
- package/dist/announcerService-D_pFE24a.cjs +0 -1
- package/dist/catalogNotify-C9RzbC6x.cjs +0 -27
- package/dist/focusModality-B150daiS.js +0 -133
- package/dist/focusModality-PPfeW05D.cjs +0 -1
- package/dist/rendererLogging-B4XML4_G.cjs +0 -7
- package/dist/server/CommandPalette-C3Bw1teR.cjs +0 -1
- package/dist/server/CommandPalette-S7tfmFMb.js +0 -3208
- package/dist/server/GuidedTour-Dx0endYh.cjs +0 -20
- package/dist/server/announcerService-B7yicxvU.js +0 -97
- package/dist/server/announcerService-D_pFE24a.cjs +0 -1
- package/dist/server/catalogNotify-BPPTINme.cjs +0 -27
- package/dist/server/focusModality-CeTPyRiF.cjs +0 -1
- package/dist/server/rendererLogging-B4XML4_G.cjs +0 -7
- package/dist/solid/_internal/platform/instantiation/common/descriptors.js +0 -10
- package/dist/solid/_internal/platform/instantiation/common/instantiation.js +0 -35
- package/dist/solid/_internal/platform/instantiation/common/serviceCollection.js +0 -14
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty;
|
|
2
|
-
var T = (i, e, t) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
-
var n = (i, e, t) => T(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { B as D } from "./bugIndicatingError-h3J5qkL6.js";
|
|
5
|
-
import { E as h } from "./rendererLogging-Edo4ALXU.js";
|
|
6
|
-
var r;
|
|
7
|
-
((i) => {
|
|
8
|
-
i.serviceIds = /* @__PURE__ */ new Map(), i.DI_TARGET = "$di$target", i.DI_DEPENDENCIES = "$di$dependencies";
|
|
9
|
-
function e(t) {
|
|
10
|
-
return t[i.DI_DEPENDENCIES] || [];
|
|
11
|
-
}
|
|
12
|
-
i.getServiceDependencies = e;
|
|
13
|
-
})(r || (r = {}));
|
|
14
|
-
v("instantiationService");
|
|
15
|
-
function E(i, e, t) {
|
|
16
|
-
e[r.DI_TARGET] === e ? e[r.DI_DEPENDENCIES].push({ id: i, index: t }) : (e[r.DI_DEPENDENCIES] = [{ id: i, index: t }], e[r.DI_TARGET] = e);
|
|
17
|
-
}
|
|
18
|
-
function v(i) {
|
|
19
|
-
if (r.serviceIds.has(i))
|
|
20
|
-
return r.serviceIds.get(i);
|
|
21
|
-
const e = function(t, u, s) {
|
|
22
|
-
if (arguments.length !== 3)
|
|
23
|
-
throw new D("@IServiceName-decorator can only be used to decorate a parameter");
|
|
24
|
-
E(e, t, s);
|
|
25
|
-
};
|
|
26
|
-
return e.toString = () => i, r.serviceIds.set(i, e), e;
|
|
27
|
-
}
|
|
28
|
-
const C = v("announcerService");
|
|
29
|
-
class A {
|
|
30
|
-
constructor() {
|
|
31
|
-
n(this, "_onDidAnnounce", new h());
|
|
32
|
-
n(this, "onDidAnnounce", this._onDidAnnounce.event);
|
|
33
|
-
n(this, "_onDidClear", new h());
|
|
34
|
-
n(this, "onDidClear", this._onDidClear.event);
|
|
35
|
-
n(this, "_latestPolite", "");
|
|
36
|
-
n(this, "_latestAssertive", "");
|
|
37
|
-
n(this, "_clearTimers", {});
|
|
38
|
-
}
|
|
39
|
-
announce(e, t, u) {
|
|
40
|
-
let s = "polite", o = u;
|
|
41
|
-
typeof t == "string" ? s = t : typeof t == "object" && t !== null && (o = t, o.politeness && (s = o.politeness));
|
|
42
|
-
const c = e.trim();
|
|
43
|
-
if (!c) return;
|
|
44
|
-
let l = c;
|
|
45
|
-
const _ = s === "assertive" ? this._latestAssertive : this._latestPolite;
|
|
46
|
-
_ === c ? l = `${c}` : _ === `${c}` && (l = c), s === "assertive" ? this._latestAssertive = l : this._latestPolite = l;
|
|
47
|
-
const f = {
|
|
48
|
-
id: `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`,
|
|
49
|
-
message: l,
|
|
50
|
-
politeness: s,
|
|
51
|
-
timestamp: Date.now()
|
|
52
|
-
};
|
|
53
|
-
this._onDidAnnounce.fire(f);
|
|
54
|
-
const m = (o == null ? void 0 : o.timeoutMs) ?? 7e3;
|
|
55
|
-
m > 0 && (this._clearTimers[s] && clearTimeout(this._clearTimers[s]), this._clearTimers[s] = setTimeout(() => {
|
|
56
|
-
this.clear(s);
|
|
57
|
-
}, m));
|
|
58
|
-
}
|
|
59
|
-
polite(e, t) {
|
|
60
|
-
this.announce(e, "polite", t);
|
|
61
|
-
}
|
|
62
|
-
assertive(e, t) {
|
|
63
|
-
this.announce(e, "assertive", t);
|
|
64
|
-
}
|
|
65
|
-
clear(e) {
|
|
66
|
-
e ? (this._clearTimers[e] && (clearTimeout(this._clearTimers[e]), this._clearTimers[e] = void 0), e === "polite" && (this._latestPolite = ""), e === "assertive" && (this._latestAssertive = ""), this._onDidClear.fire(e)) : (this._clearTimers.polite && (clearTimeout(this._clearTimers.polite), this._clearTimers.polite = void 0), this._clearTimers.assertive && (clearTimeout(this._clearTimers.assertive), this._clearTimers.assertive = void 0), this._latestPolite = "", this._latestAssertive = "", this._onDidClear.fire("all"));
|
|
67
|
-
}
|
|
68
|
-
getLatestAnnouncement(e) {
|
|
69
|
-
return e === "assertive" ? this._latestAssertive : this._latestPolite;
|
|
70
|
-
}
|
|
71
|
-
dispose() {
|
|
72
|
-
this._clearTimers.polite && (clearTimeout(this._clearTimers.polite), this._clearTimers.polite = void 0), this._clearTimers.assertive && (clearTimeout(this._clearTimers.assertive), this._clearTimers.assertive = void 0), this._onDidAnnounce.dispose(), this._onDidClear.dispose();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
let a;
|
|
76
|
-
function p() {
|
|
77
|
-
return a || (a = new A()), a;
|
|
78
|
-
}
|
|
79
|
-
function P(i) {
|
|
80
|
-
a && a !== i && a.dispose(), a = i;
|
|
81
|
-
}
|
|
82
|
-
function N() {
|
|
83
|
-
const i = p();
|
|
84
|
-
return {
|
|
85
|
-
announce: (e, t, u) => i.announce(e, t, u),
|
|
86
|
-
polite: (e, t) => i.polite(e, t),
|
|
87
|
-
assertive: (e, t) => i.assertive(e, t),
|
|
88
|
-
clear: (e) => i.clear(e)
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
A,
|
|
93
|
-
C as I,
|
|
94
|
-
p as g,
|
|
95
|
-
P as s,
|
|
96
|
-
N as u
|
|
97
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var A=(i,e,t)=>e in i?D(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>A(i,typeof e!="symbol"?e+"":e,t);const E=require("./bugIndicatingError-D2X5Hfgg.cjs"),h=require("./rendererLogging-B4XML4_G.cjs");var s;(i=>{i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})(s||(s={}));m("instantiationService");function S(i,e,t){e[s.DI_TARGET]===e?e[s.DI_DEPENDENCIES].push({id:i,index:t}):(e[s.DI_DEPENDENCIES]=[{id:i,index:t}],e[s.DI_TARGET]=e)}function m(i){if(s.serviceIds.has(i))return s.serviceIds.get(i);const e=function(t,u,r){if(arguments.length!==3)throw new E.BugIndicatingError("@IServiceName-decorator can only be used to decorate a parameter");S(e,t,r)};return e.toString=()=>i,s.serviceIds.set(i,e),e}const I=m("announcerService");class d{constructor(){n(this,"_onDidAnnounce",new h.Emitter);n(this,"onDidAnnounce",this._onDidAnnounce.event);n(this,"_onDidClear",new h.Emitter);n(this,"onDidClear",this._onDidClear.event);n(this,"_latestPolite","");n(this,"_latestAssertive","");n(this,"_clearTimers",{})}announce(e,t,u){let r="polite",o=u;typeof t=="string"?r=t:typeof t=="object"&&t!==null&&(o=t,o.politeness&&(r=o.politeness));const a=e.trim();if(!a)return;let l=a;const _=r==="assertive"?this._latestAssertive:this._latestPolite;_===a?l=`${a}`:_===`${a}`&&(l=a),r==="assertive"?this._latestAssertive=l:this._latestPolite=l;const T={id:`ann_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,message:l,politeness:r,timestamp:Date.now()};this._onDidAnnounce.fire(T);const v=(o==null?void 0:o.timeoutMs)??7e3;v>0&&(this._clearTimers[r]&&clearTimeout(this._clearTimers[r]),this._clearTimers[r]=setTimeout(()=>{this.clear(r)},v))}polite(e,t){this.announce(e,"polite",t)}assertive(e,t){this.announce(e,"assertive",t)}clear(e){e?(this._clearTimers[e]&&(clearTimeout(this._clearTimers[e]),this._clearTimers[e]=void 0),e==="polite"&&(this._latestPolite=""),e==="assertive"&&(this._latestAssertive=""),this._onDidClear.fire(e)):(this._clearTimers.polite&&(clearTimeout(this._clearTimers.polite),this._clearTimers.polite=void 0),this._clearTimers.assertive&&(clearTimeout(this._clearTimers.assertive),this._clearTimers.assertive=void 0),this._latestPolite="",this._latestAssertive="",this._onDidClear.fire("all"))}getLatestAnnouncement(e){return e==="assertive"?this._latestAssertive:this._latestPolite}dispose(){this._clearTimers.polite&&(clearTimeout(this._clearTimers.polite),this._clearTimers.polite=void 0),this._clearTimers.assertive&&(clearTimeout(this._clearTimers.assertive),this._clearTimers.assertive=void 0),this._onDidAnnounce.dispose(),this._onDidClear.dispose()}}let c;function f(){return c||(c=new d),c}function g(i){c&&c!==i&&c.dispose(),c=i}function p(){const i=f();return{announce:(e,t,u)=>i.announce(e,t,u),polite:(e,t)=>i.polite(e,t),assertive:(e,t)=>i.assertive(e,t),clear:e=>i.clear(e)}}exports.AnnouncerService=d;exports.IAnnouncerService=I;exports.getAnnouncerService=f;exports.setAnnouncerServiceForTest=g;exports.useAnnounce=p;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";const H=require("./bugIndicatingError-D2X5Hfgg.cjs"),b=require("./rendererLogging-B4XML4_G.cjs"),a=require("./notificationSuppressions-D7FZmJy8.cjs"),g=require("./notification-CrxHMXsk.cjs"),y=require("./i18n-B9ccWgcR.cjs"),le={info:{freq:660,ms:140},success:{freq:880,ms:180},warning:{freq:520,ms:220},error:{freq:320,ms:260}},$e={info:"soundOnInfo",success:"soundOnSuccess",warning:"soundOnWarning",error:"soundOnError"},Ie={info:"customSoundInfo",success:"customSoundSuccess",warning:"customSoundWarning",error:"customSoundError"};function de(t,e,r){if(!e[$e[t]]||e.quietHoursMutesSounds&&r)return null;const i=e[Ie[t]].trim();if(i)return{kind:"custom",path:i};const n=le[t];return{kind:"builtin",freq:n.freq,ms:n.ms}}const W=new Map,F=new Map;async function fe(t){const e=W.get(t);if(e)return e;let r=F.get(t);return r||(r=a.readAudioAsDataUrl(t).then(i=>(F.delete(t),i&&W.set(t,i),i)),F.set(t,r)),await r??void 0}function Oe(){W.clear(),F.clear()}const z=b.getLogger("NotificationAudio");let U=null,B=!1;function Ue(){if(B)return null;if(U)return U;try{const t=window.AudioContext??window.webkitAudioContext;return t?(U=new t,U):(B=!0,null)}catch(t){return B=!0,z.warn("AudioContext could not be created; notification sounds are off:",t),null}}async function Me(t){const e=await fe(t);if(e)try{const r=new Audio(e);r.volume=.6,await r.play()}catch(r){z.warn("Custom notification sound could not be played:",r)}}function ge(t=800,e=200){const r=Ue();if(r)try{const i=r.currentTime,n=r.createOscillator(),o=r.createGain();n.connect(o),o.connect(r.destination),n.frequency.value=t,o.gain.setValueAtTime(.3,i),o.gain.exponentialRampToValueAtTime(.01,i+e/1e3),n.start(i),n.stop(i+e/1e3)}catch(i){z.warn("Notification tone could not be played:",i)}}function me(){ge(800,200)}function ye(t,e){const r=de(t,g.notificationSettings.get(),e);if(r){if(r.kind==="custom"){Me(r.path);return}ge(r.freq,r.ms)}}let _=null;function qe(t){_=t}function ve(){return _!==null}function J(){if(_===null)throw new H.BugIndicatingError("[vendorErrors] read before a source was installed — the host must call installVendorErrorSource at startup.");return _}function V(t){const e=J().errorHelpersFor(t.vendorId);return e===null?null:{vendorId:t.vendorId,code:t.code,helpers:e}}function Fe(t,e,r){const i=J().errorHelpersFor(t);if(i===null)throw new H.BugIndicatingError(`[vendorErrors] unknown preview vendor: ${t}`);return{message:`${i.formatCode(e)}: ${r}`,vendorError:{vendorId:t,code:e}}}function Pe(t){return`https://www.google.com/search?q=${encodeURIComponent(t)}`}const pe=b.getLogger("NotificationTimeline");function _e(t){return t.vendorError===void 0?null:V(t.vendorError)}const He=200;let L=[];const Q=new Set;function D(){return[...L]}function $(t){const e=[...t].sort((s,c)=>c.createdAt-s.createdAt),r=e.filter(s=>s.pinned===!0),n=e.filter(s=>s.pinned!==!0).slice(0,Math.max(0,He-r.length));L=[...[...r].sort((s,c)=>(c.pinnedAt??c.createdAt)-(s.pinnedAt??s.createdAt)),...n];for(const s of Array.from(Q))try{s(L)}catch(c){pe.warn("Zaman cizelgesi dinleyicisi firlatti:",c)}}let R=0,O=0;const Y=new Set;function w(t,e,r="general",i="default",n,o){if(!t.trim())return;const s={id:`${Date.now()}-${Math.random().toString(36).slice(2,10)}`,message:b.scrubSecrets(t),tone:e,createdAt:Date.now(),source:r,priority:i,...n&&n.length>0?{actions:n}:{},...o?{vendorError:o}:{}};$([s,...D()]),R+=1,he()}function A(t){if(t)return[{label:t.label,onClick:t.onClick,primary:!0}]}function he(){const t=Math.max(0,R-O);for(const e of Array.from(Y))try{e(t)}catch(r){pe.warn("Okunmadi sayaci dinleyicisi firlatti:",r)}Se(t)}let j=-1;function Se(t){const e=g.notificationSettings.get(),r=e.badgeCountEnabled?Math.min(t,e.badgeCountMax):0;r!==j&&(j=r,a.setOsBadgeCount(r))}function Ve(){const t=Math.max(0,R-O);j=-1,Se(t)}function Ke(t){return Y.add(t),t(Math.max(0,R-O)),()=>{Y.delete(t)}}function Be(){O!==R&&(O=R,he())}function We(t){return Q.add(t),t(D()),()=>{Q.delete(t)}}function Le(){$([])}function Qe(t){const e=D().filter(r=>r.id!==t);$(e)}function Ye(t){if(t.length===0)return;const e=new Set(t),r=D().filter(i=>!e.has(i.id));$(r)}function je(t){if(!t)return;const e=D().filter(r=>r.source!==t);$(e)}function Xe(t){const r=D().map(i=>{if(i.id!==t)return i;const n=!i.pinned,{pinnedAt:o,...s}=i;return n?{...s,pinned:!0,pinnedAt:Date.now()}:{...s,pinned:!1}});$(r)}const P=new Map;function Ge(){P.clear()}function ze(t){if(P.has(t))return P.get(t)??null;let e;try{e=new RegExp(t,"i")}catch{e=null}return P.set(t,e),e}function Je(t,e){const r=t.conditions;if(r.source&&r.source!==e.source||r.severities&&r.severities.length>0&&!r.severities.includes(e.severity))return!1;if(r.titleRegex){const i=ze(r.titleRegex);if(!i||!i.test(e.title))return!1}return!0}function we(t,e){if(e.length===0)return t;let r={...t};for(const i of e)if(i.enabled&&Je(i,r)){if(i.actions.suppress===!0)return null;if(i.actions.setSeverity&&(r={...r,severity:i.actions.setSeverity}),i.actions.setPriority&&(r={...r,priority:i.actions.setPriority}),i.actions.addPrefix){const n=i.actions.addPrefix.trim();n&&(r={...r,title:`${n} ${r.title}`})}}return r}function oe(t){const e=/^(\d{1,2}):(\d{2})$/.exec(t.trim());if(!e)return null;const r=Number(e[1]),i=Number(e[2]);return r>23||i>59?null:r*60+i}function Z(t,e){if(!t.quietHoursEnabled||!t.quietHoursWeekdays.includes(e.getDay()))return!1;const r=oe(t.quietHoursStart),i=oe(t.quietHoursEnd);if(r===null||i===null||r===i)return!1;const n=e.getHours()*60+e.getMinutes();return r<i?n>=r&&n<i:n>=r||n<i}function Ze(t){return t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}const X={info:0,success:1,warning:2,error:3};function be(t,e){return e.osNativeEnabled?t.priority==="urgent"&&e.osNativeUrgentAlways?{fire:!0,onlyWhenUnfocused:!1}:X[t.severity]<X[e.osNativeMinSeverity]?{fire:!1,onlyWhenUnfocused:!1}:{fire:!0,onlyWhenUnfocused:e.osNativeOnlyWhenUnfocused}:{fire:!1,onlyWhenUnfocused:!1}}const et={"sql-execution":"sql",users:"users",tablespaces:"tablespaces",rss:"rss-feeds",locking:"locking",monitoring:"monitoring"};function tt(t,e){if(e)return e;if(t!==void 0)return et[t]}const rt="notification.emailDigestSmtpPass",it="notification.webhook.url.";function Ee(){const t=new Map;return{get:e=>Promise.resolve(t.get(e)),set:async(e,r)=>{t.set(e,r)},delete:async e=>{t.delete(e)},keys:async e=>[...t.keys()].filter(r=>r.startsWith(e))}}let ee=Ee();function nt(t){ee=t??Ee()}function ot(t){return`${it}${t}`}function st(){return ee.get(rt)}function ct(t){return ee.get(ot(t))}let Te="";function at(t){Te=t.trim()}function te(){return Te}const ut=b.getLogger("WebhookDelivery"),lt={info:"#007AB0",success:"#108846",warning:"#D27908",error:"#BE2E34"},dt={info:1668818,success:3046706,warning:16088064,error:12986408};function ft(t,e){const{severities:r,priorities:i,sources:n}=t.filters;return!(r.length>0&&!r.includes(e.severity)||i.length>0&&!i.includes(e.priority)||n.length>0&&!n.includes(e.source))}function gt(t,e){switch(t.type){case"slack":return{text:e.title,attachments:[{color:lt[e.severity],fields:[{title:"Source",value:e.source,short:!0},{title:"Severity",value:e.severity,short:!0},{title:"Priority",value:e.priority,short:!0}],text:e.body??""}]};case"discord":return{embeds:[{title:e.title,description:e.body??"",color:dt[e.severity],fields:[{name:"Source",value:e.source,inline:!0},{name:"Severity",value:e.severity,inline:!0},{name:"Priority",value:e.priority,inline:!0}]}]};case"generic":default:return{title:e.title,body:e.body??"",severity:e.severity,priority:e.priority,source:e.source,timestamp:Date.now()}}}async function mt(t,e,r){try{const i=JSON.stringify(gt(t,r));await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:i})}catch(i){ut.warn("Webhook delivery failed:",i)}}async function yt(t,e){const r=await ct(t.id)??"";r&&await mt(t,r,e)}function vt(t){const r=g.notificationSettings.get().webhooks.filter(i=>i.enabled&&ft(i,t));if(r.length!==0)for(const i of r)yt(i,t)}let G=null;function pt(t){G=t}const ht=b.getLogger("EmailDigest"),E=[],se=500,ce={info:0,success:1,warning:2,error:3};function St(t){const e=g.notificationSettings.get();e.emailDigestEnabled&&(ce[t.severity]<ce[e.emailDigestMinSeverity]||(E.push(t),E.length>se&&E.splice(0,E.length-se)))}const M=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");function wt(t){const e=te(),r=t.map(i=>`<tr>
|
|
2
|
-
<td style="padding:4px 8px">${new Date(i.at).toISOString().slice(11,19)}</td>
|
|
3
|
-
<td style="padding:4px 8px"><strong>${i.severity}</strong></td>
|
|
4
|
-
<td style="padding:4px 8px">${M(i.source)}</td>
|
|
5
|
-
<td style="padding:4px 8px">${M(i.title)}${i.body?`<br><small>${M(i.body)}</small>`:""}</td>
|
|
6
|
-
</tr>`).join(`
|
|
7
|
-
`);return`<!doctype html>
|
|
8
|
-
<html><body>
|
|
9
|
-
<h2>${e?`${M(e)} notification digest`:"Notification digest"}</h2>
|
|
10
|
-
<p>${t.length} notification(s) since the last digest.</p>
|
|
11
|
-
<table style="border-collapse:collapse">
|
|
12
|
-
<thead><tr style="background:#eee">
|
|
13
|
-
<th style="padding:4px 8px;text-align:left">Time (UTC)</th>
|
|
14
|
-
<th style="padding:4px 8px;text-align:left">Severity</th>
|
|
15
|
-
<th style="padding:4px 8px;text-align:left">Source</th>
|
|
16
|
-
<th style="padding:4px 8px;text-align:left">Message</th>
|
|
17
|
-
</tr></thead>
|
|
18
|
-
<tbody>
|
|
19
|
-
${r}
|
|
20
|
-
</tbody></table>
|
|
21
|
-
</body></html>`}function bt(t){const e=t.map(r=>`[${new Date(r.at).toISOString()}] ${r.severity.toUpperCase()} (${r.source}): ${r.title}${r.body?` — ${r.body}`:""}`);return`${t.length} notification(s):
|
|
22
|
-
|
|
23
|
-
${e.join(`
|
|
24
|
-
`)}`}function Et(t){switch(t.kind){case"disabled":return y.t("Email digest is turned off.");case"smtp-incomplete":return y.t("SMTP host, sender and recipient are required.");case"send-failed":return a.errorText(t.error,y.t("The digest could not be sent."))}}async function xe(){const t=g.notificationSettings.get();if(!t.emailDigestEnabled)return{kind:"not-sent",reason:{kind:"disabled"}};if(E.length===0)return{kind:"sent",count:0};if(!t.emailDigestSmtpHost||!t.emailDigestFrom||!t.emailDigestTo)return{kind:"not-sent",reason:{kind:"smtp-incomplete"}};const e=E.splice(0,E.length),r={sendEmailDigest:s=>G?G(s):Promise.reject(new Error("No email digest transport configured"))},i=te(),n=`${i?`[${i}] `:""}${e.length} notification(s)`,o=await st()??"";try{return await r.sendEmailDigest({smtp:{host:t.emailDigestSmtpHost,port:t.emailDigestSmtpPort,secure:t.emailDigestSmtpSecure,user:t.emailDigestSmtpUser,pass:o},from:t.emailDigestFrom,to:t.emailDigestTo,subject:n,html:wt(e),text:bt(e)}),{kind:"sent",count:e.length}}catch(s){return E.unshift(...e),{kind:"not-sent",reason:{kind:"send-failed",error:s}}}}let ae=0,ue=null;function Tt(t){const e=g.notificationSettings.get();if(!e.emailDigestEnabled)return!1;const r=t.getHours(),i=t.getMinutes(),n=t.getDay();switch(e.emailDigestSchedule){case"hourly":return i===0;case"daily-9am":return r===9&&i===0;case"daily-5pm":return r===17&&i===0;case"weekly-mon-9am":return n===1&&r===9&&i===0}}function xt(){ue===null&&(typeof window>"u"||(ue=window.setInterval(()=>{const t=new Date;if(!Tt(t))return;const e=Math.floor(t.getTime()/6e4);e!==ae&&(ae=e,xe().then(r=>{r.kind==="not-sent"&&r.reason.kind==="send-failed"&&ht.warn("scheduled email digest failed",r.reason.error)}))},6e4)))}function Ce(){return Z(g.notificationSettings.get(),new Date)}function k(t,e,r,i,n){const o=g.notificationSettings.get(),s=a.deriveImplicitRemindKey(t,e);return a.decideFilter({priority:r,recordTimeline:n},o,{dismissed:i!==void 0&&a.isKeyDismissed(i),remindSuppressed:i!==void 0&&a.isKeyRemindSuppressed(i)||a.isKeyRemindSuppressed(s),sourceMuted:a.isSourceMuted(t),inQuietHours:Ce()})}function Ct(t,e,r,i){return{label:t.label,primary:i,keepOpen:t.expireOnAction===!1,onClick:()=>{a.recordClick(r);try{t.onClick()}finally{const n=e();t.expireOnAction!==!1&&n&&a.closeNotification(n)}}}}function N(t){var S,m;const e=t.options.source??"general";if(a.recordFire(e,t.decision.showToast,a.isSourceMuted(e)),!t.decision.showToast)return null;ye(t.severity,Ce());const{options:r}=t,i=((S=r.subtitle)==null?void 0:S.trim())||((m=r.description)==null?void 0:m.trim()),n=r.id!==void 0?String(r.id):void 0,o=g.notificationSettings.get(),s=r.markdown??o.markdownEnabled,c=[...t.primaryAction?[t.primaryAction]:[],...r.actions??[]],l=tt(r.source,r.defaultRoute);let d=null;const u=a.notify({severity:t.severity,title:t.title,...i?{body:i}:{},...s?{markdown:!0}:{},source:r.source??"general",priority:r.priority??"default",...r.duration!==void 0?{durationMs:r.duration}:{},...r.dontShowAgainKey?{neverShowAgainKey:r.dontShowAgainKey}:{},...n?{id:n}:{},...r.icon?{icon:r.icon}:{},...l?{defaultRoute:l}:{},...t.vendorError?{vendorError:t.vendorError}:{},...c.length>0?{actions:c.map((T,I)=>Ct(T,()=>d==null?void 0:d.id,e,I===0))}:{}});if(d=u,a.isSpamDropHandle(u))return u;const h=b.scrubSecrets(t.title),p=i?b.scrubSecrets(i):void 0,f={title:h,...p?{body:p}:{},severity:t.severity,priority:r.priority??"default",source:r.source??"general"};return kt(f),vt(f),St({...f,at:Date.now()}),u}function kt(t){const e=be(t,g.notificationSettings.get());e.fire&&a.osNotify({title:t.title,...t.body?{body:t.body}:{},severity:t.severity,urgent:t.priority==="urgent",onlyWhenUnfocused:e.onlyWhenUnfocused})}function x(t){return typeof t=="string"?t:t instanceof Error?t.message:t==null?"":String(t)}function re(t,e,r,i=a.openExternal){var u,h,p;const n=x(t),o=(u=e.title)==null?void 0:u.trim(),s=((h=e.subtitle)==null?void 0:h.trim())||((p=e.description)==null?void 0:p.trim());let c=o??n,l=s;if(r&&!o){const f=r.helpers.formatCode(r.code),S=new RegExp(`^\\s*${Ze(f)}\\s*[:-]\\s*(.+)$`,"i"),m=n.match(S);if(m!=null&&m[1]){c=f;const T=m[1].trim();l=l?`${T}
|
|
25
|
-
|
|
26
|
-
${l}`:T}}let d=e.action;if(!d&&r){const f=r.helpers.docsUrl(r.code);f&&(d={label:`${r.helpers.formatCode(r.code)} ${r.helpers.docsLinkLabel}`,onClick:()=>i(f)})}return{text:n,displayText:c,bodyText:l,primaryAction:d}}function q(t){return we(t,g.notificationSettings.get().notificationRules)}const C={success(t,e={}){const r=x(t),i=g.notificationSettings.get(),n=e.source??"general",o=e.priority??"default",s=q({severity:"success",title:r,priority:o,source:n});if(!s)return"";const c=k(s.source,s.title,s.priority,e.dontShowAgainKey,e.recordTimeline);if(c.recordTimeline&&w(s.title,s.severity==="success"?"success":s.severity,s.source,s.priority,A(e.action)),!i.showSuccessToasts&&s.priority!=="urgent")return"";const l=N({severity:s.severity,title:s.title,options:{...e,source:s.source,priority:s.priority},decision:c,...e.action?{primaryAction:e.action}:{}});return(l==null?void 0:l.id)??""},error(t,e=!1){const r=x(t),i=typeof e=="boolean"?{}:e,n=i.vendorError===void 0?null:V(i.vendorError),o=re(r,i,n),s=n!==null;let c=o.displayText;const l=o.bodyText,d=l?`${c}
|
|
27
|
-
${l}`:r,u=i.source??(s?"vendor-error":"general"),h=s&&g.notificationSettings.get().vendorCodesAreUrgent,p=i.priority??(h?"urgent":"default"),f=q({severity:"error",title:c,priority:p,source:u});if(!f)return"";c=f.title;const S=f.source,m=f.priority,T=k(S,c,m,i.dontShowAgainKey,i.recordTimeline);T.recordTimeline&&w(d,f.severity,S,m,A(i.action),i.vendorError);const I=N({severity:f.severity,title:c,options:{...i,source:S,priority:m,...l?{description:l}:{}},decision:T,...o.primaryAction?{primaryAction:o.primaryAction}:{},...i.vendorError?{vendorError:i.vendorError}:{}});return(I==null?void 0:I.id)??""},info(t,e={}){const r=x(t),i=e.source??"general",n=e.priority??"default",o=q({severity:"info",title:r,priority:n,source:i});if(!o)return"";const s=k(o.source,o.title,o.priority,e.dontShowAgainKey,e.recordTimeline);s.recordTimeline&&w(o.title,o.severity,o.source,o.priority,A(e.action));const c=N({severity:o.severity,title:o.title,options:{...e,source:o.source,priority:o.priority},decision:s,...e.action?{primaryAction:e.action}:{}});return(c==null?void 0:c.id)??""},warning(t,e={}){const r=x(t),i=e.source??"general",n=e.priority??"default",o=q({severity:"warning",title:r,priority:n,source:i});if(!o)return"";const s=k(o.source,o.title,o.priority,e.dontShowAgainKey,e.recordTimeline);s.recordTimeline&&w(o.title,o.severity,o.source,o.priority,A(e.action));const c=N({severity:o.severity,title:o.title,options:{...e,source:o.source,priority:o.priority},decision:s,...e.action?{primaryAction:e.action}:{}});return(c==null?void 0:c.id)??""},queryCompleted(t,e={}){const r=x(t),i=g.notificationSettings.get(),n=e.source??"sql-execution",o=e.priority??"default",s=k(n,r,o,e.dontShowAgainKey,e.recordTimeline);if(s.recordTimeline&&w(r,"success",n,o,A(e.action)),i.notificationsEnabled&&i.soundOnQueryCompletion&&!(i.quietHoursMutesSounds&&Z(i,new Date))&&me(),!i.showSuccessToasts&&o!=="urgent")return"";const c=N({severity:"success",title:r,options:{...e,source:n,priority:o},decision:s,...e.action?{primaryAction:e.action}:{}});return(c==null?void 0:c.id)??""},progress(t,e={}){const r=x(t),i=e.onCancel,n=e.source??"general",o=e.priority??"default",s=k(n,r,o,e.dontShowAgainKey,e.recordTimeline);if(s.recordTimeline&&w(r,"info",n,o),!s.showToast)return{update:()=>{},success:()=>{},fail:()=>{},dismiss:()=>{}};const c=e.id!==void 0?String(e.id):`progress-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,l=a.notify({id:c,severity:"info",title:r,source:n,priority:o,sticky:!0,progress:i?{onCancel:i}:{}});return{update:(d,u)=>{l.update({title:d}),u!==void 0&&l.setProgress({value:Math.max(0,Math.min(1,u)),...i?{onCancel:i}:{}})},success:d=>{const u=d??r;s.recordTimeline&&w(u,"success",n,o),l.update({title:u,severity:"success",sticky:!1,progress:{done:!0}})},fail:d=>{const u=d??r;s.recordTimeline&&w(u,"error",n,o),l.update({title:u,severity:"error",sticky:!0,progress:{done:!0},durationMs:1/0})},dismiss:()=>l.close()}}};function v(t,e){return{...t,category:t.category??t.id.split(".")[0]??"general",build:e}}function At(t,e,r){return{id:t,notification:e,resolve:()=>e.build(r)}}function K(t,e){return{message:t,...e!=null&&e.title?{title:e.title}:{},...e!=null&&e.subtitle?{subtitle:e.subtitle}:{},...e!=null&&e.description?{description:e.description}:{},...e!=null&&e.action?{action:e.action}:{},...(e==null?void 0:e.duration)!==void 0?{duration:e.duration}:{},...e!=null&&e.dontShowAgainKey?{dontShowAgainKey:e.dontShowAgainKey}:{},...e!=null&&e.defaultRoute?{defaultRoute:e.defaultRoute}:{},...e!=null&&e.icon?{icon:e.icon}:{},...(e==null?void 0:e.markdown)!==void 0?{markdown:e.markdown}:{},...(e==null?void 0:e.recordTimeline)!==void 0?{recordTimeline:e.recordTimeline}:{},...(e==null?void 0:e.id)!==void 0?{id:e.id}:{},...e!=null&&e.onCancel?{onCancel:e.onCancel}:{}}}v({id:"notifications.copyToClipboard.success.1",source:"general",severity:"success",priority:"default",delivery:"in-app",kind:"message"},({successNotice:t})=>({message:t??y.t("Copied to clipboard.")}));v({id:"notifications.copyToClipboard.error.2",source:"general",severity:"error",priority:"default",delivery:"in-app",kind:"message"},()=>({message:y.t("Could not copy to clipboard.")}));const Nt=v({id:"notifications.timeline.replay.error",source:"general",severity:"error",priority:"urgent",delivery:"in-app",kind:"message"},({timelineMessage:t,options:e})=>K(t,e)),Rt=v({id:"notifications.timeline.replay.warning",source:"general",severity:"warning",priority:"urgent",delivery:"in-app",kind:"message"},({timelineMessage:t,options:e})=>K(t,e)),Dt=v({id:"notifications.timeline.replay.success",source:"general",severity:"success",priority:"urgent",delivery:"in-app",kind:"message"},({timelineMessage:t,options:e})=>K(t,e)),$t=v({id:"notifications.timeline.replay.info",source:"general",severity:"info",priority:"urgent",delivery:"in-app",kind:"message"},({timelineMessage:t,options:e})=>K(t,e)),It=v({id:"notifications.timeline.exported",source:"general",severity:"success",priority:"default",delivery:"in-app",kind:"message"},({entryCount:t})=>({message:y.t("Exported {count} notifications",{count:t})})),Ot=v({id:"notifications.timeline.export.failed",source:"general",severity:"error",priority:"default",delivery:"in-app",kind:"message"},({cause:t})=>({message:y.t("Export failed: {message}",{message:a.errorText(t,y.t("Operation failed."))}),cause:t})),Ut=v({id:"notifications.errorAction.failed",source:"general",severity:"error",priority:"default",delivery:"in-app",kind:"message"},({cause:t})=>({message:y.t("The action could not be completed: {message}",{message:a.errorText(t,y.t("Operation failed."))}),cause:t})),Mt=v({id:"notifications.settings.update.failed",source:"settings",severity:"error",priority:"default",delivery:"in-app",kind:"message"},({cause:t})=>({message:a.errorText(t,y.t("Operation failed.")),cause:t}));function ie(t){if(!("cause"in t))return t;const{cause:e,...r}=t,i=a.errorActions(e).map(qt);return i.length===0?r:{...r,actions:[...r.actions??[],...i]}}function qt(t){return{label:t.label,onClick:()=>{Promise.resolve().then(()=>t.run()).catch(e=>{De(Ut,{cause:e})})}}}function ke(t,e){return{...t.severity==="error"&&t.source==="general"?{}:{source:t.source},...t.severity==="error"&&t.priority==="default"?{}:{priority:t.priority},...e.subtitle?{subtitle:e.subtitle}:{},...e.description?{description:e.description}:{},...e.action?{action:e.action}:{},...e.actions?{actions:e.actions}:{},...e.duration!==void 0?{duration:e.duration}:{},...e.dontShowAgainKey?{dontShowAgainKey:e.dontShowAgainKey}:{},...e.defaultRoute?{defaultRoute:e.defaultRoute}:{},...e.icon?{icon:e.icon}:{},...e.markdown!==void 0?{markdown:e.markdown}:{},...e.recordTimeline!==void 0?{recordTimeline:e.recordTimeline}:{},...e.id!==void 0?{id:e.id}:{}}}function Ft(t,e){const r=ie(e);if(t.delivery==="os-only"){const n=r.title??r.message,o=r.description??r.subtitle??(r.title?r.message:void 0);return a.osNotify({title:n,...o?{body:o}:{},severity:t.severity,urgent:t.priority==="urgent",onlyWhenUnfocused:!1}),""}const i=ke(t,r);if(t.kind==="query-completed")return C.queryCompleted(r.message,i);switch(t.severity){case"success":return C.success(r.message,i);case"error":{const n={...i,...r.title?{title:r.title}:{},...r.vendorError?{vendorError:r.vendorError}:{}};return C.error(r.message,n)}case"warning":return C.warning(r.message,i);case"info":return C.info(r.message,i)}}function Pt(t,e){const r=ie(e);if(t.delivery!=="in-app")throw new H.BugIndicatingError("Progress notifications require an in-app catalog definition.");return C.progress(r.message,{...ke(t,r),...r.onCancel?{onCancel:r.onCancel}:{}})}const Ae={notify:Ft,progress:Pt,dismiss:t=>a.closeNotification(t)};function Ne(t,e,r,i){return t==="error"&&e==="default"&&r&&i?"urgent":e}function _t(t,e){var d;const r=e.vendorError===void 0||!ve()?null:V(e.vendorError),i=t.severity==="error"?re(e.message,{...e.title?{title:e.title}:{},...e.subtitle?{subtitle:e.subtitle}:{},...e.description?{description:e.description}:{},...e.action?{action:e.action}:{}},r,a.openExternal):null,n=(i==null?void 0:i.displayText)??e.title??e.message,o=(i==null?void 0:i.bodyText)??e.subtitle??e.description,s=(i==null?void 0:i.primaryAction)??e.action,c=t.severity==="error"&&t.source==="general"&&r!==null?"vendor-error":t.source,l=Ne(t.severity,t.priority,r!==null,g.notificationSettings.get().vendorCodesAreUrgent);return a.notify({severity:t.severity,title:b.scrubSecrets(n),...o?{body:b.scrubSecrets(o)}:{},source:c,priority:l,isolated:!0,...e.duration!==void 0?{durationMs:e.duration}:{},...e.id!==void 0?{id:`dev-preview:${e.id}`}:{},...e.icon?{icon:e.icon}:{},...e.markdown?{markdown:!0}:{},...t.kind==="progress"?{sticky:!0,progress:{done:!1}}:{},...s||(d=e.actions)!=null&&d.length?{actions:[s,...e.actions??[]].filter(u=>u!==void 0).map((u,h)=>({id:`dev-preview-action-${h}`,label:u.label,primary:h===0,onClick:()=>{var p;(p=u.onClick)==null||p.call(u)}}))}:{}}).id}let Re=null;function Ht(t){Re=t}function ne(){return Re??Ae}function De(t,e){return ne().notify(t,t.build(e))}function Vt(t,e){if(t.kind!=="progress")throw new H.BugIndicatingError("catalogNotify: a message definition cannot be sent with progressFromCatalog.");return ne().progress(t,t.build(e))}function Kt(t){var e,r;(r=(e=ne()).dismiss)==null||r.call(e,t)}function Bt(t){return t.resolve()}exports.SEVERITY_ORDER=X;exports.SEVERITY_TONES=le;exports.addTimelineEntry=w;exports.applyNotificationRules=we;exports.catalogNotificationHost=Ae;exports.clearCompiledRuleRegexCache=Ge;exports.clearNotificationTimeline=Le;exports.createVendorErrorPreview=Fe;exports.defineNotification=v;exports.defineNotificationScenario=At;exports.digestNotSentText=Et;exports.dismissNotificationFromCatalog=Kt;exports.dismissNotificationTimelineEntries=Ye;exports.dismissNotificationTimelineEntriesBySource=je;exports.dismissNotificationTimelineEntry=Qe;exports.enrichErrorToast=re;exports.entryVendorMatch=_e;exports.fire=N;exports.flushDigest=xe;exports.getAppName=te;exports.getGoogleSearchUrl=Pe;exports.getVendorErrorSource=J;exports.installVendorErrorSource=qe;exports.invalidateCustomSoundCache=Oe;exports.isInQuietHours=Z;exports.isVendorErrorSourceInstalled=ve;exports.loadCustomSoundDataUrl=fe;exports.markTimelineSeen=Be;exports.notificationReplayError=Nt;exports.notificationReplayInfo=$t;exports.notificationReplaySuccess=Dt;exports.notificationReplayWarning=Rt;exports.notificationSettingsUpdateFailed=Mt;exports.notificationTimelineExportFailed=Ot;exports.notificationTimelineExported=It;exports.notifyFromCatalog=De;exports.playQueryCompletedCue=me;exports.playSeverityToneIfEnabled=ye;exports.progressFromCatalog=Vt;exports.provideCatalogNotificationHost=Ht;exports.provideNotificationSecretStore=nt;exports.refreshOsBadge=Ve;exports.resolveCatalogPreviewPriority=Ne;exports.resolveNotificationScenario=Bt;exports.resolveSeverityTone=de;exports.resolveVendorError=V;exports.setAppName=at;exports.setEmailDigestTransport=pt;exports.shouldFireOsNative=be;exports.showCatalogPreviewToast=_t;exports.startDigestScheduler=xt;exports.subscribeNotificationTimeline=We;exports.subscribeUnreadCount=Ke;exports.toTimelineActions=A;exports.toast=C;exports.toggleTimelineEntryPin=Xe;exports.withErrorActionButtons=ie;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("solid-js/web"),m=require("solid-js"),g=require("./announcerService-D_pFE24a.cjs"),A=require("./displayOwner-BNw2Foa_.cjs"),E=require("./prefersReducedMotion-BQp-Q4UR.cjs"),w=require("./keys-GMxY2wcl.cjs"),D="vk_announcerRoot_MEbhX",M="vk_srOnly_qR-Nx",T={announcerRoot:D,srOnly:M};var x=['<div role="status" aria-live="polite" aria-atomic="true"',">","</div>"],C=['<div role="alert" aria-live="assertive" aria-atomic="true"',">","</div>"];const k=e=>{let o;const[t,r]=m.createSignal(""),[c,d]=m.createSignal("");return m.onMount(()=>{const u=g.getAnnouncerService(),s=o.ownerDocument.defaultView;if(!s)return;const l=A.registerDisplayHost(s);let n;m.createEffect(()=>{l.ownsDisplay()||(clearTimeout(n),n=void 0,r(""),d(""))});const v=u.onDidAnnounce(i=>{if(l.ownsDisplay())if(i.politeness==="assertive")clearTimeout(n),n=void 0,d(i.message);else{const p=e.debounceMs??50;p>0?(clearTimeout(n),n=setTimeout(()=>{l.ownsDisplay()&&r(i.message)},p)):r(i.message)}}),y=u.onDidClear(i=>{(i==="polite"||i==="all")&&(clearTimeout(n),n=void 0,r("")),(i==="assertive"||i==="all")&&d("")});m.onCleanup(()=>{clearTimeout(n),v.dispose(),y.dispose(),l.dispose()})}),a.ssrElement("div",a.mergeProps(()=>E.modalBackgroundExemption("live-region"),{get class(){return T.announcerRoot}}),[a.ssr(x,a.ssrAttribute("class",a.escape(T.srOnly,!0),!1),a.escape(t())),a.ssr(C,a.ssrAttribute("class",a.escape(T.srOnly,!0),!1),a.escape(c()))],!1)};function I(e,o,t){return o!==e?"none":t==="asc"?"ascending":"descending"}function R(e){let o="",t=null;const r=()=>{o="",t&&(clearTimeout(t),t=null)};return{push(c){return o+=c,t&&clearTimeout(t),t=setTimeout(r,e.timeoutMs),o},reset:r,dispose:r}}function b(e,o,t){return`${e}-cell-${o}-${t}`}function S(e){const{gridId:o,label:t,cursor:r,startRowIndex:c}=e;return{"aria-label":t,"aria-activedescendant":r===null?void 0:b(o,c+r.row,r.col)}}const f=new Set;function _(e){if(f.has(e))return()=>{};f.add(e);const o=e.document,t=u=>{o.documentElement.getAttribute("data-focus-modality")!==u&&o.documentElement.setAttribute("data-focus-modality",u)};t("pointer");const r=()=>{t("pointer")},c=()=>{t("pointer")},d=u=>{var p;if(["Shift","Control","Alt","Meta"].includes(u.key))return;const s=u.target,l=(p=s==null?void 0:s.tagName)==null?void 0:p.toUpperCase(),n=l==="INPUT",v=n?(s.type||"").toLowerCase():"",y=n&&["checkbox","radio","range","button","submit","reset","file","color","image"].includes(v);(n&&!y||l==="TEXTAREA"||s!=null&&s.isContentEditable)&&!w.isKey(u,"Tab")||t("keyboard")};return e.addEventListener("pointerdown",r,{capture:!0,passive:!0}),e.addEventListener("mousedown",c,{capture:!0,passive:!0}),e.addEventListener("keydown",d,{capture:!0,passive:!0}),()=>{f.delete(e),e.removeEventListener("pointerdown",r,{capture:!0}),e.removeEventListener("mousedown",c,{capture:!0}),e.removeEventListener("keydown",d,{capture:!0})}}function h(){f.clear(),typeof document<"u"&&document.documentElement.removeAttribute("data-focus-modality")}exports.AriaAnnouncer=k;exports._resetFocusModalityForTests=h;exports.buildGridContainerAria=S;exports.columnAriaSort=I;exports.createTypeahead=R;exports.gridCellDomId=b;exports.initFocusModality=_;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";var G=Object.defineProperty;var Y=(t,e,r)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var u=(t,e,r)=>Y(t,typeof e!="symbol"?e+"":e,r);const X=require("./bugIndicatingError-D2X5Hfgg.cjs");function M(t){if(!t)return!1;if(typeof t=="object"){const e=t;if(e.isCancellation===!0||e.cancelled===!0||e.name==="Canceled"&&e.message==="Canceled"||e.name==="AbortError"||e.name==="CancellationError")return!0}return!1}function U(t,e){return t instanceof Error&&t.message.trim()?t.message:typeof t=="string"&&t.trim()?t:e}const L=String.raw`'(?:[^']|'')*(?:'|$)|"(?:[^"]|"")*(?:"|$)`,J=new RegExp(String.raw`(["']?\b(?:password|passcode|passwd|pwd|secret|token|api[_-]?key|authorization|bearer)\b["']?)(\s*[:=]\s*)(`+L+String.raw`|[^\s,;'"}\]]+)`,"gi"),q=new RegExp(String.raw`\b(identified\s+by(?:\s+values)?)\s+(`+L+String.raw`|[^\s,;)]+)`,"gi"),Q=new RegExp(String.raw`(?<!["':])\b(password)\s*(?:=\s*)?(`+L+")","gi");function m(t){let e=t;return e=e.replace(J,(r,s,n,i)=>{if(s.startsWith('"')||s.startsWith("'")){const a=i.startsWith('"')?'"':i.startsWith("'")?"'":"";return`${s}${n}${a}[REDACTED]${a}`}return i.startsWith('"')||i.startsWith("'")?`${s} [REDACTED]`:`${s}=[REDACTED]`}),e=e.replace(q,"$1 [REDACTED]"),e=e.replace(Q,"$1 [REDACTED]"),e=e.replace(/\b([a-z][a-z0-9+\-.]*:\/\/[^\s:@/?#]+):[^\s@/?#]+@/gi,"$1:[REDACTED]@"),e=e.replace(/\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g,"[REDACTED-JWT]"),e=e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,"[REDACTED-PRIVATE-KEY]"),e}const ee=Symbol.for("vokril.base.bestEffortSink");function te(){return globalThis}function $(t,e){const r=te()[ee];if(r===void 0)throw new X.BugIndicatingError("base/bestEffort: no log sink is connected — the realm must call provideBestEffortSink at startup.");r(t,e)}const S=40,O=/password|passcode|passwd|pwd|secret|token|api[_-]?key|authorization|bearer/i;function b(t,e=new WeakSet){if(typeof t=="string")return m(t);if(typeof t=="function")return"[Function]";if(typeof t=="symbol")return t.toString();if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return t.toString();if(t&&typeof t=="object"){if(e.has(t))return"[Circular]";if(e.add(t),Array.isArray(t))return t.map(s=>b(s,e));if(t instanceof Error){const s={name:t.name,message:m(t.message)};t.stack&&(s.stack=m(t.stack));try{const n=Object.keys(t);for(const i of n)if(!(i==="name"||i==="message"||i==="stack")){if(O.test(i)){s[i]="[REDACTED]";continue}try{const a=t[i];s[i]=b(a,e)}catch{s[i]="[Unserializable]"}}}catch(n){$("ignore entry extraction failures on Error",n)}return s}const r={};try{const s=Object.keys(t);for(const n of s){if(O.test(n)){r[n]="[REDACTED]";continue}try{const i=t[n];r[n]=b(i,e)}catch{r[n]="[Unserializable]"}}}catch{return"[Unserializable]"}return r}return t}const _=[];let k=0,T=null;function re(t){T=t}function C(t){if(T!==null){T.add(t);return}try{const e=t.timestamp??Date.now(),r=m(t.message);let s;if(t.data)try{s=b(t.data)}catch{s={error:"[Unserializable data]"}}const n={timestamp:e,category:t.category,message:r,...s!==void 0?{data:s}:{},...t.level!==void 0?{level:t.level}:{}};_.length<S?_.push(n):(_[k]=n,k=(k+1)%S)}catch(e){$("Defensive: breadcrumb recording must never throw and crash the caller",e)}}function se(){return T!==null?T.list():_.length<S?[..._]:[..._.slice(k),..._.slice(0,k)]}function ne(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return e>>>0}const ie=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,oe=/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/g,ae=/\b[0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4}){3,7}\b/g,ce=/\b0x[0-9a-fA-F]+\b/g,ue=/\b\d{5,}\b/g;function fe(t){return t.replace(ie,"<ID>").replace(oe,"<ID>").replace(ae,"<ID>").replace(ce,"<ID>").replace(ue,"<ID>").trim()}function le(t){if(!t)return"";const e=t.split(`
|
|
2
|
-
`).map(s=>s.trim()),r=[];for(const s of e)if(s&&s.startsWith("at ")){const n=s.endsWith(")")?s.replace(/(?:\?[^:)]+)?:\d+(?::\d+)?\)$/,")"):s.replace(/(?:\?[^:)]+)?:\d+(?::\d+)?$/,"");if(r.push(n),r.length>=2)break}return r.join(`
|
|
3
|
-
`)}function de(t){let e="Error",r="",s;try{if(t instanceof Error)e=t.name||"Error",r=t.message||"",s=t.stack;else if(typeof t=="object"&&t!==null){const c=t;typeof c.name=="string"&&(e=c.name),typeof c.message=="string"&&(r=c.message),typeof c.stack=="string"&&(s=c.stack)}else typeof t=="string"?r=t:r=String(t)}catch{e="UnserializableError",r="Error object threw during fingerprint extraction"}const n=fe(r),i=le(s),a=`${e}|${n}|${i}`;return ne(a).toString(16).padStart(8,"0")}class pe{constructor(e={}){u(this,"dedupWindowMs");u(this,"circuitBreakerWindowMs");u(this,"circuitBreakerThreshold");u(this,"fingerprints",new Map);u(this,"recentTimestamps",[]);u(this,"circuitBreakerSuppressedTotal",0);u(this,"wasCircuitBreakerOpen",!1);u(this,"lastPruneTime",0);this.dedupWindowMs=e.dedupWindowMs??5e3,this.circuitBreakerWindowMs=e.circuitBreakerWindowMs??1e4,this.circuitBreakerThreshold=e.circuitBreakerThreshold??20}shouldReport(e,r=Date.now()){(r-this.lastPruneTime>3e4||this.fingerprints.size>200)&&(this.cleanup(r),this.lastPruneTime=r);const s=r-this.circuitBreakerWindowMs;for(;this.recentTimestamps.length>0&&(this.recentTimestamps[0]??0)<s;)this.recentTimestamps.shift();if(this.recentTimestamps.length>=this.circuitBreakerThreshold){const c=!this.wasCircuitBreakerOpen;this.wasCircuitBreakerOpen=!0,this.circuitBreakerSuppressedTotal++;let l=this.fingerprints.get(e);return l||(l={lastReported:r,suppressedCount:0},this.fingerprints.set(e,l)),l.suppressedCount++,{allowed:!1,reason:"circuit_breaker",...c?{circuitBreakerJustOpened:!0}:{}}}let n;this.wasCircuitBreakerOpen&&(this.wasCircuitBreakerOpen=!1,this.circuitBreakerSuppressedTotal>0&&(n=this.circuitBreakerSuppressedTotal,this.circuitBreakerSuppressedTotal=0));const i=this.fingerprints.get(e);if(!i)return this.fingerprints.set(e,{lastReported:r,suppressedCount:0}),this.recentTimestamps.push(r),{allowed:!0,...n!==void 0?{circuitBreakerSuppressedCount:n}:{}};if(r-i.lastReported<this.dedupWindowMs)return i.suppressedCount++,{allowed:!1,reason:"duplicate"};const f=i.suppressedCount;return i.lastReported=r,i.suppressedCount=0,this.recentTimestamps.push(r),{allowed:!0,...f>0?{suppressedCount:f}:{},...n!==void 0?{circuitBreakerSuppressedCount:n}:{}}}isCircuitBreakerOpen(e=Date.now()){const r=e-this.circuitBreakerWindowMs;for(;this.recentTimestamps.length>0&&(this.recentTimestamps[0]??0)<r;)this.recentTimestamps.shift();return this.recentTimestamps.length>=this.circuitBreakerThreshold}cleanup(e=Date.now()){const r=e-this.dedupWindowMs*2;for(const[s,n]of this.fingerprints.entries())n.lastReported<r&&this.fingerprints.delete(s)}reset(){this.fingerprints.clear(),this.recentTimestamps.length=0,this.circuitBreakerSuppressedTotal=0,this.wasCircuitBreakerOpen=!1,this.lastPruneTime=0}}const he=new pe;let R=null;function ge(t){R=t}class Ee{constructor(e=he){u(this,"listeners",new Set);u(this,"rateLimiter");this.rateLimiter=e}addListener(e){return this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}}}onUnexpectedError(e,r){if(this===I&&R!==null){R.onUnexpectedError(e,r);return}if(M(e))return;const s=de(e),n=this.rateLimiter.shouldReport(s);if(!n.allowed){if(n.circuitBreakerJustOpened){const f="Error rate limit circuit breaker opened: exceeded volume threshold. Subsequent errors are suppressed until volume subsides.";C({category:"log",level:"warn",message:f,data:{source:"circuit_breaker"}});const c={source:"circuit_breaker",fingerprint:s};for(const l of this.listeners)try{l(new Error(f),c)}catch(g){console.error("Error listener threw:",g)}}return}const i=U(e,"Unexpected error"),a={...r??{},fingerprint:s,...n.suppressedCount!==void 0?{suppressedCount:n.suppressedCount}:{},...n.circuitBreakerSuppressedCount!==void 0?{circuitBreakerSuppressedCount:n.circuitBreakerSuppressedCount}:{}};C({category:"log",level:"error",message:`Unexpected error: ${i}`,data:a});for(const f of this.listeners)try{f(e,a)}catch(c){console.error("Error listener threw:",c)}}}const I=new Ee;function x(t,e){I.onUnexpectedError(t,e)}var W;(t=>{t.None=()=>({dispose(){}});function e(a){return(f,c)=>{let l=!1;const g=a(d=>{l||(l=!0,g.dispose(),f.call(c,d))});return g}}t.once=e;function r(a){return new Promise(f=>e(a)(f))}t.toPromise=r;function s(a,f,c){return(l,g)=>{const d=a(p=>{f(p)&&l.call(g,p)});return c==null||c.add(d),d}}t.filter=s;function n(a,f,c=100){return(l,g)=>{let d,p;const H=a(Z=>{d=f(d,Z),p!==void 0&&clearTimeout(p),p=setTimeout(()=>{const K=d;d=void 0,p=void 0,l.call(g,K)},c)});return{dispose:()=>{H.dispose(),p!==void 0&&clearTimeout(p)}}}}t.debounce=n;function i(a,f,c){return f(c),a(l=>f(l))}t.runAndSubscribe=i})(W||(W={}));class j{constructor(){u(this,"_listeners",new Set);u(this,"_disposed",!1);u(this,"_event")}get event(){return this._event||(this._event=(e,r)=>{if(this._disposed)return console.warn("Emitter is already disposed, cannot register listener"),{dispose(){}};const s={fn:e,thisArgs:r};if(process.env.NODE_ENV!=="production"){const n=new Error().stack;n!==void 0&&(s.registeredAt=n)}return this._listeners.add(s),{dispose:()=>{this._listeners.delete(s)}}}),this._event}get _size(){return this._listeners.size}fire(e){if(this._disposed)return;const r=[...this._listeners];for(const{fn:s,thisArgs:n,registeredAt:i}of r)try{s.call(n,e)}catch(a){x(a,{source:"event-listener",...i!==void 0?{registeredAt:i}:{}})}}dispose(){this._disposed||(this._disposed=!0,this._listeners.clear(),this._event=void 0)}}var o=(t=>(t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warn=4]="Warn",t[t.Error=5]="Error",t[t.Audit=6]="Audit",t))(o||{});const N=3;function V(t,e){return e===6?!0:t===0?!1:t<=e}class _e{constructor(){u(this,"_store",new Set);u(this,"_isDisposed",!1)}_register(e){return this._isDisposed?(console.warn("Registering disposable on already disposed object"),e.dispose()):this._store.add(e),e}get isDisposed(){return this._isDisposed}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(const e of this._store)try{e.dispose()}catch(r){x(r,{source:"dispose"})}this._store.clear()}}}class me extends _e{constructor(r=N){super();u(this,"_level");u(this,"_onDidChangeLogLevel",this._register(new j));u(this,"onDidChangeLogLevel",this._onDidChangeLogLevel.event);this._level=r}getLevel(){return this._level}setLevel(r){this._level!==r&&(this._level=r,this._onDidChangeLogLevel.fire(r))}canLog(r){return V(this._level,r)}withTag(r){return this}}const v="[REDACTED]";function be(t){return t?v:""}const ke=["password","pass","pwd","token","accesstoken","refreshtoken","apikey","api_key","authtoken","secret","privatekey","private_key","masterkey","master_key","masterpassword","username","user_name","email","userid","user_id","vaultname","vault_name","vaultpath","vault_path","recoverycode","recovery_code","mnemonic","connectionstring","conn_string","dsn","sessionid","session_id","cookie","authorization"],Te=new Set(ke.map(t=>t.toLowerCase().replace(/[-_]/g,""))),we=[/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/,/sk-[A-Za-z0-9]{20,}/,/AKIA[0-9A-Z]{16}/,/ghp_[A-Za-z0-9]{36}/,/gho_[A-Za-z0-9]{36}/,/xoxb-[0-9]+-[0-9]+-[A-Za-z0-9]+/];function De(t){return Te.has(t.toLowerCase().replace(/[-_]/g,""))}function w(t){for(const e of we)if(e.test(t))return v;return t}function A(t){const e={};for(const[r,s]of Object.entries(t))De(r)?e[r]=typeof s=="string"?be(s):v:typeof s=="string"?e[r]=w(s):Array.isArray(s)?e[r]=s.map(n=>typeof n=="string"?w(n):n&&typeof n=="object"&&!(n instanceof Error)&&!(n instanceof Date)?A(n):n):s&&typeof s=="object"&&!(s instanceof Error)&&!(s instanceof Date)?e[r]=A(s):e[r]=s;return e}function Ae(t){return m(w(t))}function B(t){return typeof t=="string"?w(t):Array.isArray(t)?t.map(e=>typeof e=="string"?w(e):e&&typeof e=="object"&&!(e instanceof Error)&&!(e instanceof Date)?A(e):e):t&&typeof t=="object"&&!(t instanceof Error)&&!(t instanceof Date)?A(t):t}class ye extends me{constructor(e){super(e)}trace(e,...r){this.canLog(o.Trace)&&this.log(o.Trace,E(e,r),r)}debug(e,...r){this.canLog(o.Debug)&&this.log(o.Debug,E(e,r),r)}info(e,...r){this.canLog(o.Info)&&this.log(o.Info,E(e,r),r)}warn(e,...r){this.canLog(o.Warn)&&this.log(o.Warn,E(e,r),r)}error(e,...r){if(!this.canLog(o.Error))return;if(e instanceof Error){const n=e;this.log(o.Error,E(`${n.message}
|
|
4
|
-
${z(n)}`,r),[n,...r]);return}const s=r[0];if(s instanceof Error){this.log(o.Error,E(`${e}: ${s.message}
|
|
5
|
-
${z(s)}`,r.slice(1)),r);return}this.log(o.Error,E(e,r),r)}audit(e,r,s,...n){if(!this.canLog(o.Audit))return;const i={action:e,userId:r,resource:s,args:n},a=E(`AUDIT: User ${r} performed ${e} on ${s}`,n);this.log(o.Audit,a,n,i)}}function z(t){if(!t.stack)return t.message;const e=t.stack.indexOf(`
|
|
6
|
-
`);return e>=0?t.stack.slice(e+1):t.message}function E(t,e=[]){if(e.length===0)return t;const r=[t];for(const s of e)if(s!=null)if(s instanceof Error)r.push(`${s.message}
|
|
7
|
-
${s.stack??""}`);else if(typeof s=="object")try{r.push(JSON.stringify(B(s)))}catch{r.push(String(s))}else r.push(String(B(s)));return r.length===1?r[0]:r.join(" ")}class Se extends ye{constructor(r=[],s,n){super(s);u(this,"_transports");u(this,"_tag");this._transports=r,this._tag=n??""}log(r,s,n=[],i){const a={level:r,tag:this._tag,message:Ae(s),timestamp:new Date,args:n.map(B),...i?{audit:i}:{}};for(const f of this._transports)f.log(a)}flush(){var r;for(const s of this._transports)(r=s.flush)==null||r.call(s)}addTransport(r){this._transports.push(r)}withTag(r){return new y(this,r)}}class y{constructor(e,r){u(this,"_fullTag");this._parent=e;const s=this._parent._fullTag??this._parent._tag??"";this._fullTag=s?`${s}:${r}`:r}get onDidChangeLogLevel(){return this._getRoot().onDidChangeLogLevel}getLevel(){return this._getRoot().getLevel()}setLevel(e){this._getRoot().debug(`TaggedLogger.setLevel(${o[e]}) ignored on tagged child '[${this._fullTag}]' — call setLevel on the root logger instead.`)}trace(e,...r){this._emit(o.Trace,e,r)}debug(e,...r){this._emit(o.Debug,e,r)}info(e,...r){this._emit(o.Info,e,r)}warn(e,...r){this._emit(o.Warn,e,r)}error(e,...r){if(e instanceof Error){const s=new Error(`[${this._fullTag}] ${e.message}`);e.stack&&(s.stack=e.stack),this._getRoot().error(s,...r)}else this._emit(o.Error,e,r)}audit(e,r,s,...n){this._getRoot().audit(e,r,s,...n)}flush(){this._getRoot().flush()}withTag(e){return new y(this,e)}_emit(e,r,s){const n=this._getRoot(),i=`[${this._fullTag}] ${r}`;switch(e){case o.Trace:n.trace(i,...s);break;case o.Debug:n.debug(i,...s);break;case o.Info:n.info(i,...s);break;case o.Warn:n.warn(i,...s);break;case o.Error:n.error(i,...s);break}}_getRoot(){let e=this._parent;for(;e instanceof y;)e=e._parent;return e}}const Ce={[o.Off]:"",[o.Trace]:"TRACE",[o.Debug]:"DEBUG",[o.Info]:"INFO",[o.Warn]:"WARN",[o.Error]:"ERROR",[o.Audit]:"AUDIT"},Re={[o.Off]:"debug",[o.Trace]:"debug",[o.Debug]:"debug",[o.Info]:"info",[o.Warn]:"warn",[o.Error]:"error",[o.Audit]:"info"};class Be{log(e){const r=Ce[e.level],s=e.tag?` ${e.tag}`:"",n=e.timestamp.toISOString(),i=Re[e.level];console[i](`[${r}]${s} ${n} - ${e.message}`)}}const D=new Be;let F=!0,h=null;const Le={log(t){F&&D.log(t),h==null||h.log(t)},flush(){var t,e;(t=D.flush)==null||t.call(D),(e=h==null?void 0:h.flush)==null||e.call(h)}},P=new Se([Le],o.Info);function $e(t,e={}){h=t,F=t===null||e.keepConsole===!0}function Ie(t){const e=t;P.setLevel(e)}function ve(t){return P.withTag(t)}exports.DEFAULT_LOG_LEVEL=N;exports.Emitter=j;exports.LogLevel=o;exports.addBreadcrumb=C;exports.bestEffortFailed=$;exports.canLog=V;exports.errorHandler=I;exports.getBreadcrumbs=se;exports.getLogger=ve;exports.isCancellationError=M;exports.provideHostBreadcrumbs=re;exports.provideHostErrorHandler=ge;exports.provideHostLogTransport=$e;exports.scrubSecrets=m;exports.scrubValue=b;exports.setRendererLogLevel=Ie;exports.toErrorMessage=U;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class SyncDescriptor {
|
|
2
|
-
ctor;
|
|
3
|
-
staticArguments;
|
|
4
|
-
supportsDelayedInstantiation;
|
|
5
|
-
constructor(ctor, staticArguments = [], supportsDelayedInstantiation = false) {
|
|
6
|
-
this.ctor = ctor;
|
|
7
|
-
this.staticArguments = staticArguments;
|
|
8
|
-
this.supportsDelayedInstantiation = supportsDelayedInstantiation;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { BugIndicatingError } from '../../../base/errors/bugIndicatingError';
|
|
2
|
-
export var _util;
|
|
3
|
-
(function (_util) {
|
|
4
|
-
_util.serviceIds = new Map();
|
|
5
|
-
_util.DI_TARGET = '$di$target';
|
|
6
|
-
_util.DI_DEPENDENCIES = '$di$dependencies';
|
|
7
|
-
function getServiceDependencies(ctor) {
|
|
8
|
-
return ctor[_util.DI_DEPENDENCIES] || [];
|
|
9
|
-
}
|
|
10
|
-
_util.getServiceDependencies = getServiceDependencies;
|
|
11
|
-
})(_util || (_util = {}));
|
|
12
|
-
export const IInstantiationService = createDecorator('instantiationService');
|
|
13
|
-
function storeServiceDependency(id, target, index) {
|
|
14
|
-
if (target[_util.DI_TARGET] === target) {
|
|
15
|
-
target[_util.DI_DEPENDENCIES].push({ id, index });
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
target[_util.DI_DEPENDENCIES] = [{ id, index }];
|
|
19
|
-
target[_util.DI_TARGET] = target;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export function createDecorator(serviceId) {
|
|
23
|
-
if (_util.serviceIds.has(serviceId)) {
|
|
24
|
-
return _util.serviceIds.get(serviceId);
|
|
25
|
-
}
|
|
26
|
-
const id = function (target, _key, index) {
|
|
27
|
-
if (arguments.length !== 3) {
|
|
28
|
-
throw new BugIndicatingError('@IServiceName-decorator can only be used to decorate a parameter');
|
|
29
|
-
}
|
|
30
|
-
storeServiceDependency(id, target, index);
|
|
31
|
-
};
|
|
32
|
-
id.toString = () => serviceId;
|
|
33
|
-
_util.serviceIds.set(serviceId, id);
|
|
34
|
-
return id;
|
|
35
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export class ServiceCollection {
|
|
2
|
-
_entries = new Map();
|
|
3
|
-
set(id, instanceOrDescriptor) {
|
|
4
|
-
const result = this._entries.get(id);
|
|
5
|
-
this._entries.set(id, instanceOrDescriptor);
|
|
6
|
-
return result;
|
|
7
|
-
}
|
|
8
|
-
has(id) {
|
|
9
|
-
return this._entries.has(id);
|
|
10
|
-
}
|
|
11
|
-
get(id) {
|
|
12
|
-
return this._entries.get(id);
|
|
13
|
-
}
|
|
14
|
-
}
|