@ds-mo/ui 14.33.0 → 14.33.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.
- package/dist/.package-ready.json +1 -1
- package/dist/agent-patterns.json +1 -1
- package/dist/agent.json +3 -2
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/{p-BNZsZ6gV.js → p-CvplapTD.js} +2 -2
- package/dist/components/p-zZuAAiiI.js +2 -0
- package/dist/components/p-zZuAAiiI.js.map +1 -0
- package/dist/docs/components.json +2 -2
- package/dist/mcp-data/registry/panel-tools.json +5 -5
- package/dist/mcp-data/registry/registry.json +2 -1
- package/dist/mcp-data/registry/shell-app.json +1 -1
- package/dist/mcp-data/registry/table.json +3 -2
- package/dist/types/components/PanelTools/PanelTools.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/components/p-C9_8-DHV.js +0 -2
- package/dist/components/p-C9_8-DHV.js.map +0 -1
- /package/dist/components/{p-BNZsZ6gV.js.map → p-CvplapTD.js.map} +0 -0
package/dist/.package-ready.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"package":"@ds-mo/ui","version":"14.33.
|
|
1
|
+
{"schemaVersion":1,"package":"@ds-mo/ui","version":"14.33.2","components":83,"digest":"e0eb3874d715e89f8bdd67f7067c74cb6d42c572f3ce428c7ecd13a029e8e2d8","completedAt":"2026-09-09T15:25:05.557Z"}
|
package/dist/agent-patterns.json
CHANGED
package/dist/agent.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"package": "@ds-mo/ui",
|
|
4
|
-
"packageVersion": "14.33.
|
|
4
|
+
"packageVersion": "14.33.2",
|
|
5
5
|
"kind": "components",
|
|
6
6
|
"entries": [
|
|
7
7
|
{
|
|
@@ -7567,7 +7567,7 @@
|
|
|
7567
7567
|
"Use isInactive only for a temporarily unavailable visible tool; omit tools the user is not authorized to access.",
|
|
7568
7568
|
"Rail actions disable physical press scaling so notification-dot halos remain aligned to the shell gradient; hover and pressed washes continue to paint above the dot and halo.",
|
|
7569
7569
|
"Rail tooltips are shell-owned and position against the viewport so the narrow tools-lane collision boundary cannot clamp them beyond the viewport edge.",
|
|
7570
|
-
"The PanelTools host is the composed-tree overlay collision owner for menus and filter popups inside tool views. Drawer presentation keeps that rectangle on the rail-and-drawer column. Fullscreen presentation uses the
|
|
7570
|
+
"The PanelTools host is the composed-tree overlay collision owner for menus and filter popups inside tool views. Drawer presentation keeps that rectangle on the rail-and-drawer column. Fullscreen presentation uses the available ShellApp stage below its banner as the collision surface, so history-pane and header menus stay next to their triggers.",
|
|
7571
7571
|
"ds-menu and ds-filter-menu remain on the native popover top layer. Applications must not set boundary=viewport or position those popups to work around fullscreen collision.",
|
|
7572
7572
|
"The application owns slotted tool products and data while PanelTools owns rail ordering, drawer selection, open state, motion, and shell events.",
|
|
7573
7573
|
"Opening and closing clip an already-rendered fixed-width surface. Header and tool content remain fully opaque and retained during width motion; transition completion is accepted only at the measured terminal clip width, after which the closed surface becomes inert and paint-skipped.",
|
|
@@ -9965,6 +9965,7 @@
|
|
|
9965
9965
|
"Cells accept scalar content, standard primary-and-secondary or dual-primary text primitives, declarative Tag, wrapping multiple-Tag content, icon-only, icon-and-text, 16:9 Image, or ButtonUnfilled Action content, or explicit Empty and Blank absence values. Text objects may declare an optional href (and target) on the primary track only; the table renders a native anchor with the shared brand text-action treatment when the URL is safe, and leaves scalars unlinked. Standard secondary copy defaults to the secondary foreground and may declare a semantic Text color when the application data carries intent; an optional tertiary track uses the same subdued body-small recipe as secondary. Secondary and tertiary may also be a short list of colorable runs, rendered on one line with the table's middle-dot separator. A run may supply help to add the shared dotted underline and a bottom-start Tooltip when compact visible copy summarizes supplementary details; explicit line breaks create a compact unbulleted list without obscuring the current cell's earlier tracks. Dual-primary copy keeps both tracks primary unless explicitly colored and does not gain a tertiary track. Body data cells share 8px outer padding; header and group rows keep their own geometry. Text tracks, including Empty, keep 4px inline padding so copy lines up with column-header labels; Tag and icon-only tracks stay on the 8px cell chrome alone. Icon-and-text cells (`kind: 'icon-text'`) place one md prefix icon beside the same copy stack as a text cell. The icon slot takes 2px padding on every side, then a 2px flex gap before the copy; text-track padding stays on the copy. Omit iconLabel when the glyph is decorative. 20px content (body-medium text, md icon, and the row checkbox) sits in a 24px track so it stays optically aligned with 24px Tag and Action content. Single-track text, selection, tag-only, icon-only, icon-and-text, Action, Empty, Blank, and 1-track Image cells resolve a 40px base contract while two-track cells grow to 64px and three-track cells grow to 88px. Every later track adds 24px, so four tracks resolve to 112px, five to 136px, and the sequence may continue. Tracks stack with no gap. Wrapping primary on a 1-track cell uses that same rhythm: two wrapped lines share the 64px row and three wrapped lines share the 88px row. Wrapping secondary keeps primary on the first track and consumes later tracks: two secondary lines share the 88px row and three secondary lines share a 112px fourth track. Keep the same track count in every row of a table or group when those rows should share one height. Tag cells use the inset Tag recipe: md double-inset is a 24px control for tag-only and tag-with-text, while text-with-tag uses sm single-inset at 20px so the second-track pill sits in the same 24px lane. Multiple-Tag cells use `kind: 'tags'`, a positive `tracks` count, and small single-inset Tags that wrap naturally at the column edge. Each wrap line is a 24px track with no stack gap, matching text. The tallest cell establishes the native row height, so all sibling cells match even at four, five, or more tracks; virtual tables use the declared count as the initial estimate and measure responsive wrapping after paint. Action cells primarily use an icon-only Ellipses treatment, render a 24px small ButtonUnfilled, default to unbordered, and emit row, column, and action identities through dsCellAction. When an action cell declares items, that Ellipses trigger opens the shared ds-menu for commands, dividers, inactive rows, and destructive rows instead of emitting on click; choosing a command emits dsCellAction with that item's actionId. Omit items to keep a single-shot control. Image cells declare tracks 1, 2, or 3 so the 16:9 preview fills that body-row content box (cell height minus 8px padding) and the column hugs the resulting width; omit tracks for the 1-track recipe, and keep image tracks aligned with the other cells in the table or group. The image is clipped to the 2px preview radius and the tertiary border paints as an inset overlay so it remains visible over image pixels. Image cells fall back to an accessible placeholder when no source is supplied. Empty means the data applies but has no value and renders an em dash with localized assistive text; Blank means the data is not applicable and renders no content. Nullish values remain backward-compatible Empty values. Stable type, variant, and track-count hooks keep every cell family independently styleable.",
|
|
9966
9966
|
"Score-and-text cells (`kind: score-text`) place the small 24px safety score at the top-right of the cell while the same one-, two-, or three-track copy stack as a standard text cell fills from the start edge. The score is top-aligned with the first text track, adds no inner padding, and defaults its accessible name prefix to Safety score. Score-and-text loading geometry uses the matching small score skeleton and declared copy tracks.",
|
|
9967
9967
|
"The public @ds-mo/ui/table.css export is the authoritative zero-specificity visual recipe. Override its --ds-table-* properties or target its stable element classes for product-specific styling.",
|
|
9968
|
+
"While any checkbox selection is active, row activation toggles selection instead of opening details. Clearing the selection restores ordinary row activation. Nested controls retain their own intent, and disabled or non-selectable rows cannot be selected by activating their row.",
|
|
9968
9969
|
"Use surfaceOpenRowId to identify the interactive row associated with a visible detail panel or other contextual surface. The application owns opening, same-row toggling, switching records, and closing; retain the identity through exit motion, then clear it. Move it when panel navigation changes the displayed record. This pressed wash spans sticky and scrolling cells, follows stable row identity through virtualization, and never checks a checkbox or changes selectedRowIds. Group expansion remains an inline disclosure."
|
|
9969
9970
|
],
|
|
9970
9971
|
"responsiveBehavior": [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P as o,d as s}from"./p-
|
|
1
|
+
import{P as o,d as s}from"./p-zZuAAiiI.js";const t=o;const i=s;export{t as DsPanelTools,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-panel-tools.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,a,t as n}from"./index.js";import{c as l,d as o}from"./p-C9_8-DHV.js";import{f as h,v as r,j as p,o as d}from"./p-Dhw_W8nk.js";import{g as c,c as u,a as b,b as m,r as f}from"./p-BxduVc5g.js";import{i as g,b as v,c as _,r as y,S as k,d as w}from"./p-CgGcgMjs.js";import{c as x}from"./p-D_QtZZR8.js";import{d as C}from"./p-Da9VpZX2.js";import{d as S}from"./p-ByoywoBH.js";import{d as D}from"./p-BwsS_Hyr.js";import{d as M}from"./p-C1QHxVvP.js";import{d as A}from"./p-DBZwI7HY.js";import{d as L}from"./p-C51ytXM6.js";import{d as P}from"./p-ya8A_SMw.js";import{d as B}from"./p-eo_pmPqp.js";import{d as T}from"./p-Cea7rROU.js";import{d as j}from"./p-0XTyQNRG.js";import{d as z}from"./p-BlWNMytv.js";import{d as N}from"./p-C8XJgV1n.js";import{d as E}from"./p-CBQzTgvI.js";import{d as I}from"./p-DyyfWSLB.js";import{d as $}from"./p-Dj296RmE.js";import{d as O}from"./p-CIYJhyKt.js";import{d as F}from"./p-CHUdAW1Q.js";import{d as H}from"./p-OxdAzO4v.js";import{d as V}from"./p-DrjY8Mpy.js";import{d as R}from"./p-BNZsZ6gV.js";import{d as G}from"./p-CqeMumqy.js";import{d as K}from"./p-CKo2nySr.js";import{d as W}from"./p-LZ8F08Fj.js";import{d as U}from"./p-CK2S28gU.js";import{d as Z}from"./p-AkSwrAKR.js";import{d as q}from"./p-CnK36Be0.js";const Q={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function X(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Y(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=s.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(s.isContentEditable)}function J(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function ee(e){if(!X(e))return null;const s=J(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=Q[s];if(t)return`open-tool:${t}`;return null}const se=["none","cool","neutral","warm","fresh"];const te="neutral";const ie={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const ae="100% 100% at 0% 0%";function ne(e){const s=he(e);return s==="none"?null:ie[s]}function le(e){return String(ne(e)?.opacity??0)}function oe(e){return se.includes(e)}function he(e){return e!=null&&oe(e)?e:te}function re(e){const s=he(e);if(s==="none")return"none";return pe(ie[s].stops)}function pe(e){const s=e.map((e=>`${e.color} ${e.position}%`)).join(", ");return`radial-gradient(${ae}, ${s})`}const de="--ds-shell-gradient-image";const ce="--ds-shell-gradient-size";const ue="--ds-shell-gradient-position-panel";const be="--ds-shell-gradient-position-bar";const me="--ds-shell-gradient-opacity";function fe(e=te){return re(e)}function ge(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function ve(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function _e(){return"0 0"}function ye(e){return`${-Math.round(e)}px 0`}function ke(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const i=t.getBoundingClientRect().width;e.removeChild(t);return i}function we(e){return{expandedPx:ke(e,"--_nav-width"),collapsedPx:ke(e,"--_nav-width-collapsed")}}function xe(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function Ce(e,s){return s?e.collapsedPx:e.expandedPx}const Se=()=>`.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs);--ds-shell-gradient-context:flat}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app--gradient.sc-ds-shell-app-h{--ds-shell-gradient-context:gradient}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{--_shell-banner-edge-display:none;flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__paper-texture.sc-ds-shell-app{z-index:2}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app-s>ds-bar-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-title,.shell-app__bar.sc-ds-shell-app-s>ds-bar-page-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-page-title{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-title.sc-ds-shell-app,.shell-app__bar.sc-ds-shell-app>ds-bar-page-title.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app:focus,.shell-app__content.sc-ds-shell-app:focus-visible{outline:none}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__tool-slot-proxy.sc-ds-shell-app{display:block;width:100%;height:100%;min-width:0;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{z-index:3}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top);background:var(--ds-shell-safe-area-background, var(--color-background-primary))}.shell-app--mobile.sc-ds-shell-app-h .shell-app__banner.sc-ds-shell-app{--_shell-banner-edge-display:block}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;let De=0;const Me=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange",7);this.dsNavSelect=t(this,"dsNavSelect",7);this.dsTabChange=t(this,"dsTabChange",7);this.dsNavChildSelect=t(this,"dsNavChildSelect",7);this.dsSubsectionChange=t(this,"dsSubsectionChange",7);this.dsPageBack=t(this,"dsPageBack",7);this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect",7);this.dsPageAction=t(this,"dsPageAction",7);this.dsToolChange=t(this,"dsToolChange",7);this.dsHeaderBack=t(this,"dsHeaderBack",7);this.dsHeaderAction=t(this,"dsHeaderAction",7);this.dsRailAccessoryAction=t(this,"dsRailAccessoryAction",7);this.dsPresentationChange=t(this,"dsPresentationChange",7);this.dsBrowseContextChange=t(this,"dsBrowseContextChange",7);this.dsNavFooterAction=t(this,"dsNavFooterAction",7);this.dsNavUserAction=t(this,"dsNavUserAction",7);this.composition="managed";this.navigation={};this.sectionNavigation="bar";this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=te;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false;this.mobileActionMenuInitialFocusVisible=false;this.instanceId=De++;this.mobileActionMenuTriggerId=`shell-app-mobile-action-trigger-${this.instanceId}`;this.mobileActionMenuId=`shell-app-mobile-action-menu-${this.instanceId}`;this.mobileActionTriggerEl=null;this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new c;this.chromeSyncCoalescer=u((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{const s=f(e);if(s!=="panel-nav")return;this.panelNavTransition.enter();const t=ge();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{const s=f(e);if(s!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=e=>{if(e.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=e=>{e.stopPropagation();this.dsNavSelect.emit(e.detail)};this.handleManagedNavChildSelect=e=>{e.stopPropagation();this.dsNavChildSelect.emit(e.detail)};this.handleManagedTabChange=e=>{e.stopPropagation();this.dsTabChange.emit(e.detail)};this.handleManagedPageBack=e=>{e.stopPropagation();this.dsPageBack.emit(e.detail)};this.handleManagedBreadcrumbSelect=e=>{e.stopPropagation();const s=this.dsBreadcrumbSelect.emit(e.detail);if(s.defaultPrevented)e.preventDefault()};this.handleManagedSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)};this.handleManagedPageAction=e=>{e.stopPropagation();this.dsPageAction.emit(e.detail)};this.handleManagedToolChange=e=>{e.stopPropagation();const{id:s,selected:t}=e.detail;this.managedActiveTool=s;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((e=>e.id===s));if(i&&g(i)){this.managedInboxTool=s}this.managedMobileDestination=t?i?.mobileDestination??v(true,s):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(e.detail)};this.handleManagedPresentationChange=e=>{e.stopPropagation();this.managedToolPresentation=e.detail.presentation;this.toolsFullscreen=e.detail.presentation==="fullscreen";this.dsPresentationChange.emit(e.detail)};this.handleManagedHeaderBack=e=>{e.stopPropagation();this.dsHeaderBack.emit(e.detail)};this.handleManagedHeaderAction=e=>{e.stopPropagation();this.dsHeaderAction.emit(e.detail)};this.handleManagedRailAccessoryAction=e=>{e.stopPropagation();this.dsRailAccessoryAction.emit(e.detail)};this.handleManagedSheetToggle=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=e.detail};this.handleManagedMobileDestination=e=>{e.stopPropagation();const s=e.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=s;if(s==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(s)};this.handleManagedAreaSelect=e=>{e.stopPropagation();if(e.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(e.detail)};this.handleManagedMobileChildSelect=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavChildSelect.emit(e.detail)};this.handleManagedBrowseContext=e=>{e.stopPropagation();this.managedBrowseContext=e.detail;this.dsBrowseContextChange.emit(e.detail)};this.handleManagedSheetClose=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=e=>{e.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=e=>{e.stopPropagation();this.dsNavUserAction.emit(e.detail)};this.closeMobileActionMenu=()=>{this.mobileActionMenuOpen=false};this.handleMobileActionSelect=e=>{const s=String(e.detail.value??"");const t=h(this.resolvedHeaderActions,s);if(!t||t.isInactive||"isLoading"in t&&t.isLoading)return;this.mobileActionMenuOpen=false;this.dsPageAction.emit(s);requestAnimationFrame((()=>void this.mobileActionTriggerEl?.setFocus?.()))}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??l}get resolvedPageTabs(){const e=this.currentArea.children;if(!e?.length)return this.pageChrome.tabs??[];return e.map((e=>({id:e.id,label:e.label,dot:e.dot,isInactive:e.isInactive})))}get availableInboxTools(){return this.resolvedToolItems.filter((e=>!e.isInactive&&g(e))).map((e=>e.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=_(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=y("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(b,this.onChromeTransitionStart);this.el.addEventListener(m,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=e?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(e){this.toolsFullscreen=e.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(b,this.onChromeTransitionStart);this.el.removeEventListener(m,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(e,s){this.managedBrowseContext=this.navigation.browseContext??this.navStyle;if(e.currentUrl!==s.currentUrl||e.activeId!==s.activeId){this.managedMobilePrimaryDestination="area"}}handlePageChromeChange(){if(this.mobileActionMenuSections.length===0){this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false}}handleToolsChange(){if(!this.resolvedToolItems.some((e=>e.id==="help"&&!e.isInactive))){this.managedMobilePrimaryDestination="area"}if(this.managedActiveTool&&!this.resolvedToolItems.some((e=>e.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=y(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(e,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const e=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof s&&e?.contains(t))return;void e?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const e=_(window.innerWidth);if(e===this.resolvedMode)return;this.resolvedMode=e;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:e})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}syncSlottedMobileState(){const e=this.el.querySelector("ds-shell-tools");const s=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(e){e.setAttribute("responsive-mode",this.resolvedMode);e.responsiveMode=this.resolvedMode}if(s){s.activeDestination=this.effectiveMobileDestination;s.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".shell-app__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),e.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=we(e)}applyGradientVars(e,s){const t=e.style;for(const[e,i]of Object.entries(s)){if(i===null)t.removeProperty(e);else t.setProperty(e,i)}}clearGradientPaintVars(e){const s=[de,ce,me];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,i){if(e){e.style.setProperty(ue,t)}if(s){s.style.setProperty(be,i)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=xe(e,s);return Ce(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=xe(e,s);return Ce(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return ge()}chromeLayerActive(){return this.gradientLayerActive()||this.paperTextureLayerActive()}gradientLayerActive(){return this.resolvedMode!=="mobile"&&he(this.gradientPreset)!=="none"}paperTextureLayerActive(){return this.resolvedMode!=="mobile"&&this.paperTexture!=null}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(Y(e.target))return;const s=ee(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void i?.closeDrawer?.();return}if(s.startsWith("open-tool:")&&i){const e=s.slice("open-tool:".length);void i.activateTool?.(e)}}async activateTool(e){const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.activateTool?.(e))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.closeDrawer?.())}async setToolPresentation(e){this.managedToolPresentation=e;this.toolsFullscreen=e==="fullscreen"}activateManagedMobileTool(e){const s=e==="inbox"?y(this.managedInboxTool,this.availableInboxTools):e;if(!s)return false;const t=this.resolvedToolItems.find((t=>t.id===s||e!=="inbox"&&t.mobileDestination===e));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(g(t))this.managedInboxTool=i;if(e==="help")this.managedMobilePrimaryDestination="help";this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const e=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const s=e.flatMap((e=>e.items));const t=this.navigation.activeId||x(this.navigation.currentUrl??this.pageChrome.currentUrl??"",s);return s.find((e=>e.id===t))??s[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(e){return this.resolvedToolItems.find((s=>s.id===e))?.dot??false}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector('ds-bar-nav, ds-bar-page-title, ds-bar-title[placement="shell-bar"]');const t=[this.el,e,s].filter((e=>e!==null));const i=()=>{if(e)e.style.removeProperty(ue);if(s)s.style.removeProperty(be)};const a=he(this.gradientPreset);if(this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const n=this.resolveViewportDimensions();if(a==="none"){this.clearGradientPaintVars(t);i();this.syncPaperTextureLayout(n);return}const l=this.resolvePanelWidthPx(e);const o=_e();const h=ye(l);this.syncChromeLayoutVars(e,s,o,h);const r=fe(a);const p=ve({width:n.width,height:n.height});const d=le(a);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[de]:r,[ce]:p,[ue]:o,[be]:h,[me]:d});continue}const t=e===s;this.applyGradientVars(e,{[de]:r,[ce]:p,[me]:d,[ue]:t?null:o,[be]:t?h:null})}this.syncPaperTextureLayout(n)}syncPaperTextureLayout(e){const s=this.el.querySelector(".shell-app__chrome");const t=this.el.querySelector(".shell-app__chrome > ds-paper-texture");if(!s||!t)return;const i=s.getBoundingClientRect();t.style.setProperty("width",`${Math.round(e.width)}px`);t.style.setProperty("height",`${Math.round(e.height)}px`);t.style.setProperty("left",`${-Math.round(i.left)}px`);t.style.setProperty("top",`${-Math.round(i.top)}px`)}renderPaperTexture(){if(!this.paperTextureLayerActive())return null;return i("ds-paper-texture",{class:"shell-app__paper-texture",config:this.paperTexture})}renderManagedPanelNav(){const e=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,presentation:this.sectionNavigation==="panel"?"nested":"flat",groups:this.resolvedNavigationGroups,breakpoint:k,routerMode:e.routerMode??"event",activeId:e.activeId??"",activeChildId:this.pageChrome.value??"",currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",storageKey:e.storageKey??"",userName:e.userName??"",userInitial:e.userInitial??"",accountMenuExpanded:e.accountMenuExpanded??false,accountMenuSurfaceOpen:e.accountMenuSurfaceOpen,dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",dashboardNavigationLabel:e.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:e.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:e.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavChildSelect:this.handleManagedNavChildSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.resolvedPageTabs,value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedTopBar(){return this.sectionNavigation==="panel"?this.renderManagedBarPageTitle():this.renderManagedBarNav()}renderManagedToolSlots(){const e=[...new Set(this.resolvedToolItems.map((e=>e.id)))].sort();return e.flatMap((e=>[i("div",{key:`tool:${e}`,class:"shell-app__tool-slot-proxy",slot:e},i("slot",{name:e})),i("div",{key:`tool-view:${e}`,class:"shell-app__tool-slot-proxy",slot:`${e}-view`},i("slot",{name:`${e}-view`}))]))}renderManagedTools(){const e=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:e.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,accessories:e.accessories??[],headers:e.headers??{},storageKey:e.storageKey??"",toolsLabel:e.toolsLabel??"Tools",toolShortcutsLabel:e.toolShortcutsLabel??"Tool shortcuts",inboxLabel:e.inboxLabel??"Inbox",inboxNavigationLabel:e.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction,onDsRailAccessoryAction:this.handleManagedRailAccessoryAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const e=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,presentation:this.sectionNavigation==="panel"?"nested":"flat",browseContext:this.managedBrowseContext,dashboardGroups:e.dashboardGroups??e.groups??[],settingsGroups:e.settingsGroups??[],currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:e.navigationLabel??"Application navigation",dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",showAccount:e.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsNavChildSelect:this.handleManagedMobileChildSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){const e=e=>this.resolvedToolItems.find((s=>s.id===e));const s=(s,t)=>e(s)?.ariaLabel??e(s)?.label??t;const t=this.resolvedToolItems.some((e=>!e.isInactive&&e.mobileDestination==="activity"));return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,primaryDestination:this.managedMobilePrimaryDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:s("search","Search"),activityMode:t?"direct":"inbox",activityLabel:s("activity","Activity"),inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:s("messages","Messages"),agentsLabel:s("agents","Agents"),helpLabel:s("help","Help & Support"),searchDot:this.toolDot("search"),activityDot:this.toolDot("activity"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"lg","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:e=>this.dsPageBack.emit(e.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const e=this.pageChrome.mobileActions??[];const s=r(this.resolvedHeaderActions,"mobile");return[...e.map((e=>i("ds-tooltip",{slot:"trailing",key:e.id,label:e.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:e.triggerId||undefined,variant:"icon",icon:e.icon,size:"lg","aria-label":e.ariaLabel,haspopup:e.haspopup,controls:e.controls,expanded:e.expanded,surfaceOpen:e.surfaceOpen,pressed:e.pressed,isInactive:e.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)})))),...s.map((e=>{if(e.type!=="icon")return null;const s=(e.appearance??"unfilled")==="filled"?i("ds-button-filled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",intent:e.intent??"brand",contrast:e.contrast??"bold",isInactive:e.isInactive,isLoading:e.isLoading,onDsClick:()=>this.dsPageAction.emit(e.id)}):i("ds-button-unfilled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",isInactive:e.isInactive,isLoading:e.isLoading,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)});return i("ds-tooltip",{slot:"trailing",key:e.id,label:e.label,side:"bottom",size:"sm"},s)})),...this.mobileActionMenuSections.length>0?[i("ds-tooltip",{slot:"trailing",label:"Page options",side:"bottom",size:"sm"},i("ds-button-unfilled",{ref:e=>{this.mobileActionTriggerEl=e??null},id:this.mobileActionMenuTriggerId,variant:"icon",icon:"Ellipses","aria-label":this.pageChrome.actionsAriaLabel??"More page actions",size:"lg",activeFill:false,hasBorder:false,haspopup:"menu",controls:this.mobileActionMenuId,expanded:this.mobileActionMenuOpen,surfaceOpen:this.mobileActionSurfaceOpen,onDsClick:e=>{this.mobileActionMenuInitialFocusVisible=e.detail.detail===0;this.mobileActionMenuOpen=!this.mobileActionMenuOpen;if(this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=true}}))]:[],i("slot",{name:"page-header-trailing",slot:"trailing"})]}get resolvedHeaderActions(){return p(this.pageChrome.actionItems,this.pageChrome.primaryAction??null,this.pageChrome.actions??[])}get mobileActionMenuSections(){return d(this.resolvedHeaderActions,"mobile")}renderManagedMobileActionMenu(){if(this.mobileActionMenuSections.length===0)return null;return i("ds-menu",{id:this.mobileActionMenuId,anchorId:this.mobileActionMenuTriggerId,align:"end",menuLabel:this.pageChrome.actionsAriaLabel??"More page actions",open:this.mobileActionMenuOpen,initialFocusVisible:this.mobileActionMenuInitialFocusVisible,sections:this.mobileActionMenuSections,onDsClose:this.closeMobileActionMenu,onDsAfterClose:()=>{if(!this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=false},onDsSelect:this.handleMobileActionSelect})}get barTitleSections(){return(this.pageChrome.subsections??[]).map((e=>"type"in e?{type:"divider"}:{id:e.id,label:e.label,isInactive:e.isInactive}))}renderManagedBarPageTitle(){const e=this.pageChrome;return i("ds-bar-page-title",{ref:s=>{if(s){s.actionItems=e.actionItems}},heading:e.heading??"",showBack:e.showBack??false,backAriaLabel:e.backAriaLabel??"Back",sections:this.barTitleSections,value:e.subvalue??"",sectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",primaryAction:e.primaryAction??null,actions:e.actions??[],actionsAriaLabel:e.actionsAriaLabel??"More page actions",showDivider:e.showHeaderDivider??true,showCompactDivider:e.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedBarTitle(e){const s=this.pageChrome;return i("ds-bar-title",{ref:e=>{if(e){e.actionItems=s.actionItems}},slot:e==="page"?"header":undefined,placement:e,variant:e==="shell-bar"?"compact":"expanded",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:this.barTitleSections,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedPage(){const e=this.pageChrome;const s=this.sectionNavigation==="panel";const t=e.showBack||s?[]:this.resolvedPageTabs;return[i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:w(this.resolvedMode),desktopHeaderPlacement:this.sectionNavigation==="panel"?"shell-bar":"page",contentInset:e.contentInset??"default",contentInsetBlockStart:e.contentInsetBlockStart??"default",contentInsetBlockStartSize:e.contentInsetBlockStartSize,compactContentInsetBlockStartSize:e.compactContentInsetBlockStartSize,scrollCompaction:e.scrollCompaction??true,contentSurface:e.contentSurface??"primary"},this.sectionNavigation==="bar"?this.renderManagedBarTitle("page"):null,i("ds-mobile-header",{slot:"mobile-header",heading:e.heading??"",headingLevel:e.headingLevel??"h1",sections:t,value:e.showBack?"":e.value??"",sectionsAriaLabel:e.sectionsAriaLabel??"Change page section",subsections:e.subsections??[],subsectionsPlacement:e.showBack||s?"combined":"below",subvalue:e.subvalue??"",subsectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",tone:e.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null)),this.renderManagedMobileActionMenu()]}renderSlottedShell(e,s,t,n,l){return i(a,{class:e,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":l?undefined:true,"aria-hidden":s&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:s&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:s&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":l||n?"true":undefined,inert:l||n?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!s||!this.mobileSheetNavOpen,"aria-hidden":s&&this.mobileSheetNavOpen?undefined:"true",inert:s&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!s},i("slot",{name:"mobile-bar-nav"})))))}render(){const e=this.chromeLayerActive();const s=this.gradientLayerActive();const t=this.paperTextureLayerActive();const n=this.resolvedMode==="mobile";const l=n&&this.effectiveMobileDestination!=="area";const o=n&&(l||this.effectiveMobileSheetNavOpen);const h=!n&&this.toolsFullscreen;const r={"shell-app":true,"shell-app--chrome":e,"shell-app--gradient":s,"shell-app--paper-texture":t,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":h,"shell-app--mobile-tool-active":l,"shell-app--mobile-sheet-nav-open":n&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(r,n,l,o,h)}return i(a,{class:r,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedTopBar()),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":h?undefined:true,"aria-hidden":n&&(!l||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:n&&(!l||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:n&&!l},this.renderManagedTools()),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":h||o?"true":undefined,inert:h||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!n||!this.effectiveMobileSheetNavOpen,"aria-hidden":n&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:n&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!n},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return Se()}},[262,"ds-shell-app",{composition:[513],navigation:[16],sectionNavigation:[513,"section-navigation"],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],paperTexture:[16],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobilePrimaryDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],mobileActionMenuOpen:[32],mobileActionSurfaceOpen:[32],mobileActionMenuInitialFocusVisible:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);Me.FOREGROUND_REFRESH_MS=50;function Ae(){if(typeof customElements==="undefined"){return}const e=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-page-title","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-paper-texture","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-shell-app":if(!customElements.get(n(e))){customElements.define(n(e),Me)}break;case"ds-badge":if(!customElements.get(n(e))){C()}break;case"ds-bar-nav":if(!customElements.get(n(e))){S()}break;case"ds-bar-page-title":if(!customElements.get(n(e))){D()}break;case"ds-bar-title":if(!customElements.get(n(e))){M()}break;case"ds-breadcrumb":if(!customElements.get(n(e))){A()}break;case"ds-button-filled":if(!customElements.get(n(e))){L()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){P()}break;case"ds-divider":if(!customElements.get(n(e))){B()}break;case"ds-icon":if(!customElements.get(n(e))){T()}break;case"ds-loader":if(!customElements.get(n(e))){j()}break;case"ds-menu":if(!customElements.get(n(e))){z()}break;case"ds-mobile-bar-nav":if(!customElements.get(n(e))){N()}break;case"ds-mobile-header":if(!customElements.get(n(e))){E()}break;case"ds-mobile-section-switcher":if(!customElements.get(n(e))){I()}break;case"ds-mobile-sheet-nav":if(!customElements.get(n(e))){$()}break;case"ds-panel-nav":if(!customElements.get(n(e))){O()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){F()}break;case"ds-panel-tools":if(!customElements.get(n(e))){o()}break;case"ds-paper-texture":if(!customElements.get(n(e))){H()}break;case"ds-shell-page":if(!customElements.get(n(e))){V()}break;case"ds-shell-tools":if(!customElements.get(n(e))){R()}break;case"ds-swatch-picker":if(!customElements.get(n(e))){G()}break;case"ds-switch":if(!customElements.get(n(e))){K()}break;case"ds-tab-group":if(!customElements.get(n(e))){W()}break;case"ds-tag":if(!customElements.get(n(e))){U()}break;case"ds-text":if(!customElements.get(n(e))){Z()}break;case"ds-tooltip":if(!customElements.get(n(e))){q()}break}}))}Ae();const Le=Me;const Pe=Ae;export{Le as DsShellApp,Pe as defineCustomElement};
|
|
1
|
+
import{p as e,H as s,c as t,h as i,a,t as n}from"./index.js";import{c as l,d as o}from"./p-zZuAAiiI.js";import{f as h,v as r,j as p,o as d}from"./p-Dhw_W8nk.js";import{g as c,c as u,a as b,b as m,r as f}from"./p-BxduVc5g.js";import{i as g,b as v,c as _,r as y,S as k,d as w}from"./p-CgGcgMjs.js";import{c as x}from"./p-D_QtZZR8.js";import{d as C}from"./p-Da9VpZX2.js";import{d as S}from"./p-ByoywoBH.js";import{d as D}from"./p-BwsS_Hyr.js";import{d as M}from"./p-C1QHxVvP.js";import{d as A}from"./p-DBZwI7HY.js";import{d as L}from"./p-C51ytXM6.js";import{d as P}from"./p-ya8A_SMw.js";import{d as T}from"./p-eo_pmPqp.js";import{d as B}from"./p-Cea7rROU.js";import{d as j}from"./p-0XTyQNRG.js";import{d as z}from"./p-BlWNMytv.js";import{d as E}from"./p-C8XJgV1n.js";import{d as N}from"./p-CBQzTgvI.js";import{d as I}from"./p-DyyfWSLB.js";import{d as $}from"./p-Dj296RmE.js";import{d as O}from"./p-CIYJhyKt.js";import{d as F}from"./p-CHUdAW1Q.js";import{d as H}from"./p-OxdAzO4v.js";import{d as R}from"./p-DrjY8Mpy.js";import{d as V}from"./p-CvplapTD.js";import{d as G}from"./p-CqeMumqy.js";import{d as K}from"./p-CKo2nySr.js";import{d as W}from"./p-LZ8F08Fj.js";import{d as U}from"./p-CK2S28gU.js";import{d as Z}from"./p-AkSwrAKR.js";import{d as q}from"./p-CnK36Be0.js";const Q={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function X(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Y(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=s.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(s.isContentEditable)}function J(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function ee(e){if(!X(e))return null;const s=J(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=Q[s];if(t)return`open-tool:${t}`;return null}const se=["none","cool","neutral","warm","fresh"];const te="neutral";const ie={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const ae="100% 100% at 0% 0%";function ne(e){const s=he(e);return s==="none"?null:ie[s]}function le(e){return String(ne(e)?.opacity??0)}function oe(e){return se.includes(e)}function he(e){return e!=null&&oe(e)?e:te}function re(e){const s=he(e);if(s==="none")return"none";return pe(ie[s].stops)}function pe(e){const s=e.map((e=>`${e.color} ${e.position}%`)).join(", ");return`radial-gradient(${ae}, ${s})`}const de="--ds-shell-gradient-image";const ce="--ds-shell-gradient-size";const ue="--ds-shell-gradient-position-panel";const be="--ds-shell-gradient-position-bar";const me="--ds-shell-gradient-opacity";function fe(e=te){return re(e)}function ge(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function ve(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function _e(){return"0 0"}function ye(e){return`${-Math.round(e)}px 0`}function ke(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const i=t.getBoundingClientRect().width;e.removeChild(t);return i}function we(e){return{expandedPx:ke(e,"--_nav-width"),collapsedPx:ke(e,"--_nav-width-collapsed")}}function xe(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function Ce(e,s){return s?e.collapsedPx:e.expandedPx}const Se=()=>`.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs);--ds-shell-gradient-context:flat}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app--gradient.sc-ds-shell-app-h{--ds-shell-gradient-context:gradient}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{--_shell-banner-edge-display:none;flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__paper-texture.sc-ds-shell-app{z-index:2}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app-s>ds-bar-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-title,.shell-app__bar.sc-ds-shell-app-s>ds-bar-page-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-page-title{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-title.sc-ds-shell-app,.shell-app__bar.sc-ds-shell-app>ds-bar-page-title.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app:focus,.shell-app__content.sc-ds-shell-app:focus-visible{outline:none}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__tool-slot-proxy.sc-ds-shell-app{display:block;width:100%;height:100%;min-width:0;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__row.sc-ds-shell-app{contain:layout}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{z-index:3}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden;content-visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top);background:var(--ds-shell-safe-area-background, var(--color-background-primary))}.shell-app--mobile.sc-ds-shell-app-h .shell-app__banner.sc-ds-shell-app{--_shell-banner-edge-display:block}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;let De=0;const Me=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange",7);this.dsNavSelect=t(this,"dsNavSelect",7);this.dsTabChange=t(this,"dsTabChange",7);this.dsNavChildSelect=t(this,"dsNavChildSelect",7);this.dsSubsectionChange=t(this,"dsSubsectionChange",7);this.dsPageBack=t(this,"dsPageBack",7);this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect",7);this.dsPageAction=t(this,"dsPageAction",7);this.dsToolChange=t(this,"dsToolChange",7);this.dsHeaderBack=t(this,"dsHeaderBack",7);this.dsHeaderAction=t(this,"dsHeaderAction",7);this.dsRailAccessoryAction=t(this,"dsRailAccessoryAction",7);this.dsPresentationChange=t(this,"dsPresentationChange",7);this.dsBrowseContextChange=t(this,"dsBrowseContextChange",7);this.dsNavFooterAction=t(this,"dsNavFooterAction",7);this.dsNavUserAction=t(this,"dsNavUserAction",7);this.composition="managed";this.navigation={};this.sectionNavigation="bar";this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=te;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false;this.mobileActionMenuInitialFocusVisible=false;this.instanceId=De++;this.mobileActionMenuTriggerId=`shell-app-mobile-action-trigger-${this.instanceId}`;this.mobileActionMenuId=`shell-app-mobile-action-menu-${this.instanceId}`;this.mobileActionTriggerEl=null;this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new c;this.chromeSyncCoalescer=u((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{const s=f(e);if(s!=="panel-nav")return;this.panelNavTransition.enter();const t=ge();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{const s=f(e);if(s!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=e=>{if(e.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=e=>{e.stopPropagation();this.dsNavSelect.emit(e.detail)};this.handleManagedNavChildSelect=e=>{e.stopPropagation();this.dsNavChildSelect.emit(e.detail)};this.handleManagedTabChange=e=>{e.stopPropagation();this.dsTabChange.emit(e.detail)};this.handleManagedPageBack=e=>{e.stopPropagation();this.dsPageBack.emit(e.detail)};this.handleManagedBreadcrumbSelect=e=>{e.stopPropagation();const s=this.dsBreadcrumbSelect.emit(e.detail);if(s.defaultPrevented)e.preventDefault()};this.handleManagedSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)};this.handleManagedPageAction=e=>{e.stopPropagation();this.dsPageAction.emit(e.detail)};this.handleManagedToolChange=e=>{e.stopPropagation();const{id:s,selected:t}=e.detail;this.managedActiveTool=s;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((e=>e.id===s));if(i&&g(i)){this.managedInboxTool=s}this.managedMobileDestination=t?i?.mobileDestination??v(true,s):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(e.detail)};this.handleManagedPresentationChange=e=>{e.stopPropagation();this.managedToolPresentation=e.detail.presentation;this.toolsFullscreen=e.detail.presentation==="fullscreen";this.dsPresentationChange.emit(e.detail)};this.handleManagedHeaderBack=e=>{e.stopPropagation();this.dsHeaderBack.emit(e.detail)};this.handleManagedHeaderAction=e=>{e.stopPropagation();this.dsHeaderAction.emit(e.detail)};this.handleManagedRailAccessoryAction=e=>{e.stopPropagation();this.dsRailAccessoryAction.emit(e.detail)};this.handleManagedSheetToggle=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=e.detail};this.handleManagedMobileDestination=e=>{e.stopPropagation();const s=e.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=s;if(s==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(s)};this.handleManagedAreaSelect=e=>{e.stopPropagation();if(e.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(e.detail)};this.handleManagedMobileChildSelect=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavChildSelect.emit(e.detail)};this.handleManagedBrowseContext=e=>{e.stopPropagation();this.managedBrowseContext=e.detail;this.dsBrowseContextChange.emit(e.detail)};this.handleManagedSheetClose=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=e=>{e.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=e=>{e.stopPropagation();this.dsNavUserAction.emit(e.detail)};this.closeMobileActionMenu=()=>{this.mobileActionMenuOpen=false};this.handleMobileActionSelect=e=>{const s=String(e.detail.value??"");const t=h(this.resolvedHeaderActions,s);if(!t||t.isInactive||"isLoading"in t&&t.isLoading)return;this.mobileActionMenuOpen=false;this.dsPageAction.emit(s);requestAnimationFrame((()=>void this.mobileActionTriggerEl?.setFocus?.()))}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??l}get resolvedPageTabs(){const e=this.currentArea.children;if(!e?.length)return this.pageChrome.tabs??[];return e.map((e=>({id:e.id,label:e.label,dot:e.dot,isInactive:e.isInactive})))}get availableInboxTools(){return this.resolvedToolItems.filter((e=>!e.isInactive&&g(e))).map((e=>e.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=_(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=y("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(b,this.onChromeTransitionStart);this.el.addEventListener(m,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=e?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(e){this.toolsFullscreen=e.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(b,this.onChromeTransitionStart);this.el.removeEventListener(m,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(e,s){this.managedBrowseContext=this.navigation.browseContext??this.navStyle;if(e.currentUrl!==s.currentUrl||e.activeId!==s.activeId){this.managedMobilePrimaryDestination="area"}}handlePageChromeChange(){if(this.mobileActionMenuSections.length===0){this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false}}handleToolsChange(){if(!this.resolvedToolItems.some((e=>e.id==="help"&&!e.isInactive))){this.managedMobilePrimaryDestination="area"}if(this.managedActiveTool&&!this.resolvedToolItems.some((e=>e.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=y(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(e,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const e=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof s&&e?.contains(t))return;void e?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const e=_(window.innerWidth);if(e===this.resolvedMode)return;this.resolvedMode=e;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:e})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}syncSlottedMobileState(){const e=this.el.querySelector("ds-shell-tools");const s=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(e){e.setAttribute("responsive-mode",this.resolvedMode);e.responsiveMode=this.resolvedMode}if(s){s.activeDestination=this.effectiveMobileDestination;s.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".shell-app__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),e.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=we(e)}applyGradientVars(e,s){const t=e.style;for(const[e,i]of Object.entries(s)){if(i===null)t.removeProperty(e);else t.setProperty(e,i)}}clearGradientPaintVars(e){const s=[de,ce,me];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,i){if(e){e.style.setProperty(ue,t)}if(s){s.style.setProperty(be,i)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=xe(e,s);return Ce(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=xe(e,s);return Ce(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return ge()}chromeLayerActive(){return this.gradientLayerActive()||this.paperTextureLayerActive()}gradientLayerActive(){return this.resolvedMode!=="mobile"&&he(this.gradientPreset)!=="none"}paperTextureLayerActive(){return this.resolvedMode!=="mobile"&&this.paperTexture!=null}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(Y(e.target))return;const s=ee(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void i?.closeDrawer?.();return}if(s.startsWith("open-tool:")&&i){const e=s.slice("open-tool:".length);void i.activateTool?.(e)}}async activateTool(e){const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.activateTool?.(e))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.closeDrawer?.())}async setToolPresentation(e){this.managedToolPresentation=e;this.toolsFullscreen=e==="fullscreen"}activateManagedMobileTool(e){const s=e==="inbox"?y(this.managedInboxTool,this.availableInboxTools):e;if(!s)return false;const t=this.resolvedToolItems.find((t=>t.id===s||e!=="inbox"&&t.mobileDestination===e));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(g(t))this.managedInboxTool=i;if(e==="help")this.managedMobilePrimaryDestination="help";this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const e=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const s=e.flatMap((e=>e.items));const t=this.navigation.activeId||x(this.navigation.currentUrl??this.pageChrome.currentUrl??"",s);return s.find((e=>e.id===t))??s[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(e){return this.resolvedToolItems.find((s=>s.id===e))?.dot??false}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector('ds-bar-nav, ds-bar-page-title, ds-bar-title[placement="shell-bar"]');const t=[this.el,e,s].filter((e=>e!==null));const i=()=>{if(e)e.style.removeProperty(ue);if(s)s.style.removeProperty(be)};const a=he(this.gradientPreset);if(this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const n=this.resolveViewportDimensions();if(a==="none"){this.clearGradientPaintVars(t);i();this.syncPaperTextureLayout(n);return}const l=this.resolvePanelWidthPx(e);const o=_e();const h=ye(l);this.syncChromeLayoutVars(e,s,o,h);const r=fe(a);const p=ve({width:n.width,height:n.height});const d=le(a);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[de]:r,[ce]:p,[ue]:o,[be]:h,[me]:d});continue}const t=e===s;this.applyGradientVars(e,{[de]:r,[ce]:p,[me]:d,[ue]:t?null:o,[be]:t?h:null})}this.syncPaperTextureLayout(n)}syncPaperTextureLayout(e){const s=this.el.querySelector(".shell-app__chrome");const t=this.el.querySelector(".shell-app__chrome > ds-paper-texture");if(!s||!t)return;const i=s.getBoundingClientRect();t.style.setProperty("width",`${Math.round(e.width)}px`);t.style.setProperty("height",`${Math.round(e.height)}px`);t.style.setProperty("left",`${-Math.round(i.left)}px`);t.style.setProperty("top",`${-Math.round(i.top)}px`)}renderPaperTexture(){if(!this.paperTextureLayerActive())return null;return i("ds-paper-texture",{class:"shell-app__paper-texture",config:this.paperTexture})}renderManagedPanelNav(){const e=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,presentation:this.sectionNavigation==="panel"?"nested":"flat",groups:this.resolvedNavigationGroups,breakpoint:k,routerMode:e.routerMode??"event",activeId:e.activeId??"",activeChildId:this.pageChrome.value??"",currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",storageKey:e.storageKey??"",userName:e.userName??"",userInitial:e.userInitial??"",accountMenuExpanded:e.accountMenuExpanded??false,accountMenuSurfaceOpen:e.accountMenuSurfaceOpen,dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",dashboardNavigationLabel:e.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:e.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:e.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavChildSelect:this.handleManagedNavChildSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.resolvedPageTabs,value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedTopBar(){return this.sectionNavigation==="panel"?this.renderManagedBarPageTitle():this.renderManagedBarNav()}renderManagedToolSlots(){const e=[...new Set(this.resolvedToolItems.map((e=>e.id)))].sort();return e.flatMap((e=>[i("div",{key:`tool:${e}`,class:"shell-app__tool-slot-proxy",slot:e},i("slot",{name:e})),i("div",{key:`tool-view:${e}`,class:"shell-app__tool-slot-proxy",slot:`${e}-view`},i("slot",{name:`${e}-view`}))]))}renderManagedTools(){const e=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:e.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,accessories:e.accessories??[],headers:e.headers??{},storageKey:e.storageKey??"",toolsLabel:e.toolsLabel??"Tools",toolShortcutsLabel:e.toolShortcutsLabel??"Tool shortcuts",inboxLabel:e.inboxLabel??"Inbox",inboxNavigationLabel:e.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction,onDsRailAccessoryAction:this.handleManagedRailAccessoryAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const e=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,presentation:this.sectionNavigation==="panel"?"nested":"flat",browseContext:this.managedBrowseContext,dashboardGroups:e.dashboardGroups??e.groups??[],settingsGroups:e.settingsGroups??[],currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:e.navigationLabel??"Application navigation",dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",showAccount:e.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsNavChildSelect:this.handleManagedMobileChildSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){const e=e=>this.resolvedToolItems.find((s=>s.id===e));const s=(s,t)=>e(s)?.ariaLabel??e(s)?.label??t;const t=this.resolvedToolItems.some((e=>!e.isInactive&&e.mobileDestination==="activity"));return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,primaryDestination:this.managedMobilePrimaryDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:s("search","Search"),activityMode:t?"direct":"inbox",activityLabel:s("activity","Activity"),inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:s("messages","Messages"),agentsLabel:s("agents","Agents"),helpLabel:s("help","Help & Support"),searchDot:this.toolDot("search"),activityDot:this.toolDot("activity"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"lg","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:e=>this.dsPageBack.emit(e.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const e=this.pageChrome.mobileActions??[];const s=r(this.resolvedHeaderActions,"mobile");return[...e.map((e=>i("ds-tooltip",{slot:"trailing",key:e.id,label:e.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:e.triggerId||undefined,variant:"icon",icon:e.icon,size:"lg","aria-label":e.ariaLabel,haspopup:e.haspopup,controls:e.controls,expanded:e.expanded,surfaceOpen:e.surfaceOpen,pressed:e.pressed,isInactive:e.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)})))),...s.map((e=>{if(e.type!=="icon")return null;const s=(e.appearance??"unfilled")==="filled"?i("ds-button-filled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",intent:e.intent??"brand",contrast:e.contrast??"bold",isInactive:e.isInactive,isLoading:e.isLoading,onDsClick:()=>this.dsPageAction.emit(e.id)}):i("ds-button-unfilled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",isInactive:e.isInactive,isLoading:e.isLoading,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)});return i("ds-tooltip",{slot:"trailing",key:e.id,label:e.label,side:"bottom",size:"sm"},s)})),...this.mobileActionMenuSections.length>0?[i("ds-tooltip",{slot:"trailing",label:"Page options",side:"bottom",size:"sm"},i("ds-button-unfilled",{ref:e=>{this.mobileActionTriggerEl=e??null},id:this.mobileActionMenuTriggerId,variant:"icon",icon:"Ellipses","aria-label":this.pageChrome.actionsAriaLabel??"More page actions",size:"lg",activeFill:false,hasBorder:false,haspopup:"menu",controls:this.mobileActionMenuId,expanded:this.mobileActionMenuOpen,surfaceOpen:this.mobileActionSurfaceOpen,onDsClick:e=>{this.mobileActionMenuInitialFocusVisible=e.detail.detail===0;this.mobileActionMenuOpen=!this.mobileActionMenuOpen;if(this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=true}}))]:[],i("slot",{name:"page-header-trailing",slot:"trailing"})]}get resolvedHeaderActions(){return p(this.pageChrome.actionItems,this.pageChrome.primaryAction??null,this.pageChrome.actions??[])}get mobileActionMenuSections(){return d(this.resolvedHeaderActions,"mobile")}renderManagedMobileActionMenu(){if(this.mobileActionMenuSections.length===0)return null;return i("ds-menu",{id:this.mobileActionMenuId,anchorId:this.mobileActionMenuTriggerId,align:"end",menuLabel:this.pageChrome.actionsAriaLabel??"More page actions",open:this.mobileActionMenuOpen,initialFocusVisible:this.mobileActionMenuInitialFocusVisible,sections:this.mobileActionMenuSections,onDsClose:this.closeMobileActionMenu,onDsAfterClose:()=>{if(!this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=false},onDsSelect:this.handleMobileActionSelect})}get barTitleSections(){return(this.pageChrome.subsections??[]).map((e=>"type"in e?{type:"divider"}:{id:e.id,label:e.label,isInactive:e.isInactive}))}renderManagedBarPageTitle(){const e=this.pageChrome;return i("ds-bar-page-title",{ref:s=>{if(s){s.actionItems=e.actionItems}},heading:e.heading??"",showBack:e.showBack??false,backAriaLabel:e.backAriaLabel??"Back",sections:this.barTitleSections,value:e.subvalue??"",sectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",primaryAction:e.primaryAction??null,actions:e.actions??[],actionsAriaLabel:e.actionsAriaLabel??"More page actions",showDivider:e.showHeaderDivider??true,showCompactDivider:e.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedBarTitle(e){const s=this.pageChrome;return i("ds-bar-title",{ref:e=>{if(e){e.actionItems=s.actionItems}},slot:e==="page"?"header":undefined,placement:e,variant:e==="shell-bar"?"compact":"expanded",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:this.barTitleSections,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedPage(){const e=this.pageChrome;const s=this.sectionNavigation==="panel";const t=e.showBack||s?[]:this.resolvedPageTabs;return[i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:w(this.resolvedMode),desktopHeaderPlacement:this.sectionNavigation==="panel"?"shell-bar":"page",contentInset:e.contentInset??"default",contentInsetBlockStart:e.contentInsetBlockStart??"default",contentInsetBlockStartSize:e.contentInsetBlockStartSize,compactContentInsetBlockStartSize:e.compactContentInsetBlockStartSize,scrollCompaction:e.scrollCompaction??true,contentSurface:e.contentSurface??"primary"},this.sectionNavigation==="bar"?this.renderManagedBarTitle("page"):null,i("ds-mobile-header",{slot:"mobile-header",heading:e.heading??"",headingLevel:e.headingLevel??"h1",sections:t,value:e.showBack?"":e.value??"",sectionsAriaLabel:e.sectionsAriaLabel??"Change page section",subsections:e.subsections??[],subsectionsPlacement:e.showBack||s?"combined":"below",subvalue:e.subvalue??"",subsectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",tone:e.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null)),this.renderManagedMobileActionMenu()]}renderSlottedShell(e,s,t,n,l){return i(a,{class:e,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":l?undefined:true,"aria-hidden":s&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:s&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:s&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":l||n?"true":undefined,inert:l||n?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!s||!this.mobileSheetNavOpen,"aria-hidden":s&&this.mobileSheetNavOpen?undefined:"true",inert:s&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!s},i("slot",{name:"mobile-bar-nav"})))))}render(){const e=this.chromeLayerActive();const s=this.gradientLayerActive();const t=this.paperTextureLayerActive();const n=this.resolvedMode==="mobile";const l=n&&this.effectiveMobileDestination!=="area";const o=n&&(l||this.effectiveMobileSheetNavOpen);const h=!n&&this.toolsFullscreen;const r={"shell-app":true,"shell-app--chrome":e,"shell-app--gradient":s,"shell-app--paper-texture":t,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":h,"shell-app--mobile-tool-active":l,"shell-app--mobile-sheet-nav-open":n&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(r,n,l,o,h)}return i(a,{class:r,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedTopBar()),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":h?undefined:true,"aria-hidden":n&&(!l||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:n&&(!l||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:n&&!l},this.renderManagedTools()),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":h||o?"true":undefined,inert:h||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!n||!this.effectiveMobileSheetNavOpen,"aria-hidden":n&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:n&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!n},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return Se()}},[262,"ds-shell-app",{composition:[513],navigation:[16],sectionNavigation:[513,"section-navigation"],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],paperTexture:[16],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobilePrimaryDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],mobileActionMenuOpen:[32],mobileActionSurfaceOpen:[32],mobileActionMenuInitialFocusVisible:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);Me.FOREGROUND_REFRESH_MS=50;function Ae(){if(typeof customElements==="undefined"){return}const e=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-page-title","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-paper-texture","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-shell-app":if(!customElements.get(n(e))){customElements.define(n(e),Me)}break;case"ds-badge":if(!customElements.get(n(e))){C()}break;case"ds-bar-nav":if(!customElements.get(n(e))){S()}break;case"ds-bar-page-title":if(!customElements.get(n(e))){D()}break;case"ds-bar-title":if(!customElements.get(n(e))){M()}break;case"ds-breadcrumb":if(!customElements.get(n(e))){A()}break;case"ds-button-filled":if(!customElements.get(n(e))){L()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){P()}break;case"ds-divider":if(!customElements.get(n(e))){T()}break;case"ds-icon":if(!customElements.get(n(e))){B()}break;case"ds-loader":if(!customElements.get(n(e))){j()}break;case"ds-menu":if(!customElements.get(n(e))){z()}break;case"ds-mobile-bar-nav":if(!customElements.get(n(e))){E()}break;case"ds-mobile-header":if(!customElements.get(n(e))){N()}break;case"ds-mobile-section-switcher":if(!customElements.get(n(e))){I()}break;case"ds-mobile-sheet-nav":if(!customElements.get(n(e))){$()}break;case"ds-panel-nav":if(!customElements.get(n(e))){O()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){F()}break;case"ds-panel-tools":if(!customElements.get(n(e))){o()}break;case"ds-paper-texture":if(!customElements.get(n(e))){H()}break;case"ds-shell-page":if(!customElements.get(n(e))){R()}break;case"ds-shell-tools":if(!customElements.get(n(e))){V()}break;case"ds-swatch-picker":if(!customElements.get(n(e))){G()}break;case"ds-switch":if(!customElements.get(n(e))){K()}break;case"ds-tab-group":if(!customElements.get(n(e))){W()}break;case"ds-tag":if(!customElements.get(n(e))){U()}break;case"ds-text":if(!customElements.get(n(e))){Z()}break;case"ds-tooltip":if(!customElements.get(n(e))){q()}break}}))}Ae();const Le=Me;const Pe=Ae;export{Le as DsShellApp,Pe as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-shell-app.js.map
|