@cartbot/vehicle-search-beta 3.0.16 → 3.0.17

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as A, Fragment as $e } from "react/jsx-runtime";
2
- import { useState as M, useEffect as I, useRef as Z, useCallback as j, useMemo as ut } from "react";
2
+ import { useState as M, useEffect as B, useRef as Z, useCallback as N, useMemo as ut } from "react";
3
3
  import mt from "react-dom";
4
4
  import ft from "js-cookie";
5
5
  import { Combobox as gt, ComboboxInput as bt, ComboboxButton as wt, ComboboxOptions as yt, ComboboxOption as xt } from "@headlessui/react";
@@ -11,7 +11,7 @@ import Ct from "lodash/debounce.js";
11
11
  import _t from "tinycolor2";
12
12
  import Be from "posthog-js";
13
13
  const zt = `@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap";/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}vehicle-search,vehicle-search *,vehicle-search:before,vehicle-search:after,vehicle-search::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}}@layer theme{:root,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}vehicle-search,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--vs-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--vs-default-font-feature-settings,normal);font-variation-settings:var(--vs-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--vs-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--vs-default-mono-font-feature-settings,normal);font-variation-settings:var(--vs-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.partbot-mmyvs-container{--partbot-theme:0 188 125;--partbot-button-color:0 153 102;--partbot-button-hover-color:0 188 125;--partbot-button-label-color:255 255 255;--partbot-button-hover-label-color:255 255 255;--partbot-mobile-background-color:12 24 39;--partbot-button-border-radius:.375rem;--partbot-font-size:.875rem;--partbot-font-family:"Partbot","Inter",Helvetica,sans-serif;--partbot-padding:.5rem;--partbot-input-shadow:0 1px 2px 0 #0000000d;--partbot-input-border-color:229 231 235;--partbot-input-border-width:1px}[class*="vs:"]:before,[class*="vs:"]:after,[class^=vehicle-search-]:before,[class^=vehicle-search-]:after{box-sizing:border-box;--tw-content:"";border:0 solid}[class*="vs:"],[class^=vehicle-search-]{box-sizing:border-box;border:0 solid}.vehicle-search-select{text-transform:none;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.partbot-mmyvs-container{top:calc(var(--vs-spacing)*0);right:calc(var(--vs-spacing)*0);left:calc(var(--vs-spacing)*0);z-index:10000;background-color:rgb(var(--partbot-mobile-background-color));padding:calc(var(--vs-spacing)*8);--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));--tw-duration:.5s;transition-duration:.5s;position:fixed}@media (min-width:48rem){.partbot-mmyvs-container{z-index:10;padding:calc(var(--vs-spacing)*0);--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000;position:relative;top:auto;left:auto;right:auto}}.partbot-mmyvs-container{transform:translateY(-100vh)}@media (min-width:768px){.partbot-mmyvs-container{transform:translateY(0)}}.partbot-mmyvs-container.active{transform:translateY(0)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.vs\\:pointer-events-auto{pointer-events:auto}.vs\\:pointer-events-none{pointer-events:none}.vs\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vs\\:absolute{position:absolute}.vs\\:fixed{position:fixed}.vs\\:relative{position:relative}.vs\\:inset-0{inset:calc(var(--vs-spacing)*0)}.vs\\:inset-y-0{inset-block:calc(var(--vs-spacing)*0)}.vs\\:right-0{right:calc(var(--vs-spacing)*0)}.vs\\:right-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.95\\)\\]{right:calc(var(--partbot-font-size)*1.95)}.vs\\:z-10{z-index:10}.vs\\:z-99999\\!{z-index:99999!important}.vs\\:m-0{margin:calc(var(--vs-spacing)*0)}.vs\\:mt-2{margin-top:calc(var(--vs-spacing)*2)}.vs\\:mt-4{margin-top:calc(var(--vs-spacing)*4)}.vs\\:mb-1{margin-bottom:calc(var(--vs-spacing)*1)}.vs\\:block{display:block}.vs\\:flex{display:flex}.vs\\:flex\\!{display:flex!important}.vs\\:grid{display:grid}.vs\\:inline-flex{display:inline-flex}.vs\\:inline-flex\\!{display:inline-flex!important}.vs\\:h-5{height:calc(var(--vs-spacing)*5)}.vs\\:h-\\[13px\\]{height:13px}.vs\\:h-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{height:calc(var(--partbot-font-size)*.9)!important}.vs\\:h-full{height:100%}.vs\\:max-h-60\\!{max-height:calc(var(--vs-spacing)*60)!important}.vs\\:w-\\(--input-width\\){width:var(--input-width)}.vs\\:w-5{width:calc(var(--vs-spacing)*5)}.vs\\:w-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{width:calc(var(--partbot-font-size)*.9)!important}.vs\\:w-auto\\!{width:auto!important}.vs\\:w-full{width:100%}.vs\\:w-full\\!{width:100%!important}.vs\\:shrink\\!{flex-shrink:1!important}.vs\\:shrink-0\\!{flex-shrink:0!important}.vs\\:animate-spin{animation:var(--vs-animate-spin)}.vs\\:cursor-default{cursor:default}.vs\\:cursor-pointer{cursor:pointer}.vs\\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.vs\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vs\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:flex-col{flex-direction:column}.vs\\:items-center{align-items:center}.vs\\:justify-between{justify-content:space-between}.vs\\:justify-center{justify-content:center}.vs\\:justify-end{justify-content:flex-end}.vs\\:gap-3{gap:calc(var(--vs-spacing)*3)}:where(.vs\\:space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--vs-spacing)*1.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--vs-spacing)*1.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.vs\\:space-x-\\[calc\\(var\\(--partbot-padding\\)\\*0\\.25\\)\\]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--partbot-padding)*.25)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--partbot-padding)*.25)*calc(1 - var(--tw-space-x-reverse)))}.vs\\:overflow-auto{overflow:auto}.vs\\:overflow-hidden{overflow:hidden}.vs\\:rounded-\\(--partbot-button-border-radius\\){border-radius:var(--partbot-button-border-radius)}.vs\\:rounded-\\[min\\(var\\(--partbot-button-border-radius\\)\\,0\\.89rem\\)\\]{border-radius:min(var(--partbot-button-border-radius),.89rem)}.vs\\:border-none{--tw-border-style:none;border-style:none}.vs\\:bg-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{background-color:rgb(var(--partbot-theme))}.vs\\:bg-stone-900{background-color:var(--vs-color-stone-900)}.vs\\:bg-transparent{background-color:#0000}.vs\\:bg-white{background-color:var(--vs-color-white)}.vs\\:p-\\(--partbot-padding\\){padding:var(--partbot-padding)}.vs\\:p-2{padding:calc(var(--vs-spacing)*2)}.vs\\:px-1\\.5{padding-inline:calc(var(--vs-spacing)*1.5)}.vs\\:px-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-inline:calc(var(--partbot-padding)*1.3)}.vs\\:py-\\(--partbot-padding\\){padding-block:var(--partbot-padding)}.vs\\:py-1{padding-block:calc(var(--vs-spacing)*1)}.vs\\:pr-\\(--partbot-padding\\){padding-right:var(--partbot-padding)}.vs\\:pr-2{padding-right:calc(var(--vs-spacing)*2)}.vs\\:pr-10{padding-right:calc(var(--vs-spacing)*10)}.vs\\:pr-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-right:calc(var(--partbot-padding)*1.3)}.vs\\:pb-4{padding-bottom:calc(var(--vs-spacing)*4)}.vs\\:pl-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-left:calc(var(--partbot-padding)*1.3)}.vs\\:text-center{text-align:center}.vs\\:text-left{text-align:left}.vs\\:font-\\(family-name\\:--partbot-font-family\\){font-family:var(--partbot-font-family)}.vs\\:font-sans{font-family:var(--vs-font-sans)}.vs\\:text-base{font-size:var(--vs-text-base);line-height:var(--tw-leading,var(--vs-text-base--line-height))}.vs\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}.vs\\:text-\\[10px\\]{font-size:10px}.vs\\:leading-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.5\\)\\]{--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5)}.vs\\:leading-none{--tw-leading:1;line-height:1}.vs\\:leading-normal{--tw-leading:var(--vs-leading-normal);line-height:var(--vs-leading-normal)}.vs\\:font-bold{--tw-font-weight:var(--vs-font-weight-bold);font-weight:var(--vs-font-weight-bold)}.vs\\:font-bold\\!{--tw-font-weight:var(--vs-font-weight-bold)!important;font-weight:var(--vs-font-weight-bold)!important}.vs\\:font-medium{--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium)}.vs\\:font-normal{--tw-font-weight:var(--vs-font-weight-normal);font-weight:var(--vs-font-weight-normal)}.vs\\:font-semibold{--tw-font-weight:var(--vs-font-weight-semibold);font-weight:var(--vs-font-weight-semibold)}.vs\\:whitespace-pre-wrap{white-space:pre-wrap}.vs\\:text-\\[rgb\\(var\\(--partbot-button-label-color\\)\\)\\]{color:rgb(var(--partbot-button-label-color))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{color:rgb(var(--partbot-theme))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]\\!{color:rgb(var(--partbot-theme))!important}.vs\\:text-black{color:var(--vs-color-black)}.vs\\:text-red-300{color:var(--vs-color-red-300)}.vs\\:text-red-300\\!{color:var(--vs-color-red-300)!important}.vs\\:text-stone-400{color:var(--vs-color-stone-400)}.vs\\:text-stone-900{color:var(--vs-color-stone-900)}.vs\\:text-white{color:var(--vs-color-white)}.vs\\:no-underline{text-decoration-line:none}.vs\\:opacity-0{opacity:0}.vs\\:opacity-75{opacity:.75}.vs\\:shadow-\\(--partbot-input-shadow\\){--tw-shadow:var(--partbot-input-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-stone-200{--tw-ring-color:var(--vs-color-stone-200)}.vs\\:transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.vs\\:outline-none{--tw-outline-style:none;outline-style:none}.vs\\:placeholder\\:text-stone-600::placeholder{color:var(--vs-color-stone-600)}@media (hover:hover){.vs\\:hover\\:border-none:hover{--tw-border-style:none;border-style:none}.vs\\:hover\\:bg-theme:hover{background-color:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>)}.vs\\:hover\\:text-button-label:hover{color:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}.vs\\:hover\\:text-red-500:hover{color:var(--vs-color-red-500)}.vs\\:hover\\:opacity-100:hover{opacity:1}.vs\\:hover\\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.vs\\:focus\\:border-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{border-color:rgb(var(--partbot-theme))}.vs\\:focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:focus\\:ring-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{--tw-ring-color:rgb(var(--partbot-theme))}.vs\\:focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.vs\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.vs\\:disabled\\:text-stone-400\\!:disabled{color:var(--vs-color-stone-400)!important}.vs\\:disabled\\:opacity-100\\!:disabled{opacity:1!important}.vs\\:disabled\\:placeholder\\:text-stone-400:disabled::placeholder{color:var(--vs-color-stone-400)}@media (min-width:40rem){.vs\\:sm\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}}@media (min-width:48rem){.vs\\:md\\:col-span-3{grid-column:span 3/span 3}.vs\\:md\\:mt-3{margin-top:calc(var(--vs-spacing)*3)}.vs\\:md\\:hidden{display:none}.vs\\:md\\:hidden\\!{display:none!important}.vs\\:md\\:max-w-\\[400px\\]{max-width:400px}.vs\\:md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:md\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:md\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:md\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:md\\:items-end{align-items:flex-end}.vs\\:md\\:justify-center{justify-content:center}.vs\\:md\\:justify-end{justify-content:flex-end}.vs\\:md\\:gap-5{gap:calc(var(--vs-spacing)*5)}.vs\\:md\\:pr-1\\.5{padding-right:calc(var(--vs-spacing)*1.5)}}@media (min-width:64rem){.vs\\:lg\\:col-span-1{grid-column:span 1/span 1}.vs\\:lg\\:mx-auto{margin-inline:auto}.vs\\:lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:lg\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.vehicle-search-btn{cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:relative!important}:where(.vehicle-search-btn>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--vs-spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--vs-spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}.vehicle-search-btn{border-radius:var(--partbot-button-border-radius);border-style:var(--tw-border-style);background-color:rgb(var(--partbot-button-color));padding-inline:var(--partbot-padding);padding-block:var(--partbot-padding);font-family:var(--partbot-font-family);font-size:var(--partbot-font-size);--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5);--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium);white-space:nowrap;color:rgb(var(--partbot-button-label-color));--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));border-width:1px;border-color:#0000;text-decoration-line:none}@media (hover:hover){.vehicle-search-btn:hover{background-color:rgb(var(--partbot-button-hover-color));color:rgb(var(--partbot-button-hover-label-color))}}.vehicle-search-btn:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:rgb(var(--partbot-theme));--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}.vehicle-search-btn:disabled{pointer-events:none;opacity:.5}.vehicle-search-btn>*{pointer-events:none}.partbot-input-border{border-width:var(--partbot-input-border-width);border-color:rgb(var(--partbot-input-border-color));border-style:solid}}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}`;
14
- function $t({ className: b }) {
14
+ function St({ className: b }) {
15
15
  return /* @__PURE__ */ a("span", { className: b, children: /* @__PURE__ */ a(
16
16
  "svg",
17
17
  {
@@ -118,21 +118,21 @@ function X({
118
118
  items: v,
119
119
  selected: p,
120
120
  refine: U,
121
- showPopular: L,
121
+ showPopular: I,
122
122
  bgDark: R,
123
- sortOptions: N = !0,
123
+ sortOptions: P = !0,
124
124
  showLabel: O = !1,
125
125
  isMobile: _ = !1,
126
126
  loading: V = !1,
127
127
  shouldBeActive: T = !1
128
128
  // True when parent fields are selected and this field tried to load
129
129
  }) {
130
- const [re, u] = M(""), [y, C] = M(p || null), H = (s) => {
130
+ const [re, u] = M(""), [y, C] = M(p || null), q = (s) => {
131
131
  C(s), u(""), !(s && s.value === (p == null ? void 0 : p.value)) && U(s);
132
132
  }, ee = (s) => {
133
133
  s.preventDefault(), s.stopPropagation(), u(""), C(null), U("");
134
134
  };
135
- I(() => {
135
+ B(() => {
136
136
  u(""), C(p || null);
137
137
  }, [p, v]);
138
138
  let G = /* @__PURE__ */ new Set(), f = [];
@@ -146,7 +146,7 @@ function X({
146
146
  });
147
147
  }), f.length === 0 && (f = v));
148
148
  const D = f.filter((s) => s.popularity > 0).slice(0, 11);
149
- N && (f = f.filter(
149
+ P && (f = f.filter(
150
150
  (s) => !D.includes(s)
151
151
  ), f.sort(
152
152
  (s, F) => s.value.localeCompare(F.value, "en", { numeric: !0 })
@@ -168,7 +168,7 @@ function X({
168
168
  const F = f.find(
169
169
  (z) => z.value.toString() === s.target.value.toString()
170
170
  );
171
- F && H(F);
171
+ F && q(F);
172
172
  },
173
173
  className: "vehicle-search-select vs:relative vs:w-full vs:cursor-default vs:overflow-hidden vs:rounded-(--partbot-button-border-radius) partbot-input-border vs:bg-white vs:py-(--partbot-padding) vs:pl-[calc(var(--partbot-padding)*1.3)] vs:pr-10 vs:text-left vs:shadow-(--partbot-input-shadow) vs:focus:border-[rgb(var(--partbot-theme))] vs:focus:outline-none vs:focus:ring-1 vs:focus:ring-[rgb(var(--partbot-theme))] vs:disabled:opacity-100! vs:disabled:text-stone-400! vs:sm:text-(length:--partbot-font-size) vs:font-(family-name:--partbot-font-family) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)]",
174
174
  tabIndex: -1,
@@ -213,7 +213,7 @@ function X({
213
213
  gt,
214
214
  {
215
215
  value: y || null,
216
- onChange: H,
216
+ onChange: q,
217
217
  virtual: { options: f },
218
218
  disabled: g,
219
219
  immediate: !0,
@@ -328,23 +328,23 @@ function X({
328
328
  )
329
329
  ] });
330
330
  }
331
- const St = "3.0.16";
331
+ const $t = "3.0.17";
332
332
  console.info(
333
- `Vehicle Search v${St} powered by Partbot https://mmyvs.partbot.io`
333
+ `Vehicle Search v${$t} powered by Partbot https://mmyvs.partbot.io`
334
334
  );
335
- function ze(b = [], v = []) {
335
+ function Se(b = [], v = []) {
336
336
  const p = [];
337
337
  return b.forEach((U) => {
338
- const [L, ...R] = U.split(":"), N = R.join(":");
339
- if (N.includes(" > ")) {
340
- const O = N.split(" > "), _ = O[O.length - 1].trim();
341
- if (L !== "make" && O.length >= 2) {
338
+ const [I, ...R] = U.split(":"), P = R.join(":");
339
+ if (P.includes(" > ")) {
340
+ const O = P.split(" > "), _ = O[O.length - 1].trim();
341
+ if (I !== "make" && O.length >= 2) {
342
342
  const V = O[0].trim();
343
343
  p.push(`make = "${V}"`);
344
344
  }
345
- p.push(`${L} = "${_}"`);
345
+ p.push(`${I} = "${_}"`);
346
346
  } else
347
- p.push(`${L} = "${N}"`);
347
+ p.push(`${I} = "${P}"`);
348
348
  }), v.forEach((U) => {
349
349
  p.push(U);
350
350
  }), p.length > 0 ? p.join(" AND ") : null;
@@ -354,9 +354,9 @@ function Mt({
354
354
  makes: v = "",
355
355
  models: p = "",
356
356
  callbackUrl: U = "",
357
- layout: L = "row",
357
+ layout: I = "row",
358
358
  fields: R,
359
- fieldPrefix: N = "",
359
+ fieldPrefix: P = "",
360
360
  showBranding: O = !0,
361
361
  showLabels: _ = !1,
362
362
  mobileFullWidthButton: V = !0,
@@ -365,7 +365,7 @@ function Mt({
365
365
  onChange: u,
366
366
  buttonLabel: y = "Search",
367
367
  showButton: C = !0,
368
- onSubmit: H,
368
+ onSubmit: q,
369
369
  store: ee,
370
370
  useStoreVehicles: G = !0,
371
371
  fieldOrder: f = "MMY",
@@ -377,7 +377,7 @@ function Mt({
377
377
  mobileButtonLabel: s = "Select Vehicle"
378
378
  // Label for mobile drawer trigger button
379
379
  }) {
380
- const F = Z(null), z = Z(null), ie = Z(null), $ = Z(null), q = Z(null), E = Z(null), K = Z(null), w = Z(null), Q = Z(null), B = Z(!1), x = f === "YMM", [le, ve] = M([]), [fe, ce] = M([]), [de, he] = M([]), [Ie, ge] = M([]), [Le, be] = M([]), [Ve, we] = M([]), [De, ye] = M([]), [Fe, xe] = M([]), Je = Z([]), [se, Se] = M([]), [e, W] = M({
380
+ const F = Z(null), z = Z(null), ie = Z(null), S = Z(null), K = Z(null), E = Z(null), Q = Z(null), w = Z(null), W = Z(null), j = Z(!1), x = f === "YMM", [le, ve] = M([]), [fe, ce] = M([]), [de, he] = M([]), [Le, ge] = M([]), [Ie, be] = M([]), [Ve, we] = M([]), [De, ye] = M([]), [Fe, xe] = M([]), Je = Z([]), [se, ke] = M([]), [e, Y] = M({
381
381
  make: null,
382
382
  model: null,
383
383
  year: null,
@@ -392,13 +392,13 @@ function Mt({
392
392
  "variant",
393
393
  "engine",
394
394
  "engine_capacity"
395
- ]), ke = Z(
395
+ ]), Ce = Z(
396
396
  R && R.length && Ue.current ? R.split(",").filter((t) => {
397
397
  var r;
398
398
  return (r = Ue.current) == null ? void 0 : r.includes(t);
399
399
  }) : null
400
400
  ), [J, Ge] = M(!1);
401
- I(() => {
401
+ B(() => {
402
402
  const t = navigator.userAgent;
403
403
  Ge(
404
404
  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
@@ -412,7 +412,7 @@ function Mt({
412
412
  disable_session_recording: !1
413
413
  });
414
414
  }, []);
415
- const [oe, et] = M({}), [Nt, tt] = M(""), Re = j(async () => {
415
+ const [oe, et] = M({}), [Nt, tt] = M(""), Re = N(async () => {
416
416
  if (!b)
417
417
  return;
418
418
  const r = `${D ? "https://api.cartbot.io" : "https://api.partbot.io"}/v1/vehicles/auth`;
@@ -439,7 +439,7 @@ function Mt({
439
439
  vehicle_models: n,
440
440
  meilisearch_search_key: c,
441
441
  meilisearch_index_name: d,
442
- algolia_search_key: S,
442
+ algolia_search_key: $,
443
443
  // Fallback for backward compatibility
444
444
  algolia_index_name: te,
445
445
  // Fallback for backward compatibility
@@ -452,7 +452,7 @@ function Mt({
452
452
  z.current = o, ie.current = (l || []).map((m) => ({
453
453
  ...m,
454
454
  refinement: m.value
455
- })), G && n ? typeof n == "object" && !Array.isArray(n) ? $.current = n : Array.isArray(n) ? $.current = n.map((m) => m && m.value ? String(m.value).trim() : "").filter(Boolean) : $.current = [] : $.current = [], q.current = Array.isArray(ae) ? ae.map((m) => String(m).trim().toUpperCase()) : null, E.current = h || null, et({
455
+ })), G && n ? typeof n == "object" && !Array.isArray(n) ? S.current = n : Array.isArray(n) ? S.current = n.map((m) => m && m.value ? String(m.value).trim() : "").filter(Boolean) : S.current = [] : S.current = [], K.current = Array.isArray(ae) ? ae.map((m) => String(m).trim().toUpperCase()) : null, E.current = h || null, et({
456
456
  searchKey: "eeace38b64f52bf56ebb4fe8bd5837b3cd6c0ff9d7e272f76449d94b80cba86b",
457
457
  indexName: "otto_v1_vehicles_production"
458
458
  });
@@ -460,30 +460,30 @@ function Mt({
460
460
  console.error("[VehicleSearch] Auth failed:", i), tt(i);
461
461
  }
462
462
  }, [b, ee, G, D]);
463
- I(() => {
463
+ B(() => {
464
464
  Re();
465
- }, [Re]), I(() => {
465
+ }, [Re]), B(() => {
466
466
  if (oe.searchKey) {
467
467
  try {
468
- K.current = new Qe({
468
+ Q.current = new Qe({
469
469
  host: "https://search.partbot.io",
470
470
  apiKey: oe.searchKey
471
- }), w.current = K.current.index(oe.indexName);
471
+ }), w.current = Q.current.index(oe.indexName);
472
472
  const t = new Qe({
473
473
  host: "https://partbot-meilisearch-cache.partbot.workers.dev",
474
474
  // Cloudflare Worker endpoint
475
475
  apiKey: oe.searchKey
476
476
  });
477
- Q.current = t.index("otto_v1_vehicle_mmy");
477
+ W.current = t.index("otto_v1_vehicle_mmy");
478
478
  } catch (t) {
479
479
  console.error("[VehicleSearch] Failed to initialize Meilisearch:", t);
480
480
  }
481
481
  return () => {
482
- K.current = null;
482
+ Q.current = null;
483
483
  };
484
484
  }
485
485
  }, [oe.searchKey, b]);
486
- const [Y, rt] = M(!1), Oe = j(() => {
486
+ const [H, rt] = M(!1), Oe = N(() => {
487
487
  function t(n) {
488
488
  if (!n) return "rgba(0,0,0,1)";
489
489
  var c = r(), d = window.getComputedStyle(n).backgroundColor;
@@ -501,7 +501,7 @@ function Mt({
501
501
  const l = _t(o).isDark();
502
502
  rt(l);
503
503
  }, []);
504
- I(() => {
504
+ B(() => {
505
505
  async function t() {
506
506
  if (!e.make || !w.current)
507
507
  return;
@@ -517,15 +517,15 @@ function Mt({
517
517
  `engine_capacity:${e.engine_capacity.refinement}`
518
518
  );
519
519
  let l = (await w.current.search("", {
520
- filter: ze(r, i),
520
+ filter: Se(r, i),
521
521
  attributesToRetrieve: ["otto_id"],
522
522
  limit: 500
523
523
  // Reduced from 1000 for faster queries
524
524
  })).hits.map((d) => d.otto_id);
525
- Se(l);
525
+ ke(l);
526
526
  let c = {
527
527
  ...Object.fromEntries(
528
- Object.entries(e || {}).map(([d, S]) => [d, S && S.value || null]).filter(([d, S]) => S !== null)
528
+ Object.entries(e || {}).map(([d, $]) => [d, $ && $.value || null]).filter(([d, $]) => $ !== null)
529
529
  ),
530
530
  merchant: z.current
531
531
  };
@@ -533,7 +533,7 @@ function Mt({
533
533
  }
534
534
  t();
535
535
  }, [e, w, g]);
536
- const Ae = (t) => N ? `${N}${t}` : t, ot = (t) => N ? t.replace(new RegExp(`^${N}`), "") : t, at = j(() => {
536
+ const Ae = (t) => P ? `${P}${t}` : t, ot = (t) => P ? t.replace(new RegExp(`^${P}`), "") : t, at = N(() => {
537
537
  const t = new URL(window.location.href).searchParams, r = [
538
538
  "make",
539
539
  "model",
@@ -545,8 +545,8 @@ function Mt({
545
545
  ].map(Ae), i = Object.fromEntries(
546
546
  [...t.entries()].filter(([o]) => r.includes(o)).map(([o, l]) => [ot(o), { value: l, refinement: l }])
547
547
  );
548
- W(i);
549
- }, []), P = j(({ query: t, value: r, remove: i }) => {
548
+ Y(i);
549
+ }, []), L = N(({ query: t, value: r, remove: i }) => {
550
550
  if (re && "URLSearchParams" in window) {
551
551
  let o = new URLSearchParams(window.location.search);
552
552
  t = Ae(t), t && r && o.set(t, r), t && !r && o.delete(t), i && i.forEach((n) => {
@@ -555,33 +555,35 @@ function Mt({
555
555
  const l = window.location.pathname + "?" + o.toString();
556
556
  window.history.pushState(null, "", l);
557
557
  }
558
- }, []), nt = j(() => {
558
+ }, []), nt = N(() => {
559
559
  var i;
560
560
  const t = {
561
561
  vehicle_ids: se,
562
562
  vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
563
563
  };
564
- H && H(t);
564
+ q && q(t);
565
565
  const r = new CustomEvent("vehicle-search-submit", {
566
566
  detail: t
567
567
  });
568
568
  document.dispatchEvent(r), setTimeout(() => {
569
569
  Me(!1);
570
570
  }, 900);
571
- }, [se, H]), Te = j(() => {
572
- var i, o, l, n, c, d, S, te, pe;
571
+ }, [se, q]), Te = N(() => {
572
+ var i, o, l, n, c, d, $, te, pe;
573
573
  const t = {
574
574
  vehicle_ids: se,
575
- vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
575
+ vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {},
576
+ userSelected: j.current
577
+ // Flag to indicate if user actively selected
576
578
  };
577
579
  u && u(t);
578
580
  const r = new CustomEvent("vehicle-search-change", {
579
581
  detail: t
580
582
  });
581
- if (B.current === !0) {
583
+ if (j.current === !0) {
582
584
  localStorage.removeItem("partbot_plate_details");
583
585
  const ae = JSON.stringify({
584
- description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((n = e.year) == null ? void 0 : n.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((d = e.series) == null ? void 0 : d.value) || ""} ${((S = e.variant) == null ? void 0 : S.value) || ""} ${((te = e.engine) == null ? void 0 : te.value) || ""} ${((pe = e.engine_capacity) == null ? void 0 : pe.value) || ""}`.trim(),
586
+ description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((n = e.year) == null ? void 0 : n.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((d = e.series) == null ? void 0 : d.value) || ""} ${(($ = e.variant) == null ? void 0 : $.value) || ""} ${((te = e.engine) == null ? void 0 : te.value) || ""} ${((pe = e.engine_capacity) == null ? void 0 : pe.value) || ""}`.trim(),
585
587
  vehicle_ids: se,
586
588
  vehicle: e ? Object.entries(e).reduce((h, [m, k]) => (h[m] = k != null && k.value ? k.value : {}, h), {}) : {}
587
589
  });
@@ -595,17 +597,36 @@ function Mt({
595
597
  document.dispatchEvent(r), Je.current = se, setTimeout(() => {
596
598
  Me(!1);
597
599
  }, 900);
598
- }, [se, u]), Ce = ut(
600
+ }, [se, u]), _e = ut(
599
601
  () => Ct(Te, 100),
600
602
  [Te]
601
603
  );
602
- I(() => {
603
- Ce();
604
- }, [se, Ce]), I(() => () => {
605
- Ce.cancel();
606
- }, [Ce]), I(() => {
604
+ B(() => {
605
+ _e();
606
+ }, [se, _e]), B(() => () => {
607
+ _e.cancel();
608
+ }, [_e]), B(() => {
609
+ const t = () => {
610
+ Y({
611
+ make: null,
612
+ model: null,
613
+ year: null,
614
+ body: null,
615
+ series: null,
616
+ variant: null,
617
+ engine: null,
618
+ engine_capacity: null
619
+ }), ke([]);
620
+ };
621
+ return document.addEventListener("plate-search-change", t), () => {
622
+ document.removeEventListener(
623
+ "plate-search-change",
624
+ t
625
+ );
626
+ };
627
+ }, []), B(() => {
607
628
  oe.searchKey && (x || pt(), at());
608
- }, [oe.searchKey, x]), I(() => {
629
+ }, [oe.searchKey, x]), B(() => {
609
630
  x && w.current && de.length === 0 && !e.year && w.current.search("", {
610
631
  attributesToRetrieve: ["year_from", "year_to"],
611
632
  limit: 1e4
@@ -618,15 +639,15 @@ function Mt({
618
639
  }).catch((t) => {
619
640
  console.error("[VehicleSearch] Error loading year range:", t);
620
641
  });
621
- }, [x, oe.searchKey, de.length, e.year]), I(() => {
642
+ }, [x, oe.searchKey, de.length, e.year]), B(() => {
622
643
  typeof document > "u" || Oe();
623
644
  }, [Oe]);
624
- const Ze = j(
645
+ const Ze = N(
625
646
  (t) => {
626
- B.current = !0, ce([]), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), W((r) => ({
647
+ j.current = !0, ce([]), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), Y((r) => ({
627
648
  make: t,
628
649
  year: x || g ? r.year : null
629
- })), P({
650
+ })), L({
630
651
  query: "make",
631
652
  value: (t == null ? void 0 : t.value) ?? "",
632
653
  remove: x ? ["model", "body", "series", "engine", "variant", "engine_capacity"] : g ? [
@@ -645,12 +666,12 @@ function Mt({
645
666
  "variant",
646
667
  "engine_capacity"
647
668
  ]
648
- }), t || Se([]);
669
+ }), t || ke([]);
649
670
  },
650
- [P, x, g]
651
- ), Ye = j(
671
+ [L, x, g]
672
+ ), Ye = N(
652
673
  (t) => {
653
- B.current = !0, W((r) => ({
674
+ j.current = !0, Y((r) => ({
654
675
  ...r,
655
676
  model: t !== "" ? t : null,
656
677
  year: x || g ? r.year : null,
@@ -660,7 +681,7 @@ function Mt({
660
681
  variant: null,
661
682
  engine: null,
662
683
  engine_capacity: null
663
- })), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), P({
684
+ })), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), L({
664
685
  query: "model",
665
686
  value: (t == null ? void 0 : t.value) ?? "",
666
687
  remove: x ? ["body", "series", "engine", "variant", "engine_capacity"] : g ? ["body", "series", "engine", "variant", "engine_capacity"] : [
@@ -673,12 +694,12 @@ function Mt({
673
694
  ]
674
695
  });
675
696
  },
676
- [P, x, g]
677
- ), He = j(
697
+ [L, x, g]
698
+ ), He = N(
678
699
  (t) => {
679
- B.current = !0, x ? (ve([]), ce([]), W({
700
+ j.current = !0, x ? (ve([]), ce([]), Y({
680
701
  year: t !== "" ? t : null
681
- }), (!t || t === "") && he([])) : W(g ? (r) => ({
702
+ }), (!t || t === "") && he([])) : Y(g ? (r) => ({
682
703
  ...r,
683
704
  year: t !== "" ? t : null
684
705
  }) : (r) => ({
@@ -689,7 +710,7 @@ function Mt({
689
710
  variant: null,
690
711
  engine: null,
691
712
  engine_capacity: null
692
- })), g || (ge([]), be([]), we([]), xe([]), ye([])), P({
713
+ })), g || (ge([]), be([]), we([]), xe([]), ye([])), L({
693
714
  query: "year",
694
715
  value: (t == null ? void 0 : t.value) ?? "",
695
716
  remove: x ? [
@@ -701,66 +722,66 @@ function Mt({
701
722
  "engine",
702
723
  "engine_capacity"
703
724
  ] : g ? [] : ["body", "series", "variant", "engine", "engine_capacity"]
704
- }), !g && (!t || t === "") && Se([]);
725
+ }), !g && (!t || t === "") && ke([]);
705
726
  },
706
- [P, x, g]
707
- ), it = j(
727
+ [L, x, g]
728
+ ), it = N(
708
729
  (t) => {
709
- B.current = !0, W((r) => ({
730
+ j.current = !0, Y((r) => ({
710
731
  ...r,
711
732
  body: t !== "" ? t : null
712
- })), P({
733
+ })), L({
713
734
  query: "body",
714
735
  value: (t == null ? void 0 : t.value) ?? ""
715
736
  });
716
737
  },
717
- [P]
718
- ), st = j(
738
+ [L]
739
+ ), st = N(
719
740
  (t) => {
720
- B.current = !0, W((r) => ({
741
+ j.current = !0, Y((r) => ({
721
742
  ...r,
722
743
  series: t !== "" ? t : null
723
- })), P({
744
+ })), L({
724
745
  query: "series",
725
746
  value: (t == null ? void 0 : t.value) ?? ""
726
747
  });
727
748
  },
728
- [P]
729
- ), lt = j(
749
+ [L]
750
+ ), lt = N(
730
751
  (t) => {
731
- B.current = !0, W((r) => ({
752
+ j.current = !0, Y((r) => ({
732
753
  ...r,
733
754
  variant: t !== "" ? t : null
734
- })), P({
755
+ })), L({
735
756
  query: "variant",
736
757
  value: (t == null ? void 0 : t.value) ?? ""
737
758
  });
738
759
  },
739
- [P]
740
- ), ct = j(
760
+ [L]
761
+ ), ct = N(
741
762
  (t) => {
742
- B.current = !0, W((r) => ({
763
+ j.current = !0, Y((r) => ({
743
764
  ...r,
744
765
  engine: t !== "" ? t : null
745
- })), P({
766
+ })), L({
746
767
  query: "engine",
747
768
  value: (t == null ? void 0 : t.value) ?? ""
748
769
  });
749
770
  },
750
- [P]
751
- ), dt = j(
771
+ [L]
772
+ ), dt = N(
752
773
  (t) => {
753
- B.current = !0, W((r) => ({
774
+ j.current = !0, Y((r) => ({
754
775
  ...r,
755
776
  engine_capacity: t !== "" ? t : null
756
- })), P({
777
+ })), L({
757
778
  query: "engine_capacity",
758
779
  value: (t == null ? void 0 : t.value) ?? ""
759
780
  });
760
781
  },
761
- [P]
782
+ [L]
762
783
  );
763
- I(() => {
784
+ B(() => {
764
785
  x && e.year && w.current && (async () => {
765
786
  try {
766
787
  const r = await w.current.search("", {
@@ -776,10 +797,10 @@ function Mt({
776
797
  });
777
798
  });
778
799
  let o = Array.from(i.values());
779
- const l = new Set(q.current || []);
800
+ const l = new Set(K.current || []);
780
801
  l.size > 0 ? o.sort((n, c) => {
781
- const d = l.has(n.value), S = l.has(c.value);
782
- return d && !S ? -1 : !d && S ? 1 : d && S ? q.current.indexOf(n.value) - q.current.indexOf(c.value) : n.value.localeCompare(c.value);
802
+ const d = l.has(n.value), $ = l.has(c.value);
803
+ return d && !$ ? -1 : !d && $ ? 1 : d && $ ? K.current.indexOf(n.value) - K.current.indexOf(c.value) : n.value.localeCompare(c.value);
783
804
  }) : o.sort(
784
805
  (n, c) => c.popularity === n.popularity ? n.value.localeCompare(c.value) : c.popularity - n.popularity
785
806
  ), ve(o);
@@ -788,7 +809,7 @@ function Mt({
788
809
  }
789
810
  })();
790
811
  }, [x, e.year]);
791
- const pt = j(() => {
812
+ const pt = N(() => {
792
813
  (async () => {
793
814
  let r = [];
794
815
  if (ie.current && ie.current.length)
@@ -815,23 +836,23 @@ function Mt({
815
836
  (o) => i.includes(o.value)
816
837
  );
817
838
  }
818
- if (q.current && q.current.length > 0) {
819
- const i = new Set(q.current);
839
+ if (K.current && K.current.length > 0) {
840
+ const i = new Set(K.current);
820
841
  r.sort((o, l) => {
821
842
  const n = i.has(o.value), c = i.has(l.value);
822
- return n && !c ? -1 : !n && c ? 1 : n && c ? q.current.indexOf(o.value) - q.current.indexOf(l.value) : o.value.localeCompare(l.value);
843
+ return n && !c ? -1 : !n && c ? 1 : n && c ? K.current.indexOf(o.value) - K.current.indexOf(l.value) : o.value.localeCompare(l.value);
823
844
  });
824
845
  } else
825
846
  r.sort((i, o) => i.popularity === o.popularity ? i.value.localeCompare(o.value) : o.popularity - i.popularity);
826
847
  ve(r);
827
848
  })();
828
849
  }, [v]);
829
- I(() => {
850
+ B(() => {
830
851
  var t;
831
852
  if (e.make && e.make.refinement) {
832
853
  const r = e.make.refinement;
833
- if (G && typeof $.current == "object" && !Array.isArray($.current) && $.current[r]) {
834
- const i = $.current[r].map(
854
+ if (G && typeof S.current == "object" && !Array.isArray(S.current) && S.current[r]) {
855
+ const i = S.current[r].map(
835
856
  (l) => ({
836
857
  value: l,
837
858
  refinement: l,
@@ -847,17 +868,17 @@ function Mt({
847
868
  ])
848
869
  );
849
870
  i.sort((n, c) => {
850
- const d = l.get(n.value.toUpperCase()) || 0, S = l.get(c.value.toUpperCase()) || 0;
851
- return d !== S ? S - d : n.value.localeCompare(c.value);
871
+ const d = l.get(n.value.toUpperCase()) || 0, $ = l.get(c.value.toUpperCase()) || 0;
872
+ return d !== $ ? $ - d : n.value.localeCompare(c.value);
852
873
  });
853
874
  } else
854
875
  i.sort((l, n) => l.value.localeCompare(n.value));
855
876
  ce(i);
856
877
  return;
857
878
  }
858
- if (!Q.current || !b)
879
+ if (!W.current || !b)
859
880
  return;
860
- Q.current.search("", {
881
+ W.current.search("", {
861
882
  filter: `make = "${e.make.refinement}"`,
862
883
  limit: 1
863
884
  // Only one document per make
@@ -870,7 +891,7 @@ function Mt({
870
891
  model: `${e.make.refinement} > ${h.name}`,
871
892
  model_popularity: h.popularity || 0
872
893
  })), c = [];
873
- Array.isArray($.current) ? c = $.current : typeof $.current == "object" && $.current !== null ? c = $.current[e.make.refinement] || [] : typeof $.current == "string" && $.current.length && (c = $.current.split(",").map((h) => h.trim()).filter(Boolean));
894
+ Array.isArray(S.current) ? c = S.current : typeof S.current == "object" && S.current !== null ? c = S.current[e.make.refinement] || [] : typeof S.current == "string" && S.current.length && (c = S.current.split(",").map((h) => h.trim()).filter(Boolean));
874
895
  let d = c;
875
896
  if (p) {
876
897
  const h = p.trim().split(",").map((k) => k.trim()).filter(Boolean), m = new Set(
@@ -903,7 +924,7 @@ function Mt({
903
924
  refinement: h.model.match(/[^>]*$/)[0].trim(),
904
925
  popularity: h.model_popularity
905
926
  }));
906
- const S = (pe = e.make) == null ? void 0 : pe.refinement, te = (ae = E.current) == null ? void 0 : ae[S];
927
+ const $ = (pe = e.make) == null ? void 0 : pe.refinement, te = (ae = E.current) == null ? void 0 : ae[$];
907
928
  if (te && Array.isArray(te) && te.length > 0) {
908
929
  const h = new Set(
909
930
  te.map((m) => String(m).trim().toUpperCase())
@@ -935,7 +956,7 @@ function Mt({
935
956
  x,
936
957
  e.year,
937
958
  G
938
- ]), I(() => {
959
+ ]), B(() => {
939
960
  if (w.current && e.make && e.model) {
940
961
  let t = [
941
962
  `model:${e.make.refinement} > ${e.model.refinement}`
@@ -945,7 +966,7 @@ function Mt({
945
966
  ), e.series && t.push(`series:${e.series.refinement}`), e.engine && t.push(`engine:${e.engine.refinement}`), e.engine_capacity && t.push(
946
967
  `engine_capacity:${e.engine_capacity.refinement}`
947
968
  )), w.current.search("", {
948
- filter: ze(t, []),
969
+ filter: Se(t, []),
949
970
  attributesToRetrieve: ["year_from", "year_to", "otto_id"],
950
971
  limit: 200
951
972
  // Reduced from 1000 for faster queries
@@ -953,8 +974,8 @@ function Mt({
953
974
  const i = r.map((d) => d.year_from), o = Math.min(...i), l = r.map((d) => d.year_to), n = Math.max(...l);
954
975
  let c = Array.apply(null, {
955
976
  length: n + 1 - o
956
- }).map(function(d, S) {
957
- return S + o;
977
+ }).map(function(d, $) {
978
+ return $ + o;
958
979
  });
959
980
  c = c.reverse().map((d) => ({ value: d, refinement: d })), he(c);
960
981
  }).catch((r) => {
@@ -970,7 +991,7 @@ function Mt({
970
991
  e.series,
971
992
  e.engine,
972
993
  e.engine_capacity
973
- ]), I(() => {
994
+ ]), B(() => {
974
995
  const t = g ? e.make && e.model : e.year && e.make && e.model;
975
996
  if (w.current && t) {
976
997
  const r = e.year ? [
@@ -978,7 +999,7 @@ function Mt({
978
999
  `year_to >= ${e.year.value}`
979
1000
  ] : [];
980
1001
  w.current.search("", {
981
- filter: ze(
1002
+ filter: Se(
982
1003
  [`model:${e.make.refinement} > ${e.model.refinement}`],
983
1004
  r
984
1005
  ),
@@ -992,7 +1013,7 @@ function Mt({
992
1013
  });
993
1014
  }
994
1015
  }, [e.year, e.make, e.model, g]);
995
- const ue = j(({ hits: t, attribute: r, stateCallback: i }) => {
1016
+ const ue = N(({ hits: t, attribute: r, stateCallback: i }) => {
996
1017
  let o = [
997
1018
  ...new Map(t.map((l) => [l[r], l])).values()
998
1019
  ].map((l) => ({
@@ -1000,11 +1021,11 @@ function Mt({
1000
1021
  refinement: l[r].match(/[^|]*$/)[0].trim()
1001
1022
  })).filter((l) => l.refinement);
1002
1023
  i(o);
1003
- }, []), vt = j(() => {
1004
- const t = ke.current ? ke.current.length + 3 : 3, r = C ? t + 1 : t;
1024
+ }, []), vt = N(() => {
1025
+ const t = Ce.current ? Ce.current.length + 3 : 3, r = C ? t + 1 : t;
1005
1026
  return `vs:lg:grid-cols-${r > 8 ? 8 : r}`;
1006
1027
  }, [C]);
1007
- I(() => {
1028
+ B(() => {
1008
1029
  const t = g ? e.make && e.model : e.make && e.model && e.year;
1009
1030
  if (w.current && t) {
1010
1031
  let r = [
@@ -1021,7 +1042,7 @@ function Mt({
1021
1042
  `year_to >= ${e.year.value}`
1022
1043
  ] : [];
1023
1044
  w.current.search("", {
1024
- filter: ze(r, i),
1045
+ filter: Se(r, i),
1025
1046
  attributesToRetrieve: [
1026
1047
  "series",
1027
1048
  "engine_capacity",
@@ -1063,13 +1084,13 @@ function Mt({
1063
1084
  e.year,
1064
1085
  g
1065
1086
  ]);
1066
- const [_e, Ee] = M(!1);
1067
- return I(() => {
1087
+ const [ze, Ee] = M(!1);
1088
+ return B(() => {
1068
1089
  if (T)
1069
- return _e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1090
+ return ze ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1070
1091
  document.body.style.overflow = "";
1071
1092
  };
1072
- }, [_e, T]), /* @__PURE__ */ A($e, { children: [
1093
+ }, [ze, T]), /* @__PURE__ */ A($e, { children: [
1073
1094
  T && /* @__PURE__ */ a(
1074
1095
  "button",
1075
1096
  {
@@ -1088,7 +1109,7 @@ function Mt({
1088
1109
  onClick: () => Ee(!1),
1089
1110
  className: ne(
1090
1111
  "vs:z-10 vs:fixed vs:inset-0 vs:bg-stone-900 vs:transition-all vs:duration-300",
1091
- _e ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
1112
+ ze ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
1092
1113
  )
1093
1114
  }
1094
1115
  ),
@@ -1097,7 +1118,7 @@ function Mt({
1097
1118
  {
1098
1119
  className: ne(
1099
1120
  "partbot-mmyvs-container",
1100
- T && _e && "active",
1121
+ T && ze && "active",
1101
1122
  "w-full"
1102
1123
  ),
1103
1124
  children: [
@@ -1131,7 +1152,7 @@ function Mt({
1131
1152
  ref: F,
1132
1153
  className: ne(
1133
1154
  "vs:grid vs:gap-3",
1134
- L === "row" ? `${vt()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
1155
+ I === "row" ? `${vt()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
1135
1156
  "vs:w-full vs:transition vs:lg:mx-auto"
1136
1157
  ),
1137
1158
  children: [
@@ -1143,7 +1164,7 @@ function Mt({
1143
1164
  items: de,
1144
1165
  refine: He,
1145
1166
  selected: e.year,
1146
- bgDark: Y,
1167
+ bgDark: H,
1147
1168
  showLabel: _,
1148
1169
  isMobile: J,
1149
1170
  sortOptions: !1,
@@ -1159,7 +1180,7 @@ function Mt({
1159
1180
  refine: Ze,
1160
1181
  selected: e.make,
1161
1182
  showPopular: !0,
1162
- bgDark: Y,
1183
+ bgDark: H,
1163
1184
  showLabel: _,
1164
1185
  isMobile: J,
1165
1186
  sortOptions: !1,
@@ -1175,7 +1196,7 @@ function Mt({
1175
1196
  refine: Ye,
1176
1197
  selected: e.model,
1177
1198
  showPopular: !0,
1178
- bgDark: Y,
1199
+ bgDark: H,
1179
1200
  showLabel: _,
1180
1201
  isMobile: J,
1181
1202
  sortOptions: !1,
@@ -1192,7 +1213,7 @@ function Mt({
1192
1213
  refine: Ze,
1193
1214
  selected: e.make,
1194
1215
  showPopular: !0,
1195
- bgDark: Y,
1216
+ bgDark: H,
1196
1217
  showLabel: _,
1197
1218
  isMobile: J,
1198
1219
  sortOptions: !1,
@@ -1208,7 +1229,7 @@ function Mt({
1208
1229
  refine: Ye,
1209
1230
  selected: e.model,
1210
1231
  showPopular: !0,
1211
- bgDark: Y,
1232
+ bgDark: H,
1212
1233
  showLabel: _,
1213
1234
  isMobile: J,
1214
1235
  sortOptions: !1,
@@ -1223,7 +1244,7 @@ function Mt({
1223
1244
  items: de,
1224
1245
  refine: He,
1225
1246
  selected: e.year,
1226
- bgDark: Y,
1247
+ bgDark: H,
1227
1248
  showLabel: _,
1228
1249
  isMobile: J,
1229
1250
  sortOptions: !1,
@@ -1232,7 +1253,7 @@ function Mt({
1232
1253
  }
1233
1254
  )
1234
1255
  ] }),
1235
- ke.current && ke.current.map((t) => {
1256
+ Ce.current && Ce.current.map((t) => {
1236
1257
  let r = null;
1237
1258
  switch (t) {
1238
1259
  case "body":
@@ -1240,13 +1261,13 @@ function Mt({
1240
1261
  X,
1241
1262
  {
1242
1263
  label: "Body",
1243
- items: Ie,
1264
+ items: Le,
1244
1265
  refine: it,
1245
1266
  selected: e.body,
1246
- bgDark: Y,
1267
+ bgDark: H,
1247
1268
  showLabel: _,
1248
1269
  isMobile: J,
1249
- loading: !!(e.make && e.model && e.year) && Ie.length === 0,
1270
+ loading: !!(e.make && e.model && e.year) && Le.length === 0,
1250
1271
  shouldBeActive: !!(e.make && e.model && e.year)
1251
1272
  },
1252
1273
  "body"
@@ -1257,13 +1278,13 @@ function Mt({
1257
1278
  X,
1258
1279
  {
1259
1280
  label: "Series",
1260
- items: Le,
1281
+ items: Ie,
1261
1282
  refine: st,
1262
1283
  selected: e.series,
1263
- bgDark: Y,
1284
+ bgDark: H,
1264
1285
  showLabel: _,
1265
1286
  isMobile: J,
1266
- loading: !!(e.make && e.model && e.year) && Le.length === 0,
1287
+ loading: !!(e.make && e.model && e.year) && Ie.length === 0,
1267
1288
  shouldBeActive: !!(e.make && e.model && e.year)
1268
1289
  },
1269
1290
  "series"
@@ -1277,7 +1298,7 @@ function Mt({
1277
1298
  items: Ve,
1278
1299
  refine: lt,
1279
1300
  selected: e.variant,
1280
- bgDark: Y,
1301
+ bgDark: H,
1281
1302
  showLabel: _,
1282
1303
  isMobile: J,
1283
1304
  loading: !!(e.make && e.model && e.year) && Ve.length === 0,
@@ -1294,7 +1315,7 @@ function Mt({
1294
1315
  items: Fe,
1295
1316
  refine: dt,
1296
1317
  selected: e.engine_capacity,
1297
- bgDark: Y,
1318
+ bgDark: H,
1298
1319
  showLabel: _,
1299
1320
  isMobile: J,
1300
1321
  loading: !!(e.make && e.model && e.year) && Fe.length === 0,
@@ -1311,7 +1332,7 @@ function Mt({
1311
1332
  items: De,
1312
1333
  refine: ct,
1313
1334
  selected: e.engine,
1314
- bgDark: Y,
1335
+ bgDark: H,
1315
1336
  showLabel: _,
1316
1337
  isMobile: J,
1317
1338
  loading: !!(e.make && e.model && e.year) && De.length === 0,
@@ -1328,7 +1349,7 @@ function Mt({
1328
1349
  {
1329
1350
  className: "vehicle-search-btn",
1330
1351
  onClick: () => {
1331
- Me(!0), U && !H ? window.location.href = U + window.location.search : nt();
1352
+ Me(!0), U && !q ? window.location.href = U + window.location.search : nt();
1332
1353
  },
1333
1354
  children: [
1334
1355
  /* @__PURE__ */ a("span", { children: y }),
@@ -1344,7 +1365,7 @@ function Mt({
1344
1365
  {
1345
1366
  className: ne(
1346
1367
  "vs:flex vs:w-full vs:justify-center vs:items-center",
1347
- L === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
1368
+ I === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
1348
1369
  "vs:mt-4 vs:md:mt-3 vs:md:pr-1.5"
1349
1370
  ),
1350
1371
  children: /* @__PURE__ */ A(
@@ -1354,10 +1375,10 @@ function Mt({
1354
1375
  typeof window < "u" ? window.location.href.split("/")[2] : "unknown"}&utm_source=vehicle-select&utm_medium=referral&utm_campaign=powered-by`,
1355
1376
  target: "_blank",
1356
1377
  rel: "noreferrer",
1357
- className: `${Y ? "vs:text-white" : "vs:text-black"} vs:flex vs:items-center vs:space-x-1.5 vs:px-1.5 vs:text-center vs:leading-normal vs:text-[10px] vs:opacity-75 vs:transition vs:hover:opacity-100 vs:font-sans vs:no-underline vs:m-0 pb-1.5`,
1378
+ className: `${H ? "vs:text-white" : "vs:text-black"} vs:flex vs:items-center vs:space-x-1.5 vs:px-1.5 vs:text-center vs:leading-normal vs:text-[10px] vs:opacity-75 vs:transition vs:hover:opacity-100 vs:font-sans vs:no-underline vs:m-0 pb-1.5`,
1358
1379
  children: [
1359
1380
  /* @__PURE__ */ a("span", { children: "Powered by" }),
1360
- /* @__PURE__ */ a($t, { className: "vs:inline-flex vs:h-[13px]" })
1381
+ /* @__PURE__ */ a(St, { className: "vs:inline-flex vs:h-[13px]" })
1361
1382
  ]
1362
1383
  }
1363
1384
  )
@@ -1416,13 +1437,13 @@ function At(b) {
1416
1437
  return u === b ? v.activeElement : u;
1417
1438
  }
1418
1439
  });
1419
- const N = (re = Object.getOwnPropertyDescriptor(
1440
+ const P = (re = Object.getOwnPropertyDescriptor(
1420
1441
  Event.prototype,
1421
1442
  "target"
1422
1443
  )) == null ? void 0 : re.get;
1423
1444
  Object.defineProperty(Event.prototype, "target", {
1424
1445
  get: function() {
1425
- const u = N == null ? void 0 : N.call(this);
1446
+ const u = P == null ? void 0 : P.call(this);
1426
1447
  return u === b ? this.composedPath()[0] : u;
1427
1448
  }
1428
1449
  });
@@ -1460,71 +1481,71 @@ class jt extends HTMLElement {
1460
1481
  }
1461
1482
  let v = document.createElement("style");
1462
1483
  v.textContent = zt;
1463
- const p = document.createElement("div"), U = this.attachShadow({ mode: "open" }), L = (E, K, w) => {
1464
- let Q;
1465
- if (this.hasAttribute(K)) {
1466
- const B = this.getAttribute(K);
1467
- if (/^#[0-9A-F]{6}$/i.test(B)) {
1468
- const x = parseInt(B.slice(1, 3), 16), le = parseInt(B.slice(3, 5), 16), ve = parseInt(B.slice(5, 7), 16);
1469
- Q = `${x} ${le} ${ve}`;
1484
+ const p = document.createElement("div"), U = this.attachShadow({ mode: "open" }), I = (E, Q, w) => {
1485
+ let W;
1486
+ if (this.hasAttribute(Q)) {
1487
+ const j = this.getAttribute(Q);
1488
+ if (/^#[0-9A-F]{6}$/i.test(j)) {
1489
+ const x = parseInt(j.slice(1, 3), 16), le = parseInt(j.slice(3, 5), 16), ve = parseInt(j.slice(5, 7), 16);
1490
+ W = `${x} ${le} ${ve}`;
1470
1491
  }
1471
1492
  }
1472
- return Q = Q || w, `:host { --${E}: ${Q}; } .partbot-mmyvs-container { --${E}: ${Q}; }`;
1493
+ return W = W || w, `:host { --${E}: ${W}; } .partbot-mmyvs-container { --${E}: ${W}; }`;
1473
1494
  };
1474
- let R = L(
1495
+ let R = I(
1475
1496
  "partbot-theme",
1476
1497
  "data-button-color",
1477
1498
  "0 0 0"
1478
- ), N = L(
1499
+ ), P = I(
1479
1500
  "partbot-button-color",
1480
1501
  "data-button-color",
1481
1502
  "0 0 0"
1482
- ), O = L(
1503
+ ), O = I(
1483
1504
  "partbot-button-hover-color",
1484
1505
  "data-button-hover-color",
1485
1506
  "0 0 0"
1486
- ), _ = L(
1507
+ ), _ = I(
1487
1508
  "partbot-button-label-color",
1488
1509
  "data-button-label-color",
1489
1510
  "255 255 255"
1490
- ), V = L(
1511
+ ), V = I(
1491
1512
  "partbot-button-hover-label-color",
1492
1513
  "data-button-hover-label-color",
1493
1514
  "255 255 255"
1494
- ), T = L(
1515
+ ), T = I(
1495
1516
  "partbot-mobile-background-color",
1496
1517
  "data-mobile-background-color",
1497
1518
  "0 0 0"
1498
1519
  ), re = `:host { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; } .partbot-mmyvs-container { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; }`, u = `:host { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; } .partbot-mmyvs-container { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; }`, y = `:host { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; } .partbot-mmyvs-container { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; }`, C = `:host { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; } .partbot-mmyvs-container { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; }`;
1499
- const H = this.getAttribute("data-input-shadow"), ee = H === "none" ? "none" : H || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
1520
+ const q = this.getAttribute("data-input-shadow"), ee = q === "none" ? "none" : q || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
1500
1521
  let G = `:host { --partbot-input-shadow: ${ee}; } .partbot-mmyvs-container { --partbot-input-shadow: ${ee}; }`;
1501
1522
  const f = this.getAttribute("data-input-border-color");
1502
1523
  let D = "229 231 235";
1503
1524
  if (f)
1504
1525
  if (/^#[0-9A-F]{6}$/i.test(f)) {
1505
- const E = parseInt(f.slice(1, 3), 16), K = parseInt(f.slice(3, 5), 16), w = parseInt(f.slice(5, 7), 16);
1506
- D = `${E} ${K} ${w}`;
1526
+ const E = parseInt(f.slice(1, 3), 16), Q = parseInt(f.slice(3, 5), 16), w = parseInt(f.slice(5, 7), 16);
1527
+ D = `${E} ${Q} ${w}`;
1507
1528
  } else /^\d+\s+\d+\s+\d+$/.test(f) && (D = f);
1508
1529
  let g = `:host { --partbot-input-border-color: ${D}; } .partbot-mmyvs-container { --partbot-input-border-color: ${D}; }`;
1509
1530
  const s = this.getAttribute("data-input-border-width") || "1px";
1510
1531
  let F = `:host { --partbot-input-border-width: ${s}; } .partbot-mmyvs-container { --partbot-input-border-width: ${s}; }`;
1511
- v.textContent += R, v.textContent += N, v.textContent += O, v.textContent += _, v.textContent += V, v.textContent += T, v.textContent += re, v.textContent += u, v.textContent += y, v.textContent += C, v.textContent += G, v.textContent += g, v.textContent += F, U.appendChild(v), U.appendChild(p);
1532
+ v.textContent += R, v.textContent += P, v.textContent += O, v.textContent += _, v.textContent += V, v.textContent += T, v.textContent += re, v.textContent += u, v.textContent += y, v.textContent += C, v.textContent += G, v.textContent += g, v.textContent += F, U.appendChild(v), U.appendChild(p);
1512
1533
  const z = this.getAttribute("data-api-key");
1513
1534
  if (!z) {
1514
1535
  console.warn("Missing attributes: " + (z ? "" : "data-api-key "));
1515
1536
  return;
1516
1537
  }
1517
- const ie = this.attributes, $ = {};
1538
+ const ie = this.attributes, S = {};
1518
1539
  for (let E = 0; E < ie.length; E++) {
1519
- const { name: K, value: w } = ie[E];
1520
- if (K.startsWith("data-")) {
1521
- const Q = K.slice(5).replace(/-([a-z])/g, (B) => B[1].toUpperCase());
1522
- $[Q] = w === "true" ? !0 : w === "false" ? !1 : w;
1540
+ const { name: Q, value: w } = ie[E];
1541
+ if (Q.startsWith("data-")) {
1542
+ const W = Q.slice(5).replace(/-([a-z])/g, (j) => j[1].toUpperCase());
1543
+ S[W] = w === "true" ? !0 : w === "false" ? !1 : w;
1523
1544
  }
1524
1545
  }
1525
1546
  At(this);
1526
- const q = /* @__PURE__ */ a(Mt, { ...$ });
1527
- mt.render(q, p);
1547
+ const K = /* @__PURE__ */ a(Mt, { ...S });
1548
+ mt.render(K, p);
1528
1549
  }
1529
1550
  }
1530
1551
  customElements.define("vehicle-search", jt);