@cartbot/vehicle-search-beta 3.0.13 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/vehicle-search.es.js +646 -635
- package/dist/js/vehicle-search.js +17 -17
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as M, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Combobox as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { MeiliSearch as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const Ct = `@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
|
|
15
|
-
return /* @__PURE__ */ a("span", { className:
|
|
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";
|
|
3
|
+
import mt from "react-dom";
|
|
4
|
+
import ft from "js-cookie";
|
|
5
|
+
import { Combobox as gt, ComboboxInput as bt, ComboboxButton as wt, ComboboxOptions as yt, ComboboxOption as xt } from "@headlessui/react";
|
|
6
|
+
import kt from "fuzzysearch";
|
|
7
|
+
import Ke from "pluralize";
|
|
8
|
+
import ne from "clsx";
|
|
9
|
+
import { MeiliSearch as Qe } from "meilisearch";
|
|
10
|
+
import Ct from "lodash/debounce.js";
|
|
11
|
+
import _t from "tinycolor2";
|
|
12
|
+
import Be from "posthog-js";
|
|
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 }) {
|
|
15
|
+
return /* @__PURE__ */ a("span", { className: b, children: /* @__PURE__ */ a(
|
|
16
16
|
"svg",
|
|
17
17
|
{
|
|
18
18
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -23,7 +23,7 @@ function _t({ className: y }) {
|
|
|
23
23
|
width: "auto",
|
|
24
24
|
height: "100%"
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ A("g", { children: [
|
|
27
27
|
/* @__PURE__ */ a(
|
|
28
28
|
"rect",
|
|
29
29
|
{
|
|
@@ -99,11 +99,11 @@ function _t({ className: y }) {
|
|
|
99
99
|
}
|
|
100
100
|
) });
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Pe({ className: b = "" }) {
|
|
103
103
|
return /* @__PURE__ */ a(
|
|
104
104
|
"svg",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
106
|
+
className: b,
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
108
108
|
width: "32",
|
|
109
109
|
height: "32",
|
|
@@ -113,85 +113,85 @@ function je({ className: y = "" }) {
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
label:
|
|
116
|
+
function X({
|
|
117
|
+
label: b,
|
|
118
118
|
items: v,
|
|
119
|
-
selected:
|
|
120
|
-
refine:
|
|
121
|
-
showPopular:
|
|
122
|
-
bgDark:
|
|
123
|
-
sortOptions:
|
|
124
|
-
showLabel:
|
|
125
|
-
isMobile:
|
|
126
|
-
loading:
|
|
127
|
-
shouldBeActive:
|
|
119
|
+
selected: p,
|
|
120
|
+
refine: U,
|
|
121
|
+
showPopular: L,
|
|
122
|
+
bgDark: R,
|
|
123
|
+
sortOptions: N = !0,
|
|
124
|
+
showLabel: O = !1,
|
|
125
|
+
isMobile: _ = !1,
|
|
126
|
+
loading: V = !1,
|
|
127
|
+
shouldBeActive: T = !1
|
|
128
128
|
// True when parent fields are selected and this field tried to load
|
|
129
129
|
}) {
|
|
130
|
-
const [
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
|
|
130
|
+
const [re, u] = M(""), [y, C] = M(p || null), H = (s) => {
|
|
131
|
+
C(s), u(""), !(s && s.value === (p == null ? void 0 : p.value)) && U(s);
|
|
132
|
+
}, ee = (s) => {
|
|
133
|
+
s.preventDefault(), s.stopPropagation(), u(""), C(null), U("");
|
|
134
134
|
};
|
|
135
|
-
|
|
136
|
-
u(""),
|
|
137
|
-
}, [
|
|
138
|
-
let
|
|
139
|
-
v && (v.forEach((
|
|
140
|
-
String(
|
|
141
|
-
|
|
142
|
-
...
|
|
143
|
-
value:
|
|
144
|
-
refinement:
|
|
135
|
+
I(() => {
|
|
136
|
+
u(""), C(p || null);
|
|
137
|
+
}, [p, v]);
|
|
138
|
+
let G = /* @__PURE__ */ new Set(), f = [];
|
|
139
|
+
v && (v.forEach((s) => {
|
|
140
|
+
String(s.value).split(/,(?![^(]*\))/).forEach((z) => {
|
|
141
|
+
z = z.trim(), z && kt(re, z.toLowerCase()) && !G.has(z.toLowerCase()) && (G.add(z.toLowerCase()), f.push({
|
|
142
|
+
...s,
|
|
143
|
+
value: z,
|
|
144
|
+
refinement: s.value
|
|
145
145
|
}));
|
|
146
146
|
});
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
(
|
|
151
|
-
),
|
|
152
|
-
(
|
|
153
|
-
),
|
|
154
|
-
const
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
|
|
147
|
+
}), f.length === 0 && (f = v));
|
|
148
|
+
const D = f.filter((s) => s.popularity > 0).slice(0, 11);
|
|
149
|
+
N && (f = f.filter(
|
|
150
|
+
(s) => !D.includes(s)
|
|
151
|
+
), f.sort(
|
|
152
|
+
(s, F) => s.value.localeCompare(F.value, "en", { numeric: !0 })
|
|
153
|
+
), f = D.concat(f));
|
|
154
|
+
const g = !f || f.length === 0;
|
|
155
|
+
return /* @__PURE__ */ A("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
156
|
+
O && /* @__PURE__ */ a(
|
|
157
157
|
"span",
|
|
158
158
|
{
|
|
159
|
-
className: `${
|
|
160
|
-
children:
|
|
159
|
+
className: `${R ? "vs:text-white" : "vs:text-black"} vs:mb-1 vs:block vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:font-(family-name:--partbot-font-family)`,
|
|
160
|
+
children: b
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
|
|
164
|
-
/* @__PURE__ */
|
|
163
|
+
_ && /* @__PURE__ */ A("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
164
|
+
/* @__PURE__ */ A(
|
|
165
165
|
"select",
|
|
166
166
|
{
|
|
167
|
-
onChange: (
|
|
168
|
-
const
|
|
169
|
-
(
|
|
167
|
+
onChange: (s) => {
|
|
168
|
+
const F = f.find(
|
|
169
|
+
(z) => z.value.toString() === s.target.value.toString()
|
|
170
170
|
);
|
|
171
|
-
|
|
171
|
+
F && H(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,
|
|
175
|
-
disabled: !(
|
|
176
|
-
value:
|
|
175
|
+
disabled: !(f && f.length),
|
|
176
|
+
value: y ? y.value : "",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */ a("option", { value: "", disabled: !0, children:
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */ a("optgroup", { label: `Popular ${
|
|
181
|
-
/* @__PURE__ */ a("optgroup", { label: `All ${
|
|
182
|
-
(
|
|
183
|
-
(
|
|
178
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, children: b }),
|
|
179
|
+
D.length > 0 ? /* @__PURE__ */ A($e, { children: [
|
|
180
|
+
/* @__PURE__ */ a("optgroup", { label: `Popular ${Ke(b)}`, children: D.map((s) => /* @__PURE__ */ a("option", { value: s.refinement, children: s.value }, s.value)) }),
|
|
181
|
+
/* @__PURE__ */ a("optgroup", { label: `All ${Ke(b)}`, children: f.filter(
|
|
182
|
+
(s) => !D.some(
|
|
183
|
+
(F) => F.value === s.value
|
|
184
184
|
)
|
|
185
|
-
).map((
|
|
186
|
-
] }) :
|
|
185
|
+
).map((s) => /* @__PURE__ */ a("option", { value: s.refinement, children: s.value }, s.value)) })
|
|
186
|
+
] }) : f.map((s) => /* @__PURE__ */ a("option", { value: s.refinement, children: s.value }, s.value))
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
|
-
|
|
191
|
-
!
|
|
190
|
+
V && /* @__PURE__ */ a("div", { className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-[rgb(var(--partbot-theme))]! vs:pointer-events-none vs:flex vs:justify-center", children: /* @__PURE__ */ a(Pe, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin vs:text-[rgb(var(--partbot-theme))]!" }) }),
|
|
191
|
+
!V && (y == null ? void 0 : y.value) && /* @__PURE__ */ a(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
onClick:
|
|
194
|
+
onClick: ee,
|
|
195
195
|
tabIndex: -1,
|
|
196
196
|
className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-(--partbot-padding) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:justify-center",
|
|
197
197
|
children: /* @__PURE__ */ a(
|
|
@@ -209,33 +209,33 @@ function W({
|
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] }),
|
|
212
|
-
!
|
|
213
|
-
|
|
212
|
+
!_ && /* @__PURE__ */ A(
|
|
213
|
+
gt,
|
|
214
214
|
{
|
|
215
|
-
value:
|
|
215
|
+
value: y || null,
|
|
216
216
|
onChange: H,
|
|
217
|
-
virtual: { options:
|
|
218
|
-
disabled:
|
|
217
|
+
virtual: { options: f },
|
|
218
|
+
disabled: g,
|
|
219
219
|
immediate: !0,
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ A("div", { className: "vs:flex vs:h-full", children: [
|
|
222
222
|
/* @__PURE__ */ a(
|
|
223
|
-
|
|
223
|
+
bt,
|
|
224
224
|
{
|
|
225
225
|
autoComplete: "off",
|
|
226
226
|
spellCheck: "false",
|
|
227
|
-
placeholder:
|
|
227
|
+
placeholder: g && T && !V ? "N/A" : b,
|
|
228
228
|
className: "vs:w-full vs:cursor-default 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:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-(family-name:--partbot-font-family) vs:text-stone-900 vs:placeholder:text-stone-600 vs:disabled:placeholder:text-stone-400 vs:disabled:cursor-not-allowed",
|
|
229
|
-
displayValue: (
|
|
230
|
-
onChange: (
|
|
231
|
-
title:
|
|
229
|
+
displayValue: (s) => (s == null ? void 0 : s.value) || "",
|
|
230
|
+
onChange: (s) => u(s.target.value),
|
|
231
|
+
title: b
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
(
|
|
234
|
+
/* @__PURE__ */ A("div", { className: "vs:absolute vs:pointer-events-none vs:h-full vs:right-0 vs:flex vs:space-x-[calc(var(--partbot-padding)*0.25)] vs:items-center", children: [
|
|
235
|
+
(y == null ? void 0 : y.value) && /* @__PURE__ */ a(
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
|
-
onClick:
|
|
238
|
+
onClick: ee,
|
|
239
239
|
tabIndex: -1,
|
|
240
240
|
className: "vs:inset-y-0 vs:pr-2 vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-2 vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:items-center vs:justify-center vs:cursor-pointer",
|
|
241
241
|
children: /* @__PURE__ */ a(
|
|
@@ -252,7 +252,7 @@ function W({
|
|
|
252
252
|
)
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
|
-
/* @__PURE__ */ a(
|
|
255
|
+
/* @__PURE__ */ a(wt, { className: "vs:inset-y-0 vs:flex vs:items-center vs:pr-[calc(var(--partbot-padding)*1.3)] vs:pointer-events-auto vs:bg-transparent vs:border-none vs:outline-none", children: V ? /* @__PURE__ */ a(Pe, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400 vs:animate-spin" }) : /* @__PURE__ */ a(
|
|
256
256
|
"svg",
|
|
257
257
|
{
|
|
258
258
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400",
|
|
@@ -267,39 +267,39 @@ function W({
|
|
|
267
267
|
] })
|
|
268
268
|
] }),
|
|
269
269
|
/* @__PURE__ */ a(
|
|
270
|
-
|
|
270
|
+
yt,
|
|
271
271
|
{
|
|
272
272
|
portal: !0,
|
|
273
273
|
anchor: "bottom start",
|
|
274
274
|
className: "vs:w-(--input-width) vs:z-99999! vs:max-h-60! vs:overflow-auto vs:rounded-[min(var(--partbot-button-border-radius),0.89rem)] vs:bg-white vs:py-1 vs:text-base vs:shadow-lg vs:ring-1 vs:ring-stone-200 vs:focus:outline-none vs:sm:text-(length:--partbot-font-size) empty:vs:invisible vs:mt-2",
|
|
275
|
-
children: ({ option:
|
|
276
|
-
const
|
|
277
|
-
(
|
|
275
|
+
children: ({ option: s }) => {
|
|
276
|
+
const F = s && D.some(
|
|
277
|
+
(z) => z.value === s.value
|
|
278
278
|
);
|
|
279
279
|
return /* @__PURE__ */ a(
|
|
280
|
-
|
|
280
|
+
xt,
|
|
281
281
|
{
|
|
282
|
-
value:
|
|
283
|
-
className: ({ focus:
|
|
282
|
+
value: s,
|
|
283
|
+
className: ({ focus: z }) => ne(
|
|
284
284
|
"vs:group vs:relative vs:w-full vs:cursor-default vs:py-(--partbot-padding) vs:px-[calc(var(--partbot-padding)*1.3)] vs:text-left vs:border-none",
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
z ? "vs:bg-[rgb(var(--partbot-theme))] vs:text-[rgb(var(--partbot-button-label-color))]" : "vs:bg-white vs:text-stone-900 vs:hover:bg-theme vs:hover:text-button-label",
|
|
286
|
+
F && "vs:font-bold!"
|
|
287
287
|
),
|
|
288
|
-
children: ({ selected:
|
|
288
|
+
children: ({ selected: z }) => /* @__PURE__ */ A("div", { className: "vs:flex vs:w-full vs:items-center vs:justify-between", children: [
|
|
289
289
|
/* @__PURE__ */ a(
|
|
290
290
|
"span",
|
|
291
291
|
{
|
|
292
|
-
className:
|
|
293
|
-
|
|
292
|
+
className: ne(
|
|
293
|
+
s.value === (p == null ? void 0 : p.value) ? "vs:font-semibold" : "vs:font-normal",
|
|
294
294
|
"vs:block vs:font-(family-name:--partbot-font-family) vs:whitespace-pre-wrap vs:text-left vs:text-(length:--partbot-font-size) vs:leading-none"
|
|
295
295
|
),
|
|
296
|
-
children:
|
|
296
|
+
children: s.value
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
|
|
299
|
+
s.value === (p == null ? void 0 : p.value) && /* @__PURE__ */ a(
|
|
300
300
|
"span",
|
|
301
301
|
{
|
|
302
|
-
className:
|
|
302
|
+
className: ne(
|
|
303
303
|
"vs:text-[rgb(var(--partbot-theme))]",
|
|
304
304
|
"vs:flex vs:items-center group-vs:hover:text-white"
|
|
305
305
|
),
|
|
@@ -328,53 +328,56 @@ function W({
|
|
|
328
328
|
)
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
331
|
+
const St = "3.0.14";
|
|
332
|
+
console.info(
|
|
333
|
+
`Vehicle Search v${St} powered by Partbot https://mmyvs.partbot.io`
|
|
334
|
+
);
|
|
335
|
+
function ze(b = [], v = []) {
|
|
336
|
+
const p = [];
|
|
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) {
|
|
342
|
+
const V = O[0].trim();
|
|
343
|
+
p.push(`make = "${V}"`);
|
|
341
344
|
}
|
|
342
|
-
|
|
345
|
+
p.push(`${L} = "${_}"`);
|
|
343
346
|
} else
|
|
344
|
-
|
|
345
|
-
}), v.forEach((
|
|
346
|
-
|
|
347
|
-
}),
|
|
347
|
+
p.push(`${L} = "${N}"`);
|
|
348
|
+
}), v.forEach((U) => {
|
|
349
|
+
p.push(U);
|
|
350
|
+
}), p.length > 0 ? p.join(" AND ") : null;
|
|
348
351
|
}
|
|
349
|
-
function
|
|
350
|
-
apiKey:
|
|
352
|
+
function Mt({
|
|
353
|
+
apiKey: b,
|
|
351
354
|
makes: v = "",
|
|
352
|
-
models:
|
|
353
|
-
callbackUrl:
|
|
354
|
-
layout:
|
|
355
|
-
fields:
|
|
356
|
-
fieldPrefix:
|
|
357
|
-
showBranding:
|
|
358
|
-
showLabels:
|
|
359
|
-
mobileFullWidthButton:
|
|
360
|
-
mobileDrawer:
|
|
361
|
-
modifyQueryString:
|
|
355
|
+
models: p = "",
|
|
356
|
+
callbackUrl: U = "",
|
|
357
|
+
layout: L = "row",
|
|
358
|
+
fields: R,
|
|
359
|
+
fieldPrefix: N = "",
|
|
360
|
+
showBranding: O = !0,
|
|
361
|
+
showLabels: _ = !1,
|
|
362
|
+
mobileFullWidthButton: V = !0,
|
|
363
|
+
mobileDrawer: T = !0,
|
|
364
|
+
modifyQueryString: re = !0,
|
|
362
365
|
onChange: u,
|
|
363
|
-
buttonLabel:
|
|
364
|
-
showButton:
|
|
366
|
+
buttonLabel: y = "Search",
|
|
367
|
+
showButton: C = !0,
|
|
365
368
|
onSubmit: H,
|
|
366
|
-
store:
|
|
367
|
-
useStoreVehicles:
|
|
368
|
-
fieldOrder:
|
|
369
|
+
store: ee,
|
|
370
|
+
useStoreVehicles: G = !0,
|
|
371
|
+
fieldOrder: f = "MMY",
|
|
369
372
|
// "MMY" (Make→Model→Year) or "YMM" (Year→Make→Model)
|
|
370
|
-
enableFeatureFlags:
|
|
373
|
+
enableFeatureFlags: D = !1,
|
|
371
374
|
// Use api.cartbot.io instead of api.partbot.io
|
|
372
|
-
yearOptional:
|
|
375
|
+
yearOptional: g = !1,
|
|
373
376
|
// Make year selection optional, only requiring make + model
|
|
374
|
-
mobileButtonLabel:
|
|
377
|
+
mobileButtonLabel: s = "Select Vehicle"
|
|
375
378
|
// Label for mobile drawer trigger button
|
|
376
379
|
}) {
|
|
377
|
-
const
|
|
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({
|
|
378
381
|
make: null,
|
|
379
382
|
model: null,
|
|
380
383
|
year: null,
|
|
@@ -383,25 +386,25 @@ function St({
|
|
|
383
386
|
variant: null,
|
|
384
387
|
engine: null,
|
|
385
388
|
engine_capacity: null
|
|
386
|
-
}), [
|
|
389
|
+
}), [Xe, Me] = M(!1), Ue = Z([
|
|
387
390
|
"body",
|
|
388
391
|
"series",
|
|
389
392
|
"variant",
|
|
390
393
|
"engine",
|
|
391
394
|
"engine_capacity"
|
|
392
|
-
]), ke =
|
|
393
|
-
|
|
395
|
+
]), ke = Z(
|
|
396
|
+
R && R.length && Ue.current ? R.split(",").filter((t) => {
|
|
394
397
|
var r;
|
|
395
|
-
return (r =
|
|
398
|
+
return (r = Ue.current) == null ? void 0 : r.includes(t);
|
|
396
399
|
}) : null
|
|
397
|
-
), [
|
|
398
|
-
|
|
400
|
+
), [J, Ge] = M(!1);
|
|
401
|
+
I(() => {
|
|
399
402
|
const t = navigator.userAgent;
|
|
400
|
-
|
|
403
|
+
Ge(
|
|
401
404
|
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
402
405
|
t
|
|
403
406
|
)
|
|
404
|
-
),
|
|
407
|
+
), Be.__loaded || Be.init("phc_mLZkVvweXDfwCPYS7kSCxoAxgQUkw8fgyDiplKnleGw", {
|
|
405
408
|
api_host: "https://app.posthog.com",
|
|
406
409
|
autocapture: !1,
|
|
407
410
|
capture_pageview: !1,
|
|
@@ -409,104 +412,103 @@ function St({
|
|
|
409
412
|
disable_session_recording: !1
|
|
410
413
|
});
|
|
411
414
|
}, []);
|
|
412
|
-
const [
|
|
413
|
-
if (!
|
|
415
|
+
const [oe, et] = M({}), [Nt, tt] = M(""), Re = j(async () => {
|
|
416
|
+
if (!b)
|
|
414
417
|
return;
|
|
415
|
-
const r = `${
|
|
418
|
+
const r = `${D ? "https://api.cartbot.io" : "https://api.partbot.io"}/v1/vehicles/auth`;
|
|
416
419
|
try {
|
|
417
|
-
const
|
|
420
|
+
const i = await fetch(r, {
|
|
418
421
|
method: "POST",
|
|
419
422
|
headers: {
|
|
420
423
|
"Content-Type": "application/json",
|
|
421
|
-
Authorization: `Bearer ${
|
|
424
|
+
Authorization: `Bearer ${b}`,
|
|
422
425
|
referrerPolicy: "no-referrer"
|
|
423
426
|
},
|
|
424
427
|
body: JSON.stringify(
|
|
425
428
|
(() => {
|
|
426
|
-
const
|
|
427
|
-
return
|
|
429
|
+
const m = { use_store_vehicles: G };
|
|
430
|
+
return ee && (m.store = ee), m;
|
|
428
431
|
})()
|
|
429
432
|
)
|
|
430
433
|
});
|
|
431
|
-
if (!
|
|
432
|
-
throw new Error(`Error: ${
|
|
434
|
+
if (!i.ok)
|
|
435
|
+
throw new Error(`Error: ${i.status} ${i.statusText}`);
|
|
433
436
|
const {
|
|
434
437
|
merchant: o,
|
|
435
438
|
vehicle_makes: l,
|
|
436
|
-
vehicle_models:
|
|
439
|
+
vehicle_models: n,
|
|
437
440
|
meilisearch_search_key: c,
|
|
438
|
-
meilisearch_index_name:
|
|
441
|
+
meilisearch_index_name: d,
|
|
439
442
|
algolia_search_key: S,
|
|
440
443
|
// Fallback for backward compatibility
|
|
441
|
-
algolia_index_name:
|
|
444
|
+
algolia_index_name: te,
|
|
442
445
|
// Fallback for backward compatibility
|
|
443
|
-
store_index_name:
|
|
444
|
-
store_popular_makes:
|
|
446
|
+
store_index_name: pe,
|
|
447
|
+
store_popular_makes: ae,
|
|
445
448
|
// Array of popular make values for this store (from PostHog)
|
|
446
|
-
store_popular_models:
|
|
449
|
+
store_popular_models: h
|
|
447
450
|
// Object mapping makes to popular models: { "TOYOTA": ["HILUX", "LANDCRUISER"], ... }
|
|
448
|
-
} = await
|
|
449
|
-
|
|
450
|
-
...
|
|
451
|
-
refinement:
|
|
452
|
-
})),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
), E.current = z || null, console.log(
|
|
456
|
-
"[VehicleSearch] PostHog popular models:",
|
|
457
|
-
E.current
|
|
458
|
-
), Je({
|
|
459
|
-
searchKey: "f0be4e6a192a51ad360e4f5886be389d34334bb930bb32e5cd6d32ceddba17ff",
|
|
460
|
-
indexName: "otto_v1_vehicles_production",
|
|
461
|
-
storeIndexName: ie || "shopify_partbot-app-test_development"
|
|
451
|
+
} = await i.json();
|
|
452
|
+
z.current = o, ie.current = (l || []).map((m) => ({
|
|
453
|
+
...m,
|
|
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({
|
|
456
|
+
searchKey: "eeace38b64f52bf56ebb4fe8bd5837b3cd6c0ff9d7e272f76449d94b80cba86b",
|
|
457
|
+
indexName: "otto_v1_vehicles_production"
|
|
462
458
|
});
|
|
463
|
-
} catch (
|
|
464
|
-
console.error("[VehicleSearch] Auth failed:",
|
|
459
|
+
} catch (i) {
|
|
460
|
+
console.error("[VehicleSearch] Auth failed:", i), tt(i);
|
|
465
461
|
}
|
|
466
|
-
}, [
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}, [
|
|
470
|
-
if (
|
|
462
|
+
}, [b, ee, G, D]);
|
|
463
|
+
I(() => {
|
|
464
|
+
Re();
|
|
465
|
+
}, [Re]), I(() => {
|
|
466
|
+
if (oe.searchKey) {
|
|
471
467
|
try {
|
|
472
|
-
|
|
468
|
+
K.current = new Qe({
|
|
473
469
|
host: "https://search.partbot.io",
|
|
474
|
-
apiKey:
|
|
475
|
-
}),
|
|
470
|
+
apiKey: oe.searchKey
|
|
471
|
+
}), w.current = K.current.index(oe.indexName);
|
|
472
|
+
const t = new Qe({
|
|
473
|
+
host: "https://partbot-meilisearch-cache.partbot.workers.dev",
|
|
474
|
+
// Cloudflare Worker endpoint
|
|
475
|
+
apiKey: oe.searchKey
|
|
476
|
+
});
|
|
477
|
+
Q.current = t.index("otto_v1_vehicle_mmy");
|
|
476
478
|
} catch (t) {
|
|
477
479
|
console.error("[VehicleSearch] Failed to initialize Meilisearch:", t);
|
|
478
480
|
}
|
|
479
481
|
return () => {
|
|
480
|
-
|
|
482
|
+
K.current = null;
|
|
481
483
|
};
|
|
482
484
|
}
|
|
483
|
-
}, [
|
|
484
|
-
const [
|
|
485
|
-
function t(
|
|
486
|
-
if (!
|
|
487
|
-
var c = r(),
|
|
488
|
-
return
|
|
485
|
+
}, [oe.searchKey, b]);
|
|
486
|
+
const [Y, rt] = M(!1), Oe = j(() => {
|
|
487
|
+
function t(n) {
|
|
488
|
+
if (!n) return "rgba(0,0,0,1)";
|
|
489
|
+
var c = r(), d = window.getComputedStyle(n).backgroundColor;
|
|
490
|
+
return d !== c ? d : n.parentElement ? t(n.parentElement) : "rgba(255,255,255,1)";
|
|
489
491
|
}
|
|
490
492
|
function r() {
|
|
491
|
-
var
|
|
492
|
-
document.head.appendChild(
|
|
493
|
-
var c = window.getComputedStyle(
|
|
494
|
-
return document.head.removeChild(
|
|
493
|
+
var n = document.createElement("div");
|
|
494
|
+
document.head.appendChild(n);
|
|
495
|
+
var c = window.getComputedStyle(n).backgroundColor;
|
|
496
|
+
return document.head.removeChild(n), c;
|
|
495
497
|
}
|
|
496
|
-
const
|
|
498
|
+
const i = document.querySelector("vehicle-search");
|
|
497
499
|
let o;
|
|
498
|
-
|
|
499
|
-
const l =
|
|
500
|
-
|
|
500
|
+
i ? o = t(i) : o = t(F.current);
|
|
501
|
+
const l = _t(o).isDark();
|
|
502
|
+
rt(l);
|
|
501
503
|
}, []);
|
|
502
|
-
|
|
504
|
+
I(() => {
|
|
503
505
|
async function t() {
|
|
504
|
-
if (!e.make || !
|
|
506
|
+
if (!e.make || !w.current)
|
|
505
507
|
return;
|
|
506
|
-
let r = [],
|
|
508
|
+
let r = [], i = [];
|
|
507
509
|
e.make && r.push(`make:${e.make.refinement}`), e.model && r.push(
|
|
508
510
|
`model:${e.make.refinement} > ${e.model.refinement}`
|
|
509
|
-
), e.year && (
|
|
511
|
+
), e.year && (i = [
|
|
510
512
|
`year_from <= ${e.year.value}`,
|
|
511
513
|
`year_to >= ${e.year.value}`
|
|
512
514
|
]), e.body && r.push(
|
|
@@ -514,24 +516,24 @@ function St({
|
|
|
514
516
|
), e.series && r.push(`series:${e.series.refinement}`), e.engine && r.push(`engine:${e.engine.refinement}`), e.engine_capacity && r.push(
|
|
515
517
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
516
518
|
);
|
|
517
|
-
let l = (await
|
|
518
|
-
filter:
|
|
519
|
+
let l = (await w.current.search("", {
|
|
520
|
+
filter: ze(r, i),
|
|
519
521
|
attributesToRetrieve: ["otto_id"],
|
|
520
522
|
limit: 500
|
|
521
523
|
// Reduced from 1000 for faster queries
|
|
522
|
-
})).hits.map((
|
|
523
|
-
|
|
524
|
+
})).hits.map((d) => d.otto_id);
|
|
525
|
+
Se(l);
|
|
524
526
|
let c = {
|
|
525
527
|
...Object.fromEntries(
|
|
526
|
-
Object.entries(e || {}).map(([
|
|
528
|
+
Object.entries(e || {}).map(([d, S]) => [d, S && S.value || null]).filter(([d, S]) => S !== null)
|
|
527
529
|
),
|
|
528
|
-
merchant:
|
|
530
|
+
merchant: z.current
|
|
529
531
|
};
|
|
530
|
-
|
|
532
|
+
Be.capture("vehicle select", c);
|
|
531
533
|
}
|
|
532
534
|
t();
|
|
533
|
-
}, [e,
|
|
534
|
-
const
|
|
535
|
+
}, [e, w, g]);
|
|
536
|
+
const Ae = (t) => N ? `${N}${t}` : t, ot = (t) => N ? t.replace(new RegExp(`^${N}`), "") : t, at = j(() => {
|
|
535
537
|
const t = new URL(window.location.href).searchParams, r = [
|
|
536
538
|
"make",
|
|
537
539
|
"model",
|
|
@@ -540,24 +542,24 @@ function St({
|
|
|
540
542
|
"series",
|
|
541
543
|
"engine",
|
|
542
544
|
"engine_capacity"
|
|
543
|
-
].map(
|
|
544
|
-
[...t.entries()].filter(([o]) => r.includes(o)).map(([o, l]) => [
|
|
545
|
+
].map(Ae), i = Object.fromEntries(
|
|
546
|
+
[...t.entries()].filter(([o]) => r.includes(o)).map(([o, l]) => [ot(o), { value: l, refinement: l }])
|
|
545
547
|
);
|
|
546
|
-
|
|
547
|
-
}, []),
|
|
548
|
-
if (
|
|
548
|
+
W(i);
|
|
549
|
+
}, []), P = j(({ query: t, value: r, remove: i }) => {
|
|
550
|
+
if (re && "URLSearchParams" in window) {
|
|
549
551
|
let o = new URLSearchParams(window.location.search);
|
|
550
|
-
t =
|
|
551
|
-
|
|
552
|
+
t = Ae(t), t && r && o.set(t, r), t && !r && o.delete(t), i && i.forEach((n) => {
|
|
553
|
+
n = Ae(n), o.delete(n);
|
|
552
554
|
});
|
|
553
555
|
const l = window.location.pathname + "?" + o.toString();
|
|
554
556
|
window.history.pushState(null, "", l);
|
|
555
557
|
}
|
|
556
|
-
}, []),
|
|
557
|
-
var
|
|
558
|
+
}, []), nt = j(() => {
|
|
559
|
+
var i;
|
|
558
560
|
const t = {
|
|
559
|
-
vehicle_ids:
|
|
560
|
-
vehicle: (
|
|
561
|
+
vehicle_ids: se,
|
|
562
|
+
vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
|
|
561
563
|
};
|
|
562
564
|
H && H(t);
|
|
563
565
|
const r = new CustomEvent("vehicle-search-submit", {
|
|
@@ -566,85 +568,67 @@ function St({
|
|
|
566
568
|
document.dispatchEvent(r), setTimeout(() => {
|
|
567
569
|
Me(!1);
|
|
568
570
|
}, 900);
|
|
569
|
-
}, [
|
|
570
|
-
var
|
|
571
|
+
}, [se, H]), Te = j(() => {
|
|
572
|
+
var i, o, l, n, c, d, S, te, pe;
|
|
571
573
|
const t = {
|
|
572
|
-
vehicle_ids:
|
|
573
|
-
vehicle: (
|
|
574
|
+
vehicle_ids: se,
|
|
575
|
+
vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
|
|
574
576
|
};
|
|
575
577
|
u && u(t);
|
|
576
578
|
const r = new CustomEvent("vehicle-search-change", {
|
|
577
579
|
detail: t
|
|
578
580
|
});
|
|
579
|
-
if (
|
|
580
|
-
const
|
|
581
|
-
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((
|
|
582
|
-
vehicle_ids:
|
|
583
|
-
vehicle: e ? Object.entries(e).reduce((
|
|
581
|
+
if (B.current === !0 && !localStorage.getItem("partbot_plate_details")) {
|
|
582
|
+
const ae = JSON.stringify({
|
|
583
|
+
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(),
|
|
584
|
+
vehicle_ids: se,
|
|
585
|
+
vehicle: e ? Object.entries(e).reduce((h, [m, k]) => (h[m] = k != null && k.value ? k.value : {}, h), {}) : {}
|
|
584
586
|
});
|
|
585
587
|
localStorage.setItem(
|
|
586
588
|
"partbot_selected_vehicle",
|
|
587
|
-
|
|
588
|
-
),
|
|
589
|
+
ae
|
|
590
|
+
), ft.set("partbot_selected_vehicle", ae, {
|
|
589
591
|
secure: !0
|
|
590
592
|
});
|
|
591
593
|
}
|
|
592
|
-
document.dispatchEvent(r),
|
|
594
|
+
document.dispatchEvent(r), Je.current = se, setTimeout(() => {
|
|
593
595
|
Me(!1);
|
|
594
596
|
}, 900);
|
|
595
|
-
}, [
|
|
596
|
-
() =>
|
|
597
|
-
[
|
|
597
|
+
}, [se, u]), Ce = ut(
|
|
598
|
+
() => Ct(Te, 100),
|
|
599
|
+
[Te]
|
|
598
600
|
);
|
|
599
|
-
|
|
601
|
+
I(() => {
|
|
600
602
|
Ce();
|
|
601
|
-
}, [
|
|
603
|
+
}, [se, Ce]), I(() => () => {
|
|
602
604
|
Ce.cancel();
|
|
603
|
-
}, [Ce]),
|
|
604
|
-
|
|
605
|
-
}, [
|
|
606
|
-
|
|
607
|
-
"[VehicleSearch] YMM mode: Loading year range from dataset..."
|
|
608
|
-
), b.current.search("", {
|
|
605
|
+
}, [Ce]), I(() => {
|
|
606
|
+
oe.searchKey && (x || pt(), at());
|
|
607
|
+
}, [oe.searchKey, x]), I(() => {
|
|
608
|
+
x && w.current && de.length === 0 && !e.year && w.current.search("", {
|
|
609
609
|
attributesToRetrieve: ["year_from", "year_to"],
|
|
610
610
|
limit: 1e4
|
|
611
611
|
}).then(({ hits: t }) => {
|
|
612
|
-
|
|
613
|
-
"[VehicleSearch] YMM mode: Fetched",
|
|
614
|
-
t.length,
|
|
615
|
-
"hits for year range"
|
|
616
|
-
);
|
|
617
|
-
const r = t.map((c) => c.year_from).filter(Boolean), n = t.map((c) => c.year_to).filter(Boolean), o = Math.min(...r), l = Math.max(...n);
|
|
618
|
-
console.log(
|
|
619
|
-
"[VehicleSearch] YMM mode: Year range:",
|
|
620
|
-
o,
|
|
621
|
-
"-",
|
|
622
|
-
l
|
|
623
|
-
);
|
|
624
|
-
const s = Array.from(
|
|
612
|
+
const r = t.map((c) => c.year_from).filter(Boolean), i = t.map((c) => c.year_to).filter(Boolean), o = Math.min(...r), l = Math.max(...i), n = Array.from(
|
|
625
613
|
{ length: l - o + 1 },
|
|
626
|
-
(c,
|
|
614
|
+
(c, d) => ({ value: o + d, refinement: o + d })
|
|
627
615
|
).reverse();
|
|
628
|
-
|
|
629
|
-
"[VehicleSearch] YMM mode: Setting",
|
|
630
|
-
s.length,
|
|
631
|
-
"years"
|
|
632
|
-
), he(s);
|
|
616
|
+
he(n);
|
|
633
617
|
}).catch((t) => {
|
|
634
618
|
console.error("[VehicleSearch] Error loading year range:", t);
|
|
635
|
-
})
|
|
636
|
-
}, [
|
|
637
|
-
typeof document > "u" ||
|
|
638
|
-
}, [
|
|
639
|
-
const
|
|
619
|
+
});
|
|
620
|
+
}, [x, oe.searchKey, de.length, e.year]), I(() => {
|
|
621
|
+
typeof document > "u" || Oe();
|
|
622
|
+
}, [Oe]);
|
|
623
|
+
const Ze = j(
|
|
640
624
|
(t) => {
|
|
641
|
-
|
|
625
|
+
B.current = !0, ce([]), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), W((r) => ({
|
|
642
626
|
make: t,
|
|
643
|
-
year:
|
|
644
|
-
})),
|
|
627
|
+
year: x || g ? r.year : null
|
|
628
|
+
})), P({
|
|
645
629
|
query: "make",
|
|
646
630
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
647
|
-
remove:
|
|
631
|
+
remove: x ? ["model", "body", "series", "engine", "variant", "engine_capacity"] : g ? [
|
|
648
632
|
"model",
|
|
649
633
|
"body",
|
|
650
634
|
"series",
|
|
@@ -660,25 +644,25 @@ function St({
|
|
|
660
644
|
"variant",
|
|
661
645
|
"engine_capacity"
|
|
662
646
|
]
|
|
663
|
-
}), t ||
|
|
647
|
+
}), t || Se([]);
|
|
664
648
|
},
|
|
665
|
-
[
|
|
666
|
-
),
|
|
649
|
+
[P, x, g]
|
|
650
|
+
), Ye = j(
|
|
667
651
|
(t) => {
|
|
668
|
-
|
|
652
|
+
B.current = !0, W((r) => ({
|
|
669
653
|
...r,
|
|
670
654
|
model: t !== "" ? t : null,
|
|
671
|
-
year:
|
|
655
|
+
year: x || g ? r.year : null,
|
|
672
656
|
// Preserve year in YMM mode or yearOptional mode
|
|
673
657
|
body: null,
|
|
674
658
|
series: null,
|
|
675
659
|
variant: null,
|
|
676
660
|
engine: null,
|
|
677
661
|
engine_capacity: null
|
|
678
|
-
})), !
|
|
662
|
+
})), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), P({
|
|
679
663
|
query: "model",
|
|
680
664
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
681
|
-
remove:
|
|
665
|
+
remove: x ? ["body", "series", "engine", "variant", "engine_capacity"] : g ? ["body", "series", "engine", "variant", "engine_capacity"] : [
|
|
682
666
|
"year",
|
|
683
667
|
"body",
|
|
684
668
|
"series",
|
|
@@ -688,12 +672,12 @@ function St({
|
|
|
688
672
|
]
|
|
689
673
|
});
|
|
690
674
|
},
|
|
691
|
-
[
|
|
692
|
-
),
|
|
675
|
+
[P, x, g]
|
|
676
|
+
), He = j(
|
|
693
677
|
(t) => {
|
|
694
|
-
|
|
678
|
+
B.current = !0, x ? (ve([]), ce([]), W({
|
|
695
679
|
year: t !== "" ? t : null
|
|
696
|
-
}), (!t || t === "") && he([])) :
|
|
680
|
+
}), (!t || t === "") && he([])) : W(g ? (r) => ({
|
|
697
681
|
...r,
|
|
698
682
|
year: t !== "" ? t : null
|
|
699
683
|
}) : (r) => ({
|
|
@@ -704,10 +688,10 @@ function St({
|
|
|
704
688
|
variant: null,
|
|
705
689
|
engine: null,
|
|
706
690
|
engine_capacity: null
|
|
707
|
-
})),
|
|
691
|
+
})), g || (ge([]), be([]), we([]), xe([]), ye([])), P({
|
|
708
692
|
query: "year",
|
|
709
693
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
710
|
-
remove:
|
|
694
|
+
remove: x ? [
|
|
711
695
|
"make",
|
|
712
696
|
"model",
|
|
713
697
|
"body",
|
|
@@ -715,242 +699,263 @@ function St({
|
|
|
715
699
|
"variant",
|
|
716
700
|
"engine",
|
|
717
701
|
"engine_capacity"
|
|
718
|
-
] :
|
|
719
|
-
}), !
|
|
702
|
+
] : g ? [] : ["body", "series", "variant", "engine", "engine_capacity"]
|
|
703
|
+
}), !g && (!t || t === "") && Se([]);
|
|
720
704
|
},
|
|
721
|
-
[
|
|
722
|
-
),
|
|
705
|
+
[P, x, g]
|
|
706
|
+
), it = j(
|
|
723
707
|
(t) => {
|
|
724
|
-
|
|
708
|
+
B.current = !0, W((r) => ({
|
|
725
709
|
...r,
|
|
726
710
|
body: t !== "" ? t : null
|
|
727
|
-
})),
|
|
711
|
+
})), P({
|
|
728
712
|
query: "body",
|
|
729
713
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
730
714
|
});
|
|
731
715
|
},
|
|
732
|
-
[
|
|
733
|
-
),
|
|
716
|
+
[P]
|
|
717
|
+
), st = j(
|
|
734
718
|
(t) => {
|
|
735
|
-
|
|
719
|
+
B.current = !0, W((r) => ({
|
|
736
720
|
...r,
|
|
737
721
|
series: t !== "" ? t : null
|
|
738
|
-
})),
|
|
722
|
+
})), P({
|
|
739
723
|
query: "series",
|
|
740
724
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
741
725
|
});
|
|
742
726
|
},
|
|
743
|
-
[
|
|
744
|
-
),
|
|
727
|
+
[P]
|
|
728
|
+
), lt = j(
|
|
745
729
|
(t) => {
|
|
746
|
-
|
|
730
|
+
B.current = !0, W((r) => ({
|
|
747
731
|
...r,
|
|
748
732
|
variant: t !== "" ? t : null
|
|
749
|
-
})),
|
|
733
|
+
})), P({
|
|
750
734
|
query: "variant",
|
|
751
735
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
752
736
|
});
|
|
753
737
|
},
|
|
754
|
-
[
|
|
755
|
-
),
|
|
738
|
+
[P]
|
|
739
|
+
), ct = j(
|
|
756
740
|
(t) => {
|
|
757
|
-
|
|
741
|
+
B.current = !0, W((r) => ({
|
|
758
742
|
...r,
|
|
759
743
|
engine: t !== "" ? t : null
|
|
760
|
-
})),
|
|
744
|
+
})), P({
|
|
761
745
|
query: "engine",
|
|
762
746
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
763
747
|
});
|
|
764
748
|
},
|
|
765
|
-
[
|
|
766
|
-
),
|
|
749
|
+
[P]
|
|
750
|
+
), dt = j(
|
|
767
751
|
(t) => {
|
|
768
|
-
|
|
752
|
+
B.current = !0, W((r) => ({
|
|
769
753
|
...r,
|
|
770
754
|
engine_capacity: t !== "" ? t : null
|
|
771
|
-
})),
|
|
755
|
+
})), P({
|
|
772
756
|
query: "engine_capacity",
|
|
773
757
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
774
758
|
});
|
|
775
759
|
},
|
|
776
|
-
[
|
|
760
|
+
[P]
|
|
777
761
|
);
|
|
778
|
-
|
|
779
|
-
|
|
762
|
+
I(() => {
|
|
763
|
+
x && e.year && w.current && (async () => {
|
|
780
764
|
try {
|
|
781
|
-
const r = await
|
|
765
|
+
const r = await w.current.search("", {
|
|
782
766
|
filter: `year_from <= ${e.year.value} AND year_to >= ${e.year.value}`,
|
|
783
767
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
784
768
|
limit: 1e4
|
|
785
|
-
}),
|
|
786
|
-
r.hits.forEach((
|
|
787
|
-
|
|
788
|
-
value:
|
|
789
|
-
refinement:
|
|
790
|
-
popularity:
|
|
769
|
+
}), i = /* @__PURE__ */ new Map();
|
|
770
|
+
r.hits.forEach((n) => {
|
|
771
|
+
n.make && !i.has(n.make) && i.set(n.make, {
|
|
772
|
+
value: n.make.toUpperCase(),
|
|
773
|
+
refinement: n.make.toUpperCase(),
|
|
774
|
+
popularity: n.make_popularity || 0
|
|
791
775
|
});
|
|
792
776
|
});
|
|
793
|
-
let o = Array.from(
|
|
794
|
-
const l = new Set(
|
|
795
|
-
l.size > 0 ? o.sort((
|
|
796
|
-
const
|
|
797
|
-
return
|
|
777
|
+
let o = Array.from(i.values());
|
|
778
|
+
const l = new Set(q.current || []);
|
|
779
|
+
l.size > 0 ? o.sort((n, c) => {
|
|
780
|
+
const d = l.has(n.value), S = l.has(c.value);
|
|
781
|
+
return d && !S ? -1 : !d && S ? 1 : d && S ? q.current.indexOf(n.value) - q.current.indexOf(c.value) : n.value.localeCompare(c.value);
|
|
798
782
|
}) : o.sort(
|
|
799
|
-
(
|
|
800
|
-
),
|
|
783
|
+
(n, c) => c.popularity === n.popularity ? n.value.localeCompare(c.value) : c.popularity - n.popularity
|
|
784
|
+
), ve(o);
|
|
801
785
|
} catch (r) {
|
|
802
786
|
console.error("[VehicleSearch] Error loading makes for year:", r);
|
|
803
787
|
}
|
|
804
788
|
})();
|
|
805
|
-
}, [
|
|
806
|
-
const
|
|
789
|
+
}, [x, e.year]);
|
|
790
|
+
const pt = j(() => {
|
|
807
791
|
(async () => {
|
|
808
792
|
let r = [];
|
|
809
|
-
if (
|
|
810
|
-
r =
|
|
811
|
-
else if (
|
|
793
|
+
if (ie.current && ie.current.length)
|
|
794
|
+
r = ie.current;
|
|
795
|
+
else if (w.current)
|
|
812
796
|
try {
|
|
813
|
-
const
|
|
797
|
+
const i = await w.current.search("", {
|
|
814
798
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
815
799
|
limit: 1e3
|
|
816
800
|
}), o = /* @__PURE__ */ new Map();
|
|
817
|
-
|
|
801
|
+
i.hits.forEach((l) => {
|
|
818
802
|
l.make && !o.has(l.make) && o.set(l.make, {
|
|
819
803
|
value: l.make.toUpperCase(),
|
|
820
804
|
refinement: l.make.toUpperCase(),
|
|
821
805
|
popularity: l.make_popularity || 0
|
|
822
806
|
});
|
|
823
807
|
}), r = Array.from(o.values());
|
|
824
|
-
} catch (
|
|
825
|
-
console.error("[VehicleSearch] Error loading makes:",
|
|
808
|
+
} catch (i) {
|
|
809
|
+
console.error("[VehicleSearch] Error loading makes:", i);
|
|
826
810
|
}
|
|
827
811
|
if (v && r.length) {
|
|
828
|
-
const
|
|
812
|
+
const i = v.trim().split(",").map((o) => o.trim().toUpperCase());
|
|
829
813
|
r = r.filter(
|
|
830
|
-
(o) =>
|
|
814
|
+
(o) => i.includes(o.value)
|
|
831
815
|
);
|
|
832
816
|
}
|
|
833
|
-
if (
|
|
834
|
-
const
|
|
817
|
+
if (q.current && q.current.length > 0) {
|
|
818
|
+
const i = new Set(q.current);
|
|
835
819
|
r.sort((o, l) => {
|
|
836
|
-
const
|
|
837
|
-
return
|
|
820
|
+
const n = i.has(o.value), c = i.has(l.value);
|
|
821
|
+
return n && !c ? -1 : !n && c ? 1 : n && c ? q.current.indexOf(o.value) - q.current.indexOf(l.value) : o.value.localeCompare(l.value);
|
|
838
822
|
});
|
|
839
823
|
} else
|
|
840
|
-
r.sort((
|
|
841
|
-
|
|
824
|
+
r.sort((i, o) => i.popularity === o.popularity ? i.value.localeCompare(o.value) : o.popularity - i.popularity);
|
|
825
|
+
ve(r);
|
|
842
826
|
})();
|
|
843
827
|
}, [v]);
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
828
|
+
I(() => {
|
|
829
|
+
var t;
|
|
830
|
+
if (e.make && e.make.refinement) {
|
|
831
|
+
const r = e.make.refinement;
|
|
832
|
+
if (G && typeof $.current == "object" && !Array.isArray($.current) && $.current[r]) {
|
|
833
|
+
const i = $.current[r].map(
|
|
834
|
+
(l) => ({
|
|
835
|
+
value: l,
|
|
836
|
+
refinement: l,
|
|
837
|
+
popularity: 0
|
|
838
|
+
// Popularity will be used from PostHog for sorting
|
|
839
|
+
})
|
|
840
|
+
), o = (t = E.current) == null ? void 0 : t[r];
|
|
841
|
+
if (o && Array.isArray(o)) {
|
|
842
|
+
const l = new Map(
|
|
843
|
+
o.map((n, c) => [
|
|
844
|
+
n.toUpperCase(),
|
|
845
|
+
o.length - c
|
|
846
|
+
])
|
|
847
|
+
);
|
|
848
|
+
i.sort((n, c) => {
|
|
849
|
+
const d = l.get(n.value.toUpperCase()) || 0, S = l.get(c.value.toUpperCase()) || 0;
|
|
850
|
+
return d !== S ? S - d : n.value.localeCompare(c.value);
|
|
851
|
+
});
|
|
852
|
+
} else
|
|
853
|
+
i.sort((l, n) => l.value.localeCompare(n.value));
|
|
854
|
+
ce(i);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
if (!Q.current || !b)
|
|
858
|
+
return;
|
|
859
|
+
Q.current.search("", {
|
|
860
|
+
filter: `make = "${e.make.refinement}"`,
|
|
861
|
+
limit: 1
|
|
862
|
+
// Only one document per make
|
|
863
|
+
}).then((i) => {
|
|
864
|
+
var pe, ae;
|
|
865
|
+
const { hits: o } = i;
|
|
866
|
+
let l = [];
|
|
867
|
+
o.length > 0 && o[0].models && (l = o[0].models);
|
|
868
|
+
let n = l.map((h) => ({
|
|
869
|
+
model: `${e.make.refinement} > ${h.name}`,
|
|
870
|
+
model_popularity: h.popularity || 0
|
|
871
|
+
})), c = [];
|
|
872
|
+
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));
|
|
873
|
+
let d = c;
|
|
874
|
+
if (p) {
|
|
875
|
+
const h = p.trim().split(",").map((k) => k.trim()).filter(Boolean), m = new Set(
|
|
876
|
+
h.map((k) => k.toLowerCase())
|
|
868
877
|
);
|
|
869
|
-
|
|
870
|
-
(
|
|
871
|
-
) : h,
|
|
872
|
-
(
|
|
873
|
-
|
|
878
|
+
d = c.length ? c.filter(
|
|
879
|
+
(k) => m.has(String(k).toLowerCase())
|
|
880
|
+
) : h, n = n.filter(
|
|
881
|
+
(k) => m.has(
|
|
882
|
+
k.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
874
883
|
)
|
|
875
884
|
);
|
|
876
885
|
}
|
|
877
|
-
if (
|
|
886
|
+
if (d && d.length > 0) {
|
|
878
887
|
const h = new Set(
|
|
879
|
-
|
|
888
|
+
d.map((k) => String(k).toLowerCase())
|
|
880
889
|
);
|
|
881
|
-
|
|
882
|
-
(
|
|
883
|
-
|
|
890
|
+
n.some(
|
|
891
|
+
(k) => h.has(
|
|
892
|
+
k.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
884
893
|
)
|
|
885
|
-
) && (
|
|
886
|
-
(
|
|
887
|
-
|
|
894
|
+
) && (n = n.filter(
|
|
895
|
+
(k) => h.has(
|
|
896
|
+
k.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
888
897
|
)
|
|
889
898
|
));
|
|
890
899
|
}
|
|
891
|
-
|
|
892
|
-
o = o.filter((h) => h.model && h.model !== "" && !c.has(h.model) && h.model.match(/[^>]*$/)[0].trim() !== "" ? (c.add(h.model), !0) : !1), o = o.map((h) => ({
|
|
900
|
+
n = n.filter((h) => h.model && h.model !== "" ? h.model.match(/[^>]*$/)[0].trim() !== "" : !1).map((h) => ({
|
|
893
901
|
value: h.model.match(/[^>]*$/)[0].trim(),
|
|
894
902
|
refinement: h.model.match(/[^>]*$/)[0].trim(),
|
|
895
903
|
popularity: h.model_popularity
|
|
896
904
|
}));
|
|
897
|
-
const
|
|
898
|
-
if (
|
|
905
|
+
const S = (pe = e.make) == null ? void 0 : pe.refinement, te = (ae = E.current) == null ? void 0 : ae[S];
|
|
906
|
+
if (te && Array.isArray(te) && te.length > 0) {
|
|
899
907
|
const h = new Set(
|
|
900
|
-
|
|
908
|
+
te.map((m) => String(m).trim().toUpperCase())
|
|
901
909
|
);
|
|
902
|
-
|
|
903
|
-
const
|
|
904
|
-
if (
|
|
905
|
-
if (!
|
|
906
|
-
if (
|
|
907
|
-
const
|
|
908
|
-
(
|
|
910
|
+
n.sort((m, k) => {
|
|
911
|
+
const je = h.has(m.value), Ne = h.has(k.value);
|
|
912
|
+
if (je && !Ne) return -1;
|
|
913
|
+
if (!je && Ne) return 1;
|
|
914
|
+
if (je && Ne) {
|
|
915
|
+
const qe = te.map(
|
|
916
|
+
(ht) => String(ht).trim().toUpperCase()
|
|
909
917
|
);
|
|
910
|
-
return
|
|
918
|
+
return qe.indexOf(m.value) - qe.indexOf(k.value);
|
|
911
919
|
}
|
|
912
|
-
return
|
|
920
|
+
return m.value.localeCompare(k.value);
|
|
913
921
|
});
|
|
914
922
|
} else
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}).catch((
|
|
918
|
-
console.error("[VehicleSearch] Error loading models:",
|
|
923
|
+
n.sort((h, m) => h.popularity === m.popularity ? h.value.localeCompare(m.value) : m.popularity - h.popularity);
|
|
924
|
+
ce(n);
|
|
925
|
+
}).catch((i) => {
|
|
926
|
+
console.error("[VehicleSearch] Error loading models:", i), ce([]);
|
|
919
927
|
});
|
|
920
928
|
} else
|
|
921
|
-
|
|
922
|
-
}, [
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
929
|
+
ce([]);
|
|
930
|
+
}, [
|
|
931
|
+
e.make,
|
|
932
|
+
p,
|
|
933
|
+
b,
|
|
934
|
+
x,
|
|
935
|
+
e.year,
|
|
936
|
+
G
|
|
937
|
+
]), I(() => {
|
|
938
|
+
if (w.current && e.make && e.model) {
|
|
930
939
|
let t = [
|
|
931
940
|
`model:${e.make.refinement} > ${e.model.refinement}`
|
|
932
941
|
];
|
|
933
|
-
|
|
942
|
+
g && (e.body && t.push(
|
|
934
943
|
`body:${e.make.refinement} > ${e.model.refinement} > ${e.body.refinement}`
|
|
935
944
|
), e.series && t.push(`series:${e.series.refinement}`), e.engine && t.push(`engine:${e.engine.refinement}`), e.engine_capacity && t.push(
|
|
936
945
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
937
|
-
)),
|
|
938
|
-
filter:
|
|
946
|
+
)), w.current.search("", {
|
|
947
|
+
filter: ze(t, []),
|
|
939
948
|
attributesToRetrieve: ["year_from", "year_to", "otto_id"],
|
|
940
949
|
limit: 200
|
|
941
950
|
// Reduced from 1000 for faster queries
|
|
942
951
|
}).then(({ hits: r }) => {
|
|
943
|
-
|
|
944
|
-
"[VehicleSearch] Year search returned hits:",
|
|
945
|
-
r.length
|
|
946
|
-
);
|
|
947
|
-
const n = r.map((f) => f.year_from), o = Math.min(...n), l = r.map((f) => f.year_to), s = Math.max(...l);
|
|
952
|
+
const i = r.map((d) => d.year_from), o = Math.min(...i), l = r.map((d) => d.year_to), n = Math.max(...l);
|
|
948
953
|
let c = Array.apply(null, {
|
|
949
|
-
length:
|
|
950
|
-
}).map(function(
|
|
954
|
+
length: n + 1 - o
|
|
955
|
+
}).map(function(d, S) {
|
|
951
956
|
return S + o;
|
|
952
957
|
});
|
|
953
|
-
c = c.reverse().map((
|
|
958
|
+
c = c.reverse().map((d) => ({ value: d, refinement: d })), he(c);
|
|
954
959
|
}).catch((r) => {
|
|
955
960
|
console.error("[VehicleSearch] Error fetching years:", r);
|
|
956
961
|
});
|
|
@@ -958,49 +963,49 @@ function St({
|
|
|
958
963
|
}, [
|
|
959
964
|
e.model,
|
|
960
965
|
e.make,
|
|
961
|
-
|
|
962
|
-
|
|
966
|
+
x,
|
|
967
|
+
g,
|
|
963
968
|
e.body,
|
|
964
969
|
e.series,
|
|
965
970
|
e.engine,
|
|
966
971
|
e.engine_capacity
|
|
967
|
-
]),
|
|
968
|
-
const t =
|
|
969
|
-
if (
|
|
972
|
+
]), I(() => {
|
|
973
|
+
const t = g ? e.make && e.model : e.year && e.make && e.model;
|
|
974
|
+
if (w.current && t) {
|
|
970
975
|
const r = e.year ? [
|
|
971
976
|
`year_from <= ${e.year.value}`,
|
|
972
977
|
`year_to >= ${e.year.value}`
|
|
973
978
|
] : [];
|
|
974
|
-
|
|
975
|
-
filter:
|
|
979
|
+
w.current.search("", {
|
|
980
|
+
filter: ze(
|
|
976
981
|
[`model:${e.make.refinement} > ${e.model.refinement}`],
|
|
977
982
|
r
|
|
978
983
|
),
|
|
979
984
|
attributesToRetrieve: ["body", "otto_id"],
|
|
980
985
|
limit: 1e3
|
|
981
|
-
}).then(({ hits:
|
|
982
|
-
|
|
986
|
+
}).then(({ hits: i }) => {
|
|
987
|
+
i = [...new Map(i.map((o) => [o.body, o])).values()].map((o) => ({
|
|
983
988
|
value: o.body.match(/[^>]*$/)[0].trim(),
|
|
984
989
|
refinement: o.body.match(/[^>]*$/)[0].trim()
|
|
985
|
-
})).filter((o) => o.value), ge(
|
|
990
|
+
})).filter((o) => o.value), ge(i);
|
|
986
991
|
});
|
|
987
992
|
}
|
|
988
|
-
}, [e.year, e.make, e.model,
|
|
989
|
-
const ue =
|
|
993
|
+
}, [e.year, e.make, e.model, g]);
|
|
994
|
+
const ue = j(({ hits: t, attribute: r, stateCallback: i }) => {
|
|
990
995
|
let o = [
|
|
991
996
|
...new Map(t.map((l) => [l[r], l])).values()
|
|
992
997
|
].map((l) => ({
|
|
993
998
|
value: l[r].match(/[^|]*$/)[0].trim(),
|
|
994
999
|
refinement: l[r].match(/[^|]*$/)[0].trim()
|
|
995
1000
|
})).filter((l) => l.refinement);
|
|
996
|
-
|
|
997
|
-
}, []),
|
|
998
|
-
const t = ke.current ? ke.current.length + 3 : 3, r =
|
|
1001
|
+
i(o);
|
|
1002
|
+
}, []), vt = j(() => {
|
|
1003
|
+
const t = ke.current ? ke.current.length + 3 : 3, r = C ? t + 1 : t;
|
|
999
1004
|
return `vs:lg:grid-cols-${r > 8 ? 8 : r}`;
|
|
1000
|
-
}, [
|
|
1001
|
-
|
|
1002
|
-
const t =
|
|
1003
|
-
if (
|
|
1005
|
+
}, [C]);
|
|
1006
|
+
I(() => {
|
|
1007
|
+
const t = g ? e.make && e.model : e.make && e.model && e.year;
|
|
1008
|
+
if (w.current && t) {
|
|
1004
1009
|
let r = [
|
|
1005
1010
|
`make:${e.make.refinement}`,
|
|
1006
1011
|
`model:${e.make.refinement} > ${e.model.refinement}`,
|
|
@@ -1010,12 +1015,12 @@ function St({
|
|
|
1010
1015
|
e.engine ? `engine:${e.engine.refinement}` : "",
|
|
1011
1016
|
e.engine_capacity ? `engine_capacity:${e.engine_capacity.refinement}` : ""
|
|
1012
1017
|
].filter((o) => o);
|
|
1013
|
-
const
|
|
1018
|
+
const i = e.year ? [
|
|
1014
1019
|
`year_from <= ${e.year.value}`,
|
|
1015
1020
|
`year_to >= ${e.year.value}`
|
|
1016
1021
|
] : [];
|
|
1017
|
-
|
|
1018
|
-
filter:
|
|
1022
|
+
w.current.search("", {
|
|
1023
|
+
filter: ze(r, i),
|
|
1019
1024
|
attributesToRetrieve: [
|
|
1020
1025
|
"series",
|
|
1021
1026
|
"engine_capacity",
|
|
@@ -1055,49 +1060,49 @@ function St({
|
|
|
1055
1060
|
e.make,
|
|
1056
1061
|
e.model,
|
|
1057
1062
|
e.year,
|
|
1058
|
-
|
|
1063
|
+
g
|
|
1059
1064
|
]);
|
|
1060
1065
|
const [_e, Ee] = M(!1);
|
|
1061
|
-
return
|
|
1062
|
-
if (
|
|
1066
|
+
return I(() => {
|
|
1067
|
+
if (T)
|
|
1063
1068
|
return _e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1064
1069
|
document.body.style.overflow = "";
|
|
1065
1070
|
};
|
|
1066
|
-
}, [_e,
|
|
1067
|
-
|
|
1071
|
+
}, [_e, T]), /* @__PURE__ */ A($e, { children: [
|
|
1072
|
+
T && /* @__PURE__ */ a(
|
|
1068
1073
|
"button",
|
|
1069
1074
|
{
|
|
1070
1075
|
onClick: () => Ee(!0),
|
|
1071
1076
|
type: "button",
|
|
1072
|
-
className:
|
|
1077
|
+
className: ne(
|
|
1073
1078
|
"vehicle-search-btn vs:md:hidden!",
|
|
1074
|
-
|
|
1079
|
+
V ? "vs:w-full! vs:flex! vs:shrink-0!" : "vs:w-auto! vs:inline-flex! vs:shrink!"
|
|
1075
1080
|
),
|
|
1076
|
-
children: /* @__PURE__ */ a("span", { children:
|
|
1081
|
+
children: /* @__PURE__ */ a("span", { children: s })
|
|
1077
1082
|
}
|
|
1078
1083
|
),
|
|
1079
|
-
|
|
1084
|
+
T && /* @__PURE__ */ a(
|
|
1080
1085
|
"div",
|
|
1081
1086
|
{
|
|
1082
1087
|
onClick: () => Ee(!1),
|
|
1083
|
-
className:
|
|
1088
|
+
className: ne(
|
|
1084
1089
|
"vs:z-10 vs:fixed vs:inset-0 vs:bg-stone-900 vs:transition-all vs:duration-300",
|
|
1085
1090
|
_e ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
|
|
1086
1091
|
)
|
|
1087
1092
|
}
|
|
1088
1093
|
),
|
|
1089
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ A(
|
|
1090
1095
|
"div",
|
|
1091
1096
|
{
|
|
1092
|
-
className:
|
|
1097
|
+
className: ne(
|
|
1093
1098
|
"partbot-mmyvs-container",
|
|
1094
|
-
|
|
1099
|
+
T && _e && "active",
|
|
1095
1100
|
"w-full"
|
|
1096
1101
|
),
|
|
1097
1102
|
children: [
|
|
1098
|
-
|
|
1103
|
+
T && /* @__PURE__ */ A("div", { className: "vs:flex vs:justify-between vs:items-center vs:pb-4 vs:font-bold vs:text-white vs:md:hidden", children: [
|
|
1099
1104
|
/* @__PURE__ */ a("span", { children: "Select Vehicle" }),
|
|
1100
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ A(
|
|
1101
1106
|
"button",
|
|
1102
1107
|
{
|
|
1103
1108
|
onClick: () => Ee(!1),
|
|
@@ -1119,104 +1124,110 @@ function St({
|
|
|
1119
1124
|
}
|
|
1120
1125
|
)
|
|
1121
1126
|
] }),
|
|
1122
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ A(
|
|
1123
1128
|
"div",
|
|
1124
1129
|
{
|
|
1125
|
-
ref:
|
|
1126
|
-
className:
|
|
1130
|
+
ref: F,
|
|
1131
|
+
className: ne(
|
|
1127
1132
|
"vs:grid vs:gap-3",
|
|
1128
|
-
|
|
1133
|
+
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",
|
|
1129
1134
|
"vs:w-full vs:transition vs:lg:mx-auto"
|
|
1130
1135
|
),
|
|
1131
1136
|
children: [
|
|
1132
|
-
|
|
1137
|
+
x ? /* @__PURE__ */ A($e, { children: [
|
|
1133
1138
|
/* @__PURE__ */ a(
|
|
1134
|
-
|
|
1139
|
+
X,
|
|
1135
1140
|
{
|
|
1136
1141
|
label: "Year",
|
|
1137
|
-
items:
|
|
1138
|
-
refine:
|
|
1142
|
+
items: de,
|
|
1143
|
+
refine: He,
|
|
1139
1144
|
selected: e.year,
|
|
1140
|
-
bgDark:
|
|
1141
|
-
showLabel:
|
|
1142
|
-
isMobile:
|
|
1145
|
+
bgDark: Y,
|
|
1146
|
+
showLabel: _,
|
|
1147
|
+
isMobile: J,
|
|
1143
1148
|
sortOptions: !1,
|
|
1144
|
-
loading:
|
|
1149
|
+
loading: de.length === 0,
|
|
1150
|
+
shouldBeActive: !0
|
|
1145
1151
|
}
|
|
1146
1152
|
),
|
|
1147
1153
|
/* @__PURE__ */ a(
|
|
1148
|
-
|
|
1154
|
+
X,
|
|
1149
1155
|
{
|
|
1150
1156
|
label: "Make",
|
|
1151
|
-
items:
|
|
1152
|
-
refine:
|
|
1157
|
+
items: le,
|
|
1158
|
+
refine: Ze,
|
|
1153
1159
|
selected: e.make,
|
|
1154
1160
|
showPopular: !0,
|
|
1155
|
-
bgDark:
|
|
1156
|
-
showLabel:
|
|
1157
|
-
isMobile:
|
|
1161
|
+
bgDark: Y,
|
|
1162
|
+
showLabel: _,
|
|
1163
|
+
isMobile: J,
|
|
1158
1164
|
sortOptions: !1,
|
|
1159
|
-
loading: e.year &&
|
|
1165
|
+
loading: e.year && le.length === 0,
|
|
1166
|
+
shouldBeActive: !!e.year
|
|
1160
1167
|
}
|
|
1161
1168
|
),
|
|
1162
1169
|
/* @__PURE__ */ a(
|
|
1163
|
-
|
|
1170
|
+
X,
|
|
1164
1171
|
{
|
|
1165
1172
|
label: "Model",
|
|
1166
|
-
items:
|
|
1167
|
-
refine:
|
|
1173
|
+
items: fe,
|
|
1174
|
+
refine: Ye,
|
|
1168
1175
|
selected: e.model,
|
|
1169
1176
|
showPopular: !0,
|
|
1170
|
-
bgDark:
|
|
1171
|
-
showLabel:
|
|
1172
|
-
isMobile:
|
|
1177
|
+
bgDark: Y,
|
|
1178
|
+
showLabel: _,
|
|
1179
|
+
isMobile: J,
|
|
1173
1180
|
sortOptions: !1,
|
|
1174
|
-
loading: e.make &&
|
|
1181
|
+
loading: e.make && fe.length === 0,
|
|
1182
|
+
shouldBeActive: !!e.make
|
|
1175
1183
|
}
|
|
1176
1184
|
)
|
|
1177
|
-
] }) : /* @__PURE__ */ $
|
|
1185
|
+
] }) : /* @__PURE__ */ A($e, { children: [
|
|
1178
1186
|
/* @__PURE__ */ a(
|
|
1179
|
-
|
|
1187
|
+
X,
|
|
1180
1188
|
{
|
|
1181
1189
|
label: "Make",
|
|
1182
|
-
items:
|
|
1183
|
-
refine:
|
|
1190
|
+
items: le,
|
|
1191
|
+
refine: Ze,
|
|
1184
1192
|
selected: e.make,
|
|
1185
1193
|
showPopular: !0,
|
|
1186
|
-
bgDark:
|
|
1187
|
-
showLabel:
|
|
1188
|
-
isMobile:
|
|
1194
|
+
bgDark: Y,
|
|
1195
|
+
showLabel: _,
|
|
1196
|
+
isMobile: J,
|
|
1189
1197
|
sortOptions: !1,
|
|
1190
|
-
loading:
|
|
1198
|
+
loading: le.length === 0,
|
|
1199
|
+
shouldBeActive: !0
|
|
1191
1200
|
}
|
|
1192
1201
|
),
|
|
1193
1202
|
/* @__PURE__ */ a(
|
|
1194
|
-
|
|
1203
|
+
X,
|
|
1195
1204
|
{
|
|
1196
1205
|
label: "Model",
|
|
1197
|
-
items:
|
|
1198
|
-
refine:
|
|
1206
|
+
items: fe,
|
|
1207
|
+
refine: Ye,
|
|
1199
1208
|
selected: e.model,
|
|
1200
1209
|
showPopular: !0,
|
|
1201
|
-
bgDark:
|
|
1202
|
-
showLabel:
|
|
1203
|
-
isMobile:
|
|
1210
|
+
bgDark: Y,
|
|
1211
|
+
showLabel: _,
|
|
1212
|
+
isMobile: J,
|
|
1204
1213
|
sortOptions: !1,
|
|
1205
|
-
loading: e.make &&
|
|
1214
|
+
loading: e.make && fe.length === 0,
|
|
1215
|
+
shouldBeActive: !!e.make
|
|
1206
1216
|
}
|
|
1207
1217
|
),
|
|
1208
1218
|
/* @__PURE__ */ a(
|
|
1209
|
-
|
|
1219
|
+
X,
|
|
1210
1220
|
{
|
|
1211
1221
|
label: "Year",
|
|
1212
|
-
items:
|
|
1213
|
-
refine:
|
|
1222
|
+
items: de,
|
|
1223
|
+
refine: He,
|
|
1214
1224
|
selected: e.year,
|
|
1215
|
-
bgDark:
|
|
1216
|
-
showLabel:
|
|
1217
|
-
isMobile:
|
|
1225
|
+
bgDark: Y,
|
|
1226
|
+
showLabel: _,
|
|
1227
|
+
isMobile: J,
|
|
1218
1228
|
sortOptions: !1,
|
|
1219
|
-
loading: e.model &&
|
|
1229
|
+
loading: e.model && de.length === 0,
|
|
1230
|
+
shouldBeActive: !!e.model
|
|
1220
1231
|
}
|
|
1221
1232
|
)
|
|
1222
1233
|
] }),
|
|
@@ -1225,16 +1236,16 @@ function St({
|
|
|
1225
1236
|
switch (t) {
|
|
1226
1237
|
case "body":
|
|
1227
1238
|
r = /* @__PURE__ */ a(
|
|
1228
|
-
|
|
1239
|
+
X,
|
|
1229
1240
|
{
|
|
1230
1241
|
label: "Body",
|
|
1231
|
-
items:
|
|
1232
|
-
refine:
|
|
1242
|
+
items: Ie,
|
|
1243
|
+
refine: it,
|
|
1233
1244
|
selected: e.body,
|
|
1234
|
-
bgDark:
|
|
1235
|
-
showLabel:
|
|
1236
|
-
isMobile:
|
|
1237
|
-
loading:
|
|
1245
|
+
bgDark: Y,
|
|
1246
|
+
showLabel: _,
|
|
1247
|
+
isMobile: J,
|
|
1248
|
+
loading: !!(e.make && e.model && e.year) && Ie.length === 0,
|
|
1238
1249
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1239
1250
|
},
|
|
1240
1251
|
"body"
|
|
@@ -1242,16 +1253,16 @@ function St({
|
|
|
1242
1253
|
break;
|
|
1243
1254
|
case "series":
|
|
1244
1255
|
r = /* @__PURE__ */ a(
|
|
1245
|
-
|
|
1256
|
+
X,
|
|
1246
1257
|
{
|
|
1247
1258
|
label: "Series",
|
|
1248
|
-
items:
|
|
1249
|
-
refine:
|
|
1259
|
+
items: Le,
|
|
1260
|
+
refine: st,
|
|
1250
1261
|
selected: e.series,
|
|
1251
|
-
bgDark:
|
|
1252
|
-
showLabel:
|
|
1253
|
-
isMobile:
|
|
1254
|
-
loading:
|
|
1262
|
+
bgDark: Y,
|
|
1263
|
+
showLabel: _,
|
|
1264
|
+
isMobile: J,
|
|
1265
|
+
loading: !!(e.make && e.model && e.year) && Le.length === 0,
|
|
1255
1266
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1256
1267
|
},
|
|
1257
1268
|
"series"
|
|
@@ -1259,16 +1270,16 @@ function St({
|
|
|
1259
1270
|
break;
|
|
1260
1271
|
case "variant":
|
|
1261
1272
|
r = /* @__PURE__ */ a(
|
|
1262
|
-
|
|
1273
|
+
X,
|
|
1263
1274
|
{
|
|
1264
1275
|
label: "Variant",
|
|
1265
|
-
items:
|
|
1266
|
-
refine:
|
|
1276
|
+
items: Ve,
|
|
1277
|
+
refine: lt,
|
|
1267
1278
|
selected: e.variant,
|
|
1268
|
-
bgDark:
|
|
1269
|
-
showLabel:
|
|
1270
|
-
isMobile:
|
|
1271
|
-
loading:
|
|
1279
|
+
bgDark: Y,
|
|
1280
|
+
showLabel: _,
|
|
1281
|
+
isMobile: J,
|
|
1282
|
+
loading: !!(e.make && e.model && e.year) && Ve.length === 0,
|
|
1272
1283
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1273
1284
|
},
|
|
1274
1285
|
"variant"
|
|
@@ -1276,16 +1287,16 @@ function St({
|
|
|
1276
1287
|
break;
|
|
1277
1288
|
case "engine_capacity":
|
|
1278
1289
|
r = /* @__PURE__ */ a(
|
|
1279
|
-
|
|
1290
|
+
X,
|
|
1280
1291
|
{
|
|
1281
1292
|
label: "Engine Capacity",
|
|
1282
|
-
items:
|
|
1283
|
-
refine:
|
|
1293
|
+
items: Fe,
|
|
1294
|
+
refine: dt,
|
|
1284
1295
|
selected: e.engine_capacity,
|
|
1285
|
-
bgDark:
|
|
1286
|
-
showLabel:
|
|
1287
|
-
isMobile:
|
|
1288
|
-
loading:
|
|
1296
|
+
bgDark: Y,
|
|
1297
|
+
showLabel: _,
|
|
1298
|
+
isMobile: J,
|
|
1299
|
+
loading: !!(e.make && e.model && e.year) && Fe.length === 0,
|
|
1289
1300
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1290
1301
|
},
|
|
1291
1302
|
"engine_capacity"
|
|
@@ -1293,16 +1304,16 @@ function St({
|
|
|
1293
1304
|
break;
|
|
1294
1305
|
case "engine":
|
|
1295
1306
|
r = /* @__PURE__ */ a(
|
|
1296
|
-
|
|
1307
|
+
X,
|
|
1297
1308
|
{
|
|
1298
1309
|
label: "Engine",
|
|
1299
|
-
items:
|
|
1300
|
-
refine:
|
|
1310
|
+
items: De,
|
|
1311
|
+
refine: ct,
|
|
1301
1312
|
selected: e.engine,
|
|
1302
|
-
bgDark:
|
|
1303
|
-
showLabel:
|
|
1304
|
-
isMobile:
|
|
1305
|
-
loading:
|
|
1313
|
+
bgDark: Y,
|
|
1314
|
+
showLabel: _,
|
|
1315
|
+
isMobile: J,
|
|
1316
|
+
loading: !!(e.make && e.model && e.year) && De.length === 0,
|
|
1306
1317
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1307
1318
|
},
|
|
1308
1319
|
"engine"
|
|
@@ -1311,41 +1322,41 @@ function St({
|
|
|
1311
1322
|
}
|
|
1312
1323
|
return r;
|
|
1313
1324
|
}),
|
|
1314
|
-
|
|
1325
|
+
C && /* @__PURE__ */ a("div", { className: "vs:flex vs:h-full vs:flex-col vs:justify-end vs:md:col-span-3 vs:lg:col-span-1", children: /* @__PURE__ */ A(
|
|
1315
1326
|
"button",
|
|
1316
1327
|
{
|
|
1317
1328
|
className: "vehicle-search-btn",
|
|
1318
1329
|
onClick: () => {
|
|
1319
|
-
Me(!0),
|
|
1330
|
+
Me(!0), U && !H ? window.location.href = U + window.location.search : nt();
|
|
1320
1331
|
},
|
|
1321
1332
|
children: [
|
|
1322
|
-
/* @__PURE__ */ a("span", { children:
|
|
1323
|
-
|
|
1333
|
+
/* @__PURE__ */ a("span", { children: y }),
|
|
1334
|
+
Xe && /* @__PURE__ */ a(Pe, { className: "vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin" })
|
|
1324
1335
|
]
|
|
1325
1336
|
}
|
|
1326
1337
|
) })
|
|
1327
1338
|
]
|
|
1328
1339
|
}
|
|
1329
1340
|
),
|
|
1330
|
-
|
|
1341
|
+
O && /* @__PURE__ */ a(
|
|
1331
1342
|
"div",
|
|
1332
1343
|
{
|
|
1333
|
-
className:
|
|
1344
|
+
className: ne(
|
|
1334
1345
|
"vs:flex vs:w-full vs:justify-center vs:items-center",
|
|
1335
|
-
|
|
1346
|
+
L === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
|
|
1336
1347
|
"vs:mt-4 vs:md:mt-3 vs:md:pr-1.5"
|
|
1337
1348
|
),
|
|
1338
|
-
children: /* @__PURE__ */
|
|
1349
|
+
children: /* @__PURE__ */ A(
|
|
1339
1350
|
"a",
|
|
1340
1351
|
{
|
|
1341
1352
|
href: `https://use.partbot.io/?ref=${// append referrer to url, just the top level domain
|
|
1342
1353
|
typeof window < "u" ? window.location.href.split("/")[2] : "unknown"}&utm_source=vehicle-select&utm_medium=referral&utm_campaign=powered-by`,
|
|
1343
1354
|
target: "_blank",
|
|
1344
1355
|
rel: "noreferrer",
|
|
1345
|
-
className: `${
|
|
1356
|
+
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`,
|
|
1346
1357
|
children: [
|
|
1347
1358
|
/* @__PURE__ */ a("span", { children: "Powered by" }),
|
|
1348
|
-
/* @__PURE__ */ a(
|
|
1359
|
+
/* @__PURE__ */ a($t, { className: "vs:inline-flex vs:h-[13px]" })
|
|
1349
1360
|
]
|
|
1350
1361
|
}
|
|
1351
1362
|
)
|
|
@@ -1356,168 +1367,168 @@ function St({
|
|
|
1356
1367
|
)
|
|
1357
1368
|
] });
|
|
1358
1369
|
}
|
|
1359
|
-
let
|
|
1360
|
-
function
|
|
1361
|
-
var
|
|
1362
|
-
const v =
|
|
1370
|
+
let We = !1, me = !1;
|
|
1371
|
+
function At(b) {
|
|
1372
|
+
var T, re;
|
|
1373
|
+
const v = b.shadowRoot;
|
|
1363
1374
|
if (!v) {
|
|
1364
1375
|
console.error("[ShadowDOMPatch] No shadow root found");
|
|
1365
1376
|
return;
|
|
1366
1377
|
}
|
|
1367
|
-
const
|
|
1368
|
-
if (!
|
|
1378
|
+
const p = v.children[1];
|
|
1379
|
+
if (!p) {
|
|
1369
1380
|
console.error("[ShadowDOMPatch] No mount point found in shadow root");
|
|
1370
1381
|
return;
|
|
1371
1382
|
}
|
|
1372
1383
|
if (new MutationObserver((u) => {
|
|
1373
|
-
u.forEach((
|
|
1374
|
-
|
|
1375
|
-
|
|
1384
|
+
u.forEach((y) => {
|
|
1385
|
+
y.addedNodes.forEach((C) => {
|
|
1386
|
+
C.nodeType === 1 && C.id === "headlessui-portal-root" && (p.appendChild(C), me = !0);
|
|
1376
1387
|
});
|
|
1377
|
-
}), u.forEach((
|
|
1378
|
-
|
|
1379
|
-
|
|
1388
|
+
}), u.forEach((y) => {
|
|
1389
|
+
y.removedNodes.forEach((C) => {
|
|
1390
|
+
C.nodeType === 1 && C.id === "headlessui-portal-root" && (p.querySelector(
|
|
1380
1391
|
"#headlessui-portal-root"
|
|
1381
|
-
) || (
|
|
1392
|
+
) || (me = !1));
|
|
1382
1393
|
});
|
|
1383
1394
|
});
|
|
1384
1395
|
}).observe(document.body, {
|
|
1385
1396
|
childList: !0
|
|
1386
1397
|
}), new MutationObserver((u) => {
|
|
1387
|
-
u.forEach((
|
|
1388
|
-
|
|
1389
|
-
|
|
1398
|
+
u.forEach((y) => {
|
|
1399
|
+
y.removedNodes.forEach((C) => {
|
|
1400
|
+
C.nodeType === 1 && C.id === "headlessui-portal-root" && (me = !1);
|
|
1390
1401
|
});
|
|
1391
1402
|
});
|
|
1392
|
-
}).observe(
|
|
1403
|
+
}).observe(p, {
|
|
1393
1404
|
childList: !0,
|
|
1394
1405
|
subtree: !0
|
|
1395
|
-
}),
|
|
1406
|
+
}), We)
|
|
1396
1407
|
return;
|
|
1397
|
-
const
|
|
1408
|
+
const R = (T = Object.getOwnPropertyDescriptor(
|
|
1398
1409
|
Document.prototype,
|
|
1399
1410
|
"activeElement"
|
|
1400
|
-
)) == null ? void 0 :
|
|
1411
|
+
)) == null ? void 0 : T.get;
|
|
1401
1412
|
Object.defineProperty(Document.prototype, "activeElement", {
|
|
1402
1413
|
get: function() {
|
|
1403
|
-
const u =
|
|
1404
|
-
return u ===
|
|
1414
|
+
const u = R == null ? void 0 : R.call(this);
|
|
1415
|
+
return u === b ? v.activeElement : u;
|
|
1405
1416
|
}
|
|
1406
1417
|
});
|
|
1407
|
-
const
|
|
1418
|
+
const N = (re = Object.getOwnPropertyDescriptor(
|
|
1408
1419
|
Event.prototype,
|
|
1409
1420
|
"target"
|
|
1410
|
-
)) == null ? void 0 :
|
|
1421
|
+
)) == null ? void 0 : re.get;
|
|
1411
1422
|
Object.defineProperty(Event.prototype, "target", {
|
|
1412
1423
|
get: function() {
|
|
1413
|
-
const u =
|
|
1414
|
-
return u ===
|
|
1424
|
+
const u = N == null ? void 0 : N.call(this);
|
|
1425
|
+
return u === b ? this.composedPath()[0] : u;
|
|
1415
1426
|
}
|
|
1416
1427
|
});
|
|
1417
|
-
const
|
|
1428
|
+
const O = (u) => {
|
|
1418
1429
|
try {
|
|
1419
1430
|
return document.body && u === document.body.style;
|
|
1420
1431
|
} catch {
|
|
1421
1432
|
return !1;
|
|
1422
1433
|
}
|
|
1423
|
-
},
|
|
1424
|
-
CSSStyleDeclaration.prototype.setProperty = function(u,
|
|
1425
|
-
if (!(
|
|
1426
|
-
return
|
|
1434
|
+
}, _ = CSSStyleDeclaration.prototype.setProperty;
|
|
1435
|
+
CSSStyleDeclaration.prototype.setProperty = function(u, y, C) {
|
|
1436
|
+
if (!(O(this) && u === "overflow" && y === "hidden" && me))
|
|
1437
|
+
return _.call(this, u, y, C);
|
|
1427
1438
|
};
|
|
1428
|
-
const
|
|
1439
|
+
const V = Object.getOwnPropertyDescriptor(
|
|
1429
1440
|
CSSStyleDeclaration.prototype,
|
|
1430
1441
|
"overflow"
|
|
1431
1442
|
);
|
|
1432
|
-
|
|
1443
|
+
V && Object.defineProperty(CSSStyleDeclaration.prototype, "overflow", {
|
|
1433
1444
|
get: function() {
|
|
1434
|
-
return
|
|
1445
|
+
return V.get.call(this);
|
|
1435
1446
|
},
|
|
1436
1447
|
set: function(u) {
|
|
1437
|
-
if (!(
|
|
1438
|
-
return
|
|
1448
|
+
if (!(O(this) && u === "hidden" && me))
|
|
1449
|
+
return V.set.call(this, u);
|
|
1439
1450
|
}
|
|
1440
|
-
}),
|
|
1451
|
+
}), We = !0;
|
|
1441
1452
|
}
|
|
1442
|
-
const
|
|
1443
|
-
class
|
|
1453
|
+
const Et = "/css/vehicle-search.css", Yt = Et;
|
|
1454
|
+
class jt extends HTMLElement {
|
|
1444
1455
|
connectedCallback() {
|
|
1445
1456
|
if (!document.getElementById("vehicle-search-inter-font")) {
|
|
1446
1457
|
const E = document.createElement("link");
|
|
1447
1458
|
E.id = "vehicle-search-inter-font", E.rel = "stylesheet", E.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap", document.head.appendChild(E);
|
|
1448
1459
|
}
|
|
1449
1460
|
let v = document.createElement("style");
|
|
1450
|
-
v.textContent =
|
|
1451
|
-
const
|
|
1452
|
-
let
|
|
1453
|
-
if (this.hasAttribute(
|
|
1454
|
-
const
|
|
1455
|
-
if (/^#[0-9A-F]{6}$/i.test(
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1461
|
+
v.textContent = zt;
|
|
1462
|
+
const p = document.createElement("div"), U = this.attachShadow({ mode: "open" }), L = (E, K, w) => {
|
|
1463
|
+
let Q;
|
|
1464
|
+
if (this.hasAttribute(K)) {
|
|
1465
|
+
const B = this.getAttribute(K);
|
|
1466
|
+
if (/^#[0-9A-F]{6}$/i.test(B)) {
|
|
1467
|
+
const x = parseInt(B.slice(1, 3), 16), le = parseInt(B.slice(3, 5), 16), ve = parseInt(B.slice(5, 7), 16);
|
|
1468
|
+
Q = `${x} ${le} ${ve}`;
|
|
1458
1469
|
}
|
|
1459
1470
|
}
|
|
1460
|
-
return
|
|
1471
|
+
return Q = Q || w, `:host { --${E}: ${Q}; } .partbot-mmyvs-container { --${E}: ${Q}; }`;
|
|
1461
1472
|
};
|
|
1462
|
-
let
|
|
1473
|
+
let R = L(
|
|
1463
1474
|
"partbot-theme",
|
|
1464
1475
|
"data-button-color",
|
|
1465
1476
|
"0 0 0"
|
|
1466
|
-
),
|
|
1477
|
+
), N = L(
|
|
1467
1478
|
"partbot-button-color",
|
|
1468
1479
|
"data-button-color",
|
|
1469
1480
|
"0 0 0"
|
|
1470
|
-
),
|
|
1481
|
+
), O = L(
|
|
1471
1482
|
"partbot-button-hover-color",
|
|
1472
1483
|
"data-button-hover-color",
|
|
1473
1484
|
"0 0 0"
|
|
1474
|
-
),
|
|
1485
|
+
), _ = L(
|
|
1475
1486
|
"partbot-button-label-color",
|
|
1476
1487
|
"data-button-label-color",
|
|
1477
1488
|
"255 255 255"
|
|
1478
|
-
),
|
|
1489
|
+
), V = L(
|
|
1479
1490
|
"partbot-button-hover-label-color",
|
|
1480
1491
|
"data-button-hover-label-color",
|
|
1481
1492
|
"255 255 255"
|
|
1482
|
-
),
|
|
1493
|
+
), T = L(
|
|
1483
1494
|
"partbot-mobile-background-color",
|
|
1484
1495
|
"data-mobile-background-color",
|
|
1485
1496
|
"0 0 0"
|
|
1486
|
-
),
|
|
1487
|
-
const H = this.getAttribute("data-input-shadow"),
|
|
1488
|
-
let
|
|
1489
|
-
const
|
|
1490
|
-
let
|
|
1491
|
-
if (
|
|
1492
|
-
if (/^#[0-9A-F]{6}$/i.test(
|
|
1493
|
-
const E = parseInt(
|
|
1494
|
-
|
|
1495
|
-
} else /^\d+\s+\d+\s+\d+$/.test(
|
|
1496
|
-
let
|
|
1497
|
-
const
|
|
1498
|
-
let
|
|
1499
|
-
v.textContent +=
|
|
1500
|
-
const
|
|
1501
|
-
if (!
|
|
1502
|
-
console.warn("Missing attributes: " + (
|
|
1497
|
+
), 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"}; }`;
|
|
1498
|
+
const H = this.getAttribute("data-input-shadow"), ee = H === "none" ? "none" : H || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
1499
|
+
let G = `:host { --partbot-input-shadow: ${ee}; } .partbot-mmyvs-container { --partbot-input-shadow: ${ee}; }`;
|
|
1500
|
+
const f = this.getAttribute("data-input-border-color");
|
|
1501
|
+
let D = "229 231 235";
|
|
1502
|
+
if (f)
|
|
1503
|
+
if (/^#[0-9A-F]{6}$/i.test(f)) {
|
|
1504
|
+
const E = parseInt(f.slice(1, 3), 16), K = parseInt(f.slice(3, 5), 16), w = parseInt(f.slice(5, 7), 16);
|
|
1505
|
+
D = `${E} ${K} ${w}`;
|
|
1506
|
+
} else /^\d+\s+\d+\s+\d+$/.test(f) && (D = f);
|
|
1507
|
+
let g = `:host { --partbot-input-border-color: ${D}; } .partbot-mmyvs-container { --partbot-input-border-color: ${D}; }`;
|
|
1508
|
+
const s = this.getAttribute("data-input-border-width") || "1px";
|
|
1509
|
+
let F = `:host { --partbot-input-border-width: ${s}; } .partbot-mmyvs-container { --partbot-input-border-width: ${s}; }`;
|
|
1510
|
+
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);
|
|
1511
|
+
const z = this.getAttribute("data-api-key");
|
|
1512
|
+
if (!z) {
|
|
1513
|
+
console.warn("Missing attributes: " + (z ? "" : "data-api-key "));
|
|
1503
1514
|
return;
|
|
1504
1515
|
}
|
|
1505
|
-
const
|
|
1506
|
-
for (let E = 0; E <
|
|
1507
|
-
const { name:
|
|
1508
|
-
if (
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1516
|
+
const ie = this.attributes, $ = {};
|
|
1517
|
+
for (let E = 0; E < ie.length; E++) {
|
|
1518
|
+
const { name: K, value: w } = ie[E];
|
|
1519
|
+
if (K.startsWith("data-")) {
|
|
1520
|
+
const Q = K.slice(5).replace(/-([a-z])/g, (B) => B[1].toUpperCase());
|
|
1521
|
+
$[Q] = w === "true" ? !0 : w === "false" ? !1 : w;
|
|
1511
1522
|
}
|
|
1512
1523
|
}
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1524
|
+
At(this);
|
|
1525
|
+
const q = /* @__PURE__ */ a(Mt, { ...$ });
|
|
1526
|
+
mt.render(q, p);
|
|
1516
1527
|
}
|
|
1517
1528
|
}
|
|
1518
|
-
customElements.define("vehicle-search",
|
|
1529
|
+
customElements.define("vehicle-search", jt);
|
|
1519
1530
|
export {
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1531
|
+
Mt as VehicleSearch,
|
|
1532
|
+
Mt as default,
|
|
1533
|
+
Yt as vehicleSearchCssUrl
|
|
1523
1534
|
};
|