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OACNC,KAAM,CAAEC,SAAUA,GAClBC,QAAS,SAAUF,GACnB,EACAG,MAAO,SAAUH,GACjB,GAER,G","sources":["webpack://myblazonvcore/./src/scripts/myblazon/nativeShims.js","webpack://myblazonvcore/./src/scripts/myblazon/socials.js","webpack://myblazonvcore/webpack/bootstrap","webpack://myblazonvcore/./src/scripts/myblazon/popup.js","webpack://myblazonvcore/./src/scripts/myblazon/system.js","webpack://myblazonvcore/./src/scripts/myblazon/http.js","webpack://myblazonvcore/./src/scripts/myblazon/api.js","webpack://myblazonvcore/./src/scripts/myblazon/models.js","webpack://myblazonvcore/./src/scripts/myblazon/ui.js","webpack://myblazonvcore/./src/scripts/myblazon/shop.js","webpack://myblazonvcore/./src/scripts/myblazon/activity.js","webpack://myblazonvcore/./src/scripts/myblazon/viewmodels.js","webpack://myblazonvcore/./src/scripts/myblazon/myblazon.js","webpack://myblazonvcore/./src/scripts/myblazon/log.js"],"sourcesContent":["(function() {\r\n // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim\r\n if (!String.prototype.trim) {\r\n String.prototype.trim = function () {\r\n return this.replace(/^\\s+|\\s+$/g, '');\r\n };\r\n }\r\n\r\n if (typeof String.prototype.startsWith !== 'function') {\r\n String.prototype.startsWith = function (str) {\r\n return this.slice(0, str.length) === str;\r\n };\r\n }\r\n\r\n if (typeof String.prototype.format !== 'function') {\r\n String.prototype.format = function (args) {\r\n return this.replace(/{(\\d+)}/g, function (match, number) {\r\n return typeof args[number] !== 'undefined' ? args[number] : match;\r\n });\r\n };\r\n }\r\n\r\n if (!Array.isArray) {\r\n Array.isArray = function (obj) {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n };\r\n }\r\n\r\n // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\r\n if (!Object.keys) {\r\n Object.keys = (function () {\r\n 'use strict';\r\n var hasOwnProperty = Object.prototype.hasOwnProperty,\r\n hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),\r\n dontEnums = [\r\n 'toString',\r\n 'toLocaleString',\r\n 'valueOf',\r\n 'hasOwnProperty',\r\n 'isPrototypeOf',\r\n 'propertyIsEnumerable',\r\n 'constructor'\r\n ],\r\n dontEnumsLength = dontEnums.length;\r\n\r\n return function (obj) {\r\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\r\n throw new TypeError('Object.keys called on non-object');\r\n }\r\n\r\n var result = [], prop, i;\r\n\r\n for (prop in obj) {\r\n if (hasOwnProperty.call(obj, prop)) {\r\n result.push(prop);\r\n }\r\n }\r\n\r\n if (hasDontEnumBug) {\r\n for (i = 0; i < dontEnumsLength; i++) {\r\n if (hasOwnProperty.call(obj, dontEnums[i])) {\r\n result.push(dontEnums[i]);\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n }());\r\n }\r\n})();","document.addEventListener(\"DOMContentLoaded\", () => {\r\n function logShare(provider, url, result) {\r\n $.ajax({\r\n url: '/api/log/kpi',\r\n type: 'POST',\r\n data: { kpiValue: \"share_\" + provider + (result == 1 ? \"_success\" : \"\") },\r\n success: function (data) {\r\n },\r\n error: function (data) {\r\n }\r\n });\r\n\r\n let msgId = \"\";\r\n switch (provider) {\r\n case 'facebook':\r\n msgId = \"ShFb\";\r\n break;\r\n case 'twitter':\r\n msgId = \"ShTw\";\r\n break;\r\n case 'pinterest':\r\n msgId = \"ShPt\";\r\n break;\r\n }\r\n\r\n const splittedUrl = url.split('/');\r\n const simpleUrl = splittedUrl[splittedUrl.length - 2] + '/' + splittedUrl[splittedUrl.length - 1];\r\n\r\n $.ajax({\r\n url: '/api/log/sql',\r\n type: 'POST',\r\n data: { messageId: msgId, message: simpleUrl, data: result },\r\n success: function (data) {\r\n },\r\n error: function (data) {\r\n }\r\n });\r\n }\r\n\r\n if (window.twttr) {\r\n twttr.ready(\r\n function (twttr) {\r\n twttr.events.bind('click', function (ev) {\r\n logShare(\"twitter\", $(ev.target).data(\"url\"), 0);\r\n });\r\n }\r\n );\r\n }\r\n\r\n if (window.FB) {\r\n FB.init({\r\n appId: document.querySelector(\"meta[property='fb:app_id']\").getAttribute(\"content\"),\r\n autoLogAppEvents: true,\r\n xfbml: true,\r\n version: 'v14.0'\r\n });\r\n\r\n $(\".fb-share-button\").click((e) => {\r\n const $this = $(e.currentTarget);\r\n const href = $this.data(\"href\");\r\n logShare(\"facebook\", href, 0);\r\n FB.ui(\r\n {\r\n method: 'share',\r\n href: href,\r\n hashtag: \"#myblazon #coatofarm #heraldry #logo #personality\" // Only the first one is accepted\r\n },\r\n function (response) {\r\n if (response && !response.error_message) {\r\n logShare(\"facebook\", href, 1);\r\n }\r\n }\r\n );\r\n });\r\n }\r\n\r\n $(\".pinterest-share-button\").click((e) => {\r\n const $this = $(e.currentTarget);\r\n const href = $this.data(\"href\");\r\n logShare(\"pinterest\", href, 0);\r\n });\r\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","export const popup = {\r\n show: show,\r\n hide: hide\r\n};\r\n\r\nfunction hide(id) {\r\n var $popup = $(\"#\" + id);\r\n\r\n if ($popup.length === 0) {\r\n console.log('Unknown popup');\r\n return;\r\n }\r\n\r\n if ($popup.hasClass('in')) {\r\n $('body').removeClass('noscroll');\r\n $popup.removeClass('in');\r\n }\r\n\r\n $popup.fadeOut();\r\n}\r\n\r\nfunction show(id) {\r\n var $popup = $(\"#\" + id);\r\n if ($popup.length === 0) {\r\n console.log(\"Can't show unknown popup\");\r\n return;\r\n }\r\n\r\n $popup.addClass('in');\r\n // The display : flex is saved into JQuery's cache so that it is used by fadeIn().\r\n // https://api.jquery.com/hide/\r\n // This setup is needed because when defining the popup's base display to flex and style them to display:none by default,\r\n // it causes problems with Vue.js popups because when they get rebuilt (Ex: you clicked an input) they return to the default display : none.\r\n $popup.css('display', 'flex').hide().fadeIn();\r\n $('body').addClass('noscroll');\r\n}\r\n\r\n$(document).ready(function () {\r\n\r\n // Opens the popup when clicking on an element with class=\"popup-opener\"\r\n // The correct popup is targeted by it's ID, which is known to the clicked element with the attribute data-popup=\"ID\", eg : data-popup=\"poll_popup\"\r\n $(document).on(\"click\", \".popup-opener\", function (event) {\r\n\r\n event.preventDefault(); // In case the element is a or would submit a form\r\n var popupId = $(this).data('popup');\r\n\r\n if (!popupId) { return; }\r\n popup.show(popupId);\r\n });\r\n\r\n\r\n // Closes the closest popup from the clicked element\r\n $(document).on(\"click\", \".popup-closer\", function (event) {\r\n event.preventDefault(); // In case the element is a or would submit a form\r\n $('.popup').each((index, element) => popup.hide($(element).attr('id')));\r\n //popup.hide($('.popup').attr('id'));\r\n });\r\n\r\n // Prevent clicks on the popup to bubble up.\r\n // Un élément qui reçoit un clic le propage par défaut à tous ses parents dans la hiérarchie DOM.\r\n // La popup, qui a la classe \"popup-container\", propage les clics reçus à son parent popup-wrapper.\r\n // Or le wrapper est un \"popup-closer\", donc un clic dans un élément de la popup entraînerait par défaut sa fermeture.\r\n // la méthode \"stopPropagation()\" permet d'éviter ce comportement indésirable ici. \r\n $(document).on(\"click\", \".popup-container\", function (event) {\r\n event.stopPropagation();\r\n });\r\n\r\n});","export const system = {\r\n version: '3.0.0-alpha',\r\n deferred: function () {\r\n return $.Deferred();\r\n },\r\n uuid: function () {\r\n /* jshint -W016 */\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n },\r\n isUuid: function (uuid) {\r\n var reg = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\r\n return reg.test(uuid);\r\n },\r\n emptyUuid: '00000000-0000-0000-0000-000000000000',\r\n guard: {\r\n argumentNotNull: function (argValue, argName) {\r\n if (typeof argValue === \"undefined\" || argValue === null) {\r\n throw new Error(\"ArgumentNull exception : \" + argName + \" is null\");\r\n }\r\n },\r\n argumentNotNullOrEmpty: function (argValue, argName) {\r\n if (typeof argValue === \"undefined\" || argValue === null || argValue === '') {\r\n throw new Error(\"ArgumentNull exception : \" + argName + \" is null or empty\");\r\n }\r\n },\r\n argumentIsNumber: function (argValue, argName) {\r\n if (typeof argValue === \"undefined\" || argValue === null || typeof (argValue) !== \"number\") {\r\n throw new Error(\"Argument exception : \" + argName + \" is not a number\");\r\n }\r\n },\r\n argumentIsOptionalNumber: function (argValue, argName) {\r\n if (argValue !== undefined && (argValue === null || typeof (argValue) !== \"number\")) {\r\n throw new Error(\"Argument exception : \" + argName + \" is not an optional number\");\r\n }\r\n },\r\n argumentIsFunction: function (argValue, argName) {\r\n if (typeof argValue === \"undefined\" || argValue === null || typeof argValue !== 'function') {\r\n throw new Error(\"Argument exception : \" + argName + \" is not a function\");\r\n }\r\n },\r\n argumentIsDefined: function (argValue, argName) {\r\n if (typeof argValue === \"undefined\") {\r\n throw new Error(\"Argument exception : \" + argName + \" is undefined\");\r\n }\r\n }\r\n },\r\n messageTypes: { empty: 'empty', success: 'success', info: 'info', warning: 'warning', danger: 'danger' }\r\n};","export const http = {\r\n toJSON: function (data) {\r\n return ko.toJSON(data);\r\n },\r\n\r\n get: function (url, query, headers) {\r\n var promise = $.ajax(url, { data: query, headers: ko.toJS(headers) });\r\n promise.always(function () {\r\n console.log('[GET] ' + url, { url: url, query: query, headers: headers, args: arguments });\r\n });\r\n return promise;\r\n },\r\n\r\n put: function (url, data, headers) {\r\n var promise = $.ajax({\r\n url: url,\r\n data: this.toJSON(data),\r\n type: 'PUT',\r\n contentType: 'application/json',\r\n dataType: 'json',\r\n headers: ko.toJS(headers)\r\n });\r\n promise.always(function () {\r\n console.log('[PUT] ' + url, { url: url, data: data, headers: headers, args: arguments });\r\n });\r\n return promise;\r\n },\r\n\r\n post: function (url, data, headers) {\r\n var promise = $.ajax({\r\n url: url,\r\n data: this.toJSON(data),\r\n type: 'POST',\r\n contentType: 'application/json',\r\n dataType: 'json',\r\n headers: ko.toJS(headers)\r\n }).always(function () {\r\n console.log('[POST] ' + url, { url: url, data: data, headers: headers, args: arguments });\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n remove: function (url, query, headers) {\r\n var promise = $.ajax({\r\n url: url,\r\n data: query,\r\n type: 'DELETE',\r\n headers: ko.toJS(headers)\r\n });\r\n promise.always(function () {\r\n console.log('[DELETE] ' + url, { url: url, query: query, headers: headers, args: arguments });\r\n });\r\n return promise;\r\n }\r\n};","const resources = {\r\n applyOrderDiscount: '/api/orderdiscount/apply',\r\n removeOrderDiscount: '/api/orderdiscount/remove',\r\n downloadImage: '/api/images/download',\r\n initiateFacebookPayment: '/facebookpayment/initiate',\r\n executeFacebookPayment: '/facebookpayment/execute',\r\n cancelFacebookPayment: '/facebookpayment/cancel',\r\n deliver: '/order/deliver',\r\n paypal: '/paypal/index',\r\n generateOrnaments: '/coatofarms/generateornaments',\r\n coatofarmDownload: '/download',\r\n coatofarmDownloadEmail: '/download/SendEmailDownload',\r\n changeEmailAjax: '/account/ChangeEmailAjax',\r\n saveActivity: '/api/log/activity',\r\n logKPI: '/api/log/kpi',\r\n log: '/api/log/capture'\r\n};\r\n\r\nexport const api = {\r\n resources: resources\r\n};","function Order(data) {\r\n this.customerId = ko.observable(data.customerId || data.CustomerId);\r\n this.id = ko.observable(data.id || data.Id);\r\n this.totalDue = ko.observable(data.totalDue || data.TotalDue);\r\n this.extraData = ko.observable(data.extraData || data.ExtraData);\r\n this.currency = new Currency(data.currency || data.Currency);\r\n this.discount = new Discount(data.discount || data.Discount);\r\n this.orderDetail = new OrderDetail(data.orderDetail || data.OrderDetail);\r\n this.isDiscounted = ko.computed(function () {\r\n return this.discount && this.discount.amount() > 0;\r\n }, this);\r\n}\r\n\r\nfunction OrderDetail(data) {\r\n this.productId = ko.observable(data.productId || data.ProductId);\r\n this.productName = ko.observable(data.productName || data.ProductName);\r\n this.productLabel = ko.observable(data.productLabel || data.ProductLabel);\r\n this.productDescription = ko.observable(data.productDescription || data.ProductDescription);\r\n this.productPrice = ko.observable(data.productPrice || data.productPrice || 0.0);\r\n this.productUrl = ko.observable(data.productUrl || data.ProductUrl);\r\n}\r\n\r\nfunction Currency(data) {\r\n this.id = ko.observable(data.id || data.Id);\r\n this.symbol = ko.observable(data.symbol || data.Symbol);\r\n}\r\n\r\nfunction Discount(data) {\r\n this.code = ko.observable(data.code || data.Code || '');\r\n this.name = ko.observable(data.name || data.Name || '');\r\n this.amount = ko.observable(data.amount || data.Amount || 0.0);\r\n}\r\n\r\nfunction PurchaseResult(data) {\r\n if (!data) { return; }\r\n this.orderId = data.orderId;\r\n this.productId = data.productId;\r\n this.isSuccess = data.isSuccess && typeof data.isSuccess === \"boolean\" ? true : false;\r\n this.isCancellation = data.isCancellation && typeof data.isCancellation === \"boolean\" ? true : false;\r\n this.provider = data.provider;\r\n this.additionalData = data.additionalData;\r\n}\r\n\r\nfunction OrderDiscount(data) {\r\n this.orderId = data.orderId || data.OrderId;\r\n this.discountCode = data.discountCode || data.DiscountCode;\r\n this.customerId = data.customerId || data.CustomerId;\r\n this.isApplied = data.isApplied || data.IsApplied;\r\n this.isValid = data.isValid || data.IsValid;\r\n this.oldPrice = data.oldPrice || data.OldPrice;\r\n this.newPrice = data.newPrice || data.NewPrice;\r\n this.discountAmount = data.discountAmount || data.DiscountAmount;\r\n this.discountName = data.discountName || data.DiscountName;\r\n this.currencyId = data.currencyId || data.CurrencyId;\r\n this.currencySymbol = data.currencySymbol || data.CurrencySymbol;\r\n}\r\n\r\nexport const models = {\r\n Order: Order,\r\n OrderDetail: OrderDetail,\r\n Currency: Currency,\r\n Discount: Discount,\r\n PurchaseResult: PurchaseResult,\r\n OrderDiscount: OrderDiscount\r\n};","var sharePopupDefaultOptions = {\r\n popupSelector: null,\r\n};\r\n\r\nfunction SharePopup(options) {\r\n var settings = $.extend({}, sharePopupDefaultOptions, options);\r\n this.$popup = $(settings.popupSelector);\r\n this.$buttonConfirm = $(\"a.confirm\", this.$popup);\r\n this.$buttonCancel = $(\"a.cancel\", this.$popup);\r\n\r\n}\r\n\r\nSharePopup.prototype.show = function () {\r\n\r\n var dfd = $.Deferred(), that = this;\r\n\r\n if ((!this.$buttonCancel || !this.$buttonCancel.length) && (!this.$buttonConfirm || !this.$buttonConfirm.length)) {\r\n dfd.resolve();\r\n return dfd.promise();\r\n }\r\n this.$buttonCancel.click(function () {\r\n dfd.reject();\r\n that.$popup.hide();\r\n });\r\n this.$buttonConfirm.click(function () {\r\n dfd.resolve();\r\n that.$popup.hide();\r\n });\r\n\r\n this.$popup.show();\r\n return dfd.promise();\r\n\r\n};\r\n\r\nfunction reloadImage() {\r\n //console.log(\"img error\");\r\n var img = $(this);\r\n\r\n setTimeout(function () {\r\n\r\n img.attr(\"src\", img.attr(\"src\"));\r\n //console.log(\"reloaded\");\r\n }, 500);\r\n};\r\n\r\nfunction loadingWait() {\r\n $(\"body\").addClass(\"loading-cursor\");\r\n}\r\n\r\nfunction loadingStop() {\r\n $(\"body\").removeClass(\"loading-cursor\");\r\n}\r\n\r\nfunction scrollToAnchor(element) {\r\n $('html, body').animate({ scrollTop: $($.attr(element, 'href')).offset().top }, 500); return false;\r\n}\r\n\r\nexport const ui = {\r\n SharePopup: SharePopup,\r\n reloadImage: reloadImage,\r\n loadingWait: loadingWait,\r\n loadingStop: loadingStop,\r\n scrollToAnchor: scrollToAnchor\r\n};","import { system } from './system.js';\r\nimport { http } from './http.js';\r\nimport { models } from './models.js';\r\nimport { api } from './api.js';\r\n\r\nvar providers = {\r\n paypal: 'paypal',\r\n isAllowed: function (name) {\r\n if (!name) { return false; }\r\n return name.toLowerCase() === \"paypal\";\r\n }\r\n};\r\n\r\nfunction formatPrice(price, currencyId, currencySymbol) {\r\n if (typeof price === \"undefined\" || price === null || isNaN(price)) {\r\n price = 0.00;\r\n }\r\n\r\n if (!currencyId) {\r\n currencyId = \"USD\";\r\n }\r\n\r\n var symbol = currencySymbol ? \" (\" + currencySymbol + \")\" : \"\";\r\n return price.toFixed(2) + \" \" + currencyId + symbol;\r\n}\r\n\r\n// Claim a discount\r\nfunction claimDiscount(customerId, orderId, discountCode) {\r\n var dfd = system.deferred();\r\n\r\n console.group('Shop claim discount started');\r\n\r\n if (typeof customerId === \"undefined\" || customerId === null || !system.isUuid(customerId)) {\r\n console.warn('Invalid customerId', { customerId: customerId, orderId: orderId, discountCode: discountCode });\r\n return dfd.reject().promise();\r\n }\r\n\r\n if (typeof orderId === \"undefined\" || orderId === null || !system.isUuid(orderId)) {\r\n console.warn('Invalid orderId', { customerId: customerId, orderId: orderId, discountCode: discountCode });\r\n return dfd.reject().promise();\r\n }\r\n\r\n if (typeof discountCode === \"undefined\" || discountCode === \"\") {\r\n console.warn('Invalid discountCode', { customerId: customerId, orderId: orderId, discountCode: discountCode });\r\n return dfd.reject().promise();\r\n }\r\n\r\n http.post(api.resources.applyOrderDiscount, new models.OrderDiscount({ customerId: customerId, orderId: orderId, discountCode: discountCode }))\r\n .done(function (response) {\r\n dfd.resolve(new models.OrderDiscount(response));\r\n })\r\n .fail(function (jqXHR, textStatus, errorThrown) {\r\n console.warn(\"POST Failed\", { jqXHR: jqXHR, textStatus: textStatus, errorThrown: errorThrown });\r\n dfd.reject();\r\n })\r\n .always(function () {\r\n console.groupEnd();\r\n });\r\n\r\n return dfd.promise();\r\n}\r\n\r\n// Unclaim a discount\r\nfunction unclaimDiscount(customerId, orderId) {\r\n var dfd = system.deferred();\r\n\r\n console.log(\"Shop unclaim discount started\");\r\n\r\n if (typeof customerId === \"undefined\" || customerId === null || !system.isUuid(customerId)) {\r\n console.warn('Invalid customerId', { customerId: customerId, orderId: orderId });\r\n return dfd.reject().promise();\r\n }\r\n\r\n if (typeof orderId === \"undefined\" || orderId === null || !system.isUuid(orderId)) {\r\n console.warn('Invalid orderId', { customerId: customerId, orderId: orderId });\r\n return dfd.reject().promise();\r\n }\r\n\r\n http.post(api.resources.removeOrderDiscount, { customerId: customerId, orderId: orderId })\r\n .done(function (response) {\r\n dfd.resolve(new models.OrderDiscount(response));\r\n })\r\n .fail(function (jqXHR, textStatus, errorThrown) {\r\n console.warn(\"DELETE Failed\", { jqXHR: jqXHR, textStatus: textStatus, errorThrown: errorThrown });\r\n dfd.reject();\r\n })\r\n .always(function () {\r\n console.groupEnd();\r\n });\r\n\r\n return dfd.promise();\r\n}\r\n\r\nfunction purchaseWithPaypal(orderId) {\r\n window.location.href = api.resources.paypal + '/' + orderId;\r\n}\r\n\r\n// Starts a purchase flow\r\nfunction purchase(provider, orderId, productId, productUrl) {\r\n console.log(\"Shop purchase flow started\", { provider: provider, orderId: orderId, productId: productId });\r\n\r\n var dfd = system.deferred();\r\n\r\n if (!providers.isAllowed(provider)) {\r\n console.warn('Invalid provider, cancelling purchase', provider, orderId, productId);\r\n dfd.reject();\r\n return dfd.promise();\r\n }\r\n\r\n if (typeof orderId === \"undefined\" || orderId === null || !system.isUuid(orderId)) {\r\n console.warn('Invalid orderId, cancelling purchase', provider, orderId, productId);\r\n dfd.reject();\r\n return dfd.promise();\r\n }\r\n\r\n if (typeof productId === \"undefined\" || productId === null || !system.isUuid(productId)) {\r\n console.warn('Invalid productId, cancelling purchase', provider, orderId, productId);\r\n dfd.reject();\r\n return dfd.promise();\r\n }\r\n\r\n switch (provider) {\r\n case providers.paypal:\r\n purchaseWithPaypal(orderId);\r\n break;\r\n default:\r\n console.error('Provider is not allowed or supported', orderId, productId);\r\n break;\r\n }\r\n\r\n return dfd.promise();\r\n}\r\n\r\nfunction deliver(orderId) {\r\n var dfd = system.deferred();\r\n\r\n if (typeof orderId === \"undefined\" || orderId === null || !system.isUuid(orderId)) {\r\n console.warn('Invalid orderId, cancelling deliver', orderId);\r\n dfd.reject();\r\n return dfd.promise();\r\n }\r\n\r\n console.log(\"Shop purchase deliver \", { orderId: orderId });\r\n window.location = api.resources.deliver + \"/\" + orderId;\r\n}\r\n\r\nexport const shop = {\r\n formatPrice: formatPrice,\r\n claimDiscount: claimDiscount,\r\n unclaimDiscount: unclaimDiscount,\r\n purchase: purchase,\r\n deliver: deliver\r\n};","import { api } from './api.js';\r\n\r\n$(document).ready(function () {\r\n\r\n $('body').on('click', '.activityReporting', function () {\r\n activity.report($(this).data());\r\n });\r\n\r\n // to use when the event is not propagated to the first handler (ex: popup-closer)\r\n $('.forceActivityReporting').click(function () {\r\n activity.report($(this).data());\r\n });\r\n});\r\n\r\nexport const activity = {\r\n\r\n report: function (data) {\r\n //var topic = data.topic || 'unknownTopic';\r\n\r\n $.ajax({\r\n url: api.resources.saveActivity,\r\n type: 'POST',\r\n dataType: 'json',\r\n data: { data: JSON.stringify(data) },\r\n success: function (result) {\r\n console.log('success', result);\r\n },\r\n error: function (result) {\r\n console.log('fail', result);\r\n }\r\n\r\n });\r\n\r\n console.log('reporting');\r\n }\r\n\r\n};","import { system } from './system.js';\r\nimport { models } from './models.js';\r\nimport { api } from './api.js';\r\nimport { shop } from './shop.js';\r\n\r\nfunction getProvider($element) {\r\n if (!$element || !$element.length) { return \"\"; }\r\n var provider = $element.data('purchaseProvider');\r\n return provider;\r\n}\r\n\r\n//#region OrderIndex\r\n\r\nfunction OrderIndexViewModel(config) {\r\n this.order = new models.Order(config.order);\r\n this.isFormVisible = ko.observable(false);\r\n this.priceLabels = {\r\n order: ko.computed(function () {\r\n if (this.order.totalDue() <= 0) {\r\n return \"FREE\";\r\n }\r\n return shop.formatPrice(this.order.totalDue(), this.order.currency.id(), this.order.currency.symbol());\r\n }, this),\r\n product: ko.computed(function () {\r\n return shop.formatPrice(this.order.orderDetail.productPrice(), this.order.currency.id(), this.order.currency.symbol());\r\n }, this),\r\n discount: ko.computed(function () {\r\n return shop.formatPrice(this.order.discount.amount(), this.order.currency.id(), this.order.currency.symbol());\r\n }, this)\r\n };\r\n this.message = {\r\n content: ko.observable(null),\r\n type: ko.observable(system.messageTypes.empty),\r\n };\r\n this.message.style = ko.computed(function () {\r\n var type = this.message.type();\r\n return 'alert-' + type;\r\n }, this);\r\n this.hasErrors = ko.computed(function () {\r\n var result = this.message.type() === system.messageTypes.danger;\r\n return result;\r\n }, this);\r\n this.hasMessage = ko.computed(function () {\r\n var content = this.message.content();\r\n return typeof content !== \"undefined\" && content !== null && content !== \"\";\r\n }, this);\r\n}\r\n\r\nOrderIndexViewModel.prototype.toggleForm = function () {\r\n this.isFormVisible(!this.isFormVisible());\r\n};\r\n\r\nOrderIndexViewModel.prototype.resetForm = function () {\r\n this.order.discount.code(null);\r\n this.isFormVisible(false);\r\n};\r\n\r\nOrderIndexViewModel.prototype.claimDiscount = function () {\r\n\r\n var that = this,\r\n customerId = that.order.customerId(),\r\n orderId = that.order.id();\r\n\r\n // remove spaces\r\n that.order.discount.code(that.order.discount.code().trim());\r\n\r\n var discountCode = that.order.discount.code();\r\n\r\n console.group(\"Starting claim discount flow\");\r\n\r\n if (!discountCode) {\r\n that.setMessage(\"Cannot claim an empty code\", system.messageTypes.danger);\r\n console.groupEnd();\r\n return;\r\n }\r\n\r\n shop.claimDiscount(customerId, orderId, discountCode)\r\n .done(function (result) {\r\n console.log(\"claim discount succeeded\", result);\r\n if (!result.isValid) { that.setMessage(\"This discount code is not valid\", system.messageTypes.danger); return; }\r\n if (!result.isApplied) { that.setMessage(\"Unable to apply this discount code\", system.messageTypes.danger); return; }\r\n that.order.discount.name(result.discountName);\r\n that.order.discount.amount(result.discountAmount);\r\n that.order.totalDue(result.newPrice);\r\n that.resetForm();\r\n that.setMessage(\"Discount applied\", system.messageTypes.info);\r\n })\r\n .fail(function (result) {\r\n console.warn(\"claim discount failed\", result);\r\n that.setMessage(\"Unable to claim your discount\", system.messageTypes.danger);\r\n })\r\n .always(function () {\r\n console.groupEnd();\r\n });\r\n};\r\n\r\nOrderIndexViewModel.prototype.unclaimDiscount = function () {\r\n var that = this,\r\n customerId = that.order.customerId(),\r\n orderId = that.order.id();\r\n\r\n console.group(\"Starting unclaim discount flow\");\r\n\r\n shop.unclaimDiscount(customerId, orderId)\r\n .done(function (result) {\r\n console.log(\"unclaim discount succeeded\", result);\r\n that.order.discount.name(null);\r\n that.order.discount.amount(0);\r\n that.order.totalDue(result.newPrice);\r\n that.resetForm();\r\n that.setMessage(\"Discount removed\", system.messageTypes.info);\r\n })\r\n .fail(function (result) {\r\n console.warn(\"unclaim discount failed\", result);\r\n that.setMessage(\"A server error occured while removing your discount\", system.messageTypes.danger);\r\n })\r\n .always(function () {\r\n console.groupEnd();\r\n });\r\n\r\n console.groupEnd();\r\n};\r\n\r\nOrderIndexViewModel.prototype.setMessage = function (content, type) {\r\n if (!content) {\r\n this.message.content(null);\r\n this.message.type(null);\r\n } else {\r\n this.message.content(content);\r\n this.message.type(type);\r\n }\r\n};\r\n\r\nOrderIndexViewModel.prototype.purchase = function (vm, event) {\r\n var that = this,\r\n $target = $(event.originalEvent.target),\r\n provider = getProvider($target),\r\n orderId = that.order.id(),\r\n productId = that.order.orderDetail.productId(),\r\n productUrl = that.order.orderDetail.productUrl(),\r\n extraData = that.order.extraData();\r\n\r\n console.group(\"Starting Purchase flow with provider : \" + provider);\r\n\r\n shop.purchase(provider, orderId, productId, productUrl)\r\n .done(function (result) {\r\n console.log('Payment succeeded', result);\r\n window.location = api.resources.deliver + \"/\" + orderId;\r\n\r\n }).fail(function () {\r\n console.log('Payment failed or cancelled');\r\n window.location = api.resources.coatofarmDownload + '/' + extraData;\r\n }).always(function () {\r\n console.groupEnd();\r\n });\r\n};\r\n\r\n//#endregion\r\n\r\n//#region DownloadIndex\r\nfunction DownloadIndexViewModel(config) {\r\n var self = this;\r\n self.re = /\\S+@\\S+\\.\\S+/;\r\n self.originalEmail = ko.observable(config.email);\r\n\r\n self.id = ko.observable(config.id);\r\n self.sharedKey = ko.observable(config.sharedKey);\r\n self.email = ko.observable(config.email);\r\n self.result = ko.observable(\"\");\r\n\r\n self.downloadRight = ko.observable(0);\r\n self.setDownloadRight = function (right) {\r\n self.downloadRight(right);\r\n }\r\n\r\n self.shieldonly = ko.observable(config.shieldonly);\r\n\r\n self.isEmailValid = ko.computed(function () {\r\n return self.re.test(self.email());\r\n });\r\n\r\n self.hasEmailChanged = ko.computed(function () {\r\n return self.email() !== self.originalEmail();\r\n });\r\n\r\n self.newsletterSubscribe = ko.observable(config.newsletterSubscribe);\r\n}\r\n\r\nDownloadIndexViewModel.prototype.cancel = function (vm, event) {\r\n var self = this;\r\n setTimeout(function () {\r\n\r\n self.email(self.originalEmail());\r\n self.result(\"\");\r\n\r\n }, 2000);\r\n};\r\n\r\nDownloadIndexViewModel.prototype.close = function (vm, event) {\r\n var self = this;\r\n setTimeout(function () {\r\n\r\n self.result(\"\");\r\n $(\"#popup_downloadEmail_success\").hide();\r\n $(\"#popup_downloadEmail_fail\").hide();\r\n $(\"#popup_downloadEmail_form\").show();\r\n\r\n }, 2000);\r\n};\r\n\r\nDownloadIndexViewModel.prototype.updateEmail = function (vm, event) {\r\n var self = this,\r\n $target = $(event.target),\r\n $targetOverlay = $target.prev(\".loading-overlay\");\r\n\r\n $targetOverlay.show();\r\n $.ajax({\r\n type: \"POST\",\r\n url: api.resources.changeEmailAjax,\r\n data: { EmailAddress: self.email() },\r\n success: function (data) {\r\n self.result(data);\r\n if (data === \"Email updated\") {\r\n self.originalEmail(self.email());\r\n }\r\n },\r\n error: function (data) {\r\n self.result(data);\r\n },\r\n fail: function (data) {\r\n self.result(data);\r\n }\r\n })\r\n .always(function () {\r\n $targetOverlay.hide();\r\n });;\r\n\r\n};\r\n\r\nDownloadIndexViewModel.prototype.download = function (vm, event) {\r\n var self = this,\r\n $target = $(event.target),\r\n $targetOverlay = $target.prev(\".loading-overlay\");\r\n\r\n $targetOverlay.show();\r\n $(\"#loading-spinner\").show();\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: api.resources.coatofarmDownloadEmail,\r\n data: { email: self.email(), sharedKey: self.sharedKey(), withOrna: !self.shieldonly(), claimedRight: self.downloadRight(), newsletterSubscribe: self.newsletterSubscribe },\r\n success: function (data) {\r\n $(\"#popup_downloadEmail_form\").hide(\"slow\");\r\n $(\"#popup_downloadEmail_fail\").hide(\"slow\");\r\n $(\"#popup_downloadEmail_success\").show(\"slow\");\r\n },\r\n error: function (data) {\r\n $(\"#popup_downloadEmail_form\").hide(\"slow\");\r\n $(\"#popup_downloadEmail_success\").hide(\"slow\");\r\n $(\"#popup_downloadEmail_fail\").show(\"slow\");\r\n }\r\n })\r\n .always(function () {\r\n $targetOverlay.hide();\r\n $(\"#loading-spinner\").hide();\r\n });\r\n};\r\n//#endregion\r\n\r\n//#region EditVM\r\nvar PollViewModel = function (options) {\r\n var self = this;\r\n\r\n self.Id = \"\";\r\n\r\n self.email = ko.observable(options.Email);\r\n var rexp = /\\S+@\\S+\\.\\S+/;\r\n\r\n //self.check = ko.observable(true);\r\n self.selectedElements = ko.observableArray();\r\n\r\n self.coatOfArmsId = options.coatOfArmsId;\r\n self.userId = options.userId;\r\n\r\n self.close = function () {\r\n $(\"#poll-popup\").hide();\r\n };\r\n\r\n self.confirm = function () {\r\n //if (self.selectedElements().length > 0 && ((self.email() !== \"\" && rexp.test(self.email())) || !self.check())) {\r\n\r\n var $form = $(\"
\");\r\n $form.append(\"\");\r\n $form.append('');\r\n $form.append('');\r\n $form.append('');\r\n $form.append('');\r\n\r\n //$form.submit(function (ev) {\r\n $.ajax({\r\n method: \"POST\",\r\n url: \"/api/poll\",\r\n data: $form.serialize()/*,\r\n success: function (data) {\r\n //console.log(data);\r\n },\r\n error: function (data) {\r\n //console.log(data);\r\n }*/\r\n });\r\n //});\r\n\r\n //$form.submit();\r\n\r\n $(\"#poll-popup\").hide();\r\n //} \r\n };\r\n\r\n\r\n //self.isEnabled = ko.computed(function () {\r\n // return ((self.selectedElements().length > 0) && ((self.email() !== \"\" && rexp.test(self.email())) || !self.check()));\r\n //});\r\n\r\n self.select = function (data, event) {\r\n var $element = $(event.currentTarget);\r\n var selection = $element.data(\"selection\");\r\n var elements = self.selectedElements();\r\n\r\n if (elements.indexOf(selection) > -1) {\r\n elements.splice(elements.indexOf(selection), 1);\r\n $element.removeClass(\"selected\");\r\n } else {\r\n elements.push(selection);\r\n $element.addClass(\"selected\");\r\n }\r\n\r\n self.selectedElements(elements);\r\n //console.log(self.selectedElements());\r\n };\r\n};\r\n//#endregion\r\n\r\n\r\nexport const viewmodels = {\r\n OrderIndex: OrderIndexViewModel,\r\n DownloadIndex: DownloadIndexViewModel,\r\n Poll: PollViewModel,\r\n};","// MyBlazon JS lib - v0.3.0.0 (semver: 3.0.0-beta)\r\nimport { ui } from './ui.js';\r\nimport { popup } from './popup.js';\r\nimport { system } from './system.js';\r\nimport { http } from './http.js';\r\nimport { api } from './api.js';\r\nimport { models } from './models.js';\r\nimport { shop } from './shop.js';\r\nimport { activity } from './activity.js';\r\nimport { viewmodels } from './viewmodels.js';\r\n\r\nwindow.myblazon = {\r\n ui: ui,\r\n popup: popup,\r\n system: system,\r\n http: http,\r\n api: api,\r\n models: models,\r\n shop: shop,\r\n activity: activity,\r\n viewmodels: viewmodels,\r\n}\r\n\r\n$(document).ready(function () {\r\n\r\n // Initialize Slick.js\r\n var defaultSliderOptions = {\r\n autoplay: true,\r\n autoplaySpeed: 3000, // ms\r\n arrows: false,\r\n dots: false,\r\n infinite: true,\r\n pauseOnHover: false,\r\n lazyLoad: 'progressive'\r\n };\r\n\r\n $(\".slider\").each(function () {\r\n var $this = $(this);\r\n \r\n // Allow responsive breakpoints, and add defaultoptions to them\r\n let responsiveOptions = $this.data(\"sliderResponsive\");\r\n if (responsiveOptions) {\r\n for(let i = 0; i < responsiveOptions.length; i++) {\r\n responsiveOptions[i].settings = $.extend({}, defaultSliderOptions, responsiveOptions[i].settings);\r\n }\r\n }\r\n\r\n let sliderOptions = $.extend({}, defaultSliderOptions, {\r\n slidesToShow: $this.data(\"sliderSlidestoshow\"),\r\n slidesToScroll: $this.data(\"sliderSlidestoscroll\"),\r\n autoplay: $this.data(\"sliderAutoplay\"),\r\n responsive: responsiveOptions\r\n });\r\n\r\n if($this.hasClass(\"slider-pause-hover\")) { sliderOptions.pauseOnHover = true; }\r\n \r\n $this.slick(sliderOptions);\r\n\r\n $(\".slider-prev\", $this).click(function (event) {\r\n event.preventDefault();\r\n $this.slickPrev();\r\n });\r\n\r\n $(\".slider-next\", $this).click(function (event) {\r\n event.preventDefault();\r\n $this.slickNext();\r\n });\r\n });\r\n\r\n $(\".edit-slider\").each(function () {\r\n var $this = $(this);\r\n //$this.autoplay = false;\r\n $this.slickPause();\r\n $this.slickSetOption(\"autoplay\", false, true);\r\n $this.slickSetOption(\"infinite\", false, true);\r\n });\r\n\r\n var sharePopup = new ui.SharePopup({ popupSelector: \"#popup_preshare\" });\r\n var urlToShare = $('#shieldlink_next').data(\"shareurl\");\r\n var imgUrl = $('#imgurl').attr('src');\r\n if (typeof urlToShare !== 'undefined') {\r\n $(' .sharePreview').each(function () {\r\n console.log($(this).attr('src'));\r\n $(this).attr('src', imgUrl);\r\n });\r\n }\r\n $('#shieldlink_next.local').click(function () {\r\n\r\n sharePopup.show().done(function () {\r\n var login = $('#shieldlink_next.local').data(\"shouldlogin\");\r\n if (login && login === true) { OpenLogInPopup($('#shieldlink_next.local').data(\"redirectaftershare\")); }\r\n else { window.location.href = $('#shieldlink_next.local').data(\"redirectaftershare\"); }\r\n })\r\n .fail(function () {\r\n var login = $('#shieldlink_next.local').data(\"shouldlogin\");\r\n if (login && login === true) { OpenLogInPopup($('#shieldlink_next.local').data(\"redirectaftershare\")); }\r\n else { window.location.href = $('#shieldlink_next.local').data(\"redirectaftershare\"); }\r\n });\r\n });\r\n\r\n //$('.fbrefresh').click(function () {\r\n // $('#form_ornaments').submit();\r\n // window.FB.api(\"\", 'post', { id: $(\".fbrefresh\").data(\"shareurl\"), scrape: 'true' }, function () { });\r\n //});\r\n\r\n //change or set recipient of blason\r\n var $setRecBtn = $('#setRecipient button[type=\"button\"]'),\r\n $setRecInput = $('#setRecipient .input-box');\r\n\r\n $setRecBtn.mousedown(function () {\r\n $setRecBtn.removeClass('selected');\r\n $setRecInput.hide();\r\n $(this).addClass('selected');\r\n $(this).next($setRecInput).show();\r\n var val = $(this).val();\r\n if (val !== \"\") {\r\n $('#setRecipient #recipientType').attr('value', val);\r\n $('#recipient_recipientType').attr('value', val);\r\n }\r\n\r\n });\r\n $(\"#sendCoaMail\").click(function () {\r\n\r\n var displayError = function () {\r\n setTimeout(function () {\r\n $(\"#notsent\").fadeIn('slow');\r\n }, 1000);\r\n\r\n\r\n setTimeout(function () {\r\n $(\"#notsent\").fadeOut('slow');\r\n }, 5000);\r\n };\r\n\r\n if ($('#emails').val().length === 0) {\r\n displayError();\r\n return;\r\n }\r\n\r\n $.ajax({\r\n url: '/coatofarms/sendcoaemailapi',\r\n type: 'POST',\r\n data: 'sharedkey=' + $('#id').val() + '&link=' + $('#link').val() + '&emails=' + $('#emails').val(),\r\n beforeSend: function () {\r\n $(\"#sending\").fadeIn('fast');\r\n },\r\n success: function () {\r\n setTimeout(function () {\r\n $(\"#sent\").fadeIn('slow');\r\n }, 1000);\r\n\r\n\r\n setTimeout(function () {\r\n $(\"#sent\").fadeOut('slow');\r\n }, 5000);\r\n },\r\n\r\n error: function (result, status, error) {\r\n console.log('Unable to send coat of arms email', result, status, error);\r\n displayError();\r\n },\r\n\r\n complete: function () {\r\n $(\"#sending\").fadeOut('slow');\r\n }\r\n });\r\n });\r\n\r\n //for display page : opens toolbox, set saved option as 'selected' by default \r\n $('#toolbox-opener').click(function () {\r\n var type = $(this).next('.inner-toolbox').data(\"recipienttype\");\r\n $(\".inner-toolbox\").find('button').removeClass(\"selected\");\r\n $(\".inner-toolbox\").find('input').hide();\r\n $(\".inner-toolbox\").find('button[value=' + type + ']').addClass(\"selected\");\r\n $(this).next('.inner-toolbox').toggle('fast');\r\n });\r\n\r\n\r\n //for display page, displays more informations about values responsively\r\n $('#touch-trigger').click(function () {\r\n var $infos = $('#heroBox').find('#hoverInfo');\r\n if ($infos.hasClass('down')) {\r\n $infos.removeClass('down');\r\n $infos.addClass('up');\r\n $(this).addClass('active');\r\n } else {\r\n $infos.removeClass('up');\r\n $infos.addClass('down');\r\n $(this).removeClass('active');\r\n }\r\n });\r\n});","import { api } from './api.js';\r\n\r\n$(document).on(\"click\", \".kpi-on-click\", function (event) {\r\n\r\n var kpiValue = $(this).data('kpi');\r\n\r\n // Log kpi\r\n $.ajax({\r\n url: api.resources.logKPI,\r\n type: 'POST',\r\n data: { kpiValue: kpiValue },\r\n success: function (data) {\r\n },\r\n error: function (data) {\r\n }\r\n });\r\n});\r\n\r\nexport const log = {\r\n}"],"names":["String","prototype","trim","this","replace","startsWith","str","slice","length","format","args","match","number","Array","isArray","obj","Object","toString","call","keys","hasOwnProperty","hasDontEnumBug","propertyIsEnumerable","dontEnums","dontEnumsLength","TypeError","prop","i","result","push","document","addEventListener","logShare","provider","url","$","ajax","type","data","kpiValue","success","error","msgId","splittedUrl","split","simpleUrl","messageId","message","window","twttr","ready","events","bind","ev","target","FB","init","appId","querySelector","getAttribute","autoLogAppEvents","xfbml","version","click","e","href","currentTarget","ui","method","hashtag","response","error_message","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","popup","show","id","$popup","console","log","addClass","css","hide","fadeIn","hasClass","removeClass","fadeOut","on","event","preventDefault","popupId","each","index","element","attr","stopPropagation","system","deferred","Deferred","uuid","c","r","Math","random","isUuid","test","emptyUuid","guard","argumentNotNull","argValue","argName","Error","argumentNotNullOrEmpty","argumentIsNumber","argumentIsOptionalNumber","argumentIsFunction","argumentIsDefined","messageTypes","empty","info","warning","danger","http","toJSON","ko","get","query","headers","promise","toJS","always","arguments","put","contentType","dataType","post","remove","api","resources","applyOrderDiscount","removeOrderDiscount","downloadImage","initiateFacebookPayment","executeFacebookPayment","cancelFacebookPayment","deliver","paypal","generateOrnaments","coatofarmDownload","coatofarmDownloadEmail","changeEmailAjax","saveActivity","logKPI","OrderDetail","productId","observable","ProductId","productName","ProductName","productLabel","ProductLabel","productDescription","ProductDescription","productPrice","productUrl","ProductUrl","Currency","Id","symbol","Symbol","Discount","code","Code","name","Name","amount","Amount","models","Order","customerId","CustomerId","totalDue","TotalDue","extraData","ExtraData","currency","discount","orderDetail","isDiscounted","computed","PurchaseResult","orderId","isSuccess","isCancellation","additionalData","OrderDiscount","OrderId","discountCode","DiscountCode","isApplied","IsApplied","isValid","IsValid","oldPrice","OldPrice","newPrice","NewPrice","discountAmount","DiscountAmount","discountName","DiscountName","currencyId","CurrencyId","currencySymbol","CurrencySymbol","sharePopupDefaultOptions","popupSelector","SharePopup","options","settings","extend","$buttonConfirm","$buttonCancel","dfd","that","reject","resolve","reloadImage","img","setTimeout","loadingWait","loadingStop","scrollToAnchor","animate","scrollTop","offset","top","providers","toLowerCase","shop","formatPrice","price","isNaN","toFixed","claimDiscount","group","warn","done","fail","jqXHR","textStatus","errorThrown","groupEnd","unclaimDiscount","purchase","location","purchaseWithPaypal","activity","report","JSON","stringify","OrderIndexViewModel","config","order","isFormVisible","priceLabels","product","content","style","hasErrors","hasMessage","DownloadIndexViewModel","self","re","originalEmail","email","sharedKey","downloadRight","setDownloadRight","right","shieldonly","isEmailValid","hasEmailChanged","newsletterSubscribe","toggleForm","resetForm","setMessage","vm","$element","$target","originalEvent","cancel","close","updateEmail","$targetOverlay","prev","EmailAddress","download","withOrna","claimedRight","viewmodels","OrderIndex","DownloadIndex","Poll","Email","selectedElements","observableArray","coatOfArmsId","userId","confirm","$form","append","serialize","select","selection","elements","indexOf","splice","myblazon","defaultSliderOptions","autoplay","autoplaySpeed","arrows","dots","infinite","pauseOnHover","lazyLoad","$this","responsiveOptions","sliderOptions","slidesToShow","slidesToScroll","responsive","slick","slickPrev","slickNext","slickPause","slickSetOption","sharePopup","urlToShare","imgUrl","login","OpenLogInPopup","$setRecBtn","$setRecInput","mousedown","next","val","displayError","beforeSend","status","complete","find","toggle","$infos"],"sourceRoot":""}