@dataengineeringformachinelearning/viking-ui 3.0.0-alpha.4 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/README.md +6 -3
  2. package/dist/LICENSE +201 -0
  3. package/dist/README.md +251 -0
  4. package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs +13751 -0
  5. package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs.map +1 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +1 -4051
  8. package/dist/package.json +87 -0
  9. package/dist/scripts/build-web-components.mjs +37 -0
  10. package/dist/src/tokens/series-presets.ts +15 -0
  11. package/dist/src/tokens/tailwind.preset.js +209 -0
  12. package/dist/src/tokens/viking-tokens.json +318 -0
  13. package/dist/src/web/badge/viking-badge-wc.ts +116 -0
  14. package/dist/src/web/button/viking-button-wc.ts +165 -0
  15. package/dist/src/web/callout/viking-callout-wc.ts +105 -0
  16. package/dist/src/web/card/viking-card-wc.ts +66 -0
  17. package/dist/src/web/core/base.ts +56 -0
  18. package/dist/src/web/core/dom.ts +53 -0
  19. package/dist/src/web/core/icons-inline.ts +44 -0
  20. package/dist/src/web/core/styles.ts +1138 -0
  21. package/dist/src/web/core/types.ts +19 -0
  22. package/dist/src/web/field/viking-field-wc.ts +154 -0
  23. package/dist/src/web/index.ts +73 -0
  24. package/dist/src/web/input/viking-input-wc.ts +211 -0
  25. package/dist/src/web/modal/viking-modal-wc.ts +187 -0
  26. package/dist/src/web/search-palette/viking-search-palette-wc.ts +494 -0
  27. package/dist/src/web/select/viking-select-wc.ts +218 -0
  28. package/dist/src/web/suite-header/viking-suite-header-wc.ts +714 -0
  29. package/dist/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +234 -0
  30. package/dist/src/web/theme-toggle/viking-theme-toggle-wc.ts +139 -0
  31. package/dist/src/web/types.ts +37 -0
  32. package/dist/src/web/web-components.spec.ts +297 -0
  33. package/dist/types/dataengineeringformachinelearning-viking-ui.d.ts +2658 -0
  34. package/dist/viking.manifest.json +271 -0
  35. package/dist/web-components.js +2427 -126
  36. package/package.json +25 -11
  37. package/dist/core/brand-icons.d.ts +0 -29
  38. package/dist/core/icons.d.ts +0 -132
  39. package/dist/core/integration-brand-icons.d.ts +0 -18
  40. package/dist/core/lucide-paths.generated.d.ts +0 -90
  41. package/dist/core/types.d.ts +0 -56
  42. package/dist/core/uid.d.ts +0 -2
  43. package/dist/elements/button/viking-button.d.ts +0 -14
  44. package/dist/elements/card/viking-card.d.ts +0 -8
  45. package/dist/elements/core/dom.d.ts +0 -4
  46. package/dist/elements/core/styles.d.ts +0 -2
  47. package/dist/elements/modal/viking-modal.d.ts +0 -15
  48. package/dist/lib/accordion/accordion.d.ts +0 -19
  49. package/dist/lib/app-header/app-header.d.ts +0 -8
  50. package/dist/lib/app-sidebar/app-sidebar.d.ts +0 -10
  51. package/dist/lib/auth-panel/auth-panel.d.ts +0 -13
  52. package/dist/lib/autocomplete/autocomplete.d.ts +0 -25
  53. package/dist/lib/avatar/avatar.d.ts +0 -14
  54. package/dist/lib/badge/badge.d.ts +0 -16
  55. package/dist/lib/bar/bar.d.ts +0 -4
  56. package/dist/lib/brand/brand.d.ts +0 -8
  57. package/dist/lib/breadcrumbs/breadcrumbs.d.ts +0 -10
  58. package/dist/lib/button/button-group.d.ts +0 -6
  59. package/dist/lib/button/button.d.ts +0 -25
  60. package/dist/lib/calendar/calendar.d.ts +0 -22
  61. package/dist/lib/callout/callout.d.ts +0 -14
  62. package/dist/lib/card/card-title.d.ts +0 -12
  63. package/dist/lib/card/card.d.ts +0 -19
  64. package/dist/lib/carousel/carousel.d.ts +0 -13
  65. package/dist/lib/chart/chart-zoom.d.ts +0 -14
  66. package/dist/lib/chart/chart.d.ts +0 -119
  67. package/dist/lib/chart-card-header/chart-card-header.d.ts +0 -10
  68. package/dist/lib/chart-empty-state/chart-empty-state.d.ts +0 -13
  69. package/dist/lib/chart-panel/chart-panel.d.ts +0 -10
  70. package/dist/lib/checkbox/checkbox.d.ts +0 -13
  71. package/dist/lib/color-picker/color-picker.d.ts +0 -16
  72. package/dist/lib/command/command.d.ts +0 -23
  73. package/dist/lib/composer/composer.d.ts +0 -15
  74. package/dist/lib/confirm-dialog/confirm-dialog.d.ts +0 -18
  75. package/dist/lib/confirm-dialog/dialog.service.d.ts +0 -28
  76. package/dist/lib/context/context.d.ts +0 -17
  77. package/dist/lib/core/brand-icons.d.ts +0 -29
  78. package/dist/lib/core/cva.d.ts +0 -15
  79. package/dist/lib/core/icons.d.ts +0 -132
  80. package/dist/lib/core/integration-brand-icons.d.ts +0 -18
  81. package/dist/lib/core/lucide-paths.generated.d.ts +0 -90
  82. package/dist/lib/date-picker/date-picker.d.ts +0 -18
  83. package/dist/lib/dropdown/dropdown.d.ts +0 -29
  84. package/dist/lib/editor/editor.d.ts +0 -26
  85. package/dist/lib/empty-state/empty-state.d.ts +0 -9
  86. package/dist/lib/fab/fab.d.ts +0 -9
  87. package/dist/lib/field/field.d.ts +0 -14
  88. package/dist/lib/file-upload/file-upload.d.ts +0 -19
  89. package/dist/lib/footer/footer.d.ts +0 -6
  90. package/dist/lib/form-section/form-section.d.ts +0 -15
  91. package/dist/lib/gauge-arc/gauge-arc.d.ts +0 -8
  92. package/dist/lib/hud-panel/hud-panel.d.ts +0 -5
  93. package/dist/lib/icon/icon.d.ts +0 -44
  94. package/dist/lib/icon-badge/icon-badge.d.ts +0 -14
  95. package/dist/lib/icon-heading/icon-heading.d.ts +0 -9
  96. package/dist/lib/icon-text/icon-text.d.ts +0 -12
  97. package/dist/lib/input/input.d.ts +0 -23
  98. package/dist/lib/kanban/kanban.d.ts +0 -16
  99. package/dist/lib/kbd/kbd.d.ts +0 -5
  100. package/dist/lib/label/label.d.ts +0 -7
  101. package/dist/lib/loading-overlay/loading-overlay.d.ts +0 -10
  102. package/dist/lib/menubar/menubar.d.ts +0 -10
  103. package/dist/lib/metric-card/metric-card.d.ts +0 -9
  104. package/dist/lib/modal/modal.d.ts +0 -13
  105. package/dist/lib/native-select/native-select.d.ts +0 -17
  106. package/dist/lib/navbar/navbar.d.ts +0 -13
  107. package/dist/lib/navigation-menu/navigation-menu.d.ts +0 -13
  108. package/dist/lib/otp-input/otp-input.d.ts +0 -23
  109. package/dist/lib/page-back-link/page-back-link.d.ts +0 -11
  110. package/dist/lib/page-header/page-header.d.ts +0 -15
  111. package/dist/lib/pagination/pagination.d.ts +0 -10
  112. package/dist/lib/pillbox/pillbox.d.ts +0 -15
  113. package/dist/lib/popover/popover.d.ts +0 -15
  114. package/dist/lib/profile/profile.d.ts +0 -11
  115. package/dist/lib/progress/progress.d.ts +0 -12
  116. package/dist/lib/radio/radio.d.ts +0 -16
  117. package/dist/lib/ring-gauge/ring-gauge.d.ts +0 -8
  118. package/dist/lib/scroll-area/scroll-area.d.ts +0 -7
  119. package/dist/lib/search-palette/search-palette.d.ts +0 -16
  120. package/dist/lib/select/select.d.ts +0 -26
  121. package/dist/lib/separator/separator.d.ts +0 -8
  122. package/dist/lib/sheet/sheet.d.ts +0 -13
  123. package/dist/lib/sidebar-nav/sidebar-nav.d.ts +0 -46
  124. package/dist/lib/site-drakkar/site-drakkar.config.d.ts +0 -50
  125. package/dist/lib/site-drakkar/site-footer.d.ts +0 -18
  126. package/dist/lib/site-drakkar/site-navbar.d.ts +0 -25
  127. package/dist/lib/site-drakkar/suite-search-items.d.ts +0 -17
  128. package/dist/lib/skeleton/skeleton.d.ts +0 -8
  129. package/dist/lib/slider/slider.d.ts +0 -17
  130. package/dist/lib/spinner/spinner.d.ts +0 -7
  131. package/dist/lib/status-metric-row/status-metric-row.d.ts +0 -9
  132. package/dist/lib/suite-search-palette/suite-search-palette.d.ts +0 -25
  133. package/dist/lib/switch/switch.d.ts +0 -12
  134. package/dist/lib/table/table.d.ts +0 -10
  135. package/dist/lib/tabs/tab-panel.d.ts +0 -12
  136. package/dist/lib/tabs/tab.d.ts +0 -14
  137. package/dist/lib/tabs/tabs.d.ts +0 -10
  138. package/dist/lib/textarea/textarea.d.ts +0 -16
  139. package/dist/lib/theme-toggle/theme-toggle.d.ts +0 -9
  140. package/dist/lib/time-picker/time-picker.d.ts +0 -21
  141. package/dist/lib/timeline/timeline.d.ts +0 -14
  142. package/dist/lib/toast/toast.d.ts +0 -21
  143. package/dist/lib/toggle/toggle-group.d.ts +0 -9
  144. package/dist/lib/toggle/toggle.d.ts +0 -15
  145. package/dist/lib/tooltip/tooltip.d.ts +0 -20
  146. package/dist/lib/typography/heading.d.ts +0 -9
  147. package/dist/lib/typography/text.d.ts +0 -11
  148. package/dist/lib/uptime-bar/uptime-bar.d.ts +0 -6
  149. package/dist/lib/verification-code-field/verification-code-field.d.ts +0 -19
  150. package/dist/lib/whitepaper-cta/whitepaper-cta.d.ts +0 -15
  151. package/dist/lib/wizard/wizard.d.ts +0 -13
  152. package/dist/public-api.d.ts +0 -109
  153. package/dist/tokens/series-presets.d.ts +0 -4
  154. package/dist/web/badge/viking-badge-wc.d.ts +0 -28
  155. package/dist/web/button/viking-button-wc.d.ts +0 -28
  156. package/dist/web/callout/viking-callout-wc.d.ts +0 -27
  157. package/dist/web/card/viking-card-wc.d.ts +0 -29
  158. package/dist/web/core/base.d.ts +0 -12
  159. package/dist/web/core/dom.d.ts +0 -11
  160. package/dist/web/core/icons-inline.d.ts +0 -7
  161. package/dist/web/core/styles.d.ts +0 -12
  162. package/dist/web/core/types.d.ts +0 -10
  163. package/dist/web/field/viking-field-wc.d.ts +0 -32
  164. package/dist/web/index.d.ts +0 -15
  165. package/dist/web/input/viking-input-wc.d.ts +0 -32
  166. package/dist/web/modal/viking-modal-wc.d.ts +0 -50
  167. package/dist/web/search-palette/viking-search-palette-wc.d.ts +0 -64
  168. package/dist/web/select/viking-select-wc.d.ts +0 -48
  169. package/dist/web/suite-header/viking-suite-header-wc.d.ts +0 -36
  170. package/dist/web/suite-search-palette/viking-suite-search-palette-wc.d.ts +0 -39
  171. package/dist/web/theme-toggle/viking-theme-toggle-wc.d.ts +0 -19
  172. package/dist/web/types.d.ts +0 -40
  173. package/dist/web-components/index.d.ts +0 -1
@@ -1,4 +1,345 @@
1
- "use strict";var VikingUI=(()=>{var ae=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var qe=Object.prototype.hasOwnProperty;var We=(t,e)=>{for(var i in e)ae(t,i,{get:e[i],enumerable:!0})},Ue=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ge(e))!qe.call(t,n)&&n!==i&&ae(t,n,{get:()=>e[n],enumerable:!(r=Be(e,n))||r.enumerable});return t};var Fe=t=>Ue(ae({},"__esModule",{value:!0}),t);var It={};We(It,{VikingBadgeWc:()=>w,VikingButtonWc:()=>E,VikingCalloutWc:()=>S,VikingCardWc:()=>I,VikingFieldWc:()=>_,VikingInputWc:()=>M,VikingModalWc:()=>m,VikingSearchPaletteWc:()=>b,VikingSelectWc:()=>C,VikingSuiteHeaderWc:()=>D,VikingSuiteSearchPaletteWc:()=>f,VikingThemeToggleWc:()=>O,registerVikingBadgeWc:()=>U,registerVikingButtonWc:()=>F,registerVikingCalloutWc:()=>j,registerVikingCardWc:()=>Y,registerVikingElements:()=>he,registerVikingFieldWc:()=>X,registerVikingInputWc:()=>Z,registerVikingModalWc:()=>Q,registerVikingSearchPaletteWc:()=>H,registerVikingSelectWc:()=>re,registerVikingSuiteHeaderWc:()=>ie,registerVikingSuiteSearchPaletteWc:()=>$,registerVikingThemeToggleWc:()=>z});var v=(t,e)=>{if("adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype){let r=new CSSStyleSheet;r.replaceSync(e),t.adoptedStyleSheets=[r];return}let i=document.createElement("style");i.textContent=e,t.append(i)},h=(t,e)=>t.hasAttribute(e)&&t.getAttribute(e)!=="false",K=(t,e)=>{t&&typeof t.setFormValue=="function"&&t.setFormValue(e)},B=t=>{let e=t.attachInternals;return typeof e=="function"?e.call(t):null},G=t=>{t&&typeof t.showModal=="function"&&!t.open&&t.showModal()},T=t=>{t&&typeof t.close=="function"&&t.open&&t.close()};var l=typeof HTMLElement>"u"?class{}:HTMLElement,x=t=>`${t}-${Math.random().toString(36).slice(2,9)}`,a=t=>{let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return t.replace(/[&<>"']/g,i=>e[i]??i)},q=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.platform)?"\u2318":"Ctrl",c=(t,e)=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,e)},d=(t,e)=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends e{})};var oe={"alert-circle":'<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',"alert-triangle":'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',"arrow-left":'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',"arrow-right":'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',"arrow-up-right":'<path d="M7 7h10v10"/><path d="M7 17 17 7"/>',"bar-chart":'<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>',bell:'<path d="M10.268 21a2 2 0 0 0 3.464 0"/><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>',bold:'<path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"/>',bolt:'<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>',brain:'<path d="M12 18V5"/><path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4"/><path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5"/><path d="M17.997 5.125a4 4 0 0 1 2.526 5.77"/><path d="M18 18a4 4 0 0 0 2-7.464"/><path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517"/><path d="M6 18a4 4 0 0 1-2-7.464"/><path d="M6.003 5.125a4 4 0 0 0-2.526 5.77"/>',bug:'<path d="M12 20v-9"/><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"/><path d="M14.12 3.88 16 2"/><path d="M21 21a4 4 0 0 0-3.81-4"/><path d="M21 5a4 4 0 0 1-3.55 3.97"/><path d="M22 13h-4"/><path d="M3 21a4 4 0 0 1 3.81-4"/><path d="M3 5a4 4 0 0 0 3.55 3.97"/><path d="M6 13H2"/><path d="m8 2 1.88 1.88"/><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13"/>',building:'<path d="M12 10h.01"/><path d="M12 14h.01"/><path d="M12 6h.01"/><path d="M16 10h.01"/><path d="M16 14h.01"/><path d="M16 6h.01"/><path d="M8 10h.01"/><path d="M8 14h.01"/><path d="M8 6h.01"/><path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/><rect x="4" y="2" width="16" height="20" rx="2"/>',calendar:'<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/>',check:'<path d="M20 6 9 17l-5-5"/>',"check-circle":'<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',"chevron-down":'<path d="m6 9 6 6 6-6"/>',"chevron-left":'<path d="m15 18-6-6 6-6"/>',"chevron-right":'<path d="m9 18 6-6-6-6"/>',"chevron-up":'<path d="m18 15-6-6-6 6"/>',chip:'<path d="M12 20v2"/><path d="M12 2v2"/><path d="M17 20v2"/><path d="M17 2v2"/><path d="M2 12h2"/><path d="M2 17h2"/><path d="M2 7h2"/><path d="M20 12h2"/><path d="M20 17h2"/><path d="M20 7h2"/><path d="M7 20v2"/><path d="M7 2v2"/><rect x="4" y="4" width="16" height="16" rx="2"/><rect x="8" y="8" width="8" height="8" rx="1"/>',clock:'<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/>',cookie:'<path d="M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5"/><path d="M8.5 8.5v.01"/><path d="M16 15.5v.01"/><path d="M12 12v.01"/><path d="M11 17v.01"/><path d="M7 14v.01"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',"dots-horizontal":'<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="5" cy="12" r="1" fill="currentColor" stroke="none"/>',"dots-vertical":'<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="19" r="1" fill="currentColor" stroke="none"/>',download:'<path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/>',external:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',eye:'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>',"eye-off":'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>',file:'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/>',filter:'<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"/>',fingerprint:'<path d="M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"/><path d="M14 13.12c0 2.38 0 6.38-1 8.88"/><path d="M17.29 21.02c.12-.6.43-2.3.5-3.02"/><path d="M2 12a10 10 0 0 1 18-6"/><path d="M2 16h.01"/><path d="M21.8 16c.2-2 .131-5.354 0-6"/><path d="M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2"/><path d="M8.65 22c.21-.66.45-1.32.57-2"/><path d="M9 6.8a6 6 0 0 1 9 5.2v2"/>',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',globe:'<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',"grip-vertical":'<circle cx="9" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="19" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="19" r="1" fill="currentColor" stroke="none"/>',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>',home:'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',insights:'<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="m19 9-5 5-4-4-3 3"/>',italic:'<line x1="19" x2="10" y1="4" y2="4"/><line x1="14" x2="5" y1="20" y2="20"/><line x1="15" x2="9" y1="4" y2="20"/>',key:'<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"/><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"/>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>',list:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>',"list-ordered":'<path d="M11 5h10"/><path d="M11 12h10"/><path d="M11 19h10"/><path d="M4 4h1v5"/><path d="M4 9h2"/><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"/>',loader:'<path d="M21 12a9 9 0 1 1-6.219-8.56"/>',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',"log-in":'<path d="m10 17 5-5-5-5"/><path d="M15 12H3"/><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/>',"log-out":'<path d="m16 17 5-5-5-5"/><path d="M21 12H9"/><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>',mail:'<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"/><rect x="2" y="4" width="20" height="16" rx="2"/>',menu:'<path d="M4 5h16"/><path d="M4 12h16"/><path d="M4 19h16"/>',minus:'<path d="M5 12h14"/>',moon:'<path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"/>',network:'<rect x="16" y="16" width="6" height="6" rx="1"/><rect x="2" y="16" width="6" height="6" rx="1"/><rect x="9" y="2" width="6" height="6" rx="1"/><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"/><path d="M12 12V8"/>',paperclip:'<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"/>',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',phone:'<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/>',play:'<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" fill="currentColor" stroke="none"/>',plus:'<path d="M5 12h14"/><path d="M12 5v14"/>',policy:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>',refresh:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',rocket:'<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"/><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"/>',search:'<path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/>',"search-off":'<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>',server:'<rect width="20" height="8" x="2" y="2" rx="2" ry="2"/><rect width="20" height="8" x="2" y="14" rx="2" ry="2"/><line x1="6" x2="6.01" y1="6" y2="6"/><line x1="6" x2="6.01" y1="18" y2="18"/>',settings:'<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/>',shield:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',ship:'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',sparkle:'<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/>',speed:'<path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/>',star:'<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',terminal:'<path d="M12 19h8"/><path d="m4 17 6-6-6-6"/>',trash:'<path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>',"trending-up":'<path d="M16 7h6v6"/><path d="m22 7-8.5 8.5-5-5L2 17"/>',underline:'<path d="M6 4v6a6 6 0 0 0 12 0V4"/><line x1="4" x2="20" y1="20" y2="20"/>',upload:'<path d="M12 3v12"/><path d="m17 8-5-5-5 5"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>',user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',"user-shield":'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M6.376 18.91a6 6 0 0 1 11.249.003"/><circle cx="12" cy="11" r="4"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'};var se={deml:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/>',"deml-compact":'<rect x="4" y="4" width="16" height="16" rx="3"/><path d="M9 16V12M12 16V9M15 16V13"/>',"deml-lockup":'<rect x="3" y="3" width="18" height="14" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/><path d="M3 20h18"/>'},le={drakkar:'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',"drakkar-compact":'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',"drakkar-lockup":'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/><path d="M3 21h18"/>'},pe={deml:'<path d="M5 4a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/>',"deml-compact":'<path d="M6 5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5zM9 12h1.5v4H9v-4zM12 9h1.5v7H12V9zM15 11h1.5v5H15v-5z"/>',"deml-lockup":'<path d="M4 4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/><rect x="3" y="19" width="18" height="2" rx="1"/>'},ue={drakkar:'<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/>',"drakkar-compact":'<path d="M3 3h18a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M7.5 12.5 12 9.8l4.5 2.7v2.2c0 .8-.5 1.4-1.2 1.7L12 17.8l-3.3-1.6c-.7-.3-1.2-.9-1.2-1.7v-2.2z"/><rect x="11" y="6" width="2" height="5.5" rx="0.35"/>',"drakkar-lockup":'<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/><rect x="3" y="20" width="18" height="2" rx="1"/>'},ke=Object.keys(se),Nt=Object.keys(le);var me={kubernetes:"#326CE5",tensorflow:"#FF6F00",pytorch:"#EE4C2C","apache-spark":"#E25A1C",databricks:"#FF3621","aws-redshift":"#8C4FFF"},$t=Object.keys(me);var be={kubernetes:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-.5-.623h-.804l-.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-.52.123-.736-.172-.216-.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-.555-.5-.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z",tensorflow:"M1.292 5.856L11.54 0v24l-4.095-2.378V7.603l-6.168 3.564.015-5.31zm21.43 5.311l-.014-5.31L12.46 0v24l4.095-2.378V14.87l3.092 1.788-.018-4.618-3.074-1.756V7.603l6.168 3.564z",pytorch:"M12.005 0L4.952 7.053a9.865 9.865 0 000 14.022 9.866 9.866 0 0014.022 0c3.984-3.9 3.986-10.205.085-14.023l-1.744 1.743c2.904 2.905 2.904 7.634 0 10.538s-7.634 2.904-10.538 0-2.904-7.634 0-10.538l4.647-4.646.582-.665zm3.568 3.899a1.327 1.327 0 00-1.327 1.327 1.327 1.327 0 001.327 1.328A1.327 1.327 0 0016.9 5.226 1.327 1.327 0 0015.573 3.9z","apache-spark":"M10.812 0c-.425.013-.845.215-1.196.605a3.593 3.593 0 00-.493.722c-.355.667-.425 1.415-.556 2.143a551.9 551.9 0 00-.726 4.087c-.027.16-.096.227-.244.273C5.83 8.386 4.06 8.94 2.3 9.514c-.387.125-.773.289-1.114.506-1.042.665-1.196 1.753-.415 2.71.346.422.79.715 1.284.936 1.1.49 2.202.976 3.3 1.47.019.01.036.013.053.019h-.004l1.306.535c0 .023.002.045 0 .073-.2 2.03-.39 4.063-.58 6.095-.04.419-.012.831.134 1.23.317.87 1.065 1.148 1.881.701.372-.204.666-.497.937-.818 1.372-1.623 2.746-3.244 4.113-4.872.111-.133.205-.15.363-.098.349.117.697.231 1.045.347h.001c.02.012.045.02.073.03l.142.042c1.248.416 2.68.775 3.929 1.19.4.132.622.164 1.045.098.311-.048.592-.062.828-.236.602-.33.995-.957.988-1.682-.005-.427-.154-.813-.35-1.186-.82-1.556-1.637-3.113-2.461-4.666-.078-.148-.076-.243.037-.375 1.381-1.615 2.756-3.236 4.133-4.855.272-.32.513-.658.653-1.058.308-.878-.09-1.57-1-1.741a2.783 2.783 0 00-1.235.069c-1.974.521-3.947 1.041-5.918 1.57-.175.047-.26.015-.355-.144a353.08 353.08 0 00-2.421-4.018 4.61 4.61 0 00-.652-.849c-.371-.37-.802-.549-1.227-.536zm.172 3.703a.592.592 0 01.189.211c.87 1.446 1.742 2.89 2.609 4.338.07.118.135.16.277.121 1.525-.41 3.052-.813 4.579-1.217.367-.098.735-.193 1.103-.289a.399.399 0 01-.1.2c-1.259 1.48-2.516 2.962-3.779 4.438-.11.13-.12.22-.04.37.937 1.803 1.768 3.309 2.498 4.76l-3.696-1.019c-.538-.18-1.077-.358-1.615-.539-.163-.055-.25-.03-.36.1-1.248 1.488-2.504 2.97-3.759 4.454a.398.398 0 01-.18.132c.035-.378.068-.757.104-1.136.149-1.572.297-3.144.451-4.716-.03-.318.117-.405-.322-.545-1.493-.593-3.346-1.321-4.816-1.905a.595.595 0 01.24-.134c1.797-.57 3.595-1.14 5.394-1.705.127-.04.199-.092.211-.233.013-.148.05-.294.076-.441.241-1.363.483-2.726.726-4.088.068-.386.14-.771.21-1.157z",databricks:"M.95 14.184L12 20.403l9.919-5.55v2.21L12 22.662l-10.484-5.96-.565.308v.77L12 24l11.05-6.218v-4.317l-.515-.309L12 19.118l-9.867-5.653v-2.21L12 16.805l11.05-6.218V6.32l-.515-.308L12 11.974 2.647 6.681 12 1.388l7.76 4.368.668-.411v-.566L12 0 .95 6.27v.72L12 13.207l9.919-5.55v2.26L12 15.52 1.516 9.56l-.565.308Z","aws-redshift":"M16.639 9.932a.822.822 0 0 1-.822-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.823.82m-2.086 4.994a.823.823 0 0 1-.822-.822.822.822 0 0 1 1.645 0 .822.822 0 0 1-.823.822m-5.004-.833a.822.822 0 1 1 .002-1.644.822.822 0 0 1-.002 1.644m-2.083 4.578a.823.823 0 0 1-.823-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.822.82m9.173-11.236a1.68 1.68 0 0 0-1.68 1.676c0 .566.285 1.066.718 1.37l-.782 1.982a1.674 1.674 0 0 0-1.923 1.104l-1.753-.398a1.675 1.675 0 0 0-3.348.103c0 .432.169.823.438 1.12l-.764 1.79c-.028-.001-.053-.008-.08-.008a1.68 1.68 0 0 0-1.68 1.676 1.68 1.68 0 0 0 3.36 0c0-.593-.312-1.112-.778-1.41l.674-1.579c.161.052.33.088.508.088.661 0 1.228-.386 1.502-.94l1.856.42a1.68 1.68 0 0 0 3.327-.325c0-.5-.224-.943-.574-1.25l.822-2.083c.053.005.104.016.157.016a1.68 1.68 0 0 0 1.68-1.676 1.68 1.68 0 0 0-1.68-1.676M12 23.145c-4.17 0-7.286-1.252-7.286-2.37V4.79C6.14 5.938 9.131 6.547 12 6.547c2.869 0 5.86-.609 7.286-1.756v15.983c0 1.12-3.116 2.37-7.286 2.37M12 .856c4.293 0 7.286 1.274 7.286 2.419 0 1.143-2.993 2.418-7.286 2.418-4.293 0-7.286-1.275-7.286-2.418C4.714 2.129 7.707.855 12 .855m8.143 2.419C20.143 1.147 15.947 0 12 0 8.052 0 3.857 1.147 3.857 3.274l.002.01h-.002v17.49C3.857 22.87 8.052 24 12 24c3.947 0 8.143-1.13 8.143-3.226V3.284h-.002l.002-.01"},N=t=>{let e=me[t],i=be[t];return`<path fill="${e}" d="${i}"/>`},Ot={kubernetes:N("kubernetes"),tensorflow:N("tensorflow"),pytorch:N("pytorch"),"apache-spark":N("apache-spark"),databricks:N("databricks"),"aws-redshift":N("aws-redshift")},fe=Object.fromEntries(Object.entries(be).map(([t,e])=>[t,`<path d="${e}"/>`]));var je={hub:'<circle cx="12" cy="12" r="3"/><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1"/>',model:'<rect x="4" y="8" width="16" height="10" rx="2"/><path d="M8 8V6a4 4 0 0 1 8 0v2"/>',google:'<path d="M12 11.2v2.4h6.6c-.3 1.5-1.8 4.4-6.6 4.4-4 0-7.2-3.3-7.2-7.3S8 3.4 12 3.4c2.3 0 3.9 1 4.8 1.8l3.2-3.1C17.5.8 14.9 0 12 0 5.4 0 0 5.4 0 12s5.4 12 12 12c6.9 0 11.5-4.8 11.5-11.6 0-.8-.1-1.4-.2-1.9H12z"/>',apple:'<path d="M16.365 12.14c.02 2.53 2.21 3.38 2.23 3.39-.02.07-.35 1.21-1.16 2.4-.7 1.02-1.43 2.03-2.58 2.05-1.13.02-1.49-.67-2.78-.67-1.29 0-1.69.65-2.75.69-1.11.04-1.95-1.12-2.66-2.13-1.44-2.08-2.54-5.87-1.07-8.43.73-1.27 2.04-2.08 3.46-2.1 1.08-.02 2.1.72 2.78.72.67 0 2.14-.89 3.61-.76.61.03 2.33.25 3.44 1.88-.09.06-2.05 1.2-2.03 3.55M13.75 3.64c.59-.71 1-1.7.89-2.68-.86.03-1.9.57-2.52 1.28-.55.63-1.03 1.65-.9 2.62.95.07 1.92-.49 2.53-1.22"/>'},R={...oe,...se,...le,...fe,...je},ye={...pe,...ue},Ye={analytics:"deml",security:"shield",link:"link",visibility:"eye",shield:"shield",trending_up:"trending-up",lock:"lock",fingerprint:"fingerprint",gpp_maybe:"shield",verified_user:"user-shield",bolt:"bolt",cloud:"cloud",lan:"network",hub:"hub",speed:"speed",rocket_launch:"rocket",insights:"insights",check:"check",description:"file",vpn_key:"key",policy:"policy",bug_report:"bug",search:"search",chevron_left:"chevron-left",chevron_right:"chevron-right",verified:"check-circle",warning:"alert-triangle",close:"x",account_balance:"building",send:"send",check_circle:"check-circle",play_circle:"play",input:"terminal",model_training:"model",auto_awesome:"sparkle",error_outline:"alert-circle",home:"home",cookie:"cookie",search_off:"search-off",person_add:"user",storage:"aws-redshift",data_object:"aws-redshift",memory:"tensorflow",psychology:"pytorch",dns:"server",login:"log-in"},xe=["play","dots-horizontal","dots-vertical","grip-vertical"],Gt=["google","apple",...ke];var Xe=new Set(Object.keys(R)),we=t=>{let e=t.trim().toLowerCase().replace(/\s+/g,"_");if(Xe.has(e))return e;let i=Ye[e];return i||"info"},qt=Object.keys(R),Wt=Object.keys(oe);var Ze=new Set(xe),g=(t,e=16,i="viking-wc-icon")=>{let r=we(t),n=Ze.has(r),o=n?ye[r]??R[r]:R[r];return n?`<svg class="${i}" width="${e}" height="${e}" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd" aria-hidden="true">${o}</svg>`:`<svg class="${i}" width="${e}" height="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${o}</svg>`},W={accent:"info",secondary:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle",info:"info",muted:"info",subtle:"info"};var Ee=`
1
+ // src/web/core/base.ts
2
+ var attachShadowStyles = (shadow, css) => {
3
+ if ("adoptedStyleSheets" in Document.prototype && "replaceSync" in CSSStyleSheet.prototype) {
4
+ const sheet = new CSSStyleSheet();
5
+ sheet.replaceSync(css);
6
+ shadow.adoptedStyleSheets = [sheet];
7
+ return;
8
+ }
9
+ const style = document.createElement("style");
10
+ style.textContent = css;
11
+ shadow.append(style);
12
+ };
13
+ var readBoolAttr = (el, name) => el.hasAttribute(name) && el.getAttribute(name) !== "false";
14
+ var setFormValue = (internals, value) => {
15
+ if (internals && typeof internals.setFormValue === "function") {
16
+ internals.setFormValue(value);
17
+ }
18
+ };
19
+ var attachElementInternals = (el) => {
20
+ const attachInternals = el.attachInternals;
21
+ return typeof attachInternals === "function" ? attachInternals.call(el) : null;
22
+ };
23
+ var showModalDialog = (dialog) => {
24
+ if (dialog && typeof dialog.showModal === "function" && !dialog.open) {
25
+ dialog.showModal();
26
+ }
27
+ };
28
+ var closeModalDialog = (dialog) => {
29
+ if (dialog && typeof dialog.close === "function" && dialog.open) {
30
+ dialog.close();
31
+ }
32
+ };
33
+
34
+ // src/web/core/dom.ts
35
+ var HTMLElementBase = typeof HTMLElement === "undefined" ? class {
36
+ } : HTMLElement;
37
+ var vikingWcUid = (prefix) => `${prefix}-${Math.random().toString(36).slice(2, 9)}`;
38
+ var escapeHtml = (value) => {
39
+ const entities = {
40
+ "&": "&amp;",
41
+ "<": "&lt;",
42
+ ">": "&gt;",
43
+ '"': "&quot;",
44
+ "'": "&#39;"
45
+ };
46
+ return value.replace(
47
+ /[&<>"']/g,
48
+ (character) => entities[character] ?? character
49
+ );
50
+ };
51
+ var modKeyLabel = () => typeof navigator !== "undefined" && /Mac|iPhone|iPad/i.test(navigator.platform) ? "\u2318" : "Ctrl";
52
+ var defineCustomElement = (tag, ctor) => {
53
+ if (typeof customElements === "undefined" || customElements.get(tag)) {
54
+ return;
55
+ }
56
+ customElements.define(tag, ctor);
57
+ };
58
+ var defineCustomElementAlias = (tag, ctor) => {
59
+ if (typeof customElements === "undefined" || customElements.get(tag)) {
60
+ return;
61
+ }
62
+ customElements.define(tag, class extends ctor {
63
+ });
64
+ };
65
+
66
+ // src/lib/core/lucide-paths.generated.ts
67
+ var LUCIDE_ICON_PATHS = {
68
+ "alert-circle": '<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',
69
+ "alert-triangle": '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
70
+ "arrow-left": '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
71
+ "arrow-right": '<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',
72
+ "arrow-up-right": '<path d="M7 7h10v10"/><path d="M7 17 17 7"/>',
73
+ "bar-chart": '<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>',
74
+ bell: '<path d="M10.268 21a2 2 0 0 0 3.464 0"/><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>',
75
+ bold: '<path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"/>',
76
+ bolt: '<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>',
77
+ brain: '<path d="M12 18V5"/><path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4"/><path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5"/><path d="M17.997 5.125a4 4 0 0 1 2.526 5.77"/><path d="M18 18a4 4 0 0 0 2-7.464"/><path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517"/><path d="M6 18a4 4 0 0 1-2-7.464"/><path d="M6.003 5.125a4 4 0 0 0-2.526 5.77"/>',
78
+ bug: '<path d="M12 20v-9"/><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"/><path d="M14.12 3.88 16 2"/><path d="M21 21a4 4 0 0 0-3.81-4"/><path d="M21 5a4 4 0 0 1-3.55 3.97"/><path d="M22 13h-4"/><path d="M3 21a4 4 0 0 1 3.81-4"/><path d="M3 5a4 4 0 0 0 3.55 3.97"/><path d="M6 13H2"/><path d="m8 2 1.88 1.88"/><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13"/>',
79
+ building: '<path d="M12 10h.01"/><path d="M12 14h.01"/><path d="M12 6h.01"/><path d="M16 10h.01"/><path d="M16 14h.01"/><path d="M16 6h.01"/><path d="M8 10h.01"/><path d="M8 14h.01"/><path d="M8 6h.01"/><path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/><rect x="4" y="2" width="16" height="20" rx="2"/>',
80
+ calendar: '<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/>',
81
+ check: '<path d="M20 6 9 17l-5-5"/>',
82
+ "check-circle": '<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',
83
+ "chevron-down": '<path d="m6 9 6 6 6-6"/>',
84
+ "chevron-left": '<path d="m15 18-6-6 6-6"/>',
85
+ "chevron-right": '<path d="m9 18 6-6-6-6"/>',
86
+ "chevron-up": '<path d="m18 15-6-6-6 6"/>',
87
+ chip: '<path d="M12 20v2"/><path d="M12 2v2"/><path d="M17 20v2"/><path d="M17 2v2"/><path d="M2 12h2"/><path d="M2 17h2"/><path d="M2 7h2"/><path d="M20 12h2"/><path d="M20 17h2"/><path d="M20 7h2"/><path d="M7 20v2"/><path d="M7 2v2"/><rect x="4" y="4" width="16" height="16" rx="2"/><rect x="8" y="8" width="8" height="8" rx="1"/>',
88
+ clock: '<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>',
89
+ cloud: '<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/>',
90
+ cookie: '<path d="M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5"/><path d="M8.5 8.5v.01"/><path d="M16 15.5v.01"/><path d="M12 12v.01"/><path d="M11 17v.01"/><path d="M7 14v.01"/>',
91
+ copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
92
+ "dots-horizontal": '<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="5" cy="12" r="1" fill="currentColor" stroke="none"/>',
93
+ "dots-vertical": '<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="19" r="1" fill="currentColor" stroke="none"/>',
94
+ download: '<path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/>',
95
+ external: '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
96
+ eye: '<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>',
97
+ "eye-off": '<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>',
98
+ file: '<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/>',
99
+ filter: '<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"/>',
100
+ fingerprint: '<path d="M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"/><path d="M14 13.12c0 2.38 0 6.38-1 8.88"/><path d="M17.29 21.02c.12-.6.43-2.3.5-3.02"/><path d="M2 12a10 10 0 0 1 18-6"/><path d="M2 16h.01"/><path d="M21.8 16c.2-2 .131-5.354 0-6"/><path d="M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2"/><path d="M8.65 22c.21-.66.45-1.32.57-2"/><path d="M9 6.8a6 6 0 0 1 9 5.2v2"/>',
101
+ folder: '<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',
102
+ globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',
103
+ "grip-vertical": '<circle cx="9" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="19" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="19" r="1" fill="currentColor" stroke="none"/>',
104
+ heart: '<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>',
105
+ home: '<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>',
106
+ image: '<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',
107
+ info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
108
+ insights: '<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="m19 9-5 5-4-4-3 3"/>',
109
+ italic: '<line x1="19" x2="10" y1="4" y2="4"/><line x1="14" x2="5" y1="20" y2="20"/><line x1="15" x2="9" y1="4" y2="20"/>',
110
+ key: '<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"/><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"/>',
111
+ link: '<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>',
112
+ list: '<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>',
113
+ "list-ordered": '<path d="M11 5h10"/><path d="M11 12h10"/><path d="M11 19h10"/><path d="M4 4h1v5"/><path d="M4 9h2"/><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"/>',
114
+ loader: '<path d="M21 12a9 9 0 1 1-6.219-8.56"/>',
115
+ lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
116
+ "log-in": '<path d="m10 17 5-5-5-5"/><path d="M15 12H3"/><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/>',
117
+ "log-out": '<path d="m16 17 5-5-5-5"/><path d="M21 12H9"/><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>',
118
+ mail: '<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"/><rect x="2" y="4" width="20" height="16" rx="2"/>',
119
+ menu: '<path d="M4 5h16"/><path d="M4 12h16"/><path d="M4 19h16"/>',
120
+ minus: '<path d="M5 12h14"/>',
121
+ moon: '<path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"/>',
122
+ network: '<rect x="16" y="16" width="6" height="6" rx="1"/><rect x="2" y="16" width="6" height="6" rx="1"/><rect x="9" y="2" width="6" height="6" rx="1"/><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"/><path d="M12 12V8"/>',
123
+ paperclip: '<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"/>',
124
+ pencil: '<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',
125
+ phone: '<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/>',
126
+ play: '<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" fill="currentColor" stroke="none"/>',
127
+ plus: '<path d="M5 12h14"/><path d="M12 5v14"/>',
128
+ policy: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>',
129
+ refresh: '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
130
+ rocket: '<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"/><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"/>',
131
+ search: '<path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/>',
132
+ "search-off": '<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
133
+ send: '<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>',
134
+ server: '<rect width="20" height="8" x="2" y="2" rx="2" ry="2"/><rect width="20" height="8" x="2" y="14" rx="2" ry="2"/><line x1="6" x2="6.01" y1="6" y2="6"/><line x1="6" x2="6.01" y1="18" y2="18"/>',
135
+ settings: '<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/>',
136
+ shield: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
137
+ ship: '<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',
138
+ sparkle: '<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/>',
139
+ speed: '<path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/>',
140
+ star: '<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>',
141
+ sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',
142
+ terminal: '<path d="M12 19h8"/><path d="m4 17 6-6-6-6"/>',
143
+ trash: '<path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>',
144
+ "trending-up": '<path d="M16 7h6v6"/><path d="m22 7-8.5 8.5-5-5L2 17"/>',
145
+ underline: '<path d="M6 4v6a6 6 0 0 0 12 0V4"/><line x1="4" x2="20" y1="20" y2="20"/>',
146
+ upload: '<path d="M12 3v12"/><path d="m17 8-5-5-5 5"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>',
147
+ user: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
148
+ "user-shield": '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M6.376 18.91a6 6 0 0 1 11.249.003"/><circle cx="12" cy="11" r="4"/>',
149
+ x: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'
150
+ };
151
+
152
+ // src/lib/core/brand-icons.ts
153
+ var VIKING_BRAND_ICON_PATHS = {
154
+ /** Primary bar-chart mark in rounded frame (outline). */
155
+ deml: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/>',
156
+ /** Compact monogram for favicons and dense Drakkar shell. */
157
+ "deml-compact": '<rect x="4" y="4" width="16" height="16" rx="3"/><path d="M9 16V12M12 16V9M15 16V13"/>',
158
+ /** Lockup mark with baseline accent bar. */
159
+ "deml-lockup": '<rect x="3" y="3" width="18" height="14" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/><path d="M3 20h18"/>'
160
+ };
161
+ var VIKING_DRAKKAR_ICON_PATHS = {
162
+ /** Primary Drakkar longship mark (outline). */
163
+ drakkar: '<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',
164
+ /** Compact tile for favicons and dense navbar chrome. */
165
+ "drakkar-compact": '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',
166
+ /** Lockup mark with baseline accent bar. */
167
+ "drakkar-lockup": '<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/><path d="M3 21h18"/>'
168
+ };
169
+ var VIKING_BRAND_ICON_FILLED_PATHS = {
170
+ deml: '<path d="M5 4a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/>',
171
+ "deml-compact": '<path d="M6 5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5zM9 12h1.5v4H9v-4zM12 9h1.5v7H12V9zM15 11h1.5v5H15v-5z"/>',
172
+ "deml-lockup": '<path d="M4 4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/><rect x="3" y="19" width="18" height="2" rx="1"/>'
173
+ };
174
+ var VIKING_DRAKKAR_ICON_FILLED_PATHS = {
175
+ drakkar: '<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/>',
176
+ "drakkar-compact": '<path d="M3 3h18a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M7.5 12.5 12 9.8l4.5 2.7v2.2c0 .8-.5 1.4-1.2 1.7L12 17.8l-3.3-1.6c-.7-.3-1.2-.9-1.2-1.7v-2.2z"/><rect x="11" y="6" width="2" height="5.5" rx="0.35"/>',
177
+ "drakkar-lockup": '<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/><rect x="3" y="20" width="18" height="2" rx="1"/>'
178
+ };
179
+ var VIKING_BRAND_ICON_NAMES_LIST = Object.keys(
180
+ VIKING_BRAND_ICON_PATHS
181
+ );
182
+ var VIKING_DRAKKAR_ICON_NAMES_LIST = Object.keys(
183
+ VIKING_DRAKKAR_ICON_PATHS
184
+ );
185
+
186
+ // src/lib/core/integration-brand-icons.ts
187
+ var VIKING_INTEGRATION_BRAND_COLORS = {
188
+ kubernetes: "#326CE5",
189
+ tensorflow: "#FF6F00",
190
+ pytorch: "#EE4C2C",
191
+ "apache-spark": "#E25A1C",
192
+ databricks: "#FF3621",
193
+ "aws-redshift": "#8C4FFF"
194
+ };
195
+ var VIKING_INTEGRATION_BRAND_NAMES = Object.keys(
196
+ VIKING_INTEGRATION_BRAND_COLORS
197
+ );
198
+ var VIKING_INTEGRATION_BRAND_PATHS = {
199
+ kubernetes: "M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-.5-.623h-.804l-.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-.52.123-.736-.172-.216-.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-.555-.5-.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z",
200
+ tensorflow: "M1.292 5.856L11.54 0v24l-4.095-2.378V7.603l-6.168 3.564.015-5.31zm21.43 5.311l-.014-5.31L12.46 0v24l4.095-2.378V14.87l3.092 1.788-.018-4.618-3.074-1.756V7.603l6.168 3.564z",
201
+ pytorch: "M12.005 0L4.952 7.053a9.865 9.865 0 000 14.022 9.866 9.866 0 0014.022 0c3.984-3.9 3.986-10.205.085-14.023l-1.744 1.743c2.904 2.905 2.904 7.634 0 10.538s-7.634 2.904-10.538 0-2.904-7.634 0-10.538l4.647-4.646.582-.665zm3.568 3.899a1.327 1.327 0 00-1.327 1.327 1.327 1.327 0 001.327 1.328A1.327 1.327 0 0016.9 5.226 1.327 1.327 0 0015.573 3.9z",
202
+ "apache-spark": "M10.812 0c-.425.013-.845.215-1.196.605a3.593 3.593 0 00-.493.722c-.355.667-.425 1.415-.556 2.143a551.9 551.9 0 00-.726 4.087c-.027.16-.096.227-.244.273C5.83 8.386 4.06 8.94 2.3 9.514c-.387.125-.773.289-1.114.506-1.042.665-1.196 1.753-.415 2.71.346.422.79.715 1.284.936 1.1.49 2.202.976 3.3 1.47.019.01.036.013.053.019h-.004l1.306.535c0 .023.002.045 0 .073-.2 2.03-.39 4.063-.58 6.095-.04.419-.012.831.134 1.23.317.87 1.065 1.148 1.881.701.372-.204.666-.497.937-.818 1.372-1.623 2.746-3.244 4.113-4.872.111-.133.205-.15.363-.098.349.117.697.231 1.045.347h.001c.02.012.045.02.073.03l.142.042c1.248.416 2.68.775 3.929 1.19.4.132.622.164 1.045.098.311-.048.592-.062.828-.236.602-.33.995-.957.988-1.682-.005-.427-.154-.813-.35-1.186-.82-1.556-1.637-3.113-2.461-4.666-.078-.148-.076-.243.037-.375 1.381-1.615 2.756-3.236 4.133-4.855.272-.32.513-.658.653-1.058.308-.878-.09-1.57-1-1.741a2.783 2.783 0 00-1.235.069c-1.974.521-3.947 1.041-5.918 1.57-.175.047-.26.015-.355-.144a353.08 353.08 0 00-2.421-4.018 4.61 4.61 0 00-.652-.849c-.371-.37-.802-.549-1.227-.536zm.172 3.703a.592.592 0 01.189.211c.87 1.446 1.742 2.89 2.609 4.338.07.118.135.16.277.121 1.525-.41 3.052-.813 4.579-1.217.367-.098.735-.193 1.103-.289a.399.399 0 01-.1.2c-1.259 1.48-2.516 2.962-3.779 4.438-.11.13-.12.22-.04.37.937 1.803 1.768 3.309 2.498 4.76l-3.696-1.019c-.538-.18-1.077-.358-1.615-.539-.163-.055-.25-.03-.36.1-1.248 1.488-2.504 2.97-3.759 4.454a.398.398 0 01-.18.132c.035-.378.068-.757.104-1.136.149-1.572.297-3.144.451-4.716-.03-.318.117-.405-.322-.545-1.493-.593-3.346-1.321-4.816-1.905a.595.595 0 01.24-.134c1.797-.57 3.595-1.14 5.394-1.705.127-.04.199-.092.211-.233.013-.148.05-.294.076-.441.241-1.363.483-2.726.726-4.088.068-.386.14-.771.21-1.157z",
203
+ databricks: "M.95 14.184L12 20.403l9.919-5.55v2.21L12 22.662l-10.484-5.96-.565.308v.77L12 24l11.05-6.218v-4.317l-.515-.309L12 19.118l-9.867-5.653v-2.21L12 16.805l11.05-6.218V6.32l-.515-.308L12 11.974 2.647 6.681 12 1.388l7.76 4.368.668-.411v-.566L12 0 .95 6.27v.72L12 13.207l9.919-5.55v2.26L12 15.52 1.516 9.56l-.565.308Z",
204
+ "aws-redshift": "M16.639 9.932a.822.822 0 0 1-.822-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.823.82m-2.086 4.994a.823.823 0 0 1-.822-.822.822.822 0 0 1 1.645 0 .822.822 0 0 1-.823.822m-5.004-.833a.822.822 0 1 1 .002-1.644.822.822 0 0 1-.002 1.644m-2.083 4.578a.823.823 0 0 1-.823-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.822.82m9.173-11.236a1.68 1.68 0 0 0-1.68 1.676c0 .566.285 1.066.718 1.37l-.782 1.982a1.674 1.674 0 0 0-1.923 1.104l-1.753-.398a1.675 1.675 0 0 0-3.348.103c0 .432.169.823.438 1.12l-.764 1.79c-.028-.001-.053-.008-.08-.008a1.68 1.68 0 0 0-1.68 1.676 1.68 1.68 0 0 0 3.36 0c0-.593-.312-1.112-.778-1.41l.674-1.579c.161.052.33.088.508.088.661 0 1.228-.386 1.502-.94l1.856.42a1.68 1.68 0 0 0 3.327-.325c0-.5-.224-.943-.574-1.25l.822-2.083c.053.005.104.016.157.016a1.68 1.68 0 0 0 1.68-1.676 1.68 1.68 0 0 0-1.68-1.676M12 23.145c-4.17 0-7.286-1.252-7.286-2.37V4.79C6.14 5.938 9.131 6.547 12 6.547c2.869 0 5.86-.609 7.286-1.756v15.983c0 1.12-3.116 2.37-7.286 2.37M12 .856c4.293 0 7.286 1.274 7.286 2.419 0 1.143-2.993 2.418-7.286 2.418-4.293 0-7.286-1.275-7.286-2.418C4.714 2.129 7.707.855 12 .855m8.143 2.419C20.143 1.147 15.947 0 12 0 8.052 0 3.857 1.147 3.857 3.274l.002.01h-.002v17.49C3.857 22.87 8.052 24 12 24c3.947 0 8.143-1.13 8.143-3.226V3.284h-.002l.002-.01"
205
+ };
206
+ var integrationBrandSvg = (name) => {
207
+ const fill = VIKING_INTEGRATION_BRAND_COLORS[name];
208
+ const d = VIKING_INTEGRATION_BRAND_PATHS[name];
209
+ return `<path fill="${fill}" d="${d}"/>`;
210
+ };
211
+ var VIKING_INTEGRATION_BRAND_SVGS = {
212
+ kubernetes: integrationBrandSvg("kubernetes"),
213
+ tensorflow: integrationBrandSvg("tensorflow"),
214
+ pytorch: integrationBrandSvg("pytorch"),
215
+ "apache-spark": integrationBrandSvg("apache-spark"),
216
+ databricks: integrationBrandSvg("databricks"),
217
+ "aws-redshift": integrationBrandSvg("aws-redshift")
218
+ };
219
+ var VIKING_INTEGRATION_ICON_PATHS = Object.fromEntries(
220
+ Object.entries(VIKING_INTEGRATION_BRAND_PATHS).map(([name, d]) => [name, `<path d="${d}"/>`])
221
+ );
222
+
223
+ // src/lib/core/icons.ts
224
+ var VIKING_CUSTOM_ICON_PATHS = {
225
+ hub: '<circle cx="12" cy="12" r="3"/><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1"/>',
226
+ model: '<rect x="4" y="8" width="16" height="10" rx="2"/><path d="M8 8V6a4 4 0 0 1 8 0v2"/>',
227
+ google: '<path d="M12 11.2v2.4h6.6c-.3 1.5-1.8 4.4-6.6 4.4-4 0-7.2-3.3-7.2-7.3S8 3.4 12 3.4c2.3 0 3.9 1 4.8 1.8l3.2-3.1C17.5.8 14.9 0 12 0 5.4 0 0 5.4 0 12s5.4 12 12 12c6.9 0 11.5-4.8 11.5-11.6 0-.8-.1-1.4-.2-1.9H12z"/>',
228
+ apple: '<path d="M16.365 12.14c.02 2.53 2.21 3.38 2.23 3.39-.02.07-.35 1.21-1.16 2.4-.7 1.02-1.43 2.03-2.58 2.05-1.13.02-1.49-.67-2.78-.67-1.29 0-1.69.65-2.75.69-1.11.04-1.95-1.12-2.66-2.13-1.44-2.08-2.54-5.87-1.07-8.43.73-1.27 2.04-2.08 3.46-2.1 1.08-.02 2.1.72 2.78.72.67 0 2.14-.89 3.61-.76.61.03 2.33.25 3.44 1.88-.09.06-2.05 1.2-2.03 3.55M13.75 3.64c.59-.71 1-1.7.89-2.68-.86.03-1.9.57-2.52 1.28-.55.63-1.03 1.65-.9 2.62.95.07 1.92-.49 2.53-1.22"/>'
229
+ };
230
+ var VIKING_ICON_PATHS = {
231
+ ...LUCIDE_ICON_PATHS,
232
+ ...VIKING_BRAND_ICON_PATHS,
233
+ ...VIKING_DRAKKAR_ICON_PATHS,
234
+ ...VIKING_INTEGRATION_ICON_PATHS,
235
+ ...VIKING_CUSTOM_ICON_PATHS
236
+ };
237
+ var VIKING_ICON_FILLED_PATHS = {
238
+ ...VIKING_BRAND_ICON_FILLED_PATHS,
239
+ ...VIKING_DRAKKAR_ICON_FILLED_PATHS
240
+ };
241
+ var MATERIAL_ICON_ALIASES = {
242
+ analytics: "deml",
243
+ security: "shield",
244
+ link: "link",
245
+ visibility: "eye",
246
+ shield: "shield",
247
+ trending_up: "trending-up",
248
+ lock: "lock",
249
+ fingerprint: "fingerprint",
250
+ gpp_maybe: "shield",
251
+ verified_user: "user-shield",
252
+ bolt: "bolt",
253
+ cloud: "cloud",
254
+ lan: "network",
255
+ hub: "hub",
256
+ speed: "speed",
257
+ rocket_launch: "rocket",
258
+ insights: "insights",
259
+ check: "check",
260
+ description: "file",
261
+ vpn_key: "key",
262
+ policy: "policy",
263
+ bug_report: "bug",
264
+ search: "search",
265
+ chevron_left: "chevron-left",
266
+ chevron_right: "chevron-right",
267
+ verified: "check-circle",
268
+ warning: "alert-triangle",
269
+ close: "x",
270
+ account_balance: "building",
271
+ send: "send",
272
+ check_circle: "check-circle",
273
+ play_circle: "play",
274
+ input: "terminal",
275
+ model_training: "model",
276
+ auto_awesome: "sparkle",
277
+ error_outline: "alert-circle",
278
+ home: "home",
279
+ cookie: "cookie",
280
+ search_off: "search-off",
281
+ person_add: "user",
282
+ storage: "aws-redshift",
283
+ data_object: "aws-redshift",
284
+ memory: "tensorflow",
285
+ psychology: "pytorch",
286
+ dns: "server",
287
+ login: "log-in"
288
+ };
289
+ var VIKING_FILLED_ICON_NAMES = [
290
+ "play",
291
+ "dots-horizontal",
292
+ "dots-vertical",
293
+ "grip-vertical"
294
+ ];
295
+ var VIKING_BRAND_ICON_NAMES = [
296
+ "google",
297
+ "apple",
298
+ ...VIKING_BRAND_ICON_NAMES_LIST
299
+ ];
300
+ var VIKING_ICON_PATH_KEYS = new Set(Object.keys(VIKING_ICON_PATHS));
301
+ var resolveVikingIcon = (name) => {
302
+ const normalized = name.trim().toLowerCase().replace(/\s+/g, "_");
303
+ if (VIKING_ICON_PATH_KEYS.has(normalized)) {
304
+ return normalized;
305
+ }
306
+ const alias = MATERIAL_ICON_ALIASES[normalized];
307
+ if (alias) {
308
+ return alias;
309
+ }
310
+ return "info";
311
+ };
312
+ var VIKING_ICON_NAMES = Object.keys(
313
+ VIKING_ICON_PATHS
314
+ );
315
+ var VIKING_LUCIDE_ICON_NAMES = Object.keys(
316
+ LUCIDE_ICON_PATHS
317
+ );
318
+
319
+ // src/web/core/icons-inline.ts
320
+ var FILLED_ICON_SET = new Set(VIKING_FILLED_ICON_NAMES);
321
+ var renderInlineIcon = (name, size = 16, className = "viking-wc-icon") => {
322
+ const resolved = resolveVikingIcon(name);
323
+ const filled = FILLED_ICON_SET.has(resolved);
324
+ const paths = filled ? VIKING_ICON_FILLED_PATHS[resolved] ?? VIKING_ICON_PATHS[resolved] : VIKING_ICON_PATHS[resolved];
325
+ if (filled) {
326
+ return `<svg class="${className}" width="${size}" height="${size}" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd" aria-hidden="true">${paths}</svg>`;
327
+ }
328
+ return `<svg class="${className}" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${paths}</svg>`;
329
+ };
330
+ var TONE_ICON_NAMES = {
331
+ accent: "info",
332
+ secondary: "info",
333
+ success: "check-circle",
334
+ warning: "alert-triangle",
335
+ danger: "alert-circle",
336
+ info: "info",
337
+ muted: "info",
338
+ subtle: "info"
339
+ };
340
+
341
+ // src/web/core/styles.ts
342
+ var VIKING_BUTTON_STYLES = `
2
343
  :host {
3
344
  display: inline-flex;
4
345
  font-family: var(--viking-font-family);
@@ -249,7 +590,8 @@
249
590
  .viking-btn-spinner { animation-duration: 0.01ms; }
250
591
  .viking-btn { transition-duration: 0.01ms; }
251
592
  }
252
- `,Se=`
593
+ `;
594
+ var VIKING_INPUT_STYLES = `
253
595
  :host {
254
596
  display: block;
255
597
  font-family: var(--viking-font-family);
@@ -372,7 +714,8 @@ input:disabled {
372
714
  @keyframes viking-spin {
373
715
  to { transform: rotate(360deg); }
374
716
  }
375
- `,Ie=`
717
+ `;
718
+ var VIKING_FIELD_STYLES = `
376
719
  :host {
377
720
  display: block;
378
721
  font-family: var(--viking-font-family);
@@ -439,7 +782,8 @@ input:disabled {
439
782
  .viking-field-error {
440
783
  color: var(--viking-danger-text);
441
784
  }
442
- `,_e=`
785
+ `;
786
+ var VIKING_BADGE_STYLES = `
443
787
  :host {
444
788
  display: inline-flex;
445
789
  align-items: center;
@@ -536,7 +880,8 @@ input:disabled {
536
880
  outline: var(--viking-ring-width) solid var(--viking-ring);
537
881
  outline-offset: var(--viking-ring-offset);
538
882
  }
539
- `,Me=`
883
+ `;
884
+ var VIKING_CALLOUT_STYLES = `
540
885
  :host {
541
886
  display: block;
542
887
  font-family: var(--viking-font-family);
@@ -674,7 +1019,8 @@ input:disabled {
674
1019
  .viking-callout-danger .viking-callout-text {
675
1020
  color: var(--viking-white);
676
1021
  }
677
- `,Ae=`
1022
+ `;
1023
+ var VIKING_SELECT_STYLES = `
678
1024
  :host {
679
1025
  display: block;
680
1026
  font-family: var(--viking-font-family);
@@ -747,7 +1093,8 @@ input:disabled {
747
1093
  .viking-select-native[aria-invalid='true'] {
748
1094
  border-color: var(--viking-danger);
749
1095
  }
750
- `,Ce=`
1096
+ `;
1097
+ var VIKING_MODAL_STYLES = `
751
1098
  :host {
752
1099
  display: contents;
753
1100
  }
@@ -885,7 +1232,8 @@ input:disabled {
885
1232
  animation: none;
886
1233
  }
887
1234
  }
888
- `,Le=`
1235
+ `;
1236
+ var VIKING_SEARCH_PALETTE_STYLES = `
889
1237
  :host {
890
1238
  display: contents;
891
1239
  }
@@ -1116,137 +1464,1643 @@ input:disabled {
1116
1464
  animation: none;
1117
1465
  }
1118
1466
  }
1119
- `;var Qe=new Set(["accent","secondary","success","warning","danger","info","muted","subtle"]),w=class extends l{static tag="viking-badge";static legacyTag="viking-badge-wc";static get observedAttributes(){return["tone","size","icon","removable"]}shadow;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,_e)}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}get tone(){let e=this.getAttribute("tone")??"";return Qe.has(e)?e:null}get size(){return this.getAttribute("size")==="sm"?"sm":null}get removable(){return this.hasAttribute("removable")&&this.getAttribute("removable")!=="false"}onRemove=()=>{this.dispatchEvent(new CustomEvent("viking-removed",{bubbles:!0,composed:!0}))};render(){let e=this.tone;e&&this.getAttribute("tone")!==e?this.setAttribute("tone",e):!e&&this.hasAttribute("tone")&&this.removeAttribute("tone");let i=this.size;i&&this.getAttribute("size")!==i?this.setAttribute("size",i):!i&&this.hasAttribute("size")&&this.removeAttribute("size");let r=this.getAttribute("icon")??(e?W[e]:null),n=r?g(r,16):"";this.shadow.innerHTML=`
1120
- ${n}
1467
+ `;
1468
+
1469
+ // src/web/badge/viking-badge-wc.ts
1470
+ var TONES = /* @__PURE__ */ new Set([
1471
+ "accent",
1472
+ "secondary",
1473
+ "success",
1474
+ "warning",
1475
+ "danger",
1476
+ "info",
1477
+ "muted",
1478
+ "subtle"
1479
+ ]);
1480
+ var VikingBadgeWc = class extends HTMLElementBase {
1481
+ static tag = "viking-badge";
1482
+ static legacyTag = "viking-badge-wc";
1483
+ static get observedAttributes() {
1484
+ return ["tone", "size", "icon", "removable"];
1485
+ }
1486
+ shadow;
1487
+ constructor() {
1488
+ super();
1489
+ this.shadow = this.attachShadow({ mode: "open" });
1490
+ attachShadowStyles(this.shadow, VIKING_BADGE_STYLES);
1491
+ }
1492
+ connectedCallback() {
1493
+ this.render();
1494
+ }
1495
+ attributeChangedCallback() {
1496
+ if (this.isConnected) {
1497
+ this.render();
1498
+ }
1499
+ }
1500
+ get tone() {
1501
+ const value = this.getAttribute("tone") ?? "";
1502
+ return TONES.has(value) ? value : null;
1503
+ }
1504
+ get size() {
1505
+ return this.getAttribute("size") === "sm" ? "sm" : null;
1506
+ }
1507
+ get removable() {
1508
+ return this.hasAttribute("removable") && this.getAttribute("removable") !== "false";
1509
+ }
1510
+ onRemove = () => {
1511
+ this.dispatchEvent(
1512
+ new CustomEvent("viking-removed", { bubbles: true, composed: true })
1513
+ );
1514
+ };
1515
+ render() {
1516
+ const tone = this.tone;
1517
+ if (tone && this.getAttribute("tone") !== tone) {
1518
+ this.setAttribute("tone", tone);
1519
+ } else if (!tone && this.hasAttribute("tone")) {
1520
+ this.removeAttribute("tone");
1521
+ }
1522
+ const size = this.size;
1523
+ if (size && this.getAttribute("size") !== size) {
1524
+ this.setAttribute("size", size);
1525
+ } else if (!size && this.hasAttribute("size")) {
1526
+ this.removeAttribute("size");
1527
+ }
1528
+ const iconName = this.getAttribute("icon") ?? (tone ? TONE_ICON_NAMES[tone] : null);
1529
+ const iconMarkup = iconName ? renderInlineIcon(iconName, 16) : "";
1530
+ this.shadow.innerHTML = `
1531
+ ${iconMarkup}
1121
1532
  <span part="label"><slot></slot></span>
1122
- ${this.removable?`<button type="button" class="viking-badge-remove" part="remove" aria-label="Remove">${g("x",14)}</button>`:""}
1123
- `,this.shadow.querySelector(".viking-badge-remove")?.addEventListener("click",this.onRemove)}},U=()=>{c(w.tag,w),d(w.legacyTag,w)};var Je=new Set(["outline","primary","secondary","filled","danger","ghost","subtle"]),et=new Set(["sm","xs"]),E=class extends l{static tag="viking-button";static legacyTag="viking-button-wc";static get observedAttributes(){return["variant","size","type","disabled","loading","href","target","aria-label","aria-busy","square","full-width","compact"]}shadow;control=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ee)}connectedCallback(){this.render(),this.syncHostSemantics(),this.control?.addEventListener("click",this.onClick)}disconnectedCallback(){this.control?.removeEventListener("click",this.onClick)}attributeChangedCallback(){this.isConnected&&(this.render(),this.syncHostSemantics())}onClick=e=>{if(this.disabled||this.loading){e.preventDefault(),e.stopPropagation();return}this.dispatchEvent(new CustomEvent("viking-press",{bubbles:!0,composed:!0,detail:e}))};get variant(){let e=this.getAttribute("variant")??"outline";return Je.has(e)?e:"outline"}get size(){let e=this.getAttribute("size");return e&&et.has(e)?e:null}get disabled(){return h(this,"disabled")}get loading(){return h(this,"loading")}get square(){return h(this,"square")}syncHostSemantics(){this.hasAttribute("role")||this.setAttribute("role",this.getAttribute("href")?"link":"button")}render(){let e=this.getAttribute("href"),i=!!e,r=i?"a":"button",n=["viking-btn",`viking-btn-${this.variant}`,this.size?`viking-btn-${this.size}`:"",this.square?"viking-btn-square":""].filter(Boolean).join(" "),o=this.getAttribute("aria-label")??"",s=this.getAttribute("aria-busy")==="true"||this.loading?"true":null,u=a(this.getAttribute("type")??"button"),p=e?a(e):"",k=this.getAttribute("target"),y=k?a(k):"";this.shadow.innerHTML=`
1124
- <${r}
1125
- class="${n}"
1533
+ ${this.removable ? `<button type="button" class="viking-badge-remove" part="remove" aria-label="Remove">${renderInlineIcon("x", 14)}</button>` : ""}
1534
+ `;
1535
+ this.shadow.querySelector(".viking-badge-remove")?.addEventListener("click", this.onRemove);
1536
+ }
1537
+ };
1538
+ var registerVikingBadgeWc = () => {
1539
+ defineCustomElement(VikingBadgeWc.tag, VikingBadgeWc);
1540
+ defineCustomElementAlias(VikingBadgeWc.legacyTag, VikingBadgeWc);
1541
+ };
1542
+
1543
+ // src/web/button/viking-button-wc.ts
1544
+ var VARIANTS = /* @__PURE__ */ new Set([
1545
+ "outline",
1546
+ "primary",
1547
+ "secondary",
1548
+ "filled",
1549
+ "danger",
1550
+ "ghost",
1551
+ "subtle"
1552
+ ]);
1553
+ var SIZES = /* @__PURE__ */ new Set(["sm", "xs"]);
1554
+ var VikingButtonWc = class extends HTMLElementBase {
1555
+ static tag = "viking-button";
1556
+ static legacyTag = "viking-button-wc";
1557
+ static get observedAttributes() {
1558
+ return [
1559
+ "variant",
1560
+ "size",
1561
+ "type",
1562
+ "disabled",
1563
+ "loading",
1564
+ "href",
1565
+ "target",
1566
+ "aria-label",
1567
+ "aria-busy",
1568
+ "square",
1569
+ "full-width",
1570
+ "compact"
1571
+ ];
1572
+ }
1573
+ shadow;
1574
+ control = null;
1575
+ constructor() {
1576
+ super();
1577
+ this.shadow = this.attachShadow({ mode: "open" });
1578
+ attachShadowStyles(this.shadow, VIKING_BUTTON_STYLES);
1579
+ }
1580
+ connectedCallback() {
1581
+ this.render();
1582
+ this.syncHostSemantics();
1583
+ this.control?.addEventListener("click", this.onClick);
1584
+ }
1585
+ disconnectedCallback() {
1586
+ this.control?.removeEventListener("click", this.onClick);
1587
+ }
1588
+ attributeChangedCallback() {
1589
+ if (this.isConnected) {
1590
+ this.render();
1591
+ this.syncHostSemantics();
1592
+ }
1593
+ }
1594
+ onClick = (event) => {
1595
+ if (this.disabled || this.loading) {
1596
+ event.preventDefault();
1597
+ event.stopPropagation();
1598
+ return;
1599
+ }
1600
+ this.dispatchEvent(
1601
+ new CustomEvent("viking-press", {
1602
+ bubbles: true,
1603
+ composed: true,
1604
+ detail: event
1605
+ })
1606
+ );
1607
+ };
1608
+ get variant() {
1609
+ const value = this.getAttribute("variant") ?? "outline";
1610
+ return VARIANTS.has(value) ? value : "outline";
1611
+ }
1612
+ get size() {
1613
+ const value = this.getAttribute("size");
1614
+ return value && SIZES.has(value) ? value : null;
1615
+ }
1616
+ get disabled() {
1617
+ return readBoolAttr(this, "disabled");
1618
+ }
1619
+ get loading() {
1620
+ return readBoolAttr(this, "loading");
1621
+ }
1622
+ get square() {
1623
+ return readBoolAttr(this, "square");
1624
+ }
1625
+ syncHostSemantics() {
1626
+ if (!this.hasAttribute("role")) {
1627
+ this.setAttribute("role", this.getAttribute("href") ? "link" : "button");
1628
+ }
1629
+ }
1630
+ render() {
1631
+ const href = this.getAttribute("href");
1632
+ const isLink = Boolean(href);
1633
+ const tag = isLink ? "a" : "button";
1634
+ const classes = [
1635
+ "viking-btn",
1636
+ `viking-btn-${this.variant}`,
1637
+ this.size ? `viking-btn-${this.size}` : "",
1638
+ this.square ? "viking-btn-square" : ""
1639
+ ].filter(Boolean).join(" ");
1640
+ const label = this.getAttribute("aria-label") ?? "";
1641
+ const busy = this.getAttribute("aria-busy") === "true" || this.loading ? "true" : null;
1642
+ const type = escapeHtml(this.getAttribute("type") ?? "button");
1643
+ const hrefValue = href ? escapeHtml(href) : "";
1644
+ const target = this.getAttribute("target");
1645
+ const safeTarget = target ? escapeHtml(target) : "";
1646
+ this.shadow.innerHTML = `
1647
+ <${tag}
1648
+ class="${classes}"
1126
1649
  part="control"
1127
- ${i?`href="${p}"`:`type="${u}"`}
1128
- ${i&&y?`target="${y}"`:""}
1129
- ${i&&k==="_blank"?'rel="noopener noreferrer"':""}
1130
- ${this.disabled||this.loading?"disabled":""}
1131
- ${o?`aria-label="${a(o)}"`:""}
1132
- ${s?`aria-busy="${s}"`:""}
1133
- ${this.disabled&&i?'aria-disabled="true" tabindex="-1"':""}
1650
+ ${isLink ? `href="${hrefValue}"` : `type="${type}"`}
1651
+ ${isLink && safeTarget ? `target="${safeTarget}"` : ""}
1652
+ ${isLink && target === "_blank" ? 'rel="noopener noreferrer"' : ""}
1653
+ ${this.disabled || this.loading ? "disabled" : ""}
1654
+ ${label ? `aria-label="${escapeHtml(label)}"` : ""}
1655
+ ${busy ? `aria-busy="${busy}"` : ""}
1656
+ ${this.disabled && isLink ? 'aria-disabled="true" tabindex="-1"' : ""}
1134
1657
  >
1135
- ${this.loading?'<span class="viking-btn-spinner" aria-hidden="true"></span>':""}
1658
+ ${this.loading ? '<span class="viking-btn-spinner" aria-hidden="true"></span>' : ""}
1136
1659
  <span class="viking-btn-label" part="label"><slot></slot></span>
1137
- </${r}>
1138
- `,this.control=this.shadow.querySelector(r)}},F=()=>{c(E.tag,E),d(E.legacyTag,E)};var tt=new Set(["accent","secondary","success","warning","danger","info","muted"]),S=class extends l{static tag="viking-callout";static legacyTag="viking-callout-wc";static get observedAttributes(){return["tone","heading","icon","dismissible","hidden"]}shadow;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Me)}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}get tone(){let e=this.getAttribute("tone")??"info";return tt.has(e)?e:"info"}get dismissible(){return this.hasAttribute("dismissible")&&this.getAttribute("dismissible")!=="false"}onDismiss=()=>{this.setAttribute("hidden",""),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};render(){let e=this.getAttribute("heading")??"",i=this.getAttribute("icon")??W[this.tone]??"info",r=g(i,22,"viking-callout-icon");this.shadow.innerHTML=`
1660
+ </${tag}>
1661
+ `;
1662
+ this.control = this.shadow.querySelector(tag);
1663
+ }
1664
+ };
1665
+ var registerVikingButtonWc = () => {
1666
+ defineCustomElement(VikingButtonWc.tag, VikingButtonWc);
1667
+ defineCustomElementAlias(VikingButtonWc.legacyTag, VikingButtonWc);
1668
+ };
1669
+
1670
+ // src/web/callout/viking-callout-wc.ts
1671
+ var TONES2 = /* @__PURE__ */ new Set([
1672
+ "accent",
1673
+ "secondary",
1674
+ "success",
1675
+ "warning",
1676
+ "danger",
1677
+ "info",
1678
+ "muted"
1679
+ ]);
1680
+ var VikingCalloutWc = class extends HTMLElementBase {
1681
+ static tag = "viking-callout";
1682
+ static legacyTag = "viking-callout-wc";
1683
+ static get observedAttributes() {
1684
+ return ["tone", "heading", "icon", "dismissible", "hidden"];
1685
+ }
1686
+ shadow;
1687
+ constructor() {
1688
+ super();
1689
+ this.shadow = this.attachShadow({ mode: "open" });
1690
+ attachShadowStyles(this.shadow, VIKING_CALLOUT_STYLES);
1691
+ }
1692
+ connectedCallback() {
1693
+ this.render();
1694
+ }
1695
+ attributeChangedCallback() {
1696
+ if (this.isConnected) {
1697
+ this.render();
1698
+ }
1699
+ }
1700
+ get tone() {
1701
+ const value = this.getAttribute("tone") ?? "info";
1702
+ return TONES2.has(value) ? value : "info";
1703
+ }
1704
+ get dismissible() {
1705
+ return this.hasAttribute("dismissible") && this.getAttribute("dismissible") !== "false";
1706
+ }
1707
+ onDismiss = () => {
1708
+ this.setAttribute("hidden", "");
1709
+ this.dispatchEvent(
1710
+ new CustomEvent("viking-close", { bubbles: true, composed: true })
1711
+ );
1712
+ };
1713
+ render() {
1714
+ const heading = this.getAttribute("heading") ?? "";
1715
+ const iconName = this.getAttribute("icon") ?? TONE_ICON_NAMES[this.tone] ?? "info";
1716
+ const iconMarkup = renderInlineIcon(iconName, 22, "viking-callout-icon");
1717
+ this.shadow.innerHTML = `
1139
1718
  <div class="viking-callout viking-callout-${this.tone}" role="note" part="surface">
1140
- <span part="icon">${r}</span>
1719
+ <span part="icon">${iconMarkup}</span>
1141
1720
  <div class="viking-callout-body" part="body">
1142
- ${e?`<p class="viking-callout-heading" part="heading">${a(e)}</p>`:""}
1721
+ ${heading ? `<p class="viking-callout-heading" part="heading">${escapeHtml(heading)}</p>` : ""}
1143
1722
  <div class="viking-callout-text" part="text"><slot></slot></div>
1144
1723
  </div>
1145
- ${this.dismissible?`<button type="button" class="viking-callout-close" part="close" aria-label="Dismiss">${g("x",18)}</button>`:""}
1724
+ ${this.dismissible ? `<button type="button" class="viking-callout-close" part="close" aria-label="Dismiss">${renderInlineIcon("x", 18)}</button>` : ""}
1146
1725
  </div>
1147
- `,this.shadow.querySelector(".viking-callout-close")?.addEventListener("click",this.onDismiss)}},j=()=>{c(S.tag,S),d(S.legacyTag,S)};var I=class extends l{static tag="viking-card";static legacyTag="viking-card-wc";static get observedAttributes(){return["compact","interactive","title"]}connectedCallback(){this.syncClasses()}attributeChangedCallback(){this.isConnected&&this.syncClasses()}syncClasses(){this.classList.add("viking-card"),this.classList.toggle("viking-card-compact",this.hasAttribute("compact")),this.classList.toggle("viking-card-interactive",this.hasAttribute("interactive"));let e=this.getAttribute("title");e?(this.setAttribute("role","region"),this.setAttribute("aria-label",e)):(this.removeAttribute("role"),this.removeAttribute("aria-label"))}},Y=()=>{c(I.tag,I),d(I.legacyTag,I)};var _=class extends l{static tag="viking-field";static legacyTag="viking-field-wc";static get observedAttributes(){return["label","description","error","required","width"]}shadow;labelId=x("viking-field-label");descriptionId=x("viking-field-description");errorId=x("viking-field-error");slotEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ie)}connectedCallback(){this.render(),this.syncControlA11y()}disconnectedCallback(){this.slotEl?.removeEventListener("slotchange",this.syncControlA11y)}attributeChangedCallback(){this.isConnected&&(this.render(),this.syncControlA11y())}get control(){return(this.slotEl?.assignedElements({flatten:!0})??[]).find(i=>i instanceof HTMLElement)??null}focusControl=()=>{this.control?.focus?.()};syncControlA11y=()=>{let e=this.control;if(!e)return;let i=[this.getAttribute("description")??"",this.getAttribute("error")??""].filter(Boolean).join(" "),r=this.getAttribute("label")??"";r&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",r),i?e.setAttribute("aria-description",i):e.removeAttribute("aria-description"),this.getAttribute("error")?(e.setAttribute("aria-invalid","true"),e.setAttribute("error",this.getAttribute("error")??"")):(e.removeAttribute("aria-invalid"),e.getAttribute("error")===""&&e.removeAttribute("error")),h(this,"required")&&e.setAttribute("required","")};render(){let e=this.getAttribute("label")??"",i=this.getAttribute("description")??"",r=this.getAttribute("error")??"",n=h(this,"required");this.shadow.innerHTML=`
1726
+ `;
1727
+ this.shadow.querySelector(".viking-callout-close")?.addEventListener("click", this.onDismiss);
1728
+ }
1729
+ };
1730
+ var registerVikingCalloutWc = () => {
1731
+ defineCustomElement(VikingCalloutWc.tag, VikingCalloutWc);
1732
+ defineCustomElementAlias(VikingCalloutWc.legacyTag, VikingCalloutWc);
1733
+ };
1734
+
1735
+ // src/web/card/viking-card-wc.ts
1736
+ var VikingCardWc = class extends HTMLElementBase {
1737
+ static tag = "viking-card";
1738
+ static legacyTag = "viking-card-wc";
1739
+ static get observedAttributes() {
1740
+ return ["compact", "interactive", "title"];
1741
+ }
1742
+ connectedCallback() {
1743
+ this.syncClasses();
1744
+ }
1745
+ attributeChangedCallback() {
1746
+ if (this.isConnected) {
1747
+ this.syncClasses();
1748
+ }
1749
+ }
1750
+ syncClasses() {
1751
+ this.classList.add("viking-card");
1752
+ this.classList.toggle("viking-card-compact", this.hasAttribute("compact"));
1753
+ this.classList.toggle(
1754
+ "viking-card-interactive",
1755
+ this.hasAttribute("interactive")
1756
+ );
1757
+ const title = this.getAttribute("title");
1758
+ if (title) {
1759
+ this.setAttribute("role", "region");
1760
+ this.setAttribute("aria-label", title);
1761
+ } else {
1762
+ this.removeAttribute("role");
1763
+ this.removeAttribute("aria-label");
1764
+ }
1765
+ }
1766
+ };
1767
+ var registerVikingCardWc = () => {
1768
+ defineCustomElement(VikingCardWc.tag, VikingCardWc);
1769
+ defineCustomElementAlias(VikingCardWc.legacyTag, VikingCardWc);
1770
+ };
1771
+
1772
+ // src/web/field/viking-field-wc.ts
1773
+ var VikingFieldWc = class extends HTMLElementBase {
1774
+ static tag = "viking-field";
1775
+ static legacyTag = "viking-field-wc";
1776
+ static get observedAttributes() {
1777
+ return ["label", "description", "error", "required", "width"];
1778
+ }
1779
+ shadow;
1780
+ labelId = vikingWcUid("viking-field-label");
1781
+ descriptionId = vikingWcUid("viking-field-description");
1782
+ errorId = vikingWcUid("viking-field-error");
1783
+ slotEl = null;
1784
+ constructor() {
1785
+ super();
1786
+ this.shadow = this.attachShadow({ mode: "open" });
1787
+ attachShadowStyles(this.shadow, VIKING_FIELD_STYLES);
1788
+ }
1789
+ connectedCallback() {
1790
+ this.render();
1791
+ this.syncControlA11y();
1792
+ }
1793
+ disconnectedCallback() {
1794
+ this.slotEl?.removeEventListener("slotchange", this.syncControlA11y);
1795
+ }
1796
+ attributeChangedCallback() {
1797
+ if (this.isConnected) {
1798
+ this.render();
1799
+ this.syncControlA11y();
1800
+ }
1801
+ }
1802
+ get control() {
1803
+ const assigned = this.slotEl?.assignedElements({ flatten: true }) ?? [];
1804
+ return assigned.find(
1805
+ (node) => node instanceof HTMLElement
1806
+ ) ?? null;
1807
+ }
1808
+ focusControl = () => {
1809
+ const control = this.control;
1810
+ control?.focus?.();
1811
+ };
1812
+ syncControlA11y = () => {
1813
+ const control = this.control;
1814
+ if (!control) {
1815
+ return;
1816
+ }
1817
+ const description = [
1818
+ this.getAttribute("description") ?? "",
1819
+ this.getAttribute("error") ?? ""
1820
+ ].filter(Boolean).join(" ");
1821
+ const label = this.getAttribute("label") ?? "";
1822
+ if (label && !control.hasAttribute("aria-label")) {
1823
+ control.setAttribute("aria-label", label);
1824
+ }
1825
+ if (description) {
1826
+ control.setAttribute("aria-description", description);
1827
+ } else {
1828
+ control.removeAttribute("aria-description");
1829
+ }
1830
+ if (this.getAttribute("error")) {
1831
+ control.setAttribute("aria-invalid", "true");
1832
+ control.setAttribute("error", this.getAttribute("error") ?? "");
1833
+ } else {
1834
+ control.removeAttribute("aria-invalid");
1835
+ if (control.getAttribute("error") === "") {
1836
+ control.removeAttribute("error");
1837
+ }
1838
+ }
1839
+ if (readBoolAttr(this, "required")) {
1840
+ control.setAttribute("required", "");
1841
+ }
1842
+ };
1843
+ render() {
1844
+ const label = this.getAttribute("label") ?? "";
1845
+ const description = this.getAttribute("description") ?? "";
1846
+ const error = this.getAttribute("error") ?? "";
1847
+ const required = readBoolAttr(this, "required");
1848
+ this.shadow.innerHTML = `
1148
1849
  <div class="viking-field" part="field" role="group" aria-labelledby="${this.labelId}">
1149
- ${e?`<div class="viking-field-label-row" part="label-row">
1850
+ ${label ? `<div class="viking-field-label-row" part="label-row">
1150
1851
  <span class="viking-field-label" part="label" id="${this.labelId}">
1151
- <span>${a(e)}</span>
1152
- ${n?'<span class="viking-field-required" aria-label="required">*</span>':""}
1852
+ <span>${escapeHtml(label)}</span>
1853
+ ${required ? `<span class="viking-field-required" aria-label="required">*</span>` : ""}
1153
1854
  </span>
1154
- </div>`:`<span id="${this.labelId}" hidden>Form field</span>`}
1855
+ </div>` : `<span id="${this.labelId}" hidden>Form field</span>`}
1155
1856
  <div class="viking-field-control" part="control"><slot></slot></div>
1156
- ${i?`<p id="${this.descriptionId}" class="viking-field-description" part="description">${a(i)}</p>`:""}
1157
- ${r?`<p id="${this.errorId}" class="viking-field-error" part="error" role="alert">${a(r)}</p>`:""}
1857
+ ${description ? `<p id="${this.descriptionId}" class="viking-field-description" part="description">${escapeHtml(description)}</p>` : ""}
1858
+ ${error ? `<p id="${this.errorId}" class="viking-field-error" part="error" role="alert">${escapeHtml(error)}</p>` : ""}
1158
1859
  </div>
1159
- `,this.slotEl=this.shadow.querySelector("slot"),this.slotEl?.addEventListener("slotchange",this.syncControlA11y),this.shadow.querySelector(".viking-field-label")?.addEventListener("click",this.focusControl)}},X=()=>{c(_.tag,_),d(_.legacyTag,_)};var M=class extends l{static formAssociated=!0;static tag="viking-input";static legacyTag="viking-input-wc";static get observedAttributes(){return["type","placeholder","value","disabled","loading","clearable","name","autocomplete","required","readonly","minlength","maxlength","pattern","error","aria-label","aria-describedby","bare"]}shadow;internals;input=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.internals=B(this),v(this.shadow,Se)}connectedCallback(){this.render(),this.syncFormValue()}attributeChangedCallback(e){if(this.isConnected){if(e==="value"&&this.input){this.input.value=this.getAttribute("value")??"",this.syncFormValue();return}this.render()}}get value(){return this.input?.value??this.getAttribute("value")??""}set value(e){let i=e??"";this.setAttribute("value",i),this.input&&(this.input.value=i),this.syncFormValue()}get disabled(){return h(this,"disabled")}get loading(){return h(this,"loading")}get clearable(){return h(this,"clearable")}get bare(){return h(this,"bare")}onInput=()=>{let e=this.input?.value??"";this.setAttribute("value",e),this.syncFormValue(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};onBlur=()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0}))};onClear=()=>{this.value="",this.input?.focus(),this.dispatchEvent(new CustomEvent("viking-cleared",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))};syncFormValue(){K(this.internals,this.value)}render(){let e=["viking-input-shell",this.disabled?"viking-disabled":"",this.loading?"viking-loading":""].filter(Boolean).join(" "),i=a(this.getAttribute("type")??"text"),r=this.getAttribute("placeholder")??"",n=a(r),o=a(this.getAttribute("value")??""),s=this.getAttribute("aria-label")??(r||"Text input"),u=a(this.getAttribute("autocomplete")??""),p=a(this.getAttribute("aria-describedby")??""),k=a(this.getAttribute("minlength")??""),y=a(this.getAttribute("maxlength")??""),L=a(this.getAttribute("pattern")??""),V=this.getAttribute("error")??"",ne=h(this,"required"),P=h(this,"readonly"),Ke=this.clearable&&o.length>0&&!this.loading&&!this.bare,ve=`
1160
- ${this.disabled||this.loading?"disabled":""}
1161
- ${ne?"required":""}
1162
- ${P?"readonly":""}
1163
- aria-label="${a(s)}"
1164
- ${p?`aria-describedby="${p}"`:""}
1165
- ${this.loading?'aria-busy="true"':""}
1166
- ${V?'aria-invalid="true"':""}
1167
- ${u?`autocomplete="${u}"`:""}
1168
- ${k?`minlength="${k}"`:""}
1169
- ${y?`maxlength="${y}"`:""}
1170
- ${L?`pattern="${L}"`:""}
1171
- `;this.bare?this.shadow.innerHTML=`
1860
+ `;
1861
+ this.slotEl = this.shadow.querySelector("slot");
1862
+ this.slotEl?.addEventListener("slotchange", this.syncControlA11y);
1863
+ this.shadow.querySelector(".viking-field-label")?.addEventListener("click", this.focusControl);
1864
+ }
1865
+ };
1866
+ var registerVikingFieldWc = () => {
1867
+ defineCustomElement(VikingFieldWc.tag, VikingFieldWc);
1868
+ defineCustomElementAlias(VikingFieldWc.legacyTag, VikingFieldWc);
1869
+ };
1870
+
1871
+ // src/web/input/viking-input-wc.ts
1872
+ var VikingInputWc = class extends HTMLElementBase {
1873
+ static formAssociated = true;
1874
+ static tag = "viking-input";
1875
+ static legacyTag = "viking-input-wc";
1876
+ static get observedAttributes() {
1877
+ return [
1878
+ "type",
1879
+ "placeholder",
1880
+ "value",
1881
+ "disabled",
1882
+ "loading",
1883
+ "clearable",
1884
+ "name",
1885
+ "autocomplete",
1886
+ "required",
1887
+ "readonly",
1888
+ "minlength",
1889
+ "maxlength",
1890
+ "pattern",
1891
+ "error",
1892
+ "aria-label",
1893
+ "aria-describedby",
1894
+ "bare"
1895
+ ];
1896
+ }
1897
+ shadow;
1898
+ internals;
1899
+ input = null;
1900
+ constructor() {
1901
+ super();
1902
+ this.shadow = this.attachShadow({ mode: "open" });
1903
+ this.internals = attachElementInternals(this);
1904
+ attachShadowStyles(this.shadow, VIKING_INPUT_STYLES);
1905
+ }
1906
+ connectedCallback() {
1907
+ this.render();
1908
+ this.syncFormValue();
1909
+ }
1910
+ attributeChangedCallback(name) {
1911
+ if (!this.isConnected) {
1912
+ return;
1913
+ }
1914
+ if (name === "value" && this.input) {
1915
+ this.input.value = this.getAttribute("value") ?? "";
1916
+ this.syncFormValue();
1917
+ return;
1918
+ }
1919
+ this.render();
1920
+ }
1921
+ get value() {
1922
+ return this.input?.value ?? this.getAttribute("value") ?? "";
1923
+ }
1924
+ set value(next) {
1925
+ const normalized = next ?? "";
1926
+ this.setAttribute("value", normalized);
1927
+ if (this.input) {
1928
+ this.input.value = normalized;
1929
+ }
1930
+ this.syncFormValue();
1931
+ }
1932
+ get disabled() {
1933
+ return readBoolAttr(this, "disabled");
1934
+ }
1935
+ get loading() {
1936
+ return readBoolAttr(this, "loading");
1937
+ }
1938
+ get clearable() {
1939
+ return readBoolAttr(this, "clearable");
1940
+ }
1941
+ get bare() {
1942
+ return readBoolAttr(this, "bare");
1943
+ }
1944
+ onInput = () => {
1945
+ const next = this.input?.value ?? "";
1946
+ this.setAttribute("value", next);
1947
+ this.syncFormValue();
1948
+ this.dispatchEvent(new Event("input", { bubbles: true, composed: true }));
1949
+ this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
1950
+ };
1951
+ onBlur = () => {
1952
+ this.dispatchEvent(new Event("blur", { bubbles: true, composed: true }));
1953
+ };
1954
+ onClear = () => {
1955
+ this.value = "";
1956
+ this.input?.focus();
1957
+ this.dispatchEvent(
1958
+ new CustomEvent("viking-cleared", { bubbles: true, composed: true })
1959
+ );
1960
+ this.dispatchEvent(new Event("input", { bubbles: true, composed: true }));
1961
+ };
1962
+ syncFormValue() {
1963
+ setFormValue(this.internals, this.value);
1964
+ }
1965
+ render() {
1966
+ const shellClasses = [
1967
+ "viking-input-shell",
1968
+ this.disabled ? "viking-disabled" : "",
1969
+ this.loading ? "viking-loading" : ""
1970
+ ].filter(Boolean).join(" ");
1971
+ const type = escapeHtml(this.getAttribute("type") ?? "text");
1972
+ const rawPlaceholder = this.getAttribute("placeholder") ?? "";
1973
+ const placeholder = escapeHtml(rawPlaceholder);
1974
+ const value = escapeHtml(this.getAttribute("value") ?? "");
1975
+ const label = this.getAttribute("aria-label") ?? (rawPlaceholder || "Text input");
1976
+ const autocomplete = escapeHtml(this.getAttribute("autocomplete") ?? "");
1977
+ const describedBy = escapeHtml(this.getAttribute("aria-describedby") ?? "");
1978
+ const minLength = escapeHtml(this.getAttribute("minlength") ?? "");
1979
+ const maxLength = escapeHtml(this.getAttribute("maxlength") ?? "");
1980
+ const pattern = escapeHtml(this.getAttribute("pattern") ?? "");
1981
+ const error = this.getAttribute("error") ?? "";
1982
+ const required = readBoolAttr(this, "required");
1983
+ const readonly = readBoolAttr(this, "readonly");
1984
+ const showClear = this.clearable && value.length > 0 && !this.loading && !this.bare;
1985
+ const nativeAttrs = `
1986
+ ${this.disabled || this.loading ? "disabled" : ""}
1987
+ ${required ? "required" : ""}
1988
+ ${readonly ? "readonly" : ""}
1989
+ aria-label="${escapeHtml(label)}"
1990
+ ${describedBy ? `aria-describedby="${describedBy}"` : ""}
1991
+ ${this.loading ? 'aria-busy="true"' : ""}
1992
+ ${error ? 'aria-invalid="true"' : ""}
1993
+ ${autocomplete ? `autocomplete="${autocomplete}"` : ""}
1994
+ ${minLength ? `minlength="${minLength}"` : ""}
1995
+ ${maxLength ? `maxlength="${maxLength}"` : ""}
1996
+ ${pattern ? `pattern="${pattern}"` : ""}
1997
+ `;
1998
+ if (this.bare) {
1999
+ this.shadow.innerHTML = `
1172
2000
  <input
1173
2001
  part="input"
1174
2002
  class="viking-input-native"
1175
- type="${i}"
1176
- placeholder="${n}"
1177
- value="${o}"
1178
- ${ve}
2003
+ type="${type}"
2004
+ placeholder="${placeholder}"
2005
+ value="${value}"
2006
+ ${nativeAttrs}
1179
2007
  />
1180
- `:this.shadow.innerHTML=`
1181
- <div class="${e}" part="shell">
2008
+ `;
2009
+ } else {
2010
+ this.shadow.innerHTML = `
2011
+ <div class="${shellClasses}" part="shell">
1182
2012
  <slot name="leading"></slot>
1183
2013
  <input
1184
2014
  part="input"
1185
- type="${i}"
1186
- placeholder="${n}"
1187
- value="${o}"
1188
- ${ve}
2015
+ type="${type}"
2016
+ placeholder="${placeholder}"
2017
+ value="${value}"
2018
+ ${nativeAttrs}
1189
2019
  />
1190
- ${this.loading?'<span class="viking-input-spinner" aria-hidden="true"></span>':""}
1191
- ${Ke?'<button type="button" class="viking-input-clear" aria-label="Clear input" part="clear">\xD7</button>':""}
2020
+ ${this.loading ? '<span class="viking-input-spinner" aria-hidden="true"></span>' : ""}
2021
+ ${showClear ? '<button type="button" class="viking-input-clear" aria-label="Clear input" part="clear">\xD7</button>' : ""}
1192
2022
  <slot name="trailing"></slot>
1193
2023
  </div>
1194
- `,this.input=this.shadow.querySelector("input"),this.input?.addEventListener("input",this.onInput),this.input?.addEventListener("blur",this.onBlur),this.shadow.querySelector(".viking-input-clear")?.addEventListener("click",this.onClear)}},Z=()=>{c(M.tag,M),d(M.legacyTag,M)};var m=class extends l{static tag="viking-modal";static legacyTag="viking-modal-wc";static dialogTag="viking-dialog";static get observedAttributes(){return["open","title","dismissible"]}shadow;dialogEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ce)}connectedCallback(){this.render(),this.syncOpen(),this.dialogEl?.addEventListener("close",this.onClose),this.dialogEl?.addEventListener("click",this.onBackdropClick)}disconnectedCallback(){this.dialogEl?.removeEventListener("close",this.onClose),this.dialogEl?.removeEventListener("click",this.onBackdropClick)}attributeChangedCallback(e){if(this.isConnected){if(e==="open"){this.syncOpen();return}if(e==="title"){this.updateTitle();return}e==="dismissible"&&(this.render(),this.syncOpen())}}openModal(){this.setAttribute("open",""),this.syncOpen()}closeModal(){this.removeAttribute("open"),T(this.dialogEl)}open(){this.openModal()}close(){this.closeModal()}get dismissible(){return this.getAttribute("dismissible")!=="false"}onClose=()=>{this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};onBackdropClick=e=>{this.dismissible&&e.target===this.dialogEl&&this.closeModal()};syncOpen(){if(!this.dialogEl)return;let e=this.hasAttribute("open");e&&!this.dialogEl.open?(G(this.dialogEl),queueMicrotask(()=>{(this.shadow.querySelector(".viking-modal-close")??this.dialogEl)?.focus()})):!e&&this.dialogEl.open&&T(this.dialogEl)}updateTitle(){let e=this.getAttribute("title")??"Dialog",i=this.shadow.querySelector(".viking-modal-heading");i&&(i.textContent=e),this.dialogEl?.setAttribute("aria-label",e)}render(){let e=this.getAttribute("title")??"Dialog";this.shadow.innerHTML=`
1195
- <dialog class="viking-modal-backdrop" aria-label="${a(e)}" aria-modal="true">
2024
+ `;
2025
+ }
2026
+ this.input = this.shadow.querySelector("input");
2027
+ this.input?.addEventListener("input", this.onInput);
2028
+ this.input?.addEventListener("blur", this.onBlur);
2029
+ const clearBtn = this.shadow.querySelector(".viking-input-clear");
2030
+ clearBtn?.addEventListener("click", this.onClear);
2031
+ }
2032
+ };
2033
+ var registerVikingInputWc = () => {
2034
+ defineCustomElement(VikingInputWc.tag, VikingInputWc);
2035
+ defineCustomElementAlias(VikingInputWc.legacyTag, VikingInputWc);
2036
+ };
2037
+
2038
+ // src/web/modal/viking-modal-wc.ts
2039
+ var VikingModalWc = class extends HTMLElementBase {
2040
+ static tag = "viking-modal";
2041
+ static legacyTag = "viking-modal-wc";
2042
+ static dialogTag = "viking-dialog";
2043
+ static get observedAttributes() {
2044
+ return ["open", "title", "dismissible"];
2045
+ }
2046
+ shadow;
2047
+ dialogEl = null;
2048
+ constructor() {
2049
+ super();
2050
+ this.shadow = this.attachShadow({ mode: "open" });
2051
+ attachShadowStyles(this.shadow, VIKING_MODAL_STYLES);
2052
+ }
2053
+ connectedCallback() {
2054
+ this.render();
2055
+ this.syncOpen();
2056
+ this.dialogEl?.addEventListener("close", this.onClose);
2057
+ this.dialogEl?.addEventListener("click", this.onBackdropClick);
2058
+ }
2059
+ disconnectedCallback() {
2060
+ this.dialogEl?.removeEventListener("close", this.onClose);
2061
+ this.dialogEl?.removeEventListener("click", this.onBackdropClick);
2062
+ }
2063
+ attributeChangedCallback(name) {
2064
+ if (!this.isConnected) {
2065
+ return;
2066
+ }
2067
+ if (name === "open") {
2068
+ this.syncOpen();
2069
+ return;
2070
+ }
2071
+ if (name === "title") {
2072
+ this.updateTitle();
2073
+ return;
2074
+ }
2075
+ if (name === "dismissible") {
2076
+ this.render();
2077
+ this.syncOpen();
2078
+ }
2079
+ }
2080
+ /** Opens the modal dialog. */
2081
+ openModal() {
2082
+ this.setAttribute("open", "");
2083
+ this.syncOpen();
2084
+ }
2085
+ /** Closes the modal dialog. */
2086
+ closeModal() {
2087
+ this.removeAttribute("open");
2088
+ closeModalDialog(this.dialogEl);
2089
+ }
2090
+ /** @deprecated Use openModal() */
2091
+ open() {
2092
+ this.openModal();
2093
+ }
2094
+ /** @deprecated Use closeModal() */
2095
+ close() {
2096
+ this.closeModal();
2097
+ }
2098
+ get dismissible() {
2099
+ return this.getAttribute("dismissible") !== "false";
2100
+ }
2101
+ onClose = () => {
2102
+ this.removeAttribute("open");
2103
+ this.dispatchEvent(
2104
+ new CustomEvent("viking-close", { bubbles: true, composed: true })
2105
+ );
2106
+ };
2107
+ onBackdropClick = (event) => {
2108
+ if (!this.dismissible) {
2109
+ return;
2110
+ }
2111
+ if (event.target === this.dialogEl) {
2112
+ this.closeModal();
2113
+ }
2114
+ };
2115
+ syncOpen() {
2116
+ if (!this.dialogEl) {
2117
+ return;
2118
+ }
2119
+ const shouldOpen = this.hasAttribute("open");
2120
+ if (shouldOpen && !this.dialogEl.open) {
2121
+ showModalDialog(this.dialogEl);
2122
+ queueMicrotask(() => {
2123
+ const closeBtn = this.shadow.querySelector(
2124
+ ".viking-modal-close"
2125
+ );
2126
+ (closeBtn ?? this.dialogEl)?.focus();
2127
+ });
2128
+ } else if (!shouldOpen && this.dialogEl.open) {
2129
+ closeModalDialog(this.dialogEl);
2130
+ }
2131
+ }
2132
+ updateTitle() {
2133
+ const title = this.getAttribute("title") ?? "Dialog";
2134
+ const heading = this.shadow.querySelector(".viking-modal-heading");
2135
+ if (heading) {
2136
+ heading.textContent = title;
2137
+ }
2138
+ this.dialogEl?.setAttribute("aria-label", title);
2139
+ }
2140
+ render() {
2141
+ const title = this.getAttribute("title") ?? "Dialog";
2142
+ this.shadow.innerHTML = `
2143
+ <dialog class="viking-modal-backdrop" aria-label="${escapeHtml(title)}" aria-modal="true">
1196
2144
  <div class="viking-modal-panel" part="panel" role="document">
1197
2145
  <header class="viking-modal-header" part="header">
1198
- <h2 class="viking-modal-heading" part="title">${a(e)}</h2>
1199
- ${this.dismissible?`<button type="button" class="viking-modal-close" part="close" aria-label="Close dialog">${g("x",20)}</button>`:""}
2146
+ <h2 class="viking-modal-heading" part="title">${escapeHtml(title)}</h2>
2147
+ ${this.dismissible ? `<button type="button" class="viking-modal-close" part="close" aria-label="Close dialog">${renderInlineIcon("x", 20)}</button>` : ""}
1200
2148
  </header>
1201
2149
  <div class="viking-modal-body" part="body"><slot></slot></div>
1202
2150
  <footer class="viking-modal-footer" part="footer"><slot name="actions"></slot></footer>
1203
2151
  </div>
1204
2152
  </dialog>
1205
- `,this.dialogEl=this.shadow.querySelector("dialog"),this.shadow.querySelector(".viking-modal-close")?.addEventListener("click",()=>this.closeModal()),this.dialogEl?.addEventListener("keydown",i=>{i.key==="Escape"&&this.dismissible&&(i.preventDefault(),this.closeModal())})}},Q=()=>{c(m.tag,m),d(m.legacyTag,m),d(m.dialogTag,m)};var it=t=>{let e=t.getAttribute("items");if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i:[]}catch{return[]}},rt=(t,e)=>[t.title,t.snippet??"",t.group??"",t.href,...t.keywords??[]].join(" ").toLowerCase().includes(e),nt=(t,e)=>{let i=e.trim().toLowerCase();return i?t.filter(r=>rt(r,i)):t},at=t=>{let e=new Map;return t.forEach(i=>{let r=i.group??null,n=e.get(r)??[];n.push(i),e.set(r,n)}),Array.from(e.entries()).map(([i,r])=>({group:i,items:r}))},b=class extends l{static tag="viking-command-palette";static searchTag="viking-search-palette";static legacyTag="viking-search-palette-wc";static get observedAttributes(){return["open","placeholder","items","global-shortcut"]}shadow;dialogEl=null;inputEl=null;resultsEl=null;globalKeyHandler=null;resultsId=x("viking-search-results");inputId=x("viking-search-input");query="";activeIndex=0;flatResults=[];constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Le)}connectedCallback(){this.render(),this.syncOpen(),this.bindGlobalShortcut(),this.dialogEl?.addEventListener("close",this.onClose),this.dialogEl?.addEventListener("click",this.onBackdropClick),this.inputEl?.addEventListener("input",this.onInput),this.inputEl?.addEventListener("keydown",this.onInputKeydown)}disconnectedCallback(){this.dialogEl?.removeEventListener("close",this.onClose),this.dialogEl?.removeEventListener("click",this.onBackdropClick),this.inputEl?.removeEventListener("input",this.onInput),this.inputEl?.removeEventListener("keydown",this.onInputKeydown),this.unbindGlobalShortcut()}attributeChangedCallback(e){if(this.isConnected&&(e==="open"&&this.syncOpen(),e==="global-shortcut"&&(this.unbindGlobalShortcut(),this.bindGlobalShortcut()),e==="items"||e==="placeholder"))if(e==="placeholder"&&this.inputEl){let i=this.getAttribute("placeholder")??"Search documentation, dashboard, API\u2026";this.inputEl.placeholder=i,this.inputEl.setAttribute("aria-label",i)}else this.renderResults()}openPalette(){this.setAttribute("open",""),this.syncOpen()}closePalette(){this.removeAttribute("open"),T(this.dialogEl)}search(e){this.query=e,this.inputEl&&(this.inputEl.value=e),this.activeIndex=0,this.renderResults(),this.dispatchEvent(new CustomEvent("viking-query",{bubbles:!0,composed:!0,detail:{query:this.query}}))}onClose=()=>{this.removeAttribute("open"),this.query="",this.activeIndex=0,this.inputEl&&(this.inputEl.value=""),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};onBackdropClick=e=>{e.target===this.dialogEl&&this.closePalette()};onInput=e=>{this.query=e.target.value??this.inputEl?.value??"",this.activeIndex=0,this.renderResults(),this.dispatchEvent(new CustomEvent("viking-query",{bubbles:!0,composed:!0,detail:{query:this.query}}))};onInputKeydown=e=>{if(this.flatResults.length===0){e.key==="Escape"&&(e.preventDefault(),this.closePalette());return}if(e.key==="ArrowDown"){e.preventDefault(),this.activeIndex=Math.min(this.flatResults.length-1,this.activeIndex+1),this.renderResults(),this.scrollActiveIntoView();return}if(e.key==="ArrowUp"){e.preventDefault(),this.activeIndex=Math.max(0,this.activeIndex-1),this.renderResults(),this.scrollActiveIntoView();return}if(e.key==="Enter"){e.preventDefault();let i=this.flatResults[this.activeIndex];i&&this.activateItem(i)}};bindGlobalShortcut(){h(this,"global-shortcut")&&(this.globalKeyHandler=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="k"&&(e.preventDefault(),this.hasAttribute("open")?this.closePalette():this.openPalette())},document.addEventListener("keydown",this.globalKeyHandler))}unbindGlobalShortcut(){this.globalKeyHandler&&(document.removeEventListener("keydown",this.globalKeyHandler),this.globalKeyHandler=null)}syncOpen(){if(!this.dialogEl)return;let e=this.hasAttribute("open");e&&!this.dialogEl.open?(this.dialogEl.removeAttribute("aria-hidden"),G(this.dialogEl),this.activeIndex=0,this.renderResults(),queueMicrotask(()=>this.inputEl?.focus())):!e&&this.dialogEl.open?(T(this.dialogEl),this.dialogEl.setAttribute("aria-hidden","true")):e||this.dialogEl.setAttribute("aria-hidden","true")}scrollActiveIntoView(){this.resultsEl?.querySelector(".viking-search-result.is-selected")?.scrollIntoView({block:"nearest"})}activateItem(e){if(this.dispatchEvent(new CustomEvent("viking-select",{bubbles:!0,composed:!0,detail:{item:e}})),this.closePalette(),e.action==="cookie-settings"){globalThis.DemlWidgets?.openCookieSettings?.();return}if(e.action==="bug-report"){let i=globalThis.DemlWidgets;if(i?.openBugReport){i.openBugReport();return}}e.href&&e.href!=="#"&&window.location.assign(e.href)}renderResults(){if(!this.resultsEl)return;let e=it(this),i=this.query.trim().toLowerCase(),r=nt(e,i);if(this.flatResults=r,r.length===0){let p=this.query.trim();this.resultsEl.innerHTML=`<p class="viking-search-empty" role="status">${p?"No results found":"Start typing to search\u2026"}</p>`,this.inputEl?.removeAttribute("aria-activedescendant");return}this.activeIndex>=r.length&&(this.activeIndex=r.length-1);let n=0,s=at(r).map(({group:p,items:k})=>{let y=p?`<p class="viking-search-group-label" role="presentation">${a(p)}</p>`:"",L=k.map(V=>{let ne=`${this.resultsId}-result-${n}`,P=n===this.activeIndex;return n+=1,`
2153
+ `;
2154
+ this.dialogEl = this.shadow.querySelector("dialog");
2155
+ this.shadow.querySelector(".viking-modal-close")?.addEventListener("click", () => this.closeModal());
2156
+ this.dialogEl?.addEventListener("keydown", (event) => {
2157
+ if (event.key === "Escape" && this.dismissible) {
2158
+ event.preventDefault();
2159
+ this.closeModal();
2160
+ }
2161
+ });
2162
+ }
2163
+ };
2164
+ var registerVikingModalWc = () => {
2165
+ defineCustomElement(VikingModalWc.tag, VikingModalWc);
2166
+ defineCustomElementAlias(VikingModalWc.legacyTag, VikingModalWc);
2167
+ defineCustomElementAlias(VikingModalWc.dialogTag, VikingModalWc);
2168
+ };
2169
+
2170
+ // src/web/search-palette/viking-search-palette-wc.ts
2171
+ var parseItems = (el) => {
2172
+ const raw = el.getAttribute("items");
2173
+ if (!raw) {
2174
+ return [];
2175
+ }
2176
+ try {
2177
+ const parsed = JSON.parse(raw);
2178
+ return Array.isArray(parsed) ? parsed : [];
2179
+ } catch {
2180
+ return [];
2181
+ }
2182
+ };
2183
+ var matchesQuery = (item, query) => {
2184
+ const haystack = [
2185
+ item.title,
2186
+ item.snippet ?? "",
2187
+ item.group ?? "",
2188
+ item.href,
2189
+ ...item.keywords ?? []
2190
+ ].join(" ").toLowerCase();
2191
+ return haystack.includes(query);
2192
+ };
2193
+ var filterItems = (items, query) => {
2194
+ const q = query.trim().toLowerCase();
2195
+ if (!q) {
2196
+ return items;
2197
+ }
2198
+ return items.filter((item) => matchesQuery(item, q));
2199
+ };
2200
+ var groupItems = (items) => {
2201
+ const groups = /* @__PURE__ */ new Map();
2202
+ items.forEach((item) => {
2203
+ const key = item.group ?? null;
2204
+ const bucket = groups.get(key) ?? [];
2205
+ bucket.push(item);
2206
+ groups.set(key, bucket);
2207
+ });
2208
+ return Array.from(groups.entries()).map(([group, grouped]) => ({
2209
+ group,
2210
+ items: grouped
2211
+ }));
2212
+ };
2213
+ var VikingSearchPaletteWc = class extends HTMLElementBase {
2214
+ static tag = "viking-command-palette";
2215
+ static searchTag = "viking-search-palette";
2216
+ static legacyTag = "viking-search-palette-wc";
2217
+ static get observedAttributes() {
2218
+ return ["open", "placeholder", "items", "global-shortcut"];
2219
+ }
2220
+ shadow;
2221
+ dialogEl = null;
2222
+ inputEl = null;
2223
+ resultsEl = null;
2224
+ globalKeyHandler = null;
2225
+ resultsId = vikingWcUid("viking-search-results");
2226
+ inputId = vikingWcUid("viking-search-input");
2227
+ query = "";
2228
+ activeIndex = 0;
2229
+ flatResults = [];
2230
+ constructor() {
2231
+ super();
2232
+ this.shadow = this.attachShadow({ mode: "open" });
2233
+ attachShadowStyles(this.shadow, VIKING_SEARCH_PALETTE_STYLES);
2234
+ }
2235
+ connectedCallback() {
2236
+ this.render();
2237
+ this.syncOpen();
2238
+ this.bindGlobalShortcut();
2239
+ this.dialogEl?.addEventListener("close", this.onClose);
2240
+ this.dialogEl?.addEventListener("click", this.onBackdropClick);
2241
+ this.inputEl?.addEventListener("input", this.onInput);
2242
+ this.inputEl?.addEventListener("keydown", this.onInputKeydown);
2243
+ }
2244
+ disconnectedCallback() {
2245
+ this.dialogEl?.removeEventListener("close", this.onClose);
2246
+ this.dialogEl?.removeEventListener("click", this.onBackdropClick);
2247
+ this.inputEl?.removeEventListener("input", this.onInput);
2248
+ this.inputEl?.removeEventListener("keydown", this.onInputKeydown);
2249
+ this.unbindGlobalShortcut();
2250
+ }
2251
+ attributeChangedCallback(name) {
2252
+ if (!this.isConnected) {
2253
+ return;
2254
+ }
2255
+ if (name === "open") {
2256
+ this.syncOpen();
2257
+ }
2258
+ if (name === "global-shortcut") {
2259
+ this.unbindGlobalShortcut();
2260
+ this.bindGlobalShortcut();
2261
+ }
2262
+ if (name === "items" || name === "placeholder") {
2263
+ if (name === "placeholder" && this.inputEl) {
2264
+ const placeholder = this.getAttribute("placeholder") ?? "Search documentation, dashboard, API\u2026";
2265
+ this.inputEl.placeholder = placeholder;
2266
+ this.inputEl.setAttribute("aria-label", placeholder);
2267
+ } else {
2268
+ this.renderResults();
2269
+ }
2270
+ }
2271
+ }
2272
+ /** Opens the command palette. */
2273
+ openPalette() {
2274
+ this.setAttribute("open", "");
2275
+ this.syncOpen();
2276
+ }
2277
+ /** Closes the command palette. */
2278
+ closePalette() {
2279
+ this.removeAttribute("open");
2280
+ closeModalDialog(this.dialogEl);
2281
+ }
2282
+ /** Sets the query string and re-renders filtered results. */
2283
+ search(query) {
2284
+ this.query = query;
2285
+ if (this.inputEl) {
2286
+ this.inputEl.value = query;
2287
+ }
2288
+ this.activeIndex = 0;
2289
+ this.renderResults();
2290
+ this.dispatchEvent(
2291
+ new CustomEvent("viking-query", {
2292
+ bubbles: true,
2293
+ composed: true,
2294
+ detail: { query: this.query }
2295
+ })
2296
+ );
2297
+ }
2298
+ onClose = () => {
2299
+ this.removeAttribute("open");
2300
+ this.query = "";
2301
+ this.activeIndex = 0;
2302
+ if (this.inputEl) {
2303
+ this.inputEl.value = "";
2304
+ }
2305
+ this.dispatchEvent(
2306
+ new CustomEvent("viking-close", { bubbles: true, composed: true })
2307
+ );
2308
+ };
2309
+ onBackdropClick = (event) => {
2310
+ if (event.target === this.dialogEl) {
2311
+ this.closePalette();
2312
+ }
2313
+ };
2314
+ onInput = (event) => {
2315
+ this.query = event.target.value ?? this.inputEl?.value ?? "";
2316
+ this.activeIndex = 0;
2317
+ this.renderResults();
2318
+ this.dispatchEvent(
2319
+ new CustomEvent("viking-query", {
2320
+ bubbles: true,
2321
+ composed: true,
2322
+ detail: { query: this.query }
2323
+ })
2324
+ );
2325
+ };
2326
+ onInputKeydown = (event) => {
2327
+ if (this.flatResults.length === 0) {
2328
+ if (event.key === "Escape") {
2329
+ event.preventDefault();
2330
+ this.closePalette();
2331
+ }
2332
+ return;
2333
+ }
2334
+ if (event.key === "ArrowDown") {
2335
+ event.preventDefault();
2336
+ this.activeIndex = Math.min(
2337
+ this.flatResults.length - 1,
2338
+ this.activeIndex + 1
2339
+ );
2340
+ this.renderResults();
2341
+ this.scrollActiveIntoView();
2342
+ return;
2343
+ }
2344
+ if (event.key === "ArrowUp") {
2345
+ event.preventDefault();
2346
+ this.activeIndex = Math.max(0, this.activeIndex - 1);
2347
+ this.renderResults();
2348
+ this.scrollActiveIntoView();
2349
+ return;
2350
+ }
2351
+ if (event.key === "Enter") {
2352
+ event.preventDefault();
2353
+ const item = this.flatResults[this.activeIndex];
2354
+ if (item) {
2355
+ this.activateItem(item);
2356
+ }
2357
+ }
2358
+ };
2359
+ bindGlobalShortcut() {
2360
+ if (!readBoolAttr(this, "global-shortcut")) {
2361
+ return;
2362
+ }
2363
+ this.globalKeyHandler = (event) => {
2364
+ if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
2365
+ event.preventDefault();
2366
+ if (this.hasAttribute("open")) {
2367
+ this.closePalette();
2368
+ } else {
2369
+ this.openPalette();
2370
+ }
2371
+ }
2372
+ };
2373
+ document.addEventListener("keydown", this.globalKeyHandler);
2374
+ }
2375
+ unbindGlobalShortcut() {
2376
+ if (this.globalKeyHandler) {
2377
+ document.removeEventListener("keydown", this.globalKeyHandler);
2378
+ this.globalKeyHandler = null;
2379
+ }
2380
+ }
2381
+ syncOpen() {
2382
+ if (!this.dialogEl) {
2383
+ return;
2384
+ }
2385
+ const shouldOpen = this.hasAttribute("open");
2386
+ if (shouldOpen && !this.dialogEl.open) {
2387
+ this.dialogEl.removeAttribute("aria-hidden");
2388
+ showModalDialog(this.dialogEl);
2389
+ this.activeIndex = 0;
2390
+ this.renderResults();
2391
+ queueMicrotask(() => this.inputEl?.focus());
2392
+ } else if (!shouldOpen && this.dialogEl.open) {
2393
+ closeModalDialog(this.dialogEl);
2394
+ this.dialogEl.setAttribute("aria-hidden", "true");
2395
+ } else if (!shouldOpen) {
2396
+ this.dialogEl.setAttribute("aria-hidden", "true");
2397
+ }
2398
+ }
2399
+ scrollActiveIntoView() {
2400
+ const active = this.resultsEl?.querySelector(
2401
+ ".viking-search-result.is-selected"
2402
+ );
2403
+ active?.scrollIntoView({ block: "nearest" });
2404
+ }
2405
+ activateItem(item) {
2406
+ this.dispatchEvent(
2407
+ new CustomEvent("viking-select", {
2408
+ bubbles: true,
2409
+ composed: true,
2410
+ detail: { item }
2411
+ })
2412
+ );
2413
+ this.closePalette();
2414
+ if (item.action === "cookie-settings") {
2415
+ const widgets = globalThis.DemlWidgets;
2416
+ widgets?.openCookieSettings?.();
2417
+ return;
2418
+ }
2419
+ if (item.action === "bug-report") {
2420
+ const widgets = globalThis.DemlWidgets;
2421
+ if (widgets?.openBugReport) {
2422
+ widgets.openBugReport();
2423
+ return;
2424
+ }
2425
+ }
2426
+ if (item.href && item.href !== "#") {
2427
+ window.location.assign(item.href);
2428
+ }
2429
+ }
2430
+ renderResults() {
2431
+ if (!this.resultsEl) {
2432
+ return;
2433
+ }
2434
+ const items = parseItems(this);
2435
+ const q = this.query.trim().toLowerCase();
2436
+ const filtered = filterItems(items, q);
2437
+ this.flatResults = filtered;
2438
+ if (filtered.length === 0) {
2439
+ const q2 = this.query.trim();
2440
+ this.resultsEl.innerHTML = `<p class="viking-search-empty" role="status">${q2 ? "No results found" : "Start typing to search\u2026"}</p>`;
2441
+ this.inputEl?.removeAttribute("aria-activedescendant");
2442
+ return;
2443
+ }
2444
+ if (this.activeIndex >= filtered.length) {
2445
+ this.activeIndex = filtered.length - 1;
2446
+ }
2447
+ let resultIndex = 0;
2448
+ const grouped = groupItems(filtered);
2449
+ const markup = grouped.map(({ group, items: groupItemsList }) => {
2450
+ const groupLabel = group ? `<p class="viking-search-group-label" role="presentation">${escapeHtml(group)}</p>` : "";
2451
+ const rows = groupItemsList.map((item) => {
2452
+ const id = `${this.resultsId}-result-${resultIndex}`;
2453
+ const selected = resultIndex === this.activeIndex;
2454
+ resultIndex += 1;
2455
+ return `
1206
2456
  <a
1207
- id="${ne}"
1208
- class="viking-search-result${P?" is-selected":""}"
2457
+ id="${id}"
2458
+ class="viking-search-result${selected ? " is-selected" : ""}"
1209
2459
  role="option"
1210
- aria-selected="${P}"
1211
- href="${a(V.href)}"
2460
+ aria-selected="${selected}"
2461
+ href="${escapeHtml(item.href)}"
1212
2462
  part="result"
1213
- data-index="${n-1}"
2463
+ data-index="${resultIndex - 1}"
1214
2464
  >
1215
2465
  <div>
1216
- <div class="viking-search-result-title">${a(V.title)}</div>
1217
- ${V.snippet?`<div class="viking-search-result-snippet">${a(V.snippet)}</div>`:""}
2466
+ <div class="viking-search-result-title">${escapeHtml(item.title)}</div>
2467
+ ${item.snippet ? `<div class="viking-search-result-snippet">${escapeHtml(item.snippet)}</div>` : ""}
1218
2468
  </div>
1219
- </a>`}).join("");return`${y}${L}`}).join("");this.resultsEl.innerHTML=`<div class="viking-search-results" id="${this.resultsId}" role="listbox" aria-label="Search results">${s}</div>`;let u=`${this.resultsId}-result-${this.activeIndex}`;this.inputEl?.setAttribute("aria-activedescendant",u),this.inputEl?.setAttribute("role","combobox"),this.inputEl?.setAttribute("aria-expanded","true"),this.inputEl?.setAttribute("aria-controls",this.resultsId),this.resultsEl.querySelectorAll(".viking-search-result").forEach(p=>{p.addEventListener("click",k=>{k.preventDefault();let y=Number(p.dataset.index??0),L=this.flatResults[y];L&&this.activateItem(L)}),p.addEventListener("mouseenter",()=>{let k=Number(p.dataset.index??0);this.activeIndex=k,this.renderResults()})})}render(){let e=this.getAttribute("placeholder")??"Search documentation, dashboard, API\u2026",i=q();this.shadow.innerHTML=`
2469
+ </a>`;
2470
+ }).join("");
2471
+ return `${groupLabel}${rows}`;
2472
+ }).join("");
2473
+ this.resultsEl.innerHTML = `<div class="viking-search-results" id="${this.resultsId}" role="listbox" aria-label="Search results">${markup}</div>`;
2474
+ const activeId = `${this.resultsId}-result-${this.activeIndex}`;
2475
+ this.inputEl?.setAttribute("aria-activedescendant", activeId);
2476
+ this.inputEl?.setAttribute("role", "combobox");
2477
+ this.inputEl?.setAttribute("aria-expanded", "true");
2478
+ this.inputEl?.setAttribute("aria-controls", this.resultsId);
2479
+ this.resultsEl.querySelectorAll(".viking-search-result").forEach((node) => {
2480
+ node.addEventListener("click", (event) => {
2481
+ event.preventDefault();
2482
+ const index = Number(node.dataset["index"] ?? 0);
2483
+ const item = this.flatResults[index];
2484
+ if (item) {
2485
+ this.activateItem(item);
2486
+ }
2487
+ });
2488
+ node.addEventListener("mouseenter", () => {
2489
+ const index = Number(node.dataset["index"] ?? 0);
2490
+ this.activeIndex = index;
2491
+ this.renderResults();
2492
+ });
2493
+ });
2494
+ }
2495
+ render() {
2496
+ const placeholder = this.getAttribute("placeholder") ?? "Search documentation, dashboard, API\u2026";
2497
+ const mod = modKeyLabel();
2498
+ this.shadow.innerHTML = `
1220
2499
  <dialog class="viking-search-palette-backdrop" aria-label="Search" aria-hidden="true">
1221
2500
  <div class="viking-search-palette" part="panel" role="document">
1222
2501
  <div class="viking-search-palette-header" part="header">
1223
- <span class="viking-search-palette-icon" aria-hidden="true">${g("search",24)}</span>
2502
+ <span class="viking-search-palette-icon" aria-hidden="true">${renderInlineIcon("search", 24)}</span>
1224
2503
  <input
1225
2504
  id="${this.inputId}"
1226
2505
  type="search"
1227
2506
  class="viking-search-palette-input"
1228
2507
  part="input"
1229
- placeholder="${a(e)}"
1230
- aria-label="${a(e)}"
2508
+ placeholder="${escapeHtml(placeholder)}"
2509
+ aria-label="${escapeHtml(placeholder)}"
1231
2510
  aria-autocomplete="list"
1232
2511
  autocomplete="off"
1233
2512
  spellcheck="false"
1234
2513
  />
1235
- <button type="button" class="viking-search-palette-close" part="close" aria-label="Close search">${g("x",20)}</button>
2514
+ <button type="button" class="viking-search-palette-close" part="close" aria-label="Close search">${renderInlineIcon("x", 20)}</button>
1236
2515
  </div>
1237
2516
  <div class="viking-search-palette-body" part="body">
1238
2517
  <slot></slot>
1239
2518
  <div class="viking-search-results-host"></div>
1240
2519
  </div>
1241
2520
  <footer class="viking-search-palette-footer" part="footer">
1242
- <span class="viking-kbd">${i}</span><span class="viking-kbd">K</span> toggle \xB7
2521
+ <span class="viking-kbd">${mod}</span><span class="viking-kbd">K</span> toggle \xB7
1243
2522
  <span class="viking-kbd">\u2191</span><span class="viking-kbd">\u2193</span> navigate \xB7
1244
2523
  <span class="viking-kbd">Enter</span> open \xB7
1245
2524
  <span class="viking-kbd">Esc</span> close
1246
2525
  </footer>
1247
2526
  </div>
1248
2527
  </dialog>
1249
- `,this.dialogEl=this.shadow.querySelector("dialog"),this.inputEl=this.shadow.querySelector("input"),this.resultsEl=this.shadow.querySelector(".viking-search-results-host"),this.shadow.querySelector(".viking-search-palette-close")?.addEventListener("click",()=>this.closePalette()),this.dialogEl?.addEventListener("keydown",r=>{r.key==="Escape"&&(r.preventDefault(),this.closePalette())})}},H=()=>{c(b.tag,b),d(b.searchTag,b),d(b.legacyTag,b)};var J=[{id:"explore",label:"Explore",icon:"globe",appHref:"/explore",marketingHref:"/explore",platform:!0},{id:"documentation",label:"Documentation",icon:"file",appHref:"https://dataengineeringformachinelearning.com/documentation/",marketingHref:"/documentation"},{id:"dashboard",label:"Dashboard",icon:"home",appHref:"/dashboard",marketingHref:"/dashboard",requireAuth:!0,platform:!0},{id:"sites",label:"Sites",icon:"building",appHref:"/settings",marketingHref:"/settings",requireAuth:!0,platform:!0},{id:"account",label:"Account",icon:"user",appHref:"/account",marketingHref:"/account",requireAuth:!0,platform:!0}],Ve=[{title:"Platform",links:[{label:"Explore",appHref:"/explore",marketingHref:"/explore",platform:!0},{label:"Dashboard",appHref:"/dashboard",marketingHref:"/dashboard",platform:!0},{label:"Sites",appHref:"/settings",marketingHref:"/settings",platform:!0},{label:"Account",appHref:"/account",marketingHref:"/account",platform:!0},{label:"Platform Status",appHref:"/status/platform-status",marketingHref:"/status/platform-status",platform:!0}]},{title:"Resources",links:[{label:"Documentation",appHref:"https://dataengineeringformachinelearning.com/documentation/",marketingHref:"/documentation"},{label:"Whitepaper",appHref:"https://dataengineeringformachinelearning.com/whitepaper/",marketingHref:"/whitepaper"},{label:"Book",appHref:"https://dataengineeringformachinelearning.com/book/",marketingHref:"/book"}]},{title:"Support",links:[{label:"Platform Status",appHref:"/status/platform-status",marketingHref:"/status/platform-status",platform:!0},{label:"Report a Bug",appHref:"#",marketingHref:"#",action:"bug-report"}]},{title:"Legal & Compliance",links:[{label:"Privacy Policy",appHref:"https://dataengineeringformachinelearning.com/privacy/",marketingHref:"/privacy"},{label:"Terms of Service",appHref:"https://dataengineeringformachinelearning.com/terms/",marketingHref:"/terms"},{label:"SOC2 Compliance",appHref:"https://dataengineeringformachinelearning.com/compliance/",marketingHref:"/compliance"},{label:"GDPR Compliance",appHref:"https://dataengineeringformachinelearning.com/privacy/#gdpr",marketingHref:"/privacy#gdpr"},{label:"Cookie Settings",appHref:"#",marketingHref:"#",action:"cookie-settings"}]}],ot="reportBug=1",st="cookieSettings=1",Te=t=>/^https?:\/\//i.test(t),ee=(t,e)=>{if(Te(e))return e;let i=t.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${i}${r}`},ce=t=>`${ee(t.app,"/")}?${ot}`,de=t=>`${ee(t.marketing,"/")}?${st}`,Ne=(t,e)=>Te(t)||t.startsWith("mailto:")||t.startsWith("/")?t:ee(e.marketing,t),He=(t,e,i)=>e==="app"?t:ee(i.app,t),te=(t,e,i)=>t.platform?He(t.appHref,e,i):e==="app"?t.appHref:Ne(t.marketingHref,i),$e=(t,e,i)=>t.action==="bug-report"?e==="app"?"#":ce(i):t.action==="cookie-settings"?de(i):t.platform?He(t.appHref,e,i):e==="app"?t.appHref:Ne(t.marketingHref,i),Oe=(t,e)=>t==="marketing"?"/":e.marketing,ze=(t,e=!1)=>t.filter(i=>!i.requireAuth||e);var A={app:"https://deml.app",marketing:"https://dataengineeringformachinelearning.com",backend:"https://backend.deml.app"};var lt=t=>{let e=new Set;return t.filter(i=>{let r=`${i.title}:${i.href}:${i.action??""}`;return e.has(r)?!1:(e.add(r),!0)})},ct=(t,e,i)=>({title:t.label,href:te(t,e,i),snippet:`Open ${t.label}`,group:"Platform",keywords:[t.id,t.label.toLowerCase(),"navigate","go"]}),dt=(t,e,i,r)=>t.action==="cookie-settings"?{title:t.label,href:de(r),snippet:"Manage analytics and cookie preferences",group:e,keywords:["cookies","consent","privacy","gdpr"],action:"cookie-settings"}:t.action==="bug-report"?{title:t.label,href:i==="app"?"#":ce(r),snippet:"Submit a product issue or regression",group:e,keywords:["bug","issue","support","feedback"],action:"bug-report"}:{title:t.label,href:$e(t,i,r),snippet:`Open ${t.label}`,group:e,keywords:[t.label.toLowerCase(),e.toLowerCase()]},gt=[{title:"Viking-UI Components",snippet:"Browse the design system showcase",group:"Resources",keywords:["viking","ui","design system","components","showcase"]},{title:"Design tokens",snippet:"Canonical --viking-* token matrix",group:"Resources",keywords:["tokens","theme","css","variables"]},{title:"API reference",snippet:"OpenAPI schema and REST endpoints",group:"Resources",keywords:["api","openapi","swagger","rest"]}],ht=(t,e,i)=>{switch(t.title){case"Viking-UI Components":return"https://ui.dataengineeringformachinelearning.com/components";case"Design tokens":return"https://ui.dataengineeringformachinelearning.com/tokens";case"API reference":return`${i.backend.replace(/\/$/,"")}/api/docs`;default:return e==="app"?i.app:i.marketing}},vt=[{title:"Components",href:"/components",snippet:"Browse all documented primitives",group:"Viking-UI",keywords:["components","showcase","registry"]},{title:"Playground",href:"/playground",snippet:"Live Web Component sandbox",group:"Viking-UI",keywords:["playground","sandbox","demo"]},{title:"Architecture",href:"/architecture",snippet:"CSS + WC + Angular layers",group:"Viking-UI",keywords:["architecture","layers","web component"]},{title:"Design tokens",href:"/tokens",snippet:"Canonical --viking-* token matrix",group:"Viking-UI",keywords:["tokens","theme","css","variables"]},{title:"Theming",href:"/theming",snippet:"Light/dark mode and sync pipeline",group:"Viking-UI",keywords:["theming","dark","light","mode"]},{title:"Framework guides",href:"/frameworks",snippet:"Angular, Astro, Django setup",group:"Viking-UI",keywords:["frameworks","angular","astro","django"]},{title:"Contributing",href:"/contributing",snippet:"Extend the Viking-UI kit",group:"Viking-UI",keywords:["contributing","extend","primitives"]}],pt=(t,e)=>t.startsWith("http")?t:`${e.replace(/\/$/,"")}${t.startsWith("/")?t:`/${t}`}`,ge=(t,e,i)=>{let r=t==="docs"?"marketing":t,n=[...J.map(o=>ct(o,r,e)),...Ve.flatMap(o=>o.links.map(s=>dt(s,o.title,r,e))),...gt.map(o=>({...o,href:ht(o,r,e)}))];if(t==="app"&&n.push({title:"Settings",href:"/settings",snippet:"Workspace domains, billing, and security",group:"Platform",keywords:["settings","sites","workspace","configuration"]},{title:"Billing & subscription",href:"/settings/billing",snippet:"Manage plan, invoices, and payment methods",group:"Platform",keywords:["billing","stripe","subscription","payment"]},{title:"Security settings",href:"/settings/security",snippet:"Keys, sessions, and access controls",group:"Platform",keywords:["security","keys","auth","rbac"]}),t==="docs"){let o=i?.docsOrigin??"https://ui.dataengineeringformachinelearning.com";n.push(...vt.map(s=>({...s,href:pt(s.href,o)})))}return lt(n)};var De=new Set(["app","marketing","backend","docs"]),ut=()=>{let t=document.documentElement.getAttribute("data-deml-context");if(t&&De.has(t))return t;let e=window.location.hostname;return e.startsWith("ui.")?"docs":e.includes("deml.app")&&!e.startsWith("backend.")?"app":e.startsWith("backend.")?"backend":"marketing"},kt=t=>{let e=globalThis.__DEML??{};return{app:t.getAttribute("app-url")??e.app??A.app,marketing:t.getAttribute("marketing-url")??e.marketing??A.marketing,backend:t.getAttribute("backend-url")??e.backend??A.backend}},mt=t=>{let e=t.getAttribute("context");return e&&De.has(e)?e:ut()},f=class extends l{static tag="viking-suite-command-palette";static searchTag="viking-suite-search-palette";static legacyTag="viking-suite-search-palette-wc";static get observedAttributes(){return["context","app-url","marketing-url","backend-url","placeholder","global-shortcut"]}paletteEl=null;itemsLoaded=!1;connectedCallback(){H(),this.ensurePalette(),this.loadItems()}attributeChangedCallback(e){if(this.isConnected){if(e==="placeholder"&&this.paletteEl){let i=this.getAttribute("placeholder")??"Search documentation, dashboard, settings\u2026";this.paletteEl.setAttribute("placeholder",i);return}if(e==="global-shortcut"&&this.paletteEl){h(this,"global-shortcut")||!this.hasAttribute("global-shortcut")?this.paletteEl.setAttribute("global-shortcut",""):this.paletteEl.removeAttribute("global-shortcut");return}(e==="context"||e==="app-url"||e==="marketing-url"||e==="backend-url")&&this.loadItems(!0)}}openPalette(){this.ensurePalette(),this.loadItems().then(()=>this.paletteEl?.openPalette())}closePalette(){this.paletteEl?.closePalette()}ensurePalette(){if(this.paletteEl)return;this.paletteEl=document.createElement("viking-command-palette"),this.paletteEl.id="deml-command-palette";let e=this.getAttribute("placeholder")??"Search documentation, dashboard, settings\u2026";this.paletteEl.setAttribute("placeholder",e),(h(this,"global-shortcut")||!this.hasAttribute("global-shortcut"))&&this.paletteEl.setAttribute("global-shortcut",""),this.append(this.paletteEl)}async loadItems(e=!1){if(!this.paletteEl||this.itemsLoaded&&!e)return;let i=mt(this),r=kt(this),n=ge(i,r,{docsOrigin:window.location.origin});try{let o=await fetch("/assets/site-drakkar.json",{cache:"no-cache"});if(o.ok){let s=await o.json();(s.navLinks?.length||s.footerColumns?.length)&&(n=ge(i,r,{docsOrigin:window.location.origin}))}}catch{}this.paletteEl.setAttribute("items",JSON.stringify(n)),this.itemsLoaded=!0}},$=()=>{c(f.tag,f),d(f.searchTag,f),d(f.legacyTag,f)};var bt=`
2528
+ `;
2529
+ this.dialogEl = this.shadow.querySelector("dialog");
2530
+ this.inputEl = this.shadow.querySelector("input");
2531
+ this.resultsEl = this.shadow.querySelector(".viking-search-results-host");
2532
+ this.shadow.querySelector(".viking-search-palette-close")?.addEventListener("click", () => this.closePalette());
2533
+ this.dialogEl?.addEventListener("keydown", (event) => {
2534
+ if (event.key === "Escape") {
2535
+ event.preventDefault();
2536
+ this.closePalette();
2537
+ }
2538
+ });
2539
+ }
2540
+ };
2541
+ var registerVikingSearchPaletteWc = () => {
2542
+ defineCustomElement(VikingSearchPaletteWc.tag, VikingSearchPaletteWc);
2543
+ defineCustomElementAlias(
2544
+ VikingSearchPaletteWc.searchTag,
2545
+ VikingSearchPaletteWc
2546
+ );
2547
+ defineCustomElementAlias(
2548
+ VikingSearchPaletteWc.legacyTag,
2549
+ VikingSearchPaletteWc
2550
+ );
2551
+ };
2552
+
2553
+ // src/lib/site-drakkar/site-drakkar.config.ts
2554
+ var SITE_NAV_LINKS = [
2555
+ {
2556
+ id: "explore",
2557
+ label: "Explore",
2558
+ icon: "globe",
2559
+ appHref: "/explore",
2560
+ marketingHref: "/explore",
2561
+ platform: true
2562
+ },
2563
+ {
2564
+ id: "documentation",
2565
+ label: "Documentation",
2566
+ icon: "file",
2567
+ appHref: "https://dataengineeringformachinelearning.com/documentation/",
2568
+ marketingHref: "/documentation"
2569
+ },
2570
+ {
2571
+ id: "dashboard",
2572
+ label: "Dashboard",
2573
+ icon: "home",
2574
+ appHref: "/dashboard",
2575
+ marketingHref: "/dashboard",
2576
+ requireAuth: true,
2577
+ platform: true
2578
+ },
2579
+ {
2580
+ id: "sites",
2581
+ label: "Sites",
2582
+ icon: "building",
2583
+ appHref: "/settings",
2584
+ marketingHref: "/settings",
2585
+ requireAuth: true,
2586
+ platform: true
2587
+ },
2588
+ {
2589
+ id: "account",
2590
+ label: "Account",
2591
+ icon: "user",
2592
+ appHref: "/account",
2593
+ marketingHref: "/account",
2594
+ requireAuth: true,
2595
+ platform: true
2596
+ }
2597
+ ];
2598
+ var SITE_FOOTER_COLUMNS = [
2599
+ {
2600
+ title: "Platform",
2601
+ links: [
2602
+ {
2603
+ label: "Explore",
2604
+ appHref: "/explore",
2605
+ marketingHref: "/explore",
2606
+ platform: true
2607
+ },
2608
+ {
2609
+ label: "Dashboard",
2610
+ appHref: "/dashboard",
2611
+ marketingHref: "/dashboard",
2612
+ platform: true
2613
+ },
2614
+ {
2615
+ label: "Sites",
2616
+ appHref: "/settings",
2617
+ marketingHref: "/settings",
2618
+ platform: true
2619
+ },
2620
+ {
2621
+ label: "Account",
2622
+ appHref: "/account",
2623
+ marketingHref: "/account",
2624
+ platform: true
2625
+ },
2626
+ {
2627
+ label: "Platform Status",
2628
+ appHref: "/status/platform-status",
2629
+ marketingHref: "/status/platform-status",
2630
+ platform: true
2631
+ }
2632
+ ]
2633
+ },
2634
+ {
2635
+ title: "Resources",
2636
+ links: [
2637
+ {
2638
+ label: "Documentation",
2639
+ appHref: "https://dataengineeringformachinelearning.com/documentation/",
2640
+ marketingHref: "/documentation"
2641
+ },
2642
+ {
2643
+ label: "Whitepaper",
2644
+ appHref: "https://dataengineeringformachinelearning.com/whitepaper/",
2645
+ marketingHref: "/whitepaper"
2646
+ },
2647
+ {
2648
+ label: "Book",
2649
+ appHref: "https://dataengineeringformachinelearning.com/book/",
2650
+ marketingHref: "/book"
2651
+ }
2652
+ ]
2653
+ },
2654
+ {
2655
+ title: "Support",
2656
+ links: [
2657
+ {
2658
+ label: "Platform Status",
2659
+ appHref: "/status/platform-status",
2660
+ marketingHref: "/status/platform-status",
2661
+ platform: true
2662
+ },
2663
+ {
2664
+ label: "Report a Bug",
2665
+ appHref: "#",
2666
+ marketingHref: "#",
2667
+ action: "bug-report"
2668
+ }
2669
+ ]
2670
+ },
2671
+ {
2672
+ title: "Legal & Compliance",
2673
+ links: [
2674
+ {
2675
+ label: "Privacy Policy",
2676
+ appHref: "https://dataengineeringformachinelearning.com/privacy/",
2677
+ marketingHref: "/privacy"
2678
+ },
2679
+ {
2680
+ label: "Terms of Service",
2681
+ appHref: "https://dataengineeringformachinelearning.com/terms/",
2682
+ marketingHref: "/terms"
2683
+ },
2684
+ {
2685
+ label: "SOC2 Compliance",
2686
+ appHref: "https://dataengineeringformachinelearning.com/compliance/",
2687
+ marketingHref: "/compliance"
2688
+ },
2689
+ {
2690
+ label: "GDPR Compliance",
2691
+ appHref: "https://dataengineeringformachinelearning.com/privacy/#gdpr",
2692
+ marketingHref: "/privacy#gdpr"
2693
+ },
2694
+ {
2695
+ label: "Cookie Settings",
2696
+ appHref: "#",
2697
+ marketingHref: "#",
2698
+ action: "cookie-settings"
2699
+ }
2700
+ ]
2701
+ }
2702
+ ];
2703
+ var BUG_REPORT_QUERY = "reportBug=1";
2704
+ var COOKIE_SETTINGS_QUERY = "cookieSettings=1";
2705
+ var isAbsoluteUrl = (href) => /^https?:\/\//i.test(href);
2706
+ var joinBase = (base, path) => {
2707
+ if (isAbsoluteUrl(path)) {
2708
+ return path;
2709
+ }
2710
+ const normalizedBase = base.replace(/\/$/, "");
2711
+ const normalizedPath = path.startsWith("/") ? path : `/${path}`;
2712
+ return `${normalizedBase}${normalizedPath}`;
2713
+ };
2714
+ var bugReportHref = (urls) => `${joinBase(urls.app, "/")}?${BUG_REPORT_QUERY}`;
2715
+ var cookieSettingsHref = (urls) => `${joinBase(urls.marketing, "/")}?${COOKIE_SETTINGS_QUERY}`;
2716
+ var resolveMarketingContentHref = (href, urls) => {
2717
+ if (isAbsoluteUrl(href)) {
2718
+ return href;
2719
+ }
2720
+ if (href.startsWith("mailto:")) {
2721
+ return href;
2722
+ }
2723
+ return href.startsWith("/") ? href : joinBase(urls.marketing, href);
2724
+ };
2725
+ var resolvePlatformHref = (href, context, urls) => {
2726
+ if (context === "app") {
2727
+ return href;
2728
+ }
2729
+ return joinBase(urls.app, href);
2730
+ };
2731
+ var resolveNavHref = (link, context, urls) => {
2732
+ if (link.platform) {
2733
+ return resolvePlatformHref(link.appHref, context, urls);
2734
+ }
2735
+ if (context === "app") {
2736
+ return link.appHref;
2737
+ }
2738
+ return resolveMarketingContentHref(link.marketingHref, urls);
2739
+ };
2740
+ var resolveFooterHref = (link, context, urls) => {
2741
+ if (link.action === "bug-report") {
2742
+ return context === "app" ? "#" : bugReportHref(urls);
2743
+ }
2744
+ if (link.action === "cookie-settings") {
2745
+ return cookieSettingsHref(urls);
2746
+ }
2747
+ if (link.platform) {
2748
+ return resolvePlatformHref(link.appHref, context, urls);
2749
+ }
2750
+ if (context === "app") {
2751
+ return link.appHref;
2752
+ }
2753
+ return resolveMarketingContentHref(link.marketingHref, urls);
2754
+ };
2755
+ var resolveBrandHref = (context, urls) => {
2756
+ if (context === "marketing") {
2757
+ return "/";
2758
+ }
2759
+ return urls.marketing;
2760
+ };
2761
+ var visibleNavLinks = (links, isAuthenticated = false) => links.filter((link) => !link.requireAuth || isAuthenticated);
2762
+ var DEFAULT_SITE_URLS = {
2763
+ app: "https://deml.app",
2764
+ marketing: "https://dataengineeringformachinelearning.com",
2765
+ backend: "https://backend.deml.app"
2766
+ };
2767
+
2768
+ // src/lib/site-drakkar/suite-search-items.ts
2769
+ var dedupeItems = (items) => {
2770
+ const seen = /* @__PURE__ */ new Set();
2771
+ return items.filter((item) => {
2772
+ const key = `${item.title}:${item.href}:${item.action ?? ""}`;
2773
+ if (seen.has(key)) {
2774
+ return false;
2775
+ }
2776
+ seen.add(key);
2777
+ return true;
2778
+ });
2779
+ };
2780
+ var navItem = (link, context, urls) => ({
2781
+ title: link.label,
2782
+ href: resolveNavHref(link, context, urls),
2783
+ snippet: `Open ${link.label}`,
2784
+ group: "Platform",
2785
+ keywords: [link.id, link.label.toLowerCase(), "navigate", "go"]
2786
+ });
2787
+ var footerItem = (link, columnTitle, context, urls) => {
2788
+ if (link.action === "cookie-settings") {
2789
+ return {
2790
+ title: link.label,
2791
+ href: cookieSettingsHref(urls),
2792
+ snippet: "Manage analytics and cookie preferences",
2793
+ group: columnTitle,
2794
+ keywords: ["cookies", "consent", "privacy", "gdpr"],
2795
+ action: "cookie-settings"
2796
+ };
2797
+ }
2798
+ if (link.action === "bug-report") {
2799
+ return {
2800
+ title: link.label,
2801
+ href: context === "app" ? "#" : bugReportHref(urls),
2802
+ snippet: "Submit a product issue or regression",
2803
+ group: columnTitle,
2804
+ keywords: ["bug", "issue", "support", "feedback"],
2805
+ action: "bug-report"
2806
+ };
2807
+ }
2808
+ return {
2809
+ title: link.label,
2810
+ href: resolveFooterHref(link, context, urls),
2811
+ snippet: `Open ${link.label}`,
2812
+ group: columnTitle,
2813
+ keywords: [link.label.toLowerCase(), columnTitle.toLowerCase()]
2814
+ };
2815
+ };
2816
+ var SUITE_SEARCH_EXTRAS = [
2817
+ {
2818
+ title: "Viking-UI Components",
2819
+ snippet: "Browse the design system showcase",
2820
+ group: "Resources",
2821
+ keywords: ["viking", "ui", "design system", "components", "showcase"]
2822
+ },
2823
+ {
2824
+ title: "Design tokens",
2825
+ snippet: "Canonical --viking-* token matrix",
2826
+ group: "Resources",
2827
+ keywords: ["tokens", "theme", "css", "variables"]
2828
+ },
2829
+ {
2830
+ title: "API reference",
2831
+ snippet: "OpenAPI schema and REST endpoints",
2832
+ group: "Resources",
2833
+ keywords: ["api", "openapi", "swagger", "rest"]
2834
+ }
2835
+ ];
2836
+ var resolveExtraHref = (extra, context, urls) => {
2837
+ switch (extra.title) {
2838
+ case "Viking-UI Components":
2839
+ return "https://ui.dataengineeringformachinelearning.com/components";
2840
+ case "Design tokens":
2841
+ return "https://ui.dataengineeringformachinelearning.com/tokens";
2842
+ case "API reference":
2843
+ return `${urls.backend.replace(/\/$/, "")}/api/docs`;
2844
+ default:
2845
+ return context === "app" ? urls.app : urls.marketing;
2846
+ }
2847
+ };
2848
+ var DOCS_SEARCH_EXTRAS = [
2849
+ {
2850
+ title: "Components",
2851
+ href: "/components",
2852
+ snippet: "Browse all documented primitives",
2853
+ group: "Viking-UI",
2854
+ keywords: ["components", "showcase", "registry"]
2855
+ },
2856
+ {
2857
+ title: "Playground",
2858
+ href: "/playground",
2859
+ snippet: "Live Web Component sandbox",
2860
+ group: "Viking-UI",
2861
+ keywords: ["playground", "sandbox", "demo"]
2862
+ },
2863
+ {
2864
+ title: "Architecture",
2865
+ href: "/architecture",
2866
+ snippet: "CSS + WC + Angular layers",
2867
+ group: "Viking-UI",
2868
+ keywords: ["architecture", "layers", "web component"]
2869
+ },
2870
+ {
2871
+ title: "Design tokens",
2872
+ href: "/tokens",
2873
+ snippet: "Canonical --viking-* token matrix",
2874
+ group: "Viking-UI",
2875
+ keywords: ["tokens", "theme", "css", "variables"]
2876
+ },
2877
+ {
2878
+ title: "Theming",
2879
+ href: "/theming",
2880
+ snippet: "Light/dark mode and sync pipeline",
2881
+ group: "Viking-UI",
2882
+ keywords: ["theming", "dark", "light", "mode"]
2883
+ },
2884
+ {
2885
+ title: "Framework guides",
2886
+ href: "/frameworks",
2887
+ snippet: "Angular, Astro, Django setup",
2888
+ group: "Viking-UI",
2889
+ keywords: ["frameworks", "angular", "astro", "django"]
2890
+ },
2891
+ {
2892
+ title: "Contributing",
2893
+ href: "/contributing",
2894
+ snippet: "Extend the Viking-UI kit",
2895
+ group: "Viking-UI",
2896
+ keywords: ["contributing", "extend", "primitives"]
2897
+ }
2898
+ ];
2899
+ var resolveDocsHref = (href, docsOrigin) => href.startsWith("http") ? href : `${docsOrigin.replace(/\/$/, "")}${href.startsWith("/") ? href : `/${href}`}`;
2900
+ var buildSuiteSearchItems = (context, urls, options) => {
2901
+ const paletteContext = context === "docs" ? "marketing" : context;
2902
+ const items = [
2903
+ ...SITE_NAV_LINKS.map((link) => navItem(link, paletteContext, urls)),
2904
+ ...SITE_FOOTER_COLUMNS.flatMap(
2905
+ (column) => column.links.map(
2906
+ (link) => footerItem(link, column.title, paletteContext, urls)
2907
+ )
2908
+ ),
2909
+ ...SUITE_SEARCH_EXTRAS.map((extra) => ({
2910
+ ...extra,
2911
+ href: resolveExtraHref(extra, paletteContext, urls)
2912
+ }))
2913
+ ];
2914
+ if (context === "app") {
2915
+ items.push(
2916
+ {
2917
+ title: "Settings",
2918
+ href: "/settings",
2919
+ snippet: "Workspace domains, billing, and security",
2920
+ group: "Platform",
2921
+ keywords: ["settings", "sites", "workspace", "configuration"]
2922
+ },
2923
+ {
2924
+ title: "Billing & subscription",
2925
+ href: "/settings/billing",
2926
+ snippet: "Manage plan, invoices, and payment methods",
2927
+ group: "Platform",
2928
+ keywords: ["billing", "stripe", "subscription", "payment"]
2929
+ },
2930
+ {
2931
+ title: "Security settings",
2932
+ href: "/settings/security",
2933
+ snippet: "Keys, sessions, and access controls",
2934
+ group: "Platform",
2935
+ keywords: ["security", "keys", "auth", "rbac"]
2936
+ }
2937
+ );
2938
+ }
2939
+ if (context === "docs") {
2940
+ const docsOrigin = options?.docsOrigin ?? "https://ui.dataengineeringformachinelearning.com";
2941
+ items.push(
2942
+ ...DOCS_SEARCH_EXTRAS.map((extra) => ({
2943
+ ...extra,
2944
+ href: resolveDocsHref(extra.href, docsOrigin)
2945
+ }))
2946
+ );
2947
+ }
2948
+ return dedupeItems(items);
2949
+ };
2950
+
2951
+ // src/web/suite-search-palette/viking-suite-search-palette-wc.ts
2952
+ var VALID_CONTEXTS = /* @__PURE__ */ new Set([
2953
+ "app",
2954
+ "marketing",
2955
+ "backend",
2956
+ "docs"
2957
+ ]);
2958
+ var detectContext = () => {
2959
+ const explicit = document.documentElement.getAttribute("data-deml-context");
2960
+ if (explicit && VALID_CONTEXTS.has(explicit)) {
2961
+ return explicit;
2962
+ }
2963
+ const host = window.location.hostname;
2964
+ if (host.startsWith("ui.")) {
2965
+ return "docs";
2966
+ }
2967
+ if (host.includes("deml.app") && !host.startsWith("backend.")) {
2968
+ return "app";
2969
+ }
2970
+ if (host.startsWith("backend.")) {
2971
+ return "backend";
2972
+ }
2973
+ return "marketing";
2974
+ };
2975
+ var readUrls = (el) => {
2976
+ const env = globalThis.__DEML ?? {};
2977
+ return {
2978
+ app: el.getAttribute("app-url") ?? env.app ?? DEFAULT_SITE_URLS.app,
2979
+ marketing: el.getAttribute("marketing-url") ?? env.marketing ?? DEFAULT_SITE_URLS.marketing,
2980
+ backend: el.getAttribute("backend-url") ?? env.backend ?? DEFAULT_SITE_URLS.backend
2981
+ };
2982
+ };
2983
+ var readContext = (el) => {
2984
+ const raw = el.getAttribute("context");
2985
+ if (raw && VALID_CONTEXTS.has(raw)) {
2986
+ return raw;
2987
+ }
2988
+ return detectContext();
2989
+ };
2990
+ var VikingSuiteSearchPaletteWc = class extends HTMLElementBase {
2991
+ static tag = "viking-suite-command-palette";
2992
+ static searchTag = "viking-suite-search-palette";
2993
+ static legacyTag = "viking-suite-search-palette-wc";
2994
+ static get observedAttributes() {
2995
+ return [
2996
+ "context",
2997
+ "app-url",
2998
+ "marketing-url",
2999
+ "backend-url",
3000
+ "placeholder",
3001
+ "global-shortcut"
3002
+ ];
3003
+ }
3004
+ paletteEl = null;
3005
+ itemsLoaded = false;
3006
+ connectedCallback() {
3007
+ registerVikingSearchPaletteWc();
3008
+ this.ensurePalette();
3009
+ void this.loadItems();
3010
+ }
3011
+ attributeChangedCallback(name) {
3012
+ if (!this.isConnected) {
3013
+ return;
3014
+ }
3015
+ if (name === "placeholder" && this.paletteEl) {
3016
+ const placeholder = this.getAttribute("placeholder") ?? "Search documentation, dashboard, settings\u2026";
3017
+ this.paletteEl.setAttribute("placeholder", placeholder);
3018
+ return;
3019
+ }
3020
+ if (name === "global-shortcut" && this.paletteEl) {
3021
+ if (readBoolAttr(this, "global-shortcut") || !this.hasAttribute("global-shortcut")) {
3022
+ this.paletteEl.setAttribute("global-shortcut", "");
3023
+ } else {
3024
+ this.paletteEl.removeAttribute("global-shortcut");
3025
+ }
3026
+ return;
3027
+ }
3028
+ if (name === "context" || name === "app-url" || name === "marketing-url" || name === "backend-url") {
3029
+ void this.loadItems(true);
3030
+ }
3031
+ }
3032
+ /** Opens the unified command palette. */
3033
+ openPalette() {
3034
+ this.ensurePalette();
3035
+ void this.loadItems().then(() => this.paletteEl?.openPalette());
3036
+ }
3037
+ /** Closes the unified command palette. */
3038
+ closePalette() {
3039
+ this.paletteEl?.closePalette();
3040
+ }
3041
+ ensurePalette() {
3042
+ if (this.paletteEl) {
3043
+ return;
3044
+ }
3045
+ this.paletteEl = document.createElement(
3046
+ "viking-command-palette"
3047
+ );
3048
+ this.paletteEl.id = "deml-command-palette";
3049
+ const placeholder = this.getAttribute("placeholder") ?? "Search documentation, dashboard, settings\u2026";
3050
+ this.paletteEl.setAttribute("placeholder", placeholder);
3051
+ if (readBoolAttr(this, "global-shortcut") || !this.hasAttribute("global-shortcut")) {
3052
+ this.paletteEl.setAttribute("global-shortcut", "");
3053
+ }
3054
+ this.append(this.paletteEl);
3055
+ }
3056
+ async loadItems(force = false) {
3057
+ if (!this.paletteEl || this.itemsLoaded && !force) {
3058
+ return;
3059
+ }
3060
+ const context = readContext(this);
3061
+ const urls = readUrls(this);
3062
+ let items = buildSuiteSearchItems(
3063
+ context,
3064
+ urls,
3065
+ {
3066
+ docsOrigin: window.location.origin
3067
+ }
3068
+ );
3069
+ try {
3070
+ const response = await fetch("/assets/site-drakkar.json", {
3071
+ cache: "no-cache"
3072
+ });
3073
+ if (response.ok) {
3074
+ const drakkar = await response.json();
3075
+ if (drakkar.navLinks?.length || drakkar.footerColumns?.length) {
3076
+ items = buildSuiteSearchItems(context, urls, {
3077
+ docsOrigin: window.location.origin
3078
+ });
3079
+ }
3080
+ }
3081
+ } catch {
3082
+ }
3083
+ this.paletteEl.setAttribute("items", JSON.stringify(items));
3084
+ this.itemsLoaded = true;
3085
+ }
3086
+ };
3087
+ var registerVikingSuiteSearchPaletteWc = () => {
3088
+ defineCustomElement(
3089
+ VikingSuiteSearchPaletteWc.tag,
3090
+ VikingSuiteSearchPaletteWc
3091
+ );
3092
+ defineCustomElementAlias(
3093
+ VikingSuiteSearchPaletteWc.searchTag,
3094
+ VikingSuiteSearchPaletteWc
3095
+ );
3096
+ defineCustomElementAlias(
3097
+ VikingSuiteSearchPaletteWc.legacyTag,
3098
+ VikingSuiteSearchPaletteWc
3099
+ );
3100
+ };
3101
+
3102
+ // src/web/theme-toggle/viking-theme-toggle-wc.ts
3103
+ var VIKING_THEME_TOGGLE_STYLES = `
1250
3104
  :host {
1251
3105
  display: inline-flex;
1252
3106
  }
@@ -1293,8 +3147,60 @@ input:disabled {
1293
3147
  .theme-icon.is-visible {
1294
3148
  display: block;
1295
3149
  }
1296
- `,ft=t=>{document.documentElement.setAttribute("data-theme",t),document.documentElement.classList.toggle("dark",t==="dark"),localStorage.setItem("theme",t)},Re=()=>{let t=localStorage.getItem("theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},O=class extends l{static tag="viking-theme-toggle-wc";shadow;button=null;sunIcon=null;moonIcon=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,bt)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button"),this.render(),this.syncIcons(),this.button?.addEventListener("click",this.onClick)}disconnectedCallback(){this.button?.removeEventListener("click",this.onClick)}onClick=()=>{let e=Re()==="light"?"dark":"light";ft(e),this.syncIcons(),this.dispatchEvent(new CustomEvent("viking-theme-change",{bubbles:!0,composed:!0,detail:{theme:e}}))};syncIcons=()=>{let e=Re()==="light";this.sunIcon?.classList.toggle("is-visible",e),this.moonIcon?.classList.toggle("is-visible",!e)};render(){let e=this.getAttribute("aria-label")??"Toggle light and dark theme";this.shadow.innerHTML=`
1297
- <button type="button" class="theme-toggle-btn" part="control" aria-label="${e}">
3150
+ `;
3151
+ var applyTheme = (theme) => {
3152
+ document.documentElement.setAttribute("data-theme", theme);
3153
+ document.documentElement.classList.toggle("dark", theme === "dark");
3154
+ localStorage.setItem("theme", theme);
3155
+ };
3156
+ var readTheme = () => {
3157
+ const saved = localStorage.getItem("theme");
3158
+ if (saved === "light" || saved === "dark") return saved;
3159
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
3160
+ };
3161
+ var VikingThemeToggleWc = class extends HTMLElementBase {
3162
+ static tag = "viking-theme-toggle-wc";
3163
+ shadow;
3164
+ button = null;
3165
+ sunIcon = null;
3166
+ moonIcon = null;
3167
+ constructor() {
3168
+ super();
3169
+ this.shadow = this.attachShadow({ mode: "open" });
3170
+ attachShadowStyles(this.shadow, VIKING_THEME_TOGGLE_STYLES);
3171
+ }
3172
+ connectedCallback() {
3173
+ if (!this.hasAttribute("role")) {
3174
+ this.setAttribute("role", "button");
3175
+ }
3176
+ this.render();
3177
+ this.syncIcons();
3178
+ this.button?.addEventListener("click", this.onClick);
3179
+ }
3180
+ disconnectedCallback() {
3181
+ this.button?.removeEventListener("click", this.onClick);
3182
+ }
3183
+ onClick = () => {
3184
+ const next = readTheme() === "light" ? "dark" : "light";
3185
+ applyTheme(next);
3186
+ this.syncIcons();
3187
+ this.dispatchEvent(
3188
+ new CustomEvent("viking-theme-change", {
3189
+ bubbles: true,
3190
+ composed: true,
3191
+ detail: { theme: next }
3192
+ })
3193
+ );
3194
+ };
3195
+ syncIcons = () => {
3196
+ const isLight = readTheme() === "light";
3197
+ this.sunIcon?.classList.toggle("is-visible", isLight);
3198
+ this.moonIcon?.classList.toggle("is-visible", !isLight);
3199
+ };
3200
+ render() {
3201
+ const label = this.getAttribute("aria-label") ?? "Toggle light and dark theme";
3202
+ this.shadow.innerHTML = `
3203
+ <button type="button" class="theme-toggle-btn" part="control" aria-label="${label}">
1298
3204
  <svg class="theme-icon theme-icon-sun" width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
1299
3205
  <circle cx="12" cy="12" r="4" fill="none" stroke="currentColor" stroke-width="2"/>
1300
3206
  <path stroke="currentColor" stroke-width="2" d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
@@ -1303,7 +3209,24 @@ input:disabled {
1303
3209
  <path fill="currentColor" d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/>
1304
3210
  </svg>
1305
3211
  </button>
1306
- `,this.button=this.shadow.querySelector("button"),this.sunIcon=this.shadow.querySelector(".theme-icon-sun"),this.moonIcon=this.shadow.querySelector(".theme-icon-moon")}},z=()=>{c(O.tag,O)};var Pe=new Set(["app","marketing","backend","docs"]),yt=`
3212
+ `;
3213
+ this.button = this.shadow.querySelector("button");
3214
+ this.sunIcon = this.shadow.querySelector(".theme-icon-sun");
3215
+ this.moonIcon = this.shadow.querySelector(".theme-icon-moon");
3216
+ }
3217
+ };
3218
+ var registerVikingThemeToggleWc = () => {
3219
+ defineCustomElement(VikingThemeToggleWc.tag, VikingThemeToggleWc);
3220
+ };
3221
+
3222
+ // src/web/suite-header/viking-suite-header-wc.ts
3223
+ var VALID_CONTEXTS2 = /* @__PURE__ */ new Set([
3224
+ "app",
3225
+ "marketing",
3226
+ "backend",
3227
+ "docs"
3228
+ ]);
3229
+ var VIKING_SUITE_HEADER_STYLES = `
1307
3230
  :host {
1308
3231
  display: block;
1309
3232
  position: sticky;
@@ -1632,26 +3555,179 @@ viking-suite-command-palette {
1632
3555
  display: none;
1633
3556
  }
1634
3557
  }
1635
- `,xt=()=>{let t=document.documentElement.getAttribute("data-deml-context");if(t&&Pe.has(t))return t;let e=window.location.hostname;return e.startsWith("ui.")?"docs":e.startsWith("backend.")?"backend":e.includes("deml.app")?"app":"marketing"},wt=t=>{let e=t.getAttribute("context");return e&&Pe.has(e)?e:xt()},Et=t=>{let e=globalThis.__DEML??{};return{app:t.getAttribute("app-url")??e.app??A.app,marketing:t.getAttribute("marketing-url")??e.marketing??A.marketing,backend:t.getAttribute("backend-url")??e.backend??A.backend}},St=t=>{try{let e=new URL(t,window.location.origin);return e.origin===window.location.origin&&e.pathname===window.location.pathname}catch{return!1}},D=class extends l{static tag="viking-suite-header";static get observedAttributes(){return["context","app-url","marketing-url","backend-url","authenticated","user-name","user-email","sign-in-href","dashboard-href"]}shadow;menuOpen=!1;userMenuOpen=!1;paletteEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,yt)}connectedCallback(){z(),$(),this.render(),document.addEventListener("click",this.onDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick)}attributeChangedCallback(){this.isConnected&&this.render()}openSearch(){this.paletteEl?.openPalette(),this.dispatchEvent(new CustomEvent("viking-search-open",{bubbles:!0,composed:!0}))}onDocumentClick=e=>{e.composedPath().includes(this)||(this.menuOpen||this.userMenuOpen)&&(this.menuOpen=!1,this.userMenuOpen=!1,this.syncOpenState())};onSearchClick=()=>{this.openSearch()};onMenuClick=()=>{this.menuOpen=!this.menuOpen,this.syncOpenState()};onUserClick=()=>{this.userMenuOpen=!this.userMenuOpen,this.syncOpenState()};onSignInClick=e=>{let i=new CustomEvent("viking-sign-in",{bubbles:!0,cancelable:!0,composed:!0,detail:e});this.dispatchEvent(i),i.defaultPrevented&&e.preventDefault()};onSignOutClick=()=>{this.userMenuOpen=!1,this.menuOpen=!1,this.syncOpenState(),this.dispatchEvent(new CustomEvent("viking-sign-out",{bubbles:!0,composed:!0}))};syncOpenState(){let e=this.shadow.querySelector(".suite-header"),i=this.shadow.querySelector("[data-menu-toggle]"),r=this.shadow.querySelector(".suite-header__user"),n=this.shadow.querySelector("[data-user-toggle]");e?.setAttribute("data-menu-open",String(this.menuOpen)),i?.setAttribute("aria-expanded",String(this.menuOpen)),r?.setAttribute("data-open",String(this.userMenuOpen)),n?.setAttribute("aria-expanded",String(this.userMenuOpen))}renderNavLinks(e,i,r){return ze(J,r).map(n=>{let o=te(n,e,i),s=St(o)?' aria-current="page"':"";return`
1636
- <a class="suite-header__link" href="${a(o)}"${s}>
1637
- ${g(n.icon,16,"suite-header__link-icon")}
1638
- <span>${a(n.label)}</span>
3558
+ `;
3559
+ var detectContext2 = () => {
3560
+ const explicit = document.documentElement.getAttribute("data-deml-context");
3561
+ if (explicit && VALID_CONTEXTS2.has(explicit)) {
3562
+ return explicit;
3563
+ }
3564
+ const host = window.location.hostname;
3565
+ if (host.startsWith("ui.")) {
3566
+ return "docs";
3567
+ }
3568
+ if (host.startsWith("backend.")) {
3569
+ return "backend";
3570
+ }
3571
+ if (host.includes("deml.app")) {
3572
+ return "app";
3573
+ }
3574
+ return "marketing";
3575
+ };
3576
+ var readContext2 = (el) => {
3577
+ const raw = el.getAttribute("context");
3578
+ if (raw && VALID_CONTEXTS2.has(raw)) {
3579
+ return raw;
3580
+ }
3581
+ return detectContext2();
3582
+ };
3583
+ var readUrls2 = (el) => {
3584
+ const env = globalThis.__DEML ?? {};
3585
+ return {
3586
+ app: el.getAttribute("app-url") ?? env.app ?? DEFAULT_SITE_URLS.app,
3587
+ marketing: el.getAttribute("marketing-url") ?? env.marketing ?? DEFAULT_SITE_URLS.marketing,
3588
+ backend: el.getAttribute("backend-url") ?? env.backend ?? DEFAULT_SITE_URLS.backend
3589
+ };
3590
+ };
3591
+ var isCurrentHref = (href) => {
3592
+ try {
3593
+ const url = new URL(href, window.location.origin);
3594
+ return url.origin === window.location.origin && url.pathname === window.location.pathname;
3595
+ } catch {
3596
+ return false;
3597
+ }
3598
+ };
3599
+ var VikingSuiteHeaderWc = class extends HTMLElementBase {
3600
+ static tag = "viking-suite-header";
3601
+ static get observedAttributes() {
3602
+ return [
3603
+ "context",
3604
+ "app-url",
3605
+ "marketing-url",
3606
+ "backend-url",
3607
+ "authenticated",
3608
+ "user-name",
3609
+ "user-email",
3610
+ "sign-in-href",
3611
+ "dashboard-href"
3612
+ ];
3613
+ }
3614
+ shadow;
3615
+ menuOpen = false;
3616
+ userMenuOpen = false;
3617
+ paletteEl = null;
3618
+ constructor() {
3619
+ super();
3620
+ this.shadow = this.attachShadow({ mode: "open" });
3621
+ attachShadowStyles(this.shadow, VIKING_SUITE_HEADER_STYLES);
3622
+ }
3623
+ connectedCallback() {
3624
+ registerVikingThemeToggleWc();
3625
+ registerVikingSuiteSearchPaletteWc();
3626
+ this.render();
3627
+ document.addEventListener("click", this.onDocumentClick);
3628
+ }
3629
+ disconnectedCallback() {
3630
+ document.removeEventListener("click", this.onDocumentClick);
3631
+ }
3632
+ attributeChangedCallback() {
3633
+ if (this.isConnected) {
3634
+ this.render();
3635
+ }
3636
+ }
3637
+ openSearch() {
3638
+ this.paletteEl?.openPalette();
3639
+ this.dispatchEvent(
3640
+ new CustomEvent("viking-search-open", { bubbles: true, composed: true })
3641
+ );
3642
+ }
3643
+ onDocumentClick = (event) => {
3644
+ if (event.composedPath().includes(this)) {
3645
+ return;
3646
+ }
3647
+ if (this.menuOpen || this.userMenuOpen) {
3648
+ this.menuOpen = false;
3649
+ this.userMenuOpen = false;
3650
+ this.syncOpenState();
3651
+ }
3652
+ };
3653
+ onSearchClick = () => {
3654
+ this.openSearch();
3655
+ };
3656
+ onMenuClick = () => {
3657
+ this.menuOpen = !this.menuOpen;
3658
+ this.syncOpenState();
3659
+ };
3660
+ onUserClick = () => {
3661
+ this.userMenuOpen = !this.userMenuOpen;
3662
+ this.syncOpenState();
3663
+ };
3664
+ onSignInClick = (event) => {
3665
+ const signInEvent = new CustomEvent("viking-sign-in", {
3666
+ bubbles: true,
3667
+ cancelable: true,
3668
+ composed: true,
3669
+ detail: event
3670
+ });
3671
+ this.dispatchEvent(signInEvent);
3672
+ if (signInEvent.defaultPrevented) {
3673
+ event.preventDefault();
3674
+ }
3675
+ };
3676
+ onSignOutClick = () => {
3677
+ this.userMenuOpen = false;
3678
+ this.menuOpen = false;
3679
+ this.syncOpenState();
3680
+ this.dispatchEvent(
3681
+ new CustomEvent("viking-sign-out", { bubbles: true, composed: true })
3682
+ );
3683
+ };
3684
+ syncOpenState() {
3685
+ const header = this.shadow.querySelector(".suite-header");
3686
+ const menuButton = this.shadow.querySelector("[data-menu-toggle]");
3687
+ const user = this.shadow.querySelector(".suite-header__user");
3688
+ const userButton = this.shadow.querySelector("[data-user-toggle]");
3689
+ header?.setAttribute("data-menu-open", String(this.menuOpen));
3690
+ menuButton?.setAttribute("aria-expanded", String(this.menuOpen));
3691
+ user?.setAttribute("data-open", String(this.userMenuOpen));
3692
+ userButton?.setAttribute("aria-expanded", String(this.userMenuOpen));
3693
+ }
3694
+ renderNavLinks(context, urls, authenticated) {
3695
+ return visibleNavLinks(SITE_NAV_LINKS, authenticated).map((link) => {
3696
+ const href = resolveNavHref(link, context, urls);
3697
+ const current = isCurrentHref(href) ? ' aria-current="page"' : "";
3698
+ return `
3699
+ <a class="suite-header__link" href="${escapeHtml(href)}"${current}>
3700
+ ${renderInlineIcon(link.icon, 16, "suite-header__link-icon")}
3701
+ <span>${escapeHtml(link.label)}</span>
1639
3702
  </a>
1640
- `}).join("")}renderAuth(e,i,r=!1){if(!i){let s=this.getAttribute("sign-in-href")??`${e.app}/login`;return`
1641
- <a class="suite-header__auth-link" href="${a(s)}" data-sign-in>
3703
+ `;
3704
+ }).join("");
3705
+ }
3706
+ renderAuth(urls, authenticated, mobile = false) {
3707
+ if (!authenticated) {
3708
+ const signInHref = this.getAttribute("sign-in-href") ?? `${urls.app}/login`;
3709
+ return `
3710
+ <a class="suite-header__auth-link" href="${escapeHtml(signInHref)}" data-sign-in>
1642
3711
  <span>Sign In</span>
1643
- ${g("arrow-right",16,"suite-header__auth-icon")}
3712
+ ${renderInlineIcon("arrow-right", 16, "suite-header__auth-icon")}
1644
3713
  </a>
1645
- `}if(r)return`
1646
- <a class="suite-header__menu-link" href="${a(this.getDashboardHref(e))}">
1647
- ${g("home",16,"suite-header__menu-icon")}
3714
+ `;
3715
+ }
3716
+ if (mobile) {
3717
+ return `
3718
+ <a class="suite-header__menu-link" href="${escapeHtml(this.getDashboardHref(urls))}">
3719
+ ${renderInlineIcon("home", 16, "suite-header__menu-icon")}
1648
3720
  <span>Dashboard</span>
1649
3721
  </a>
1650
3722
  <button class="suite-header__menu-button" type="button" data-sign-out>
1651
- ${g("log-out",16,"suite-header__menu-icon")}
3723
+ ${renderInlineIcon("log-out", 16, "suite-header__menu-icon")}
1652
3724
  <span>Sign Out</span>
1653
3725
  </button>
1654
- `;let n=this.getAttribute("user-name")??"Account",o=this.getAttribute("user-email")??"";return`
3726
+ `;
3727
+ }
3728
+ const userName = this.getAttribute("user-name") ?? "Account";
3729
+ const userEmail = this.getAttribute("user-email") ?? "";
3730
+ return `
1655
3731
  <div class="suite-header__user" data-open="${String(this.userMenuOpen)}">
1656
3732
  <button
1657
3733
  class="suite-header__user-trigger"
@@ -1661,51 +3737,67 @@ viking-suite-command-palette {
1661
3737
  data-user-toggle
1662
3738
  >
1663
3739
  <span class="suite-header__avatar" aria-hidden="true">
1664
- ${g("user",16,"suite-header__avatar-icon")}
3740
+ ${renderInlineIcon("user", 16, "suite-header__avatar-icon")}
1665
3741
  </span>
1666
- <span class="suite-header__user-text">${a(n)}</span>
1667
- ${g("chevron-down",16,"suite-header__chevron")}
3742
+ <span class="suite-header__user-text">${escapeHtml(userName)}</span>
3743
+ ${renderInlineIcon("chevron-down", 16, "suite-header__chevron")}
1668
3744
  </button>
1669
3745
  <div class="suite-header__menu" role="menu">
1670
3746
  <div class="suite-header__menu-label">
1671
- <strong>${a(n)}</strong>
1672
- ${o?`<span>${a(o)}</span>`:""}
3747
+ <strong>${escapeHtml(userName)}</strong>
3748
+ ${userEmail ? `<span>${escapeHtml(userEmail)}</span>` : ""}
1673
3749
  </div>
1674
- <a class="suite-header__menu-link" role="menuitem" href="${a(this.getDashboardHref(e))}">
1675
- ${g("home",16,"suite-header__menu-icon")}
3750
+ <a class="suite-header__menu-link" role="menuitem" href="${escapeHtml(
3751
+ this.getDashboardHref(urls)
3752
+ )}">
3753
+ ${renderInlineIcon("home", 16, "suite-header__menu-icon")}
1676
3754
  <span>Dashboard</span>
1677
3755
  </a>
1678
3756
  <button class="suite-header__menu-button" type="button" role="menuitem" data-sign-out>
1679
- ${g("log-out",16,"suite-header__menu-icon")}
3757
+ ${renderInlineIcon("log-out", 16, "suite-header__menu-icon")}
1680
3758
  <span>Sign Out</span>
1681
3759
  </button>
1682
3760
  </div>
1683
3761
  </div>
1684
- `}getDashboardHref(e){return this.getAttribute("dashboard-href")??`${e.app}/dashboard`}render(){let e=wt(this),i=Et(this),r=h(this,"authenticated"),n=this.renderNavLinks(e,i,r),o=Oe(e,i),s=`${q()}K`;this.shadow.innerHTML=`
3762
+ `;
3763
+ }
3764
+ getDashboardHref(urls) {
3765
+ return this.getAttribute("dashboard-href") ?? `${urls.app}/dashboard`;
3766
+ }
3767
+ render() {
3768
+ const context = readContext2(this);
3769
+ const urls = readUrls2(this);
3770
+ const authenticated = readBoolAttr(this, "authenticated");
3771
+ const navLinks = this.renderNavLinks(context, urls, authenticated);
3772
+ const brandHref = resolveBrandHref(context, urls);
3773
+ const shortcut = `${modKeyLabel()}K`;
3774
+ this.shadow.innerHTML = `
1685
3775
  <header class="suite-header" data-menu-open="${String(this.menuOpen)}">
1686
3776
  <div class="suite-header__bar">
1687
- <a class="suite-header__brand" href="${a(o)}" aria-label="Data Engineering for Machine Learning home">
3777
+ <a class="suite-header__brand" href="${escapeHtml(
3778
+ brandHref
3779
+ )}" aria-label="Data Engineering for Machine Learning home">
1688
3780
  <span class="suite-header__mark" aria-hidden="true">
1689
- ${g("drakkar",28,"suite-header__brand-icon")}
3781
+ ${renderInlineIcon("drakkar", 28, "suite-header__brand-icon")}
1690
3782
  </span>
1691
3783
  <span class="suite-header__lockup">DEML</span>
1692
3784
  </a>
1693
3785
 
1694
3786
  <nav class="suite-header__nav" aria-label="Main navigation">
1695
- ${n}
3787
+ ${navLinks}
1696
3788
  </nav>
1697
3789
 
1698
3790
  <div class="suite-header__actions">
1699
3791
  <button
1700
3792
  class="suite-header__icon-button"
1701
3793
  type="button"
1702
- aria-label="Open command palette (${s})"
1703
- title="Open command palette (${s})"
3794
+ aria-label="Open command palette (${shortcut})"
3795
+ title="Open command palette (${shortcut})"
1704
3796
  data-search-trigger
1705
3797
  >
1706
- ${g("search",18,"suite-header__action-icon")}
3798
+ ${renderInlineIcon("search", 18, "suite-header__action-icon")}
1707
3799
  </button>
1708
- ${this.renderAuth(i,r)}
3800
+ ${this.renderAuth(urls, authenticated)}
1709
3801
  <viking-theme-toggle-wc></viking-theme-toggle-wc>
1710
3802
  <button
1711
3803
  class="suite-header__menu-button"
@@ -1714,37 +3806,246 @@ viking-suite-command-palette {
1714
3806
  aria-expanded="${String(this.menuOpen)}"
1715
3807
  data-menu-toggle
1716
3808
  >
1717
- ${g(this.menuOpen?"x":"menu",18,"suite-header__action-icon")}
3809
+ ${renderInlineIcon(this.menuOpen ? "x" : "menu", 18, "suite-header__action-icon")}
1718
3810
  </button>
1719
3811
  </div>
1720
3812
  </div>
1721
3813
 
1722
3814
  <nav class="suite-header__mobile" aria-label="Mobile navigation">
1723
- ${n}
1724
- ${this.renderAuth(i,r,!0)}
3815
+ ${navLinks}
3816
+ ${this.renderAuth(urls, authenticated, true)}
1725
3817
  </nav>
1726
3818
  </header>
1727
3819
  <viking-suite-command-palette
1728
- context="${e}"
1729
- app-url="${a(i.app)}"
1730
- marketing-url="${a(i.marketing)}"
1731
- backend-url="${a(i.backend)}"
3820
+ context="${context}"
3821
+ app-url="${escapeHtml(urls.app)}"
3822
+ marketing-url="${escapeHtml(urls.marketing)}"
3823
+ backend-url="${escapeHtml(urls.backend)}"
1732
3824
  global-shortcut
1733
3825
  ></viking-suite-command-palette>
1734
- `,this.paletteEl=this.shadow.querySelector("viking-suite-command-palette"),this.shadow.querySelector("[data-search-trigger]")?.addEventListener("click",this.onSearchClick),this.shadow.querySelector("[data-menu-toggle]")?.addEventListener("click",this.onMenuClick),this.shadow.querySelector("[data-user-toggle]")?.addEventListener("click",this.onUserClick),this.shadow.querySelectorAll("[data-sign-in]").forEach(u=>u.addEventListener("click",this.onSignInClick)),this.shadow.querySelectorAll("[data-sign-out]").forEach(u=>u.addEventListener("click",this.onSignOutClick))}},ie=()=>{c(D.tag,D)};var C=class extends l{static formAssociated=!0;static tag="viking-select";static legacyTag="viking-select-wc";static get observedAttributes(){return["label","name","value","placeholder","description","error","width","disabled","required"]}shadow;internals;selectEl=null;optionObserver=null;controlId=x("viking-select");constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.internals=B(this),v(this.shadow,Ae)}connectedCallback(){this.render(),this.syncOptions(),this.observeOptions(),this.selectEl?.addEventListener("change",this.onChange)}disconnectedCallback(){this.selectEl?.removeEventListener("change",this.onChange),this.optionObserver?.disconnect(),this.optionObserver=null}attributeChangedCallback(e){if(this.isConnected){if(e==="value"&&this.selectEl){this.selectEl.value=this.getAttribute("value")??"",this.syncFormValue();return}if(e==="error"||e==="description"||e==="label"){this.render(),this.syncOptions();return}this.render(),this.syncOptions()}}get value(){return this.selectEl?.value??this.getAttribute("value")??""}set value(e){this.setAttribute("value",e),this.selectEl&&(this.selectEl.value=e),this.syncFormValue()}onChange=()=>{let e=this.selectEl?.value??"";this.setAttribute("value",e),this.syncFormValue(),this.dispatchEvent(new CustomEvent("viking-change",{bubbles:!0,composed:!0,detail:{value:e}}))};syncFormValue(){K(this.internals,this.value)}observeOptions(){this.optionObserver?.disconnect(),this.optionObserver=new MutationObserver(()=>this.syncOptions()),this.optionObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}render(){let e=this.getAttribute("label")??"",i=this.getAttribute("name")??"",r=this.hasAttribute("disabled"),n=this.hasAttribute("required"),o=this.getAttribute("error")??"",s=this.getAttribute("description")??"",u=[s&&`${this.controlId}-desc`,o&&`${this.controlId}-error`].filter(Boolean).join(" ");this.shadow.innerHTML=`
3826
+ `;
3827
+ this.paletteEl = this.shadow.querySelector("viking-suite-command-palette");
3828
+ this.shadow.querySelector("[data-search-trigger]")?.addEventListener("click", this.onSearchClick);
3829
+ this.shadow.querySelector("[data-menu-toggle]")?.addEventListener("click", this.onMenuClick);
3830
+ this.shadow.querySelector("[data-user-toggle]")?.addEventListener("click", this.onUserClick);
3831
+ this.shadow.querySelectorAll("[data-sign-in]").forEach(
3832
+ (control) => control.addEventListener("click", this.onSignInClick)
3833
+ );
3834
+ this.shadow.querySelectorAll("[data-sign-out]").forEach(
3835
+ (control) => control.addEventListener("click", this.onSignOutClick)
3836
+ );
3837
+ }
3838
+ };
3839
+ var registerVikingSuiteHeaderWc = () => {
3840
+ defineCustomElement(VikingSuiteHeaderWc.tag, VikingSuiteHeaderWc);
3841
+ };
3842
+
3843
+ // src/web/select/viking-select-wc.ts
3844
+ var VikingSelectWc = class extends HTMLElementBase {
3845
+ static formAssociated = true;
3846
+ static tag = "viking-select";
3847
+ static legacyTag = "viking-select-wc";
3848
+ static get observedAttributes() {
3849
+ return [
3850
+ "label",
3851
+ "name",
3852
+ "value",
3853
+ "placeholder",
3854
+ "description",
3855
+ "error",
3856
+ "width",
3857
+ "disabled",
3858
+ "required"
3859
+ ];
3860
+ }
3861
+ shadow;
3862
+ internals;
3863
+ selectEl = null;
3864
+ optionObserver = null;
3865
+ controlId = vikingWcUid("viking-select");
3866
+ constructor() {
3867
+ super();
3868
+ this.shadow = this.attachShadow({ mode: "open" });
3869
+ this.internals = attachElementInternals(this);
3870
+ attachShadowStyles(this.shadow, VIKING_SELECT_STYLES);
3871
+ }
3872
+ connectedCallback() {
3873
+ this.render();
3874
+ this.syncOptions();
3875
+ this.observeOptions();
3876
+ this.selectEl?.addEventListener("change", this.onChange);
3877
+ }
3878
+ disconnectedCallback() {
3879
+ this.selectEl?.removeEventListener("change", this.onChange);
3880
+ this.optionObserver?.disconnect();
3881
+ this.optionObserver = null;
3882
+ }
3883
+ attributeChangedCallback(name) {
3884
+ if (!this.isConnected) {
3885
+ return;
3886
+ }
3887
+ if (name === "value" && this.selectEl) {
3888
+ this.selectEl.value = this.getAttribute("value") ?? "";
3889
+ this.syncFormValue();
3890
+ return;
3891
+ }
3892
+ if (name === "error" || name === "description" || name === "label") {
3893
+ this.render();
3894
+ this.syncOptions();
3895
+ return;
3896
+ }
3897
+ this.render();
3898
+ this.syncOptions();
3899
+ }
3900
+ get value() {
3901
+ return this.selectEl?.value ?? this.getAttribute("value") ?? "";
3902
+ }
3903
+ set value(next) {
3904
+ this.setAttribute("value", next);
3905
+ if (this.selectEl) {
3906
+ this.selectEl.value = next;
3907
+ }
3908
+ this.syncFormValue();
3909
+ }
3910
+ onChange = () => {
3911
+ const value = this.selectEl?.value ?? "";
3912
+ this.setAttribute("value", value);
3913
+ this.syncFormValue();
3914
+ this.dispatchEvent(
3915
+ new CustomEvent("viking-change", {
3916
+ bubbles: true,
3917
+ composed: true,
3918
+ detail: { value }
3919
+ })
3920
+ );
3921
+ };
3922
+ syncFormValue() {
3923
+ setFormValue(this.internals, this.value);
3924
+ }
3925
+ observeOptions() {
3926
+ this.optionObserver?.disconnect();
3927
+ this.optionObserver = new MutationObserver(() => this.syncOptions());
3928
+ this.optionObserver.observe(this, {
3929
+ childList: true,
3930
+ subtree: true,
3931
+ characterData: true
3932
+ });
3933
+ }
3934
+ render() {
3935
+ const label = this.getAttribute("label") ?? "";
3936
+ const name = this.getAttribute("name") ?? "";
3937
+ const disabled = this.hasAttribute("disabled");
3938
+ const required = this.hasAttribute("required");
3939
+ const error = this.getAttribute("error") ?? "";
3940
+ const description = this.getAttribute("description") ?? "";
3941
+ const describedBy = [
3942
+ description && `${this.controlId}-desc`,
3943
+ error && `${this.controlId}-error`
3944
+ ].filter(Boolean).join(" ");
3945
+ this.shadow.innerHTML = `
1735
3946
  <div class="viking-field" part="field">
1736
- ${e?`<label class="viking-field-label" part="label" for="${this.controlId}">${a(e)}</label>`:""}
3947
+ ${label ? `<label class="viking-field-label" part="label" for="${this.controlId}">${escapeHtml(label)}</label>` : ""}
1737
3948
  <select
1738
3949
  id="${this.controlId}"
1739
3950
  class="viking-select-native"
1740
3951
  part="control"
1741
- ${i?`name="${a(i)}"`:""}
1742
- ${r?"disabled":""}
1743
- ${n?"required":""}
1744
- ${o?'aria-invalid="true"':""}
1745
- ${u?`aria-describedby="${u}"`:""}
3952
+ ${name ? `name="${escapeHtml(name)}"` : ""}
3953
+ ${disabled ? "disabled" : ""}
3954
+ ${required ? "required" : ""}
3955
+ ${error ? 'aria-invalid="true"' : ""}
3956
+ ${describedBy ? `aria-describedby="${describedBy}"` : ""}
1746
3957
  ></select>
1747
- ${s?`<p id="${this.controlId}-desc" class="viking-field-description" part="description">${a(s)}</p>`:""}
1748
- ${o?`<p id="${this.controlId}-error" class="viking-field-error" part="error" role="alert">${a(o)}</p>`:""}
3958
+ ${description ? `<p id="${this.controlId}-desc" class="viking-field-description" part="description">${escapeHtml(description)}</p>` : ""}
3959
+ ${error ? `<p id="${this.controlId}-error" class="viking-field-error" part="error" role="alert">${escapeHtml(error)}</p>` : ""}
1749
3960
  </div>
1750
- `,this.selectEl=this.shadow.querySelector("select");let p=this.getAttribute("value");this.selectEl&&p&&(this.selectEl.value=p),this.syncFormValue()}syncOptions(){if(!this.selectEl)return;let e=this.selectEl.value;this.selectEl.innerHTML="";let i=this.querySelectorAll("option");if(i.length===0){let n=this.getAttribute("placeholder")??"Select\u2026",o=document.createElement("option");o.value="",o.textContent=n,o.disabled=!0,o.selected=!this.getAttribute("value"),this.selectEl.append(o);return}i.forEach(n=>{this.selectEl?.append(n.cloneNode(!0))});let r=this.getAttribute("value");r?this.selectEl.value=r:e&&(this.selectEl.value=e),this.syncFormValue()}},re=()=>{c(C.tag,C),d(C.legacyTag,C)};var he=()=>{F(),X(),Z(),U(),j(),Y(),re(),Q(),H(),ie(),$(),z()};typeof globalThis<"u"&&typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",he):he());return Fe(It);})();
3961
+ `;
3962
+ this.selectEl = this.shadow.querySelector("select");
3963
+ const value = this.getAttribute("value");
3964
+ if (this.selectEl && value) {
3965
+ this.selectEl.value = value;
3966
+ }
3967
+ this.syncFormValue();
3968
+ }
3969
+ syncOptions() {
3970
+ if (!this.selectEl) {
3971
+ return;
3972
+ }
3973
+ const currentValue = this.selectEl.value;
3974
+ this.selectEl.innerHTML = "";
3975
+ const options = this.querySelectorAll("option");
3976
+ if (options.length === 0) {
3977
+ const placeholder = this.getAttribute("placeholder") ?? "Select\u2026";
3978
+ const opt = document.createElement("option");
3979
+ opt.value = "";
3980
+ opt.textContent = placeholder;
3981
+ opt.disabled = true;
3982
+ opt.selected = !this.getAttribute("value");
3983
+ this.selectEl.append(opt);
3984
+ return;
3985
+ }
3986
+ options.forEach((opt) => {
3987
+ this.selectEl?.append(opt.cloneNode(true));
3988
+ });
3989
+ const value = this.getAttribute("value");
3990
+ if (value) {
3991
+ this.selectEl.value = value;
3992
+ } else if (currentValue) {
3993
+ this.selectEl.value = currentValue;
3994
+ }
3995
+ this.syncFormValue();
3996
+ }
3997
+ };
3998
+ var registerVikingSelectWc = () => {
3999
+ defineCustomElement(VikingSelectWc.tag, VikingSelectWc);
4000
+ defineCustomElementAlias(VikingSelectWc.legacyTag, VikingSelectWc);
4001
+ };
4002
+
4003
+ // src/web/index.ts
4004
+ var registerVikingElements = () => {
4005
+ registerVikingButtonWc();
4006
+ registerVikingFieldWc();
4007
+ registerVikingInputWc();
4008
+ registerVikingBadgeWc();
4009
+ registerVikingCalloutWc();
4010
+ registerVikingCardWc();
4011
+ registerVikingSelectWc();
4012
+ registerVikingModalWc();
4013
+ registerVikingSearchPaletteWc();
4014
+ registerVikingSuiteHeaderWc();
4015
+ registerVikingSuiteSearchPaletteWc();
4016
+ registerVikingThemeToggleWc();
4017
+ };
4018
+ if (typeof globalThis !== "undefined" && typeof document !== "undefined") {
4019
+ if (document.readyState === "loading") {
4020
+ document.addEventListener("DOMContentLoaded", registerVikingElements);
4021
+ } else {
4022
+ registerVikingElements();
4023
+ }
4024
+ }
4025
+ export {
4026
+ VikingBadgeWc,
4027
+ VikingButtonWc,
4028
+ VikingCalloutWc,
4029
+ VikingCardWc,
4030
+ VikingFieldWc,
4031
+ VikingInputWc,
4032
+ VikingModalWc,
4033
+ VikingSearchPaletteWc,
4034
+ VikingSelectWc,
4035
+ VikingSuiteHeaderWc,
4036
+ VikingSuiteSearchPaletteWc,
4037
+ VikingThemeToggleWc,
4038
+ registerVikingBadgeWc,
4039
+ registerVikingButtonWc,
4040
+ registerVikingCalloutWc,
4041
+ registerVikingCardWc,
4042
+ registerVikingElements,
4043
+ registerVikingFieldWc,
4044
+ registerVikingInputWc,
4045
+ registerVikingModalWc,
4046
+ registerVikingSearchPaletteWc,
4047
+ registerVikingSelectWc,
4048
+ registerVikingSuiteHeaderWc,
4049
+ registerVikingSuiteSearchPaletteWc,
4050
+ registerVikingThemeToggleWc
4051
+ };