@inploi/plugin-feedback 5.0.0 → 6.1.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.
@@ -1925,10 +1925,6 @@ const oppositeSideMap = {
1925
1925
  bottom: "top",
1926
1926
  top: "bottom"
1927
1927
  };
1928
- const oppositeAlignmentMap = {
1929
- start: "end",
1930
- end: "start"
1931
- };
1932
1928
  function clamp(start, value, end) {
1933
1929
  return max(start, min(value, end));
1934
1930
  }
@@ -1947,9 +1943,9 @@ function getOppositeAxis(axis) {
1947
1943
  function getAxisLength(axis) {
1948
1944
  return axis === "y" ? "height" : "width";
1949
1945
  }
1950
- const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
1951
1946
  function getSideAxis(placement) {
1952
- return yAxisSides.has(getSide(placement)) ? "y" : "x";
1947
+ const firstChar = placement[0];
1948
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
1953
1949
  }
1954
1950
  function getAlignmentAxis(placement) {
1955
1951
  return getOppositeAxis(getSideAxis(placement));
@@ -1972,7 +1968,7 @@ function getExpandedPlacements(placement) {
1972
1968
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
1973
1969
  }
1974
1970
  function getOppositeAlignmentPlacement(placement) {
1975
- return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
1971
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
1976
1972
  }
1977
1973
  const lrPlacement = ["left", "right"];
1978
1974
  const rlPlacement = ["right", "left"];
@@ -2004,7 +2000,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2004
2000
  return list;
2005
2001
  }
2006
2002
  function getOppositePlacement(placement) {
2007
- return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
2003
+ const side = getSide(placement);
2004
+ return oppositeSideMap[side] + placement.slice(side.length);
2008
2005
  }
2009
2006
  function expandPaddingObject(padding) {
2010
2007
  return {
@@ -2096,6 +2093,63 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
2096
2093
  }
2097
2094
  return coords;
2098
2095
  }
2096
+ async function detectOverflow(state, options2) {
2097
+ var _await$platform$isEle;
2098
+ if (options2 === void 0) {
2099
+ options2 = {};
2100
+ }
2101
+ const {
2102
+ x: x2,
2103
+ y: y2,
2104
+ platform: platform2,
2105
+ rects,
2106
+ elements,
2107
+ strategy
2108
+ } = state;
2109
+ const {
2110
+ boundary = "clippingAncestors",
2111
+ rootBoundary = "viewport",
2112
+ elementContext = "floating",
2113
+ altBoundary = false,
2114
+ padding = 0
2115
+ } = evaluate(options2, state);
2116
+ const paddingObject = getPaddingObject(padding);
2117
+ const altContext = elementContext === "floating" ? "reference" : "floating";
2118
+ const element = elements[altBoundary ? altContext : elementContext];
2119
+ const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
2120
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
2121
+ boundary,
2122
+ rootBoundary,
2123
+ strategy
2124
+ }));
2125
+ const rect = elementContext === "floating" ? {
2126
+ x: x2,
2127
+ y: y2,
2128
+ width: rects.floating.width,
2129
+ height: rects.floating.height
2130
+ } : rects.reference;
2131
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
2132
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
2133
+ x: 1,
2134
+ y: 1
2135
+ } : {
2136
+ x: 1,
2137
+ y: 1
2138
+ };
2139
+ const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
2140
+ elements,
2141
+ rect,
2142
+ offsetParent,
2143
+ strategy
2144
+ }) : rect);
2145
+ return {
2146
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
2147
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
2148
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
2149
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
2150
+ };
2151
+ }
2152
+ const MAX_RESET_COUNT = 50;
2099
2153
  const computePosition$1 = async (reference, floating, config) => {
2100
2154
  const {
2101
2155
  placement = "bottom",
@@ -2103,7 +2157,10 @@ const computePosition$1 = async (reference, floating, config) => {
2103
2157
  middleware = [],
2104
2158
  platform: platform2
2105
2159
  } = config;
2106
- const validMiddleware = middleware.filter(Boolean);
2160
+ const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
2161
+ ...platform2,
2162
+ detectOverflow
2163
+ };
2107
2164
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
2108
2165
  let rects = await platform2.getElementRects({
2109
2166
  reference,
@@ -2115,13 +2172,17 @@ const computePosition$1 = async (reference, floating, config) => {
2115
2172
  y: y2
2116
2173
  } = computeCoordsFromPlacement(rects, placement, rtl);
2117
2174
  let statefulPlacement = placement;
2118
- let middlewareData = {};
2119
2175
  let resetCount = 0;
2120
- for (let i2 = 0; i2 < validMiddleware.length; i2++) {
2176
+ const middlewareData = {};
2177
+ for (let i2 = 0; i2 < middleware.length; i2++) {
2178
+ const currentMiddleware = middleware[i2];
2179
+ if (!currentMiddleware) {
2180
+ continue;
2181
+ }
2121
2182
  const {
2122
2183
  name,
2123
2184
  fn: fn2
2124
- } = validMiddleware[i2];
2185
+ } = currentMiddleware;
2125
2186
  const {
2126
2187
  x: nextX,
2127
2188
  y: nextY,
@@ -2135,7 +2196,7 @@ const computePosition$1 = async (reference, floating, config) => {
2135
2196
  strategy,
2136
2197
  middlewareData,
2137
2198
  rects,
2138
- platform: platform2,
2199
+ platform: platformWithDetectOverflow,
2139
2200
  elements: {
2140
2201
  reference,
2141
2202
  floating
@@ -2143,14 +2204,11 @@ const computePosition$1 = async (reference, floating, config) => {
2143
2204
  });
2144
2205
  x2 = nextX != null ? nextX : x2;
2145
2206
  y2 = nextY != null ? nextY : y2;
2146
- middlewareData = {
2147
- ...middlewareData,
2148
- [name]: {
2149
- ...middlewareData[name],
2150
- ...data
2151
- }
2207
+ middlewareData[name] = {
2208
+ ...middlewareData[name],
2209
+ ...data
2152
2210
  };
2153
- if (reset && resetCount <= 50) {
2211
+ if (reset && resetCount < MAX_RESET_COUNT) {
2154
2212
  resetCount++;
2155
2213
  if (typeof reset === "object") {
2156
2214
  if (reset.placement) {
@@ -2179,62 +2237,6 @@ const computePosition$1 = async (reference, floating, config) => {
2179
2237
  middlewareData
2180
2238
  };
2181
2239
  };
2182
- async function detectOverflow(state, options2) {
2183
- var _await$platform$isEle;
2184
- if (options2 === void 0) {
2185
- options2 = {};
2186
- }
2187
- const {
2188
- x: x2,
2189
- y: y2,
2190
- platform: platform2,
2191
- rects,
2192
- elements,
2193
- strategy
2194
- } = state;
2195
- const {
2196
- boundary = "clippingAncestors",
2197
- rootBoundary = "viewport",
2198
- elementContext = "floating",
2199
- altBoundary = false,
2200
- padding = 0
2201
- } = evaluate(options2, state);
2202
- const paddingObject = getPaddingObject(padding);
2203
- const altContext = elementContext === "floating" ? "reference" : "floating";
2204
- const element = elements[altBoundary ? altContext : elementContext];
2205
- const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
2206
- element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
2207
- boundary,
2208
- rootBoundary,
2209
- strategy
2210
- }));
2211
- const rect = elementContext === "floating" ? {
2212
- x: x2,
2213
- y: y2,
2214
- width: rects.floating.width,
2215
- height: rects.floating.height
2216
- } : rects.reference;
2217
- const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
2218
- const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
2219
- x: 1,
2220
- y: 1
2221
- } : {
2222
- x: 1,
2223
- y: 1
2224
- };
2225
- const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
2226
- elements,
2227
- rect,
2228
- offsetParent,
2229
- strategy
2230
- }) : rect);
2231
- return {
2232
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
2233
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
2234
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
2235
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
2236
- };
2237
- }
2238
2240
  const arrow$3 = (options2) => ({
2239
2241
  name: "arrow",
2240
2242
  options: options2,
@@ -2336,7 +2338,7 @@ const flip$2 = function(options2) {
2336
2338
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
2337
2339
  }
2338
2340
  const placements = [initialPlacement, ...fallbackPlacements];
2339
- const overflow = await detectOverflow(state, detectOverflowOptions);
2341
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
2340
2342
  const overflows = [];
2341
2343
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
2342
2344
  if (checkMainAxis) {
@@ -2355,15 +2357,20 @@ const flip$2 = function(options2) {
2355
2357
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
2356
2358
  const nextPlacement = placements[nextIndex];
2357
2359
  if (nextPlacement) {
2358
- return {
2359
- data: {
2360
- index: nextIndex,
2361
- overflows: overflowsData
2362
- },
2363
- reset: {
2364
- placement: nextPlacement
2365
- }
2366
- };
2360
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
2361
+ if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
2362
+ // overflows the main axis.
2363
+ overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) {
2364
+ return {
2365
+ data: {
2366
+ index: nextIndex,
2367
+ overflows: overflowsData
2368
+ },
2369
+ reset: {
2370
+ placement: nextPlacement
2371
+ }
2372
+ };
2373
+ }
2367
2374
  }
2368
2375
  let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
2369
2376
  if (!resetPlacement) {
@@ -2421,7 +2428,8 @@ const hide$2 = function(options2) {
2421
2428
  options: options2,
2422
2429
  async fn(state) {
2423
2430
  const {
2424
- rects
2431
+ rects,
2432
+ platform: platform2
2425
2433
  } = state;
2426
2434
  const {
2427
2435
  strategy = "referenceHidden",
@@ -2429,7 +2437,7 @@ const hide$2 = function(options2) {
2429
2437
  } = evaluate(options2, state);
2430
2438
  switch (strategy) {
2431
2439
  case "referenceHidden": {
2432
- const overflow = await detectOverflow(state, {
2440
+ const overflow = await platform2.detectOverflow(state, {
2433
2441
  ...detectOverflowOptions,
2434
2442
  elementContext: "reference"
2435
2443
  });
@@ -2442,7 +2450,7 @@ const hide$2 = function(options2) {
2442
2450
  };
2443
2451
  }
2444
2452
  case "escaped": {
2445
- const overflow = await detectOverflow(state, {
2453
+ const overflow = await platform2.detectOverflow(state, {
2446
2454
  ...detectOverflowOptions,
2447
2455
  altBoundary: true
2448
2456
  });
@@ -2461,6 +2469,7 @@ const hide$2 = function(options2) {
2461
2469
  }
2462
2470
  };
2463
2471
  };
2472
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
2464
2473
  async function convertValueToCoords(state, options2) {
2465
2474
  const {
2466
2475
  placement,
@@ -2471,7 +2480,7 @@ async function convertValueToCoords(state, options2) {
2471
2480
  const side = getSide(placement);
2472
2481
  const alignment = getAlignment(placement);
2473
2482
  const isVertical = getSideAxis(placement) === "y";
2474
- const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
2483
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
2475
2484
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
2476
2485
  const rawValue = evaluate(options2, state);
2477
2486
  let {
@@ -2483,10 +2492,9 @@ async function convertValueToCoords(state, options2) {
2483
2492
  crossAxis: 0,
2484
2493
  alignmentAxis: null
2485
2494
  } : {
2486
- mainAxis: 0,
2487
- crossAxis: 0,
2488
- alignmentAxis: null,
2489
- ...rawValue
2495
+ mainAxis: rawValue.mainAxis || 0,
2496
+ crossAxis: rawValue.crossAxis || 0,
2497
+ alignmentAxis: rawValue.alignmentAxis
2490
2498
  };
2491
2499
  if (alignment && typeof alignmentAxis === "number") {
2492
2500
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
@@ -2540,7 +2548,8 @@ const shift$2 = function(options2) {
2540
2548
  const {
2541
2549
  x: x2,
2542
2550
  y: y2,
2543
- placement
2551
+ placement,
2552
+ platform: platform2
2544
2553
  } = state;
2545
2554
  const {
2546
2555
  mainAxis: checkMainAxis = true,
@@ -2563,7 +2572,7 @@ const shift$2 = function(options2) {
2563
2572
  x: x2,
2564
2573
  y: y2
2565
2574
  };
2566
- const overflow = await detectOverflow(state, detectOverflowOptions);
2575
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
2567
2576
  const crossAxis = getSideAxis(getSide(placement));
2568
2577
  const mainAxis = getOppositeAxis(crossAxis);
2569
2578
  let mainAxisCoord = coords[mainAxis];
@@ -2591,7 +2600,11 @@ const shift$2 = function(options2) {
2591
2600
  ...limitedCoords,
2592
2601
  data: {
2593
2602
  x: limitedCoords.x - x2,
2594
- y: limitedCoords.y - y2
2603
+ y: limitedCoords.y - y2,
2604
+ enabled: {
2605
+ [mainAxis]: checkMainAxis,
2606
+ [crossAxis]: checkCrossAxis
2607
+ }
2595
2608
  }
2596
2609
  };
2597
2610
  }
@@ -2646,7 +2659,7 @@ const limitShift$2 = function(options2) {
2646
2659
  if (checkCrossAxis) {
2647
2660
  var _middlewareData$offse, _middlewareData$offse2;
2648
2661
  const len = mainAxis === "y" ? "width" : "height";
2649
- const isOriginSide = ["top", "left"].includes(getSide(placement));
2662
+ const isOriginSide = originSides.has(getSide(placement));
2650
2663
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
2651
2664
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
2652
2665
  if (crossAxisCoord < limitMin) {
@@ -2670,6 +2683,7 @@ const size$2 = function(options2) {
2670
2683
  name: "size",
2671
2684
  options: options2,
2672
2685
  async fn(state) {
2686
+ var _state$middlewareData, _state$middlewareData2;
2673
2687
  const {
2674
2688
  placement,
2675
2689
  rects,
@@ -2681,7 +2695,7 @@ const size$2 = function(options2) {
2681
2695
  },
2682
2696
  ...detectOverflowOptions
2683
2697
  } = evaluate(options2, state);
2684
- const overflow = await detectOverflow(state, detectOverflowOptions);
2698
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
2685
2699
  const side = getSide(placement);
2686
2700
  const alignment = getAlignment(placement);
2687
2701
  const isYAxis = getSideAxis(placement) === "y";
@@ -2705,10 +2719,11 @@ const size$2 = function(options2) {
2705
2719
  const noShift = !state.middlewareData.shift;
2706
2720
  let availableHeight = overflowAvailableHeight;
2707
2721
  let availableWidth = overflowAvailableWidth;
2708
- if (isYAxis) {
2709
- availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
2710
- } else {
2711
- availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
2722
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
2723
+ availableWidth = maximumClippingWidth;
2724
+ }
2725
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
2726
+ availableHeight = maximumClippingHeight;
2712
2727
  }
2713
2728
  if (noShift && !alignment) {
2714
2729
  const xMin = max(overflow.left, 0);
@@ -2779,7 +2794,6 @@ function isShadowRoot(value) {
2779
2794
  }
2780
2795
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2781
2796
  }
2782
- const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
2783
2797
  function isOverflowElement(element) {
2784
2798
  const {
2785
2799
  overflow,
@@ -2787,29 +2801,31 @@ function isOverflowElement(element) {
2787
2801
  overflowY,
2788
2802
  display
2789
2803
  } = getComputedStyle$1(element);
2790
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
2804
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
2791
2805
  }
2792
- const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
2793
2806
  function isTableElement(element) {
2794
- return tableElements.has(getNodeName(element));
2807
+ return /^(table|td|th)$/.test(getNodeName(element));
2795
2808
  }
2796
- const topLayerSelectors = [":popover-open", ":modal"];
2797
2809
  function isTopLayer(element) {
2798
- return topLayerSelectors.some((selector) => {
2799
- try {
2800
- return element.matches(selector);
2801
- } catch (_e) {
2802
- return false;
2810
+ try {
2811
+ if (element.matches(":popover-open")) {
2812
+ return true;
2803
2813
  }
2804
- });
2814
+ } catch (_e) {
2815
+ }
2816
+ try {
2817
+ return element.matches(":modal");
2818
+ } catch (_e) {
2819
+ return false;
2820
+ }
2805
2821
  }
2806
- const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
2807
- const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
2808
- const containValues = ["paint", "layout", "strict", "content"];
2822
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
2823
+ const containRe = /paint|layout|strict|content/;
2824
+ const isNotNone = (value) => !!value && value !== "none";
2825
+ let isWebKitValue;
2809
2826
  function isContainingBlock(elementOrCss) {
2810
- const webkit = isWebKit();
2811
2827
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
2812
- return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
2828
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
2813
2829
  }
2814
2830
  function getContainingBlock(element) {
2815
2831
  let currentNode = getParentNode(element);
@@ -2824,13 +2840,13 @@ function getContainingBlock(element) {
2824
2840
  return null;
2825
2841
  }
2826
2842
  function isWebKit() {
2827
- if (typeof CSS === "undefined" || !CSS.supports)
2828
- return false;
2829
- return CSS.supports("-webkit-backdrop-filter", "none");
2843
+ if (isWebKitValue == null) {
2844
+ isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
2845
+ }
2846
+ return isWebKitValue;
2830
2847
  }
2831
- const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
2832
2848
  function isLastTraversableNode(node) {
2833
- return lastTraversableNodeNames.has(getNodeName(node));
2849
+ return /^(html|body|#document)$/.test(getNodeName(node));
2834
2850
  }
2835
2851
  function getComputedStyle$1(element) {
2836
2852
  return getWindow(element).getComputedStyle(element);
@@ -2884,8 +2900,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
2884
2900
  if (isBody) {
2885
2901
  const frameElement = getFrameElement(win);
2886
2902
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
2903
+ } else {
2904
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
2887
2905
  }
2888
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
2889
2906
  }
2890
2907
  function getFrameElement(win) {
2891
2908
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -3007,6 +3024,22 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
3007
3024
  y: y2
3008
3025
  });
3009
3026
  }
3027
+ function getWindowScrollBarX(element, rect) {
3028
+ const leftScroll = getNodeScroll(element).scrollLeft;
3029
+ if (!rect) {
3030
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
3031
+ }
3032
+ return rect.left + leftScroll;
3033
+ }
3034
+ function getHTMLOffset(documentElement, scroll) {
3035
+ const htmlRect = documentElement.getBoundingClientRect();
3036
+ const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
3037
+ const y2 = htmlRect.top + scroll.scrollTop;
3038
+ return {
3039
+ x: x2,
3040
+ y: y2
3041
+ };
3042
+ }
3010
3043
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3011
3044
  let {
3012
3045
  elements,
@@ -3031,26 +3064,24 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3031
3064
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3032
3065
  scroll = getNodeScroll(offsetParent);
3033
3066
  }
3034
- if (isHTMLElement(offsetParent)) {
3067
+ if (isOffsetParentAnElement) {
3035
3068
  const offsetRect = getBoundingClientRect(offsetParent);
3036
3069
  scale = getScale(offsetParent);
3037
3070
  offsets.x = offsetRect.x + offsetParent.clientLeft;
3038
3071
  offsets.y = offsetRect.y + offsetParent.clientTop;
3039
3072
  }
3040
3073
  }
3074
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3041
3075
  return {
3042
3076
  width: rect.width * scale.x,
3043
3077
  height: rect.height * scale.y,
3044
- x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
3045
- y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
3078
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
3079
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
3046
3080
  };
3047
3081
  }
3048
3082
  function getClientRects(element) {
3049
3083
  return Array.from(element.getClientRects());
3050
3084
  }
3051
- function getWindowScrollBarX(element) {
3052
- return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
3053
- }
3054
3085
  function getDocumentRect(element) {
3055
3086
  const html = getDocumentElement(element);
3056
3087
  const scroll = getNodeScroll(element);
@@ -3069,6 +3100,7 @@ function getDocumentRect(element) {
3069
3100
  y: y2
3070
3101
  };
3071
3102
  }
3103
+ const SCROLLBAR_MAX = 25;
3072
3104
  function getViewportRect(element, strategy) {
3073
3105
  const win = getWindow(element);
3074
3106
  const html = getDocumentElement(element);
@@ -3086,6 +3118,19 @@ function getViewportRect(element, strategy) {
3086
3118
  y2 = visualViewport.offsetTop;
3087
3119
  }
3088
3120
  }
3121
+ const windowScrollbarX = getWindowScrollBarX(html);
3122
+ if (windowScrollbarX <= 0) {
3123
+ const doc = html.ownerDocument;
3124
+ const body = doc.body;
3125
+ const bodyStyles = getComputedStyle(body);
3126
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
3127
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
3128
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
3129
+ width -= clippingStableScrollbarWidth;
3130
+ }
3131
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
3132
+ width += windowScrollbarX;
3133
+ }
3089
3134
  return {
3090
3135
  width,
3091
3136
  height,
@@ -3120,9 +3165,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
3120
3165
  } else {
3121
3166
  const visualOffsets = getVisualOffsets(element);
3122
3167
  rect = {
3123
- ...clippingAncestor,
3124
3168
  x: clippingAncestor.x - visualOffsets.x,
3125
- y: clippingAncestor.y - visualOffsets.y
3169
+ y: clippingAncestor.y - visualOffsets.y,
3170
+ width: clippingAncestor.width,
3171
+ height: clippingAncestor.height
3126
3172
  };
3127
3173
  }
3128
3174
  return rectToClientRect(rect);
@@ -3149,7 +3195,7 @@ function getClippingElementAncestors(element, cache) {
3149
3195
  if (!currentNodeIsContaining && computedStyle.position === "fixed") {
3150
3196
  currentContainingBlockComputedStyle = null;
3151
3197
  }
3152
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
3198
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
3153
3199
  if (shouldDropCurrentNode) {
3154
3200
  result = result.filter((ancestor) => ancestor !== currentNode);
3155
3201
  } else {
@@ -3169,20 +3215,23 @@ function getClippingRect(_ref) {
3169
3215
  } = _ref;
3170
3216
  const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
3171
3217
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
3172
- const firstClippingAncestor = clippingAncestors[0];
3173
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
3174
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
3175
- accRect.top = max(rect.top, accRect.top);
3176
- accRect.right = min(rect.right, accRect.right);
3177
- accRect.bottom = min(rect.bottom, accRect.bottom);
3178
- accRect.left = max(rect.left, accRect.left);
3179
- return accRect;
3180
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
3218
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
3219
+ let top = firstRect.top;
3220
+ let right = firstRect.right;
3221
+ let bottom = firstRect.bottom;
3222
+ let left = firstRect.left;
3223
+ for (let i2 = 1; i2 < clippingAncestors.length; i2++) {
3224
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i2], strategy);
3225
+ top = max(rect.top, top);
3226
+ right = min(rect.right, right);
3227
+ bottom = min(rect.bottom, bottom);
3228
+ left = max(rect.left, left);
3229
+ }
3181
3230
  return {
3182
- width: clippingRect.right - clippingRect.left,
3183
- height: clippingRect.bottom - clippingRect.top,
3184
- x: clippingRect.left,
3185
- y: clippingRect.top
3231
+ width: right - left,
3232
+ height: bottom - top,
3233
+ x: left,
3234
+ y: top
3186
3235
  };
3187
3236
  }
3188
3237
  function getDimensions(element) {
@@ -3205,6 +3254,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
3205
3254
  scrollTop: 0
3206
3255
  };
3207
3256
  const offsets = createCoords(0);
3257
+ function setLeftRTLScrollbarOffset() {
3258
+ offsets.x = getWindowScrollBarX(documentElement);
3259
+ }
3208
3260
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
3209
3261
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3210
3262
  scroll = getNodeScroll(offsetParent);
@@ -3214,11 +3266,15 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
3214
3266
  offsets.x = offsetRect.x + offsetParent.clientLeft;
3215
3267
  offsets.y = offsetRect.y + offsetParent.clientTop;
3216
3268
  } else if (documentElement) {
3217
- offsets.x = getWindowScrollBarX(documentElement);
3269
+ setLeftRTLScrollbarOffset();
3218
3270
  }
3219
3271
  }
3220
- const x2 = rect.left + scroll.scrollLeft - offsets.x;
3221
- const y2 = rect.top + scroll.scrollTop - offsets.y;
3272
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
3273
+ setLeftRTLScrollbarOffset();
3274
+ }
3275
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3276
+ const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
3277
+ const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
3222
3278
  return {
3223
3279
  x: x2,
3224
3280
  y: y2,
@@ -3236,7 +3292,11 @@ function getTrueOffsetParent(element, polyfill) {
3236
3292
  if (polyfill) {
3237
3293
  return polyfill(element);
3238
3294
  }
3239
- return element.offsetParent;
3295
+ let rawOffsetParent = element.offsetParent;
3296
+ if (getDocumentElement(element) === rawOffsetParent) {
3297
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
3298
+ }
3299
+ return rawOffsetParent;
3240
3300
  }
3241
3301
  function getOffsetParent(element, polyfill) {
3242
3302
  const win = getWindow(element);
@@ -3291,6 +3351,9 @@ const platform = {
3291
3351
  isElement,
3292
3352
  isRTL
3293
3353
  };
3354
+ function rectsAreEqual(a2, b2) {
3355
+ return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
3356
+ }
3294
3357
  function observeMove(element, onMove) {
3295
3358
  let io = null;
3296
3359
  let timeoutId;
@@ -3309,12 +3372,13 @@ function observeMove(element, onMove) {
3309
3372
  threshold = 1;
3310
3373
  }
3311
3374
  cleanup();
3375
+ const elementRectForRootMargin = element.getBoundingClientRect();
3312
3376
  const {
3313
3377
  left,
3314
3378
  top,
3315
3379
  width,
3316
3380
  height
3317
- } = element.getBoundingClientRect();
3381
+ } = elementRectForRootMargin;
3318
3382
  if (!skip) {
3319
3383
  onMove();
3320
3384
  }
@@ -3345,6 +3409,9 @@ function observeMove(element, onMove) {
3345
3409
  refresh(false, ratio);
3346
3410
  }
3347
3411
  }
3412
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
3413
+ refresh();
3414
+ }
3348
3415
  isFirstUpdate = false;
3349
3416
  }
3350
3417
  try {
@@ -3353,7 +3420,7 @@ function observeMove(element, onMove) {
3353
3420
  // Handle <iframe>s
3354
3421
  root: root.ownerDocument
3355
3422
  });
3356
- } catch (e2) {
3423
+ } catch (_e) {
3357
3424
  io = new IntersectionObserver(handleObserve, options2);
3358
3425
  }
3359
3426
  io.observe(element);
@@ -3373,7 +3440,7 @@ function autoUpdate(reference, floating, update, options2) {
3373
3440
  animationFrame = false
3374
3441
  } = options2;
3375
3442
  const referenceEl = unwrapElement(reference);
3376
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
3443
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
3377
3444
  ancestors.forEach((ancestor) => {
3378
3445
  ancestorScroll && ancestor.addEventListener("scroll", update, {
3379
3446
  passive: true
@@ -3386,7 +3453,7 @@ function autoUpdate(reference, floating, update, options2) {
3386
3453
  if (elementResize) {
3387
3454
  resizeObserver = new ResizeObserver((_ref) => {
3388
3455
  let [firstEntry] = _ref;
3389
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
3456
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
3390
3457
  resizeObserver.unobserve(floating);
3391
3458
  cancelAnimationFrame(reobserveFrame);
3392
3459
  reobserveFrame = requestAnimationFrame(() => {
@@ -3399,7 +3466,9 @@ function autoUpdate(reference, floating, update, options2) {
3399
3466
  if (referenceEl && !animationFrame) {
3400
3467
  resizeObserver.observe(referenceEl);
3401
3468
  }
3402
- resizeObserver.observe(floating);
3469
+ if (floating) {
3470
+ resizeObserver.observe(floating);
3471
+ }
3403
3472
  }
3404
3473
  let frameId;
3405
3474
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -3408,7 +3477,7 @@ function autoUpdate(reference, floating, update, options2) {
3408
3477
  }
3409
3478
  function frameLoop() {
3410
3479
  const nextRefRect = getBoundingClientRect(reference);
3411
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
3480
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
3412
3481
  update();
3413
3482
  }
3414
3483
  prevRefRect = nextRefRect;
@@ -5411,52 +5480,62 @@ var designTokens = () => {
5411
5480
  };
5412
5481
  };
5413
5482
  const [black, white, transparent] = ["oklch(0 0 0)", "oklch(100 0 0)", "transparent"];
5414
- const tokens = designTokens().core(({ theme }) => ({
5415
- color: {
5416
- transparent,
5417
- black,
5418
- white,
5419
- lowest: theme.mode === "light" ? white : black,
5420
- highest: theme.mode === "light" ? black : white,
5421
- ...generatePalette({
5422
- prefix: "a-",
5423
- hue: theme.accent.hue,
5424
- chroma: theme.accent.chroma,
5425
- mode: theme.mode,
5426
- transform: sameAsInput
5427
- }),
5428
- ...generatePalette({
5429
- prefix: "n-",
5430
- hue: theme.accent.hue,
5431
- chroma: 0.05,
5432
- mode: theme.mode,
5433
- transform: sameAsInput
5434
- }),
5435
- ...generatePalette({
5436
- prefix: "p-",
5437
- hue: theme.positive.hue,
5438
- chroma: theme.positive.chroma,
5439
- mode: theme.mode,
5440
- transform: sameAsInput
5441
- }),
5442
- ...generatePalette({
5443
- prefix: "e-",
5444
- hue: theme.negative.hue,
5445
- chroma: theme.negative.chroma,
5446
- mode: theme.mode,
5447
- transform: sameAsInput
5448
- })
5449
- },
5450
- radius: {
5451
- base: theme.corners === "rounded" ? ".25rem" : theme.corners === "soft" ? ".125rem" : "0",
5452
- multiplier: theme.corners === "rounded" ? "0.5rem" : theme.corners === "soft" ? "0.175rem" : "0"
5453
- },
5454
- duration: {
5455
- snappy: ".4s",
5456
- medium: ".6s",
5457
- slow: ".9s"
5458
- }
5459
- })).semantic(({ core }) => ({
5483
+ const tokens = designTokens().core(({ theme }) => {
5484
+ const accent = generatePalette({
5485
+ prefix: "a-",
5486
+ hue: theme.accent.hue,
5487
+ chroma: theme.accent.chroma,
5488
+ mode: theme.mode,
5489
+ transform: sameAsInput
5490
+ });
5491
+ const exact = theme.exactAccent;
5492
+ return {
5493
+ color: {
5494
+ transparent,
5495
+ black,
5496
+ white,
5497
+ lowest: theme.mode === "light" ? white : black,
5498
+ highest: theme.mode === "light" ? black : white,
5499
+ ...accent,
5500
+ /** The solid accent fill (the submit button), pressed, and its text. An exact accent lands unchanged here only:
5501
+ * text and focus rings keep the palette's contrast-controlled shades. */
5502
+ "a-solid": (exact == null ? void 0 : exact.color) ?? accent["a-9"],
5503
+ "a-solid-pressed": exact ? `color-mix(in oklab, ${exact.color} 88%, black)` : theme.mode === "light" ? accent["a-10"] : accent["a-8"],
5504
+ "on-a": (exact == null ? void 0 : exact.text) ?? (theme.mode === "light" ? accent["a-1"] : white),
5505
+ ...generatePalette({
5506
+ prefix: "n-",
5507
+ hue: theme.accent.hue,
5508
+ // An achromatic accent gets achromatic neutrals; otherwise neutrals carry a faint tint of the accent hue.
5509
+ chroma: theme.accent.chroma === 0 ? 0 : 0.05,
5510
+ mode: theme.mode,
5511
+ transform: sameAsInput
5512
+ }),
5513
+ ...generatePalette({
5514
+ prefix: "p-",
5515
+ hue: theme.positive.hue,
5516
+ chroma: theme.positive.chroma,
5517
+ mode: theme.mode,
5518
+ transform: sameAsInput
5519
+ }),
5520
+ ...generatePalette({
5521
+ prefix: "e-",
5522
+ hue: theme.negative.hue,
5523
+ chroma: theme.negative.chroma,
5524
+ mode: theme.mode,
5525
+ transform: sameAsInput
5526
+ })
5527
+ },
5528
+ radius: {
5529
+ base: theme.corners === "rounded" ? ".25rem" : theme.corners === "soft" ? ".125rem" : "0",
5530
+ multiplier: theme.corners === "rounded" ? "0.5rem" : theme.corners === "soft" ? "0.175rem" : "0"
5531
+ },
5532
+ duration: {
5533
+ snappy: ".4s",
5534
+ medium: ".6s",
5535
+ slow: ".9s"
5536
+ }
5537
+ };
5538
+ }).semantic(({ core }) => ({
5460
5539
  radius: {
5461
5540
  sm: `calc(${core("radius.base")} + (0 * ${core("radius.multiplier")}))`,
5462
5541
  md: `calc(${core("radius.base")} + (1 * ${core("radius.multiplier")}))`,
@@ -5688,7 +5767,7 @@ const CommentForm = ({
5688
5767
  "button",
5689
5768
  {
5690
5769
  onTouchStart: noop,
5691
- class: "bg-accent-9 active:bg-accent-10 theme-dark:active:bg-accent-8 fr ease-expo-out duration-snappy text-accent-1 theme-dark:text-highest grid items-center overflow-hidden rounded-lg px-5 py-2 pl-2.5 text-center transition-all hover:scale-[1.02] active:scale-[.97]",
5770
+ class: "bg-accent-solid active:bg-accent-solid-pressed fr ease-expo-out duration-snappy text-on-accent grid items-center overflow-hidden rounded-lg px-5 py-2 pl-2.5 text-center transition-all hover:scale-[1.02] active:scale-[.97]",
5692
5771
  children: submission.state === "submitting" ? t2("submitting") : t2("submit")
5693
5772
  }
5694
5773
  ),
@@ -6170,8 +6249,8 @@ const tailwind = `[data-widget='inploi-feedback'] {
6170
6249
  border-width: 1px;
6171
6250
  }
6172
6251
 
6173
- [data-widget='inploi-feedback'] .bg-accent-9 {
6174
- background-color: var(--i-color-a-9);
6252
+ [data-widget='inploi-feedback'] .bg-accent-solid {
6253
+ background-color: var(--i-color-a-solid);
6175
6254
  }
6176
6255
 
6177
6256
  [data-widget='inploi-feedback'] .bg-lowest {
@@ -6289,10 +6368,6 @@ const tailwind = `[data-widget='inploi-feedback'] {
6289
6368
  letter-spacing: -0.025em;
6290
6369
  }
6291
6370
 
6292
- [data-widget='inploi-feedback'] .text-accent-1 {
6293
- color: var(--i-color-a-1);
6294
- }
6295
-
6296
6371
  [data-widget='inploi-feedback'] .text-accent-10 {
6297
6372
  color: var(--i-color-a-10);
6298
6373
  }
@@ -6309,6 +6384,10 @@ const tailwind = `[data-widget='inploi-feedback'] {
6309
6384
  color: var(--i-color-n-12);
6310
6385
  }
6311
6386
 
6387
+ [data-widget='inploi-feedback'] .text-on-accent {
6388
+ color: var(--i-color-on-a);
6389
+ }
6390
+
6312
6391
  [data-widget='inploi-feedback'] .underline {
6313
6392
  text-decoration-line: underline;
6314
6393
  }
@@ -6344,6 +6423,12 @@ const tailwind = `[data-widget='inploi-feedback'] {
6344
6423
  outline-style: solid;
6345
6424
  }
6346
6425
 
6426
+ [data-widget='inploi-feedback'] .ring {
6427
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
6428
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
6429
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
6430
+ }
6431
+
6347
6432
  [data-widget='inploi-feedback'] .ring-1 {
6348
6433
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
6349
6434
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
@@ -6516,8 +6601,8 @@ const tailwind = `[data-widget='inploi-feedback'] {
6516
6601
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
6517
6602
  }
6518
6603
 
6519
- [data-widget='inploi-feedback'] .active\\:bg-accent-10:active {
6520
- background-color: var(--i-color-a-10);
6604
+ [data-widget='inploi-feedback'] .active\\:bg-accent-solid-pressed:active {
6605
+ background-color: var(--i-color-a-solid-pressed);
6521
6606
  }
6522
6607
 
6523
6608
  [data-widget='inploi-feedback'] .aria-\\[pressed\\=true\\]\\:text-negative-11[aria-pressed="true"] {
@@ -6555,14 +6640,6 @@ const tailwind = `[data-widget='inploi-feedback'] {
6555
6640
  color: var(--i-color-a-10);
6556
6641
  }
6557
6642
 
6558
- [data-widget='inploi-feedback'] .dark .theme-dark\\:text-highest {
6559
- color: var(--i-color-highest);
6560
- }
6561
-
6562
- [data-widget='inploi-feedback'] .dark .theme-dark\\:active\\:bg-accent-8:active {
6563
- background-color: var(--i-color-a-8);
6564
- }
6565
-
6566
6643
  [data-widget='inploi-feedback'] .rounded .theme-rounded\\:rounded-sm {
6567
6644
  border-radius: var(--i-radius-sm);
6568
6645
  }
@@ -6651,6 +6728,7 @@ const createFeedbackDomManager = (logger) => {
6651
6728
  const feedbackPlugin = () => sdk.createPlugin(({ apiClient, logger, analytics }) => {
6652
6729
  const dom = createFeedbackDomManager(logger);
6653
6730
  let prerendered = false;
6731
+ const targets = /* @__PURE__ */ new Set();
6654
6732
  const App = ({ params }) => {
6655
6733
  return _$2(k$3, {}, [
6656
6734
  [
@@ -6678,7 +6756,15 @@ const feedbackPlugin = () => sdk.createPlugin(({ apiClient, logger, analytics })
6678
6756
  typeof window !== "undefined",
6679
6757
  "the `render` method of JobSearch cannot be called in non-browser environments. Use `prerender` instead."
6680
6758
  );
6681
- fn2(_$2(App, { params }), dom.getRenderTargetElement(params.key));
6759
+ const target = params.target ?? dom.getRenderTargetElement(params.key);
6760
+ targets.add(target);
6761
+ fn2(_$2(App, { params }), target);
6762
+ },
6763
+ /** Release components, portals and document listeners when an owning widget unmounts. */
6764
+ destroy: () => {
6765
+ for (const target of targets)
6766
+ J$1(null, target);
6767
+ targets.clear();
6682
6768
  },
6683
6769
  "~brand": "@inploi/plugin-feedback"
6684
6770
  };