@knime/kds-components 11.4.0 → 11.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as kdsPopoverRole, c as kdsPopoverTypes, i as kdsPopoverPlacements, l as _plugin_vue_export_helper_default, o as kdsPopoverRoles, r as kdsPopoverPlacement, s as kdsPopoverType, t as KdsPopover_default, u as __exportAll$1 } from "./KdsPopover-DBU9xVEK.js";
2
- import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-XR1PupNA.js";
1
+ import { a as kdsPopoverRole, c as kdsPopoverTypes, i as kdsPopoverPlacements, l as _plugin_vue_export_helper_default, o as kdsPopoverRoles, r as kdsPopoverPlacement, s as kdsPopoverType, t as KdsPopover_default, u as __exportAll$1 } from "./KdsPopover-Bqel9iqk.js";
2
+ import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-CJrxt0gq.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createSlots, createTextVNode, createVNode, defineAsyncComponent, defineComponent, effectScope, getCurrentInstance, guardReactiveProps, h, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onScopeDispose, onUnmounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toRefs, unref, useAttrs, useCssVars, useId, useModel, useSlots, useTemplateRef, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
4
4
  import { onClickOutside, useElementSize, useEventListener, useLocalStorage, useMousePressed, useMutationObserver, usePreferredDark, useRafFn, useResizeObserver, useTemplateRefsList, useVirtualList } from "@vueuse/core";
5
5
  import './index.css';//#region src/components/accessories/Avatar/enums.ts
@@ -2463,6 +2463,62 @@ var color$1 = {
2463
2463
  }
2464
2464
  }
2465
2465
  },
2466
+ ai: { gradient: {
2467
+ start: {
2468
+ light: {
2469
+ h: 185.8,
2470
+ s: 49.2,
2471
+ l: 87.6,
2472
+ a: 1
2473
+ },
2474
+ dark: {
2475
+ h: 185.8,
2476
+ s: 49.2,
2477
+ l: 87.6,
2478
+ a: 1
2479
+ },
2480
+ css: {
2481
+ value: "hsl(185.8, 49.2%, 87.6%)",
2482
+ variable: "var(--kds-color-ai-gradient-start)"
2483
+ }
2484
+ },
2485
+ middle: {
2486
+ light: {
2487
+ h: 50.8,
2488
+ s: 100,
2489
+ l: 50,
2490
+ a: 1
2491
+ },
2492
+ dark: {
2493
+ h: 50.8,
2494
+ s: 100,
2495
+ l: 50,
2496
+ a: 1
2497
+ },
2498
+ css: {
2499
+ value: "hsl(50.8, 100%, 50%)",
2500
+ variable: "var(--kds-color-ai-gradient-middle)"
2501
+ }
2502
+ },
2503
+ end: {
2504
+ light: {
2505
+ h: 193.1,
2506
+ s: 60.2,
2507
+ l: 43.3,
2508
+ a: 1
2509
+ },
2510
+ dark: {
2511
+ h: 193.1,
2512
+ s: 60.2,
2513
+ l: 43.3,
2514
+ a: 1
2515
+ },
2516
+ css: {
2517
+ value: "hsl(193.1, 60.2%, 43.3%)",
2518
+ variable: "var(--kds-color-ai-gradient-end)"
2519
+ }
2520
+ }
2521
+ } },
2466
2522
  blanket: { default: {
2467
2523
  light: {
2468
2524
  h: 0,
@@ -7111,8 +7167,8 @@ function prettyBytes(number, options) {
7111
7167
  return applyFixedWidth(result, options.fixedWidth);
7112
7168
  }
7113
7169
  //#endregion
7114
- //#region ../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs
7115
- /*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */
7170
+ //#region ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
7171
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
7116
7172
  function _OverloadYield(e, d) {
7117
7173
  this.v = e, this.k = d;
7118
7174
  }
@@ -7236,9 +7292,12 @@ Array.prototype.indexOf;
7236
7292
  var arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
7237
7293
  var arrayPop = unapply(Array.prototype.pop);
7238
7294
  var arrayPush = unapply(Array.prototype.push);
7239
- Array.prototype.slice;
7295
+ var arraySlice = unapply(Array.prototype.slice);
7240
7296
  var arraySplice = unapply(Array.prototype.splice);
7241
7297
  var arrayIsArray = Array.isArray;
7298
+ var setCreate = unconstruct(Set);
7299
+ var setAdd = unapply(Set.prototype.add);
7300
+ var setHas = unapply(Set.prototype.has);
7242
7301
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
7243
7302
  var stringToString = unapply(String.prototype.toString);
7244
7303
  var stringMatch = unapply(String.prototype.match);
@@ -7381,6 +7440,25 @@ function lookupGetter(object, prop) {
7381
7440
  }
7382
7441
  return fallbackValue;
7383
7442
  }
7443
+ /**
7444
+ * Like lookupGetter, but for accessor properties only, and returns null
7445
+ * instead of a null-returning fallback when no getter exists on the chain.
7446
+ * Lets a caller fall back to a direct property read in environments that
7447
+ * lack the getter, where a fallback returning null would be indistinguishable
7448
+ * from a legitimate null value (e.g. namespaceURI of a no-namespace element).
7449
+ *
7450
+ * @param object - The object (usually a prototype) to start the lookup at.
7451
+ * @param prop - The accessor property name.
7452
+ * @returns The unapplied getter, or null if none was found.
7453
+ */
7454
+ function lookupAccessor(object, prop) {
7455
+ while (object !== null) {
7456
+ const desc = getOwnPropertyDescriptor(object, prop);
7457
+ if (desc) return desc.get ? unapply(desc.get) : null;
7458
+ object = getPrototypeOf(object);
7459
+ }
7460
+ return null;
7461
+ }
7384
7462
  function isRegex(value) {
7385
7463
  try {
7386
7464
  regExpTest(value, "");
@@ -8065,7 +8143,7 @@ var NODE_TYPE = {
8065
8143
  documentFragment: 11,
8066
8144
  notation: 12
8067
8145
  };
8068
- var LITERAL_TEXT_ELEMENT_NAMES = [
8146
+ var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [
8069
8147
  "style",
8070
8148
  "script",
8071
8149
  "xmp",
@@ -8074,15 +8152,7 @@ var LITERAL_TEXT_ELEMENT_NAMES = [
8074
8152
  "noframes",
8075
8153
  "plaintext",
8076
8154
  "noscript"
8077
- ];
8078
- var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
8079
- var LITERAL_TEXT_CLOSE = function() {
8080
- const map = {};
8081
- arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
8082
- map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
8083
- });
8084
- return freeze(map);
8085
- }();
8155
+ ]));
8086
8156
  var getGlobal = function getGlobal() {
8087
8157
  return typeof window === "undefined" ? null : window;
8088
8158
  };
@@ -8160,7 +8230,7 @@ var _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback)
8160
8230
  function createDOMPurify() {
8161
8231
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
8162
8232
  const DOMPurify = (root) => createDOMPurify(root);
8163
- DOMPurify.version = "3.4.16";
8233
+ DOMPurify.version = "3.4.17";
8164
8234
  DOMPurify.removed = [];
8165
8235
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
8166
8236
  DOMPurify.isSupported = false;
@@ -8192,6 +8262,10 @@ function createDOMPurify() {
8192
8262
  const _readNodeName = function _readNodeName(node) {
8193
8263
  return getNodeName ? getNodeName(node) : node.nodeName;
8194
8264
  };
8265
+ const getNamespaceURI = lookupAccessor(ElementPrototype, "namespaceURI");
8266
+ const _readNamespaceURI = function _readNamespaceURI(element) {
8267
+ return getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;
8268
+ };
8195
8269
  if (typeof HTMLTemplateElement === "function") {
8196
8270
  const template = document.createElement("template");
8197
8271
  if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
@@ -8312,6 +8386,7 @@ function createDOMPurify() {
8312
8386
  const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
8313
8387
  let KEEP_CONTENT = true;
8314
8388
  let IN_PLACE = false;
8389
+ let IN_PLACE_VISITED = null;
8315
8390
  let USE_PROFILES = {};
8316
8391
  let FORBID_CONTENTS = null;
8317
8392
  const DEFAULT_FORBID_CONTENTS = addToSet({}, [
@@ -8585,18 +8660,23 @@ function createDOMPurify() {
8585
8660
  * return. Return true otherwise.
8586
8661
  */
8587
8662
  const _checkValidNamespace = function _checkValidNamespace(element) {
8588
- let parent = getParentNode(element);
8589
- if (!parent || !parent.tagName) parent = {
8590
- namespaceURI: NAMESPACE,
8591
- tagName: "template"
8592
- };
8593
- const tagName = stringToLowerCase(element.tagName);
8594
- const parentTagName = stringToLowerCase(parent.tagName);
8595
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
8596
- if (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
8597
- if (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
8598
- if (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
8599
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
8663
+ const elementNamespace = _readNamespaceURI(element);
8664
+ const tagName = stringToLowerCase(_readNodeName(element));
8665
+ const parentNode = getParentNode(element);
8666
+ let parent;
8667
+ let parentTagName;
8668
+ if (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {
8669
+ parent = { namespaceURI: _readNamespaceURI(parentNode) };
8670
+ parentTagName = stringToLowerCase(_readNodeName(parentNode));
8671
+ } else {
8672
+ parent = { namespaceURI: NAMESPACE };
8673
+ parentTagName = "template";
8674
+ }
8675
+ if (!ALLOWED_NAMESPACES[elementNamespace]) return false;
8676
+ if (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
8677
+ if (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
8678
+ if (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
8679
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[elementNamespace]) return true;
8600
8680
  return false;
8601
8681
  };
8602
8682
  /**
@@ -8640,36 +8720,21 @@ function createDOMPurify() {
8640
8720
  }
8641
8721
  };
8642
8722
  /**
8643
- * _neutralizeRoot
8644
- *
8645
- * Fail-closed teardown of an in-place root after the sanitize walk aborts
8646
- * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
8647
- * custom element's reaction detaches a node so `_forceRemove`'s deliberate
8648
- * parentless guard throws, or any other re-entrant engine mutation — would
8649
- * otherwise leave the caller's *live* tree half-sanitized, with everything
8650
- * after the abort point still carrying its handlers. There is no safe way
8651
- * to resume the walk (the tree mutated under us), so we strip the root bare:
8652
- * remove every child and every attribute, then let the caller's catch see
8653
- * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
8654
- * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
8723
+ * Fail-closed teardown of an in-place root: strip every disallowed attribute
8724
+ * in the subtree first, so nothing armed is left behind, then remove all
8725
+ * children and the root's own attributes.
8655
8726
  *
8656
8727
  * @param root the in-place root to empty
8657
8728
  */
8658
8729
  const _neutralizeRoot = function _neutralizeRoot(root) {
8659
8730
  _neutralizeSubtree(root);
8660
8731
  const childNodes = getChildNodes(root);
8661
- if (childNodes) {
8662
- const snapshot = [];
8663
- arrayForEach(childNodes, (child) => {
8664
- arrayPush(snapshot, child);
8665
- });
8666
- arrayForEach(snapshot, (child) => {
8667
- try {
8668
- remove(child);
8669
- } catch (_) {}
8670
- });
8671
- }
8672
- const attributes = getAttributes(root);
8732
+ if (childNodes) arrayForEach(arraySlice(childNodes), (child) => {
8733
+ try {
8734
+ remove(child);
8735
+ } catch (_) {}
8736
+ });
8737
+ const attributes = _readNodeType(root) === NODE_TYPE.element ? getAttributes(root) : null;
8673
8738
  if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
8674
8739
  const attribute = attributes[i];
8675
8740
  const name = attribute && attribute.name;
@@ -8677,18 +8742,9 @@ function createDOMPurify() {
8677
8742
  }
8678
8743
  };
8679
8744
  /**
8680
- * _removeAttribute
8681
- *
8682
- * Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their
8683
- * lookup key for HTML elements in an HTML document, so they silently miss an
8684
- * attribute whose stored qualified name still contains uppercase ASCII
8685
- * letters. That happens when the node came from a case-preserving source
8686
- * (an XML/XHTML document imported via importNode(), or createAttributeNS()),
8687
- * where e.g. `ONERROR` survives the walk: the policy check lowercases to
8688
- * `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up
8689
- * `onerror` and finds nothing. Remove the exact Attr node instead, which is
8690
- * case- and namespace-exact, and fall back to name-based removal only when
8691
- * the caller could not supply the node.
8745
+ * Removes an attribute, preferably as its exact Attr node: name-based
8746
+ * removal lowercases the name in HTML documents and misses case-preserved
8747
+ * names, e.g. from imported XHTML.
8692
8748
  *
8693
8749
  * @param name an Attribute name
8694
8750
  * @param element a DOM node
@@ -8720,12 +8776,8 @@ function createDOMPurify() {
8720
8776
  } catch (_) {}
8721
8777
  };
8722
8778
  /**
8723
- * _stripDisallowedAttributes
8724
- *
8725
- * Removes every attribute the active configuration does not allow from a
8726
- * single element, using the same allowlist as the main attribute pass (so
8727
- * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
8728
- * neutralise nodes that are being discarded from an in-place tree.
8779
+ * Removes every attribute the configuration does not allow. Used to
8780
+ * neutralize nodes discarded from an in-place tree.
8729
8781
  *
8730
8782
  * @param element the element to strip
8731
8783
  */
@@ -8740,77 +8792,158 @@ function createDOMPurify() {
8740
8792
  }
8741
8793
  };
8742
8794
  /**
8743
- * _neutralizeSubtree
8744
- *
8745
- * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
8746
- * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
8747
- * namespace, comment, processing-instruction and KEEP_CONTENT:false removals
8748
- * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
8749
- * those dropped nodes are detached from the caller's LIVE tree but a
8750
- * handler-bearing original among them (an `<img onerror>`/`<video>` that was
8751
- * loading) keeps its queued resource event, which fires in page scope after
8752
- * sanitize returns. This walks a removed subtree and strips every attribute
8753
- * the active configuration does not allow — so `on*` handlers are cancelled
8754
- * through the SAME allowlist that governs kept nodes, not a separate `/^on/`
8755
- * blocklist. Run synchronously before sanitize returns, i.e. before any
8756
- * queued event can fire. Hook-free by design: these nodes leave the output,
8757
- * so firing attribute hooks for them would be surprising. Clobber-safe reads;
8758
- * a doomed clobbered node may shadow `removeAttribute` (its own attributes are
8759
- * irrelevant — it is discarded — while its non-clobbered descendants, e.g.
8760
- * the `<img>`, are reached and scrubbed).
8795
+ * Iterative depth-first walk, so deep trees cannot overflow the call stack,
8796
+ * reading through the cached getters, so clobbering cannot hide children.
8797
+ * When `visit` returns false, the node's children are skipped. With
8798
+ * `intoShadow`, open shadow roots are walked after their host's children.
8761
8799
  *
8762
- * @param root the root of a removed subtree to neutralise
8800
+ * @param root where to start
8801
+ * @param visit called for every node
8802
+ * @param intoShadow whether to enter open shadow roots
8763
8803
  */
8764
- const _neutralizeSubtree = function _neutralizeSubtree(root) {
8804
+ const _walkTree = function _walkTree(root, visit) {
8805
+ let intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
8765
8806
  const stack = [root];
8766
8807
  while (stack.length > 0) {
8767
8808
  const node = stack.pop();
8768
- if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
8809
+ if (visit(node) === false) continue;
8810
+ if (intoShadow && _readNodeType(node) === NODE_TYPE.element) {
8811
+ const shadowRoot = getShadowRoot(node);
8812
+ if (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);
8813
+ }
8769
8814
  const childNodes = getChildNodes(node);
8770
8815
  if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
8771
8816
  }
8772
8817
  };
8773
8818
  /**
8774
- * _neutralizePatchLinkage
8819
+ * Strips disallowed attributes from every element of a discarded subtree,
8820
+ * so a handler that is already queued (a loading image) cannot fire.
8775
8821
  *
8776
- * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
8777
- * hardening, https://github.com/WICG/declarative-partial-updates).
8822
+ * @param root the root of a removed subtree
8823
+ */
8824
+ const _neutralizeSubtree = function _neutralizeSubtree(root) {
8825
+ _walkTree(root, (node) => {
8826
+ if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
8827
+ });
8828
+ };
8829
+ /**
8830
+ * All nodes under `root`, root first, including open shadow roots. Template
8831
+ * content is not entered, it is inert.
8832
+ *
8833
+ * @param root the in-place root
8834
+ * @return the nodes
8835
+ */
8836
+ const _collectLiveNodes = function _collectLiveNodes(root) {
8837
+ const nodes = [];
8838
+ _walkTree(root, (node) => {
8839
+ nodes.push(node);
8840
+ }, true);
8841
+ return nodes;
8842
+ };
8843
+ /**
8844
+ * Strips disallowed attributes from every element that was under the
8845
+ * in-place root when the call started and no longer is, whatever removed
8846
+ * or moved it.
8778
8847
  *
8779
- * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
8780
- * markers (PIs / markup comments) node-by-node, in document order, AS it
8781
- * reaches each node. On a live in-place root that leaves a window: from the
8782
- * moment the root is connected until the walk arrives at a given node, that
8783
- * node's linkage is live. A patch applied on connection/stream can fire as
8784
- * a microtask during the walk and inject or teleport an unsanitized DOM
8785
- * range into a region the iterator has already passed and will not revisit,
8786
- * so the post-return "tree is sanitized" contract is violated. Sweep the
8787
- * whole tree once up front and sever every linkage before the walk begins,
8788
- * closing that window.
8848
+ * @param root the in-place root
8849
+ * @param before the root's nodes, collected before the walk
8850
+ */
8851
+ const _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {
8852
+ const reachable = setCreate();
8853
+ arrayForEach(_collectLiveNodes(root), (node) => {
8854
+ if (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);
8855
+ });
8856
+ arrayForEach(before, (node) => {
8857
+ if (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripDisallowedAttributes(node);
8858
+ });
8859
+ };
8860
+ /**
8861
+ * Neutralizes everything that left the in-place tree during the call: what
8862
+ * DOMPurify removed, and what hooks or custom elements removed or moved out.
8789
8863
  *
8790
- * This CANNOT undo a patch that already fired before sanitize ran — that is
8791
- * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
8792
- * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
8793
- * to group with the rest of the declarative-partial-updates handling and
8794
- * stay overridable, consistent with the codebase.
8864
+ * @param root the in-place root
8865
+ * @param before the root's nodes, collected before the walk
8866
+ * @return true if the root itself was removed
8867
+ */
8868
+ const _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {
8869
+ let rootRemoved = false;
8870
+ arrayForEach(DOMPurify.removed, (entry) => {
8871
+ if (entry.element) {
8872
+ rootRemoved = rootRemoved || entry.element === root;
8873
+ _neutralizeSubtree(entry.element);
8874
+ }
8875
+ });
8876
+ _neutralizeEscapedElements(root, before);
8877
+ return rootRemoved;
8878
+ };
8879
+ const MAX_UNVISITED_ROUNDS = 8;
8880
+ /**
8881
+ * The walk only moves forward, so a node moved to a position it already
8882
+ * passed is never visited. Give every original node that is still in the
8883
+ * tree but unvisited the normal treatment, hooks included. Nodes created
8884
+ * during the call are left alone. Fails closed if the tree keeps changing.
8795
8885
  *
8796
- * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
8797
- * clobbered root cannot defeat the sweep of its non-clobbered descendants.
8886
+ * @param root the in-place root
8887
+ * @param before the root's nodes, collected before the walk
8888
+ */
8889
+ const _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {
8890
+ const visited = IN_PLACE_VISITED;
8891
+ let original = null;
8892
+ const getOriginal = () => {
8893
+ if (!original) {
8894
+ original = setCreate();
8895
+ arrayForEach(before, (beforeNode) => {
8896
+ setAdd(original, beforeNode);
8897
+ });
8898
+ }
8899
+ return original;
8900
+ };
8901
+ for (let round = 0;; round++) {
8902
+ const live = _collectLiveNodes(root);
8903
+ const containers = [root];
8904
+ let pending = false;
8905
+ arrayForEach(live, (node) => {
8906
+ if (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);
8907
+ else if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);
8908
+ });
8909
+ if (!pending) return;
8910
+ if (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate("the tree kept changing during in-place sanitization; refusing to return it");
8911
+ arrayForEach(containers, (container, index) => {
8912
+ _sanitizeUnvisitedIn(container, index > 0, root, getOriginal());
8913
+ });
8914
+ }
8915
+ };
8916
+ /**
8917
+ * One _sanitizeUnvisitedNodes pass over the root or an open shadow root.
8798
8918
  *
8799
- * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
8800
- * .html Q1): this mirrors the existing policy of keeping `for` on
8801
- * <label>/<output>. If the shipping feature can drive a patch through a
8802
- * surviving `for`-on-label/output + `id` pair, this pre-pass and the
8803
- * attribute check at _isBasicCustomElement's caller must additionally drop
8804
- * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
8919
+ * @param container the root or an open shadow root
8920
+ * @param inShadow whether container is a shadow root
8921
+ * @param root the in-place root
8922
+ * @param original the root's nodes collected before the walk, as a set
8923
+ */
8924
+ const _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {
8925
+ const iterator = _createNodeIterator(container);
8926
+ let node;
8927
+ while (node = iterator.nextNode()) {
8928
+ if (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;
8929
+ if (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);
8930
+ _sanitizeElements(node, root);
8931
+ _sanitizeAttributes(node, root);
8932
+ if (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);
8933
+ }
8934
+ };
8935
+ /**
8936
+ * Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.
8805
8937
  *
8806
- * @param root the in-place root to sweep
8938
+ * @param node the node being processed
8807
8939
  */
8940
+ const _markVisited = function _markVisited(node) {
8941
+ if (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);
8942
+ };
8808
8943
  /**
8809
- * Central policy for declarative-partial-updates patch-linkage attributes,
8810
- * shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so
8811
- * the two sites cannot drift: `patchsrc` always links, `for` links
8812
- * everywhere except on <label>/<output>, and the whole policy is gated on
8813
- * SAFE_FOR_XML (see the rationale block in _isValidAttribute).
8944
+ * Patch-linkage attributes (declarative partial updates): `patchsrc`
8945
+ * always, `for` everywhere except on <label> and <output>. Gated on
8946
+ * SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.
8814
8947
  *
8815
8948
  * @param lcName the transformCaseFunc'd attribute name
8816
8949
  * @param lcTag the transformCaseFunc'd tag name of the carrying element
@@ -8821,17 +8954,26 @@ function createDOMPurify() {
8821
8954
  if (lcName === "patchsrc") return true;
8822
8955
  return lcName === "for" && lcTag !== "label" && lcTag !== "output";
8823
8956
  };
8957
+ /**
8958
+ * IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch
8959
+ * can fire mid-walk into a part of the tree the walker already passed.
8960
+ * Removes range markers (processing instructions, comments with markup)
8961
+ * and strips linkage attributes. It cannot undo a patch that already fired.
8962
+ *
8963
+ * TODO: if the shipped feature can patch through `for` on <label>/<output>,
8964
+ * drop that pair here too (see test/declarative-patch-probe.html).
8965
+ *
8966
+ * @param root the in-place root to sweep
8967
+ */
8824
8968
  const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
8825
8969
  if (!SAFE_FOR_XML) return;
8826
- const stack = [root];
8827
- while (stack.length > 0) {
8828
- const node = stack.pop();
8970
+ _walkTree(root, (node) => {
8829
8971
  const nodeType = _readNodeType(node);
8830
8972
  if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
8831
8973
  try {
8832
8974
  remove(node);
8833
8975
  } catch (_) {}
8834
- continue;
8976
+ return false;
8835
8977
  }
8836
8978
  if (nodeType === NODE_TYPE.element) {
8837
8979
  const element = node;
@@ -8841,9 +8983,8 @@ function createDOMPurify() {
8841
8983
  if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
8842
8984
  } catch (_) {}
8843
8985
  }
8844
- const childNodes = getChildNodes(node);
8845
- if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
8846
- }
8986
+ return true;
8987
+ });
8847
8988
  };
8848
8989
  /**
8849
8990
  * _initDocument
@@ -8920,6 +9061,27 @@ function createDOMPurify() {
8920
9061
  */
8921
9062
  const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
8922
9063
  var _node$querySelectorAl;
9064
+ _scrubOwnCharacterData(node);
9065
+ const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
9066
+ if (templates) arrayForEach(templates, (tmpl) => {
9067
+ if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
9068
+ });
9069
+ };
9070
+ /**
9071
+ * _scrubOwnCharacterData
9072
+ *
9073
+ * Non-recursive core of _scrubTemplateExpressions: normalize `node` and
9074
+ * strip template expressions from its own character data only. Does not
9075
+ * enter <template>.content or attached shadow roots (NodeIterator never
9076
+ * does). Used by _sanitizeShadowDOM, where every nested template content
9077
+ * and shadow root is already walked - and therefore scrubbed - by its own
9078
+ * recursive _sanitizeShadowDOM call; recursing here as well would rescrub
9079
+ * each nested fragment once per ancestor, which is quadratic in nesting
9080
+ * depth.
9081
+ *
9082
+ * @param node The root whose own character data should be scrubbed.
9083
+ */
9084
+ const _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {
8923
9085
  node.normalize();
8924
9086
  const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;
8925
9087
  const walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
@@ -8928,10 +9090,6 @@ function createDOMPurify() {
8928
9090
  currentNode.data = _stripTemplateExpressions(currentNode.data);
8929
9091
  currentNode = walker.nextNode();
8930
9092
  }
8931
- const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
8932
- if (templates) arrayForEach(templates, (tmpl) => {
8933
- if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
8934
- });
8935
9093
  };
8936
9094
  /**
8937
9095
  * _isClobbered
@@ -9007,7 +9165,7 @@ function createDOMPurify() {
9007
9165
  */
9008
9166
  const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
9009
9167
  if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
9010
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;
9168
+ if (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;
9011
9169
  if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
9012
9170
  if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
9013
9171
  return false;
@@ -9051,7 +9209,7 @@ function createDOMPurify() {
9051
9209
  */
9052
9210
  const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
9053
9211
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
9054
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
9212
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
9055
9213
  const parentNode = getParentNode(currentNode);
9056
9214
  const childNodes = getChildNodes(currentNode);
9057
9215
  if (childNodes && parentNode) {
@@ -9084,35 +9242,13 @@ function createDOMPurify() {
9084
9242
  return set === defaultSet || set === setConfigSet ? clone(set) : set;
9085
9243
  };
9086
9244
  /**
9087
- * Shared guard for a node that a hook has detached from the walk tree,
9088
- * used after each element-hook site in _sanitizeElements. Detaching is a
9089
- * long-standing user pattern (issue #469; draw.io-style foreignObject
9090
- * filtering). Per the cached, unclobberable parentNode getter the node is
9091
- * genuinely out of the tree, so it can reach neither the serialized
9092
- * output nor an IN_PLACE live tree; treat it as removed and stop
9093
- * processing it. Without this guard, the unsafe-node / namespace checks
9094
- * would call _forceRemove on a parentless node and hit the REPORT-3
9095
- * fail-closed throw — which exists for nodes DOMPurify wants gone but
9096
- * *cannot* detach (clobbered / parentless roots), the opposite of a node
9097
- * that is already safely gone. The walk root is exempt: a detached
9098
- * IN_PLACE root is legitimate input and must still be fully sanitized,
9099
- * and a kill-decision on it must keep hitting the REPORT-3 throw.
9100
- *
9101
- * Nodes detached by hooks stay the hook's responsibility for placement:
9102
- * they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE
9103
- * pass (which iterates DOMPurify.removed) does not reach them. But a
9104
- * hook-detached subtree can still hold a queued resource-event handler -
9105
- * e.g. an <img onload> that began loading when the caller built the live
9106
- * tree - which fires in page scope after sanitize returns even though the
9107
- * handler never reached the returned tree. That is the audit-5 F1 hazard,
9108
- * and the documented node.remove() hook pattern walks straight into it.
9109
- * So on the IN_PLACE path we neutralize the detached subtree inline,
9110
- * stripping its non-allow-listed attributes before returning, exactly as
9111
- * the post-walk pass does for _forceRemove'd subtrees.
9245
+ * A hook may have detached the node it was called for. If so, treat it as
9246
+ * removed and stop processing it; the walk root is exempt. On the IN_PLACE
9247
+ * path the detached subtree is neutralized right away.
9112
9248
  *
9113
9249
  * @param currentNode the node a hook may have detached
9114
9250
  * @param root the current walk root
9115
- * @return true if the node is detached and now handled, false otherwise
9251
+ * @return true if the node was detached
9116
9252
  */
9117
9253
  const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
9118
9254
  if (currentNode === root || getParentNode(currentNode) !== null) return false;
@@ -9129,6 +9265,7 @@ function createDOMPurify() {
9129
9265
  * @return true if node was killed, false if left alive
9130
9266
  */
9131
9267
  const _sanitizeElements = function _sanitizeElements(currentNode, root) {
9268
+ _markVisited(currentNode);
9132
9269
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
9133
9270
  if (_handleHookDetachedNode(currentNode, root)) return true;
9134
9271
  if (_isClobbered(currentNode)) {
@@ -9272,6 +9409,22 @@ function createDOMPurify() {
9272
9409
  }
9273
9410
  };
9274
9411
  /**
9412
+ * _isUnsafeAttributeValue
9413
+ *
9414
+ * Value-based attribute checks that the attribute walk applies before any
9415
+ * hook can force-keep an attribute, shared with the public
9416
+ * isValidAttribute() so that it never approves a value sanitize() would
9417
+ * strip.
9418
+ *
9419
+ * @param name the attribute name as found on the node (case preserved)
9420
+ * @param value the attribute value
9421
+ * @returns true if the attribute must be removed because of its value
9422
+ */
9423
+ const _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {
9424
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;
9425
+ return stringToLowerCase(name) === "attributename" && stringMatch(value, "href") !== null;
9426
+ };
9427
+ /**
9275
9428
  * _sanitizeAttributes
9276
9429
  *
9277
9430
  * @protect attributes
@@ -9315,11 +9468,7 @@ function createDOMPurify() {
9315
9468
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
9316
9469
  recreatedNamedProp = true;
9317
9470
  }
9318
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
9319
- _removeAttribute(name, currentNode, attr);
9320
- continue;
9321
- }
9322
- if (lcName === "attributename" && stringMatch(value, "href")) {
9471
+ if (_isUnsafeAttributeValue(name, value)) {
9323
9472
  _removeAttribute(name, currentNode, attr);
9324
9473
  continue;
9325
9474
  }
@@ -9367,24 +9516,13 @@ function createDOMPurify() {
9367
9516
  }
9368
9517
  }
9369
9518
  }
9519
+ if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
9370
9520
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
9371
9521
  };
9372
9522
  /**
9373
- * _sanitizeAttachedShadowRoots
9374
- *
9375
- * Walks `root` and feeds every attached shadow root we encounter into
9376
- * the existing _sanitizeShadowDOM pipeline. The default node iterator
9377
- * does not descend into shadow trees, so nodes inside an attached
9378
- * shadow root would otherwise be skipped entirely.
9379
- *
9380
- * Two real input paths put attached shadow roots in front of us:
9381
- * 1. IN_PLACE on a DOM node that already has shadow roots attached.
9382
- * 2. DOM-node input where importNode(dirty, true) deep-clones the
9383
- * shadow root because it was created with `clonable: true`.
9384
- *
9385
- * This pass runs once, up front, so the main iteration loop (and the
9386
- * existing _sanitizeShadowDOM template-content recursion) stay
9387
- * untouched — string-input paths are not affected.
9523
+ * Sanitizes every attached shadow root under `root`, since the node
9524
+ * iterator does not enter shadow trees. Needed for IN_PLACE input and for
9525
+ * DOM input whose clonable shadow roots were copied by importNode().
9388
9526
  *
9389
9527
  * @param root the subtree root to walk for attached shadow roots
9390
9528
  */
@@ -9449,6 +9587,8 @@ function createDOMPurify() {
9449
9587
  if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
9450
9588
  DOMPurify.removed = [];
9451
9589
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
9590
+ let inPlaceNodes = [];
9591
+ const outerVisited = IN_PLACE_VISITED;
9452
9592
  if (inPlace) {
9453
9593
  _neutralizePatchLinkage(dirty);
9454
9594
  const nn = _readNodeName(dirty);
@@ -9463,12 +9603,8 @@ function createDOMPurify() {
9463
9603
  _neutralizeRoot(dirty);
9464
9604
  throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
9465
9605
  }
9466
- try {
9467
- _sanitizeAttachedShadowRoots(dirty);
9468
- } catch (error) {
9469
- _neutralizeRoot(dirty);
9470
- throw error;
9471
- }
9606
+ inPlaceNodes = _collectLiveNodes(dirty);
9607
+ IN_PLACE_VISITED = setCreate();
9472
9608
  } else if (_isNode(dirty)) {
9473
9609
  body = _initDocument("<!---->");
9474
9610
  importedNode = body.ownerDocument.importNode(dirty, true);
@@ -9484,30 +9620,25 @@ function createDOMPurify() {
9484
9620
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
9485
9621
  const walkRoot = inPlace ? dirty : body;
9486
9622
  try {
9623
+ if (inPlace) _sanitizeAttachedShadowRoots(dirty);
9487
9624
  const nodeIterator = _createNodeIterator(walkRoot);
9488
9625
  while (currentNode = nodeIterator.nextNode()) {
9489
9626
  _sanitizeElements(currentNode, walkRoot);
9490
9627
  _sanitizeAttributes(currentNode, walkRoot);
9491
9628
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
9492
9629
  }
9630
+ if (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);
9493
9631
  } catch (error) {
9494
9632
  if (inPlace) {
9495
9633
  _neutralizeRoot(dirty);
9496
- arrayForEach(DOMPurify.removed, (entry) => {
9497
- if (entry.element) _neutralizeSubtree(entry.element);
9498
- });
9634
+ _neutralizeDiscarded(dirty, inPlaceNodes);
9499
9635
  }
9500
9636
  throw error;
9637
+ } finally {
9638
+ IN_PLACE_VISITED = outerVisited;
9501
9639
  }
9502
9640
  if (inPlace) {
9503
- let rootWasRemoved = false;
9504
- arrayForEach(DOMPurify.removed, (entry) => {
9505
- if (entry.element) {
9506
- if (entry.element === dirty) rootWasRemoved = true;
9507
- _neutralizeSubtree(entry.element);
9508
- }
9509
- });
9510
- if (rootWasRemoved) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
9641
+ if (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
9511
9642
  if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
9512
9643
  return dirty;
9513
9644
  }
@@ -9544,6 +9675,7 @@ function createDOMPurify() {
9544
9675
  if (!CONFIG) _parseConfig({});
9545
9676
  const lcTag = transformCaseFunc(tag);
9546
9677
  const lcName = transformCaseFunc(attr);
9678
+ if (typeof value === "string" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;
9547
9679
  return _isValidAttribute(lcTag, lcName, value);
9548
9680
  };
9549
9681
  DOMPurify.addHook = function(entryPoint, hookFunction) {
@@ -22623,7 +22755,7 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22623
22755
  "resultClick"
22624
22756
  ], ["update:modelValue"]),
22625
22757
  setup(__props, { expose: __expose, emit: __emit }) {
22626
- const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-DBU9xVEK.js").then((n) => n.n));
22758
+ const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-Bqel9iqk.js").then((n) => n.n));
22627
22759
  const KdsListContainer = defineAsyncComponent(() => Promise.resolve().then(() => KdsListContainer_exports));
22628
22760
  const props = createPropsRestProxy(__props, [
22629
22761
  "placeholder",
@@ -25509,9 +25641,9 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25509
25641
  ], ["update:modelValue"]),
25510
25642
  setup(__props, { expose: __expose, emit: __emit }) {
25511
25643
  useCssVars((_ctx) => ({
25512
- "v21e36790": dropIndicatorTop.value,
25513
- "v1a85c12c": dropIndicatorLeft.value,
25514
- "v36cf3141": dropIndicatorWidth.value
25644
+ "v452199fa": dropIndicatorTop.value,
25645
+ "v5f1937ce": dropIndicatorLeft.value,
25646
+ "v3e95ebf4": dropIndicatorWidth.value
25515
25647
  }));
25516
25648
  const OPTION_LINE_HEIGHT = dimension.component.height["1.5x"].value + spacing.container["0.10x"].value;
25517
25649
  const DEFAULT_HEIGHT = dimension.component.height["20x"].value;
@@ -25543,10 +25675,11 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25543
25675
  const allValues = computed(() => visibleBottomValue.value ? [...visiblePossibleValues.value, visibleBottomValue.value] : visiblePossibleValues.value);
25544
25676
  const bottomIndex = computed(() => visiblePossibleValues.value.length);
25545
25677
  const { containerProps, wrapperProps, list: virtualList, scrollTo } = useVirtualList(visiblePossibleValues, { itemHeight: OPTION_LINE_HEIGHT });
25546
- watch(visiblePossibleValues, () => {
25678
+ watch(visiblePossibleValues, (values) => {
25547
25679
  const el = containerProps.ref.value;
25548
25680
  if (!el) return;
25549
- scrollTo(Math.max(Math.min(Math.floor(el.scrollTop / OPTION_LINE_HEIGHT), visiblePossibleValues.value.length - 1), 0));
25681
+ if (Math.floor(el.scrollTop / OPTION_LINE_HEIGHT) < values.length) return;
25682
+ scrollTo(Math.max(values.length - 1, 0));
25550
25683
  });
25551
25684
  const scrollToIndex = (index) => {
25552
25685
  if (index === bottomIndex.value && visibleBottomValue.value) return;
@@ -25783,7 +25916,7 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25783
25916
  ]);
25784
25917
  };
25785
25918
  }
25786
- }), [["__scopeId", "data-v-ff301db7"]]);
25919
+ }), [["__scopeId", "data-v-9feb50c6"]]);
25787
25920
  //#endregion
25788
25921
  //#region src/components/forms/selects/TwinList/TwinListBody.vue?vue&type=script&setup=true&lang.ts
25789
25922
  var _hoisted_1$29 = { class: "kds-list-column" };
@@ -25870,28 +26003,20 @@ var TwinListBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
25870
26003
  return props.possibleValues.filter((v) => includedSet.has(String(v.id)));
25871
26004
  });
25872
26005
  const matchesSearch = (item) => item.text.toLowerCase().includes(__props.searchTerm.toLowerCase());
25873
- const toMissingOption = (id, selectedSet) => ({
26006
+ const toMissingOption = (id) => ({
25874
26007
  id,
25875
26008
  text: id,
25876
- missing: true,
25877
- selected: selectedSet.has(id)
26009
+ missing: true
25878
26010
  });
25879
26011
  const filteredExcludedItems = computed(() => __props.searchTerm ? excludedItems.value.filter(matchesSearch) : excludedItems.value);
25880
26012
  const filteredIncludedItems = computed(() => __props.searchTerm ? includedItems.value.filter(matchesSearch) : includedItems.value);
25881
- const toListOption = (item, selectedSet) => ({
26013
+ const toListOption = (item) => ({
25882
26014
  id: String(item.id),
25883
26015
  text: item.text,
25884
- accessory: item.accessory,
25885
- selected: selectedSet.has(String(item.id))
25886
- });
25887
- const leftOptions = computed(() => {
25888
- const selectedSet = new Set(leftSelected.value);
25889
- return [...missingExcludedIds.value.map((id) => toMissingOption(id, selectedSet)), ...filteredExcludedItems.value.map((item) => toListOption(item, selectedSet))];
25890
- });
25891
- const rightOptions = computed(() => {
25892
- const selectedSet = new Set(rightSelected.value);
25893
- return [...missingIncludedIds.value.map((id) => toMissingOption(id, selectedSet)), ...filteredIncludedItems.value.map((item) => toListOption(item, selectedSet))];
26016
+ accessory: item.accessory
25894
26017
  });
26018
+ const leftOptions = computed(() => [...missingExcludedIds.value.map(toMissingOption), ...filteredExcludedItems.value.map(toListOption)]);
26019
+ const rightOptions = computed(() => [...missingIncludedIds.value.map(toMissingOption), ...filteredIncludedItems.value.map(toListOption)]);
25895
26020
  const unknownValueOption = computed(() => ({
25896
26021
  text: __props.unknownValuesText,
25897
26022
  id: UNKNOWN_VALUE_ID
@@ -26031,7 +26156,7 @@ var TwinListBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
26031
26156
  }, 8, ["height", "min-height"]);
26032
26157
  };
26033
26158
  }
26034
- }), [["__scopeId", "data-v-7a9a2c2d"]]);
26159
+ }), [["__scopeId", "data-v-026f08a0"]]);
26035
26160
  //#endregion
26036
26161
  //#region src/components/forms/selects/TwinList/enums.ts
26037
26162
  var kdsTwinListSearchMode = {