@novu/js 3.11.0 → 3.12.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cjs/{chunk-VWSQDNZX.js → chunk-OZV3TKWX.js} +6 -0
  2. package/dist/cjs/{chunk-QQNKEWGC.js → chunk-SZEUW4CB.js} +1070 -309
  3. package/dist/cjs/index.d.ts +5 -4
  4. package/dist/cjs/index.js +26 -14
  5. package/dist/cjs/internal/index.d.ts +8 -2
  6. package/dist/cjs/internal/index.js +8 -4
  7. package/dist/{esm/novu-DY-mm8Og.d.mts → cjs/novu-BVtCFUxa.d.ts} +398 -203
  8. package/dist/cjs/themes/index.d.ts +11 -5
  9. package/dist/cjs/themes/index.js +17 -1
  10. package/dist/{esm/types-BM_9Xx5Z.d.mts → cjs/types-D-9ozWeQ.d.ts} +20 -1
  11. package/dist/cjs/types-Rjzg7eo3.d.ts +836 -0
  12. package/dist/cjs/ui/index.d.ts +74 -7
  13. package/dist/cjs/ui/index.js +1785 -260
  14. package/dist/esm/{chunk-UM35OVAD.mjs → chunk-IA6ISHOP.mjs} +1068 -310
  15. package/dist/esm/{chunk-RZWQYM3H.mjs → chunk-RO3GDYAG.mjs} +6 -1
  16. package/dist/esm/index.d.mts +5 -4
  17. package/dist/esm/index.mjs +2 -2
  18. package/dist/esm/internal/index.d.mts +8 -2
  19. package/dist/esm/internal/index.mjs +1 -1
  20. package/dist/{cjs/novu-ThMWeiRt.d.ts → esm/novu-YP3PwsQR.d.mts} +398 -203
  21. package/dist/esm/themes/index.d.mts +11 -5
  22. package/dist/esm/themes/index.mjs +16 -2
  23. package/dist/{cjs/types-BM_9Xx5Z.d.ts → esm/types-D-9ozWeQ.d.mts} +20 -1
  24. package/dist/esm/types-DmMJ1GiR.d.mts +836 -0
  25. package/dist/esm/ui/index.d.mts +74 -7
  26. package/dist/esm/ui/index.mjs +1782 -256
  27. package/dist/index.css +1 -1
  28. package/dist/novu.min.js +12 -12
  29. package/dist/novu.min.js.gz +0 -0
  30. package/package.json +18 -17
  31. package/dist/cjs/types-BjANCN3c.d.ts +0 -537
  32. package/dist/esm/types-C5eX1GmB.d.mts +0 -537
@@ -1,23 +1,24 @@
1
- import { Novu, checkNotificationTagFilter, checkNotificationDataFilter, isBrowser, DEFAULT_API_VERSION, isSameFilter } from '../chunk-UM35OVAD.mjs';
2
- import { parseMarkdownIntoTokens } from '../chunk-RZWQYM3H.mjs';
3
- import { __privateAdd, __privateMethod, __privateSet, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
1
+ import { Novu, checkNotificationTagFilter, checkNotificationDataFilter, isBrowser, DEFAULT_API_VERSION, isSameFilter } from '../chunk-IA6ISHOP.mjs';
2
+ import { buildSubscriptionIdentifier, parseMarkdownIntoTokens } from '../chunk-RO3GDYAG.mjs';
3
+ import { __spreadProps, __spreadValues, __privateAdd, __privateMethod, __privateSet, __privateGet, __objRest, __async } from '../chunk-STZMOEWR.mjs';
4
4
  import { createComponent, mergeProps, delegateEvents, render, Portal, spread, template, insert, memo, effect, className, use, setAttribute, Dynamic } from 'solid-js/web';
5
- import { createSignal, createContext, useContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, Show, Switch, Match, createResource, Index, batch, createUniqueId } from 'solid-js';
5
+ import { createSignal, createContext, useContext, onMount, onCleanup, For, Switch, Match, createMemo, createEffect, splitProps, Show, createResource, Index, batch, createUniqueId } from 'solid-js';
6
6
  import { createStore } from 'solid-js/store';
7
7
  import clsx from 'clsx';
8
8
  import { extendTailwindMerge } from 'tailwind-merge';
9
- import { Motion as Motion$1 } from 'solid-motionone';
9
+ import { Motion as Motion$1, Presence } from 'solid-motionone';
10
10
  import { autoUpdate, offset, flip, shift } from '@floating-ui/dom';
11
11
  import { useFloating } from 'solid-floating-ui';
12
12
  import { cva } from 'class-variance-authority';
13
13
  import * as CheckboxPrimitive from '@kobalte/core/checkbox';
14
14
 
15
- // _v71190j6q:/home/runner/_work/novu/novu/packages/js/src/ui/index.directcss
16
- var ui_default = `.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box";background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}}.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.\\!nt-pointer-events-auto{pointer-events:auto!important}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-0{inset:0}.nt-inset-2{inset:.5rem}.nt-bottom-0{bottom:0}.nt-left-0{left:0}.nt-left-0\\.5{left:.125rem}.nt-right-0{right:0}.nt-right-3{right:.75rem}.nt-top-0{top:0}.nt-top-0\\.5{top:.125rem}.nt-top-3{top:.75rem}.nt-z-10{z-index:10}.nt-z-\\[-1\\]{z-index:-1}.-nt-m-1{margin:-.25rem}.nt-mx-auto{margin-left:auto;margin-right:auto}.-nt-mt-2{margin-top:-.5rem}.-nt-mt-\\[2px\\]{margin-top:-2px}.nt--mt-\\[50px\\]{margin-top:-50px}.nt-mb-1{margin-bottom:.25rem}.nt-mb-2{margin-bottom:.5rem}.nt-mb-3{margin-bottom:.75rem}.nt-mb-4{margin-bottom:1rem}.nt-mb-\\[0\\.625rem\\]{margin-bottom:.625rem}.nt-ml-1{margin-left:.25rem}.nt-ml-2{margin-left:.5rem}.nt-ml-auto{margin-left:auto}.nt-mr-2{margin-right:.5rem}.nt-mr-auto{margin-right:auto}.nt-mt-1{margin-top:.25rem}.nt-mt-1\\.5{margin-top:.375rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-aspect-square{aspect-ratio:1/1}.nt-size-1\\.5{height:.375rem;width:.375rem}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\\.5{height:.625rem;width:.625rem}.nt-size-3{height:.75rem;width:.75rem}.nt-size-3\\.5{height:.875rem;width:.875rem}.nt-size-4{height:1rem;width:1rem}.nt-size-5{height:1.25rem;width:1.25rem}.nt-size-8{height:2rem;width:2rem}.nt-size-fit{height:fit-content;width:fit-content}.nt-size-full{height:100%;width:100%}.nt-h-2{height:.5rem}.nt-h-3{height:.75rem}.nt-h-3\\.5{height:.875rem}.nt-h-4{height:1rem}.nt-h-5{height:1.25rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-9{height:2.25rem}.nt-h-\\[600px\\]{height:600px}.nt-h-fit{height:fit-content}.nt-h-full{height:100%}.nt-max-h-\\[160px\\]{max-height:160px}.nt-min-h-0{min-height:0}.nt-w-1\\.5{width:.375rem}.nt-w-1\\/3{width:33.333333%}.nt-w-2\\/3{width:66.666667%}.nt-w-5{width:1.25rem}.nt-w-7{width:1.75rem}.nt-w-8{width:2rem}.nt-w-\\[260px\\]{width:260px}.nt-w-\\[3px\\]{width:3px}.nt-w-\\[400px\\]{width:400px}.nt-w-\\[60px\\]{width:60px}.nt-w-\\[calc\\(2ch\\+2rem\\)\\]{width:calc(2ch + 2rem)}.nt-w-fit{width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:max-content}.nt-min-w-52{min-width:13rem}.nt-min-w-\\[120px\\]{min-width:120px}.nt-min-w-\\[220px\\]{min-width:220px}.nt-min-w-\\[74px\\]{min-width:74px}.nt-max-w-56{max-width:14rem}.nt-max-w-\\[120px\\]{max-width:120px}.nt-max-w-\\[220px\\]{max-width:220px}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.nt-translate-x-1\\/2{--tw-translate-x:50%}.nt-transform,.nt-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-cursor-default{cursor:default}.nt-cursor-not-allowed{cursor:not-allowed}.nt-cursor-pointer{cursor:pointer}.nt-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.nt-flex-row{flex-direction:row}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-end{justify-content:flex-end}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-0\\.5{gap:.125rem}.nt-gap-1{gap:.25rem}.nt-gap-1\\.5{gap:.375rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-auto{overflow:auto}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-truncate{overflow:hidden;text-overflow:ellipsis}.nt-truncate,.nt-whitespace-nowrap{white-space:nowrap}.nt-whitespace-pre-wrap{white-space:pre-wrap}.nt-rounded{border-radius:var(--nv-radius-base)}.nt-rounded-full{border-radius:var(--nv-radius-full)}.nt-rounded-lg{border-radius:var(--nv-radius-lg)}.nt-rounded-md{border-radius:var(--nv-radius-md)}.nt-rounded-sm{border-radius:var(--nv-radius-sm)}.nt-rounded-xl{border-radius:var(--nv-radius-xl)}.nt-border{border-width:1px}.nt-border-b{border-bottom-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-border{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.nt-border-neutral-alpha-100{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-border-neutral-alpha-50{border-color:var(--nv-color-neutral-alpha-50)}.nt-border-primary{border-color:var(--nv-color-primary)}.nt-border-t-neutral-alpha-200{border-top-color:var(--nv-color-neutral-alpha-200)}.nt-bg-\\[oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.1\\)\\]{background-color:oklch(from var(--nv-color-stripes) l c h/.1)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.nt-bg-neutral-alpha-100{background-color:var(--nv-color-neutral-alpha-100)}.nt-bg-neutral-alpha-25{background-color:var(--nv-color-neutral-alpha-25)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-primary-alpha-300{background-color:var(--nv-color-primary-alpha-300)}.nt-bg-primary-alpha-400{background-color:var(--nv-color-primary-alpha-400)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-bg-severity-high{background-color:var(--nv-color-severity-high)}.nt-bg-severity-high-alpha-100{background-color:var(--nv-color-severity-high-alpha-100)}.nt-bg-severity-high-alpha-200{background-color:var(--nv-color-severity-high-alpha-200)}.nt-bg-severity-high-alpha-300{background-color:var(--nv-color-severity-high-alpha-300)}.nt-bg-severity-high-alpha-50{background-color:var(--nv-color-severity-high-alpha-50)}.nt-bg-severity-low{background-color:var(--nv-color-severity-low)}.nt-bg-severity-low-alpha-100{background-color:var(--nv-color-severity-low-alpha-100)}.nt-bg-severity-low-alpha-200{background-color:var(--nv-color-severity-low-alpha-200)}.nt-bg-severity-low-alpha-300{background-color:var(--nv-color-severity-low-alpha-300)}.nt-bg-severity-low-alpha-50{background-color:var(--nv-color-severity-low-alpha-50)}.nt-bg-severity-medium{background-color:var(--nv-color-severity-medium)}.nt-bg-severity-medium-alpha-100{background-color:var(--nv-color-severity-medium-alpha-100)}.nt-bg-severity-medium-alpha-200{background-color:var(--nv-color-severity-medium-alpha-200)}.nt-bg-severity-medium-alpha-300{background-color:var(--nv-color-severity-medium-alpha-300)}.nt-bg-severity-medium-alpha-50{background-color:var(--nv-color-severity-medium-alpha-50)}.nt-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.nt-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.nt-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nt-from-foreground-alpha-50{--tw-gradient-from:var(--nv-color-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-primary-foreground-alpha-200{--tw-gradient-from:var(--nv-color-primary-foreground-alpha-200) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-20\\%{--tw-gradient-from-position:20%}.nt-to-background{--tw-gradient-to:var(--nv-color-background) var(--tw-gradient-to-position)}.nt-to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.nt-object-cover{object-fit:cover}.nt-p-0{padding:0}.nt-p-0\\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-2\\.5{padding:.625rem}.nt-p-3{padding:.75rem}.nt-p-4{padding:1rem}.nt-px-1{padding-left:.25rem;padding-right:.25rem}.nt-px-2{padding-left:.5rem;padding-right:.5rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-4{padding-left:1rem;padding-right:1rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\\[6px\\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.nt-py-2{padding-bottom:.5rem;padding-top:.5rem}.nt-py-3{padding-bottom:.75rem;padding-top:.75rem}.nt-py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-px{padding-bottom:1px;padding-top:1px}.nt-pb-2{padding-bottom:.5rem}.nt-pb-\\[0\\.625rem\\]{padding-bottom:.625rem}.nt-pr-0{padding-right:0}.nt-pt-2{padding-top:.5rem}.nt-pt-2\\.5{padding-top:.625rem}.nt-text-left{text-align:left}.nt-text-center{text-align:center}.nt-text-start{text-align:start}.nt-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nt-text-\\[0\\.8rem\\]{font-size:.8rem}.nt-text-\\[12px\\]{font-size:12px}.nt-text-base{font-size:var(--nv-font-size-base);line-height:var(--nv-line-height-base)}.nt-text-sm{font-size:var(--nv-font-size-sm);line-height:var(--nv-line-height-sm)}.nt-text-xl{font-size:var(--nv-font-size-xl);line-height:var(--nv-line-height-xl)}.nt-text-xs{font-size:var(--nv-font-size-xs);line-height:var(--nv-line-height-xs)}.nt-font-medium{font-weight:500}.nt-font-normal{font-weight:400}.nt-font-semibold{font-weight:600}.nt-leading-none{line-height:1}.nt-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-300{color:var(--nv-color-foreground-alpha-300)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-foreground-alpha-700{color:var(--nv-color-foreground-alpha-700)}.nt-text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.nt-text-neutral-alpha-500{color:var(--nv-color-neutral-alpha-500)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-stripes{color:var(--nv-color-stripes)}.nt-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.nt-underline{text-decoration-line:underline}.nt-opacity-0{opacity:0}.nt-opacity-20{opacity:.2}.nt-opacity-50{opacity:.5}.nt-shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-primary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-primary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-secondary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-secondary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\]{--tw-shadow:0px 1px 2px 0px #0a0d1408;--tw-shadow-colored:0px 1px 2px 0px var(--tw-shadow-color)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\],.nt-shadow-dropdown{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-dropdown{--tw-shadow:0px 12px 16px -4px oklch(from var(--nv-color-shadow) l c h/0.08),0px 4px 6px -2px oklch(from var(--nv-color-shadow) l c h/0.03);--tw-shadow-colored:0px 12px 16px -4px var(--tw-shadow-color),0px 4px 6px -2px var(--tw-shadow-color)}.nt-shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nt-shadow-lg,.nt-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.nt-shadow-popover{--tw-shadow:0px 8px 26px 0px oklch(from var(--nv-color-shadow) l c h/0.08),0px 2px 6px 0px oklch(from var(--nv-color-shadow) l c h/0.12);--tw-shadow-colored:0px 8px 26px 0px var(--tw-shadow-color),0px 2px 6px 0px var(--tw-shadow-color)}.nt-shadow-popover,.nt-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 oklch(from var(--nv-color-shadow) l c h/0.08);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-ring-offset-background{--tw-ring-offset-color:var(--nv-color-background)}.nt-backdrop-blur-lg{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-foreground\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-foreground) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 80% c h)}.\\[--bell-gradient-start\\:var\\(--nv-color-foreground\\)\\]{--bell-gradient-start:var(--nv-color-foreground)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-high\\)\\]{--bell-gradient-start:var(--nv-color-severity-high)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-low\\)\\]{--bell-gradient-start:var(--nv-color-severity-low)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-medium\\)\\]{--bell-gradient-start:var(--nv-color-severity-medium)}.\\[interpolate-size\\:allow-keywords\\]{interpolate-size:allow-keywords}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.\\[word-break\\:break-word\\]{word-break:break-word}.before\\:nt-absolute:before{content:var(--tw-content);position:absolute}.before\\:nt-inset-0:before{content:var(--tw-content);inset:0}.before\\:-nt-right-\\[calc\\(0\\+var\\(--stripes-size\\)\\)\\]:before{content:var(--tw-content);right:calc(var(--stripes-size)*-1)}.before\\:nt-m-1:before{content:var(--tw-content);margin:.25rem}@keyframes nt-stripes{0%{content:var(--tw-content);transform:translateX(0)}to{content:var(--tw-content);transform:translateX(calc(var(--stripes-size)*-1))}}.before\\:nt-animate-stripes:before{animation:nt-stripes 1s linear infinite paused;content:var(--tw-content)}.before\\:nt-rounded-full:before{border-radius:var(--nv-radius-full);content:var(--tw-content)}.before\\:nt-rounded-lg:before{border-radius:var(--nv-radius-lg);content:var(--tw-content)}.before\\:nt-rounded-md:before{border-radius:var(--nv-radius-md);content:var(--tw-content)}.before\\:nt-rounded-xl:before{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.before\\:nt-border:before{border-width:1px;content:var(--tw-content)}.before\\:nt-border-primary-foreground-alpha-100:before{border-color:var(--nv-color-primary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-border-secondary-foreground-alpha-100:before{border-color:var(--nv-color-secondary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-200:before{background-color:var(--nv-color-severity-high-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-300:before{background-color:var(--nv-color-severity-high-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-200:before{background-color:var(--nv-color-severity-low-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-300:before{background-color:var(--nv-color-severity-low-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-200:before{background-color:var(--nv-color-severity-medium-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-300:before{background-color:var(--nv-color-severity-medium-alpha-300);content:var(--tw-content)}.before\\:nt-bg-dev-stripes-gradient:before{background-image:repeating-linear-gradient(135deg,oklch(from var(--nv-color-stripes) l c h/.1) 25%,oklch(from var(--nv-color-stripes) l c h/.1) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 75%);content:var(--tw-content)}.before\\:nt-bg-\\[length\\:var\\(--stripes-size\\)_var\\(--stripes-size\\)\\]:before{background-size:var(--stripes-size) var(--stripes-size);content:var(--tw-content)}.before\\:nt-content-\\[\\"\\"\\]:before{--tw-content:"";content:var(--tw-content)}.before\\:\\[mask-image\\:linear-gradient\\(transparent_0\\%\\2c black\\)\\]:before{content:var(--tw-content);-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.after\\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\\:nt-inset-0:after{content:var(--tw-content);inset:0}.after\\:-nt-top-12:after{content:var(--tw-content);top:-3rem}.after\\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:nt-left-0:after{content:var(--tw-content);left:0}.after\\:nt-left-0\\.5:after{content:var(--tw-content);left:.125rem}.after\\:nt-top-0\\.5:after{content:var(--tw-content);top:.125rem}.after\\:nt-size-3:after{content:var(--tw-content);height:.75rem;width:.75rem}.after\\:nt-h-\\[2px\\]:after{content:var(--tw-content);height:2px}.after\\:nt-w-full:after{content:var(--tw-content);width:100%}.after\\:nt-translate-x-1\\/2:after{--tw-translate-x:50%}.after\\:nt-translate-x-1\\/2:after,.after\\:nt-translate-x-full:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:nt-translate-x-full:after{--tw-translate-x:100%}.after\\:nt-rounded-full:after{border-radius:var(--nv-radius-full);content:var(--tw-content)}.after\\:nt-rounded-lg:after{border-radius:var(--nv-radius-lg);content:var(--tw-content)}.after\\:nt-rounded-md:after{border-radius:var(--nv-radius-md);content:var(--tw-content)}.after\\:nt-rounded-xl:after{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.after\\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.07\\)_55\\%\\2c transparent\\)\\2c linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-stripes) l c h/.07) 55%,#0000),linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-gradient-to-b:after{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));content:var(--tw-content)}.after\\:nt-from-primary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-primary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-from-secondary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-secondary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-to-transparent:after{content:var(--tw-content);--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.after\\:nt-opacity-0:after{content:var(--tw-content);opacity:0}.after\\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-transition-opacity:after{content:var(--tw-content);transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-duration-200:after{transition-duration:.2s}.after\\:nt-content-\\[\\"\\"\\]:after,.after\\:nt-content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.after\\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\\:nt-bg-neutral-alpha-100:hover{background-color:var(--nv-color-neutral-alpha-100)}.hover\\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\\:nt-bg-primary-alpha-25:hover{background-color:var(--nv-color-primary-alpha-25)}.hover\\:nt-bg-primary-alpha-400:hover{background-color:var(--nv-color-primary-alpha-400)}.hover\\:nt-bg-severity-high-alpha-50:hover{background-color:var(--nv-color-severity-high-alpha-50)}.hover\\:nt-bg-severity-low-alpha-50:hover{background-color:var(--nv-color-severity-low-alpha-50)}.hover\\:nt-bg-severity-medium-alpha-50:hover{background-color:var(--nv-color-severity-medium-alpha-50)}.hover\\:nt-text-foreground-alpha-800:hover{color:var(--nv-color-foreground-alpha-800)}.before\\:hover\\:\\[animation-play-state\\:running\\]:hover:before{animation-play-state:running;content:var(--tw-content)}.hover\\:after\\:nt-opacity-100:hover:after{content:var(--tw-content);opacity:1}.focus\\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-rounded-lg:focus-visible{border-radius:var(--nv-radius-lg)}.focus-visible\\:nt-rounded-md:focus-visible{border-radius:var(--nv-radius-md)}.focus-visible\\:nt-rounded-xl:focus-visible{border-radius:var(--nv-radius-xl)}.focus-visible\\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\\:nt-ring-ring:focus-visible{--tw-ring-color:var(--nv-color-ring)}.focus-visible\\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\\:nt-opacity-20:disabled{opacity:.2}.disabled\\:nt-opacity-50:disabled{opacity:.5}.nt-group:focus-within .group-focus-within\\:nt-opacity-100{opacity:1}.nt-group:hover .group-hover\\:nt-bg-severity-high-alpha-500{background-color:var(--nv-color-severity-high-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-low-alpha-500{background-color:var(--nv-color-severity-low-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-medium-alpha-500{background-color:var(--nv-color-severity-medium-alpha-500)}.nt-group:hover .group-hover\\:nt-opacity-0{opacity:0}.nt-group:hover .group-hover\\:nt-opacity-100{opacity:1}.nt-peer:focus-visible~.peer-focus-visible\\:nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-offset-2{--tw-ring-offset-width:2px}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true],.data-\\[open\\=true\\]\\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\]\\:nt-cursor-not-allowed[data-disabled]{cursor:not-allowed}.data-\\[checked\\]\\:nt-border-none[data-checked],.data-\\[indeterminate\\]\\:nt-border-none[data-indeterminate]{border-style:none}.data-\\[checked\\]\\:nt-bg-primary[data-checked],.data-\\[indeterminate\\]\\:nt-bg-primary[data-indeterminate]{background-color:var(--nv-color-primary)}.data-\\[checked\\]\\:nt-text-primary-foreground[data-checked]{color:var(--nv-color-primary-foreground)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\\[indeterminate\\]\\:nt-text-primary-foreground[data-indeterminate]{color:var(--nv-color-primary-foreground)}.data-\\[state\\=active\\]\\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\\[disabled\\]\\:nt-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:after\\:nt-border-b-2[data-state=active]:after{border-bottom-width:2px;content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-opacity-100[data-state=active]:after{content:var(--tw-content);opacity:1}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:nt-border-t:not(:first-child){border-top-width:1px}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-12 .nv-notificationList{padding-bottom:3rem}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-8 .nv-notificationList{padding-bottom:2rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-12 .nv-preferencesContainer{padding-bottom:3rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-8 .nv-preferencesContainer{padding-bottom:2rem}.\\[\\&_stop\\]\\:nt-transition-\\[stop-color\\] stop{transition-duration:.15s;transition-property:stop-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\[\\&_svg\\]\\:nt-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:nt-shrink-0 svg{flex-shrink:0}`;
15
+ // _e80bchi7b:/Users/pavlotymchuk/projects/js/novu-2/packages/js/src/ui/index.directcss
16
+ var ui_default = `.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box";background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}}.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.\\!nt-pointer-events-auto{pointer-events:auto!important}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-0{inset:0}.nt-inset-2{inset:.5rem}.nt-bottom-0{bottom:0}.nt-left-0{left:0}.nt-left-0\\.5{left:.125rem}.nt-right-0{right:0}.nt-right-3{right:.75rem}.nt-top-0{top:0}.nt-top-0\\.5{top:.125rem}.nt-top-3{top:.75rem}.nt-z-10{z-index:10}.nt-z-\\[-1\\]{z-index:-1}.-nt-m-1{margin:-.25rem}.nt-mx-auto{margin-left:auto;margin-right:auto}.-nt-mt-2{margin-top:-.5rem}.-nt-mt-\\[2px\\]{margin-top:-2px}.nt--mt-\\[50px\\]{margin-top:-50px}.nt-mb-1{margin-bottom:.25rem}.nt-mb-2{margin-bottom:.5rem}.nt-mb-3{margin-bottom:.75rem}.nt-mb-4{margin-bottom:1rem}.nt-mb-\\[0\\.625rem\\]{margin-bottom:.625rem}.nt-ml-1{margin-left:.25rem}.nt-ml-2{margin-left:.5rem}.nt-ml-auto{margin-left:auto}.nt-mr-2{margin-right:.5rem}.nt-mr-auto{margin-right:auto}.nt-mt-1{margin-top:.25rem}.nt-mt-1\\.5{margin-top:.375rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-aspect-square{aspect-ratio:1/1}.nt-size-1\\.5{height:.375rem;width:.375rem}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\\.5{height:.625rem;width:.625rem}.nt-size-3{height:.75rem;width:.75rem}.nt-size-3\\.5{height:.875rem;width:.875rem}.nt-size-4{height:1rem;width:1rem}.nt-size-5{height:1.25rem;width:1.25rem}.nt-size-6{height:1.5rem;width:1.5rem}.nt-size-8{height:2rem;width:2rem}.nt-size-fit{height:fit-content;width:fit-content}.nt-size-full{height:100%;width:100%}.nt-h-2{height:.5rem}.nt-h-3{height:.75rem}.nt-h-3\\.5{height:.875rem}.nt-h-4{height:1rem}.nt-h-5{height:1.25rem}.nt-h-6{height:1.5rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-9{height:2.25rem}.nt-h-\\[600px\\]{height:600px}.nt-h-auto{height:auto}.nt-h-fit{height:fit-content}.nt-h-full{height:100%}.nt-max-h-\\[160px\\]{max-height:160px}.nt-min-h-0{min-height:0}.nt-min-h-\\[272px\\]{min-height:272px}.nt-w-1\\.5{width:.375rem}.nt-w-1\\/3{width:33.333333%}.nt-w-2\\/3{width:66.666667%}.nt-w-5{width:1.25rem}.nt-w-7{width:1.75rem}.nt-w-8{width:2rem}.nt-w-\\[260px\\]{width:260px}.nt-w-\\[350px\\]{width:350px}.nt-w-\\[3px\\]{width:3px}.nt-w-\\[400px\\]{width:400px}.nt-w-\\[60px\\]{width:60px}.nt-w-\\[calc\\(2ch\\+2rem\\)\\]{width:calc(2ch + 2rem)}.nt-w-fit{width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:max-content}.nt-min-w-52{min-width:13rem}.nt-min-w-\\[120px\\]{min-width:120px}.nt-min-w-\\[220px\\]{min-width:220px}.nt-min-w-\\[74px\\]{min-width:74px}.nt-max-w-56{max-width:14rem}.nt-max-w-\\[120px\\]{max-width:120px}.nt-max-w-\\[220px\\]{max-width:220px}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.nt-translate-x-1\\/2{--tw-translate-x:50%}.nt-transform,.nt-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes nt-shimmer{0%{opacity:1}50%{opacity:.6}to{opacity:1}}.nt-animate-shimmer{animation:nt-shimmer 1.5s ease-in-out infinite}@keyframes nt-spin{to{transform:rotate(1turn)}}.nt-animate-spin{animation:nt-spin 1s linear infinite}.nt-cursor-default{cursor:default}.nt-cursor-not-allowed{cursor:not-allowed}.nt-cursor-pointer{cursor:pointer}.nt-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.nt-flex-row{flex-direction:row}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-end{justify-content:flex-end}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-0\\.5{gap:.125rem}.nt-gap-1{gap:.25rem}.nt-gap-1\\.5{gap:.375rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-auto{overflow:auto}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-overflow-x-hidden{overflow-x:hidden}.nt-truncate{overflow:hidden;text-overflow:ellipsis}.nt-truncate,.nt-whitespace-nowrap{white-space:nowrap}.nt-whitespace-pre-wrap{white-space:pre-wrap}.nt-rounded{border-radius:var(--nv-radius-base)}.nt-rounded-full{border-radius:var(--nv-radius-full)}.nt-rounded-lg{border-radius:var(--nv-radius-lg)}.nt-rounded-md{border-radius:var(--nv-radius-md)}.nt-rounded-sm{border-radius:var(--nv-radius-sm)}.nt-rounded-xl{border-radius:var(--nv-radius-xl)}.nt-rounded-b-lg{border-bottom-left-radius:var(--nv-radius-lg);border-bottom-right-radius:var(--nv-radius-lg)}.nt-border{border-width:1px}.nt-border-b{border-bottom-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-border{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.nt-border-neutral-alpha-100{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-border-neutral-alpha-50{border-color:var(--nv-color-neutral-alpha-50)}.nt-border-primary{border-color:var(--nv-color-primary)}.nt-border-t-neutral-alpha-200{border-top-color:var(--nv-color-neutral-alpha-200)}.nt-bg-\\[oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.1\\)\\]{background-color:oklch(from var(--nv-color-stripes) l c h/.1)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.nt-bg-neutral-alpha-100{background-color:var(--nv-color-neutral-alpha-100)}.nt-bg-neutral-alpha-25{background-color:var(--nv-color-neutral-alpha-25)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-primary-alpha-300{background-color:var(--nv-color-primary-alpha-300)}.nt-bg-primary-alpha-400{background-color:var(--nv-color-primary-alpha-400)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-bg-severity-high{background-color:var(--nv-color-severity-high)}.nt-bg-severity-high-alpha-100{background-color:var(--nv-color-severity-high-alpha-100)}.nt-bg-severity-high-alpha-200{background-color:var(--nv-color-severity-high-alpha-200)}.nt-bg-severity-high-alpha-300{background-color:var(--nv-color-severity-high-alpha-300)}.nt-bg-severity-high-alpha-50{background-color:var(--nv-color-severity-high-alpha-50)}.nt-bg-severity-low{background-color:var(--nv-color-severity-low)}.nt-bg-severity-low-alpha-100{background-color:var(--nv-color-severity-low-alpha-100)}.nt-bg-severity-low-alpha-200{background-color:var(--nv-color-severity-low-alpha-200)}.nt-bg-severity-low-alpha-300{background-color:var(--nv-color-severity-low-alpha-300)}.nt-bg-severity-low-alpha-50{background-color:var(--nv-color-severity-low-alpha-50)}.nt-bg-severity-medium{background-color:var(--nv-color-severity-medium)}.nt-bg-severity-medium-alpha-100{background-color:var(--nv-color-severity-medium-alpha-100)}.nt-bg-severity-medium-alpha-200{background-color:var(--nv-color-severity-medium-alpha-200)}.nt-bg-severity-medium-alpha-300{background-color:var(--nv-color-severity-medium-alpha-300)}.nt-bg-severity-medium-alpha-50{background-color:var(--nv-color-severity-medium-alpha-50)}.nt-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.nt-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.nt-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nt-from-foreground-alpha-50{--tw-gradient-from:var(--nv-color-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-primary-foreground-alpha-200{--tw-gradient-from:var(--nv-color-primary-foreground-alpha-200) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-20\\%{--tw-gradient-from-position:20%}.nt-to-background{--tw-gradient-to:var(--nv-color-background) var(--tw-gradient-to-position)}.nt-to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.nt-object-cover{object-fit:cover}.nt-p-0{padding:0}.nt-p-0\\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-2\\.5{padding:.625rem}.nt-p-3{padding:.75rem}.nt-p-4{padding:1rem}.nt-px-1{padding-left:.25rem;padding-right:.25rem}.nt-px-2{padding-left:.5rem;padding-right:.5rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-4{padding-left:1rem;padding-right:1rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\\[6px\\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.nt-py-2{padding-bottom:.5rem;padding-top:.5rem}.nt-py-3{padding-bottom:.75rem;padding-top:.75rem}.nt-py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-px{padding-bottom:1px;padding-top:1px}.nt-pb-12{padding-bottom:3rem}.nt-pb-2{padding-bottom:.5rem}.nt-pb-\\[0\\.625rem\\]{padding-bottom:.625rem}.nt-pr-0{padding-right:0}.nt-pt-2{padding-top:.5rem}.nt-pt-2\\.5{padding-top:.625rem}.nt-pt-8{padding-top:2rem}.nt-text-left{text-align:left}.nt-text-center{text-align:center}.nt-text-start{text-align:start}.nt-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nt-text-\\[0\\.8rem\\]{font-size:.8rem}.nt-text-\\[12px\\]{font-size:12px}.nt-text-base{font-size:var(--nv-font-size-base);line-height:var(--nv-line-height-base)}.nt-text-sm{font-size:var(--nv-font-size-sm);line-height:var(--nv-line-height-sm)}.nt-text-xl{font-size:var(--nv-font-size-xl);line-height:var(--nv-line-height-xl)}.nt-text-xs{font-size:var(--nv-font-size-xs);line-height:var(--nv-line-height-xs)}.nt-font-medium{font-weight:500}.nt-font-normal{font-weight:400}.nt-font-semibold{font-weight:600}.nt-leading-none{line-height:1}.nt-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-300{color:var(--nv-color-foreground-alpha-300)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-foreground-alpha-700{color:var(--nv-color-foreground-alpha-700)}.nt-text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.nt-text-neutral-alpha-500{color:var(--nv-color-neutral-alpha-500)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-stripes{color:var(--nv-color-stripes)}.nt-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.nt-underline{text-decoration-line:underline}.nt-opacity-0{opacity:0}.nt-opacity-20{opacity:.2}.nt-opacity-50{opacity:.5}.nt-shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-primary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-primary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-secondary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-secondary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\]{--tw-shadow:0px 1px 2px 0px #0a0d1408;--tw-shadow-colored:0px 1px 2px 0px var(--tw-shadow-color)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\],.nt-shadow-dropdown{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-dropdown{--tw-shadow:0px 12px 16px -4px oklch(from var(--nv-color-shadow) l c h/0.08),0px 4px 6px -2px oklch(from var(--nv-color-shadow) l c h/0.03);--tw-shadow-colored:0px 12px 16px -4px var(--tw-shadow-color),0px 4px 6px -2px var(--tw-shadow-color)}.nt-shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nt-shadow-lg,.nt-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.nt-shadow-popover{--tw-shadow:0px 8px 26px 0px oklch(from var(--nv-color-shadow) l c h/0.08),0px 2px 6px 0px oklch(from var(--nv-color-shadow) l c h/0.12);--tw-shadow-colored:0px 8px 26px 0px var(--tw-shadow-color),0px 2px 6px 0px var(--tw-shadow-color)}.nt-shadow-popover,.nt-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 oklch(from var(--nv-color-shadow) l c h/0.08);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-ring-offset-background{--tw-ring-offset-color:var(--nv-color-background)}.nt-backdrop-blur-lg{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-\\[width\\]{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.nt-will-change-\\[width\\]{will-change:width}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-foreground\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-foreground) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 80% c h)}.\\[--bell-gradient-start\\:var\\(--nv-color-foreground\\)\\]{--bell-gradient-start:var(--nv-color-foreground)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-high\\)\\]{--bell-gradient-start:var(--nv-color-severity-high)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-low\\)\\]{--bell-gradient-start:var(--nv-color-severity-low)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-medium\\)\\]{--bell-gradient-start:var(--nv-color-severity-medium)}.\\[interpolate-size\\:allow-keywords\\]{interpolate-size:allow-keywords}.\\[line-height\\:16px\\]{line-height:16px}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.\\[word-break\\:break-word\\]{word-break:break-word}.before\\:nt-absolute:before{content:var(--tw-content);position:absolute}.before\\:nt-inset-0:before{content:var(--tw-content);inset:0}.before\\:-nt-right-\\[calc\\(0\\+var\\(--stripes-size\\)\\)\\]:before{content:var(--tw-content);right:calc(var(--stripes-size)*-1)}.before\\:nt-m-1:before{content:var(--tw-content);margin:.25rem}@keyframes nt-stripes{0%{content:var(--tw-content);transform:translateX(0)}to{content:var(--tw-content);transform:translateX(calc(var(--stripes-size)*-1))}}.before\\:nt-animate-stripes:before{animation:nt-stripes 1s linear infinite paused;content:var(--tw-content)}.before\\:nt-rounded-full:before{border-radius:var(--nv-radius-full);content:var(--tw-content)}.before\\:nt-rounded-md:before{border-radius:var(--nv-radius-md);content:var(--tw-content)}.before\\:nt-rounded-xl:before{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.before\\:nt-border:before{border-width:1px;content:var(--tw-content)}.before\\:nt-border-primary-foreground-alpha-100:before{border-color:var(--nv-color-primary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-border-secondary-foreground-alpha-100:before{border-color:var(--nv-color-secondary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-200:before{background-color:var(--nv-color-severity-high-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-300:before{background-color:var(--nv-color-severity-high-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-200:before{background-color:var(--nv-color-severity-low-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-300:before{background-color:var(--nv-color-severity-low-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-200:before{background-color:var(--nv-color-severity-medium-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-300:before{background-color:var(--nv-color-severity-medium-alpha-300);content:var(--tw-content)}.before\\:nt-bg-dev-stripes-gradient:before{background-image:repeating-linear-gradient(135deg,oklch(from var(--nv-color-stripes) l c h/.1) 25%,oklch(from var(--nv-color-stripes) l c h/.1) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 75%);content:var(--tw-content)}.before\\:nt-bg-\\[length\\:var\\(--stripes-size\\)_var\\(--stripes-size\\)\\]:before{background-size:var(--stripes-size) var(--stripes-size);content:var(--tw-content)}.before\\:nt-content-\\[\\"\\"\\]:before{--tw-content:"";content:var(--tw-content)}.before\\:\\[mask-image\\:linear-gradient\\(transparent_0\\%\\2c black\\)\\]:before{content:var(--tw-content);-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.after\\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\\:nt-inset-0:after{content:var(--tw-content);inset:0}.after\\:-nt-top-12:after{content:var(--tw-content);top:-3rem}.after\\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:nt-left-0:after{content:var(--tw-content);left:0}.after\\:nt-left-0\\.5:after{content:var(--tw-content);left:.125rem}.after\\:nt-top-0\\.5:after{content:var(--tw-content);top:.125rem}.after\\:nt-size-3:after{content:var(--tw-content);height:.75rem;width:.75rem}.after\\:nt-h-\\[2px\\]:after{content:var(--tw-content);height:2px}.after\\:nt-w-full:after{content:var(--tw-content);width:100%}.after\\:nt-translate-x-1\\/2:after{--tw-translate-x:50%}.after\\:nt-translate-x-1\\/2:after,.after\\:nt-translate-x-full:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:nt-translate-x-full:after{--tw-translate-x:100%}.after\\:nt-rounded-full:after{border-radius:var(--nv-radius-full);content:var(--tw-content)}.after\\:nt-rounded-md:after{border-radius:var(--nv-radius-md);content:var(--tw-content)}.after\\:nt-rounded-xl:after{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.after\\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.07\\)_55\\%\\2c transparent\\)\\2c linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-stripes) l c h/.07) 55%,#0000),linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-gradient-to-b:after{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));content:var(--tw-content)}.after\\:nt-from-primary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-primary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-from-secondary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-secondary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-to-transparent:after{content:var(--tw-content);--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.after\\:nt-opacity-0:after{content:var(--tw-content);opacity:0}.after\\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-transition-opacity:after{content:var(--tw-content);transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-duration-200:after{transition-duration:.2s}.after\\:nt-content-\\[\\"\\"\\]:after,.after\\:nt-content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.after\\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\\:nt-bg-neutral-alpha-100:hover{background-color:var(--nv-color-neutral-alpha-100)}.hover\\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\\:nt-bg-primary-alpha-25:hover{background-color:var(--nv-color-primary-alpha-25)}.hover\\:nt-bg-primary-alpha-400:hover{background-color:var(--nv-color-primary-alpha-400)}.hover\\:nt-bg-severity-high-alpha-50:hover{background-color:var(--nv-color-severity-high-alpha-50)}.hover\\:nt-bg-severity-low-alpha-50:hover{background-color:var(--nv-color-severity-low-alpha-50)}.hover\\:nt-bg-severity-medium-alpha-50:hover{background-color:var(--nv-color-severity-medium-alpha-50)}.hover\\:nt-text-foreground-alpha-800:hover{color:var(--nv-color-foreground-alpha-800)}.before\\:hover\\:\\[animation-play-state\\:running\\]:hover:before{animation-play-state:running;content:var(--tw-content)}.hover\\:after\\:nt-opacity-100:hover:after{content:var(--tw-content);opacity:1}.focus\\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-rounded-lg:focus-visible{border-radius:var(--nv-radius-lg)}.focus-visible\\:nt-rounded-md:focus-visible{border-radius:var(--nv-radius-md)}.focus-visible\\:nt-rounded-xl:focus-visible{border-radius:var(--nv-radius-xl)}.focus-visible\\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\\:nt-ring-ring:focus-visible{--tw-ring-color:var(--nv-color-ring)}.focus-visible\\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\\:nt-opacity-20:disabled{opacity:.2}.disabled\\:nt-opacity-50:disabled{opacity:.5}.nt-group:focus-within .group-focus-within\\:nt-opacity-100{opacity:1}.nt-group:hover .group-hover\\:nt-bg-severity-high-alpha-500{background-color:var(--nv-color-severity-high-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-low-alpha-500{background-color:var(--nv-color-severity-low-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-medium-alpha-500{background-color:var(--nv-color-severity-medium-alpha-500)}.nt-group:hover .group-hover\\:nt-opacity-0{opacity:0}.nt-group:hover .group-hover\\:nt-opacity-100{opacity:1}.nt-peer:focus-visible~.peer-focus-visible\\:nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-offset-2{--tw-ring-offset-width:2px}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true],.data-\\[open\\=true\\]\\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\]\\:nt-cursor-not-allowed[data-disabled]{cursor:not-allowed}.data-\\[checked\\]\\:nt-border-none[data-checked],.data-\\[indeterminate\\]\\:nt-border-none[data-indeterminate]{border-style:none}.data-\\[checked\\]\\:nt-bg-primary[data-checked],.data-\\[indeterminate\\]\\:nt-bg-primary[data-indeterminate]{background-color:var(--nv-color-primary)}.data-\\[checked\\]\\:nt-text-primary-foreground[data-checked]{color:var(--nv-color-primary-foreground)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\\[indeterminate\\]\\:nt-text-primary-foreground[data-indeterminate]{color:var(--nv-color-primary-foreground)}.data-\\[state\\=active\\]\\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\\[disabled\\]\\:nt-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:after\\:nt-border-b-2[data-state=active]:after{border-bottom-width:2px;content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-opacity-100[data-state=active]:after{content:var(--tw-content);opacity:1}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:nt-border-t:not(:first-child){border-top-width:1px}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-12 .nv-notificationList{padding-bottom:3rem}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-8 .nv-notificationList{padding-bottom:2rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-12 .nv-preferencesContainer{padding-bottom:3rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-8 .nv-preferencesContainer{padding-bottom:2rem}.\\[\\&_stop\\]\\:nt-transition-\\[stop-color\\] stop{transition-duration:.15s;transition-property:stop-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\[\\&_svg\\]\\:nt-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:nt-shrink-0 svg{flex-shrink:0}`;
17
17
 
18
18
  // src/ui/config/appearanceKeys.ts
19
- var appearanceKeys = [
19
+ var commonAppearanceKeys = [
20
20
  // Primitives
21
+ "root",
21
22
  "button",
22
23
  "input",
23
24
  "icon",
@@ -25,6 +26,27 @@ var appearanceKeys = [
25
26
  "popoverContent",
26
27
  "popoverTrigger",
27
28
  "popoverClose",
29
+ "collapsible",
30
+ "tooltipContent",
31
+ "tooltipTrigger"
32
+ ];
33
+ var inboxAppearanceKeys = [
34
+ // General
35
+ "bellIcon",
36
+ "lockIcon",
37
+ "bellContainer",
38
+ "severityHigh__bellContainer",
39
+ "severityMedium__bellContainer",
40
+ "severityLow__bellContainer",
41
+ "bellSeverityGlow",
42
+ "severityGlowHigh__bellSeverityGlow",
43
+ "severityGlowMedium__bellSeverityGlow",
44
+ "severityGlowLow__bellSeverityGlow",
45
+ "bellDot",
46
+ "preferences__button",
47
+ "preferencesContainer",
48
+ "inboxHeader",
49
+ "loading",
28
50
  "dropdownContent",
29
51
  "dropdownTrigger",
30
52
  "dropdownItem",
@@ -33,9 +55,6 @@ var appearanceKeys = [
33
55
  "dropdownItemLeft__icon",
34
56
  "dropdownItemRight__icon",
35
57
  "dropdownItem__icon",
36
- "collapsible",
37
- "tooltipContent",
38
- "tooltipTrigger",
39
58
  "datePicker",
40
59
  "datePickerGrid",
41
60
  "datePickerGridRow",
@@ -74,23 +93,6 @@ var appearanceKeys = [
74
93
  "tabsContent",
75
94
  "tabsTrigger",
76
95
  "dots",
77
- // General
78
- "root",
79
- "bellIcon",
80
- "lockIcon",
81
- "bellContainer",
82
- "severityHigh__bellContainer",
83
- "severityMedium__bellContainer",
84
- "severityLow__bellContainer",
85
- "bellSeverityGlow",
86
- "severityGlowHigh__bellSeverityGlow",
87
- "severityGlowMedium__bellSeverityGlow",
88
- "severityGlowLow__bellSeverityGlow",
89
- "bellDot",
90
- "preferences__button",
91
- "preferencesContainer",
92
- "inboxHeader",
93
- "loading",
94
96
  // Inbox
95
97
  "inboxContent",
96
98
  "inbox__popoverTrigger",
@@ -279,8 +281,51 @@ var appearanceKeys = [
279
281
  // Text formatting
280
282
  "strong"
281
283
  ];
282
- var defaultLocalization = {
283
- locale: "en-US",
284
+ var subscriptionAppearanceKeys = [
285
+ // Subscription
286
+ "subscriptionContainer",
287
+ // Subscription Button
288
+ "subscriptionButton__button",
289
+ "subscriptionButtonContainer",
290
+ "subscriptionButtonIcon",
291
+ "subscriptionButtonLabel",
292
+ // Subscription Popover
293
+ "subscription__popoverTriggerContainer",
294
+ "subscription__popoverTrigger",
295
+ "subscriptionTriggerIcon",
296
+ "subscription__popoverContent",
297
+ // Subscription Preferences
298
+ "subscriptionPreferencesContainer",
299
+ "subscriptionPreferencesHeaderContainer",
300
+ "subscriptionPreferencesHeader",
301
+ "subscriptionPreferencesInfoIcon",
302
+ "subscriptionPreferencesContent",
303
+ "subscriptionPreferencesGroupsContainer",
304
+ // Subscription Preferences Fallback
305
+ "subscriptionPreferencesFallback",
306
+ "subscriptionPreferencesFallbackTexts",
307
+ "subscriptionPreferencesFallbackHeader",
308
+ "subscriptionPreferencesFallbackDescription",
309
+ // Subscription Preference Row
310
+ "subscriptionPreferenceRow",
311
+ "subscriptionPreferenceLabel",
312
+ // Subscription Preference Group Row
313
+ "subscriptionPreferenceGroupContainer",
314
+ "subscriptionPreferenceGroupHeader",
315
+ "subscriptionPreferenceGroupLabelContainer",
316
+ "subscriptionPreferenceGroupLabelIcon",
317
+ "subscriptionPreferenceGroupLabel",
318
+ "subscriptionPreferenceGroupActionsContainer",
319
+ "subscriptionPreferenceGroupActionsContainerRight__icon",
320
+ "subscriptionPreferenceGroupBody",
321
+ "subscriptionPreferenceGroupWorkflowRow",
322
+ "subscriptionPreferenceGroupWorkflowLabel"
323
+ ];
324
+ var appearanceKeys = [...commonAppearanceKeys, ...inboxAppearanceKeys, ...subscriptionAppearanceKeys];
325
+ var commonLocalization = {
326
+ locale: "en-US"
327
+ };
328
+ var defaultInboxLocalization = __spreadProps(__spreadValues({}, commonLocalization), {
284
329
  "inbox.filters.dropdownOptions.unread": "Unread only",
285
330
  "inbox.filters.dropdownOptions.default": "Unread & read",
286
331
  "inbox.filters.dropdownOptions.archived": "Archived",
@@ -335,7 +380,18 @@ var defaultLocalization = {
335
380
  "snooze.options.customTime": "Custom time...",
336
381
  "snooze.options.inOneDay": "Tomorrow",
337
382
  "snooze.options.inOneWeek": "Next week"
338
- };
383
+ });
384
+ var defaultSubscriptionLocalization = __spreadProps(__spreadValues({}, commonLocalization), {
385
+ "subscription.subscribe": "Subscribe",
386
+ "subscription.unsubscribe": "Unsubscribe",
387
+ "subscription.preferences.header": "Manage subscription",
388
+ "subscription.preferences.headerInfo": "Manage which updates you\u2019d like to receive. Note: Workflow and global settings control delivery and take precedence when disabled.",
389
+ "subscription.preferences.notSubscribed.header": "You\u2019re not subscribed.",
390
+ "subscription.preferences.notSubscribed.description": "Subscribe to receive updates on new activity.",
391
+ "subscription.preferences.empty.header": "You\u2019re subscribed.",
392
+ "subscription.preferences.empty.description": "Nothing to manage right now."
393
+ });
394
+ var defaultLocalization = __spreadValues(__spreadValues({}, defaultInboxLocalization), defaultSubscriptionLocalization);
339
395
  var [dynamicLocalization, setDynamicLocalization] = createSignal({});
340
396
 
341
397
  // src/ui/config/defaultVariables.ts
@@ -368,7 +424,10 @@ function createInfiniteScroll(fetcher, options) {
368
424
  const [after, setAfter] = createSignal(void 0);
369
425
  const [end, setEnd] = createSignal(false);
370
426
  const [contents, { mutate, refetch }] = createResource(
371
- () => ({ trigger: true, after: after() }),
427
+ () => {
428
+ var _a;
429
+ return { trigger: true, after: after(), dependency: (_a = options.dependency) == null ? void 0 : _a.call(options) };
430
+ },
372
431
  (params) => fetcher(params.after)
373
432
  );
374
433
  let observedElement = null;
@@ -722,10 +781,10 @@ var NotificationVisibilityTracker = class {
722
781
 
723
782
  // src/ui/helpers/useNotificationVisibility.ts
724
783
  function useNotificationVisibility() {
725
- const novu = useNovu();
784
+ const novuAccessor = useNovu();
726
785
  let tracker = null;
727
- onMount(() => {
728
- tracker = new NotificationVisibilityTracker(novu.notifications.inboxService);
786
+ createEffect(() => {
787
+ tracker = new NotificationVisibilityTracker(novuAccessor().notifications.inboxService);
729
788
  onCleanup(() => {
730
789
  if (tracker) {
731
790
  tracker.destroy();
@@ -965,6 +1024,9 @@ var useStyle = () => {
965
1024
  iconKey,
966
1025
  context
967
1026
  }) => {
1027
+ if (!key) {
1028
+ return cn(className);
1029
+ }
968
1030
  const appearanceKeyParts = key.split("__");
969
1031
  let finalAppearanceKeys = [];
970
1032
  for (let i = 0; i < appearanceKeyParts.length; i += 1) {
@@ -1059,46 +1121,32 @@ function requestLock(id, cb) {
1059
1121
  promiseResolve();
1060
1122
  };
1061
1123
  }
1062
- var useBrowserTabsChannel = ({
1063
- channelName,
1064
- onMessage
1065
- }) => {
1066
- const [tabsChannel] = createSignal(new BroadcastChannel(channelName));
1067
- const postMessage = (args) => {
1068
- const channel = tabsChannel();
1069
- channel.postMessage(args);
1070
- };
1071
- onMount(() => {
1072
- const listener = (event) => {
1073
- onMessage(event.data);
1074
- };
1075
- const channel = tabsChannel();
1076
- channel.addEventListener("message", listener);
1077
- onCleanup(() => {
1078
- channel.removeEventListener("message", listener);
1079
- });
1080
- });
1081
- return { postMessage };
1082
- };
1083
1124
 
1084
1125
  // src/ui/helpers/useWebSocketEvent.ts
1085
1126
  var useWebSocketEvent = ({
1086
1127
  event: webSocketEvent,
1087
1128
  eventHandler: onMessage
1088
1129
  }) => {
1089
- const novu = useNovu();
1090
- const channelName = `nv_ws_connection:a=${novu.applicationIdentifier}:s=${novu.subscriberId}:c=${novu.contextKey}:e=${webSocketEvent}`;
1091
- const { postMessage } = useBrowserTabsChannel({ channelName, onMessage });
1092
- const updateReadCount = (data) => {
1093
- onMessage(data);
1094
- postMessage(data);
1095
- };
1096
- onMount(() => {
1130
+ const novuAccessor = useNovu();
1131
+ createEffect(() => {
1132
+ const currentNovu = novuAccessor();
1133
+ const channelName = `nv_ws_connection:a=${currentNovu.applicationIdentifier}:s=${currentNovu.subscriberId}:c=${currentNovu.contextKey}:e=${webSocketEvent}`;
1134
+ const tabsChannel = new BroadcastChannel(channelName);
1135
+ const listener = (event) => {
1136
+ onMessage(event.data);
1137
+ };
1138
+ tabsChannel.addEventListener("message", listener);
1139
+ const updateReadCount = (data) => {
1140
+ onMessage(data);
1141
+ tabsChannel.postMessage(data);
1142
+ };
1097
1143
  let cleanup;
1098
1144
  const resolveLock = requestLock(channelName, () => {
1099
- cleanup = novu.on(webSocketEvent, updateReadCount);
1145
+ cleanup = currentNovu.on(webSocketEvent, updateReadCount);
1100
1146
  });
1101
1147
  onCleanup(() => {
1148
+ tabsChannel.removeEventListener("message", listener);
1149
+ tabsChannel.close();
1102
1150
  if (cleanup) {
1103
1151
  cleanup();
1104
1152
  }
@@ -1218,9 +1266,10 @@ var useNovuEvent = ({
1218
1266
  event,
1219
1267
  eventHandler
1220
1268
  }) => {
1221
- const novu = useNovu();
1222
- onMount(() => {
1223
- const cleanup = novu.on(event, eventHandler);
1269
+ const novuAccessor = useNovu();
1270
+ createEffect(() => {
1271
+ const currentNovu = novuAccessor();
1272
+ const cleanup = currentNovu.on(event, eventHandler);
1224
1273
  onCleanup(() => {
1225
1274
  cleanup();
1226
1275
  });
@@ -1262,15 +1311,6 @@ function useLocalization() {
1262
1311
  return context;
1263
1312
  }
1264
1313
 
1265
- // src/ui/types.ts
1266
- var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
1267
- NotificationStatus2["UNREAD_READ"] = "unreadRead";
1268
- NotificationStatus2["UNREAD"] = "unread";
1269
- NotificationStatus2["ARCHIVED"] = "archived";
1270
- NotificationStatus2["SNOOZED"] = "snoozed";
1271
- return NotificationStatus2;
1272
- })(NotificationStatus || {});
1273
-
1274
1314
  // src/ui/context/InboxContext.tsx
1275
1315
  var InboxContext = createContext(void 0);
1276
1316
  var STATUS_TO_FILTER = {
@@ -1430,11 +1470,12 @@ var useInboxContext = () => {
1430
1470
  };
1431
1471
  var NovuContext = createContext(void 0);
1432
1472
  function NovuProvider(props) {
1433
- const novu = createMemo(() => props.novu || new Novu(props.options));
1473
+ const novu = createMemo(() => {
1474
+ const novuValue = typeof props.novu === "function" ? props.novu() : props.novu;
1475
+ return novuValue || new Novu(props.options);
1476
+ });
1434
1477
  return createComponent(NovuContext.Provider, {
1435
- get value() {
1436
- return novu();
1437
- },
1478
+ value: novu,
1438
1479
  get children() {
1439
1480
  return props.children;
1440
1481
  }
@@ -1452,7 +1493,7 @@ function useNovu() {
1452
1493
  var MIN_AMOUNT_OF_NOTIFICATIONS = 1;
1453
1494
  var CountContext = createContext(void 0);
1454
1495
  var CountProvider = (props) => {
1455
- const novu = useNovu();
1496
+ const novuAccessor = useNovu();
1456
1497
  const {
1457
1498
  isOpened,
1458
1499
  tabs,
@@ -1488,7 +1529,7 @@ var CountProvider = (props) => {
1488
1529
  });
1489
1530
  const {
1490
1531
  data
1491
- } = yield novu.notifications.count({
1532
+ } = yield novuAccessor().notifications.count({
1492
1533
  filters
1493
1534
  });
1494
1535
  if (!data) {
@@ -1508,7 +1549,8 @@ var CountProvider = (props) => {
1508
1549
  }
1509
1550
  setUnreadCounts(newMap);
1510
1551
  });
1511
- onMount(() => {
1552
+ createEffect(() => {
1553
+ novuAccessor();
1512
1554
  updateTabCounts();
1513
1555
  });
1514
1556
  useWebSocketEvent({
@@ -1530,7 +1572,7 @@ var CountProvider = (props) => {
1530
1572
  }
1531
1573
  });
1532
1574
  const updateNewNotificationCountsOrCache = (tabLabel, notification, tags, data, severity) => {
1533
- const notificationsCache = novu.notifications.cache;
1575
+ const notificationsCache = novuAccessor().notifications.cache;
1534
1576
  const limitValue = limit();
1535
1577
  const tabSpecificFilterForCache = __spreadProps(__spreadValues({}, filter()), {
1536
1578
  tags,
@@ -2482,7 +2524,7 @@ function CopyToClipboard(props) {
2482
2524
  // src/ui/components/elements/Footer.tsx
2483
2525
  var _tmpl$31 = /* @__PURE__ */ template(`<span class="nt-z-10 nt-text-xs nt-text-stripes">`);
2484
2526
  var _tmpl$210 = /* @__PURE__ */ template(`<span class="nt-z-10 nt-text-xs">\u2022`);
2485
- var _tmpl$32 = /* @__PURE__ */ template(`<a target=_blank class="nt-z-10 nt-flex nt-items-center nt-gap-1 nt-justify-center"><span class=nt-text-xs>Inbox by</span><span class=nt-text-xs>Novu`);
2527
+ var _tmpl$32 = /* @__PURE__ */ template(`<a target=_blank class="nt-z-10 nt-flex nt-items-center nt-gap-1 nt-justify-center"><span class=nt-text-xs></span><span class=nt-text-xs>Novu`);
2486
2528
  var _tmpl$42 = /* @__PURE__ */ template(`<span class=nt-underline>Copy cURL`);
2487
2529
  var _tmpl$52 = /* @__PURE__ */ template(`<div class="nt-z-10 nt-flex nt-items-center nt-gap-1 nt-text-xs nt-text-secondary-foreground"><a href=https://go.novu.co/keyless class="nt-underline nt-flex nt-items-center nt-gap-0.5"target=_blank rel="noopener noreferrer">Get API key</a><span>\u2022</span><span>\u2022</span><button type=button class=nt-underline>Send notification`);
2488
2530
  var _tmpl$62 = /* @__PURE__ */ template(`<div><div class="nt-flex nt-items-center nt-gap-1">`);
@@ -2492,17 +2534,17 @@ var stripes = `before:nt-content-[""] before:nt-absolute before:nt-inset-0 befor
2492
2534
  var commonAfter = 'after:nt-content-[""] after:nt-absolute after:nt-inset-0 after:-nt-top-12';
2493
2535
  var devModeGradient = `${commonAfter} after:nt-bg-[linear-gradient(180deg,transparent,oklch(from_var(--nv-color-stripes)_l_c_h_/_0.07)_55%,transparent),linear-gradient(180deg,transparent,oklch(from_var(--nv-color-background)_l_c_h_/_0.9)_55%,transparent)]`;
2494
2536
  var prodModeGradient = `${commonAfter} after:nt-bg-[linear-gradient(180deg,transparent,oklch(from_var(--nv-color-background)_l_c_h_/_0.9)_55%,transparent)]`;
2495
- var Footer = () => {
2537
+ var Footer = (props) => {
2496
2538
  const {
2497
2539
  hideBranding,
2498
2540
  isDevelopmentMode,
2499
2541
  isKeyless
2500
2542
  } = useInboxContext();
2501
- const novu = useNovu();
2543
+ const novuAccessor = useNovu();
2502
2544
  function handleTriggerHelloWorld() {
2503
2545
  return __async(this, null, function* () {
2504
2546
  try {
2505
- yield novu.notifications.triggerHelloWorldEvent();
2547
+ yield novuAccessor().notifications.triggerHelloWorldEvent();
2506
2548
  } catch (error) {
2507
2549
  console.error("Failed to send Hello World from UI via novu.notifications:", error);
2508
2550
  }
@@ -2555,6 +2597,7 @@ var Footer = () => {
2555
2597
  },
2556
2598
  get children() {
2557
2599
  var _el$5 = _tmpl$32(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
2600
+ insert(_el$6, () => props.name ? `${props.name} by` : "Inbox by");
2558
2601
  insert(_el$5, createComponent(Novu2, {
2559
2602
  "class": "nt-size-2.5"
2560
2603
  }), _el$7);
@@ -2634,9 +2677,9 @@ var buttonVariants = cva(cn('nt-inline-flex nt-gap-4 nt-items-center nt-justify-
2634
2677
  none: "",
2635
2678
  iconSm: "nt-p-1 nt-rounded-md after:nt-rounded-md before:nt-rounded-md focus-visible:nt-rounded-md",
2636
2679
  icon: "nt-p-2.5 nt-rounded-xl before:nt-rounded-xl after:nt-rounded-xl focus-visible:nt-rounded-xl",
2637
- default: "nt-px-2 nt-py-1 nt-rounded-lg focus-visible:nt-rounded-lg before:nt-rounded-lg after:nt-rounded-lg",
2680
+ default: "nt-h-6 nt-px-2 nt-py-1 nt-rounded-md focus-visible:nt-rounded-md before:nt-rounded-md after:nt-rounded-md",
2638
2681
  sm: "nt-px-1 nt-py-px nt-rounded-md nt-text-xs nt-px-1 before:nt-rounded-md focus-visible:nt-rounded-md after:nt-rounded-md",
2639
- lg: "nt-px-8 nt-py-2 nt-text-base before:nt-rounded-lg after:nt-rounded-lg focus-visible:nt-rounded-lg"
2682
+ lg: "nt-px-8 nt-py-2 nt-text-base before:nt-rounded-md after:nt-rounded-md focus-visible:nt-rounded-md"
2640
2683
  }
2641
2684
  },
2642
2685
  defaultVariants: {
@@ -2673,7 +2716,7 @@ var Button = (props) => {
2673
2716
  var _tmpl$34 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M5 12l5 5l10 -10">`);
2674
2717
  var _tmpl$211 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M5 12l14 0">`);
2675
2718
  var Checkbox = (props) => {
2676
- const [local, others] = splitProps(props, ["class"]);
2719
+ const [local, others] = splitProps(props, ["id", "class"]);
2677
2720
  return createComponent(CheckboxPrimitive.Root, mergeProps({
2678
2721
  get ["class"]() {
2679
2722
  return cn("nt-items-top nt-group nt-relative nt-flex", local.class);
@@ -2681,7 +2724,10 @@ var Checkbox = (props) => {
2681
2724
  }, others, {
2682
2725
  get children() {
2683
2726
  return [createComponent(CheckboxPrimitive.Input, {
2684
- "class": "nt-peer"
2727
+ "class": "nt-peer",
2728
+ get id() {
2729
+ return local.id;
2730
+ }
2685
2731
  }), createComponent(CheckboxPrimitive.Control, {
2686
2732
  "class": "nt-size-4 nt-shrink-0 nt-rounded-sm nt-border nt-border-primary nt-ring-offset-background data-[disabled]:nt-cursor-not-allowed data-[disabled]:nt-opacity-50 peer-focus-visible:nt-outline-none peer-focus-visible:nt-ring-2 peer-focus-visible:ntring-ring peer-focus-visible:nt-ring-offset-2 data-[checked]:nt-border-none data-[indeterminate]:nt-border-none data-[checked]:nt-bg-primary data-[indeterminate]:nt-bg-primary data-[checked]:nt-text-primary-foreground data-[indeterminate]:nt-text-primary-foreground",
2687
2733
  get children() {
@@ -3143,7 +3189,17 @@ function usePopover() {
3143
3189
 
3144
3190
  // src/ui/components/primitives/Popover/PopoverContent.tsx
3145
3191
  var _tmpl$38 = /* @__PURE__ */ template(`<div>`);
3146
- var popoverContentVariants = () => cn("nt-w-[400px] nt-h-[600px] nt-rounded-xl nt-bg-background", "nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border nt-z-10");
3192
+ var popoverContentVariants = cva(cn("nt-rounded-xl nt-bg-background", "nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border nt-z-10"), {
3193
+ variants: {
3194
+ size: {
3195
+ inbox: "nt-w-[400px] nt-h-[600px]",
3196
+ subscription: "nt-w-[350px] nt-h-auto"
3197
+ }
3198
+ },
3199
+ defaultVariants: {
3200
+ size: "inbox"
3201
+ }
3202
+ });
3147
3203
  var PopoverContentBody = (props) => {
3148
3204
  const {
3149
3205
  open,
@@ -3171,7 +3227,10 @@ var PopoverContentBody = (props) => {
3171
3227
  get ["class"]() {
3172
3228
  return style({
3173
3229
  key: local.appearanceKey || "popoverContent",
3174
- className: cn(popoverContentVariants(), local.class)
3230
+ className: cn(popoverContentVariants({
3231
+ size: props.size
3232
+ }), local.class),
3233
+ context: props.context
3175
3234
  });
3176
3235
  },
3177
3236
  get style() {
@@ -4007,14 +4066,14 @@ var StatusDropdown = () => {
4007
4066
 
4008
4067
  // src/ui/api/hooks/useArchiveAll.ts
4009
4068
  var useArchiveAll = (props) => {
4010
- const novu = useNovu();
4069
+ const novuAccessor = useNovu();
4011
4070
  const archiveAll = (..._0) => __async(void 0, [..._0], function* ({
4012
4071
  tags,
4013
4072
  data
4014
4073
  } = {}) {
4015
4074
  var _a, _b;
4016
4075
  try {
4017
- yield novu.notifications.archiveAll({ tags, data });
4076
+ yield novuAccessor().notifications.archiveAll({ tags, data });
4018
4077
  (_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
4019
4078
  } catch (error) {
4020
4079
  (_b = void 0 ) == null ? void 0 : _b.call(props, error);
@@ -4025,14 +4084,14 @@ var useArchiveAll = (props) => {
4025
4084
 
4026
4085
  // src/ui/api/hooks/useArchiveAllRead.ts
4027
4086
  var useArchiveAllRead = (props) => {
4028
- const novu = useNovu();
4087
+ const novuAccessor = useNovu();
4029
4088
  const archiveAllRead = (..._0) => __async(void 0, [..._0], function* ({
4030
4089
  tags,
4031
4090
  data
4032
4091
  } = {}) {
4033
4092
  var _a, _b;
4034
4093
  try {
4035
- yield novu.notifications.archiveAllRead({ tags, data });
4094
+ yield novuAccessor().notifications.archiveAllRead({ tags, data });
4036
4095
  (_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
4037
4096
  } catch (error) {
4038
4097
  (_b = void 0 ) == null ? void 0 : _b.call(props, error);
@@ -4041,26 +4100,27 @@ var useArchiveAllRead = (props) => {
4041
4100
  return { archiveAllRead };
4042
4101
  };
4043
4102
  var useNotificationsInfiniteScroll = (props) => {
4044
- const novu = useNovu();
4103
+ const novuAccessor = useNovu();
4045
4104
  let filter = __spreadValues({}, props.options());
4046
4105
  const [data, { initialLoading, setEl, end, mutate, reset }] = createInfiniteScroll(
4047
4106
  (after) => __async(void 0, null, function* () {
4048
4107
  var _a, _b;
4049
- const { data: data2 } = yield novu.notifications.list(__spreadProps(__spreadValues({}, props.options() || {}), { after }));
4108
+ const { data: data2 } = yield novuAccessor().notifications.list(__spreadProps(__spreadValues({}, props.options() || {}), { after }));
4050
4109
  return { data: (_a = data2 == null ? void 0 : data2.notifications) != null ? _a : [], hasMore: (_b = data2 == null ? void 0 : data2.hasMore) != null ? _b : false };
4051
4110
  }),
4052
4111
  {
4053
- paginationField: "id"
4112
+ paginationField: "id",
4113
+ dependency: novuAccessor
4054
4114
  }
4055
4115
  );
4056
- onMount(() => {
4116
+ createEffect(() => {
4057
4117
  const listener = ({ data: data2 }) => {
4058
4118
  if (!data2 || !isSameFilter(filter, data2.filter)) {
4059
4119
  return;
4060
4120
  }
4061
4121
  mutate({ data: data2.notifications, hasMore: data2.hasMore });
4062
4122
  };
4063
- const cleanup = novu.on("notifications.list.updated", listener);
4123
+ const cleanup = novuAccessor().on("notifications.list.updated", listener);
4064
4124
  onCleanup(() => cleanup());
4065
4125
  });
4066
4126
  createEffect(() => __async(void 0, null, function* () {
@@ -4068,36 +4128,39 @@ var useNotificationsInfiniteScroll = (props) => {
4068
4128
  if (isSameFilter(filter, newFilter)) {
4069
4129
  return;
4070
4130
  }
4071
- novu.notifications.clearCache();
4131
+ novuAccessor().notifications.clearCache();
4072
4132
  yield reset();
4073
4133
  filter = newFilter;
4074
4134
  }));
4075
4135
  const refetch = (_0) => __async(void 0, [_0], function* ({ filter: filter2 }) {
4076
- novu.notifications.clearCache({ filter: filter2 });
4136
+ novuAccessor().notifications.clearCache({ filter: filter2 });
4077
4137
  yield reset();
4078
4138
  });
4079
4139
  return { data, initialLoading, setEl, end, refetch };
4080
4140
  };
4081
4141
  var usePreferences = (options) => {
4082
- const novu = useNovu();
4142
+ const novuAccessor = useNovu();
4083
4143
  const [loading, setLoading] = createSignal(true);
4084
- const [preferences, { mutate, refetch }] = createResource(options || {}, (_0) => __async(void 0, [_0], function* ({ tags, severity, criticality }) {
4085
- try {
4086
- const response = yield novu.preferences.list({ tags, severity, criticality });
4087
- return response.data;
4088
- } catch (error) {
4089
- console.error("Error fetching preferences:", error);
4090
- throw error;
4091
- }
4092
- }));
4093
- onMount(() => {
4144
+ const [preferences, { mutate, refetch }] = createResource(
4145
+ () => __spreadProps(__spreadValues({}, options), { dependency: novuAccessor() }),
4146
+ (_0) => __async(void 0, [_0], function* ({ tags, severity, criticality }) {
4147
+ try {
4148
+ const response = yield novuAccessor().preferences.list({ tags, severity, criticality });
4149
+ return response.data;
4150
+ } catch (error) {
4151
+ console.error("Error fetching preferences:", error);
4152
+ throw error;
4153
+ }
4154
+ })
4155
+ );
4156
+ createEffect(() => {
4094
4157
  const listener = ({ data }) => {
4095
4158
  if (!data) {
4096
4159
  return;
4097
4160
  }
4098
4161
  mutate(data);
4099
4162
  };
4100
- const cleanup = novu.on("preferences.list.updated", listener);
4163
+ const cleanup = novuAccessor().on("preferences.list.updated", listener);
4101
4164
  onCleanup(() => cleanup());
4102
4165
  });
4103
4166
  createEffect(() => {
@@ -4108,14 +4171,14 @@ var usePreferences = (options) => {
4108
4171
 
4109
4172
  // src/ui/api/hooks/useReadAll.ts
4110
4173
  var useReadAll = (props) => {
4111
- const novu = useNovu();
4174
+ const novuAccessor = useNovu();
4112
4175
  const readAll = (..._0) => __async(void 0, [..._0], function* ({
4113
4176
  tags,
4114
4177
  data
4115
4178
  } = {}) {
4116
4179
  var _a, _b;
4117
4180
  try {
4118
- yield novu.notifications.readAll({ tags, data });
4181
+ yield novuAccessor().notifications.readAll({ tags, data });
4119
4182
  (_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
4120
4183
  } catch (error) {
4121
4184
  (_b = void 0 ) == null ? void 0 : _b.call(props, error);
@@ -4618,23 +4681,25 @@ var Switch2 = (props) => {
4618
4681
  className: cn("nt-relative nt-inline-flex nt-cursor-pointer nt-items-center", {
4619
4682
  "nt-opacity-50 nt-cursor-not-allowed": disabled()
4620
4683
  })
4621
- }), _v$2 = disabled(), _v$3 = style({
4684
+ }), _v$2 = props.id, _v$3 = disabled(), _v$4 = style({
4622
4685
  key: "channelSwitchThumb",
4623
4686
  className: cn(`nt-h-4 nt-w-7 nt-rounded-full nt-bg-neutral-alpha-300 after:nt-absolute after:nt-top-0.5 after:nt-size-3 after:nt-left-0.5 after:nt-rounded-full after:nt-bg-background after:nt-transition-all after:nt-content-[''] nt-transition-all nt-duration-200 after:nt-duration-200 shadow-sm`, {
4624
4687
  "nt-bg-primary nt-shadow-none nt-border-neutral-alpha-400 after:nt-translate-x-full after:nt-border-background": isChecked(),
4625
4688
  "after:nt-translate-x-1/2": isIndeterminate()
4626
4689
  })
4627
- }), _v$4 = state();
4690
+ }), _v$5 = state();
4628
4691
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
4629
- _v$2 !== _p$.t && (_el$2.disabled = _p$.t = _v$2);
4630
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
4631
- _v$4 !== _p$.o && setAttribute(_el$3, "data-state", _p$.o = _v$4);
4692
+ _v$2 !== _p$.t && setAttribute(_el$2, "id", _p$.t = _v$2);
4693
+ _v$3 !== _p$.a && (_el$2.disabled = _p$.a = _v$3);
4694
+ _v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
4695
+ _v$5 !== _p$.i && setAttribute(_el$3, "data-state", _p$.i = _v$5);
4632
4696
  return _p$;
4633
4697
  }, {
4634
4698
  e: void 0,
4635
4699
  t: void 0,
4636
4700
  a: void 0,
4637
- o: void 0
4701
+ o: void 0,
4702
+ i: void 0
4638
4703
  });
4639
4704
  effect(() => _el$2.checked = isChecked());
4640
4705
  return _el$;
@@ -4642,7 +4707,7 @@ var Switch2 = (props) => {
4642
4707
  };
4643
4708
 
4644
4709
  // src/ui/components/elements/Preferences/ChannelRow.tsx
4645
- var _tmpl$57 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
4710
+ var _tmpl$57 = /* @__PURE__ */ template(`<div><div><div></div><label></label></div><div>`);
4646
4711
  var ChannelRow = (props) => {
4647
4712
  const style = useStyle();
4648
4713
  const updatePreference = (enabled) => __async(void 0, null, function* () {
@@ -4655,6 +4720,10 @@ var ChannelRow = (props) => {
4655
4720
  });
4656
4721
  const state = () => props.channel.state;
4657
4722
  const channel = () => props.channel.channel;
4723
+ const channelId = () => {
4724
+ var _a;
4725
+ return `channel-${(_a = props.workflowId) != null ? _a : ""}-${channel()}`;
4726
+ };
4658
4727
  return (() => {
4659
4728
  var _el$ = _tmpl$57(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
4660
4729
  insert(_el$3, createComponent(ChannelIcon, {
@@ -4672,6 +4741,9 @@ var ChannelRow = (props) => {
4672
4741
  }));
4673
4742
  insert(_el$4, () => getLabel(channel()));
4674
4743
  insert(_el$5, createComponent(Switch2, {
4744
+ get id() {
4745
+ return channelId();
4746
+ },
4675
4747
  get state() {
4676
4748
  return state();
4677
4749
  },
@@ -4691,7 +4763,7 @@ var ChannelRow = (props) => {
4691
4763
  }
4692
4764
  }), _v$2 = style({
4693
4765
  key: "channelLabelContainer",
4694
- className: "nt-flex nt-items-center nt-gap-2 nt-text-foreground",
4766
+ className: "nt-flex nt-items-center nt-gap-2 nt-text-foreground nt-w-full",
4695
4767
  context: {
4696
4768
  preference: props.preference,
4697
4769
  preferenceGroup: props.preferenceGroup
@@ -4703,14 +4775,14 @@ var ChannelRow = (props) => {
4703
4775
  preference: props.preference,
4704
4776
  preferenceGroup: props.preferenceGroup
4705
4777
  }
4706
- }), _v$4 = style({
4778
+ }), _v$4 = channelId(), _v$5 = style({
4707
4779
  key: "channelLabel",
4708
- className: "nt-text-sm nt-font-semibold",
4780
+ className: "nt-text-sm nt-font-semibold nt-w-full nt-cursor-pointer",
4709
4781
  context: {
4710
4782
  preference: props.preference,
4711
4783
  preferenceGroup: props.preferenceGroup
4712
4784
  }
4713
- }), _v$5 = style({
4785
+ }), _v$6 = style({
4714
4786
  key: "channelSwitchContainer",
4715
4787
  className: "nt-flex nt-items-center",
4716
4788
  context: {
@@ -4721,15 +4793,17 @@ var ChannelRow = (props) => {
4721
4793
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
4722
4794
  _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
4723
4795
  _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
4724
- _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
4725
- _v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
4796
+ _v$4 !== _p$.o && setAttribute(_el$4, "for", _p$.o = _v$4);
4797
+ _v$5 !== _p$.i && className(_el$4, _p$.i = _v$5);
4798
+ _v$6 !== _p$.n && className(_el$5, _p$.n = _v$6);
4726
4799
  return _p$;
4727
4800
  }, {
4728
4801
  e: void 0,
4729
4802
  t: void 0,
4730
4803
  a: void 0,
4731
4804
  o: void 0,
4732
- i: void 0
4805
+ i: void 0,
4806
+ n: void 0
4733
4807
  });
4734
4808
  return _el$;
4735
4809
  })();
@@ -6305,7 +6379,7 @@ delegateEvents(["click"]);
6305
6379
  var _tmpl$67 = /* @__PURE__ */ template(`<div>`);
6306
6380
  var Preferences = () => {
6307
6381
  var _a, _b, _c;
6308
- const novu = useNovu();
6382
+ const novuAccessor = useNovu();
6309
6383
  const style = useStyle();
6310
6384
  const {
6311
6385
  preferencesFilter,
@@ -6350,7 +6424,7 @@ var Preferences = () => {
6350
6424
  });
6351
6425
  });
6352
6426
  const bulkUpdatePreferences = (preferences2) => (channels) => __async(void 0, null, function* () {
6353
- yield novu.preferences.bulkUpdate(preferences2.map((el) => {
6427
+ yield novuAccessor().preferences.bulkUpdate(preferences2.map((el) => {
6354
6428
  const oldChannels = Object.keys(el.channels);
6355
6429
  const channelsToUpdate = Object.keys(channels).filter((channel) => oldChannels.includes(channel)).reduce((acc, channel) => {
6356
6430
  acc[channel] = channels[channel];
@@ -7511,6 +7585,10 @@ var DefaultNotification = (props) => {
7511
7585
  status
7512
7586
  } = useInboxContext();
7513
7587
  const [minutesPassed, setMinutesPassed] = createSignal(0);
7588
+ const severity = createMemo(() => {
7589
+ var _a;
7590
+ return (_a = props.notification.severity) != null ? _a : "none" /* NONE */;
7591
+ });
7514
7592
  const createdAt = createMemo(() => {
7515
7593
  minutesPassed();
7516
7594
  return formatToRelativeTime({
@@ -7881,22 +7959,22 @@ var DefaultNotification = (props) => {
7881
7959
  effect((_p$) => {
7882
7960
  var _a;
7883
7961
  var _v$ = style({
7884
- key: SEVERITY_TO_NOTIFICATION_KEYS[props.notification.severity],
7962
+ key: SEVERITY_TO_NOTIFICATION_KEYS[severity()],
7885
7963
  className: cn("nt-transition nt-w-full nt-text-sm hover:nt-bg-primary-alpha-25 nt-group nt-relative nt-flex nt-items-start nt-p-4 nt-gap-2", "[&:not(:first-child)]:nt-border-t nt-border-neutral-alpha-100", {
7886
7964
  "nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url),
7887
- "nt-bg-severity-high-alpha-100 hover:nt-bg-severity-high-alpha-50": props.notification.severity === "high" /* HIGH */,
7888
- "nt-bg-severity-medium-alpha-100 hover:nt-bg-severity-medium-alpha-50": props.notification.severity === "medium" /* MEDIUM */,
7889
- "nt-bg-severity-low-alpha-100 hover:nt-bg-severity-low-alpha-50": props.notification.severity === "low" /* LOW */
7965
+ "nt-bg-severity-high-alpha-100 hover:nt-bg-severity-high-alpha-50": severity() === "high" /* HIGH */,
7966
+ "nt-bg-severity-medium-alpha-100 hover:nt-bg-severity-medium-alpha-50": severity() === "medium" /* MEDIUM */,
7967
+ "nt-bg-severity-low-alpha-100 hover:nt-bg-severity-low-alpha-50": severity() === "low" /* LOW */
7890
7968
  }),
7891
7969
  context: {
7892
7970
  notification: props.notification
7893
7971
  }
7894
7972
  }), _v$2 = style({
7895
- key: SEVERITY_TO_BAR_KEYS[props.notification.severity],
7973
+ key: SEVERITY_TO_BAR_KEYS[severity()],
7896
7974
  className: cn("nt-transition nt-absolute nt-left-0 nt-top-0 nt-bottom-0 nt-w-[3px]", {
7897
- "nt-bg-severity-high group-hover:nt-bg-severity-high-alpha-500": props.notification.severity === "high" /* HIGH */,
7898
- "nt-bg-severity-medium group-hover:nt-bg-severity-medium-alpha-500": props.notification.severity === "medium" /* MEDIUM */,
7899
- "nt-bg-severity-low group-hover:nt-bg-severity-low-alpha-500": props.notification.severity === "low" /* LOW */
7975
+ "nt-bg-severity-high group-hover:nt-bg-severity-high-alpha-500": severity() === "high" /* HIGH */,
7976
+ "nt-bg-severity-medium group-hover:nt-bg-severity-medium-alpha-500": severity() === "medium" /* MEDIUM */,
7977
+ "nt-bg-severity-low group-hover:nt-bg-severity-low-alpha-500": severity() === "low" /* LOW */
7900
7978
  }),
7901
7979
  context: {
7902
7980
  notification: props.notification
@@ -8149,7 +8227,7 @@ var NotificationListSkeleton = (props) => {
8149
8227
  };
8150
8228
  function KeylessEmptyState() {
8151
8229
  const style = useStyle();
8152
- const novu = useNovu();
8230
+ const novuAccessor = useNovu();
8153
8231
  return (() => {
8154
8232
  var _el$5 = _tmpl$315(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild;
8155
8233
  insert(_el$8, createComponent(Button, {
@@ -8182,7 +8260,7 @@ function KeylessEmptyState() {
8182
8260
  className: "nt-h-8 nt-px-4 nt-flex nt-items-center nt-justify-center nt-gap-2 nt-bg-neutral-900 nt-text-white nt-shadow-sm nt-text-[12px] nt-font-medium"
8183
8261
  });
8184
8262
  },
8185
- onClick: () => novu.notifications.triggerHelloWorldEvent(),
8263
+ onClick: () => novuAccessor().notifications.triggerHelloWorldEvent(),
8186
8264
  get children() {
8187
8265
  return [createComponent(Bell, {
8188
8266
  get ["class"]() {
@@ -8943,97 +9021,1512 @@ var Inbox = (props) => {
8943
9021
  }
8944
9022
  });
8945
9023
  };
8946
-
8947
- // src/ui/components/Renderer.tsx
8948
- var novuComponents = {
8949
- Inbox,
8950
- InboxContent,
8951
- Bell: Bell2,
8952
- Notifications: (props) => {
8953
- if (props.renderNotification) {
8954
- const _a = props, otherProps = __objRest(_a, [
8955
- "renderBody",
8956
- "renderSubject",
8957
- "renderAvatar",
8958
- "renderDefaultActions",
8959
- "renderCustomActions"
8960
- ]);
8961
- return createComponent(InboxContent, mergeProps(otherProps, {
8962
- hideNav: true,
8963
- get initialPage() {
8964
- return InboxPage.Notifications;
8965
- }
8966
- }));
9024
+ var useSubscription = (options) => {
9025
+ const novuAccessor = useNovu();
9026
+ const identifier = () => {
9027
+ var _a;
9028
+ const subscriberId = novuAccessor().subscriberId;
9029
+ return (_a = options.identifier) != null ? _a : buildSubscriptionIdentifier({ topicKey: options.topicKey, subscriberId });
9030
+ };
9031
+ const [loading, setLoading] = createSignal(true);
9032
+ const [subscription, { mutate, refetch }] = createResource(options || {}, (_0) => __async(void 0, [_0], function* ({ topicKey }) {
9033
+ try {
9034
+ const response = yield novuAccessor().subscriptions.get({ topicKey, identifier: identifier() });
9035
+ return response.data;
9036
+ } catch (error) {
9037
+ console.error("Error fetching subscription:", error);
9038
+ throw error;
8967
9039
  }
8968
- const _b = props, propsWithoutRenderNotification = __objRest(_b, [
8969
- "renderNotification"
8970
- ]);
8971
- return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
8972
- hideNav: true,
8973
- get initialPage() {
8974
- return InboxPage.Notifications;
9040
+ }));
9041
+ const create = (args) => __async(void 0, null, function* () {
9042
+ setLoading(true);
9043
+ const response = yield novuAccessor().subscriptions.create(args);
9044
+ if (response.data) {
9045
+ mutate(response.data);
9046
+ }
9047
+ setLoading(false);
9048
+ return response;
9049
+ });
9050
+ const remove = (args) => __async(void 0, null, function* () {
9051
+ setLoading(true);
9052
+ const response = "subscription" in args ? yield novuAccessor().subscriptions.delete({ subscription: args.subscription }) : yield novuAccessor().subscriptions.delete({ topicKey: args.topicKey, subscriptionId: args.subscriptionId });
9053
+ mutate(null);
9054
+ setLoading(false);
9055
+ return response;
9056
+ });
9057
+ onMount(() => {
9058
+ const listener = ({ data }) => {
9059
+ if (!data || data.topicKey !== options.topicKey || data.identifier !== identifier()) {
9060
+ return;
8975
9061
  }
8976
- }));
8977
- },
8978
- Preferences: (props) => {
8979
- if (props.renderNotification) {
8980
- const _a = props, otherProps = __objRest(_a, [
8981
- "renderBody",
8982
- "renderSubject",
8983
- "renderAvatar",
8984
- "renderDefaultActions",
8985
- "renderCustomActions"
8986
- ]);
8987
- return createComponent(InboxContent, mergeProps(otherProps, {
8988
- hideNav: true,
8989
- get initialPage() {
8990
- return InboxPage.Preferences;
8991
- }
8992
- }));
8993
- }
8994
- const _b = props, propsWithoutRenderNotification = __objRest(_b, [
8995
- "renderNotification"
8996
- ]);
8997
- return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
8998
- hideNav: true,
8999
- get initialPage() {
9000
- return InboxPage.Preferences;
9062
+ mutate(data);
9063
+ setLoading(false);
9064
+ };
9065
+ const currentNovu = novuAccessor();
9066
+ const cleanupCreatePending = currentNovu.on("subscription.create.pending", ({ args }) => {
9067
+ if (!args || args.topicKey !== options.topicKey || args.identifier !== identifier()) {
9068
+ return;
9001
9069
  }
9002
- }));
9003
- }
9004
- };
9005
- var Renderer = (props) => {
9006
- const nodes = () => [...props.nodes.keys()];
9007
- onMount(() => {
9008
- var _a;
9009
- const id = NOVU_DEFAULT_CSS_ID;
9010
- const root = props.container instanceof ShadowRoot ? props.container : document;
9011
- const el = root.getElementById(id);
9012
- if (el) {
9013
- return;
9014
- }
9015
- const styleEl = document.createElement("style");
9016
- styleEl.id = id;
9017
- styleEl.innerHTML = ui_default;
9018
- const stylesContainer = (_a = props.container) != null ? _a : document.head;
9019
- stylesContainer.insertBefore(styleEl, stylesContainer.firstChild);
9070
+ setLoading(true);
9071
+ });
9072
+ const cleanupCreate = currentNovu.on("subscription.create.resolved", listener);
9073
+ const cleanupUpdate = currentNovu.on("subscription.update.resolved", listener);
9074
+ const cleanupDeletePending = currentNovu.on("subscription.delete.pending", ({ args }) => {
9075
+ var _a, _b;
9076
+ const subscriptionId = (_a = subscription()) == null ? void 0 : _a.id;
9077
+ const subscriptionIdentifier = (_b = subscription()) == null ? void 0 : _b.identifier;
9078
+ if (!args || "subscriptionId" in args && args.subscriptionId !== subscriptionId && args.subscriptionId !== subscriptionIdentifier || "subscription" in args && args.subscription.id !== subscriptionId && args.subscription.identifier !== subscriptionIdentifier) {
9079
+ return;
9080
+ }
9081
+ setLoading(true);
9082
+ });
9083
+ const cleanupDelete = currentNovu.on("subscription.delete.resolved", ({ args }) => {
9084
+ var _a, _b;
9085
+ const subscriptionId = (_a = subscription()) == null ? void 0 : _a.id;
9086
+ const subscriptionIdentifier = (_b = subscription()) == null ? void 0 : _b.identifier;
9087
+ if (!args || "subscriptionId" in args && args.subscriptionId !== subscriptionId && args.subscriptionId !== subscriptionIdentifier || "subscription" in args && args.subscription.id !== subscriptionId && args.subscription.identifier !== subscriptionIdentifier) {
9088
+ return;
9089
+ }
9090
+ mutate(null);
9091
+ setLoading(false);
9092
+ });
9020
9093
  onCleanup(() => {
9021
- styleEl.remove();
9094
+ cleanupCreatePending();
9095
+ cleanupCreate();
9096
+ cleanupDeletePending();
9097
+ cleanupUpdate();
9098
+ cleanupDelete();
9022
9099
  });
9023
9100
  });
9024
- return createComponent(NovuProvider, {
9025
- get options() {
9026
- return props.options;
9101
+ createEffect(() => {
9102
+ setLoading(subscription.loading);
9103
+ });
9104
+ return { subscription, loading, mutate, refetch, create, remove };
9105
+ };
9106
+ var _tmpl$84 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path fill=currentColor d="M9.237 12.088c0 .362-.128.71-.357.965-.23.255-.541.398-.866.398s-.637-.143-.866-.398a1.45 1.45 0 0 1-.357-.965zM11.23 4.373a.39.39 0 0 1 .53.57l-7.402 6.903a.39.39 0 0 1-.531-.57zM11.058 6.652q.015.162.015.327v.4A4.37 4.37 0 0 0 12 10.097l.142.177c.16.2.2.487.1.732a.61.61 0 0 1-.557.402H5.96zM8.014 2.55c.338 0 .612.305.612.682v.41c.53.119 1.011.392 1.404.775L4.215 9.84c.478-.707.74-1.57.74-2.46v-.4c0-1.648 1.052-3.023 2.448-3.338v-.409c0-.377.273-.681.61-.681">`);
9107
+ function BellCross(props) {
9108
+ return (() => {
9109
+ var _el$ = _tmpl$84();
9110
+ spread(_el$, props, true, true);
9111
+ return _el$;
9112
+ })();
9113
+ }
9114
+ var _tmpl$85 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.1 d="M7.206 12.5c.08.152.196.278.336.366a.86.86 0 0 0 .916 0 .96.96 0 0 0 .336-.366m.58-6.5h2.75M10.75 4.5v3m.918 1.732q.156.227.338.431.091.11.113.257a.54.54 0 0 1-.033.282.5.5 0 0 1-.17.217.43.43 0 0 1-.25.08H4.334a.43.43 0 0 1-.25-.08.5.5 0 0 1-.17-.217.54.54 0 0 1 .081-.539C4.604 8.978 5.25 8.25 5.25 6c0-.515.121-1.02.352-1.47.231-.448.564-.824.967-1.092a2.6 2.6 0 0 1 1.333-.436c.471-.018.94.096 1.358.332">`);
9115
+ function BellPlus(props) {
9116
+ return (() => {
9117
+ var _el$ = _tmpl$85();
9118
+ spread(_el$, props, true, true);
9119
+ return _el$;
9120
+ })();
9121
+ }
9122
+ var _tmpl$86 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=currentColor viewBox="0 0 24 24"><path d="M18.364 5.636 16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364">`);
9123
+ function Loader(props) {
9124
+ return (() => {
9125
+ var _el$ = _tmpl$86();
9126
+ spread(_el$, props, true, true);
9127
+ return _el$;
9128
+ })();
9129
+ }
9130
+
9131
+ // src/ui/components/subscription/SubscriptionButton.tsx
9132
+ var _tmpl$87 = /* @__PURE__ */ template(`<span><span>`);
9133
+ var iconKeyToComponentMap3 = {
9134
+ bellCross: BellCross,
9135
+ bellPlus: BellPlus
9136
+ };
9137
+ var SubscriptionButton = (props) => {
9138
+ const style = useStyle();
9139
+ const {
9140
+ t
9141
+ } = useLocalization();
9142
+ const subscription = createMemo(() => {
9143
+ var _a;
9144
+ return (_a = props.subscription) != null ? _a : void 0;
9145
+ });
9146
+ const iconKey = createMemo(() => props.subscription ? "bellCross" : "bellPlus");
9147
+ const IconComponent = createMemo(() => iconKeyToComponentMap3[iconKey()]);
9148
+ return createComponent(Button, {
9149
+ get ["class"]() {
9150
+ return style({
9151
+ key: "subscriptionButton__button",
9152
+ className: "nt-transition-[width] nt-duration-800 nt-will-change-[width]",
9153
+ context: {
9154
+ subscription: subscription()
9155
+ }
9156
+ });
9027
9157
  },
9028
- get novu() {
9029
- return props.novu;
9158
+ variant: "secondary",
9159
+ get onClick() {
9160
+ return props.onClick;
9161
+ },
9162
+ get disabled() {
9163
+ return props.loading;
9030
9164
  },
9031
9165
  get children() {
9032
- return createComponent(LocalizationProvider, {
9033
- get localization() {
9034
- return props.localization;
9166
+ var _el$ = _tmpl$87(), _el$2 = _el$.firstChild;
9167
+ insert(_el$, createComponent(Motion.span, {
9168
+ initial: {
9169
+ opacity: 1
9035
9170
  },
9036
- get children() {
9171
+ get animate() {
9172
+ return {
9173
+ opacity: props.loading ? 0 : 1
9174
+ };
9175
+ },
9176
+ transition: {
9177
+ easing: "ease-in-out",
9178
+ duration: 0.2
9179
+ },
9180
+ "class": "nt-inline-flex nt-items-center",
9181
+ get children() {
9182
+ return createComponent(IconRendererWrapper, {
9183
+ get iconKey() {
9184
+ return iconKey();
9185
+ },
9186
+ get ["class"]() {
9187
+ return style({
9188
+ key: "subscriptionButtonIcon",
9189
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
9190
+ iconKey: iconKey(),
9191
+ context: {
9192
+ subscription: subscription()
9193
+ }
9194
+ });
9195
+ },
9196
+ get fallback() {
9197
+ var _a;
9198
+ return memo(() => !!IconComponent())() && ((_a = IconComponent()) == null ? void 0 : _a({
9199
+ class: style({
9200
+ key: "subscriptionButtonIcon",
9201
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
9202
+ iconKey: iconKey(),
9203
+ context: {
9204
+ subscription: subscription()
9205
+ }
9206
+ })
9207
+ }));
9208
+ }
9209
+ });
9210
+ }
9211
+ }), _el$2);
9212
+ insert(_el$, createComponent(Motion.span, {
9213
+ initial: {
9214
+ opacity: 1
9215
+ },
9216
+ get animate() {
9217
+ return {
9218
+ opacity: props.loading ? 1 : 0
9219
+ };
9220
+ },
9221
+ transition: {
9222
+ easing: "ease-in-out",
9223
+ duration: 0.2
9224
+ },
9225
+ "class": "nt-absolute nt-left-0 nt-inline-flex nt-items-center",
9226
+ get children() {
9227
+ return createComponent(IconRendererWrapper, {
9228
+ iconKey: "loader",
9229
+ get ["class"]() {
9230
+ return style({
9231
+ key: "subscriptionButtonIcon",
9232
+ className: "nt-text-foreground-alpha-600 nt-size-3.5 nt-animate-spin",
9233
+ iconKey: iconKey(),
9234
+ context: {
9235
+ subscription: subscription()
9236
+ }
9237
+ });
9238
+ },
9239
+ get fallback() {
9240
+ return createComponent(Loader, {
9241
+ get ["class"]() {
9242
+ return style({
9243
+ key: "subscriptionButtonIcon",
9244
+ className: "nt-text-foreground-alpha-600 nt-size-3.5 nt-animate-spin",
9245
+ iconKey: iconKey(),
9246
+ context: {
9247
+ subscription: subscription()
9248
+ }
9249
+ });
9250
+ }
9251
+ });
9252
+ }
9253
+ });
9254
+ }
9255
+ }), _el$2);
9256
+ insert(_el$2, (() => {
9257
+ var _c$ = memo(() => !!props.subscription);
9258
+ return () => _c$() ? t("subscription.unsubscribe") : t("subscription.subscribe");
9259
+ })());
9260
+ effect((_p$) => {
9261
+ var _v$ = style({
9262
+ key: "subscriptionButtonContainer",
9263
+ className: "nt-relative nt-overflow-hidden nt-inline-flex nt-items-center nt-justify-center nt-gap-1",
9264
+ context: {
9265
+ subscription: subscription()
9266
+ }
9267
+ }), _v$2 = style({
9268
+ key: "subscriptionButtonLabel",
9269
+ className: "[line-height:16px]",
9270
+ context: {
9271
+ subscription: subscription()
9272
+ }
9273
+ }), _v$3 = props.subscription ? "subscription.unsubscribe" : "subscription.subscribe";
9274
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9275
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
9276
+ _v$3 !== _p$.a && setAttribute(_el$2, "data-localization", _p$.a = _v$3);
9277
+ return _p$;
9278
+ }, {
9279
+ e: void 0,
9280
+ t: void 0,
9281
+ a: void 0
9282
+ });
9283
+ return _el$;
9284
+ }
9285
+ });
9286
+ };
9287
+ var _tmpl$88 = /* @__PURE__ */ template(`<div>`);
9288
+ var _tmpl$227 = /* @__PURE__ */ template(`<div><div><div><span></span></div><div><span>`);
9289
+ var _tmpl$316 = /* @__PURE__ */ template(`<div><label>`);
9290
+ var SubscriptionPreferenceGroupRow = (props) => {
9291
+ const style = useStyle();
9292
+ const {
9293
+ t
9294
+ } = useLocalization();
9295
+ const [isOpened, setIsOpened] = createSignal(false);
9296
+ const preferences = createMemo(() => props.group.group);
9297
+ const groupState = createMemo(() => {
9298
+ const enabledCount = preferences().filter((pref) => {
9299
+ return pref.preference.enabled;
9300
+ }).length;
9301
+ if (enabledCount === 0) {
9302
+ return {
9303
+ checked: false,
9304
+ indeterminate: false
9305
+ };
9306
+ }
9307
+ if (enabledCount === preferences().length) {
9308
+ return {
9309
+ checked: true,
9310
+ indeterminate: false
9311
+ };
9312
+ }
9313
+ return {
9314
+ checked: false,
9315
+ indeterminate: true
9316
+ };
9317
+ });
9318
+ const handleGroupChange = (checked) => __async(void 0, null, function* () {
9319
+ const updates = props.group.group.map((pref) => ({
9320
+ workflowId: pref.preference.workflow.identifier || pref.preference.workflow.id,
9321
+ value: checked
9322
+ }));
9323
+ yield props.subscription.bulkUpdatePreferences(updates);
9324
+ });
9325
+ const handlePreferenceChange = (preference) => (checked) => __async(void 0, null, function* () {
9326
+ yield preference.update({
9327
+ value: checked
9328
+ });
9329
+ });
9330
+ const getPreferenceChecked = (preference) => {
9331
+ return preference.enabled;
9332
+ };
9333
+ return (() => {
9334
+ var _el$ = _tmpl$227(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild;
9335
+ _el$2.$$click = () => {
9336
+ setIsOpened((prev) => !prev);
9337
+ };
9338
+ insert(_el$3, createComponent(IconRendererWrapper, {
9339
+ iconKey: "nodeTree",
9340
+ get ["class"]() {
9341
+ return style({
9342
+ key: "subscriptionPreferenceGroupLabelIcon",
9343
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
9344
+ context: {
9345
+ group: props.group
9346
+ }
9347
+ });
9348
+ },
9349
+ get fallback() {
9350
+ return createComponent(NodeTree, {
9351
+ get ["class"]() {
9352
+ return style({
9353
+ key: "subscriptionPreferenceGroupLabelIcon",
9354
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
9355
+ context: {
9356
+ group: props.group
9357
+ }
9358
+ });
9359
+ }
9360
+ });
9361
+ }
9362
+ }), _el$4);
9363
+ insert(_el$4, () => props.group.label);
9364
+ insert(_el$5, createComponent(Checkbox, {
9365
+ get checked() {
9366
+ return groupState().checked;
9367
+ },
9368
+ get indeterminate() {
9369
+ return groupState().indeterminate;
9370
+ },
9371
+ onChange: handleGroupChange,
9372
+ onClick: (e) => {
9373
+ e.stopPropagation();
9374
+ }
9375
+ }), _el$6);
9376
+ insert(_el$6, createComponent(IconRendererWrapper, {
9377
+ iconKey: "arrowDropDown",
9378
+ get ["class"]() {
9379
+ return style({
9380
+ key: "moreTabs__icon",
9381
+ className: "nt-size-4"
9382
+ });
9383
+ },
9384
+ get fallback() {
9385
+ return createComponent(ArrowDropDown, {
9386
+ get ["class"]() {
9387
+ return style({
9388
+ key: "moreTabs__icon",
9389
+ className: "nt-size-4"
9390
+ });
9391
+ }
9392
+ });
9393
+ }
9394
+ }));
9395
+ insert(_el$, createComponent(Collapsible, {
9396
+ get open() {
9397
+ return isOpened();
9398
+ },
9399
+ get children() {
9400
+ var _el$7 = _tmpl$88();
9401
+ insert(_el$7, createComponent(For, {
9402
+ get each() {
9403
+ return preferences();
9404
+ },
9405
+ children: (el) => (() => {
9406
+ var _el$8 = _tmpl$316(), _el$9 = _el$8.firstChild;
9407
+ insert(_el$9, () => {
9408
+ var _a;
9409
+ return (_a = el.label) != null ? _a : t(el.preference.workflow.identifier);
9410
+ });
9411
+ insert(_el$8, createComponent(Checkbox, {
9412
+ get id() {
9413
+ return `subscription-preference-${el.preference.workflow.identifier}`;
9414
+ },
9415
+ get checked() {
9416
+ return getPreferenceChecked(el.preference);
9417
+ },
9418
+ get onChange() {
9419
+ return handlePreferenceChange(el.preference);
9420
+ }
9421
+ }), null);
9422
+ effect((_p$) => {
9423
+ var _a;
9424
+ var _v$1 = style({
9425
+ key: "subscriptionPreferenceGroupWorkflowRow",
9426
+ className: "nt-flex nt-items-center nt-justify-between nt-p-2 nt-rounded nt-gap-2",
9427
+ context: {
9428
+ preference: el
9429
+ }
9430
+ }), _v$10 = `subscription-preference-${el.preference.workflow.identifier}`, _v$11 = style({
9431
+ key: "subscriptionPreferenceGroupWorkflowLabel",
9432
+ className: "nt-text-sm nt-truncate nt-text-start nt-w-full nt-cursor-pointer",
9433
+ context: {
9434
+ preference: el
9435
+ }
9436
+ }), _v$12 = el.preference.workflow.identifier, _v$13 = (_a = el.label) != null ? _a : t(el.preference.workflow.identifier);
9437
+ _v$1 !== _p$.e && className(_el$8, _p$.e = _v$1);
9438
+ _v$10 !== _p$.t && setAttribute(_el$9, "for", _p$.t = _v$10);
9439
+ _v$11 !== _p$.a && className(_el$9, _p$.a = _v$11);
9440
+ _v$12 !== _p$.o && setAttribute(_el$9, "data-localization", _p$.o = _v$12);
9441
+ _v$13 !== _p$.i && setAttribute(_el$9, "title", _p$.i = _v$13);
9442
+ return _p$;
9443
+ }, {
9444
+ e: void 0,
9445
+ t: void 0,
9446
+ a: void 0,
9447
+ o: void 0,
9448
+ i: void 0
9449
+ });
9450
+ return _el$8;
9451
+ })()
9452
+ }));
9453
+ effect(() => className(_el$7, style({
9454
+ key: "subscriptionPreferenceGroupBody",
9455
+ className: "nt-flex nt-p-2 nt-flex-col nt-gap-1 nt-bg-background nt-rounded-b-lg",
9456
+ context: {
9457
+ group: props.group
9458
+ }
9459
+ })));
9460
+ return _el$7;
9461
+ }
9462
+ }), null);
9463
+ effect((_p$) => {
9464
+ var _v$ = style({
9465
+ key: "subscriptionPreferenceGroupContainer",
9466
+ className: "nt-bg-neutral-alpha-25 nt-rounded-lg nt-border nt-border-neutral-alpha-50",
9467
+ context: {
9468
+ group: props.group
9469
+ }
9470
+ }), _v$2 = isOpened(), _v$3 = style({
9471
+ key: "subscriptionPreferenceGroupHeader",
9472
+ className: "nt-flex nt-justify-between nt-p-2 nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center nt-overflow-hidden",
9473
+ context: {
9474
+ group: props.group
9475
+ }
9476
+ }), _v$4 = style({
9477
+ key: "subscriptionPreferenceGroupLabelContainer",
9478
+ className: "nt-overflow-hidden nt-flex nt-items-center nt-gap-1",
9479
+ context: {
9480
+ group: props.group
9481
+ }
9482
+ }), _v$5 = style({
9483
+ key: "subscriptionPreferenceGroupLabel",
9484
+ className: "nt-text-sm nt-font-semibold nt-truncate nt-text-start nt-mr-2",
9485
+ context: {
9486
+ group: props.group
9487
+ }
9488
+ }), _v$6 = isOpened(), _v$7 = props.group.label, _v$8 = style({
9489
+ key: "subscriptionPreferenceGroupActionsContainer",
9490
+ className: "nt-flex nt-items-center nt-gap-1",
9491
+ context: {
9492
+ group: props.group
9493
+ }
9494
+ }), _v$9 = style({
9495
+ key: "subscriptionPreferenceGroupActionsContainerRight__icon",
9496
+ className: "nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180",
9497
+ context: {
9498
+ group: props.group
9499
+ }
9500
+ }), _v$0 = isOpened();
9501
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9502
+ _v$2 !== _p$.t && setAttribute(_el$, "data-open", _p$.t = _v$2);
9503
+ _v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
9504
+ _v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
9505
+ _v$5 !== _p$.i && className(_el$4, _p$.i = _v$5);
9506
+ _v$6 !== _p$.n && setAttribute(_el$4, "data-open", _p$.n = _v$6);
9507
+ _v$7 !== _p$.s && setAttribute(_el$4, "title", _p$.s = _v$7);
9508
+ _v$8 !== _p$.h && className(_el$5, _p$.h = _v$8);
9509
+ _v$9 !== _p$.r && className(_el$6, _p$.r = _v$9);
9510
+ _v$0 !== _p$.d && setAttribute(_el$6, "data-open", _p$.d = _v$0);
9511
+ return _p$;
9512
+ }, {
9513
+ e: void 0,
9514
+ t: void 0,
9515
+ a: void 0,
9516
+ o: void 0,
9517
+ i: void 0,
9518
+ n: void 0,
9519
+ s: void 0,
9520
+ h: void 0,
9521
+ r: void 0,
9522
+ d: void 0
9523
+ });
9524
+ return _el$;
9525
+ })();
9526
+ };
9527
+ delegateEvents(["click"]);
9528
+ var _tmpl$89 = /* @__PURE__ */ template(`<div><label>`);
9529
+ var SubscriptionPreferenceRow = (props) => {
9530
+ const style = useStyle();
9531
+ const {
9532
+ t
9533
+ } = useLocalization();
9534
+ const preference = createMemo(() => props.preference.preference);
9535
+ const handleChange = (checked) => __async(void 0, null, function* () {
9536
+ yield preference().update({
9537
+ value: checked
9538
+ });
9539
+ });
9540
+ const isChecked = () => {
9541
+ return preference().enabled;
9542
+ };
9543
+ return (() => {
9544
+ var _el$ = _tmpl$89(), _el$2 = _el$.firstChild;
9545
+ insert(_el$2, () => {
9546
+ var _a;
9547
+ return (_a = props.preference.label) != null ? _a : t(preference().workflow.identifier);
9548
+ });
9549
+ insert(_el$, createComponent(Checkbox, {
9550
+ get id() {
9551
+ return `subscription-preference-${preference().workflow.identifier}`;
9552
+ },
9553
+ get checked() {
9554
+ return isChecked();
9555
+ },
9556
+ onChange: handleChange
9557
+ }), null);
9558
+ effect((_p$) => {
9559
+ var _a;
9560
+ var _v$ = style({
9561
+ key: "subscriptionPreferenceRow",
9562
+ className: "nt-flex nt-items-center nt-justify-between nt-p-2 nt-rounded-lg nt-gap-2",
9563
+ context: {
9564
+ preference: props.preference
9565
+ }
9566
+ }), _v$2 = `subscription-preference-${preference().workflow.identifier}`, _v$3 = style({
9567
+ key: "subscriptionPreferenceLabel",
9568
+ className: "nt-text-sm nt-font-medium nt-truncate nt-text-start nt-w-full nt-cursor-pointer",
9569
+ context: {
9570
+ preference: props.preference
9571
+ }
9572
+ }), _v$4 = preference().workflow.identifier, _v$5 = (_a = props.preference.label) != null ? _a : t(preference().workflow.identifier);
9573
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9574
+ _v$2 !== _p$.t && setAttribute(_el$2, "for", _p$.t = _v$2);
9575
+ _v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
9576
+ _v$4 !== _p$.o && setAttribute(_el$2, "data-localization", _p$.o = _v$4);
9577
+ _v$5 !== _p$.i && setAttribute(_el$2, "title", _p$.i = _v$5);
9578
+ return _p$;
9579
+ }, {
9580
+ e: void 0,
9581
+ t: void 0,
9582
+ a: void 0,
9583
+ o: void 0,
9584
+ i: void 0
9585
+ });
9586
+ return _el$;
9587
+ })();
9588
+ };
9589
+ var _tmpl$90 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=138 height=100 fill=none viewBox="0 0 138 100"><rect width=131.1 height=33.1 x=3.025 y=.45 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><g clip-path=url(#a)><path stroke=#cacfd8 stroke-linecap=round stroke-linejoin=round stroke-width=1.08 d="m66.7 17 1.25 1.25 2.5-2.5M72.74 17a4.167 4.167 0 1 1-8.333 0 4.167 4.167 0 0 1 8.334 0"></path></g><g filter=url(#b)><g clip-path=url(#c)><rect width=132 height=29 x=1.724 y=67.207 fill=#fcfcfc rx=4 transform="rotate(-4 1.724 67.207)"></rect><path fill=#f4f4f4 d="M10.402 76.625a4 4 0 0 1 3.711-4.27l9.976-.697a4 4 0 0 1 4.27 3.711l.627 8.978a4 4 0 0 1-3.711 4.27l-9.976.697a4 4 0 0 1-4.27-3.71z"></path><path fill=#e4e4e4 d="M19.345 75.498c-.316.022-.55.319-.527.664l.027.374c-1.28.38-2.172 1.706-2.067 3.214l.026.367a3.97 3.97 0 0 1-.69 2.546l-.12.171a.67.67 0 0 0-.049.677.57.57 0 0 0 .546.332l6.84-.479a.57.57 0 0 0 .495-.404.67.67 0 0 0-.141-.664l-.143-.152a3.96 3.96 0 0 1-1.038-2.426l-.026-.366c-.105-1.508-1.173-2.699-2.493-2.896l-.026-.374c-.025-.345-.299-.606-.614-.584m1.479 9.555c.197-.248.294-.575.271-.906l-1.14.08-1.14.08c.023.331.165.64.395.86.23.218.53.328.832.307.303-.021.584-.172.782-.42"></path><rect width=27 height=3 x=36.373 y=75.311 fill=url(#d) rx=1.5 transform="rotate(-4 36.373 75.31)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#e) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#f) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect></g><rect width=132 height=29 x=1.724 y=67.207 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4 transform="rotate(-4 1.724 67.207)"></rect></g><path stroke=#e1e4ea stroke-linejoin=bevel d="M68.596 37v23.614"></path><defs><linearGradient id=d x1=29.846 x2=67.676 y1=76.586 y2=76.586 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=f x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=a><path fill=#fff d="M63.575 12h10v10h-10z"></path></clipPath><clipPath id=c><rect width=132 height=29 x=1.724 y=67.207 fill=#fff rx=4 transform="rotate(-4 1.724 67.207)"></rect></clipPath><filter id=b width=137.15 height=41.586 x=0 y=57.969 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4908_18899></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4908_18899 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4908_18899>`);
9590
+ var EmptyState = () => {
9591
+ return _tmpl$90();
9592
+ };
9593
+ var _tmpl$91 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=136 height=88 fill=none viewBox="0 0 136 88"><g filter=url(#a)><g clip-path=url(#b)><rect width=132 height=29 x=1.993 y=.301 fill=#fcfcfc rx=4></rect><path fill=#f4f4f4 d="M9.993 10.3a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v9a4 4 0 0 1-4 4h-10a4 4 0 0 1-4-4z"></path><path fill=#e4e4e4 d="M18.993 9.8c-.316 0-.572.28-.572.626v.375c-1.303.289-2.285 1.55-2.285 3.062v.367c0 .918-.31 1.805-.866 2.493l-.133.162a.67.67 0 0 0-.094.672.57.57 0 0 0 .521.369h6.857a.57.57 0 0 0 .522-.37.67.67 0 0 0-.095-.671l-.132-.162a3.96 3.96 0 0 1-.866-2.492v-.368c0-1.511-.982-2.773-2.286-3.062v-.375c0-.346-.255-.625-.571-.625m.809 9.636c.214-.235.334-.553.334-.885H17.85c0 .332.12.65.334.885s.505.365.809.365c.303 0 .594-.131.809-.365"></path><rect width=27 height=3 x=35.993 y=10.801 fill=url(#c) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#d) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#e) rx=1.5></rect></g><rect width=132 height=29 x=1.993 y=.301 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4></rect></g><rect width=131.1 height=33.1 x=2.443 y=53.751 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><path fill=#cacfd8 d="M68.743 71.145v.784a2.25 2.25 0 0 0-3 2.122h-.75a3 3 0 0 1 3.75-2.906m-.75-.47a2.25 2.25 0 1 1-.001-4.498 2.25 2.25 0 0 1 .001 4.499m0-.75a1.5 1.5 0 1 0 0-2.999 1.5 1.5 0 0 0 0 3m2.47 2.25-.686-.685.53-.53 1.591 1.59-1.59 1.592-.531-.53.686-.686h-1.345v-.75z"></path><path stroke=#e1e4ea stroke-linejoin=bevel d="M67.993 50.3v-18"></path><defs><linearGradient id=c x1=29.466 x2=67.295 y1=12.076 y2=12.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=d x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=b><rect width=132 height=29 x=1.993 y=.301 fill=#fff rx=4></rect></clipPath><filter id=a width=135.986 height=32.988 x=0 y=0 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4850_12317></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4850_12317 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4850_12317>`);
9594
+ var NotSubscribedState = () => {
9595
+ return _tmpl$91();
9596
+ };
9597
+ var _tmpl$92 = /* @__PURE__ */ template(`<div><div></div><div></div><div>`);
9598
+ var SubscriptionPreferencesListSkeleton = () => {
9599
+ const style = useStyle();
9600
+ return (() => {
9601
+ var _el$ = _tmpl$92(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling;
9602
+ insert(_el$2, createComponent(SkeletonText, {
9603
+ appearanceKey: "notificationList__skeletonText",
9604
+ "class": "nt-h-3.5 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9605
+ }), null);
9606
+ insert(_el$2, createComponent(SkeletonText, {
9607
+ appearanceKey: "preferencesList__skeletonText",
9608
+ "class": "nt-size-4 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9609
+ }), null);
9610
+ insert(_el$3, createComponent(SkeletonText, {
9611
+ appearanceKey: "notificationList__skeletonText",
9612
+ "class": "nt-h-3.5 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9613
+ }), null);
9614
+ insert(_el$3, createComponent(SkeletonText, {
9615
+ appearanceKey: "preferencesList__skeletonText",
9616
+ "class": "nt-size-4 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9617
+ }), null);
9618
+ insert(_el$4, createComponent(SkeletonText, {
9619
+ appearanceKey: "notificationList__skeletonText",
9620
+ "class": "nt-h-3.5 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9621
+ }), null);
9622
+ insert(_el$4, createComponent(SkeletonText, {
9623
+ appearanceKey: "preferencesList__skeletonText",
9624
+ "class": "nt-size-4 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
9625
+ }), null);
9626
+ effect((_p$) => {
9627
+ var _v$ = style({
9628
+ key: "preferencesList__skeletonContent",
9629
+ className: "nt-flex nt-flex-col nt-w-full nt-gap-3 nt-py-2"
9630
+ }), _v$2 = style({
9631
+ key: "preferencesList__skeletonItem",
9632
+ className: "nt-flex nt-items-center nt-justify-between"
9633
+ }), _v$3 = style({
9634
+ key: "preferencesList__skeletonItem",
9635
+ className: "nt-flex nt-items-center nt-justify-between"
9636
+ }), _v$4 = style({
9637
+ key: "preferencesList__skeletonItem",
9638
+ className: "nt-flex nt-items-center nt-justify-between"
9639
+ });
9640
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9641
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
9642
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
9643
+ _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
9644
+ return _p$;
9645
+ }, {
9646
+ e: void 0,
9647
+ t: void 0,
9648
+ a: void 0,
9649
+ o: void 0
9650
+ });
9651
+ return _el$;
9652
+ })();
9653
+ };
9654
+
9655
+ // src/ui/components/subscription/SubscriptionPreferencesFallback.tsx
9656
+ var _tmpl$93 = /* @__PURE__ */ template(`<div><div><span></span><span>`);
9657
+ var SubscriptionPreferencesFallback = (props) => {
9658
+ const style = useStyle();
9659
+ const {
9660
+ t
9661
+ } = useLocalization();
9662
+ return createComponent(Show, {
9663
+ get when() {
9664
+ return !props.loading;
9665
+ },
9666
+ get fallback() {
9667
+ return createComponent(SubscriptionPreferencesListSkeleton, {});
9668
+ },
9669
+ get children() {
9670
+ var _el$ = _tmpl$93(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
9671
+ insert(_el$, createComponent(Show, {
9672
+ get when() {
9673
+ var _a;
9674
+ return ((_a = props.subscription) == null ? void 0 : _a.preferences.length) === 0;
9675
+ },
9676
+ get fallback() {
9677
+ return createComponent(NotSubscribedState, {});
9678
+ },
9679
+ get children() {
9680
+ return createComponent(EmptyState, {});
9681
+ }
9682
+ }), _el$2);
9683
+ insert(_el$3, (() => {
9684
+ var _c$ = memo(() => {
9685
+ var _a;
9686
+ return ((_a = props.subscription) == null ? void 0 : _a.preferences.length) === 0;
9687
+ });
9688
+ return () => _c$() ? t("subscription.preferences.empty.header") : t("subscription.preferences.notSubscribed.header");
9689
+ })());
9690
+ insert(_el$4, (() => {
9691
+ var _c$2 = memo(() => {
9692
+ var _a;
9693
+ return ((_a = props.subscription) == null ? void 0 : _a.preferences.length) === 0;
9694
+ });
9695
+ return () => _c$2() ? t("subscription.preferences.empty.description") : t("subscription.preferences.notSubscribed.description");
9696
+ })());
9697
+ insert(_el$, createComponent(SubscriptionButton, {
9698
+ get subscription() {
9699
+ return props.subscription;
9700
+ },
9701
+ get loading() {
9702
+ return props.loading;
9703
+ },
9704
+ get onClick() {
9705
+ return props.onSubscribeClick;
9706
+ }
9707
+ }), null);
9708
+ effect((_p$) => {
9709
+ var _a, _b, _c, _d, _e, _f;
9710
+ var _v$ = style({
9711
+ key: "subscriptionPreferencesFallback",
9712
+ className: "nt-flex nt-flex-col nt-items-center nt-justify-center nt-pt-8 nt-pb-12 nt-gap-6",
9713
+ context: {
9714
+ subscription: (_a = props.subscription) != null ? _a : void 0
9715
+ }
9716
+ }), _v$2 = style({
9717
+ key: "subscriptionPreferencesFallbackTexts",
9718
+ className: "nt-flex nt-flex-col nt-items-center nt-justify-center nt-gap-1",
9719
+ context: {
9720
+ subscription: (_b = props.subscription) != null ? _b : void 0
9721
+ }
9722
+ }), _v$3 = style({
9723
+ key: "subscriptionPreferencesFallbackHeader",
9724
+ className: "nt-text-xs nt-font-medium",
9725
+ context: {
9726
+ subscription: (_c = props.subscription) != null ? _c : void 0
9727
+ }
9728
+ }), _v$4 = ((_d = props.subscription) == null ? void 0 : _d.preferences.length) === 0 ? "subscription.preferences.empty.header" : "subscription.preferences.notSubscribed.header", _v$5 = style({
9729
+ key: "subscriptionPreferencesFallbackDescription",
9730
+ className: "nt-text-xs nt-font-medium nt-text-foreground-alpha-400",
9731
+ context: {
9732
+ subscription: (_e = props.subscription) != null ? _e : void 0
9733
+ }
9734
+ }), _v$6 = ((_f = props.subscription) == null ? void 0 : _f.preferences.length) === 0 ? "subscription.preferences.empty.description" : "subscription.preferences.notSubscribed.description";
9735
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9736
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
9737
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
9738
+ _v$4 !== _p$.o && setAttribute(_el$3, "data-localization", _p$.o = _v$4);
9739
+ _v$5 !== _p$.i && className(_el$4, _p$.i = _v$5);
9740
+ _v$6 !== _p$.n && setAttribute(_el$4, "data-localization", _p$.n = _v$6);
9741
+ return _p$;
9742
+ }, {
9743
+ e: void 0,
9744
+ t: void 0,
9745
+ a: void 0,
9746
+ o: void 0,
9747
+ i: void 0,
9748
+ n: void 0
9749
+ });
9750
+ return _el$;
9751
+ }
9752
+ });
9753
+ };
9754
+
9755
+ // src/ui/components/subscription/SubscriptionPreferences.tsx
9756
+ var _tmpl$94 = /* @__PURE__ */ template(`<div class=nt-max-w-56>`);
9757
+ var _tmpl$228 = /* @__PURE__ */ template(`<div><p>`);
9758
+ var _tmpl$317 = /* @__PURE__ */ template(`<div>`);
9759
+ var SubscriptionPreferences = (props) => {
9760
+ const style = useStyle();
9761
+ const {
9762
+ isDevelopmentMode
9763
+ } = useInboxContext();
9764
+ const {
9765
+ t
9766
+ } = useLocalization();
9767
+ const groupedPreferences = createMemo(() => {
9768
+ var _a, _b, _c;
9769
+ const subscriptionPreferences = (_b = (_a = props.subscription) == null ? void 0 : _a.preferences) != null ? _b : [];
9770
+ return (_c = props.preferences.map((preferenceFilter) => {
9771
+ var _a2;
9772
+ if (typeof preferenceFilter === "string") {
9773
+ const foundPreference = subscriptionPreferences.find((el) => {
9774
+ var _a3, _b2;
9775
+ return ((_a3 = el.workflow) == null ? void 0 : _a3.id) === preferenceFilter || ((_b2 = el.workflow) == null ? void 0 : _b2.identifier) === preferenceFilter;
9776
+ });
9777
+ if (foundPreference) {
9778
+ return {
9779
+ label: foundPreference.workflow.name,
9780
+ preference: foundPreference
9781
+ };
9782
+ }
9783
+ }
9784
+ if (typeof preferenceFilter === "object" && "workflowId" in preferenceFilter) {
9785
+ const foundPreference = subscriptionPreferences.find((pref) => {
9786
+ var _a3, _b2;
9787
+ return ((_a3 = pref.workflow) == null ? void 0 : _a3.id) === preferenceFilter.workflowId || ((_b2 = pref.workflow) == null ? void 0 : _b2.identifier) === preferenceFilter.workflowId;
9788
+ });
9789
+ if (foundPreference) {
9790
+ return {
9791
+ label: (_a2 = preferenceFilter.label) != null ? _a2 : foundPreference.workflow.name,
9792
+ preference: foundPreference
9793
+ };
9794
+ }
9795
+ }
9796
+ if (typeof preferenceFilter === "object" && "filter" in preferenceFilter) {
9797
+ let foundPreferences = [];
9798
+ if (typeof preferenceFilter.filter === "object" && "workflows" in preferenceFilter.filter) {
9799
+ const {
9800
+ workflows
9801
+ } = preferenceFilter.filter;
9802
+ foundPreferences = subscriptionPreferences.filter((pref) => {
9803
+ return workflows == null ? void 0 : workflows.some((workflow) => {
9804
+ var _a3, _b2;
9805
+ return workflow.workflowId === ((_a3 = pref.workflow) == null ? void 0 : _a3.id) || workflow.workflowId === ((_b2 = pref.workflow) == null ? void 0 : _b2.identifier);
9806
+ });
9807
+ }).map((pref) => {
9808
+ var _a3;
9809
+ const workflow = workflows == null ? void 0 : workflows.find((workflow2) => {
9810
+ var _a4, _b2;
9811
+ return workflow2.workflowId === ((_a4 = pref.workflow) == null ? void 0 : _a4.id) || workflow2.workflowId === ((_b2 = pref.workflow) == null ? void 0 : _b2.identifier);
9812
+ });
9813
+ return {
9814
+ label: (_a3 = workflow == null ? void 0 : workflow.label) != null ? _a3 : pref.workflow.name,
9815
+ preference: pref
9816
+ };
9817
+ });
9818
+ } else if (typeof preferenceFilter.filter === "object" && ("workflowIds" in preferenceFilter.filter || "tags" in preferenceFilter.filter)) {
9819
+ const {
9820
+ workflowIds,
9821
+ tags
9822
+ } = preferenceFilter.filter;
9823
+ foundPreferences = subscriptionPreferences.filter((pref) => {
9824
+ var _a3, _b2, _c2, _d;
9825
+ return (workflowIds == null ? void 0 : workflowIds.includes((_b2 = (_a3 = pref.workflow) == null ? void 0 : _a3.id) != null ? _b2 : "")) || (workflowIds == null ? void 0 : workflowIds.includes((_d = (_c2 = pref.workflow) == null ? void 0 : _c2.identifier) != null ? _d : "")) || (tags == null ? void 0 : tags.some((tag) => {
9826
+ var _a4, _b3;
9827
+ return (_b3 = (_a4 = pref.workflow) == null ? void 0 : _a4.tags) == null ? void 0 : _b3.includes(tag);
9828
+ }));
9829
+ }).map((pref) => ({
9830
+ label: pref.workflow.name,
9831
+ preference: pref
9832
+ }));
9833
+ }
9834
+ return {
9835
+ label: preferenceFilter.label,
9836
+ group: foundPreferences
9837
+ };
9838
+ }
9839
+ return void 0;
9840
+ }).filter((el) => el !== void 0)) != null ? _c : [];
9841
+ });
9842
+ createEffect(() => {
9843
+ setDynamicLocalization((prev) => {
9844
+ var _a;
9845
+ return __spreadValues(__spreadValues({}, prev), (_a = props.subscription) == null ? void 0 : _a.preferences.reduce((acc, preference) => {
9846
+ var _a2, _b;
9847
+ if (((_a2 = preference.workflow) == null ? void 0 : _a2.identifier) && ((_b = preference.workflow) == null ? void 0 : _b.name)) {
9848
+ acc[preference.workflow.identifier] = preference.workflow.name;
9849
+ }
9850
+ return acc;
9851
+ }, {}));
9852
+ });
9853
+ });
9854
+ return (() => {
9855
+ var _el$ = _tmpl$317();
9856
+ insert(_el$, createComponent(Show, {
9857
+ get when() {
9858
+ return !props.renderPreferences;
9859
+ },
9860
+ get fallback() {
9861
+ return createComponent(ExternalElementRenderer, {
9862
+ render: (el) => {
9863
+ var _a;
9864
+ if (props.renderPreferences) {
9865
+ return props.renderPreferences(el, (_a = props.subscription) != null ? _a : void 0, props.loading);
9866
+ }
9867
+ return () => {
9868
+ };
9869
+ }
9870
+ });
9871
+ },
9872
+ get children() {
9873
+ return [(() => {
9874
+ var _el$2 = _tmpl$228(), _el$3 = _el$2.firstChild;
9875
+ insert(_el$3, () => t("subscription.preferences.header"));
9876
+ insert(_el$2, createComponent(Tooltip.Root, {
9877
+ get children() {
9878
+ return [createComponent(Tooltip.Trigger, {
9879
+ get children() {
9880
+ return createComponent(IconRenderer, {
9881
+ iconKey: "info",
9882
+ get ["class"]() {
9883
+ var _a;
9884
+ return style({
9885
+ key: "subscriptionPreferencesInfoIcon",
9886
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
9887
+ context: {
9888
+ subscription: (_a = props.subscription) != null ? _a : void 0
9889
+ }
9890
+ });
9891
+ },
9892
+ fallback: Info
9893
+ });
9894
+ }
9895
+ }), createComponent(Tooltip.Content, {
9896
+ "data-localization": "subscription.preferences.headerInfo",
9897
+ get children() {
9898
+ var _el$4 = _tmpl$94();
9899
+ insert(_el$4, () => t("subscription.preferences.headerInfo"));
9900
+ return _el$4;
9901
+ }
9902
+ })];
9903
+ }
9904
+ }), null);
9905
+ effect((_p$) => {
9906
+ var _a, _b;
9907
+ var _v$ = style({
9908
+ key: "subscriptionPreferencesHeaderContainer",
9909
+ className: "nt-px-3 nt-py-2 nt-border-b nt-border-neutral-alpha-100 nt-flex nt-items-center nt-gap-1",
9910
+ context: {
9911
+ subscription: (_a = props.subscription) != null ? _a : void 0
9912
+ }
9913
+ }), _v$2 = style({
9914
+ key: "subscriptionPreferencesHeader",
9915
+ className: "nt-text-base nt-font-medium",
9916
+ context: {
9917
+ subscription: (_b = props.subscription) != null ? _b : void 0
9918
+ }
9919
+ });
9920
+ _v$ !== _p$.e && className(_el$2, _p$.e = _v$);
9921
+ _v$2 !== _p$.t && className(_el$3, _p$.t = _v$2);
9922
+ return _p$;
9923
+ }, {
9924
+ e: void 0,
9925
+ t: void 0
9926
+ });
9927
+ return _el$2;
9928
+ })(), (() => {
9929
+ var _el$5 = _tmpl$317();
9930
+ insert(_el$5, createComponent(Show, {
9931
+ get when() {
9932
+ var _a, _b, _c, _d;
9933
+ return !props.loading && ((_b = (_a = props.subscription) == null ? void 0 : _a.preferences) == null ? void 0 : _b.length) && ((_d = (_c = props.subscription) == null ? void 0 : _c.preferences) == null ? void 0 : _d.length) > 0;
9934
+ },
9935
+ get fallback() {
9936
+ return createComponent(SubscriptionPreferencesFallback, {
9937
+ get subscription() {
9938
+ var _a;
9939
+ return (_a = props.subscription) != null ? _a : void 0;
9940
+ },
9941
+ get loading() {
9942
+ return props.loading;
9943
+ },
9944
+ get onSubscribeClick() {
9945
+ return props.onSubscribeClick;
9946
+ }
9947
+ });
9948
+ },
9949
+ get children() {
9950
+ var _el$6 = _tmpl$317();
9951
+ insert(_el$6, createComponent(Index, {
9952
+ get each() {
9953
+ return groupedPreferences();
9954
+ },
9955
+ children: (preference) => createComponent(Show, {
9956
+ get when() {
9957
+ return preference().group;
9958
+ },
9959
+ get fallback() {
9960
+ return createComponent(SubscriptionPreferenceRow, {
9961
+ get preference() {
9962
+ return preference();
9963
+ }
9964
+ });
9965
+ },
9966
+ get children() {
9967
+ return createComponent(Show, {
9968
+ get when() {
9969
+ var _a;
9970
+ return (_a = preference().group) == null ? void 0 : _a.length;
9971
+ },
9972
+ get children() {
9973
+ return createComponent(SubscriptionPreferenceGroupRow, {
9974
+ get group() {
9975
+ return preference();
9976
+ },
9977
+ get subscription() {
9978
+ return props.subscription;
9979
+ }
9980
+ });
9981
+ }
9982
+ });
9983
+ }
9984
+ })
9985
+ }));
9986
+ effect(() => {
9987
+ var _a;
9988
+ return className(_el$6, style({
9989
+ key: "subscriptionPreferencesGroupsContainer",
9990
+ className: "nt-flex nt-flex-col nt-gap-2 nt-p-3 nt-pb-12",
9991
+ context: {
9992
+ subscription: (_a = props.subscription) != null ? _a : void 0
9993
+ }
9994
+ }));
9995
+ });
9996
+ return _el$6;
9997
+ }
9998
+ }));
9999
+ effect(() => {
10000
+ var _a;
10001
+ return className(_el$5, style({
10002
+ key: "subscriptionPreferencesContent",
10003
+ // the height is set here to ensure that the content is not jumping when the preferences are loaded or when the empty state is shown
10004
+ className: "nt-min-h-[272px]",
10005
+ context: {
10006
+ subscription: (_a = props.subscription) != null ? _a : void 0
10007
+ }
10008
+ }));
10009
+ });
10010
+ return _el$5;
10011
+ })(), createComponent(Footer, {
10012
+ name: "Subscriptions"
10013
+ })];
10014
+ }
10015
+ }));
10016
+ effect(() => {
10017
+ var _a;
10018
+ return className(_el$, style({
10019
+ key: "subscriptionPreferencesContainer",
10020
+ className: cn("nt-w-full nt-h-full nt-flex nt-flex-col [&_.nv-preferencesContainer]:nt-pb-8 [&_.nv-notificationList]:nt-pb-8 nt-overflow-x-hidden", {
10021
+ "[&_.nv-preferencesContainer]:nt-pb-12 [&_.nv-notificationList]:nt-pb-12": isDevelopmentMode(),
10022
+ "[&_.nv-preferencesContainer]:nt-pb-8 [&_.nv-notificationList]:nt-pb-8": !isDevelopmentMode()
10023
+ }),
10024
+ context: {
10025
+ subscription: (_a = props.subscription) != null ? _a : void 0
10026
+ }
10027
+ }));
10028
+ });
10029
+ return _el$;
10030
+ })();
10031
+ };
10032
+
10033
+ // src/ui/components/subscription/SubscriptionCog.tsx
10034
+ var ANIMATION_CONFIG = {
10035
+ initial: {
10036
+ opacity: 0,
10037
+ x: 20,
10038
+ width: 0,
10039
+ marginLeft: 0
10040
+ },
10041
+ animate: {
10042
+ opacity: 1,
10043
+ x: 0,
10044
+ width: "auto",
10045
+ marginLeft: "6px"
10046
+ },
10047
+ exit: {
10048
+ opacity: 0,
10049
+ x: 20,
10050
+ width: 0,
10051
+ marginLeft: 0
10052
+ },
10053
+ transition: {
10054
+ duration: 0.3,
10055
+ easing: [0, 0, 0.2, 1]
10056
+ }
10057
+ };
10058
+ var SubscriptionCog = (props) => {
10059
+ const style = useStyle();
10060
+ const subscription = createMemo(() => {
10061
+ var _a;
10062
+ return (_a = props.subscription) != null ? _a : void 0;
10063
+ });
10064
+ const hasSubscription = createMemo(() => !!subscription());
10065
+ const containerClass = createMemo(() => style({
10066
+ key: "subscription__popoverTriggerContainer",
10067
+ className: "nt-h-6",
10068
+ context: {
10069
+ subscription: subscription()
10070
+ }
10071
+ }));
10072
+ const triggerClass = createMemo(() => style({
10073
+ key: "subscription__popoverTrigger",
10074
+ className: "nt-p-1 nt-size-6",
10075
+ context: {
10076
+ subscription: subscription()
10077
+ }
10078
+ }));
10079
+ const iconClass = createMemo(() => style({
10080
+ key: "subscriptionTriggerIcon",
10081
+ className: "nt-text-foreground-alpha-600 nt-size-3.5",
10082
+ context: {
10083
+ subscription: subscription()
10084
+ }
10085
+ }));
10086
+ const renderTrigger = (triggerProps) => createComponent(Presence, {
10087
+ exitBeforeEnter: true,
10088
+ get children() {
10089
+ return createComponent(Show, {
10090
+ get when() {
10091
+ return hasSubscription();
10092
+ },
10093
+ get children() {
10094
+ return createComponent(Motion$1.span, {
10095
+ get initial() {
10096
+ return ANIMATION_CONFIG.initial;
10097
+ },
10098
+ get animate() {
10099
+ return ANIMATION_CONFIG.animate;
10100
+ },
10101
+ get exit() {
10102
+ return ANIMATION_CONFIG.exit;
10103
+ },
10104
+ get transition() {
10105
+ return ANIMATION_CONFIG.transition;
10106
+ },
10107
+ style: {
10108
+ opacity: 1,
10109
+ transform: "translateX(0px)",
10110
+ width: "auto",
10111
+ "margin-left": "6px"
10112
+ },
10113
+ get ["class"]() {
10114
+ return containerClass();
10115
+ },
10116
+ get children() {
10117
+ return createComponent(Button, mergeProps({
10118
+ get ["class"]() {
10119
+ return triggerClass();
10120
+ },
10121
+ variant: "secondary"
10122
+ }, triggerProps, {
10123
+ get disabled() {
10124
+ return !subscription() || props.loading;
10125
+ },
10126
+ get children() {
10127
+ return createComponent(Cogs, {
10128
+ get ["class"]() {
10129
+ return iconClass();
10130
+ }
10131
+ });
10132
+ }
10133
+ }));
10134
+ }
10135
+ });
10136
+ }
10137
+ });
10138
+ }
10139
+ });
10140
+ return createComponent(Popover.Root, {
10141
+ get open() {
10142
+ return props.isOpen;
10143
+ },
10144
+ get onOpenChange() {
10145
+ return props.onOpenChange;
10146
+ },
10147
+ get placement() {
10148
+ var _a;
10149
+ return (_a = props.placement) != null ? _a : "bottom-end";
10150
+ },
10151
+ get offset() {
10152
+ return props.placementOffset;
10153
+ },
10154
+ get children() {
10155
+ return [createComponent(Popover.Trigger, {
10156
+ asChild: renderTrigger
10157
+ }), createComponent(Show, {
10158
+ get when() {
10159
+ return subscription();
10160
+ },
10161
+ children: (subscription2) => createComponent(Popover.Content, {
10162
+ portal: true,
10163
+ appearanceKey: "subscription__popoverContent",
10164
+ size: "subscription",
10165
+ get context() {
10166
+ return {
10167
+ subscription: subscription2()
10168
+ };
10169
+ },
10170
+ get children() {
10171
+ return createComponent(SubscriptionPreferences, {
10172
+ get preferences() {
10173
+ return props.preferences;
10174
+ },
10175
+ get renderPreferences() {
10176
+ return props.renderPreferences;
10177
+ },
10178
+ get subscription() {
10179
+ return subscription2();
10180
+ },
10181
+ get loading() {
10182
+ return props.loading;
10183
+ },
10184
+ get onSubscribeClick() {
10185
+ return props.onSubscribeClick;
10186
+ }
10187
+ });
10188
+ }
10189
+ })
10190
+ })];
10191
+ }
10192
+ });
10193
+ };
10194
+
10195
+ // src/ui/components/subscription/Subscription.tsx
10196
+ var _tmpl$95 = /* @__PURE__ */ template(`<div>`);
10197
+ var Subscription = (props) => {
10198
+ const style = useStyle();
10199
+ const {
10200
+ isOpened,
10201
+ setIsOpened
10202
+ } = useInboxContext();
10203
+ const isOpen = () => {
10204
+ var _a;
10205
+ return (_a = props == null ? void 0 : props.open) != null ? _a : isOpened();
10206
+ };
10207
+ const {
10208
+ subscription,
10209
+ loading,
10210
+ create,
10211
+ remove
10212
+ } = useSubscription({
10213
+ topicKey: props.topicKey,
10214
+ identifier: props.identifier
10215
+ });
10216
+ const onSubscribeClick = () => {
10217
+ const currentSubscription = subscription();
10218
+ if (currentSubscription) {
10219
+ remove({
10220
+ subscription: currentSubscription
10221
+ });
10222
+ } else {
10223
+ const preferences = props.preferences.map((preference) => {
10224
+ if (typeof preference === "object" && "workflowId" in preference && preference.workflowId) {
10225
+ return {
10226
+ workflowId: preference.workflowId,
10227
+ enabled: preference.enabled
10228
+ };
10229
+ } else if (typeof preference === "object" && "filter" in preference && preference.filter) {
10230
+ return {
10231
+ filter: preference.filter,
10232
+ enabled: preference.enabled
10233
+ };
10234
+ }
10235
+ return preference;
10236
+ });
10237
+ create({
10238
+ topicKey: props.topicKey,
10239
+ identifier: props.identifier,
10240
+ preferences
10241
+ });
10242
+ }
10243
+ };
10244
+ return (() => {
10245
+ var _el$ = _tmpl$95();
10246
+ insert(_el$, createComponent(SubscriptionButton, {
10247
+ get subscription() {
10248
+ return subscription();
10249
+ },
10250
+ get loading() {
10251
+ return loading();
10252
+ },
10253
+ onClick: onSubscribeClick
10254
+ }), null);
10255
+ insert(_el$, createComponent(SubscriptionCog, {
10256
+ get isOpen() {
10257
+ return isOpen();
10258
+ },
10259
+ onOpenChange: setIsOpened,
10260
+ get subscription() {
10261
+ return subscription();
10262
+ },
10263
+ get loading() {
10264
+ return loading();
10265
+ },
10266
+ get placement() {
10267
+ var _a;
10268
+ return (_a = props.placement) != null ? _a : "bottom-end";
10269
+ },
10270
+ get placementOffset() {
10271
+ return props.placementOffset;
10272
+ },
10273
+ get preferences() {
10274
+ return props.preferences;
10275
+ },
10276
+ get renderPreferences() {
10277
+ return props.renderPreferences;
10278
+ },
10279
+ onSubscribeClick
10280
+ }), null);
10281
+ effect(() => {
10282
+ var _a;
10283
+ return className(_el$, style({
10284
+ key: "subscriptionContainer",
10285
+ className: cn("nt-flex nt-items-center"),
10286
+ context: {
10287
+ subscription: (_a = subscription()) != null ? _a : void 0
10288
+ }
10289
+ }));
10290
+ });
10291
+ return _el$;
10292
+ })();
10293
+ };
10294
+ var SubscriptionButtonWrapper = (props) => {
10295
+ const {
10296
+ subscription,
10297
+ loading,
10298
+ create,
10299
+ remove
10300
+ } = useSubscription({
10301
+ topicKey: props.topicKey,
10302
+ identifier: props.identifier
10303
+ });
10304
+ const onSubscribeClick = () => __async(void 0, null, function* () {
10305
+ var _a, _b, _c, _d, _e;
10306
+ const currentSubscription = subscription();
10307
+ (_a = props.onClick) == null ? void 0 : _a.call(props, {
10308
+ subscription: currentSubscription != null ? currentSubscription : void 0
10309
+ });
10310
+ if (currentSubscription) {
10311
+ const {
10312
+ error
10313
+ } = yield remove({
10314
+ subscription: currentSubscription
10315
+ });
10316
+ if (error) {
10317
+ (_b = props.onDeleteError) == null ? void 0 : _b.call(props, error);
10318
+ return;
10319
+ }
10320
+ (_c = props.onDeleteSuccess) == null ? void 0 : _c.call(props);
10321
+ } else {
10322
+ const preferences = props.preferences.map((preference) => {
10323
+ if (typeof preference === "object" && "workflowId" in preference && preference.workflowId) {
10324
+ return {
10325
+ workflowId: preference.workflowId,
10326
+ enabled: preference.enabled
10327
+ };
10328
+ } else if (typeof preference === "object" && "filter" in preference && preference.filter) {
10329
+ return {
10330
+ filter: preference.filter,
10331
+ enabled: preference.enabled
10332
+ };
10333
+ }
10334
+ return preference;
10335
+ });
10336
+ const {
10337
+ data,
10338
+ error
10339
+ } = yield create({
10340
+ topicKey: props.topicKey,
10341
+ identifier: props.identifier,
10342
+ preferences
10343
+ });
10344
+ if (data) {
10345
+ (_d = props.onCreateSuccess) == null ? void 0 : _d.call(props, {
10346
+ subscription: data
10347
+ });
10348
+ return;
10349
+ }
10350
+ (_e = props.onCreateError) == null ? void 0 : _e.call(props, error);
10351
+ }
10352
+ });
10353
+ return createComponent(SubscriptionButton, {
10354
+ get subscription() {
10355
+ return subscription();
10356
+ },
10357
+ get loading() {
10358
+ return loading();
10359
+ },
10360
+ onClick: onSubscribeClick
10361
+ });
10362
+ };
10363
+ var SubscriptionPreferencesWrapper = (props) => {
10364
+ const {
10365
+ subscription,
10366
+ loading,
10367
+ create,
10368
+ remove
10369
+ } = useSubscription({
10370
+ topicKey: props.topicKey,
10371
+ identifier: props.identifier
10372
+ });
10373
+ const onSubscribeClick = () => __async(void 0, null, function* () {
10374
+ var _a, _b, _c, _d, _e;
10375
+ const currentSubscription = subscription();
10376
+ (_a = props.onClick) == null ? void 0 : _a.call(props, {
10377
+ subscription: currentSubscription != null ? currentSubscription : void 0
10378
+ });
10379
+ if (currentSubscription) {
10380
+ const {
10381
+ error
10382
+ } = yield remove({
10383
+ subscription: currentSubscription
10384
+ });
10385
+ if (error) {
10386
+ (_b = props.onDeleteError) == null ? void 0 : _b.call(props, error);
10387
+ return;
10388
+ }
10389
+ (_c = props.onDeleteSuccess) == null ? void 0 : _c.call(props);
10390
+ } else {
10391
+ const preferences = props.preferences.map((preference) => {
10392
+ if (typeof preference === "object" && "workflowId" in preference && preference.workflowId) {
10393
+ return {
10394
+ workflowId: preference.workflowId,
10395
+ enabled: preference.enabled
10396
+ };
10397
+ } else if (typeof preference === "object" && "filter" in preference && preference.filter) {
10398
+ return {
10399
+ filter: preference.filter,
10400
+ enabled: preference.enabled
10401
+ };
10402
+ }
10403
+ return preference;
10404
+ });
10405
+ const {
10406
+ data,
10407
+ error
10408
+ } = yield create({
10409
+ topicKey: props.topicKey,
10410
+ identifier: props.identifier,
10411
+ preferences
10412
+ });
10413
+ if (data) {
10414
+ (_d = props.onCreateSuccess) == null ? void 0 : _d.call(props, {
10415
+ subscription: data
10416
+ });
10417
+ return;
10418
+ }
10419
+ (_e = props.onCreateError) == null ? void 0 : _e.call(props, error);
10420
+ }
10421
+ });
10422
+ return createComponent(SubscriptionPreferences, {
10423
+ get preferences() {
10424
+ return props.preferences;
10425
+ },
10426
+ get subscription() {
10427
+ return subscription();
10428
+ },
10429
+ get loading() {
10430
+ return loading();
10431
+ },
10432
+ onSubscribeClick
10433
+ });
10434
+ };
10435
+
10436
+ // src/ui/components/Renderer.tsx
10437
+ var novuComponents = {
10438
+ Inbox,
10439
+ InboxContent,
10440
+ Bell: Bell2,
10441
+ Notifications: (props) => {
10442
+ if (props.renderNotification) {
10443
+ const _a = props, otherProps = __objRest(_a, [
10444
+ "renderBody",
10445
+ "renderSubject",
10446
+ "renderAvatar",
10447
+ "renderDefaultActions",
10448
+ "renderCustomActions"
10449
+ ]);
10450
+ return createComponent(InboxContent, mergeProps(otherProps, {
10451
+ hideNav: true,
10452
+ get initialPage() {
10453
+ return InboxPage.Notifications;
10454
+ }
10455
+ }));
10456
+ }
10457
+ const _b = props, propsWithoutRenderNotification = __objRest(_b, [
10458
+ "renderNotification"
10459
+ ]);
10460
+ return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
10461
+ hideNav: true,
10462
+ get initialPage() {
10463
+ return InboxPage.Notifications;
10464
+ }
10465
+ }));
10466
+ },
10467
+ Preferences: (props) => {
10468
+ if (props.renderNotification) {
10469
+ const _a = props, otherProps = __objRest(_a, [
10470
+ "renderBody",
10471
+ "renderSubject",
10472
+ "renderAvatar",
10473
+ "renderDefaultActions",
10474
+ "renderCustomActions"
10475
+ ]);
10476
+ return createComponent(InboxContent, mergeProps(otherProps, {
10477
+ hideNav: true,
10478
+ get initialPage() {
10479
+ return InboxPage.Preferences;
10480
+ }
10481
+ }));
10482
+ }
10483
+ const _b = props, propsWithoutRenderNotification = __objRest(_b, [
10484
+ "renderNotification"
10485
+ ]);
10486
+ return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
10487
+ hideNav: true,
10488
+ get initialPage() {
10489
+ return InboxPage.Preferences;
10490
+ }
10491
+ }));
10492
+ },
10493
+ Subscription,
10494
+ SubscriptionButton: SubscriptionButtonWrapper,
10495
+ SubscriptionPreferences: SubscriptionPreferencesWrapper
10496
+ };
10497
+ var SUBSCRIPTION_COMPONENTS = ["Subscription", "SubscriptionButton", "SubscriptionPreferences"];
10498
+ var Renderer = (props) => {
10499
+ const nodes = () => [...props.nodes.keys()];
10500
+ onMount(() => {
10501
+ var _a;
10502
+ const id = NOVU_DEFAULT_CSS_ID;
10503
+ const root = props.container instanceof ShadowRoot ? props.container : document;
10504
+ const el = root.getElementById(id);
10505
+ if (el) {
10506
+ return;
10507
+ }
10508
+ const styleEl = document.createElement("style");
10509
+ styleEl.id = id;
10510
+ styleEl.innerHTML = ui_default;
10511
+ const stylesContainer = (_a = props.container) != null ? _a : document.head;
10512
+ stylesContainer.insertBefore(styleEl, stylesContainer.firstChild);
10513
+ onCleanup(() => {
10514
+ styleEl.remove();
10515
+ });
10516
+ });
10517
+ return createComponent(NovuProvider, {
10518
+ get options() {
10519
+ return props.options;
10520
+ },
10521
+ get novu() {
10522
+ return props.novu;
10523
+ },
10524
+ get children() {
10525
+ return createComponent(LocalizationProvider, {
10526
+ get localization() {
10527
+ return props.localization;
10528
+ },
10529
+ get children() {
9037
10530
  return createComponent(AppearanceProvider, {
9038
10531
  get id() {
9039
10532
  return props.novuUI.id;
@@ -9068,34 +10561,60 @@ var Renderer = (props) => {
9068
10561
  return props.routerPush;
9069
10562
  },
9070
10563
  get children() {
9071
- return createComponent(CountProvider, {
9072
- get children() {
9073
- return createComponent(For, {
9074
- get each() {
9075
- return nodes();
9076
- },
9077
- children: (node) => {
9078
- const novuComponent = () => props.nodes.get(node);
9079
- let portalDivElement;
9080
- const Component = novuComponents[novuComponent().name];
9081
- onMount(() => {
9082
- if (!["Notifications", "Preferences", "InboxContent"].includes(novuComponent().name)) return;
9083
- if (node instanceof HTMLElement) {
9084
- node.style.height = "100%";
9085
- }
9086
- if (portalDivElement) {
9087
- portalDivElement.style.height = "100%";
10564
+ return createComponent(For, {
10565
+ get each() {
10566
+ return nodes();
10567
+ },
10568
+ children: (node) => {
10569
+ const novuComponent = () => props.nodes.get(node);
10570
+ let portalDivElement;
10571
+ const Component = novuComponents[novuComponent().name];
10572
+ onMount(() => {
10573
+ if (!["Notifications", "Preferences", "InboxContent"].includes(novuComponent().name)) return;
10574
+ if (node instanceof HTMLElement) {
10575
+ node.style.height = "100%";
10576
+ }
10577
+ if (portalDivElement) {
10578
+ portalDivElement.style.height = "100%";
10579
+ }
10580
+ });
10581
+ return createComponent(Switch, {
10582
+ get fallback() {
10583
+ return createComponent(CountProvider, {
10584
+ get children() {
10585
+ return createComponent(Portal, {
10586
+ mount: node,
10587
+ ref: (el) => {
10588
+ portalDivElement = el;
10589
+ },
10590
+ get children() {
10591
+ return createComponent(Root, {
10592
+ get children() {
10593
+ return createComponent(Component, mergeProps(() => novuComponent().props));
10594
+ }
10595
+ });
10596
+ }
10597
+ });
9088
10598
  }
9089
10599
  });
9090
- return createComponent(Portal, {
9091
- mount: node,
9092
- ref: (el) => {
9093
- portalDivElement = el;
10600
+ },
10601
+ get children() {
10602
+ return createComponent(Match, {
10603
+ get when() {
10604
+ return SUBSCRIPTION_COMPONENTS.includes(novuComponent().name);
9094
10605
  },
9095
10606
  get children() {
9096
- return createComponent(Root, {
10607
+ return createComponent(Portal, {
10608
+ mount: node,
10609
+ ref: (el) => {
10610
+ portalDivElement = el;
10611
+ },
9097
10612
  get children() {
9098
- return createComponent(Component, mergeProps(() => novuComponent().props));
10613
+ return createComponent(Root, {
10614
+ get children() {
10615
+ return createComponent(Component, mergeProps(() => novuComponent().props));
10616
+ }
10617
+ });
9099
10618
  }
9100
10619
  });
9101
10620
  }
@@ -9117,7 +10636,7 @@ var Renderer = (props) => {
9117
10636
  };
9118
10637
 
9119
10638
  // src/ui/novuUI.tsx
9120
- var _dispose, _container, _setContainer, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _preferenceGroups, _setPreferenceGroups, _preferencesSort, _setPreferencesSort, _predefinedNovu, _NovuUI_instances, getContainerElement_fn, mountComponentRenderer_fn, updateComponentProps_fn;
10639
+ var _dispose, _container, _setContainer, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _preferenceGroups, _setPreferenceGroups, _preferencesSort, _setPreferencesSort, _novu, _setNovu, _NovuUI_instances, getContainerElement_fn, mountComponentRenderer_fn, updateComponentProps_fn;
9121
10640
  var NovuUI = class {
9122
10641
  constructor(props) {
9123
10642
  __privateAdd(this, _NovuUI_instances);
@@ -9143,7 +10662,8 @@ var NovuUI = class {
9143
10662
  __privateAdd(this, _setPreferenceGroups);
9144
10663
  __privateAdd(this, _preferencesSort);
9145
10664
  __privateAdd(this, _setPreferencesSort);
9146
- __privateAdd(this, _predefinedNovu);
10665
+ __privateAdd(this, _novu);
10666
+ __privateAdd(this, _setNovu);
9147
10667
  var _a;
9148
10668
  this.id = generateRandomString(16);
9149
10669
  const [appearance, setAppearance] = createSignal(props.appearance);
@@ -9156,6 +10676,7 @@ var NovuUI = class {
9156
10676
  const [preferencesSort, setPreferencesSort] = createSignal(props.preferencesSort);
9157
10677
  const [routerPush, setRouterPush] = createSignal(props.routerPush);
9158
10678
  const [container, setContainer] = createSignal(__privateMethod(this, _NovuUI_instances, getContainerElement_fn).call(this, props.container));
10679
+ const [novu, setNovu] = createSignal(props.novu);
9159
10680
  __privateSet(this, _mountedElements, mountedElements);
9160
10681
  __privateSet(this, _setMountedElements, setMountedElements);
9161
10682
  __privateSet(this, _appearance, appearance);
@@ -9168,7 +10689,8 @@ var NovuUI = class {
9168
10689
  __privateSet(this, _setTabs, setTabs);
9169
10690
  __privateSet(this, _routerPush, routerPush);
9170
10691
  __privateSet(this, _setRouterPush, setRouterPush);
9171
- __privateSet(this, _predefinedNovu, props.novu);
10692
+ __privateSet(this, _novu, novu);
10693
+ __privateSet(this, _setNovu, setNovu);
9172
10694
  __privateSet(this, _preferencesFilter, preferencesFilter);
9173
10695
  __privateSet(this, _setPreferencesFilter, setPreferencesFilter);
9174
10696
  __privateSet(this, _preferenceGroups, preferenceGroups);
@@ -9203,6 +10725,9 @@ var NovuUI = class {
9203
10725
  return newMountedElements;
9204
10726
  });
9205
10727
  }
10728
+ updateNovu(novu) {
10729
+ __privateGet(this, _setNovu).call(this, novu);
10730
+ }
9206
10731
  updateAppearance(appearance) {
9207
10732
  __privateGet(this, _setAppearance).call(this, appearance);
9208
10733
  }
@@ -9259,7 +10784,8 @@ _preferenceGroups = new WeakMap();
9259
10784
  _setPreferenceGroups = new WeakMap();
9260
10785
  _preferencesSort = new WeakMap();
9261
10786
  _setPreferencesSort = new WeakMap();
9262
- _predefinedNovu = new WeakMap();
10787
+ _novu = new WeakMap();
10788
+ _setNovu = new WeakMap();
9263
10789
  _NovuUI_instances = new WeakSet();
9264
10790
  getContainerElement_fn = function(container) {
9265
10791
  var _a;
@@ -9320,7 +10846,7 @@ mountComponentRenderer_fn = function() {
9320
10846
  return __privateGet(_a = _self$, _routerPush).call(_a);
9321
10847
  },
9322
10848
  get novu() {
9323
- return __privateGet(_self$, _predefinedNovu);
10849
+ return __privateGet(_self$, _novu);
9324
10850
  },
9325
10851
  get container() {
9326
10852
  var _a;
@@ -9343,4 +10869,4 @@ updateComponentProps_fn = function(element, props) {
9343
10869
  });
9344
10870
  };
9345
10871
 
9346
- export { NotificationStatus, NovuUI };
10872
+ export { NovuUI };