vendor: 3,628 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40/******/ } 41/******/ }; 42/******/ 43/******/ // define __esModule on exports 44/******/ __webpack_require__.r = function(exports) { 45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47/******/ } 48/******/ Object.defineProperty(exports, '__esModule', { value: true }); 49/******/ }; 50/******/ 51/******/ // create a fake namespace object 52/******/ // mode & 1: value is a module id, require it 53/******/ // mode & 2: merge all properties of value into the ns 54/******/ // mode & 4: return value when already ns object 55/******/ // mode & 8|1: behave like require 56/******/ __webpack_require__.t = function(value, mode) { 57/******/ if(mode & 1) value = __webpack_require__(value); 58/******/ if(mode & 8) return value; 59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60/******/ var ns = Object.create(null); 61/******/ __webpack_require__.r(ns); 62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64/******/ return ns; 65/******/ }; 66/******/ 67/******/ // getDefaultExport function for compatibility with non-harmony modules 68/******/ __webpack_require__.n = function(module) { 69/******/ var getter = module && module.__esModule ? 70/******/ function getDefault() { return module['default']; } : 71/******/ function getModuleExports() { return module; }; 72/******/ __webpack_require__.d(getter, 'a', getter); 73/******/ return getter; 74/******/ }; 75/******/ 76/******/ // Object.prototype.hasOwnProperty.call 77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78/******/ 79/******/ // __webpack_public_path__ 80/******/ __webpack_require__.p = ""; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = "./conf/grunt/main-entry/viewer.js"); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88
89/***/ "./conf/grunt/main-entry/viewer.js": 90/*!*****************************************!*\ 91 !*** ./conf/grunt/main-entry/viewer.js ***! 92 \*****************************************/ 93/*! no static exports found */ 94/***/ (function(module, exports, __webpack_require__) { 95 96"use strict"; 97 98 99var _isBot2 = __webpack_require__(/*! santa-main-r/lib/lib/common/isBot.js */ "./node_modules/santa-main-r/lib/lib/common/isBot.js"); 100 101var _isBot3 = _interopRequireDefault(_isBot2); 102 103var _isSuspectedBot2 = __webpack_require__(/*! santa-main-r/lib/lib/common/isSuspectedBot.js */ "./node_modules/santa-main-r/lib/lib/common/isSuspectedBot.js"); 104 105var _isSuspectedBot3 = _interopRequireDefault(_isSuspectedBot2); 106 107var _experiment = __webpack_require__(/*! santa-main-r/lib/lib/viewer/experiment.js */ "./node_modules/santa-main-r/lib/lib/viewer/experiment.js"); 108 109var _PackagesUtil = __webpack_require__(/*! santa-main-r/lib/lib/common/PackagesUtil.js */ "./node_modules/santa-main-r/lib/lib/common/PackagesUtil.js"); 110 111var _PackagesUtil2 = _interopRequireDefault(_PackagesUtil); 112 113var _convertSiteModel2 = __webpack_require__(/*! santa-main-r/lib/lib/viewer/convertSiteModel.js */ "./node_modules/santa-main-r/lib/lib/viewer/convertSiteModel.js"); 114 115var _convertSiteModel3 = _interopRequireDefault(_convertSiteModel2); 116 117var _render2 = __webpack_require__(/*! santa-main-r/lib/lib/viewer/render.js */ "./node_modules/santa-main-r/lib/lib/viewer/render.js"); 118 119var _render3 = _interopRequireDefault(_render2); 120 121var _addExperimentsFromQuery = __webpack_require__(/*! santa-main-r/lib/lib/common/addExperimentsFromQuery.js */ "./node_modules/santa-main-r/lib/lib/common/addExperimentsFromQuery.js"); 122 123var _addExperimentsFromQuery2 = _interopRequireDefault(_addExperimentsFromQuery); 124 125var _applyPackagesCache = __webpack_require__(/*! santa-main-r/lib/lib/common/applyPackagesCache.js */ "./node_modules/santa-main-r/lib/lib/common/applyPackagesCache.js"); 126 127var _applyPackagesCache2 = _interopRequireDefault(_applyPackagesCache); 128 129var _getBaseVersion = __webpack_require__(/*! santa-main-r/lib/lib/common/getBaseVersion.js */ "./node_modules/santa-main-r/lib/lib/common/getBaseVersion.js"); 130 131var _getFullRjsConfig = __webpack_require__(/*! santa-main-r/lib/lib/common/getFullRjsConfig.js */ "./node_modules/santa-main-r/lib/lib/common/getFullRjsConfig.js"); 132 133var _getFullRjsConfig2 = _interopRequireDefault(_getFullRjsConfig); 134 135var _utils = __webpack_require__(/*! santa-main-r/lib/lib/viewer/utils.js */ "./node_modules/santa-main-r/lib/lib/viewer/utils.js"); 136 137var _getQueryUtils = __webpack_require__(/*! santa-main-r/lib/lib/common/getQueryUtils.js */ "./node_modules/santa-main-r/lib/lib/common/getQueryUtils.js"); 138 139var _getQueryUtils2 = _interopRequireDefault(_getQueryUtils); 140 141var _getSubdomain = __webpack_require__(/*! santa-main-r/lib/lib/common/getSubdomain.js */ "./node_modules/santa-main-r/lib/lib/common/getSubdomain.js"); 142 143var _getSubdomain2 = _interopRequireDefault(_getSubdomain); 144 145var _instruments2 = __webpack_require__(/*! santa-main-r/lib/lib/viewer/instruments.js */ "./node_modules/santa-main-r/lib/lib/viewer/instruments.js"); 146 147var _instruments3 = _interopRequireDefault(_instruments2); 148 149var _joinURL = __webpack_require__(/*! santa-main-r/lib/lib/common/joinURL.js */ "./node_modules/santa-main-r/lib/lib/common/joinURL.js"); 150 151var _joinURL2 = _interopRequireDefault(_joinURL); 152 153var _mobile = __webpack_require__(/*! santa-main-r/lib/lib/viewer/mobile.js */ "./node_modules/santa-main-r/lib/lib/viewer/mobile.js"); 154 155var _mobile2 = _interopRequireDefault(_mobile); 156 157var _overrideScriptsLocationMapFromQuery = __webpack_require__(/*! santa-main-r/lib/lib/common/overrideScriptsLocationMapFromQuery.js */ "./node_modules/santa-main-r/lib/lib/common/overrideScriptsLocationMapFromQuery.js"); 158 159var _overrideScriptsLocationMapFromQuery2 = _interopRequireDefault(_overrideScriptsLocationMapFromQuery); 160 161var _requirejs = __webpack_require__(/*! requirejs */ "requirejs"); 162 163var _requirejs2 = _interopRequireDefault(_requirejs); 164 165var _resourcePrefetch = __webpack_require__(/*! santa-main-r/lib/lib/viewer/resourcePrefetch.js */ "./node_modules/santa-main-r/lib/lib/viewer/resourcePrefetch.js"); 166 167var _resourcePrefetch2 = _interopRequireDefault(_resourcePrefetch); 168 169var _rjsConfig = __webpack_require__(/*! santa-main-r/lib/lib/viewer/rjs-config.js */ "./node_modules/santa-main-r/lib/lib/viewer/rjs-config.js"); 170 171var _rjsConfig2 = _interopRequireDefault(_rjsConfig); 172 173var _storageUtil = __webpack_require__(/*! santa-main-r/lib/lib/common/storageUtil.js */ "./node_modules/santa-main-r/lib/lib/common/storageUtil.js"); 174 175var _storageUtil2 = _interopRequireDefault(_storageUtil); 176 177function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 178 179/* global window */ 180/* eslint prefer-template:0 */ 181/* eslint-disable sort-imports */ 182 183var sentryForViewerProjectLink = 'https://[email protected]/263673'; 184 185if (window.Raven && window.publicModel) { 186 window.Raven.config(sentryForViewerProjectLink).install(); 187} 188 189// This should be before the Polyfill 190 191var isBot = (0, _isBot3.default)(window); 192var isSuspectedBot = (0, _isSuspectedBot3.default)(window); 193 194var options = __webpack_require__(/*! ../../../gen/options.json */ "./gen/options.json"); 195var packages = __webpack_require__(/*! ../../../gen/packagesList.json */ "./gen/packagesList.json"); 196var _window = window, 197 rendererModel = _window.rendererModel, 198 publicModel = _window.publicModel, 199 _window$serviceTopolo = _window.serviceTopology, 200 serviceTopology = _window$serviceTopolo === undefined ? {} : _window$serviceTopolo; 201 202 203window.persistent = (0, _storageUtil2.default)(window); // TODO: how is this used? 204var queryUtil = (0, _getQueryUtils2.default)(window); 205window.queryUtil = queryUtil; 206 207// Preload scripts for caching 208var prefetch = window.isPrefetchMode || window.location.pathname.indexOf('prefetch') > 0 || queryUtil.isParameterTrue('prefetch'); 209 210var experimentInst = (0, _experiment.experiment)(window); 211var render = (0, _render3.default)(window, _requirejs2.default, prefetch, isBot, experimentInst); 212var packagesUtil = new _PackagesUtil2.default(packages, window.location.search, options.bundles); 213var getViewerRjsConfig = (0, _rjsConfig2.default)(window, options.versions, experimentInst); 214 215var _instruments = (0, _instruments3.default)(window, _requirejs2.default, isBot, isSuspectedBot, prefetch, experimentInst), 216 sendErrorOrQueue = _instruments.sendErrorOrQueue, 217 instrument = _instruments.instrument; 218 219var convertSiteModel = (0, _convertSiteModel3.default)(window, sendErrorOrQueue, queryUtil); 220var isPreview = queryUtil.isParameterTrue('isEdited'); 221var hasPageIdInHash = window.location.hash && window.location.hash !== '#!'; 222var isServerSide = !(window.clientSideRender || isPreview); //eslint-disable-line santa/no-module-state 223 224if (isServerSide && hasPageIdInHash) { 225 window.isServerSideWithHash = true; 226 isServerSide = false;
227} 228 229var _window2 = window, 230 _window2$wixBiSession = _window2.wixBiSession, 231 wixBiSession = _window2$wixBiSession === undefined ? {} : _window2$wixBiSession; 232 233window.wixBiSession = wixBiSession; 234wixBiSession.mainLoaded = Date.now(); 235wixBiSession.et = 1; 236 237serviceTopology.scriptsLocationMap = (0, _overrideScriptsLocationMapFromQuery2.default)(serviceTopology.scriptsLocationMap, queryUtil.getParameterByName('scriptsLocations')); 238 239rendererModel.runningExperiments = (0, _addExperimentsFromQuery2.default)(rendererModel.runningExperiments, queryUtil, 'viewer'); 240 241window.siteModel = convertSiteModel(rendererModel, publicModel, rendererModel.runningExperiments); 242window.siteModel.Raven = window.Raven; 243var _window3 = window, 244 siteModel = _window3.siteModel; 245var premiumFeatures = rendererModel.premiumFeatures; 246 247var isPremium = !!premiumFeatures && premiumFeatures.indexOf('HasDomain') !== -1; 248 249var pageInfo = publicModel && (0, _utils.getPageInfo)(window, publicModel.pageList, isPremium); 250 251instrument(serviceTopology, wixBiSession, queryUtil, siteModel, pageInfo, isPremium, isServerSide); 252 253if (publicModel && experimentInst.isOpen('checkRenderTime') && !options.disableCheckRenderTime) { 254 if (Math.abs(Date.now() - publicModel.renderTime) > 2592e5) { 255 wixBiSession.sendError({ 256 errorName: 'Error #2592e5', 257 errorCode: 111026 258 }); 259 throw new Error('Error #2592e5'); 260 } 261} 262 263if (isServerSide && experimentInst.isOpen('sv_ssrBufferEvents')) { 264 window.addEventListener('message', siteModel.messageHandler, false); 265} 266 267if (window.karmaIntegration) { 268 siteModel.documentServicesModel = siteModel.documentServicesModel || window.karmaIntegration.documentServicesModel; 269 siteModel.wixapps = siteModel.wixapps || {}; 270 siteModel.wixapps.appbuilder = siteModel.wixapps.appbuilder || {}; 271 siteModel.wixapps.appbuilder.descriptor = siteModel.wixapps.appbuilder.descriptor || {}; 272 siteModel.wixapps.appbuilder.descriptor.applicationInstanceVersion = siteModel.wixapps.appbuilder.descriptor.applicationInstanceVersion || {}; 273} 274 275var config = (0, _getFullRjsConfig2.default)('santa', window.santaBase, getViewerRjsConfig(serviceTopology), packagesUtil, serviceTopology); 276 277if (!options.disablePackagesCache) { 278 (0, _applyPackagesCache2.default)({ 279 proj: 'santa', 280 paths: config.paths, 281 manifest: options.manifest, 282 version: options.version, 283 scriptsDomainUrl: serviceTopology.scriptsDomainUrl 284 }); 285} 286 287siteModel.santaBase = config.baseUrl; 288serviceTopology.staticServerFallbackUrl = serviceTopology.staticServerFallbackUrl || 'https://fallback.wix.com/'; 289siteModel.baseVersion = (0, _getBaseVersion.getBaseVersion)(siteModel.santaBase); 290siteModel.santaBaseFallbackUrl = siteModel.baseVersion ? (0, _joinURL2.default)(serviceTopology.staticServerFallbackUrl, siteModel.baseVersion) : null; 291 292_requirejs2.default.config(config); 293(0, _experiment.defineExperiment)(window); 294 295var mobileView = _mobile2.default.isMobileView(window, siteModel, queryUtil); 296 297var prefetcher = (0, _resourcePrefetch2.default)(window, { 298 siteModel: siteModel, 299 publicModel: publicModel, 300 pageInfo: pageInfo, 301 wixBiSession: wixBiSession, 302 isServerSide: isServerSide, 303 mobileView: mobileView, 304 experiment: experimentInst, 305 requirejs: _requirejs2.default 306}); 307 308try { 309 window.document.domain = (0, _getSubdomain2.default)(window.document.domain); 310} catch (e) { 311 // empty 312} 313 314window.isPreview = queryUtil.isParameterTrue.bind(null, 'isEdited'); 315var isExternalPreview = rendererModel.previewMode; 316 317render({ 318 isServerSide: isServerSide, 319 isPreview: isPreview, 320 isExternalPreview: isExternalPreview, 321 prefetcher: prefetcher, 322 queryUtil: queryUtil, 323 siteModel: siteModel, 324 wixBiSession: wixBiSession, 325 mobileView: mobileView, 326 pageInfo: pageInfo, 327 config: config 328}); 329wixBiSession.beat(4); 330 331/***/ }), 332
333/***/ "./gen/options.json": 334/*!**************************!*\ 335 !*** ./gen/options.json ***! 336 \**************************/ 337/*! exports provided: versions, bundles, manifest, default */ 338/***/ (function(module) { 339 340module.exports = {"versions":{"@shimil/remote-dom":"5.0.6","ag-grid":"6.2.1","ajv":"4.8.1","almond":"0.3.3","atob":"2.1.1","bi-logger-sanitizer":"1.0.10","blueimp-md5":"2.10.0","color":"0.11.1","create-react-class":"15.6.2","data-capsule":"1.0.83","date-fns":"1.3.0","fedops-logger":"3.0.10","grunt-contrib-requirejs":"1.0.0","gsap":"1.19.0","hammerjs":"2.0.8","hls.js":"0.8.9","image-client-api":"1.274.0","immutable":"3.7.5","js-platform-apps-configuration":"1.0.27","jsdom":"9.11.0","lodash":"4.17.10","mobx":"3.3.3","mobx-react":"4.2.2","mousetrap":"1.4.6","node-fetch":"2.1.2","platform-editor-sdk":"0.0.313","pm-rpc":"1.0.11","promote-analytics-adapter":"1.0.128","prop-types":"15.6.0","react":"16.3.0","react-dom":"16.3.0","react-dom-factories":"1.0.2","santa-bundle":"1.198.0","santa-components":"1.324.0","santa-core-utils":"1.636.0","santa-data-fixer":"1.193.0","santa-galleries":"1.368.0","santa-host-platform-services":"1.52.0","santa-image-utils":"1.190.0","santa-main-r":"1.748.0","santa-mobile-core":"1.456.0","santa-multilingual":"1.361.0","santa-platform-utils":"1.504.0","santa-renderer":"1.47.0","santa-skin-utils":"1.180.0","santa-wix-code":"1.617.0","soundmanager2":"2.97.20150601","speakingurl":"7.0.0","swfobject":"2.2.1","wix-code-platform":"1.0.977","wix-dom-sanitizer":"1.6.0","wix-elementory-globals":"3.1.942","wix-fullstory-loader":"1.0.306","wix-ui-santa":"1.0.469","xss":"0.2.12","zepto":"1.2.0","tweenmax":"1.19.0"},"bundles":[],"manifest":{}}; 341 342/***/ }), 343
344/***/ "./gen/packagesList.json": 345/*!*******************************!*\ 346 !*** ./gen/packagesList.json ***! 347 \*******************************/ 348/*! exports provided: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, default */ 349/***/ (function(module) { 350 351module.exports = ["a11yTestKit","adminLoginButton","animations","audioCommon","audioPlayer","backToTopButton","backgroundCommon","boxSlideShowSlide","buttonCommon","checkbox","checkboxGroup","comboBoxInput","compDesignUtils","compUtils","components","componentsPreviewLayer","componentsSeoLayer","contactForm","container","containerCommon","controller","core","coreUtils","dataFixer","datePicker","dateUtils","dialogs","displayer","disqusComments","documentMedia","documentServices","documentServicesSchemas","ebayItemsBySeller","editingRendererPlugins","exitMobileModeButton","facebookComments","facebookLike","facebookLikeBox","facebookShare","fileUploader","flashComponent","flickrBadgeWidget","formCommon","galleriesCommon","googleMap","gridComponent","hostLibs","htmlComponent","icon","imageButton","imageZoom","itunesButton","languageSelector","layout","linkBar","loginButton","loginSocialBar","matrixGallery","mediaContainer","mediaControls","mediaPlayer","mediaRichText","memoizeAPI","messageView","mobileActionsMenu","pagination","paypalButton","pinItPinWidget","pinterestFollow","pinterestPinIt","platformInit","popupCloseTextButton","popupContainer","previewExtensionsCore","qaAutomation","quickActionBar","radioButton","radioGroup","ratingsDisplay","render","repeater","richTextBox","rssButton","santaHost","santaPreview","santaPreviewComponents","santaProps","singleAudioPlayer","site-widgets","siteRegionContainer","skinExports","skins","skypeCallButton","slideShowGallery","socialCommon","soundCloudWidget","spotifyFollow","spotifyPlayer","stripColumnsContainer","stripContainer","stripSlideShow","stripSlideShowSlide","subscribeForm","svgCommon","svgShape","table","tags","testUtils","textArea","textCommon","thirdPartyAnalytics","tinyMenu","toggleSwitch","tpa","tpaGalleries","tpaWarmup","translationsUtils","twitterFeed","utils","vKShareButton","verticalAnchorsMenu","verticalMenu","videoPlayer","wGooglePlusOne","wTwitterFollow","wTwitterTweet","warmup","warmupUtils","wixCode","wixCodeInit","wixFreemiumBanner","wixappsBuilder","wixappsClassics","wixappsCore","wixappsLayout","youTubeSubscribeButton"]; 352 353/***/ }), 354
vendor: 3,243 bytes, lines 355-450
355/***/ "./node_modules/santa-main-r/lib/lib/common/PackagesUtil.js": 356/*!******************************************************************!*\ 357 !*** ./node_modules/santa-main-r/lib/lib/common/PackagesUtil.js ***! 358 \******************************************************************/ 359/*! no static exports found */ 360/***/ (function(module, exports, __webpack_require__) { 361 362"use strict"; 363 364 365Object.defineProperty(exports, "__esModule", { 366 value: true 367}); 368 369var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 370 371var _reduceQueryToObject = __webpack_require__(/*! ./reduceQueryToObject */ "./node_modules/santa-main-r/lib/lib/common/reduceQueryToObject.js"); 372 373var _reduceQueryToObject2 = _interopRequireDefault(_reduceQueryToObject); 374 375function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 376 377/** 378 * @param {Array.<string>} packagesStructure 379 * @param {string} query 380 * @param {Array.<string>?} bundles 381 * @constructor 382 */ 383function PackagesUtil(packagesStructure, query) { 384 var bundles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; 385 386 var queryParamsObject = (0, _reduceQueryToObject2.default)(query.replace(/^\?/, '')); 387 388 /** 389 * changes the config to load packages correctly, accounting the query 390 * @param {Object} config 391 * @returns {Object} 392 */ 393 this.buildConfig = function (config) { 394 var debug = (decodeURIComponent(queryParamsObject.debug) || '').split(',').filter(Boolean); 395 396 if (debug.indexOf('all') !== -1) { 397 var debuggableExternals = Object.keys(config.paths).filter(function (path) { 398 return config.paths[path].source; 399 }); 400 debug = packagesStructure.concat(debuggableExternals); 401 } 402 403 function isInDebug(i) { 404 return debug.indexOf(i) !== -1; 405 } 406 407 //config.paths: 408 Object.keys(config.paths).filter(function (k) { 409 return _typeof(config.paths[k]) === 'object' && !Array.isArray(config.paths[k]); 410 }).forEach(function (k) { 411 config.paths[k] = config.paths[k][isInDebug(k) ? 'source' : 'min']; 412 }); 413 414 //config.bundles: 415 config.bundles = config.bundles || {}; 416 417 packagesStructure.filter(function (p) { 418 return !isInDebug(p); 419 }).filter(function (p) { 420 return bundles.indexOf(p) === -1; 421 }).forEach(function (pkg) { 422 config.bundles[pkg] = pkg; 423 config.paths[pkg] = 'packages-bin/' + pkg + '/' + pkg + '.min'; 424 }); 425 426 if (bundles && bundles.length > 0) { 427 var bundleName = 'first-load'; 428 config.bundles[bundleName] = bundles; 429 config.paths[bundleName] = 'packages-bin/' + bundleName + '/' + bundleName + '.min'; 430 } 431 432 //config.packages: 433 config.packages = config.packages || []; 434 var projectPackages = packagesStructure.filter(isInDebug).map(function (name) { 435 return { 436 name: name, 437 location: 'packages/' + name + '/src/main', 438 main: name 439 }; 440 }); 441 config.packages = config.packages.concat(projectPackages); 442 443 return config; 444 }; 445} 446 447exports.default = PackagesUtil; 448 449/***/ }), 450
vendor: 2,924 bytes, lines 451-524
451/***/ "./node_modules/santa-main-r/lib/lib/common/addExperimentsFromQuery.js": 452/*!*****************************************************************************!*\ 453 !*** ./node_modules/santa-main-r/lib/lib/common/addExperimentsFromQuery.js ***! 454 \*****************************************************************************/ 455/*! no static exports found */ 456/***/ (function(module, exports, __webpack_require__) { 457 458"use strict"; 459 460 461Object.defineProperty(exports, "__esModule", { 462 value: true 463}); 464 465var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); 466 467exports.default = addExperimentsFromQuery; 468function addExperimentsFromQuery(runningExperiments, queryUtil, project, urlQueries) { 469 var projValuePairRegex = new RegExp('^(' + project + ':)(.*)|(.*)$'); 470 471 var experiments = {}; 472 Object.keys(runningExperiments).forEach(function (key) { 473 experiments[key] = runningExperiments[key]; 474 }); 475 476 var setPair = function setPair(_ref) { 477 var _ref2 = _slicedToArray(_ref, 2), 478 key = _ref2[0], 479 value = _ref2[1]; 480 481 experiments[key] = value; 482 }; 483 var getValueIfProj = function getValueIfProj(str) { 484 return str.replace(projValuePairRegex, '$2'); 485 }; 486 487 var filterParamsForCurrProj = function filterParamsForCurrProj(paramValue) { 488 return paramValue.split(';').map(getValueIfProj).filter(Boolean).join(','); 489 }; 490 491 var setParamValues = function setParamValues(param, value) { 492 var paramValue = queryUtil.getParameterByName(param, urlQueries); 493 if (paramValue.indexOf(':') !== -1) { 494 // Should be deprecated 495 paramValue = filterParamsForCurrProj(paramValue); 496 } 497 paramValue.split(',').filter(Boolean).map(function (exp) { 498 return [exp, value]; 499 }).forEach(setPair); 500 }; 501 502 var setProjParamExperiments = function setProjParamExperiments() { 503 queryUtil.getParameterByName(project + 'exp', urlQueries).split(',').filter(Boolean).map(function (exp) { 504 return exp.split(':'); 505 }).map(function (_ref3) { 506 var _ref4 = _slicedToArray(_ref3, 2), 507 key = _ref4[0], 508 value = _ref4[1]; 509 510 return [key.toLowerCase(), value || 'new']; 511 }).forEach(setPair); 512 }; 513 514 ////////////////// 515 516 setParamValues('experiments', 'new'); 517 setParamValues('experimentsoff', 'old'); 518 setProjParamExperiments(); 519 520 return experiments; 521} 522 523/***/ }), 524
vendor: 1,071 bytes, lines 525-557
525/***/ "./node_modules/santa-main-r/lib/lib/common/applyPackagesCache.js": 526/*!************************************************************************!*\ 527 !*** ./node_modules/santa-main-r/lib/lib/common/applyPackagesCache.js ***! 528 \************************************************************************/ 529/*! no static exports found */ 530/***/ (function(module, exports, __webpack_require__) { 531 532"use strict"; 533 534 535Object.defineProperty(exports, "__esModule", { 536 value: true 537}); 538exports.default = applyPackagesCache; 539function applyPackagesCache(_ref) { 540 var proj = _ref.proj, 541 paths = _ref.paths, 542 manifest = _ref.manifest, 543 version = _ref.version, 544 scriptsDomainUrl = _ref.scriptsDomainUrl; 545 546 var validForCache = function validForCache(pkg) { 547 return paths[pkg] && manifest[pkg] !== version; 548 }; 549 var overrideFromCache = function overrideFromCache(pkg) { 550 paths[pkg] = scriptsDomainUrl + "services/" + proj + "/" + manifest[pkg] + "/" + paths[pkg]; 551 }; 552 553 Object.keys(manifest).filter(validForCache).forEach(overrideFromCache); 554} 555 556/***/ }), 557
vendor: 2,950 bytes, lines 558-641
558/***/ "./node_modules/santa-main-r/lib/lib/common/appsPath.js": 559/*!**************************************************************!*\ 560 !*** ./node_modules/santa-main-r/lib/lib/common/appsPath.js ***! 561 \**************************************************************/ 562/*! no static exports found */ 563/***/ (function(module, exports, __webpack_require__) { 564 565"use strict"; 566 567 568Object.defineProperty(exports, "__esModule", { 569 value: true 570}); 571exports.nativeAppsPathBuilder = undefined; 572 573var _rjsConfigUtils = __webpack_require__(/*! ./rjs-config-utils */ "./node_modules/santa-main-r/lib/lib/common/rjs-config-utils.js"); 574 575function nativeAppsPathBuilder(_ref, scriptsLocation) { 576 var _ref$clientSpecMap = _ref.clientSpecMap, 577 clientSpecMap = _ref$clientSpecMap === undefined ? {} : _ref$clientSpecMap, 578 nativeComponentsOverrides = _ref.nativeComponentsOverrides; 579 580 return Object.keys(clientSpecMap).map(function (app) { 581 return clientSpecMap[app]; 582 }).filter(function (_ref2) { 583 var appFields = _ref2.appFields; 584 return appFields && appFields.platform && appFields.platform.viewerScriptUrl; 585 }) //eslint-disable-line 586 .reduce(function (result, _ref3) { 587 var widgets = _ref3.widgets; 588 589 var widgetsOutput = buildWidget(widgets); 590 var widgetsAfterOverrides = buildNativeComponentOverrides(nativeComponentsOverrides, scriptsLocation); 591 (0, _rjsConfigUtils.mergeInto)(result, widgetsAfterOverrides); 592 (0, _rjsConfigUtils.mergeInto)(result, widgetsOutput); 593 return result; 594 }, {}); 595} 596 597function buildNativeComponentOverrides(nativeComponentsOverrides, scriptsLocation) { 598 try { 599 var overrides = JSON.parse(nativeComponentsOverrides); 600 return Object.keys(overrides).map(function (override) { 601 return overrides[override]; 602 }).reduce(function (result, _ref4) { 603 var componentName = _ref4.componentName, 604 componentUrl = _ref4.componentUrl; 605 606 if (validateUrl(componentUrl, scriptsLocation)) { 607 var name = 'native.components.' + componentName; 608 result[name] = componentUrl; 609 } 610 return result; 611 }, {}); 612 } catch (error) { 613 return ''; 614 } 615} 616 617function validateUrl(url, scriptsLocation) { 618 return url.indexOf(scriptsLocation) === 0 || url.search('https?://localhost') === 0; 619} 620 621function buildWidget(widgets) { 622 return Object.keys(widgets).map(function (widget) { 623 return widgets[widget]; 624 }).filter(function (_ref5) { 625 var componentFields = _ref5.componentFields; 626 return componentFields && componentFields.componentName && componentFields.componentUrl; 627 }).reduce(function (result, _ref6) { 628 var _ref6$componentFields = _ref6.componentFields, 629 componentName = _ref6$componentFields.componentName, 630 componentUrl = _ref6$componentFields.componentUrl; 631 632 var name = 'native.components.' + componentName; 633 result[name] = componentUrl; 634 return result; 635 }, {}); 636} 637 638exports.nativeAppsPathBuilder = nativeAppsPathBuilder; 639 640/***/ }), 641
vendor: 724 bytes, lines 642-667
642/***/ "./node_modules/santa-main-r/lib/lib/common/getBaseVersion.js": 643/*!********************************************************************!*\ 644 !*** ./node_modules/santa-main-r/lib/lib/common/getBaseVersion.js ***! 645 \********************************************************************/ 646/*! no static exports found */ 647/***/ (function(module, exports, __webpack_require__) { 648 649"use strict"; 650 651 652Object.defineProperty(exports, "__esModule", { 653 value: true 654}); 655/** 656 * @param url 657 * @returns {*|Array|{index: number, input: string}} 658 */ 659function getBaseVersion(url) { 660 var semverMatches = url.match(/\/(\d+\.\d+\.\d+)\/?$/); 661 return semverMatches && semverMatches[1]; 662} 663 664exports.getBaseVersion = getBaseVersion; 665 666/***/ }), 667
vendor: 1,291 bytes, lines 668-707
668/***/ "./node_modules/santa-main-r/lib/lib/common/getFullRjsConfig.js": 669/*!**********************************************************************!*\ 670 !*** ./node_modules/santa-main-r/lib/lib/common/getFullRjsConfig.js ***! 671 \**********************************************************************/ 672/*! no static exports found */ 673/***/ (function(module, exports, __webpack_require__) { 674 675"use strict"; 676 677 678Object.defineProperty(exports, "__esModule", { 679 value: true 680}); 681exports.default = getFullRjsConfig; 682 683var _joinURL = __webpack_require__(/*! ./joinURL.js */ "./node_modules/santa-main-r/lib/lib/common/joinURL.js"); 684 685var _joinURL2 = _interopRequireDefault(_joinURL); 686 687function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 688 689var isAddress = function isAddress(str) { 690 return (/^(https?:)?\/\//.test(str) 691 ); 692}; /* eslint curly:0 */ 693 694function getFullRjsConfig(name, base, config, packagesUtil, serviceTopology) { 695 function getBaseUrl() { 696 if (!base) return serviceTopology.scriptsLocationMap[name]; 697 if (isAddress(base)) return base; 698 return (0, _joinURL2.default)(serviceTopology.scriptsDomainUrl, 'services', name, base); 699 } 700 701 config = packagesUtil.buildConfig(config); 702 config.baseUrl = getBaseUrl(); 703 return config; 704} 705 706/***/ }), 707
vendor: 1,562 bytes, lines 708-748
708/***/ "./node_modules/santa-main-r/lib/lib/common/getIntegrationPath.js": 709/*!************************************************************************!*\ 710 !*** ./node_modules/santa-main-r/lib/lib/common/getIntegrationPath.js ***! 711 \************************************************************************/ 712/*! no static exports found */ 713/***/ (function(module, exports, __webpack_require__) { 714 715"use strict"; 716 717 718Object.defineProperty(exports, "__esModule", { 719 value: true 720}); 721exports.default = getIntegrationPath; 722 723var _isLocal = __webpack_require__(/*! ../common/isLocal.js */ "./node_modules/santa-main-r/lib/lib/common/isLocal.js"); 724 725var _isLocal2 = _interopRequireDefault(_isLocal); 726 727function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 728 729var packageToFolder = { 730 tpaIntegration: 'Santa-Integration-Protractor', 731 wixCodeIntegration: 'js-wixcode-integration', 732 viewerIntegration: 'viewer-integration', 733 platformIntegrationEditor: 'js-platform-integration', 734 tpaIntegrationEditor: 'Santa-Editor-Integration-Protractor' }; 735 736function getLocalBasePath(baseArtifact) { 737 var protocol = (/^https?:/.exec(baseArtifact) || [''])[0]; 738 return protocol + '//localhost:4578'; 739} 740 741function getIntegrationPath(packageName, baseArtifact) { 742 var integrationBasePath = (0, _isLocal2.default)(baseArtifact) ? getLocalBasePath(baseArtifact) : 'https://s3.amazonaws.com/integration-tests-statics/' + packageToFolder[packageName] + '/SNAPSHOT/runners'; 743 744 return integrationBasePath + '/' + packageName + '/src/main'; 745} 746 747/***/ }), 748
vendor: 1,462 bytes, lines 749-796
749/***/ "./node_modules/santa-main-r/lib/lib/common/getQueryUtils.js": 750/*!*******************************************************************!*\ 751 !*** ./node_modules/santa-main-r/lib/lib/common/getQueryUtils.js ***! 752 \*******************************************************************/ 753/*! no static exports found */ 754/***/ (function(module, exports, __webpack_require__) { 755 756"use strict"; 757 758 759Object.defineProperty(exports, "__esModule", { 760 value: true 761}); 762exports.default = getQueryUtils; 763/** 764 * Get value of URL parameter by its name 765 * @param {string} name 766 * @param {string} query 767 * @returns {string} 768 */ 769function getParameterFromQuery(query, name) { 770 name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); 771 var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); 772 var results = regex.exec(query); 773 return results && results[1] ? decodeURIComponent(results[1]).replace(/\+/g, ' ') : ''; 774} 775 776/** 777 * Get state of boolean URL parameter by its name 778 * @param {string} name 779 * @param {string} query 780 * @returns {boolean} 781 */ 782function isParameterTrueInQuery(query, name) { 783 return getParameterFromQuery(query, name) === 'true'; 784} 785 786function getQueryUtils(window) { 787 return { 788 getParameterFromQuery: getParameterFromQuery, 789 isParameterTrueInQuery: isParameterTrueInQuery, 790 getParameterByName: getParameterFromQuery.bind(null, window.location.search), 791 isParameterTrue: isParameterTrueInQuery.bind(null, window.location.search) 792 }; 793} 794 795/***/ }), 796
vendor: 1,116 bytes, lines 797-829
797/***/ "./node_modules/santa-main-r/lib/lib/common/getSubdomain.js": 798/*!******************************************************************!*\ 799 !*** ./node_modules/santa-main-r/lib/lib/common/getSubdomain.js ***! 800 \******************************************************************/ 801/*! no static exports found */ 802/***/ (function(module, exports, __webpack_require__) { 803 804"use strict"; 805 806 807/* eslint prefer-template:0 */ 808 809module.exports = function getSubdomain(domain) { 810 if (!domain) { 811 return ''; 812 } 813 var subDomain = domain.split('.'); 814 if (subDomain.length <= 2) { 815 subDomain = domain; 816 } else { 817 var beforeLastPart = subDomain[subDomain.length - 2]; 818 var topLevelDomains = { com: true, org: true, net: true, edu: true, gov: true, mil: true, info: true, co: true, ac: true }; 819 if (topLevelDomains[beforeLastPart]) { 820 subDomain = subDomain[subDomain.length - 3] + '.' + subDomain[subDomain.length - 2] + '.' + subDomain[subDomain.length - 1]; 821 } else { 822 subDomain = subDomain[subDomain.length - 2] + '.' + subDomain[subDomain.length - 1]; 823 } 824 } 825 return subDomain; 826}; 827 828/***/ }), 829
vendor: 597 bytes, lines 830-850
830/***/ "./node_modules/santa-main-r/lib/lib/common/isBot.js": 831/*!***********************************************************!*\ 832 !*** ./node_modules/santa-main-r/lib/lib/common/isBot.js ***! 833 \***********************************************************/ 834/*! no static exports found */ 835/***/ (function(module, exports, __webpack_require__) { 836 837"use strict"; 838 839 840Object.defineProperty(exports, "__esModule", { 841 value: true 842}); 843 844exports.default = function (window) { 845 return (/bot|google|phantom|crawler|spider|crawling|headless|^mozilla\/4\.0$/i.test(window.navigator.userAgent) 846 ); 847}; 848 849/***/ }), 850
vendor: 613 bytes, lines 851-875
851/***/ "./node_modules/santa-main-r/lib/lib/common/isLocal.js": 852/*!*************************************************************!*\ 853 !*** ./node_modules/santa-main-r/lib/lib/common/isLocal.js ***! 854 \*************************************************************/ 855/*! no static exports found */ 856/***/ (function(module, exports, __webpack_require__) { 857 858"use strict"; 859 860 861Object.defineProperty(exports, "__esModule", { 862 value: true 863}); 864exports.default = isLocal; 865/** 866 * @param {string} path 867 * @returns {boolean} 868 */ 869function isLocal(path) { 870 return (/^(https?:)?\/\/localhost($|[/:])/.test(path) 871 ); 872} 873 874/***/ }), 875
vendor: 864 bytes, lines 876-916
876/***/ "./node_modules/santa-main-r/lib/lib/common/isSuspectedBot.js": 877/*!********************************************************************!*\ 878 !*** ./node_modules/santa-main-r/lib/lib/common/isSuspectedBot.js ***! 879 \********************************************************************/ 880/*! no static exports found */ 881/***/ (function(module, exports, __webpack_require__) { 882 883"use strict"; 884 885 886Object.defineProperty(exports, "__esModule", { 887 value: true 888}); 889 890exports.default = function (window) { 891 if (!Function.prototype.bind) { 892 return true; 893 } 894 895 var languages = window.navigator.languages; 896 897 if (languages && languages.length === 0) { 898 return true; 899 } 900 901 var stack = void 0; 902 try { 903 null[0](); 904 } catch (e) { 905 stack = e.stack; 906 } 907 908 if (stack && /ph\x61n\x74om|n\x6fde/i.test(stack)) { 909 return true; 910 } 911 912 return false; 913}; 914 915/***/ }), 916
vendor: 807 bytes, lines 917-944
917/***/ "./node_modules/santa-main-r/lib/lib/common/joinURL.js": 918/*!*************************************************************!*\ 919 !*** ./node_modules/santa-main-r/lib/lib/common/joinURL.js ***! 920 \*************************************************************/ 921/*! no static exports found */ 922/***/ (function(module, exports, __webpack_require__) { 923 924"use strict"; 925 926 927function safe(a) { 928 return typeof a === 'undefined' ? 'undefined' : a; 929} 930 931function safeReplace(a, search, replaceValue) { 932 return safe(a).replace(search, replaceValue); 933} 934 935module.exports = function joinURL() { 936 var url = arguments[0]; 937 for (var i = 1; i < arguments.length; ++i) { 938 url = safeReplace(url, /\/$/, '') + '/' + safeReplace(arguments[i], /^\//, ''); //eslint-disable-line prefer-template 939 } 940 return url; 941}; 942 943/***/ }), 944
vendor: 1,380 bytes, lines 945-978
945/***/ "./node_modules/santa-main-r/lib/lib/common/overrideScriptsLocationMapFromQuery.js": 946/*!*****************************************************************************************!*\ 947 !*** ./node_modules/santa-main-r/lib/lib/common/overrideScriptsLocationMapFromQuery.js ***! 948 \*****************************************************************************************/ 949/*! no static exports found */ 950/***/ (function(module, exports, __webpack_require__) { 951 952"use strict"; 953 954 955Object.defineProperty(exports, "__esModule", { 956 value: true 957}); 958exports.default = overrideScriptsLocationMapFromQuery; 959 960var _replaceUrlVersion = __webpack_require__(/*! ./replaceUrlVersion */ "./node_modules/santa-main-r/lib/lib/common/replaceUrlVersion.js"); 961 962var _replaceUrlVersion2 = _interopRequireDefault(_replaceUrlVersion); 963 964function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 965 966function overrideScriptsLocationMapFromQuery(scriptsLocationMap, overrideParam) { 967 overrideParam.split(',').filter(Boolean).forEach(function (keyValueString) { 968 var pair = keyValueString.split(':'); 969 var urlOverride = (0, _replaceUrlVersion2.default)(scriptsLocationMap[pair[0]], pair[1]); 970 if (urlOverride && scriptsLocationMap[pair[0]] !== urlOverride) { 971 scriptsLocationMap[pair[0]] = urlOverride; 972 } 973 }); 974 return scriptsLocationMap; 975} 976 977/***/ }), 978
vendor: 1,047 bytes, lines 979-1012
979/***/ "./node_modules/santa-main-r/lib/lib/common/reduceQueryToObject.js": 980/*!*************************************************************************!*\ 981 !*** ./node_modules/santa-main-r/lib/lib/common/reduceQueryToObject.js ***! 982 \*************************************************************************/ 983/*! no static exports found */ 984/***/ (function(module, exports, __webpack_require__) { 985 986"use strict"; 987 988 989Object.defineProperty(exports, "__esModule", { 990 value: true 991}); 992exports.default = reduceQueryToObject; 993/** 994 * 995 * @param {string} str 996 * @param {string?} separator 997 * @param {string?} equalizer 998 * @returns {*} 999 */ 1000function reduceQueryToObject(str) { 1001 var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '&'; 1002 var equalizer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '='; 1003 1004 return (str || '').replace(/^\?/, '').split(separator).reduce(function (o, pairString) { 1005 var pair = pairString.split(equalizer); 1006 o[pair[0]] = pair[1]; 1007 return o; 1008 }, {}); 1009} 1010 1011/***/ }), 1012
vendor: 886 bytes, lines 1013-1041
1013/***/ "./node_modules/santa-main-r/lib/lib/common/replaceUrlVersion.js": 1014/*!***********************************************************************!*\ 1015 !*** ./node_modules/santa-main-r/lib/lib/common/replaceUrlVersion.js ***! 1016 \***********************************************************************/ 1017/*! no static exports found */ 1018/***/ (function(module, exports, __webpack_require__) { 1019 1020"use strict"; 1021 1022 1023Object.defineProperty(exports, "__esModule", { 1024 value: true 1025}); 1026var bareSemver = /(\d)+\.(\d)+\.(\d)+/; 1027var onlyBareSemver = /^(\d)+\.(\d)+\.(\d)+$/; 1028var onlySha = /^[0-9a-f]{40}$/; 1029 1030var validVersion = function validVersion(version) { 1031 return onlyBareSemver.test(version) || onlySha.test(version); 1032}; 1033 1034function replaceUrlVersion(url, version) { 1035 return url && validVersion(version) ? url.replace(bareSemver, version) : url; 1036} 1037 1038exports.default = replaceUrlVersion; 1039 1040/***/ }), 1041
vendor: 5,108 bytes, lines 1042-1238
1042/***/ "./node_modules/santa-main-r/lib/lib/common/rjs-config-utils.js": 1043/*!**********************************************************************!*\ 1044 !*** ./node_modules/santa-main-r/lib/lib/common/rjs-config-utils.js ***! 1045 \**********************************************************************/ 1046/*! no static exports found */ 1047/***/ (function(module, exports, __webpack_require__) { 1048 1049"use strict"; 1050 1051 1052Object.defineProperty(exports, "__esModule", { 1053 value: true 1054}); 1055exports.mergeInto = exports.nodeObj = exports.node = exports.third = exports.thirdObjUrl = exports.unpkgObj = exports.unpkg = exports.vendorOrThirdPartyObj = exports.vendorOrThirdParty = exports.unpkgOrNodeObj = exports.unpkgOrNode = undefined; 1056 1057var _joinURL = __webpack_require__(/*! ./joinURL */ "./node_modules/santa-main-r/lib/lib/common/joinURL.js"); 1058 1059var _joinURL2 = _interopRequireDefault(_joinURL); 1060 1061function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1062 1063/** 1064 * builds an unpkg url e.g. 1065 * https://static.parastorage.com/unpkg/[email protected]/lodash.min.js 1066 * https://unpkg.parastorage.com/[email protected]/dist/base-ui.js 1067 * @param {string} pkg 1068 * @param {string} v 1069 * @param {string} p 1070 * @returns {string} 1071 */ 1072function unpkg(pkg, v, p) { 1073 return '//static.parastorage.com/unpkg/' + pkg + '@' + v + '/' + p; 1074 // return `//unpkg.parastorage.com/${pkg}@${v}/${p}` 1075} 1076 1077/** 1078 * @param {string} pkg 1079 * @param {string} v 1080 * @param {string} min 1081 * @param {string} debug 1082 * @returns {{min: string, source: string}} 1083 */ 1084function unpkgObj(pkg, v, min, debug) { 1085 return { 1086 min: unpkg(pkg, v, min), 1087 source: unpkg(pkg, v, debug) 1088 }; 1089} 1090 1091/** 1092 * @param {string} scriptLocation 1093 * @param {string} pkg 1094 * @param {string} v 1095 * @param {string} min 1096 * @param {string} debug 1097 * @returns {{min: url, source: url}} 1098 */ 1099function thirdObjUrl(scriptLocation, pkg, v, min, debug) { 1100 return { 1101 min: third(scriptLocation, pkg, v, min), 1102 source: third(scriptLocation, pkg, v, debug) 1103 }; 1104} 1105 1106/** 1107 * @param {string} v 1108 * @param {string} name 1109 */ 1110function check(v, name) { 1111 if (typeof v === 'undefined') { 1112 throw new Error('error ' + name + ' is \'' + v + '\''); 1113 } 1114} 1115 1116/** 1117 * @param {string} scriptsLocation 1118 * @param {string} pkg 1119 * @param {string} version 1120 * @param {string} path 1121 * @returns {url} 1122 */ 1123function third(scriptsLocation, pkg, version, path) { 1124 check(scriptsLocation, 'scriptsLocation'); 1125 check(pkg, 'pkg'); 1126 check(version, 'version'); 1127 check(path, 'path'); 1128 return (0, _joinURL2.default)(scriptsLocation, 'services', 'third-party', pkg, version, path); 1129} 1130 1131// function isLocalSource(window, name) { 1132// return isLocal(getQueryUtils(window).getParameterByName('ReactSource')) 1133// } 1134 1135/** 1136 * 1137 * @param {string} m 1138 * @param {string} p 1139 * @returns {string} 1140 */ 1141function node(m, p) { 1142 return 'node_modules/' + m + '/' + p; 1143} 1144 1145/** 1146 * @param {*} versions 1147 * @param {boolean} local 1148 * @param {string} m 1149 * @param {string} p 1150 * @returns {string} 1151 */ 1152function unpkgOrNode(versions, local, m, p) { 1153 var actualLocal = isLocal(versions, local, m); 1154 return actualLocal ? node(m, p) : unpkg(m, versions[m], p); 1155} 1156 1157function isLocal(versions, local, m) { 1158 return local || versions[m] === 'link'; 1159} 1160 1161/** 1162 * @param {*} versions 1163 * @param {boolean} local 1164 * @param {string} m 1165 * @param {string} min 1166 * @param {string} debug 1167 * @returns {{min: string, source: string}} 1168 */ 1169function unpkgOrNodeObj(versions, local, m, min, debug) { 1170 var actualLocal = isLocal(versions, local, m); 1171 return actualLocal ? nodeObj(m, min, debug) : unpkgObj(m, versions[m], min, debug); 1172} 1173 1174/** 1175 * @param {string} scriptsLocation 1176 * @param {boolean} local 1177 * @param {string} pkg 1178 * @param {string} v 1179 * @param {string} p 1180 * @returns {url} 1181 */ 1182function vendorOrThirdParty(scriptsLocation, local, pkg, v, p) { 1183 return local ? jsVendor(pkg, v, p) : third(scriptsLocation, pkg, v, p); 1184} 1185 1186/** 1187 * @param {string} scriptsLocation 1188 * @param {boolean} local 1189 * @param {string} pkg 1190 * @param {string} v 1191 * @param min 1192 * @param debug 1193 * @returns {url} 1194 */ 1195function vendorOrThirdPartyObj(scriptsLocation, local, pkg, v, min, debug) { 1196 return local ? jsVendor(pkg, v, min) : thirdObjUrl(scriptsLocation, pkg, v, min, debug); 1197} 1198 1199/** 1200 * @param {string} pkg 1201 * @param {string} v 1202 * @param {string} p 1203 * @returns {url} 1204 */ 1205function jsVendor(pkg, v, p) { 1206 return (0, _joinURL2.default)('js/third-party-modules', pkg, v, p); 1207} 1208 1209/** 1210 * @param {string} m 1211 * @param {string} min 1212 * @param {string} debug 1213 * @returns {{min: string, source: string}} 1214 */ 1215function nodeObj(m, min, debug) { 1216 return { min: node(m, min), source: node(m, debug) }; 1217} 1218 1219function mergeInto(dst, src) { 1220 Object.keys(src).forEach(function (k) { 1221 dst[k] = dst[k] || src[k]; 1222 }); 1223} 1224 1225exports.unpkgOrNode = unpkgOrNode; 1226exports.unpkgOrNodeObj = unpkgOrNodeObj; 1227exports.vendorOrThirdParty = vendorOrThirdParty; 1228exports.vendorOrThirdPartyObj = vendorOrThirdPartyObj; 1229exports.unpkg = unpkg; 1230exports.unpkgObj = unpkgObj; 1231exports.thirdObjUrl = thirdObjUrl; 1232exports.third = third; 1233exports.node = node; 1234exports.nodeObj = nodeObj; 1235exports.mergeInto = mergeInto; 1236 1237/***/ }), 1238
vendor: 1,468 bytes, lines 1239-1297
1239/***/ "./node_modules/santa-main-r/lib/lib/common/storageUtil.js": 1240/*!*****************************************************************!*\ 1241 !*** ./node_modules/santa-main-r/lib/lib/common/storageUtil.js ***! 1242 \*****************************************************************/ 1243/*! no static exports found */ 1244/***/ (function(module, exports, __webpack_require__) { 1245 1246"use strict"; 1247 1248 1249Object.defineProperty(exports, "__esModule", { 1250 value: true 1251}); 1252 1253exports.default = function (window) { 1254 function isAvailable(name) { 1255 try { 1256 var unique = 'testStorage' + Date.now(); 1257 var st = window[name]; 1258 st.setItem(unique, unique); 1259 var value = st.getItem(unique); 1260 st.removeItem(unique); 1261 if (value !== unique) { 1262 throw 'not equal'; //eslint-disable-line no-throw-literal 1263 } 1264 } catch (e) { 1265 return false; 1266 } 1267 return true; 1268 } 1269 1270 var storage = void 0; 1271 if (isAvailable('localStorage')) { 1272 storage = window.localStorage; 1273 } else if (isAvailable('sessionStorage')) { 1274 storage = window.sessionStorage; 1275 } else { 1276 storage = { 1277 setItem: function setItem() {}, 1278 getItem: function getItem() {}, 1279 removeItem: function removeItem() {} 1280 }; 1281 } 1282 1283 return { 1284 save: function save(key, value) { 1285 storage.setItem(key, value); 1286 }, 1287 load: function load(key) { 1288 return storage.getItem(key); 1289 }, 1290 remove: function remove(key) { 1291 storage.removeItem(key); 1292 } 1293 }; 1294}; 1295 1296/***/ }), 1297
vendor: 7,154 bytes, lines 1298-1523
1298/***/ "./node_modules/santa-main-r/lib/lib/viewer/convertSiteModel.js": 1299/*!**********************************************************************!*\ 1300 !*** ./node_modules/santa-main-r/lib/lib/viewer/convertSiteModel.js ***! 1301 \**********************************************************************/ 1302/*! no static exports found */ 1303/***/ (function(module, exports, __webpack_require__) { 1304 1305"use strict"; 1306 1307 1308Object.defineProperty(exports, "__esModule", { 1309 value: true 1310}); 1311 1312exports.default = function (scope, sendErrorOrQueue) { 1313 return function convertSiteModel(rendererModel, publicModel) { 1314 function getPagesDataFromSiteAsJson(siteJson) { 1315 var initialPagesData = { 1316 masterPage: siteJson.masterPage 1317 }; 1318 1319 return siteJson.pages.reduce(function (accum, val) { 1320 accum[val.structure.id] = val; 1321 return accum; 1322 }, initialPagesData); 1323 } 1324 1325 var siteModel = { 1326 publicModel: publicModel, 1327 urlFormatModel: rendererModel.urlFormatModel, 1328 routers: rendererModel.routers, 1329 serviceTopology: scope.serviceTopology, 1330 santaBase: scope.santaBase, 1331 configUrls: scope.configUrls, 1332 rendererModel: rendererModel, 1333 componentGlobals: scope.componentGlobals, 1334 serverAndClientRender: scope.serverAndClientRender, 1335 adData: scope.adData, 1336 mobileAdData: scope.mobileAdData, 1337 googleAnalytics: scope.googleAnalytics, 1338 ipAnonymization: scope.ipAnonymization, 1339 googleTagManager: scope.googleTagManager, 1340 googleRemarketing: scope.googleRemarketing, 1341 facebookRemarketing: scope.facebookRemarketing, 1342 yandexMetrika: scope.yandexMetrika, 1343 wixData: scope.wixData, 1344 wixapps: scope.wixapps || getDefaultWixappsModel(), 1345 wixBiSession: scope.wixBiSession, 1346 pagesData: scope.pagesData, 1347 svgShapes: scope.svgShapes, 1348 contactforms_metadata: {}, 1349 renderFlags: {}, 1350 messageBuffer: [], 1351 messageHandler: function messageHandler(event) { 1352 return siteModel.messageBuffer.push(event); 1353 }, 1354 tpasRenderedInSsr: [] 1355 }; 1356 siteModel.siteHeader = { id: siteModel.rendererModel.siteId, userId: siteModel.rendererModel.userId // required 1357 };siteModel.siteId = siteModel.rendererModel.siteId; // required 1358 siteModel.viewMode = siteModel.rendererModel.previewMode ? 'preview' : 'site'; // required 1359 if (scope.siteAsJson) { 1360 movePageDataToMaster(scope.siteAsJson, sendErrorOrQueue); 1361 siteModel.pagesData = getPagesDataFromSiteAsJson(scope.siteAsJson); 1362 } 1363 var pagesPlatformApplications = getPagesPlatformApplications(siteModel); 1364 if (pagesPlatformApplications) { 1365 siteModel.pagesPlatformApplications = pagesPlatformApplications; 1366 } 1367 if (scope.documentServicesModel) { 1368 siteModel.documentServicesModel = scope.documentServicesModel; 1369 } 1370 return siteModel; 1371 }; 1372}; 1373 1374function getDefaultWixappsModel() { 1375 return { appbuilder: { metadata: { appbuilder_metadata: { requestedPartNames: [] } } } }; 1376} 1377 1378function getWixCodeAppDefId(clientSpecMap) { 1379 for (var spec in clientSpecMap) { 1380 if (clientSpecMap[spec].type === 'siteextension') { 1381 return clientSpecMap[spec].appDefinitionId.toString(); 1382 } 1383 } 1384} 1385 1386function hasAppWithAppDefId(clientSpecMap, appDefId) { 1387 for (var appId in clientSpecMap) { 1388 if (clientSpecMap.hasOwnProperty(appId) && clientSpecMap[appId].appDefinitionId === appDefId) { 1389 return true; 1390 } 1391 } 1392 return false; 1393} 1394 1395function isGuid(appId) { 1396 var guidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/; 1397 return guidRegex.test(appId); 1398} 1399 1400//compare appDefId with current and legacy wix code app def ids - needed for old automation site 1401function isLegacyWixCodeAppDefId(siteModel, appDefId) { 1402 return isGuid(appDefId) && !hasAppWithAppDefId(siteModel.rendererModel.clientSpecMap, appDefId); 1403} 1404 1405function getPagesPlatformApplications(siteModel) { 1406 var wixCodeAppDefId = getWixCodeAppDefId(siteModel.rendererModel.clientSpecMap); 1407 var pagesPlatformApplications = siteModel.rendererModel.pagesPlatformApplications; 1408 var result = {}; 1409 1410 var _loop = function _loop(pageId) { 1411 if (pagesPlatformApplications.hasOwnProperty(pageId)) { 1412 pagesPlatformApplications[pageId].forEach(function (appDefId) { 1413 if (appDefId === wixCodeAppDefId || isLegacyWixCodeAppDefId(siteModel, appDefId)) { 1414 appDefId = 'wixCode'; 1415 } 1416 result[appDefId] = result[appDefId] || {}; 1417 result[appDefId][pageId] = true; 1418 }); 1419 } 1420 }; 1421 1422 for (var pageId in pagesPlatformApplications) { 1423 _loop(pageId); 1424 } 1425 1426 return result; 1427} 1428 1429function movePageDataToMaster(siteAsJson, sendErrorOrQueue) { 1430 var masterData = siteAsJson.masterPage.data.document_data; 1431 1432 function move(ref, to, from) { 1433 if (!get(from, ref)) { 1434 return; 1435 } 1436 1437 if (!get(to, ref)) { 1438 set(to, ref, get(from, ref)); 1439 } 1440 remove(from, ref); 1441 } 1442 1443 function get(parentData, ref) { 1444 return ref && parentData[ref.replace('#', '')]; 1445 } 1446 1447 function set(parentData, ref, dataToSet) { 1448 if (ref) { 1449 parentData[ref.replace('#', '')] = dataToSet; 1450 } 1451 } 1452 1453 function remove(parentData, ref) { 1454 if (ref) { 1455 delete parentData[ref.replace('#', '')]; 1456 } 1457 } 1458 1459 function moveMediaRef(masterPageDocumentData, pageData, mediaRef) { 1460 // Image or WixVideo 1461 var media = get(pageData, mediaRef); 1462 move(mediaRef, masterPageDocumentData, pageData); 1463 // Image 1464 move(media.posterImageRef, masterPageDocumentData, pageData); 1465 } 1466 1467 siteAsJson.pages.forEach(function (page) { 1468 if (!page.structure) { 1469 return; 1470 } 1471 1472 var pageData = page.data.document_data; 1473 var pageId = page.structure.id; 1474 var desktopBg = void 0; 1475 var mobileBg = void 0; 1476 1477 // Pages or AppPages 1478 var pageItem = get(pageData, pageId); 1479 move(pageId, masterData, pageData); 1480 1481 if (pageItem && pageItem.pageBackgrounds && pageItem.pageBackgrounds.desktop.ref) { 1482 // BackgroundImage or BackgroundMedia 1483 desktopBg = get(pageData, pageItem.pageBackgrounds.desktop.ref); 1484 mobileBg = get(pageData, pageItem.pageBackgrounds.mobile.ref); 1485 move(pageItem.pageBackgrounds.desktop.ref, masterData, pageData); 1486 move(pageItem.pageBackgrounds.mobile.ref, masterData, pageData); 1487 1488 // const wixBiSession = window.wixBiSession || {} TODO: Indeed unused? 1489 1490 //BackgroundMedia 1491 if (desktopBg) { 1492 if (desktopBg.mediaRef) { 1493 moveMediaRef(masterData, pageData, desktopBg.mediaRef); 1494 } 1495 //Image 1496 move(desktopBg.imageOverlay, masterData, pageData); 1497 } else { 1498 sendErrorOrQueue({ 1499 errorName: 'MISSING_DESKTOP_BACKGROUND_ITEM', 1500 errorCode: 112001, 1501 severity: 30 1502 }, pageItem.id); 1503 } 1504 1505 if (mobileBg) { 1506 if (mobileBg.mediaRef) { 1507 moveMediaRef(masterData, pageData, mobileBg.mediaRef); 1508 } 1509 //Image 1510 move(mobileBg.imageOverlay, masterData, pageData); 1511 } else { 1512 sendErrorOrQueue({ 1513 errorName: 'MISSING_MOBILE_BACKGROUND_ITEM', 1514 errorCode: 112002, 1515 severity: 30 1516 }, pageItem.id); 1517 } 1518 } 1519 }); 1520} 1521 1522/***/ }), 1523
vendor: 2,129 bytes, lines 1524-1599
1524/***/ "./node_modules/santa-main-r/lib/lib/viewer/experiment.js": 1525/*!****************************************************************!*\ 1526 !*** ./node_modules/santa-main-r/lib/lib/viewer/experiment.js ***! 1527 \****************************************************************/ 1528/*! no static exports found */ 1529/***/ (function(module, exports, __webpack_require__) { 1530 1531"use strict"; 1532 1533 1534Object.defineProperty(exports, "__esModule", { 1535 value: true 1536}); 1537function experiment(window) { 1538 var getRunningExperiments = function getRunningExperiments() { 1539 var rendererModel = window.rendererModel; 1540 1541 if (rendererModel) { 1542 return rendererModel.runningExperiments; 1543 } 1544 var editorModel = window.editorModel; 1545 1546 if (editorModel) { 1547 return editorModel.runningExperiments; 1548 } 1549 }; 1550 1551 var transformRunningExperiments = function transformRunningExperiments(runningExperiments) { 1552 return Object.keys(runningExperiments).reduce(function (acc, key) { 1553 acc[key.toLowerCase()] = runningExperiments[key]; 1554 return acc; 1555 }, {}); 1556 }; 1557 1558 var rawRunningExperiments = void 0; 1559 var transformedRunningExperiments = void 0; 1560 1561 function getValue(name) { 1562 var runningExperiments = getRunningExperiments(); 1563 if (rawRunningExperiments !== runningExperiments) { 1564 rawRunningExperiments = runningExperiments; 1565 transformedRunningExperiments = transformRunningExperiments(runningExperiments); 1566 } 1567 return transformedRunningExperiments[name.toLowerCase()]; 1568 } 1569 1570 var isOpen = function isOpen(name) { 1571 return isMultiValueExperimentOpen(name); 1572 }; 1573 1574 function isMultiValueExperimentOpen(name) { 1575 var value = getValue(name); 1576 return value && value !== 'old' && value !== 'false'; 1577 } 1578 1579 return { 1580 getRunningExperiments: getRunningExperiments, 1581 isOpen: isOpen, 1582 getValue: getValue, 1583 isMultiValueExperimentOpen: isMultiValueExperimentOpen 1584 }; 1585} 1586 1587function defineExperiment(window) { 1588 if (window.define) { 1589 window.define('experiment', [], function () { 1590 return experiment(window); 1591 }); 1592 } 1593} 1594 1595exports.experiment = experiment; 1596exports.defineExperiment = defineExperiment; 1597 1598/***/ }), 1599
vendor: 12,023 bytes, lines 1600-1833
1600/***/ "./node_modules/santa-main-r/lib/lib/viewer/get-rjs-config.js": 1601/*!********************************************************************!*\ 1602 !*** ./node_modules/santa-main-r/lib/lib/viewer/get-rjs-config.js ***! 1603 \********************************************************************/ 1604/*! no static exports found */ 1605/***/ (function(module, exports, __webpack_require__) { 1606 1607"use strict"; 1608 1609 1610Object.defineProperty(exports, "__esModule", { 1611 value: true 1612}); 1613exports.default = getViewerRjsConfig; 1614 1615var _rjsConfigUtils = __webpack_require__(/*! ../common/rjs-config-utils */ "./node_modules/santa-main-r/lib/lib/common/rjs-config-utils.js"); 1616 1617var _appsPath = __webpack_require__(/*! ../common/appsPath */ "./node_modules/santa-main-r/lib/lib/common/appsPath.js"); 1618 1619var _joinURL = __webpack_require__(/*! ../common/joinURL */ "./node_modules/santa-main-r/lib/lib/common/joinURL.js"); 1620 1621var _joinURL2 = _interopRequireDefault(_joinURL); 1622 1623function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1624 1625var defaults = { 1626 'santa-core-utils': '1.307.0', 1627 'santa-skin-utils': '1.1.0', 1628 'image-client-api': '1.40.0', 1629 imageClientLib: '1.40.0', 1630 zepto: '1.2.0', 1631 xss: '0.2.12', 1632 'create-react-class': '15.6.2', 1633 'react-dom-factories': '1.0.2', 1634 'prop-types': '15.6.0', 1635 lodash: '4.7.0', 1636 react: '15.5.4', 1637 'react-dom': '15.5.4', 1638 'pm-rpc': '1.0.7', 1639 hammerjs: '2.0.8', 1640 // jsVendor: { 1641 mobx: '3.3.3', 1642 'mobx-react': '4.2.2', 1643 tweenmax: '1.19.0', 1644 'fedops-logger': '3.0.5' 1645 1646 /** 1647 * @param {Object.<string, string>} versions 1648 * @param {*} serviceTopology 1649 * @param {boolean} local 1650 * @param {Object.<string, *>} clientSpecMap 1651 * @returns {*} 1652 */ 1653};function getViewerRjsConfig(versions, serviceTopology, local, appsConfig) { 1654 var scriptsLocation = serviceTopology.scriptsDomainUrl; 1655 var platformSdkRoot = serviceTopology.scriptsLocationMap['js-platform-editor-sdk']; 1656 1657 var platformAppConfigurationUrl = serviceTopology && serviceTopology.scriptsLocationMap['js-platform-apps-configuration'] || 'https://static.parastorage.com/services/js-platform-apps-configuration/1.7.0'; 1658 var promoteAnalyticsAdapterUrl = serviceTopology && serviceTopology.scriptsLocationMap['promote-analytics-adapter'] || 'https://static.parastorage.com/services/promote-analytics-adapter/2.56.0'; 1659 1660 (0, _rjsConfigUtils.mergeInto)(versions, defaults); 1661 1662 /** 1663 * @type {function(pkg:string, path:string)} 1664 */ 1665 var _unpkg = _rjsConfigUtils.unpkgOrNode.bind(null, versions, local); 1666 /** 1667 * @type {function(pkg:string, min:string, debug:string)} 1668 */ 1669 var _unpkgObj = _rjsConfigUtils.unpkgOrNodeObj.bind(null, versions, local); 1670 /** 1671 * @type {function(pkg:string, version:string, min:string)} 1672 */ 1673 var _thirdParty = _rjsConfigUtils.vendorOrThirdParty.bind(null, scriptsLocation, local); 1674 /** 1675 * @type {function(pkg:string, version:string, min:string, debug:string)} 1676 */ 1677 var _thirdObj = _rjsConfigUtils.vendorOrThirdPartyObj.bind(null, scriptsLocation, local); 1678 1679 var promoteAnalyticsAdapterPath = local ? (0, _rjsConfigUtils.node)('promote-analytics-adapter', 'dist/statics/analytics-event-adapter.bundle.min') : (0, _joinURL2.default)(promoteAnalyticsAdapterUrl, 'analytics-event-adapter.bundle.min'); 1680 1681 var paths = { 1682 // -------------- RUNTIME -------------------------------------------------------------- 1683 wixImmutable: _unpkg('santa-core-utils', 'dist/wixImmutable'), 1684 lodash: _unpkg('lodash', 'lodash.min'), 1685 1686 vendor: _unpkgObj('santa-bundle', 'dist/bundle.min', 'dist/bundle'), 1687 1688 react: _unpkgObj('react', 'umd/react.production.min', 'umd/react.development'), 1689 reactDOM: _unpkgObj('react-dom', 'umd/react-dom.production.min', 'umd/react-dom.development'), 1690 reactDOMServer: _unpkgObj('react-dom', 'umd/react-dom-server.browser.production.min', 'umd/react-dom-server.browser.development'), 1691 reactTestUtils: _unpkg('react-dom', 'umd/react-dom-test-utils.development'), 1692 'prop-types': _unpkgObj('prop-types', 'prop-types.min', 'prop-types'), 1693 'create-react-class': _unpkgObj('create-react-class', 'create-react-class.min', 'create-react-class'), 1694 'react-dom-factories': _unpkg('react-dom-factories', 'index'), 1695 mobx: (0, _rjsConfigUtils.nodeObj)('mobx', 'lib/mobx.umd.min', 'lib/mobx.umd'), 1696 'mobx-react': _unpkgObj('mobx-react', 'index.min', 'index'), 1697 1698 zepto: _unpkgObj('zepto', 'dist/zepto.min', 'dist/zepto'), 1699 speakingurl: _thirdParty('speakingurl', '', 'speakingurl.min'), 1700 immutable: _thirdObj('immutable', '3.7.5', 'dist/immutable.min', 'dist/immutable'), 1701 TweenMax: _thirdObj('tweenmax', versions.tweenmax, 'minified/TweenMax.min', 'uncompressed/TweenMax'), //bundle 1702 TweenLite: _thirdObj('tweenmax', versions.tweenmax, 'minified/TweenMax.min', 'uncompressed/TweenMax'), 1703 TimelineMax: _thirdObj('tweenmax', versions.tweenmax, 'minified/TweenMax.min', 'uncompressed/TweenMax'), 1704 ScrollToPlugin: _thirdObj('tweenmax', versions.tweenmax, 'minified/plugins/ScrollToPlugin.min', 'uncompressed/plugins/ScrollToPlugin'), //bundle 1705 DrawSVGPlugin: _thirdObj('tweenmax', versions.tweenmax, 'minified/plugins/DrawSVGPlugin.min', 'uncompressed/plugins/DrawSVGPlugin'), 1706 MorphSVGPlugin: _thirdObj('tweenmax', versions.tweenmax, 'minified/plugins/MorphSVGPlugin.min', 'uncompressed/plugins/MorphSVGPlugin'), 1707 Draggable: _thirdObj('tweenmax', versions.tweenmax, 'minified/utils/Draggable.min', 'uncompressed/utils/Draggable'), 1708 color: _thirdParty('color-convert', '0.2.0', 'color.min'), 1709 'date-fns': _thirdObj('date-fns', 'v1.3.0', 'date_fns.min', 'date_fns'), 1710 ajv: _thirdObj('ajv', '4.8.1', 'ajv.min', 'ajv.bundle'), 1711 jsonpatch: 'js/vendor/json-patch/json-patch.umd', 1712 xss: _unpkg('xss', 'dist/xss.min'), //shim 1713 immutableDiff: 'js/vendor/immutablejsdiff.min', 1714 pmrpc: _unpkg('pm-rpc', 'build/pm-rpc.min'), 1715 'ag-grid': _thirdObj('ag-grid', '6.2.1', 'dist/ag-grid.min', 'dist/ag-grid'), 1716 1717 SoundManager: _thirdParty('soundmanager2', 'V2.97a.20150601', 'soundmanager2-nodebug-jsmin'), 1718 hammer: _unpkg('hammerjs', 'hammer.min'), 1719 mousetrap: _thirdParty('mousetrap', '1.4.6', 'mousetrap.min'), 1720 swfobject: _thirdParty('swfobject', '2.3.20130521', 'swfobject.min'), 1721 remoteDOM: _unpkg('@shimil/remote-dom', 'dist/local.min'), 1722 'fedops-logger': _unpkg('fedops-logger', 'dist/statics/fedops-logger-module.bundle.min'), 1723 1724 // ------------- internal ------------------------------------------------------------------- 1725 platformEvents: _unpkgObj('platform-editor-sdk', 'lib/platformEvents.min', 'lib/platformEvents'), 1726 platformUtils: _unpkg('santa-platform-utils', 'dist/platformUtils-bundle'), 1727 mobileCore: _unpkg('santa-mobile-core', 'dist/mobileCore'), 1728 'santa-components': _unpkgObj('santa-components', 'dist/santa-components.prod', 'dist/santa-components.devel'), 1729 'santa-components/popover': _unpkgObj('santa-components', 'dist/santa-component-popover.prod', 'dist/santa-component-popover.devel'), 1730 'santa-renderer': _unpkg('santa-renderer', 'dist/santa-renderer'), 1731 mobileLayoutUtils: _unpkg('santa-mobile-core', 'dist/mobileLayoutUtils'), 1732 'mesh-migrator': _unpkg('mesh-migrator', 'dist/mesh-migrator'), 1733 skinUtils: _unpkg('santa-skin-utils', 'dist/skin-utils'), 1734 coreUtilsLib: _unpkg('santa-core-utils', 'dist/coreUtils'), 1735 warmupUtilsLib: _unpkg('santa-core-utils', 'dist/warmupUtils'), 1736 imageClientLib: _unpkg('image-client-api', 'dist/imageClientApi'), 1737 wixDomSanitizer: _unpkg('wix-dom-sanitizer', 'dist/wix-dom-sanitizer'), 1738 'santa-data-fixer': _unpkg('santa-data-fixer', 'dist/santa-data-fixer'), 1739 'host-platform-api': _unpkg('santa-host-platform-services', 'dist/host-platform-api'), 1740 'host-worker-init': _unpkg('santa-host-platform-services', 'dist/host-worker-init'), 1741 wixFullstoryLoader: _unpkg('wix-fullstory-loader', 'dist/statics/app.bundle'), 1742 'data-capsule': _unpkg('data-capsule', 'dist/statics/frame-listener.bundle.min'), 1743 coreMultilingual: _unpkg('santa-multilingual', 'dist/languages'), 1744 'hls-light': _unpkg('hls.js', 'dist/hls.light.min'), //lazy 1745 hls: _unpkg('hls.js', 'dist/hls.min'), //lazy 1746 'promote-analytics-adapter': promoteAnalyticsAdapterPath, 1747 'js-platform-apps-configuration-editor': (0, _joinURL2.default)(platformAppConfigurationUrl, 'platform-apps-editor.min'), 1748 wixUiRichTextArea: _unpkg('wix-ui-santa', 'dist/statics/RichTextArea.bundle.min'), 1749 wixUiRichTextBox: _unpkg('wix-ui-santa', 'dist/statics/RichTextBox.bundle.min'), 1750 wixUiToggleSwitch: _unpkg('wix-ui-santa', 'dist/statics/ToggleSwitch.bundle.min'), 1751 wixUiTimePicker: _unpkg('wix-ui-santa', 'dist/statics/TimePicker.bundle.min'), 1752 wixUiVideoPlayer: _unpkg('wix-ui-santa', 'dist/statics/VideoPlayer.bundle.min'), 1753 wixUiPagination: _unpkg('wix-ui-santa', 'dist/statics/Pagination.bundle.min'), 1754 wixUiRating: _unpkg('wix-ui-santa', 'dist/statics/Rating.bundle.min'), 1755 wixUiSlider: _unpkg('wix-ui-santa', 'dist/statics/Slider.bundle.min'), 1756 wixUiTags: _unpkg('wix-ui-santa', 'dist/statics/Tags.bundle.min'), 1757 wixUiCompsToPackages: _unpkg('wix-ui-santa', 'dist/statics/compsToPackages.bundle.min'), 1758 'wix-ui-santa': _unpkg('wix-ui-santa', 'dist/statics'), 1759 // ------------- TESTING ------------------------------------------------------------------- 1760 fake: 'js/plugins/fake/src/main/fake', 1761 definition: 'js/plugins/definition/src/main/definition', 1762 ReactProxy: 'js/vendor/ReactProxy', 1763 Squire: 'js/vendor/squire/Squire', 1764 jasmine: _thirdParty('jasmine', '2.1.3', 'jasmine'), 1765 'jasmine-html': _thirdParty('jasmine', '2.1.3', 'jasmine-html'), 1766 'jasmine-boot': _thirdParty('jasmine', '2.1.3', 'jasmine-boot'), 1767 // ------------- DEVELOPMENT --------------------------------------------------------------- 1768 io: 'https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.0/socket.io.min', 1769 patcher: (0, _rjsConfigUtils.node)('santa-utils', 'common/hot/patcher'), 1770 hot: (0, _rjsConfigUtils.node)('santa-utils', 'common/hot/listener') 1771 }; 1772 1773 var appsPath = (0, _appsPath.nativeAppsPathBuilder)(appsConfig, scriptsLocation); 1774 (0, _rjsConfigUtils.mergeInto)(paths, appsPath); 1775 1776 if (platformSdkRoot) { 1777 paths.platformAPI = { min: (0, _joinURL2.default)(platformSdkRoot, 'lib', 'platform-api.min'), source: (0, _joinURL2.default)(platformSdkRoot, 'lib', 'platform-api') }; 1778 } 1779 1780 var wixCodePlatformBaseUrl = serviceTopology.scriptsLocationMap['wix-code-platform']; 1781 if (wixCodePlatformBaseUrl) { 1782 var getPathToWixCodePlatformFile = function getPathToWixCodePlatformFile(filename) { 1783 return local ? (0, _rjsConfigUtils.node)('wix-code-platform', 'dist/' + filename) : (0, _joinURL2.default)(wixCodePlatformBaseUrl, filename); 1784 }; 1785 paths['elementory-browser-support'] = getPathToWixCodePlatformFile('elementory-browser-support.min'); 1786 paths['wix-data-schemas-creator'] = { 1787 min: getPathToWixCodePlatformFile('wix-data-schemas-creator.min'), 1788 source: getPathToWixCodePlatformFile('wix-data-schemas-creator') 1789 }; 1790 } 1791 1792 return { 1793 //By default load any module IDs from js/lib 1794 baseUrl: '/', 1795 //except, if the module ID starts with "app", 1796 //load it from the js/app directory. paths 1797 //config is relative to the baseUrl, and 1798 //never includes a ".js" extension since 1799 //the paths config could be for a directory. 1800 paths: paths, 1801 bundles: { 1802 vendor: ['prop-types', 'create-react-class', 'mobx'] 1803 }, 1804 map: { 1805 'mobx-react': { 1806 'react-dom': 'reactDOM' 1807 }, 1808 reactTestUtils: { 1809 'react-dom': 'reactDOM' 1810 } 1811 }, 1812 shim: { 1813 color: { exports: 'Color' }, 1814 'jasmine-html': { 1815 deps: ['jasmine'] 1816 }, 1817 'jasmine-boot': { 1818 deps: ['jasmine', 'jasmine-html'] 1819 }, 1820 SoundManager: { exports: 'soundManager' }, 1821 ReactProxy: { 1822 deps: ['react'], 1823 exports: 'ReactProxy' 1824 }, 1825 jsonpatch: { exports: 'jsonpatch' }, 1826 xss: { exports: 'filterXSS' } 1827 }, 1828 waitSeconds: 0 1829 }; 1830} 1831 1832/***/ }), 1833
vendor: 22,512 bytes, lines 1834-2541
1834/***/ "./node_modules/santa-main-r/lib/lib/viewer/instruments.js": 1835/*!*****************************************************************!*\ 1836 !*** ./node_modules/santa-main-r/lib/lib/viewer/instruments.js ***! 1837 \*****************************************************************/ 1838/*! no static exports found */ 1839/***/ (function(module, exports, __webpack_require__) { 1840 1841"use strict"; 1842 1843 1844Object.defineProperty(exports, "__esModule", { 1845 value: true 1846}); 1847 1848exports.default = function (window, requirejs, isBot, isSuspectedBot, prefetch, experiment) { 1849 var TIMED_BEAT_DELAY = 500; 1850 1851 var _window$location = window.location, 1852 location = _window$location === undefined ? {} : _window$location, 1853 _window$performance = window.performance, 1854 performance = _window$performance === undefined ? {} : _window$performance, 1855 XMLHttpRequest = window.XMLHttpRequest; 1856 var _location$href = location.href, 1857 href = _location$href === undefined ? '' : _location$href; 1858 1859 1860 var VIEWER_BI = { 1861 ENDPOINT: 'ugc-viewer', 1862 SRC: 42 1863 }; 1864 var PERF_EVID = 351; 1865 var BOT_EVID = 361; 1866 var UNLOAD_EVID = 323; 1867 var KEEP_ALIVE = { 1868 EVID: 329, 1869 RATIO: 10, 1870 INTERVAL: 5 * 1000, 1871 LONG_LIMIT: 60, 1872 SHORT_LIMIT: 6 1873 }; 1874 1875 var delayedErrors = []; 1876 function sendErrorOrQueue() { 1877 var wixBiSession = window.wixBiSession; 1878 1879 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { 1880 args[_key] = arguments[_key]; 1881 } 1882 1883 if (wixBiSession && wixBiSession.sendError) { 1884 wixBiSession.sendError.apply(wixBiSession, args); 1885 } else { 1886 delayedErrors.push(args); 1887 } 1888 } 1889 1890 function instrument(serviceTopology, wixBiSession, queryUtil, siteModel, pageInfo, isPremium, isServerSide) { 1891 //eslint-disable-line 1892 wixBiSession.pn = 1; 1893 wixBiSession.initialTimestamp = wixBiSession.initialTimestamp || wixBiSession.mainLoaded; 1894 wixBiSession.random = Math.random(); 1895 1896 var sampleRatioState = queryUtil.getParameterByName('sampleratio'); 1897 var rendererModel = siteModel.rendererModel || window.rendererModel; 1898 var siteInfo = rendererModel.siteInfo; 1899 1900 var base = (serviceTopology.biServerUrl || 'http://frog.wix.com').replace(/\/$/, ''); 1901 1902 var recordEt = performance.mark ? function (et) { 1903 wixBiSession.et = et; 1904 switch (et) { 1905 case 4: 1906 performance.mark('main-r executed (beat 4)'); 1907 break; 1908 case 5: 1909 performance.mark('utils loaded (beat 5)'); 1910 break; 1911 default: 1912 performance.mark('beat ' + et); 1913 } 1914 } : function (et) { 1915 wixBiSession.et = et; 1916 }; 1917 wixBiSession.beat = recordEt; 1918 1919 var param = function param(name, value) { 1920 return name + '=' + value; 1921 }; 1922 var params = function params(pairs) { 1923 var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : param; 1924 return Object.keys(pairs).map(function (value) { 1925 return p(value, pairs[value]); 1926 }).join('&'); 1927 }; 1928 1929 var biBool = function biBool(bool) { 1930 return Number(Boolean(bool)); 1931 }; 1932 1933 function prepareMessage(evid, src, _ref) { 1934 var _ref$omit = _ref.omit, 1935 omit = _ref$omit === undefined ? {} : _ref$omit, 1936 map = _ref.map, 1937 _ref$pairs = _ref.pairs, 1938 pairs = _ref$pairs === undefined ? {} : _ref$pairs; 1939 1940 pairs.evid = evid; 1941 pairs.src = src; 1942 1943 if (!omit.pn) { 1944 pairs.pn = 1; 1945 } 1946 if (!omit.isp) { 1947 pairs.isp = biBool(isPremium); 1948 } 1949 if (!omit.url) { 1950 var url = href.replace(/^[^:]+:\/\/(www\.)?/i, ''); 1951 pairs.url = encodeURIComponent(url.substring(0, 256)); 1952 } 1953 1954 if (!omit.v) { 1955 pairs.v = siteModel.baseVersion || 'unknown'; 1956 } 1957 if (!omit.majorVer) { 1958 pairs.majorVer = window.clientSideRender ? 3 : 4; 1959 } 1960 if (!omit.ver && window.santaBase) { 1961 var sourceMatches = window.santaBase.match(/([\d\.]+)\/?$/); 1962 pairs.ver = sourceMatches && sourceMatches[1] || ''; 1963 } 1964 1965 if (!omit.dc && serviceTopology) { 1966 var serverName = serviceTopology.serverName; 1967 if (typeof serverName === 'string') { 1968 var parts = serverName.split('.'); 1969 if (parts.length > 1) { 1970 pairs.dc = parts[1]; 1971 } 1972 } 1973 } 1974 1975 if (siteInfo && siteInfo.siteId) { 1976 pairs.sid = siteInfo.siteId; 1977 } 1978 if (rendererModel.metaSiteId) { 1979 pairs.msid = rendererModel.metaSiteId; 1980 } 1981 1982 var siteHeader = siteModel.siteHeader || window.siteHeader; 1983 if (!omit.uuid && siteHeader && siteHeader.userId) { 1984 pairs.uuid = siteHeader.userId; 1985 } 1986 var publicModel = siteModel.publicModel; 1987 1988 if (!omit.tsp && publicModel && publicModel.timeSincePublish) { 1989 pairs.tsp = publicModel.timeSincePublish; 1990 } 1991 if (wixBiSession.viewerSessionId) { 1992 pairs.vsi = wixBiSession.viewerSessionId; 1993 } 1994 1995 if (!omit.ts && wixBiSession.initialTimestamp) { 1996 pairs.ts = Date.now() - wixBiSession.initialTimestamp; 1997 } 1998 1999 var _param = map ? function (name, value) { 2000 return param(map[name] || name, value); 2001 } : param; 2002 return params(pairs, _param); 2003 } 2004 2005 var navigator = window.navigator, 2006 Image = window.Image, 2007 document = window.document; 2008 2009 wixBiSession.sendBeacon = isBot && experiment.isOpen('ajaxForBI') ? function (url) { 2010 var r = new XMLHttpRequest(); 2011 r.open('GET', url, true); 2012 r.send(); 2013 } : function (url, useBeacon) { 2014 var sent = false; 2015 if (useBeacon && !isBot) { 2016 try { 2017 sent = navigator.sendBeacon(url); 2018 } catch (e) { 2019 /*Comment for Lint*/ 2020 } 2021 } 2022 if (!sent) { 2023 new Image().src = url; 2024 } 2025 }; 2026 2027 function sendBI(endpoint, evid, code) { 2028 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; 2029 2030 var src = base + '/' + endpoint + '?c=' + Date.now() + '&'; 2031 src += prepareMessage(evid, code, options); 2032 if (options.extra) { 2033 src += options.extra; 2034 } 2035 wixBiSession.sendBeacon(src, true); 2036 } 2037 2038 wixBiSession.sendBI = function (endpoint, evid, code, extra, sampleRatio) { 2039 if (!sampleRatio || Math.floor(wixBiSession.random * sampleRatio) === 0) { 2040 sendBI(endpoint, evid, code, { 2041 omit: { 2042 pn: true, 2043 isp: true, 2044 ts: true, 2045 url: true, 2046 v: true, 2047 ver: true 2048 }, 2049 map: { 2050 sid: 'did', 2051 dc: 'server', 2052 uuid: 'uid' 2053 }, 2054 pairs: extra 2055 }); 2056 } 2057 }; 2058 2059 var MAX_LIMIT = 4; 2060 2061 var sendError = function sendError(name, errc) { 2062 for (var _len2 = arguments.length, args = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { 2063 args[_key2 - 3] = arguments[_key2]; 2064 } 2065 2066 var sev = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 40; 2067 // eslint-disable-line func-style 2068 var visitor_id = wixBiSession.viewerSessionId; 2069 2070 var pairs = { 2071 errn: encodeURIComponent(name), 2072 errc: errc, 2073 sev: sev, 2074 errscp: 'core', 2075 cat: 2, 2076 iss: 1, 2077 et: wixBiSession.et, 2078 visitor_id: visitor_id 2079 }; 2080 2081 var total = 0; 2082 pairs = args.reduce(function (result, arg, index) { 2083 if (index < MAX_LIMIT) { 2084 if (total + arg.length > 1024) { 2085 arg = arg.substring(0, Math.max(1024 - total, 32)); 2086 } 2087 result['p' + (index + 1)] = encodeURIComponent(arg); 2088 total += result.length; 2089 } 2090 return result; 2091 }, pairs); 2092 2093 sendBI('trg', 10, 44, { 2094 omit: { 2095 pn: true, 2096 isp: true, 2097 tsp: true, 2098 v: true, 2099 url: true, 2100 uuid: true 2101 }, 2102 map: { 2103 sid: 'did', 2104 dc: 'server', 2105 ts: 'response_time' 2106 }, 2107 pairs: pairs 2108 }); 2109 }; 2110 2111 var prepareAndSendError = function prepareAndSendError(err, data) { 2112 var message = err.message, 2113 stack = err.stack, 2114 _err$requireModules = err.requireModules, 2115 requireModules = _err$requireModules === undefined ? [] : _err$requireModules, 2116 requireType = err.requireType; 2117 var errn = data.errn, 2118 errc = data.errc, 2119 severity = data.severity; 2120 2121 var modules = requireModules && requireModules.join ? requireModules.join(';') : ''; 2122 var what = stack ? '' + stack : message; 2123 sendError(errn, errc, severity, what, modules, href, requireType); // REQUIREJS_ERROR from packages/core/src/main/bi/errors.js 2124 }; 2125 2126 wixBiSession.sendError = function (err) { 2127 for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { 2128 args[_key3 - 1] = arguments[_key3]; 2129 } 2130 2131 return sendError.apply(undefined, [err.errorName, err.errorCode, err.severity].concat(args)); 2132 }; 2133 2134 delayedErrors.forEach(function (delayedError) { 2135 return wixBiSession.sendError.apply(wixBiSession, _toConsumableArray(delayedError)); 2136 }); 2137 delayedErrors = null; 2138 2139 // Grow performance resource buffer as required 2140 var isDebug = queryUtil.getParameterByName('debug'); 2141 if (performance.setResourceTimingBufferSize) { 2142 if ('onresourcetimingbufferfull' in performance) { 2143 performance.onresourcetimingbufferfull = function () { 2144 var maxSize = 150; 2145 return function () { 2146 maxSize *= 2; 2147 performance.setResourceTimingBufferSize(maxSize); 2148 }; 2149 }(); 2150 } else { 2151 performance.setResourceTimingBufferSize(isDebug ? 1000 : 300); 2152 } 2153 } 2154 2155 var newrelic = window.newrelic; 2156 if (newrelic) { 2157 var shortUrl = href.replace(/^[^/]*\/\//, ''); 2158 if (newrelic.setPageViewName) { 2159 newrelic.setPageViewName(shortUrl); 2160 } 2161 if (newrelic.setCustomAttribute) { 2162 newrelic.setCustomAttribute('url', shortUrl); 2163 if (siteInfo && siteInfo.siteId) { 2164 newrelic.setCustomAttribute('sid', siteInfo.siteId); 2165 } 2166 if (rendererModel.metaSiteId) { 2167 newrelic.setCustomAttribute('msid', rendererModel.metaSiteId); 2168 } 2169 2170 if (experiment) { 2171 var runningExperiments = experiment.getRunningExperiments(); 2172 if (runningExperiments) { 2173 var experiments = Object.keys(runningExperiments).filter(experiment.isMultiValueExperimentOpen).map(function (name) { 2174 var value = runningExperiments[name]; 2175 return value !== 'new' ? name + '=' + value : name; 2176 }).join(']['); 2177 if (experiments) { 2178 newrelic.setCustomAttribute('experiments', '[' + experiments + ']'); 2179 } 2180 } 2181 } 2182 2183 newrelic.setCustomAttribute('preview', biBool(rendererModel.previewMode)); 2184 newrelic.setCustomAttribute('isPremium', isPremium); 2185 var siteHeader = siteModel.siteHeader || window.siteHeader; 2186 if (siteHeader && siteHeader.userId) { 2187 newrelic.setCustomAttribute('uuid', siteHeader.userId); 2188 } 2189 var publicModel = siteModel.publicModel; 2190 if (publicModel && publicModel.timeSincePublish) { 2191 newrelic.setCustomAttribute('timeSincePublish', publicModel.timeSincePublish); 2192 } 2193 if (wixBiSession.viewerSessionId) { 2194 newrelic.setCustomAttribute('vsi', wixBiSession.viewerSessionId); 2195 } 2196 newrelic.setCustomAttribute('debug', biBool(isDebug)); 2197 } 2198 } 2199 2200 if (prefetch) { 2201 wixBiSession.sendBI(VIEWER_BI.ENDPOINT, 384, VIEWER_BI.SRC); 2202 return; 2203 } 2204 2205 if (!wixBiSession.viewerSessionId || rendererModel.previewMode || queryUtil.isParameterTrue('suppressbi')) { 2206 return; 2207 } 2208 2209 if (siteInfo.documentType !== 'Template') { 2210 (function validityBI() { 2211 var isTop = void 0; 2212 try { 2213 isTop = window.self === window.top; 2214 } catch (e) { 2215 isTop = false; 2216 } 2217 if (!isTop || isBot || isSuspectedBot) { 2218 wixBiSession.sendBI(VIEWER_BI.ENDPOINT, BOT_EVID, VIEWER_BI.SRC, { 2219 top: biBool(isTop), 2220 bot: biBool(isBot), 2221 sbot: biBool(isSuspectedBot) 2222 }); 2223 } 2224 })(); 2225 } 2226 2227 if (!window.clientSideRender) { 2228 var getTS = function getTS() { 2229 return (performance && performance.timing && performance.timing.domContentLoadedEventStart) - wixBiSession.initialTimestamp; 2230 }; //eslint-disable-line 2231 var send = function send() { 2232 return wixBiSession.sendBI(VIEWER_BI.ENDPOINT, 380, VIEWER_BI.SRC, { phase_name: 'did_load_dom_content', status: 1, ts: getTS(), isBot: !!rendererModel.seo }); 2233 }; 2234 2235 if (document.readyState === 'complete') { 2236 send(); 2237 } else { 2238 document.onreadystatechange = function () { 2239 if (document.readyState === 'complete') { 2240 send(); 2241 } 2242 }; 2243 } 2244 } 2245 2246 (function performanceBI() { 2247 var pairs = {}; 2248 var navigation = performance.navigation, 2249 timing = performance.timing; 2250 2251 if (timing) { 2252 var domainLookupStart = timing.domainLookupStart, 2253 domainLookupEnd = timing.domainLookupEnd, 2254 redirectStart = timing.redirectStart, 2255 redirectEnd = timing.redirectEnd, 2256 connectStart = timing.connectStart, 2257 connectEnd = timing.connectEnd, 2258 secureConnectionStart = timing.secureConnectionStart, 2259 requestStart = timing.requestStart, 2260 responseStart = timing.responseStart, 2261 responseEnd = timing.responseEnd; 2262 2263 var dnsTime = domainLookupEnd - domainLookupStart; 2264 if (dnsTime >= 0) { 2265 pairs.dns_time = dnsTime; 2266 } 2267 var redirectTime = redirectEnd - redirectStart; 2268 if (redirectTime >= 0) { 2269 pairs.redirect_time = redirectTime; 2270 } 2271 var connectTime = connectEnd - connectStart; 2272 if (connectTime >= 0) { 2273 pairs.connect_time = connectTime; 2274 } 2275 if (secureConnectionStart > 0) { 2276 var sslTime = connectEnd - secureConnectionStart; 2277 pairs.ssl_time = sslTime; 2278 } 2279 var ttfbTime = responseStart - requestStart; 2280 if (ttfbTime >= 0) { 2281 pairs.ttfb_time = ttfbTime; 2282 } 2283 var responseTime = responseEnd - responseStart; 2284 if (responseTime >= 0) { 2285 pairs.response_time = responseTime; 2286 } 2287 var loadTime = timing.navigationStart || timing.fetchStart || domainLookupStart || connectStart; 2288 loadTime = wixBiSession.initialTimestamp - loadTime; 2289 if (loadTime >= 0) { 2290 pairs.load_time = loadTime; 2291 } 2292 if (pageInfo) { 2293 pairs.page_id = pageInfo.pageId; 2294 } 2295 pairs.is_ssl = biBool(location.protocol === 'https:'); 2296 } 2297 if (navigation) { 2298 var redirectCount = navigation.redirectCount, 2299 type = navigation.type; 2300 2301 if (type >= 0) { 2302 pairs.navigation_type = type; 2303 } 2304 if (redirectCount >= 0) { 2305 pairs.redirect_count = redirectCount; 2306 } 2307 } 2308 if (performance.getEntriesByType) { 2309 var navigationEntry = performance.getEntriesByType('navigation')[0]; 2310 if (navigationEntry) { 2311 pairs.transferSize = navigationEntry.transferSize; 2312 pairs.decodedBodySize = navigationEntry.decodedBodySize; 2313 } 2314 } 2315 2316 pairs.is_premium = biBool(isPremium); 2317 pairs.is_wixsite = biBool(siteInfo.documentType === 'WixSite'); 2318 pairs.is_ssr = biBool(!window.clientSideRender); 2319 2320 wixBiSession.sendBI(VIEWER_BI.ENDPOINT, PERF_EVID, VIEWER_BI.SRC, pairs); 2321 })(); 2322 2323 if (isDebug && sampleRatioState !== 'force') { 2324 return; 2325 } 2326 2327 if (!wixBiSession.hasOwnProperty('coin')) { 2328 wixBiSession.coin = parseInt(wixBiSession.viewerSessionId, 16); 2329 } 2330 2331 function genPayload() { 2332 var et = wixBiSession.et, 2333 initialTimestamp = wixBiSession.initialTimestamp, 2334 pn = wixBiSession.pn; 2335 2336 var payload = { 2337 isp: biBool(isPremium), 2338 iss: biBool(isServerSide), 2339 pn: pn 2340 }; 2341 if (et) { 2342 payload.lbt = et; 2343 } 2344 if (initialTimestamp) { 2345 payload.ts = Date.now() - initialTimestamp; 2346 } 2347 if (performance.now) { 2348 payload.tts = Math.round(performance.now()); 2349 } 2350 return payload; 2351 } 2352 2353 if (experiment.isOpen('unloadBI')) { 2354 window.addEventListener('unload', function () { 2355 var payload = genPayload(); 2356 if (performance.getEntriesByType) { 2357 var marks = performance.getEntriesByType('mark'); 2358 var length = marks.length; 2359 2360 if (length > 0) { 2361 payload.mark = marks[length - 1].name; 2362 } 2363 } 2364 wixBiSession.sendBI(VIEWER_BI.ENDPOINT, UNLOAD_EVID, VIEWER_BI.SRC, payload); 2365 }, false); 2366 } 2367 2368 var keepAliveRatio = queryUtil.getParameterByName('sampleratio') === 'none' ? 1 : KEEP_ALIVE.RATIO; 2369 if (experiment.isOpen('sv_keepAlive') && wixBiSession.coin % keepAliveRatio === 0) { 2370 var keepAliveLimit = KEEP_ALIVE.LONG_LIMIT; 2371 var did_finish = false; 2372 var counter = 0; 2373 var reportAliveInterval = setInterval(function () { 2374 if ((wixBiSession.pn > 1 || wixBiSession.et === 3) && !did_finish) { 2375 did_finish = true; 2376 keepAliveLimit = Math.min(counter + KEEP_ALIVE.SHORT_LIMIT, KEEP_ALIVE.LONG_LIMIT); 2377 } 2378 if (++counter > keepAliveLimit) { 2379 clearInterval(reportAliveInterval); 2380 return; 2381 } 2382 var payload = genPayload(); 2383 payload.counter = counter; 2384 payload.did_finish = did_finish; 2385 wixBiSession.sendBI(VIEWER_BI.ENDPOINT, KEEP_ALIVE.EVID, VIEWER_BI.SRC, payload); 2386 }, KEEP_ALIVE.INTERVAL); 2387 } 2388 2389 var siteType = function () { 2390 var BEAT_SITE_TYPES = ['No Site Type', 'WixSite', 'UGC', 'Template']; 2391 var documentType = siteInfo.documentType; 2392 var st = BEAT_SITE_TYPES.indexOf(documentType); 2393 return st !== -1 ? st : documentType; 2394 }(); 2395 2396 var alwaysVisible = document.hidden !== true; 2397 //eslint-disable-next-line no-extra-parens 2398 wixBiSession.checkVisibility = function () { 2399 return alwaysVisible = alwaysVisible && document.hidden !== true; 2400 }; 2401 document.addEventListener('visibilitychange', wixBiSession.checkVisibility, false); 2402 2403 wixBiSession.maybeBot = isBot || isSuspectedBot; 2404 wixBiSession.beat = function (et) { 2405 var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, 2406 _ref2$record = _ref2.record, 2407 record = _ref2$record === undefined ? true : _ref2$record; 2408 2409 if (record) { 2410 recordEt(et); 2411 } 2412 var pairs = { 2413 isjp: biBool(wixBiSession.maybeBot), 2414 et: et, 2415 st: siteType, 2416 ita: biBool(wixBiSession.checkVisibility()) 2417 }; 2418 if (performance.now) { 2419 pairs.tts = Math.round(performance.now()); 2420 } 2421 sendBI('bt', 3, 29, { 2422 omit: { 2423 majorVer: true, 2424 tsp: true, 2425 ver: true 2426 }, 2427 pairs: pairs 2428 }); 2429 }; 2430 2431 var ignoreURLs = [/^chrome(\-extension)?\:/, /^file\:/, /^resource\:/, /\.net\//, /\.info\//, /\.ru\//, /google/, /facebook/, /dropbox/, /ad\-score/, /drivemac/, /shopping/, /datafast/, /shopcomp/, /vimeo/, /olark/]; 2432 function ignoreError(where) { 2433 where = where.trim(); 2434 if (!where) { 2435 return true; 2436 } 2437 for (var i = 0; i < ignoreURLs.length; ++i) { 2438 if (ignoreURLs[i].test(where)) { 2439 return true; 2440 } 2441 } 2442 return false; 2443 } 2444 2445 if (!isSuspectedBot) { 2446 var firstTime = true; 2447 2448 var onerror = window.onerror; 2449 2450 window.onerror = function (errorMsg, url, line, column, err) { 2451 if (firstTime) { 2452 firstTime = false; 2453 var where = err && err.stack ? '' + err.stack : url; 2454 if (!ignoreError(where)) { 2455 sendError('JAVASCRIPT_ERROR', 111022, 40, errorMsg, where, href); // JAVASCRIPT_ERROR from packages/core/src/main/bi/errors.js 2456 } 2457 } 2458 if (onerror) { 2459 return onerror.apply(this, arguments); 2460 } 2461 }; 2462 2463 if (window.console) { 2464 var _console = console, 2465 error = _console.error; 2466 2467 if (error) { 2468 console.error = function () { 2469 var stack = void 0; 2470 try { 2471 throw new Error('get stack'); 2472 } catch (e) { 2473 stack = e.stack; 2474 } 2475 2476 for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { 2477 args[_key4] = arguments[_key4]; 2478 } 2479 2480 sendError.apply(undefined, ['CONSOLE_ERROR', 111023, 30, stack, href].concat(args)); // CONSOLE_ERROR from packages/core/src/main/bi/errors.js 2481 error.apply(this, args); 2482 console.error = error; 2483 }; 2484 } 2485 } 2486 2487 requirejs.onError = function (err) { 2488 if (!firstTime) { 2489 return; 2490 } 2491 firstTime = false; 2492 2493 if (experiment.isOpen('sv_requireSplitError')) { 2494 if (err.requireType !== 'define') { 2495 prepareAndSendError(err, { 2496 errc: 111027, 2497 errn: 'REQUIREJS_FILE_DOWNLOAD_ERROR', 2498 severity: 40 2499 }); 2500 } else { 2501 prepareAndSendError(err, { 2502 errc: 111028, 2503 errn: 'REQUIREJS_SCRIPT_ERROR', 2504 severity: 40 2505 }); 2506 } 2507 } 2508 prepareAndSendError(err, { 2509 errc: 111024, 2510 errn: 'REQUIREJS_ERROR', 2511 severity: 40 2512 }); 2513 }; 2514 } 2515 2516 if (experiment.isOpen('timedBeat')) { 2517 var noRecord = { 2518 record: false 2519 }; 2520 setTimeout(function () { 2521 wixBiSession.beat(9, noRecord); 2522 setTimeout(function () { 2523 wixBiSession.beat(10, noRecord); 2524 setTimeout(function () { 2525 wixBiSession.beat(11, noRecord); 2526 }, TIMED_BEAT_DELAY); 2527 }, TIMED_BEAT_DELAY); 2528 }, TIMED_BEAT_DELAY); 2529 } 2530 } 2531 2532 return { 2533 sendErrorOrQueue: sendErrorOrQueue, 2534 instrument: instrument 2535 }; 2536}; 2537 2538function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } 2539 2540/***/ }), 2541
vendor: 1,741 bytes, lines 2542-2591
2542/***/ "./node_modules/santa-main-r/lib/lib/viewer/miniPackages.js": 2543/*!******************************************************************!*\ 2544 !*** ./node_modules/santa-main-r/lib/lib/viewer/miniPackages.js ***! 2545 \******************************************************************/ 2546/*! no static exports found */ 2547/***/ (function(module, exports, __webpack_require__) { 2548 2549"use strict"; 2550 2551 2552Object.defineProperty(exports, "__esModule", { 2553 value: true 2554}); 2555exports.default = miniPackages; 2556function miniPackages(window, requirejs, isServerSide) { 2557 var _window$location = window.location; 2558 _window$location = _window$location === undefined ? {} : _window$location; 2559 var hostname = _window$location.hostname; 2560 2561 // Prefetch font CSS files 2562 // By marking them as media="none" their download is made non-blocking 2563 // (At least for WebKit / Blink browsers) 2564 // (WixThemeReact may remove this attribute) 2565 2566 if (!isServerSide && hostname !== 'localhost') { 2567 requirejs(['lodash', 'utils'], function (_, utils) { 2568 function enableLink() { 2569 this.removeAttribute('media'); 2570 } 2571 2572 var document = window.document, 2573 documentType = window.rendererModel.siteInfo.documentType, 2574 serviceTopology = window.serviceTopology; 2575 2576 var cssUrls = utils.fonts.fontUtils.getCssUrls(documentType, serviceTopology); 2577 _.forEach(cssUrls, function (url, id) { 2578 var link = document.createElement('link'); 2579 link.setAttribute('rel', 'stylesheet'); 2580 link.setAttribute('href', url); 2581 link.setAttribute('media', 'none'); 2582 link.setAttribute('id', 'font_' + id); 2583 link.addEventListener('load', enableLink, false); 2584 document.head.appendChild(link); 2585 }); 2586 }); 2587 } 2588} 2589 2590/***/ }), 2591
vendor: 3,017 bytes, lines 2592-2620
2592/***/ "./node_modules/santa-main-r/lib/lib/viewer/mobile.js": 2593/*!************************************************************!*\ 2594 !*** ./node_modules/santa-main-r/lib/lib/viewer/mobile.js ***! 2595 \************************************************************/ 2596/*! no static exports found */ 2597/***/ (function(module, exports, __webpack_require__) { 2598 2599"use strict"; 2600 2601 2602Object.defineProperty(exports, "__esModule", { 2603 value: true 2604}); 2605function isMobileDevice(window) { 2606 var userAgent = window.navigator.userAgent || window.navigator.vendor || window.opera; 2607 var patternByDevice = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i; 2608 var patternByModel = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i; // eslint-disable-line max-len 2609 return patternByDevice.test(userAgent) || patternByModel.test(userAgent.substr(0, 4)); 2610} 2611 2612function isMobileView(window, siteModel, queryUtil) { 2613 return queryUtil.isParameterTrue('showmobileview') || // eslint-disable-line no-extra-parens 2614 isMobileDevice(window) && siteModel.rendererModel.siteMetaData && siteModel.rendererModel.siteMetaData.adaptiveMobileOn; 2615} 2616 2617exports.default = { isMobileDevice: isMobileDevice, isMobileView: isMobileView }; 2618 2619/***/ }), 2620
vendor: 21,785 bytes, lines 2621-3170
2621/***/ "./node_modules/santa-main-r/lib/lib/viewer/render.js": 2622/*!************************************************************!*\ 2623 !*** ./node_modules/santa-main-r/lib/lib/viewer/render.js ***! 2624 \************************************************************/ 2625/*! no static exports found */ 2626/***/ (function(module, exports, __webpack_require__) { 2627 2628"use strict"; 2629 2630 2631Object.defineProperty(exports, "__esModule", { 2632 value: true 2633}); 2634 2635exports.default = function (window, requirejs, prefetch, isBot, experiment) { 2636 var _window$performance = window.performance, 2637 performance = _window$performance === undefined ? {} : _window$performance; 2638 2639 if (!performance.measure) { 2640 performance = { 2641 mark: function mark() {}, 2642 measure: function measure() {} 2643 }; 2644 } 2645 2646 if (prefetch && window.define) { 2647 var dummy = function dummy() { 2648 return {}; 2649 }; 2650 var define = window.define; 2651 window.define = function () { 2652 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { 2653 args[_key] = arguments[_key]; 2654 } 2655 2656 for (var i = 0; i < args.length; ++i) { 2657 if (typeof args[i] === 'function') { 2658 args[i] = dummy; 2659 } 2660 } 2661 return define.apply(this, args); 2662 }; 2663 window.define.amd = define.amd; 2664 var rjs = requirejs; 2665 window.requirejs = requirejs = function requirejs(dependencies) { 2666 return rjs.call(this, dependencies, dummy); 2667 }; 2668 } 2669 2670 function notifyParent(msg) { 2671 try { 2672 window.parent.postMessage(msg, '*'); 2673 } catch (e) { 2674 //ignore 2675 } 2676 } 2677 2678 notifyParent('santaStart'); 2679 2680 function render(_ref) { 2681 var isServerSide = _ref.isServerSide, 2682 isPreview = _ref.isPreview, 2683 isExternalPreview = _ref.isExternalPreview, 2684 _ref$prefetcher = _ref.prefetcher, 2685 contentCache = _ref$prefetcher.contentCache, 2686 setContext = _ref$prefetcher.setContext, 2687 queryUtil = _ref.queryUtil, 2688 siteModel = _ref.siteModel, 2689 wixBiSession = _ref.wixBiSession, 2690 mobileView = _ref.mobileView, 2691 config = _ref.config; 2692 2693 var useDS = queryUtil.isParameterTrue('ds'); 2694 var isQaAutomation = queryUtil.isParameterTrue('isqa'); 2695 var isTpaIntegration = queryUtil.isParameterTrue('isTpaIntegration'); 2696 var isWixCodeIntegration = queryUtil.isParameterTrue('isWixCodeIntegration'); 2697 var isViewerIntegration = queryUtil.isParameterTrue('isViewerIntegration'); 2698 siteModel.requestModel = { 2699 userAgent: window.navigator.userAgent, 2700 cookie: window.document.cookie 2701 2702 //eslint-disable-next-line no-extra-parens 2703 };var hasProtectedPages = function (_ref2) { 2704 var _ref2$rendererModel$p = _ref2.rendererModel.passwordProtectedPages, 2705 passwordProtectedPages = _ref2$rendererModel$p === undefined ? [] : _ref2$rendererModel$p, 2706 _ref2$publicModel = _ref2.publicModel; 2707 _ref2$publicModel = _ref2$publicModel === undefined ? {} : _ref2$publicModel; 2708 var _ref2$publicModel$pag = _ref2$publicModel.pageList; 2709 _ref2$publicModel$pag = _ref2$publicModel$pag === undefined ? {} : _ref2$publicModel$pag; 2710 var _ref2$publicModel$pag2 = _ref2$publicModel$pag.pages, 2711 pages = _ref2$publicModel$pag2 === undefined ? [] : _ref2$publicModel$pag2; 2712 return passwordProtectedPages.length || pages.some(function (page) { 2713 return !page.pageJsonFileName; 2714 }); 2715 }(siteModel); 2716 2717 function addConditionalDependencies(pkgs) { 2718 var map = siteModel.rendererModel.clientSpecMap; 2719 var mapKeys = Object.keys(map); 2720 var shouldLoadPackageFor = function shouldLoadPackageFor(applicationType) { 2721 return mapKeys.some(function (applicationId) { 2722 return map[applicationId].type === applicationType; 2723 }); 2724 }; 2725 2726 function insert(p, marker) { 2727 var pos = p.indexOf(marker); 2728 2729 for (var _len2 = arguments.length, extra = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { 2730 extra[_key2 - 2] = arguments[_key2]; 2731 } 2732 2733 if (pos !== -1) { 2734 p.splice.apply(p, [pos, 0].concat(extra)); 2735 } else { 2736 p.push.apply(p, extra); 2737 } 2738 } 2739 2740 // We check that we have wixCodeModel, because if a site is published without Wix Code, 2741 // And then Wix Code is added and the site is saved, the metasite is "copied" to the 2742 // published site as well, showing as if there's Wix Code in the published site, although 2743 // there isn't 2744 var isWixCloud = function isWixCloud() { 2745 return shouldLoadPackageFor('siteextension') && !!siteModel.rendererModel.wixCodeModel; 2746 }; 2747 2748 function shouldLoadPackageForEComMigratedSite() { 2749 var _siteModel$publicMode = siteModel.publicModel; 2750 _siteModel$publicMode = _siteModel$publicMode === undefined ? {} : _siteModel$publicMode; 2751 var _siteModel$publicMode2 = _siteModel$publicMode.metaSiteFlags, 2752 metaSiteFlags = _siteModel$publicMode2 === undefined ? '' : _siteModel$publicMode2; 2753 2754 return metaSiteFlags.indexOf('EComMigrated') >= 0; 2755 } 2756 2757 function isQuickActionEnabled(quickActionName) { 2758 var _siteModel$rendererMo = siteModel.rendererModel.siteMetaData; 2759 _siteModel$rendererMo = _siteModel$rendererMo === undefined ? {} : _siteModel$rendererMo; 2760 var _siteModel$rendererMo2 = _siteModel$rendererMo.quickActions; 2761 _siteModel$rendererMo2 = _siteModel$rendererMo2 === undefined ? {} : _siteModel$rendererMo2; 2762 var _siteModel$rendererMo3 = _siteModel$rendererMo2.configuration, 2763 configuration = _siteModel$rendererMo3 === undefined ? {} : _siteModel$rendererMo3; 2764 2765 return !!configuration[quickActionName]; 2766 } 2767 2768 var wixappsComps = ['container', 'textArea', 'matrixGallery', 'slideShowGallery', 'comboBoxInput', 'dialogs']; 2769 2770 if (!experiment.isOpen('selectiveWixapps')) { 2771 if (isPreview || shouldLoadPackageFor('wixapps') || shouldLoadPackageFor('ecommerce') || shouldLoadPackageForEComMigratedSite()) { 2772 insert.apply(undefined, [pkgs, 'tpa', 'wixappsCore', 'wixappsClassics'].concat(wixappsComps, ['table', 'messageView'])); 2773 } 2774 if (isPreview || shouldLoadPackageFor('appbuilder')) { 2775 insert.apply(undefined, [pkgs, 'tpa', 'wixappsCore', 'wixappsBuilder'].concat(wixappsComps)); 2776 } 2777 } 2778 2779 if (useDS || isPreview) { 2780 pkgs.push('documentServices', 'documentServicesSchemas'); 2781 } 2782 if (isPreview) { 2783 pkgs.push('immutable'); 2784 } 2785 2786 if (isWixCloud() || isPreview) { 2787 pkgs.push('wixCode'); 2788 } 2789 2790 if (!experiment.isOpen('selectiveDialogs') || hasProtectedPages) { 2791 pkgs.push('dialogs', 'linkBar', 'loginSocialBar', 'controller'); 2792 if (isServerSide) { 2793 pkgs.push('backToTopButton'); 2794 } 2795 } 2796 2797 if (mobileView) { 2798 pkgs.push('tinyMenu', 'loginSocialBar', 'icon', 'svgShape', 'quickActionBar'); 2799 if (isQuickActionEnabled('quickActionsMenuEnabled')) { 2800 pkgs.push('mobileActionsMenu'); 2801 } 2802 } 2803 2804 if (isPreview || siteModel.rendererModel.siteInfo.documentType === 'Template') { 2805 pkgs.push('translationsUtils'); 2806 } 2807 2808 return pkgs; 2809 } 2810 2811 var handleRequireError = prefetch ? function () {} : function (pkgs) { 2812 return function (err) { 2813 if (err.requireType === 'define') { 2814 requirejs.onError(err); 2815 return; 2816 } 2817 if (!config.urlArgs) { 2818 if (err.requireModules) { 2819 err.requireModules.forEach(function (module) { 2820 requirejs.undef(module); 2821 }); 2822 } 2823 config.urlArgs = 'c=' + Date.now(); 2824 requirejs.config(config); 2825 var errClone = Object.keys(err).reduce(function (r, k) { 2826 r[k] = err[k]; 2827 return r; 2828 }, {}); 2829 errClone.message = err.message; 2830 errClone.stack = err.stack ? '' + err.stack : ''; //eslint-disable-line prefer-template 2831 requirejs(pkgs, function () { 2832 errClone.errn = 'REQUIREJS_RETRY_ERROR'; 2833 errClone.errc = 111025; 2834 errClone.severity = 10; 2835 requirejs.onError(errClone); 2836 }, requirejs.onError); 2837 } 2838 }; 2839 }; 2840 2841 var buildFunctionParametersObject = function buildFunctionParametersObject(pkgs, args) { 2842 return pkgs.reduce(function (result, pkg, index) { 2843 result[pkg] = args[index]; 2844 return result; 2845 }, {}); 2846 }; 2847 2848 var loadRequirements = function loadRequirements(pkgs, cb) { 2849 var loaded = cb ? function () { 2850 for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { 2851 args[_key3] = arguments[_key3]; 2852 } 2853 2854 var p = buildFunctionParametersObject(pkgs, args); 2855 cb(p); 2856 } : function () {}; 2857 2858 if (queryUtil.getParameterByName('debug')) { 2859 requirejs(pkgs, loaded); 2860 } else { 2861 requirejs(pkgs, loaded, handleRequireError(pkgs)); 2862 } 2863 }; 2864 2865 var load = function load(pkgs, cb) { 2866 wixBiSession.packagesLoaded = Date.now(); 2867 2868 /* 2869 * Require all needed packages (static + conditional) 2870 * Then do initial site render (or re-layout if it was rendered by the server) 2871 */ 2872 function getAjaxHandler($, cookieUtils) { 2873 var ignore = {}; 2874 2875 var canUseCache = function canUseCache(_ref3) { 2876 var url = _ref3.url, 2877 type = _ref3.type; 2878 return !ignore[url] && (!type || type.toUpperCase() === 'GET'); 2879 }; 2880 2881 function addXSRFHeader(options) { 2882 var XSRFToken = cookieUtils.getCookie('XSRF-TOKEN'); 2883 if (XSRFToken) { 2884 options.headers = options.headers || {}; 2885 options.headers['X-XSRF-TOKEN'] = XSRFToken; 2886 } 2887 } 2888 2889 function getHostname(url) { 2890 return url.match(/:\/\//) !== undefined ? url.split('/')[2] : url.split('/')[0]; 2891 } 2892 2893 return function (options) { 2894 if (options.cache !== false && canUseCache(options) && contentCache(options)) { 2895 return; 2896 } 2897 ignore[options.url] = true; 2898 2899 if (options.type === 'POST' && getHostname(options.url) === 'editor.wix.com' && experiment.isOpen('xsrfHeaderOnPostRequests')) { 2900 addXSRFHeader(options); 2901 } 2902 $.ajax.apply($, arguments); 2903 }; 2904 } 2905 2906 loadRequirements([].concat(_toConsumableArray(pkgs), ['warmupUtils', 'zepto']), function (p) { 2907 var ajaxHandler = getAjaxHandler(p.zepto, p.warmupUtils.cookieUtils); 2908 p.warmupUtils.ajaxLibrary.register(ajaxHandler); 2909 2910 if (siteModel.wixData) { 2911 var siteStructureNode = window.document.getElementById('masterPage') || window.document.getElementById('SITE_STRUCTURE'); 2912 siteModel.wixHtmlRaw = siteStructureNode.outerHTML; 2913 siteModel.wixAnchors = window.anchors || {}; 2914 siteStructureNode.parentNode.removeChild(siteStructureNode); 2915 } 2916 2917 siteModel.requestModel.storage = p.warmupUtils.storage(window); 2918 2919 siteModel.currentUrl = p.warmupUtils.urlUtils.parseUrl(window.serverSideUrl || window.location.href); 2920 siteModel.forceMobileView = window.forceMobileView; 2921 2922 cb(p, ajaxHandler); 2923 }); 2924 }; 2925 2926 var loadWithIntegrationPackages = function loadWithIntegrationPackages(_, pkgs, cb) { 2927 var addIntegrationPackages = function addIntegrationPackages(packages) { 2928 if (isQaAutomation) { 2929 packages.push('qaAutomation'); 2930 } 2931 if (isTpaIntegration) { 2932 packages.push('tpaIntegration', 'jasmine', 'jasmine-html'); 2933 } 2934 if (isWixCodeIntegration) { 2935 packages.push('wixCodeIntegration', 'jasmine', 'jasmine-html', 'wixCode'); 2936 } 2937 if (isViewerIntegration) { 2938 packages.push('viewerIntegration', 'jasmine', 'jasmine-html'); 2939 } 2940 return _.uniq(packages); 2941 }; 2942 2943 var initIntegrationPackages = function initIntegrationPackages(p) { 2944 var tpaIntegration = p.tpaIntegration, 2945 wixCodeIntegration = p.wixCodeIntegration, 2946 viewerIntegration = p.viewerIntegration; 2947 2948 if (tpaIntegration) { 2949 tpaIntegration.init(window, p.core); 2950 } 2951 if (wixCodeIntegration) { 2952 wixCodeIntegration.init(window, p.core, p.wixCode, p['host-platform-api'], p.utils, p.tpa); 2953 } 2954 if (viewerIntegration) { 2955 viewerIntegration.init(window, p.core, p.utils); 2956 } 2957 }; 2958 2959 loadRequirements(addIntegrationPackages(pkgs), function (p) { 2960 initIntegrationPackages(p); 2961 cb(p); 2962 }); 2963 }; 2964 2965 function getClientSidePackages() { 2966 var clientSidePackages = ['animations', 'backgroundCommon', 'buttonCommon', 'color', 'compDesignUtils', 'components', 'compUtils', 'containerCommon', 'core', 'coreMultilingual', 'coreUtils', 'coreUtilsLib', 'create-react-class', 'data-capsule', 'dataFixer', 'displayer', 'fedops-logger', 'formCommon', 'galleriesCommon', 'host-platform-api', 'imageClientLib', 'imageZoom', 'layout', 'mobileLayoutUtils', 'mobileLayoutUtils', 'mobx', 'mobx-react', 'platformUtils', 'pmrpc', 'prop-types', 'react', 'react-dom-factories', 'reactDOM', 'remoteDOM', 'render', 'santa-components', 'santa-data-fixer', 'santa-renderer', 'santaProps', 'ScrollToPlugin', 'site-widgets', 'skinExports', 'skins', 'skinUtils', 'socialCommon', 'textCommon', 'thirdPartyAnalytics', 'TimelineMax', 'tpa', 'TweenMax', 'utils', 'warmupUtils', 'warmupUtilsLib', 'wixUiCompsToPackages', 'xss', 'zepto']; 2967 2968 return addConditionalDependencies(clientSidePackages); 2969 } 2970 2971 function renderClientSide() { 2972 var clientSidePackages = getClientSidePackages(); 2973 var shouldLoadWorkerDirectly = experiment.isOpen('wixCodeNoIframe') && Boolean(siteModel.publicModel); 2974 var platformInitPkgs = ['lodash']; 2975 if (shouldLoadWorkerDirectly) { 2976 platformInitPkgs = platformInitPkgs.concat(['host-worker-init', 'platformInit']); 2977 } else { 2978 platformInitPkgs = platformInitPkgs.concat(['wixCodeInit']); 2979 } 2980 loadRequirements(platformInitPkgs, function (_ref4) { 2981 var _ = _ref4.lodash, 2982 platformInit = _ref4.platformInit, 2983 _ref4$wixCodeInit = _ref4.wixCodeInit, 2984 wixCodeInit = _ref4$wixCodeInit === undefined ? platformInit : _ref4$wixCodeInit; 2985 2986 var wixCodeAppApi = wixCodeInit.getAppApi(); 2987 wixCodeInit.initMainR({ 2988 appApi: wixCodeAppApi, 2989 siteModel: siteModel, 2990 mobileView: mobileView, 2991 queryUtil: queryUtil, 2992 isBot: isBot, 2993 fetchScripts: experiment.isOpen('platformFetchScripts') 2994 }); 2995 var props = { 2996 wixCodeAppApi: wixCodeAppApi 2997 }; 2998 wixBiSession.usingPlatform = wixCodeAppApi.isAppInitiated(); 2999 setContext({ 3000 shouldDelay: function shouldDelay() { 3001 return !isPreview && experiment.isOpen('importScriptsOpt') && wixCodeAppApi.isAppInitiated(); 3002 } 3003 }); 3004 var notify = notifyParent.bind(null, 'santaReady'); 3005 3006 var platformApps = wixCodeInit.appsUtils.getAppsBaseInfo({ 3007 rendererModel: siteModel.rendererModel, 3008 clientSpecMap: siteModel.rendererModel.clientSpecMap, 3009 serviceTopology: siteModel.serviceTopology, 3010 viewerPlatformAppSources: queryUtil.getParameterByName('viewerPlatformAppSources'), 3011 santaBase: siteModel.santaBase 3012 }); 3013 var anyPlatformApps = wixCodeInit.specMapUtils.getAppSpec(siteModel.rendererModel.clientSpecMap) || platformApps.length > 0; 3014 var corePlus = ['core', 'render']; 3015 3016 if (isQaAutomation) { 3017 corePlus.push('qaAutomation'); 3018 } 3019 if (anyPlatformApps) { 3020 corePlus.push('wixCode'); 3021 } 3022 3023 load(corePlus, function (pkgs, ajaxHandler) { 3024 performance.mark('prepare start'); 3025 3026 var requireAllComponents = !experiment.isOpen('selectiveDownload') || isPreview || useDS || isExternalPreview || !window.Promise; 3027 3028 var core = pkgs.core, 3029 qaAutomation = pkgs.qaAutomation; 3030 3031 if (qaAutomation) { 3032 qaAutomation.init(window, siteModel); 3033 } 3034 3035 if (siteModel.rendererModel.seo) { 3036 clientSidePackages.push('componentsSeoLayer'); 3037 } 3038 3039 if (requireAllComponents) { 3040 loadRequirements(['components', 'skins'].concat(core.requireCompCode.all()), function (loadedPackages) { 3041 if (core.requireCompCode.callAllRequiredPackagesCallbacks) { 3042 core.requireCompCode.callAllRequiredPackagesCallbacks(loadedPackages); 3043 } 3044 3045 if (useDS || isPreview || isExternalPreview) { 3046 clientSidePackages.push('componentsPreviewLayer'); 3047 } 3048 loadWithIntegrationPackages(_, clientSidePackages, function (p) { 3049 p.render.renderClientSide(p, ajaxHandler, siteModel, props, notify); 3050 }); 3051 }); 3052 } else { 3053 siteModel.selectiveCompDownload = true; 3054 var preparedData = {}; 3055 if (pkgs.render.initSiteForRender) { 3056 preparedData = pkgs.render.initSiteForRender(siteModel, ajaxHandler, props); 3057 } else { 3058 preparedData.privates = core.renderer.createSitePrivatesEx(ajaxHandler, siteModel, props); 3059 preparedData.prepared = core.renderer.prepareSiteForRender(preparedData.privates.displayedSiteData, preparedData.privates.viewerPrivateServices, props); 3060 preparedData.props = props; 3061 } 3062 3063 loadWithIntegrationPackages(_, clientSidePackages, function (p) { 3064 p.render.renderFromPrepared(p, preparedData.privates, preparedData.prepared, preparedData.props, notify); 3065 }); 3066 } 3067 }); 3068 3069 (0, _miniPackages2.default)(window, requirejs, isServerSide); 3070 3071 wixBiSession.info = function () { 3072 console.log('%cTiming Info', 'color:blue; font-weight:bold'); 3073 console.table(_(performance.getEntries()).filter(function (_ref5) { 3074 var entryType = _ref5.entryType; 3075 return ['mark', 'paint'].includes(entryType); 3076 }).invokeMap('toJSON').value(), ['name', 'startTime']); 3077 3078 console.log('%cHTML Info', 'color:blue; font-weight:bold'); 3079 console.table(_(performance.getEntriesByType('navigation')[0]).pick(['responseStart', 'domInteractive', 'transferSize', 'decodedBodySize']).toPairs().value()); 3080 3081 var scripts = _.filter(performance.getEntriesByType('resource'), function (_ref6) { 3082 var initiatorType = _ref6.initiatorType; 3083 return initiatorType === 'script'; 3084 }); 3085 var santaBase = window.santaBase, 3086 clientSideRender = window.clientSideRender, 3087 santaRenderingError = window.santaRenderingError, 3088 document = window.document; 3089 3090 var info = { 3091 Version: santaBase.match(/\/([^/]+)$/)[1], 3092 'Using platform': wixBiSession.usingPlatform, 3093 'Using SSR': !clientSideRender, 3094 'No SSR reason': santaRenderingError && santaRenderingError.errorInfo, 3095 'Script file count': scripts.length, 3096 'Script file size (KB)': _.reduce(scripts, function (total, _ref7) { 3097 var transferSize = _ref7.transferSize; 3098 return total + transferSize; 3099 }, 0) >> 10, 3100 'Script protocol': scripts[0].nextHopProtocol, 3101 'iframe count': document.querySelectorAll('iframe').length 3102 }; 3103 if (!info['No SSR reason']) { 3104 delete info['No SSR reason']; 3105 } 3106 console.log('%cSession Info', 'color:blue; font-weight:bold'); 3107 console.table(_.toPairs(info)); 3108 }; 3109 }); 3110 3111 loadRequirements(clientSidePackages); 3112 } 3113 3114 function renderServerSide() { 3115 load(['lodash', 'warmupUtilsLib', 'experiment', 'imageClientLib', 'layout', 'warmup', 'warmupUtils', 'tpaWarmup'], function (loadedPackages) { 3116 loadedPackages.warmup.init(siteModel, function () { 3117 notifyParent('santaDidLayout'); 3118 renderClientSide(); 3119 }); 3120 if (experiment.isOpen('earlyLoadJS')) { 3121 requirejs(['coreUtilsLib'], function () { 3122 requirejs(['core'], function () {}); 3123 }); 3124 } 3125 }); 3126 } 3127 3128 // Server side render state 3129 window.sssr = {}; 3130 3131 function callRender() { 3132 if (isServerSide) { 3133 renderServerSide(); 3134 } else if (window.isServerSideWithHash) { 3135 window.document.addEventListener('DOMContentLoaded', function () { 3136 window.document.getElementById('SITE_CONTAINER').innerHTML = ''; 3137 renderClientSide(); 3138 }); 3139 } else { 3140 renderClientSide(); 3141 } 3142 } 3143 3144 if ((0, _isLocal2.default)(window.santaBase) && queryUtil.getParameterByName('hot') !== 'false') { 3145 requirejs(['hot', 'zepto'], function (hot, $) { 3146 hot.init($); 3147 callRender(); 3148 }); 3149 } else { 3150 callRender(); 3151 } 3152 } 3153 3154 return render; 3155}; 3156 3157var _isLocal = __webpack_require__(/*! ../common/isLocal.js */ "./node_modules/santa-main-r/lib/lib/common/isLocal.js"); 3158 3159var _isLocal2 = _interopRequireDefault(_isLocal); 3160 3161var _miniPackages = __webpack_require__(/*! ../viewer/miniPackages.js */ "./node_modules/santa-main-r/lib/lib/viewer/miniPackages.js"); 3162 3163var _miniPackages2 = _interopRequireDefault(_miniPackages); 3164 3165function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3166 3167function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } 3168 3169/***/ }), 3170
vendor: 12,197 bytes, lines 3171-3559
3171/***/ "./node_modules/santa-main-r/lib/lib/viewer/resourcePrefetch.js": 3172/*!**********************************************************************!*\ 3173 !*** ./node_modules/santa-main-r/lib/lib/viewer/resourcePrefetch.js ***! 3174 \**********************************************************************/ 3175/*! no static exports found */ 3176/***/ (function(module, exports, __webpack_require__) { 3177 3178"use strict"; 3179 3180 3181Object.defineProperty(exports, "__esModule", { 3182 value: true 3183}); 3184exports.default = resourcePrefetch; 3185 3186var _joinURL = __webpack_require__(/*! ../common/joinURL.js */ "./node_modules/santa-main-r/lib/lib/common/joinURL.js"); 3187 3188var _joinURL2 = _interopRequireDefault(_joinURL); 3189 3190function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3191 3192function resourcePrefetch(_ref, _ref2) { 3193 var document = _ref.document, 3194 XMLHttpRequest = _ref.XMLHttpRequest, 3195 Promise = _ref.Promise, 3196 santaBase = _ref.santaBase; 3197 var siteModel = _ref2.siteModel, 3198 publicModel = _ref2.publicModel, 3199 pageInfo = _ref2.pageInfo, 3200 shouldTimeout = _ref2.shouldTimeout, 3201 wixBiSession = _ref2.wixBiSession, 3202 isServerSide = _ref2.isServerSide, 3203 mobileView = _ref2.mobileView, 3204 experiment = _ref2.experiment, 3205 requirejs = _ref2.requirejs; 3206 3207 if (!publicModel) { 3208 return { 3209 contentCache: function contentCache() {}, 3210 setContext: function setContext() {} 3211 }; 3212 } 3213 3214 var cache = {}; 3215 var pending = {}; 3216 var context = { 3217 shouldDelay: function shouldDelay() {} 3218 }; 3219 3220 function _prefetch(url, options, pageId) { 3221 var r = new XMLHttpRequest(); 3222 3223 r.onload = function () { 3224 if (this.status >= 200 && this.status < 300) { 3225 var cached = options.parse ? options.parse(r.response) : r.response; 3226 cache[url] = cached; 3227 pending[url].filter(function (op) { 3228 return op.success; 3229 }).forEach(function (op) { 3230 op.success(cached); 3231 }); 3232 } else { 3233 this.onerror(); 3234 } 3235 }; 3236 r.onerror = function () { 3237 cache[url] = r; 3238 pending[url].filter(function (op) { 3239 return op.error; 3240 }).forEach(function (op) { 3241 op.error(r); 3242 }); 3243 }; 3244 r.onloadend = function () { 3245 delete pending[url]; 3246 }; 3247 3248 r.open('GET', url, true); 3249 3250 //Property timeout MUST be after .open() and before .send() 3251 //This is related to an issue with IE - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout 3252 if (shouldTimeout) { 3253 r.timeout = 2000; 3254 r.ontimeout = function () { 3255 if (pageId) { 3256 //beat 2 = 'reset' event 3257 wixBiSession.beat(2, pageId); 3258 } 3259 }; 3260 } 3261 //Property timeout MUST be after .open() and before .send() 3262 3263 if (options.accept) { 3264 r.setRequestHeader('Accept', options.accept); 3265 } 3266 3267 r.send(); 3268 } 3269 3270 function prefetch(url, options, pageId) { 3271 if (url) { 3272 options = options || {}; 3273 var cached = cache[url]; 3274 if (cached) { 3275 if (options.success) { 3276 options.success(cached); 3277 } 3278 } else { 3279 var p = pending[url]; 3280 if (!p) { 3281 pending[url] = p = []; 3282 _prefetch(url, options, pageId); 3283 } 3284 p.push(options); 3285 } 3286 } 3287 } 3288 3289 function prefetchJSON(url, pageId) { 3290 prefetch(url, { 3291 accept: 'application/json', 3292 parse: function parse(response) { 3293 var json = null; 3294 try { 3295 json = JSON.parse(response); 3296 if (wixBiSession.et < 6) { 3297 prefetchComps(json); 3298 prefetchSvg(json.structure, response); 3299 earlyBackground(json, pageId); 3300 } 3301 } catch (e) { 3302 // empty 3303 } 3304 return json; 3305 } 3306 }, pageId); 3307 } 3308 3309 var pc = null; 3310 function prefetchComps(json) { 3311 if (Promise && json.structure && experiment.isOpen('prefetchComps')) { 3312 if (pc === null) { 3313 pc = new Promise(function (resolve) { 3314 requirejs(['coreUtils'], function (_ref3) { 3315 var prefetchComponents = _ref3.prefetchComponents; 3316 3317 resolve(prefetchComponents); 3318 }); 3319 }); 3320 } 3321 pc.then(function (prefetchComponents) { 3322 var hasBlog = prefetchComponents(json, siteModel, mobileView); 3323 if (hasBlog) { 3324 prefetchJSON((0, _joinURL2.default)(santaBase, 'static/wixapps/apps/blog/descriptor.json')); 3325 } 3326 }); 3327 } 3328 } 3329 3330 function toGrayscale(color) { 3331 var match = color.match(/#(.{2})(.{2})(.{2})/); 3332 if (match) { 3333 var c = Math.floor(match.slice(1).map(function (h) { 3334 return parseInt(h, 16); 3335 }).reduce(function (s, v) { 3336 return s + v; 3337 }, 0) / 3).toString(16); 3338 return '#' + c + c + c; 3339 } 3340 } 3341 3342 function headerColor(json) { 3343 if (experiment.isOpen('earlyBackgroundUseHeader')) { 3344 var _json$structure = json.structure; 3345 _json$structure = _json$structure === undefined ? {} : _json$structure; 3346 var _json$structure$child = _json$structure.children, 3347 children = _json$structure$child === undefined ? [] : _json$structure$child; 3348 3349 var header = children.find(function (_ref4) { 3350 var id = _ref4.id; 3351 return id === 'SITE_HEADER'; 3352 }); 3353 if (header) { 3354 var styleId = header.styleId; 3355 var _json$data = json.data; 3356 _json$data = _json$data === undefined ? {} : _json$data; 3357 var _json$data$theme_data = _json$data.theme_data; 3358 _json$data$theme_data = _json$data$theme_data === undefined ? {} : _json$data$theme_data; 3359 var _json$data$theme_data2 = _json$data$theme_data[styleId]; 3360 _json$data$theme_data2 = _json$data$theme_data2 === undefined ? {} : _json$data$theme_data2; 3361 var _json$data$theme_data3 = _json$data$theme_data2.style; 3362 _json$data$theme_data3 = _json$data$theme_data3 === undefined ? {} : _json$data$theme_data3; 3363 var _json$data$theme_data4 = _json$data$theme_data3.properties; 3364 _json$data$theme_data4 = _json$data$theme_data4 === undefined ? {} : _json$data$theme_data4; 3365 var bg = _json$data$theme_data4.bg; 3366 3367 return bg; 3368 } 3369 } 3370 } 3371 function pageColor(document_data, pageId) { 3372 if (document_data) { 3373 var _document_data$pageId = document_data[pageId]; 3374 _document_data$pageId = _document_data$pageId === undefined ? {} : _document_data$pageId; 3375 var _document_data$pageId2 = _document_data$pageId.pageBackgrounds; 3376 _document_data$pageId2 = _document_data$pageId2 === undefined ? {} : _document_data$pageId2; 3377 var _document_data$pageId3 = _document_data$pageId2[mobileView ? 'mobile' : 'desktop']; 3378 _document_data$pageId3 = _document_data$pageId3 === undefined ? {} : _document_data$pageId3; 3379 var ref = _document_data$pageId3.ref; 3380 3381 if (ref) { 3382 var _document_data = document_data[ref[0] === '#' ? ref.substring(1) : ref]; 3383 _document_data = _document_data === undefined ? {} : _document_data; 3384 var color = _document_data.color; 3385 3386 return color; 3387 } 3388 } 3389 } 3390 3391 var savedColor = void 0; 3392 var savedMap = void 0; 3393 function earlyBackground(json, pageId) { 3394 if (document && experiment.isOpen('earlyBackground')) { 3395 var _json$data2 = json.data; 3396 _json$data2 = _json$data2 === undefined ? {} : _json$data2; 3397 var document_data = _json$data2.document_data, 3398 theme_data = _json$data2.theme_data; 3399 3400 if (theme_data && !savedMap) { 3401 var _theme_data$THEME_DAT = theme_data.THEME_DATA; 3402 _theme_data$THEME_DAT = _theme_data$THEME_DAT === undefined ? {} : _theme_data$THEME_DAT; 3403 savedMap = _theme_data$THEME_DAT.color; 3404 } 3405 savedColor = headerColor(json) || savedColor || pageColor(document_data, pageId); 3406 if (savedColor) { 3407 var match = savedColor.match(/color_(\d+)/); 3408 if (match) { 3409 savedColor = savedMap[match[1]]; 3410 } 3411 if (savedColor && savedColor[0] === '#') { 3412 document.body.style.backgroundColor = experiment.isOpen('earlyBackgroundGrayscale') ? toGrayscale(savedColor) : savedColor; 3413 } 3414 } 3415 } 3416 } 3417 3418 function shapeSkinNameToUrl(shapeSkinName) { 3419 function getSvgUri(version, svgHash, shapeName) { 3420 return svgHash + (version === 1 ? '_svgshape.v1.' + shapeName : '') + '.svg'; //eslint-disable-line prefer-template 3421 } 3422 3423 var mediaRootUrl = siteModel.serviceTopology.mediaRootUrl; 3424 var partsArr = shapeSkinName.replace(/^.*\//, '').split('.'); 3425 var version = partsArr[1] === 'v1' ? 1 : 2; 3426 var svgHash = partsArr[2].replace(/svg_/i, ''); 3427 var svgName = partsArr[3]; 3428 var svgUri = getSvgUri(version, svgHash, svgName); 3429 return (0, _joinURL2.default)(mediaRootUrl, 'shapes', svgUri); 3430 } 3431 3432 var svgMap = { 3433 'skins.viewer.svgshape.SvgShapeDefaultSki': true 3434 }; 3435 3436 function prefetchSvg(structure, response) { 3437 if (structure && response.indexOf('"svg') !== -1) { 3438 var svgs = JSON.stringify(structure).match(/"skin"\s*:\s*"svg[^"]+"/g); 3439 if (svgs) { 3440 svgs.map(function (m) { 3441 m = m.match(/svg[^"]+/); 3442 return m && m[0]; 3443 }).filter(function (svg) { 3444 if (!svg || svgMap[svg]) { 3445 return false; 3446 } 3447 svgMap[svg] = true; 3448 return true; 3449 }).map(shapeSkinNameToUrl).forEach(function (url) { 3450 prefetch(url); 3451 }); 3452 } 3453 } 3454 } 3455 3456 function getFirstUrl(pageJsonFileName) { 3457 if (pageJsonFileName) { 3458 var topology = publicModel.pageList.topology[0]; 3459 return topology.baseUrl + topology.parts.replace('{filename}', pageJsonFileName); 3460 } 3461 } 3462 3463 function getMasterPageFirstURL() { 3464 var _publicModel$pageList = publicModel.pageList, 3465 masterPageJsonFileName = _publicModel$pageList.masterPageJsonFileName, 3466 masterPage = _publicModel$pageList.masterPage; 3467 3468 return getFirstUrl(masterPageJsonFileName) || masterPage && masterPage[0]; 3469 } 3470 3471 function getPageFirstURL() { 3472 return getFirstUrl(pageInfo.pageJsonFileName) || pageInfo.urls[0]; 3473 } 3474 3475 function shouldPrefetch() { 3476 return !isServerSide && !experiment.isOpen('sv_getDataFixedPageJsonAndUseThem'); 3477 } 3478 3479 function prefetchTranslations(langs) { 3480 // There is a bug in IE11 that fail to redirect (status 307) here for cross origin ajax requests WEED-10793 3481 // Converting http to https will prevent this redirect temporarily until all Parastorage urls in 3482 // serviceTopology.scriptsLocationMap will be https HTMLSRVR-2321 3483 var santaLangsUrl = window.siteModel.serviceTopology.scriptsLocationMap['santa-langs'].replace(/https?/, 'https'); 3484 var urls = [].concat(langs).map(function (l) { 3485 return santaLangsUrl + '/resources/santa-viewer/bundles/_generated/santa_viewer_' + l + '.json'; 3486 }); 3487 urls.forEach(prefetchJSON); 3488 } 3489 3490 try { 3491 if (shouldPrefetch()) { 3492 prefetchJSON(getMasterPageFirstURL(), 'masterPage'); 3493 prefetchTranslations('en'); 3494 if (pageInfo) { 3495 prefetchJSON(getPageFirstURL(), pageInfo.pageId); 3496 } 3497 } 3498 } catch (e) { 3499 // empty 3500 } 3501 3502 var cbs = []; 3503 function async(cb) { 3504 function delay() { 3505 var top = cbs.shift(); 3506 if (top) { 3507 top(); 3508 if (cbs.length > 0) { 3509 setTimeout(delay, 10); 3510 } 3511 } 3512 } 3513 3514 if (cbs.push(cb) === 1) { 3515 if (context.shouldDelay()) { 3516 setTimeout(delay, 10); 3517 } else { 3518 setTimeout(function () { 3519 var fs = cbs; 3520 cbs = []; 3521 fs.forEach(function (f) { 3522 f(); 3523 }); 3524 }, 0); 3525 } 3526 } 3527 } 3528 3529 return { 3530 contentCache: function contentCache(options) { 3531 var url = options.url; 3532 3533 var cached = cache[url]; 3534 if (cached) { 3535 async(function () { 3536 if (cached instanceof XMLHttpRequest) { 3537 options.error(cached); 3538 } else { 3539 options.success(cached); 3540 } 3541 }); 3542 } else if (pending[url]) { 3543 pending[url].push(options); 3544 } else { 3545 return false; 3546 } 3547 return true; 3548 }, 3549 setContext: function setContext(update) { 3550 Object.keys(update).forEach(function (key) { 3551 context[key] = update[key]; 3552 }); 3553 // Object.assign(context, update) 3554 } 3555 }; 3556} 3557 3558/***/ }), 3559
vendor: 2,472 bytes, lines 3560-3619
3560/***/ "./node_modules/santa-main-r/lib/lib/viewer/rjs-config.js": 3561/*!****************************************************************!*\ 3562 !*** ./node_modules/santa-main-r/lib/lib/viewer/rjs-config.js ***! 3563 \****************************************************************/ 3564/*! no static exports found */ 3565/***/ (function(module, exports, __webpack_require__) { 3566 3567"use strict"; 3568 3569 3570Object.defineProperty(exports, "__esModule", { 3571 value: true 3572}); 3573 3574exports.default = function (window, versions, experiment) { 3575 function getViewerRjsConfig(serviceTopology) { 3576 var queryUtils = (0, _getQueryUtils2.default)(window); 3577 var clientSpecMap = window.rendererModel && window.rendererModel.clientSpecMap; 3578 var local = ((0, _isLocal2.default)(queryUtils.getParameterByName('ReactSource')) || (0, _isLocal2.default)(window.santaBase)) && !queryUtils.getParameterByName('isBisect'); 3579 var nativeComponentsOverrides = queryUtils.getParameterByName('nativeComponentsOverrides'); 3580 var rr = (0, _getRjsConfig2.default)(versions, serviceTopology, local, { clientSpecMap: clientSpecMap, nativeComponentsOverrides: nativeComponentsOverrides }); 3581 3582 if (!experiment) { 3583 rr.paths.experiment = 'js/plugins/experiment/experiment'; 3584 } 3585 3586 // generated 3587 rr.packages = ['tpaIntegration', 'wixCodeIntegration', 'viewerIntegration'].map(function (packageName) { 3588 return { 3589 name: packageName, 3590 main: packageName, 3591 location: (0, _getIntegrationPath2.default)(packageName, window.santaBase) 3592 }; 3593 }); 3594 3595 return rr; 3596 } 3597 return getViewerRjsConfig; 3598}; 3599 3600var _getIntegrationPath = __webpack_require__(/*! ../common/getIntegrationPath */ "./node_modules/santa-main-r/lib/lib/common/getIntegrationPath.js"); 3601 3602var _getIntegrationPath2 = _interopRequireDefault(_getIntegrationPath); 3603 3604var _getQueryUtils = __webpack_require__(/*! ../common/getQueryUtils */ "./node_modules/santa-main-r/lib/lib/common/getQueryUtils.js"); 3605 3606var _getQueryUtils2 = _interopRequireDefault(_getQueryUtils); 3607 3608var _getRjsConfig = __webpack_require__(/*! ./get-rjs-config */ "./node_modules/santa-main-r/lib/lib/viewer/get-rjs-config.js"); 3609 3610var _getRjsConfig2 = _interopRequireDefault(_getRjsConfig); 3611 3612var _isLocal = __webpack_require__(/*! ../common/isLocal */ "./node_modules/santa-main-r/lib/lib/common/isLocal.js"); 3613 3614var _isLocal2 = _interopRequireDefault(_isLocal); 3615 3616function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3617 3618/***/ }), 3619
vendor: 1,541 bytes, lines 3620-3686
3620/***/ "./node_modules/santa-main-r/lib/lib/viewer/utils.js": 3621/*!***********************************************************!*\ 3622 !*** ./node_modules/santa-main-r/lib/lib/viewer/utils.js ***! 3623 \***********************************************************/ 3624/*! no static exports found */ 3625/***/ (function(module, exports, __webpack_require__) { 3626 3627"use strict"; 3628 3629 3630Object.defineProperty(exports, "__esModule", { 3631 value: true 3632}); 3633/** 3634 * @param window 3635 * @param pageList 3636 * @returns {*} 3637 */ 3638function getPageInfo(window, pageList, isPremium) { 3639 if (!pageList) { 3640 return null; 3641 } 3642 var pages = pageList.pages || []; 3643 3644 function getPageById(pageId) { 3645 for (var i = 0; i < pages.length; ++i) { 3646 if (pages[i].pageId === pageId) { 3647 return pages[i]; 3648 } 3649 } 3650 } 3651 3652 var hash = window.location.hash.split('/'); 3653 var pageId = hash[1]; 3654 if (pageId) { 3655 var page = getPageById(pageId); 3656 if (page) { 3657 return page; 3658 } 3659 } 3660 3661 var pathname = window.location.pathname; 3662 if (pathname) { 3663 if (!isPremium) { 3664 var match = pathname.match(/\/.+\/([^/]+)$/); 3665 pathname = match && match[1]; 3666 } 3667 3668 if (pathname) { 3669 for (var i = 0; i < pages.length; ++i) { 3670 var pageUriSEO = pages[i].pageUriSEO; 3671 if (pageUriSEO) { 3672 var re = new RegExp('(^|/)' + pageUriSEO + '(/|$)'); 3673 if (re.test(pathname)) { 3674 return pages[i]; 3675 } 3676 } 3677 } 3678 } 3679 } 3680 3681 return pageList.mainPageId && getPageById(pageList.mainPageId); 3682} 3683 3684exports.getPageInfo = getPageInfo; 3685 3686/***/ })
3686, 3687 3688/***/ "requirejs": 3689/*!****************************!*\ 3690 !*** external "requirejs" ***! 3691 \****************************/ 3692/*! no static exports found */ 3693/***/ (function(module, exports) { 3694 3695module.exports = requirejs; 3696 3697/***/ }) 3698 3699/******/ }); 3700//# sourceMappingURL=main-r.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.