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BAAMzD,EAAKT,EAALsD,GAAkBa,QAAQH,EAAMI,MAAQ,EAAE,GAAE,KACtF,KAEL,IACyEC,EADzEC,EAAA/E,EACkBkB,EAAKP,EAAL5I,MAAe4E,iBAAiB,yBAAuB,QAAAqI,EAAA,WAAE,IAAnEC,EAAMH,EAAA5E,MACPgF,EAAShE,EAAKP,EAALoD,GAAe9G,eAAegI,EAAOE,QAAQC,cAC5DH,EAAOzK,iBAAiB,SAAS,SAAC2F,GAC9BA,EAAEC,iBACF8E,EAAOG,OACX,GACJ,EANA,IAAAN,EAAA1N,MAAAyN,EAAAC,EAAAxN,KAAA0I,MAAA+E,GAMC,OAAA3E,GAAA0E,EAAA5E,EAAAE,EAAA,SAAA0E,EAAAzE,GAAA,CACL,C,8ECnIEgF,EAA0E,QAA5DC,EAAGzM,SAASqC,cAAc,0CAAkC,IAAAoK,OAAA,EAAzDA,EAA2DnB,WAElFxG,OAAOpD,iBAAiB5D,EAAAA,GAAYE,oBAAoB,SAACqJ,GAAM,IAAAqF,EAC3D,IAAI1E,GAA0B,QAAR0E,EAAArF,EAAEsF,cAAM,IAAAD,OAAA,EAARA,EAAU1M,WAAYA,UAAUU,MAC1D,IAEK8L,GACD1H,OAAO0F,cAAc,IAAIC,YAAY3M,EAAAA,GAAYE,oB","sources":["webpack:///./assets/default/js/events.js","webpack:///./assets/default/js/components/flowbite/drawer.js","webpack:///./assets/default/js/form/form-submit-ajax.js","webpack:///./assets/default/js/stock/detail/VehicleDetailPage.js","webpack:///./assets/default/js/stock/detail.js"],"sourcesContent":["const ConsentEvents = {\n CONSENT_UPDATED: 'AutoWise.consentUpdated',\n};\n\nconst EmbedEvents = {\n INITIALIZE: 'AutoWise.initialize',\n INITIALIZED: 'AutoWise.initialized',\n PAGE_TITLE_UPDATED: 'AutoWise.pageTitleUpdated',\n EMBED_PAGE_LOADED: 'AutoWise.pageLoaded',\n STYLESHEETS_LOADED: 'AutoWise.stylesheetsLoaded',\n JAVASCRIPT_LOADED: 'AutoWise.javascriptLoaded',\n MAIN_CONTENT_UPDATED: 'AutoWise.mainContentUpdated',\n /* Overrides the HREFs of the vehicle list links */\n VEHICLE_LIST_LINKS_BOUND: 'AutoWise.vehicleListLinksBound',\n VEHICLE_LIST_PAGE_LOADED: 'AutoWise.vehicleListPageLoaded',\n /* Handle submit of the javascript forms */\n VEHICLE_DETAIL_PAGE_FORM_BOUND: 'AutoWise.vehicleDetailPageFormBound',\n /* When a user submits a form that we have previously bound with VEHICLE_DETAIL_PAGE_FORM_BOUND */\n VEHICLE_DETAIL_PAGE_FORM_SUBMITTED: 'AutoWise.vehicleDetailPageFormSubmitted',\n FINANCIAL_LEASE_AMOUNT_CALCULATED: 'AutoWise.financialLeaseAmountCalculated',\n FINANCIAL_LEASE_CALCULATOR_LOADED: 'AutoWise.financialLeaseCalculatorLoaded',\n};\n\nconst StockEvents = {\n LIST_PAGE_LOADED: 'AutoWise.vehicleListPageLoaded',\n DETAIL_PAGE_LOADED: 'AutoWise.vehicleDetailPageLoaded',\n DETAIL_PAGE_COMPONENTS: {\n SWIPER_INITIALIZED: 'AutoWise.vehicleDetailPageSwiperInitialized',\n },\n};\n\nexport { ConsentEvents, EmbedEvents, StockEvents };\n","import instances from 'flowbite/lib/cjs/dom/instances';\n\nvar __assign =\n (this && this.__assign) ||\n function () {\n __assign =\n Object.assign ||\n function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n\nvar Default = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'backdrop-blur bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: function () {},\n onHide: function () {},\n onToggle: function () {},\n};\nvar DefaultInstanceOptions = {\n id: null,\n override: true,\n};\nvar Drawer = /** @class */ (function () {\n function Drawer(document, targetEl, options, instanceOptions) {\n if (targetEl === void 0) {\n targetEl = null;\n }\n if (options === void 0) {\n options = Default;\n }\n if (instanceOptions === void 0) {\n instanceOptions = DefaultInstanceOptions;\n }\n this.document = document;\n this._eventListenerInstances = [];\n this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n this._targetEl = targetEl;\n this._options = __assign(__assign({}, Default), options);\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance('Drawer', this, this._instanceId, instanceOptions.override);\n }\n Drawer.prototype.init = function () {\n var _this = this;\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map(function (c) {\n _this._targetEl.classList.add(c);\n });\n this._handleEscapeKey = function (event) {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (_this.isVisible()) {\n // if the Drawer is visible\n _this.hide(); // hide the Drawer\n }\n }\n };\n // add keyboard event listener to document\n this.document.addEventListener('keydown', this._handleEscapeKey);\n this._initialized = true;\n }\n };\n Drawer.prototype.destroy = function () {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n // Remove the keyboard event listener\n this.document.removeEventListener('keydown', this._handleEscapeKey);\n this._initialized = false;\n }\n };\n Drawer.prototype.removeInstance = function () {\n instances.removeInstance('Drawer', this._instanceId);\n };\n Drawer.prototype.destroyAndRemoveInstance = function () {\n this.destroy();\n this.removeInstance();\n };\n Drawer.prototype.hide = function () {\n var _this = this;\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) {\n _this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) {\n _this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(function (c) {\n _this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(this._options.placement).inactive.map(function (c) {\n _this._targetEl.classList.add(c);\n });\n }\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.querySelector('body').style.overflow = null;\n }\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n this._visible = false;\n // callback function\n this._options.onHide(this);\n };\n Drawer.prototype.show = function () {\n var _this = this;\n if (this._options.edge) {\n this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) {\n _this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) {\n _this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(function (c) {\n _this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(this._options.placement).inactive.map(function (c) {\n _this._targetEl.classList.remove(c);\n });\n }\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.querySelector('body').style.overflow = 'hidden';\n }\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n this._visible = true;\n // callback function\n this._options.onShow(this);\n };\n Drawer.prototype.toggle = function () {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n };\n Drawer.prototype._createBackdrop = function () {\n var _a;\n var _this = this;\n if (!this._visible) {\n var backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' '));\n this.document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', function () {\n _this.hide();\n });\n }\n };\n Drawer.prototype._destroyBackdropEl = function () {\n if (this._visible && this.document.querySelector('[drawer-backdrop]') !== null) {\n this.document.querySelector('[drawer-backdrop]').remove();\n }\n };\n Drawer.prototype._getPlacementClasses = function (placement) {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n };\n Drawer.prototype.isHidden = function () {\n return !this._visible;\n };\n Drawer.prototype.isVisible = function () {\n return this._visible;\n };\n Drawer.prototype.addEventListenerInstance = function (element, type, handler) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n };\n Drawer.prototype.removeAllEventListenerInstances = function () {\n this._eventListenerInstances.map(function (eventListenerInstance) {\n eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler);\n });\n this._eventListenerInstances = [];\n };\n Drawer.prototype.getAllEventListenerInstances = function () {\n return this._eventListenerInstances;\n };\n Drawer.prototype.updateOnShow = function (callback) {\n this._options.onShow = callback;\n };\n Drawer.prototype.updateOnHide = function (callback) {\n this._options.onHide = callback;\n };\n Drawer.prototype.updateOnToggle = function (callback) {\n this._options.onToggle = callback;\n };\n return Drawer;\n})();\nexport function initDrawers(document) {\n document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) {\n // mandatory\n var drawerId = $triggerEl.getAttribute('data-drawer-target');\n var $drawerEl = document.getElementById(drawerId);\n if ($drawerEl) {\n var placement = $triggerEl.getAttribute('data-drawer-placement');\n var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling');\n var backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n var edge = $triggerEl.getAttribute('data-drawer-edge');\n var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset');\n new Drawer(document, $drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling ? (bodyScrolling === 'true' ? true : false) : Default.bodyScrolling,\n backdrop: backdrop ? (backdrop === 'true' ? true : false) : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n });\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?',\n ),\n );\n }\n });\n document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) {\n var drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n var $drawerEl = document.getElementById(drawerId);\n if ($drawerEl) {\n var drawer_1 = instances.getInstance('Drawer', drawerId);\n if (drawer_1) {\n var toggleDrawer = function () {\n drawer_1.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer);\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' has not been initialized. Please initialize it using the data-drawer-target attribute.',\n ),\n );\n }\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?',\n ),\n );\n }\n });\n document.querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]').forEach(function ($triggerEl) {\n var drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n var $drawerEl = document.getElementById(drawerId);\n if ($drawerEl) {\n var drawer_2 = instances.getInstance('Drawer', drawerId);\n if (drawer_2) {\n var hideDrawer = function () {\n drawer_2.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer);\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' has not been initialized. Please initialize it using the data-drawer-target attribute.',\n ),\n );\n }\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' not found. Are you sure that the data-drawer-target attribute points to the correct drawer id',\n ),\n );\n }\n });\n document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) {\n var drawerId = $triggerEl.getAttribute('data-drawer-show');\n var $drawerEl = document.getElementById(drawerId);\n if ($drawerEl) {\n var drawer_3 = instances.getInstance('Drawer', drawerId);\n if (drawer_3) {\n var showDrawer = function () {\n drawer_3.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer);\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' has not been initialized. Please initialize it using the data-drawer-target attribute.',\n ),\n );\n }\n } else {\n console.error(\n 'Drawer with id '.concat(\n drawerId,\n ' not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?',\n ),\n );\n }\n });\n}\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\nexport default Drawer;\n//# sourceMappingURL=index.js.map\n","function submitForm(formElement, submitter) {\n const submitButton = submitter || formElement.querySelector('[type=\"submit\"]');\n\n fetch(formElement.action, {\n cache: 'no-cache',\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n },\n body: new FormData(formElement, submitButton),\n method: 'POST',\n })\n .then((response) => {\n if (response.status === 422) {\n return response.text();\n }\n\n if (response.status === 201 && response.headers.has('Location')) {\n window.location.href = new URL(response.headers.get('Location'), window.location.origin).toString();\n return;\n }\n\n if (response.status === 200) {\n window.location.reload();\n return;\n }\n\n throw new Error('Something went wrong');\n })\n .then((response) => {\n // Form error\n updateFormContent(response, formElement);\n })\n .catch((error) => {\n console.log(error);\n });\n}\n\nfunction updateFormContent(response, form) {\n const parser = new DOMParser();\n const htmlResponse = parser.parseFromString(response, 'text/html');\n const formResponse = htmlResponse.querySelector(`#${form.id}`);\n\n if (formResponse !== null) {\n form.innerHTML = formResponse.innerHTML;\n }\n}\n\nfor (const form of document.querySelectorAll('[data-form-submit-ajax]')) {\n form.addEventListener('submit', function (e) {\n e.preventDefault();\n\n submitForm(this, e.submitter);\n });\n}\n","import '../../form/form-submit-ajax';\nimport '../../../styles/stock/detail.css';\nimport 'swiper/css';\nimport 'swiper/css/navigation';\nimport 'swiper/css/thumbs';\nimport 'swiper/css/pagination';\nimport '@fancyapps/ui/dist/fancybox/fancybox.css';\n\nimport Swiper from 'swiper';\nimport { Keyboard, Navigation, Pagination, Thumbs } from 'swiper/modules';\n\nimport { Fancybox } from '@fancyapps/ui';\nimport '../../components/flowbite/drawer';\nimport { StockEvents } from '../../events';\nimport { isInsideIframe } from '../../utils';\n\nexport class VehicleDetailPage {\n /**\n * @type {Swiper}\n */\n #thumbnailSwiper = null;\n /**\n * @type {Swiper}\n */\n #stockSwiper = null;\n /**\n * @type {number|null}\n */\n #swiperWaiter = null;\n /**\n * @type {Document|HTMLElement}\n */\n #document;\n\n /**\n * @param {Document|ShadowRoot} document\n */\n constructor(document) {\n this.#document = document;\n }\n\n init() {\n if (!this.#document.querySelector('#stock-image-carousel')) {\n throw new Error('Stock image carousel not found');\n }\n\n this.#initializeSwiper();\n this.#bindNavigation();\n this.#setupFancybox();\n this.#initializeDrawers();\n }\n\n #initializeDrawers() {\n initDrawers(this.#document);\n }\n\n #initializeSwiper() {\n const thumbnailContainer = this.#document.getElementById('stock-thumbnail-carousel');\n const stockImageContainer = this.#document.getElementById('stock-image-carousel');\n const primarySliderOptions = {};\n\n if (thumbnailContainer) {\n this.#thumbnailSwiper = new Swiper(thumbnailContainer, {\n spaceBetween: 10,\n slidesPerView: 2,\n watchSlidesProgress: true,\n breakpoints: {\n '@0.5': {\n slidesPerView: 2,\n },\n '@0.75': {\n slidesPerView: 3,\n },\n },\n });\n\n primarySliderOptions.thumbs = {\n swiper: this.#thumbnailSwiper,\n };\n }\n\n this.#stockSwiper = new Swiper(stockImageContainer, {\n ...primarySliderOptions,\n modules: [Keyboard, Navigation, Thumbs, Pagination],\n slidesPerView: 1,\n freeMode: true,\n watchSlidesProgress: true,\n keyboard: {\n enabled: true,\n onlyInViewport: true,\n },\n navigation: {\n nextEl: stockImageContainer.querySelector('.swiper-button-next'),\n prevEl: stockImageContainer.querySelector('.swiper-button-prev'),\n },\n pagination: {\n el: stockImageContainer.querySelector('.swiper-pagination'),\n clickable: true,\n dynamicBullets: true,\n dynamicMainBullets: 3,\n },\n on: {\n afterInit: () => {\n window.dispatchEvent(new CustomEvent(StockEvents.DETAIL_PAGE_COMPONENTS.SWIPER_INITIALIZED));\n },\n },\n });\n }\n\n #bindNavigation() {\n for (const element of this.#document.querySelectorAll('.vehicle-navigation [data-navbar] a[href^=\"#\"]')) {\n element.addEventListener('click', (e) => {\n e.preventDefault();\n const item = element.attributes.getNamedItem('href').textContent;\n this.#document.querySelector(item).scrollIntoView();\n });\n }\n }\n\n #setupFancybox() {\n Fancybox.bind(this.#document.getElementById('stock-image-carousel'), '[data-fancybox]', {\n parentEl: this.#document.host?.shadowRoot.querySelector('body') || null,\n Toolbar: {\n display: {\n right: ['close'],\n },\n },\n on: {\n done: (fancybox, slide) => {\n if (this.#swiperWaiter) {\n clearTimeout(this.#swiperWaiter);\n }\n this.#swiperWaiter = setTimeout(() => this.#stockSwiper.slideTo(slide.index - 1), 100);\n },\n },\n });\n for (const button of this.#document.querySelectorAll('[data-fancybox-open]')) {\n const target = this.#document.getElementById(button.dataset.fancyboxOpen);\n button.addEventListener('click', (e) => {\n e.preventDefault();\n target.click();\n })\n }\n }\n}\n","import { StockEvents } from '../events';\nimport { VehicleDetailPage } from './detail/VehicleDetailPage';\nimport '../../image/404/32/car.svg';\nimport '../../image/404/32/van.svg';\nimport '../../image/404/32/tractor.svg';\nimport '../../image/404/43/car.svg';\nimport '../../image/404/43/van.svg';\nimport '../../image/404/43/tractor.svg';\nimport '../../image/404/169/car.svg';\nimport '../../image/404/169/van.svg';\nimport '../../image/404/169/tractor.svg';\n\nconst embedContainer = document.querySelector('[data-autowise-embed-container]')?.shadowRoot;\n\nwindow.addEventListener(StockEvents.DETAIL_PAGE_LOADED, (e) => {\n new VehicleDetailPage(e.detail?.document || document).init();\n});\n\nif (!embedContainer) {\n window.dispatchEvent(new CustomEvent(StockEvents.DETAIL_PAGE_LOADED));\n}\n"],"names":["ConsentEvents","CONSENT_UPDATED","EmbedEvents","INITIALIZE","INITIALIZED","PAGE_TITLE_UPDATED","EMBED_PAGE_LOADED","STYLESHEETS_LOADED","JAVASCRIPT_LOADED","MAIN_CONTENT_UPDATED","VEHICLE_LIST_LINKS_BOUND","VEHICLE_LIST_PAGE_LOADED","VEHICLE_DETAIL_PAGE_FORM_BOUND","VEHICLE_DETAIL_PAGE_FORM_SUBMITTED","FINANCIAL_LEASE_AMOUNT_CALCULATED","FINANCIAL_LEASE_CALCULATOR_LOADED","StockEvents","LIST_PAGE_LOADED","DETAIL_PAGE_LOADED","DETAIL_PAGE_COMPONENTS","SWIPER_INITIALIZED","__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","Default","placement","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","onShow","onHide","onToggle","DefaultInstanceOptions","id","override","Drawer","document","targetEl","options","instanceOptions","_eventListenerInstances","_instanceId","_targetEl","_options","_visible","_initialized","init","instances","addInstance","_this","setAttribute","classList","add","_getPlacementClasses","base","map","c","_handleEscapeKey","event","key","isVisible","hide","addEventListener","destroy","removeAllEventListenerInstances","_destroyBackdropEl","removeEventListener","removeInstance","destroyAndRemoveInstance","active","remove","inactive","removeAttribute","querySelector","style","overflow","show","_createBackdrop","toggle","_a","backdropEl","createElement","split","append","isHidden","addEventListenerInstance","element","type","handler","push","eventListenerInstance","getAllEventListenerInstances","updateOnShow","callback","updateOnHide","updateOnToggle","initDrawers","querySelectorAll","forEach","$triggerEl","drawerId","getAttribute","$drawerEl","getElementById","console","error","concat","drawer_1","getInstance","toggleDrawer","drawer_2","hideDrawer","drawer_3","showDrawer","window","submitForm","formElement","submitter","submitButton","fetch","action","cache","headers","body","FormData","method","then","response","status","text","has","location","href","URL","get","origin","toString","Error","reload","form","htmlResponse","DOMParser","parseFromString","formResponse","innerHTML","updateFormContent","catch","log","_step","_iterator","_createForOfIteratorHelper","done","value","e","preventDefault","err","f","_thumbnailSwiper","WeakMap","_stockSwiper","_swiperWaiter","_document","_VehicleDetailPage_brand","WeakSet","VehicleDetailPage","_classCallCheck","_classPrivateFieldInitSpec","_classPrivateFieldSet","_classPrivateFieldGet","_assertClassBrand","_initializeSwiper","_bindNavigation","_setupFancybox","_initializeDrawers","thumbnailContainer","stockImageContainer","primarySliderOptions","Swiper","spaceBetween","slidesPerView","watchSlidesProgress","breakpoints","thumbs","swiper","_objectSpread","modules","Keyboard","Navigation","Thumbs","Pagination","freeMode","keyboard","enabled","onlyInViewport","navigation","nextEl","prevEl","pagination","el","clickable","dynamicBullets","dynamicMainBullets","on","afterInit","dispatchEvent","CustomEvent","_loop","item","attributes","getNamedItem","textContent","scrollIntoView","_classPrivateFieldGet2","_this2","Fancybox","bind","parentEl","host","shadowRoot","Toolbar","display","right","fancybox","slide","clearTimeout","setTimeout","slideTo","index","_step2","_iterator2","_loop2","button","target","dataset","fancyboxOpen","click","embedContainer","_document$querySelect","_e$detail","detail"],"sourceRoot":""}