@getlupa/client 1.15.0 → 1.15.5

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.
@@ -6806,6 +6806,8 @@ var __async = (__this, __arguments, generator) => {
6806
6806
  const TRACKING_STORAGE_KEY = "LUPA_STATS";
6807
6807
  const TRACKING_STORAGE_KEY_BASE = "LUPA_STATS_BASE";
6808
6808
  const TRACKING_ANALYTICS_KEY = "LUPA_ANALYTICS";
6809
+ const TRACKING_CLICK_DELAYED = "LUPA_TRACKING_CLICK_DELAYED";
6810
+ const DELAYED_TRACKING_EVENTS_CACHE = "LUPA_DELAYED_TRACKING_EVENTS";
6809
6811
  const TRACKING_KEY_LENGTH = 10;
6810
6812
  const HISTORY_MAX_ITEMS = 7;
6811
6813
  const S_MIN_WIDTH = 575;
@@ -7026,6 +7028,14 @@ var __async = (__this, __arguments, generator) => {
7026
7028
  const transformedStr = typeof str === "string" ? str : str.toString();
7027
7029
  return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD").replace(/[^\w\s.-_/]/g, "")) == null ? void 0 : _b.trim();
7028
7030
  };
7031
+ const getTransformedString = (str) => {
7032
+ var _a, _b;
7033
+ if (!str) {
7034
+ return "";
7035
+ }
7036
+ const transformedStr = typeof str === "string" ? str : str.toString();
7037
+ return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD")) == null ? void 0 : _b.trim();
7038
+ };
7029
7039
  const capitalize$1 = (str) => {
7030
7040
  if (!str) {
7031
7041
  return "";
@@ -7099,8 +7109,8 @@ var __async = (__this, __arguments, generator) => {
7099
7109
  if (!input2) {
7100
7110
  return false;
7101
7111
  }
7102
- const normalizedInput = getNormalizedString(input2);
7103
- return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
7112
+ const normalizedInput = getTransformedString(input2);
7113
+ return possibleValues.some((v) => getTransformedString(v) === normalizedInput);
7104
7114
  };
7105
7115
  const levenshteinDistance = (s = "", t = "") => {
7106
7116
  if (!(s == null ? void 0 : s.length)) {
@@ -7133,225 +7143,6 @@ var __async = (__this, __arguments, generator) => {
7133
7143
  const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
7134
7144
  return closestValue;
7135
7145
  };
7136
- const initAnalyticsTracking = (analyticsOptions) => {
7137
- try {
7138
- if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7139
- window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7140
- } else {
7141
- window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7142
- }
7143
- } catch (e2) {
7144
- }
7145
- };
7146
- const initBaseTracking = (enabled) => {
7147
- try {
7148
- if (enabled) {
7149
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7150
- } else {
7151
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7152
- clearSessionTracking();
7153
- clearUserTracking();
7154
- }
7155
- } catch (e2) {
7156
- }
7157
- };
7158
- const clearSessionTracking = () => {
7159
- try {
7160
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7161
- } catch (e2) {
7162
- }
7163
- };
7164
- const initSessionTracking = () => {
7165
- try {
7166
- if (getSessionKey()) {
7167
- return;
7168
- }
7169
- const key = getRandomString(TRACKING_KEY_LENGTH);
7170
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7171
- } catch (e2) {
7172
- }
7173
- };
7174
- const initUserTracking = (userKey) => {
7175
- try {
7176
- if (getUserKey()) {
7177
- return;
7178
- }
7179
- const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7180
- window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7181
- } catch (e2) {
7182
- }
7183
- };
7184
- const clearUserTracking = () => {
7185
- try {
7186
- window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7187
- } catch (e2) {
7188
- }
7189
- };
7190
- const isTrackingEnabled = () => {
7191
- try {
7192
- return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7193
- } catch (e2) {
7194
- return false;
7195
- }
7196
- };
7197
- const getSessionKey = () => {
7198
- var _a;
7199
- try {
7200
- return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7201
- } catch (e2) {
7202
- return void 0;
7203
- }
7204
- };
7205
- const getUserKey = () => {
7206
- var _a;
7207
- try {
7208
- return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7209
- } catch (e2) {
7210
- return void 0;
7211
- }
7212
- };
7213
- const initTracking = (options) => {
7214
- initBaseTracking(Boolean(options.trackBase));
7215
- if (options.trackSession) {
7216
- initSessionTracking();
7217
- } else {
7218
- clearSessionTracking();
7219
- }
7220
- if (options.trackUser) {
7221
- initUserTracking(options.userKey);
7222
- } else {
7223
- clearUserTracking();
7224
- }
7225
- if (options.analytics) {
7226
- initAnalyticsTracking(options.analytics);
7227
- }
7228
- };
7229
- const getLupaTrackingContext = () => {
7230
- if (!isTrackingEnabled()) {
7231
- return {};
7232
- }
7233
- return {
7234
- userId: getUserKey(),
7235
- sessionId: getSessionKey()
7236
- };
7237
- };
7238
- const trackLupaEvent = (queryKey, data = {}, options) => {
7239
- var _a, _b;
7240
- if (!queryKey || !data.type) {
7241
- return;
7242
- }
7243
- const eventData = {
7244
- searchQuery: (_a = data.searchQuery) != null ? _a : "",
7245
- itemId: (_b = data.itemId) != null ? _b : "",
7246
- name: data.type,
7247
- userId: getUserKey(),
7248
- sessionId: getSessionKey(),
7249
- filters: data.filters
7250
- };
7251
- LupaSearchSdk.track(queryKey, eventData, options);
7252
- };
7253
- const sendGa = (name, ...args) => {
7254
- window.ga(() => {
7255
- const trackers = window.ga.getAll();
7256
- const firstTracker = trackers[0];
7257
- if (!firstTracker) {
7258
- console.error("GA tracker not found");
7259
- }
7260
- const trackerName = firstTracker.get("name");
7261
- window.ga(`${trackerName}.${name}`, ...args);
7262
- });
7263
- };
7264
- const trackAnalyticsEvent = (data) => {
7265
- var _a, _b, _c;
7266
- try {
7267
- const options = JSON.parse(
7268
- (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7269
- );
7270
- if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7271
- return;
7272
- }
7273
- switch (options.type) {
7274
- case "ua":
7275
- sendUaAnalyticsEvent(data, options);
7276
- break;
7277
- case "ga4":
7278
- sendGa4AnalyticsEvent(data, options);
7279
- break;
7280
- case "debug":
7281
- processDebugEvent(data);
7282
- break;
7283
- default:
7284
- sendUaAnalyticsEvent(data, options);
7285
- }
7286
- } catch (e2) {
7287
- console.error("Unable to send an event to google analytics");
7288
- }
7289
- };
7290
- const parseEcommerceData = (data, title) => {
7291
- var _a, _b;
7292
- return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7293
- item_list_name: title,
7294
- items: (_b = data.analytics) == null ? void 0 : _b.items
7295
- } : void 0;
7296
- };
7297
- const sendUaAnalyticsEvent = (data, options) => {
7298
- var _a, _b, _c, _d;
7299
- const ga = window.ga;
7300
- if (!ga) {
7301
- console.error("Google Analytics object not found");
7302
- return;
7303
- }
7304
- sendGa(
7305
- "send",
7306
- "event",
7307
- options.parentEventName,
7308
- (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7309
- (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7310
- );
7311
- };
7312
- const sendGa4AnalyticsEvent = (data, options) => {
7313
- var _a, _b, _c, _d, _e, _f, _g;
7314
- if (!window || !window.dataLayer) {
7315
- console.error("dataLayer object not found.");
7316
- return;
7317
- }
7318
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7319
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7320
- const params = __spreadValues2({
7321
- search_text: data.searchQuery,
7322
- item_title: title,
7323
- item_id: data.itemId,
7324
- ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7325
- }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7326
- window.dataLayer.push(__spreadValues2({
7327
- event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7328
- }, params));
7329
- };
7330
- const processDebugEvent = (data) => {
7331
- var _a, _b, _c, _d;
7332
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7333
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7334
- const params = {
7335
- event: (_c = data.analytics) == null ? void 0 : _c.type,
7336
- search_text: data.searchQuery,
7337
- item_title: title,
7338
- item_id: data.itemId,
7339
- ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7340
- };
7341
- console.debug("Analytics debug event:", params);
7342
- };
7343
- const track = (queryKey, data = {}, options) => {
7344
- var _a;
7345
- if (!isTrackingEnabled()) {
7346
- return;
7347
- }
7348
- const hasSearchQuery = data.searchQuery;
7349
- if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7350
- return;
7351
- }
7352
- trackAnalyticsEvent(data);
7353
- trackLupaEvent(queryKey, data, options);
7354
- };
7355
7146
  const DEFAULT_SEARCH_BOX_OPTIONS$1 = {
7356
7147
  inputSelector: "#searchBox",
7357
7148
  options: {
@@ -7556,83 +7347,343 @@ var __async = (__this, __arguments, generator) => {
7556
7347
  var _a;
7557
7348
  return (_a = searchBoxOptions.value.options) != null ? _a : searchResultOptions.value.options;
7558
7349
  }
7559
- );
7560
- const classMap = computed(() => {
7561
- var _a;
7562
- return (_a = searchResultOptions.value.classMap) != null ? _a : {};
7563
- });
7564
- const initialFilters = computed(() => searchResultInitialFilters.value);
7565
- const boxRoutingBehavior = computed(() => {
7566
- var _a;
7567
- return (_a = searchBoxOptions.value.routingBehavior) != null ? _a : "direct-link";
7350
+ );
7351
+ const classMap = computed(() => {
7352
+ var _a;
7353
+ return (_a = searchResultOptions.value.classMap) != null ? _a : {};
7354
+ });
7355
+ const initialFilters = computed(() => searchResultInitialFilters.value);
7356
+ const boxRoutingBehavior = computed(() => {
7357
+ var _a;
7358
+ return (_a = searchBoxOptions.value.routingBehavior) != null ? _a : "direct-link";
7359
+ });
7360
+ const searchResultsRoutingBehavior = computed(
7361
+ () => {
7362
+ var _a;
7363
+ return (_a = searchResultOptions.value.routingBehavior) != null ? _a : "direct-link";
7364
+ }
7365
+ );
7366
+ const defaultSearchResultPageSize = computed(
7367
+ () => {
7368
+ var _a, _b;
7369
+ return (_b = (_a = currentResolutionPageSizes.value) == null ? void 0 : _a[0]) != null ? _b : DEFAULT_PAGE_SIZE;
7370
+ }
7371
+ );
7372
+ const currentResolutionPageSizes = computed(() => {
7373
+ var _a, _b, _c, _d;
7374
+ const pageSizes = (_d = (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.pagination) == null ? void 0 : _b.sizeSelection) == null ? void 0 : _c.sizes) != null ? _d : DEFAULT_PAGE_SIZE_SELECTION;
7375
+ if (Array.isArray(pageSizes)) {
7376
+ return pageSizes;
7377
+ }
7378
+ const screenSize = screenStore.currentScreenWidth;
7379
+ switch (screenSize) {
7380
+ case "xs":
7381
+ return pageSizes.xs;
7382
+ case "sm":
7383
+ return pageSizes.sm;
7384
+ case "md":
7385
+ return pageSizes.md;
7386
+ case "l":
7387
+ return pageSizes.l;
7388
+ case "xl":
7389
+ return pageSizes.xl;
7390
+ }
7391
+ });
7392
+ const setSearchBoxOptions = ({ options }) => {
7393
+ searchBoxOptions.value = options;
7394
+ };
7395
+ const setTrackingOptions = ({ options }) => {
7396
+ trackingOptions.value = options;
7397
+ };
7398
+ const setSearchResultOptions = ({ options }) => {
7399
+ searchResultOptions.value = options;
7400
+ };
7401
+ const setInitialFilters = ({ initialFilters: initialFilters2 }) => {
7402
+ searchResultInitialFilters.value = initialFilters2;
7403
+ };
7404
+ const getQueryParamName = (param) => {
7405
+ var _a;
7406
+ const nameMap = searchBoxOptions.value.queryParameterNames;
7407
+ return (_a = nameMap == null ? void 0 : nameMap[param]) != null ? _a : param;
7408
+ };
7409
+ return {
7410
+ searchBoxOptions,
7411
+ searchResultOptions,
7412
+ trackingOptions,
7413
+ envOptions,
7414
+ classMap,
7415
+ initialFilters,
7416
+ boxRoutingBehavior,
7417
+ searchResultsRoutingBehavior,
7418
+ defaultSearchResultPageSize,
7419
+ currentResolutionPageSizes,
7420
+ setSearchBoxOptions,
7421
+ setTrackingOptions,
7422
+ setSearchResultOptions,
7423
+ setInitialFilters,
7424
+ getQueryParamName
7425
+ };
7426
+ });
7427
+ const initAnalyticsTracking = (analyticsOptions) => {
7428
+ try {
7429
+ if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7430
+ window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7431
+ } else {
7432
+ window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7433
+ }
7434
+ } catch (e2) {
7435
+ }
7436
+ };
7437
+ const initBaseTracking = (enabled) => {
7438
+ try {
7439
+ if (enabled) {
7440
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7441
+ } else {
7442
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7443
+ clearSessionTracking();
7444
+ clearUserTracking();
7445
+ }
7446
+ } catch (e2) {
7447
+ }
7448
+ };
7449
+ const clearSessionTracking = () => {
7450
+ try {
7451
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7452
+ } catch (e2) {
7453
+ }
7454
+ };
7455
+ const initSessionTracking = () => {
7456
+ try {
7457
+ if (getSessionKey()) {
7458
+ return;
7459
+ }
7460
+ const key = getRandomString(TRACKING_KEY_LENGTH);
7461
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7462
+ } catch (e2) {
7463
+ }
7464
+ };
7465
+ const initUserTracking = (userKey) => {
7466
+ try {
7467
+ if (getUserKey()) {
7468
+ return;
7469
+ }
7470
+ const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7471
+ window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7472
+ } catch (e2) {
7473
+ }
7474
+ };
7475
+ const clearUserTracking = () => {
7476
+ try {
7477
+ window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7478
+ } catch (e2) {
7479
+ }
7480
+ };
7481
+ const isTrackingEnabled = () => {
7482
+ try {
7483
+ return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7484
+ } catch (e2) {
7485
+ return false;
7486
+ }
7487
+ };
7488
+ const isDelayedClickTracking = () => {
7489
+ try {
7490
+ return Boolean(window.localStorage.getItem(TRACKING_CLICK_DELAYED));
7491
+ } catch (e2) {
7492
+ return false;
7493
+ }
7494
+ };
7495
+ const getSessionKey = () => {
7496
+ var _a;
7497
+ try {
7498
+ return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7499
+ } catch (e2) {
7500
+ return void 0;
7501
+ }
7502
+ };
7503
+ const getUserKey = () => {
7504
+ var _a;
7505
+ try {
7506
+ return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7507
+ } catch (e2) {
7508
+ return void 0;
7509
+ }
7510
+ };
7511
+ const initTracking = (options) => {
7512
+ initBaseTracking(Boolean(options.trackBase));
7513
+ if (options.trackSession) {
7514
+ initSessionTracking();
7515
+ } else {
7516
+ clearSessionTracking();
7517
+ }
7518
+ if (options.trackUser) {
7519
+ initUserTracking(options.userKey);
7520
+ } else {
7521
+ clearUserTracking();
7522
+ }
7523
+ if (options.analytics) {
7524
+ initAnalyticsTracking(options.analytics);
7525
+ }
7526
+ if (options.delayedClickTracking) {
7527
+ window.localStorage.setItem(TRACKING_CLICK_DELAYED, "1");
7528
+ checkAndDispatchDelayedEvents();
7529
+ } else {
7530
+ window.localStorage.removeItem(TRACKING_CLICK_DELAYED);
7531
+ }
7532
+ };
7533
+ const getLupaTrackingContext = () => {
7534
+ if (!isTrackingEnabled()) {
7535
+ return {};
7536
+ }
7537
+ return {
7538
+ userId: getUserKey(),
7539
+ sessionId: getSessionKey()
7540
+ };
7541
+ };
7542
+ const trackLupaEvent = (queryKey, data = {}, options) => {
7543
+ var _a, _b;
7544
+ if (!queryKey || !data.type) {
7545
+ return;
7546
+ }
7547
+ const eventData = {
7548
+ searchQuery: (_a = data.searchQuery) != null ? _a : "",
7549
+ itemId: (_b = data.itemId) != null ? _b : "",
7550
+ name: data.type,
7551
+ userId: getUserKey(),
7552
+ sessionId: getSessionKey(),
7553
+ filters: data.filters
7554
+ };
7555
+ LupaSearchSdk.track(queryKey, eventData, options);
7556
+ };
7557
+ const sendGa = (name, ...args) => {
7558
+ window.ga(() => {
7559
+ const trackers = window.ga.getAll();
7560
+ const firstTracker = trackers[0];
7561
+ if (!firstTracker) {
7562
+ console.error("GA tracker not found");
7563
+ }
7564
+ const trackerName = firstTracker.get("name");
7565
+ window.ga(`${trackerName}.${name}`, ...args);
7568
7566
  });
7569
- const searchResultsRoutingBehavior = computed(
7570
- () => {
7571
- var _a;
7572
- return (_a = searchResultOptions.value.routingBehavior) != null ? _a : "direct-link";
7567
+ };
7568
+ const trackAnalyticsEvent = (data) => {
7569
+ var _a, _b, _c;
7570
+ try {
7571
+ const options = JSON.parse(
7572
+ (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7573
+ );
7574
+ if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7575
+ return;
7573
7576
  }
7574
- );
7575
- const defaultSearchResultPageSize = computed(
7576
- () => {
7577
- var _a, _b;
7578
- return (_b = (_a = currentResolutionPageSizes.value) == null ? void 0 : _a[0]) != null ? _b : DEFAULT_PAGE_SIZE;
7577
+ switch (options.type) {
7578
+ case "ua":
7579
+ sendUaAnalyticsEvent(data, options);
7580
+ break;
7581
+ case "ga4":
7582
+ sendGa4AnalyticsEvent(data, options);
7583
+ break;
7584
+ case "debug":
7585
+ processDebugEvent(data);
7586
+ break;
7587
+ default:
7588
+ sendUaAnalyticsEvent(data, options);
7579
7589
  }
7590
+ } catch (e2) {
7591
+ console.error("Unable to send an event to google analytics");
7592
+ }
7593
+ };
7594
+ const parseEcommerceData = (data, title) => {
7595
+ var _a, _b;
7596
+ return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7597
+ item_list_name: title,
7598
+ items: (_b = data.analytics) == null ? void 0 : _b.items
7599
+ } : void 0;
7600
+ };
7601
+ const sendUaAnalyticsEvent = (data, options) => {
7602
+ var _a, _b, _c, _d;
7603
+ const ga = window.ga;
7604
+ if (!ga) {
7605
+ console.error("Google Analytics object not found");
7606
+ return;
7607
+ }
7608
+ sendGa(
7609
+ "send",
7610
+ "event",
7611
+ options.parentEventName,
7612
+ (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7613
+ (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7580
7614
  );
7581
- const currentResolutionPageSizes = computed(() => {
7582
- var _a, _b, _c, _d;
7583
- const pageSizes = (_d = (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.pagination) == null ? void 0 : _b.sizeSelection) == null ? void 0 : _c.sizes) != null ? _d : DEFAULT_PAGE_SIZE_SELECTION;
7584
- if (Array.isArray(pageSizes)) {
7585
- return pageSizes;
7586
- }
7587
- const screenSize = screenStore.currentScreenWidth;
7588
- switch (screenSize) {
7589
- case "xs":
7590
- return pageSizes.xs;
7591
- case "sm":
7592
- return pageSizes.sm;
7593
- case "md":
7594
- return pageSizes.md;
7595
- case "l":
7596
- return pageSizes.l;
7597
- case "xl":
7598
- return pageSizes.xl;
7599
- }
7600
- });
7601
- const setSearchBoxOptions = ({ options }) => {
7602
- searchBoxOptions.value = options;
7603
- };
7604
- const setTrackingOptions = ({ options }) => {
7605
- trackingOptions.value = options;
7606
- };
7607
- const setSearchResultOptions = ({ options }) => {
7608
- searchResultOptions.value = options;
7609
- };
7610
- const setInitialFilters = ({ initialFilters: initialFilters2 }) => {
7611
- searchResultInitialFilters.value = initialFilters2;
7612
- };
7613
- const getQueryParamName = (param) => {
7614
- var _a;
7615
- const nameMap = searchBoxOptions.value.queryParameterNames;
7616
- return (_a = nameMap == null ? void 0 : nameMap[param]) != null ? _a : param;
7617
- };
7618
- return {
7619
- searchBoxOptions,
7620
- searchResultOptions,
7621
- trackingOptions,
7622
- envOptions,
7623
- classMap,
7624
- initialFilters,
7625
- boxRoutingBehavior,
7626
- searchResultsRoutingBehavior,
7627
- defaultSearchResultPageSize,
7628
- currentResolutionPageSizes,
7629
- setSearchBoxOptions,
7630
- setTrackingOptions,
7631
- setSearchResultOptions,
7632
- setInitialFilters,
7633
- getQueryParamName
7615
+ };
7616
+ const sendGa4AnalyticsEvent = (data, options) => {
7617
+ var _a, _b, _c, _d, _e, _f, _g;
7618
+ if (!window || !window.dataLayer) {
7619
+ console.error("dataLayer object not found.");
7620
+ return;
7621
+ }
7622
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7623
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7624
+ const params = __spreadValues2({
7625
+ search_text: data.searchQuery,
7626
+ item_title: title,
7627
+ item_id: data.itemId,
7628
+ ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7629
+ }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7630
+ window.dataLayer.push(__spreadValues2({
7631
+ event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7632
+ }, params));
7633
+ };
7634
+ const processDebugEvent = (data) => {
7635
+ var _a, _b, _c, _d;
7636
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7637
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7638
+ const params = {
7639
+ event: (_c = data.analytics) == null ? void 0 : _c.type,
7640
+ search_text: data.searchQuery,
7641
+ item_title: title,
7642
+ item_id: data.itemId,
7643
+ ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7634
7644
  };
7635
- });
7645
+ console.debug("Analytics debug event:", params);
7646
+ };
7647
+ const getDelayedEventsCache = () => {
7648
+ var _a;
7649
+ try {
7650
+ return JSON.parse((_a = window.localStorage.getItem(DELAYED_TRACKING_EVENTS_CACHE)) != null ? _a : "{}");
7651
+ } catch (e2) {
7652
+ return {};
7653
+ }
7654
+ };
7655
+ const storeDelayedEventCache = (cache) => {
7656
+ try {
7657
+ window.localStorage.setItem(DELAYED_TRACKING_EVENTS_CACHE, JSON.stringify(cache));
7658
+ } catch (e2) {
7659
+ }
7660
+ };
7661
+ const checkAndDispatchDelayedEvents = () => {
7662
+ var _a, _b;
7663
+ const optionsStore = useOptionsStore();
7664
+ const eventCache = getDelayedEventsCache();
7665
+ const urls = Object.keys(eventCache);
7666
+ for (const url of urls) {
7667
+ if ((_a = window.location.href) == null ? void 0 : _a.includes(url)) {
7668
+ const options = (_b = optionsStore.envOptions) != null ? _b : { environment: "production" };
7669
+ const { queryKey, data } = eventCache[url];
7670
+ track(queryKey, data, options);
7671
+ }
7672
+ }
7673
+ storeDelayedEventCache({});
7674
+ };
7675
+ const track = (queryKey, data = {}, options) => {
7676
+ var _a;
7677
+ if (!isTrackingEnabled()) {
7678
+ return;
7679
+ }
7680
+ const hasSearchQuery = data.searchQuery;
7681
+ if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7682
+ return;
7683
+ }
7684
+ trackAnalyticsEvent(data);
7685
+ trackLupaEvent(queryKey, data, options);
7686
+ };
7636
7687
  var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
7637
7688
  DocumentElementType2["IMAGE"] = "image";
7638
7689
  DocumentElementType2["TITLE"] = "title";
@@ -8141,7 +8192,11 @@ var __async = (__this, __arguments, generator) => {
8141
8192
  try {
8142
8193
  localStorage.setItem(
8143
8194
  CACHE_KEY,
8144
- JSON.stringify({ redirections: redirections.value, savedAt: Date.now() })
8195
+ JSON.stringify({
8196
+ redirections: redirections.value,
8197
+ savedAt: Date.now(),
8198
+ queryKey: redirectionOptions.value.queryKey
8199
+ })
8145
8200
  );
8146
8201
  } catch (e2) {
8147
8202
  }
@@ -8152,6 +8207,9 @@ var __async = (__this, __arguments, generator) => {
8152
8207
  return false;
8153
8208
  try {
8154
8209
  const data = JSON.parse((_a = localStorage.getItem(CACHE_KEY)) != null ? _a : "");
8210
+ if (data.queryKey !== config.queryKey) {
8211
+ return false;
8212
+ }
8155
8213
  if ((data == null ? void 0 : data.redirections) && Date.now() - data.savedAt < 1e3 * config.cacheSeconds) {
8156
8214
  redirections.value = data.redirections;
8157
8215
  return true;
@@ -8176,6 +8234,7 @@ var __async = (__this, __arguments, generator) => {
8176
8234
  try {
8177
8235
  const result2 = yield LupaSearchSdk.loadRedirectionRules(config.queryKey, options);
8178
8236
  if (!((_d = result2 == null ? void 0 : result2.rules) == null ? void 0 : _d.length)) {
8237
+ redirections.value = { rules: [] };
8179
8238
  return;
8180
8239
  }
8181
8240
  redirections.value = result2;
@@ -8613,10 +8672,10 @@ var __async = (__this, __arguments, generator) => {
8613
8672
  resetHighlightIndex
8614
8673
  };
8615
8674
  });
8616
- const _hoisted_1$1g = { id: "lupa-search-box-input-container" };
8617
- const _hoisted_2$U = { class: "lupa-input-clear" };
8618
- const _hoisted_3$D = { id: "lupa-search-box-input" };
8619
- const _hoisted_4$s = ["value"];
8675
+ const _hoisted_1$1h = { id: "lupa-search-box-input-container" };
8676
+ const _hoisted_2$V = { class: "lupa-input-clear" };
8677
+ const _hoisted_3$E = { id: "lupa-search-box-input" };
8678
+ const _hoisted_4$t = ["value"];
8620
8679
  const _hoisted_5$j = ["aria-label", "placeholder"];
8621
8680
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8622
8681
  const _hoisted_7$7 = [
@@ -8626,7 +8685,7 @@ var __async = (__this, __arguments, generator) => {
8626
8685
  key: 0,
8627
8686
  class: "lupa-close-label"
8628
8687
  };
8629
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
8688
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
8630
8689
  __name: "SearchBoxInput",
8631
8690
  props: {
8632
8691
  options: {},
@@ -8710,20 +8769,20 @@ var __async = (__this, __arguments, generator) => {
8710
8769
  };
8711
8770
  __expose({ focus });
8712
8771
  return (_ctx, _cache) => {
8713
- return openBlock(), createElementBlock("div", _hoisted_1$1g, [
8714
- createBaseVNode("div", _hoisted_2$U, [
8772
+ return openBlock(), createElementBlock("div", _hoisted_1$1h, [
8773
+ createBaseVNode("div", _hoisted_2$V, [
8715
8774
  createBaseVNode("div", {
8716
8775
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
8717
8776
  onClick: clear2
8718
8777
  }, null, 2)
8719
8778
  ]),
8720
- createBaseVNode("div", _hoisted_3$D, [
8779
+ createBaseVNode("div", _hoisted_3$E, [
8721
8780
  createBaseVNode("input", {
8722
8781
  class: "lupa-hint",
8723
8782
  "aria-hidden": "true",
8724
8783
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
8725
8784
  disabled: ""
8726
- }, null, 8, _hoisted_4$s),
8785
+ }, null, 8, _hoisted_4$t),
8727
8786
  withDirectives(createBaseVNode("input", mergeProps({
8728
8787
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
8729
8788
  }, inputAttributes.value, {
@@ -8756,7 +8815,7 @@ var __async = (__this, __arguments, generator) => {
8756
8815
  };
8757
8816
  }
8758
8817
  });
8759
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
8818
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
8760
8819
  __name: "SearchBoxMoreResults",
8761
8820
  props: {
8762
8821
  labels: {},
@@ -8788,9 +8847,9 @@ var __async = (__this, __arguments, generator) => {
8788
8847
  };
8789
8848
  }
8790
8849
  });
8791
- const _hoisted_1$1f = { class: "lupa-search-box-history-item" };
8792
- const _hoisted_2$T = { class: "lupa-search-box-history-item-content" };
8793
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
8850
+ const _hoisted_1$1g = { class: "lupa-search-box-history-item" };
8851
+ const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
8852
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
8794
8853
  __name: "SearchBoxHistoryItem",
8795
8854
  props: {
8796
8855
  item: {},
@@ -8806,8 +8865,8 @@ var __async = (__this, __arguments, generator) => {
8806
8865
  emit2("click", { query: props.item });
8807
8866
  };
8808
8867
  return (_ctx, _cache) => {
8809
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
8810
- createBaseVNode("div", _hoisted_2$T, [
8868
+ return openBlock(), createElementBlock("div", _hoisted_1$1g, [
8869
+ createBaseVNode("div", _hoisted_2$U, [
8811
8870
  createBaseVNode("div", {
8812
8871
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
8813
8872
  onClick: click2
@@ -8821,11 +8880,11 @@ var __async = (__this, __arguments, generator) => {
8821
8880
  };
8822
8881
  }
8823
8882
  });
8824
- const _hoisted_1$1e = {
8883
+ const _hoisted_1$1f = {
8825
8884
  key: 0,
8826
8885
  class: "lupa-search-box-history-panel"
8827
8886
  };
8828
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8887
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
8829
8888
  __name: "SearchBoxHistoryPanel",
8830
8889
  props: {
8831
8890
  options: {}
@@ -8866,9 +8925,9 @@ var __async = (__this, __arguments, generator) => {
8866
8925
  }
8867
8926
  };
8868
8927
  return (_ctx, _cache) => {
8869
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1e, [
8928
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1f, [
8870
8929
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
8871
- return openBlock(), createBlock(_sfc_main$1q, {
8930
+ return openBlock(), createBlock(_sfc_main$1r, {
8872
8931
  key: item,
8873
8932
  item,
8874
8933
  highlighted: index === highlightIndex.value,
@@ -8884,15 +8943,15 @@ var __async = (__this, __arguments, generator) => {
8884
8943
  };
8885
8944
  }
8886
8945
  });
8887
- const _hoisted_1$1d = { class: "lupa-search-box-no-results" };
8888
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8946
+ const _hoisted_1$1e = { class: "lupa-search-box-no-results" };
8947
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8889
8948
  __name: "SearchBoxNoResults",
8890
8949
  props: {
8891
8950
  labels: {}
8892
8951
  },
8893
8952
  setup(__props) {
8894
8953
  return (_ctx, _cache) => {
8895
- return openBlock(), createElementBlock("p", _hoisted_1$1d, toDisplayString(_ctx.labels.noResults), 1);
8954
+ return openBlock(), createElementBlock("p", _hoisted_1$1e, toDisplayString(_ctx.labels.noResults), 1);
8896
8955
  };
8897
8956
  }
8898
8957
  });
@@ -8924,18 +8983,18 @@ var __async = (__this, __arguments, generator) => {
8924
8983
  }
8925
8984
  return gridTemplate.join(" ");
8926
8985
  };
8927
- const _hoisted_1$1c = ["innerHTML"];
8928
- const _hoisted_2$S = {
8986
+ const _hoisted_1$1d = ["innerHTML"];
8987
+ const _hoisted_2$T = {
8929
8988
  key: 1,
8930
8989
  "data-cy": "lupa-suggestion-value",
8931
8990
  class: "lupa-suggestion-value"
8932
8991
  };
8933
- const _hoisted_3$C = {
8992
+ const _hoisted_3$D = {
8934
8993
  key: 2,
8935
8994
  class: "lupa-suggestion-facet",
8936
8995
  "data-cy": "lupa-suggestion-facet"
8937
8996
  };
8938
- const _hoisted_4$r = {
8997
+ const _hoisted_4$s = {
8939
8998
  class: "lupa-suggestion-facet-label",
8940
8999
  "data-cy": "lupa-suggestion-facet-label"
8941
9000
  };
@@ -8943,7 +9002,7 @@ var __async = (__this, __arguments, generator) => {
8943
9002
  class: "lupa-suggestion-facet-value",
8944
9003
  "data-cy": "lupa-suggestion-facet-value"
8945
9004
  };
8946
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
9005
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8947
9006
  __name: "SearchBoxSuggestion",
8948
9007
  props: {
8949
9008
  suggestion: {},
@@ -8979,20 +9038,20 @@ var __async = (__this, __arguments, generator) => {
8979
9038
  class: "lupa-suggestion-value",
8980
9039
  "data-cy": "lupa-suggestion-value",
8981
9040
  innerHTML: _ctx.suggestion.displayHighlight
8982
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(_ctx.suggestion.display), 1)),
8983
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
8984
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
9041
+ }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
9042
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$D, [
9043
+ createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
8985
9044
  createBaseVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
8986
9045
  ])) : createCommentVNode("", true)
8987
9046
  ]);
8988
9047
  };
8989
9048
  }
8990
9049
  });
8991
- const _hoisted_1$1b = {
9050
+ const _hoisted_1$1c = {
8992
9051
  id: "lupa-search-box-suggestions",
8993
9052
  "data-cy": "lupa-search-box-suggestions"
8994
9053
  };
8995
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
9054
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8996
9055
  __name: "SearchBoxSuggestions",
8997
9056
  props: {
8998
9057
  items: {},
@@ -9052,9 +9111,9 @@ var __async = (__this, __arguments, generator) => {
9052
9111
  });
9053
9112
  });
9054
9113
  return (_ctx, _cache) => {
9055
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
9114
+ return openBlock(), createElementBlock("div", _hoisted_1$1c, [
9056
9115
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
9057
- return openBlock(), createBlock(_sfc_main$1n, {
9116
+ return openBlock(), createBlock(_sfc_main$1o, {
9058
9117
  key: getSuggestionKey(item),
9059
9118
  class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
9060
9119
  suggestion: item,
@@ -9082,7 +9141,7 @@ var __async = (__this, __arguments, generator) => {
9082
9141
  }, timeout);
9083
9142
  };
9084
9143
  };
9085
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
9144
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
9086
9145
  __name: "SearchBoxSuggestionsWrapper",
9087
9146
  props: {
9088
9147
  panel: {},
@@ -9124,7 +9183,7 @@ var __async = (__this, __arguments, generator) => {
9124
9183
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
9125
9184
  watch(() => props.panel.limit, getSuggestionsDebounced);
9126
9185
  return (_ctx, _cache) => {
9127
- return openBlock(), createBlock(_sfc_main$1m, {
9186
+ return openBlock(), createBlock(_sfc_main$1n, {
9128
9187
  items: searchResult.value,
9129
9188
  highlight: _ctx.panel.highlight,
9130
9189
  queryKey: _ctx.panel.queryKey,
@@ -18202,9 +18261,9 @@ and ensure you are accounting for this risk.
18202
18261
  targetImage.src = placeholder;
18203
18262
  }
18204
18263
  };
18205
- const _hoisted_1$1a = ["src"];
18206
- const _hoisted_2$R = ["src"];
18207
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
18264
+ const _hoisted_1$1b = ["src"];
18265
+ const _hoisted_2$S = ["src"];
18266
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
18208
18267
  __name: "ProductImage",
18209
18268
  props: {
18210
18269
  item: {},
@@ -18346,7 +18405,7 @@ and ensure you are accounting for this risk.
18346
18405
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
18347
18406
  onError: replaceWithPlaceholder,
18348
18407
  key: finalUrl.value
18349
- }), null, 16, _hoisted_1$1a))
18408
+ }), null, 16, _hoisted_1$1b))
18350
18409
  ]),
18351
18410
  _: 1
18352
18411
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -18354,12 +18413,12 @@ and ensure you are accounting for this risk.
18354
18413
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
18355
18414
  style: styleOverride.value,
18356
18415
  src: finalMainImageUrl.value
18357
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$R))
18416
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
18358
18417
  ], 38);
18359
18418
  };
18360
18419
  }
18361
18420
  });
18362
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
18421
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
18363
18422
  __name: "SearchBoxProductImage",
18364
18423
  props: {
18365
18424
  item: {},
@@ -18367,7 +18426,7 @@ and ensure you are accounting for this risk.
18367
18426
  },
18368
18427
  setup(__props) {
18369
18428
  return (_ctx, _cache) => {
18370
- return openBlock(), createBlock(_sfc_main$1k, {
18429
+ return openBlock(), createBlock(_sfc_main$1l, {
18371
18430
  item: _ctx.item,
18372
18431
  options: _ctx.options,
18373
18432
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -18376,12 +18435,12 @@ and ensure you are accounting for this risk.
18376
18435
  };
18377
18436
  }
18378
18437
  });
18379
- const _hoisted_1$19 = ["innerHTML"];
18380
- const _hoisted_2$Q = {
18438
+ const _hoisted_1$1a = ["innerHTML"];
18439
+ const _hoisted_2$R = {
18381
18440
  key: 1,
18382
18441
  class: "lupa-search-box-product-title"
18383
18442
  };
18384
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
18443
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
18385
18444
  __name: "SearchBoxProductTitle",
18386
18445
  props: {
18387
18446
  item: {},
@@ -18404,18 +18463,18 @@ and ensure you are accounting for this risk.
18404
18463
  key: 0,
18405
18464
  class: "lupa-search-box-product-title",
18406
18465
  innerHTML: sanitizedTitle.value
18407
- }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, [
18466
+ }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
18408
18467
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
18409
18468
  ]));
18410
18469
  };
18411
18470
  }
18412
18471
  });
18413
- const _hoisted_1$18 = ["innerHTML"];
18414
- const _hoisted_2$P = {
18472
+ const _hoisted_1$19 = ["innerHTML"];
18473
+ const _hoisted_2$Q = {
18415
18474
  key: 1,
18416
18475
  class: "lupa-search-box-product-description"
18417
18476
  };
18418
- const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18477
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
18419
18478
  __name: "SearchBoxProductDescription",
18420
18479
  props: {
18421
18480
  item: {},
@@ -18438,12 +18497,12 @@ and ensure you are accounting for this risk.
18438
18497
  key: 0,
18439
18498
  class: "lupa-search-box-product-description",
18440
18499
  innerHTML: sanitizedDescription.value
18441
- }, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(description.value), 1));
18500
+ }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
18442
18501
  };
18443
18502
  }
18444
18503
  });
18445
- const _hoisted_1$17 = { class: "lupa-search-box-product-price" };
18446
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18504
+ const _hoisted_1$18 = { class: "lupa-search-box-product-price" };
18505
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18447
18506
  __name: "SearchBoxProductPrice",
18448
18507
  props: {
18449
18508
  item: {},
@@ -18461,13 +18520,13 @@ and ensure you are accounting for this risk.
18461
18520
  );
18462
18521
  });
18463
18522
  return (_ctx, _cache) => {
18464
- return openBlock(), createElementBlock("div", _hoisted_1$17, [
18523
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
18465
18524
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
18466
18525
  ]);
18467
18526
  };
18468
18527
  }
18469
18528
  });
18470
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18529
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18471
18530
  __name: "SearchBoxProductRegularPrice",
18472
18531
  props: {
18473
18532
  item: {},
@@ -18494,12 +18553,12 @@ and ensure you are accounting for this risk.
18494
18553
  };
18495
18554
  }
18496
18555
  });
18497
- const _hoisted_1$16 = ["innerHTML"];
18498
- const _hoisted_2$O = { key: 0 };
18499
- const _hoisted_3$B = { key: 1 };
18500
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
18556
+ const _hoisted_1$17 = ["innerHTML"];
18557
+ const _hoisted_2$P = { key: 0 };
18558
+ const _hoisted_3$C = { key: 1 };
18559
+ const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
18501
18560
  const _hoisted_5$h = { class: "lupa-search-box-custom-text" };
18502
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18561
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18503
18562
  __name: "SearchBoxProductCustom",
18504
18563
  props: {
18505
18564
  item: {},
@@ -18525,20 +18584,20 @@ and ensure you are accounting for this risk.
18525
18584
  key: 0,
18526
18585
  class: [className.value, "lupa-search-box-product-custom"],
18527
18586
  innerHTML: text.value
18528
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$16)) : (openBlock(), createElementBlock("div", mergeProps({
18587
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$17)) : (openBlock(), createElementBlock("div", mergeProps({
18529
18588
  key: 1,
18530
18589
  class: [className.value, "lupa-search-box-product-custom"]
18531
18590
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
18532
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
18533
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
18591
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$C, [
18592
+ createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
18534
18593
  createBaseVNode("div", _hoisted_5$h, toDisplayString(text.value), 1)
18535
18594
  ]))
18536
18595
  ], 16));
18537
18596
  };
18538
18597
  }
18539
18598
  });
18540
- const _hoisted_1$15 = ["innerHTML"];
18541
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18599
+ const _hoisted_1$16 = ["innerHTML"];
18600
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18542
18601
  __name: "SearchBoxProductCustomHtml",
18543
18602
  props: {
18544
18603
  item: {},
@@ -18563,7 +18622,7 @@ and ensure you are accounting for this risk.
18563
18622
  return openBlock(), createElementBlock("div", mergeProps({
18564
18623
  class: className.value,
18565
18624
  innerHTML: text.value
18566
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$15);
18625
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$16);
18567
18626
  };
18568
18627
  }
18569
18628
  });
@@ -18797,10 +18856,10 @@ and ensure you are accounting for this risk.
18797
18856
  setRelatedCategoryChildren
18798
18857
  };
18799
18858
  });
18800
- const _hoisted_1$14 = { class: "lupa-search-box-add-to-cart-wrapper" };
18801
- const _hoisted_2$N = { class: "lupa-search-box-product-addtocart" };
18802
- const _hoisted_3$A = ["onClick", "disabled"];
18803
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
18859
+ const _hoisted_1$15 = { class: "lupa-search-box-add-to-cart-wrapper" };
18860
+ const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
18861
+ const _hoisted_3$B = ["onClick", "disabled"];
18862
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18804
18863
  __name: "SearchBoxProductAddToCart",
18805
18864
  props: {
18806
18865
  item: {},
@@ -18833,37 +18892,37 @@ and ensure you are accounting for this risk.
18833
18892
  loading.value = false;
18834
18893
  });
18835
18894
  return (_ctx, _cache) => {
18836
- return openBlock(), createElementBlock("div", _hoisted_1$14, [
18837
- createBaseVNode("div", _hoisted_2$N, [
18895
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
18896
+ createBaseVNode("div", _hoisted_2$O, [
18838
18897
  createBaseVNode("button", {
18839
18898
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
18840
18899
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
18841
18900
  "data-cy": "lupa-add-to-cart",
18842
18901
  type: "button",
18843
18902
  disabled: !inStockValue.value || loading.value
18844
- }, toDisplayString(label.value), 11, _hoisted_3$A)
18903
+ }, toDisplayString(label.value), 11, _hoisted_3$B)
18845
18904
  ])
18846
18905
  ]);
18847
18906
  };
18848
18907
  }
18849
18908
  });
18850
- const _hoisted_1$13 = {
18909
+ const _hoisted_1$14 = {
18851
18910
  key: 1,
18852
18911
  class: "lupa-search-box-element-badge-wrapper"
18853
18912
  };
18854
18913
  const __default__$4 = {
18855
18914
  components: {
18856
- SearchBoxProductImage: _sfc_main$1j,
18857
- SearchBoxProductTitle: _sfc_main$1i,
18858
- SearchBoxProductDescription: _sfc_main$1h,
18859
- SearchBoxProductPrice: _sfc_main$1g,
18860
- SearchBoxProductRegularPrice: _sfc_main$1f,
18861
- SearchBoxProductCustom: _sfc_main$1e,
18862
- SearchBoxProductCustomHtml: _sfc_main$1d,
18863
- SearchBoxProductAddToCart: _sfc_main$1c
18915
+ SearchBoxProductImage: _sfc_main$1k,
18916
+ SearchBoxProductTitle: _sfc_main$1j,
18917
+ SearchBoxProductDescription: _sfc_main$1i,
18918
+ SearchBoxProductPrice: _sfc_main$1h,
18919
+ SearchBoxProductRegularPrice: _sfc_main$1g,
18920
+ SearchBoxProductCustom: _sfc_main$1f,
18921
+ SearchBoxProductCustomHtml: _sfc_main$1e,
18922
+ SearchBoxProductAddToCart: _sfc_main$1d
18864
18923
  }
18865
18924
  };
18866
- const _sfc_main$1b = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18925
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18867
18926
  __name: "SearchBoxProductElement",
18868
18927
  props: {
18869
18928
  item: {},
@@ -18926,7 +18985,7 @@ and ensure you are accounting for this risk.
18926
18985
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
18927
18986
  inStock: _ctx.isInStock
18928
18987
  }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
18929
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$13, [
18988
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$14, [
18930
18989
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
18931
18990
  key: 0,
18932
18991
  item: enhancedItem.value,
@@ -18940,14 +18999,14 @@ and ensure you are accounting for this risk.
18940
18999
  };
18941
19000
  }
18942
19001
  }));
18943
- const _hoisted_1$12 = { class: "lupa-badge-title" };
18944
- const _hoisted_2$M = ["src"];
18945
- const _hoisted_3$z = { key: 1 };
18946
- const _hoisted_4$p = {
19002
+ const _hoisted_1$13 = { class: "lupa-badge-title" };
19003
+ const _hoisted_2$N = ["src"];
19004
+ const _hoisted_3$A = { key: 1 };
19005
+ const _hoisted_4$q = {
18947
19006
  key: 0,
18948
19007
  class: "lupa-badge-full-text"
18949
19008
  };
18950
- const _sfc_main$1a = /* @__PURE__ */ defineComponent({
19009
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
18951
19010
  __name: "SearchResultGeneratedBadge",
18952
19011
  props: {
18953
19012
  options: {},
@@ -18980,20 +19039,20 @@ and ensure you are accounting for this risk.
18980
19039
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
18981
19040
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
18982
19041
  }, [
18983
- createBaseVNode("span", _hoisted_1$12, [
19042
+ createBaseVNode("span", _hoisted_1$13, [
18984
19043
  image.value ? (openBlock(), createElementBlock("img", {
18985
19044
  key: 0,
18986
19045
  src: image.value
18987
- }, null, 8, _hoisted_2$M)) : createCommentVNode("", true),
18988
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
19046
+ }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
19047
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$A, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18989
19048
  ]),
18990
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
19049
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18991
19050
  ], 6);
18992
19051
  };
18993
19052
  }
18994
19053
  });
18995
- const _hoisted_1$11 = { class: "lupa-generated-badges" };
18996
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
19054
+ const _hoisted_1$12 = { class: "lupa-generated-badges" };
19055
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
18997
19056
  __name: "SearchResultGeneratedBadges",
18998
19057
  props: {
18999
19058
  options: {}
@@ -19019,9 +19078,9 @@ and ensure you are accounting for this risk.
19019
19078
  })).filter((b) => Boolean(b.id));
19020
19079
  });
19021
19080
  return (_ctx, _cache) => {
19022
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
19081
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
19023
19082
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
19024
- return openBlock(), createBlock(_sfc_main$1a, {
19083
+ return openBlock(), createBlock(_sfc_main$1b, {
19025
19084
  key: badge.id,
19026
19085
  badge,
19027
19086
  options: _ctx.options
@@ -19031,8 +19090,8 @@ and ensure you are accounting for this risk.
19031
19090
  };
19032
19091
  }
19033
19092
  });
19034
- const _hoisted_1$10 = ["innerHTML"];
19035
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
19093
+ const _hoisted_1$11 = ["innerHTML"];
19094
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
19036
19095
  __name: "CustomBadge",
19037
19096
  props: {
19038
19097
  badge: {}
@@ -19053,12 +19112,12 @@ and ensure you are accounting for this risk.
19053
19112
  return openBlock(), createElementBlock("div", {
19054
19113
  class: normalizeClass(className.value),
19055
19114
  innerHTML: text.value
19056
- }, null, 10, _hoisted_1$10);
19115
+ }, null, 10, _hoisted_1$11);
19057
19116
  };
19058
19117
  }
19059
19118
  });
19060
- const _hoisted_1$$ = { class: "lupa-text-badges" };
19061
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
19119
+ const _hoisted_1$10 = { class: "lupa-text-badges" };
19120
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
19062
19121
  __name: "TextBadge",
19063
19122
  props: {
19064
19123
  badge: {}
@@ -19072,7 +19131,7 @@ and ensure you are accounting for this risk.
19072
19131
  return badges.value.slice(0, props.badge.maxItems);
19073
19132
  });
19074
19133
  return (_ctx, _cache) => {
19075
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
19134
+ return openBlock(), createElementBlock("div", _hoisted_1$10, [
19076
19135
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19077
19136
  return openBlock(), createElementBlock("div", {
19078
19137
  class: "lupa-badge lupa-text-badge",
@@ -19083,9 +19142,9 @@ and ensure you are accounting for this risk.
19083
19142
  };
19084
19143
  }
19085
19144
  });
19086
- const _hoisted_1$_ = { class: "lupa-image-badges" };
19087
- const _hoisted_2$L = ["src"];
19088
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19145
+ const _hoisted_1$$ = { class: "lupa-image-badges" };
19146
+ const _hoisted_2$M = ["src"];
19147
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
19089
19148
  __name: "ImageBadge",
19090
19149
  props: {
19091
19150
  badge: {}
@@ -19105,7 +19164,7 @@ and ensure you are accounting for this risk.
19105
19164
  return `${props.badge.rootImageUrl}${src}`;
19106
19165
  };
19107
19166
  return (_ctx, _cache) => {
19108
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
19167
+ return openBlock(), createElementBlock("div", _hoisted_1$$, [
19109
19168
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19110
19169
  return openBlock(), createElementBlock("div", {
19111
19170
  class: "lupa-badge lupa-image-badge",
@@ -19113,14 +19172,14 @@ and ensure you are accounting for this risk.
19113
19172
  }, [
19114
19173
  createBaseVNode("img", {
19115
19174
  src: getImageUrl(item)
19116
- }, null, 8, _hoisted_2$L)
19175
+ }, null, 8, _hoisted_2$M)
19117
19176
  ]);
19118
19177
  }), 128))
19119
19178
  ]);
19120
19179
  };
19121
19180
  }
19122
19181
  });
19123
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
19182
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19124
19183
  __name: "DiscountBadge",
19125
19184
  props: {
19126
19185
  badge: {}
@@ -19178,16 +19237,16 @@ and ensure you are accounting for this risk.
19178
19237
  };
19179
19238
  }
19180
19239
  });
19181
- const _hoisted_1$Z = { id: "lupa-search-results-badges" };
19240
+ const _hoisted_1$_ = { id: "lupa-search-results-badges" };
19182
19241
  const __default__$3 = {
19183
19242
  components: {
19184
- CustomBadge: _sfc_main$18,
19185
- TextBadge: _sfc_main$17,
19186
- ImageBadge: _sfc_main$16,
19187
- DiscountBadge: _sfc_main$15
19243
+ CustomBadge: _sfc_main$19,
19244
+ TextBadge: _sfc_main$18,
19245
+ ImageBadge: _sfc_main$17,
19246
+ DiscountBadge: _sfc_main$16
19188
19247
  }
19189
19248
  };
19190
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19249
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19191
19250
  __name: "SearchResultsBadgeWrapper",
19192
19251
  props: {
19193
19252
  position: {},
@@ -19250,7 +19309,7 @@ and ensure you are accounting for this risk.
19250
19309
  }
19251
19310
  };
19252
19311
  return (_ctx, _cache) => {
19253
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
19312
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
19254
19313
  createBaseVNode("div", {
19255
19314
  id: "lupa-badges",
19256
19315
  class: normalizeClass(anchorPosition.value)
@@ -19261,7 +19320,7 @@ and ensure you are accounting for this risk.
19261
19320
  badge
19262
19321
  }, null, 8, ["badge"]);
19263
19322
  }), 128)),
19264
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$19, {
19323
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1a, {
19265
19324
  key: 0,
19266
19325
  options: _ctx.options
19267
19326
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -19270,13 +19329,13 @@ and ensure you are accounting for this risk.
19270
19329
  };
19271
19330
  }
19272
19331
  }));
19273
- const _hoisted_1$Y = ["href"];
19274
- const _hoisted_2$K = { class: "lupa-search-box-product-details-section" };
19275
- const _hoisted_3$y = {
19332
+ const _hoisted_1$Z = ["href"];
19333
+ const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
19334
+ const _hoisted_3$z = {
19276
19335
  key: 0,
19277
19336
  class: "lupa-search-box-product-add-to-cart-section"
19278
19337
  };
19279
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19338
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
19280
19339
  __name: "SearchBoxProduct",
19281
19340
  props: {
19282
19341
  item: {},
@@ -19362,7 +19421,7 @@ and ensure you are accounting for this risk.
19362
19421
  style: normalizeStyle(imageStyleOverride.value)
19363
19422
  }, [
19364
19423
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
19365
- return openBlock(), createBlock(_sfc_main$1b, {
19424
+ return openBlock(), createBlock(_sfc_main$1c, {
19366
19425
  class: "lupa-search-box-product-element",
19367
19426
  item: _ctx.item,
19368
19427
  element,
@@ -19372,10 +19431,10 @@ and ensure you are accounting for this risk.
19372
19431
  }, null, 8, ["item", "element", "labels", "link"]);
19373
19432
  }), 128))
19374
19433
  ], 4),
19375
- createBaseVNode("div", _hoisted_2$K, [
19434
+ createBaseVNode("div", _hoisted_2$L, [
19376
19435
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
19377
19436
  var _a;
19378
- return openBlock(), createBlock(_sfc_main$1b, {
19437
+ return openBlock(), createBlock(_sfc_main$1c, {
19379
19438
  key: element.key,
19380
19439
  class: "lupa-search-box-product-element",
19381
19440
  item: _ctx.item,
@@ -19386,7 +19445,7 @@ and ensure you are accounting for this risk.
19386
19445
  badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
19387
19446
  name: "badges",
19388
19447
  fn: withCtx(() => [
19389
- createVNode(_sfc_main$14, {
19448
+ createVNode(_sfc_main$15, {
19390
19449
  options: badgeOptions.value,
19391
19450
  position: "card"
19392
19451
  }, null, 8, ["options"])
@@ -19396,8 +19455,8 @@ and ensure you are accounting for this risk.
19396
19455
  ]), 1032, ["item", "element", "labels", "link"]);
19397
19456
  }), 128))
19398
19457
  ]),
19399
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
19400
- createVNode(_sfc_main$1b, {
19458
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
19459
+ createVNode(_sfc_main$1c, {
19401
19460
  class: "lupa-search-box-product-element",
19402
19461
  item: _ctx.item,
19403
19462
  element: addToCartElement.value,
@@ -19406,7 +19465,7 @@ and ensure you are accounting for this risk.
19406
19465
  isInStock: isInStock.value
19407
19466
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
19408
19467
  ])) : createCommentVNode("", true)
19409
- ], 16, _hoisted_1$Y);
19468
+ ], 16, _hoisted_1$Z);
19410
19469
  };
19411
19470
  }
19412
19471
  });
@@ -19465,10 +19524,21 @@ and ensure you are accounting for this risk.
19465
19524
  options
19466
19525
  );
19467
19526
  };
19468
- return { trackSearch, trackResults, trackEvent };
19527
+ const trackDelayedEvent = ({
19528
+ queryKey,
19529
+ data,
19530
+ url
19531
+ }) => {
19532
+ let currentCache = getDelayedEventsCache();
19533
+ currentCache = __spreadProps2(__spreadValues2({}, currentCache), {
19534
+ [url]: { data, queryKey }
19535
+ });
19536
+ storeDelayedEventCache(currentCache);
19537
+ };
19538
+ return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
19469
19539
  });
19470
- const _hoisted_1$X = { id: "lupa-search-box-products" };
19471
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
19540
+ const _hoisted_1$Y = { id: "lupa-search-box-products" };
19541
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19472
19542
  __name: "SearchBoxProducts",
19473
19543
  props: {
19474
19544
  items: {},
@@ -19509,7 +19579,7 @@ and ensure you are accounting for this risk.
19509
19579
  if (!props.panelOptions.idKey) {
19510
19580
  return;
19511
19581
  }
19512
- trackingStore.trackEvent({
19582
+ const trackableEvent = {
19513
19583
  queryKey: props.panelOptions.queryKey,
19514
19584
  data: {
19515
19585
  itemId: id,
@@ -19521,7 +19591,14 @@ and ensure you are accounting for this risk.
19521
19591
  items: [item]
19522
19592
  }
19523
19593
  }
19524
- });
19594
+ };
19595
+ if (isDelayedClickTracking()) {
19596
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, trackableEvent), {
19597
+ url: link
19598
+ }));
19599
+ } else {
19600
+ trackingStore.trackEvent(trackableEvent);
19601
+ }
19525
19602
  if (!link || eventType === "addToCart") {
19526
19603
  return;
19527
19604
  }
@@ -19529,7 +19606,7 @@ and ensure you are accounting for this risk.
19529
19606
  handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
19530
19607
  };
19531
19608
  return (_ctx, _cache) => {
19532
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
19609
+ return openBlock(), createElementBlock("div", _hoisted_1$Y, [
19533
19610
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
19534
19611
  return renderSlot(_ctx.$slots, "productCard", {
19535
19612
  key: index,
@@ -19541,7 +19618,7 @@ and ensure you are accounting for this risk.
19541
19618
  itemClicked: handleProductClick
19542
19619
  });
19543
19620
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
19544
- return openBlock(), createBlock(_sfc_main$13, {
19621
+ return openBlock(), createBlock(_sfc_main$14, {
19545
19622
  key: index,
19546
19623
  item,
19547
19624
  panelOptions: _ctx.panelOptions,
@@ -19556,9 +19633,9 @@ and ensure you are accounting for this risk.
19556
19633
  };
19557
19634
  }
19558
19635
  });
19559
- const _hoisted_1$W = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19560
- const _hoisted_2$J = { key: 0 };
19561
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19636
+ const _hoisted_1$X = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19637
+ const _hoisted_2$K = { key: 0 };
19638
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
19562
19639
  __name: "SearchBoxProductsGoToResultsButton",
19563
19640
  props: {
19564
19641
  options: {},
@@ -19588,19 +19665,19 @@ and ensure you are accounting for this risk.
19588
19665
  emit2("goToResults");
19589
19666
  };
19590
19667
  return (_ctx, _cache) => {
19591
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
19668
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
19592
19669
  createBaseVNode("button", {
19593
19670
  class: "lupa-search-box-documents-go-to-results-button",
19594
19671
  onClick: goToResults
19595
19672
  }, [
19596
19673
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
19597
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$J, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19674
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19598
19675
  ])
19599
19676
  ]);
19600
19677
  };
19601
19678
  }
19602
19679
  });
19603
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19680
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19604
19681
  __name: "SearchBoxProductsWrapper",
19605
19682
  props: {
19606
19683
  panel: {},
@@ -19657,7 +19734,7 @@ and ensure you are accounting for this risk.
19657
19734
  watch(() => props.panel.limit, getItemsDebounced);
19658
19735
  return (_ctx, _cache) => {
19659
19736
  var _a, _b;
19660
- return openBlock(), createBlock(_sfc_main$12, {
19737
+ return openBlock(), createBlock(_sfc_main$13, {
19661
19738
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19662
19739
  panelOptions: _ctx.panel,
19663
19740
  labels: _ctx.labels,
@@ -19667,7 +19744,7 @@ and ensure you are accounting for this risk.
19667
19744
  default: withCtx(() => {
19668
19745
  var _a2;
19669
19746
  return [
19670
- showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$11, {
19747
+ showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$12, {
19671
19748
  key: 0,
19672
19749
  options: _ctx.searchBoxOptions,
19673
19750
  panel: _ctx.panel,
@@ -19688,7 +19765,7 @@ and ensure you are accounting for this risk.
19688
19765
  };
19689
19766
  }
19690
19767
  });
19691
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
19768
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19692
19769
  __name: "SearchBoxRelatedSourceWrapper",
19693
19770
  props: {
19694
19771
  panel: {},
@@ -19760,7 +19837,7 @@ and ensure you are accounting for this risk.
19760
19837
  });
19761
19838
  return (_ctx, _cache) => {
19762
19839
  var _a, _b;
19763
- return openBlock(), createBlock(_sfc_main$12, {
19840
+ return openBlock(), createBlock(_sfc_main$13, {
19764
19841
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19765
19842
  panelOptions: documentPanelOptions.value,
19766
19843
  labels: _ctx.labels,
@@ -19778,16 +19855,16 @@ and ensure you are accounting for this risk.
19778
19855
  };
19779
19856
  }
19780
19857
  });
19781
- const _hoisted_1$V = {
19858
+ const _hoisted_1$W = {
19782
19859
  key: 0,
19783
19860
  id: "lupa-search-box-panel"
19784
19861
  };
19785
- const _hoisted_2$I = ["data-cy"];
19786
- const _hoisted_3$x = {
19862
+ const _hoisted_2$J = ["data-cy"];
19863
+ const _hoisted_3$y = {
19787
19864
  key: 0,
19788
19865
  class: "lupa-panel-title lupa-panel-title-top-results"
19789
19866
  };
19790
- const _hoisted_4$o = {
19867
+ const _hoisted_4$p = {
19791
19868
  key: 1,
19792
19869
  class: "lupa-panel-title"
19793
19870
  };
@@ -19797,12 +19874,12 @@ and ensure you are accounting for this risk.
19797
19874
  };
19798
19875
  const __default__$2 = {
19799
19876
  components: {
19800
- SearchBoxSuggestionsWrapper: _sfc_main$1l,
19801
- SearchBoxProductsWrapper: _sfc_main$10,
19802
- SearchBoxRelatedSourceWrapper: _sfc_main$$
19877
+ SearchBoxSuggestionsWrapper: _sfc_main$1m,
19878
+ SearchBoxProductsWrapper: _sfc_main$11,
19879
+ SearchBoxRelatedSourceWrapper: _sfc_main$10
19803
19880
  }
19804
19881
  };
19805
- const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19882
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19806
19883
  __name: "SearchBoxMainPanel",
19807
19884
  props: {
19808
19885
  options: {},
@@ -19958,7 +20035,7 @@ and ensure you are accounting for this risk.
19958
20035
  ref_key: "panelContainer",
19959
20036
  ref: panelContainer
19960
20037
  }, [
19961
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$V, [
20038
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
19962
20039
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
19963
20040
  key: 0,
19964
20041
  class: "lupa-search-box-close-panel",
@@ -19980,8 +20057,8 @@ and ensure you are accounting for this risk.
19980
20057
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
19981
20058
  "data-cy": "lupa-panel-" + panel.type + "-index"
19982
20059
  }, [
19983
- ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
19984
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
20060
+ ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$y, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
20061
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
19985
20062
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
19986
20063
  key: 2,
19987
20064
  panel,
@@ -20003,21 +20080,21 @@ and ensure you are accounting for this risk.
20003
20080
  key: "0"
20004
20081
  } : void 0
20005
20082
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
20006
- ], 14, _hoisted_2$I);
20083
+ ], 14, _hoisted_2$J);
20007
20084
  }), 128))
20008
20085
  ], 4),
20009
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1o, {
20086
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1p, {
20010
20087
  key: 1,
20011
20088
  labels: labels.value
20012
20089
  }, null, 8, ["labels"])) : createCommentVNode("", true),
20013
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1r, {
20090
+ unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1s, {
20014
20091
  key: 2,
20015
20092
  labels: labels.value,
20016
20093
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
20017
20094
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
20018
20095
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
20019
20096
  ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
20020
- createVNode(_sfc_main$1p, {
20097
+ createVNode(_sfc_main$1q, {
20021
20098
  options: _ctx.options.history,
20022
20099
  history: history.value,
20023
20100
  onGoToResults: handleGoToResults,
@@ -20042,9 +20119,9 @@ and ensure you are accounting for this risk.
20042
20119
  const elements = getElements(triggers);
20043
20120
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
20044
20121
  };
20045
- const _hoisted_1$U = { id: "lupa-search-box" };
20046
- const _hoisted_2$H = { class: "lupa-search-box-wrapper" };
20047
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
20122
+ const _hoisted_1$V = { id: "lupa-search-box" };
20123
+ const _hoisted_2$I = { class: "lupa-search-box-wrapper" };
20124
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
20048
20125
  __name: "SearchBox",
20049
20126
  props: {
20050
20127
  options: {},
@@ -20247,7 +20324,7 @@ and ensure you are accounting for this risk.
20247
20324
  if (!doc2.queryKey || !doc2.doc) {
20248
20325
  return;
20249
20326
  }
20250
- trackingStore.trackEvent({
20327
+ const event = {
20251
20328
  queryKey: doc2.queryKey,
20252
20329
  data: {
20253
20330
  itemId: doc2.id,
@@ -20259,7 +20336,14 @@ and ensure you are accounting for this risk.
20259
20336
  items: [doc2]
20260
20337
  }
20261
20338
  }
20262
- });
20339
+ };
20340
+ if (isDelayedClickTracking()) {
20341
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), {
20342
+ url: generateLink(props.options.links.searchResults, doc2)
20343
+ }));
20344
+ } else {
20345
+ trackingStore.trackEvent(event);
20346
+ }
20263
20347
  };
20264
20348
  const trackSearchQuery = (query) => {
20265
20349
  if (!query) {
@@ -20304,9 +20388,9 @@ and ensure you are accounting for this risk.
20304
20388
  };
20305
20389
  return (_ctx, _cache) => {
20306
20390
  var _a2;
20307
- return openBlock(), createElementBlock("div", _hoisted_1$U, [
20308
- createBaseVNode("div", _hoisted_2$H, [
20309
- createVNode(_sfc_main$1s, {
20391
+ return openBlock(), createElementBlock("div", _hoisted_1$V, [
20392
+ createBaseVNode("div", _hoisted_2$I, [
20393
+ createVNode(_sfc_main$1t, {
20310
20394
  options: inputOptions.value,
20311
20395
  suggestedValue: suggestedValue.value,
20312
20396
  "can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
@@ -20319,7 +20403,7 @@ and ensure you are accounting for this risk.
20319
20403
  onSearch: handleSearch,
20320
20404
  onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
20321
20405
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
20322
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$_, {
20406
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$$, {
20323
20407
  key: 0,
20324
20408
  options: panelOptions.value,
20325
20409
  inputValue: inputValue.value,
@@ -20408,20 +20492,20 @@ and ensure you are accounting for this risk.
20408
20492
  }
20409
20493
  return searchParams;
20410
20494
  };
20411
- const _hoisted_1$T = {
20495
+ const _hoisted_1$U = {
20412
20496
  key: 0,
20413
20497
  id: "lupa-search-results-did-you-mean"
20414
20498
  };
20415
- const _hoisted_2$G = {
20499
+ const _hoisted_2$H = {
20416
20500
  key: 0,
20417
20501
  "data-cy": "suggested-search-text-label"
20418
20502
  };
20419
- const _hoisted_3$w = {
20503
+ const _hoisted_3$x = {
20420
20504
  key: 1,
20421
20505
  "data-cy": "did-you-mean-label"
20422
20506
  };
20423
- const _hoisted_4$n = { key: 1 };
20424
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20507
+ const _hoisted_4$o = { key: 1 };
20508
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
20425
20509
  __name: "SearchResultsDidYouMean",
20426
20510
  props: {
20427
20511
  labels: {}
@@ -20453,8 +20537,8 @@ and ensure you are accounting for this risk.
20453
20537
  paramStore.goToResults({ searchText, facet });
20454
20538
  };
20455
20539
  return (_ctx, _cache) => {
20456
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
20457
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$G, [
20540
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$U, [
20541
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$H, [
20458
20542
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
20459
20543
  return openBlock(), createElementBlock("span", { key: index }, [
20460
20544
  createBaseVNode("span", {
@@ -20463,7 +20547,7 @@ and ensure you are accounting for this risk.
20463
20547
  ]);
20464
20548
  }), 128))
20465
20549
  ])) : createCommentVNode("", true),
20466
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
20550
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$x, [
20467
20551
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
20468
20552
  return openBlock(), createElementBlock("span", { key: index }, [
20469
20553
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -20471,7 +20555,7 @@ and ensure you are accounting for this risk.
20471
20555
  class: "lupa-did-you-mean lupa-highlighted-search-text",
20472
20556
  "data-cy": "did-you-mean-value",
20473
20557
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
20474
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
20558
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
20475
20559
  ]);
20476
20560
  }), 128))
20477
20561
  ])) : createCommentVNode("", true)
@@ -20479,12 +20563,12 @@ and ensure you are accounting for this risk.
20479
20563
  };
20480
20564
  }
20481
20565
  });
20482
- const _hoisted_1$S = {
20566
+ const _hoisted_1$T = {
20483
20567
  key: 0,
20484
20568
  class: "lupa-search-results-summary"
20485
20569
  };
20486
- const _hoisted_2$F = ["innerHTML"];
20487
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
20570
+ const _hoisted_2$G = ["innerHTML"];
20571
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20488
20572
  __name: "SearchResultsSummary",
20489
20573
  props: {
20490
20574
  label: {},
@@ -20499,8 +20583,8 @@ and ensure you are accounting for this risk.
20499
20583
  return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
20500
20584
  });
20501
20585
  return (_ctx, _cache) => {
20502
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$S, [
20503
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$F),
20586
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
20587
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$G),
20504
20588
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
20505
20589
  key: 0,
20506
20590
  class: "lupa-filter-clear",
@@ -20511,19 +20595,19 @@ and ensure you are accounting for this risk.
20511
20595
  };
20512
20596
  }
20513
20597
  });
20514
- const _hoisted_1$R = {
20598
+ const _hoisted_1$S = {
20515
20599
  key: 0,
20516
20600
  class: "lupa-result-page-title",
20517
20601
  "data-cy": "lupa-result-page-title"
20518
20602
  };
20519
- const _hoisted_2$E = { key: 0 };
20520
- const _hoisted_3$v = {
20603
+ const _hoisted_2$F = { key: 0 };
20604
+ const _hoisted_3$w = {
20521
20605
  key: 1,
20522
20606
  class: "lupa-results-total-count"
20523
20607
  };
20524
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
20608
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
20525
20609
  const _hoisted_5$f = ["innerHTML"];
20526
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
20610
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
20527
20611
  __name: "SearchResultsTitle",
20528
20612
  props: {
20529
20613
  options: {},
@@ -20562,16 +20646,16 @@ and ensure you are accounting for this risk.
20562
20646
  });
20563
20647
  return (_ctx, _cache) => {
20564
20648
  return openBlock(), createElementBlock("div", null, [
20565
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$R, [
20649
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$S, [
20566
20650
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
20567
- queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20568
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
20651
+ queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$F, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20652
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, [
20569
20653
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
20570
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
20654
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
20571
20655
  createTextVNode(")")
20572
20656
  ])) : createCommentVNode("", true)
20573
20657
  ])) : createCommentVNode("", true),
20574
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$X, {
20658
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$Y, {
20575
20659
  key: 1,
20576
20660
  label: summaryLabel.value
20577
20661
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -20584,16 +20668,16 @@ and ensure you are accounting for this risk.
20584
20668
  };
20585
20669
  }
20586
20670
  });
20587
- const _hoisted_1$Q = { class: "lupa-search-result-filter-value" };
20588
- const _hoisted_2$D = {
20671
+ const _hoisted_1$R = { class: "lupa-search-result-filter-value" };
20672
+ const _hoisted_2$E = {
20589
20673
  class: "lupa-current-filter-label",
20590
20674
  "data-cy": "lupa-current-filter-label"
20591
20675
  };
20592
- const _hoisted_3$u = {
20676
+ const _hoisted_3$v = {
20593
20677
  class: "lupa-current-filter-value",
20594
20678
  "data-cy": "lupa-current-filter-value"
20595
20679
  };
20596
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
20680
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20597
20681
  __name: "CurrentFilterDisplay",
20598
20682
  props: {
20599
20683
  filter: {}
@@ -20605,28 +20689,28 @@ and ensure you are accounting for this risk.
20605
20689
  emit2("remove", { filter: props.filter });
20606
20690
  };
20607
20691
  return (_ctx, _cache) => {
20608
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
20692
+ return openBlock(), createElementBlock("div", _hoisted_1$R, [
20609
20693
  createBaseVNode("div", {
20610
20694
  class: "lupa-current-filter-action",
20611
20695
  onClick: handleClick
20612
20696
  }, "⨉"),
20613
- createBaseVNode("div", _hoisted_2$D, toDisplayString(_ctx.filter.label) + ": ", 1),
20614
- createBaseVNode("div", _hoisted_3$u, toDisplayString(_ctx.filter.value), 1)
20697
+ createBaseVNode("div", _hoisted_2$E, toDisplayString(_ctx.filter.label) + ": ", 1),
20698
+ createBaseVNode("div", _hoisted_3$v, toDisplayString(_ctx.filter.value), 1)
20615
20699
  ]);
20616
20700
  };
20617
20701
  }
20618
20702
  });
20619
- const _hoisted_1$P = { class: "lupa-filter-title-text" };
20620
- const _hoisted_2$C = {
20703
+ const _hoisted_1$Q = { class: "lupa-filter-title-text" };
20704
+ const _hoisted_2$D = {
20621
20705
  key: 0,
20622
20706
  class: "lupa-filter-count"
20623
20707
  };
20624
- const _hoisted_3$t = {
20708
+ const _hoisted_3$u = {
20625
20709
  key: 0,
20626
20710
  class: "filter-values"
20627
20711
  };
20628
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
20629
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
20712
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
20713
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
20630
20714
  __name: "CurrentFilters",
20631
20715
  props: {
20632
20716
  options: {},
@@ -20699,19 +20783,19 @@ and ensure you are accounting for this risk.
20699
20783
  class: "lupa-current-filter-title",
20700
20784
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
20701
20785
  }, [
20702
- createBaseVNode("div", _hoisted_1$P, [
20786
+ createBaseVNode("div", _hoisted_1$Q, [
20703
20787
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
20704
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$C, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20788
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$D, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20705
20789
  ]),
20706
20790
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
20707
20791
  key: 0,
20708
20792
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
20709
20793
  }, null, 2)) : createCommentVNode("", true)
20710
20794
  ]),
20711
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
20712
- createBaseVNode("div", _hoisted_4$l, [
20795
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
20796
+ createBaseVNode("div", _hoisted_4$m, [
20713
20797
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
20714
- return openBlock(), createBlock(_sfc_main$V, {
20798
+ return openBlock(), createBlock(_sfc_main$W, {
20715
20799
  key: filter2.key + "_" + filter2.value,
20716
20800
  filter: filter2,
20717
20801
  onRemove: handleRemove
@@ -20728,8 +20812,8 @@ and ensure you are accounting for this risk.
20728
20812
  };
20729
20813
  }
20730
20814
  });
20731
- const _hoisted_1$O = ["href"];
20732
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
20815
+ const _hoisted_1$P = ["href"];
20816
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
20733
20817
  __name: "CategoryFilterItem",
20734
20818
  props: {
20735
20819
  options: {},
@@ -20766,20 +20850,20 @@ and ensure you are accounting for this risk.
20766
20850
  "data-cy": "lupa-child-category-item",
20767
20851
  href: urlLink.value,
20768
20852
  onClick: handleNavigation
20769
- }, toDisplayString(title.value), 9, _hoisted_1$O)
20853
+ }, toDisplayString(title.value), 9, _hoisted_1$P)
20770
20854
  ], 2);
20771
20855
  };
20772
20856
  }
20773
20857
  });
20774
- const _hoisted_1$N = {
20858
+ const _hoisted_1$O = {
20775
20859
  class: "lupa-category-filter",
20776
20860
  "data-cy": "lupa-category-filter"
20777
20861
  };
20778
- const _hoisted_2$B = { class: "lupa-category-back" };
20779
- const _hoisted_3$s = ["href"];
20780
- const _hoisted_4$k = ["href"];
20862
+ const _hoisted_2$C = { class: "lupa-category-back" };
20863
+ const _hoisted_3$t = ["href"];
20864
+ const _hoisted_4$l = ["href"];
20781
20865
  const _hoisted_5$e = { class: "lupa-child-category-list" };
20782
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
20866
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
20783
20867
  __name: "CategoryFilter",
20784
20868
  props: {
20785
20869
  options: {}
@@ -20867,14 +20951,14 @@ and ensure you are accounting for this risk.
20867
20951
  };
20868
20952
  __expose({ fetch: fetch2 });
20869
20953
  return (_ctx, _cache) => {
20870
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
20871
- createBaseVNode("div", _hoisted_2$B, [
20954
+ return openBlock(), createElementBlock("div", _hoisted_1$O, [
20955
+ createBaseVNode("div", _hoisted_2$C, [
20872
20956
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
20873
20957
  key: 0,
20874
20958
  "data-cy": "lupa-category-back",
20875
20959
  href: backUrlLink.value,
20876
20960
  onClick: handleNavigationBack
20877
- }, toDisplayString(backTitle.value), 9, _hoisted_3$s)) : createCommentVNode("", true)
20961
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
20878
20962
  ]),
20879
20963
  createBaseVNode("div", {
20880
20964
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -20884,11 +20968,11 @@ and ensure you are accounting for this risk.
20884
20968
  href: parentUrlLink.value,
20885
20969
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
20886
20970
  onClick: handleNavigationParent
20887
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
20971
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
20888
20972
  ], 2),
20889
20973
  createBaseVNode("div", _hoisted_5$e, [
20890
20974
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
20891
- return openBlock(), createBlock(_sfc_main$T, {
20975
+ return openBlock(), createBlock(_sfc_main$U, {
20892
20976
  key: getCategoryKey(child),
20893
20977
  item: child,
20894
20978
  options: _ctx.options
@@ -20899,13 +20983,13 @@ and ensure you are accounting for this risk.
20899
20983
  };
20900
20984
  }
20901
20985
  });
20902
- const _hoisted_1$M = {
20986
+ const _hoisted_1$N = {
20903
20987
  class: "lupa-search-result-facet-term-values",
20904
20988
  "data-cy": "lupa-search-result-facet-term-values"
20905
20989
  };
20906
- const _hoisted_2$A = ["placeholder"];
20907
- const _hoisted_3$r = { class: "lupa-terms-list" };
20908
- const _hoisted_4$j = ["onClick"];
20990
+ const _hoisted_2$B = ["placeholder"];
20991
+ const _hoisted_3$s = { class: "lupa-terms-list" };
20992
+ const _hoisted_4$k = ["onClick"];
20909
20993
  const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
20910
20994
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
20911
20995
  const _hoisted_7$6 = { class: "lupa-term-label" };
@@ -20915,7 +20999,7 @@ and ensure you are accounting for this risk.
20915
20999
  };
20916
21000
  const _hoisted_9$2 = { key: 0 };
20917
21001
  const _hoisted_10$1 = { key: 1 };
20918
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
21002
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
20919
21003
  __name: "TermFacet",
20920
21004
  props: {
20921
21005
  options: {},
@@ -20986,17 +21070,17 @@ and ensure you are accounting for this risk.
20986
21070
  return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
20987
21071
  };
20988
21072
  return (_ctx, _cache) => {
20989
- return openBlock(), createElementBlock("div", _hoisted_1$M, [
21073
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
20990
21074
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
20991
21075
  key: 0,
20992
21076
  class: "lupa-term-filter",
20993
21077
  "data-cy": "lupa-term-filter",
20994
21078
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
20995
21079
  placeholder: _ctx.options.labels.facetFilter
20996
- }, null, 8, _hoisted_2$A)), [
21080
+ }, null, 8, _hoisted_2$B)), [
20997
21081
  [vModelText, termFilter.value]
20998
21082
  ]) : createCommentVNode("", true),
20999
- createBaseVNode("div", _hoisted_3$r, [
21083
+ createBaseVNode("div", _hoisted_3$s, [
21000
21084
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
21001
21085
  return openBlock(), createElementBlock("div", {
21002
21086
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -21013,7 +21097,7 @@ and ensure you are accounting for this risk.
21013
21097
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
21014
21098
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
21015
21099
  ])
21016
- ], 10, _hoisted_4$j);
21100
+ ], 10, _hoisted_4$k);
21017
21101
  }), 128))
21018
21102
  ]),
21019
21103
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -22004,16 +22088,16 @@ and ensure you are accounting for this risk.
22004
22088
  m.render = function(e2, t, r, i, n, o) {
22005
22089
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
22006
22090
  }, m.__file = "src/Slider.vue";
22007
- const _hoisted_1$L = { class: "lupa-search-result-facet-stats-values" };
22008
- const _hoisted_2$z = {
22091
+ const _hoisted_1$M = { class: "lupa-search-result-facet-stats-values" };
22092
+ const _hoisted_2$A = {
22009
22093
  key: 0,
22010
22094
  class: "lupa-stats-facet-summary"
22011
22095
  };
22012
- const _hoisted_3$q = {
22096
+ const _hoisted_3$r = {
22013
22097
  key: 1,
22014
22098
  class: "lupa-stats-facet-summary-input"
22015
22099
  };
22016
- const _hoisted_4$i = {
22100
+ const _hoisted_4$j = {
22017
22101
  key: 0,
22018
22102
  class: "lupa-stats-range-label"
22019
22103
  };
@@ -22032,7 +22116,7 @@ and ensure you are accounting for this risk.
22032
22116
  key: 2,
22033
22117
  class: "lupa-stats-slider-wrapper"
22034
22118
  };
22035
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
22119
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
22036
22120
  __name: "StatsFacet",
22037
22121
  props: {
22038
22122
  options: {},
@@ -22209,10 +22293,10 @@ and ensure you are accounting for this risk.
22209
22293
  innerSliderRange.value = value;
22210
22294
  };
22211
22295
  return (_ctx, _cache) => {
22212
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
22213
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
22296
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
22297
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
22214
22298
  createBaseVNode("div", null, [
22215
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22299
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22216
22300
  createBaseVNode("div", _hoisted_5$c, [
22217
22301
  withDirectives(createBaseVNode("input", {
22218
22302
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
@@ -22276,10 +22360,10 @@ and ensure you are accounting for this risk.
22276
22360
  };
22277
22361
  }
22278
22362
  });
22279
- const _hoisted_1$K = { class: "lupa-term-checkbox-wrapper" };
22280
- const _hoisted_2$y = { class: "lupa-term-checkbox-label" };
22281
- const _hoisted_3$p = { class: "lupa-term-label" };
22282
- const _hoisted_4$h = {
22363
+ const _hoisted_1$L = { class: "lupa-term-checkbox-wrapper" };
22364
+ const _hoisted_2$z = { class: "lupa-term-checkbox-label" };
22365
+ const _hoisted_3$q = { class: "lupa-term-label" };
22366
+ const _hoisted_4$i = {
22283
22367
  key: 0,
22284
22368
  class: "lupa-term-count"
22285
22369
  };
@@ -22287,7 +22371,7 @@ and ensure you are accounting for this risk.
22287
22371
  key: 0,
22288
22372
  class: "lupa-facet-level"
22289
22373
  };
22290
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
22374
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
22291
22375
  __name: "HierarchyFacetLevel",
22292
22376
  props: {
22293
22377
  options: {},
@@ -22333,14 +22417,14 @@ and ensure you are accounting for this risk.
22333
22417
  "data-cy": "lupa-facet-term",
22334
22418
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
22335
22419
  }, [
22336
- createBaseVNode("div", _hoisted_1$K, [
22420
+ createBaseVNode("div", _hoisted_1$L, [
22337
22421
  createBaseVNode("span", {
22338
22422
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
22339
22423
  }, null, 2)
22340
22424
  ]),
22341
- createBaseVNode("div", _hoisted_2$y, [
22342
- createBaseVNode("span", _hoisted_3$p, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22343
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22425
+ createBaseVNode("div", _hoisted_2$z, [
22426
+ createBaseVNode("span", _hoisted_3$q, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22427
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$i, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22344
22428
  ])
22345
22429
  ]),
22346
22430
  showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
@@ -22359,13 +22443,13 @@ and ensure you are accounting for this risk.
22359
22443
  };
22360
22444
  }
22361
22445
  });
22362
- const _hoisted_1$J = {
22446
+ const _hoisted_1$K = {
22363
22447
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
22364
22448
  "data-cy": "lupa-search-result-facet-term-values"
22365
22449
  };
22366
- const _hoisted_2$x = { key: 0 };
22367
- const _hoisted_3$o = ["placeholder"];
22368
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
22450
+ const _hoisted_2$y = { key: 0 };
22451
+ const _hoisted_3$p = ["placeholder"];
22452
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
22369
22453
  __name: "HierarchyFacet",
22370
22454
  props: {
22371
22455
  options: {},
@@ -22420,19 +22504,19 @@ and ensure you are accounting for this risk.
22420
22504
  showAll.value = false;
22421
22505
  };
22422
22506
  return (_ctx, _cache) => {
22423
- return openBlock(), createElementBlock("div", _hoisted_1$J, [
22424
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
22507
+ return openBlock(), createElementBlock("div", _hoisted_1$K, [
22508
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
22425
22509
  withDirectives(createBaseVNode("input", {
22426
22510
  class: "lupa-term-filter",
22427
22511
  "data-cy": "lupa-term-filter",
22428
22512
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
22429
22513
  placeholder: _ctx.options.labels.facetFilter
22430
- }, null, 8, _hoisted_3$o), [
22514
+ }, null, 8, _hoisted_3$p), [
22431
22515
  [vModelText, termFilter.value]
22432
22516
  ])
22433
22517
  ])) : createCommentVNode("", true),
22434
22518
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
22435
- return openBlock(), createBlock(_sfc_main$P, {
22519
+ return openBlock(), createBlock(_sfc_main$Q, {
22436
22520
  key: item.title,
22437
22521
  options: _ctx.options,
22438
22522
  item,
@@ -22456,20 +22540,20 @@ and ensure you are accounting for this risk.
22456
22540
  };
22457
22541
  }
22458
22542
  });
22459
- const _hoisted_1$I = { class: "lupa-facet-label-text" };
22460
- const _hoisted_2$w = {
22543
+ const _hoisted_1$J = { class: "lupa-facet-label-text" };
22544
+ const _hoisted_2$x = {
22461
22545
  key: 0,
22462
22546
  class: "lupa-facet-content",
22463
22547
  "data-cy": "lupa-facet-content"
22464
22548
  };
22465
22549
  const __default__$1 = {
22466
22550
  components: {
22467
- TermFacet: _sfc_main$R,
22468
- StatsFacet: _sfc_main$Q,
22469
- HierarchyFacet: _sfc_main$O
22551
+ TermFacet: _sfc_main$S,
22552
+ StatsFacet: _sfc_main$R,
22553
+ HierarchyFacet: _sfc_main$P
22470
22554
  }
22471
22555
  };
22472
- const _sfc_main$N = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22556
+ const _sfc_main$O = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22473
22557
  __name: "FacetDisplay",
22474
22558
  props: {
22475
22559
  options: {},
@@ -22581,12 +22665,12 @@ and ensure you are accounting for this risk.
22581
22665
  "data-cy": "lupa-search-result-facet-label",
22582
22666
  onClick: toggleFacet
22583
22667
  }, [
22584
- createBaseVNode("div", _hoisted_1$I, toDisplayString(facet.value.label), 1),
22668
+ createBaseVNode("div", _hoisted_1$J, toDisplayString(facet.value.label), 1),
22585
22669
  createBaseVNode("div", {
22586
22670
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
22587
22671
  }, null, 2)
22588
22672
  ], 2),
22589
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, [
22673
+ isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
22590
22674
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
22591
22675
  facet: facet.value,
22592
22676
  currentFilters: currentFilters.value[facet.value.key],
@@ -22604,12 +22688,12 @@ and ensure you are accounting for this risk.
22604
22688
  };
22605
22689
  }
22606
22690
  }));
22607
- const _hoisted_1$H = { class: "lupa-search-result-facet-section" };
22608
- const _hoisted_2$v = {
22691
+ const _hoisted_1$I = { class: "lupa-search-result-facet-section" };
22692
+ const _hoisted_2$w = {
22609
22693
  key: 0,
22610
22694
  class: "lupa-facets-title"
22611
22695
  };
22612
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
22696
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
22613
22697
  __name: "FacetList",
22614
22698
  props: {
22615
22699
  options: {},
@@ -22643,14 +22727,14 @@ and ensure you are accounting for this risk.
22643
22727
  };
22644
22728
  return (_ctx, _cache) => {
22645
22729
  var _a;
22646
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
22647
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$v, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22730
+ return openBlock(), createElementBlock("div", _hoisted_1$I, [
22731
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22648
22732
  createBaseVNode("div", {
22649
22733
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
22650
22734
  }, [
22651
22735
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
22652
22736
  var _a2;
22653
- return openBlock(), createBlock(_sfc_main$N, {
22737
+ return openBlock(), createBlock(_sfc_main$O, {
22654
22738
  key: facet.key,
22655
22739
  facet,
22656
22740
  currentFilters: currentFiltersValue.value,
@@ -22665,8 +22749,8 @@ and ensure you are accounting for this risk.
22665
22749
  };
22666
22750
  }
22667
22751
  });
22668
- const _hoisted_1$G = ["onClick"];
22669
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
22752
+ const _hoisted_1$H = ["onClick"];
22753
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
22670
22754
  __name: "FacetsButton",
22671
22755
  props: {
22672
22756
  options: {}
@@ -22686,13 +22770,13 @@ and ensure you are accounting for this risk.
22686
22770
  key: 0,
22687
22771
  class: "lupa-facets-button-filter",
22688
22772
  onClick: withModifiers(handleClick, ["stop"])
22689
- }, toDisplayString(label.value), 9, _hoisted_1$G)) : createCommentVNode("", true);
22773
+ }, toDisplayString(label.value), 9, _hoisted_1$H)) : createCommentVNode("", true);
22690
22774
  };
22691
22775
  }
22692
22776
  });
22693
- const _hoisted_1$F = { class: "lupa-search-result-facets" };
22694
- const _hoisted_2$u = { class: "lupa-facets-filter-button-wrapper" };
22695
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
22777
+ const _hoisted_1$G = { class: "lupa-search-result-facets" };
22778
+ const _hoisted_2$v = { class: "lupa-facets-filter-button-wrapper" };
22779
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
22696
22780
  __name: "Facets",
22697
22781
  props: {
22698
22782
  options: {},
@@ -22775,8 +22859,8 @@ and ensure you are accounting for this risk.
22775
22859
  emit2("filter");
22776
22860
  };
22777
22861
  return (_ctx, _cache) => {
22778
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
22779
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$M, {
22862
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
22863
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$N, {
22780
22864
  key: 0,
22781
22865
  options: _ctx.options,
22782
22866
  facets: regularFacets.value,
@@ -22786,8 +22870,8 @@ and ensure you are accounting for this risk.
22786
22870
  onSelect: handleFacetSelect,
22787
22871
  onClear: clear2
22788
22872
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
22789
- createBaseVNode("div", _hoisted_2$u, [
22790
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$L, {
22873
+ createBaseVNode("div", _hoisted_2$v, [
22874
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$M, {
22791
22875
  key: 0,
22792
22876
  options: _ctx.options,
22793
22877
  onFilter: filter2
@@ -22797,11 +22881,11 @@ and ensure you are accounting for this risk.
22797
22881
  };
22798
22882
  }
22799
22883
  });
22800
- const _hoisted_1$E = {
22884
+ const _hoisted_1$F = {
22801
22885
  id: "lupa-search-result-filters",
22802
22886
  class: "lupa-search-result-filters"
22803
22887
  };
22804
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
22888
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
22805
22889
  __name: "SearchResultsFilters",
22806
22890
  props: {
22807
22891
  options: {},
@@ -22834,19 +22918,19 @@ and ensure you are accounting for this risk.
22834
22918
  __expose({ fetch: fetch2 });
22835
22919
  return (_ctx, _cache) => {
22836
22920
  var _a;
22837
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
22838
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$U, {
22921
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
22922
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$V, {
22839
22923
  key: 0,
22840
22924
  options: _ctx.options.currentFilters,
22841
22925
  expandable: (_a = _ctx.expandable) != null ? _a : false
22842
22926
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
22843
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$S, {
22927
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$T, {
22844
22928
  key: 1,
22845
22929
  options: _ctx.options.categories,
22846
22930
  ref_key: "categoryFilters",
22847
22931
  ref: categoryFilters
22848
22932
  }, null, 8, ["options"])) : createCommentVNode("", true),
22849
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
22933
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$L, {
22850
22934
  key: 2,
22851
22935
  options: _ctx.options.facets,
22852
22936
  onFilter: filter2
@@ -22855,20 +22939,20 @@ and ensure you are accounting for this risk.
22855
22939
  };
22856
22940
  }
22857
22941
  });
22858
- const _hoisted_1$D = {
22942
+ const _hoisted_1$E = {
22859
22943
  key: 0,
22860
22944
  class: "lupa-mobile-filter-sidebar"
22861
22945
  };
22862
- const _hoisted_2$t = ["onClick"];
22863
- const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
22864
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
22946
+ const _hoisted_2$u = ["onClick"];
22947
+ const _hoisted_3$o = { class: "lupa-mobile-sidebar-content" };
22948
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
22865
22949
  const _hoisted_5$a = { class: "lupa-sidebar-title" };
22866
22950
  const _hoisted_6$6 = {
22867
22951
  key: 0,
22868
22952
  class: "lupa-sidebar-filter-count"
22869
22953
  };
22870
22954
  const _hoisted_7$4 = { class: "lupa-sidebar-filter-options" };
22871
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
22955
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
22872
22956
  __name: "MobileFilterSidebar",
22873
22957
  props: {
22874
22958
  options: {}
@@ -22899,13 +22983,13 @@ and ensure you are accounting for this risk.
22899
22983
  handleMobileToggle();
22900
22984
  };
22901
22985
  return (_ctx, _cache) => {
22902
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
22986
+ return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$E, [
22903
22987
  createBaseVNode("div", {
22904
22988
  class: "lupa-sidebar-close",
22905
22989
  onClick: withModifiers(handleMobileToggle, ["stop"])
22906
- }, null, 8, _hoisted_2$t),
22907
- createBaseVNode("div", _hoisted_3$n, [
22908
- createBaseVNode("div", _hoisted_4$g, [
22990
+ }, null, 8, _hoisted_2$u),
22991
+ createBaseVNode("div", _hoisted_3$o, [
22992
+ createBaseVNode("div", _hoisted_4$h, [
22909
22993
  createBaseVNode("div", _hoisted_5$a, [
22910
22994
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
22911
22995
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
@@ -22916,7 +23000,7 @@ and ensure you are accounting for this risk.
22916
23000
  })
22917
23001
  ]),
22918
23002
  createBaseVNode("div", _hoisted_7$4, [
22919
- createVNode(_sfc_main$J, {
23003
+ createVNode(_sfc_main$K, {
22920
23004
  options: _ctx.options,
22921
23005
  expandable: isActiveFiltersExpanded.value,
22922
23006
  onFilter: filter2
@@ -22927,14 +23011,14 @@ and ensure you are accounting for this risk.
22927
23011
  };
22928
23012
  }
22929
23013
  });
22930
- const _hoisted_1$C = { id: "lupa-search-results-breadcrumbs" };
22931
- const _hoisted_2$s = ["href", "onClick"];
22932
- const _hoisted_3$m = {
23014
+ const _hoisted_1$D = { id: "lupa-search-results-breadcrumbs" };
23015
+ const _hoisted_2$t = ["href", "onClick"];
23016
+ const _hoisted_3$n = {
22933
23017
  key: 1,
22934
23018
  class: "lupa-search-results-breadcrumb-text"
22935
23019
  };
22936
- const _hoisted_4$f = { key: 2 };
22937
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
23020
+ const _hoisted_4$g = { key: 2 };
23021
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22938
23022
  __name: "SearchResultsBreadcrumbs",
22939
23023
  props: {
22940
23024
  breadcrumbs: {}
@@ -22959,7 +23043,7 @@ and ensure you are accounting for this risk.
22959
23043
  handleRoutingEvent(link, event, hasEventRouting.value);
22960
23044
  };
22961
23045
  return (_ctx, _cache) => {
22962
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
23046
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [
22963
23047
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
22964
23048
  return openBlock(), createElementBlock("span", {
22965
23049
  class: "lupa-search-results-breadcrumb",
@@ -22973,19 +23057,19 @@ and ensure you are accounting for this risk.
22973
23057
  var _a;
22974
23058
  return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
22975
23059
  }
22976
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
22977
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
23060
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
23061
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
22978
23062
  ]);
22979
23063
  }), 128))
22980
23064
  ]);
22981
23065
  };
22982
23066
  }
22983
23067
  });
22984
- const _hoisted_1$B = {
23068
+ const _hoisted_1$C = {
22985
23069
  id: "lupa-search-result-filters",
22986
23070
  class: "lupa-search-result-filters lupa-search-result-top-filters"
22987
23071
  };
22988
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
23072
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
22989
23073
  __name: "FiltersTopDropdown",
22990
23074
  props: {
22991
23075
  options: {}
@@ -22997,8 +23081,8 @@ and ensure you are accounting for this risk.
22997
23081
  };
22998
23082
  return (_ctx, _cache) => {
22999
23083
  var _a;
23000
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
23001
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
23084
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
23085
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$L, {
23002
23086
  key: 0,
23003
23087
  options: _ctx.options.facets,
23004
23088
  "facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
@@ -23009,8 +23093,8 @@ and ensure you are accounting for this risk.
23009
23093
  };
23010
23094
  }
23011
23095
  });
23012
- const _hoisted_1$A = { id: "lupa-search-results-layout-selection" };
23013
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
23096
+ const _hoisted_1$B = { id: "lupa-search-results-layout-selection" };
23097
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
23014
23098
  __name: "SearchResultsLayoutSelection",
23015
23099
  setup(__props) {
23016
23100
  const searchResultStore = useSearchResultStore();
@@ -23021,7 +23105,7 @@ and ensure you are accounting for this risk.
23021
23105
  searchResultStore.setLayout(layout2);
23022
23106
  };
23023
23107
  return (_ctx, _cache) => {
23024
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
23108
+ return openBlock(), createElementBlock("div", _hoisted_1$B, [
23025
23109
  createBaseVNode("div", {
23026
23110
  class: normalizeClass([
23027
23111
  "lupa-layout-selection-grid",
@@ -23043,11 +23127,11 @@ and ensure you are accounting for this risk.
23043
23127
  };
23044
23128
  }
23045
23129
  });
23046
- const _hoisted_1$z = {
23130
+ const _hoisted_1$A = {
23047
23131
  key: 0,
23048
23132
  class: "lupa-mobile-toggle-filter-count"
23049
23133
  };
23050
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
23134
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
23051
23135
  __name: "SearchResultsMobileToggle",
23052
23136
  props: {
23053
23137
  label: {},
@@ -23065,26 +23149,26 @@ and ensure you are accounting for this risk.
23065
23149
  onClick: handleMobileToggle
23066
23150
  }, [
23067
23151
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
23068
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$z, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
23152
+ _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
23069
23153
  ], 2);
23070
23154
  };
23071
23155
  }
23072
23156
  });
23073
- const _hoisted_1$y = {
23157
+ const _hoisted_1$z = {
23074
23158
  key: 0,
23075
23159
  id: "lupa-search-results-page-select",
23076
23160
  "data-cy": "lupa-search-results-page-select"
23077
23161
  };
23078
- const _hoisted_2$r = {
23162
+ const _hoisted_2$s = {
23079
23163
  key: 0,
23080
23164
  class: "lupa-page-number-separator"
23081
23165
  };
23082
- const _hoisted_3$l = ["onClick"];
23083
- const _hoisted_4$e = {
23166
+ const _hoisted_3$m = ["onClick"];
23167
+ const _hoisted_4$f = {
23084
23168
  key: 0,
23085
23169
  class: "lupa-page-number-separator"
23086
23170
  };
23087
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
23171
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
23088
23172
  __name: "SearchResultsPageSelect",
23089
23173
  props: {
23090
23174
  lastPageLabel: {},
@@ -23161,7 +23245,7 @@ and ensure you are accounting for this risk.
23161
23245
  }
23162
23246
  };
23163
23247
  return (_ctx, _cache) => {
23164
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
23248
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$z, [
23165
23249
  showBack.value ? (openBlock(), createElementBlock("div", {
23166
23250
  key: 0,
23167
23251
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -23172,7 +23256,7 @@ and ensure you are accounting for this risk.
23172
23256
  class: "lupa-page-number lupa-page-number-first",
23173
23257
  onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
23174
23258
  }, " 1 "),
23175
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, "...")) : createCommentVNode("", true)
23259
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$s, "...")) : createCommentVNode("", true)
23176
23260
  ], 64)) : createCommentVNode("", true),
23177
23261
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
23178
23262
  return openBlock(), createElementBlock("div", {
@@ -23183,10 +23267,10 @@ and ensure you are accounting for this risk.
23183
23267
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
23184
23268
  ]),
23185
23269
  "data-cy": "lupa-page-number"
23186
- }, toDisplayString(page), 11, _hoisted_3$l);
23270
+ }, toDisplayString(page), 11, _hoisted_3$m);
23187
23271
  }), 128)),
23188
23272
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
23189
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
23273
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
23190
23274
  createBaseVNode("div", {
23191
23275
  class: "lupa-page-number lupa-page-number-last",
23192
23276
  onClick: _cache[2] || (_cache[2] = () => {
@@ -23205,15 +23289,15 @@ and ensure you are accounting for this risk.
23205
23289
  };
23206
23290
  }
23207
23291
  });
23208
- const _hoisted_1$x = {
23292
+ const _hoisted_1$y = {
23209
23293
  id: "lupa-search-results-page-size",
23210
23294
  "data-cy": "lupa-search-results-page-size"
23211
23295
  };
23212
- const _hoisted_2$q = { id: "lupa-select" };
23213
- const _hoisted_3$k = { class: "lupa-select-label" };
23214
- const _hoisted_4$d = ["aria-label"];
23296
+ const _hoisted_2$r = { id: "lupa-select" };
23297
+ const _hoisted_3$l = { class: "lupa-select-label" };
23298
+ const _hoisted_4$e = ["aria-label"];
23215
23299
  const _hoisted_5$9 = ["value"];
23216
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
23300
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
23217
23301
  __name: "SearchResultsPageSize",
23218
23302
  props: {
23219
23303
  labels: {},
@@ -23241,9 +23325,9 @@ and ensure you are accounting for this risk.
23241
23325
  });
23242
23326
  };
23243
23327
  return (_ctx, _cache) => {
23244
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
23245
- createBaseVNode("div", _hoisted_2$q, [
23246
- createBaseVNode("label", _hoisted_3$k, toDisplayString(label.value), 1),
23328
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
23329
+ createBaseVNode("div", _hoisted_2$r, [
23330
+ createBaseVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
23247
23331
  createBaseVNode("select", {
23248
23332
  class: "lupa-select-dropdown",
23249
23333
  "aria-label": label.value,
@@ -23258,21 +23342,21 @@ and ensure you are accounting for this risk.
23258
23342
  value: option
23259
23343
  }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
23260
23344
  }), 128))
23261
- ], 40, _hoisted_4$d)
23345
+ ], 40, _hoisted_4$e)
23262
23346
  ])
23263
23347
  ]);
23264
23348
  };
23265
23349
  }
23266
23350
  });
23267
- const _hoisted_1$w = {
23351
+ const _hoisted_1$x = {
23268
23352
  id: "lupa-search-results-sort",
23269
23353
  class: "lupa-search-results-sort"
23270
23354
  };
23271
- const _hoisted_2$p = { id: "lupa-select" };
23272
- const _hoisted_3$j = { class: "lupa-select-label" };
23273
- const _hoisted_4$c = ["aria-label"];
23355
+ const _hoisted_2$q = { id: "lupa-select" };
23356
+ const _hoisted_3$k = { class: "lupa-select-label" };
23357
+ const _hoisted_4$d = ["aria-label"];
23274
23358
  const _hoisted_5$8 = ["value"];
23275
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
23359
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
23276
23360
  __name: "SearchResultsSort",
23277
23361
  props: {
23278
23362
  options: {},
@@ -23321,9 +23405,9 @@ and ensure you are accounting for this risk.
23321
23405
  previousKey.value = selectedKey.value;
23322
23406
  };
23323
23407
  return (_ctx, _cache) => {
23324
- return openBlock(), createElementBlock("div", _hoisted_1$w, [
23325
- createBaseVNode("div", _hoisted_2$p, [
23326
- createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.options.label), 1),
23408
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
23409
+ createBaseVNode("div", _hoisted_2$q, [
23410
+ createBaseVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
23327
23411
  withDirectives(createBaseVNode("select", {
23328
23412
  class: "lupa-select-dropdown",
23329
23413
  "aria-label": _ctx.options.label,
@@ -23338,7 +23422,7 @@ and ensure you are accounting for this risk.
23338
23422
  value: option.key
23339
23423
  }, toDisplayString(option.label), 9, _hoisted_5$8);
23340
23424
  }), 128))
23341
- ], 40, _hoisted_4$c), [
23425
+ ], 40, _hoisted_4$d), [
23342
23426
  [vModelSelect, selectedKey.value]
23343
23427
  ])
23344
23428
  ])
@@ -23346,13 +23430,13 @@ and ensure you are accounting for this risk.
23346
23430
  };
23347
23431
  }
23348
23432
  });
23349
- const _hoisted_1$v = { class: "lupa-toolbar-left" };
23350
- const _hoisted_2$o = {
23433
+ const _hoisted_1$w = { class: "lupa-toolbar-left" };
23434
+ const _hoisted_2$p = {
23351
23435
  key: 0,
23352
23436
  class: "lupa-toolbar-right-title"
23353
23437
  };
23354
- const _hoisted_3$i = { key: 2 };
23355
- const _hoisted_4$b = { key: 4 };
23438
+ const _hoisted_3$j = { key: 2 };
23439
+ const _hoisted_4$c = { key: 4 };
23356
23440
  const _hoisted_5$7 = { key: 6 };
23357
23441
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
23358
23442
  const _hoisted_7$3 = {
@@ -23361,7 +23445,7 @@ and ensure you are accounting for this risk.
23361
23445
  };
23362
23446
  const _hoisted_8 = { key: 2 };
23363
23447
  const _hoisted_9 = { key: 4 };
23364
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
23448
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23365
23449
  __name: "SearchResultsToolbar",
23366
23450
  props: {
23367
23451
  options: {},
@@ -23468,16 +23552,16 @@ and ensure you are accounting for this risk.
23468
23552
  id: "lupa-search-results-toolbar",
23469
23553
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
23470
23554
  }, [
23471
- createBaseVNode("div", _hoisted_1$v, [
23472
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23473
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$F, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$i)),
23474
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$X, {
23555
+ createBaseVNode("div", _hoisted_1$w, [
23556
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23557
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$G, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
23558
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$Y, {
23475
23559
  key: 3,
23476
23560
  label: searchSummaryLabel.value,
23477
23561
  clearable: unref(hasAnyFilter) && showFilterClear.value,
23478
23562
  onClear: handleClearAll
23479
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
23480
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$D, {
23563
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
23564
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$E, {
23481
23565
  key: 5,
23482
23566
  options: paginationOptions.value.pageSelect,
23483
23567
  "last-page-label": paginationOptions.value.labels.showMore,
@@ -23486,16 +23570,16 @@ and ensure you are accounting for this risk.
23486
23570
  ]),
23487
23571
  createBaseVNode("div", _hoisted_6$5, [
23488
23572
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
23489
- createVNode(_sfc_main$E, {
23573
+ createVNode(_sfc_main$F, {
23490
23574
  label: optionsValue.value.labels.mobileFilterButton,
23491
23575
  "show-filter-count": showMobileFilterCount.value
23492
23576
  }, null, 8, ["label", "show-filter-count"]),
23493
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$C, {
23577
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
23494
23578
  key: 1,
23495
23579
  options: paginationOptions.value.pageSize,
23496
23580
  labels: paginationOptions.value.labels
23497
23581
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
23498
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$B, {
23582
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$C, {
23499
23583
  key: 3,
23500
23584
  options: sortOptions.value,
23501
23585
  callbacks: callbacks.value
@@ -23505,7 +23589,7 @@ and ensure you are accounting for this risk.
23505
23589
  };
23506
23590
  }
23507
23591
  });
23508
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
23592
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
23509
23593
  __name: "SearchResultsProductImage",
23510
23594
  props: {
23511
23595
  item: {},
@@ -23513,7 +23597,7 @@ and ensure you are accounting for this risk.
23513
23597
  },
23514
23598
  setup(__props) {
23515
23599
  return (_ctx, _cache) => {
23516
- return openBlock(), createBlock(_sfc_main$1k, {
23600
+ return openBlock(), createBlock(_sfc_main$1l, {
23517
23601
  item: _ctx.item,
23518
23602
  options: _ctx.options,
23519
23603
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -23522,16 +23606,16 @@ and ensure you are accounting for this risk.
23522
23606
  };
23523
23607
  }
23524
23608
  });
23525
- const _hoisted_1$u = ["title", "innerHTML"];
23526
- const _hoisted_2$n = ["title"];
23527
- const _hoisted_3$h = ["href", "innerHTML"];
23528
- const _hoisted_4$a = ["title"];
23609
+ const _hoisted_1$v = ["title", "innerHTML"];
23610
+ const _hoisted_2$o = ["title"];
23611
+ const _hoisted_3$i = ["href", "innerHTML"];
23612
+ const _hoisted_4$b = ["title"];
23529
23613
  const _hoisted_5$6 = {
23530
23614
  key: 0,
23531
23615
  class: "lupa-search-results-product-title-text"
23532
23616
  };
23533
23617
  const _hoisted_6$4 = ["href"];
23534
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
23618
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23535
23619
  __name: "SearchResultsProductTitle",
23536
23620
  props: {
23537
23621
  item: {},
@@ -23568,7 +23652,7 @@ and ensure you are accounting for this risk.
23568
23652
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23569
23653
  title: sanitizedTitle.value,
23570
23654
  innerHTML: sanitizedTitle.value
23571
- }, null, 12, _hoisted_1$u)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23655
+ }, null, 12, _hoisted_1$v)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23572
23656
  key: 1,
23573
23657
  class: "lupa-search-results-product-title",
23574
23658
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -23579,8 +23663,8 @@ and ensure you are accounting for this risk.
23579
23663
  class: "lupa-search-results-product-title-text lupa-title-link",
23580
23664
  innerHTML: sanitizedTitle.value,
23581
23665
  onClick: handleNavigation
23582
- }, null, 8, _hoisted_3$h)
23583
- ], 12, _hoisted_2$n)) : (openBlock(), createElementBlock("div", {
23666
+ }, null, 8, _hoisted_3$i)
23667
+ ], 12, _hoisted_2$o)) : (openBlock(), createElementBlock("div", {
23584
23668
  key: 2,
23585
23669
  class: "lupa-search-results-product-title",
23586
23670
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -23593,12 +23677,12 @@ and ensure you are accounting for this risk.
23593
23677
  class: "lupa-search-results-product-title-text lupa-title-link",
23594
23678
  onClick: handleNavigation
23595
23679
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
23596
- ], 12, _hoisted_4$a));
23680
+ ], 12, _hoisted_4$b));
23597
23681
  };
23598
23682
  }
23599
23683
  });
23600
- const _hoisted_1$t = ["innerHTML"];
23601
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
23684
+ const _hoisted_1$u = ["innerHTML"];
23685
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23602
23686
  __name: "SearchResultsProductDescription",
23603
23687
  props: {
23604
23688
  item: {},
@@ -23625,7 +23709,7 @@ and ensure you are accounting for this risk.
23625
23709
  class: "lupa-search-results-product-description",
23626
23710
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23627
23711
  innerHTML: sanitizedDescription.value
23628
- }, null, 12, _hoisted_1$t)) : (openBlock(), createElementBlock("div", {
23712
+ }, null, 12, _hoisted_1$u)) : (openBlock(), createElementBlock("div", {
23629
23713
  key: 1,
23630
23714
  class: "lupa-search-results-product-description",
23631
23715
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -23633,15 +23717,15 @@ and ensure you are accounting for this risk.
23633
23717
  };
23634
23718
  }
23635
23719
  });
23636
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
23637
- const _hoisted_2$m = { class: "lupa-ratings" };
23638
- const _hoisted_3$g = { class: "lupa-ratings-base" };
23639
- const _hoisted_4$9 = ["innerHTML"];
23720
+ const _hoisted_1$t = { id: "lupa-search-results-rating" };
23721
+ const _hoisted_2$n = { class: "lupa-ratings" };
23722
+ const _hoisted_3$h = { class: "lupa-ratings-base" };
23723
+ const _hoisted_4$a = ["innerHTML"];
23640
23724
  const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
23641
23725
  const _hoisted_6$3 = ["innerHTML"];
23642
23726
  const _hoisted_7$2 = ["href"];
23643
23727
  const STAR_COUNT = 5;
23644
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
23728
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
23645
23729
  __name: "SearchResultsProductRating",
23646
23730
  props: {
23647
23731
  item: {},
@@ -23678,15 +23762,15 @@ and ensure you are accounting for this risk.
23678
23762
  return generateLink(props.options.links.ratingDetails, props.item);
23679
23763
  });
23680
23764
  return (_ctx, _cache) => {
23681
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
23682
- createBaseVNode("div", _hoisted_2$m, [
23683
- createBaseVNode("div", _hoisted_3$g, [
23765
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
23766
+ createBaseVNode("div", _hoisted_2$n, [
23767
+ createBaseVNode("div", _hoisted_3$h, [
23684
23768
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
23685
23769
  return openBlock(), createElementBlock("div", {
23686
23770
  key: index,
23687
23771
  innerHTML: star,
23688
23772
  class: "lupa-rating lupa-rating-not-highlighted"
23689
- }, null, 8, _hoisted_4$9);
23773
+ }, null, 8, _hoisted_4$a);
23690
23774
  }), 128))
23691
23775
  ]),
23692
23776
  createBaseVNode("div", _hoisted_5$5, [
@@ -23712,11 +23796,11 @@ and ensure you are accounting for this risk.
23712
23796
  };
23713
23797
  }
23714
23798
  });
23715
- const _hoisted_1$r = {
23799
+ const _hoisted_1$s = {
23716
23800
  class: "lupa-search-results-product-regular-price",
23717
23801
  "data-cy": "lupa-search-results-product-regular-price"
23718
23802
  };
23719
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
23803
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23720
23804
  __name: "SearchResultsProductRegularPrice",
23721
23805
  props: {
23722
23806
  item: {},
@@ -23734,11 +23818,11 @@ and ensure you are accounting for this risk.
23734
23818
  );
23735
23819
  });
23736
23820
  return (_ctx, _cache) => {
23737
- return openBlock(), createElementBlock("div", _hoisted_1$r, toDisplayString(price.value), 1);
23821
+ return openBlock(), createElementBlock("div", _hoisted_1$s, toDisplayString(price.value), 1);
23738
23822
  };
23739
23823
  }
23740
23824
  });
23741
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
23825
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23742
23826
  __name: "SearchResultsProductPrice",
23743
23827
  props: {
23744
23828
  item: {},
@@ -23768,10 +23852,10 @@ and ensure you are accounting for this risk.
23768
23852
  };
23769
23853
  }
23770
23854
  });
23771
- const _hoisted_1$q = { class: "lupa-search-results-add-to-cart-wrapper" };
23772
- const _hoisted_2$l = { class: "lupa-search-results-product-addtocart" };
23773
- const _hoisted_3$f = ["id", "disabled", "onClick"];
23774
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
23855
+ const _hoisted_1$r = { class: "lupa-search-results-add-to-cart-wrapper" };
23856
+ const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
23857
+ const _hoisted_3$g = ["id", "disabled", "onClick"];
23858
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23775
23859
  __name: "SearchResultsProductAddToCart",
23776
23860
  props: {
23777
23861
  item: {},
@@ -23809,26 +23893,26 @@ and ensure you are accounting for this risk.
23809
23893
  loading.value = false;
23810
23894
  });
23811
23895
  return (_ctx, _cache) => {
23812
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
23813
- createBaseVNode("div", _hoisted_2$l, [
23896
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
23897
+ createBaseVNode("div", _hoisted_2$m, [
23814
23898
  createBaseVNode("button", {
23815
23899
  id: id.value,
23816
23900
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
23817
23901
  "data-cy": "lupa-add-to-cart",
23818
23902
  disabled: !inStockValue.value || loading.value,
23819
23903
  onClick: withModifiers(handleClick, ["stop"])
23820
- }, toDisplayString(label.value), 11, _hoisted_3$f)
23904
+ }, toDisplayString(label.value), 11, _hoisted_3$g)
23821
23905
  ])
23822
23906
  ]);
23823
23907
  };
23824
23908
  }
23825
23909
  });
23826
- const _hoisted_1$p = ["innerHTML"];
23827
- const _hoisted_2$k = { key: 0 };
23828
- const _hoisted_3$e = { key: 1 };
23829
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
23910
+ const _hoisted_1$q = ["innerHTML"];
23911
+ const _hoisted_2$l = { key: 0 };
23912
+ const _hoisted_3$f = { key: 1 };
23913
+ const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
23830
23914
  const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
23831
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
23915
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
23832
23916
  __name: "SearchResultsProductCustom",
23833
23917
  props: {
23834
23918
  item: {},
@@ -23866,20 +23950,20 @@ and ensure you are accounting for this risk.
23866
23950
  key: 0,
23867
23951
  class: className.value,
23868
23952
  innerHTML: text.value
23869
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$p)) : (openBlock(), createElementBlock("div", mergeProps({
23953
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$q)) : (openBlock(), createElementBlock("div", mergeProps({
23870
23954
  key: 1,
23871
23955
  class: className.value
23872
23956
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
23873
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$e, [
23874
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
23957
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
23958
+ createBaseVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
23875
23959
  createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
23876
23960
  ]))
23877
23961
  ], 16));
23878
23962
  };
23879
23963
  }
23880
23964
  });
23881
- const _hoisted_1$o = ["innerHTML"];
23882
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
23965
+ const _hoisted_1$p = ["innerHTML"];
23966
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
23883
23967
  __name: "SearchResultsProductCustomHtmlElement",
23884
23968
  props: {
23885
23969
  item: {},
@@ -23910,15 +23994,15 @@ and ensure you are accounting for this risk.
23910
23994
  return openBlock(), createElementBlock("div", mergeProps({
23911
23995
  class: className.value,
23912
23996
  innerHTML: text.value
23913
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$o);
23997
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$p);
23914
23998
  };
23915
23999
  }
23916
24000
  });
23917
- const _hoisted_1$n = { id: "lupa-search-results-rating" };
23918
- const _hoisted_2$j = ["innerHTML"];
23919
- const _hoisted_3$d = { class: "lupa-ratings" };
23920
- const _hoisted_4$7 = ["href"];
23921
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
24001
+ const _hoisted_1$o = { id: "lupa-search-results-rating" };
24002
+ const _hoisted_2$k = ["innerHTML"];
24003
+ const _hoisted_3$e = { class: "lupa-ratings" };
24004
+ const _hoisted_4$8 = ["href"];
24005
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
23922
24006
  __name: "SearchResultsProductSingleStarRating",
23923
24007
  props: {
23924
24008
  item: {},
@@ -23946,35 +24030,35 @@ and ensure you are accounting for this risk.
23946
24030
  return RATING_STAR_HTML;
23947
24031
  });
23948
24032
  return (_ctx, _cache) => {
23949
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
24033
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
23950
24034
  createBaseVNode("div", {
23951
24035
  innerHTML: star.value,
23952
24036
  class: "lupa-rating lupa-rating-highlighted"
23953
- }, null, 8, _hoisted_2$j),
23954
- createBaseVNode("div", _hoisted_3$d, toDisplayString(rating.value), 1),
24037
+ }, null, 8, _hoisted_2$k),
24038
+ createBaseVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
23955
24039
  createBaseVNode("a", {
23956
24040
  href: ratingLink.value,
23957
24041
  class: "lupa-total-ratings"
23958
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
24042
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
23959
24043
  ]);
23960
24044
  };
23961
24045
  }
23962
24046
  });
23963
24047
  const __default__ = {
23964
24048
  components: {
23965
- SearchResultsProductImage: _sfc_main$z,
23966
- SearchResultsProductTitle: _sfc_main$y,
23967
- SearchResultsProductDescription: _sfc_main$x,
23968
- SearchResultsProductRating: _sfc_main$w,
23969
- SearchResultsProductRegularPrice: _sfc_main$v,
23970
- SearchResultsProductPrice: _sfc_main$u,
23971
- SearchResultsProductAddToCart: _sfc_main$t,
23972
- SearchResultsProductCustom: _sfc_main$s,
23973
- SearchResultsProductCustomHtmlElement: _sfc_main$r,
23974
- SearchResultsProductSingleStarRating: _sfc_main$q
23975
- }
23976
- };
23977
- const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
24049
+ SearchResultsProductImage: _sfc_main$A,
24050
+ SearchResultsProductTitle: _sfc_main$z,
24051
+ SearchResultsProductDescription: _sfc_main$y,
24052
+ SearchResultsProductRating: _sfc_main$x,
24053
+ SearchResultsProductRegularPrice: _sfc_main$w,
24054
+ SearchResultsProductPrice: _sfc_main$v,
24055
+ SearchResultsProductAddToCart: _sfc_main$u,
24056
+ SearchResultsProductCustom: _sfc_main$t,
24057
+ SearchResultsProductCustomHtmlElement: _sfc_main$s,
24058
+ SearchResultsProductSingleStarRating: _sfc_main$r
24059
+ }
24060
+ };
24061
+ const _sfc_main$q = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
23978
24062
  __name: "SearchResultsProductCardElement",
23979
24063
  props: {
23980
24064
  item: {},
@@ -24050,13 +24134,14 @@ and ensure you are accounting for this risk.
24050
24134
  };
24051
24135
  }
24052
24136
  }));
24053
- const _hoisted_1$m = ["href"];
24054
- const _hoisted_2$i = {
24137
+ const _hoisted_1$n = ["onMouseup"];
24138
+ const _hoisted_2$j = ["href"];
24139
+ const _hoisted_3$d = {
24055
24140
  key: 0,
24056
24141
  class: "lupa-out-of-stock"
24057
24142
  };
24058
- const _hoisted_3$c = { class: "lupa-search-result-product-details-section" };
24059
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
24143
+ const _hoisted_4$7 = { class: "lupa-search-result-product-details-section" };
24144
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
24060
24145
  __name: "SearchResultsProductCard",
24061
24146
  props: {
24062
24147
  product: {},
@@ -24159,7 +24244,7 @@ and ensure you are accounting for this risk.
24159
24244
  });
24160
24245
  const handleClick = () => {
24161
24246
  var _a, _b, _c, _d;
24162
- trackingStore.trackEvent({
24247
+ const event = {
24163
24248
  queryKey: props.options.queryKey,
24164
24249
  data: {
24165
24250
  itemId: id.value,
@@ -24172,9 +24257,15 @@ and ensure you are accounting for this risk.
24172
24257
  items: [props.product],
24173
24258
  itemId: id.value
24174
24259
  },
24175
- options: { allowEmptySearchQuery: true }
24260
+ options: { allowEmptySearchQuery: true },
24261
+ filters: searchResultStore.hasAnyFilter ? searchResultStore.filters : void 0
24176
24262
  }
24177
- });
24263
+ };
24264
+ if (isDelayedClickTracking()) {
24265
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), { url: link.value }));
24266
+ } else {
24267
+ trackingStore.trackEvent(event);
24268
+ }
24178
24269
  (_d = (_c = searchResultOptions.value.callbacks) == null ? void 0 : _c.onProductClick) == null ? void 0 : _d.call(_c, {
24179
24270
  queryKey: query.value,
24180
24271
  hasResults: true,
@@ -24207,8 +24298,11 @@ and ensure you are accounting for this risk.
24207
24298
  id: "lupa-search-result-product-card",
24208
24299
  "data-cy": "lupa-search-result-product-card",
24209
24300
  class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
24210
- }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
24211
- createVNode(_sfc_main$14, { options: badgesOptions.value }, null, 8, ["options"]),
24301
+ }, customDocumentHtmlAttributes.value, {
24302
+ onClick: handleClick,
24303
+ onMouseup: withModifiers(handleClick, ["middle", "exact"])
24304
+ }), [
24305
+ createVNode(_sfc_main$15, { options: badgesOptions.value }, null, 8, ["options"]),
24212
24306
  createBaseVNode("div", {
24213
24307
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
24214
24308
  }, [
@@ -24218,7 +24312,7 @@ and ensure you are accounting for this risk.
24218
24312
  onClick: handleNavigation
24219
24313
  }, [
24220
24314
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
24221
- return openBlock(), createBlock(_sfc_main$p, {
24315
+ return openBlock(), createBlock(_sfc_main$q, {
24222
24316
  class: "lupa-search-results-product-element",
24223
24317
  item: _ctx.product,
24224
24318
  element,
@@ -24229,16 +24323,16 @@ and ensure you are accounting for this risk.
24229
24323
  onProductEvent: handleProductEvent
24230
24324
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
24231
24325
  }), 128)),
24232
- createVNode(_sfc_main$14, {
24326
+ createVNode(_sfc_main$15, {
24233
24327
  options: badgesOptions.value,
24234
24328
  position: "image",
24235
24329
  class: "lupa-image-badges"
24236
24330
  }, null, 8, ["options"]),
24237
- ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24238
- ], 8, _hoisted_1$m),
24239
- createBaseVNode("div", _hoisted_3$c, [
24331
+ ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_3$d, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24332
+ ], 8, _hoisted_2$j),
24333
+ createBaseVNode("div", _hoisted_4$7, [
24240
24334
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
24241
- return openBlock(), createBlock(_sfc_main$p, {
24335
+ return openBlock(), createBlock(_sfc_main$q, {
24242
24336
  class: "lupa-search-results-product-element",
24243
24337
  item: _ctx.product,
24244
24338
  element,
@@ -24256,7 +24350,7 @@ and ensure you are accounting for this risk.
24256
24350
  class: normalizeClass("lupa-element-group-" + group)
24257
24351
  }, [
24258
24352
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
24259
- return openBlock(), createBlock(_sfc_main$p, {
24353
+ return openBlock(), createBlock(_sfc_main$q, {
24260
24354
  class: "lupa-search-results-product-element",
24261
24355
  item: _ctx.product,
24262
24356
  element,
@@ -24270,16 +24364,16 @@ and ensure you are accounting for this risk.
24270
24364
  ], 2);
24271
24365
  }), 128))
24272
24366
  ], 2)
24273
- ], 16);
24367
+ ], 16, _hoisted_1$n);
24274
24368
  };
24275
24369
  }
24276
24370
  });
24277
- const _hoisted_1$l = {
24371
+ const _hoisted_1$m = {
24278
24372
  id: "lupa-search-results-similar-queries",
24279
24373
  "data-cy": "lupa-search-results-similar-queries"
24280
24374
  };
24281
- const _hoisted_2$h = { class: "lupa-similar-queries-label" };
24282
- const _hoisted_3$b = {
24375
+ const _hoisted_2$i = { class: "lupa-similar-queries-label" };
24376
+ const _hoisted_3$c = {
24283
24377
  class: "lupa-similar-query-label",
24284
24378
  "data-cy": "lupa-similar-query-label"
24285
24379
  };
@@ -24290,7 +24384,7 @@ and ensure you are accounting for this risk.
24290
24384
  class: "lupa-products",
24291
24385
  "data-cy": "lupa-products"
24292
24386
  };
24293
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
24387
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
24294
24388
  __name: "SearchResultsSimilarQueries",
24295
24389
  props: {
24296
24390
  labels: {},
@@ -24320,11 +24414,11 @@ and ensure you are accounting for this risk.
24320
24414
  paramsStore.goToResults({ searchText, facet });
24321
24415
  };
24322
24416
  return (_ctx, _cache) => {
24323
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
24324
- createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarQueries), 1),
24417
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
24418
+ createBaseVNode("div", _hoisted_2$i, toDisplayString(_ctx.labels.similarQueries), 1),
24325
24419
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
24326
24420
  return openBlock(), createElementBlock("div", { key: index }, [
24327
- createBaseVNode("div", _hoisted_3$b, [
24421
+ createBaseVNode("div", _hoisted_3$c, [
24328
24422
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
24329
24423
  createBaseVNode("span", {
24330
24424
  id: "lupa-similar-query-text-component",
@@ -24340,7 +24434,7 @@ and ensure you are accounting for this risk.
24340
24434
  ]),
24341
24435
  createBaseVNode("div", _hoisted_7$1, [
24342
24436
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
24343
- return openBlock(), createBlock(_sfc_main$o, {
24437
+ return openBlock(), createBlock(_sfc_main$p, {
24344
24438
  style: normalizeStyle(_ctx.columnSize),
24345
24439
  key: getDocumentKey(index2, product),
24346
24440
  product,
@@ -24354,15 +24448,15 @@ and ensure you are accounting for this risk.
24354
24448
  };
24355
24449
  }
24356
24450
  });
24357
- const _hoisted_1$k = {
24451
+ const _hoisted_1$l = {
24358
24452
  key: 0,
24359
24453
  class: "lupa-results-additional-panel"
24360
24454
  };
24361
- const _hoisted_2$g = {
24455
+ const _hoisted_2$h = {
24362
24456
  class: "lupa-results-additional-panel-items",
24363
24457
  "data-cy": "lupa-results-additional-panel-items"
24364
24458
  };
24365
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
24459
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
24366
24460
  __name: "AdditionalPanel",
24367
24461
  props: {
24368
24462
  panel: {},
@@ -24408,6 +24502,7 @@ and ensure you are accounting for this risk.
24408
24502
  });
24409
24503
  };
24410
24504
  const handleQueryChange = () => {
24505
+ showAll.value = false;
24411
24506
  const context = getLupaTrackingContext();
24412
24507
  const queryBody = __spreadProps2(__spreadValues2({}, context), {
24413
24508
  limit: props.panel.totalCountLimit,
@@ -24434,10 +24529,10 @@ and ensure you are accounting for this risk.
24434
24529
  handleQueryChange();
24435
24530
  });
24436
24531
  return (_ctx, _cache) => {
24437
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
24438
- createBaseVNode("div", _hoisted_2$g, [
24532
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
24533
+ createBaseVNode("div", _hoisted_2$h, [
24439
24534
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
24440
- return openBlock(), createBlock(_sfc_main$o, {
24535
+ return openBlock(), createBlock(_sfc_main$p, {
24441
24536
  key: index,
24442
24537
  product: item,
24443
24538
  options: _ctx.panel,
@@ -24455,11 +24550,11 @@ and ensure you are accounting for this risk.
24455
24550
  };
24456
24551
  }
24457
24552
  });
24458
- const _hoisted_1$j = {
24553
+ const _hoisted_1$k = {
24459
24554
  key: 0,
24460
24555
  class: "lupa-results-additional-panels"
24461
24556
  };
24462
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
24557
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24463
24558
  __name: "AdditionalPanels",
24464
24559
  props: {
24465
24560
  options: {},
@@ -24476,9 +24571,9 @@ and ensure you are accounting for this risk.
24476
24571
  return locationPanels.value.length > 0;
24477
24572
  });
24478
24573
  return (_ctx, _cache) => {
24479
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
24574
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
24480
24575
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
24481
- return openBlock(), createBlock(_sfc_main$m, {
24576
+ return openBlock(), createBlock(_sfc_main$n, {
24482
24577
  key: panel.queryKey,
24483
24578
  panel,
24484
24579
  options: _ctx.sdkOptions
@@ -24495,29 +24590,29 @@ and ensure you are accounting for this risk.
24495
24590
  }
24496
24591
  return target;
24497
24592
  };
24498
- const _sfc_main$k = {};
24499
- const _hoisted_1$i = { class: "lupa-spinner-wrapper" };
24500
- const _hoisted_2$f = { class: "lupa-spinner" };
24593
+ const _sfc_main$l = {};
24594
+ const _hoisted_1$j = { class: "lupa-spinner-wrapper" };
24595
+ const _hoisted_2$g = { class: "lupa-spinner" };
24501
24596
  function _sfc_render(_ctx, _cache) {
24502
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
24503
- createBaseVNode("div", _hoisted_2$f, [
24597
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
24598
+ createBaseVNode("div", _hoisted_2$g, [
24504
24599
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x2) => {
24505
24600
  return createBaseVNode("div", { key: x2 });
24506
24601
  }), 64))
24507
24602
  ])
24508
24603
  ]);
24509
24604
  }
24510
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render]]);
24511
- const _hoisted_1$h = {
24605
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render]]);
24606
+ const _hoisted_1$i = {
24512
24607
  id: "lupa-search-results-similar-results",
24513
24608
  "data-cy": "lupa-search-results-similar-results"
24514
24609
  };
24515
- const _hoisted_2$e = { class: "lupa-similar-results-label" };
24516
- const _hoisted_3$a = {
24610
+ const _hoisted_2$f = { class: "lupa-similar-results-label" };
24611
+ const _hoisted_3$b = {
24517
24612
  class: "lupa-products",
24518
24613
  "data-cy": "lupa-products"
24519
24614
  };
24520
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
24615
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
24521
24616
  __name: "SearchResultsSimilarResults",
24522
24617
  props: {
24523
24618
  columnSize: {},
@@ -24533,11 +24628,11 @@ and ensure you are accounting for this risk.
24533
24628
  return getProductKey(`${index}`, product, props.productCardOptions.idKey);
24534
24629
  };
24535
24630
  return (_ctx, _cache) => {
24536
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
24537
- createBaseVNode("div", _hoisted_2$e, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24538
- createBaseVNode("div", _hoisted_3$a, [
24631
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
24632
+ createBaseVNode("div", _hoisted_2$f, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24633
+ createBaseVNode("div", _hoisted_3$b, [
24539
24634
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
24540
- return openBlock(), createBlock(_sfc_main$o, {
24635
+ return openBlock(), createBlock(_sfc_main$p, {
24541
24636
  style: normalizeStyle(_ctx.columnSize),
24542
24637
  key: getDocumentKey(index, product),
24543
24638
  product,
@@ -24573,15 +24668,15 @@ and ensure you are accounting for this risk.
24573
24668
  return extractFacetsRelatedSource(source, searchResults2);
24574
24669
  }
24575
24670
  };
24576
- const _hoisted_1$g = { class: "lupa-related-query-item" };
24577
- const _hoisted_2$d = { class: "lupa-related-query-image" };
24578
- const _hoisted_3$9 = { class: "lupa-related-query-label" };
24671
+ const _hoisted_1$h = { class: "lupa-related-query-item" };
24672
+ const _hoisted_2$e = { class: "lupa-related-query-image" };
24673
+ const _hoisted_3$a = { class: "lupa-related-query-label" };
24579
24674
  const _hoisted_4$5 = { class: "lupa-related-query-title" };
24580
24675
  const _hoisted_5$2 = {
24581
24676
  key: 0,
24582
24677
  class: "lupa-related-query-count"
24583
24678
  };
24584
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
24679
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
24585
24680
  __name: "RelatedQueryPanel",
24586
24681
  props: {
24587
24682
  query: {},
@@ -24592,7 +24687,9 @@ and ensure you are accounting for this risk.
24592
24687
  const loading = ref(false);
24593
24688
  const relatedQueryResult = ref(null);
24594
24689
  const optionsStore = useOptionsStore();
24690
+ const searchResultStore = useSearchResultStore();
24595
24691
  const { searchResultOptions } = storeToRefs(optionsStore);
24692
+ const { searchResult } = storeToRefs(searchResultStore);
24596
24693
  const mainImage = computed(() => {
24597
24694
  var _a, _b, _c;
24598
24695
  return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.elements) == null ? void 0 : _b.find((e2) => e2.type === DocumentElementType.IMAGE)) != null ? _c : "";
@@ -24617,24 +24714,34 @@ and ensure you are accounting for this risk.
24617
24714
  var _a, _b;
24618
24715
  return (_b = (_a = relatedQueryResult.value) == null ? void 0 : _a.total) != null ? _b : 0;
24619
24716
  });
24717
+ const searchText = computed(() => {
24718
+ var _a, _b, _c;
24719
+ return ((_a = props.options.source) == null ? void 0 : _a.mode) === "filter" ? (_b = searchResult.value) == null ? void 0 : _b.searchText : (_c = props.query) == null ? void 0 : _c.toLowerCase();
24720
+ });
24721
+ const relatedQueryFilters = computed(() => {
24722
+ var _a, _b, _c;
24723
+ return ((_a = props.options.source) == null ? void 0 : _a.mode) === "filter" ? {
24724
+ [(_c = (_b = props.options) == null ? void 0 : _b.source) == null ? void 0 : _c.key]: [props.query]
24725
+ } : {};
24726
+ });
24620
24727
  const searchForRelatedQuery = () => __async2(this, null, function* () {
24621
- var _a, _b, _c, _d;
24728
+ var _a, _b, _c;
24622
24729
  if (!props.query) {
24623
24730
  return;
24624
24731
  }
24625
- const lupaQuery = { searchText: (_a = props.query) == null ? void 0 : _a.toLowerCase(), limit: 1 };
24732
+ const lupaQuery = { searchText: searchText.value, limit: 1, filters: relatedQueryFilters.value };
24626
24733
  try {
24627
24734
  loading.value = true;
24628
24735
  const result2 = yield LupaSearchSdk.query(
24629
24736
  queryKey.value,
24630
24737
  lupaQuery,
24631
- (_b = searchResultOptions.value) == null ? void 0 : _b.options
24738
+ (_a = searchResultOptions.value) == null ? void 0 : _a.options
24632
24739
  );
24633
24740
  if (result2.success) {
24634
24741
  relatedQueryResult.value = result2;
24635
24742
  }
24636
24743
  } catch (error) {
24637
- (_d = (_c = searchResultOptions.value) == null ? void 0 : _c.options) == null ? void 0 : _d.onError(error);
24744
+ (_c = (_b = searchResultOptions.value) == null ? void 0 : _b.options) == null ? void 0 : _c.onError(error);
24638
24745
  } finally {
24639
24746
  loading.value = false;
24640
24747
  }
@@ -24650,9 +24757,9 @@ and ensure you are accounting for this risk.
24650
24757
  });
24651
24758
  return (_ctx, _cache) => {
24652
24759
  var _a;
24653
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
24654
- createBaseVNode("div", _hoisted_2$d, [
24655
- firstResultItem.value && image.value ? (openBlock(), createBlock(_sfc_main$1k, {
24760
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
24761
+ createBaseVNode("div", _hoisted_2$e, [
24762
+ firstResultItem.value && image.value ? (openBlock(), createBlock(_sfc_main$1l, {
24656
24763
  key: 0,
24657
24764
  "wrapper-class": "lupa-related-query-image-wrapper",
24658
24765
  "image-class": "lupa-related-query-image",
@@ -24660,7 +24767,7 @@ and ensure you are accounting for this risk.
24660
24767
  options: image.value
24661
24768
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
24662
24769
  ]),
24663
- createBaseVNode("div", _hoisted_3$9, [
24770
+ createBaseVNode("div", _hoisted_3$a, [
24664
24771
  createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
24665
24772
  ((_a = _ctx.options) == null ? void 0 : _a.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
24666
24773
  ])
@@ -24668,16 +24775,16 @@ and ensure you are accounting for this risk.
24668
24775
  };
24669
24776
  }
24670
24777
  });
24671
- const _hoisted_1$f = {
24778
+ const _hoisted_1$g = {
24672
24779
  key: 0,
24673
24780
  class: "lupa-related-queries"
24674
24781
  };
24675
- const _hoisted_2$c = {
24782
+ const _hoisted_2$d = {
24676
24783
  key: 0,
24677
24784
  class: "lupa-related-queries-title"
24678
24785
  };
24679
- const _hoisted_3$8 = ["onClick"];
24680
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
24786
+ const _hoisted_3$9 = ["onClick"];
24787
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
24681
24788
  __name: "RelatedQueries",
24682
24789
  props: {
24683
24790
  options: {}
@@ -24686,12 +24793,18 @@ and ensure you are accounting for this risk.
24686
24793
  const props = __props;
24687
24794
  const searchResultStore = useSearchResultStore();
24688
24795
  const paramsStore = useParamsStore();
24796
+ const optionsStore = useOptionsStore();
24689
24797
  const { searchResult } = storeToRefs(searchResultStore);
24798
+ const currentSearchText = computed(() => {
24799
+ var _a, _b;
24800
+ return (_b = (_a = searchResult.value) == null ? void 0 : _a.searchText) != null ? _b : "";
24801
+ });
24690
24802
  const relatedQueries = computed(() => {
24691
24803
  if (!props.options || !searchResult.value) {
24692
24804
  return [];
24693
24805
  }
24694
- return extractRelatedSource(props.options.source, searchResult.value);
24806
+ const queries = extractRelatedSource(props.options.source, searchResult.value);
24807
+ return queries;
24695
24808
  });
24696
24809
  const hasEnoughRelatedQueries = computed(() => {
24697
24810
  return relatedQueries.value.length > 1;
@@ -24699,28 +24812,130 @@ and ensure you are accounting for this risk.
24699
24812
  const goToResults = ({ searchText }) => {
24700
24813
  paramsStore.goToResults({ searchText });
24701
24814
  };
24815
+ const handleRelatedQueryClick = (query) => {
24816
+ var _a;
24817
+ if (((_a = props.options.source) == null ? void 0 : _a.mode) === "filter") {
24818
+ handleFilter(query);
24819
+ } else {
24820
+ goToResults({ searchText: query });
24821
+ }
24822
+ };
24823
+ const handleFilter = (query) => {
24824
+ var _a, _b;
24825
+ const facet = (_b = (_a = searchResult.value) == null ? void 0 : _a.facets) == null ? void 0 : _b.find(
24826
+ (facet2) => {
24827
+ var _a2, _b2;
24828
+ return facet2.key === ((_b2 = (_a2 = props.options) == null ? void 0 : _a2.source) == null ? void 0 : _b2.key);
24829
+ }
24830
+ );
24831
+ if (!facet || facet.type !== "terms") {
24832
+ return [];
24833
+ }
24834
+ toggleTermFilter(
24835
+ paramsStore.appendParams,
24836
+ { type: "terms", key: facet.key, value: query },
24837
+ optionsStore.getQueryParamName,
24838
+ {}
24839
+ );
24840
+ };
24841
+ const getSelectedFilterClass = (query) => {
24842
+ var _a, _b, _c, _d, _e, _f;
24843
+ if (((_a = props.options.source) == null ? void 0 : _a.mode) !== "filter") {
24844
+ return "";
24845
+ }
24846
+ return Array.isArray((_c = (_b = searchResult.value) == null ? void 0 : _b.filters) == null ? void 0 : _c[props.options.source.key]) && ((_f = (_e = (_d = searchResult.value) == null ? void 0 : _d.filters) == null ? void 0 : _e[props.options.source.key]) == null ? void 0 : _f.includes(
24847
+ query
24848
+ )) ? "lupa-selected-related-query-filter" : "";
24849
+ };
24702
24850
  return (_ctx, _cache) => {
24703
24851
  var _a, _b, _c, _d;
24704
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
24705
- ((_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$c, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
24852
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
24853
+ ((_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$d, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
24706
24854
  createBaseVNode("ul", null, [
24707
24855
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries.value, (query) => {
24708
- return openBlock(), createElementBlock("li", { key: query }, [
24856
+ return openBlock(), createElementBlock("li", {
24857
+ key: query + currentSearchText.value,
24858
+ class: normalizeClass(getSelectedFilterClass(query))
24859
+ }, [
24709
24860
  createBaseVNode("a", {
24710
- onClick: ($event) => goToResults({ searchText: query })
24861
+ onClick: ($event) => handleRelatedQueryClick(query)
24711
24862
  }, [
24712
- createVNode(_sfc_main$i, {
24863
+ createVNode(_sfc_main$j, {
24713
24864
  options: _ctx.options,
24714
24865
  query
24715
24866
  }, null, 8, ["options", "query"])
24716
- ], 8, _hoisted_3$8)
24717
- ]);
24867
+ ], 8, _hoisted_3$9)
24868
+ ], 2);
24718
24869
  }), 128))
24719
24870
  ])
24720
24871
  ])) : createCommentVNode("", true);
24721
24872
  };
24722
24873
  }
24723
24874
  });
24875
+ const checkHasMatchCharacters = (option, searchText) => {
24876
+ var _a, _b;
24877
+ return (_b = (_a = option.matchCharacters) == null ? void 0 : _a.split("")) == null ? void 0 : _b.some((char) => searchText.includes(char));
24878
+ };
24879
+ const checkHasMatchWords = (option, searchText) => {
24880
+ var _a;
24881
+ return (_a = searchText.split(" ")) == null ? void 0 : _a.some((word) => {
24882
+ var _a2;
24883
+ return (_a2 = option.matchWords) == null ? void 0 : _a2.includes(word);
24884
+ });
24885
+ };
24886
+ const extractRedirectionSuggestion = (searchText = "", options) => {
24887
+ for (const option of options || []) {
24888
+ const hasMatchCharacters = option.matchCharacters;
24889
+ const hasMatchWords = option.matchWords;
24890
+ if (hasMatchCharacters && !hasMatchWords && checkHasMatchCharacters(option, searchText)) {
24891
+ return option;
24892
+ }
24893
+ if (hasMatchWords && !hasMatchCharacters && checkHasMatchWords(option, searchText)) {
24894
+ return option;
24895
+ }
24896
+ if (hasMatchCharacters && hasMatchWords && checkHasMatchCharacters(option, searchText) && checkHasMatchWords(option, searchText)) {
24897
+ return option;
24898
+ }
24899
+ }
24900
+ return null;
24901
+ };
24902
+ const _hoisted_1$f = {
24903
+ key: 0,
24904
+ class: "lupa-redirection-suggestion"
24905
+ };
24906
+ const _hoisted_2$c = { class: "lupa-redirections-suggestion-label" };
24907
+ const _hoisted_3$8 = ["href"];
24908
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24909
+ __name: "RedirectionSuggestions",
24910
+ props: {
24911
+ options: {}
24912
+ },
24913
+ setup(__props) {
24914
+ const props = __props;
24915
+ const searchResultStore = useSearchResultStore();
24916
+ const optionsStore = useOptionsStore();
24917
+ const { searchResult } = storeToRefs(searchResultStore);
24918
+ const searchText = computed(() => searchResult.value.searchText);
24919
+ const redirectionSuggestion = computed(() => {
24920
+ return extractRedirectionSuggestion(searchText.value, props.options);
24921
+ });
24922
+ const label = computed(() => addParamsToLabel(redirectionSuggestion.value.label, searchText.value));
24923
+ const link = computed(
24924
+ () => generateResultLink(
24925
+ redirectionSuggestion.value.link,
24926
+ optionsStore.getQueryParamName,
24927
+ searchText.value
24928
+ )
24929
+ );
24930
+ return (_ctx, _cache) => {
24931
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
24932
+ createBaseVNode("h4", _hoisted_2$c, [
24933
+ createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
24934
+ ])
24935
+ ])) : createCommentVNode("", true);
24936
+ };
24937
+ }
24938
+ });
24724
24939
  const _hoisted_1$e = { id: "lupa-search-results-products" };
24725
24940
  const _hoisted_2$b = {
24726
24941
  class: "lupa-products",
@@ -24850,27 +25065,30 @@ and ensure you are accounting for this risk.
24850
25065
  key: 0,
24851
25066
  class: "lupa-loader"
24852
25067
  })) : createCommentVNode("", true),
24853
- createVNode(_sfc_main$l, {
25068
+ createVNode(_sfc_main$h, {
25069
+ options: _ctx.options.redirectionSuggestions
25070
+ }, null, 8, ["options"]),
25071
+ createVNode(_sfc_main$m, {
24854
25072
  options: _ctx.options,
24855
25073
  location: "top",
24856
25074
  sdkOptions: _ctx.options.options
24857
25075
  }, null, 8, ["options", "sdkOptions"]),
24858
- createVNode(_sfc_main$h, {
25076
+ createVNode(_sfc_main$i, {
24859
25077
  options: _ctx.options.relatedQueries
24860
25078
  }, null, 8, ["options"]),
24861
25079
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
24862
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$G, {
25080
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
24863
25081
  key: 0,
24864
25082
  options: (_a = _ctx.options.filters) != null ? _a : {}
24865
25083
  }, null, 8, ["options"])) : createCommentVNode("", true),
24866
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$A, {
25084
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$B, {
24867
25085
  key: 1,
24868
25086
  class: "lupa-toolbar-mobile",
24869
25087
  options: _ctx.options,
24870
25088
  "pagination-location": "top",
24871
25089
  onFilter: filter2
24872
25090
  }, null, 8, ["options"])) : createCommentVNode("", true),
24873
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$U, {
25091
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$V, {
24874
25092
  key: 2,
24875
25093
  class: normalizeClass(currentFiltersClass.value),
24876
25094
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24879,12 +25097,12 @@ and ensure you are accounting for this risk.
24879
25097
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
24880
25098
  ], 64)) : createCommentVNode("", true),
24881
25099
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
24882
- createVNode(_sfc_main$A, {
25100
+ createVNode(_sfc_main$B, {
24883
25101
  class: "lupa-toolbar-top",
24884
25102
  options: _ctx.options,
24885
25103
  "pagination-location": "top"
24886
25104
  }, null, 8, ["options"]),
24887
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$U, {
25105
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$V, {
24888
25106
  key: 0,
24889
25107
  class: normalizeClass(currentFiltersClass.value),
24890
25108
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24900,7 +25118,7 @@ and ensure you are accounting for this risk.
24900
25118
  options: productCardOptions.value
24901
25119
  });
24902
25120
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
24903
- return openBlock(), createBlock(_sfc_main$o, {
25121
+ return openBlock(), createBlock(_sfc_main$p, {
24904
25122
  style: normalizeStyle(columnSize.value),
24905
25123
  key: getProductKeyAction(index, product),
24906
25124
  product,
@@ -24916,12 +25134,12 @@ and ensure you are accounting for this risk.
24916
25134
  onClick: goToFirstPage
24917
25135
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
24918
25136
  ])) : createCommentVNode("", true),
24919
- createVNode(_sfc_main$A, {
25137
+ createVNode(_sfc_main$B, {
24920
25138
  class: "lupa-toolbar-bottom",
24921
25139
  options: _ctx.options,
24922
25140
  "pagination-location": "bottom"
24923
25141
  }, null, 8, ["options"]),
24924
- createVNode(_sfc_main$l, {
25142
+ createVNode(_sfc_main$m, {
24925
25143
  options: _ctx.options,
24926
25144
  location: "bottom",
24927
25145
  sdkOptions: _ctx.options.options
@@ -24931,14 +25149,14 @@ and ensure you are accounting for this risk.
24931
25149
  createBaseVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
24932
25150
  ])) : createCommentVNode("", true),
24933
25151
  hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
24934
- createVNode(_sfc_main$n, {
25152
+ createVNode(_sfc_main$o, {
24935
25153
  labels: similarQueriesLabels.value,
24936
25154
  columnSize: columnSize.value,
24937
25155
  productCardOptions: productCardOptions.value
24938
25156
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
24939
25157
  ])) : createCommentVNode("", true),
24940
25158
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
24941
- createVNode(_sfc_main$j, {
25159
+ createVNode(_sfc_main$k, {
24942
25160
  labels: similarResultsLabels.value,
24943
25161
  columnSize: columnSize.value,
24944
25162
  productCardOptions: productCardOptions.value
@@ -25007,14 +25225,14 @@ and ensure you are accounting for this risk.
25007
25225
  ])) : createCommentVNode("", true),
25008
25226
  createBaseVNode("div", _hoisted_4$3, [
25009
25227
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
25010
- return openBlock(), createBlock(_sfc_main$T, {
25228
+ return openBlock(), createBlock(_sfc_main$U, {
25011
25229
  key: getCategoryKey(child),
25012
25230
  item: child,
25013
25231
  options: categoryOptions.value
25014
25232
  }, null, 8, ["item", "options"]);
25015
25233
  }), 128))
25016
25234
  ]),
25017
- createVNode(_sfc_main$A, {
25235
+ createVNode(_sfc_main$B, {
25018
25236
  class: "lupa-toolbar-mobile",
25019
25237
  "pagination-location": "top",
25020
25238
  options: _ctx.options
@@ -25246,8 +25464,8 @@ and ensure you are accounting for this risk.
25246
25464
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
25247
25465
  }, [
25248
25466
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
25249
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25250
- createVNode(_sfc_main$W, {
25467
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25468
+ createVNode(_sfc_main$X, {
25251
25469
  "show-summary": true,
25252
25470
  options: _ctx.options,
25253
25471
  "is-product-list": (_a = _ctx.isProductList) != null ? _a : false
@@ -25257,17 +25475,17 @@ and ensure you are accounting for this risk.
25257
25475
  key: 1,
25258
25476
  options: _ctx.options
25259
25477
  }, null, 8, ["options"])) : createCommentVNode("", true),
25260
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$I, {
25478
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$J, {
25261
25479
  key: 2,
25262
25480
  options: _ctx.options.filters,
25263
25481
  onFilter: handleParamsChange
25264
25482
  }, null, 8, ["options"])) : createCommentVNode("", true),
25265
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$H, {
25483
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$I, {
25266
25484
  key: 3,
25267
25485
  breadcrumbs: _ctx.options.breadcrumbs
25268
25486
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
25269
25487
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
25270
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
25488
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$K, {
25271
25489
  key: 0,
25272
25490
  options: (_b = _ctx.options.filters) != null ? _b : {},
25273
25491
  ref_key: "searchResultsFilters",
@@ -25275,8 +25493,8 @@ and ensure you are accounting for this risk.
25275
25493
  onFilter: handleParamsChange
25276
25494
  }, null, 8, ["options"])) : createCommentVNode("", true),
25277
25495
  createBaseVNode("div", _hoisted_3$5, [
25278
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25279
- createVNode(_sfc_main$W, {
25496
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25497
+ createVNode(_sfc_main$X, {
25280
25498
  options: _ctx.options,
25281
25499
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
25282
25500
  }, null, 8, ["options", "is-product-list"]),
@@ -25292,13 +25510,13 @@ and ensure you are accounting for this risk.
25292
25510
  }, 8, ["options", "ssr"])
25293
25511
  ])
25294
25512
  ])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
25295
- createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25296
- createVNode(_sfc_main$W, {
25513
+ createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25514
+ createVNode(_sfc_main$X, {
25297
25515
  options: _ctx.options,
25298
25516
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
25299
25517
  }, null, 8, ["options", "is-product-list"]),
25300
25518
  createBaseVNode("div", _hoisted_4$2, [
25301
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
25519
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$K, {
25302
25520
  key: 0,
25303
25521
  options: (_e = _ctx.options.filters) != null ? _e : {},
25304
25522
  ref_key: "searchResultsFilters",
@@ -30988,7 +31206,7 @@ and ensure you are accounting for this risk.
30988
31206
  onClick: withModifiers(innerClick, ["stop"])
30989
31207
  }, [
30990
31208
  createBaseVNode("div", _hoisted_2$7, [
30991
- createVNode(_sfc_main$Z, {
31209
+ createVNode(_sfc_main$_, {
30992
31210
  options: fullSearchBoxOptions.value,
30993
31211
  "is-search-container": true,
30994
31212
  ref_key: "searchBox",
@@ -31878,7 +32096,7 @@ and ensure you are accounting for this risk.
31878
32096
  key: getProductKeyAction(index, product)
31879
32097
  }, {
31880
32098
  default: withCtx(() => [
31881
- createVNode(_sfc_main$o, {
32099
+ createVNode(_sfc_main$p, {
31882
32100
  product,
31883
32101
  options: _ctx.options,
31884
32102
  "click-tracking-settings": clickTrackingSettings.value
@@ -31891,7 +32109,7 @@ and ensure you are accounting for this risk.
31891
32109
  _: 1
31892
32110
  }, 16)) : (openBlock(), createElementBlock("div", _hoisted_3$4, [
31893
32111
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
31894
- return openBlock(), createBlock(_sfc_main$o, {
32112
+ return openBlock(), createBlock(_sfc_main$p, {
31895
32113
  style: normalizeStyle(columnSize.value),
31896
32114
  key: getProductKeyAction(index, product),
31897
32115
  product,
@@ -32155,7 +32373,7 @@ and ensure you are accounting for this risk.
32155
32373
  createBaseVNode("a", {
32156
32374
  href: getLink(product)
32157
32375
  }, [
32158
- createVNode(_sfc_main$z, {
32376
+ createVNode(_sfc_main$A, {
32159
32377
  item: product,
32160
32378
  options: image.value
32161
32379
  }, null, 8, ["item", "options"])
@@ -32319,7 +32537,7 @@ and ensure you are accounting for this risk.
32319
32537
  return (_ctx, _cache) => {
32320
32538
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
32321
32539
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
32322
- return openBlock(), createBlock(_sfc_main$o, {
32540
+ return openBlock(), createBlock(_sfc_main$p, {
32323
32541
  class: "lupa-chat-product-card",
32324
32542
  key: getProductKeyAction(index, product),
32325
32543
  product,
@@ -32512,7 +32730,7 @@ and ensure you are accounting for this risk.
32512
32730
  key: 0,
32513
32731
  class: "lupasearch-chat-content"
32514
32732
  };
32515
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
32733
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
32516
32734
  __name: "ChatContainer",
32517
32735
  props: {
32518
32736
  options: {}
@@ -38530,7 +38748,7 @@ and ensure you are accounting for this risk.
38530
38748
  };
38531
38749
  __expose({ fetch: fetch2 });
38532
38750
  return (_ctx, _cache) => {
38533
- return openBlock(), createBlock(unref(_sfc_main$Z), {
38751
+ return openBlock(), createBlock(unref(_sfc_main$_), {
38534
38752
  options: fullSearchBoxOptions.value,
38535
38753
  ref_key: "searchBox",
38536
38754
  ref: searchBox2
@@ -39085,7 +39303,7 @@ and ensure you are accounting for this risk.
39085
39303
  const instance = createVue(
39086
39304
  options.displayOptions.containerSelector,
39087
39305
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
39088
- _sfc_main$1t,
39306
+ _sfc_main$1u,
39089
39307
  {
39090
39308
  options
39091
39309
  }