@getlupa/client 1.10.3 → 1.11.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.
@@ -102,6 +102,10 @@ const looseToNumber = (val) => {
102
102
  const n = parseFloat(val);
103
103
  return isNaN(n) ? val : n;
104
104
  };
105
+ const toNumber = (val) => {
106
+ const n = isString(val) ? Number(val) : NaN;
107
+ return isNaN(n) ? val : n;
108
+ };
105
109
  let _globalThis;
106
110
  const getGlobalThis = () => {
107
111
  return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
@@ -2000,6 +2004,319 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2000
2004
  }
2001
2005
  }
2002
2006
  }
2007
+ function useTransitionState() {
2008
+ const state = {
2009
+ isMounted: false,
2010
+ isLeaving: false,
2011
+ isUnmounting: false,
2012
+ leavingVNodes: /* @__PURE__ */ new Map()
2013
+ };
2014
+ onMounted(() => {
2015
+ state.isMounted = true;
2016
+ });
2017
+ onBeforeUnmount(() => {
2018
+ state.isUnmounting = true;
2019
+ });
2020
+ return state;
2021
+ }
2022
+ const TransitionHookValidator = [Function, Array];
2023
+ const BaseTransitionPropsValidators = {
2024
+ mode: String,
2025
+ appear: Boolean,
2026
+ persisted: Boolean,
2027
+ // enter
2028
+ onBeforeEnter: TransitionHookValidator,
2029
+ onEnter: TransitionHookValidator,
2030
+ onAfterEnter: TransitionHookValidator,
2031
+ onEnterCancelled: TransitionHookValidator,
2032
+ // leave
2033
+ onBeforeLeave: TransitionHookValidator,
2034
+ onLeave: TransitionHookValidator,
2035
+ onAfterLeave: TransitionHookValidator,
2036
+ onLeaveCancelled: TransitionHookValidator,
2037
+ // appear
2038
+ onBeforeAppear: TransitionHookValidator,
2039
+ onAppear: TransitionHookValidator,
2040
+ onAfterAppear: TransitionHookValidator,
2041
+ onAppearCancelled: TransitionHookValidator
2042
+ };
2043
+ const BaseTransitionImpl = {
2044
+ name: `BaseTransition`,
2045
+ props: BaseTransitionPropsValidators,
2046
+ setup(props, { slots }) {
2047
+ const instance = getCurrentInstance();
2048
+ const state = useTransitionState();
2049
+ let prevTransitionKey;
2050
+ return () => {
2051
+ const children = slots.default && getTransitionRawChildren(slots.default(), true);
2052
+ if (!children || !children.length) {
2053
+ return;
2054
+ }
2055
+ let child = children[0];
2056
+ if (children.length > 1) {
2057
+ for (const c2 of children) {
2058
+ if (c2.type !== Comment) {
2059
+ child = c2;
2060
+ break;
2061
+ }
2062
+ }
2063
+ }
2064
+ const rawProps = toRaw(props);
2065
+ const { mode } = rawProps;
2066
+ if (state.isLeaving) {
2067
+ return emptyPlaceholder(child);
2068
+ }
2069
+ const innerChild = getKeepAliveChild(child);
2070
+ if (!innerChild) {
2071
+ return emptyPlaceholder(child);
2072
+ }
2073
+ const enterHooks = resolveTransitionHooks(
2074
+ innerChild,
2075
+ rawProps,
2076
+ state,
2077
+ instance
2078
+ );
2079
+ setTransitionHooks(innerChild, enterHooks);
2080
+ const oldChild = instance.subTree;
2081
+ const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
2082
+ let transitionKeyChanged = false;
2083
+ const { getTransitionKey } = innerChild.type;
2084
+ if (getTransitionKey) {
2085
+ const key = getTransitionKey();
2086
+ if (prevTransitionKey === void 0) {
2087
+ prevTransitionKey = key;
2088
+ } else if (key !== prevTransitionKey) {
2089
+ prevTransitionKey = key;
2090
+ transitionKeyChanged = true;
2091
+ }
2092
+ }
2093
+ if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
2094
+ const leavingHooks = resolveTransitionHooks(
2095
+ oldInnerChild,
2096
+ rawProps,
2097
+ state,
2098
+ instance
2099
+ );
2100
+ setTransitionHooks(oldInnerChild, leavingHooks);
2101
+ if (mode === "out-in") {
2102
+ state.isLeaving = true;
2103
+ leavingHooks.afterLeave = () => {
2104
+ state.isLeaving = false;
2105
+ if (instance.update.active !== false) {
2106
+ instance.update();
2107
+ }
2108
+ };
2109
+ return emptyPlaceholder(child);
2110
+ } else if (mode === "in-out" && innerChild.type !== Comment) {
2111
+ leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
2112
+ const leavingVNodesCache = getLeavingNodesForType(
2113
+ state,
2114
+ oldInnerChild
2115
+ );
2116
+ leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
2117
+ el._leaveCb = () => {
2118
+ earlyRemove();
2119
+ el._leaveCb = void 0;
2120
+ delete enterHooks.delayedLeave;
2121
+ };
2122
+ enterHooks.delayedLeave = delayedLeave;
2123
+ };
2124
+ }
2125
+ }
2126
+ return child;
2127
+ };
2128
+ }
2129
+ };
2130
+ const BaseTransition = BaseTransitionImpl;
2131
+ function getLeavingNodesForType(state, vnode) {
2132
+ const { leavingVNodes } = state;
2133
+ let leavingVNodesCache = leavingVNodes.get(vnode.type);
2134
+ if (!leavingVNodesCache) {
2135
+ leavingVNodesCache = /* @__PURE__ */ Object.create(null);
2136
+ leavingVNodes.set(vnode.type, leavingVNodesCache);
2137
+ }
2138
+ return leavingVNodesCache;
2139
+ }
2140
+ function resolveTransitionHooks(vnode, props, state, instance) {
2141
+ const {
2142
+ appear,
2143
+ mode,
2144
+ persisted = false,
2145
+ onBeforeEnter,
2146
+ onEnter,
2147
+ onAfterEnter,
2148
+ onEnterCancelled,
2149
+ onBeforeLeave,
2150
+ onLeave,
2151
+ onAfterLeave,
2152
+ onLeaveCancelled,
2153
+ onBeforeAppear,
2154
+ onAppear,
2155
+ onAfterAppear,
2156
+ onAppearCancelled
2157
+ } = props;
2158
+ const key = String(vnode.key);
2159
+ const leavingVNodesCache = getLeavingNodesForType(state, vnode);
2160
+ const callHook2 = (hook, args) => {
2161
+ hook && callWithAsyncErrorHandling(
2162
+ hook,
2163
+ instance,
2164
+ 9,
2165
+ args
2166
+ );
2167
+ };
2168
+ const callAsyncHook = (hook, args) => {
2169
+ const done = args[1];
2170
+ callHook2(hook, args);
2171
+ if (isArray(hook)) {
2172
+ if (hook.every((hook2) => hook2.length <= 1))
2173
+ done();
2174
+ } else if (hook.length <= 1) {
2175
+ done();
2176
+ }
2177
+ };
2178
+ const hooks = {
2179
+ mode,
2180
+ persisted,
2181
+ beforeEnter(el) {
2182
+ let hook = onBeforeEnter;
2183
+ if (!state.isMounted) {
2184
+ if (appear) {
2185
+ hook = onBeforeAppear || onBeforeEnter;
2186
+ } else {
2187
+ return;
2188
+ }
2189
+ }
2190
+ if (el._leaveCb) {
2191
+ el._leaveCb(
2192
+ true
2193
+ /* cancelled */
2194
+ );
2195
+ }
2196
+ const leavingVNode = leavingVNodesCache[key];
2197
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
2198
+ leavingVNode.el._leaveCb();
2199
+ }
2200
+ callHook2(hook, [el]);
2201
+ },
2202
+ enter(el) {
2203
+ let hook = onEnter;
2204
+ let afterHook = onAfterEnter;
2205
+ let cancelHook = onEnterCancelled;
2206
+ if (!state.isMounted) {
2207
+ if (appear) {
2208
+ hook = onAppear || onEnter;
2209
+ afterHook = onAfterAppear || onAfterEnter;
2210
+ cancelHook = onAppearCancelled || onEnterCancelled;
2211
+ } else {
2212
+ return;
2213
+ }
2214
+ }
2215
+ let called = false;
2216
+ const done = el._enterCb = (cancelled) => {
2217
+ if (called)
2218
+ return;
2219
+ called = true;
2220
+ if (cancelled) {
2221
+ callHook2(cancelHook, [el]);
2222
+ } else {
2223
+ callHook2(afterHook, [el]);
2224
+ }
2225
+ if (hooks.delayedLeave) {
2226
+ hooks.delayedLeave();
2227
+ }
2228
+ el._enterCb = void 0;
2229
+ };
2230
+ if (hook) {
2231
+ callAsyncHook(hook, [el, done]);
2232
+ } else {
2233
+ done();
2234
+ }
2235
+ },
2236
+ leave(el, remove2) {
2237
+ const key2 = String(vnode.key);
2238
+ if (el._enterCb) {
2239
+ el._enterCb(
2240
+ true
2241
+ /* cancelled */
2242
+ );
2243
+ }
2244
+ if (state.isUnmounting) {
2245
+ return remove2();
2246
+ }
2247
+ callHook2(onBeforeLeave, [el]);
2248
+ let called = false;
2249
+ const done = el._leaveCb = (cancelled) => {
2250
+ if (called)
2251
+ return;
2252
+ called = true;
2253
+ remove2();
2254
+ if (cancelled) {
2255
+ callHook2(onLeaveCancelled, [el]);
2256
+ } else {
2257
+ callHook2(onAfterLeave, [el]);
2258
+ }
2259
+ el._leaveCb = void 0;
2260
+ if (leavingVNodesCache[key2] === vnode) {
2261
+ delete leavingVNodesCache[key2];
2262
+ }
2263
+ };
2264
+ leavingVNodesCache[key2] = vnode;
2265
+ if (onLeave) {
2266
+ callAsyncHook(onLeave, [el, done]);
2267
+ } else {
2268
+ done();
2269
+ }
2270
+ },
2271
+ clone(vnode2) {
2272
+ return resolveTransitionHooks(vnode2, props, state, instance);
2273
+ }
2274
+ };
2275
+ return hooks;
2276
+ }
2277
+ function emptyPlaceholder(vnode) {
2278
+ if (isKeepAlive(vnode)) {
2279
+ vnode = cloneVNode(vnode);
2280
+ vnode.children = null;
2281
+ return vnode;
2282
+ }
2283
+ }
2284
+ function getKeepAliveChild(vnode) {
2285
+ return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
2286
+ }
2287
+ function setTransitionHooks(vnode, hooks) {
2288
+ if (vnode.shapeFlag & 6 && vnode.component) {
2289
+ setTransitionHooks(vnode.component.subTree, hooks);
2290
+ } else if (vnode.shapeFlag & 128) {
2291
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
2292
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
2293
+ } else {
2294
+ vnode.transition = hooks;
2295
+ }
2296
+ }
2297
+ function getTransitionRawChildren(children, keepComment = false, parentKey) {
2298
+ let ret = [];
2299
+ let keyedFragmentCount = 0;
2300
+ for (let i = 0; i < children.length; i++) {
2301
+ let child = children[i];
2302
+ const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
2303
+ if (child.type === Fragment) {
2304
+ if (child.patchFlag & 128)
2305
+ keyedFragmentCount++;
2306
+ ret = ret.concat(
2307
+ getTransitionRawChildren(child.children, keepComment, key)
2308
+ );
2309
+ } else if (keepComment || child.type !== Comment) {
2310
+ ret.push(key != null ? cloneVNode(child, { key }) : child);
2311
+ }
2312
+ }
2313
+ if (keyedFragmentCount > 1) {
2314
+ for (let i = 0; i < ret.length; i++) {
2315
+ ret[i].patchFlag = -2;
2316
+ }
2317
+ }
2318
+ return ret;
2319
+ }
2003
2320
  function defineComponent(options, extraOptions) {
2004
2321
  return isFunction(options) ? (
2005
2322
  // #8326: extend call and options.name access are considered side-effects
@@ -2371,7 +2688,7 @@ function applyOptions(instance) {
2371
2688
  const ctx = instance.ctx;
2372
2689
  shouldCacheAccess = false;
2373
2690
  if (options.beforeCreate) {
2374
- callHook(options.beforeCreate, instance, "bc");
2691
+ callHook$1(options.beforeCreate, instance, "bc");
2375
2692
  }
2376
2693
  const {
2377
2694
  // state
@@ -2458,7 +2775,7 @@ function applyOptions(instance) {
2458
2775
  });
2459
2776
  }
2460
2777
  if (created) {
2461
- callHook(created, instance, "c");
2778
+ callHook$1(created, instance, "c");
2462
2779
  }
2463
2780
  function registerLifecycleHook(register, hook) {
2464
2781
  if (isArray(hook)) {
@@ -2536,7 +2853,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
2536
2853
  }
2537
2854
  }
2538
2855
  }
2539
- function callHook(hook, instance, type) {
2856
+ function callHook$1(hook, instance, type) {
2540
2857
  callWithAsyncErrorHandling(
2541
2858
  isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
2542
2859
  instance,
@@ -5038,6 +5355,7 @@ function createComponentInstance(vnode, parent, suspense) {
5038
5355
  return instance;
5039
5356
  }
5040
5357
  let currentInstance = null;
5358
+ const getCurrentInstance = () => currentInstance || currentRenderingInstance;
5041
5359
  let internalSetCurrentInstance;
5042
5360
  let globalCurrentInstanceSetters;
5043
5361
  let settersKey = "__VUE_INSTANCE_SETTERS__";
@@ -5568,6 +5886,268 @@ function shouldSetAsProp(el, key, value, isSVG) {
5568
5886
  }
5569
5887
  return key in el;
5570
5888
  }
5889
+ const TRANSITION = "transition";
5890
+ const ANIMATION = "animation";
5891
+ const Transition = (props, { slots }) => h$1(BaseTransition, resolveTransitionProps(props), slots);
5892
+ Transition.displayName = "Transition";
5893
+ const DOMTransitionPropsValidators = {
5894
+ name: String,
5895
+ type: String,
5896
+ css: {
5897
+ type: Boolean,
5898
+ default: true
5899
+ },
5900
+ duration: [String, Number, Object],
5901
+ enterFromClass: String,
5902
+ enterActiveClass: String,
5903
+ enterToClass: String,
5904
+ appearFromClass: String,
5905
+ appearActiveClass: String,
5906
+ appearToClass: String,
5907
+ leaveFromClass: String,
5908
+ leaveActiveClass: String,
5909
+ leaveToClass: String
5910
+ };
5911
+ Transition.props = /* @__PURE__ */ extend(
5912
+ {},
5913
+ BaseTransitionPropsValidators,
5914
+ DOMTransitionPropsValidators
5915
+ );
5916
+ const callHook = (hook, args = []) => {
5917
+ if (isArray(hook)) {
5918
+ hook.forEach((h2) => h2(...args));
5919
+ } else if (hook) {
5920
+ hook(...args);
5921
+ }
5922
+ };
5923
+ const hasExplicitCallback = (hook) => {
5924
+ return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
5925
+ };
5926
+ function resolveTransitionProps(rawProps) {
5927
+ const baseProps = {};
5928
+ for (const key in rawProps) {
5929
+ if (!(key in DOMTransitionPropsValidators)) {
5930
+ baseProps[key] = rawProps[key];
5931
+ }
5932
+ }
5933
+ if (rawProps.css === false) {
5934
+ return baseProps;
5935
+ }
5936
+ const {
5937
+ name = "v",
5938
+ type,
5939
+ duration,
5940
+ enterFromClass = `${name}-enter-from`,
5941
+ enterActiveClass = `${name}-enter-active`,
5942
+ enterToClass = `${name}-enter-to`,
5943
+ appearFromClass = enterFromClass,
5944
+ appearActiveClass = enterActiveClass,
5945
+ appearToClass = enterToClass,
5946
+ leaveFromClass = `${name}-leave-from`,
5947
+ leaveActiveClass = `${name}-leave-active`,
5948
+ leaveToClass = `${name}-leave-to`
5949
+ } = rawProps;
5950
+ const durations = normalizeDuration(duration);
5951
+ const enterDuration = durations && durations[0];
5952
+ const leaveDuration = durations && durations[1];
5953
+ const {
5954
+ onBeforeEnter,
5955
+ onEnter,
5956
+ onEnterCancelled,
5957
+ onLeave,
5958
+ onLeaveCancelled,
5959
+ onBeforeAppear = onBeforeEnter,
5960
+ onAppear = onEnter,
5961
+ onAppearCancelled = onEnterCancelled
5962
+ } = baseProps;
5963
+ const finishEnter = (el, isAppear, done) => {
5964
+ removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
5965
+ removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
5966
+ done && done();
5967
+ };
5968
+ const finishLeave = (el, done) => {
5969
+ el._isLeaving = false;
5970
+ removeTransitionClass(el, leaveFromClass);
5971
+ removeTransitionClass(el, leaveToClass);
5972
+ removeTransitionClass(el, leaveActiveClass);
5973
+ done && done();
5974
+ };
5975
+ const makeEnterHook = (isAppear) => {
5976
+ return (el, done) => {
5977
+ const hook = isAppear ? onAppear : onEnter;
5978
+ const resolve2 = () => finishEnter(el, isAppear, done);
5979
+ callHook(hook, [el, resolve2]);
5980
+ nextFrame(() => {
5981
+ removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
5982
+ addTransitionClass(el, isAppear ? appearToClass : enterToClass);
5983
+ if (!hasExplicitCallback(hook)) {
5984
+ whenTransitionEnds(el, type, enterDuration, resolve2);
5985
+ }
5986
+ });
5987
+ };
5988
+ };
5989
+ return extend(baseProps, {
5990
+ onBeforeEnter(el) {
5991
+ callHook(onBeforeEnter, [el]);
5992
+ addTransitionClass(el, enterFromClass);
5993
+ addTransitionClass(el, enterActiveClass);
5994
+ },
5995
+ onBeforeAppear(el) {
5996
+ callHook(onBeforeAppear, [el]);
5997
+ addTransitionClass(el, appearFromClass);
5998
+ addTransitionClass(el, appearActiveClass);
5999
+ },
6000
+ onEnter: makeEnterHook(false),
6001
+ onAppear: makeEnterHook(true),
6002
+ onLeave(el, done) {
6003
+ el._isLeaving = true;
6004
+ const resolve2 = () => finishLeave(el, done);
6005
+ addTransitionClass(el, leaveFromClass);
6006
+ forceReflow();
6007
+ addTransitionClass(el, leaveActiveClass);
6008
+ nextFrame(() => {
6009
+ if (!el._isLeaving) {
6010
+ return;
6011
+ }
6012
+ removeTransitionClass(el, leaveFromClass);
6013
+ addTransitionClass(el, leaveToClass);
6014
+ if (!hasExplicitCallback(onLeave)) {
6015
+ whenTransitionEnds(el, type, leaveDuration, resolve2);
6016
+ }
6017
+ });
6018
+ callHook(onLeave, [el, resolve2]);
6019
+ },
6020
+ onEnterCancelled(el) {
6021
+ finishEnter(el, false);
6022
+ callHook(onEnterCancelled, [el]);
6023
+ },
6024
+ onAppearCancelled(el) {
6025
+ finishEnter(el, true);
6026
+ callHook(onAppearCancelled, [el]);
6027
+ },
6028
+ onLeaveCancelled(el) {
6029
+ finishLeave(el);
6030
+ callHook(onLeaveCancelled, [el]);
6031
+ }
6032
+ });
6033
+ }
6034
+ function normalizeDuration(duration) {
6035
+ if (duration == null) {
6036
+ return null;
6037
+ } else if (isObject(duration)) {
6038
+ return [NumberOf(duration.enter), NumberOf(duration.leave)];
6039
+ } else {
6040
+ const n = NumberOf(duration);
6041
+ return [n, n];
6042
+ }
6043
+ }
6044
+ function NumberOf(val) {
6045
+ const res = toNumber(val);
6046
+ return res;
6047
+ }
6048
+ function addTransitionClass(el, cls) {
6049
+ cls.split(/\s+/).forEach((c2) => c2 && el.classList.add(c2));
6050
+ (el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
6051
+ }
6052
+ function removeTransitionClass(el, cls) {
6053
+ cls.split(/\s+/).forEach((c2) => c2 && el.classList.remove(c2));
6054
+ const { _vtc } = el;
6055
+ if (_vtc) {
6056
+ _vtc.delete(cls);
6057
+ if (!_vtc.size) {
6058
+ el._vtc = void 0;
6059
+ }
6060
+ }
6061
+ }
6062
+ function nextFrame(cb) {
6063
+ requestAnimationFrame(() => {
6064
+ requestAnimationFrame(cb);
6065
+ });
6066
+ }
6067
+ let endId = 0;
6068
+ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
6069
+ const id = el._endId = ++endId;
6070
+ const resolveIfNotStale = () => {
6071
+ if (id === el._endId) {
6072
+ resolve2();
6073
+ }
6074
+ };
6075
+ if (explicitTimeout) {
6076
+ return setTimeout(resolveIfNotStale, explicitTimeout);
6077
+ }
6078
+ const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
6079
+ if (!type) {
6080
+ return resolve2();
6081
+ }
6082
+ const endEvent = type + "end";
6083
+ let ended = 0;
6084
+ const end = () => {
6085
+ el.removeEventListener(endEvent, onEnd);
6086
+ resolveIfNotStale();
6087
+ };
6088
+ const onEnd = (e) => {
6089
+ if (e.target === el && ++ended >= propCount) {
6090
+ end();
6091
+ }
6092
+ };
6093
+ setTimeout(() => {
6094
+ if (ended < propCount) {
6095
+ end();
6096
+ }
6097
+ }, timeout + 1);
6098
+ el.addEventListener(endEvent, onEnd);
6099
+ }
6100
+ function getTransitionInfo(el, expectedType) {
6101
+ const styles = window.getComputedStyle(el);
6102
+ const getStyleProperties = (key) => (styles[key] || "").split(", ");
6103
+ const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
6104
+ const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
6105
+ const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
6106
+ const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
6107
+ const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
6108
+ const animationTimeout = getTimeout(animationDelays, animationDurations);
6109
+ let type = null;
6110
+ let timeout = 0;
6111
+ let propCount = 0;
6112
+ if (expectedType === TRANSITION) {
6113
+ if (transitionTimeout > 0) {
6114
+ type = TRANSITION;
6115
+ timeout = transitionTimeout;
6116
+ propCount = transitionDurations.length;
6117
+ }
6118
+ } else if (expectedType === ANIMATION) {
6119
+ if (animationTimeout > 0) {
6120
+ type = ANIMATION;
6121
+ timeout = animationTimeout;
6122
+ propCount = animationDurations.length;
6123
+ }
6124
+ } else {
6125
+ timeout = Math.max(transitionTimeout, animationTimeout);
6126
+ type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
6127
+ propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
6128
+ }
6129
+ const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
6130
+ getStyleProperties(`${TRANSITION}Property`).toString()
6131
+ );
6132
+ return {
6133
+ type,
6134
+ timeout,
6135
+ propCount,
6136
+ hasTransform
6137
+ };
6138
+ }
6139
+ function getTimeout(delays, durations) {
6140
+ while (delays.length < durations.length) {
6141
+ delays = delays.concat(delays);
6142
+ }
6143
+ return Math.max(...durations.map((d2, i) => toMs(d2) + toMs(delays[i])));
6144
+ }
6145
+ function toMs(s) {
6146
+ return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
6147
+ }
6148
+ function forceReflow() {
6149
+ return document.body.offsetHeight;
6150
+ }
5571
6151
  const getModelAssigner = (vnode) => {
5572
6152
  const fn = vnode.props["onUpdate:modelValue"] || false;
5573
6153
  return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
@@ -7863,7 +8443,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
7863
8443
  resetHighlightIndex
7864
8444
  };
7865
8445
  });
7866
- const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
8446
+ const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
7867
8447
  const _hoisted_2$P = { class: "lupa-input-clear" };
7868
8448
  const _hoisted_3$A = { id: "lupa-search-box-input" };
7869
8449
  const _hoisted_4$s = ["value"];
@@ -7872,7 +8452,7 @@ const _hoisted_6$9 = {
7872
8452
  key: 0,
7873
8453
  class: "lupa-close-label"
7874
8454
  };
7875
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
8455
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
7876
8456
  __name: "SearchBoxInput",
7877
8457
  props: {
7878
8458
  options: {},
@@ -7953,7 +8533,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
7953
8533
  };
7954
8534
  __expose({ focus });
7955
8535
  return (_ctx, _cache) => {
7956
- return openBlock(), createElementBlock("div", _hoisted_1$1d, [
8536
+ return openBlock(), createElementBlock("div", _hoisted_1$1e, [
7957
8537
  createBaseVNode("div", _hoisted_2$P, [
7958
8538
  createBaseVNode("div", {
7959
8539
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
@@ -7995,7 +8575,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
7995
8575
  };
7996
8576
  }
7997
8577
  });
7998
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8578
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
7999
8579
  __name: "SearchBoxMoreResults",
8000
8580
  props: {
8001
8581
  labels: {},
@@ -8027,9 +8607,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8027
8607
  };
8028
8608
  }
8029
8609
  });
8030
- const _hoisted_1$1c = { class: "lupa-search-box-history-item" };
8610
+ const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
8031
8611
  const _hoisted_2$O = { class: "lupa-search-box-history-item-content" };
8032
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
8612
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8033
8613
  __name: "SearchBoxHistoryItem",
8034
8614
  props: {
8035
8615
  item: {},
@@ -8045,7 +8625,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
8045
8625
  emit2("click", { query: props.item });
8046
8626
  };
8047
8627
  return (_ctx, _cache) => {
8048
- return openBlock(), createElementBlock("div", _hoisted_1$1c, [
8628
+ return openBlock(), createElementBlock("div", _hoisted_1$1d, [
8049
8629
  createBaseVNode("div", _hoisted_2$O, [
8050
8630
  createBaseVNode("div", {
8051
8631
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
@@ -8060,11 +8640,11 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
8060
8640
  };
8061
8641
  }
8062
8642
  });
8063
- const _hoisted_1$1b = {
8643
+ const _hoisted_1$1c = {
8064
8644
  key: 0,
8065
8645
  class: "lupa-search-box-history-panel"
8066
8646
  };
8067
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
8647
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
8068
8648
  __name: "SearchBoxHistoryPanel",
8069
8649
  props: {
8070
8650
  options: {}
@@ -8105,9 +8685,9 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
8105
8685
  }
8106
8686
  };
8107
8687
  return (_ctx, _cache) => {
8108
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1b, [
8688
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
8109
8689
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
8110
- return openBlock(), createBlock(_sfc_main$1j, {
8690
+ return openBlock(), createBlock(_sfc_main$1k, {
8111
8691
  key: item,
8112
8692
  item,
8113
8693
  highlighted: index === highlightIndex.value,
@@ -8123,19 +8703,19 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
8123
8703
  };
8124
8704
  }
8125
8705
  });
8126
- const _hoisted_1$1a = { class: "lupa-search-box-no-results" };
8127
- const _sfc_main$1h = /* @__PURE__ */ defineComponent({
8706
+ const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
8707
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
8128
8708
  __name: "SearchBoxNoResults",
8129
8709
  props: {
8130
8710
  labels: {}
8131
8711
  },
8132
8712
  setup(__props) {
8133
8713
  return (_ctx, _cache) => {
8134
- return openBlock(), createElementBlock("p", _hoisted_1$1a, toDisplayString(_ctx.labels.noResults), 1);
8714
+ return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
8135
8715
  };
8136
8716
  }
8137
8717
  });
8138
- const _hoisted_1$19 = ["innerHTML"];
8718
+ const _hoisted_1$1a = ["innerHTML"];
8139
8719
  const _hoisted_2$N = {
8140
8720
  key: 1,
8141
8721
  "data-cy": "lupa-suggestion-value",
@@ -8154,7 +8734,7 @@ const _hoisted_5$g = {
8154
8734
  class: "lupa-suggestion-facet-value",
8155
8735
  "data-cy": "lupa-suggestion-facet-value"
8156
8736
  };
8157
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
8737
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
8158
8738
  __name: "SearchBoxSuggestion",
8159
8739
  props: {
8160
8740
  suggestion: {},
@@ -8190,7 +8770,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
8190
8770
  class: "lupa-suggestion-value",
8191
8771
  "data-cy": "lupa-suggestion-value",
8192
8772
  innerHTML: _ctx.suggestion.displayHighlight
8193
- }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
8773
+ }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
8194
8774
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
8195
8775
  createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8196
8776
  createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
@@ -8199,11 +8779,11 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
8199
8779
  };
8200
8780
  }
8201
8781
  });
8202
- const _hoisted_1$18 = {
8782
+ const _hoisted_1$19 = {
8203
8783
  id: "lupa-search-box-suggestions",
8204
8784
  "data-cy": "lupa-search-box-suggestions"
8205
8785
  };
8206
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
8786
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
8207
8787
  __name: "SearchBoxSuggestions",
8208
8788
  props: {
8209
8789
  items: {},
@@ -8263,9 +8843,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
8263
8843
  });
8264
8844
  });
8265
8845
  return (_ctx, _cache) => {
8266
- return openBlock(), createElementBlock("div", _hoisted_1$18, [
8846
+ return openBlock(), createElementBlock("div", _hoisted_1$19, [
8267
8847
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
8268
- return openBlock(), createBlock(_sfc_main$1g, {
8848
+ return openBlock(), createBlock(_sfc_main$1h, {
8269
8849
  key: getSuggestionKey(item),
8270
8850
  class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
8271
8851
  suggestion: item,
@@ -8293,7 +8873,7 @@ const debounce$1 = (func, timeout) => {
8293
8873
  }, timeout);
8294
8874
  };
8295
8875
  };
8296
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
8876
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
8297
8877
  __name: "SearchBoxSuggestionsWrapper",
8298
8878
  props: {
8299
8879
  panel: {},
@@ -8334,7 +8914,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
8334
8914
  };
8335
8915
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
8336
8916
  return (_ctx, _cache) => {
8337
- return openBlock(), createBlock(_sfc_main$1f, {
8917
+ return openBlock(), createBlock(_sfc_main$1g, {
8338
8918
  items: searchResult.value,
8339
8919
  highlight: _ctx.panel.highlight,
8340
8920
  queryKey: _ctx.panel.queryKey,
@@ -8422,8 +9002,23 @@ const joinUrlParts = (...parts) => {
8422
9002
  }
8423
9003
  return (_c = (_b = (_a = parts == null ? void 0 : parts.map((part) => part.replace(/(^\/+|\/+$)/g, ""))) == null ? void 0 : _a.filter((part) => part !== "")) == null ? void 0 : _b.join("/")) != null ? _c : "";
8424
9004
  };
8425
- const _hoisted_1$17 = ["src"];
8426
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
9005
+ const checkHasFullImageUrl = (imageUrl) => typeof imageUrl === "string" && (imageUrl.indexOf("http://") === 0 || imageUrl.indexOf("https://") === 0);
9006
+ const computeImageUrl = (imageUrl, rootImageUrl) => {
9007
+ const mainUrl = Array.isArray(imageUrl) ? imageUrl[0] : imageUrl;
9008
+ if (checkHasFullImageUrl(mainUrl)) {
9009
+ return mainUrl;
9010
+ }
9011
+ return rootImageUrl ? joinUrlParts(rootImageUrl, mainUrl) : `/${mainUrl}`;
9012
+ };
9013
+ const replaceImageWithPlaceholder = (e, placeholder) => {
9014
+ var _a;
9015
+ const targetImage = e == null ? void 0 : e.target;
9016
+ if (targetImage && !((_a = targetImage == null ? void 0 : targetImage.src) == null ? void 0 : _a.includes(placeholder))) {
9017
+ targetImage.src = placeholder;
9018
+ }
9019
+ };
9020
+ const _hoisted_1$18 = ["src"];
9021
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
8427
9022
  __name: "ProductImage",
8428
9023
  props: {
8429
9024
  item: {},
@@ -8433,33 +9028,73 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
8433
9028
  },
8434
9029
  setup(__props) {
8435
9030
  const props = __props;
9031
+ const isHover = ref(false);
9032
+ const hoverImageIndex = ref(0);
9033
+ const hoverInterval = ref(0);
8436
9034
  const rootImageUrl = computed(() => props.options.baseUrl);
8437
9035
  const image = computed(() => props.item[props.options.key]);
8438
9036
  const hasFullImageUrl = computed(() => {
8439
- const imageUrl2 = image.value;
8440
- return typeof imageUrl2 === "string" && (imageUrl2.indexOf("http://") === 0 || imageUrl2.indexOf("https://") === 0);
9037
+ return checkHasFullImageUrl(image.value);
8441
9038
  });
8442
9039
  const imageUrl = computed(() => {
8443
- const imageUrl2 = image.value;
8444
- if (hasFullImageUrl.value) {
8445
- return imageUrl2;
8446
- }
8447
- return rootImageUrl.value ? joinUrlParts(rootImageUrl.value, imageUrl2) : `/${imageUrl2}`;
9040
+ return computeImageUrl(image.value, rootImageUrl.value);
8448
9041
  });
8449
9042
  const hasImage = computed(() => Boolean(hasFullImageUrl.value || image.value));
8450
9043
  const placeholder = computed(() => props.options.placeholder);
8451
- const finalUrl = computed(() => {
9044
+ const finalMainImageUrl = computed(() => {
8452
9045
  if (props.options.customUrl) {
8453
9046
  return props.options.customUrl(props.item);
8454
9047
  }
8455
9048
  return hasImage.value ? imageUrl.value : placeholder.value;
8456
9049
  });
8457
- const replaceWithPlaceholder = (e) => {
9050
+ const hoverImages = computed(() => {
9051
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
9052
+ if ((_a = props.options.hoverImages) == null ? void 0 : _a.key) {
9053
+ return (_g = (_f = (_e = props.item[(_b = props.options.hoverImages) == null ? void 0 : _b.key]) == null ? void 0 : _e.slice(0, (_d = (_c = props.options.hoverImages) == null ? void 0 : _c.maxImages) != null ? _d : 5)) == null ? void 0 : _f.map((i) => computeImageUrl(i, rootImageUrl.value))) != null ? _g : [];
9054
+ }
9055
+ if (props.options.hoverImages) {
9056
+ return (_l = (_k = (_h = props.options.hoverImages) == null ? void 0 : _h.display(props.item)) == null ? void 0 : _k.slice(0, (_j = (_i = props.options.hoverImages) == null ? void 0 : _i.maxImages) != null ? _j : 5)) != null ? _l : [];
9057
+ }
9058
+ return [];
9059
+ });
9060
+ const hasHoverImages = computed(() => {
8458
9061
  var _a;
8459
- const targetImage = e == null ? void 0 : e.target;
8460
- if (targetImage && !((_a = targetImage == null ? void 0 : targetImage.src) == null ? void 0 : _a.includes(placeholder.value))) {
8461
- targetImage.src = placeholder.value;
9062
+ return Boolean((_a = hoverImages.value) == null ? void 0 : _a.length);
9063
+ });
9064
+ const replaceWithPlaceholder = (e) => {
9065
+ replaceImageWithPlaceholder(e, placeholder.value);
9066
+ };
9067
+ const setNextHoverImage = () => {
9068
+ hoverImageIndex.value = (hoverImageIndex.value + 1) % hoverImages.value.length;
9069
+ };
9070
+ const currentHoverImage = computed(() => {
9071
+ return hoverImages.value[hoverImageIndex.value];
9072
+ });
9073
+ const finalUrl = computed(() => {
9074
+ return isHover.value ? currentHoverImage.value : finalMainImageUrl.value;
9075
+ });
9076
+ const handleMouseEnter = () => {
9077
+ var _a, _b;
9078
+ if (!hasHoverImages.value) {
9079
+ return;
9080
+ }
9081
+ isHover.value = true;
9082
+ hoverImageIndex.value = 0;
9083
+ if (hoverInterval.value) {
9084
+ return;
8462
9085
  }
9086
+ hoverInterval.value = setInterval(
9087
+ setNextHoverImage,
9088
+ (_b = (_a = props.options.hoverImages) == null ? void 0 : _a.cycleInterval) != null ? _b : 2e3
9089
+ );
9090
+ };
9091
+ const handleMouseLeave = () => {
9092
+ if (!hasHoverImages.value) {
9093
+ return;
9094
+ }
9095
+ isHover.value = false;
9096
+ clearInterval(hoverInterval.value);
9097
+ hoverInterval.value = 0;
8463
9098
  };
8464
9099
  const imageAlt = computed(() => {
8465
9100
  const alt = props.options.alt;
@@ -8468,20 +9103,48 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
8468
9103
  }
8469
9104
  return "";
8470
9105
  });
9106
+ const preloadImages = (images) => {
9107
+ images.forEach((src) => {
9108
+ const img = new Image();
9109
+ img.src = src;
9110
+ });
9111
+ };
9112
+ onMounted(() => {
9113
+ if (hasHoverImages.value) {
9114
+ preloadImages(hoverImages.value);
9115
+ }
9116
+ });
9117
+ watch(hoverImages, (newImages) => {
9118
+ if (newImages.length) {
9119
+ preloadImages(newImages);
9120
+ }
9121
+ });
9122
+ onBeforeUnmount(() => {
9123
+ clearInterval(hoverInterval.value);
9124
+ });
8471
9125
  return (_ctx, _cache) => {
8472
- var _a, _b;
8473
9126
  return openBlock(), createElementBlock("div", {
8474
- class: normalizeClass((_a = _ctx.wrapperClass) != null ? _a : "")
9127
+ class: normalizeClass({ [_ctx.wrapperClass]: Boolean(_ctx.wrapperClass), "lupa-images-hover": isHover.value }),
9128
+ onMouseenter: handleMouseEnter,
9129
+ onMouseleave: handleMouseLeave
8475
9130
  }, [
8476
- createBaseVNode("img", mergeProps({
8477
- class: (_b = _ctx.imageClass) != null ? _b : "",
8478
- src: finalUrl.value
8479
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_1$17)
8480
- ], 2);
9131
+ createVNode(Transition, { name: "lupa-fade" }, {
9132
+ default: withCtx(() => [
9133
+ (openBlock(), createElementBlock("img", mergeProps({
9134
+ class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
9135
+ src: finalUrl.value
9136
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
9137
+ onError: replaceWithPlaceholder,
9138
+ key: finalUrl.value
9139
+ }), null, 16, _hoisted_1$18))
9140
+ ]),
9141
+ _: 1
9142
+ })
9143
+ ], 34);
8481
9144
  };
8482
9145
  }
8483
9146
  });
8484
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
9147
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
8485
9148
  __name: "SearchBoxProductImage",
8486
9149
  props: {
8487
9150
  item: {},
@@ -8489,7 +9152,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
8489
9152
  },
8490
9153
  setup(__props) {
8491
9154
  return (_ctx, _cache) => {
8492
- return openBlock(), createBlock(_sfc_main$1d, {
9155
+ return openBlock(), createBlock(_sfc_main$1e, {
8493
9156
  item: _ctx.item,
8494
9157
  options: _ctx.options,
8495
9158
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -8498,12 +9161,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
8498
9161
  };
8499
9162
  }
8500
9163
  });
8501
- const _hoisted_1$16 = ["innerHTML"];
9164
+ const _hoisted_1$17 = ["innerHTML"];
8502
9165
  const _hoisted_2$M = {
8503
9166
  key: 1,
8504
9167
  class: "lupa-search-box-product-title"
8505
9168
  };
8506
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
9169
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
8507
9170
  __name: "SearchBoxProductTitle",
8508
9171
  props: {
8509
9172
  item: {},
@@ -8523,18 +9186,18 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
8523
9186
  key: 0,
8524
9187
  class: "lupa-search-box-product-title",
8525
9188
  innerHTML: title.value
8526
- }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
9189
+ }, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
8527
9190
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
8528
9191
  ]));
8529
9192
  };
8530
9193
  }
8531
9194
  });
8532
- const _hoisted_1$15 = ["innerHTML"];
9195
+ const _hoisted_1$16 = ["innerHTML"];
8533
9196
  const _hoisted_2$L = {
8534
9197
  key: 1,
8535
9198
  class: "lupa-search-box-product-description"
8536
9199
  };
8537
- const _sfc_main$1a = /* @__PURE__ */ defineComponent({
9200
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
8538
9201
  __name: "SearchBoxProductDescription",
8539
9202
  props: {
8540
9203
  item: {},
@@ -8554,12 +9217,12 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
8554
9217
  key: 0,
8555
9218
  class: "lupa-search-box-product-description",
8556
9219
  innerHTML: description.value
8557
- }, null, 8, _hoisted_1$15)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
9220
+ }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
8558
9221
  };
8559
9222
  }
8560
9223
  });
8561
- const _hoisted_1$14 = { class: "lupa-search-box-product-price" };
8562
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9224
+ const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
9225
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
8563
9226
  __name: "SearchBoxProductPrice",
8564
9227
  props: {
8565
9228
  item: {},
@@ -8577,14 +9240,14 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
8577
9240
  );
8578
9241
  });
8579
9242
  return (_ctx, _cache) => {
8580
- return openBlock(), createElementBlock("div", _hoisted_1$14, [
9243
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
8581
9244
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
8582
9245
  ]);
8583
9246
  };
8584
9247
  }
8585
9248
  });
8586
- const _hoisted_1$13 = { class: "lupa-search-box-product-regular-price" };
8587
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9249
+ const _hoisted_1$14 = { class: "lupa-search-box-product-regular-price" };
9250
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
8588
9251
  __name: "SearchBoxProductRegularPrice",
8589
9252
  props: {
8590
9253
  item: {},
@@ -8602,16 +9265,16 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
8602
9265
  );
8603
9266
  });
8604
9267
  return (_ctx, _cache) => {
8605
- return openBlock(), createElementBlock("div", _hoisted_1$13, toDisplayString(price.value), 1);
9268
+ return openBlock(), createElementBlock("div", _hoisted_1$14, toDisplayString(price.value), 1);
8606
9269
  };
8607
9270
  }
8608
9271
  });
8609
- const _hoisted_1$12 = ["innerHTML"];
9272
+ const _hoisted_1$13 = ["innerHTML"];
8610
9273
  const _hoisted_2$K = { key: 0 };
8611
9274
  const _hoisted_3$y = { key: 1 };
8612
9275
  const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
8613
9276
  const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
8614
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9277
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
8615
9278
  __name: "SearchBoxProductCustom",
8616
9279
  props: {
8617
9280
  item: {},
@@ -8637,7 +9300,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
8637
9300
  key: 0,
8638
9301
  class: [className.value, "lupa-search-box-product-custom"],
8639
9302
  innerHTML: text.value
8640
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12)) : (openBlock(), createElementBlock("div", mergeProps({
9303
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13)) : (openBlock(), createElementBlock("div", mergeProps({
8641
9304
  key: 1,
8642
9305
  class: [className.value, "lupa-search-box-product-custom"]
8643
9306
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
@@ -8649,8 +9312,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
8649
9312
  };
8650
9313
  }
8651
9314
  });
8652
- const _hoisted_1$11 = ["innerHTML"];
8653
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9315
+ const _hoisted_1$12 = ["innerHTML"];
9316
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
8654
9317
  __name: "SearchBoxProductCustomHtml",
8655
9318
  props: {
8656
9319
  item: {},
@@ -8670,7 +9333,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
8670
9333
  return openBlock(), createElementBlock("div", mergeProps({
8671
9334
  class: className.value,
8672
9335
  innerHTML: text.value
8673
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$11);
9336
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12);
8674
9337
  };
8675
9338
  }
8676
9339
  });
@@ -8868,10 +9531,10 @@ const useSearchResultStore = defineStore("searchResult", () => {
8868
9531
  clearSearchResult
8869
9532
  };
8870
9533
  });
8871
- const _hoisted_1$10 = { class: "lupa-search-box-add-to-cart-wrapper" };
9534
+ const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
8872
9535
  const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
8873
9536
  const _hoisted_3$x = ["onClick", "disabled"];
8874
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9537
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
8875
9538
  __name: "SearchBoxProductAddToCart",
8876
9539
  props: {
8877
9540
  item: {},
@@ -8898,7 +9561,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
8898
9561
  loading.value = false;
8899
9562
  });
8900
9563
  return (_ctx, _cache) => {
8901
- return openBlock(), createElementBlock("div", _hoisted_1$10, [
9564
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
8902
9565
  createBaseVNode("div", _hoisted_2$J, [
8903
9566
  createBaseVNode("button", {
8904
9567
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
@@ -8912,23 +9575,23 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
8912
9575
  };
8913
9576
  }
8914
9577
  });
8915
- const _hoisted_1$$ = {
9578
+ const _hoisted_1$10 = {
8916
9579
  key: 1,
8917
9580
  class: "lupa-search-box-element-badge-wrapper"
8918
9581
  };
8919
9582
  const __default__$4 = {
8920
9583
  components: {
8921
- SearchBoxProductImage: _sfc_main$1c,
8922
- SearchBoxProductTitle: _sfc_main$1b,
8923
- SearchBoxProductDescription: _sfc_main$1a,
8924
- SearchBoxProductPrice: _sfc_main$19,
8925
- SearchBoxProductRegularPrice: _sfc_main$18,
8926
- SearchBoxProductCustom: _sfc_main$17,
8927
- SearchBoxProductCustomHtml: _sfc_main$16,
8928
- SearchBoxProductAddToCart: _sfc_main$15
9584
+ SearchBoxProductImage: _sfc_main$1d,
9585
+ SearchBoxProductTitle: _sfc_main$1c,
9586
+ SearchBoxProductDescription: _sfc_main$1b,
9587
+ SearchBoxProductPrice: _sfc_main$1a,
9588
+ SearchBoxProductRegularPrice: _sfc_main$19,
9589
+ SearchBoxProductCustom: _sfc_main$18,
9590
+ SearchBoxProductCustomHtml: _sfc_main$17,
9591
+ SearchBoxProductAddToCart: _sfc_main$16
8929
9592
  }
8930
9593
  };
8931
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
9594
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
8932
9595
  __name: "SearchBoxProductElement",
8933
9596
  props: {
8934
9597
  item: {},
@@ -8986,7 +9649,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
8986
9649
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
8987
9650
  inStock: _ctx.isInStock
8988
9651
  }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
8989
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$$, [
9652
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
8990
9653
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
8991
9654
  key: 0,
8992
9655
  item: enhancedItem.value,
@@ -9000,14 +9663,14 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
9000
9663
  };
9001
9664
  }
9002
9665
  }));
9003
- const _hoisted_1$_ = { class: "lupa-badge-title" };
9666
+ const _hoisted_1$$ = { class: "lupa-badge-title" };
9004
9667
  const _hoisted_2$I = ["src"];
9005
9668
  const _hoisted_3$w = { key: 1 };
9006
9669
  const _hoisted_4$p = {
9007
9670
  key: 0,
9008
9671
  class: "lupa-badge-full-text"
9009
9672
  };
9010
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9673
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
9011
9674
  __name: "SearchResultGeneratedBadge",
9012
9675
  props: {
9013
9676
  options: {},
@@ -9040,7 +9703,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9040
9703
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
9041
9704
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
9042
9705
  }, [
9043
- createBaseVNode("span", _hoisted_1$_, [
9706
+ createBaseVNode("span", _hoisted_1$$, [
9044
9707
  image.value ? (openBlock(), createElementBlock("img", {
9045
9708
  key: 0,
9046
9709
  src: image.value
@@ -9052,8 +9715,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9052
9715
  };
9053
9716
  }
9054
9717
  });
9055
- const _hoisted_1$Z = { class: "lupa-generated-badges" };
9056
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9718
+ const _hoisted_1$_ = { class: "lupa-generated-badges" };
9719
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9057
9720
  __name: "SearchResultGeneratedBadges",
9058
9721
  props: {
9059
9722
  options: {}
@@ -9079,9 +9742,9 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9079
9742
  })).filter((b) => Boolean(b.id));
9080
9743
  });
9081
9744
  return (_ctx, _cache) => {
9082
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
9745
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
9083
9746
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
9084
- return openBlock(), createBlock(_sfc_main$13, {
9747
+ return openBlock(), createBlock(_sfc_main$14, {
9085
9748
  key: badge.id,
9086
9749
  badge,
9087
9750
  options: _ctx.options
@@ -9091,8 +9754,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9091
9754
  };
9092
9755
  }
9093
9756
  });
9094
- const _hoisted_1$Y = ["innerHTML"];
9095
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9757
+ const _hoisted_1$Z = ["innerHTML"];
9758
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9096
9759
  __name: "CustomBadge",
9097
9760
  props: {
9098
9761
  badge: {}
@@ -9111,12 +9774,12 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9111
9774
  return openBlock(), createElementBlock("div", {
9112
9775
  class: normalizeClass(className.value),
9113
9776
  innerHTML: text.value
9114
- }, null, 10, _hoisted_1$Y);
9777
+ }, null, 10, _hoisted_1$Z);
9115
9778
  };
9116
9779
  }
9117
9780
  });
9118
- const _hoisted_1$X = { class: "lupa-text-badges" };
9119
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9781
+ const _hoisted_1$Y = { class: "lupa-text-badges" };
9782
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9120
9783
  __name: "TextBadge",
9121
9784
  props: {
9122
9785
  badge: {}
@@ -9131,7 +9794,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9131
9794
  return badges.value.slice(0, props.badge.maxItems);
9132
9795
  });
9133
9796
  return (_ctx, _cache) => {
9134
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
9797
+ return openBlock(), createElementBlock("div", _hoisted_1$Y, [
9135
9798
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
9136
9799
  return openBlock(), createElementBlock("div", {
9137
9800
  class: "lupa-badge lupa-text-badge",
@@ -9142,9 +9805,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9142
9805
  };
9143
9806
  }
9144
9807
  });
9145
- const _hoisted_1$W = { class: "lupa-image-badges" };
9808
+ const _hoisted_1$X = { class: "lupa-image-badges" };
9146
9809
  const _hoisted_2$H = ["src"];
9147
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9810
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9148
9811
  __name: "ImageBadge",
9149
9812
  props: {
9150
9813
  badge: {}
@@ -9164,7 +9827,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9164
9827
  return `${props.badge.rootImageUrl}${src}`;
9165
9828
  };
9166
9829
  return (_ctx, _cache) => {
9167
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
9830
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
9168
9831
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
9169
9832
  return openBlock(), createElementBlock("div", {
9170
9833
  class: "lupa-badge lupa-image-badge",
@@ -9179,15 +9842,15 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9179
9842
  };
9180
9843
  }
9181
9844
  });
9182
- const _hoisted_1$V = { id: "lupa-search-results-badges" };
9845
+ const _hoisted_1$W = { id: "lupa-search-results-badges" };
9183
9846
  const __default__$3 = {
9184
9847
  components: {
9185
- CustomBadge: _sfc_main$11,
9186
- TextBadge: _sfc_main$10,
9187
- ImageBadge: _sfc_main$$
9848
+ CustomBadge: _sfc_main$12,
9849
+ TextBadge: _sfc_main$11,
9850
+ ImageBadge: _sfc_main$10
9188
9851
  }
9189
9852
  };
9190
- const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
9853
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
9191
9854
  __name: "SearchResultsBadgeWrapper",
9192
9855
  props: {
9193
9856
  position: {},
@@ -9243,7 +9906,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9243
9906
  }
9244
9907
  };
9245
9908
  return (_ctx, _cache) => {
9246
- return openBlock(), createElementBlock("div", _hoisted_1$V, [
9909
+ return openBlock(), createElementBlock("div", _hoisted_1$W, [
9247
9910
  createBaseVNode("div", {
9248
9911
  id: "lupa-badges",
9249
9912
  class: normalizeClass(anchorPosition.value)
@@ -9254,7 +9917,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9254
9917
  badge
9255
9918
  }, null, 8, ["badge"]);
9256
9919
  }), 128)),
9257
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$12, {
9920
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$13, {
9258
9921
  key: 0,
9259
9922
  options: _ctx.options
9260
9923
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -9263,14 +9926,14 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9263
9926
  };
9264
9927
  }
9265
9928
  }));
9266
- const _hoisted_1$U = ["href"];
9929
+ const _hoisted_1$V = ["href"];
9267
9930
  const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
9268
9931
  const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
9269
9932
  const _hoisted_4$o = {
9270
9933
  key: 0,
9271
9934
  class: "lupa-search-box-product-add-to-cart-section"
9272
9935
  };
9273
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9936
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9274
9937
  __name: "SearchBoxProduct",
9275
9938
  props: {
9276
9939
  item: {},
@@ -9331,7 +9994,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9331
9994
  }), [
9332
9995
  createBaseVNode("div", _hoisted_2$G, [
9333
9996
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
9334
- return openBlock(), createBlock(_sfc_main$14, {
9997
+ return openBlock(), createBlock(_sfc_main$15, {
9335
9998
  class: "lupa-search-box-product-element",
9336
9999
  item: _ctx.item,
9337
10000
  element,
@@ -9344,7 +10007,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9344
10007
  createBaseVNode("div", _hoisted_3$v, [
9345
10008
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
9346
10009
  var _a;
9347
- return openBlock(), createBlock(_sfc_main$14, {
10010
+ return openBlock(), createBlock(_sfc_main$15, {
9348
10011
  key: element.key,
9349
10012
  class: "lupa-search-box-product-element",
9350
10013
  item: _ctx.item,
@@ -9355,7 +10018,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9355
10018
  badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
9356
10019
  name: "badges",
9357
10020
  fn: withCtx(() => [
9358
- createVNode(_sfc_main$_, {
10021
+ createVNode(_sfc_main$$, {
9359
10022
  options: badgeOptions.value,
9360
10023
  position: "card"
9361
10024
  }, null, 8, ["options"])
@@ -9366,7 +10029,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9366
10029
  }), 128))
9367
10030
  ]),
9368
10031
  addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
9369
- createVNode(_sfc_main$14, {
10032
+ createVNode(_sfc_main$15, {
9370
10033
  class: "lupa-search-box-product-element",
9371
10034
  item: _ctx.item,
9372
10035
  element: addToCartElement.value,
@@ -9375,7 +10038,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9375
10038
  isInStock: isInStock.value
9376
10039
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9377
10040
  ])) : createCommentVNode("", true)
9378
- ], 16, _hoisted_1$U);
10041
+ ], 16, _hoisted_1$V);
9379
10042
  };
9380
10043
  }
9381
10044
  });
@@ -9436,8 +10099,8 @@ const useTrackingStore = defineStore("tracking", () => {
9436
10099
  };
9437
10100
  return { trackSearch, trackResults, trackEvent };
9438
10101
  });
9439
- const _hoisted_1$T = { id: "lupa-search-box-products" };
9440
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10102
+ const _hoisted_1$U = { id: "lupa-search-box-products" };
10103
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9441
10104
  __name: "SearchBoxProducts",
9442
10105
  props: {
9443
10106
  items: {},
@@ -9498,7 +10161,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9498
10161
  handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
9499
10162
  };
9500
10163
  return (_ctx, _cache) => {
9501
- return openBlock(), createElementBlock("div", _hoisted_1$T, [
10164
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
9502
10165
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
9503
10166
  return renderSlot(_ctx.$slots, "productCard", {
9504
10167
  key: index,
@@ -9510,7 +10173,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9510
10173
  itemClicked: handleProductClick
9511
10174
  });
9512
10175
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
9513
- return openBlock(), createBlock(_sfc_main$Z, {
10176
+ return openBlock(), createBlock(_sfc_main$_, {
9514
10177
  key: index,
9515
10178
  item,
9516
10179
  panelOptions: _ctx.panelOptions,
@@ -9524,7 +10187,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9524
10187
  };
9525
10188
  }
9526
10189
  });
9527
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
10190
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9528
10191
  __name: "SearchBoxProductsWrapper",
9529
10192
  props: {
9530
10193
  panel: {},
@@ -9576,7 +10239,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9576
10239
  const getItemsDebounced = debounce$1(getItems, props.debounce);
9577
10240
  return (_ctx, _cache) => {
9578
10241
  var _a, _b;
9579
- return openBlock(), createBlock(_sfc_main$Y, {
10242
+ return openBlock(), createBlock(_sfc_main$Z, {
9580
10243
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
9581
10244
  panelOptions: _ctx.panel,
9582
10245
  labels: _ctx.labels,
@@ -9594,7 +10257,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9594
10257
  };
9595
10258
  }
9596
10259
  });
9597
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
10260
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9598
10261
  __name: "SearchBoxRelatedSourceWrapper",
9599
10262
  props: {
9600
10263
  panel: {},
@@ -9666,7 +10329,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9666
10329
  });
9667
10330
  return (_ctx, _cache) => {
9668
10331
  var _a, _b;
9669
- return openBlock(), createBlock(_sfc_main$Y, {
10332
+ return openBlock(), createBlock(_sfc_main$Z, {
9670
10333
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
9671
10334
  panelOptions: documentPanelOptions.value,
9672
10335
  labels: _ctx.labels,
@@ -9684,7 +10347,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9684
10347
  };
9685
10348
  }
9686
10349
  });
9687
- const _hoisted_1$S = {
10350
+ const _hoisted_1$T = {
9688
10351
  key: 0,
9689
10352
  id: "lupa-search-box-panel"
9690
10353
  };
@@ -9703,12 +10366,12 @@ const _hoisted_5$e = {
9703
10366
  };
9704
10367
  const __default__$2 = {
9705
10368
  components: {
9706
- SearchBoxSuggestionsWrapper: _sfc_main$1e,
9707
- SearchBoxProductsWrapper: _sfc_main$X,
9708
- SearchBoxRelatedSourceWrapper: _sfc_main$W
10369
+ SearchBoxSuggestionsWrapper: _sfc_main$1f,
10370
+ SearchBoxProductsWrapper: _sfc_main$Y,
10371
+ SearchBoxRelatedSourceWrapper: _sfc_main$X
9709
10372
  }
9710
10373
  };
9711
- const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
10374
+ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
9712
10375
  __name: "SearchBoxMainPanel",
9713
10376
  props: {
9714
10377
  options: {},
@@ -9854,7 +10517,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9854
10517
  ref_key: "panelContainer",
9855
10518
  ref: panelContainer
9856
10519
  }, [
9857
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$S, [
10520
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
9858
10521
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
9859
10522
  key: 0,
9860
10523
  class: "lupa-search-box-close-panel",
@@ -9899,18 +10562,18 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9899
10562
  ], 10, _hoisted_2$F);
9900
10563
  }), 128))
9901
10564
  ], 4),
9902
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1h, {
10565
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
9903
10566
  key: 1,
9904
10567
  labels: labels.value
9905
10568
  }, null, 8, ["labels"])) : createCommentVNode("", true),
9906
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1k, {
10569
+ unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1l, {
9907
10570
  key: 2,
9908
10571
  labels: labels.value,
9909
10572
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
9910
10573
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
9911
10574
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
9912
10575
  ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
9913
- createVNode(_sfc_main$1i, {
10576
+ createVNode(_sfc_main$1j, {
9914
10577
  options: _ctx.options.history,
9915
10578
  history: history.value,
9916
10579
  onGoToResults: handleGoToResults,
@@ -9935,9 +10598,9 @@ const unbindSearchTriggers = (triggers = [], event) => {
9935
10598
  const elements = getElements(triggers);
9936
10599
  elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
9937
10600
  };
9938
- const _hoisted_1$R = { id: "lupa-search-box" };
10601
+ const _hoisted_1$S = { id: "lupa-search-box" };
9939
10602
  const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
9940
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
10603
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9941
10604
  __name: "SearchBox",
9942
10605
  props: {
9943
10606
  options: {},
@@ -10182,9 +10845,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
10182
10845
  };
10183
10846
  return (_ctx, _cache) => {
10184
10847
  var _a2;
10185
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
10848
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [
10186
10849
  createBaseVNode("div", _hoisted_2$E, [
10187
- createVNode(_sfc_main$1l, {
10850
+ createVNode(_sfc_main$1m, {
10188
10851
  options: inputOptions.value,
10189
10852
  suggestedValue: suggestedValue.value,
10190
10853
  "can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
@@ -10195,7 +10858,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
10195
10858
  onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
10196
10859
  onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
10197
10860
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
10198
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$V, {
10861
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
10199
10862
  key: 0,
10200
10863
  options: panelOptions.value,
10201
10864
  inputValue: inputValue.value,
@@ -10283,7 +10946,7 @@ const getSearchParams = (url, params, baseUrl) => {
10283
10946
  }
10284
10947
  return searchParams;
10285
10948
  };
10286
- const _hoisted_1$Q = {
10949
+ const _hoisted_1$R = {
10287
10950
  key: 0,
10288
10951
  id: "lupa-search-results-did-you-mean"
10289
10952
  };
@@ -10296,7 +10959,7 @@ const _hoisted_3$t = {
10296
10959
  "data-cy": "did-you-mean-label"
10297
10960
  };
10298
10961
  const _hoisted_4$m = { key: 1 };
10299
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
10962
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
10300
10963
  __name: "SearchResultsDidYouMean",
10301
10964
  props: {
10302
10965
  labels: {}
@@ -10328,7 +10991,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
10328
10991
  paramStore.goToResults({ searchText, facet });
10329
10992
  };
10330
10993
  return (_ctx, _cache) => {
10331
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
10994
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
10332
10995
  unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
10333
10996
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
10334
10997
  return openBlock(), createElementBlock("span", { key: index }, [
@@ -10354,12 +11017,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
10354
11017
  };
10355
11018
  }
10356
11019
  });
10357
- const _hoisted_1$P = {
11020
+ const _hoisted_1$Q = {
10358
11021
  key: 0,
10359
11022
  class: "lupa-search-results-summary"
10360
11023
  };
10361
11024
  const _hoisted_2$C = ["innerHTML"];
10362
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
11025
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
10363
11026
  __name: "SearchResultsSummary",
10364
11027
  props: {
10365
11028
  label: {},
@@ -10374,7 +11037,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10374
11037
  return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
10375
11038
  });
10376
11039
  return (_ctx, _cache) => {
10377
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$P, [
11040
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
10378
11041
  createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
10379
11042
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
10380
11043
  key: 0,
@@ -10386,7 +11049,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10386
11049
  };
10387
11050
  }
10388
11051
  });
10389
- const _hoisted_1$O = {
11052
+ const _hoisted_1$P = {
10390
11053
  key: 0,
10391
11054
  class: "lupa-result-page-title",
10392
11055
  "data-cy": "lupa-result-page-title"
@@ -10397,7 +11060,7 @@ const _hoisted_3$s = {
10397
11060
  class: "lupa-results-total-count"
10398
11061
  };
10399
11062
  const _hoisted_4$l = ["innerHTML"];
10400
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
11063
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10401
11064
  __name: "SearchResultsTitle",
10402
11065
  props: {
10403
11066
  options: {},
@@ -10432,12 +11095,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10432
11095
  });
10433
11096
  return (_ctx, _cache) => {
10434
11097
  return openBlock(), createElementBlock("div", null, [
10435
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$O, [
11098
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
10436
11099
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
10437
11100
  queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
10438
11101
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
10439
11102
  ])) : createCommentVNode("", true),
10440
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$S, {
11103
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
10441
11104
  key: 1,
10442
11105
  label: summaryLabel.value
10443
11106
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -10450,7 +11113,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10450
11113
  };
10451
11114
  }
10452
11115
  });
10453
- const _hoisted_1$N = { class: "lupa-search-result-filter-value" };
11116
+ const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
10454
11117
  const _hoisted_2$A = {
10455
11118
  class: "lupa-current-filter-label",
10456
11119
  "data-cy": "lupa-current-filter-label"
@@ -10459,7 +11122,7 @@ const _hoisted_3$r = {
10459
11122
  class: "lupa-current-filter-value",
10460
11123
  "data-cy": "lupa-current-filter-value"
10461
11124
  };
10462
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
11125
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10463
11126
  __name: "CurrentFilterDisplay",
10464
11127
  props: {
10465
11128
  filter: {}
@@ -10471,7 +11134,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10471
11134
  emit2("remove", { filter: props.filter });
10472
11135
  };
10473
11136
  return (_ctx, _cache) => {
10474
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
11137
+ return openBlock(), createElementBlock("div", _hoisted_1$O, [
10475
11138
  createBaseVNode("div", {
10476
11139
  class: "lupa-current-filter-action",
10477
11140
  onClick: handleClick
@@ -10482,7 +11145,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10482
11145
  };
10483
11146
  }
10484
11147
  });
10485
- const _hoisted_1$M = { class: "lupa-filter-title-text" };
11148
+ const _hoisted_1$N = { class: "lupa-filter-title-text" };
10486
11149
  const _hoisted_2$z = {
10487
11150
  key: 0,
10488
11151
  class: "lupa-filter-count"
@@ -10492,7 +11155,7 @@ const _hoisted_3$q = {
10492
11155
  class: "filter-values"
10493
11156
  };
10494
11157
  const _hoisted_4$k = { class: "lupa-current-filter-list" };
10495
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
11158
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10496
11159
  __name: "CurrentFilters",
10497
11160
  props: {
10498
11161
  options: {},
@@ -10553,7 +11216,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10553
11216
  class: "lupa-current-filter-title",
10554
11217
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
10555
11218
  }, [
10556
- createBaseVNode("div", _hoisted_1$M, [
11219
+ createBaseVNode("div", _hoisted_1$N, [
10557
11220
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
10558
11221
  _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
10559
11222
  ]),
@@ -10565,7 +11228,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10565
11228
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
10566
11229
  createBaseVNode("div", _hoisted_4$k, [
10567
11230
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
10568
- return openBlock(), createBlock(_sfc_main$Q, {
11231
+ return openBlock(), createBlock(_sfc_main$R, {
10569
11232
  key: filter.key + "_" + filter.value,
10570
11233
  filter,
10571
11234
  onRemove: handleRemove
@@ -10582,8 +11245,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10582
11245
  };
10583
11246
  }
10584
11247
  });
10585
- const _hoisted_1$L = ["href"];
10586
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
11248
+ const _hoisted_1$M = ["href"];
11249
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10587
11250
  __name: "CategoryFilterItem",
10588
11251
  props: {
10589
11252
  options: {},
@@ -10620,12 +11283,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10620
11283
  "data-cy": "lupa-child-category-item",
10621
11284
  href: urlLink.value,
10622
11285
  onClick: handleNavigation
10623
- }, toDisplayString(title.value), 9, _hoisted_1$L)
11286
+ }, toDisplayString(title.value), 9, _hoisted_1$M)
10624
11287
  ], 2);
10625
11288
  };
10626
11289
  }
10627
11290
  });
10628
- const _hoisted_1$K = {
11291
+ const _hoisted_1$L = {
10629
11292
  class: "lupa-category-filter",
10630
11293
  "data-cy": "lupa-category-filter"
10631
11294
  };
@@ -10633,7 +11296,7 @@ const _hoisted_2$y = { class: "lupa-category-back" };
10633
11296
  const _hoisted_3$p = ["href"];
10634
11297
  const _hoisted_4$j = ["href"];
10635
11298
  const _hoisted_5$d = { class: "lupa-child-category-list" };
10636
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
11299
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10637
11300
  __name: "CategoryFilter",
10638
11301
  props: {
10639
11302
  options: {}
@@ -10719,7 +11382,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10719
11382
  };
10720
11383
  __expose({ fetch: fetch2 });
10721
11384
  return (_ctx, _cache) => {
10722
- return openBlock(), createElementBlock("div", _hoisted_1$K, [
11385
+ return openBlock(), createElementBlock("div", _hoisted_1$L, [
10723
11386
  createBaseVNode("div", _hoisted_2$y, [
10724
11387
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
10725
11388
  key: 0,
@@ -10740,7 +11403,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10740
11403
  ], 2),
10741
11404
  createBaseVNode("div", _hoisted_5$d, [
10742
11405
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
10743
- return openBlock(), createBlock(_sfc_main$O, {
11406
+ return openBlock(), createBlock(_sfc_main$P, {
10744
11407
  key: getCategoryKey(child),
10745
11408
  item: child,
10746
11409
  options: _ctx.options
@@ -10751,7 +11414,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10751
11414
  };
10752
11415
  }
10753
11416
  });
10754
- const _hoisted_1$J = {
11417
+ const _hoisted_1$K = {
10755
11418
  class: "lupa-search-result-facet-term-values",
10756
11419
  "data-cy": "lupa-search-result-facet-term-values"
10757
11420
  };
@@ -10767,7 +11430,7 @@ const _hoisted_8$1 = {
10767
11430
  };
10768
11431
  const _hoisted_9$1 = { key: 0 };
10769
11432
  const _hoisted_10$1 = { key: 1 };
10770
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
11433
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10771
11434
  __name: "TermFacet",
10772
11435
  props: {
10773
11436
  options: {},
@@ -10836,7 +11499,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10836
11499
  return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
10837
11500
  };
10838
11501
  return (_ctx, _cache) => {
10839
- return openBlock(), createElementBlock("div", _hoisted_1$J, [
11502
+ return openBlock(), createElementBlock("div", _hoisted_1$K, [
10840
11503
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
10841
11504
  key: 0,
10842
11505
  class: "lupa-term-filter",
@@ -11854,7 +12517,7 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
11854
12517
  m.render = function(e, t, r, i, n, o) {
11855
12518
  return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
11856
12519
  }, m.__file = "src/Slider.vue";
11857
- const _hoisted_1$I = { class: "lupa-search-result-facet-stats-values" };
12520
+ const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
11858
12521
  const _hoisted_2$w = {
11859
12522
  key: 0,
11860
12523
  class: "lupa-stats-facet-summary"
@@ -11882,7 +12545,7 @@ const _hoisted_13 = {
11882
12545
  key: 2,
11883
12546
  class: "lupa-stats-slider-wrapper"
11884
12547
  };
11885
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
12548
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
11886
12549
  __name: "StatsFacet",
11887
12550
  props: {
11888
12551
  options: {},
@@ -12051,7 +12714,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
12051
12714
  innerSliderRange.value = value;
12052
12715
  };
12053
12716
  return (_ctx, _cache) => {
12054
- return openBlock(), createElementBlock("div", _hoisted_1$I, [
12717
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
12055
12718
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
12056
12719
  createBaseVNode("div", null, [
12057
12720
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
@@ -12118,7 +12781,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
12118
12781
  };
12119
12782
  }
12120
12783
  });
12121
- const _hoisted_1$H = { class: "lupa-term-checkbox-wrapper" };
12784
+ const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
12122
12785
  const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
12123
12786
  const _hoisted_3$m = { class: "lupa-term-label" };
12124
12787
  const _hoisted_4$g = {
@@ -12129,7 +12792,7 @@ const _hoisted_5$a = {
12129
12792
  key: 0,
12130
12793
  class: "lupa-facet-level"
12131
12794
  };
12132
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
12795
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
12133
12796
  __name: "HierarchyFacetLevel",
12134
12797
  props: {
12135
12798
  options: {},
@@ -12175,7 +12838,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
12175
12838
  "data-cy": "lupa-facet-term",
12176
12839
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
12177
12840
  }, [
12178
- createBaseVNode("div", _hoisted_1$H, [
12841
+ createBaseVNode("div", _hoisted_1$I, [
12179
12842
  createBaseVNode("span", {
12180
12843
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
12181
12844
  }, null, 2)
@@ -12201,13 +12864,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
12201
12864
  };
12202
12865
  }
12203
12866
  });
12204
- const _hoisted_1$G = {
12867
+ const _hoisted_1$H = {
12205
12868
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
12206
12869
  "data-cy": "lupa-search-result-facet-term-values"
12207
12870
  };
12208
12871
  const _hoisted_2$u = { key: 0 };
12209
12872
  const _hoisted_3$l = ["placeholder"];
12210
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
12873
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
12211
12874
  __name: "HierarchyFacet",
12212
12875
  props: {
12213
12876
  options: {},
@@ -12257,7 +12920,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
12257
12920
  showAll.value = true;
12258
12921
  };
12259
12922
  return (_ctx, _cache) => {
12260
- return openBlock(), createElementBlock("div", _hoisted_1$G, [
12923
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
12261
12924
  isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
12262
12925
  withDirectives(createBaseVNode("input", {
12263
12926
  class: "lupa-term-filter",
@@ -12269,7 +12932,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
12269
12932
  ])
12270
12933
  ])) : createCommentVNode("", true),
12271
12934
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
12272
- return openBlock(), createBlock(_sfc_main$K, {
12935
+ return openBlock(), createBlock(_sfc_main$L, {
12273
12936
  key: item.title,
12274
12937
  options: _ctx.options,
12275
12938
  item,
@@ -12289,7 +12952,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
12289
12952
  };
12290
12953
  }
12291
12954
  });
12292
- const _hoisted_1$F = { class: "lupa-facet-label-text" };
12955
+ const _hoisted_1$G = { class: "lupa-facet-label-text" };
12293
12956
  const _hoisted_2$t = {
12294
12957
  key: 0,
12295
12958
  class: "lupa-facet-content",
@@ -12297,12 +12960,12 @@ const _hoisted_2$t = {
12297
12960
  };
12298
12961
  const __default__$1 = {
12299
12962
  components: {
12300
- TermFacet: _sfc_main$M,
12301
- StatsFacet: _sfc_main$L,
12302
- HierarchyFacet: _sfc_main$J
12963
+ TermFacet: _sfc_main$N,
12964
+ StatsFacet: _sfc_main$M,
12965
+ HierarchyFacet: _sfc_main$K
12303
12966
  }
12304
12967
  };
12305
- const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
12968
+ const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
12306
12969
  __name: "FacetDisplay",
12307
12970
  props: {
12308
12971
  options: {},
@@ -12414,7 +13077,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
12414
13077
  "data-cy": "lupa-search-result-facet-label",
12415
13078
  onClick: toggleFacet
12416
13079
  }, [
12417
- createBaseVNode("div", _hoisted_1$F, toDisplayString(facet.value.label), 1),
13080
+ createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
12418
13081
  createBaseVNode("div", {
12419
13082
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
12420
13083
  }, null, 2)
@@ -12437,12 +13100,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
12437
13100
  };
12438
13101
  }
12439
13102
  }));
12440
- const _hoisted_1$E = { class: "lupa-search-result-facet-section" };
13103
+ const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
12441
13104
  const _hoisted_2$s = {
12442
13105
  key: 0,
12443
13106
  class: "lupa-facets-title"
12444
13107
  };
12445
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
13108
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
12446
13109
  __name: "FacetList",
12447
13110
  props: {
12448
13111
  options: {},
@@ -12476,14 +13139,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
12476
13139
  };
12477
13140
  return (_ctx, _cache) => {
12478
13141
  var _a;
12479
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
13142
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
12480
13143
  _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
12481
13144
  createBaseVNode("div", {
12482
13145
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
12483
13146
  }, [
12484
13147
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
12485
13148
  var _a2;
12486
- return openBlock(), createBlock(_sfc_main$I, {
13149
+ return openBlock(), createBlock(_sfc_main$J, {
12487
13150
  key: facet.key,
12488
13151
  facet,
12489
13152
  currentFilters: currentFiltersValue.value,
@@ -12498,6 +13161,31 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
12498
13161
  };
12499
13162
  }
12500
13163
  });
13164
+ const _hoisted_1$E = ["onClick"];
13165
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
13166
+ __name: "FacetsButton",
13167
+ props: {
13168
+ options: {}
13169
+ },
13170
+ emits: ["filter"],
13171
+ setup(__props, { emit: emit2 }) {
13172
+ const props = __props;
13173
+ const label = computed(() => {
13174
+ var _a, _b;
13175
+ return (_b = (_a = props.options.labels) == null ? void 0 : _a.facetFilterButton) != null ? _b : "";
13176
+ });
13177
+ const handleClick = () => {
13178
+ emit2("filter");
13179
+ };
13180
+ return (_ctx, _cache) => {
13181
+ return label.value ? (openBlock(), createElementBlock("button", {
13182
+ key: 0,
13183
+ class: "lupa-facets-button-filter",
13184
+ onClick: withModifiers(handleClick, ["stop"])
13185
+ }, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
13186
+ };
13187
+ }
13188
+ });
12501
13189
  const _hoisted_1$D = { class: "lupa-search-result-facets" };
12502
13190
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
12503
13191
  __name: "Facets",
@@ -12506,7 +13194,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
12506
13194
  facetStyle: {},
12507
13195
  clearable: { type: Boolean }
12508
13196
  },
12509
- setup(__props) {
13197
+ emits: ["filter"],
13198
+ setup(__props, { emit: emit2 }) {
12510
13199
  const props = __props;
12511
13200
  const paramStore = useParamsStore();
12512
13201
  const searchResultStore = useSearchResultStore();
@@ -12536,6 +13225,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
12536
13225
  timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
12537
13226
  };
12538
13227
  });
13228
+ const showFilterButton = computed(() => {
13229
+ return props.options.filterBehavior === "withFilterButton";
13230
+ });
12539
13231
  const handleFacetSelect = (facetAction) => {
12540
13232
  switch (facetAction.type) {
12541
13233
  case "terms":
@@ -12574,9 +13266,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
12574
13266
  const param = getFacetKey(facet.key, facet.type);
12575
13267
  paramStore.removeParameters({ paramsToRemove: [param] });
12576
13268
  };
13269
+ const filter = () => {
13270
+ emit2("filter");
13271
+ };
12577
13272
  return (_ctx, _cache) => {
12578
13273
  return openBlock(), createElementBlock("div", _hoisted_1$D, [
12579
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$H, {
13274
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$I, {
12580
13275
  key: 0,
12581
13276
  options: _ctx.options,
12582
13277
  facets: regularFacets.value,
@@ -12585,7 +13280,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
12585
13280
  clearable: _ctx.clearable,
12586
13281
  onSelect: handleFacetSelect,
12587
13282
  onClear: clear2
12588
- }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true)
13283
+ }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
13284
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
13285
+ key: 1,
13286
+ options: _ctx.options,
13287
+ onFilter: filter
13288
+ }, null, 8, ["options"])) : createCommentVNode("", true)
12589
13289
  ]);
12590
13290
  };
12591
13291
  }
@@ -12600,7 +13300,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12600
13300
  options: {},
12601
13301
  expandable: { type: Boolean }
12602
13302
  },
12603
- setup(__props, { expose: __expose }) {
13303
+ emits: ["filter"],
13304
+ setup(__props, { expose: __expose, emit: emit2 }) {
12604
13305
  const props = __props;
12605
13306
  const categoryFilters = ref(null);
12606
13307
  const desktopFiltersVisible = computed(() => {
@@ -12614,6 +13315,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12614
13315
  const showCurrentFilters = computed(() => {
12615
13316
  return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
12616
13317
  });
13318
+ const filter = () => {
13319
+ emit2("filter");
13320
+ };
12617
13321
  const fetch2 = () => {
12618
13322
  var _a;
12619
13323
  if (categoryFilters.value) {
@@ -12624,12 +13328,12 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12624
13328
  return (_ctx, _cache) => {
12625
13329
  var _a;
12626
13330
  return openBlock(), createElementBlock("div", _hoisted_1$C, [
12627
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
13331
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$Q, {
12628
13332
  key: 0,
12629
13333
  options: _ctx.options.currentFilters,
12630
13334
  expandable: (_a = _ctx.expandable) != null ? _a : false
12631
13335
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
12632
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$N, {
13336
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$O, {
12633
13337
  key: 1,
12634
13338
  options: _ctx.options.categories,
12635
13339
  ref_key: "categoryFilters",
@@ -12637,7 +13341,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12637
13341
  }, null, 8, ["options"])) : createCommentVNode("", true),
12638
13342
  _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
12639
13343
  key: 2,
12640
- options: _ctx.options.facets
13344
+ options: _ctx.options.facets,
13345
+ onFilter: filter
12641
13346
  }, null, 8, ["options"])) : createCommentVNode("", true)
12642
13347
  ]);
12643
13348
  };
@@ -12661,7 +13366,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12661
13366
  props: {
12662
13367
  options: {}
12663
13368
  },
12664
- setup(__props) {
13369
+ emits: ["filter"],
13370
+ setup(__props, { emit: emit2 }) {
12665
13371
  const props = __props;
12666
13372
  const searchResultStore = useSearchResultStore();
12667
13373
  const { currentFilterCount } = storeToRefs(searchResultStore);
@@ -12681,6 +13387,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12681
13387
  const handleMobileToggle = () => {
12682
13388
  searchResultStore.setSidebarState({ visible: false });
12683
13389
  };
13390
+ const filter = () => {
13391
+ emit2("filter");
13392
+ handleMobileToggle();
13393
+ };
12684
13394
  return (_ctx, _cache) => {
12685
13395
  return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
12686
13396
  createBaseVNode("div", {
@@ -12701,7 +13411,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12701
13411
  createBaseVNode("div", _hoisted_7$4, [
12702
13412
  createVNode(_sfc_main$F, {
12703
13413
  options: _ctx.options,
12704
- expandable: isActiveFiltersExpanded.value
13414
+ expandable: isActiveFiltersExpanded.value,
13415
+ onFilter: filter
12705
13416
  }, null, 8, ["options", "expandable"])
12706
13417
  ])
12707
13418
  ])
@@ -12772,7 +13483,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
12772
13483
  props: {
12773
13484
  options: {}
12774
13485
  },
12775
- setup(__props) {
13486
+ emits: ["filter"],
13487
+ setup(__props, { emit: emit2 }) {
13488
+ const filter = () => {
13489
+ emit2("filter");
13490
+ };
12776
13491
  return (_ctx, _cache) => {
12777
13492
  var _a;
12778
13493
  return openBlock(), createElementBlock("div", _hoisted_1$z, [
@@ -12780,7 +13495,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
12780
13495
  key: 0,
12781
13496
  options: _ctx.options.facets,
12782
13497
  "facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
12783
- clearable: true
13498
+ clearable: true,
13499
+ onFilter: filter
12784
13500
  }, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
12785
13501
  ]);
12786
13502
  };
@@ -13217,7 +13933,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
13217
13933
  }, [
13218
13934
  createBaseVNode("div", _hoisted_1$t, [
13219
13935
  showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
13220
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$S, {
13936
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
13221
13937
  key: 2,
13222
13938
  label: searchSummaryLabel.value,
13223
13939
  clearable: unref(hasAnyFilter) && showFilterClear.value,
@@ -13258,7 +13974,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13258
13974
  },
13259
13975
  setup(__props) {
13260
13976
  return (_ctx, _cache) => {
13261
- return openBlock(), createBlock(_sfc_main$1d, {
13977
+ return openBlock(), createBlock(_sfc_main$1e, {
13262
13978
  item: _ctx.item,
13263
13979
  options: _ctx.options,
13264
13980
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -13896,7 +14612,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13896
14612
  "data-cy": "lupa-search-result-product-card",
13897
14613
  class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13898
14614
  }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13899
- createVNode(_sfc_main$_, { options: badgesOptions.value }, null, 8, ["options"]),
14615
+ createVNode(_sfc_main$$, { options: badgesOptions.value }, null, 8, ["options"]),
13900
14616
  createBaseVNode("div", {
13901
14617
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
13902
14618
  }, [
@@ -13916,7 +14632,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13916
14632
  link: link.value
13917
14633
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
13918
14634
  }), 128)),
13919
- createVNode(_sfc_main$_, {
14635
+ createVNode(_sfc_main$$, {
13920
14636
  options: badgesOptions.value,
13921
14637
  position: "image",
13922
14638
  class: "lupa-image-badges"
@@ -14259,7 +14975,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14259
14975
  options: {},
14260
14976
  ssr: { type: Boolean }
14261
14977
  },
14262
- setup(__props) {
14978
+ emits: ["filter"],
14979
+ setup(__props, { emit: emit2 }) {
14263
14980
  const props = __props;
14264
14981
  const searchResultStore = useSearchResultStore();
14265
14982
  const paramStore = useParamsStore();
@@ -14350,6 +15067,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14350
15067
  params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
14351
15068
  });
14352
15069
  };
15070
+ const filter = () => {
15071
+ emit2("filter");
15072
+ };
14353
15073
  return (_ctx, _cache) => {
14354
15074
  var _a;
14355
15075
  return openBlock(), createElementBlock("div", _hoisted_1$d, [
@@ -14366,9 +15086,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14366
15086
  key: 1,
14367
15087
  class: "lupa-toolbar-mobile",
14368
15088
  options: _ctx.options,
14369
- "pagination-location": "top"
15089
+ "pagination-location": "top",
15090
+ onFilter: filter
14370
15091
  }, null, 8, ["options"])) : createCommentVNode("", true),
14371
- currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$P, {
15092
+ currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
14372
15093
  key: 2,
14373
15094
  class: normalizeClass(currentFiltersClass.value),
14374
15095
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -14723,8 +15444,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
14723
15444
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
14724
15445
  }, [
14725
15446
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
14726
- createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14727
- createVNode(_sfc_main$R, {
15447
+ createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
15448
+ createVNode(_sfc_main$S, {
14728
15449
  "show-summary": true,
14729
15450
  options: _ctx.options,
14730
15451
  "is-product-list": (_a = _ctx.isProductList) != null ? _a : false
@@ -14736,7 +15457,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
14736
15457
  }, null, 8, ["options"])) : createCommentVNode("", true),
14737
15458
  _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
14738
15459
  key: 2,
14739
- options: _ctx.options.filters
15460
+ options: _ctx.options.filters,
15461
+ onFilter: handleParamsChange
14740
15462
  }, null, 8, ["options"])) : createCommentVNode("", true),
14741
15463
  unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
14742
15464
  key: 3,
@@ -14747,17 +15469,19 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
14747
15469
  key: 0,
14748
15470
  options: (_b = _ctx.options.filters) != null ? _b : {},
14749
15471
  ref_key: "searchResultsFilters",
14750
- ref: searchResultsFilters
15472
+ ref: searchResultsFilters,
15473
+ onFilter: handleParamsChange
14751
15474
  }, null, 8, ["options"])) : createCommentVNode("", true),
14752
15475
  createBaseVNode("div", _hoisted_3$4, [
14753
- createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14754
- createVNode(_sfc_main$R, {
15476
+ createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
15477
+ createVNode(_sfc_main$S, {
14755
15478
  options: _ctx.options,
14756
15479
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
14757
15480
  }, null, 8, ["options", "is-product-list"]),
14758
15481
  createVNode(_sfc_main$e, {
14759
15482
  options: _ctx.options,
14760
- ssr: ssrEnabled.value
15483
+ ssr: ssrEnabled.value,
15484
+ onFilter: handleParamsChange
14761
15485
  }, {
14762
15486
  append: withCtx(() => [
14763
15487
  renderSlot(_ctx.$slots, "default")
@@ -14766,8 +15490,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
14766
15490
  }, 8, ["options", "ssr"])
14767
15491
  ])
14768
15492
  ])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
14769
- createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14770
- createVNode(_sfc_main$R, {
15493
+ createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
15494
+ createVNode(_sfc_main$S, {
14771
15495
  options: _ctx.options,
14772
15496
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
14773
15497
  }, null, 8, ["options", "is-product-list"]),
@@ -14776,11 +15500,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
14776
15500
  key: 0,
14777
15501
  options: (_e = _ctx.options.filters) != null ? _e : {},
14778
15502
  ref_key: "searchResultsFilters",
14779
- ref: searchResultsFilters
15503
+ ref: searchResultsFilters,
15504
+ onFilter: handleParamsChange
14780
15505
  }, null, 8, ["options"])) : createCommentVNode("", true),
14781
15506
  createVNode(_sfc_main$e, {
14782
15507
  options: _ctx.options,
14783
- ssr: ssrEnabled.value
15508
+ ssr: ssrEnabled.value,
15509
+ onFilter: handleParamsChange
14784
15510
  }, createSlots({
14785
15511
  append: withCtx(() => [
14786
15512
  renderSlot(_ctx.$slots, "default")
@@ -17310,8 +18036,8 @@ lodash$1.exports;
17310
18036
  function createRelationalOperation(operator) {
17311
18037
  return function(value, other) {
17312
18038
  if (!(typeof value == "string" && typeof other == "string")) {
17313
- value = toNumber(value);
17314
- other = toNumber(other);
18039
+ value = toNumber2(value);
18040
+ other = toNumber2(other);
17315
18041
  }
17316
18042
  return operator(value, other);
17317
18043
  };
@@ -17345,7 +18071,7 @@ lodash$1.exports;
17345
18071
  function createRound(methodName) {
17346
18072
  var func = Math2[methodName];
17347
18073
  return function(number, precision) {
17348
- number = toNumber(number);
18074
+ number = toNumber2(number);
17349
18075
  precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
17350
18076
  if (precision && nativeIsFinite(number)) {
17351
18077
  var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
@@ -18703,11 +19429,11 @@ lodash$1.exports;
18703
19429
  if (typeof func != "function") {
18704
19430
  throw new TypeError2(FUNC_ERROR_TEXT);
18705
19431
  }
18706
- wait = toNumber(wait) || 0;
19432
+ wait = toNumber2(wait) || 0;
18707
19433
  if (isObject2(options)) {
18708
19434
  leading = !!options.leading;
18709
19435
  maxing = "maxWait" in options;
18710
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
19436
+ maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
18711
19437
  trailing = "trailing" in options ? !!options.trailing : trailing;
18712
19438
  }
18713
19439
  function invokeFunc(time) {
@@ -18783,7 +19509,7 @@ lodash$1.exports;
18783
19509
  return baseDelay(func, 1, args);
18784
19510
  });
18785
19511
  var delay = baseRest(function(func, wait, args) {
18786
- return baseDelay(func, toNumber(wait) || 0, args);
19512
+ return baseDelay(func, toNumber2(wait) || 0, args);
18787
19513
  });
18788
19514
  function flip(func) {
18789
19515
  return createWrap(func, WRAP_FLIP_FLAG);
@@ -19080,7 +19806,7 @@ lodash$1.exports;
19080
19806
  if (!value) {
19081
19807
  return value === 0 ? value : 0;
19082
19808
  }
19083
- value = toNumber(value);
19809
+ value = toNumber2(value);
19084
19810
  if (value === INFINITY || value === -INFINITY) {
19085
19811
  var sign = value < 0 ? -1 : 1;
19086
19812
  return sign * MAX_INTEGER;
@@ -19094,7 +19820,7 @@ lodash$1.exports;
19094
19820
  function toLength(value) {
19095
19821
  return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
19096
19822
  }
19097
- function toNumber(value) {
19823
+ function toNumber2(value) {
19098
19824
  if (typeof value == "number") {
19099
19825
  return value;
19100
19826
  }
@@ -19357,14 +20083,14 @@ lodash$1.exports;
19357
20083
  lower = undefined$1;
19358
20084
  }
19359
20085
  if (upper !== undefined$1) {
19360
- upper = toNumber(upper);
20086
+ upper = toNumber2(upper);
19361
20087
  upper = upper === upper ? upper : 0;
19362
20088
  }
19363
20089
  if (lower !== undefined$1) {
19364
- lower = toNumber(lower);
20090
+ lower = toNumber2(lower);
19365
20091
  lower = lower === lower ? lower : 0;
19366
20092
  }
19367
- return baseClamp(toNumber(number), lower, upper);
20093
+ return baseClamp(toNumber2(number), lower, upper);
19368
20094
  }
19369
20095
  function inRange(number, start, end) {
19370
20096
  start = toFinite(start);
@@ -19374,7 +20100,7 @@ lodash$1.exports;
19374
20100
  } else {
19375
20101
  end = toFinite(end);
19376
20102
  }
19377
- number = toNumber(number);
20103
+ number = toNumber2(number);
19378
20104
  return baseInRange(number, start, end);
19379
20105
  }
19380
20106
  function random(lower, upper, floating) {
@@ -20160,7 +20886,7 @@ lodash$1.exports;
20160
20886
  lodash2.toInteger = toInteger;
20161
20887
  lodash2.toLength = toLength;
20162
20888
  lodash2.toLower = toLower;
20163
- lodash2.toNumber = toNumber;
20889
+ lodash2.toNumber = toNumber2;
20164
20890
  lodash2.toSafeInteger = toSafeInteger;
20165
20891
  lodash2.toString = toString;
20166
20892
  lodash2.toUpper = toUpper;
@@ -20402,7 +21128,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
20402
21128
  onClick: withModifiers(innerClick, ["stop"])
20403
21129
  }, [
20404
21130
  createBaseVNode("div", _hoisted_2$7, [
20405
- createVNode(_sfc_main$U, {
21131
+ createVNode(_sfc_main$V, {
20406
21132
  options: fullSearchBoxOptions.value,
20407
21133
  "is-search-container": true,
20408
21134
  ref_key: "searchBox",
@@ -21773,7 +22499,7 @@ const _hoisted_4 = {
21773
22499
  class: "lupa-chat-spinner-main"
21774
22500
  };
21775
22501
  const _hoisted_5 = { class: "lupasearch-chat-input" };
21776
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
22502
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
21777
22503
  __name: "ChatContainer",
21778
22504
  props: {
21779
22505
  options: {}
@@ -24306,8 +25032,8 @@ lodash.exports;
24306
25032
  function createRelationalOperation(operator) {
24307
25033
  return function(value, other) {
24308
25034
  if (!(typeof value == "string" && typeof other == "string")) {
24309
- value = toNumber(value);
24310
- other = toNumber(other);
25035
+ value = toNumber2(value);
25036
+ other = toNumber2(other);
24311
25037
  }
24312
25038
  return operator(value, other);
24313
25039
  };
@@ -24341,7 +25067,7 @@ lodash.exports;
24341
25067
  function createRound(methodName) {
24342
25068
  var func = Math2[methodName];
24343
25069
  return function(number, precision) {
24344
- number = toNumber(number);
25070
+ number = toNumber2(number);
24345
25071
  precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
24346
25072
  if (precision && nativeIsFinite(number)) {
24347
25073
  var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
@@ -25699,11 +26425,11 @@ lodash.exports;
25699
26425
  if (typeof func != "function") {
25700
26426
  throw new TypeError2(FUNC_ERROR_TEXT);
25701
26427
  }
25702
- wait = toNumber(wait) || 0;
26428
+ wait = toNumber2(wait) || 0;
25703
26429
  if (isObject2(options)) {
25704
26430
  leading = !!options.leading;
25705
26431
  maxing = "maxWait" in options;
25706
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
26432
+ maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
25707
26433
  trailing = "trailing" in options ? !!options.trailing : trailing;
25708
26434
  }
25709
26435
  function invokeFunc(time) {
@@ -25779,7 +26505,7 @@ lodash.exports;
25779
26505
  return baseDelay(func, 1, args);
25780
26506
  });
25781
26507
  var delay = baseRest(function(func, wait, args) {
25782
- return baseDelay(func, toNumber(wait) || 0, args);
26508
+ return baseDelay(func, toNumber2(wait) || 0, args);
25783
26509
  });
25784
26510
  function flip(func) {
25785
26511
  return createWrap(func, WRAP_FLIP_FLAG);
@@ -26076,7 +26802,7 @@ lodash.exports;
26076
26802
  if (!value) {
26077
26803
  return value === 0 ? value : 0;
26078
26804
  }
26079
- value = toNumber(value);
26805
+ value = toNumber2(value);
26080
26806
  if (value === INFINITY || value === -INFINITY) {
26081
26807
  var sign = value < 0 ? -1 : 1;
26082
26808
  return sign * MAX_INTEGER;
@@ -26090,7 +26816,7 @@ lodash.exports;
26090
26816
  function toLength(value) {
26091
26817
  return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
26092
26818
  }
26093
- function toNumber(value) {
26819
+ function toNumber2(value) {
26094
26820
  if (typeof value == "number") {
26095
26821
  return value;
26096
26822
  }
@@ -26353,14 +27079,14 @@ lodash.exports;
26353
27079
  lower = undefined$1;
26354
27080
  }
26355
27081
  if (upper !== undefined$1) {
26356
- upper = toNumber(upper);
27082
+ upper = toNumber2(upper);
26357
27083
  upper = upper === upper ? upper : 0;
26358
27084
  }
26359
27085
  if (lower !== undefined$1) {
26360
- lower = toNumber(lower);
27086
+ lower = toNumber2(lower);
26361
27087
  lower = lower === lower ? lower : 0;
26362
27088
  }
26363
- return baseClamp(toNumber(number), lower, upper);
27089
+ return baseClamp(toNumber2(number), lower, upper);
26364
27090
  }
26365
27091
  function inRange(number, start, end) {
26366
27092
  start = toFinite(start);
@@ -26370,7 +27096,7 @@ lodash.exports;
26370
27096
  } else {
26371
27097
  end = toFinite(end);
26372
27098
  }
26373
- number = toNumber(number);
27099
+ number = toNumber2(number);
26374
27100
  return baseInRange(number, start, end);
26375
27101
  }
26376
27102
  function random(lower, upper, floating) {
@@ -27156,7 +27882,7 @@ lodash.exports;
27156
27882
  lodash2.toInteger = toInteger;
27157
27883
  lodash2.toLength = toLength;
27158
27884
  lodash2.toLower = toLower;
27159
- lodash2.toNumber = toNumber;
27885
+ lodash2.toNumber = toNumber2;
27160
27886
  lodash2.toSafeInteger = toSafeInteger;
27161
27887
  lodash2.toString = toString;
27162
27888
  lodash2.toUpper = toUpper;
@@ -27414,7 +28140,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
27414
28140
  };
27415
28141
  __expose({ fetch: fetch2 });
27416
28142
  return (_ctx, _cache) => {
27417
- return openBlock(), createBlock(unref(_sfc_main$U), {
28143
+ return openBlock(), createBlock(unref(_sfc_main$V), {
27418
28144
  options: fullSearchBoxOptions.value,
27419
28145
  ref_key: "searchBox",
27420
28146
  ref: searchBox2
@@ -28251,7 +28977,7 @@ const chat = (options, mountOptions) => {
28251
28977
  }
28252
28978
  return;
28253
28979
  }
28254
- const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1m, {
28980
+ const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1n, {
28255
28981
  options
28256
28982
  });
28257
28983
  if (!instance) {