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CD,UAAW,CAAExhB,MAAOd,OAAOujB,OAAOjB,KAGxC,CAEUnL,CApHa,CACrBiM,KAAM,SAAUtiB,GAId,MAHiB,MAAbA,EAAM,KACRA,EAAQA,EAAMuC,MAAM,GAAI,IAEnBvC,EAAMrH,QAAQ,mBAAoBV,mBAC3C,EACAiqB,MAAO,SAAUliB,GACf,OAAO6hB,mBAAmB7hB,GAAOrH,QAC/B,2CACAV,mBAEJ,GAwG+B,CAAE0gB,KAAM","sources":["webpack://disp0001/./src/flutter/flutter.consts.js","webpack://disp0001/./src/widgets/flutter-preview-pane/flutter-preview-pane.js","webpack://disp0001/./src/widgets/flutter-accommodation/flutter-accommodation-single-listing.js","webpack://disp0001/./src/flutter/flutter.events.handlers.js","webpack://disp0001/./src/widgets/flutter-deals/flutter.deals.js","webpack://disp0001/./src/flutter/flutter.utils.js","webpack://disp0001/./src/plugins/semantic/dimmer.js","webpack://disp0001/./src/plugins/semantic/modal.js","webpack://disp0001/./src/plugins/semantic/transition.js","webpack://disp0001/./src/scripts/dbs/dbs.events.js","webpack://disp0001/./src/scripts/dbs/dbs.events.shepherd.js","webpack://disp0001/./src/scripts/dbs/dbs.layout.js","webpack://disp0001/./src/scripts/dbs/dbs.request.js","webpack://disp0001/./src/scripts/dbs/dbs.response.js","webpack://disp0001/./src/scripts/dbs/dbs.utilities.js","webpack://disp0001/./src/scripts/dbs/dbs.utilities.querystring.js","webpack://disp0001/./src/views/global.js","webpack://disp0001/./src/widgets/flutter-checkout/flutter-checkout.js","webpack://disp0001/./src/widgets/flutter-gift-voucher/flutter-gift-voucher.js","webpack://disp0001/./src/widgets/footer/footer.js","webpack://disp0001/./src/widgets/gdpr/gdpr.js","webpack://disp0001/./src/widgets/header/header.js","webpack://disp0001/external var \"jQuery\"","webpack://disp0001/./node_modules/js-cookie/dist/js.cookie.mjs"],"sourcesContent":["const FLUTTER_IFRAME_WRAPPER_MAP = {\r\n 'deals_home': \"#flutter_homepage_deals_widget_wrapper\",\r\n 'deals_explore': \"#flutter_deals_exploration_widget\",\r\n 'vouchers': \"#flutter_gift_voucher_widget\",\r\n 'preview_panel': \"#flutter_preview_frame_wrapper\",\r\n 'accommodation_single_listing': \"#flutter_accommodation_single_widget_wrapper\",\r\n 'checkout' : '#flutter_checkout_widget'\r\n\r\n};\r\n\r\nexport { FLUTTER_IFRAME_WRAPPER_MAP };\r\n","import { FLUTTER_IFRAME_WRAPPER_MAP } from './../../flutter/flutter.consts.js';\r\nimport {\r\n capitalizeWord,\r\n addLoadingSpinner,\r\n removeLoadingSpinner,\r\n handleProceedToPay,\r\n sendToGa4\r\n} from './../../flutter/flutter.utils.js';\r\n\r\nimport('../../scripts/dbs/dbs.utilities.querystring')\r\n// FlutterDeals.js\r\nexport default class FlutterPreviewPane {\r\n constructor() {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.preview-pane: initializing');\r\n }\r\n this.loadDependencies().then(() => {\r\n this.initializeProperties();\r\n this.initializePanel();\r\n\r\n if (this.debugMode) {\r\n console.log('flutter.preview-pane: initialized');\r\n }\r\n });\r\n }\r\n\r\n async loadDependencies() {\r\n await Promise.all([\r\n import(/* webpackMode: \"eager\" */ './flutter-preview-pane.scss'),\r\n import(/* webpackMode: \"eager\" */ '../../scripts/dbs/dbs.utilities.querystring'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal.scss'),\r\n import(/* webpackMode: \"eager\" */ '../../scripts/dbs/dbs.utilities.querystring')\r\n ]);\r\n }\r\n\r\n initializeProperties() {\r\n const self = this;\r\n self.queryString = new dbs.utilities.querystring()\r\n self.$body = $('body')\r\n\r\n self.$wrapper = $(FLUTTER_IFRAME_WRAPPER_MAP['preview_panel'])\r\n self.opened = false;\r\n self.$flutter_preview_panel_frame_wrapper = $('#flutter_preview_frame_wrapper');\r\n self.$flutter_preview_panel_frame = $('#flutter_preview_frame');\r\n self.embedBaseUrl = self.$flutter_preview_panel_frame.attr('data-embed-base-url')\r\n self.msg_receiver = self.$flutter_preview_panel_frame.attr('data-message-receiver')\r\n self.$flutter_preview_pane_dimmer = $(\"#flutter_preview_pane_dimmer\")\r\n\r\n\r\n this.localDebugEnabled = true;\r\n this.debugMode == this.localDebugEnabled && process.env.NODE_ENV === 'development';\r\n }\r\n\r\n getAccommodationFilters = () => {\r\n const self = this;\r\n const defaultAccommodationFilters = 'All';\r\n let validSorts = ['Cabin', 'Site'];\r\n let sortParameterFromUrl = self.queryString.getParameter('accommodationType');\r\n\r\n if (sortParameterFromUrl != self && validSorts.includes(sortParameterFromUrl)) {\r\n return [capitalizeWord(self.queryString.getParameter('accommodationType'))]\r\n }\r\n\r\n return defaultAccommodationFilters;\r\n }\r\n\r\n // handleEvent - Handles the event from the iframe\r\n // @param {string} eventType - The event type\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n handleEvent(eventType, eventData) {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.events.handleDealsEvent: received event', eventType, eventData);\r\n }\r\n removeLoadingSpinner(this.$wrapper)\r\n switch (eventType) {\r\n case 'ga4Event':\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('sendToGa4', eventData);\r\n }\r\n sendToGa4(eventData);\r\n break;\r\n case 'onAppStarted':\r\n removeLoadingSpinner(this.$wrapper)\r\n break;\r\n case 'onResize':\r\n if (process.env.NODE_ENV === 'development') {\r\n debugger; // TODO Potentially handle this? Not sure\r\n }\r\n removeLoadingSpinner(this.$wrapper)\r\n break;\r\n case 'bookingContextChanged':\r\n this.handleBookingContextChange(eventData);\r\n break;\r\n case 'proceedToPay':\r\n const index = parseInt($('#flutter_preview_frame iframe').attr('data-index')) ?? 0;\r\n debugger;\r\n handleProceedToPay(eventData, index);\r\n break;\r\n case 'closePreview':\r\n this.toggle();\r\n break;\r\n default:\r\n if (self.debugMode) {\r\n console.log('flutter.events.handleDealsEvent: unhandled event', eventType, eventData);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n // handleBookingContextChange - Handles the booking context change event\r\n // @param {object} eventData - The event data to process\r\n // @returns {void}\r\n handleBookingContextChange(eventData) {\r\n window.dbs.globalEvents.emit('update_k13_accommodation_widget', eventData, true)\r\n }\r\n\r\n // toggle - Toggles the preview pane\r\n // @returns {void}\r\n toggle = () => {\r\n const self = this;\r\n self.$flutter_preview_panel_frame_wrapper.toggleClass('open');\r\n self.$flutter_preview_pane_dimmer.toggleClass('active');\r\n self.$body.toggleClass('no-scroll');\r\n if (self.opened) {\r\n this.destroy();\r\n\r\n }\r\n self.opened = this.opened == true ? false : true;\r\n // Set timeout to check if it's loaded or still showing about:blank\r\n }\r\n\r\n // createIframe - Creates an iframe with the embed URL\r\n // @param {string} embedUrl - The embed URL to use\r\n // @returns {void}\r\n createIframe = (embedUrl, index) => {\r\n const self = this;\r\n const url = self.embedBaseUrl + embedUrl\r\n console.log(url);\r\n var iframe = ``\r\n var iframes = self.$flutter_preview_panel_frame.find('iframe')\r\n if (iframes.length > 0) {\r\n // remove iframes\r\n iframes.remove();\r\n }\r\n addLoadingSpinner(this.$flutter_preview_panel_frame);\r\n self.$flutter_preview_panel_frame.append(iframe);\r\n self.toggle();\r\n\r\n // Create and instantiate the iframe with the embedURL\r\n }\r\n // destroy - Destroys the iframe\r\n // @returns {void}\r\n destroy = () => {\r\n const self = this;\r\n const iframes = self.$flutter_preview_panel_frame.find('iframe')\r\n if (iframes.length > 0) {\r\n // remove iframes\r\n iframes.remove();\r\n let bookingUrl = new URL(window.location.href);\r\n // Remove the booking parameter\r\n bookingUrl.searchParams.delete('previewPaneOpen');\r\n // Replace state instead of pushing\r\n window.history.replaceState({}, \"\", bookingUrl);\r\n }\r\n }\r\n\r\n handlePopState = () => {\r\n\r\n }\r\n\r\n // initializePanel - Initializes the panel\r\n // @returns {void}\r\n initializePanel = () => {\r\n const self = this;\r\n\r\n let bookingUrl = new URL(window.location.href);\r\n // Remove the panel opening because we're loading the page, it shouldn't be open or exist yet\r\n if (bookingUrl.searchParams.get('previewPaneOpen')) {\r\n bookingUrl.searchParams.delete('previewPaneOpen');\r\n window.history.replaceState({}, \"\", bookingUrl);\r\n }\r\n if (self.debugMode) {\r\n console.log('flutter.preview-pane: initializing');\r\n }\r\n $('body').on('click', '#invisible_panel_close_button', function () {\r\n self.toggle()\r\n })\r\n window.addEventListener('popstate', function (event) {\r\n //removing the weird pane for toggling\r\n self.handlePopState();\r\n if(self.opened) {\r\n self.toggle()\r\n }\r\n });\r\n\r\n $('body').on('click', '#flutter_preview_pane_dimmer', function () {\r\n self.toggle();\r\n })\r\n\r\n $('body').on('click', '.trigger-preview-window', function (e) {\r\n e.preventDefault();\r\n if ($('.loading-overlay').is(':visible')) {\r\n return; // don't load while loading\r\n }\r\n if (document.readyState === \"complete\") {\r\n // set interop state from URL params + the accommodation that was clicked\r\n let clicked = $(e.currentTarget);\r\n\r\n let parkCode = $('.widget.accommodation-availability').attr('data-propertycode');\r\n let accommodationRoomCode = clicked.attr('data-accommodation-room-code');\r\n let accomIndex = parseInt(clicked.attr('data-index')) ?? 0;\r\n let checkIn = self.queryString.getParameter('arrive') ?? moment().format('YYYY-MM-DD');\r\n let checkOut = self.queryString.getParameter('depart') ?? moment().format('YYYY-MM-DD');\r\n let adults = parseInt(self.queryString.getParameter('adults')) ?? 2;\r\n let infants = parseInt(self.queryString.getParameter('infants')) ?? 0;\r\n let children = parseInt(self.queryString.getParameter('kids')) ?? 0;\r\n let accommodationTypeFilter = self.getAccommodationFilters();\r\n // Construct embed URL\r\n let urlParams = {\r\n 'parkCode': parkCode,\r\n 'accommodationRoomCode': accommodationRoomCode,\r\n 'accomIndex': accomIndex,\r\n 'checkIn': checkIn,\r\n 'checkOut': checkOut,\r\n 'adults': adults,\r\n 'children': children,\r\n 'infants': infants,\r\n 'accommodationTypeFilter': accommodationTypeFilter\r\n };\r\n // add dealCode to urlParams if deal code is currently applied.\r\n if (self.queryString.getParameter('dealCode') && self.queryString.getParameter('dealCode') != \"\") {\r\n urlParams.dealCode = self.queryString.getParameter('dealCode');\r\n }\r\n\r\n // this appends history for mobile back button\r\n\r\n let bookingUrl = new URL(window.location.href);\r\n bookingUrl.searchParams.append('previewPaneOpen', true);\r\n window.history.pushState({}, \"\", bookingUrl);\r\n\r\n const embedUrl = self.createUrl(urlParams)\r\n self.createIframe(embedUrl, accomIndex);\r\n window.setTimeout(function () {\r\n removeLoadingSpinner(self.$wrapper)\r\n }, 1500);\r\n }\r\n\r\n });\r\n\r\n if (self.queryString.getParameter('openPreviewWindow')) {\r\n let parkCode = self.queryString.getParameter('propertyCode');\r\n let accommodationRoomCode = self.queryString.getParameter('accommodationRoomId');\r\n let accomIndex = parseInt(clicked.attr('data-index')) ?? 0;\r\n let checkIn = self.queryString.getParameter('arrive') ?? moment().format('YYYY-MM-DD');\r\n let checkOut = self.queryString.getParameter('depart') ?? moment().format('YYYY-MM-DD');\r\n let adults = parseInt(self.queryString.getParameter('adults')) ?? 2;\r\n let infants = parseInt(self.queryString.getParameter('infants')) ?? 0;\r\n let children = parseInt(self.queryString.getParameter('kids')) ?? 0;\r\n let accommodationTypeFilter = self.getAccommodationFilters();\r\n // Construct embed URL\r\n let urlParams = {\r\n 'parkCode': parkCode,\r\n 'accommodationRoomCode': accommodationRoomCode,\r\n 'accomIndex': accomIndex,\r\n //'index': accomIndex,\r\n 'checkIn': checkIn,\r\n 'checkOut': checkOut,\r\n 'adults': adults,\r\n 'children': children,\r\n 'infants': infants,\r\n 'accommodationTypeFilter': accommodationTypeFilter\r\n };\r\n // add dealCode to urlParams if deal code is currently applied.\r\n if (self.queryString.getParameter('dealCode') && self.queryString.getParameter('dealCode') != \"\") {\r\n urlParams.dealCode = self.queryString.getParameter('dealCode');\r\n }\r\n\r\n // this appends history for mobile back button\r\n let bookingUrl = new URL(window.location.href);\r\n\r\n if (!bookingUrl.searchParams.has('previewPaneOpen')) {\r\n bookingUrl.searchParams.append('previewPaneOpen', true);\r\n bookingUrl.searchParams.delete('openPreviewWindow', true);\r\n window.history.replaceState({}, \"\", bookingUrl);\r\n }\r\n\r\n const embedUrl = self.createUrl(urlParams)\r\n self.createIframe(embedUrl, accomIndex);\r\n removeLoadingSpinner(self.$wrapper)\r\n }\r\n }\r\n // createUrl - Creates the URL for the iframe\r\n // @param {object} params - The parameters to use in the URL\r\n // @returns {string} - The Embed URL\r\n createUrl = (params) => {\r\n const self = this;\r\n // park_availability.html#/?parkCode=TEST&checkIn=2024-11-27&checkOut=2024-11-29&adults=3&children=0&infants=0&accommodationTypeFilter=['All']&accommodationCode=TEST-1-7-RT\r\n //var returnUrl = `/park_availability#?parkCode=${params.parkCode}&checkIn=${params.checkIn}&checkOut=${params.checkOut}&adults=${params.adults}&children=${params.children}&infants=${params.infants}&accommodationTypeFilter=['${params.accommodationTypeFilter}']&accommodationCode=${params.accommodationRoomCode}`\r\n var isDhp = $('html').hasClass('dhp-theme');\r\n var caller = isDhp ? 'dhpWeb' : 'gdayWeb';\r\n var gtmTag = isDhp ? \"GTM-WDLRNW\" : \"GTM-KCW5WKF\";\r\n\r\n var returnUrl = `/park_availability.html#/?parkCode=${params.parkCode}&checkIn=${params.checkIn}&checkOut=${params.checkOut}&adults=${params.adults}&children=${params.children}&infants=${params.infants}&accommodationTypeFilter=['${params.accommodationTypeFilter}']&accommodationCode=${params.accommodationRoomCode}&index=${params.accomIndex}`\r\n if (params.hasOwnProperty('dealCode') && params.dealCode != \"\") {\r\n returnUrl += `&appliedDealId=${params.dealCode}`\r\n }\r\n returnUrl += '&msg_receiver=' + self.msg_receiver + '&caller=' + caller + '>mTag=' + gtmTag;\r\n return returnUrl\r\n }\r\n}\r\n","\r\nimport { FLUTTER_IFRAME_WRAPPER_MAP } from './../../flutter/flutter.consts.js';\r\nimport { capitalizeWord, addLoadingSpinner, removeLoadingSpinner, handleProceedToPay, getDayAfterDate, resizeFrame, sendToGa4 } from './../../flutter/flutter.utils.js';\r\nimport('../../scripts/dbs/dbs.utilities.querystring')\r\n// Flutter-Accommodation.js\r\n// TODO: Handle state changes and URL history\r\nexport default class FlutterAccommodationSingleListing {\r\n constructor() {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.accommodation-single: initializing');\r\n }\r\n this.moment = null;\r\n this.loadDependencies().then(() => {\r\n this.initializeProperties();\r\n this.initializeAccommodationEmbed();\r\n\r\n if (this.debugMode) {\r\n console.log('flutter.accommodation-single: initialized');\r\n }\r\n });\r\n }\r\n\r\n async loadDependencies() {\r\n const moment = await import('moment')\r\n this.moment = moment.default;\r\n await Promise.all([\r\n import(/* webpackMode: \"eager\" */ './flutter-accommodation.scss'),\r\n import('../../scripts/dbs/dbs.utilities.querystring'),\r\n import('../park-summary-tabs/park-summary-tabs'),\r\n import('../tab-current-deals/tab-current-deals'),\r\n ]);\r\n\r\n }\r\n\r\n initializeProperties() {\r\n const self = this;\r\n self.queryString = new dbs.utilities.querystring()\r\n self.$body = $('body')\r\n self.$wrapper = $(FLUTTER_IFRAME_WRAPPER_MAP['accommodation_single_listing'])\r\n self.embedBaseUrl = self.$wrapper.attr('data-embed-base-url')\r\n self.iframe = self.$wrapper.children('iframe')\r\n self.$backToParkLink = $(\".backToParkLink\")\r\n\r\n this.localDebugEnabled = true;\r\n this.debugMode == this.localDebugEnabled && process.env.NODE_ENV === 'development';\r\n }\r\n initializeAccommodationEmbed() {\r\n const self = this;\r\n if (this.$wrapper.length == 0) {\r\n if (self.debugMode) {\r\n console.warn('flutter.accommodation-single: No wrapper found for accommodation single listing widget')\r\n }\r\n return;\r\n\r\n }\r\n // Construct iframe link and load things in\r\n const bookingContext = self.getBookingContext()\r\n\r\n let iframeSrc = self.embedBaseUrl + this.createEmbedParams(bookingContext)\r\n\r\n // Check if we need to update the query string with defaults or not\r\n this.initQueryString();\r\n this.createIframe(iframeSrc);\r\n if ($('body').hasClass('no-scroll')) {\r\n $(\"body\").removeClass('no-scroll');\r\n }\r\n }\r\n\r\n createEmbedParams(params) {\r\n var embedUrl = `/accommodation_info#?a=b&msg_receiver=${params.siteUrl}&accommodationCode=${params.accommodationCode}&parkCode=${params.parkCode}&checkIn=${params.checkIn}&checkOut=${params.checkOut}&adults=${params.adults}&children=${params.children}&infants=${params.infants}&caller=${params.caller}&gtmTag=${params.gtmTag}&index=${params.index}`;\r\n if (params.dealCode != '') {\r\n embedUrl += `&appliedDealId=${params.dealCode}`\r\n }\r\n return embedUrl;\r\n }\r\n\r\n\r\n getBookingContext() {\r\n let isDhp = $('html').hasClass('dhp-theme');\r\n const self = this;\r\n const siteUrl = self.$wrapper.attr('data-message-receiver');\r\n const accommodationCode = self.$wrapper.attr('data-accommodationCode');\r\n const propertyCode = self.$wrapper.attr('data-propertyCode');\r\n const checkIn = self.queryString.getParameter('arrive') ?? self.moment().format('YYYY-MM-DD')\r\n const checkOut = self.queryString.getParameter('depart') ?? getDayAfterDate(self.moment().format('YYYY-MM-DD'), self.moment)\r\n const adults = self.queryString.getParameter('adults') ?? 2\r\n const kids = self.queryString.getParameter('kids') ?? 0\r\n const infants = self.queryString.getParameter('infants') ?? 0\r\n const dealCode = self.queryString.getParameter('dealCode') ?? ''\r\n const caller = isDhp ? 'dhpWeb' : 'gdayWeb';\r\n const gtmTag = isDhp ? 'GTM-WDLRNW' : 'GTM-KCW5WKF';\r\n\r\n const index = self.queryString.getParameter('index') ?? 0\r\n return {\r\n siteUrl: siteUrl,\r\n accommodationCode: accommodationCode,\r\n parkCode: propertyCode,\r\n checkIn: checkIn,\r\n checkOut: checkOut,\r\n adults: adults,\r\n children: kids,\r\n infants: infants,\r\n dealCode: dealCode,\r\n caller: caller,\r\n gtmTag: gtmTag,\r\n index: index,\r\n }\r\n }\r\n\r\n initQueryString() {\r\n const self = this;\r\n const params = self.getBookingContext(); // Gets defaults\r\n const queryString = self.queryString;\r\n\r\n // Define parameter mapping (query string name -> params object name)\r\n const paramMapping = {\r\n 'arrive': 'checkIn',\r\n 'depart': 'checkOut',\r\n 'propertyCode': 'parkCode',\r\n 'kids': 'children'\r\n };\r\n\r\n // Create reverse mapping for easier lookup\r\n const reverseMapping = Object.entries(paramMapping).reduce((acc, [queryParam, paramName]) => {\r\n acc[paramName] = queryParam;\r\n return acc;\r\n }, {});\r\n\r\n // Merge query string values with defaults\r\n Object.keys(params).forEach(paramName => {\r\n const queryParamName = reverseMapping[paramName] || paramName;\r\n const queryValue = queryString.getParameter(queryParamName);\r\n\r\n if (queryValue !== null && queryValue !== undefined && queryValue !== '') {\r\n params[paramName] = queryValue;\r\n }\r\n // If no query value, keep the default from getBookingContext()\r\n });\r\n\r\n // Remove unwanted parameters\r\n delete params.siteUrl;\r\n delete params.openPreviewWindow;\r\n delete params.gtmTag;\r\n delete params.caller;\r\n\r\n // Update URL with final parameter values\r\n const searchParams = new URLSearchParams();\r\n Object.entries(params).forEach(([paramName, value]) => {\r\n if (value !== undefined && value !== null && value !== '') {\r\n const urlKey = reverseMapping[paramName] || paramName;\r\n searchParams.set(urlKey, value);\r\n }\r\n });\r\n\r\n window.history.replaceState({}, '', \"?\" + searchParams.toString());\r\n }\r\n\r\n createIframe(url) {\r\n const self = this;\r\n var iframe = ``\r\n var iframes = self.$wrapper.find('iframe')\r\n if (iframes.length > 0) {\r\n // remove iframes\r\n iframes.remove();\r\n }\r\n addLoadingSpinner(this.$wrapper);\r\n self.$wrapper.append(iframe);\r\n }\r\n\r\n handleEvent(eventType, eventData) {\r\n const self = this;\r\n switch (eventType) {\r\n case 'ga4Event':\r\n sendToGa4(eventData);\r\n break;\r\n case 'proceedToPay':\r\n const index = self.queryString.getParameter('index') ?? 0\r\n handleProceedToPay(eventData,index);\r\n break;\r\n case 'onResize':\r\n removeLoadingSpinner(this.$wrapper);\r\n resizeFrame(this.$wrapper, eventData.width, eventData.height, 0, 45);\r\n break;\r\n case 'bookingContextChanged':\r\n self.handleBookingContextChange(eventData);\r\n break;\r\n default:\r\n if (self.debugMode) {\r\n console.warn('flutter.accommodation-single: Unhandled event', eventType, eventData);\r\n }\r\n break;\r\n }\r\n }\r\n // handleBookingContextChange - Handles the booking context change event\r\n // @param {object} eventData - The event data to process\r\n // @returns {void}\r\n handleBookingContextChange(eventData) {\r\n // Get current URL parameters\r\n const self = this;\r\n const currentParams = new URLSearchParams(window.location.search);\r\n const bookingContext = eventData.bookingContext;\r\n\r\n // Map event values to URL parameters\r\n const paramMapping = {\r\n 'parkCode': 'propertyCode',\r\n 'checkIn': 'arrive',\r\n 'checkOut': 'depart',\r\n 'adults': 'adults',\r\n 'children': 'kids',\r\n 'infants': 'infants'\r\n };\r\n\r\n // Update parameters if different\r\n let hasChanges = false;\r\n for (const [eventKey, urlKey] of Object.entries(paramMapping)) {\r\n if (bookingContext[eventKey] !== currentParams.get(urlKey)) {\r\n currentParams.set(urlKey, bookingContext[eventKey]);\r\n hasChanges = true;\r\n }\r\n }\r\n\r\n // Only update history if there were changes\r\n if (hasChanges) {\r\n // Preserve other parameters that weren't in the event\r\n const newURL = `${window.location.pathname}?${currentParams.toString()}`;\r\n window.history.pushState({}, '', newURL);\r\n // Update \"Back to park URL\"\r\n let currentBackToPark = self.$backToParkLink.attr('href');\r\n let backToParkUrl = currentBackToPark.split('?')[0] + '?' + currentParams.toString();\r\n\r\n self.$backToParkLink.each(function (k, elem) {\r\n $(elem).attr('href', backToParkUrl);\r\n });\r\n }\r\n }\r\n}\r\n","// flutter.events.js\r\n// Global handler for events propagated from Flutter iFrames\r\nimport { resizeFrame, parseJSONRecursively, isLikelyJSON } from './flutter.utils.js';\r\n\r\n// Global event handler\r\n// usage.js (remains the same)\r\nimport FlutterDeals from '../widgets/flutter-deals/flutter.deals.js';\r\nimport FlutterGiftVoucher from '../widgets/flutter-gift-voucher/flutter-gift-voucher.js';\r\nimport FlutterPreviewPane from '../widgets/flutter-preview-pane/flutter-preview-pane.js';\r\nimport FlutterAccommodationSingleListing from '../widgets/flutter-accommodation/flutter-accommodation-single-listing.js';\r\nimport FlutterCheckout from '../widgets/flutter-checkout/flutter-checkout.js';\r\n\r\nconst flutterDeals = new FlutterDeals();\r\nconst flutterVouchers = new FlutterGiftVoucher();\r\nconst flutterPreviewPane = new FlutterPreviewPane();\r\nconst flutterAccommodationSingleListing = new FlutterAccommodationSingleListing();\r\nconst flutterCheckout = new FlutterCheckout();\r\n\r\nfunction handleFlutterEvent(message) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.events.flutterEventHandler: received message', message);\r\n }\r\n const eventPayload = message.data;\r\n let eventData = eventPayload.data;\r\n eventData = parseJSONRecursively(eventData);\r\n\r\n const eventSender = eventPayload.sender\r\n const eventType = eventPayload.type\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.events.flutterEventHandler: received payload from iframe: ', {\r\n sender: eventSender,\r\n type: eventType,\r\n data: eventData\r\n })\r\n }\r\n\r\n switch (eventSender) {\r\n case 'checkout':\r\n case 'orders':\r\n case 'order':\r\n flutterCheckout.handleEvent(eventType, eventData);\r\n break;\r\n case 'deals':\r\n case 'featured-deals':\r\n flutterDeals.handleEvent(eventType, eventData);\r\n break;\r\n case 'vouchers':\r\n flutterVouchers.handleEvent(eventType, eventData);\r\n break;\r\n case 'park_availability':\r\n flutterPreviewPane.handleEvent(eventType, eventData);\r\n break;\r\n case 'accommodation_info':\r\n flutterAccommodationSingleListing.handleEvent(eventType, eventData);\r\n break;\r\n\r\n default:\r\n console.warn('flutter.events.flutterEventHandler: Unhandled event', eventPayload);\r\n break;\r\n }\r\n return;\r\n}\r\nwindow.dbs.globalEvents.subscribe('flutter.message', (message) => {\r\n handleFlutterEvent(message);\r\n});\r\n\r\nif (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.events: loaded and added handler');\r\n}\r\n\r\n","import { FLUTTER_IFRAME_WRAPPER_MAP } from './../../flutter/flutter.consts.js';\r\nimport { resizeFrame, isDesktop, getStateAbbreviationFromURLPath, addLoadingSpinner, removeLoadingSpinner } from './../../flutter/flutter.utils.js';\r\n// FlutterDeals.js\r\n// TODO: Handle state changes and URL history\r\nexport default class FlutterDeals {\r\n\r\n constructor() {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.deals: initializing');\r\n }\r\n this.loadDependencies().then(() => {\r\n this.initializeProperties();\r\n if (this.$currentWrapper.length >= 1) {\r\n this.initializeDealsPopup();\r\n addLoadingSpinner(this.$currentWrapper);\r\n if (this.debugMode) {\r\n console.log('flutter.deals: initialized');\r\n }\r\n }\r\n });\r\n }\r\n\r\n async loadDependencies() {\r\n await Promise.all([\r\n import(/* webpackMode: \"eager\" */ './flutter-deals.scss'),\r\n import(/* webpackMode: \"eager\" */ '../../scripts/dbs/dbs.utilities.querystring'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal.scss'),\r\n ]);\r\n }\r\n\r\n\r\n initializeProperties() {\r\n this.$dealsHome = $(FLUTTER_IFRAME_WRAPPER_MAP['deals_home'])\r\n this.$dealsExplore = $(FLUTTER_IFRAME_WRAPPER_MAP['deals_explore'])\r\n this.isExplorePage = this.$dealsExplore.length >= 1;\r\n this.isHomePage = this.$dealsHome.length >= 1;\r\n this.$currentWrapper = this.isHomePage ? this.$dealsHome : this.$dealsExplore;\r\n\r\n // Resizing\r\n this.$window = $(window);\r\n this.minHeightDesktop = this.isHomePage ? 300 : 780; // Desktop height so that the calendars always are visible\r\n this.minHeightMobile = this.isHomePage ? 300 : 350; // Desktop height so that the calendars always are visible\r\n this.mobileBreakpoint = this.isHomePage ? 0 : 808; // The width at which the flutter widget swaps from desktop to to mobile\r\n this.heightBuffer = this.isHomePage ? 15 : 15; // height buffer underneath the widget\r\n\r\n this.localDebugEnabled = false;\r\n this.debugMode == this.localDebugEnabled && process.env.NODE_ENV === 'development';\r\n\r\n // Deals Popup\r\n this.dealsPopupInitialized = false;\r\n this.popupModalTemplate = `
`\r\n this.DesktopCloseButtonTemplate = `
`\r\n this.MobileCloseButtonTemplate = ``\r\n this.closeButtonTemplate = this.DesktopCloseButtonTemplate + this.MobileCloseButtonTemplate;\r\n }\r\n // initialize State Param handling\r\n // handlePopState\r\n // handleFlutterUpdate\r\n\r\n //\r\n handleEvent = (eventType, eventData) => {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.events.handleDealsEvent: received event', eventType, eventData);\r\n }\r\n removeLoadingSpinner(this.$currentWrapper)\r\n switch (eventType) {\r\n case 'onAppStarted':\r\n removeLoadingSpinner(this.$currentWrapper)\r\n break;\r\n case 'onResize':\r\n this.handleResize(eventData);\r\n break;\r\n case 'showConditions':\r\n this.handleShowConditions(eventData)\r\n break;\r\n case 'applyDeal':\r\n this.handleApplyDeal(eventData)\r\n break;\r\n case 'statesSelected':\r\n this.handleStateSelection(eventData);\r\n break;\r\n case 'redirect':\r\n this.handleRedirection(eventData);\r\n break;\r\n default:\r\n if (self.debugMode) {\r\n console.error('flutter.events.handleDealsEvent: Unhandled event type', eventType, eventData);\r\n // TODO: Log this to k13 event log somehow\r\n }\r\n break;\r\n }\r\n }\r\n\r\n handleStateSelection = (eventData) => {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.deals.handleStateSelection: received event', eventData);\r\n }\r\n const url = new URL(window.location.href);\r\n const states = eventData?.states;\r\n if (states == null || states.length == 0) {\r\n if (self.debugMode) {\r\n console.log('flutter.deals.handleStateSelection: No States provided', eventData);\r\n }\r\n // No states provided, remove states parameter from URL\r\n url.searchParams.delete('states');\r\n window.history.replaceState({}, '', url);\r\n return;\r\n }\r\n const statesParam = `${states.join(',')}`;\r\n const pathParts = url.pathname.split('/');\r\n const stateAbbreviation = getStateAbbreviationFromURLPath(pathParts[pathParts.length - 1]);\r\n // States selected, handle update states URL Parameter, and rewriting to remove the state path if multiple are selected\r\n // Don't push to history, we just want to sync states so that refreshes are handled\r\n if (states.length >= 2) {\r\n // Multiple are selected, if there's a state path, remove it\r\n\r\n if (pathParts.length > 2) { // If path is longer than just /deals\r\n pathParts.length = 2; // Truncate to just /deals\r\n url.pathname = pathParts.join('/');\r\n }\r\n } else if (!states.includes(stateAbbreviation)) {\r\n // They've selected another state, that doesn't match the current state path, so remove it\r\n if (pathParts.length > 2) {\r\n pathParts.length = 2; // Truncate to just /deals\r\n url.pathname = pathParts.join('/');\r\n }\r\n // Remove state path if it's not in the selected states\r\n } else if (states.length == 0) {\r\n // Remove state path if it exists as we have no states selected now\r\n if (pathParts.length > 2) {\r\n pathParts.length = 2; // Truncate to just /deals\r\n url.pathname = pathParts.join('/');\r\n }\r\n } else {\r\n // Likely they've just selected and unselected the same states\r\n // Not sure what this might be, but catching it in case\r\n if (self.debugMode) {\r\n console.warn(\"flutter.deals.handleStateSelection: Unhandled state selection\", eventData);\r\n }\r\n }\r\n\r\n url.searchParams.set('states', statesParam)\r\n // Update URL without pushing to history\r\n console.log('Deals Url',url)\r\n window.history.replaceState({}, '', decodeURIComponent(url));\r\n }\r\n\r\n handleResize = (eventData) => {\r\n if (this.$dealsHome.length >= 1) {\r\n resizeFrame(\r\n this.$dealsHome,\r\n eventData.width,\r\n eventData.height,\r\n (isDesktop(this.mobileBreakpoint)) ? this.minHeightDesktop : this.minHeightMobile,\r\n this.heightBuffer\r\n );\r\n }\r\n if (this.$dealsExplore.length >= 1) {\r\n resizeFrame(\r\n this.$dealsExplore,\r\n eventData.width,\r\n eventData.height,\r\n (isDesktop(this.mobileBreakpoint)) ? this.minHeightDesktop : this.minHeightMobile,\r\n this.heightBuffer\r\n );\r\n }\r\n }\r\n initializeDealsPopup = () => {\r\n if (!this.dealsPopupInitialized) {\r\n this.popupModal = false;\r\n\r\n $('body').append(this.popupModalTemplate);\r\n this.popupModal = $(\"#flutter_deals_popup\");\r\n this.popupModal.modal({\r\n closable: false,\r\n });\r\n this.dealsPopupInitialized = true;\r\n }\r\n }\r\n // Deal conditions popup modal\r\n\r\n handleShowConditions = (data) => {\r\n // Show the conditions popup\r\n data = data.replace(/body2/g, 'div');\r\n this.popupModal.children('.content').html(data + this.closeButtonTemplate);\r\n this.popupModal.show();\r\n this.popupModal.modal('show')\r\n }\r\n\r\n handleApplyDeal = (data) => {\r\n const self = this;\r\n // this function is fired when the user clicks on the apply deal button\r\n let currentUrl = window.location.origin\r\n // Extract required values\r\n var dealCode = data?.dealCode;\r\n var parkCode = data?.park?.code;\r\n var descriptionText = data.description\r\n if (typeof dealCode == 'undefined') {\r\n if (self.debugMode) {\r\n console.warn(\"Deal code is undefined\")\r\n }\r\n }\r\n // Null checks here\r\n // Deal code might not be present\r\n var applyDealsUrlPath = `/deals/${parkCode.toLowerCase()}/${dealCode}/apply?dealText=${descriptionText}`\r\n //redirect the urls\r\n // TODO: maybe double check this is a valid redirect and we haven't got nulls/bad URLS\r\n window.location.href = currentUrl + applyDealsUrlPath;\r\n }\r\n handleRedirection = (eventData) => {\r\n let currentUrl = window.location.origin;\r\n let targetUrl = $('html').hasClass('dhp-theme') \r\n ? currentUrl + '/terms-and-conditions/member-join' \r\n : currentUrl + '/terms-and-conditions/gday-rewards';\r\n \r\n if (window.top) {\r\n window.top.open(targetUrl, '_blank');\r\n } else {\r\n window.open(targetUrl, '_blank');\r\n }\r\n // TODO improve the redirect logic to handle eventData.location\r\n }\r\n}\r\n","if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.utilities loaded');\r\n}\r\n// addLoadingSpinner - Adds a loading spinner to the target\r\n// @param {object} $target - The target to add the loading spinner to, passed as a jQuery object\r\n// @returns {void\r\nexport function addLoadingSpinner($target) {\r\n if (typeof $target === 'undefined') {\r\n return;\r\n }\r\n if ($target.length == 0) {\r\n return;\r\n }\r\n const svg = `\r\n \r\n `\r\n const wrapperWidth = $target.width();\r\n const wrapperHeight = $target.height();\r\n const $spinner = $('
' + svg + '
');\r\n $target.append($spinner);\r\n}\r\n// getDayAfterDate - Gets the date after the specified date\r\n// @param {string} date - The date to get the day after\r\n// @returns {string} - The date after the specified date\r\n//const moment = await import('moment');\r\nexport function getDayAfterDate(date, moment) {\r\n return moment(new Date(new Date(date).setDate(new Date(date).getDate() + 1))).format('YYYY-MM-DD')\r\n}\r\n\r\n// removeLoadingSpinner - Removes the loading spinner from the target\r\n// @param {object} $target - The target to remove the loading spinner from, passed as a jQuery object\r\n// @returns {void}\r\nexport function removeLoadingSpinner($target) {\r\n if ($target.length == 0) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn('flutter.utils: removeLoadingSpinner: No target found', $target);\r\n }\r\n }\r\n const $loader = $target.find('.flutter-loader');\r\n if ($loader.length == 0) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn('flutter.utils: removeLoadingSpinner: No loader found', $target);\r\n }\r\n return;\r\n }\r\n $loader.fadeOut(250).remove();\r\n}\r\nconst $window = $(window);\r\n// isDesktop - Determines if the current window is a desktop window\r\n// @param {number} mobileBreakpoint (optional) - The breakpoint at which the window is considered a desktop window. Default is 1024\r\n// @returns {boolean} - True if the window is a desktop window\r\nexport function isDesktop(mobileBreakpoint = 1024) {\r\n return $window.width() > mobileBreakpoint;\r\n}\r\n// This is used across multiple widgets\r\n// @param {object} eventData - The event data to process\r\nexport function handleProceedToPay(eventData,index = 0) {\r\n const orderId = eventData; // This should just be an order ID, no JSON\r\n window.location = '/checkout?orderId=' + orderId + '&index=' + index;\r\n}\r\n// Capitalize Word - Capitalizes the first letter of a word\r\n// @param {string} word - The word to capitalize\r\n// @returns {string} - The capitalized word\r\nexport function capitalizeWord(word) {\r\n if (typeof word === 'undefined') return null\r\n if (word == null) return null;\r\n if (word.length == 0) return word;\r\n return word.charAt(0).toUpperCase() + word.slice(1);\r\n}\r\n// sendToGa4 - Sends an event to Google Analytics 4\r\n// @param {object} object - The object to send to GA4 - should already be deserialized\r\nexport function sendToGa4(object) {\r\n if(process.env.NODE_ENV === 'development') {\r\n console.log('sendToGa4', object);\r\n }\r\n window.dataLayer = window.dataLayer || [] // Create a data layer\r\n dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object\r\n dataLayer.push(object)\r\n}\r\n\r\n// resizeFrame - Resizes a div and its child iframe to the specified width and height\r\n// @param {string} $target - The target element to resize, passed as a jQuery object\r\n// @param {number} width - The new width\r\n// @param {number} height - The new height\r\n// @param {number} minHeight - The minimum height\r\n// @param {number} heightBuffer (optional) - The buffer to add to the height below the widget. Default is 15\r\n// @returns {void}\r\nexport function resizeFrame($target, width, height, minHeight, heightBuffer = 15) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.utils.resizeFrame: resizing frame', { target: $target, width: width, height: height });\r\n }\r\n if (height < minHeight) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn(\"flutter.utils.resizeFrame: Not resizing, height < minHeight \" + $target.attr('id') + \" height: \" + height + \", minHeight\" + minHeight);\r\n height = minHeight;\r\n }\r\n }\r\n if ($target.length >= 1) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log(\"flutter.utils.resizeFrame: Resizing \" + $target.attr('id') + \" to \" + width + \"x\" + height);\r\n }\r\n\r\n $target.css('height', height + heightBuffer);\r\n //$target.css('width', width); // Width isn't necessary for some frames, will need to dynamically do this based on target I think\r\n\r\n const $iframe = $target.children('iframe');\r\n if ($iframe.length >= 1) {\r\n $iframe.css('height', height + heightBuffer);\r\n //$iframe.css('width', width);\r\n } else {\r\n if (process.env.NODE_ENV === 'development') {\r\n //debugger;\r\n }\r\n console.warn(\"flutter.events.resizeFrame: No child iframe found for resizeFrame\", $target, $iframe);\r\n }\r\n } else {\r\n console.warn(\"flutter.events.resizeFrame: No target found for resizeFrame\", $target);\r\n }\r\n}\r\n\r\n// parseJSONRecursively - Sometimes events are parsed twice, and require multiple parsing\r\n// This function will attempt to parse the payload multiple times until it's a valid object\r\n// @param {string} payload - The payload to parse\r\n// @returns {object} - The parsed object\r\n// @returns {string} - The original payload if it's not valid JSON\r\nexport function parseJSONRecursively(payload) {\r\n // Sanity checking prior to parsing\r\n if (payload === null || payload === undefined || payload === \"\") {\r\n return payload;\r\n }\r\n try {\r\n // Attempt to parse the payload\r\n const parsed = JSON.parse(payload);\r\n\r\n // If the parsed result is a string, it might be another JSON object\r\n if (typeof parsed === 'string') {\r\n // Recursively try to parse it again\r\n return parseJSONRecursively(parsed);\r\n } else {\r\n // If it's not a string, we've reached the final parsed object\r\n return parsed;\r\n }\r\n } catch (error) {\r\n console.warn('flutter.utils.parseJSONRecursively: Error parsing JSON payload, probably not JSON', payload, error);\r\n // If it's not valid JSON, return the original payload\r\n return payload;\r\n }\r\n}\r\nconst stateAbbreviationMap = {\r\n \"new-south-wales\": \"NSW\",\r\n \"queensland\": \"QLD\",\r\n \"victoria\": \"VIC\",\r\n \"south-australia\": \"SA\",\r\n \"western-australia\": \"WA\",\r\n \"aust-capital-territory\": \"ACT\",\r\n \"northern-territory\": \"NT\",\r\n \"tasmania\": \"TAS\"\r\n}\r\n// getStateAbbreviationFromURLPath - Gets the state abbreviation from a URL path\r\n// @param {string} stateSlug - The state slug to get the abbreviation for\r\n// @returns {string} - The state abbreviation\r\nexport function getStateAbbreviationFromURLPath(stateSlug) {\r\n if (stateAbbreviationMap[stateSlug]) {\r\n return stateAbbreviationMap[stateSlug];\r\n } else {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn('flutter.utils.getStateAbbreviationFromURLPath: No abbreviation found for state', stateSlug);\r\n }\r\n }\r\n}\r\n","/*!\r\n * # Semantic UI 2.4.2 - Dimmer\r\n * http://github.com/semantic-org/semantic-ui/\r\n *\r\n *\r\n * Released under the MIT license\r\n * http://opensource.org/licenses/MIT\r\n *\r\n */\r\n\r\n;(function ($, window, document, undefined) {\r\n\r\n'use strict';\r\n\r\nwindow = (typeof window != 'undefined' && window.Math == Math)\r\n ? window\r\n : (typeof self != 'undefined' && self.Math == Math)\r\n ? self\r\n : Function('return this')()\r\n;\r\n\r\n$.fn.dimmer = function(parameters) {\r\n var\r\n $allModules = $(this),\r\n\r\n time = new Date().getTime(),\r\n performance = [],\r\n\r\n query = arguments[0],\r\n methodInvoked = (typeof query == 'string'),\r\n queryArguments = [].slice.call(arguments, 1),\r\n\r\n returnedValue\r\n ;\r\n\r\n $allModules\r\n .each(function() {\r\n var\r\n settings = ( $.isPlainObject(parameters) )\r\n ? $.extend(true, {}, $.fn.dimmer.settings, parameters)\r\n : $.extend({}, $.fn.dimmer.settings),\r\n\r\n selector = settings.selector,\r\n namespace = settings.namespace,\r\n className = settings.className,\r\n error = settings.error,\r\n\r\n eventNamespace = '.' + namespace,\r\n moduleNamespace = 'module-' + namespace,\r\n moduleSelector = $allModules.selector || '',\r\n\r\n clickEvent = ('ontouchstart' in document.documentElement)\r\n ? 'touchstart'\r\n : 'click',\r\n\r\n $module = $(this),\r\n $dimmer,\r\n $dimmable,\r\n\r\n element = this,\r\n instance = $module.data(moduleNamespace),\r\n module\r\n ;\r\n\r\n module = {\r\n\r\n preinitialize: function() {\r\n if( module.is.dimmer() ) {\r\n\r\n $dimmable = $module.parent();\r\n $dimmer = $module;\r\n }\r\n else {\r\n $dimmable = $module;\r\n if( module.has.dimmer() ) {\r\n if(settings.dimmerName) {\r\n $dimmer = $dimmable.find(selector.dimmer).filter('.' + settings.dimmerName);\r\n }\r\n else {\r\n $dimmer = $dimmable.find(selector.dimmer);\r\n }\r\n }\r\n else {\r\n $dimmer = module.create();\r\n }\r\n }\r\n },\r\n\r\n initialize: function() {\r\n module.debug('Initializing dimmer', settings);\r\n\r\n module.bind.events();\r\n module.set.dimmable();\r\n module.instantiate();\r\n },\r\n\r\n instantiate: function() {\r\n module.verbose('Storing instance of module', module);\r\n instance = module;\r\n $module\r\n .data(moduleNamespace, instance)\r\n ;\r\n },\r\n\r\n destroy: function() {\r\n module.verbose('Destroying previous module', $dimmer);\r\n module.unbind.events();\r\n module.remove.variation();\r\n $dimmable\r\n .off(eventNamespace)\r\n ;\r\n },\r\n\r\n bind: {\r\n events: function() {\r\n if(settings.on == 'hover') {\r\n $dimmable\r\n .on('mouseenter' + eventNamespace, module.show)\r\n .on('mouseleave' + eventNamespace, module.hide)\r\n ;\r\n }\r\n else if(settings.on == 'click') {\r\n $dimmable\r\n .on(clickEvent + eventNamespace, module.toggle)\r\n ;\r\n }\r\n if( module.is.page() ) {\r\n module.debug('Setting as a page dimmer', $dimmable);\r\n module.set.pageDimmer();\r\n }\r\n\r\n if( module.is.closable() ) {\r\n module.verbose('Adding dimmer close event', $dimmer);\r\n $dimmable\r\n .on(clickEvent + eventNamespace, selector.dimmer, module.event.click)\r\n ;\r\n }\r\n }\r\n },\r\n\r\n unbind: {\r\n events: function() {\r\n $module\r\n .removeData(moduleNamespace)\r\n ;\r\n $dimmable\r\n .off(eventNamespace)\r\n ;\r\n }\r\n },\r\n\r\n event: {\r\n click: function(event) {\r\n module.verbose('Determining if event occured on dimmer', event);\r\n if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) {\r\n module.hide();\r\n event.stopImmediatePropagation();\r\n }\r\n },\r\n },\r\n\r\n addContent: function(element) {\r\n var\r\n $content = $(element)\r\n ;\r\n module.debug('Add content to dimmer', $content);\r\n if($content.parent()[0] !== $dimmer[0]) {\r\n $content.detach().appendTo($dimmer);\r\n }\r\n },\r\n\r\n create: function() {\r\n var\r\n $element = $( settings.template.dimmer() )\r\n ;\r\n if(settings.dimmerName) {\r\n module.debug('Creating named dimmer', settings.dimmerName);\r\n $element.addClass(settings.dimmerName);\r\n }\r\n $element\r\n .appendTo($dimmable)\r\n ;\r\n return $element;\r\n },\r\n\r\n show: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n module.debug('Showing dimmer', $dimmer, settings);\r\n module.set.variation();\r\n if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {\r\n module.animate.show(callback);\r\n settings.onShow.call(element);\r\n settings.onChange.call(element);\r\n }\r\n else {\r\n module.debug('Dimmer is already shown or disabled');\r\n }\r\n },\r\n\r\n hide: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if( module.is.dimmed() || module.is.animating() ) {\r\n module.debug('Hiding dimmer', $dimmer);\r\n module.animate.hide(callback);\r\n settings.onHide.call(element);\r\n settings.onChange.call(element);\r\n }\r\n else {\r\n module.debug('Dimmer is not visible');\r\n }\r\n },\r\n\r\n toggle: function() {\r\n module.verbose('Toggling dimmer visibility', $dimmer);\r\n if( !module.is.dimmed() ) {\r\n module.show();\r\n }\r\n else {\r\n module.hide();\r\n }\r\n },\r\n\r\n animate: {\r\n show: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {\r\n if(settings.useFlex) {\r\n module.debug('Using flex dimmer');\r\n module.remove.legacy();\r\n }\r\n else {\r\n module.debug('Using legacy non-flex dimmer');\r\n module.set.legacy();\r\n }\r\n if(settings.opacity !== 'auto') {\r\n module.set.opacity();\r\n }\r\n $dimmer\r\n .transition({\r\n displayType : settings.useFlex\r\n ? 'flex'\r\n : 'block',\r\n animation : settings.transition + ' in',\r\n queue : false,\r\n duration : module.get.duration(),\r\n useFailSafe : true,\r\n onStart : function() {\r\n module.set.dimmed();\r\n },\r\n onComplete : function() {\r\n module.set.active();\r\n callback();\r\n }\r\n })\r\n ;\r\n }\r\n else {\r\n module.verbose('Showing dimmer animation with javascript');\r\n module.set.dimmed();\r\n if(settings.opacity == 'auto') {\r\n settings.opacity = 0.8;\r\n }\r\n $dimmer\r\n .stop()\r\n .css({\r\n opacity : 0,\r\n width : '100%',\r\n height : '100%'\r\n })\r\n .fadeTo(module.get.duration(), settings.opacity, function() {\r\n $dimmer.removeAttr('style');\r\n module.set.active();\r\n callback();\r\n })\r\n ;\r\n }\r\n },\r\n hide: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {\r\n module.verbose('Hiding dimmer with css');\r\n $dimmer\r\n .transition({\r\n displayType : settings.useFlex\r\n ? 'flex'\r\n : 'block',\r\n animation : settings.transition + ' out',\r\n queue : false,\r\n duration : module.get.duration(),\r\n useFailSafe : true,\r\n onStart : function() {\r\n module.remove.dimmed();\r\n },\r\n onComplete : function() {\r\n module.remove.variation();\r\n module.remove.active();\r\n callback();\r\n }\r\n })\r\n ;\r\n }\r\n else {\r\n module.verbose('Hiding dimmer with javascript');\r\n module.remove.dimmed();\r\n $dimmer\r\n .stop()\r\n .fadeOut(module.get.duration(), function() {\r\n module.remove.active();\r\n $dimmer.removeAttr('style');\r\n callback();\r\n })\r\n ;\r\n }\r\n }\r\n },\r\n\r\n get: {\r\n dimmer: function() {\r\n return $dimmer;\r\n },\r\n duration: function() {\r\n if(typeof settings.duration == 'object') {\r\n if( module.is.active() ) {\r\n return settings.duration.hide;\r\n }\r\n else {\r\n return settings.duration.show;\r\n }\r\n }\r\n return settings.duration;\r\n }\r\n },\r\n\r\n has: {\r\n dimmer: function() {\r\n if(settings.dimmerName) {\r\n return ($module.find(selector.dimmer).filter('.' + settings.dimmerName).length > 0);\r\n }\r\n else {\r\n return ( $module.find(selector.dimmer).length > 0 );\r\n }\r\n }\r\n },\r\n\r\n is: {\r\n active: function() {\r\n return $dimmer.hasClass(className.active);\r\n },\r\n animating: function() {\r\n return ( $dimmer.is(':animated') || $dimmer.hasClass(className.animating) );\r\n },\r\n closable: function() {\r\n if(settings.closable == 'auto') {\r\n if(settings.on == 'hover') {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return settings.closable;\r\n },\r\n dimmer: function() {\r\n return $module.hasClass(className.dimmer);\r\n },\r\n dimmable: function() {\r\n return $module.hasClass(className.dimmable);\r\n },\r\n dimmed: function() {\r\n return $dimmable.hasClass(className.dimmed);\r\n },\r\n disabled: function() {\r\n return $dimmable.hasClass(className.disabled);\r\n },\r\n enabled: function() {\r\n return !module.is.disabled();\r\n },\r\n page: function () {\r\n return $dimmable.is('body');\r\n },\r\n pageDimmer: function() {\r\n return $dimmer.hasClass(className.pageDimmer);\r\n }\r\n },\r\n\r\n can: {\r\n show: function() {\r\n return !$dimmer.hasClass(className.disabled);\r\n }\r\n },\r\n\r\n set: {\r\n opacity: function(opacity) {\r\n var\r\n color = $dimmer.css('background-color'),\r\n colorArray = color.split(','),\r\n isRGB = (colorArray && colorArray.length == 3),\r\n isRGBA = (colorArray && colorArray.length == 4)\r\n ;\r\n opacity = settings.opacity === 0 ? 0 : settings.opacity || opacity;\r\n if(isRGB || isRGBA) {\r\n colorArray[3] = opacity + ')';\r\n color = colorArray.join(',');\r\n }\r\n else {\r\n color = 'rgba(0, 0, 0, ' + opacity + ')';\r\n }\r\n module.debug('Setting opacity to', opacity);\r\n $dimmer.css('background-color', color);\r\n },\r\n legacy: function() {\r\n $dimmer.addClass(className.legacy);\r\n },\r\n active: function() {\r\n $dimmer.addClass(className.active);\r\n },\r\n dimmable: function() {\r\n $dimmable.addClass(className.dimmable);\r\n },\r\n dimmed: function() {\r\n $dimmable.addClass(className.dimmed);\r\n },\r\n pageDimmer: function() {\r\n $dimmer.addClass(className.pageDimmer);\r\n },\r\n disabled: function() {\r\n $dimmer.addClass(className.disabled);\r\n },\r\n variation: function(variation) {\r\n variation = variation || settings.variation;\r\n if(variation) {\r\n $dimmer.addClass(variation);\r\n }\r\n }\r\n },\r\n\r\n remove: {\r\n active: function() {\r\n $dimmer\r\n .removeClass(className.active)\r\n ;\r\n },\r\n legacy: function() {\r\n $dimmer.removeClass(className.legacy);\r\n },\r\n dimmed: function() {\r\n $dimmable.removeClass(className.dimmed);\r\n },\r\n disabled: function() {\r\n $dimmer.removeClass(className.disabled);\r\n },\r\n variation: function(variation) {\r\n variation = variation || settings.variation;\r\n if(variation) {\r\n $dimmer.removeClass(variation);\r\n }\r\n }\r\n },\r\n\r\n setting: function(name, value) {\r\n module.debug('Changing setting', name, value);\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, settings, name);\r\n }\r\n else if(value !== undefined) {\r\n if($.isPlainObject(settings[name])) {\r\n $.extend(true, settings[name], value);\r\n }\r\n else {\r\n settings[name] = value;\r\n }\r\n }\r\n else {\r\n return settings[name];\r\n }\r\n },\r\n internal: function(name, value) {\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, module, name);\r\n }\r\n else if(value !== undefined) {\r\n module[name] = value;\r\n }\r\n else {\r\n return module[name];\r\n }\r\n },\r\n debug: function() {\r\n if(!settings.silent && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.debug.apply(console, arguments);\r\n }\r\n }\r\n },\r\n verbose: function() {\r\n if(!settings.silent && settings.verbose && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.verbose.apply(console, arguments);\r\n }\r\n }\r\n },\r\n error: function() {\r\n if(!settings.silent) {\r\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\r\n module.error.apply(console, arguments);\r\n }\r\n },\r\n performance: {\r\n log: function(message) {\r\n var\r\n currentTime,\r\n executionTime,\r\n previousTime\r\n ;\r\n if(settings.performance) {\r\n currentTime = new Date().getTime();\r\n previousTime = time || currentTime;\r\n executionTime = currentTime - previousTime;\r\n time = currentTime;\r\n performance.push({\r\n 'Name' : message[0],\r\n 'Arguments' : [].slice.call(message, 1) || '',\r\n 'Element' : element,\r\n 'Execution Time' : executionTime\r\n });\r\n }\r\n clearTimeout(module.performance.timer);\r\n module.performance.timer = setTimeout(module.performance.display, 500);\r\n },\r\n display: function() {\r\n var\r\n title = settings.name + ':',\r\n totalTime = 0\r\n ;\r\n time = false;\r\n clearTimeout(module.performance.timer);\r\n $.each(performance, function(index, data) {\r\n totalTime += data['Execution Time'];\r\n });\r\n title += ' ' + totalTime + 'ms';\r\n if(moduleSelector) {\r\n title += ' \\'' + moduleSelector + '\\'';\r\n }\r\n if($allModules.length > 1) {\r\n title += ' ' + '(' + $allModules.length + ')';\r\n }\r\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\r\n console.groupCollapsed(title);\r\n if(console.table) {\r\n console.table(performance);\r\n }\r\n else {\r\n $.each(performance, function(index, data) {\r\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\r\n });\r\n }\r\n console.groupEnd();\r\n }\r\n performance = [];\r\n }\r\n },\r\n invoke: function(query, passedArguments, context) {\r\n var\r\n object = instance,\r\n maxDepth,\r\n found,\r\n response\r\n ;\r\n passedArguments = passedArguments || queryArguments;\r\n context = element || context;\r\n if(typeof query == 'string' && object !== undefined) {\r\n query = query.split(/[\\. ]/);\r\n maxDepth = query.length - 1;\r\n $.each(query, function(depth, value) {\r\n var camelCaseValue = (depth != maxDepth)\r\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\r\n : query\r\n ;\r\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\r\n object = object[camelCaseValue];\r\n }\r\n else if( object[camelCaseValue] !== undefined ) {\r\n found = object[camelCaseValue];\r\n return false;\r\n }\r\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\r\n object = object[value];\r\n }\r\n else if( object[value] !== undefined ) {\r\n found = object[value];\r\n return false;\r\n }\r\n else {\r\n module.error(error.method, query);\r\n return false;\r\n }\r\n });\r\n }\r\n if ( $.isFunction( found ) ) {\r\n response = found.apply(context, passedArguments);\r\n }\r\n else if(found !== undefined) {\r\n response = found;\r\n }\r\n if($.isArray(returnedValue)) {\r\n returnedValue.push(response);\r\n }\r\n else if(returnedValue !== undefined) {\r\n returnedValue = [returnedValue, response];\r\n }\r\n else if(response !== undefined) {\r\n returnedValue = response;\r\n }\r\n return found;\r\n }\r\n };\r\n\r\n module.preinitialize();\r\n\r\n if(methodInvoked) {\r\n if(instance === undefined) {\r\n module.initialize();\r\n }\r\n module.invoke(query);\r\n }\r\n else {\r\n if(instance !== undefined) {\r\n instance.invoke('destroy');\r\n }\r\n module.initialize();\r\n }\r\n })\r\n ;\r\n\r\n return (returnedValue !== undefined)\r\n ? returnedValue\r\n : this\r\n ;\r\n};\r\n\r\n$.fn.dimmer.settings = {\r\n\r\n name : 'Dimmer',\r\n namespace : 'dimmer',\r\n\r\n silent : false,\r\n debug : false,\r\n verbose : false,\r\n performance : true,\r\n\r\n // whether should use flex layout\r\n useFlex : true,\r\n\r\n // name to distinguish between multiple dimmers in context\r\n dimmerName : false,\r\n\r\n // whether to add a variation type\r\n variation : false,\r\n\r\n // whether to bind close events\r\n closable : 'auto',\r\n\r\n // whether to use css animations\r\n useCSS : true,\r\n\r\n // css animation to use\r\n transition : 'fade',\r\n\r\n // event to bind to\r\n on : false,\r\n\r\n // overriding opacity value\r\n opacity : 'auto',\r\n\r\n // transition durations\r\n duration : {\r\n show : 500,\r\n hide : 500\r\n },\r\n\r\n onChange : function(){},\r\n onShow : function(){},\r\n onHide : function(){},\r\n\r\n error : {\r\n method : 'The method you called is not defined.'\r\n },\r\n\r\n className : {\r\n active : 'active',\r\n animating : 'animating',\r\n dimmable : 'dimmable',\r\n dimmed : 'dimmed',\r\n dimmer : 'dimmer',\r\n disabled : 'disabled',\r\n hide : 'hide',\r\n legacy : 'legacy',\r\n pageDimmer : 'page',\r\n show : 'show'\r\n },\r\n\r\n selector: {\r\n dimmer : '> .ui.dimmer',\r\n content : '.ui.dimmer > .content, .ui.dimmer > .content > .center'\r\n },\r\n\r\n template: {\r\n dimmer: function() {\r\n return $('
').attr('class', 'ui dimmer');\r\n }\r\n }\r\n\r\n};\r\n\r\n})( jQuery, window, document );\r\n","/*!\r\n * # Semantic UI 2.4.2 - Modal\r\n * http://github.com/semantic-org/semantic-ui/\r\n *\r\n *\r\n * Released under the MIT license\r\n * http://opensource.org/licenses/MIT\r\n *\r\n */\r\n\r\n;(function ($, window, document, undefined) {\r\n\r\n'use strict';\r\n\r\nwindow = (typeof window != 'undefined' && window.Math == Math)\r\n ? window\r\n : (typeof self != 'undefined' && self.Math == Math)\r\n ? self\r\n : Function('return this')()\r\n;\r\n\r\n$.fn.modal = function(parameters) {\r\n var\r\n $allModules = $(this),\r\n $window = $(window),\r\n $document = $(document),\r\n $body = $('body'),\r\n\r\n moduleSelector = $allModules.selector || '',\r\n\r\n time = new Date().getTime(),\r\n performance = [],\r\n\r\n query = arguments[0],\r\n methodInvoked = (typeof query == 'string'),\r\n queryArguments = [].slice.call(arguments, 1),\r\n\r\n requestAnimationFrame = window.requestAnimationFrame\r\n || window.mozRequestAnimationFrame\r\n || window.webkitRequestAnimationFrame\r\n || window.msRequestAnimationFrame\r\n || function(callback) { setTimeout(callback, 0); },\r\n\r\n returnedValue\r\n ;\r\n\r\n $allModules\r\n .each(function() {\r\n var\r\n settings = ( $.isPlainObject(parameters) )\r\n ? $.extend(true, {}, $.fn.modal.settings, parameters)\r\n : $.extend({}, $.fn.modal.settings),\r\n\r\n selector = settings.selector,\r\n className = settings.className,\r\n namespace = settings.namespace,\r\n error = settings.error,\r\n\r\n eventNamespace = '.' + namespace,\r\n moduleNamespace = 'module-' + namespace,\r\n\r\n $module = $(this),\r\n $context = $(settings.context),\r\n $close = $module.find(selector.close),\r\n\r\n $allModals,\r\n $otherModals,\r\n $focusedElement,\r\n $dimmable,\r\n $dimmer,\r\n\r\n element = this,\r\n instance = $module.data(moduleNamespace),\r\n\r\n ignoreRepeatedEvents = false,\r\n\r\n elementEventNamespace,\r\n id,\r\n observer,\r\n module\r\n ;\r\n module = {\r\n\r\n initialize: function() {\r\n module.verbose('Initializing dimmer', $context);\r\n\r\n module.create.id();\r\n module.create.dimmer();\r\n module.refreshModals();\r\n\r\n module.bind.events();\r\n if(settings.observeChanges) {\r\n module.observeChanges();\r\n }\r\n module.instantiate();\r\n },\r\n\r\n instantiate: function() {\r\n module.verbose('Storing instance of modal');\r\n instance = module;\r\n $module\r\n .data(moduleNamespace, instance)\r\n ;\r\n },\r\n\r\n create: {\r\n dimmer: function() {\r\n var\r\n defaultSettings = {\r\n debug : settings.debug,\r\n variation : settings.centered\r\n ? false\r\n : 'top aligned',\r\n dimmerName : 'modals'\r\n },\r\n dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)\r\n ;\r\n if($.fn.dimmer === undefined) {\r\n module.error(error.dimmer);\r\n return;\r\n }\r\n module.debug('Creating dimmer');\r\n $dimmable = $context.dimmer(dimmerSettings);\r\n if(settings.detachable) {\r\n module.verbose('Modal is detachable, moving content into dimmer');\r\n $dimmable.dimmer('add content', $module);\r\n }\r\n else {\r\n module.set.undetached();\r\n }\r\n $dimmer = $dimmable.dimmer('get dimmer');\r\n },\r\n id: function() {\r\n id = (Math.random().toString(16) + '000000000').substr(2, 8);\r\n elementEventNamespace = '.' + id;\r\n module.verbose('Creating unique id for element', id);\r\n }\r\n },\r\n\r\n destroy: function() {\r\n module.verbose('Destroying previous modal');\r\n $module\r\n .removeData(moduleNamespace)\r\n .off(eventNamespace)\r\n ;\r\n $window.off(elementEventNamespace);\r\n $dimmer.off(elementEventNamespace);\r\n $close.off(eventNamespace);\r\n $context.dimmer('destroy');\r\n },\r\n\r\n observeChanges: function() {\r\n if('MutationObserver' in window) {\r\n observer = new MutationObserver(function(mutations) {\r\n module.debug('DOM tree modified, refreshing');\r\n module.refresh();\r\n });\r\n observer.observe(element, {\r\n childList : true,\r\n subtree : true\r\n });\r\n module.debug('Setting up mutation observer', observer);\r\n }\r\n },\r\n\r\n refresh: function() {\r\n module.remove.scrolling();\r\n module.cacheSizes();\r\n if(!module.can.useFlex()) {\r\n module.set.modalOffset();\r\n }\r\n module.set.screenHeight();\r\n module.set.type();\r\n },\r\n\r\n refreshModals: function() {\r\n $otherModals = $module.siblings(selector.modal);\r\n $allModals = $otherModals.add($module);\r\n },\r\n\r\n attachEvents: function(selector, event) {\r\n var\r\n $toggle = $(selector)\r\n ;\r\n event = $.isFunction(module[event])\r\n ? module[event]\r\n : module.toggle\r\n ;\r\n if($toggle.length > 0) {\r\n module.debug('Attaching modal events to element', selector, event);\r\n $toggle\r\n .off(eventNamespace)\r\n .on('click' + eventNamespace, event)\r\n ;\r\n }\r\n else {\r\n module.error(error.notFound, selector);\r\n }\r\n },\r\n\r\n bind: {\r\n events: function() {\r\n module.verbose('Attaching events');\r\n $module\r\n .on('click' + eventNamespace, selector.close, module.event.close)\r\n .on('click' + eventNamespace, selector.approve, module.event.approve)\r\n .on('click' + eventNamespace, selector.deny, module.event.deny)\r\n ;\r\n $window\r\n .on('resize' + elementEventNamespace, module.event.resize)\r\n ;\r\n },\r\n scrollLock: function() {\r\n // touch events default to passive, due to changes in chrome to optimize mobile perf\r\n //$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });\r\n }\r\n },\r\n\r\n unbind: {\r\n scrollLock: function() {\r\n $dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });\r\n }\r\n },\r\n\r\n get: {\r\n id: function() {\r\n return (Math.random().toString(16) + '000000000').substr(2, 8);\r\n }\r\n },\r\n\r\n event: {\r\n approve: function() {\r\n if(ignoreRepeatedEvents || settings.onApprove.call(element, $(this)) === false) {\r\n module.verbose('Approve callback returned false cancelling hide');\r\n return;\r\n }\r\n ignoreRepeatedEvents = true;\r\n module.hide(function() {\r\n ignoreRepeatedEvents = false;\r\n });\r\n },\r\n preventScroll: function(event) {\r\n event.preventDefault();\r\n },\r\n deny: function() {\r\n if(ignoreRepeatedEvents || settings.onDeny.call(element, $(this)) === false) {\r\n module.verbose('Deny callback returned false cancelling hide');\r\n return;\r\n }\r\n ignoreRepeatedEvents = true;\r\n module.hide(function() {\r\n ignoreRepeatedEvents = false;\r\n });\r\n },\r\n close: function() {\r\n module.hide();\r\n },\r\n click: function(event) {\r\n if(!settings.closable) {\r\n module.verbose('Dimmer clicked but closable setting is disabled');\r\n return;\r\n }\r\n var\r\n $target = $(event.target),\r\n isInModal = ($target.closest(selector.modal).length > 0),\r\n isInDOM = $.contains(document.documentElement, event.target)\r\n ;\r\n if(!isInModal && isInDOM && module.is.active()) {\r\n module.debug('Dimmer clicked, hiding all modals');\r\n module.remove.clickaway();\r\n if(settings.allowMultiple) {\r\n module.hide();\r\n }\r\n else {\r\n module.hideAll();\r\n }\r\n }\r\n },\r\n debounce: function(method, delay) {\r\n clearTimeout(module.timer);\r\n module.timer = setTimeout(method, delay);\r\n },\r\n keyboard: function(event) {\r\n var\r\n keyCode = event.which,\r\n escapeKey = 27\r\n ;\r\n if(keyCode == escapeKey) {\r\n if(settings.closable) {\r\n module.debug('Escape key pressed hiding modal');\r\n module.hide();\r\n }\r\n else {\r\n module.debug('Escape key pressed, but closable is set to false');\r\n }\r\n event.preventDefault();\r\n }\r\n },\r\n resize: function() {\r\n if( $dimmable.dimmer('is active') && ( module.is.animating() || module.is.active() ) ) {\r\n requestAnimationFrame(module.refresh);\r\n }\r\n }\r\n },\r\n\r\n toggle: function() {\r\n if( module.is.active() || module.is.animating() ) {\r\n module.hide();\r\n }\r\n else {\r\n module.show();\r\n }\r\n },\r\n\r\n show: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n module.refreshModals();\r\n module.set.dimmerSettings();\r\n module.set.dimmerStyles();\r\n\r\n module.showModal(callback);\r\n },\r\n\r\n hide: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n module.refreshModals();\r\n module.hideModal(callback);\r\n },\r\n\r\n showModal: function(callback) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if( module.is.animating() || !module.is.active() ) {\r\n module.showDimmer();\r\n module.cacheSizes();\r\n if(module.can.useFlex()) {\r\n module.remove.legacy();\r\n }\r\n else {\r\n module.set.legacy();\r\n module.set.modalOffset();\r\n module.debug('Using non-flex legacy modal positioning.');\r\n }\r\n module.set.screenHeight();\r\n module.set.type();\r\n module.set.clickaway();\r\n\r\n if( !settings.allowMultiple && module.others.active() ) {\r\n module.hideOthers(module.showModal);\r\n }\r\n else {\r\n if(settings.allowMultiple && settings.detachable) {\r\n $module.detach().appendTo($dimmer);\r\n }\r\n settings.onShow.call(element);\r\n if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\r\n module.debug('Showing modal with css animations');\r\n $module\r\n .transition({\r\n debug : settings.debug,\r\n animation : settings.transition + ' in',\r\n queue : settings.queue,\r\n duration : settings.duration,\r\n useFailSafe : true,\r\n onComplete : function() {\r\n settings.onVisible.apply(element);\r\n if(settings.keyboardShortcuts) {\r\n module.add.keyboardShortcuts();\r\n }\r\n module.save.focus();\r\n module.set.active();\r\n if(settings.autofocus) {\r\n module.set.autofocus();\r\n }\r\n callback();\r\n }\r\n })\r\n ;\r\n }\r\n else {\r\n module.error(error.noTransition);\r\n }\r\n }\r\n }\r\n else {\r\n module.debug('Modal is already visible');\r\n }\r\n },\r\n\r\n hideModal: function(callback, keepDimmed) {\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n module.debug('Hiding modal');\r\n if(settings.onHide.call(element, $(this)) === false) {\r\n module.verbose('Hide callback returned false cancelling hide');\r\n return;\r\n }\r\n\r\n if( module.is.animating() || module.is.active() ) {\r\n if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\r\n module.remove.active();\r\n $module\r\n .transition({\r\n debug : settings.debug,\r\n animation : settings.transition + ' out',\r\n queue : settings.queue,\r\n duration : settings.duration,\r\n useFailSafe : true,\r\n onStart : function() {\r\n if(!module.others.active() && !keepDimmed) {\r\n module.hideDimmer();\r\n }\r\n if(settings.keyboardShortcuts) {\r\n module.remove.keyboardShortcuts();\r\n }\r\n },\r\n onComplete : function() {\r\n settings.onHidden.call(element);\r\n module.remove.dimmerStyles();\r\n module.restore.focus();\r\n callback();\r\n }\r\n })\r\n ;\r\n }\r\n else {\r\n module.error(error.noTransition);\r\n }\r\n }\r\n },\r\n\r\n showDimmer: function() {\r\n if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {\r\n module.debug('Showing dimmer');\r\n $dimmable.dimmer('show');\r\n }\r\n else {\r\n module.debug('Dimmer already visible');\r\n }\r\n },\r\n\r\n hideDimmer: function() {\r\n if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {\r\n module.unbind.scrollLock();\r\n $dimmable.dimmer('hide', function() {\r\n module.remove.clickaway();\r\n module.remove.screenHeight();\r\n });\r\n }\r\n else {\r\n module.debug('Dimmer is not visible cannot hide');\r\n return;\r\n }\r\n },\r\n\r\n hideAll: function(callback) {\r\n var\r\n $visibleModals = $allModals.filter('.' + className.active + ', .' + className.animating)\r\n ;\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if( $visibleModals.length > 0 ) {\r\n module.debug('Hiding all visible modals');\r\n module.hideDimmer();\r\n $visibleModals\r\n .modal('hide modal', callback)\r\n ;\r\n }\r\n },\r\n\r\n hideOthers: function(callback) {\r\n var\r\n $visibleModals = $otherModals.filter('.' + className.active + ', .' + className.animating)\r\n ;\r\n callback = $.isFunction(callback)\r\n ? callback\r\n : function(){}\r\n ;\r\n if( $visibleModals.length > 0 ) {\r\n module.debug('Hiding other modals', $otherModals);\r\n $visibleModals\r\n .modal('hide modal', callback, true)\r\n ;\r\n }\r\n },\r\n\r\n others: {\r\n active: function() {\r\n return ($otherModals.filter('.' + className.active).length > 0);\r\n },\r\n animating: function() {\r\n return ($otherModals.filter('.' + className.animating).length > 0);\r\n }\r\n },\r\n\r\n\r\n add: {\r\n keyboardShortcuts: function() {\r\n module.verbose('Adding keyboard shortcuts');\r\n $document\r\n .on('keyup' + eventNamespace, module.event.keyboard)\r\n ;\r\n }\r\n },\r\n\r\n save: {\r\n focus: function() {\r\n var\r\n $activeElement = $(document.activeElement),\r\n inCurrentModal = $activeElement.closest($module).length > 0\r\n ;\r\n if(!inCurrentModal) {\r\n $focusedElement = $(document.activeElement).blur();\r\n }\r\n }\r\n },\r\n\r\n restore: {\r\n focus: function() {\r\n if($focusedElement && $focusedElement.length > 0) {\r\n $focusedElement.focus();\r\n }\r\n }\r\n },\r\n\r\n remove: {\r\n active: function() {\r\n $module.removeClass(className.active);\r\n },\r\n legacy: function() {\r\n $module.removeClass(className.legacy);\r\n },\r\n clickaway: function() {\r\n $dimmer\r\n .off('click' + elementEventNamespace)\r\n ;\r\n },\r\n dimmerStyles: function() {\r\n $dimmer.removeClass(className.inverted);\r\n $dimmable.removeClass(className.blurring);\r\n },\r\n bodyStyle: function() {\r\n if($body.attr('style') === '') {\r\n module.verbose('Removing style attribute');\r\n $body.removeAttr('style');\r\n }\r\n },\r\n screenHeight: function() {\r\n module.debug('Removing page height');\r\n $body\r\n .css('height', '')\r\n ;\r\n },\r\n keyboardShortcuts: function() {\r\n module.verbose('Removing keyboard shortcuts');\r\n $document\r\n .off('keyup' + eventNamespace)\r\n ;\r\n },\r\n scrolling: function() {\r\n $dimmable.removeClass(className.scrolling);\r\n $module.removeClass(className.scrolling);\r\n }\r\n },\r\n\r\n cacheSizes: function() {\r\n $module.addClass(className.loading);\r\n var\r\n scrollHeight = $module.prop('scrollHeight'),\r\n modalWidth = $module.outerWidth(),\r\n modalHeight = $module.outerHeight()\r\n ;\r\n if(module.cache === undefined || modalHeight !== 0) {\r\n module.cache = {\r\n pageHeight : $(document).outerHeight(),\r\n width : modalWidth,\r\n height : modalHeight + settings.offset,\r\n scrollHeight : scrollHeight + settings.offset,\r\n contextHeight : (settings.context == 'body')\r\n ? $(window).height()\r\n : $dimmable.height(),\r\n };\r\n module.cache.topOffset = -(module.cache.height / 2);\r\n }\r\n $module.removeClass(className.loading);\r\n module.debug('Caching modal and container sizes', module.cache);\r\n },\r\n\r\n can: {\r\n useFlex: function() {\r\n return (settings.useFlex == 'auto')\r\n ? settings.detachable && !module.is.ie()\r\n : settings.useFlex\r\n ;\r\n },\r\n fit: function() {\r\n var\r\n contextHeight = module.cache.contextHeight,\r\n verticalCenter = module.cache.contextHeight / 2,\r\n topOffset = module.cache.topOffset,\r\n scrollHeight = module.cache.scrollHeight,\r\n height = module.cache.height,\r\n paddingHeight = settings.padding,\r\n startPosition = (verticalCenter + topOffset)\r\n ;\r\n return (scrollHeight > height)\r\n ? (startPosition + scrollHeight + paddingHeight < contextHeight)\r\n : (height + (paddingHeight * 2) < contextHeight)\r\n ;\r\n }\r\n },\r\n\r\n is: {\r\n active: function() {\r\n return $module.hasClass(className.active);\r\n },\r\n ie: function() {\r\n var\r\n isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),\r\n isIE = ('ActiveXObject' in window)\r\n ;\r\n return (isIE11 || isIE);\r\n },\r\n animating: function() {\r\n return $module.transition('is supported')\r\n ? $module.transition('is animating')\r\n : $module.is(':visible')\r\n ;\r\n },\r\n scrolling: function() {\r\n return $dimmable.hasClass(className.scrolling);\r\n },\r\n modernBrowser: function() {\r\n // appName for IE11 reports 'Netscape' can no longer use\r\n return !(window.ActiveXObject || 'ActiveXObject' in window);\r\n }\r\n },\r\n\r\n set: {\r\n autofocus: function() {\r\n var\r\n $inputs = $module.find('[tabindex], :input').filter(':visible'),\r\n $autofocus = $inputs.filter('[autofocus]'),\r\n $input = ($autofocus.length > 0)\r\n ? $autofocus.first()\r\n : $inputs.first()\r\n ;\r\n if($input.length > 0) {\r\n $input.focus();\r\n }\r\n },\r\n clickaway: function() {\r\n $dimmer\r\n .on('click' + elementEventNamespace, module.event.click)\r\n ;\r\n },\r\n dimmerSettings: function() {\r\n if($.fn.dimmer === undefined) {\r\n module.error(error.dimmer);\r\n return;\r\n }\r\n var\r\n defaultSettings = {\r\n debug : settings.debug,\r\n dimmerName : 'modals',\r\n closable : 'auto',\r\n useFlex : module.can.useFlex(),\r\n variation : settings.centered\r\n ? false\r\n : 'top aligned',\r\n duration : {\r\n show : settings.duration,\r\n hide : settings.duration\r\n }\r\n },\r\n dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)\r\n ;\r\n if(settings.inverted) {\r\n dimmerSettings.variation = (dimmerSettings.variation !== undefined)\r\n ? dimmerSettings.variation + ' inverted'\r\n : 'inverted'\r\n ;\r\n }\r\n $context.dimmer('setting', dimmerSettings);\r\n },\r\n dimmerStyles: function() {\r\n if(settings.inverted) {\r\n $dimmer.addClass(className.inverted);\r\n }\r\n else {\r\n $dimmer.removeClass(className.inverted);\r\n }\r\n if(settings.blurring) {\r\n $dimmable.addClass(className.blurring);\r\n }\r\n else {\r\n $dimmable.removeClass(className.blurring);\r\n }\r\n },\r\n modalOffset: function() {\r\n var\r\n width = module.cache.width,\r\n height = module.cache.height\r\n ;\r\n $module\r\n .css({\r\n marginTop: (settings.centered && module.can.fit())\r\n ? -(height / 2)\r\n : 0,\r\n marginLeft: -(width / 2)\r\n })\r\n ;\r\n module.verbose('Setting modal offset for legacy mode');\r\n },\r\n screenHeight: function() {\r\n if( module.can.fit() ) {\r\n $body.css('height', '');\r\n }\r\n else {\r\n module.debug('Modal is taller than page content, resizing page height');\r\n $body\r\n .css('height', module.cache.height + (settings.padding * 2) )\r\n ;\r\n }\r\n },\r\n active: function() {\r\n $module.addClass(className.active);\r\n },\r\n scrolling: function() {\r\n $dimmable.addClass(className.scrolling);\r\n $module.addClass(className.scrolling);\r\n module.unbind.scrollLock();\r\n },\r\n legacy: function() {\r\n $module.addClass(className.legacy);\r\n },\r\n type: function() {\r\n if(module.can.fit()) {\r\n module.verbose('Modal fits on screen');\r\n if(!module.others.active() && !module.others.animating()) {\r\n module.remove.scrolling();\r\n module.bind.scrollLock();\r\n }\r\n }\r\n else {\r\n module.verbose('Modal cannot fit on screen setting to scrolling');\r\n module.set.scrolling();\r\n }\r\n },\r\n undetached: function() {\r\n $dimmable.addClass(className.undetached);\r\n }\r\n },\r\n\r\n setting: function(name, value) {\r\n module.debug('Changing setting', name, value);\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, settings, name);\r\n }\r\n else if(value !== undefined) {\r\n if($.isPlainObject(settings[name])) {\r\n $.extend(true, settings[name], value);\r\n }\r\n else {\r\n settings[name] = value;\r\n }\r\n }\r\n else {\r\n return settings[name];\r\n }\r\n },\r\n internal: function(name, value) {\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, module, name);\r\n }\r\n else if(value !== undefined) {\r\n module[name] = value;\r\n }\r\n else {\r\n return module[name];\r\n }\r\n },\r\n debug: function() {\r\n if(!settings.silent && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.debug.apply(console, arguments);\r\n }\r\n }\r\n },\r\n verbose: function() {\r\n if(!settings.silent && settings.verbose && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.verbose.apply(console, arguments);\r\n }\r\n }\r\n },\r\n error: function() {\r\n if(!settings.silent) {\r\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\r\n module.error.apply(console, arguments);\r\n }\r\n },\r\n performance: {\r\n log: function(message) {\r\n var\r\n currentTime,\r\n executionTime,\r\n previousTime\r\n ;\r\n if(settings.performance) {\r\n currentTime = new Date().getTime();\r\n previousTime = time || currentTime;\r\n executionTime = currentTime - previousTime;\r\n time = currentTime;\r\n performance.push({\r\n 'Name' : message[0],\r\n 'Arguments' : [].slice.call(message, 1) || '',\r\n 'Element' : element,\r\n 'Execution Time' : executionTime\r\n });\r\n }\r\n clearTimeout(module.performance.timer);\r\n module.performance.timer = setTimeout(module.performance.display, 500);\r\n },\r\n display: function() {\r\n var\r\n title = settings.name + ':',\r\n totalTime = 0\r\n ;\r\n time = false;\r\n clearTimeout(module.performance.timer);\r\n $.each(performance, function(index, data) {\r\n totalTime += data['Execution Time'];\r\n });\r\n title += ' ' + totalTime + 'ms';\r\n if(moduleSelector) {\r\n title += ' \\'' + moduleSelector + '\\'';\r\n }\r\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\r\n console.groupCollapsed(title);\r\n if(console.table) {\r\n console.table(performance);\r\n }\r\n else {\r\n $.each(performance, function(index, data) {\r\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\r\n });\r\n }\r\n console.groupEnd();\r\n }\r\n performance = [];\r\n }\r\n },\r\n invoke: function(query, passedArguments, context) {\r\n var\r\n object = instance,\r\n maxDepth,\r\n found,\r\n response\r\n ;\r\n passedArguments = passedArguments || queryArguments;\r\n context = element || context;\r\n if(typeof query == 'string' && object !== undefined) {\r\n query = query.split(/[\\. ]/);\r\n maxDepth = query.length - 1;\r\n $.each(query, function(depth, value) {\r\n var camelCaseValue = (depth != maxDepth)\r\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\r\n : query\r\n ;\r\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\r\n object = object[camelCaseValue];\r\n }\r\n else if( object[camelCaseValue] !== undefined ) {\r\n found = object[camelCaseValue];\r\n return false;\r\n }\r\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\r\n object = object[value];\r\n }\r\n else if( object[value] !== undefined ) {\r\n found = object[value];\r\n return false;\r\n }\r\n else {\r\n return false;\r\n }\r\n });\r\n }\r\n if ( $.isFunction( found ) ) {\r\n response = found.apply(context, passedArguments);\r\n }\r\n else if(found !== undefined) {\r\n response = found;\r\n }\r\n if($.isArray(returnedValue)) {\r\n returnedValue.push(response);\r\n }\r\n else if(returnedValue !== undefined) {\r\n returnedValue = [returnedValue, response];\r\n }\r\n else if(response !== undefined) {\r\n returnedValue = response;\r\n }\r\n return found;\r\n }\r\n };\r\n\r\n if(methodInvoked) {\r\n if(instance === undefined) {\r\n module.initialize();\r\n }\r\n module.invoke(query);\r\n }\r\n else {\r\n if(instance !== undefined) {\r\n instance.invoke('destroy');\r\n }\r\n module.initialize();\r\n }\r\n })\r\n ;\r\n\r\n return (returnedValue !== undefined)\r\n ? returnedValue\r\n : this\r\n ;\r\n};\r\n\r\n$.fn.modal.settings = {\r\n\r\n name : 'Modal',\r\n namespace : 'modal',\r\n\r\n useFlex : 'auto',\r\n offset : 0,\r\n\r\n silent : false,\r\n debug : false,\r\n verbose : false,\r\n performance : true,\r\n\r\n observeChanges : false,\r\n\r\n allowMultiple : false,\r\n detachable : true,\r\n closable : true,\r\n autofocus : true,\r\n\r\n inverted : false,\r\n blurring : false,\r\n\r\n centered : true,\r\n\r\n dimmerSettings : {\r\n closable : false,\r\n useCSS : true\r\n },\r\n\r\n // whether to use keyboard shortcuts\r\n keyboardShortcuts: true,\r\n\r\n context : 'body',\r\n\r\n queue : false,\r\n duration : 500,\r\n transition : 'scale',\r\n\r\n // padding with edge of page\r\n padding : 50,\r\n\r\n // called before show animation\r\n onShow : function(){},\r\n\r\n // called after show animation\r\n onVisible : function(){},\r\n\r\n // called before hide animation\r\n onHide : function(){ return true; },\r\n\r\n // called after hide animation\r\n onHidden : function(){},\r\n\r\n // called after approve selector match\r\n onApprove : function(){ return true; },\r\n\r\n // called after deny selector match\r\n onDeny : function(){ return true; },\r\n\r\n selector : {\r\n close : '> .close',\r\n approve : '.actions .positive, .actions .approve, .actions .ok',\r\n deny : '.actions .negative, .actions .deny, .actions .cancel',\r\n modal : '.ui.modal'\r\n },\r\n error : {\r\n dimmer : 'UI Dimmer, a required component is not included in this page',\r\n method : 'The method you called is not defined.',\r\n notFound : 'The element you specified could not be found'\r\n },\r\n className : {\r\n active : 'active',\r\n animating : 'animating',\r\n blurring : 'blurring',\r\n inverted : 'inverted',\r\n legacy : 'legacy',\r\n loading : 'loading',\r\n scrolling : 'scrolling',\r\n undetached : 'undetached'\r\n }\r\n};\r\n\r\n\r\n})( jQuery, window, document );\r\n","/*!\r\n * # Semantic UI 2.4.2 - Transition\r\n * http://github.com/semantic-org/semantic-ui/\r\n *\r\n *\r\n * Released under the MIT license\r\n * http://opensource.org/licenses/MIT\r\n *\r\n */\r\n\r\n;(function ($, window, document, undefined) {\r\n\r\n'use strict';\r\n\r\nwindow = (typeof window != 'undefined' && window.Math == Math)\r\n ? window\r\n : (typeof self != 'undefined' && self.Math == Math)\r\n ? self\r\n : Function('return this')()\r\n;\r\n\r\n$.fn.transition = function() {\r\n var\r\n $allModules = $(this),\r\n moduleSelector = $allModules.selector || '',\r\n\r\n time = new Date().getTime(),\r\n performance = [],\r\n\r\n moduleArguments = arguments,\r\n query = moduleArguments[0],\r\n queryArguments = [].slice.call(arguments, 1),\r\n methodInvoked = (typeof query === 'string'),\r\n\r\n requestAnimationFrame = window.requestAnimationFrame\r\n || window.mozRequestAnimationFrame\r\n || window.webkitRequestAnimationFrame\r\n || window.msRequestAnimationFrame\r\n || function(callback) { setTimeout(callback, 0); },\r\n\r\n returnedValue\r\n ;\r\n $allModules\r\n .each(function(index) {\r\n var\r\n $module = $(this),\r\n element = this,\r\n\r\n // set at run time\r\n settings,\r\n instance,\r\n\r\n error,\r\n className,\r\n metadata,\r\n animationEnd,\r\n animationName,\r\n\r\n namespace,\r\n moduleNamespace,\r\n eventNamespace,\r\n module\r\n ;\r\n\r\n module = {\r\n\r\n initialize: function() {\r\n\r\n // get full settings\r\n settings = module.get.settings.apply(element, moduleArguments);\r\n\r\n // shorthand\r\n className = settings.className;\r\n error = settings.error;\r\n metadata = settings.metadata;\r\n\r\n // define namespace\r\n eventNamespace = '.' + settings.namespace;\r\n moduleNamespace = 'module-' + settings.namespace;\r\n instance = $module.data(moduleNamespace) || module;\r\n\r\n // get vendor specific events\r\n animationEnd = module.get.animationEndEvent();\r\n\r\n if(methodInvoked) {\r\n methodInvoked = module.invoke(query);\r\n }\r\n\r\n // method not invoked, lets run an animation\r\n if(methodInvoked === false) {\r\n module.verbose('Converted arguments into settings object', settings);\r\n if(settings.interval) {\r\n module.delay(settings.animate);\r\n }\r\n else {\r\n module.animate();\r\n }\r\n module.instantiate();\r\n }\r\n },\r\n\r\n instantiate: function() {\r\n module.verbose('Storing instance of module', module);\r\n instance = module;\r\n $module\r\n .data(moduleNamespace, instance)\r\n ;\r\n },\r\n\r\n destroy: function() {\r\n module.verbose('Destroying previous module for', element);\r\n $module\r\n .removeData(moduleNamespace)\r\n ;\r\n },\r\n\r\n refresh: function() {\r\n module.verbose('Refreshing display type on next animation');\r\n delete module.displayType;\r\n },\r\n\r\n forceRepaint: function() {\r\n module.verbose('Forcing element repaint');\r\n var\r\n $parentElement = $module.parent(),\r\n $nextElement = $module.next()\r\n ;\r\n if($nextElement.length === 0) {\r\n $module.detach().appendTo($parentElement);\r\n }\r\n else {\r\n $module.detach().insertBefore($nextElement);\r\n }\r\n },\r\n\r\n repaint: function() {\r\n module.verbose('Repainting element');\r\n var\r\n fakeAssignment = element.offsetWidth\r\n ;\r\n },\r\n\r\n delay: function(interval) {\r\n var\r\n direction = module.get.animationDirection(),\r\n shouldReverse,\r\n delay\r\n ;\r\n if(!direction) {\r\n direction = module.can.transition()\r\n ? module.get.direction()\r\n : 'static'\r\n ;\r\n }\r\n interval = (interval !== undefined)\r\n ? interval\r\n : settings.interval\r\n ;\r\n shouldReverse = (settings.reverse == 'auto' && direction == className.outward);\r\n delay = (shouldReverse || settings.reverse == true)\r\n ? ($allModules.length - index) * settings.interval\r\n : index * settings.interval\r\n ;\r\n module.debug('Delaying animation by', delay);\r\n setTimeout(module.animate, delay);\r\n },\r\n\r\n animate: function(overrideSettings) {\r\n settings = overrideSettings || settings;\r\n if(!module.is.supported()) {\r\n module.error(error.support);\r\n return false;\r\n }\r\n module.debug('Preparing animation', settings.animation);\r\n if(module.is.animating()) {\r\n if(settings.queue) {\r\n if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) {\r\n module.debug('Animation is currently occurring, preventing queueing same animation', settings.animation);\r\n }\r\n else {\r\n module.queue(settings.animation);\r\n }\r\n return false;\r\n }\r\n else if(!settings.allowRepeats && module.is.occurring()) {\r\n module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);\r\n return false;\r\n }\r\n else {\r\n module.debug('New animation started, completing previous early', settings.animation);\r\n instance.complete();\r\n }\r\n }\r\n if( module.can.animate() ) {\r\n module.set.animating(settings.animation);\r\n }\r\n else {\r\n module.error(error.noAnimation, settings.animation, element);\r\n }\r\n },\r\n\r\n reset: function() {\r\n module.debug('Resetting animation to beginning conditions');\r\n module.remove.animationCallbacks();\r\n module.restore.conditions();\r\n module.remove.animating();\r\n },\r\n\r\n queue: function(animation) {\r\n module.debug('Queueing animation of', animation);\r\n module.queuing = true;\r\n $module\r\n .one(animationEnd + '.queue' + eventNamespace, function() {\r\n module.queuing = false;\r\n module.repaint();\r\n module.animate.apply(this, settings);\r\n })\r\n ;\r\n },\r\n\r\n complete: function (event) {\r\n module.debug('Animation complete', settings.animation);\r\n module.remove.completeCallback();\r\n module.remove.failSafe();\r\n if(!module.is.looping()) {\r\n if( module.is.outward() ) {\r\n module.verbose('Animation is outward, hiding element');\r\n module.restore.conditions();\r\n module.hide();\r\n }\r\n else if( module.is.inward() ) {\r\n module.verbose('Animation is outward, showing element');\r\n module.restore.conditions();\r\n module.show();\r\n }\r\n else {\r\n module.verbose('Static animation completed');\r\n module.restore.conditions();\r\n settings.onComplete.call(element);\r\n }\r\n }\r\n },\r\n\r\n force: {\r\n visible: function() {\r\n var\r\n style = $module.attr('style'),\r\n userStyle = module.get.userStyle(),\r\n displayType = module.get.displayType(),\r\n overrideStyle = userStyle + 'display: ' + displayType + ' !important;',\r\n currentDisplay = $module.css('display'),\r\n emptyStyle = (style === undefined || style === '')\r\n ;\r\n if(currentDisplay !== displayType) {\r\n module.verbose('Overriding default display to show element', displayType);\r\n $module\r\n .attr('style', overrideStyle)\r\n ;\r\n }\r\n else if(emptyStyle) {\r\n $module.removeAttr('style');\r\n }\r\n },\r\n hidden: function() {\r\n var\r\n style = $module.attr('style'),\r\n currentDisplay = $module.css('display'),\r\n emptyStyle = (style === undefined || style === '')\r\n ;\r\n if(currentDisplay !== 'none' && !module.is.hidden()) {\r\n module.verbose('Overriding default display to hide element');\r\n $module\r\n .css('display', 'none')\r\n ;\r\n }\r\n else if(emptyStyle) {\r\n $module\r\n .removeAttr('style')\r\n ;\r\n }\r\n }\r\n },\r\n\r\n has: {\r\n direction: function(animation) {\r\n var\r\n hasDirection = false\r\n ;\r\n animation = animation || settings.animation;\r\n if(typeof animation === 'string') {\r\n animation = animation.split(' ');\r\n $.each(animation, function(index, word){\r\n if(word === className.inward || word === className.outward) {\r\n hasDirection = true;\r\n }\r\n });\r\n }\r\n return hasDirection;\r\n },\r\n inlineDisplay: function() {\r\n var\r\n style = $module.attr('style') || ''\r\n ;\r\n return $.isArray(style.match(/display.*?;/, ''));\r\n }\r\n },\r\n\r\n set: {\r\n animating: function(animation) {\r\n var\r\n animationClass,\r\n direction\r\n ;\r\n // remove previous callbacks\r\n module.remove.completeCallback();\r\n\r\n // determine exact animation\r\n animation = animation || settings.animation;\r\n animationClass = module.get.animationClass(animation);\r\n\r\n // save animation class in cache to restore class names\r\n module.save.animation(animationClass);\r\n\r\n // override display if necessary so animation appears visibly\r\n module.force.visible();\r\n\r\n module.remove.hidden();\r\n module.remove.direction();\r\n\r\n module.start.animation(animationClass);\r\n\r\n },\r\n duration: function(animationName, duration) {\r\n duration = duration || settings.duration;\r\n duration = (typeof duration == 'number')\r\n ? duration + 'ms'\r\n : duration\r\n ;\r\n if(duration || duration === 0) {\r\n module.verbose('Setting animation duration', duration);\r\n $module\r\n .css({\r\n 'animation-duration': duration\r\n })\r\n ;\r\n }\r\n },\r\n direction: function(direction) {\r\n direction = direction || module.get.direction();\r\n if(direction == className.inward) {\r\n module.set.inward();\r\n }\r\n else {\r\n module.set.outward();\r\n }\r\n },\r\n looping: function() {\r\n module.debug('Transition set to loop');\r\n $module\r\n .addClass(className.looping)\r\n ;\r\n },\r\n hidden: function() {\r\n $module\r\n .addClass(className.transition)\r\n .addClass(className.hidden)\r\n ;\r\n },\r\n inward: function() {\r\n module.debug('Setting direction to inward');\r\n $module\r\n .removeClass(className.outward)\r\n .addClass(className.inward)\r\n ;\r\n },\r\n outward: function() {\r\n module.debug('Setting direction to outward');\r\n $module\r\n .removeClass(className.inward)\r\n .addClass(className.outward)\r\n ;\r\n },\r\n visible: function() {\r\n $module\r\n .addClass(className.transition)\r\n .addClass(className.visible)\r\n ;\r\n }\r\n },\r\n\r\n start: {\r\n animation: function(animationClass) {\r\n animationClass = animationClass || module.get.animationClass();\r\n module.debug('Starting tween', animationClass);\r\n $module\r\n .addClass(animationClass)\r\n .one(animationEnd + '.complete' + eventNamespace, module.complete)\r\n ;\r\n if(settings.useFailSafe) {\r\n module.add.failSafe();\r\n }\r\n module.set.duration(settings.duration);\r\n settings.onStart.call(element);\r\n }\r\n },\r\n\r\n save: {\r\n animation: function(animation) {\r\n if(!module.cache) {\r\n module.cache = {};\r\n }\r\n module.cache.animation = animation;\r\n },\r\n displayType: function(displayType) {\r\n if(displayType !== 'none') {\r\n $module.data(metadata.displayType, displayType);\r\n }\r\n },\r\n transitionExists: function(animation, exists) {\r\n $.fn.transition.exists[animation] = exists;\r\n module.verbose('Saving existence of transition', animation, exists);\r\n }\r\n },\r\n\r\n restore: {\r\n conditions: function() {\r\n var\r\n animation = module.get.currentAnimation()\r\n ;\r\n if(animation) {\r\n $module\r\n .removeClass(animation)\r\n ;\r\n module.verbose('Removing animation class', module.cache);\r\n }\r\n module.remove.duration();\r\n }\r\n },\r\n\r\n add: {\r\n failSafe: function() {\r\n var\r\n duration = module.get.duration()\r\n ;\r\n module.timer = setTimeout(function() {\r\n $module.triggerHandler(animationEnd);\r\n }, duration + settings.failSafeDelay);\r\n module.verbose('Adding fail safe timer', module.timer);\r\n }\r\n },\r\n\r\n remove: {\r\n animating: function() {\r\n $module.removeClass(className.animating);\r\n },\r\n animationCallbacks: function() {\r\n module.remove.queueCallback();\r\n module.remove.completeCallback();\r\n },\r\n queueCallback: function() {\r\n $module.off('.queue' + eventNamespace);\r\n },\r\n completeCallback: function() {\r\n $module.off('.complete' + eventNamespace);\r\n },\r\n display: function() {\r\n $module.css('display', '');\r\n },\r\n direction: function() {\r\n $module\r\n .removeClass(className.inward)\r\n .removeClass(className.outward)\r\n ;\r\n },\r\n duration: function() {\r\n $module\r\n .css('animation-duration', '')\r\n ;\r\n },\r\n failSafe: function() {\r\n module.verbose('Removing fail safe timer', module.timer);\r\n if(module.timer) {\r\n clearTimeout(module.timer);\r\n }\r\n },\r\n hidden: function() {\r\n $module.removeClass(className.hidden);\r\n },\r\n visible: function() {\r\n $module.removeClass(className.visible);\r\n },\r\n looping: function() {\r\n module.debug('Transitions are no longer looping');\r\n if( module.is.looping() ) {\r\n module.reset();\r\n $module\r\n .removeClass(className.looping)\r\n ;\r\n }\r\n },\r\n transition: function() {\r\n $module\r\n .removeClass(className.visible)\r\n .removeClass(className.hidden)\r\n ;\r\n }\r\n },\r\n get: {\r\n settings: function(animation, duration, onComplete) {\r\n // single settings object\r\n if(typeof animation == 'object') {\r\n return $.extend(true, {}, $.fn.transition.settings, animation);\r\n }\r\n // all arguments provided\r\n else if(typeof onComplete == 'function') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n onComplete : onComplete,\r\n duration : duration\r\n });\r\n }\r\n // only duration provided\r\n else if(typeof duration == 'string' || typeof duration == 'number') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n duration : duration\r\n });\r\n }\r\n // duration is actually settings object\r\n else if(typeof duration == 'object') {\r\n return $.extend({}, $.fn.transition.settings, duration, {\r\n animation : animation\r\n });\r\n }\r\n // duration is actually callback\r\n else if(typeof duration == 'function') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n onComplete : duration\r\n });\r\n }\r\n // only animation provided\r\n else {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation\r\n });\r\n }\r\n },\r\n animationClass: function(animation) {\r\n var\r\n animationClass = animation || settings.animation,\r\n directionClass = (module.can.transition() && !module.has.direction())\r\n ? module.get.direction() + ' '\r\n : ''\r\n ;\r\n return className.animating + ' '\r\n + className.transition + ' '\r\n + directionClass\r\n + animationClass\r\n ;\r\n },\r\n currentAnimation: function() {\r\n return (module.cache && module.cache.animation !== undefined)\r\n ? module.cache.animation\r\n : false\r\n ;\r\n },\r\n currentDirection: function() {\r\n return module.is.inward()\r\n ? className.inward\r\n : className.outward\r\n ;\r\n },\r\n direction: function() {\r\n return module.is.hidden() || !module.is.visible()\r\n ? className.inward\r\n : className.outward\r\n ;\r\n },\r\n animationDirection: function(animation) {\r\n var\r\n direction\r\n ;\r\n animation = animation || settings.animation;\r\n if(typeof animation === 'string') {\r\n animation = animation.split(' ');\r\n // search animation name for out/in class\r\n $.each(animation, function(index, word){\r\n if(word === className.inward) {\r\n direction = className.inward;\r\n }\r\n else if(word === className.outward) {\r\n direction = className.outward;\r\n }\r\n });\r\n }\r\n // return found direction\r\n if(direction) {\r\n return direction;\r\n }\r\n return false;\r\n },\r\n duration: function(duration) {\r\n duration = duration || settings.duration;\r\n if(duration === false) {\r\n duration = $module.css('animation-duration') || 0;\r\n }\r\n return (typeof duration === 'string')\r\n ? (duration.indexOf('ms') > -1)\r\n ? parseFloat(duration)\r\n : parseFloat(duration) * 1000\r\n : duration\r\n ;\r\n },\r\n displayType: function(shouldDetermine) {\r\n shouldDetermine = (shouldDetermine !== undefined)\r\n ? shouldDetermine\r\n : true\r\n ;\r\n if(settings.displayType) {\r\n return settings.displayType;\r\n }\r\n if(shouldDetermine && $module.data(metadata.displayType) === undefined) {\r\n // create fake element to determine display state\r\n module.can.transition(true);\r\n }\r\n return $module.data(metadata.displayType);\r\n },\r\n userStyle: function(style) {\r\n style = style || $module.attr('style') || '';\r\n return style.replace(/display.*?;/, '');\r\n },\r\n transitionExists: function(animation) {\r\n return $.fn.transition.exists[animation];\r\n },\r\n animationStartEvent: function() {\r\n var\r\n element = document.createElement('div'),\r\n animations = {\r\n 'animation' :'animationstart',\r\n 'OAnimation' :'oAnimationStart',\r\n 'MozAnimation' :'mozAnimationStart',\r\n 'WebkitAnimation' :'webkitAnimationStart'\r\n },\r\n animation\r\n ;\r\n for(animation in animations){\r\n if( element.style[animation] !== undefined ){\r\n return animations[animation];\r\n }\r\n }\r\n return false;\r\n },\r\n animationEndEvent: function() {\r\n var\r\n element = document.createElement('div'),\r\n animations = {\r\n 'animation' :'animationend',\r\n 'OAnimation' :'oAnimationEnd',\r\n 'MozAnimation' :'mozAnimationEnd',\r\n 'WebkitAnimation' :'webkitAnimationEnd'\r\n },\r\n animation\r\n ;\r\n for(animation in animations){\r\n if( element.style[animation] !== undefined ){\r\n return animations[animation];\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n },\r\n\r\n can: {\r\n transition: function(forced) {\r\n var\r\n animation = settings.animation,\r\n transitionExists = module.get.transitionExists(animation),\r\n displayType = module.get.displayType(false),\r\n elementClass,\r\n tagName,\r\n $clone,\r\n currentAnimation,\r\n inAnimation,\r\n directionExists\r\n ;\r\n if( transitionExists === undefined || forced) {\r\n module.verbose('Determining whether animation exists');\r\n elementClass = $module.attr('class');\r\n tagName = $module.prop('tagName');\r\n\r\n $clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module);\r\n currentAnimation = $clone\r\n .addClass(animation)\r\n .removeClass(className.inward)\r\n .removeClass(className.outward)\r\n .addClass(className.animating)\r\n .addClass(className.transition)\r\n .css('animationName')\r\n ;\r\n inAnimation = $clone\r\n .addClass(className.inward)\r\n .css('animationName')\r\n ;\r\n if(!displayType) {\r\n displayType = $clone\r\n .attr('class', elementClass)\r\n .removeAttr('style')\r\n .removeClass(className.hidden)\r\n .removeClass(className.visible)\r\n .show()\r\n .css('display')\r\n ;\r\n module.verbose('Determining final display state', displayType);\r\n module.save.displayType(displayType);\r\n }\r\n\r\n $clone.remove();\r\n if(currentAnimation != inAnimation) {\r\n module.debug('Direction exists for animation', animation);\r\n directionExists = true;\r\n }\r\n else if(currentAnimation == 'none' || !currentAnimation) {\r\n module.debug('No animation defined in css', animation);\r\n return;\r\n }\r\n else {\r\n module.debug('Static animation found', animation, displayType);\r\n directionExists = false;\r\n }\r\n module.save.transitionExists(animation, directionExists);\r\n }\r\n return (transitionExists !== undefined)\r\n ? transitionExists\r\n : directionExists\r\n ;\r\n },\r\n animate: function() {\r\n // can transition does not return a value if animation does not exist\r\n return (module.can.transition() !== undefined);\r\n }\r\n },\r\n\r\n is: {\r\n animating: function() {\r\n return $module.hasClass(className.animating);\r\n },\r\n inward: function() {\r\n return $module.hasClass(className.inward);\r\n },\r\n outward: function() {\r\n return $module.hasClass(className.outward);\r\n },\r\n looping: function() {\r\n return $module.hasClass(className.looping);\r\n },\r\n occurring: function(animation) {\r\n animation = animation || settings.animation;\r\n animation = '.' + animation.replace(' ', '.');\r\n return ( $module.filter(animation).length > 0 );\r\n },\r\n visible: function() {\r\n return $module.is(':visible');\r\n },\r\n hidden: function() {\r\n return $module.css('visibility') === 'hidden';\r\n },\r\n supported: function() {\r\n return(animationEnd !== false);\r\n }\r\n },\r\n\r\n hide: function() {\r\n module.verbose('Hiding element');\r\n if( module.is.animating() ) {\r\n module.reset();\r\n }\r\n element.blur(); // IE will trigger focus change if element is not blurred before hiding\r\n module.remove.display();\r\n module.remove.visible();\r\n module.set.hidden();\r\n module.force.hidden();\r\n settings.onHide.call(element);\r\n settings.onComplete.call(element);\r\n // module.repaint();\r\n },\r\n\r\n show: function(display) {\r\n module.verbose('Showing element', display);\r\n module.remove.hidden();\r\n module.set.visible();\r\n module.force.visible();\r\n settings.onShow.call(element);\r\n settings.onComplete.call(element);\r\n // module.repaint();\r\n },\r\n\r\n toggle: function() {\r\n if( module.is.visible() ) {\r\n module.hide();\r\n }\r\n else {\r\n module.show();\r\n }\r\n },\r\n\r\n stop: function() {\r\n module.debug('Stopping current animation');\r\n $module.triggerHandler(animationEnd);\r\n },\r\n\r\n stopAll: function() {\r\n module.debug('Stopping all animation');\r\n module.remove.queueCallback();\r\n $module.triggerHandler(animationEnd);\r\n },\r\n\r\n clear: {\r\n queue: function() {\r\n module.debug('Clearing animation queue');\r\n module.remove.queueCallback();\r\n }\r\n },\r\n\r\n enable: function() {\r\n module.verbose('Starting animation');\r\n $module.removeClass(className.disabled);\r\n },\r\n\r\n disable: function() {\r\n module.debug('Stopping animation');\r\n $module.addClass(className.disabled);\r\n },\r\n\r\n setting: function(name, value) {\r\n module.debug('Changing setting', name, value);\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, settings, name);\r\n }\r\n else if(value !== undefined) {\r\n if($.isPlainObject(settings[name])) {\r\n $.extend(true, settings[name], value);\r\n }\r\n else {\r\n settings[name] = value;\r\n }\r\n }\r\n else {\r\n return settings[name];\r\n }\r\n },\r\n internal: function(name, value) {\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, module, name);\r\n }\r\n else if(value !== undefined) {\r\n module[name] = value;\r\n }\r\n else {\r\n return module[name];\r\n }\r\n },\r\n debug: function() {\r\n if(!settings.silent && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.debug.apply(console, arguments);\r\n }\r\n }\r\n },\r\n verbose: function() {\r\n if(!settings.silent && settings.verbose && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.verbose.apply(console, arguments);\r\n }\r\n }\r\n },\r\n error: function() {\r\n if(!settings.silent) {\r\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\r\n module.error.apply(console, arguments);\r\n }\r\n },\r\n performance: {\r\n log: function(message) {\r\n var\r\n currentTime,\r\n executionTime,\r\n previousTime\r\n ;\r\n if(settings.performance) {\r\n currentTime = new Date().getTime();\r\n previousTime = time || currentTime;\r\n executionTime = currentTime - previousTime;\r\n time = currentTime;\r\n performance.push({\r\n 'Name' : message[0],\r\n 'Arguments' : [].slice.call(message, 1) || '',\r\n 'Element' : element,\r\n 'Execution Time' : executionTime\r\n });\r\n }\r\n clearTimeout(module.performance.timer);\r\n module.performance.timer = setTimeout(module.performance.display, 500);\r\n },\r\n display: function() {\r\n var\r\n title = settings.name + ':',\r\n totalTime = 0\r\n ;\r\n time = false;\r\n clearTimeout(module.performance.timer);\r\n $.each(performance, function(index, data) {\r\n totalTime += data['Execution Time'];\r\n });\r\n title += ' ' + totalTime + 'ms';\r\n if(moduleSelector) {\r\n title += ' \\'' + moduleSelector + '\\'';\r\n }\r\n if($allModules.length > 1) {\r\n title += ' ' + '(' + $allModules.length + ')';\r\n }\r\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\r\n console.groupCollapsed(title);\r\n if(console.table) {\r\n console.table(performance);\r\n }\r\n else {\r\n $.each(performance, function(index, data) {\r\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\r\n });\r\n }\r\n console.groupEnd();\r\n }\r\n performance = [];\r\n }\r\n },\r\n // modified for transition to return invoke success\r\n invoke: function(query, passedArguments, context) {\r\n var\r\n object = instance,\r\n maxDepth,\r\n found,\r\n response\r\n ;\r\n passedArguments = passedArguments || queryArguments;\r\n context = element || context;\r\n if(typeof query == 'string' && object !== undefined) {\r\n query = query.split(/[\\. ]/);\r\n maxDepth = query.length - 1;\r\n $.each(query, function(depth, value) {\r\n var camelCaseValue = (depth != maxDepth)\r\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\r\n : query\r\n ;\r\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\r\n object = object[camelCaseValue];\r\n }\r\n else if( object[camelCaseValue] !== undefined ) {\r\n found = object[camelCaseValue];\r\n return false;\r\n }\r\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\r\n object = object[value];\r\n }\r\n else if( object[value] !== undefined ) {\r\n found = object[value];\r\n return false;\r\n }\r\n else {\r\n return false;\r\n }\r\n });\r\n }\r\n if ( $.isFunction( found ) ) {\r\n response = found.apply(context, passedArguments);\r\n }\r\n else if(found !== undefined) {\r\n response = found;\r\n }\r\n\r\n if($.isArray(returnedValue)) {\r\n returnedValue.push(response);\r\n }\r\n else if(returnedValue !== undefined) {\r\n returnedValue = [returnedValue, response];\r\n }\r\n else if(response !== undefined) {\r\n returnedValue = response;\r\n }\r\n return (found !== undefined)\r\n ? found\r\n : false\r\n ;\r\n }\r\n };\r\n module.initialize();\r\n })\r\n ;\r\n return (returnedValue !== undefined)\r\n ? returnedValue\r\n : this\r\n ;\r\n};\r\n\r\n// Records if CSS transition is available\r\n$.fn.transition.exists = {};\r\n\r\n$.fn.transition.settings = {\r\n\r\n // module info\r\n name : 'Transition',\r\n\r\n // hide all output from this component regardless of other settings\r\n silent : false,\r\n\r\n // debug content outputted to console\r\n debug : false,\r\n\r\n // verbose debug output\r\n verbose : false,\r\n\r\n // performance data output\r\n performance : true,\r\n\r\n // event namespace\r\n namespace : 'transition',\r\n\r\n // delay between animations in group\r\n interval : 0,\r\n\r\n // whether group animations should be reversed\r\n reverse : 'auto',\r\n\r\n // animation callback event\r\n onStart : function() {},\r\n onComplete : function() {},\r\n onShow : function() {},\r\n onHide : function() {},\r\n\r\n // whether timeout should be used to ensure callback fires in cases animationend does not\r\n useFailSafe : true,\r\n\r\n // delay in ms for fail safe\r\n failSafeDelay : 100,\r\n\r\n // whether EXACT animation can occur twice in a row\r\n allowRepeats : false,\r\n\r\n // Override final display type on visible\r\n displayType : false,\r\n\r\n // animation duration\r\n animation : 'fade',\r\n duration : false,\r\n\r\n // new animations will occur after previous ones\r\n queue : true,\r\n\r\n metadata : {\r\n displayType: 'display'\r\n },\r\n\r\n className : {\r\n animating : 'animating',\r\n disabled : 'disabled',\r\n hidden : 'hidden',\r\n inward : 'in',\r\n loading : 'loading',\r\n looping : 'looping',\r\n outward : 'out',\r\n transition : 'transition',\r\n visible : 'visible'\r\n },\r\n\r\n // possible errors\r\n error: {\r\n noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',\r\n repeated : 'That animation is already occurring, cancelling repeated animation',\r\n method : 'The method you called is not defined',\r\n support : 'This browser does not support CSS animations'\r\n }\r\n\r\n};\r\n\r\n\r\n})( jQuery, window, document );\r\n","window.dbs = window.dbs || {}\r\n\r\ndbs.events = function () {\r\n const self = this\r\n self.events = {}\r\n\r\n self.subscribe = function (eventName, callback) {\r\n self.events[eventName] = self.events[eventName] || []\r\n self.events[eventName].push(callback)\r\n }\r\n\r\n self.emit = function (eventName, data, log) {\r\n if (process.env.NODE_ENV === 'development' && log) {\r\n console.log('Event: ' + eventName, data)\r\n }\r\n\r\n const evt = self.events[eventName]\r\n if (evt) {\r\n for (let i = 0; i < evt.length; i++) {\r\n evt[i].call(null, data)\r\n }\r\n }\r\n }\r\n}\r\n\r\nwindow.dbs.globalEvents = new dbs.events()\r\n","// NOTE: Shepherd depends on `window.dbs.globalEvents`.\r\n//\r\n// 1. Add items to the Shepherd queue with:\r\n// `window.dbs.globalEvents.emit('shepherdQueue', 'exampleUniqueName')`\r\n//\r\n// 2. Listen to Shepherd to kno when you should run your items function:\r\n// `window.dbs.globalEvents.subscribe('shepherdItem', 'exampleUniqueName')`\r\n//\r\n// 3. Tell Shepherd you're done, so it can handle the next item:\r\n// `window.dbs.globalEvents.emit('shepherdDone', 'exampleUniqueName')`\r\n\r\nwindow.dbs = window.dbs || {}\r\ndbs.shepherd = dbs.shepherd || {}\r\n\r\ndbs.shepherd.itemQueue = []\r\n\r\ndbs.shepherd.init = function () {\r\n let isShepherdBusy = false\r\n\r\n const shepherdNextItem = function () {\r\n let nextItem = dbs.shepherd.itemQueue.pop()\r\n\r\n if (nextItem) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('shepherdNextItem', nextItem)\r\n }\r\n\r\n isShepherdBusy = true\r\n return window.dbs.globalEvents.emit('shepherdNext', nextItem)\r\n }\r\n\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('shepherdNextItem is all DONE!!!')\r\n }\r\n\r\n isShepherdBusy = false\r\n }\r\n\r\n window.dbs.globalEvents.subscribe('shepherdQueue', function (uid) {\r\n if (dbs.shepherd.itemQueue.includes(uid)) return\r\n dbs.shepherd.itemQueue.unshift(uid) // add to queue\r\n\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('[SHEPHERD]', 'ADD', uid)\r\n }\r\n\r\n if (isShepherdBusy) return\r\n shepherdNextItem()\r\n })\r\n\r\n window.dbs.globalEvents.subscribe('shepherdDone', function (uid) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('[SHEPHERD]', 'DONE', uid)\r\n console.log('[SHEPHERD]', 'itemQueue?', dbs.shepherd.itemQueue)\r\n }\r\n\r\n // `setTimeout` to ensures the previous function is 100% completed.\r\n // - fixes next modal flashing its page dimmer on transition in.\r\n setTimeout(() => shepherdNextItem(), 5)\r\n })\r\n}\r\n\r\nwindow.dbs.shepherd.init()\r\n","window.dbs = window.dbs || {}\r\ndbs.layout = dbs.layout || {}\r\n\r\ndbs.layout.Sidebar = function (ptPageWrapper) {\r\n const page = $(ptPageWrapper)\r\n const sidebar = page.find('.sidebar-layout .sidebar')\r\n const sidebarContainer = page.find('.sidebar-layout .sidebar .container')\r\n const sidebarContent = page.find('.sidebar-layout .sidebar .sidebar-content')\r\n\r\n const showSidebar = function () {\r\n dbs.utilities.document.disableScroll()\r\n sidebar.addClass('active')\r\n }\r\n\r\n const hideSidebar = function () {\r\n sidebar.removeClass('active')\r\n dbs.utilities.document.enabledScroll()\r\n // when the sidebar container has completed hiding, reset the sidebar scroll position to 0\r\n let transitionDuration = dbs.utilities.getTransitionDurationFromElement(sidebarContainer)\r\n setTimeout(function () {\r\n sidebarContent.scrollTop(0)\r\n }, transitionDuration)\r\n }\r\n\r\n page.find('.sidebar-layout .sidebar-toggle').click(function () {\r\n sidebar.hasClass('active') ? hideSidebar() : showSidebar()\r\n })\r\n\r\n page.find('.sidebar-layout .overlay').click(function () {\r\n hideSidebar()\r\n })\r\n}\r\n","window.dbs = window.dbs || {}\r\n\r\ndbs.request = function (endpoint, method) {\r\n const self = this\r\n self.events = new dbs.events()\r\n\r\n self.send = function (data, ajaxSettings) {\r\n self.events.emit(\r\n 'Request:send',\r\n {\r\n endpoint: endpoint,\r\n method: method,\r\n data: data,\r\n },\r\n true,\r\n )\r\n\r\n if (!ajaxSettings) {\r\n ajaxSettings = {\r\n url: endpoint,\r\n type: method,\r\n data: JSON.stringify(data),\r\n dataType: 'json',\r\n contentType: 'application/json',\r\n }\r\n } else {\r\n ajaxSettings.data = data\r\n }\r\n\r\n $.ajax(ajaxSettings)\r\n .done(function (response) {\r\n self.events.emit(\r\n 'Request:send_success',\r\n {\r\n endpoint: endpoint,\r\n method: method,\r\n data: data,\r\n response: response,\r\n },\r\n true,\r\n )\r\n })\r\n .fail(function (response) {\r\n self.events.emit(\r\n 'Request:send_fail',\r\n {\r\n endpoint: endpoint,\r\n method: method,\r\n data: data,\r\n response: response.responseJSON,\r\n },\r\n true,\r\n )\r\n })\r\n .always(function () {\r\n self.events.emit(\r\n 'Request:send_finished',\r\n {\r\n endpoint: endpoint,\r\n method: method,\r\n data: data,\r\n },\r\n true,\r\n )\r\n })\r\n }\r\n}\r\n","import Cookies from 'js-cookie'\r\n\r\nwindow.dbs = window.dbs || {}\r\n\r\ndbs.response = function (response, el) {\r\n const self = this\r\n self.el = el\r\n\r\n self.handle = function () {\r\n if (response.objectSet) {\r\n if (response.objectSet.actions) {\r\n for (let a = 0; a < response.objectSet.actions.length; a++) {\r\n const action = response.objectSet.actions[a]\r\n switch (action.type) {\r\n case 'message': {\r\n if (self.el) {\r\n if (!self.el.find('.response-container').length) {\r\n console.warn('message action requires a .response-container')\r\n }\r\n self.el.find('.response-container').append(action.content)\r\n } else {\r\n console.warn('message action requires a parent element')\r\n }\r\n break\r\n }\r\n\r\n case 'setCookie': {\r\n if (!action.name) {\r\n console.warn('setCookie action must specify name')\r\n break\r\n }\r\n if (!action.value) {\r\n console.warn('setCookie action must specify value')\r\n break\r\n }\r\n const cookieParams = { path: '/' }\r\n if (action.path) {\r\n cookieParams.path = action.path\r\n }\r\n if (action.expires) {\r\n cookieParams.expires = action.expires\r\n }\r\n Cookies.set(name, value, cookieParams)\r\n break\r\n }\r\n\r\n case 'redirect': {\r\n if (action.uri) {\r\n window.location.href = action.uri\r\n } else {\r\n console.warn('redirect action requires a uri')\r\n }\r\n break\r\n }\r\n\r\n case 'modal': {\r\n const $body = $('body')\r\n $body.append(`\r\n
\r\n \r\n
${action.content}
\r\n
`)\r\n const modal = $body.find('.modal:last')\r\n $(modal).modal('show')\r\n break\r\n }\r\n\r\n case 'fbqTrack': {\r\n if (!action.eventName) {\r\n console.warn('fbqTrack action must specify eventName')\r\n break\r\n }\r\n if (!action.customData) {\r\n console.warn('fbqTrack action must specify customData')\r\n break\r\n }\r\n try {\r\n fbq('set', 'autoConfig', false, 'FB_PIXEL_ID')\r\n fbq('track', action.eventName, action.customData)\r\n } catch (err) {\r\n console.warn(err)\r\n }\r\n break\r\n }\r\n\r\n case 'gtmTrack': {\r\n if (!action.dataLayer) {\r\n console.warn('gtmTrack action must specify dataLayer')\r\n break\r\n }\r\n try {\r\n dataLayer.push(action.dataLayer)\r\n } catch (err) {\r\n console.warn(err)\r\n }\r\n break\r\n }\r\n\r\n case 'gaTrack': {\r\n if (!action.fields) {\r\n console.warn('gaTrack action must specify fields')\r\n break\r\n }\r\n try {\r\n ga('send', action.fields)\r\n } catch (err) {\r\n console.warn(err)\r\n }\r\n break\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","window.dbs = window.dbs || {}\r\ndbs.utilities = dbs.utilities || {}\r\n\r\ndbs.utilities.document = (function () {\r\n function disableScroll() {\r\n const body = document.body\r\n const scrollY = window.scrollY\r\n body.style.position = 'fixed'\r\n body.style.top = `-${scrollY}px` // retain page scroll position\r\n }\r\n\r\n function enabledScroll() {\r\n const body = document.body\r\n const scrollY = body.style.top\r\n body.style.position = ''\r\n body.style.top = ''\r\n window.scrollTo(0, parseInt(scrollY || '0') * -1) // retain page scroll position\r\n }\r\n\r\n return {\r\n disableScroll,\r\n enabledScroll,\r\n }\r\n})()\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Private TransitionEnd Helpers\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst MILLISECONDS_MULTIPLIER = 1000\r\n\r\ndbs.utilities.getTransitionDurationFromElement = function (element) {\r\n if (!element) {\r\n return 0\r\n }\r\n\r\n console.log('element', element)\r\n\r\n // Get transition-duration of the element\r\n let transitionDuration = $(element).css('transition-duration')\r\n let transitionDelay = $(element).css('transition-delay')\r\n\r\n const floatTransitionDuration = parseFloat(transitionDuration)\r\n const floatTransitionDelay = parseFloat(transitionDelay)\r\n\r\n // Return 0 if element or transition duration is not found\r\n if (!floatTransitionDuration && !floatTransitionDelay) {\r\n return 0\r\n }\r\n\r\n // If multiple durations are defined, take the first\r\n transitionDuration = transitionDuration.split(',')[0]\r\n transitionDelay = transitionDelay.split(',')[0]\r\n\r\n return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Debounce\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\n// See: https://davidwalsh.name/javascript-debounce-function\r\n\r\n// Returns a function, that, as long as it continues to be invoked, will not\r\n// be triggered. The function will be called after it stops being called for\r\n// N milliseconds. If `immediate` is passed, trigger the function on the\r\n// leading edge, instead of the trailing.\r\ndbs.utilities.debounce = function (func, wait, immediate) {\r\n let timeout\r\n return function () {\r\n let context = this,\r\n args = arguments\r\n let later = function () {\r\n timeout = null\r\n if (!immediate) func.apply(context, args)\r\n }\r\n let callNow = immediate && !timeout\r\n clearTimeout(timeout)\r\n timeout = setTimeout(later, wait)\r\n if (callNow) func.apply(context, args)\r\n }\r\n}\r\n","window.dbs = window.dbs || {}\r\ndbs.utilities = dbs.utilities || {}\r\n\r\ndbs.utilities.querystring = function () {\r\n const self = this\r\n\r\n self.removeParameter = function (name, url) {\r\n if (!url) url = window.location.href\r\n if (url === undefined) return\r\n\r\n const [path, searchParams] = url.includes('?') ? url.split('?') : [url, undefined]\r\n if (searchParams === undefined) return path\r\n\r\n let newSearchParams = searchParams\r\n ?.split('&')\r\n .filter(\r\n (param) =>\r\n !(param.toLowerCase() === name.toLowerCase() || param.toLowerCase().startsWith(`${name.toLowerCase()}=`)),\r\n )\r\n .join('&')\r\n\r\n return `${path}?${newSearchParams}`\r\n }\r\n\r\n self.getParameter = function (name, url) {\r\n if (!url) url = window.location.href\r\n if (url === undefined) return\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n const [, searchParams] = url.includes('?') ? url.split('?') : [url, undefined]\r\n\r\n if (searchParams === undefined) return\r\n\r\n const params = new URLSearchParams(searchParams)\r\n const paramsToLower = new URLSearchParams([...params].map(([key, value]) => [key.toLowerCase(), value]))\r\n name = name.replace(/[[\\]]/g, '\\\\$&') // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_the_replacement\r\n return paramsToLower.get(name.toLowerCase())\r\n }\r\n}\r\n","// NOTE: jquery is loading from Kentico's `@Html.Kentico().PageBuilderScripts()`\r\n// Jquery is configured in webpack as an 'external' so will not be included in any bundles.\r\n// Referenced here for IDE magic and autocomplete suggestions purposes only.\r\nwindow.jQuery = window.$ = require('jquery')\r\n\r\nimport Cookies from 'js-cookie'\r\nwindow.Cookies = Cookies\r\n\r\nrequire('../scripts/dbs/dbs.events')\r\nrequire('../scripts/dbs/dbs.events.shepherd')\r\nrequire('../scripts/dbs/dbs.request')\r\nrequire('../scripts/dbs/dbs.response')\r\nrequire('../scripts/dbs/dbs.utilities')\r\nrequire('../scripts/dbs/dbs.layout')\r\n\r\n// Semantic UI\r\n//\r\n// This is out base UI library that we partially utilise to build our base styles and widgets.\r\n// Import order is important, so refer to Semantic UI's git src for reference.\r\n// See: https://github.com/Semantic-Org/Semantic-UI/blob/master/src/semantic.less\r\n\r\n// Site reset and default styles\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/reset.css')\r\nimport(/* webpackMode: \"eager\" */ './global.scss')\r\n\r\n// Flutter Event Handlers\r\nimport(/* webpackMode: \"eager\" */'../flutter/flutter.events.handlers');\r\nimport(/* webpackMode: \"eager\" */'../flutter/flutter.global.scss');\r\n\r\n// Base elements\r\n// Typically required by widgets, so should be imported first\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/icon.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/image.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/input.scss')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/label.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/loader.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/message.scss')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/dimmer')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/dimmer.scss')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/dropdown.scss')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/modal.scss')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/popup.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/tab.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/transition')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/transition.css')\r\nimport(/* webpackMode: \"eager\" */ '../plugins/semantic/form.scss')\r\n\r\n// Global widgets\r\n//\r\nimport(/* webpackMode: \"eager\" */ '../widgets/header/header')\r\nimport(/* webpackMode: \"eager\" */ '../widgets/gdpr/gdpr') // \"eager\" to ensure GDPR loads before any other modal widgets\r\nimport(/* webpackMode: \"eager\" */'../widgets/footer/footer')\r\nimport(/* webpackMode: \"eager\" */ '../widgets/footer/footer.scss')\r\n\r\n// Critical widgets CSS (CW20-193 Fix layout shift)\r\n//\r\n// Critical CSS for widgets is used to controls excessive layout shift, caused\r\n// by the widget mark-up in the DOM before the widget stylesheet has lazy loaded.\r\n// For example, critical CSS can hide a modals mark-up during page load, as opposed to\r\n// rendering in DOM and hidden once the widget stylesheet has loaded later.\r\n// These styles are bundled with global.css, which is blocking page render, and loaded immediately.\r\nimport(/* webpackMode: \"eager\" */ '../widgets/mobile-menu/mobile-menu-critical.scss')\r\nimport(/* webpackMode: \"eager\" */ '../widgets/dhp-popup/dhp-popup-critical.scss')\r\nimport(/* webpackMode: \"eager\" */ '../widgets/gdpr/gdpr-critical.scss')\r\nimport(/* webpackMode: \"eager\" */ '../widgets/partner-promo-image/partner-promo-image-critical.scss')\r\n// Common widgets\r\n//\r\nimport(/* webpackMode: \"eager\" */ '../widgets/breadcrumbs/breadcrumbs.scss')\r\n\r\n\r\n// Filter out key press to only allow number characters to be entered\r\n$('input.number-only').keypress(function (event) {\r\n let key = event.keyCode || event.which\r\n key = String.fromCharCode(key)\r\n\r\n const regex = '^[0-9]*$'\r\n if (!key.match(regex)) {\r\n event.preventDefault()\r\n }\r\n})\r\n\r\n// Appends the query from the page URL to any with the class `.append-querystring`\r\n// E.g. from `` to ``\r\n$('.append-querystring').each(function (i, el) {\r\n const qs = window.location.href.split('?')[1]\r\n const currentUrl = $(el).attr('href')\r\n if (qs && qs.length > 1) {\r\n $(el).attr('href', currentUrl + '?' + qs)\r\n }\r\n})\r\n\r\n /* Apply a CSS class hook to the body tag based on the screen width */\r\n ; (function () {\r\n const $body = $('body')\r\n const isMobileLargeMax = window.matchMedia('(max-width: 767px)')\r\n const updateBodyCssClass = function (e) {\r\n if (e.matches) {\r\n $body.addClass('is-mobile-view').removeClass('is-desktop-view')\r\n } else {\r\n $body.addClass('is-desktop-view').removeClass('is-mobile-view')\r\n }\r\n }\r\n\r\n updateBodyCssClass(isMobileLargeMax) // runs on init\r\n isMobileLargeMax.addEventListener('change', updateBodyCssClass)\r\n })()\r\n// Hack to force mobile to add guest\r\nwindow.dbs.globalEvents.subscribe(\"guestselector:updated\", function (data) {\r\n if($('html').hasClass('gday-theme') && $('.pt-cabin-detail--main').length >=1) {\r\n if ($(window).width() < 768) {\r\n console.log('refreshing');\r\n window.location = window.location\r\n }\r\n }\r\n})\r\n\r\n\r\n// Create our Google Tag Manager data layer.\r\n// IMPORTANT: Add before Tag Manager script is loaded.\r\n// See: https://developers.google.com/tag-platform/tag-manager/web/datalayer#installation\r\nwindow.dataLayer = window.dataLayer || []\r\n\r\n","import { FLUTTER_IFRAME_WRAPPER_MAP } from './../../flutter/flutter.consts.js';\r\nimport { resizeFrame, isDesktop, getStateAbbreviationFromURLPath, addLoadingSpinner, removeLoadingSpinner, sendToGa4 } from './../../flutter/flutter.utils.js';\r\n// FlutterCheckout.js\r\nexport default class FlutterCheckout {\r\n\r\n constructor() {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.checkout: initializing');\r\n }\r\n this.loadDependencies().then(() => {\r\n this.initializeProperties();\r\n if (this.$wrapper.length >= 1) {\r\n this.initializeCheckoutWidget();\r\n addLoadingSpinner(this.$wrapper);\r\n if (this.debugMode) {\r\n console.log('flutter.checkout: initialized');\r\n }\r\n }\r\n });\r\n }\r\n\r\n async loadDependencies() {\r\n\r\n const moment = await import('moment')\r\n this.moment = moment.default;\r\n await Promise.all([\r\n import(/* webpackMode: \"eager\" */ './flutter-checkout.scss'),\r\n import(/* webpackMode: \"eager\" */ '../../scripts/dbs/dbs.utilities.querystring'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal'),\r\n import(/* webpackMode: \"eager\" */ '../../plugins/semantic/modal.scss'),\r\n ]);\r\n }\r\n\r\n initializeProperties() {\r\n this.queryString = new dbs.utilities.querystring()\r\n this.$wrapper = $(FLUTTER_IFRAME_WRAPPER_MAP['checkout'])\r\n this.$preview_pane_dimmer = $(\"#flutter_preview_pane_dimmer\")\r\n this.$confirmation_popup = $(\"#flutter_confirmation_popup\")\r\n this.$confirmation_cancel = $(\"#confirmation_cancel\")\r\n this.$confirmation_continue = $(\"#confirmation_continue\")\r\n this.$confirmationContent = $('#checkout_confirmation_widget_area')\r\n this.$iframeSourceUrl = $('#flutter_checkout_iframe_source_url')\r\n\r\n // Terms and conditions popup modal\r\n this.popup_modal;\r\n this.popup_ModalTemplate = `\r\n
\r\n
\r\n

\r\n Booking Terms & Conditions\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
`\r\n\r\n this.localDebugEnabled = true;\r\n this.debugMode == this.localDebugEnabled && process.env.NODE_ENV === 'development';\r\n this.isFirstLoad = true;\r\n }\r\n\r\n\r\n\r\n initializeListeners() {\r\n const self = this;\r\n // Setup confirmation cancel button\r\n self.$confirmation_cancel.on('click', function () {\r\n self.$confirmation_popup.removeClass('active');\r\n self.$preview_pane_dimmer.removeClass('active')\r\n $(\"body\").removeClass('no-scroll');\r\n });\r\n\r\n // Setup confirmation continue button\r\n self.$confirmation_continue.on('click', function () {\r\n // Possibly handle removing window/back button listeners here\r\n var redirectUrl = self.$confirmation_popup.attr('data-redirect-url')\r\n window.location = redirectUrl;\r\n });\r\n\r\n $('body').on('click', '.flutter-terms-close-button', function (e) {\r\n self.popup_modal.modal('hide');\r\n });\r\n\r\n // Setup preview pane dimmer click events\r\n self.$preview_pane_dimmer.off('click').on('click', function () {\r\n self.closeConfirmationDialog();\r\n });\r\n\r\n // Setup \"click away\" event when clicking on a link to leave the checkout page\r\n // Binds\r\n self.handleClickAway = self.handleClickAwayEvent.bind(this);\r\n // Add the event listener\r\n self.setupClickAwayListener();\r\n }\r\n\r\n setupClickAwayListener() {\r\n const self = this;\r\n document.addEventListener('click', self.handleClickAway);\r\n }\r\n\r\n removeClickAwayListener() {\r\n const self = this;\r\n document.removeEventListener('click', self.handleClickAway);\r\n }\r\n\r\n handleClickAwayEvent(e) {\r\n const self = this;\r\n let anchor = e.target.closest('a');\r\n if (anchor && anchor.href) {\r\n e.preventDefault();\r\n self.showConfirmationDialog({\r\n 'message': \"Are you sure you want to leave this page?         \",\r\n 'subtext': 'Your changes may not be saved if you leave',\r\n 'primaryButton': \"Yes, Leave\",\r\n 'redirectUrl': anchor.href\r\n });\r\n\r\n }\r\n }\r\n\r\n initializeCheckoutWidget() {\r\n const self = this;\r\n // Setup preview pane dimmer click events\r\n\r\n $('body').append(self.popup_ModalTemplate);\r\n self.popup_modal = $(\"#flutter_terms_popup\");\r\n self.popup_modal.modal({\r\n closable: true,\r\n });\r\n\r\n const currentStep = self.queryString.getParameter('step');\r\n if (currentStep != null) {\r\n switch (currentStep) {\r\n case \"3\":\r\n self.$confirmationContent.show();\r\n break;\r\n default:\r\n // TODO handle other steps when we can\r\n break;\r\n }\r\n }\r\n\r\n self.initializeListeners();\r\n }\r\n\r\n\r\n // handleTermsAndConditionsPopup - Handles the terms and conditions popup\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n handleTermsAndConditionsPopup(eventData) {\r\n // Show the conditions popup\r\n const self = this;\r\n // This can probably be removed in prod, but it works around things for now\r\n if (eventData.includes('/TEST')) {\r\n //eventData.replace('/TEST', '/SADE');\r\n }\r\n const domain = window.location.host;\r\n let apiUrl = eventData;\r\n if (!eventData.includes(domain)) {\r\n // it's probably a production URL, so lets replace it\r\n let dataArr = eventData.split('/')\r\n let parkCode = dataArr[dataArr.length - 1]\r\n apiUrl = window.location.origin + \"/api/terms-and-conditions/\" + parkCode\r\n }\r\n\r\n //\r\n $.ajax({\r\n url: apiUrl,\r\n type: 'GET',\r\n })\r\n .done(function (response) {\r\n self.showTermsAndConditionsPopup(response);\r\n })\r\n .always(function () { })\r\n }\r\n\r\n showTermsAndConditionsPopup(html) {\r\n const self = this;\r\n self.popup_modal.children('.content').children('.terms-content').html(html);\r\n self.popup_modal.show();\r\n self.popup_modal.modal('show')\r\n const checkContentLoaded = setInterval(function () {\r\n const flutterId = $('#flutter_terms_popup .content');\r\n if (flutterId.length > 0) {\r\n clearInterval(checkContentLoaded);\r\n self.scrollToTopOfFlutter(flutterId);\r\n }\r\n }, 500);\r\n\r\n }\r\n\r\n scrollToTopOfFlutter(flutterId) {\r\n flutterId.parents('.transition').animate({\r\n scrollTop: 0,\r\n });\r\n }\r\n\r\n\r\n // handleCheckoutRedirectEvent - Handles the checkout redirect event\r\n // @param {object} eventData - The event data\r\n // @param {object} popupParams - The parameters for the popup\r\n // @returns {void}\r\n handleCheckoutRedirectEvent(eventData, popupParams) {\r\n const self = this;\r\n\r\n // This is emitted every time a page changes, if we want to handle URL history / tracking via the browser URL we can do that here\r\n let data = null;\r\n popupParams.redirectUrl = \"/\";\r\n\r\n if (eventData && typeof eventData === 'object') {\r\n if (eventData.hasOwnProperty('parkCode')) {\r\n data = eventData;\r\n } else if (eventData.hasOwnProperty('bookingContext')) {\r\n data = eventData.bookingContext;\r\n }\r\n } else {\r\n //forcing a redirect while hiding the cancel popup\r\n console.error('Invalid eventData:', eventData);\r\n $('#flutter_confirmation_popup').addClass('inactive');\r\n window.location.href = window.location.origin;\r\n\r\n }\r\n\r\n if (data != null) {\r\n popupParams.redirectUrl = \"/jaqredirect?\"\r\n + \"parkCode=\" + data.parkCode\r\n + '&arrive=' + self.moment(data.arriveOn).format('YYYY-MM-DD')\r\n + '&depart=' + self.moment(data.departOn).format('YYYY-MM-DD')\r\n + '&adults=' + (parseInt(data.totalAdults) >= 0 ? parseInt(data.totalAdults) : 2)\r\n + '&kids=' + (parseInt(data.totalKids) >= 0 ? parseInt(data.totalKids) : 0)\r\n + '&infants=' + (parseInt(data.totalInfants) >= 0 ? parseInt(data.totalInfants) : 0)\r\n + '&nonce=' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)\r\n\r\n if (data.hasOwnProperty('serviceDefinitionId')) {\r\n popupParams.redirectUrl += '&accommodationRoomId=' + data.serviceDefinitionId\r\n }\r\n if (data.dealPromoCode != null && data.dealCode != \"\") {\r\n popupParams.redirectUrl += '&dealCode=' + data.dealPromoCode;\r\n }\r\n if (data.hasOwnProperty('openPreviewWindow')) {\r\n popupParams.redirectUrl += '&openPreviewWindow=true'\r\n }\r\n }\r\n self.showConfirmationDialog(popupParams);\r\n }\r\n\r\n // handleCheckoutStateEvent - Handles the checkout state event\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n handleCheckoutStateEvent(eventData) {\r\n const self = this;\r\n if ($(window).scrollTop() > 0) {\r\n // Smooth scroll\r\n $('html, body').animate({ scrollTop: 0 }, 500);\r\n\r\n }\r\n\r\n switch (eventData.step) {\r\n case -1:\r\n self.updateUrlWithStep(-1)\r\n break;\r\n case 0:\r\n self.updateUrlWithStep(0)\r\n break;\r\n case 1:\r\n self.updateUrlWithStep(1)\r\n break;\r\n case 2:\r\n self.updateUrlWithStep(2)\r\n break;\r\n case 3:\r\n debugger;\r\n self.updateUrlWithStep(3)\r\n self.removeListenersFromConfirmationPage();\r\n // Show the success widget area above the checkout widget\r\n self.$confirmationContent.show(250);\r\n $('html, body').animate({\r\n scrollTop: 0\r\n }, 500);\r\n break;\r\n }\r\n // Push &step=x to the URL to the browser history without reloading\r\n\r\n }\r\n\r\n removeListenersFromConfirmationPage() {\r\n const self = this;\r\n self.removeClickAwayListener();\r\n\r\n }\r\n\r\n updateUrlWithStep(step) {\r\n const url = new URL(window.location.href);\r\n url.searchParams.set('step', step);\r\n window.history.pushState({}, '', url);\r\n\r\n //let iFrameUrl = new URL(self.$iframeSourceUrl.attr('src'));\r\n //if (!bookingUrl.searchParams.has('step')) {\r\n //iFrameUrl.searchParams.append('step', step);\r\n //}\r\n //else {\r\n //iFrameUrl.searchParams.set('step', step);\r\n //}\r\n //self.$iframeSourceUrl.src = iFrameUrl.href;\r\n }\r\n\r\n handleEvent(eventType, eventData) {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.checkout: handleEvent', eventType, eventData);\r\n }\r\n if (self.isFirstLoad) {\r\n self.$wrapper.find('iframe').height(self.$wrapper.height() + 1);\r\n removeLoadingSpinner(self.$wrapper);\r\n self.isFirstLoad = false;\r\n }\r\n debugger;\r\n\r\n switch (eventType) {\r\n case 'onResize':\r\n resizeFrame(self.$wrapper, eventData.width, eventData.height, 850, 70); // 850 min height might be too aggressive\r\n break;\r\n case 'ga4Event':\r\n sendToGa4(eventData);\r\n break;\r\n case 'checkout':\r\n self.handleCheckoutStateEvent(eventData);\r\n break;\r\n case 'cancelCheckout':\r\n self.handleCheckoutRedirectEvent(eventData, {\r\n 'message': \"Are you sure you want to cancel?         \",\r\n 'subtext': 'Cancelling will take you back to accommodation search',\r\n 'primaryButton': \"Yes, Cancel\"\r\n });\r\n break;\r\n case 'deleteBooking':\r\n break;\r\n case 'editBooking':\r\n eventData.bookingContext.openPreviewWindow = true // Used to notify the park page that it will be opening the preview pane\r\n self.handleCheckoutRedirectEvent(eventData, {\r\n 'message': \"Are you sure you want to update these booking details?\",\r\n 'subtext': 'Updating these details will take you back to the previous screen',\r\n 'primaryButton': \"Yes, Update\"\r\n })\r\n break;\r\n case 'viewAccommodationInfo':\r\n //\"{\\\"accommodationCode\\\":\\\"TEST-1-3-RT\\\",\\\"parkCode\\\":\\\"TEST\\\"}\"\r\n const redirectUrl = \"/jaqredirect?\"\r\n + \"parkCode=\" + eventData.parkCode\r\n + '&accommodationCode=' + eventData.accommodationCode // the parameter accommodationCode could be used in place of accommodationRoomId if we wanted it to redirect to the single accommodation page\r\n if (self.debugMode) {\r\n debugger;\r\n console.log('flutter.checkout: viewAccommodationInfo: redirecting', eventData, redirectUrl);\r\n }\r\n window.location = redirectUrl;\r\n break;\r\n case 'viewAvailability':\r\n debugger;\r\n break;\r\n case 'viewTermsAndConditions':\r\n self.handleTermsAndConditionsPopup(eventData)\r\n break;\r\n case 'redirect':\r\n window.open(window.location.origin + eventData, '_blank');\r\n break;\r\n case 'viewPark':\r\n console.log('handles viewPark event')\r\n window.location = window.location.origin + '/parks'\r\n break;\r\n default:\r\n if (self.debugMode) {\r\n console.warn('flutter.deals: unhandled event', eventType, eventData);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n\r\n // closePopup - Closes the confirmation popup\r\n // @returns {void}\r\n closeConfirmationDialog() {\r\n const self = this;\r\n self.$preview_pane_dimmer.click(function () {\r\n if (self.$confirmation_popup.hasClass('active')) {\r\n self.$confirmation_popup.removeClass('active');\r\n self.$preview_pane_dimmer.removeClass('active');\r\n }\r\n })\r\n }\r\n\r\n // showConfirmationDialog - Shows a confirmation dialog\r\n // @param {object} params - The parameters for the dialog\r\n // @returns {void}\r\n showConfirmationDialog(params) {\r\n const self = this;\r\n if (params.hasOwnProperty('message') && params.hasOwnProperty('subtext') && params.hasOwnProperty('primaryButton') && params.hasOwnProperty('redirectUrl')) {\r\n self.$confirmation_popup.find('.message-text').html(params.message);\r\n self.$confirmation_popup.find('.subtext').text(params.subtext);\r\n self.$confirmation_popup.find('a.primary').text(params.primaryButton);\r\n self.$confirmation_popup.removeAttr('style').attr('data-redirect-url', params.redirectUrl);\r\n $('body').addClass('no-scroll');\r\n self.$confirmation_popup.toggleClass('active');\r\n } else {\r\n console.error('flutter.checkout: showConfirmationDialog: Missing required parameters', params);\r\n }\r\n\r\n }\r\n\r\n}\r\n","\r\nimport { FLUTTER_IFRAME_WRAPPER_MAP } from './../../flutter/flutter.consts.js';\r\nimport { resizeFrame, isDesktop, parseJSONRecursively, isLikelyJSON, addLoadingSpinner, removeLoadingSpinner, sendToGa4 } from './../../flutter/flutter.utils.js';\r\n// FlutterGiftVoucher.js\r\nexport default class FlutterGiftVoucher {\r\n\r\n constructor() {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('flutter.vouchers: initializing');\r\n }\r\n this.loadDependencies().then(() => {\r\n this.initializeProperties();\r\n if (this.$wrapper.length >= 1) {\r\n addLoadingSpinner(this.$wrapper);\r\n }\r\n if (this.debugMode) {\r\n console.log('flutter.vouchers: initialized');\r\n }\r\n });\r\n }\r\n\r\n // loadDependencies - Loads the dependencies for the widget\r\n // @returns {Promise} - The promise that resolves when the dependencies are loaded\r\n async loadDependencies() {\r\n await Promise.all([\r\n import(/* webpackMode: \"eager\" */ './flutter-gift-voucher.scss'),\r\n ]);\r\n }\r\n\r\n // initializeProperties - Initializes the properties for the widget\r\n initializeProperties() {\r\n this.$wrapper = $(FLUTTER_IFRAME_WRAPPER_MAP['vouchers'])\r\n this.$confirmationArea = $('.gift-voucher-confirmation-widget-area')\r\n this.confirmationWidgetSize = 360;\r\n\r\n // Resizing\r\n this.$window = $(window);\r\n this.minHeightDesktop = 0; // Desktop height so that the calendars always are visible\r\n this.minHeightMobile = 0; // Desktop height so that the calendars always are visible\r\n this.mobileBreakpoint = 0; // The width at which the flutter widget swaps from desktop to to mobile\r\n this.heightBuffer = 30; // height buffer underneath the widget\r\n\r\n this.localDebugEnabled = false;\r\n this.debugMode == this.localDebugEnabled && process.env.NODE_ENV === 'development';\r\n\r\n }\r\n\r\n // handleEvent - Handles the event from the iframe\r\n // @param {string} eventType - The event type\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n handleEvent(eventType, eventData) {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.vouchers: received event', eventType, eventData);\r\n }\r\n removeLoadingSpinner(this.$wrapper)\r\n switch (eventType) {\r\n case 'onAppStarted':\r\n removeLoadingSpinner(this.$wrapper)\r\n break;\r\n case 'ga4Event':\r\n sendToGa4(eventData);\r\n break;\r\n case 'onResize':\r\n resizeFrame(\r\n this.$wrapper,\r\n eventData.width,\r\n eventData.height,\r\n (isDesktop()) ? this.minHeightDesktop : this.minHeightMobile,\r\n this.heightBuffer\r\n );\r\n break;\r\n case 'summary':\r\n case 'submitted':\r\n this.handleSummaryEvent(eventData);\r\n break;\r\n case 'error_submitting_form':\r\n\r\n break;\r\n case 'redirect':\r\n this.handleRedirection(eventData);\r\n break;\r\n default:\r\n if (self.debugMode) {\r\n debugger;\r\n }\r\n console.warn('flutter.giftvoucher: Unhandled Flutter Event' + eventType, eventData);\r\n break;\r\n }\r\n }\r\n handleRedirection = (eventData) => {\r\n\r\n let targetUrl = window.location.origin + eventData;\r\n if (window.top) {\r\n window.top.open(targetUrl, '_blank');\r\n } else {\r\n window.open(targetUrl, '_blank');\r\n }\r\n // TODO improve the redirect logic to handle eventData.location\r\n }\r\n\r\n // handleErrorEvent - Handles the error event from the iframe\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n // This function is called when the user has submitted the form and an error has occurred\r\n handleErrorEvent = (eventData) => {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.error('flutter.giftvoucher: handleErrorEvent', eventData);\r\n debugger;\r\n }\r\n }\r\n\r\n // handleSummaryEvent - Handles the summary event from the iframe\r\n // @param {object} eventData - The event data\r\n // @returns {void}\r\n // This function is called when the user has submitted the form and the summary page is displayed\r\n handleSummaryEvent = (eventData) => {\r\n const self = this;\r\n if (self.debugMode) {\r\n console.log('flutter.giftvoucher: handleSummaryEvent', eventData);\r\n }\r\n console.log('hide top content');\r\n $('.main-content .top-content').hide();\r\n // Scroll the page to show the flutter_gift_voucher_widget confirmation page\r\n // Display the confirmation widget area\r\n let flutterGiftVoucherWidgetPosition = this.$wrapper.offset().top - 120;\r\n $('html, body').animate({\r\n scrollTop: flutterGiftVoucherWidgetPosition\r\n }, 500);\r\n console.log('triggered scroll to top');\r\n this.$confirmationArea.fadeIn(250).show();\r\n console.log('display confirmation area');\r\n this.$wrapper.height(this.confirmationWidgetSize)\r\n this.$wrapper.children('iframe').height(this.confirmationWidgetSize)\r\n }\r\n}\r\n","Promise.all([import(/* webpackMode: \"eager\" */ './footer.scss'), import('../subscribe/subscribe'), import('../../plugins/semantic/modal'),\r\nimport('../../plugins/semantic/modal.scss'),]).then(() => {\r\n $('.widget.footer').each(function (i, el) {\r\n $(el).data('widget', new Footer(el))\r\n $(el).data('widget').init()\r\n })\r\n})\r\n\r\nfunction Footer(el) {\r\n const self = this\r\n self.el = $(el)\r\n console.log(self.el)\r\n const isMobileLargeMax = window.matchMedia('(max-width: 767px)')\r\n const locations = {}\r\n const handleLocations = function (e) {\r\n if (e.matches) {\r\n locations.headings.removeClass('active') // clean up\r\n locations.lists.hide().removeClass('is-open') // clean up\r\n\r\n locations.headings.on('click', function (e) {\r\n e.preventDefault() // stops link navigation\r\n const thisHeading = $(this)\r\n const thisList = $(this).next()\r\n\r\n // collapse the 'clicked' lists if its already revealed\r\n if (thisHeading.hasClass('active')) {\r\n thisHeading.removeClass('active')\r\n thisList.stop().slideUp().removeClass('show')\r\n return\r\n }\r\n\r\n // collapse all lists\r\n locations.headings.removeClass('active')\r\n locations.lists.stop().slideUp().removeClass('show')\r\n\r\n // reveal the 'clicked' lists\r\n thisHeading.addClass('active')\r\n thisList.stop().slideDown().addClass('show') // class manipulation needs to be last so CSS transitions work\r\n })\r\n } else {\r\n locations.headings\r\n .off() // remove click handlers\r\n .removeClass('active') // clean up\r\n locations.lists.show().removeClass('show') // clean up\r\n }\r\n }\r\n self.ParkHubLoginPopup = () => {\r\n\r\n let $parkLoginLink = null;\r\n $('.footer .links ul li a').each(function (k, elem) {\r\n if ($(elem).text().trim() == \"Park Login\") {\r\n $parkLoginLink = $(elem);\r\n }\r\n })\r\n if ($parkLoginLink !== null) {\r\n self.loginModal.find('.loginLink').attr('href', $parkLoginLink.attr('href'));\r\n $parkLoginLink.attr('disabled-href', $parkLoginLink.attr('href'));\r\n $parkLoginLink.attr('href', '#');\r\n $parkLoginLink.on('click', function (e) {\r\n e.preventDefault();\r\n self.loginModal.show();\r\n self.loginModal.modal('show');\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n self.init = function () {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('Footer init', self)\r\n }\r\n\r\n self.loginModal = self.el.find('.login-popup').modal();\r\n self.ParkHubLoginPopup();\r\n self.el.css('opacity', 1)\r\n\r\n // Handle the display of location lists\r\n locations.headings = self.el.find('.locations-list-heading')\r\n locations.lists = self.el.find('.locations-list-items')\r\n handleLocations(isMobileLargeMax) // runs on init\r\n isMobileLargeMax.addEventListener('change', handleLocations)\r\n\r\n // Handle the subscription form\r\n self.el.find('.subscribe input').on('keypress', function (e) {\r\n const ENTER_KEY = 13\r\n if (e.which === ENTER_KEY) {\r\n e.preventDefault()\r\n e.target.form.submit()\r\n return false\r\n }\r\n })\r\n\r\n //opens the cloud subscription form into another tab\r\n //comments out this part of code to fix issue in CW20-1246\r\n //self.el.find('.widget.subscribe a').click(function (e) {\r\n // let baseUrl = window.location.origin\r\n // window.open(baseUrl + \"/subscriber\", \"_blank\")\r\n //})\r\n }\r\n}\r\n","import Cookies from 'js-cookie'\r\n\r\nPromise.all([\r\n import('../../plugins/semantic/form'),\r\n import('../../plugins/semantic/form.scss'),\r\n // import('../../plugins/jquery-address/jquery.address'),\r\n]).then(() => {\r\n Promise.all([\r\n import('./gdpr.scss'),\r\n import('../../scripts/dbs/dbs.semantic.form'),\r\n import('../../scripts/dbs/dbs.utilities.querystring'),\r\n import('../../plugins/semantic/tab.css'),\r\n import('../../plugins/semantic/label.css'),\r\n import('../../plugins/semantic/tab'),\r\n import('../../plugins/semantic/dropdown'),\r\n import('../../plugins/semantic/dropdown.scss'),\r\n import('../../plugins/semantic/icon.css'),\r\n import('../../plugins/semantic/flag.css'),\r\n import('../../plugins/semantic/transition.css'),\r\n import('../../plugins/semantic/transition'),\r\n import('../../plugins/semantic/api'),\r\n import('../../plugins/semantic/checkbox.css'),\r\n import('../../plugins/semantic/checkbox'),\r\n import('../../plugins/semantic/modal'),\r\n import('../../plugins/semantic/modal.scss'),\r\n ]).then(() => {\r\n const widget = $('.widget.sw-gdpr')\r\n\r\n // If widget not found, mark GDPR as disabled\r\n if (widget.length === 0) {\r\n Cookies.set('DisableGDPRPopUp', true, { path: '/' })\r\n return\r\n }\r\n\r\n const qs = new dbs.utilities.querystring();\r\n const alwaysShowGDPR = !!qs.getParameter('alwaysShowGDPR');\r\n\r\n // If GDPR is disabled, do nothing more\r\n\r\n if (!!Cookies.get('DisableGDPRPopUp') && !alwaysShowGDPR) return\r\n\r\n widget.each(function (i, el) {\r\n if (i > 0) return $(el).remove() // remove duplicate GDPR widgets\r\n $(el).data('widget', new Gdpr(el, i))\r\n $(el).data('widget').init()\r\n })\r\n })\r\n})\r\n\r\nfunction Gdpr(el, index) {\r\n const self = this\r\n self.el = $(el)\r\n self.uid = `Gdpr_${index}`\r\n\r\n self.qs = new dbs.utilities.querystring();\r\n const alwaysShowGDPR = !!self.qs.getParameter('alwaysShowGDPR');\r\n\r\n self.dataGdprEndpoint = self.el.attr('data-gdpr-endpoint')\r\n if(alwaysShowGDPR) self.dataGdprEndpoint = self.dataGdprEndpoint + '?alwaysShow=true'\r\n\r\n self.dataGdprEndpointMethod = self.el.attr('data-gdpr-endpoint-method')\r\n self.dataSetGdprEndpoint = self.el.attr('data-set-gdpr-endpoint')\r\n self.dataSetGdprEndpointMethod = self.el.attr('data-set-gdpr-endpoint-method')\r\n\r\n self.staticConsentModal = self.el.find('.sw-gdpr-static-consent')\r\n self.staticConsentForm = new dbs.form.genericForm()\r\n self.staticConsentForm.init(self.el.find('.sw-gdpr-static-consent .ui.form'))\r\n\r\n self.privacyPreferenceModal = self.el.find('.sw-privacy-popup')\r\n self.privacyPreferenceForm = new dbs.form.genericForm()\r\n self.privacyPreferenceForm.init($('.sw-privacy-popup .ui.form'))\r\n\r\n self.initStaticConsentModal = function () {\r\n self.staticConsentModal\r\n .modal({\r\n useFlex: true, // ensures predicable layout styling overrides\r\n closable: false,\r\n transition: 'fade up', // See: https://semantic-ui.com/modules/transition.html#/examples\r\n duration: 900,\r\n onHidden: () => window.dbs.globalEvents.emit('shepherdDone', self.uid),\r\n })\r\n .modal('show')\r\n }\r\n\r\n self.initPrivacyPreferenceModal = function () {\r\n self.privacyPreferenceForm.el.find('.ui.checkbox').checkbox()\r\n\r\n self.staticConsentModal.modal({\r\n onHidden: () => {}, // clear 'shepherdDone' from the previous modal.\r\n duration: 200,\r\n transition: 'fade',\r\n }) // do not 'hide' this modal, it transitions between with next modal 'show'\r\n\r\n self.privacyPreferenceModal\r\n .modal({\r\n closable: false,\r\n onHidden: () => window.dbs.globalEvents.emit('shepherdDone', self.uid),\r\n })\r\n .modal('show')\r\n }\r\n\r\n self.setGdprConsentAccepted = function () {\r\n console.log('setGdprConsentAccepted')\r\n\r\n self.privacyPreferenceModal.modal('hide')\r\n self.staticConsentModal.modal('hide')\r\n\r\n Cookies.set('DisableGDPRPopUp', 'true', { path: '/' })\r\n }\r\n\r\n self.selectAllPreferences = function (form) {\r\n const checkboxes = $(form).find('input[type=\"checkbox\"][name=\"preference[]\"')\r\n checkboxes.each((k, el) => $(el).prop('checked', true))\r\n }\r\n\r\n self.getSelectedPreferences = function (form) {\r\n let preferences = []\r\n $(form)\r\n .find('input[type=\"checkbox\"][name=\"preference[]\"')\r\n .each(function (k, el) {\r\n let checkbox = $(el)\r\n if (checkbox.is(':checked')) {\r\n preferences.push(checkbox.attr('value'))\r\n }\r\n })\r\n\r\n return { preference: preferences } // e.g. `{ \"preference\": [\"Essential\", \"Performance\"] }`\r\n }\r\n\r\n self.getGdpr = function () {\r\n $.ajax({\r\n url: self.dataGdprEndpoint,\r\n type: self.dataGdprEndpointMethod,\r\n contentType: 'application/json',\r\n }).done(function (response) {\r\n if (response.ShowGdpr) {\r\n return setTimeout(() => self.initStaticConsentModal(), 1000)\r\n }\r\n\r\n window.dbs.globalEvents.emit('shepherdDone', self.uid)\r\n })\r\n }\r\n\r\n self.setGdpr = function (form) {\r\n const data = self.getSelectedPreferences(form)\r\n\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('Set GDPR:', data)\r\n }\r\n\r\n form.find('.submit.button').addClass('loading').blur()\r\n\r\n $.ajax({\r\n url: self.dataSetGdprEndpoint,\r\n type: self.dataSetGdprEndpointMethod,\r\n contentType: 'application/json',\r\n data: JSON.stringify(data),\r\n })\r\n .done(function (response) {\r\n if (response.Success) {\r\n return self.setGdprConsentAccepted()\r\n }\r\n\r\n console.error('GDPR set preferences was not successful, please try again.')\r\n })\r\n .always(function () {\r\n form.find('.submit.button').removeClass('loading').blur()\r\n })\r\n }\r\n\r\n self.init = function () {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('Gdpr init', self)\r\n }\r\n\r\n // This has no effect as we are showing the GDPR content with semantic-ui modals\r\n // which have the DOM elements moved to the bottom of the \r\n self.el.css('opacity', 1)\r\n\r\n window.dbs.globalEvents.subscribe('shepherdNext', function (item) {\r\n if (item !== self.uid) return\r\n console.log('[SHEPHERD][popup]', item === self.uid, item)\r\n\r\n self.getGdpr()\r\n })\r\n\r\n $('.edit-preference').click(function (e) {\r\n e.preventDefault()\r\n self.initPrivacyPreferenceModal()\r\n })\r\n\r\n self.staticConsentForm.submitButton.on('click', function (e) {\r\n e.preventDefault()\r\n const staticConsentForm = self.staticConsentForm.el\r\n\r\n if ($(this).hasClass('select-all-preferences')) {\r\n self.selectAllPreferences(staticConsentForm)\r\n }\r\n\r\n self.setGdpr(staticConsentForm)\r\n return false // prevent form action\r\n })\r\n\r\n self.privacyPreferenceForm.submitButton.on('click', function (e) {\r\n e.preventDefault()\r\n const privacyPreferenceForm = self.privacyPreferenceForm.el\r\n\r\n if ($(this).hasClass('select-all-preferences')) {\r\n self.selectAllPreferences(privacyPreferenceForm)\r\n }\r\n\r\n self.setGdpr(privacyPreferenceForm)\r\n return false // prevent form action\r\n })\r\n\r\n window.dbs.globalEvents.emit('shepherdQueue', self.uid)\r\n }\r\n}\r\n","Promise.all([import(/* webpackMode: \"eager\" */ './header.scss'), import('../mobile-menu/mobile-menu')]).then(() => {\r\n $('.widget.header').each(function (i, el) {\r\n $(el).data('widget', new Header(el))\r\n $(el).data('widget').init()\r\n })\r\n})\r\n\r\nfunction Header(el) {\r\n const self = this\r\n self.el = $(el)\r\n\r\n self.menuButton = self.el.find('.menu-button')\r\n\r\n self.init = function () {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('Header init', self)\r\n }\r\n\r\n self.menuButton.click(function (e) {\r\n e.preventDefault()\r\n $('body').toggleClass('show-mobile-menu')\r\n })\r\n }\r\n}\r\n","module.exports = jQuery;","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n"],"names":["FLUTTER_IFRAME_WRAPPER_MAP","flutterDeals","constructor","this","loadDependencies","then","initializeProperties","$currentWrapper","length","initializeDealsPopup","addLoadingSpinner","debugMode","console","log","Promise","all","$dealsHome","$","$dealsExplore","isExplorePage","isHomePage","$window","window","minHeightDesktop","minHeightMobile","mobileBreakpoint","heightBuffer","localDebugEnabled","dealsPopupInitialized","popupModalTemplate","DesktopCloseButtonTemplate","MobileCloseButtonTemplate","closeButtonTemplate","handleEvent","eventType","eventData","self","removeLoadingSpinner","handleResize","handleShowConditions","handleApplyDeal","handleStateSelection","handleRedirection","error","url","URL","location","href","states","searchParams","delete","history","replaceState","statesParam","join","pathParts","pathname","split","stateAbbreviation","getStateAbbreviationFromURLPath","includes","warn","set","decodeURIComponent","resizeFrame","width","height","isDesktop","popupModal","append","modal","closable","data","replace","children","html","show","currentUrl","origin","dealCode","parkCode","park","code","descriptionText","description","applyDealsUrlPath","toLowerCase","targetUrl","hasClass","top","open","flutterVouchers","FlutterGiftVoucher","flutterPreviewPane","initializePanel","queryString","dbs","utilities","querystring","$body","$wrapper","opened","$flutter_preview_panel_frame_wrapper","$flutter_preview_panel_frame","embedBaseUrl","attr","msg_receiver","$flutter_preview_pane_dimmer","getAccommodationFilters","sortParameterFromUrl","getParameter","capitalizeWord","process","sendToGa4","handleBookingContextChange","index","parseInt","handleProceedToPay","toggle","globalEvents","emit","toggleClass","destroy","createIframe","embedUrl","iframe","iframes","find","remove","bookingUrl","handlePopState","get","on","addEventListener","event","e","preventDefault","is","document","readyState","clicked","currentTarget","accommodationRoomCode","accomIndex","checkIn","moment","format","checkOut","adults","infants","urlParams","pushState","createUrl","setTimeout","has","params","isDhp","caller","gtmTag","returnUrl","accommodationTypeFilter","hasOwnProperty","flutterAccommodationSingleListing","initializeAccommodationEmbed","default","$backToParkLink","bookingContext","getBookingContext","iframeSrc","createEmbedParams","initQueryString","removeClass","siteUrl","accommodationCode","getDayAfterDate","reverseMapping","Object","entries","reduce","acc","_ref","queryParam","paramName","keys","forEach","queryParamName","queryValue","openPreviewWindow","URLSearchParams","_ref2","value","urlKey","toString","currentParams","search","paramMapping","hasChanges","eventKey","newURL","backToParkUrl","each","k","elem","flutterCheckout","FlutterCheckout","subscribe","message","eventPayload","parseJSONRecursively","eventSender","sender","type","handleFlutterEvent","$target","wrapperWidth","wrapperHeight","$spinner","date","Date","setDate","getDate","$loader","fadeOut","arguments","undefined","orderId","word","charAt","toUpperCase","slice","object","dataLayer","push","ecommerce","minHeight","css","$iframe","payload","parsed","JSON","parse","stateAbbreviationMap","stateSlug","Math","Function","fn","dimmer","parameters","returnedValue","$allModules","time","getTime","performance","query","methodInvoked","queryArguments","call","$dimmer","$dimmable","module","settings","isPlainObject","extend","selector","namespace","className","eventNamespace","moduleNamespace","moduleSelector","clickEvent","documentElement","$module","element","instance","preinitialize","parent","dimmerName","filter","create","initialize","debug","bind","events","dimmable","instantiate","verbose","unbind","variation","off","hide","page","pageDimmer","click","removeData","target","content","stopImmediatePropagation","addContent","$content","detach","appendTo","$element","template","addClass","callback","isFunction","dimmed","animating","enabled","animate","onShow","onChange","onHide","useCSS","transition","useFlex","legacy","opacity","displayType","animation","queue","duration","useFailSafe","onStart","onComplete","active","stop","fadeTo","removeAttr","disabled","can","color","colorArray","isRGB","isRGBA","setting","name","internal","silent","prototype","info","apply","currentTime","executionTime","clearTimeout","timer","display","title","totalTime","group","table","groupCollapsed","groupEnd","invoke","passedArguments","context","maxDepth","found","response","depth","camelCaseValue","method","isArray","jQuery","$document","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","$allModals","$otherModals","$focusedElement","elementEventNamespace","id","observer","$context","$close","close","ignoreRepeatedEvents","refreshModals","observeChanges","defaultSettings","centered","dimmerSettings","detachable","undetached","random","substr","MutationObserver","mutations","refresh","observe","childList","subtree","scrolling","cacheSizes","modalOffset","screenHeight","siblings","add","attachEvents","$toggle","notFound","approve","deny","resize","scrollLock","removeEventListener","preventScroll","passive","onApprove","onDeny","isInModal","closest","isInDOM","contains","clickaway","allowMultiple","hideAll","debounce","delay","keyboard","which","dimmerStyles","showModal","hideModal","showDimmer","others","hideOthers","onVisible","keyboardShortcuts","save","focus","autofocus","noTransition","keepDimmed","hideDimmer","onHidden","restore","$visibleModals","activeElement","blur","inverted","blurring","bodyStyle","loading","scrollHeight","prop","modalWidth","outerWidth","modalHeight","outerHeight","cache","pageHeight","offset","contextHeight","topOffset","ie","fit","verticalCenter","paddingHeight","padding","ActiveXObject","modernBrowser","$inputs","$autofocus","$input","first","marginTop","marginLeft","moduleArguments","metadata","animationEnd","animationEndEvent","interval","forceRepaint","$parentElement","$nextElement","next","insertBefore","repaint","offsetWidth","direction","animationDirection","reverse","outward","overrideSettings","supported","support","allowRepeats","occurring","queuing","complete","noAnimation","reset","animationCallbacks","conditions","one","completeCallback","failSafe","looping","inward","force","visible","style","userStyle","overrideStyle","currentDisplay","emptyStyle","hidden","hasDirection","inlineDisplay","match","animationClass","start","animationName","transitionExists","exists","currentAnimation","triggerHandler","failSafeDelay","queueCallback","directionClass","currentDirection","indexOf","parseFloat","shouldDetermine","animationStartEvent","createElement","animations","forced","elementClass","tagName","$clone","inAnimation","directionExists","insertAfter","stopAll","clear","enable","disable","repeated","eventName","evt","i","shepherd","itemQueue","init","isShepherdBusy","shepherdNextItem","nextItem","pop","uid","unshift","layout","Sidebar","ptPageWrapper","sidebar","sidebarContainer","sidebarContent","hideSidebar","enabledScroll","transitionDuration","getTransitionDurationFromElement","scrollTop","disableScroll","request","endpoint","send","ajaxSettings","stringify","dataType","contentType","ajax","done","fail","responseJSON","always","el","handle","objectSet","actions","a","action","cookieParams","path","expires","Cookies","uri","customData","fbq","err","fields","ga","body","scrollY","position","scrollTo","transitionDelay","floatTransitionDuration","floatTransitionDelay","func","wait","immediate","timeout","args","callNow","removeParameter","newSearchParams","param","startsWith","paramsToLower","map","key","require","keypress","keyCode","String","fromCharCode","qs","isMobileLargeMax","matchMedia","updateBodyCssClass","matches","initializeCheckoutWidget","$preview_pane_dimmer","$confirmation_popup","$confirmation_cancel","$confirmation_continue","$confirmationContent","$iframeSourceUrl","popup_modal","popup_ModalTemplate","isFirstLoad","initializeListeners","redirectUrl","closeConfirmationDialog","handleClickAway","handleClickAwayEvent","setupClickAwayListener","removeClickAwayListener","anchor","showConfirmationDialog","currentStep","handleTermsAndConditionsPopup","domain","host","apiUrl","dataArr","showTermsAndConditionsPopup","checkContentLoaded","setInterval","flutterId","clearInterval","scrollToTopOfFlutter","parents","handleCheckoutRedirectEvent","popupParams","arriveOn","departOn","totalAdults","totalKids","totalInfants","substring","serviceDefinitionId","dealPromoCode","handleCheckoutStateEvent","step","updateUrlWithStep","removeListenersFromConfirmationPage","text","subtext","primaryButton","$confirmationArea","confirmationWidgetSize","handleSummaryEvent","handleErrorEvent","flutterGiftVoucherWidgetPosition","fadeIn","Footer","locations","handleLocations","headings","lists","thisHeading","thisList","slideUp","slideDown","ParkHubLoginPopup","$parkLoginLink","trim","loginModal","form","submit","Gdpr","alwaysShowGDPR","dataGdprEndpoint","dataGdprEndpointMethod","dataSetGdprEndpoint","dataSetGdprEndpointMethod","staticConsentModal","staticConsentForm","genericForm","privacyPreferenceModal","privacyPreferenceForm","initStaticConsentModal","initPrivacyPreferenceModal","checkbox","setGdprConsentAccepted","selectAllPreferences","getSelectedPreferences","preferences","preference","getGdpr","ShowGdpr","setGdpr","Success","item","submitButton","widget","Header","menuButton","exports","assign","source","api","converter","defaultAttributes","attributes","now","toUTCString","encodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","write","cookies","jar","parts","read","withAttributes","withConverter","freeze"],"sourceRoot":""}