From ac7c08991bd06a679f1972b38ce3fe8cbeb4015d Mon Sep 17 00:00:00 2001 From: Ash Yablok Date: Tue, 6 Aug 2024 09:03:42 -0700 Subject: [PATCH 1/3] bug: fix validation bug for emails that are required fields --- dist/pathfora.css | 78 +- dist/pathfora.js | 5554 +---------------- dist/pathfora.min.css | 2 +- dist/pathfora.min.js | 2 +- gulpfile.js | 200 +- package.json | 3 +- src/less/widgets/widgets-general.less | 387 +- src/rollup/form/build-form-element.js | 98 +- .../actions/construct-widget-actions.js | 292 +- src/rollup/widgets/construct-widget-layout.js | 398 +- test/acceptance/widget.spec.js | 443 +- 11 files changed, 1104 insertions(+), 6353 deletions(-) diff --git a/dist/pathfora.css b/dist/pathfora.css index 3b2e1f3..1e79438 100644 --- a/dist/pathfora.css +++ b/dist/pathfora.css @@ -11,7 +11,7 @@ /* Default widget styles */ .pf-widget { z-index: 9999; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; visibility: hidden; opacity: 0; text-align: left; @@ -63,12 +63,12 @@ .pf-widget .pf-content-unit { display: none; } -.pf-widget input[type=text], -.pf-widget input[type=email], -.pf-widget input[type=date], +.pf-widget input[type='text'], +.pf-widget input[type='email'], +.pf-widget input[type='date'], .pf-widget select, .pf-widget textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; border-radius: 3px; font-size: 14px; width: 100%; @@ -80,32 +80,32 @@ -moz-box-sizing: border-box; -webkit-sizing: border-box; } -.pf-widget input[type=text]::-webkit-input-placeholder, -.pf-widget input[type=email]::-webkit-input-placeholder, -.pf-widget input[type=date]::-webkit-input-placeholder, +.pf-widget input[type='text']::-webkit-input-placeholder, +.pf-widget input[type='email']::-webkit-input-placeholder, +.pf-widget input[type='date']::-webkit-input-placeholder, .pf-widget select::-webkit-input-placeholder, .pf-widget textarea::-webkit-input-placeholder { color: #a9a9a9; } -.pf-widget input[type=text]:-moz-placeholder, -.pf-widget input[type=email]:-moz-placeholder, -.pf-widget input[type=date]:-moz-placeholder, +.pf-widget input[type='text']:-moz-placeholder, +.pf-widget input[type='email']:-moz-placeholder, +.pf-widget input[type='date']:-moz-placeholder, .pf-widget select:-moz-placeholder, .pf-widget textarea:-moz-placeholder { /* Firefox 18- */ color: #a9a9a9; } -.pf-widget input[type=text]::-moz-placeholder, -.pf-widget input[type=email]::-moz-placeholder, -.pf-widget input[type=date]::-moz-placeholder, +.pf-widget input[type='text']::-moz-placeholder, +.pf-widget input[type='email']::-moz-placeholder, +.pf-widget input[type='date']::-moz-placeholder, .pf-widget select::-moz-placeholder, .pf-widget textarea::-moz-placeholder { /* Firefox 19+ */ color: #a9a9a9; } -.pf-widget input[type=text]:-ms-input-placeholder, -.pf-widget input[type=email]:-ms-input-placeholder, -.pf-widget input[type=date]:-ms-input-placeholder, +.pf-widget input[type='text']:-ms-input-placeholder, +.pf-widget input[type='email']:-ms-input-placeholder, +.pf-widget input[type='date']:-ms-input-placeholder, .pf-widget select:-ms-input-placeholder, .pf-widget textarea:-ms-input-placeholder { color: #a9a9a9; @@ -121,19 +121,19 @@ .pf-widget select.default { color: #a9a9a9; } -.pf-widget form:not(.pf-custom-form) input[type=text], -.pf-widget form:not(.pf-custom-form) input[type=email], +.pf-widget form:not(.pf-custom-form) input[type='text'], +.pf-widget form:not(.pf-custom-form) input[type='email'], .pf-widget form:not(.pf-custom-form) select, .pf-widget form:not(.pf-custom-form) textarea { margin-bottom: 10px; } -.pf-widget form:not(.pf-custom-form) [data-required=true].invalid, -.pf-widget form:not(.pf-custom-form) [data-validate=true].invalid { +.pf-widget form:not(.pf-custom-form) [data-required='true'].invalid, +.pf-widget form:not(.pf-custom-form) [data-validate='true'].invalid { border: 1px solid #f12626; } -.pf-widget input[type=text], -.pf-widget input[type=email], -.pf-widget input[type=date], +.pf-widget input[type='text'], +.pf-widget input[type='email'], +.pf-widget input[type='date'], .pf-widget select { clear: both; } @@ -326,8 +326,8 @@ display: block; margin: 0 auto; } -.pf-subscription form input[type=text], -.pf-subscription form input[type=email] { +.pf-subscription form input[type='text'], +.pf-subscription form input[type='email'] { width: 100%; margin-bottom: 1px; } @@ -391,29 +391,33 @@ .pf-sitegate div.pf-form-required { position: relative; } -.pf-form div.pf-form-required.invalid [data-required=true]:not(.pf-has-label), -.pf-sitegate div.pf-form-required.invalid [data-required=true]:not(.pf-has-label), -.pf-form div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label), -.pf-sitegate div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label) { +.pf-form div.pf-form-required.invalid [data-required='true']:not(.pf-has-label), +.pf-sitegate div.pf-form-required.invalid [data-required='true']:not(.pf-has-label), +.pf-form div.pf-form-required.invalid [data-validate='true']:not(.pf-has-label), +.pf-sitegate div.pf-form-required.invalid [data-validate='true']:not(.pf-has-label) { border: 1px solid #f12626; margin: -1px; } .pf-form div.pf-form-required.pf-widget-radio-group, .pf-sitegate div.pf-form-required.pf-widget-radio-group, -.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required=true], -.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required=true] { +.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required='true'], +.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required='true'] { border-radius: 3px; } .pf-form div.pf-form-required.invalid div.pf-required-flag, -.pf-sitegate div.pf-form-required.invalid div.pf-required-flag { +.pf-sitegate div.pf-form-required.invalid div.pf-required-flag, +.pf-form div.pf-form-required.invalid--validate div.pf-invalid-flag, +.pf-sitegate div.pf-form-required.invalid--validate div.pf-invalid-flag { opacity: 1; margin-left: 10px; } .pf-form div.pf-form-required div.pf-required-flag, -.pf-sitegate div.pf-form-required div.pf-required-flag { +.pf-sitegate div.pf-form-required div.pf-required-flag, +.pf-form div.pf-form-required div.pf-invalid-flag, +.pf-sitegate div.pf-form-required div.pf-invalid-flag { font-size: 12px; font-weight: bold; - position: relative; + position: absolute; padding: 3px 7px; display: inline; width: auto; @@ -424,7 +428,9 @@ opacity: 0; } .pf-form div.pf-form-required div.pf-required-flag span, -.pf-sitegate div.pf-form-required div.pf-required-flag span { +.pf-sitegate div.pf-form-required div.pf-required-flag span, +.pf-form div.pf-form-required div.pf-invalid-flag span, +.pf-sitegate div.pf-form-required div.pf-invalid-flag span { position: absolute; width: 0; height: 0; diff --git a/dist/pathfora.js b/dist/pathfora.js index 3c451bb..b037483 100644 --- a/dist/pathfora.js +++ b/dist/pathfora.js @@ -1,270 +1,15 @@ (function () { 'use strict'; - /** @module pathfora/globals/reset-default-props */ + var cov_14fabb9poo=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/globals/reset-default-props.js',hash='a6f7d2984ff0674e23a95221cc72beaa72a96872',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/globals/reset-default-props.js',statementMap:{'0':{start:{line:11,column:2},end:{line:46,column:4}},'1':{start:{line:48,column:2},end:{line:56,column:4}},'2':{start:{line:58,column:2},end:{line:69,column:4}},'3':{start:{line:71,column:2},end:{line:99,column:4}},'4':{start:{line:102,column:2},end:{line:130,column:4}},'5':{start:{line:132,column:2},end:{line:132,column:13}}},fnMap:{'0':{name:'resetDefaultProps',decl:{start:{line:10,column:24},end:{line:10,column:41}},loc:{start:{line:10,column:48},end:{line:133,column:1}},line:10}},branchMap:{},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetDefaultProps(obj){cov_14fabb9poo.f[0]++;cov_14fabb9poo.s[0]++;obj.generic={className:'pathfora',branding:false,responsive:true,headline:'',themes:{dark:{background:'#333',headline:'#fefefe',text:'#aaa',close:'#888',actionText:'#fff',actionBackground:'#444',cancelText:'#888',cancelBackground:'#333'},light:{background:'#f1f1f1',headline:'#444',text:'#888',close:'#bbb',actionText:'#444',actionBackground:'#fff',cancelText:'#bbb',cancelBackground:'#f1f1f1'}},displayConditions:{showOnInit:true,showOnExitIntent:false,showDelay:0,hideAfter:0,displayWhenElementVisible:'',scrollPercentageToDisplay:0}};cov_14fabb9poo.s[1]++;obj.message={layout:'modal',position:'',variant:'1',okMessage:'Confirm',cancelMessage:'Cancel',okShow:true,cancelShow:true};cov_14fabb9poo.s[2]++;obj.subscription={layout:'modal',position:'',variant:'1',placeholders:{email:'Email'},okMessage:'Confirm',cancelMessage:'Cancel',okShow:true,cancelShow:true};cov_14fabb9poo.s[3]++;obj.form={layout:'modal',position:'',variant:'1',placeholders:{name:'Name',title:'Title',email:'Email',message:'Message',company:'Company',phone:'Phone Number',country:'Country',referralEmail:'Referral Email'},required:{name:true,email:true},fields:{company:false,phone:false,country:false,referralEmail:false},okMessage:'Send',okShow:true,cancelMessage:'Cancel',cancelShow:true};cov_14fabb9poo.s[4]++;obj.sitegate={layout:'modal',position:'',variant:'1',placeholders:{name:'Name',title:'Title',email:'Email',message:'Message',company:'Company',phone:'Phone Number',country:'Country',referralEmail:'Referral Email'},required:{name:true,email:true},fields:{message:false,phone:false,country:false,referralEmail:false},okMessage:'Submit',okShow:true,cancelShow:false,showForm:true};cov_14fabb9poo.s[5]++;return obj;} - /** - * Reset the values of the default widget configs - * - * @exports resetDefaultProps - * @params {object} obj - * @returns {object} obj - */ - function resetDefaultProps (obj) { - obj.generic = { - className: 'pathfora', - branding: false, - responsive: true, - headline: '', - themes: { - dark: { - background: '#333', - headline: '#fefefe', - text: '#aaa', - close: '#888', - actionText: '#fff', - actionBackground: '#444', - cancelText: '#888', - cancelBackground: '#333' - }, - light: { - background: '#f1f1f1', - headline: '#444', - text: '#888', - close: '#bbb', - actionText: '#444', - actionBackground: '#fff', - cancelText: '#bbb', - cancelBackground: '#f1f1f1' - } - }, - displayConditions: { - showOnInit: true, - showOnExitIntent: false, - showDelay: 0, - hideAfter: 0, - displayWhenElementVisible: '', - scrollPercentageToDisplay: 0 - } - }; + var cov_mxrz945ze=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/globals/reset-widget-tracker.js",hash="06f4feddbacbb64f4f8de2a702f59c1fb684e080",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/globals/reset-widget-tracker.js",statementMap:{"0":{start:{line:11,column:2},end:{line:11,column:26}},"1":{start:{line:12,column:2},end:{line:12,column:25}},"2":{start:{line:13,column:2},end:{line:13,column:30}},"3":{start:{line:14,column:2},end:{line:14,column:30}},"4":{start:{line:15,column:2},end:{line:15,column:24}},"5":{start:{line:16,column:2},end:{line:16,column:28}},"6":{start:{line:18,column:2},end:{line:18,column:13}}},fnMap:{"0":{name:"resetWidgetTracker",decl:{start:{line:10,column:24},end:{line:10,column:42}},loc:{start:{line:10,column:49},end:{line:19,column:1}},line:10}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetWidgetTracker(obj){cov_mxrz945ze.f[0]++;cov_mxrz945ze.s[0]++;obj.delayedWidgets={};cov_mxrz945ze.s[1]++;obj.openedWidgets=[];cov_mxrz945ze.s[2]++;obj.initializedWidgets=[];cov_mxrz945ze.s[3]++;obj.prioritizedWidgets=[];cov_mxrz945ze.s[4]++;obj.readyWidgets=[];cov_mxrz945ze.s[5]++;obj.triggeredWidgets={};cov_mxrz945ze.s[6]++;return obj;} - obj.message = { - layout: 'modal', - position: '', - variant: '1', - okMessage: 'Confirm', - cancelMessage: 'Cancel', - okShow: true, - cancelShow: true - }; + var cov_15aj7uq486=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/globals/reset-data-object.js",hash="966c26e75cf81d58a79f86eac2961ee26abf5cef",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/globals/reset-data-object.js",statementMap:{"0":{start:{line:11,column:2},end:{line:11,column:20}},"1":{start:{line:12,column:2},end:{line:12,column:26}},"2":{start:{line:13,column:2},end:{line:13,column:25}},"3":{start:{line:14,column:2},end:{line:14,column:28}},"4":{start:{line:15,column:2},end:{line:15,column:28}},"5":{start:{line:16,column:2},end:{line:16,column:28}},"6":{start:{line:17,column:2},end:{line:17,column:27}},"7":{start:{line:19,column:2},end:{line:19,column:13}}},fnMap:{"0":{name:"resetDataObject",decl:{start:{line:10,column:24},end:{line:10,column:39}},loc:{start:{line:10,column:46},end:{line:20,column:1}},line:10}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetDataObject(obj){cov_15aj7uq486.f[0]++;cov_15aj7uq486.s[0]++;obj.pageViews=0;cov_15aj7uq486.s[1]++;obj.timeSpentOnPage=0;cov_15aj7uq486.s[2]++;obj.closedWidgets=[];cov_15aj7uq486.s[3]++;obj.completedActions=[];cov_15aj7uq486.s[4]++;obj.cancelledActions=[];cov_15aj7uq486.s[5]++;obj.displayedWidgets=[];cov_15aj7uq486.s[6]++;obj.abTestingGroups=[];cov_15aj7uq486.s[7]++;return obj;} - obj.subscription = { - layout: 'modal', - position: '', - variant: '1', - placeholders: { - email: 'Email' - }, - okMessage: 'Confirm', - cancelMessage: 'Cancel', - okShow: true, - cancelShow: true - }; + var cov_f2xbatb8f=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/ab-test/create-preset.js",hash="df3bd8f8e4aaef11cb71bb0263f5279ad2b63938",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/create-preset.js",statementMap:{"0":{start:{line:11,column:15},end:{line:11,column:17}},"1":{start:{line:13,column:2},end:{line:15,column:3}},"2":{start:{line:14,column:4},end:{line:14,column:30}},"3":{start:{line:17,column:18},end:{line:19,column:4}},"4":{start:{line:18,column:4},end:{line:18,column:25}},"5":{start:{line:22,column:2},end:{line:28,column:3}},"6":{start:{line:23,column:25},end:{line:23,column:38}},"7":{start:{line:25,column:4},end:{line:27,column:7}},"8":{start:{line:26,column:6},end:{line:26,column:38}},"9":{start:{line:30,column:2},end:{line:33,column:4}}},fnMap:{"0":{name:"createABTestingModePreset",decl:{start:{line:10,column:24},end:{line:10,column:49}},loc:{start:{line:10,column:53},end:{line:34,column:1}},line:10},"1":{name:"(anonymous_1)",decl:{start:{line:17,column:32},end:{line:17,column:33}},loc:{start:{line:17,column:56},end:{line:19,column:3}},line:17},"2":{name:"(anonymous_2)",decl:{start:{line:25,column:24},end:{line:25,column:25}},loc:{start:{line:25,column:43},end:{line:27,column:5}},line:25}},branchMap:{"0":{loc:{start:{line:22,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:28,column:3}},{start:{line:22,column:2},end:{line:28,column:3}}],line:22}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},f:{"0":0,"1":0,"2":0},b:{"0":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function createABTestingModePreset(){cov_f2xbatb8f.f[0]++;var groups=(cov_f2xbatb8f.s[0]++,[]);cov_f2xbatb8f.s[1]++;for(var i=0;i1){cov_f2xbatb8f.b[0][0]++;var groupsSumRatio=(cov_f2xbatb8f.s[6]++,1/groupsSum);cov_f2xbatb8f.s[7]++;groups=groups.map(function(element){cov_f2xbatb8f.f[2]++;cov_f2xbatb8f.s[8]++;return element*groupsSumRatio;});}else{cov_f2xbatb8f.b[0][1]++;}cov_f2xbatb8f.s[9]++;return {groups:groups,groupsNumber:groups.length};} - obj.form = { - layout: 'modal', - position: '', - variant: '1', - placeholders: { - name: 'Name', - title: 'Title', - email: 'Email', - message: 'Message', - company: 'Company', - phone: 'Phone Number', - country: 'Country', - referralEmail: 'Referral Email' - }, - required: { - name: true, - email: true - }, - fields: { - company: false, - phone: false, - country: false, - referralEmail: false - }, - okMessage: 'Send', - okShow: true, - cancelMessage: 'Cancel', - cancelShow: true - }; - - - obj.sitegate = { - layout: 'modal', - position: '', - variant: '1', - placeholders: { - name: 'Name', - title: 'Title', - email: 'Email', - message: 'Message', - company: 'Company', - phone: 'Phone Number', - country: 'Country', - referralEmail: 'Referral Email' - }, - required: { - name: true, - email: true - }, - fields: { - message: false, - phone: false, - country: false, - referralEmail: false - }, - okMessage: 'Submit', - okShow: true, - cancelShow: false, - showForm: true - }; - - return obj; - } - - /** @module pathfora/globals/reset-widget-tracker */ - - /** - * Reset the widgetTracker to an empty state - * - * @exports resetDefaultProps - * @params {object} obj - * @returns {object} obj - */ - function resetWidgetTracker (obj) { - obj.delayedWidgets = {}; - obj.openedWidgets = []; - obj.initializedWidgets = []; - obj.prioritizedWidgets = []; - obj.readyWidgets = []; - obj.triggeredWidgets = {}; - - return obj; - } - - /** @module pathfora/globals/reset-data-object */ - - /** - * Reset the pathforaDataObject to an empty state - * - * @exports resetDataObject - * @params {object} obj - * @returns {object} obj - */ - function resetDataObject (obj) { - obj.pageViews = 0; - obj.timeSpentOnPage = 0; - obj.closedWidgets = []; - obj.completedActions = []; - obj.cancelledActions = []; - obj.displayedWidgets = []; - obj.abTestingGroups = []; - - return obj; - } - - /* module pathfora/ab-test/create-preset */ - - /** - * Creates A/B test group distrubutions - * - * @exports createABTestingModePreset - * @params {int} a/b values - * @returns {object} - */ - function createABTestingModePreset () { - var groups = []; - - for (var i = 0; i < arguments.length; i++) { - groups.push(arguments[i]); - } - - var groupsSum = groups.reduce(function (sum, element) { - return sum + element; - }); - - // NOTE If groups collapse into a number greater than 1, normalize - if (groupsSum > 1) { - var groupsSumRatio = 1 / groupsSum; - - groups = groups.map(function (element) { - return element * groupsSumRatio; - }); - } - - return { - groups: groups, - groupsNumber: groups.length - }; - } - - /** @module pathfora/globals/config */ - - var PF_VERSION = '1.2.13', - PF_LOCALE = 'en-US', - PF_DATE_OPTIONS = {}, - PREFIX_REC = 'PathforaRecommend_', - PREFIX_UNLOCK = 'PathforaUnlocked_', - PREFIX_IMPRESSION = 'PathforaImpressions_', - PREFIX_TOTAL_IMPRESSIONS_SINCE = 'PathforaTotalImpressionsSince_', - PREFIX_CONFIRM = 'PathforaConfirm_', - PREFIX_CANCEL = 'PathforaCancel_', - PREFIX_CLOSE = 'PathforaClosed_', - PREFIX_AB_TEST = 'PathforaTest_', - PF_PAGEVIEWS = 'PathforaPageView', - DEFAULT_CHAR_LIMIT = 220, - DEFAULT_CHAR_LIMIT_STACK = 160, - WIDTH_BREAKPOINT = 650, - API_URL = '//api.lytics.io', - CSS_URL = '//c.lytics.io/static/pathfora.min.css', - ENTITY_FIELD_TEMPLATE_REGEX = '\\{{2}.*?\\}{2}', - ENTITY_FIELDS = ['msg', 'headline', 'image', 'confirmAction.callback'], - OPTIONS_PRIORITY_ORDERED = 'ordered', - OPTIONS_PRIORITY_UNORDERED = 'unordered'; - - var defaultPositions = { - modal: '', - slideout: 'bottom-left', - button: 'top-left', - bar: 'top-absolute' - }; - - var callbackTypes = { - INIT: 'widgetInitialized', - LOAD: 'widgetLoaded', - CLICK: 'buttonClicked', - FORM_SUBMIT: 'formSubmitted', - MODAL_OPEN: 'modalOpened', - MODAL_CLOSE: 'modalClosed', - MODAL_CONFIRM: 'modalConfirm', - MODAL_CANCEL: 'modalCancel' - }; - - var widgetTracker = resetWidgetTracker({}); - var defaultProps = resetDefaultProps({}); - var pathforaDataObject = resetDataObject({}); - - var abTestingTypes = { - '100': createABTestingModePreset(100), - '50/50': createABTestingModePreset(50, 50), - '80/20': createABTestingModePreset(80, 20) - }; - - /* eslint-disable quotes */ - var templates = { + var cov_2hz3lzeixl=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/globals/config.js',hash='e4025f65f72115bf5f9c9cdf8eaae1ac1c58d704',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/globals/config.js',statementMap:{'0':{start:{line:11,column:24},end:{line:11,column:32}},'1':{start:{line:12,column:16},end:{line:12,column:23}},'2':{start:{line:13,column:22},end:{line:13,column:24}},'3':{start:{line:14,column:17},end:{line:14,column:37}},'4':{start:{line:15,column:20},end:{line:15,column:39}},'5':{start:{line:16,column:24},end:{line:16,column:46}},'6':{start:{line:17,column:37},end:{line:17,column:69}},'7':{start:{line:18,column:21},end:{line:18,column:39}},'8':{start:{line:19,column:20},end:{line:19,column:37}},'9':{start:{line:20,column:19},end:{line:20,column:36}},'10':{start:{line:21,column:21},end:{line:21,column:36}},'11':{start:{line:22,column:19},end:{line:22,column:37}},'12':{start:{line:23,column:25},end:{line:23,column:28}},'13':{start:{line:24,column:31},end:{line:24,column:34}},'14':{start:{line:25,column:23},end:{line:25,column:26}},'15':{start:{line:26,column:14},end:{line:26,column:28}},'16':{start:{line:27,column:14},end:{line:27,column:28}},'17':{start:{line:28,column:34},end:{line:28,column:51}},'18':{start:{line:29,column:20},end:{line:29,column:74}},'19':{start:{line:30,column:31},end:{line:30,column:40}},'20':{start:{line:31,column:33},end:{line:31,column:44}},'21':{start:{line:33,column:30},end:{line:38,column:1}},'22':{start:{line:40,column:27},end:{line:49,column:1}},'23':{start:{line:51,column:27},end:{line:51,column:49}},'24':{start:{line:52,column:26},end:{line:52,column:47}},'25':{start:{line:53,column:32},end:{line:53,column:51}},'26':{start:{line:55,column:28},end:{line:59,column:1}},'27':{start:{line:62,column:23},end:{line:62,column:38}}},fnMap:{},branchMap:{},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var PF_VERSION=(cov_2hz3lzeixl.s[0]++,'1.2.13'),PF_LOCALE=(cov_2hz3lzeixl.s[1]++,'en-US'),PF_DATE_OPTIONS=(cov_2hz3lzeixl.s[2]++,{}),PREFIX_REC=(cov_2hz3lzeixl.s[3]++,'PathforaRecommend_'),PREFIX_UNLOCK=(cov_2hz3lzeixl.s[4]++,'PathforaUnlocked_'),PREFIX_IMPRESSION=(cov_2hz3lzeixl.s[5]++,'PathforaImpressions_'),PREFIX_TOTAL_IMPRESSIONS_SINCE=(cov_2hz3lzeixl.s[6]++,'PathforaTotalImpressionsSince_'),PREFIX_CONFIRM=(cov_2hz3lzeixl.s[7]++,'PathforaConfirm_'),PREFIX_CANCEL=(cov_2hz3lzeixl.s[8]++,'PathforaCancel_'),PREFIX_CLOSE=(cov_2hz3lzeixl.s[9]++,'PathforaClosed_'),PREFIX_AB_TEST=(cov_2hz3lzeixl.s[10]++,'PathforaTest_'),PF_PAGEVIEWS=(cov_2hz3lzeixl.s[11]++,'PathforaPageView'),DEFAULT_CHAR_LIMIT=(cov_2hz3lzeixl.s[12]++,220),DEFAULT_CHAR_LIMIT_STACK=(cov_2hz3lzeixl.s[13]++,160),WIDTH_BREAKPOINT=(cov_2hz3lzeixl.s[14]++,650),API_URL=(cov_2hz3lzeixl.s[15]++,'//api.lytics.io'),CSS_URL=(cov_2hz3lzeixl.s[16]++,'//c.lytics.io/static/pathfora.min.css'),ENTITY_FIELD_TEMPLATE_REGEX=(cov_2hz3lzeixl.s[17]++,'\\{{2}.*?\\}{2}'),ENTITY_FIELDS=(cov_2hz3lzeixl.s[18]++,['msg','headline','image','confirmAction.callback']),OPTIONS_PRIORITY_ORDERED=(cov_2hz3lzeixl.s[19]++,'ordered'),OPTIONS_PRIORITY_UNORDERED=(cov_2hz3lzeixl.s[20]++,'unordered');var defaultPositions=(cov_2hz3lzeixl.s[21]++,{modal:'',slideout:'bottom-left',button:'top-left',bar:'top-absolute'});var callbackTypes=(cov_2hz3lzeixl.s[22]++,{INIT:'widgetInitialized',LOAD:'widgetLoaded',CLICK:'buttonClicked',FORM_SUBMIT:'formSubmitted',MODAL_OPEN:'modalOpened',MODAL_CLOSE:'modalClosed',MODAL_CONFIRM:'modalConfirm',MODAL_CANCEL:'modalCancel'});var widgetTracker=(cov_2hz3lzeixl.s[23]++,resetWidgetTracker({}));var defaultProps=(cov_2hz3lzeixl.s[24]++,resetDefaultProps({}));var pathforaDataObject=(cov_2hz3lzeixl.s[25]++,resetDataObject({}));var abTestingTypes=(cov_2hz3lzeixl.s[26]++,{'100':createABTestingModePreset(100),'50/50':createABTestingModePreset(50,50),'80/20':createABTestingModePreset(80,20)});var templates=(cov_2hz3lzeixl.s[27]++,{ 'subscription': { 'bar': '

', 'inline': '

', @@ -290,5293 +35,234 @@ 'assets': { 'lytics': 'lytics' } -}; - /* eslint-enable quotes */ - - /** @module pathfora/dom/window */ - - /** @module pathfora/dom/document */ - - var document$1 = window.document; - - /** @module pathfora/dom/on-dom-ready */ - - function onDOMready (fn) { - var handler, - pf = this, - hack = document$1.documentElement.doScroll, - domContentLoaded = 'DOMContentLoaded', - loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(document$1.readyState); - - if (!loaded) { - document$1.addEventListener(domContentLoaded, handler = function () { - document$1.removeEventListener(domContentLoaded, handler); - pf.DOMLoaded = true; - fn(); - }); - } else { - pf.DOMLoaded = true; - fn(); - } - } - - /** @module pathfora/utils/escape-regex */ - - /** - * Ensure that a string does not contain regex - * - * @exports escapeURI - * @params {regex} s - * @returns {string} regex - */ - function escapeRegex (s) { - return String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); - } - - /** @module pathfora/utils/class/remove-class */ - - /** - * Remove a class from an HTML element - * - * @exports removeClass - * @params {object} DOMNode - * @params {string} className - */ - function removeClass (DOMNode, className) { - var findClassRegexp = new RegExp([ - '(^|\\b)', - escapeRegex(className.split(' ').join('|')), - '(\\b|$)' - ].join(''), 'gi'); - DOMNode.className = DOMNode.className.replace(findClassRegexp, ' '); - } - - /** @module pathfora/utils/class/add-class */ - - /** - * Add a class to an HTML element - * - * @exports addClass - * @params {object} DOMNode - * @params {string} className - */ - function addClass (DOMNode, className) { - removeClass(DOMNode, className); - - DOMNode.className = [ - DOMNode.className, - className - ].join(' '); - } - - /** @module pathfora/utils/class/has-class */ - - /** - * Check if an HTML element has a class - * - * @exports hasClass - * @params {object} DOMNode - * @params {string} className - * @params {boolean} - */ - function hasClass (DOMNode, className) { - return new RegExp('(^| )' + escapeRegex(className) + '( |$)', 'gi').test(DOMNode.className); - } - - /** @module pathfora/utils/decode-safe */ - - /** - * Try decoding a string, return original string - * if the decode fails. - * - * @exports decodeSafe - * @params {string} s - * @returns {string} decoded - */ - function decodeSafe (s) { - try { - return decodeURIComponent(s); - } catch (e) { - return s; - } - } - - /** @module pathfora/utils/cookie/read-cookie */ - - /** - * Get the value of a cookie - * - * @exports readCookie - * @params {string} name - * @returns {string} - */ - function readCookie (name) { - var cookies = document$1.cookie, - findCookieRegexp = cookies.match('(^|;)\\s*' + encodeURIComponent(escapeRegex(name)) + '\\s*=\\s*([^;]+)'); - - // legacy - check for cookie names that haven't been escaped - if (findCookieRegexp == null) { - findCookieRegexp = cookies.match('(^|;)\\s*' + escapeRegex(name) + '\\s*=\\s*([^;]+)'); - } - - if (findCookieRegexp != null) { - var val = findCookieRegexp.pop(); - - return decodeSafe(val); - } - - return null; - } - - /** @module pathfora/utils/cookie/save-cookie */ - - /** - * Set the value of a cookie - * - * @exports saveCookie - * @params {string} name - * @params {string} value - * @params {object} expiration - */ - function saveCookie (name, value, expiration) { - var expires; - - if (expiration) { - expires = '; expires=' + expiration.toUTCString(); - } else { - expires = '; expires=0'; - } - - document$1.cookie = [ - encodeURIComponent(name), - '=', - encodeURIComponent(value), - expires, - '; path = /' - ].join(''); - } - - /** @module pathfora/utils/cookie/delete-cookie */ - - /** - * Delete a cookie - * - * @exports deleteCookie - * @params {string} name - */ - function deleteCookie (name) { - var date = new Date('Thu, 01 Jan 1970 00:00:01 GMT'); - saveCookie(name, '', date); - } - - var PAYLOAD_KEY = '$'; - var EXPIRES_KEY = '@'; - var PATHFORA_IDENTIFIER = 'PATHFORA'; - - function safeJsonParse (json) { - try { - return JSON.parse(json); - } catch (e) { - // recover - } - } - - function isExpired (record) { - return Boolean(record[EXPIRES_KEY]) && Date.parse(record[EXPIRES_KEY]) < Date.now(); - } - function isCreatedByThisLib (record) { - return Boolean(record[PATHFORA_IDENTIFIER]); - } - - var expiringLocalStorage = { - getItem: function (key) { - var serialized = localStorage.getItem(key); - var record = safeJsonParse(serialized); - - if (record && EXPIRES_KEY in record) { - if (isExpired(record)) { - localStorage.removeItem(key); - return null; - } - if (PAYLOAD_KEY in record) { - // Extend the expiration date: - this.setItem(key, record[PAYLOAD_KEY]); - return record[PAYLOAD_KEY]; - } - } - return serialized; - }, - - setItem: function (key, payload, expiresOn) { - if (!expiresOn) { - expiresOn = new Date(); - expiresOn.setDate(expiresOn.getDate() + 365); - } - - var record = {}; - - record[PAYLOAD_KEY] = '' + payload; - record[EXPIRES_KEY] = expiresOn; - record[PATHFORA_IDENTIFIER] = PF_VERSION; // identify localStorage items created by this lib - - localStorage.setItem(key, JSON.stringify(record)); - }, - - removeItem: function (key) { - localStorage.removeItem(key); - }, - - ttl: function (key, payload, milliseconds) { - if (milliseconds !== +milliseconds) { - throw new Error('milliseconds must be a number!'); - } - var date = new Date(); - - date.setMilliseconds(date.getMilliseconds() + milliseconds); - - this.setItem(key, payload, date); - }, - - removeExpiredItems: function () { - for (var i = 0; i < localStorage.length; i++) { - var key = localStorage.key(i); - var record = safeJsonParse(localStorage.getItem(key)); - - if (record && isCreatedByThisLib(record) && isExpired(record)) { - localStorage.removeItem(key); - } - } - } - }; - - function write (key, value, expiration) { - expiringLocalStorage.setItem(key, value, expiration); - } - - /** @module pathfora/utils/is-not-encoded */ - - /** - * Check if a string is encoded or not. - * - * @exports isNotEncoded - * @params {string} s - * @returns {boolean} isNotEncoded - */ - function isNotEncoded (s) { - try { - return decodeURIComponent(s) === s && encodeURIComponent(s) !== s; - } catch (e) { - return false; - } - } - - /** @module pathfora/utils/cookie/update-legacy-cookies */ - - /** - * Update legacy cookies to - * encoded cookie values. - * - * @exports updateLegacyCookies - */ - function updateLegacyCookies () { - // We should update all cookies that have these prefixes. - var cookieFind = [ - PREFIX_REC, - PREFIX_UNLOCK, - PREFIX_IMPRESSION, - PREFIX_CONFIRM, - PREFIX_CANCEL, - PREFIX_CLOSE, - PREFIX_AB_TEST, - PF_PAGEVIEWS - ]; - - var i = 0; - - var filterFunc = function (c) { - return c.trim().indexOf(cookieFind[i]) === 0; - }; - - var cookieFunc = function (c) { - var split = c.trim().split('='); - - if (split.length === 2) { - var name = split[0]; - var val = split[1]; - - deleteCookie(name); - write(name, decodeSafe(val)); - } - }; - - var sessionFunc = function (c) { - var val = sessionStorage.getItem(c); - - if (isNotEncoded(val)) { - sessionStorage.removeItem(c); - sessionStorage.setItem(encodeURIComponent(c), encodeURIComponent(val)); - } - }; - - for (i = 0; i < cookieFind.length; i++) { - document$1.cookie.split(';').filter(filterFunc).forEach(cookieFunc); - Object.keys(sessionStorage).filter(filterFunc).forEach(sessionFunc); - } - } - - function read (key) { - var item = expiringLocalStorage.getItem(key); - - if (item == null) { - item = readCookie(key); - - if (item != null) { - deleteCookie(key); - expiringLocalStorage.setItem(key, item); - } - } - - return item; - } - - function erase (key) { - expiringLocalStorage.removeItem(key); - deleteCookie(key); - } - - /** @module pathfora/utils/scaffold/init-scaffold */ - - /** - * Initialize scaffold for Lytics controlled widgets - * - * @exports initWidgetScaffold - * @returns {object} scaffold - */ - function initWidgetScaffold () { - return { - target: [], - exclude: [], - inverse: [] - }; - } - - /** @module pathfora/utils/scaffold/insert-widget */ - - /** - * Insert a widget and targeting info into - * the widget scaffold - * - * @exports insertWidget - * @params {string} method - * @params {string} segment - * @params {object} widget - * @params {object} config - */ - function insertWidget (method, segment, widget, config) { - // assume that we need to add a new widget until proved otherwise - var subject, - makeNew = true; - - // make sure our scaffold is valid - if (!config.target) { - throw new Error('Invalid scaffold. No target array.'); - } - if (!config.exclude) { - throw new Error('Invalid scaffold. No exclude array.'); - } - if (!config.inverse) { - throw new Error('Invalid scaffold. No inverse array.'); - } - - if (method === 'target') { - subject = config.target; - } else if (method === 'exclude') { - subject = config.exclude; - } else { - throw new Error('Invalid method (' + method + ').'); - } - - for (var i = 0; i < subject.length; i++) { - var wgt = subject[i]; - - if (wgt.segment === segment) { - wgt.widgets.push(widget); - makeNew = false; - } - } - - if (makeNew) { - subject.push({ - 'segment': segment, - 'widgets': [widget] - }); - } - } - - /** @module pafthroa/utils/url/construct-queries */ - - /** - * Construct the params string for a url from an - * object containing key/values - * - * @exports constructQueries - * @params {object} params - * @returns {string} - */ - function constructQueries (params) { - var count = 0, - queries = []; - - for (var key in params) { - if (params.hasOwnProperty(key)) { - if (count !== 0) { - queries.push('&'); - } else { - queries.push('?'); - } - - if (params[key] instanceof Object) { - // multiple params []string (topics or rollups) - for (var i in params[key]) { - if (params[key].hasOwnProperty(i)) { - if (i < Object.keys(params[key]).length && i > 0) { - queries.push('&'); - } - - queries.push(key + '[]=' + params[key][i]); - } - } - - // single param - } else { - queries.push(key + '=' + params[key]); - } - - count++; - } - } - - return queries.join(''); - } - - /** @module pathfora/utils/url/escape-uri */ - - /** - * Escape URIs optionally without double-encoding - * - * @exports escapeURI - * @params {string} text - * @returns {object} options - * @returns {string} uri - */ - function escapeURI (text, options) { - // NOTE This was ported from various bits of C++ code from Chromium - options || (options = {}); - - var length = text.length, - escaped = [], - usePlus = options.usePlus || false, - keepEscaped = options.keepEscaped || false; - - function isHexDigit (c) { - return /[0-9A-Fa-f]/.test(c); - } - - function toHexDigit (i) { - return '0123456789ABCDEF'[i]; - } - - function containsChar (charMap, charCode) { - return (charMap[charCode >> 5] & (1 << (charCode & 31))) !== 0; - } - - function isURISeparator (c) { - return ['#', ':', ';', '/', '?', '$', '&', '+', ',', '@', '='].indexOf(c) !== -1; - } - - function shouldEscape (charText) { - return !isURISeparator(charText) && containsChar([ - 0xffffffff, 0xf80008fd, 0x78000001, 0xb8000001, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff - ], charText.charCodeAt(0)); - } - - for (var index = 0; index < length; index++) { - var charText = text[index], - charCode = text.charCodeAt(index); - - if (usePlus && charText === ' ') { - escaped.push('+'); - } else if (keepEscaped && charText === '%' && length >= index + 2 && - isHexDigit(text[index + 1]) && - isHexDigit(text[index + 2])) { - escaped.push('%'); - } else if (shouldEscape(charText)) { - escaped.push('%', - toHexDigit(charCode >> 4), - toHexDigit(charCode & 0xf)); - } else { - escaped.push(charText); - } - } - - return escaped.join(''); - } - - /** @module pathfora/utils/objects/update-object */ - - /** - * Merge two objects while preserving original fields - * - * @exports updateObject - * @params {object} object - * @params {object} config - */ - function updateObject (object, config) { - for (var prop in config) { - if (config.hasOwnProperty(prop) && typeof config[prop] === 'object' && config[prop] !== null && !Array.isArray(config[prop])) { - if (config.hasOwnProperty(prop)) { - if (typeof object[prop] === 'undefined') { - object[prop] = {}; - } - updateObject(object[prop], config[prop]); - } - } else if (config.hasOwnProperty(prop)) { - object[prop] = config[prop]; - } - } - } - - /** @module pathfora/utils/objects/set-object-value */ - - /** - * Set the value of a field on an object, supports - * nested objects using the key dot notation. - * - * @exports setObjectValue - * @params {object} object - * @params {string} key - * @params value - * @returns {object} - */ - function setObjectValue (object, key, value) { - var parent = object; - var fields = key.split('.'); - for (var i = 0; i < fields.length - 1; i++) { - var elem = fields[i]; - - if (!parent[elem]) { - parent[elem] = {}; - } - - parent = parent[elem]; - } - - parent[fields[fields.length - 1]] = value; - - return parent; - } - - /** @module pathfora/utils/objects/get-object-value */ - - /** - * Get the value of a field on an object, supports - * nested objects using the key dot notation. - * - * @exports getObjectValue - * @params {object} object - * @params {string} key - */ - function getObjectValue (object, key) { - var parent = object; - var fields = key.split('.'); - for (var i = 0; i < fields.length; i++) { - if (typeof parent !== 'undefined') { - parent = parent[fields[i]]; - } - } - - return parent; - } - - /** @module pathfora/utils/generate-unique-id */ - - /** - * Create a unique string identifier - * - * @exports generateUniqueId - * @returns {string} id - */ - function generateUniqueId () { - var s4 = function () { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - return [ - s4(), s4(), - '-', - s4(), - '-', - s4(), - '-', - s4(), - '-', - s4(), s4(), s4() - ].join(''); - } - - /** @module pathfora/utils/email-valid */ - - /** - * Validate that the string is a properly formatted email - * - * @exports emailValid - * @params {string} email - * @returns {boolean} valid - */ - function emailValid (email) { - var regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g; - return regex.test(email); - } - - /** @module pathfora/utils */ - - - /** - * Object containing utility functions - * - * @exports utils - */ - - var utils = { - // class - addClass: addClass, - hasClass: hasClass, - removeClass: removeClass, - - // cookies - readCookie: readCookie, - saveCookie: saveCookie, - deleteCookie: deleteCookie, - updateLegacyCookies: updateLegacyCookies, - - // persist - read: read, - write: write, - erase: erase, - store: expiringLocalStorage, - - // scaffold - initWidgetScaffold: initWidgetScaffold, - insertWidget: insertWidget, - - // url - constructQueries: constructQueries, - escapeURI: escapeURI, - - // objects - updateObject: updateObject, - setObjectValue: setObjectValue, - getObjectValue: getObjectValue, - - generateUniqueId: generateUniqueId, - escapeRegex: escapeRegex, - emailValid: emailValid, - decodeSafe: decodeSafe, - isNotEncoded: isNotEncoded - }; - - /** @module pathfora/data/tracking/get-data-object */ - - /** - * Get the pathfora data object - * - * @exports getDataObject - * @returns {object} pathforaDataObject - */ - function getDataObject () { - return pathforaDataObject; - } - - /** @module pathfora/callbacks/add-callback */ - - /** - * Add a function to be called once jstag is loaded - * - * @exports addCallack - * @params {function} cb - */ - function addCallback (cb) { - if (window.lio && window.lio.loaded) { - // legacy - cb(window.lio.data); - return; - } else if (window.jstag && typeof window.jstag.getEntity === 'function') { - if ('entityReady' in window.jstag) { - window.jstag.entityReady(function (e) { - if (e.data && e.data.user) { - cb(e.data.user); - } - }); - } else { - var entity = window.jstag.getEntity(); - if (entity.data && entity.data.user) { - cb(entity.data.user); - } - } - } - - // fallback - this.callbacks.push(cb); - } - - /** @module pathfora/display-conditions/pageviews/init-pageviews */ - - /** - * Track and update the number of pageviews - * - * @exports initializePageViews - */ - function initializePageViews () { - var cookie = read(PF_PAGEVIEWS); - - write(PF_PAGEVIEWS, Math.min(~~cookie, 9998) + 1); - } - - /** @module pathfora/display-conditions/impressions/impressions-checker */ - - /** - * Check if the widget has met the impressions - * display condition. - * - * @exports impressionsChecker - * @params {object} impressionConstraints - * @params {object} widget - * @params {boolean} valid - */ - function impressionsChecker (impressionConstraints, widget) { - var parts, - totalImpressions, - since, - id = PREFIX_IMPRESSION + widget.id, - sinceId = PREFIX_TOTAL_IMPRESSIONS_SINCE + widget.id, - sessionImpressions = ~~sessionStorage.getItem(id), - sessionImpressionsForAllWidgets = 0, - impressionsForAllWidgets = 0, - lastImpressionTimeForAllWidgets = 0, - total = read(id), - now = Date.now(); - - // retain backwards compatibility if using legacy method of: - impressionConstraints.widget = impressionConstraints.widget || {}; - impressionConstraints.global = impressionConstraints.global || {}; - - // migrate impressions.session to impressions.widget.session if not also set - if (typeof impressionConstraints.widget.session === 'undefined') { - impressionConstraints.widget.session = impressionConstraints.session; - } - // migrate impressions.total to impressions.widget.total if not also set - if (typeof impressionConstraints.widget.total === 'undefined') { - impressionConstraints.widget.total = impressionConstraints.total; - } - // migrate impressions.buffer to impressions.widget.buffer if not also set - if (typeof impressionConstraints.widget.buffer === 'undefined') { - impressionConstraints.widget.buffer = impressionConstraints.buffer; - } - - // maintain and overwrite the "total since" value for impressions.global.duration - if (impressionConstraints.global.total > 0 && impressionConstraints.global.duration > 0) { - since = read(sinceId); - - var resetImpressions = function () { - write( - sinceId, - '0|' + now, - widget.expiration - ); - }; - - if (!since) { - resetImpressions(); - } else { - parts = since.split('|'); - if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) >= impressionConstraints.global.duration) { - resetImpressions(); - } - } - } - - if (!sessionImpressions) { - sessionImpressions = 0; - } - - // check for impressions.widget.session - if (sessionImpressions >= impressionConstraints.widget.session) { - return false; - } - - // widget specific historic total - if (!total) { - totalImpressions = 0; - } else { - parts = total.split('|'); - totalImpressions = parseInt(parts[0], 10); - - // check for impressions.widget.buffer - if (typeof parts[1] !== 'undefined') { - if (impressionConstraints.widget.buffer > 0 && (Math.abs(parts[1] - now) / 1000 < impressionConstraints.widget.buffer)) { - return false; - } - - // check for impressions.widget.duration - if ( - impressionConstraints.widget.duration > 0 && - totalImpressions % impressionConstraints.widget.total === 0 && - Math.abs(parts[1] - now) / 1000 < impressionConstraints.widget.duration - ) { - return false; - } - } - } - - // check for impressions.widget.total - if (totalImpressions >= impressionConstraints.widget.total && typeof impressionConstraints.widget.duration === 'undefined') { - return false; - } - - // all widgets session total - if (impressionConstraints.global.session > 0) { - for (var i = 0; i < ~~sessionStorage.length; i++) { - var k = sessionStorage.key(i); - if (typeof k !== 'undefined' && k.includes(PREFIX_IMPRESSION)) { - sessionImpressionsForAllWidgets = - sessionImpressionsForAllWidgets + ~~sessionStorage.getItem(k); - } - } - } - - // check for impressions.global.session - if (sessionImpressionsForAllWidgets >= impressionConstraints.global.session) { - return false; - } - - // all widget multi-session total - if (impressionConstraints.global.total > 0 || impressionConstraints.global.buffer > 0) { - for (var j = 0; j < ~~localStorage.length; j++) { - var l = localStorage.key(j); - if (typeof l !== 'undefined' && l.includes(PREFIX_IMPRESSION)) { - parts = read(l).split('|'); - totalImpressions = parseInt(parts[0], 10); - impressionsForAllWidgets = impressionsForAllWidgets + totalImpressions; - - if (typeof parts[1] !== 'undefined') { - lastImpressionTimeForAllWidgets = Math.max(parts[1], lastImpressionTimeForAllWidgets); - } - } - } - - // check for impressions.global.buffer - if (lastImpressionTimeForAllWidgets > 0) { - if (impressionConstraints.global.buffer > 0 && (Math.abs(lastImpressionTimeForAllWidgets - now) / 1000 < impressionConstraints.global.buffer)) { - return false; - } - } - } - - // check for impressions.global.duration - if (impressionConstraints.global.duration > 0) { - since = read(sinceId); - parts = since.split('|'); - if (parts[0] >= impressionConstraints.global.total) { - return false; - } - } - - // check for impressions.global.total - if (impressionsForAllWidgets >= impressionConstraints.global.total && typeof impressionConstraints.global.duration === 'undefined') { - return false; - } - - return true; - } - - /** - * Censor an object by its keys, by comparing against an array of strings and/or regexps. In the case of strings, - * only exact matches are censored. For non-strings, if the object's test method returns true, the key will be censored. - * - * @param {object} data the data to censor - * @param {obejct} keysToReject an array of strings or regexps to censor the data by preparatory to sending - */ - function censorTrackingKeys (data, keysToReject) { - return Object.keys(data) - .filter(function (key) { - return !keysToReject.some(function (keyToReject) { - return typeof keyToReject === 'string' - ? key === keyToReject - : keyToReject.test(key); - }); - }) - .reduce(function (memo, key) { - memo[key] = data[key]; - return memo; - }, {}); - } - - /** @module pathfora/data/request/report-data */ - - /** - * Send data object to Lytics and GA - * - * @exports reportData - * @params {object} data - * @widget {object} - */ - function reportData (data, widget) { - var gaLabel, trackers; - - if (typeof jstag === 'object') { - window.jstag.send( - widget.censorTrackingKeys - ? censorTrackingKeys(data, widget.censorTrackingKeys) - : data - ); - } - - if (window.pathfora.enableGA === true && typeof window.ga === 'function' && typeof window.ga.getAll === 'function') { - gaLabel = data['pf-widget-action'] || data['pf-widget-event']; - trackers = window.ga.getAll(); - - for (var i = 0; i < trackers.length; i++) { - var name = trackers[i].get('name'); - - window.ga( - name + '.send', - 'event', - 'Lytics', - data['pf-widget-id'] + ' : ' + gaLabel, - '', - { - nonInteraction: true - } - ); - } - } - } - - /** @module pathfora/data/tracking/track-widget-action */ - - /** - * Format and track interaction events such as - * CTA clicks, form status, etc. - * - * @exports trackWidgetAction - * @params {string} action - * @params {object} widget - * @params {object} htmlElement - */ - function trackWidgetAction (action, widget, htmlElement) { - var child, elem, i; - - var params = { - 'pf-widget-id': widget.id, - 'pf-widget-type': widget.type, - 'pf-widget-layout': widget.layout, - 'pf-widget-variant': widget.variant - }; - - if (widget.recommend && widget.content && widget.content.length > 0) { - params['pf-widget-content'] = widget.content[0]; - } - - switch (action) { - case 'show': - pathforaDataObject.displayedWidgets.push(params); - break; - case 'close': - params['pf-widget-action'] = !!widget.closeAction && widget.closeAction.name || 'close'; - pathforaDataObject.closedWidgets.push(params); - break; - case 'confirm': - if (htmlElement && hasClass(htmlElement, 'pf-content-unit')) { - params['pf-widget-action'] = 'content recommendation'; - } else { - params['pf-widget-action'] = !!widget.confirmAction && widget.confirmAction.name || 'default confirm'; - pathforaDataObject.completedActions.push(params); - } - break; - case 'cancel': - params['pf-widget-action'] = !!widget.cancelAction && widget.cancelAction.name || 'default cancel'; - pathforaDataObject.cancelledActions.push(params); - break; - case 'success.confirm': - params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.success - && !!widget.formStates.success.confirmAction && widget.formStates.success.confirmAction.name || 'success confirm'; - pathforaDataObject.completedActions.push(params); - break; - case 'success.cancel': - params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.success - && !!widget.formStates.success.cancelAction && widget.formStates.success.cancelAction.name || 'success cancel'; - pathforaDataObject.cancelledActions.push(params); - break; - case 'error.confirm': - params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.error - && !!widget.formStates.error.confirmAction && widget.formStates.error.confirmAction.name || 'error confirm'; - pathforaDataObject.completedActions.push(params); - break; - case 'error.cancel': - params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.error - && !!widget.formStates.error.cancelAction && widget.formStates.error.cancelAction.name || 'error cancel'; - pathforaDataObject.cancelledActions.push(params); - break; - - case 'submit': - case 'unlock': - if (hasClass(htmlElement, 'pf-custom-form')) { - params['pf-custom-form'] = {}; - } - - for (elem in htmlElement.children) { - if (htmlElement.children.hasOwnProperty(elem)) { - child = htmlElement.children[elem]; - - if (hasClass(child, 'pf-widget-radio-group') || hasClass(child, 'pf-widget-checkbox-group')) { - var values = [], - name = '', - inputs = child.querySelectorAll('input'); - - for (i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if (input.checked) { - name = input.getAttribute('name'); - values.push(input.value); - } - } - - if (name !== '') { - params['pf-custom-form'][name] = values; - } - } else if (child && typeof child.getAttribute !== 'undefined' && child.getAttribute('name') !== null) { - params['pf-form-' + child.getAttribute('name')] = child.value; - } else if (hasClass(htmlElement, 'pf-custom-form') && child && child.querySelector) { - var val = child.querySelector('input, select, textarea'); - - if (val && typeof val.getAttribute !== 'undefined' && val.getAttribute('name') !== null) { - params['pf-custom-form'][val.getAttribute('name')] = val.value; - } - } - } - } - - if (action === 'unlock') { - write(PREFIX_UNLOCK + widget.id, true, widget.expiration); - } - - break; - case 'subscribe': - params['pf-form-email'] = htmlElement.elements.email.value; - break; - case 'hover': - if (hasClass(htmlElement, 'pf-content-unit')) { - params['pf-widget-action'] = 'content recommendation'; - } else if (hasClass(htmlElement, 'pf-widget-ok')) { - if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'success-state')) { - params['pf-widget-action'] = 'success.confirm'; - } else if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'error-state')) { - params['pf-widget-action'] = 'error.confirm'; - } else { - params['pf-widget-action'] = 'confirm'; - } - } else if (hasClass(htmlElement, 'pf-widget-cancel')) { - if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'success-state')) { - params['pf-widget-action'] = 'success.cancel'; - } else if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'error-state')) { - params['pf-widget-action'] = 'error.cancel'; - } else { - params['pf-widget-action'] = 'cancel'; - } - } else if (hasClass(htmlElement, 'pf-widget-close')) { - params['pf-widget-action'] = 'close'; - } - break; - case 'focus': - if (htmlElement && typeof htmlElement.getAttribute !== 'undefined' && htmlElement.getAttribute('name') !== null) { - params['pf-widget-action'] = htmlElement.getAttribute('name'); - } - break; - case 'form_start': - if (htmlElement && typeof htmlElement.getAttribute !== 'undefined' && htmlElement.getAttribute('name') !== null) { - params['pf-widget-action'] = htmlElement.getAttribute('name'); - } - break; - } - - params['pf-widget-event'] = action; - reportData(params, widget); - } - - /** @module pathfora/display-conditions/impressions/increment-impressions */ - - /** - * Increment the impression count for a widget - * - * @exports incrementImpressions - * @params {object} widget - */ - function incrementImpressions (widget) { - var parts, - totalImpressions, - id = PREFIX_IMPRESSION + widget.id, - sessionImpressions = ~~sessionStorage.getItem(id), - total = read(id), - now = Date.now(); - - if (!sessionImpressions) { - sessionImpressions = 1; - } else { - sessionImpressions += 1; - } - - if (!total) { - totalImpressions = 1; - } else { - parts = total.split('|'); - totalImpressions = parseInt(parts[0], 10) + 1; - } - - sessionStorage.setItem(id, sessionImpressions); - write(id, Math.min(totalImpressions, 9998) + '|' + now, widget.expiration); - - // increment the "total since" values for modals with the impressions.global.duration config option - for (var i = 0; i < ~~localStorage.length; i++) { - var k = localStorage.key(i); - if (typeof k !== 'undefined' && k.includes(PREFIX_TOTAL_IMPRESSIONS_SINCE)) { - parts = read(k).split('|'); - totalImpressions = parseInt(parts[0], 10) + 1; - write(k, totalImpressions + '|' + parts[1], widget.expiration); - } - } - } - - /** @module pathfora/validation/validate-widget-position */ - - /** - * Validate that the widget has correct position field - * for its layout and type - * - * @exports validateWidgetPosition - * @params {object} widget - * @params {object} config - */ - function validateWidgetPosition (widget, config) { - var choices; - - switch (config.layout) { - case 'modal': - choices = ['', 'middle-center']; - break; - case 'slideout': - choices = [ - 'bottom-left', - 'bottom-right', - 'left', - 'right', - 'top-left', - 'top-right' - ]; - break; - case 'bar': - choices = ['top-absolute', 'top-fixed', 'bottom-fixed', 'top-center', 'bottom-center']; - break; - case 'button': - choices = [ - 'left', - 'right', - 'top-left', - 'top-right', - 'bottom-left', - 'bottom-right' - ]; - break; - case 'inline': - choices = []; - break; - } - - if (choices.length && choices.indexOf(config.position) === -1) { - console.warn( - config.position + ' is not a valid position for ' + config.layout - ); - } - } - - /** @module pathfora/widgets/setup-widget-position */ - - /** - * Validate that the widget has correct position field, - * and choose the default if it does not - * - * @exports setupWidgetPostion - * @params {object} widget - * @params {object} config - */ - function setupWidgetPosition (widget, config) { - if (config.position) { - validateWidgetPosition(widget, config); - } else { - config.position = defaultPositions[config.layout]; - } - } - - /** @module pathfora/utils/date-valid */ - - /** - * Validate that the string is a valid date - * - * @exports dateValid - * @params {string} date - * @params {string} max - * @params {string} min - * @returns {boolean} valid - */ - function dateValid (date, max, min) { - var selectedDate = new Date(date).getTime(), - maxDate = max ? new Date(max).getTime() : undefined, - minDate = min ? new Date(min).getTime() : undefined; - - if (max && selectedDate > maxDate) { - return false; - } - - if (min && selectedDate < minDate) { - return false; - } - - return true; - } - - /** @module pathfora/widgets/close-widget */ +}); - /** - * Close a widget and remove it from the dom - * - * @exports closeWidget - * @params {string} id - * @params {boolean} noTrack - */ - function closeWidget (id, noTrack) { - var i, - node = document$1.getElementById(id); + var cov_1pwhx7fa55=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",hash="527f755cdde141e89e47867285e19f13d1284215",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}(); - // FIXME Change to Array#some or Array#filter - for (i = 0; i < widgetTracker.openedWidgets.length; i++) { - if (widgetTracker.openedWidgets[i].id === id) { - if (!noTrack) { - trackWidgetAction('close', widgetTracker.openedWidgets[i]); - } + var cov_i1b9vzuct=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/dom/document.js',hash='c65d2e4509ef22ec2e20b891da6233fa189f8d63',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/dom/document.js',statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var document$1 = window.document; - for (var key in widgetTracker.openedWidgets[i].listeners) { - if (widgetTracker.openedWidgets[i].listeners.hasOwnProperty(key)) { - var val = widgetTracker.openedWidgets[i].listeners[key]; - val.target.removeEventListener(val.type, val.fn); - } - } + var cov_10bydpew8k=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js',hash='e5a887164dfe246dafcc3ed2e58224d4f47801c2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js',statementMap:{'0':{start:{line:7,column:11},end:{line:7,column:15}},'1':{start:{line:8,column:13},end:{line:8,column:46}},'2':{start:{line:9,column:25},end:{line:9,column:43}},'3':{start:{line:10,column:15},end:{line:10,column:80}},'4':{start:{line:12,column:2},end:{line:21,column:3}},'5':{start:{line:13,column:4},end:{line:17,column:7}},'6':{start:{line:14,column:6},end:{line:14,column:62}},'7':{start:{line:15,column:6},end:{line:15,column:26}},'8':{start:{line:16,column:6},end:{line:16,column:11}},'9':{start:{line:19,column:4},end:{line:19,column:24}},'10':{start:{line:20,column:4},end:{line:20,column:9}}},fnMap:{'0':{name:'onDOMready',decl:{start:{line:5,column:24},end:{line:5,column:34}},loc:{start:{line:5,column:40},end:{line:22,column:1}},line:5},'1':{name:'(anonymous_1)',decl:{start:{line:13,column:58},end:{line:13,column:59}},loc:{start:{line:13,column:70},end:{line:17,column:5}},line:13}},branchMap:{'0':{loc:{start:{line:10,column:16},end:{line:10,column:53}},type:'cond-expr',locations:[{start:{line:10,column:23},end:{line:10,column:35}},{start:{line:10,column:38},end:{line:10,column:53}}],line:10},'1':{loc:{start:{line:12,column:2},end:{line:21,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:21,column:3}},{start:{line:12,column:2},end:{line:21,column:3}}],line:12}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function onDOMready(fn){cov_10bydpew8k.f[0]++;var handler,pf=(cov_10bydpew8k.s[0]++,this),hack=(cov_10bydpew8k.s[1]++,document$1.documentElement.doScroll),domContentLoaded=(cov_10bydpew8k.s[2]++,'DOMContentLoaded'),loaded=(cov_10bydpew8k.s[3]++,(hack?(cov_10bydpew8k.b[0][0]++,/^loaded|^c/):(cov_10bydpew8k.b[0][1]++,/^loaded|^i|^c/)).test(document$1.readyState));cov_10bydpew8k.s[4]++;if(!loaded){cov_10bydpew8k.b[1][0]++;cov_10bydpew8k.s[5]++;document$1.addEventListener(domContentLoaded,handler=function(){cov_10bydpew8k.f[1]++;cov_10bydpew8k.s[6]++;document$1.removeEventListener(domContentLoaded,handler);cov_10bydpew8k.s[7]++;pf.DOMLoaded=true;cov_10bydpew8k.s[8]++;fn();});}else{cov_10bydpew8k.b[1][1]++;cov_10bydpew8k.s[9]++;pf.DOMLoaded=true;cov_10bydpew8k.s[10]++;fn();}} - widgetTracker.openedWidgets.splice(i, 1); - break; - } - } + var cov_2izszmhq72=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js',hash='9672a0b353765779a59d989f58a23f3035bb7516',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js',statementMap:{'0':{start:{line:11,column:2},end:{line:11,column:58}}},fnMap:{'0':{name:'escapeRegex',decl:{start:{line:10,column:24},end:{line:10,column:35}},loc:{start:{line:10,column:40},end:{line:12,column:1}},line:10}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function escapeRegex(s){cov_2izszmhq72.f[0]++;cov_2izszmhq72.s[0]++;return String(s).replace(/[\\^$*+?.()|[\]{}]/g,'\\$&');} - removeClass(node, 'opened'); + var cov_1davc6kwab=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js',hash='af2b6a3c72edb825a75cf9ee73b16bd533be4472',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js',statementMap:{'0':{start:{line:13,column:24},end:{line:17,column:19}},'1':{start:{line:18,column:2},end:{line:18,column:70}}},fnMap:{'0':{name:'removeClass',decl:{start:{line:12,column:24},end:{line:12,column:35}},loc:{start:{line:12,column:57},end:{line:19,column:1}},line:12}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function removeClass(DOMNode,className){cov_1davc6kwab.f[0]++;var findClassRegexp=(cov_1davc6kwab.s[0]++,new RegExp(['(^|\\b)',escapeRegex(className.split(' ').join('|')),'(\\b|$)'].join(''),'gi'));cov_1davc6kwab.s[1]++;DOMNode.className=DOMNode.className.replace(findClassRegexp,' ');} - if (hasClass(node, 'pf-has-push-down')) { - var pushDown = document$1.querySelector('.pf-push-down'); - if (pushDown) { - removeClass(pushDown, 'opened'); - } - } + var cov_5fghwnxwd=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js',hash='bc64b7e7bc5f38f1a5ee4dcbab1f4e3ef2fa8240',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:34}},'1':{start:{line:15,column:2},end:{line:18,column:14}}},fnMap:{'0':{name:'addClass',decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:54},end:{line:19,column:1}},line:12}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function addClass(DOMNode,className){cov_5fghwnxwd.f[0]++;cov_5fghwnxwd.s[0]++;removeClass(DOMNode,className);cov_5fghwnxwd.s[1]++;DOMNode.className=[DOMNode.className,className].join(' ');} - // FIXME 500 - magical number - setTimeout(function () { - if (node && node.parentNode) { - node.parentNode.removeChild(node); + var cov_1nj3lzeysl=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js',hash='1b19d272ca97fd27026e8edda647250432c9e60b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js',statementMap:{'0':{start:{line:14,column:2},end:{line:14,column:94}}},fnMap:{'0':{name:'hasClass',decl:{start:{line:13,column:24},end:{line:13,column:32}},loc:{start:{line:13,column:54},end:{line:15,column:1}},line:13}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function hasClass(DOMNode,className){cov_1nj3lzeysl.f[0]++;cov_1nj3lzeysl.s[0]++;return new RegExp('(^| )'+escapeRegex(className)+'( |$)','gi').test(DOMNode.className);} - for (i = 0; i < widgetTracker.initializedWidgets.length; i++) { - if (widgetTracker.initializedWidgets[i] === id) { - widgetTracker.initializedWidgets.splice(i, 1); - } - } - } - }, 500); - } + var cov_1cd7cp9751=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",hash="f3a0b5e86f52c2bc4177b242aaae0316e462ea14",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",statementMap:{"0":{start:{line:12,column:2},end:{line:16,column:3}},"1":{start:{line:13,column:4},end:{line:13,column:33}},"2":{start:{line:15,column:4},end:{line:15,column:13}}},fnMap:{"0":{name:"decodeSafe",decl:{start:{line:11,column:24},end:{line:11,column:34}},loc:{start:{line:11,column:39},end:{line:17,column:1}},line:11}},branchMap:{},s:{"0":0,"1":0,"2":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function decodeSafe(s){cov_1cd7cp9751.f[0]++;cov_1cd7cp9751.s[0]++;try{cov_1cd7cp9751.s[1]++;return decodeURIComponent(s);}catch(e){cov_1cd7cp9751.s[2]++;return s;}} - /** @module pathfora/form/handle-form-states */ + var cov_1gcrmlam4i=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js',hash='abdbad47d914cdfe3840e45f0e7116e832b6677d',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js',statementMap:{'0':{start:{line:18,column:16},end:{line:18,column:31}},'1':{start:{line:19,column:25},end:{line:19,column:112}},'2':{start:{line:22,column:2},end:{line:24,column:3}},'3':{start:{line:23,column:4},end:{line:23,column:91}},'4':{start:{line:26,column:2},end:{line:30,column:3}},'5':{start:{line:27,column:14},end:{line:27,column:36}},'6':{start:{line:29,column:4},end:{line:29,column:27}},'7':{start:{line:32,column:2},end:{line:32,column:14}}},fnMap:{'0':{name:'readCookie',decl:{start:{line:17,column:24},end:{line:17,column:34}},loc:{start:{line:17,column:42},end:{line:33,column:1}},line:17}},branchMap:{'0':{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22},'1':{loc:{start:{line:26,column:2},end:{line:30,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:30,column:3}},{start:{line:26,column:2},end:{line:30,column:3}}],line:26}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function readCookie(name){cov_1gcrmlam4i.f[0]++;var cookies=(cov_1gcrmlam4i.s[0]++,document$1.cookie),findCookieRegexp=(cov_1gcrmlam4i.s[1]++,cookies.match('(^|;)\\s*'+encodeURIComponent(escapeRegex(name))+'\\s*=\\s*([^;]+)'));cov_1gcrmlam4i.s[2]++;if(findCookieRegexp==null){cov_1gcrmlam4i.b[0][0]++;cov_1gcrmlam4i.s[3]++;findCookieRegexp=cookies.match('(^|;)\\s*'+escapeRegex(name)+'\\s*=\\s*([^;]+)');}else{cov_1gcrmlam4i.b[0][1]++;}cov_1gcrmlam4i.s[4]++;if(findCookieRegexp!=null){cov_1gcrmlam4i.b[1][0]++;var val=(cov_1gcrmlam4i.s[5]++,findCookieRegexp.pop());cov_1gcrmlam4i.s[6]++;return decodeSafe(val);}else{cov_1gcrmlam4i.b[1][1]++;}cov_1gcrmlam4i.s[7]++;return null;} - /** - * Handles showing the success or error state of a form. - * - * @exports handleFormStates - * @params {boolean} successful - * @params {object} widget - * @params {object} config - */ - function handleFormStates (successful, widget, config) { - if (config.formStates) { - var delay = 0; + var cov_1ykawmhecv=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js',hash='189688cc883d2d348d321d4d99884f004b004228',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js',statementMap:{'0':{start:{line:16,column:2},end:{line:20,column:3}},'1':{start:{line:17,column:4},end:{line:17,column:54}},'2':{start:{line:19,column:4},end:{line:19,column:28}},'3':{start:{line:22,column:2},end:{line:28,column:13}}},fnMap:{'0':{name:'saveCookie',decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:61},end:{line:29,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:20,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:20,column:3}},{start:{line:16,column:2},end:{line:20,column:3}}],line:16}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function saveCookie(name,value,expiration){cov_1ykawmhecv.f[0]++;var expires;cov_1ykawmhecv.s[0]++;if(expiration){cov_1ykawmhecv.b[0][0]++;cov_1ykawmhecv.s[1]++;expires='; expires='+expiration.toUTCString();}else{cov_1ykawmhecv.b[0][1]++;cov_1ykawmhecv.s[2]++;expires='; expires=0';}cov_1ykawmhecv.s[3]++;document$1.cookie=[encodeURIComponent(name),'=',encodeURIComponent(value),expires,'; path = /'].join('');} - if (successful) { - addClass(widget, 'success'); - delay = config.formStates.success && typeof config.formStates.success.delay !== 'undefined' ? config.formStates.success.delay * 1000 : 3000; - } else { - addClass(widget, 'error'); - delay = config.formStates.error && typeof config.formStates.error.delay !== 'undefined' ? config.formStates.error.delay * 1000 : 3000; - } + var cov_259g0ccjov=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js',hash='1e40de4ae30d5133b30ef558131106377822421e',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js',statementMap:{'0':{start:{line:12,column:13},end:{line:12,column:54}},'1':{start:{line:13,column:2},end:{line:13,column:29}}},fnMap:{'0':{name:'deleteCookie',decl:{start:{line:11,column:24},end:{line:11,column:36}},loc:{start:{line:11,column:44},end:{line:14,column:1}},line:11}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function deleteCookie(name){cov_259g0ccjov.f[0]++;var date=(cov_259g0ccjov.s[0]++,new Date('Thu, 01 Jan 1970 00:00:01 GMT'));cov_259g0ccjov.s[1]++;saveCookie(name,'',date);} - if (delay > 0) { - setTimeout(function () { - closeWidget(widget.id, true); - }, delay); - } - } - } + var cov_ge5ip8ph0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js',hash='456c8431e84a81a68a91d3896ab3ad390e8ff602',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js',statementMap:{'0':{start:{line:2,column:18},end:{line:2,column:21}},'1':{start:{line:3,column:18},end:{line:3,column:21}},'2':{start:{line:4,column:26},end:{line:4,column:36}},'3':{start:{line:7,column:2},end:{line:11,column:3}},'4':{start:{line:8,column:4},end:{line:8,column:28}},'5':{start:{line:15,column:2},end:{line:15,column:86}},'6':{start:{line:18,column:2},end:{line:18,column:46}},'7':{start:{line:23,column:21},end:{line:23,column:46}},'8':{start:{line:24,column:17},end:{line:24,column:42}},'9':{start:{line:26,column:4},end:{line:36,column:5}},'10':{start:{line:27,column:6},end:{line:30,column:7}},'11':{start:{line:28,column:8},end:{line:28,column:37}},'12':{start:{line:29,column:8},end:{line:29,column:20}},'13':{start:{line:31,column:6},end:{line:35,column:7}},'14':{start:{line:33,column:8},end:{line:33,column:47}},'15':{start:{line:34,column:8},end:{line:34,column:35}},'16':{start:{line:37,column:4},end:{line:37,column:22}},'17':{start:{line:41,column:4},end:{line:44,column:5}},'18':{start:{line:42,column:6},end:{line:42,column:29}},'19':{start:{line:43,column:6},end:{line:43,column:51}},'20':{start:{line:46,column:17},end:{line:46,column:19}},'21':{start:{line:48,column:4},end:{line:48,column:39}},'22':{start:{line:49,column:4},end:{line:49,column:36}},'23':{start:{line:50,column:4},end:{line:50,column:45}},'24':{start:{line:52,column:4},end:{line:52,column:54}},'25':{start:{line:56,column:4},end:{line:56,column:33}},'26':{start:{line:60,column:4},end:{line:62,column:5}},'27':{start:{line:61,column:6},end:{line:61,column:56}},'28':{start:{line:63,column:15},end:{line:63,column:25}},'29':{start:{line:65,column:4},end:{line:65,column:64}},'30':{start:{line:67,column:4},end:{line:67,column:37}},'31':{start:{line:71,column:4},end:{line:78,column:5}},'32':{start:{line:72,column:16},end:{line:72,column:35}},'33':{start:{line:73,column:19},end:{line:73,column:59}},'34':{start:{line:75,column:6},end:{line:77,column:7}},'35':{start:{line:76,column:8},end:{line:76,column:37}}},fnMap:{'0':{name:'safeJsonParse',decl:{start:{line:6,column:9},end:{line:6,column:22}},loc:{start:{line:6,column:30},end:{line:12,column:1}},line:6},'1':{name:'isExpired',decl:{start:{line:14,column:9},end:{line:14,column:18}},loc:{start:{line:14,column:28},end:{line:16,column:1}},line:14},'2':{name:'isCreatedByThisLib',decl:{start:{line:17,column:9},end:{line:17,column:27}},loc:{start:{line:17,column:37},end:{line:19,column:1}},line:17},'3':{name:'(anonymous_3)',decl:{start:{line:22,column:11},end:{line:22,column:12}},loc:{start:{line:22,column:26},end:{line:38,column:3}},line:22},'4':{name:'(anonymous_4)',decl:{start:{line:40,column:11},end:{line:40,column:12}},loc:{start:{line:40,column:46},end:{line:53,column:3}},line:40},'5':{name:'(anonymous_5)',decl:{start:{line:55,column:14},end:{line:55,column:15}},loc:{start:{line:55,column:29},end:{line:57,column:3}},line:55},'6':{name:'(anonymous_6)',decl:{start:{line:59,column:7},end:{line:59,column:8}},loc:{start:{line:59,column:45},end:{line:68,column:3}},line:59},'7':{name:'(anonymous_7)',decl:{start:{line:70,column:22},end:{line:70,column:23}},loc:{start:{line:70,column:34},end:{line:79,column:3}},line:70}},branchMap:{'0':{loc:{start:{line:15,column:9},end:{line:15,column:85}},type:'binary-expr',locations:[{start:{line:15,column:9},end:{line:15,column:37}},{start:{line:15,column:41},end:{line:15,column:85}}],line:15},'1':{loc:{start:{line:26,column:4},end:{line:36,column:5}},type:'if',locations:[{start:{line:26,column:4},end:{line:36,column:5}},{start:{line:26,column:4},end:{line:36,column:5}}],line:26},'2':{loc:{start:{line:26,column:8},end:{line:26,column:39}},type:'binary-expr',locations:[{start:{line:26,column:8},end:{line:26,column:14}},{start:{line:26,column:18},end:{line:26,column:39}}],line:26},'3':{loc:{start:{line:27,column:6},end:{line:30,column:7}},type:'if',locations:[{start:{line:27,column:6},end:{line:30,column:7}},{start:{line:27,column:6},end:{line:30,column:7}}],line:27},'4':{loc:{start:{line:31,column:6},end:{line:35,column:7}},type:'if',locations:[{start:{line:31,column:6},end:{line:35,column:7}},{start:{line:31,column:6},end:{line:35,column:7}}],line:31},'5':{loc:{start:{line:41,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:44,column:5}},{start:{line:41,column:4},end:{line:44,column:5}}],line:41},'6':{loc:{start:{line:60,column:4},end:{line:62,column:5}},type:'if',locations:[{start:{line:60,column:4},end:{line:62,column:5}},{start:{line:60,column:4},end:{line:62,column:5}}],line:60},'7':{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:'if',locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},'8':{loc:{start:{line:75,column:10},end:{line:75,column:67}},type:'binary-expr',locations:[{start:{line:75,column:10},end:{line:75,column:16}},{start:{line:75,column:20},end:{line:75,column:46}},{start:{line:75,column:50},end:{line:75,column:67}}],line:75}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var PAYLOAD_KEY=(cov_ge5ip8ph0.s[0]++,'$');var EXPIRES_KEY=(cov_ge5ip8ph0.s[1]++,'@');var PATHFORA_IDENTIFIER=(cov_ge5ip8ph0.s[2]++,'PATHFORA');function safeJsonParse(json){cov_ge5ip8ph0.f[0]++;cov_ge5ip8ph0.s[3]++;try{cov_ge5ip8ph0.s[4]++;return JSON.parse(json);}catch(e){}}function isExpired(record){cov_ge5ip8ph0.f[1]++;cov_ge5ip8ph0.s[5]++;return (cov_ge5ip8ph0.b[0][0]++,Boolean(record[EXPIRES_KEY]))&&(cov_ge5ip8ph0.b[0][1]++,Date.parse(record[EXPIRES_KEY])0)){cov_2relrkaoki.b[4][0]++;cov_2relrkaoki.s[11]++;queries.push('&');}else{cov_2relrkaoki.b[4][1]++;}cov_2relrkaoki.s[12]++;queries.push(key+'[]='+params[key][i]);}else{cov_2relrkaoki.b[3][1]++;}}}else{cov_2relrkaoki.b[2][1]++;cov_2relrkaoki.s[13]++;queries.push(key+'='+params[key]);}cov_2relrkaoki.s[14]++;count++;}else{cov_2relrkaoki.b[0][1]++;}}cov_2relrkaoki.s[15]++;return queries.join('');} - /** @module pathfora/widgets/actions/buton-action */ + var cov_c2836m7g0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/url/escape-uri.js',hash='666b5dcabe558c2bd32efe9ef969ae1b0df8fa03',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/url/escape-uri.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:28}},'1':{start:{line:15,column:15},end:{line:15,column:26}},'2':{start:{line:16,column:16},end:{line:16,column:18}},'3':{start:{line:17,column:16},end:{line:17,column:40}},'4':{start:{line:18,column:20},end:{line:18,column:48}},'5':{start:{line:21,column:4},end:{line:21,column:33}},'6':{start:{line:25,column:4},end:{line:25,column:33}},'7':{start:{line:29,column:4},end:{line:29,column:67}},'8':{start:{line:33,column:4},end:{line:33,column:85}},'9':{start:{line:37,column:4},end:{line:40,column:31}},'10':{start:{line:43,column:2},end:{line:60,column:3}},'11':{start:{line:44,column:19},end:{line:44,column:30}},'12':{start:{line:45,column:19},end:{line:45,column:41}},'13':{start:{line:47,column:4},end:{line:59,column:5}},'14':{start:{line:48,column:6},end:{line:48,column:24}},'15':{start:{line:49,column:11},end:{line:59,column:5}},'16':{start:{line:52,column:6},end:{line:52,column:24}},'17':{start:{line:53,column:11},end:{line:59,column:5}},'18':{start:{line:54,column:6},end:{line:56,column:36}},'19':{start:{line:58,column:6},end:{line:58,column:29}},'20':{start:{line:62,column:2},end:{line:62,column:26}}},fnMap:{'0':{name:'escapeURI',decl:{start:{line:11,column:24},end:{line:11,column:33}},loc:{start:{line:11,column:50},end:{line:63,column:1}},line:11},'1':{name:'isHexDigit',decl:{start:{line:20,column:11},end:{line:20,column:21}},loc:{start:{line:20,column:26},end:{line:22,column:3}},line:20},'2':{name:'toHexDigit',decl:{start:{line:24,column:11},end:{line:24,column:21}},loc:{start:{line:24,column:26},end:{line:26,column:3}},line:24},'3':{name:'containsChar',decl:{start:{line:28,column:11},end:{line:28,column:23}},loc:{start:{line:28,column:44},end:{line:30,column:3}},line:28},'4':{name:'isURISeparator',decl:{start:{line:32,column:11},end:{line:32,column:25}},loc:{start:{line:32,column:30},end:{line:34,column:3}},line:32},'5':{name:'shouldEscape',decl:{start:{line:36,column:11},end:{line:36,column:23}},loc:{start:{line:36,column:35},end:{line:41,column:3}},line:36}},branchMap:{'0':{loc:{start:{line:13,column:2},end:{line:13,column:27}},type:'binary-expr',locations:[{start:{line:13,column:2},end:{line:13,column:9}},{start:{line:13,column:14},end:{line:13,column:26}}],line:13},'1':{loc:{start:{line:17,column:16},end:{line:17,column:40}},type:'binary-expr',locations:[{start:{line:17,column:16},end:{line:17,column:31}},{start:{line:17,column:35},end:{line:17,column:40}}],line:17},'2':{loc:{start:{line:18,column:20},end:{line:18,column:48}},type:'binary-expr',locations:[{start:{line:18,column:20},end:{line:18,column:39}},{start:{line:18,column:43},end:{line:18,column:48}}],line:18},'3':{loc:{start:{line:37,column:11},end:{line:40,column:30}},type:'binary-expr',locations:[{start:{line:37,column:11},end:{line:37,column:36}},{start:{line:37,column:40},end:{line:40,column:30}}],line:37},'4':{loc:{start:{line:47,column:4},end:{line:59,column:5}},type:'if',locations:[{start:{line:47,column:4},end:{line:59,column:5}},{start:{line:47,column:4},end:{line:59,column:5}}],line:47},'5':{loc:{start:{line:47,column:8},end:{line:47,column:35}},type:'binary-expr',locations:[{start:{line:47,column:8},end:{line:47,column:15}},{start:{line:47,column:19},end:{line:47,column:35}}],line:47},'6':{loc:{start:{line:49,column:11},end:{line:59,column:5}},type:'if',locations:[{start:{line:49,column:11},end:{line:59,column:5}},{start:{line:49,column:11},end:{line:59,column:5}}],line:49},'7':{loc:{start:{line:49,column:15},end:{line:51,column:35}},type:'binary-expr',locations:[{start:{line:49,column:15},end:{line:49,column:26}},{start:{line:49,column:30},end:{line:49,column:46}},{start:{line:49,column:50},end:{line:49,column:69}},{start:{line:50,column:8},end:{line:50,column:35}},{start:{line:51,column:8},end:{line:51,column:35}}],line:49},'8':{loc:{start:{line:53,column:11},end:{line:59,column:5}},type:'if',locations:[{start:{line:53,column:11},end:{line:59,column:5}},{start:{line:53,column:11},end:{line:59,column:5}}],line:53}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0,0,0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function escapeURI(text,options){cov_c2836m7g0.f[0]++;cov_c2836m7g0.s[0]++;(cov_c2836m7g0.b[0][0]++,options)||(cov_c2836m7g0.b[0][1]++,options={});var length=(cov_c2836m7g0.s[1]++,text.length),escaped=(cov_c2836m7g0.s[2]++,[]),usePlus=(cov_c2836m7g0.s[3]++,(cov_c2836m7g0.b[1][0]++,options.usePlus)||(cov_c2836m7g0.b[1][1]++,false)),keepEscaped=(cov_c2836m7g0.s[4]++,(cov_c2836m7g0.b[2][0]++,options.keepEscaped)||(cov_c2836m7g0.b[2][1]++,false));function isHexDigit(c){cov_c2836m7g0.f[1]++;cov_c2836m7g0.s[5]++;return /[0-9A-Fa-f]/.test(c);}function toHexDigit(i){cov_c2836m7g0.f[2]++;cov_c2836m7g0.s[6]++;return '0123456789ABCDEF'[i];}function containsChar(charMap,charCode){cov_c2836m7g0.f[3]++;cov_c2836m7g0.s[7]++;return (charMap[charCode>>5]&1<<(charCode&31))!==0;}function isURISeparator(c){cov_c2836m7g0.f[4]++;cov_c2836m7g0.s[8]++;return ['#',':',';','/','?','$','&','+',',','@','='].indexOf(c)!==-1;}function shouldEscape(charText){cov_c2836m7g0.f[5]++;cov_c2836m7g0.s[9]++;return (cov_c2836m7g0.b[3][0]++,!isURISeparator(charText))&&(cov_c2836m7g0.b[3][1]++,containsChar([0xffffffff,0xf80008fd,0x78000001,0xb8000001,0xffffffff,0xffffffff,0xffffffff,0xffffffff],charText.charCodeAt(0)));}cov_c2836m7g0.s[10]++;for(var index=0;index=index+2)&&(cov_c2836m7g0.b[7][3]++,isHexDigit(text[index+1]))&&(cov_c2836m7g0.b[7][4]++,isHexDigit(text[index+2]))){cov_c2836m7g0.b[6][0]++;cov_c2836m7g0.s[16]++;escaped.push('%');}else{cov_c2836m7g0.b[6][1]++;cov_c2836m7g0.s[17]++;if(shouldEscape(charText)){cov_c2836m7g0.b[8][0]++;cov_c2836m7g0.s[18]++;escaped.push('%',toHexDigit(charCode>>4),toHexDigit(charCode&0xf));}else{cov_c2836m7g0.b[8][1]++;cov_c2836m7g0.s[19]++;escaped.push(charText);}}}}cov_c2836m7g0.s[20]++;return escaped.join('');} - /** - * Execute any callbacks that were assigned - * to a button, and perform tracking - * - * @exports widgetOnModalClose - * @params {object} btn - * @params {string} type - * @params {object} config - * @params {object} widget - */ + var cov_2icmgm90ml=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js',hash='c7d53580168d40addc52029ff65f77de30c88bc5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js',statementMap:{'0':{start:{line:11,column:2},end:{line:22,column:3}},'1':{start:{line:12,column:4},end:{line:21,column:5}},'2':{start:{line:13,column:6},end:{line:18,column:7}},'3':{start:{line:14,column:8},end:{line:16,column:9}},'4':{start:{line:15,column:10},end:{line:15,column:28}},'5':{start:{line:17,column:8},end:{line:17,column:49}},'6':{start:{line:19,column:11},end:{line:21,column:5}},'7':{start:{line:20,column:6},end:{line:20,column:34}}},fnMap:{'0':{name:'updateObject',decl:{start:{line:10,column:24},end:{line:10,column:36}},loc:{start:{line:10,column:54},end:{line:23,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:12,column:4},end:{line:21,column:5}},type:'if',locations:[{start:{line:12,column:4},end:{line:21,column:5}},{start:{line:12,column:4},end:{line:21,column:5}}],line:12},'1':{loc:{start:{line:12,column:8},end:{line:12,column:128}},type:'binary-expr',locations:[{start:{line:12,column:8},end:{line:12,column:35}},{start:{line:12,column:39},end:{line:12,column:71}},{start:{line:12,column:75},end:{line:12,column:96}},{start:{line:12,column:100},end:{line:12,column:128}}],line:12},'2':{loc:{start:{line:13,column:6},end:{line:18,column:7}},type:'if',locations:[{start:{line:13,column:6},end:{line:18,column:7}},{start:{line:13,column:6},end:{line:18,column:7}}],line:13},'3':{loc:{start:{line:14,column:8},end:{line:16,column:9}},type:'if',locations:[{start:{line:14,column:8},end:{line:16,column:9}},{start:{line:14,column:8},end:{line:16,column:9}}],line:14},'4':{loc:{start:{line:19,column:11},end:{line:21,column:5}},type:'if',locations:[{start:{line:19,column:11},end:{line:21,column:5}},{start:{line:19,column:11},end:{line:21,column:5}}],line:19}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function updateObject(object,config){cov_2icmgm90ml.f[0]++;cov_2icmgm90ml.s[0]++;for(var prop in config){cov_2icmgm90ml.s[1]++;if((cov_2icmgm90ml.b[1][0]++,config.hasOwnProperty(prop))&&(cov_2icmgm90ml.b[1][1]++,typeof config[prop]==='object')&&(cov_2icmgm90ml.b[1][2]++,config[prop]!==null)&&(cov_2icmgm90ml.b[1][3]++,!Array.isArray(config[prop]))){cov_2icmgm90ml.b[0][0]++;cov_2icmgm90ml.s[2]++;if(config.hasOwnProperty(prop)){cov_2icmgm90ml.b[2][0]++;cov_2icmgm90ml.s[3]++;if(typeof object[prop]==='undefined'){cov_2icmgm90ml.b[3][0]++;cov_2icmgm90ml.s[4]++;object[prop]={};}else{cov_2icmgm90ml.b[3][1]++;}cov_2icmgm90ml.s[5]++;updateObject(object[prop],config[prop]);}else{cov_2icmgm90ml.b[2][1]++;}}else{cov_2icmgm90ml.b[0][1]++;cov_2icmgm90ml.s[6]++;if(config.hasOwnProperty(prop)){cov_2icmgm90ml.b[4][0]++;cov_2icmgm90ml.s[7]++;object[prop]=config[prop];}else{cov_2icmgm90ml.b[4][1]++;}}}} - function buttonAction (btn, type, config, widget) { - var prefix, callbackType, action, shouldClose; + var cov_1won452gfq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js',hash='befca9b830059b45158aa6ad58f6eb7b168d70a9',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js',statementMap:{'0':{start:{line:14,column:15},end:{line:14,column:21}},'1':{start:{line:15,column:15},end:{line:15,column:29}},'2':{start:{line:16,column:2},end:{line:24,column:3}},'3':{start:{line:17,column:15},end:{line:17,column:24}},'4':{start:{line:19,column:4},end:{line:21,column:5}},'5':{start:{line:20,column:6},end:{line:20,column:24}},'6':{start:{line:23,column:4},end:{line:23,column:26}},'7':{start:{line:26,column:2},end:{line:26,column:44}},'8':{start:{line:28,column:2},end:{line:28,column:16}}},fnMap:{'0':{name:'setObjectValue',decl:{start:{line:13,column:24},end:{line:13,column:38}},loc:{start:{line:13,column:60},end:{line:29,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:19,column:4},end:{line:21,column:5}},type:'if',locations:[{start:{line:19,column:4},end:{line:21,column:5}},{start:{line:19,column:4},end:{line:21,column:5}}],line:19}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setObjectValue(object,key,value){cov_1won452gfq.f[0]++;var parent=(cov_1won452gfq.s[0]++,object);var fields=(cov_1won452gfq.s[1]++,key.split('.'));cov_1won452gfq.s[2]++;for(var i=0;i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g);cov_1rcyjk6pkr.s[1]++;return regex.test(email);} - break; - case 'confirm': - case 'success.confirm': - case 'error.confirm': - prefix = PREFIX_CONFIRM; - shouldClose = config.layout !== 'inline'; + var cov_23yxsekd49=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js',hash='1cf858a24e43f2bfe227b4ce00fbce848a684557',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js',statementMap:{'0':{start:{line:46,column:19},end:{line:82,column:1}}},fnMap:{},branchMap:{},s:{'0':0},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var utils=(cov_23yxsekd49.s[0]++,{addClass:addClass,hasClass:hasClass,removeClass:removeClass,readCookie:readCookie,saveCookie:saveCookie,deleteCookie:deleteCookie,updateLegacyCookies:updateLegacyCookies,read:read,write:write,erase:erase,store:expiringLocalStorage,initWidgetScaffold:initWidgetScaffold,insertWidget:insertWidget,constructQueries:constructQueries,escapeURI:escapeURI,updateObject:updateObject,setObjectValue:setObjectValue,getObjectValue:getObjectValue,generateUniqueId:generateUniqueId,escapeRegex:escapeRegex,emailValid:emailValid,decodeSafe:decodeSafe,isNotEncoded:isNotEncoded}); - if (type === 'success.confirm') { - action = config.formStates.success.confirmAction; - } - if (type === 'error.confirm') { - action = config.formStates.error.confirmAction; - } + var cov_2jnbb0xxj6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/data/tracking/get-data-object.js',hash='4a0276004d4fe9fd40c6eae6b982ac6c67dd1b3f',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/data/tracking/get-data-object.js',statementMap:{'0':{start:{line:12,column:2},end:{line:12,column:28}}},fnMap:{'0':{name:'getDataObject',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:41},end:{line:13,column:1}},line:11}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function getDataObject(){cov_2jnbb0xxj6.f[0]++;cov_2jnbb0xxj6.s[0]++;return pathforaDataObject;} - break; - } + var cov_v3662jjz8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/callbacks/add-callback.js',hash='1bd0f60577271e4eee0dc1fb3583e4992beb5812',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/callbacks/add-callback.js',statementMap:{'0':{start:{line:12,column:2},end:{line:29,column:3}},'1':{start:{line:14,column:4},end:{line:14,column:24}},'2':{start:{line:15,column:4},end:{line:15,column:11}},'3':{start:{line:16,column:9},end:{line:29,column:3}},'4':{start:{line:17,column:4},end:{line:28,column:5}},'5':{start:{line:18,column:6},end:{line:22,column:9}},'6':{start:{line:19,column:8},end:{line:21,column:9}},'7':{start:{line:20,column:10},end:{line:20,column:26}},'8':{start:{line:24,column:19},end:{line:24,column:43}},'9':{start:{line:25,column:6},end:{line:27,column:7}},'10':{start:{line:26,column:8},end:{line:26,column:29}},'11':{start:{line:32,column:2},end:{line:32,column:26}}},fnMap:{'0':{name:'addCallback',decl:{start:{line:11,column:24},end:{line:11,column:35}},loc:{start:{line:11,column:41},end:{line:33,column:1}},line:11},'1':{name:'(anonymous_1)',decl:{start:{line:18,column:31},end:{line:18,column:32}},loc:{start:{line:18,column:44},end:{line:22,column:7}},line:18}},branchMap:{'0':{loc:{start:{line:12,column:2},end:{line:29,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:29,column:3}},{start:{line:12,column:2},end:{line:29,column:3}}],line:12},'1':{loc:{start:{line:12,column:6},end:{line:12,column:37}},type:'binary-expr',locations:[{start:{line:12,column:6},end:{line:12,column:16}},{start:{line:12,column:20},end:{line:12,column:37}}],line:12},'2':{loc:{start:{line:16,column:9},end:{line:29,column:3}},type:'if',locations:[{start:{line:16,column:9},end:{line:29,column:3}},{start:{line:16,column:9},end:{line:29,column:3}}],line:16},'3':{loc:{start:{line:16,column:13},end:{line:16,column:73}},type:'binary-expr',locations:[{start:{line:16,column:13},end:{line:16,column:25}},{start:{line:16,column:29},end:{line:16,column:73}}],line:16},'4':{loc:{start:{line:17,column:4},end:{line:28,column:5}},type:'if',locations:[{start:{line:17,column:4},end:{line:28,column:5}},{start:{line:17,column:4},end:{line:28,column:5}}],line:17},'5':{loc:{start:{line:19,column:8},end:{line:21,column:9}},type:'if',locations:[{start:{line:19,column:8},end:{line:21,column:9}},{start:{line:19,column:8},end:{line:21,column:9}}],line:19},'6':{loc:{start:{line:19,column:12},end:{line:19,column:33}},type:'binary-expr',locations:[{start:{line:19,column:12},end:{line:19,column:18}},{start:{line:19,column:22},end:{line:19,column:33}}],line:19},'7':{loc:{start:{line:25,column:6},end:{line:27,column:7}},type:'if',locations:[{start:{line:25,column:6},end:{line:27,column:7}},{start:{line:25,column:6},end:{line:27,column:7}}],line:25},'8':{loc:{start:{line:25,column:10},end:{line:25,column:41}},type:'binary-expr',locations:[{start:{line:25,column:10},end:{line:25,column:21}},{start:{line:25,column:25},end:{line:25,column:41}}],line:25}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function addCallback(cb){cov_v3662jjz8.f[0]++;cov_v3662jjz8.s[0]++;if((cov_v3662jjz8.b[1][0]++,window.lio)&&(cov_v3662jjz8.b[1][1]++,window.lio.loaded)){cov_v3662jjz8.b[0][0]++;cov_v3662jjz8.s[1]++;cb(window.lio.data);cov_v3662jjz8.s[2]++;return;}else{cov_v3662jjz8.b[0][1]++;cov_v3662jjz8.s[3]++;if((cov_v3662jjz8.b[3][0]++,window.jstag)&&(cov_v3662jjz8.b[3][1]++,typeof window.jstag.getEntity==='function')){cov_v3662jjz8.b[2][0]++;cov_v3662jjz8.s[4]++;if('entityReady'in window.jstag){cov_v3662jjz8.b[4][0]++;cov_v3662jjz8.s[5]++;window.jstag.entityReady(function(e){cov_v3662jjz8.f[1]++;cov_v3662jjz8.s[6]++;if((cov_v3662jjz8.b[6][0]++,e.data)&&(cov_v3662jjz8.b[6][1]++,e.data.user)){cov_v3662jjz8.b[5][0]++;cov_v3662jjz8.s[7]++;cb(e.data.user);}else{cov_v3662jjz8.b[5][1]++;}});}else{cov_v3662jjz8.b[4][1]++;var entity=(cov_v3662jjz8.s[8]++,window.jstag.getEntity());cov_v3662jjz8.s[9]++;if((cov_v3662jjz8.b[8][0]++,entity.data)&&(cov_v3662jjz8.b[8][1]++,entity.data.user)){cov_v3662jjz8.b[7][0]++;cov_v3662jjz8.s[10]++;cb(entity.data.user);}else{cov_v3662jjz8.b[7][1]++;}}}else{cov_v3662jjz8.b[2][1]++;}}cov_v3662jjz8.s[11]++;this.callbacks.push(cb);} - btn.onmouseenter = function (event) { - trackWidgetAction('hover', config, event.target); - }; + var cov_2kwjmf8e58=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/init-pageviews.js',hash='90ec20681f14de647b7257201db2712b21fff4f2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/init-pageviews.js',statementMap:{'0':{start:{line:16,column:15},end:{line:16,column:33}},'1':{start:{line:18,column:2},end:{line:18,column:52}}},fnMap:{'0':{name:'initializePageViews',decl:{start:{line:15,column:24},end:{line:15,column:43}},loc:{start:{line:15,column:47},end:{line:19,column:1}},line:15}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializePageViews(){cov_2kwjmf8e58.f[0]++;var cookie=(cov_2kwjmf8e58.s[0]++,read(PF_PAGEVIEWS));cov_2kwjmf8e58.s[1]++;write(PF_PAGEVIEWS,Math.min(~~cookie,9998)+1);} - btn.onclick = function (event) { - trackWidgetAction(type, config); - updateActionCookie(prefix + widget.id, config.expiration); + var cov_hpbzwr9xi=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/impressions/impressions-checker.js',hash='91dd1506b5727ffcc45c54975f4dc45cc2691012',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/impressions/impressions-checker.js',statementMap:{'0':{start:{line:23,column:11},end:{line:23,column:40}},'1':{start:{line:24,column:16},end:{line:24,column:58}},'2':{start:{line:25,column:27},end:{line:25,column:55}},'3':{start:{line:26,column:40},end:{line:26,column:41}},'4':{start:{line:27,column:33},end:{line:27,column:34}},'5':{start:{line:28,column:40},end:{line:28,column:41}},'6':{start:{line:29,column:14},end:{line:29,column:22}},'7':{start:{line:30,column:12},end:{line:30,column:22}},'8':{start:{line:33,column:2},end:{line:33,column:68}},'9':{start:{line:34,column:2},end:{line:34,column:68}},'10':{start:{line:37,column:2},end:{line:39,column:3}},'11':{start:{line:38,column:4},end:{line:38,column:73}},'12':{start:{line:41,column:2},end:{line:43,column:3}},'13':{start:{line:42,column:4},end:{line:42,column:69}},'14':{start:{line:45,column:2},end:{line:47,column:3}},'15':{start:{line:46,column:4},end:{line:46,column:71}},'16':{start:{line:50,column:2},end:{line:69,column:3}},'17':{start:{line:51,column:4},end:{line:51,column:26}},'18':{start:{line:53,column:27},end:{line:59,column:5}},'19':{start:{line:54,column:6},end:{line:58,column:8}},'20':{start:{line:61,column:4},end:{line:68,column:5}},'21':{start:{line:62,column:6},end:{line:62,column:25}},'22':{start:{line:64,column:6},end:{line:64,column:31}},'23':{start:{line:65,column:6},end:{line:67,column:7}},'24':{start:{line:66,column:8},end:{line:66,column:27}},'25':{start:{line:71,column:2},end:{line:73,column:3}},'26':{start:{line:72,column:4},end:{line:72,column:27}},'27':{start:{line:76,column:2},end:{line:78,column:3}},'28':{start:{line:77,column:4},end:{line:77,column:17}},'29':{start:{line:81,column:2},end:{line:102,column:3}},'30':{start:{line:82,column:4},end:{line:82,column:25}},'31':{start:{line:84,column:4},end:{line:84,column:29}},'32':{start:{line:85,column:4},end:{line:85,column:46}},'33':{start:{line:88,column:4},end:{line:101,column:5}},'34':{start:{line:89,column:6},end:{line:91,column:7}},'35':{start:{line:90,column:8},end:{line:90,column:21}},'36':{start:{line:94,column:6},end:{line:100,column:7}},'37':{start:{line:99,column:8},end:{line:99,column:21}},'38':{start:{line:105,column:2},end:{line:107,column:3}},'39':{start:{line:106,column:4},end:{line:106,column:17}},'40':{start:{line:110,column:2},end:{line:118,column:3}},'41':{start:{line:111,column:4},end:{line:117,column:5}},'42':{start:{line:112,column:14},end:{line:112,column:35}},'43':{start:{line:113,column:6},end:{line:116,column:7}},'44':{start:{line:114,column:8},end:{line:115,column:72}},'45':{start:{line:121,column:2},end:{line:123,column:3}},'46':{start:{line:122,column:4},end:{line:122,column:17}},'47':{start:{line:126,column:2},end:{line:146,column:3}},'48':{start:{line:127,column:4},end:{line:138,column:5}},'49':{start:{line:128,column:14},end:{line:128,column:33}},'50':{start:{line:129,column:6},end:{line:137,column:7}},'51':{start:{line:130,column:8},end:{line:130,column:35}},'52':{start:{line:131,column:8},end:{line:131,column:50}},'53':{start:{line:132,column:8},end:{line:132,column:79}},'54':{start:{line:134,column:8},end:{line:136,column:9}},'55':{start:{line:135,column:10},end:{line:135,column:96}},'56':{start:{line:141,column:4},end:{line:145,column:5}},'57':{start:{line:142,column:6},end:{line:144,column:7}},'58':{start:{line:143,column:8},end:{line:143,column:21}},'59':{start:{line:149,column:2},end:{line:155,column:3}},'60':{start:{line:150,column:4},end:{line:150,column:26}},'61':{start:{line:151,column:4},end:{line:151,column:29}},'62':{start:{line:152,column:4},end:{line:154,column:5}},'63':{start:{line:153,column:6},end:{line:153,column:19}},'64':{start:{line:158,column:2},end:{line:160,column:3}},'65':{start:{line:159,column:4},end:{line:159,column:17}},'66':{start:{line:162,column:2},end:{line:162,column:14}}},fnMap:{'0':{name:'impressionsChecker',decl:{start:{line:19,column:24},end:{line:19,column:42}},loc:{start:{line:19,column:75},end:{line:163,column:1}},line:19},'1':{name:'(anonymous_1)',decl:{start:{line:53,column:27},end:{line:53,column:28}},loc:{start:{line:53,column:39},end:{line:59,column:5}},line:53}},branchMap:{'0':{loc:{start:{line:33,column:33},end:{line:33,column:67}},type:'binary-expr',locations:[{start:{line:33,column:33},end:{line:33,column:61}},{start:{line:33,column:65},end:{line:33,column:67}}],line:33},'1':{loc:{start:{line:34,column:33},end:{line:34,column:67}},type:'binary-expr',locations:[{start:{line:34,column:33},end:{line:34,column:61}},{start:{line:34,column:65},end:{line:34,column:67}}],line:34},'2':{loc:{start:{line:37,column:2},end:{line:39,column:3}},type:'if',locations:[{start:{line:37,column:2},end:{line:39,column:3}},{start:{line:37,column:2},end:{line:39,column:3}}],line:37},'3':{loc:{start:{line:41,column:2},end:{line:43,column:3}},type:'if',locations:[{start:{line:41,column:2},end:{line:43,column:3}},{start:{line:41,column:2},end:{line:43,column:3}}],line:41},'4':{loc:{start:{line:45,column:2},end:{line:47,column:3}},type:'if',locations:[{start:{line:45,column:2},end:{line:47,column:3}},{start:{line:45,column:2},end:{line:47,column:3}}],line:45},'5':{loc:{start:{line:50,column:2},end:{line:69,column:3}},type:'if',locations:[{start:{line:50,column:2},end:{line:69,column:3}},{start:{line:50,column:2},end:{line:69,column:3}}],line:50},'6':{loc:{start:{line:50,column:6},end:{line:50,column:89}},type:'binary-expr',locations:[{start:{line:50,column:6},end:{line:50,column:44}},{start:{line:50,column:48},end:{line:50,column:89}}],line:50},'7':{loc:{start:{line:61,column:4},end:{line:68,column:5}},type:'if',locations:[{start:{line:61,column:4},end:{line:68,column:5}},{start:{line:61,column:4},end:{line:68,column:5}}],line:61},'8':{loc:{start:{line:65,column:6},end:{line:67,column:7}},type:'if',locations:[{start:{line:65,column:6},end:{line:67,column:7}},{start:{line:65,column:6},end:{line:67,column:7}}],line:65},'9':{loc:{start:{line:65,column:10},end:{line:65,column:119}},type:'binary-expr',locations:[{start:{line:65,column:10},end:{line:65,column:41}},{start:{line:65,column:45},end:{line:65,column:119}}],line:65},'10':{loc:{start:{line:71,column:2},end:{line:73,column:3}},type:'if',locations:[{start:{line:71,column:2},end:{line:73,column:3}},{start:{line:71,column:2},end:{line:73,column:3}}],line:71},'11':{loc:{start:{line:76,column:2},end:{line:78,column:3}},type:'if',locations:[{start:{line:76,column:2},end:{line:78,column:3}},{start:{line:76,column:2},end:{line:78,column:3}}],line:76},'12':{loc:{start:{line:81,column:2},end:{line:102,column:3}},type:'if',locations:[{start:{line:81,column:2},end:{line:102,column:3}},{start:{line:81,column:2},end:{line:102,column:3}}],line:81},'13':{loc:{start:{line:88,column:4},end:{line:101,column:5}},type:'if',locations:[{start:{line:88,column:4},end:{line:101,column:5}},{start:{line:88,column:4},end:{line:101,column:5}}],line:88},'14':{loc:{start:{line:89,column:6},end:{line:91,column:7}},type:'if',locations:[{start:{line:89,column:6},end:{line:91,column:7}},{start:{line:89,column:6},end:{line:91,column:7}}],line:89},'15':{loc:{start:{line:89,column:10},end:{line:89,column:124}},type:'binary-expr',locations:[{start:{line:89,column:10},end:{line:89,column:49}},{start:{line:89,column:54},end:{line:89,column:123}}],line:89},'16':{loc:{start:{line:94,column:6},end:{line:100,column:7}},type:'if',locations:[{start:{line:94,column:6},end:{line:100,column:7}},{start:{line:94,column:6},end:{line:100,column:7}}],line:94},'17':{loc:{start:{line:95,column:8},end:{line:97,column:79}},type:'binary-expr',locations:[{start:{line:95,column:8},end:{line:95,column:49}},{start:{line:96,column:8},end:{line:96,column:67}},{start:{line:97,column:8},end:{line:97,column:79}}],line:95},'18':{loc:{start:{line:105,column:2},end:{line:107,column:3}},type:'if',locations:[{start:{line:105,column:2},end:{line:107,column:3}},{start:{line:105,column:2},end:{line:107,column:3}}],line:105},'19':{loc:{start:{line:105,column:6},end:{line:105,column:124}},type:'binary-expr',locations:[{start:{line:105,column:6},end:{line:105,column:60}},{start:{line:105,column:64},end:{line:105,column:124}}],line:105},'20':{loc:{start:{line:110,column:2},end:{line:118,column:3}},type:'if',locations:[{start:{line:110,column:2},end:{line:118,column:3}},{start:{line:110,column:2},end:{line:118,column:3}}],line:110},'21':{loc:{start:{line:113,column:6},end:{line:116,column:7}},type:'if',locations:[{start:{line:113,column:6},end:{line:116,column:7}},{start:{line:113,column:6},end:{line:116,column:7}}],line:113},'22':{loc:{start:{line:113,column:10},end:{line:113,column:67}},type:'binary-expr',locations:[{start:{line:113,column:10},end:{line:113,column:34}},{start:{line:113,column:38},end:{line:113,column:67}}],line:113},'23':{loc:{start:{line:121,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:121,column:2},end:{line:123,column:3}},{start:{line:121,column:2},end:{line:123,column:3}}],line:121},'24':{loc:{start:{line:126,column:2},end:{line:146,column:3}},type:'if',locations:[{start:{line:126,column:2},end:{line:146,column:3}},{start:{line:126,column:2},end:{line:146,column:3}}],line:126},'25':{loc:{start:{line:126,column:6},end:{line:126,column:87}},type:'binary-expr',locations:[{start:{line:126,column:6},end:{line:126,column:44}},{start:{line:126,column:48},end:{line:126,column:87}}],line:126},'26':{loc:{start:{line:129,column:6},end:{line:137,column:7}},type:'if',locations:[{start:{line:129,column:6},end:{line:137,column:7}},{start:{line:129,column:6},end:{line:137,column:7}}],line:129},'27':{loc:{start:{line:129,column:10},end:{line:129,column:67}},type:'binary-expr',locations:[{start:{line:129,column:10},end:{line:129,column:34}},{start:{line:129,column:38},end:{line:129,column:67}}],line:129},'28':{loc:{start:{line:134,column:8},end:{line:136,column:9}},type:'if',locations:[{start:{line:134,column:8},end:{line:136,column:9}},{start:{line:134,column:8},end:{line:136,column:9}}],line:134},'29':{loc:{start:{line:141,column:4},end:{line:145,column:5}},type:'if',locations:[{start:{line:141,column:4},end:{line:145,column:5}},{start:{line:141,column:4},end:{line:145,column:5}}],line:141},'30':{loc:{start:{line:142,column:6},end:{line:144,column:7}},type:'if',locations:[{start:{line:142,column:6},end:{line:144,column:7}},{start:{line:142,column:6},end:{line:144,column:7}}],line:142},'31':{loc:{start:{line:142,column:10},end:{line:142,column:147}},type:'binary-expr',locations:[{start:{line:142,column:10},end:{line:142,column:49}},{start:{line:142,column:54},end:{line:142,column:146}}],line:142},'32':{loc:{start:{line:149,column:2},end:{line:155,column:3}},type:'if',locations:[{start:{line:149,column:2},end:{line:155,column:3}},{start:{line:149,column:2},end:{line:155,column:3}}],line:149},'33':{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:'if',locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152},'34':{loc:{start:{line:158,column:2},end:{line:160,column:3}},type:'if',locations:[{start:{line:158,column:2},end:{line:160,column:3}},{start:{line:158,column:2},end:{line:160,column:3}}],line:158},'35':{loc:{start:{line:158,column:6},end:{line:158,column:132}},type:'binary-expr',locations:[{start:{line:158,column:6},end:{line:158,column:68}},{start:{line:158,column:72},end:{line:158,column:132}}],line:158}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0],'28':[0,0],'29':[0,0],'30':[0,0],'31':[0,0],'32':[0,0],'33':[0,0],'34':[0,0],'35':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function impressionsChecker(impressionConstraints,widget){cov_hpbzwr9xi.f[0]++;var parts,totalImpressions,since,id=(cov_hpbzwr9xi.s[0]++,PREFIX_IMPRESSION+widget.id),sinceId=(cov_hpbzwr9xi.s[1]++,PREFIX_TOTAL_IMPRESSIONS_SINCE+widget.id),sessionImpressions=(cov_hpbzwr9xi.s[2]++,~~sessionStorage.getItem(id)),sessionImpressionsForAllWidgets=(cov_hpbzwr9xi.s[3]++,0),impressionsForAllWidgets=(cov_hpbzwr9xi.s[4]++,0),lastImpressionTimeForAllWidgets=(cov_hpbzwr9xi.s[5]++,0),total=(cov_hpbzwr9xi.s[6]++,read(id)),now=(cov_hpbzwr9xi.s[7]++,Date.now());cov_hpbzwr9xi.s[8]++;impressionConstraints.widget=(cov_hpbzwr9xi.b[0][0]++,impressionConstraints.widget)||(cov_hpbzwr9xi.b[0][1]++,{});cov_hpbzwr9xi.s[9]++;impressionConstraints.global=(cov_hpbzwr9xi.b[1][0]++,impressionConstraints.global)||(cov_hpbzwr9xi.b[1][1]++,{});cov_hpbzwr9xi.s[10]++;if(typeof impressionConstraints.widget.session==='undefined'){cov_hpbzwr9xi.b[2][0]++;cov_hpbzwr9xi.s[11]++;impressionConstraints.widget.session=impressionConstraints.session;}else{cov_hpbzwr9xi.b[2][1]++;}cov_hpbzwr9xi.s[12]++;if(typeof impressionConstraints.widget.total==='undefined'){cov_hpbzwr9xi.b[3][0]++;cov_hpbzwr9xi.s[13]++;impressionConstraints.widget.total=impressionConstraints.total;}else{cov_hpbzwr9xi.b[3][1]++;}cov_hpbzwr9xi.s[14]++;if(typeof impressionConstraints.widget.buffer==='undefined'){cov_hpbzwr9xi.b[4][0]++;cov_hpbzwr9xi.s[15]++;impressionConstraints.widget.buffer=impressionConstraints.buffer;}else{cov_hpbzwr9xi.b[4][1]++;}cov_hpbzwr9xi.s[16]++;if((cov_hpbzwr9xi.b[6][0]++,impressionConstraints.global.total>0)&&(cov_hpbzwr9xi.b[6][1]++,impressionConstraints.global.duration>0)){cov_hpbzwr9xi.b[5][0]++;cov_hpbzwr9xi.s[17]++;since=read(sinceId);cov_hpbzwr9xi.s[18]++;var resetImpressions=function(){cov_hpbzwr9xi.f[1]++;cov_hpbzwr9xi.s[19]++;write(sinceId,'0|'+now,widget.expiration);};cov_hpbzwr9xi.s[20]++;if(!since){cov_hpbzwr9xi.b[7][0]++;cov_hpbzwr9xi.s[21]++;resetImpressions();}else{cov_hpbzwr9xi.b[7][1]++;cov_hpbzwr9xi.s[22]++;parts=since.split('|');cov_hpbzwr9xi.s[23]++;if((cov_hpbzwr9xi.b[9][0]++,typeof parts[1]!=='undefined')&&(cov_hpbzwr9xi.b[9][1]++,Math.abs(parts[1]-now)/1000>=impressionConstraints.global.duration)){cov_hpbzwr9xi.b[8][0]++;cov_hpbzwr9xi.s[24]++;resetImpressions();}else{cov_hpbzwr9xi.b[8][1]++;}}}else{cov_hpbzwr9xi.b[5][1]++;}cov_hpbzwr9xi.s[25]++;if(!sessionImpressions){cov_hpbzwr9xi.b[10][0]++;cov_hpbzwr9xi.s[26]++;sessionImpressions=0;}else{cov_hpbzwr9xi.b[10][1]++;}cov_hpbzwr9xi.s[27]++;if(sessionImpressions>=impressionConstraints.widget.session){cov_hpbzwr9xi.b[11][0]++;cov_hpbzwr9xi.s[28]++;return false;}else{cov_hpbzwr9xi.b[11][1]++;}cov_hpbzwr9xi.s[29]++;if(!total){cov_hpbzwr9xi.b[12][0]++;cov_hpbzwr9xi.s[30]++;totalImpressions=0;}else{cov_hpbzwr9xi.b[12][1]++;cov_hpbzwr9xi.s[31]++;parts=total.split('|');cov_hpbzwr9xi.s[32]++;totalImpressions=parseInt(parts[0],10);cov_hpbzwr9xi.s[33]++;if(typeof parts[1]!=='undefined'){cov_hpbzwr9xi.b[13][0]++;cov_hpbzwr9xi.s[34]++;if((cov_hpbzwr9xi.b[15][0]++,impressionConstraints.widget.buffer>0)&&(cov_hpbzwr9xi.b[15][1]++,Math.abs(parts[1]-now)/10000)&&(cov_hpbzwr9xi.b[17][1]++,totalImpressions%impressionConstraints.widget.total===0)&&(cov_hpbzwr9xi.b[17][2]++,Math.abs(parts[1]-now)/1000=impressionConstraints.widget.total)&&(cov_hpbzwr9xi.b[19][1]++,typeof impressionConstraints.widget.duration==='undefined')){cov_hpbzwr9xi.b[18][0]++;cov_hpbzwr9xi.s[39]++;return false;}else{cov_hpbzwr9xi.b[18][1]++;}cov_hpbzwr9xi.s[40]++;if(impressionConstraints.global.session>0){cov_hpbzwr9xi.b[20][0]++;cov_hpbzwr9xi.s[41]++;for(var i=0;i<~~sessionStorage.length;i++){var k=(cov_hpbzwr9xi.s[42]++,sessionStorage.key(i));cov_hpbzwr9xi.s[43]++;if((cov_hpbzwr9xi.b[22][0]++,typeof k!=='undefined')&&(cov_hpbzwr9xi.b[22][1]++,k.includes(PREFIX_IMPRESSION))){cov_hpbzwr9xi.b[21][0]++;cov_hpbzwr9xi.s[44]++;sessionImpressionsForAllWidgets=sessionImpressionsForAllWidgets+~~sessionStorage.getItem(k);}else{cov_hpbzwr9xi.b[21][1]++;}}}else{cov_hpbzwr9xi.b[20][1]++;}cov_hpbzwr9xi.s[45]++;if(sessionImpressionsForAllWidgets>=impressionConstraints.global.session){cov_hpbzwr9xi.b[23][0]++;cov_hpbzwr9xi.s[46]++;return false;}else{cov_hpbzwr9xi.b[23][1]++;}cov_hpbzwr9xi.s[47]++;if((cov_hpbzwr9xi.b[25][0]++,impressionConstraints.global.total>0)||(cov_hpbzwr9xi.b[25][1]++,impressionConstraints.global.buffer>0)){cov_hpbzwr9xi.b[24][0]++;cov_hpbzwr9xi.s[48]++;for(var j=0;j<~~localStorage.length;j++){var l=(cov_hpbzwr9xi.s[49]++,localStorage.key(j));cov_hpbzwr9xi.s[50]++;if((cov_hpbzwr9xi.b[27][0]++,typeof l!=='undefined')&&(cov_hpbzwr9xi.b[27][1]++,l.includes(PREFIX_IMPRESSION))){cov_hpbzwr9xi.b[26][0]++;cov_hpbzwr9xi.s[51]++;parts=read(l).split('|');cov_hpbzwr9xi.s[52]++;totalImpressions=parseInt(parts[0],10);cov_hpbzwr9xi.s[53]++;impressionsForAllWidgets=impressionsForAllWidgets+totalImpressions;cov_hpbzwr9xi.s[54]++;if(typeof parts[1]!=='undefined'){cov_hpbzwr9xi.b[28][0]++;cov_hpbzwr9xi.s[55]++;lastImpressionTimeForAllWidgets=Math.max(parts[1],lastImpressionTimeForAllWidgets);}else{cov_hpbzwr9xi.b[28][1]++;}}else{cov_hpbzwr9xi.b[26][1]++;}}cov_hpbzwr9xi.s[56]++;if(lastImpressionTimeForAllWidgets>0){cov_hpbzwr9xi.b[29][0]++;cov_hpbzwr9xi.s[57]++;if((cov_hpbzwr9xi.b[31][0]++,impressionConstraints.global.buffer>0)&&(cov_hpbzwr9xi.b[31][1]++,Math.abs(lastImpressionTimeForAllWidgets-now)/10000){cov_hpbzwr9xi.b[32][0]++;cov_hpbzwr9xi.s[60]++;since=read(sinceId);cov_hpbzwr9xi.s[61]++;parts=since.split('|');cov_hpbzwr9xi.s[62]++;if(parts[0]>=impressionConstraints.global.total){cov_hpbzwr9xi.b[33][0]++;cov_hpbzwr9xi.s[63]++;return false;}else{cov_hpbzwr9xi.b[33][1]++;}}else{cov_hpbzwr9xi.b[32][1]++;}cov_hpbzwr9xi.s[64]++;if((cov_hpbzwr9xi.b[35][0]++,impressionsForAllWidgets>=impressionConstraints.global.total)&&(cov_hpbzwr9xi.b[35][1]++,typeof impressionConstraints.global.duration==='undefined')){cov_hpbzwr9xi.b[34][0]++;cov_hpbzwr9xi.s[65]++;return false;}else{cov_hpbzwr9xi.b[34][1]++;}cov_hpbzwr9xi.s[66]++;return true;} - if (typeof action === 'object') { - if (action.close === false) { - shouldClose = false; - } + var cov_23gaggrknr=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js',hash='c888dd09b8720c5888996771d649a96c8d2aaeb5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js',statementMap:{'0':{start:{line:9,column:2},end:{line:20,column:11}},'1':{start:{line:11,column:6},end:{line:15,column:9}},'2':{start:{line:12,column:8},end:{line:14,column:34}},'3':{start:{line:18,column:6},end:{line:18,column:28}},'4':{start:{line:19,column:6},end:{line:19,column:18}}},fnMap:{'0':{name:'censorTrackingKeys',decl:{start:{line:8,column:24},end:{line:8,column:42}},loc:{start:{line:8,column:64},end:{line:21,column:1}},line:8},'1':{name:'(anonymous_1)',decl:{start:{line:10,column:12},end:{line:10,column:13}},loc:{start:{line:10,column:27},end:{line:16,column:5}},line:10},'2':{name:'(anonymous_2)',decl:{start:{line:11,column:32},end:{line:11,column:33}},loc:{start:{line:11,column:55},end:{line:15,column:7}},line:11},'3':{name:'(anonymous_3)',decl:{start:{line:17,column:12},end:{line:17,column:13}},loc:{start:{line:17,column:33},end:{line:20,column:5}},line:17}},branchMap:{'0':{loc:{start:{line:12,column:15},end:{line:14,column:33}},type:'cond-expr',locations:[{start:{line:13,column:12},end:{line:13,column:31}},{start:{line:14,column:12},end:{line:14,column:33}}],line:12}},s:{'0':0,'1':0,'2':0,'3':0,'4':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function censorTrackingKeys(data,keysToReject){cov_23gaggrknr.f[0]++;cov_23gaggrknr.s[0]++;return Object.keys(data).filter(function(key){cov_23gaggrknr.f[1]++;cov_23gaggrknr.s[1]++;return !keysToReject.some(function(keyToReject){cov_23gaggrknr.f[2]++;cov_23gaggrknr.s[2]++;return typeof keyToReject==='string'?(cov_23gaggrknr.b[0][0]++,key===keyToReject):(cov_23gaggrknr.b[0][1]++,keyToReject.test(key));});}).reduce(function(memo,key){cov_23gaggrknr.f[3]++;cov_23gaggrknr.s[3]++;memo[key]=data[key];cov_23gaggrknr.s[4]++;return memo;},{});} - if (typeof action.callback === 'function') { - action.callback(callbackType, { - widget: widget, - config: config, - event: event - }); - } - } + var cov_oaabz4hvi=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js',hash='02372b2a65cccf40011861d79ce348bac92a1e60',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js',statementMap:{'0':{start:{line:16,column:2},end:{line:24,column:3}},'1':{start:{line:17,column:4},end:{line:21,column:6}},'2':{start:{line:26,column:2},end:{line:44,column:3}},'3':{start:{line:27,column:4},end:{line:27,column:66}},'4':{start:{line:28,column:4},end:{line:28,column:34}},'5':{start:{line:30,column:4},end:{line:43,column:5}},'6':{start:{line:31,column:17},end:{line:31,column:40}},'7':{start:{line:33,column:6},end:{line:42,column:8}}},fnMap:{'0':{name:'reportData',decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:50},end:{line:45,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:24,column:3}},{start:{line:16,column:2},end:{line:24,column:3}}],line:16},'1':{loc:{start:{line:18,column:6},end:{line:20,column:14}},type:'cond-expr',locations:[{start:{line:19,column:10},end:{line:19,column:61}},{start:{line:20,column:10},end:{line:20,column:14}}],line:18},'2':{loc:{start:{line:26,column:2},end:{line:44,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:44,column:3}},{start:{line:26,column:2},end:{line:44,column:3}}],line:26},'3':{loc:{start:{line:26,column:6},end:{line:26,column:116}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:39}},{start:{line:26,column:43},end:{line:26,column:74}},{start:{line:26,column:78},end:{line:26,column:116}}],line:26},'4':{loc:{start:{line:27,column:14},end:{line:27,column:65}},type:'binary-expr',locations:[{start:{line:27,column:14},end:{line:27,column:38}},{start:{line:27,column:42},end:{line:27,column:65}}],line:27}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function reportData(data,widget){cov_oaabz4hvi.f[0]++;var gaLabel,trackers;cov_oaabz4hvi.s[0]++;if(typeof jstag==='object'){cov_oaabz4hvi.b[0][0]++;cov_oaabz4hvi.s[1]++;window.jstag.send(widget.censorTrackingKeys?(cov_oaabz4hvi.b[1][0]++,censorTrackingKeys(data,widget.censorTrackingKeys)):(cov_oaabz4hvi.b[1][1]++,data));}else{cov_oaabz4hvi.b[0][1]++;}cov_oaabz4hvi.s[2]++;if((cov_oaabz4hvi.b[3][0]++,window.pathfora.enableGA===true)&&(cov_oaabz4hvi.b[3][1]++,typeof window.ga==='function')&&(cov_oaabz4hvi.b[3][2]++,typeof window.ga.getAll==='function')){cov_oaabz4hvi.b[2][0]++;cov_oaabz4hvi.s[3]++;gaLabel=(cov_oaabz4hvi.b[4][0]++,data['pf-widget-action'])||(cov_oaabz4hvi.b[4][1]++,data['pf-widget-event']);cov_oaabz4hvi.s[4]++;trackers=window.ga.getAll();cov_oaabz4hvi.s[5]++;for(var i=0;i0)){cov_1ad9is487e.b[0][0]++;cov_1ad9is487e.s[2]++;params['pf-widget-content']=widget.content[0];}else{cov_1ad9is487e.b[0][1]++;}cov_1ad9is487e.s[3]++;switch(action){case'show':cov_1ad9is487e.b[2][0]++;cov_1ad9is487e.s[4]++;pathforaDataObject.displayedWidgets.push(params);cov_1ad9is487e.s[5]++;break;case'close':cov_1ad9is487e.b[2][1]++;cov_1ad9is487e.s[6]++;params['pf-widget-action']=(cov_1ad9is487e.b[3][0]++,!!widget.closeAction)&&(cov_1ad9is487e.b[3][1]++,widget.closeAction.name)||(cov_1ad9is487e.b[3][2]++,'close');cov_1ad9is487e.s[7]++;pathforaDataObject.closedWidgets.push(params);cov_1ad9is487e.s[8]++;break;case'confirm':cov_1ad9is487e.b[2][2]++;cov_1ad9is487e.s[9]++;if((cov_1ad9is487e.b[5][0]++,htmlElement)&&(cov_1ad9is487e.b[5][1]++,hasClass(htmlElement,'pf-content-unit'))){cov_1ad9is487e.b[4][0]++;cov_1ad9is487e.s[10]++;params['pf-widget-action']='content recommendation';}else{cov_1ad9is487e.b[4][1]++;cov_1ad9is487e.s[11]++;params['pf-widget-action']=(cov_1ad9is487e.b[6][0]++,!!widget.confirmAction)&&(cov_1ad9is487e.b[6][1]++,widget.confirmAction.name)||(cov_1ad9is487e.b[6][2]++,'default confirm');cov_1ad9is487e.s[12]++;pathforaDataObject.completedActions.push(params);}cov_1ad9is487e.s[13]++;break;case'cancel':cov_1ad9is487e.b[2][3]++;cov_1ad9is487e.s[14]++;params['pf-widget-action']=(cov_1ad9is487e.b[7][0]++,!!widget.cancelAction)&&(cov_1ad9is487e.b[7][1]++,widget.cancelAction.name)||(cov_1ad9is487e.b[7][2]++,'default cancel');cov_1ad9is487e.s[15]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[16]++;break;case'success.confirm':cov_1ad9is487e.b[2][4]++;cov_1ad9is487e.s[17]++;params['pf-widget-action']=(cov_1ad9is487e.b[8][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[8][1]++,!!widget.formStates.success)&&(cov_1ad9is487e.b[8][2]++,!!widget.formStates.success.confirmAction)&&(cov_1ad9is487e.b[8][3]++,widget.formStates.success.confirmAction.name)||(cov_1ad9is487e.b[8][4]++,'success confirm');cov_1ad9is487e.s[18]++;pathforaDataObject.completedActions.push(params);cov_1ad9is487e.s[19]++;break;case'success.cancel':cov_1ad9is487e.b[2][5]++;cov_1ad9is487e.s[20]++;params['pf-widget-action']=(cov_1ad9is487e.b[9][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[9][1]++,!!widget.formStates.success)&&(cov_1ad9is487e.b[9][2]++,!!widget.formStates.success.cancelAction)&&(cov_1ad9is487e.b[9][3]++,widget.formStates.success.cancelAction.name)||(cov_1ad9is487e.b[9][4]++,'success cancel');cov_1ad9is487e.s[21]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[22]++;break;case'error.confirm':cov_1ad9is487e.b[2][6]++;cov_1ad9is487e.s[23]++;params['pf-widget-action']=(cov_1ad9is487e.b[10][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[10][1]++,!!widget.formStates.error)&&(cov_1ad9is487e.b[10][2]++,!!widget.formStates.error.confirmAction)&&(cov_1ad9is487e.b[10][3]++,widget.formStates.error.confirmAction.name)||(cov_1ad9is487e.b[10][4]++,'error confirm');cov_1ad9is487e.s[24]++;pathforaDataObject.completedActions.push(params);cov_1ad9is487e.s[25]++;break;case'error.cancel':cov_1ad9is487e.b[2][7]++;cov_1ad9is487e.s[26]++;params['pf-widget-action']=(cov_1ad9is487e.b[11][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[11][1]++,!!widget.formStates.error)&&(cov_1ad9is487e.b[11][2]++,!!widget.formStates.error.cancelAction)&&(cov_1ad9is487e.b[11][3]++,widget.formStates.error.cancelAction.name)||(cov_1ad9is487e.b[11][4]++,'error cancel');cov_1ad9is487e.s[27]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[28]++;break;case'submit':cov_1ad9is487e.b[2][8]++;case'unlock':cov_1ad9is487e.b[2][9]++;cov_1ad9is487e.s[29]++;if(hasClass(htmlElement,'pf-custom-form')){cov_1ad9is487e.b[12][0]++;cov_1ad9is487e.s[30]++;params['pf-custom-form']={};}else{cov_1ad9is487e.b[12][1]++;}cov_1ad9is487e.s[31]++;for(elem in htmlElement.children){cov_1ad9is487e.s[32]++;if(htmlElement.children.hasOwnProperty(elem)){cov_1ad9is487e.b[13][0]++;cov_1ad9is487e.s[33]++;child=htmlElement.children[elem];cov_1ad9is487e.s[34]++;if((cov_1ad9is487e.b[15][0]++,hasClass(child,'pf-widget-radio-group'))||(cov_1ad9is487e.b[15][1]++,hasClass(child,'pf-widget-checkbox-group'))){cov_1ad9is487e.b[14][0]++;var values=(cov_1ad9is487e.s[35]++,[]),name=(cov_1ad9is487e.s[36]++,''),inputs=(cov_1ad9is487e.s[37]++,child.querySelectorAll('input'));cov_1ad9is487e.s[38]++;for(i=0;i 0) { - trackWidgetAction('form_start', config, event.target); - } - }; + var cov_nsb0biqij=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/utils/date-valid.js",hash="ea5b4fb16f76dcec5a02f47ac3e58848ab44690b",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/date-valid.js",statementMap:{"0":{start:{line:13,column:21},end:{line:13,column:45}},"1":{start:{line:14,column:16},end:{line:14,column:57}},"2":{start:{line:15,column:16},end:{line:15,column:57}},"3":{start:{line:17,column:2},end:{line:19,column:3}},"4":{start:{line:18,column:4},end:{line:18,column:17}},"5":{start:{line:21,column:2},end:{line:23,column:3}},"6":{start:{line:22,column:4},end:{line:22,column:17}},"7":{start:{line:25,column:2},end:{line:25,column:14}}},fnMap:{"0":{name:"dateValid",decl:{start:{line:12,column:24},end:{line:12,column:33}},loc:{start:{line:12,column:51},end:{line:26,column:1}},line:12}},branchMap:{"0":{loc:{start:{line:14,column:16},end:{line:14,column:57}},type:"cond-expr",locations:[{start:{line:14,column:22},end:{line:14,column:45}},{start:{line:14,column:48},end:{line:14,column:57}}],line:14},"1":{loc:{start:{line:15,column:16},end:{line:15,column:57}},type:"cond-expr",locations:[{start:{line:15,column:22},end:{line:15,column:45}},{start:{line:15,column:48},end:{line:15,column:57}}],line:15},"2":{loc:{start:{line:17,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:19,column:3}},{start:{line:17,column:2},end:{line:19,column:3}}],line:17},"3":{loc:{start:{line:17,column:6},end:{line:17,column:35}},type:"binary-expr",locations:[{start:{line:17,column:6},end:{line:17,column:9}},{start:{line:17,column:13},end:{line:17,column:35}}],line:17},"4":{loc:{start:{line:21,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:23,column:3}},{start:{line:21,column:2},end:{line:23,column:3}}],line:21},"5":{loc:{start:{line:21,column:6},end:{line:21,column:35}},type:"binary-expr",locations:[{start:{line:21,column:6},end:{line:21,column:9}},{start:{line:21,column:13},end:{line:21,column:35}}],line:21}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},f:{"0":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function dateValid(date,max,min){cov_nsb0biqij.f[0]++;var selectedDate=(cov_nsb0biqij.s[0]++,new Date(date).getTime()),maxDate=(cov_nsb0biqij.s[1]++,max?(cov_nsb0biqij.b[0][0]++,new Date(max).getTime()):(cov_nsb0biqij.b[0][1]++,undefined)),minDate=(cov_nsb0biqij.s[2]++,min?(cov_nsb0biqij.b[1][0]++,new Date(min).getTime()):(cov_nsb0biqij.b[1][1]++,undefined));cov_nsb0biqij.s[3]++;if((cov_nsb0biqij.b[3][0]++,max)&&(cov_nsb0biqij.b[3][1]++,selectedDate>maxDate)){cov_nsb0biqij.b[2][0]++;cov_nsb0biqij.s[4]++;return false;}else{cov_nsb0biqij.b[2][1]++;}cov_nsb0biqij.s[5]++;if((cov_nsb0biqij.b[5][0]++,min)&&(cov_nsb0biqij.b[5][1]++,selectedDate0){cov_28ansbi3y7.b[6][0]++;cov_28ansbi3y7.s[8]++;setTimeout(function(){cov_28ansbi3y7.f[1]++;cov_28ansbi3y7.s[9]++;closeWidget(widget.id,true);},delay);}else{cov_28ansbi3y7.b[6][1]++;}}else{cov_28ansbi3y7.b[0][1]++;}} - // Track input to indicate they've begun to interact with the form - child.onchange = onInputChange; - } - } - } + var cov_2dswyr1xw6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/widget-on-modal-close.js',hash='ec28fd50e0659bc3d67efdb5295ab3fa5526c5fa',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/widget-on-modal-close.js',statementMap:{'0':{start:{line:16,column:2},end:{line:22,column:3}},'1':{start:{line:17,column:4},end:{line:21,column:7}}},fnMap:{'0':{name:'widgetOnModalClose',decl:{start:{line:15,column:24},end:{line:15,column:42}},loc:{start:{line:15,column:67},end:{line:23,column:1}},line:15}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:22,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:22,column:3}},{start:{line:16,column:2},end:{line:22,column:3}}],line:16}},s:{'0':0,'1':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function widgetOnModalClose(widget,config,event){cov_2dswyr1xw6.f[0]++;cov_2dswyr1xw6.s[0]++;if(typeof config.onModalClose==='function'){cov_2dswyr1xw6.b[0][0]++;cov_2dswyr1xw6.s[1]++;config.onModalClose(callbackTypes.MODAL_CLOSE,{widget:widget,config:config,event:event});}else{cov_2dswyr1xw6.b[0][1]++;}} - fieldInvalidate = function (field, count, toFocus) { - addClass(field, 'invalid'); - if (toFocus && count === 0) { - toFocus.focus(); - } - }; + var cov_232q98bfi6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/update-action-cookie.js',hash='b952678f9e2a69aa57d45807bb31c530ba4d7ed5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/update-action-cookie.js',statementMap:{'0':{start:{line:17,column:12},end:{line:17,column:22}},'1':{start:{line:18,column:17},end:{line:18,column:27}},'2':{start:{line:20,column:2},end:{line:25,column:3}},'3':{start:{line:21,column:4},end:{line:21,column:25}},'4':{start:{line:22,column:4},end:{line:22,column:50}},'5':{start:{line:24,column:4},end:{line:24,column:11}},'6':{start:{line:27,column:2},end:{line:27,column:47}}},fnMap:{'0':{name:'updateActionCookie',decl:{start:{line:15,column:24},end:{line:15,column:42}},loc:{start:{line:15,column:62},end:{line:28,column:1}},line:15}},branchMap:{'0':{loc:{start:{line:20,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:20,column:2},end:{line:25,column:3}},{start:{line:20,column:2},end:{line:25,column:3}}],line:20}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function updateActionCookie(name,expiration){cov_232q98bfi6.f[0]++;var ct,val=(cov_232q98bfi6.s[0]++,read(name)),duration=(cov_232q98bfi6.s[1]++,Date.now());cov_232q98bfi6.s[2]++;if(val){cov_232q98bfi6.b[0][0]++;cov_232q98bfi6.s[3]++;val=val.split('|');cov_232q98bfi6.s[4]++;ct=Math.min(parseInt(val[0],10),9998)+1;}else{cov_232q98bfi6.b[0][1]++;cov_232q98bfi6.s[5]++;ct=1;}cov_232q98bfi6.s[6]++;write(name,ct+'|'+duration,expiration);} - // Form submit handler - widgetFormValidate = function (event) { - event.preventDefault(); + var cov_1cutx0ndz8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/button-action.js',hash='b7106ca3be1f9cdbe8b999f020e97e96cc555f37',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/button-action.js',statementMap:{'0':{start:{line:27,column:2},end:{line:66,column:3}},'1':{start:{line:29,column:4},end:{line:29,column:26}},'2':{start:{line:30,column:4},end:{line:30,column:45}},'3':{start:{line:31,column:4},end:{line:31,column:32}},'4':{start:{line:32,column:4},end:{line:32,column:23}},'5':{start:{line:33,column:4},end:{line:33,column:10}},'6':{start:{line:37,column:4},end:{line:37,column:27}},'7':{start:{line:38,column:4},end:{line:38,column:31}},'8':{start:{line:39,column:4},end:{line:39,column:33}},'9':{start:{line:40,column:4},end:{line:40,column:45}},'10':{start:{line:42,column:4},end:{line:44,column:5}},'11':{start:{line:43,column:6},end:{line:43,column:54}},'12':{start:{line:46,column:4},end:{line:48,column:5}},'13':{start:{line:47,column:6},end:{line:47,column:52}},'14':{start:{line:50,column:4},end:{line:50,column:10}},'15':{start:{line:54,column:4},end:{line:54,column:28}},'16':{start:{line:55,column:4},end:{line:55,column:32}},'17':{start:{line:56,column:4},end:{line:56,column:45}},'18':{start:{line:58,column:4},end:{line:60,column:5}},'19':{start:{line:59,column:6},end:{line:59,column:55}},'20':{start:{line:61,column:4},end:{line:63,column:5}},'21':{start:{line:62,column:6},end:{line:62,column:53}},'22':{start:{line:65,column:4},end:{line:65,column:10}},'23':{start:{line:68,column:2},end:{line:70,column:4}},'24':{start:{line:69,column:4},end:{line:69,column:53}},'25':{start:{line:72,column:2},end:{line:94,column:4}},'26':{start:{line:73,column:4},end:{line:73,column:36}},'27':{start:{line:74,column:4},end:{line:74,column:62}},'28':{start:{line:76,column:4},end:{line:88,column:5}},'29':{start:{line:77,column:6},end:{line:79,column:7}},'30':{start:{line:78,column:8},end:{line:78,column:28}},'31':{start:{line:81,column:6},end:{line:87,column:7}},'32':{start:{line:82,column:8},end:{line:86,column:11}},'33':{start:{line:90,column:4},end:{line:93,column:5}},'34':{start:{line:91,column:6},end:{line:91,column:35}},'35':{start:{line:92,column:6},end:{line:92,column:48}}},fnMap:{'0':{name:'buttonAction',decl:{start:{line:24,column:24},end:{line:24,column:36}},loc:{start:{line:24,column:65},end:{line:95,column:1}},line:24},'1':{name:'(anonymous_1)',decl:{start:{line:68,column:21},end:{line:68,column:22}},loc:{start:{line:68,column:38},end:{line:70,column:3}},line:68},'2':{name:'(anonymous_2)',decl:{start:{line:72,column:16},end:{line:72,column:17}},loc:{start:{line:72,column:33},end:{line:94,column:3}},line:72}},branchMap:{'0':{loc:{start:{line:27,column:2},end:{line:66,column:3}},type:'switch',locations:[{start:{line:28,column:2},end:{line:33,column:10}},{start:{line:34,column:2},end:{line:34,column:16}},{start:{line:35,column:2},end:{line:35,column:24}},{start:{line:36,column:2},end:{line:50,column:10}},{start:{line:51,column:2},end:{line:51,column:17}},{start:{line:52,column:2},end:{line:52,column:25}},{start:{line:53,column:2},end:{line:65,column:10}}],line:27},'1':{loc:{start:{line:42,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:42,column:4},end:{line:44,column:5}},{start:{line:42,column:4},end:{line:44,column:5}}],line:42},'2':{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:'if',locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46},'3':{loc:{start:{line:58,column:4},end:{line:60,column:5}},type:'if',locations:[{start:{line:58,column:4},end:{line:60,column:5}},{start:{line:58,column:4},end:{line:60,column:5}}],line:58},'4':{loc:{start:{line:61,column:4},end:{line:63,column:5}},type:'if',locations:[{start:{line:61,column:4},end:{line:63,column:5}},{start:{line:61,column:4},end:{line:63,column:5}}],line:61},'5':{loc:{start:{line:76,column:4},end:{line:88,column:5}},type:'if',locations:[{start:{line:76,column:4},end:{line:88,column:5}},{start:{line:76,column:4},end:{line:88,column:5}}],line:76},'6':{loc:{start:{line:77,column:6},end:{line:79,column:7}},type:'if',locations:[{start:{line:77,column:6},end:{line:79,column:7}},{start:{line:77,column:6},end:{line:79,column:7}}],line:77},'7':{loc:{start:{line:81,column:6},end:{line:87,column:7}},type:'if',locations:[{start:{line:81,column:6},end:{line:87,column:7}},{start:{line:81,column:6},end:{line:87,column:7}}],line:81},'8':{loc:{start:{line:90,column:4},end:{line:93,column:5}},type:'if',locations:[{start:{line:90,column:4},end:{line:93,column:5}},{start:{line:90,column:4},end:{line:93,column:5}}],line:90}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0,0,0,0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function buttonAction(btn,type,config,widget){cov_1cutx0ndz8.f[0]++;var prefix,callbackType,action,shouldClose;cov_1cutx0ndz8.s[0]++;switch(type){case'close':cov_1cutx0ndz8.b[0][0]++;cov_1cutx0ndz8.s[1]++;prefix=PREFIX_CLOSE;cov_1cutx0ndz8.s[2]++;callbackType=callbackTypes.MODAL_CLOSE;cov_1cutx0ndz8.s[3]++;action=config.closeAction;cov_1cutx0ndz8.s[4]++;shouldClose=true;cov_1cutx0ndz8.s[5]++;break;case'cancel':cov_1cutx0ndz8.b[0][1]++;case'success.cancel':cov_1cutx0ndz8.b[0][2]++;case'error.cancel':cov_1cutx0ndz8.b[0][3]++;cov_1cutx0ndz8.s[6]++;prefix=PREFIX_CANCEL;cov_1cutx0ndz8.s[7]++;cov_1cutx0ndz8.s[8]++;action=config.cancelAction;cov_1cutx0ndz8.s[9]++;shouldClose=config.layout!=='inline';cov_1cutx0ndz8.s[10]++;if(type==='success.cancel'){cov_1cutx0ndz8.b[1][0]++;cov_1cutx0ndz8.s[11]++;action=config.formStates.success.cancelAction;}else{cov_1cutx0ndz8.b[1][1]++;}cov_1cutx0ndz8.s[12]++;if(type==='error.cancel'){cov_1cutx0ndz8.b[2][0]++;cov_1cutx0ndz8.s[13]++;action=config.formStates.error.cancelAction;}else{cov_1cutx0ndz8.b[2][1]++;}cov_1cutx0ndz8.s[14]++;break;case'confirm':cov_1cutx0ndz8.b[0][4]++;case'success.confirm':cov_1cutx0ndz8.b[0][5]++;case'error.confirm':cov_1cutx0ndz8.b[0][6]++;cov_1cutx0ndz8.s[15]++;prefix=PREFIX_CONFIRM;cov_1cutx0ndz8.s[16]++;cov_1cutx0ndz8.s[17]++;shouldClose=config.layout!=='inline';cov_1cutx0ndz8.s[18]++;if(type==='success.confirm'){cov_1cutx0ndz8.b[3][0]++;cov_1cutx0ndz8.s[19]++;action=config.formStates.success.confirmAction;}else{cov_1cutx0ndz8.b[3][1]++;}cov_1cutx0ndz8.s[20]++;if(type==='error.confirm'){cov_1cutx0ndz8.b[4][0]++;cov_1cutx0ndz8.s[21]++;action=config.formStates.error.confirmAction;}else{cov_1cutx0ndz8.b[4][1]++;}cov_1cutx0ndz8.s[22]++;break;}cov_1cutx0ndz8.s[23]++;btn.onmouseenter=function(event){cov_1cutx0ndz8.f[1]++;cov_1cutx0ndz8.s[24]++;trackWidgetAction('hover',config,event.target);};cov_1cutx0ndz8.s[25]++;btn.onclick=function(event){cov_1cutx0ndz8.f[2]++;cov_1cutx0ndz8.s[26]++;trackWidgetAction(type,config);cov_1cutx0ndz8.s[27]++;updateActionCookie(prefix+widget.id,config.expiration);cov_1cutx0ndz8.s[28]++;if(typeof action==='object'){cov_1cutx0ndz8.b[5][0]++;cov_1cutx0ndz8.s[29]++;if(action.close===false){cov_1cutx0ndz8.b[6][0]++;cov_1cutx0ndz8.s[30]++;shouldClose=false;}else{cov_1cutx0ndz8.b[6][1]++;}cov_1cutx0ndz8.s[31]++;if(typeof action.callback==='function'){cov_1cutx0ndz8.b[7][0]++;cov_1cutx0ndz8.s[32]++;action.callback(callbackType,{widget:widget,config:config,event:event});}else{cov_1cutx0ndz8.b[7][1]++;}}else{cov_1cutx0ndz8.b[5][1]++;}cov_1cutx0ndz8.s[33]++;if(shouldClose){cov_1cutx0ndz8.b[8][0]++;cov_1cutx0ndz8.s[34]++;closeWidget(widget.id,true);cov_1cutx0ndz8.s[35]++;widgetOnModalClose(widget,config,event);}else{cov_1cutx0ndz8.b[8][1]++;}};} - // Validate that the form is filled out correctly - var valid = true, - requiredElements = Array.prototype.slice.call( - widgetForm.querySelectorAll('[data-required=true]') - ), - validatableElements = Array.prototype.slice.call( - widgetForm.querySelectorAll('[data-validate=true]') - ), - i, - field, - parent; + var cov_2kychcr3iu=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/construct-widget-actions.js',hash='18a7daa68837af22d900ccb224a491017e75f2dd',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/construct-widget-actions.js',statementMap:{'0':{start:{line:44,column:15},end:{line:44,column:52}},'1':{start:{line:45,column:19},end:{line:45,column:60}},'2':{start:{line:46,column:18},end:{line:46,column:58}},'3':{start:{line:47,column:17},end:{line:47,column:57}},'4':{start:{line:50,column:2},end:{line:195,column:3}},'5':{start:{line:54,column:6},end:{line:54,column:48}},'6':{start:{line:56,column:26},end:{line:60,column:7}},'7':{start:{line:57,column:8},end:{line:59,column:9}},'8':{start:{line:58,column:10},end:{line:58,column:64}},'9':{start:{line:62,column:25},end:{line:64,column:7}},'10':{start:{line:63,column:8},end:{line:63,column:57}},'11':{start:{line:67,column:6},end:{line:81,column:7}},'12':{start:{line:68,column:8},end:{line:80,column:9}},'13':{start:{line:69,column:22},end:{line:69,column:47}},'14':{start:{line:70,column:10},end:{line:79,column:11}},'15':{start:{line:75,column:12},end:{line:75,column:41}},'16':{start:{line:78,column:12},end:{line:78,column:43}},'17':{start:{line:84,column:6},end:{line:192,column:8}},'18':{start:{line:85,column:8},end:{line:85,column:31}},'19':{start:{line:88,column:20},end:{line:88,column:24}},'20':{start:{line:89,column:29},end:{line:91,column:11}},'21':{start:{line:92,column:32},end:{line:94,column:11}},'22':{start:{line:99,column:8},end:{line:145,column:9}},'23':{start:{line:100,column:10},end:{line:100,column:38}},'24':{start:{line:102,column:10},end:{line:144,column:11}},'25':{start:{line:103,column:12},end:{line:132,column:13}},'26':{start:{line:104,column:14},end:{line:104,column:40}},'27':{start:{line:105,column:14},end:{line:105,column:45}},'28':{start:{line:107,column:14},end:{line:131,column:15}},'29':{start:{line:111,column:29},end:{line:111,column:60}},'30':{start:{line:112,column:28},end:{line:112,column:29}},'31':{start:{line:114,column:16},end:{line:119,column:17}},'32':{start:{line:115,column:30},end:{line:115,column:39}},'33':{start:{line:116,column:18},end:{line:118,column:19}},'34':{start:{line:117,column:20},end:{line:117,column:28}},'35':{start:{line:121,column:16},end:{line:124,column:17}},'36':{start:{line:122,column:18},end:{line:122,column:32}},'37':{start:{line:123,column:18},end:{line:123,column:46}},'38':{start:{line:125,column:21},end:{line:131,column:15}},'39':{start:{line:126,column:16},end:{line:126,column:30}},'40':{start:{line:127,column:16},end:{line:127,column:44}},'41':{start:{line:128,column:16},end:{line:130,column:17}},'42':{start:{line:129,column:18},end:{line:129,column:32}},'43':{start:{line:134,column:17},end:{line:144,column:11}},'44':{start:{line:135,column:12},end:{line:135,column:42}},'45':{start:{line:137,column:12},end:{line:143,column:13}},'46':{start:{line:138,column:14},end:{line:138,column:28}},'47':{start:{line:139,column:14},end:{line:139,column:41}},'48':{start:{line:140,column:14},end:{line:142,column:15}},'49':{start:{line:141,column:16},end:{line:141,column:30}},'50':{start:{line:147,column:8},end:{line:189,column:9}},'51':{start:{line:148,column:10},end:{line:148,column:41}},'52':{start:{line:150,column:10},end:{line:188,column:11}},'53':{start:{line:151,column:12},end:{line:172,column:13}},'54':{start:{line:152,column:14},end:{line:152,column:40}},'55':{start:{line:153,column:14},end:{line:153,column:55}},'56':{start:{line:155,column:14},end:{line:171,column:15}},'57':{start:{line:166,column:16},end:{line:166,column:30}},'58':{start:{line:167,column:16},end:{line:167,column:54}},'59':{start:{line:168,column:16},end:{line:170,column:17}},'60':{start:{line:169,column:18},end:{line:169,column:32}},'61':{start:{line:174,column:17},end:{line:188,column:11}},'62':{start:{line:175,column:12},end:{line:175,column:42}},'63':{start:{line:177,column:12},end:{line:187,column:13}},'64':{start:{line:182,column:14},end:{line:182,column:28}},'65':{start:{line:183,column:14},end:{line:183,column:41}},'66':{start:{line:184,column:14},end:{line:186,column:15}},'67':{start:{line:185,column:16},end:{line:185,column:30}},'68':{start:{line:191,column:8},end:{line:191,column:21}},'69':{start:{line:194,column:6},end:{line:194,column:12}},'70':{start:{line:197,column:2},end:{line:228,column:3}},'71':{start:{line:199,column:6},end:{line:207,column:7}},'72':{start:{line:200,column:8},end:{line:206,column:10}},'73':{start:{line:201,column:10},end:{line:205,column:13}},'74':{start:{line:208,column:6},end:{line:208,column:12}},'75':{start:{line:210,column:6},end:{line:224,column:7}},'76':{start:{line:211,column:8},end:{line:223,column:10}},'77':{start:{line:215,column:12},end:{line:215,column:42}},'78':{start:{line:216,column:12},end:{line:221,column:13}},'79':{start:{line:217,column:14},end:{line:217,column:49}},'80':{start:{line:218,column:14},end:{line:218,column:78}},'81':{start:{line:219,column:14},end:{line:219,column:43}},'82':{start:{line:220,column:14},end:{line:220,column:56}},'83':{start:{line:225,column:6},end:{line:225,column:12}},'84':{start:{line:227,column:6},end:{line:227,column:12}},'85':{start:{line:230,column:2},end:{line:232,column:3}},'86':{start:{line:231,column:4},end:{line:231,column:55}},'87':{start:{line:234,column:2},end:{line:236,column:3}},'88':{start:{line:235,column:4},end:{line:235,column:57}},'89':{start:{line:238,column:2},end:{line:356,column:3}},'90':{start:{line:239,column:4},end:{line:241,column:6}},'91':{start:{line:240,column:6},end:{line:240,column:55}},'92':{start:{line:243,column:4},end:{line:355,column:6}},'93':{start:{line:246,column:22},end:{line:246,column:26}},'94':{start:{line:249,column:6},end:{line:298,column:7}},'95':{start:{line:250,column:8},end:{line:260,column:9}},'96':{start:{line:252,column:12},end:{line:252,column:36}},'97':{start:{line:253,column:12},end:{line:253,column:18}},'98':{start:{line:255,column:12},end:{line:255,column:39}},'99':{start:{line:256,column:12},end:{line:256,column:18}},'100':{start:{line:258,column:12},end:{line:258,column:36}},'101':{start:{line:259,column:12},end:{line:259,column:18}},'102':{start:{line:263,column:8},end:{line:297,column:9}},'103':{start:{line:264,column:10},end:{line:264,column:17}},'104':{start:{line:265,column:15},end:{line:297,column:9}},'105':{start:{line:266,column:10},end:{line:266,column:62}},'106':{start:{line:269,column:10},end:{line:285,column:15}},'107':{start:{line:272,column:14},end:{line:277,column:15}},'108':{start:{line:276,column:16},end:{line:276,column:39}},'109':{start:{line:278,column:14},end:{line:278,column:26}},'110':{start:{line:281,column:14},end:{line:284,column:16}},'111':{start:{line:289,column:10},end:{line:296,column:11}},'112':{start:{line:290,column:12},end:{line:295,column:15}},'113':{start:{line:301,column:6},end:{line:301,column:43}},'114':{start:{line:302,column:6},end:{line:302,column:72}},'115':{start:{line:305,column:6},end:{line:307,column:7}},'116':{start:{line:306,column:8},end:{line:306,column:35}},'117':{start:{line:310,column:6},end:{line:341,column:7}},'118':{start:{line:311,column:8},end:{line:313,column:9}},'119':{start:{line:312,column:10},end:{line:312,column:30}},'120':{start:{line:315,column:8},end:{line:340,column:9}},'121':{start:{line:316,column:22},end:{line:320,column:11}},'122':{start:{line:323,column:10},end:{line:325,column:11}},'123':{start:{line:324,column:12},end:{line:324,column:30}},'124':{start:{line:328,column:10},end:{line:339,column:11}},'125':{start:{line:329,column:12},end:{line:335,column:14}},'126':{start:{line:333,column:16},end:{line:333,column:61}},'127':{start:{line:336,column:12},end:{line:336,column:19}},'128':{start:{line:338,column:12},end:{line:338,column:78}},'129':{start:{line:343,column:6},end:{line:354,column:7}},'130':{start:{line:344,column:8},end:{line:353,column:9}},'131':{start:{line:348,column:10},end:{line:348,column:39}},'132':{start:{line:349,column:10},end:{line:349,column:52}},'133':{start:{line:352,column:10},end:{line:352,column:49}},'134':{start:{line:358,column:2},end:{line:367,column:3}},'135':{start:{line:359,column:4},end:{line:361,column:6}},'136':{start:{line:360,column:6},end:{line:360,column:55}},'137':{start:{line:363,column:4},end:{line:366,column:6}},'138':{start:{line:364,column:6},end:{line:364,column:57}},'139':{start:{line:365,column:6},end:{line:365,column:72}}},fnMap:{'0':{name:'constructWidgetActions',decl:{start:{line:40,column:24},end:{line:40,column:46}},loc:{start:{line:40,column:63},end:{line:368,column:1}},line:40},'1':{name:'(anonymous_1)',decl:{start:{line:56,column:26},end:{line:56,column:27}},loc:{start:{line:56,column:43},end:{line:60,column:7}},line:56},'2':{name:'(anonymous_2)',decl:{start:{line:62,column:25},end:{line:62,column:26}},loc:{start:{line:62,column:42},end:{line:64,column:7}},line:62},'3':{name:'(anonymous_3)',decl:{start:{line:84,column:27},end:{line:84,column:28}},loc:{start:{line:84,column:44},end:{line:192,column:7}},line:84},'4':{name:'(anonymous_4)',decl:{start:{line:200,column:30},end:{line:200,column:31}},loc:{start:{line:200,column:47},end:{line:206,column:9}},line:200},'5':{name:'(anonymous_5)',decl:{start:{line:214,column:14},end:{line:214,column:15}},loc:{start:{line:214,column:31},end:{line:222,column:11}},line:214},'6':{name:'(anonymous_6)',decl:{start:{line:239,column:28},end:{line:239,column:29}},loc:{start:{line:239,column:45},end:{line:241,column:5}},line:239},'7':{name:'(anonymous_7)',decl:{start:{line:243,column:23},end:{line:243,column:24}},loc:{start:{line:243,column:40},end:{line:355,column:5}},line:243},'8':{name:'(anonymous_8)',decl:{start:{line:271,column:20},end:{line:271,column:21}},loc:{start:{line:271,column:39},end:{line:279,column:13}},line:271},'9':{name:'(anonymous_9)',decl:{start:{line:280,column:17},end:{line:280,column:18}},loc:{start:{line:280,column:36},end:{line:285,column:13}},line:280},'10':{name:'(anonymous_10)',decl:{start:{line:332,column:14},end:{line:332,column:15}},loc:{start:{line:332,column:36},end:{line:334,column:15}},line:332},'11':{name:'(anonymous_11)',decl:{start:{line:359,column:30},end:{line:359,column:31}},loc:{start:{line:359,column:47},end:{line:361,column:5}},line:359},'12':{name:'(anonymous_12)',decl:{start:{line:363,column:25},end:{line:363,column:26}},loc:{start:{line:363,column:42},end:{line:366,column:5}},line:363}},branchMap:{'0':{loc:{start:{line:50,column:2},end:{line:195,column:3}},type:'switch',locations:[{start:{line:51,column:4},end:{line:51,column:16}},{start:{line:52,column:4},end:{line:52,column:20}},{start:{line:53,column:4},end:{line:194,column:12}}],line:50},'1':{loc:{start:{line:57,column:8},end:{line:59,column:9}},type:'if',locations:[{start:{line:57,column:8},end:{line:59,column:9}},{start:{line:57,column:8},end:{line:59,column:9}}],line:57},'2':{loc:{start:{line:57,column:12},end:{line:57,column:63}},type:'binary-expr',locations:[{start:{line:57,column:12},end:{line:57,column:30}},{start:{line:57,column:34},end:{line:57,column:63}}],line:57},'3':{loc:{start:{line:68,column:8},end:{line:80,column:9}},type:'if',locations:[{start:{line:68,column:8},end:{line:80,column:9}},{start:{line:68,column:8},end:{line:80,column:9}}],line:68},'4':{loc:{start:{line:70,column:10},end:{line:79,column:11}},type:'if',locations:[{start:{line:70,column:10},end:{line:79,column:11}},{start:{line:70,column:10},end:{line:79,column:11}}],line:70},'5':{loc:{start:{line:71,column:12},end:{line:72,column:47}},type:'binary-expr',locations:[{start:{line:71,column:12},end:{line:71,column:53}},{start:{line:72,column:12},end:{line:72,column:47}}],line:71},'6':{loc:{start:{line:102,column:10},end:{line:144,column:11}},type:'if',locations:[{start:{line:102,column:10},end:{line:144,column:11}},{start:{line:102,column:10},end:{line:144,column:11}}],line:102},'7':{loc:{start:{line:103,column:12},end:{line:132,column:13}},type:'if',locations:[{start:{line:103,column:12},end:{line:132,column:13}},{start:{line:103,column:12},end:{line:132,column:13}}],line:103},'8':{loc:{start:{line:107,column:14},end:{line:131,column:15}},type:'if',locations:[{start:{line:107,column:14},end:{line:131,column:15}},{start:{line:107,column:14},end:{line:131,column:15}}],line:107},'9':{loc:{start:{line:108,column:16},end:{line:109,column:60}},type:'binary-expr',locations:[{start:{line:108,column:16},end:{line:108,column:57}},{start:{line:109,column:16},end:{line:109,column:60}}],line:108},'10':{loc:{start:{line:116,column:18},end:{line:118,column:19}},type:'if',locations:[{start:{line:116,column:18},end:{line:118,column:19}},{start:{line:116,column:18},end:{line:118,column:19}}],line:116},'11':{loc:{start:{line:121,column:16},end:{line:124,column:17}},type:'if',locations:[{start:{line:121,column:16},end:{line:124,column:17}},{start:{line:121,column:16},end:{line:124,column:17}}],line:121},'12':{loc:{start:{line:125,column:21},end:{line:131,column:15}},type:'if',locations:[{start:{line:125,column:21},end:{line:131,column:15}},{start:{line:125,column:21},end:{line:131,column:15}}],line:125},'13':{loc:{start:{line:128,column:16},end:{line:130,column:17}},type:'if',locations:[{start:{line:128,column:16},end:{line:130,column:17}},{start:{line:128,column:16},end:{line:130,column:17}}],line:128},'14':{loc:{start:{line:128,column:20},end:{line:128,column:36}},type:'binary-expr',locations:[{start:{line:128,column:20},end:{line:128,column:25}},{start:{line:128,column:29},end:{line:128,column:36}}],line:128},'15':{loc:{start:{line:134,column:17},end:{line:144,column:11}},type:'if',locations:[{start:{line:134,column:17},end:{line:144,column:11}},{start:{line:134,column:17},end:{line:144,column:11}}],line:134},'16':{loc:{start:{line:137,column:12},end:{line:143,column:13}},type:'if',locations:[{start:{line:137,column:12},end:{line:143,column:13}},{start:{line:137,column:12},end:{line:143,column:13}}],line:137},'17':{loc:{start:{line:140,column:14},end:{line:142,column:15}},type:'if',locations:[{start:{line:140,column:14},end:{line:142,column:15}},{start:{line:140,column:14},end:{line:142,column:15}}],line:140},'18':{loc:{start:{line:140,column:18},end:{line:140,column:34}},type:'binary-expr',locations:[{start:{line:140,column:18},end:{line:140,column:23}},{start:{line:140,column:27},end:{line:140,column:34}}],line:140},'19':{loc:{start:{line:150,column:10},end:{line:188,column:11}},type:'if',locations:[{start:{line:150,column:10},end:{line:188,column:11}},{start:{line:150,column:10},end:{line:188,column:11}}],line:150},'20':{loc:{start:{line:151,column:12},end:{line:172,column:13}},type:'if',locations:[{start:{line:151,column:12},end:{line:172,column:13}},{start:{line:151,column:12},end:{line:172,column:13}}],line:151},'21':{loc:{start:{line:155,column:14},end:{line:171,column:15}},type:'if',locations:[{start:{line:155,column:14},end:{line:171,column:15}},{start:{line:155,column:14},end:{line:171,column:15}}],line:155},'22':{loc:{start:{line:156,column:16},end:{line:164,column:20}},type:'binary-expr',locations:[{start:{line:156,column:17},end:{line:156,column:35}},{start:{line:157,column:18},end:{line:157,column:56}},{start:{line:158,column:18},end:{line:158,column:42}},{start:{line:159,column:17},end:{line:159,column:54}},{start:{line:160,column:18},end:{line:164,column:19}}],line:156},'23':{loc:{start:{line:168,column:16},end:{line:170,column:17}},type:'if',locations:[{start:{line:168,column:16},end:{line:170,column:17}},{start:{line:168,column:16},end:{line:170,column:17}}],line:168},'24':{loc:{start:{line:168,column:20},end:{line:168,column:36}},type:'binary-expr',locations:[{start:{line:168,column:20},end:{line:168,column:25}},{start:{line:168,column:29},end:{line:168,column:36}}],line:168},'25':{loc:{start:{line:174,column:17},end:{line:188,column:11}},type:'if',locations:[{start:{line:174,column:17},end:{line:188,column:11}},{start:{line:174,column:17},end:{line:188,column:11}}],line:174},'26':{loc:{start:{line:177,column:12},end:{line:187,column:13}},type:'if',locations:[{start:{line:177,column:12},end:{line:187,column:13}},{start:{line:177,column:12},end:{line:187,column:13}}],line:177},'27':{loc:{start:{line:178,column:14},end:{line:180,column:32}},type:'binary-expr',locations:[{start:{line:178,column:14},end:{line:178,column:52}},{start:{line:179,column:14},end:{line:179,column:38}},{start:{line:180,column:14},end:{line:180,column:32}}],line:178},'28':{loc:{start:{line:184,column:14},end:{line:186,column:15}},type:'if',locations:[{start:{line:184,column:14},end:{line:186,column:15}},{start:{line:184,column:14},end:{line:186,column:15}}],line:184},'29':{loc:{start:{line:184,column:18},end:{line:184,column:34}},type:'binary-expr',locations:[{start:{line:184,column:18},end:{line:184,column:23}},{start:{line:184,column:27},end:{line:184,column:34}}],line:184},'30':{loc:{start:{line:197,column:2},end:{line:228,column:3}},type:'switch',locations:[{start:{line:198,column:4},end:{line:208,column:12}},{start:{line:209,column:4},end:{line:225,column:12}},{start:{line:226,column:4},end:{line:227,column:12}}],line:197},'31':{loc:{start:{line:199,column:6},end:{line:207,column:7}},type:'if',locations:[{start:{line:199,column:6},end:{line:207,column:7}},{start:{line:199,column:6},end:{line:207,column:7}}],line:199},'32':{loc:{start:{line:210,column:6},end:{line:224,column:7}},type:'if',locations:[{start:{line:210,column:6},end:{line:224,column:7}},{start:{line:210,column:6},end:{line:224,column:7}}],line:210},'33':{loc:{start:{line:215,column:20},end:{line:215,column:41}},type:'binary-expr',locations:[{start:{line:215,column:20},end:{line:215,column:25}},{start:{line:215,column:29},end:{line:215,column:41}}],line:215},'34':{loc:{start:{line:216,column:12},end:{line:221,column:13}},type:'if',locations:[{start:{line:216,column:12},end:{line:221,column:13}},{start:{line:216,column:12},end:{line:221,column:13}}],line:216},'35':{loc:{start:{line:230,column:2},end:{line:232,column:3}},type:'if',locations:[{start:{line:230,column:2},end:{line:232,column:3}},{start:{line:230,column:2},end:{line:232,column:3}}],line:230},'36':{loc:{start:{line:234,column:2},end:{line:236,column:3}},type:'if',locations:[{start:{line:234,column:2},end:{line:236,column:3}},{start:{line:234,column:2},end:{line:236,column:3}}],line:234},'37':{loc:{start:{line:238,column:2},end:{line:356,column:3}},type:'if',locations:[{start:{line:238,column:2},end:{line:356,column:3}},{start:{line:238,column:2},end:{line:356,column:3}}],line:238},'38':{loc:{start:{line:249,column:6},end:{line:298,column:7}},type:'if',locations:[{start:{line:249,column:6},end:{line:298,column:7}},{start:{line:249,column:6},end:{line:298,column:7}}],line:249},'39':{loc:{start:{line:250,column:8},end:{line:260,column:9}},type:'switch',locations:[{start:{line:251,column:10},end:{line:253,column:18}},{start:{line:254,column:10},end:{line:256,column:18}},{start:{line:257,column:10},end:{line:259,column:18}}],line:250},'40':{loc:{start:{line:263,column:8},end:{line:297,column:9}},type:'if',locations:[{start:{line:263,column:8},end:{line:297,column:9}},{start:{line:263,column:8},end:{line:297,column:9}}],line:263},'41':{loc:{start:{line:263,column:12},end:{line:263,column:55}},type:'binary-expr',locations:[{start:{line:263,column:12},end:{line:263,column:25}},{start:{line:263,column:29},end:{line:263,column:55}}],line:263},'42':{loc:{start:{line:265,column:15},end:{line:297,column:9}},type:'if',locations:[{start:{line:265,column:15},end:{line:297,column:9}},{start:{line:265,column:15},end:{line:297,column:9}}],line:265},'43':{loc:{start:{line:272,column:14},end:{line:277,column:15}},type:'if',locations:[{start:{line:272,column:14},end:{line:277,column:15}},{start:{line:272,column:14},end:{line:277,column:15}}],line:272},'44':{loc:{start:{line:273,column:16},end:{line:274,column:73}},type:'binary-expr',locations:[{start:{line:273,column:16},end:{line:273,column:28}},{start:{line:274,column:17},end:{line:274,column:44}},{start:{line:274,column:48},end:{line:274,column:72}}],line:273},'45':{loc:{start:{line:282,column:22},end:{line:282,column:48}},type:'binary-expr',locations:[{start:{line:282,column:22},end:{line:282,column:34}},{start:{line:282,column:38},end:{line:282,column:48}}],line:282},'46':{loc:{start:{line:289,column:10},end:{line:296,column:11}},type:'if',locations:[{start:{line:289,column:10},end:{line:296,column:11}},{start:{line:289,column:10},end:{line:296,column:11}}],line:289},'47':{loc:{start:{line:305,column:6},end:{line:307,column:7}},type:'if',locations:[{start:{line:305,column:6},end:{line:307,column:7}},{start:{line:305,column:6},end:{line:307,column:7}}],line:305},'48':{loc:{start:{line:310,column:6},end:{line:341,column:7}},type:'if',locations:[{start:{line:310,column:6},end:{line:341,column:7}},{start:{line:310,column:6},end:{line:341,column:7}}],line:310},'49':{loc:{start:{line:311,column:8},end:{line:313,column:9}},type:'if',locations:[{start:{line:311,column:8},end:{line:313,column:9}},{start:{line:311,column:8},end:{line:313,column:9}}],line:311},'50':{loc:{start:{line:315,column:8},end:{line:340,column:9}},type:'if',locations:[{start:{line:315,column:8},end:{line:340,column:9}},{start:{line:315,column:8},end:{line:340,column:9}}],line:315},'51':{loc:{start:{line:323,column:10},end:{line:325,column:11}},type:'if',locations:[{start:{line:323,column:10},end:{line:325,column:11}},{start:{line:323,column:10},end:{line:325,column:11}}],line:323},'52':{loc:{start:{line:328,column:10},end:{line:339,column:11}},type:'if',locations:[{start:{line:328,column:10},end:{line:339,column:11}},{start:{line:328,column:10},end:{line:339,column:11}}],line:328},'53':{loc:{start:{line:343,column:6},end:{line:354,column:7}},type:'if',locations:[{start:{line:343,column:6},end:{line:354,column:7}},{start:{line:343,column:6},end:{line:354,column:7}}],line:343},'54':{loc:{start:{line:344,column:8},end:{line:353,column:9}},type:'if',locations:[{start:{line:344,column:8},end:{line:353,column:9}},{start:{line:344,column:8},end:{line:353,column:9}}],line:344},'55':{loc:{start:{line:345,column:10},end:{line:346,column:60}},type:'binary-expr',locations:[{start:{line:345,column:10},end:{line:345,column:36}},{start:{line:346,column:11},end:{line:346,column:29}},{start:{line:346,column:33},end:{line:346,column:59}}],line:345},'56':{loc:{start:{line:358,column:2},end:{line:367,column:3}},type:'if',locations:[{start:{line:358,column:2},end:{line:367,column:3}},{start:{line:358,column:2},end:{line:367,column:3}}],line:358}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0,'67':0,'68':0,'69':0,'70':0,'71':0,'72':0,'73':0,'74':0,'75':0,'76':0,'77':0,'78':0,'79':0,'80':0,'81':0,'82':0,'83':0,'84':0,'85':0,'86':0,'87':0,'88':0,'89':0,'90':0,'91':0,'92':0,'93':0,'94':0,'95':0,'96':0,'97':0,'98':0,'99':0,'100':0,'101':0,'102':0,'103':0,'104':0,'105':0,'106':0,'107':0,'108':0,'109':0,'110':0,'111':0,'112':0,'113':0,'114':0,'115':0,'116':0,'117':0,'118':0,'119':0,'120':0,'121':0,'122':0,'123':0,'124':0,'125':0,'126':0,'127':0,'128':0,'129':0,'130':0,'131':0,'132':0,'133':0,'134':0,'135':0,'136':0,'137':0,'138':0,'139':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0},b:{'0':[0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0,0,0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0,0],'28':[0,0],'29':[0,0],'30':[0,0,0],'31':[0,0],'32':[0,0],'33':[0,0],'34':[0,0],'35':[0,0],'36':[0,0],'37':[0,0],'38':[0,0],'39':[0,0,0],'40':[0,0],'41':[0,0],'42':[0,0],'43':[0,0],'44':[0,0,0],'45':[0,0],'46':[0,0],'47':[0,0],'48':[0,0],'49':[0,0],'50':[0,0],'51':[0,0],'52':[0,0],'53':[0,0],'54':[0,0],'55':[0,0,0],'56':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function constructWidgetActions(widget,config){cov_2kychcr3iu.f[0]++;var widgetOnButtonClick,widgetFormValidate,widgetForm,widgetOk=(cov_2kychcr3iu.s[0]++,widget.querySelector('.pf-widget-ok')),widgetCancel=(cov_2kychcr3iu.s[1]++,widget.querySelector('.pf-widget-cancel')),widgetClose=(cov_2kychcr3iu.s[2]++,widget.querySelector('.pf-widget-close')),widgetReco=(cov_2kychcr3iu.s[3]++,widget.querySelector('.pf-content-unit'));cov_2kychcr3iu.s[4]++;switch(config.type){case'form':cov_2kychcr3iu.b[0][0]++;case'sitegate':cov_2kychcr3iu.b[0][1]++;case'subscription':cov_2kychcr3iu.b[0][2]++;cov_2kychcr3iu.s[5]++;widgetForm=widget.querySelector('form');var onInputChange=(cov_2kychcr3iu.s[6]++,function(event){cov_2kychcr3iu.f[1]++;cov_2kychcr3iu.s[7]++;if((cov_2kychcr3iu.b[2][0]++,event.target.value)&&(cov_2kychcr3iu.b[2][1]++,event.target.value.length>0)){cov_2kychcr3iu.b[1][0]++;cov_2kychcr3iu.s[8]++;trackWidgetAction('form_start',config,event.target);}else{cov_2kychcr3iu.b[1][1]++;}});var onInputFocus=(cov_2kychcr3iu.s[9]++,function(event){cov_2kychcr3iu.f[2]++;cov_2kychcr3iu.s[10]++;trackWidgetAction('focus',config,event.target);});cov_2kychcr3iu.s[11]++;for(var elem in widgetForm.childNodes){cov_2kychcr3iu.s[12]++;if(widgetForm.children.hasOwnProperty(elem)){cov_2kychcr3iu.b[3][0]++;var child=(cov_2kychcr3iu.s[13]++,widgetForm.children[elem]);cov_2kychcr3iu.s[14]++;if((cov_2kychcr3iu.b[5][0]++,typeof child.getAttribute!=='undefined')&&(cov_2kychcr3iu.b[5][1]++,child.getAttribute('name')!==null)){cov_2kychcr3iu.b[4][0]++;cov_2kychcr3iu.s[15]++;child.onfocus=onInputFocus;cov_2kychcr3iu.s[16]++;child.onchange=onInputChange;}else{cov_2kychcr3iu.b[4][1]++;}}else{cov_2kychcr3iu.b[3][1]++;}}cov_2kychcr3iu.s[17]++;widgetFormValidate=function(event){cov_2kychcr3iu.f[3]++;cov_2kychcr3iu.s[18]++;event.preventDefault();var valid=(cov_2kychcr3iu.s[19]++,true),requiredElements=(cov_2kychcr3iu.s[20]++,Array.prototype.slice.call(widgetForm.querySelectorAll('[data-required=true]'))),validatableElements=(cov_2kychcr3iu.s[21]++,Array.prototype.slice.call(widgetForm.querySelectorAll('[data-validate=true]'))),i,field,parent;cov_2kychcr3iu.s[22]++;for(i=0;i0){cov_29mw2gjt28.b[2][0]++;var rec=(cov_29mw2gjt28.s[4]++,config.content[0]),recImage=(cov_29mw2gjt28.s[5]++,document$1.createElement('div')),recMeta=(cov_29mw2gjt28.s[6]++,document$1.createElement('div')),recTitle=(cov_29mw2gjt28.s[7]++,document$1.createElement('h4')),recDesc=(cov_29mw2gjt28.s[8]++,document$1.createElement('p')),recInfo=(cov_29mw2gjt28.s[9]++,document$1.createElement('span'));cov_29mw2gjt28.s[10]++;widgetContentUnit.href=rec.url;cov_29mw2gjt28.s[11]++;if((cov_29mw2gjt28.b[4][0]++,rec.image)&&((cov_29mw2gjt28.b[4][1]++,!settings.display)||(cov_29mw2gjt28.b[4][2]++,settings.display.image!==false))){cov_29mw2gjt28.b[3][0]++;cov_29mw2gjt28.s[12]++;recImage.className='pf-content-unit-img';cov_29mw2gjt28.s[13]++;recImage.style.backgroundImage="url('"+rec.image+"')";cov_29mw2gjt28.s[14]++;widgetContentUnit.appendChild(recImage);}else{cov_29mw2gjt28.b[3][1]++;}cov_29mw2gjt28.s[15]++;recMeta.className='pf-content-unit-meta';cov_29mw2gjt28.s[16]++;if((cov_29mw2gjt28.b[6][0]++,rec.title)&&((cov_29mw2gjt28.b[6][1]++,!settings.display)||(cov_29mw2gjt28.b[6][2]++,settings.display.title!==false))){cov_29mw2gjt28.b[5][0]++;cov_29mw2gjt28.s[17]++;recTitle.innerHTML=rec.title;cov_29mw2gjt28.s[18]++;recMeta.appendChild(recTitle);}else{cov_29mw2gjt28.b[5][1]++;}cov_29mw2gjt28.s[19]++;if((cov_29mw2gjt28.b[8][0]++,rec.author)&&(cov_29mw2gjt28.b[8][1]++,settings.display)&&(cov_29mw2gjt28.b[8][2]++,settings.display.author===true)){cov_29mw2gjt28.b[7][0]++;cov_29mw2gjt28.s[20]++;recInfo.innerHTML='by '+rec.author;}else{cov_29mw2gjt28.b[7][1]++;}cov_29mw2gjt28.s[21]++;if((cov_29mw2gjt28.b[10][0]++,rec.date)&&(cov_29mw2gjt28.b[10][1]++,settings.display)&&(cov_29mw2gjt28.b[10][2]++,settings.display.date===true)){cov_29mw2gjt28.b[9][0]++;var published=(cov_29mw2gjt28.s[22]++,new Date(rec.date)),locale=(cov_29mw2gjt28.s[23]++,settings.display.locale),dateOptions=(cov_29mw2gjt28.s[24]++,settings.display.dateOptions);cov_29mw2gjt28.s[25]++;if((cov_29mw2gjt28.b[12][0]++,!locale)&&(cov_29mw2gjt28.b[12][1]++,window.pathfora)&&(cov_29mw2gjt28.b[12][2]++,window.pathfora.locale)){cov_29mw2gjt28.b[11][0]++;cov_29mw2gjt28.s[26]++;locale=window.pathfora.locale;}else{cov_29mw2gjt28.b[11][1]++;cov_29mw2gjt28.s[27]++;if(!locale){cov_29mw2gjt28.b[13][0]++;cov_29mw2gjt28.s[28]++;locale=PF_LOCALE;}else{cov_29mw2gjt28.b[13][1]++;}}cov_29mw2gjt28.s[29]++;if((cov_29mw2gjt28.b[15][0]++,!dateOptions)&&(cov_29mw2gjt28.b[15][1]++,window.pathfora)&&(cov_29mw2gjt28.b[15][2]++,window.pathfora.dateOptions)){cov_29mw2gjt28.b[14][0]++;cov_29mw2gjt28.s[30]++;dateOptions=window.pathfora.dateOptions;}else{cov_29mw2gjt28.b[14][1]++;cov_29mw2gjt28.s[31]++;if(!dateOptions){cov_29mw2gjt28.b[16][0]++;cov_29mw2gjt28.s[32]++;dateOptions=PF_DATE_OPTIONS;}else{cov_29mw2gjt28.b[16][1]++;}}cov_29mw2gjt28.s[33]++;published=published.toLocaleDateString(locale,dateOptions);cov_29mw2gjt28.s[34]++;if(!recInfo.innerHTML){cov_29mw2gjt28.b[17][0]++;cov_29mw2gjt28.s[35]++;recInfo.innerHTML=published;}else{cov_29mw2gjt28.b[17][1]++;cov_29mw2gjt28.s[36]++;recInfo.innerHTML+=' | '+published;}}else{cov_29mw2gjt28.b[9][1]++;}cov_29mw2gjt28.s[37]++;if(recInfo.innerHTML){cov_29mw2gjt28.b[18][0]++;cov_29mw2gjt28.s[38]++;recInfo.className='pf-content-unit-info';cov_29mw2gjt28.s[39]++;recMeta.appendChild(recInfo);}else{cov_29mw2gjt28.b[18][1]++;}cov_29mw2gjt28.s[40]++;if((cov_29mw2gjt28.b[20][0]++,rec.description)&&((cov_29mw2gjt28.b[20][1]++,!settings.display)||(cov_29mw2gjt28.b[20][2]++,settings.display.description!==false))){cov_29mw2gjt28.b[19][0]++;var desc=(cov_29mw2gjt28.s[41]++,rec.description),limit=(cov_29mw2gjt28.s[42]++,config.layout==='modal'?(cov_29mw2gjt28.b[21][0]++,DEFAULT_CHAR_LIMIT):(cov_29mw2gjt28.b[21][1]++,DEFAULT_CHAR_LIMIT_STACK));cov_29mw2gjt28.s[43]++;if(!settings.display){cov_29mw2gjt28.b[22][0]++;cov_29mw2gjt28.s[44]++;settings.display={descriptionLimit:limit};}else{cov_29mw2gjt28.b[22][1]++;cov_29mw2gjt28.s[45]++;if(!settings.display.descriptionLimit){cov_29mw2gjt28.b[23][0]++;cov_29mw2gjt28.s[46]++;settings.display.descriptionLimit=limit;}else{cov_29mw2gjt28.b[23][1]++;}}cov_29mw2gjt28.s[47]++;if((cov_29mw2gjt28.b[25][0]++,desc.length>settings.display.descriptionLimit)&&(cov_29mw2gjt28.b[25][1]++,settings.display.descriptionLimit!==-1)){cov_29mw2gjt28.b[24][0]++;cov_29mw2gjt28.s[48]++;desc=desc.substring(0,settings.display.descriptionLimit);cov_29mw2gjt28.s[49]++;desc=desc.substring(0,desc.lastIndexOf(' '))+'...';}else{cov_29mw2gjt28.b[24][1]++;}cov_29mw2gjt28.s[50]++;recDesc.innerHTML=desc;cov_29mw2gjt28.s[51]++;recMeta.appendChild(recDesc);}else{cov_29mw2gjt28.b[19][1]++;}cov_29mw2gjt28.s[52]++;widgetContentUnit.appendChild(recMeta);}else{cov_29mw2gjt28.b[2][1]++;}}else{cov_29mw2gjt28.b[0][1]++;}} - if (hasClass(widgetForm, 'pf-custom-form')) { - if (field.parentNode) { - parent = field.parentNode; - removeClass(parent, 'invalid'); + var cov_169tq0gstz=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/set-widget-classname.js',hash='a0693d76826223eb02255e193d0ef1a81af8f3b3',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/set-widget-classname.js',statementMap:{'0':{start:{line:11,column:2},end:{line:23,column:13}}},fnMap:{'0':{name:'setWidgetClassname',decl:{start:{line:10,column:24},end:{line:10,column:42}},loc:{start:{line:10,column:60},end:{line:24,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:15,column:4},end:{line:15,column:60}},type:'cond-expr',locations:[{start:{line:15,column:22},end:{line:15,column:55}},{start:{line:15,column:58},end:{line:15,column:60}}],line:15},'1':{loc:{start:{line:16,column:4},end:{line:16,column:46}},type:'cond-expr',locations:[{start:{line:16,column:22},end:{line:16,column:41}},{start:{line:16,column:44},end:{line:16,column:46}}],line:16},'2':{loc:{start:{line:17,column:4},end:{line:17,column:54}},type:'cond-expr',locations:[{start:{line:17,column:20},end:{line:17,column:49}},{start:{line:17,column:52},end:{line:17,column:54}}],line:17},'3':{loc:{start:{line:19,column:4},end:{line:19,column:51}},type:'cond-expr',locations:[{start:{line:19,column:19},end:{line:19,column:46}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},'4':{loc:{start:{line:20,column:4},end:{line:20,column:50}},type:'cond-expr',locations:[{start:{line:20,column:23},end:{line:20,column:45}},{start:{line:20,column:48},end:{line:20,column:50}}],line:20},'5':{loc:{start:{line:21,column:4},end:{line:21,column:52}},type:'cond-expr',locations:[{start:{line:21,column:22},end:{line:21,column:47}},{start:{line:21,column:50},end:{line:21,column:52}}],line:21},'6':{loc:{start:{line:22,column:4},end:{line:22,column:47}},type:'cond-expr',locations:[{start:{line:22,column:25},end:{line:22,column:42}},{start:{line:22,column:45},end:{line:22,column:47}}],line:22}},s:{'0':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setWidgetClassname(widget,config){cov_169tq0gstz.f[0]++;cov_169tq0gstz.s[0]++;widget.className=['pf-widget ','pf-'+config.type,' pf-widget-'+config.layout,config.position?(cov_169tq0gstz.b[0][0]++,' pf-position-'+config.position):(cov_169tq0gstz.b[0][1]++,''),config.pushDown?(cov_169tq0gstz.b[1][0]++,' pf-has-push-down'):(cov_169tq0gstz.b[1][1]++,''),config.origin?(cov_169tq0gstz.b[2][0]++,' pf-origin-'+config.origin):(cov_169tq0gstz.b[2][1]++,''),' pf-widget-variant-'+config.variant,config.theme?(cov_169tq0gstz.b[3][0]++,' pf-theme-'+config.theme):(cov_169tq0gstz.b[3][1]++,''),config.className?(cov_169tq0gstz.b[4][0]++,' '+config.className):(cov_169tq0gstz.b[4][1]++,''),config.branding?(cov_169tq0gstz.b[5][0]++,' pf-widget-has-branding'):(cov_169tq0gstz.b[5][1]++,''),!config.responsive?(cov_169tq0gstz.b[6][0]++,' pf-mobile-hide'):(cov_169tq0gstz.b[6][1]++,'')].join('');} - if ( - hasClass(parent, 'pf-widget-radio-group') || - hasClass(parent, 'pf-widget-checkbox-group') - ) { - var inputs = field.querySelectorAll('input'); - var count = 0; + var cov_11trv5b8zj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/form/build-form-element.js',hash='e1d83471bd6cf741da557cd767fb5bd54d23b907',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/form/build-form-element.js',statementMap:{'0':{start:{line:22,column:14},end:{line:22,column:43}},'1':{start:{line:23,column:14},end:{line:23,column:46}},'2':{start:{line:28,column:2},end:{line:82,column:3}},'3':{start:{line:29,column:4},end:{line:29,column:49}},'4':{start:{line:30,column:4},end:{line:30,column:44}},'5':{start:{line:32,column:4},end:{line:49,column:5}},'6':{start:{line:34,column:8},end:{line:34,column:50}},'7':{start:{line:35,column:8},end:{line:35,column:46}},'8':{start:{line:36,column:8},end:{line:36,column:14}},'9':{start:{line:39,column:8},end:{line:39,column:50}},'10':{start:{line:40,column:8},end:{line:40,column:45}},'11':{start:{line:41,column:8},end:{line:41,column:14}},'12':{start:{line:43,column:8},end:{line:43,column:50}},'13':{start:{line:44,column:8},end:{line:44,column:45}},'14':{start:{line:45,column:8},end:{line:45,column:14}},'15':{start:{line:47,column:8},end:{line:47,column:52}},'16':{start:{line:48,column:8},end:{line:48,column:14}},'17':{start:{line:51,column:4},end:{line:51,column:44}},'18':{start:{line:52,column:4},end:{line:52,column:42}},'19':{start:{line:55,column:4},end:{line:57,column:5}},'20':{start:{line:56,column:6},end:{line:56,column:38}},'21':{start:{line:60,column:4},end:{line:81,column:5}},'22':{start:{line:61,column:18},end:{line:61,column:28}},'23':{start:{line:62,column:17},end:{line:62,column:42}},'24':{start:{line:63,column:24},end:{line:63,column:70}},'25':{start:{line:64,column:14},end:{line:68,column:16}},'26':{start:{line:69,column:14},end:{line:73,column:16}},'27':{start:{line:75,column:6},end:{line:77,column:7}},'28':{start:{line:76,column:8},end:{line:76,column:69}},'29':{start:{line:78,column:6},end:{line:80,column:7}},'30':{start:{line:79,column:8},end:{line:79,column:69}},'31':{start:{line:84,column:2},end:{line:103,column:3}},'32':{start:{line:85,column:4},end:{line:92,column:5}},'33':{start:{line:86,column:6},end:{line:86,column:45}},'34':{start:{line:87,column:6},end:{line:87,column:27}},'35':{start:{line:88,column:6},end:{line:88,column:57}},'36':{start:{line:90,column:6},end:{line:90,column:46}},'37':{start:{line:91,column:6},end:{line:91,column:43}},'38':{start:{line:94,column:4},end:{line:94,column:33}},'39':{start:{line:95,column:4},end:{line:95,column:38}},'40':{start:{line:96,column:4},end:{line:96,column:38}},'41':{start:{line:98,column:4},end:{line:100,column:5}},'42':{start:{line:99,column:6},end:{line:99,column:60}},'43':{start:{line:102,column:4},end:{line:102,column:31}},'44':{start:{line:105,column:2},end:{line:118,column:3}},'45':{start:{line:106,column:4},end:{line:106,column:42}},'46':{start:{line:107,column:4},end:{line:107,column:50}},'47':{start:{line:109,column:4},end:{line:117,column:5}},'48':{start:{line:110,column:6},end:{line:110,column:46}},'49':{start:{line:111,column:6},end:{line:111,column:45}},'50':{start:{line:112,column:6},end:{line:112,column:37}},'51':{start:{line:114,column:6},end:{line:114,column:51}},'52':{start:{line:115,column:6},end:{line:115,column:39}},'53':{start:{line:116,column:6},end:{line:116,column:35}},'54':{start:{line:120,column:2},end:{line:133,column:3}},'55':{start:{line:121,column:4},end:{line:121,column:42}},'56':{start:{line:122,column:4},end:{line:122,column:50}},'57':{start:{line:124,column:4},end:{line:132,column:5}},'58':{start:{line:125,column:6},end:{line:125,column:46}},'59':{start:{line:126,column:6},end:{line:126,column:44}},'60':{start:{line:127,column:6},end:{line:127,column:36}},'61':{start:{line:129,column:6},end:{line:129,column:51}},'62':{start:{line:130,column:6},end:{line:130,column:39}},'63':{start:{line:131,column:6},end:{line:131,column:35}},'64':{start:{line:135,column:2},end:{line:149,column:3}},'65':{start:{line:137,column:4},end:{line:144,column:5}},'66':{start:{line:138,column:24},end:{line:138,column:56}},'67':{start:{line:139,column:6},end:{line:139,column:44}},'68':{start:{line:140,column:6},end:{line:140,column:47}},'69':{start:{line:141,column:6},end:{line:141,column:39}},'70':{start:{line:143,column:6},end:{line:143,column:45}},'71':{start:{line:146,column:4},end:{line:148,column:5}},'72':{start:{line:147,column:6},end:{line:147,column:59}},'73':{start:{line:151,column:2},end:{line:180,column:3}},'74':{start:{line:152,column:4},end:{line:179,column:5}},'75':{start:{line:153,column:6},end:{line:153,column:27}},'76':{start:{line:155,column:6},end:{line:178,column:7}},'77':{start:{line:156,column:20},end:{line:156,column:51}},'78':{start:{line:157,column:8},end:{line:157,column:51}},'79':{start:{line:158,column:8},end:{line:158,column:47}},'80':{start:{line:159,column:8},end:{line:159,column:46}},'81':{start:{line:161,column:8},end:{line:171,column:9}},'82':{start:{line:162,column:10},end:{line:162,column:50}},'83':{start:{line:163,column:10},end:{line:163,column:58}},'84':{start:{line:164,column:10},end:{line:164,column:35}},'85':{start:{line:165,column:10},end:{line:165,column:64}},'86':{start:{line:166,column:10},end:{line:166,column:37}},'87':{start:{line:168,column:10},end:{line:170,column:12}},'88':{start:{line:172,column:13},end:{line:178,column:7}},'89':{start:{line:173,column:21},end:{line:173,column:53}},'90':{start:{line:174,column:8},end:{line:174,column:48}},'91':{start:{line:175,column:8},end:{line:175,column:37}},'92':{start:{line:177,column:8},end:{line:177,column:36}},'93':{start:{line:182,column:2},end:{line:182,column:31}},'94':{start:{line:185,column:12},end:{line:185,column:47}},'95':{start:{line:186,column:2},end:{line:190,column:3}},'96':{start:{line:187,column:4},end:{line:187,column:36}},'97':{start:{line:189,column:4},end:{line:189,column:30}}},fnMap:{'0':{name:'buildFormElement',decl:{start:{line:17,column:24},end:{line:17,column:40}},loc:{start:{line:17,column:53},end:{line:191,column:1}},line:17}},branchMap:{'0':{loc:{start:{line:28,column:2},end:{line:82,column:3}},type:'if',locations:[{start:{line:28,column:2},end:{line:82,column:3}},{start:{line:28,column:2},end:{line:82,column:3}}],line:28},'1':{loc:{start:{line:32,column:4},end:{line:49,column:5}},type:'switch',locations:[{start:{line:33,column:6},end:{line:36,column:14}},{start:{line:37,column:6},end:{line:37,column:18}},{start:{line:38,column:6},end:{line:41,column:14}},{start:{line:42,column:6},end:{line:45,column:14}},{start:{line:46,column:6},end:{line:48,column:14}}],line:32},'2':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},'3':{loc:{start:{line:60,column:4},end:{line:81,column:5}},type:'if',locations:[{start:{line:60,column:4},end:{line:81,column:5}},{start:{line:60,column:4},end:{line:81,column:5}}],line:60},'4':{loc:{start:{line:64,column:14},end:{line:68,column:16}},type:'cond-expr',locations:[{start:{line:65,column:12},end:{line:67,column:36}},{start:{line:68,column:12},end:{line:68,column:16}}],line:64},'5':{loc:{start:{line:65,column:12},end:{line:67,column:36}},type:'cond-expr',locations:[{start:{line:66,column:14},end:{line:66,column:27}},{start:{line:67,column:14},end:{line:67,column:36}}],line:65},'6':{loc:{start:{line:69,column:14},end:{line:73,column:16}},type:'cond-expr',locations:[{start:{line:70,column:12},end:{line:72,column:36}},{start:{line:73,column:12},end:{line:73,column:16}}],line:69},'7':{loc:{start:{line:70,column:12},end:{line:72,column:36}},type:'cond-expr',locations:[{start:{line:71,column:14},end:{line:71,column:27}},{start:{line:72,column:14},end:{line:72,column:36}}],line:70},'8':{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:'if',locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},'9':{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:'if',locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},'10':{loc:{start:{line:84,column:2},end:{line:103,column:3}},type:'if',locations:[{start:{line:84,column:2},end:{line:103,column:3}},{start:{line:84,column:2},end:{line:103,column:3}}],line:84},'11':{loc:{start:{line:85,column:4},end:{line:92,column:5}},type:'if',locations:[{start:{line:85,column:4},end:{line:92,column:5}},{start:{line:85,column:4},end:{line:92,column:5}}],line:85},'12':{loc:{start:{line:98,column:4},end:{line:100,column:5}},type:'if',locations:[{start:{line:98,column:4},end:{line:100,column:5}},{start:{line:98,column:4},end:{line:100,column:5}}],line:98},'13':{loc:{start:{line:105,column:2},end:{line:118,column:3}},type:'if',locations:[{start:{line:105,column:2},end:{line:118,column:3}},{start:{line:105,column:2},end:{line:118,column:3}}],line:105},'14':{loc:{start:{line:109,column:4},end:{line:117,column:5}},type:'if',locations:[{start:{line:109,column:4},end:{line:117,column:5}},{start:{line:109,column:4},end:{line:117,column:5}}],line:109},'15':{loc:{start:{line:120,column:2},end:{line:133,column:3}},type:'if',locations:[{start:{line:120,column:2},end:{line:133,column:3}},{start:{line:120,column:2},end:{line:133,column:3}}],line:120},'16':{loc:{start:{line:120,column:6},end:{line:120,column:51}},type:'binary-expr',locations:[{start:{line:120,column:6},end:{line:120,column:26}},{start:{line:120,column:30},end:{line:120,column:51}}],line:120},'17':{loc:{start:{line:124,column:4},end:{line:132,column:5}},type:'if',locations:[{start:{line:124,column:4},end:{line:132,column:5}},{start:{line:124,column:4},end:{line:132,column:5}}],line:124},'18':{loc:{start:{line:135,column:2},end:{line:149,column:3}},type:'if',locations:[{start:{line:135,column:2},end:{line:149,column:3}},{start:{line:135,column:2},end:{line:149,column:3}}],line:135},'19':{loc:{start:{line:137,column:4},end:{line:144,column:5}},type:'if',locations:[{start:{line:137,column:4},end:{line:144,column:5}},{start:{line:137,column:4},end:{line:144,column:5}}],line:137},'20':{loc:{start:{line:146,column:4},end:{line:148,column:5}},type:'if',locations:[{start:{line:146,column:4},end:{line:148,column:5}},{start:{line:146,column:4},end:{line:148,column:5}}],line:146},'21':{loc:{start:{line:151,column:2},end:{line:180,column:3}},type:'if',locations:[{start:{line:151,column:2},end:{line:180,column:3}},{start:{line:151,column:2},end:{line:180,column:3}}],line:151},'22':{loc:{start:{line:155,column:6},end:{line:178,column:7}},type:'if',locations:[{start:{line:155,column:6},end:{line:178,column:7}},{start:{line:155,column:6},end:{line:178,column:7}}],line:155},'23':{loc:{start:{line:161,column:8},end:{line:171,column:9}},type:'if',locations:[{start:{line:161,column:8},end:{line:171,column:9}},{start:{line:161,column:8},end:{line:171,column:9}}],line:161},'24':{loc:{start:{line:172,column:13},end:{line:178,column:7}},type:'if',locations:[{start:{line:172,column:13},end:{line:178,column:7}},{start:{line:172,column:13},end:{line:178,column:7}}],line:172},'25':{loc:{start:{line:186,column:2},end:{line:190,column:3}},type:'if',locations:[{start:{line:186,column:2},end:{line:190,column:3}},{start:{line:186,column:2},end:{line:190,column:3}}],line:186}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0,'67':0,'68':0,'69':0,'70':0,'71':0,'72':0,'73':0,'74':0,'75':0,'76':0,'77':0,'78':0,'79':0,'80':0,'81':0,'82':0,'83':0,'84':0,'85':0,'86':0,'87':0,'88':0,'89':0,'90':0,'91':0,'92':0,'93':0,'94':0,'95':0,'96':0,'97':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0,0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function buildFormElement(elem,form){cov_11trv5b8zj.f[0]++;var content,i,val,label,wrapper=(cov_11trv5b8zj.s[0]++,document$1.createElement('div')),isGroup=(cov_11trv5b8zj.s[1]++,elem.hasOwnProperty('groupType')),reqFlag,reqTriangle;cov_11trv5b8zj.s[2]++;if(isGroup){cov_11trv5b8zj.b[0][0]++;cov_11trv5b8zj.s[3]++;wrapper.className='pf-widget-'+elem.type;cov_11trv5b8zj.s[4]++;content=document$1.createElement('div');}else{cov_11trv5b8zj.b[0][1]++;cov_11trv5b8zj.s[5]++;switch(elem.type){case'email':cov_11trv5b8zj.b[1][0]++;cov_11trv5b8zj.s[6]++;content=document$1.createElement('input');cov_11trv5b8zj.s[7]++;content.setAttribute('type','email');cov_11trv5b8zj.s[8]++;break;case'text':cov_11trv5b8zj.b[1][1]++;case'input':cov_11trv5b8zj.b[1][2]++;cov_11trv5b8zj.s[9]++;content=document$1.createElement('input');cov_11trv5b8zj.s[10]++;content.setAttribute('type','text');cov_11trv5b8zj.s[11]++;break;case'date':cov_11trv5b8zj.b[1][3]++;cov_11trv5b8zj.s[12]++;content=document$1.createElement('input');cov_11trv5b8zj.s[13]++;content.setAttribute('type','date');cov_11trv5b8zj.s[14]++;break;default:cov_11trv5b8zj.b[1][4]++;cov_11trv5b8zj.s[15]++;content=document$1.createElement(elem.type);cov_11trv5b8zj.s[16]++;break;}cov_11trv5b8zj.s[17]++;content.setAttribute('name',elem.name);cov_11trv5b8zj.s[18]++;content.setAttribute('id',elem.name);cov_11trv5b8zj.s[19]++;if(elem.type==='textarea'){cov_11trv5b8zj.b[2][0]++;cov_11trv5b8zj.s[20]++;content.setAttribute('rows',5);}else{cov_11trv5b8zj.b[2][1]++;}cov_11trv5b8zj.s[21]++;if(elem.type==='date'){cov_11trv5b8zj.b[3][0]++;var today=(cov_11trv5b8zj.s[22]++,new Date()),offset=(cov_11trv5b8zj.s[23]++,today.getTimezoneOffset()),todayTimezone=(cov_11trv5b8zj.s[24]++,new Date(today.getTime()-offset*60*1000)),max=(cov_11trv5b8zj.s[25]++,elem.maxDate?(cov_11trv5b8zj.b[4][0]++,elem.maxDate==='today'?(cov_11trv5b8zj.b[5][0]++,todayTimezone):(cov_11trv5b8zj.b[5][1]++,new Date(elem.maxDate))):(cov_11trv5b8zj.b[4][1]++,null)),min=(cov_11trv5b8zj.s[26]++,elem.minDate?(cov_11trv5b8zj.b[6][0]++,elem.minDate==='today'?(cov_11trv5b8zj.b[7][0]++,todayTimezone):(cov_11trv5b8zj.b[7][1]++,new Date(elem.minDate))):(cov_11trv5b8zj.b[6][1]++,null));cov_11trv5b8zj.s[27]++;if(max!=null){cov_11trv5b8zj.b[8][0]++;cov_11trv5b8zj.s[28]++;content.setAttribute('max',max.toISOString().split('T')[0]);}else{cov_11trv5b8zj.b[8][1]++;}cov_11trv5b8zj.s[29]++;if(min!=null){cov_11trv5b8zj.b[9][0]++;cov_11trv5b8zj.s[30]++;content.setAttribute('min',min.toISOString().split('T')[0]);}else{cov_11trv5b8zj.b[9][1]++;}}else{cov_11trv5b8zj.b[3][1]++;}}cov_11trv5b8zj.s[31]++;if(elem.label){cov_11trv5b8zj.b[10][0]++;cov_11trv5b8zj.s[32]++;if(isGroup){cov_11trv5b8zj.b[11][0]++;cov_11trv5b8zj.s[33]++;label=document$1.createElement('span');cov_11trv5b8zj.s[34]++;label.id=elem.name;cov_11trv5b8zj.s[35]++;content.setAttribute('aria-labelledby',elem.name);}else{cov_11trv5b8zj.b[11][1]++;cov_11trv5b8zj.s[36]++;label=document$1.createElement('label');cov_11trv5b8zj.s[37]++;label.setAttribute('for',elem.name);}cov_11trv5b8zj.s[38]++;label.innerHTML=elem.label;cov_11trv5b8zj.s[39]++;label.className='pf-form-label';cov_11trv5b8zj.s[40]++;addClass(content,'pf-has-label');cov_11trv5b8zj.s[41]++;if(elem.required===true){cov_11trv5b8zj.b[12][0]++;cov_11trv5b8zj.s[42]++;label.innerHTML+=' *';}else{cov_11trv5b8zj.b[12][1]++;}cov_11trv5b8zj.s[43]++;wrapper.appendChild(label);}else{cov_11trv5b8zj.b[10][1]++;}cov_11trv5b8zj.s[44]++;if(elem.required===true){cov_11trv5b8zj.b[13][0]++;cov_11trv5b8zj.s[45]++;addClass(wrapper,'pf-form-required');cov_11trv5b8zj.s[46]++;content.setAttribute('data-required','true');cov_11trv5b8zj.s[47]++;if(elem.label){cov_11trv5b8zj.b[14][0]++;cov_11trv5b8zj.s[48]++;reqFlag=document$1.createElement('div');cov_11trv5b8zj.s[49]++;reqFlag.className='pf-required-flag';cov_11trv5b8zj.s[50]++;reqFlag.innerHTML='required';cov_11trv5b8zj.s[51]++;reqTriangle=document$1.createElement('span');cov_11trv5b8zj.s[52]++;reqFlag.appendChild(reqTriangle);cov_11trv5b8zj.s[53]++;wrapper.appendChild(reqFlag);}else{cov_11trv5b8zj.b[14][1]++;}}else{cov_11trv5b8zj.b[13][1]++;}cov_11trv5b8zj.s[54]++;if((cov_11trv5b8zj.b[16][0]++,elem.type==='date')||(cov_11trv5b8zj.b[16][1]++,elem.type==='email')){cov_11trv5b8zj.b[15][0]++;cov_11trv5b8zj.s[55]++;addClass(wrapper,'pf-form-required');cov_11trv5b8zj.s[56]++;content.setAttribute('data-validate','true');cov_11trv5b8zj.s[57]++;if(elem.label){cov_11trv5b8zj.b[17][0]++;cov_11trv5b8zj.s[58]++;reqFlag=document$1.createElement('div');cov_11trv5b8zj.s[59]++;reqFlag.className='pf-invalid-flag';cov_11trv5b8zj.s[60]++;reqFlag.innerHTML='invalid';cov_11trv5b8zj.s[61]++;reqTriangle=document$1.createElement('span');cov_11trv5b8zj.s[62]++;reqFlag.appendChild(reqTriangle);cov_11trv5b8zj.s[63]++;wrapper.appendChild(reqFlag);}else{cov_11trv5b8zj.b[17][1]++;}}else{cov_11trv5b8zj.b[15][1]++;}cov_11trv5b8zj.s[64]++;if(elem.placeholder){cov_11trv5b8zj.b[18][0]++;cov_11trv5b8zj.s[65]++;if(elem.type==='select'){cov_11trv5b8zj.b[19][0]++;var placeholder=(cov_11trv5b8zj.s[66]++,document$1.createElement('option'));cov_11trv5b8zj.s[67]++;placeholder.setAttribute('value','');cov_11trv5b8zj.s[68]++;placeholder.innerHTML=elem.placeholder;cov_11trv5b8zj.s[69]++;content.appendChild(placeholder);}else{cov_11trv5b8zj.b[19][1]++;cov_11trv5b8zj.s[70]++;content.placeholder=elem.placeholder;}cov_11trv5b8zj.s[71]++;if(!elem.label){cov_11trv5b8zj.b[20][0]++;cov_11trv5b8zj.s[72]++;content.setAttribute('aria-label',elem.placeholder);}else{cov_11trv5b8zj.b[20][1]++;}}else{cov_11trv5b8zj.b[18][1]++;}cov_11trv5b8zj.s[73]++;if(elem.values){cov_11trv5b8zj.b[21][0]++;cov_11trv5b8zj.s[74]++;for(i=0;i=0;i--){cov_1gumbpd57i.s[72]++;widgetHeadline[i].innerHTML=config.headline;}cov_1gumbpd57i.s[73]++;if(config.image){cov_1gumbpd57i.b[28][0]++;var widgetImage=(cov_1gumbpd57i.s[74]++,document$1.createElement('img'));cov_1gumbpd57i.s[75]++;widgetImage.src=config.image;cov_1gumbpd57i.s[76]++;widgetImage.className='pf-widget-img';cov_1gumbpd57i.s[77]++;if(config.layout==='button'){cov_1gumbpd57i.b[29][0]++;}else{cov_1gumbpd57i.b[29][1]++;cov_1gumbpd57i.s[78]++;if((cov_1gumbpd57i.b[31][0]++,config.layout==='modal')||(cov_1gumbpd57i.b[31][1]++,config.layout==='inline')){cov_1gumbpd57i.b[30][0]++;cov_1gumbpd57i.s[79]++;widgetContent.appendChild(widgetImage);}else{cov_1gumbpd57i.b[30][1]++;cov_1gumbpd57i.s[80]++;widgetBody.appendChild(widgetImage);}}}else{cov_1gumbpd57i.b[28][1]++;}cov_1gumbpd57i.s[81]++;switch(config.type){case'sitegate':cov_1gumbpd57i.b[32][0]++;case'form':cov_1gumbpd57i.b[32][1]++;cov_1gumbpd57i.s[82]++;if((cov_1gumbpd57i.b[34][0]++,config.formElements)&&(cov_1gumbpd57i.b[34][1]++,config.formElements.length)){cov_1gumbpd57i.b[33][0]++;var form=(cov_1gumbpd57i.s[83]++,widget.querySelector('form'));cov_1gumbpd57i.s[84]++;addClass(form,'pf-custom-form');var childName;var arr=(cov_1gumbpd57i.s[85]++,form.children);cov_1gumbpd57i.s[86]++;for(var k=0;k=WIDTH_BREAKPOINT){cov_4ggqwd3a4.b[5][0]++;cov_4ggqwd3a4.s[6]++;removeClass(rec,'stack');}else{cov_4ggqwd3a4.b[5][1]++;}}}else{cov_4ggqwd3a4.b[2][1]++;}}else{cov_4ggqwd3a4.b[0][1]++;}} - break; - } + var cov_b0kcrg3hs=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js',hash='5bebecf10199f15959bedc7da442bae714518f0a',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js',statementMap:{'0':{start:{line:32,column:19},end:{line:152,column:3}},'1':{start:{line:34,column:4},end:{line:38,column:5}},'2':{start:{line:35,column:6},end:{line:37,column:7}},'3':{start:{line:36,column:8},end:{line:36,column:15}},'4':{start:{line:40,column:4},end:{line:40,column:45}},'5':{start:{line:41,column:4},end:{line:41,column:38}},'6':{start:{line:44,column:4},end:{line:44,column:33}},'7':{start:{line:48,column:4},end:{line:53,column:5}},'8':{start:{line:49,column:6},end:{line:49,column:38}},'9':{start:{line:51,column:6},end:{line:51,column:40}},'10':{start:{line:52,column:6},end:{line:52,column:29}},'11':{start:{line:55,column:4},end:{line:57,column:5}},'12':{start:{line:56,column:6},end:{line:56,column:66}},'13':{start:{line:59,column:4},end:{line:102,column:5}},'14':{start:{line:63,column:6},end:{line:63,column:38}},'15':{start:{line:65,column:6},end:{line:89,column:7}},'16':{start:{line:67,column:24},end:{line:69,column:9}},'17':{start:{line:71,column:8},end:{line:88,column:9}},'18':{start:{line:72,column:10},end:{line:87,column:12}},'19':{start:{line:77,column:14},end:{line:85,column:15}},'20':{start:{line:78,column:16},end:{line:84,column:17}},'21':{start:{line:79,column:18},end:{line:79,column:38}},'22':{start:{line:80,column:18},end:{line:80,column:39}},'23':{start:{line:81,column:23},end:{line:84,column:17}},'24':{start:{line:82,column:18},end:{line:82,column:38}},'25':{start:{line:83,column:18},end:{line:83,column:39}},'26':{start:{line:92,column:21},end:{line:93,column:65}},'27':{start:{line:94,column:21},end:{line:94,column:53}},'28':{start:{line:96,column:6},end:{line:101,column:7}},'29':{start:{line:97,column:8},end:{line:97,column:35}},'30':{start:{line:99,column:8},end:{line:99,column:42}},'31':{start:{line:100,column:8},end:{line:100,column:74}},'32':{start:{line:106,column:4},end:{line:126,column:11}},'33':{start:{line:107,column:31},end:{line:107,column:51}},'34':{start:{line:109,column:6},end:{line:109,column:31}},'35':{start:{line:111,column:6},end:{line:116,column:7}},'36':{start:{line:112,column:8},end:{line:115,column:11}},'37':{start:{line:117,column:6},end:{line:125,column:7}},'38':{start:{line:121,column:8},end:{line:124,column:11}},'39':{start:{line:128,column:4},end:{line:132,column:5}},'40':{start:{line:129,column:6},end:{line:131,column:52}},'41':{start:{line:130,column:8},end:{line:130,column:37}},'42':{start:{line:134,column:4},end:{line:134,column:39}},'43':{start:{line:136,column:4},end:{line:142,column:6}},'44':{start:{line:140,column:8},end:{line:140,column:43}},'45':{start:{line:144,column:4},end:{line:151,column:5}},'46':{start:{line:145,column:6},end:{line:150,column:7}},'47':{start:{line:146,column:18},end:{line:146,column:39}},'48':{start:{line:147,column:8},end:{line:149,column:9}},'49':{start:{line:148,column:10},end:{line:148,column:56}},'50':{start:{line:154,column:29},end:{line:154,column:37}},'51':{start:{line:155,column:2},end:{line:159,column:3}},'52':{start:{line:156,column:4},end:{line:158,column:7}},'53':{start:{line:162,column:2},end:{line:169,column:3}},'54':{start:{line:163,column:4},end:{line:166,column:45}},'55':{start:{line:164,column:6},end:{line:164,column:20}},'56':{start:{line:165,column:6},end:{line:165,column:54}},'57':{start:{line:168,column:4},end:{line:168,column:18}}},fnMap:{'0':{name:'showWidget',decl:{start:{line:31,column:24},end:{line:31,column:34}},loc:{start:{line:31,column:39},end:{line:170,column:1}},line:31},'1':{name:'(anonymous_1)',decl:{start:{line:32,column:19},end:{line:32,column:20}},loc:{start:{line:32,column:37},end:{line:152,column:3}},line:32},'2':{name:'(anonymous_2)',decl:{start:{line:75,column:16},end:{line:75,column:17}},loc:{start:{line:75,column:30},end:{line:86,column:13}},line:75},'3':{name:'(anonymous_3)',decl:{start:{line:106,column:15},end:{line:106,column:16}},loc:{start:{line:106,column:27},end:{line:126,column:5}},line:106},'4':{name:'(anonymous_4)',decl:{start:{line:129,column:17},end:{line:129,column:18}},loc:{start:{line:129,column:29},end:{line:131,column:7}},line:129},'5':{name:'(anonymous_5)',decl:{start:{line:139,column:10},end:{line:139,column:11}},loc:{start:{line:139,column:22},end:{line:141,column:7}},line:139},'6':{name:'(anonymous_6)',decl:{start:{line:163,column:52},end:{line:163,column:53}},loc:{start:{line:163,column:64},end:{line:166,column:5}},line:163}},branchMap:{'0':{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},'1':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},'2':{loc:{start:{line:59,column:4},end:{line:102,column:5}},type:'if',locations:[{start:{line:59,column:4},end:{line:102,column:5}},{start:{line:59,column:4},end:{line:102,column:5}}],line:59},'3':{loc:{start:{line:60,column:6},end:{line:61,column:39}},type:'binary-expr',locations:[{start:{line:60,column:6},end:{line:60,column:44}},{start:{line:61,column:6},end:{line:61,column:39}}],line:60},'4':{loc:{start:{line:65,column:6},end:{line:89,column:7}},type:'if',locations:[{start:{line:65,column:6},end:{line:89,column:7}},{start:{line:65,column:6},end:{line:89,column:7}}],line:65},'5':{loc:{start:{line:65,column:10},end:{line:65,column:65}},type:'binary-expr',locations:[{start:{line:65,column:10},end:{line:65,column:35}},{start:{line:65,column:39},end:{line:65,column:65}}],line:65},'6':{loc:{start:{line:71,column:8},end:{line:88,column:9}},type:'if',locations:[{start:{line:71,column:8},end:{line:88,column:9}},{start:{line:71,column:8},end:{line:88,column:9}}],line:71},'7':{loc:{start:{line:77,column:14},end:{line:85,column:15}},type:'if',locations:[{start:{line:77,column:14},end:{line:85,column:15}},{start:{line:77,column:14},end:{line:85,column:15}}],line:77},'8':{loc:{start:{line:78,column:16},end:{line:84,column:17}},type:'if',locations:[{start:{line:78,column:16},end:{line:84,column:17}},{start:{line:78,column:16},end:{line:84,column:17}}],line:78},'9':{loc:{start:{line:81,column:23},end:{line:84,column:17}},type:'if',locations:[{start:{line:81,column:23},end:{line:84,column:17}},{start:{line:81,column:23},end:{line:84,column:17}}],line:81},'10':{loc:{start:{line:92,column:21},end:{line:93,column:65}},type:'cond-expr',locations:[{start:{line:93,column:10},end:{line:93,column:32}},{start:{line:93,column:35},end:{line:93,column:65}}],line:92},'11':{loc:{start:{line:96,column:6},end:{line:101,column:7}},type:'if',locations:[{start:{line:96,column:6},end:{line:101,column:7}},{start:{line:96,column:6},end:{line:101,column:7}}],line:96},'12':{loc:{start:{line:111,column:6},end:{line:116,column:7}},type:'if',locations:[{start:{line:111,column:6},end:{line:116,column:7}},{start:{line:111,column:6},end:{line:116,column:7}}],line:111},'13':{loc:{start:{line:117,column:6},end:{line:125,column:7}},type:'if',locations:[{start:{line:117,column:6},end:{line:125,column:7}},{start:{line:117,column:6},end:{line:125,column:7}}],line:117},'14':{loc:{start:{line:118,column:8},end:{line:119,column:55}},type:'binary-expr',locations:[{start:{line:118,column:8},end:{line:118,column:40}},{start:{line:119,column:8},end:{line:119,column:55}}],line:118},'15':{loc:{start:{line:128,column:4},end:{line:132,column:5}},type:'if',locations:[{start:{line:128,column:4},end:{line:132,column:5}},{start:{line:128,column:4},end:{line:132,column:5}}],line:128},'16':{loc:{start:{line:145,column:6},end:{line:150,column:7}},type:'if',locations:[{start:{line:145,column:6},end:{line:150,column:7}},{start:{line:145,column:6},end:{line:150,column:7}}],line:145},'17':{loc:{start:{line:147,column:8},end:{line:149,column:9}},type:'if',locations:[{start:{line:147,column:8},end:{line:149,column:9}},{start:{line:147,column:8},end:{line:149,column:9}}],line:147},'18':{loc:{start:{line:147,column:12},end:{line:147,column:75}},type:'binary-expr',locations:[{start:{line:147,column:12},end:{line:147,column:22}},{start:{line:147,column:26},end:{line:147,column:75}}],line:147},'19':{loc:{start:{line:155,column:2},end:{line:159,column:3}},type:'if',locations:[{start:{line:155,column:2},end:{line:159,column:3}},{start:{line:155,column:2},end:{line:159,column:3}}],line:155},'20':{loc:{start:{line:162,column:2},end:{line:169,column:3}},type:'if',locations:[{start:{line:162,column:2},end:{line:169,column:3}},{start:{line:162,column:2},end:{line:169,column:3}}],line:162},'21':{loc:{start:{line:162,column:6},end:{line:162,column:58}},type:'binary-expr',locations:[{start:{line:162,column:6},end:{line:162,column:25}},{start:{line:162,column:29},end:{line:162,column:58}}],line:162}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function showWidget(w){cov_b0kcrg3hs.f[0]++;cov_b0kcrg3hs.s[0]++;var openWidget=function(widget){cov_b0kcrg3hs.f[1]++;cov_b0kcrg3hs.s[1]++;for(var i=0;i0)){cov_efsy2sm4w.b[4][0]++;cov_efsy2sm4w.s[4]++;acctid=window.jstag.config.cid[0];}else{cov_efsy2sm4w.b[4][1]++;cov_efsy2sm4w.s[5]++;throw new Error('Could not get account id from Lytics Javascript tag.');}}cov_efsy2sm4w.s[6]++;if(!!acctid){cov_efsy2sm4w.b[6][0]++;cov_efsy2sm4w.s[7]++;pf.acctid=acctid;}else{cov_efsy2sm4w.b[6][1]++;cov_efsy2sm4w.s[8]++;throw new Error('Lytics Javascript tag returned an empty account id.');}}else{cov_efsy2sm4w.b[0][1]++;}} - // validate form input - if (!widgetAction || !widgetFormValidate(event)) { - return; - } else if (widgetForm) { - trackWidgetAction(widgetAction, config, widgetForm); + var cov_2ph5xt9m43=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-targeted-widgets.js',hash='b0d9c8b2ee7fe9e722b2f58efd359072c66b9657',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-targeted-widgets.js',statementMap:{'0':{start:{line:18,column:11},end:{line:18,column:15}},'1':{start:{line:21,column:2},end:{line:21,column:33}},'2':{start:{line:23,column:2},end:{line:25,column:3}},'3':{start:{line:24,column:4},end:{line:24,column:54}},'4':{start:{line:28,column:2},end:{line:70,column:3}},'5':{start:{line:29,column:4},end:{line:69,column:7}},'6':{start:{line:30,column:6},end:{line:30,column:28}},'7':{start:{line:31,column:28},end:{line:31,column:30}},'8':{start:{line:32,column:21},end:{line:32,column:38}},'9':{start:{line:35,column:6},end:{line:44,column:7}},'10':{start:{line:36,column:8},end:{line:43,column:9}},'11':{start:{line:37,column:23},end:{line:37,column:40}},'12':{start:{line:38,column:10},end:{line:42,column:11}},'13':{start:{line:41,column:12},end:{line:41,column:69}},'14':{start:{line:47,column:6},end:{line:62,column:7}},'15':{start:{line:48,column:8},end:{line:61,column:9}},'16':{start:{line:49,column:24},end:{line:49,column:42}},'17':{start:{line:50,column:10},end:{line:60,column:11}},'18':{start:{line:53,column:12},end:{line:59,column:13}},'19':{start:{line:54,column:14},end:{line:58,column:15}},'20':{start:{line:55,column:16},end:{line:57,column:17}},'21':{start:{line:56,column:18},end:{line:56,column:47}},'22':{start:{line:64,column:6},end:{line:68,column:7}},'23':{start:{line:65,column:8},end:{line:65,column:59}},'24':{start:{line:66,column:13},end:{line:68,column:7}},'25':{start:{line:67,column:8},end:{line:67,column:59}}},fnMap:{'0':{name:'initializeTargetedWidgets',decl:{start:{line:17,column:24},end:{line:17,column:49}},loc:{start:{line:17,column:69},end:{line:71,column:1}},line:17},'1':{name:'(anonymous_1)',decl:{start:{line:29,column:19},end:{line:29,column:20}},loc:{start:{line:29,column:31},end:{line:69,column:5}},line:29}},branchMap:{'0':{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23},'1':{loc:{start:{line:28,column:2},end:{line:70,column:3}},type:'if',locations:[{start:{line:28,column:2},end:{line:70,column:3}},{start:{line:28,column:2},end:{line:70,column:3}}],line:28},'2':{loc:{start:{line:28,column:6},end:{line:28,column:39}},type:'binary-expr',locations:[{start:{line:28,column:6},end:{line:28,column:20}},{start:{line:28,column:24},end:{line:28,column:39}}],line:28},'3':{loc:{start:{line:35,column:6},end:{line:44,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:44,column:7}},{start:{line:35,column:6},end:{line:44,column:7}}],line:35},'4':{loc:{start:{line:38,column:10},end:{line:42,column:11}},type:'if',locations:[{start:{line:38,column:10},end:{line:42,column:11}},{start:{line:38,column:10},end:{line:42,column:11}}],line:38},'5':{loc:{start:{line:38,column:14},end:{line:38,column:65}},type:'binary-expr',locations:[{start:{line:38,column:14},end:{line:38,column:22}},{start:{line:38,column:26},end:{line:38,column:65}}],line:38},'6':{loc:{start:{line:47,column:6},end:{line:62,column:7}},type:'if',locations:[{start:{line:47,column:6},end:{line:62,column:7}},{start:{line:47,column:6},end:{line:62,column:7}}],line:47},'7':{loc:{start:{line:50,column:10},end:{line:60,column:11}},type:'if',locations:[{start:{line:50,column:10},end:{line:60,column:11}},{start:{line:50,column:10},end:{line:60,column:11}}],line:50},'8':{loc:{start:{line:50,column:14},end:{line:50,column:66}},type:'binary-expr',locations:[{start:{line:50,column:14},end:{line:50,column:22}},{start:{line:50,column:26},end:{line:50,column:66}}],line:50},'9':{loc:{start:{line:55,column:16},end:{line:57,column:17}},type:'if',locations:[{start:{line:55,column:16},end:{line:57,column:17}},{start:{line:55,column:16},end:{line:57,column:17}}],line:55},'10':{loc:{start:{line:64,column:6},end:{line:68,column:7}},type:'if',locations:[{start:{line:64,column:6},end:{line:68,column:7}},{start:{line:64,column:6},end:{line:68,column:7}}],line:64},'11':{loc:{start:{line:66,column:13},end:{line:68,column:7}},type:'if',locations:[{start:{line:66,column:13},end:{line:68,column:7}},{start:{line:66,column:13},end:{line:68,column:7}}],line:66}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeTargetedWidgets(widgets,options){cov_2ph5xt9m43.f[0]++;var pf=(cov_2ph5xt9m43.s[0]++,this),i;cov_2ph5xt9m43.s[1]++;validateWidgetsObject(widgets);cov_2ph5xt9m43.s[2]++;if(widgets.common){cov_2ph5xt9m43.b[0][0]++;cov_2ph5xt9m43.s[3]++;pf.initializeWidgetArray(widgets.common,options);}else{cov_2ph5xt9m43.b[0][1]++;}cov_2ph5xt9m43.s[4]++;if((cov_2ph5xt9m43.b[2][0]++,widgets.target)||(cov_2ph5xt9m43.b[2][1]++,widgets.exclude)){cov_2ph5xt9m43.b[1][0]++;cov_2ph5xt9m43.s[5]++;pf.addCallback(function(){cov_2ph5xt9m43.f[1]++;cov_2ph5xt9m43.s[6]++;validateAccountId(pf);var targetedWidgets=(cov_2ph5xt9m43.s[7]++,[]),segments=(cov_2ph5xt9m43.s[8]++,getUserSegments());cov_2ph5xt9m43.s[9]++;if(widgets.target){cov_2ph5xt9m43.b[3][0]++;cov_2ph5xt9m43.s[10]++;for(i=0;i0){cov_1btou8obd2.b[6][0]++;cov_1btou8obd2.s[12]++;sessionStorage.setItem(PREFIX_REC+id,encodeURIComponent(JSON.stringify(rec.data)));cov_1btou8obd2.s[13]++;callback(rec.data);}else{cov_1btou8obd2.b[6][1]++;}cov_1btou8obd2.s[14]++;return;}else{cov_1btou8obd2.b[3][1]++;}}else{cov_1btou8obd2.b[1][1]++;}var storedCookieName=(cov_1btou8obd2.s[15]++,'seerid');var userByFieldName=(cov_1btou8obd2.s[16]++,'_uids');var userByFieldValue;cov_1btou8obd2.s[17]++;if((cov_1btou8obd2.b[8][0]++,window.jstag)&&(cov_1btou8obd2.b[8][1]++,window.jstag.config)&&(cov_1btou8obd2.b[8][2]++,window.jstag.config.cookie!=='')){cov_1btou8obd2.b[7][0]++;cov_1btou8obd2.s[18]++;storedCookieName=window.jstag.config.cookie;}else{cov_1btou8obd2.b[7][1]++;}cov_1btou8obd2.s[19]++;userByFieldValue=readCookie(storedCookieName);cov_1btou8obd2.s[20]++;if((cov_1btou8obd2.b[10][0]++,window.liosetup)&&(cov_1btou8obd2.b[10][1]++,window.liosetup.field)&&(cov_1btou8obd2.b[10][2]++,window.liosetup.field!=='')&&(cov_1btou8obd2.b[10][3]++,window.liosetup.value)&&(cov_1btou8obd2.b[10][4]++,window.liosetup.value!=='')){cov_1btou8obd2.b[9][0]++;cov_1btou8obd2.s[21]++;userByFieldName=window.liosetup.field;cov_1btou8obd2.s[22]++;userByFieldValue=window.liosetup.value;}else{cov_1btou8obd2.b[9][1]++;}cov_1btou8obd2.s[23]++;if((cov_1btou8obd2.b[12][0]++,!userByFieldName)&&(cov_1btou8obd2.b[12][1]++,!userByFieldValue)){cov_1btou8obd2.b[11][0]++;cov_1btou8obd2.s[24]++;console.warn('Could not determine BY field and value from config');cov_1btou8obd2.s[25]++;callback([]);}else{cov_1btou8obd2.b[11][1]++;}var recommendParts=(cov_1btou8obd2.s[26]++,[API_URL,'api','content','recommend',accountId,'user',userByFieldName,userByFieldValue]);var ql=(cov_1btou8obd2.s[27]++,params.ql),ast=(cov_1btou8obd2.s[28]++,params.ast),display=(cov_1btou8obd2.s[29]++,params.display);cov_1btou8obd2.s[30]++;delete params.ql;cov_1btou8obd2.s[31]++;delete params.ast;cov_1btou8obd2.s[32]++;delete params.display;var queries=(cov_1btou8obd2.s[33]++,constructQueries(params));cov_1btou8obd2.s[34]++;params.display=display;cov_1btou8obd2.s[35]++;if(!params.contentsegment){cov_1btou8obd2.b[13][0]++;cov_1btou8obd2.s[36]++;if((cov_1btou8obd2.b[15][0]++,ql)&&(cov_1btou8obd2.b[15][1]++,ql.raw)||(cov_1btou8obd2.b[15][2]++,ast)){cov_1btou8obd2.b[14][0]++;cov_1btou8obd2.s[37]++;if(queries.length>0){cov_1btou8obd2.b[16][0]++;cov_1btou8obd2.s[38]++;queries+='&';}else{cov_1btou8obd2.b[16][1]++;cov_1btou8obd2.s[39]++;queries+='?';}cov_1btou8obd2.s[40]++;if((cov_1btou8obd2.b[18][0]++,ql)&&(cov_1btou8obd2.b[18][1]++,ql.raw)){cov_1btou8obd2.b[17][0]++;cov_1btou8obd2.s[41]++;queries+='ql='+ql.raw;}else{cov_1btou8obd2.b[17][1]++;var contentSegment=(cov_1btou8obd2.s[42]++,{table:'content',ast:ast});cov_1btou8obd2.s[43]++;queries+='contentsegments=['+encodeURIComponent(JSON.stringify(contentSegment))+']';}}else{cov_1btou8obd2.b[14][1]++;}}else{cov_1btou8obd2.b[13][1]++;}var recommendUrl=(cov_1btou8obd2.s[44]++,recommendParts.join('/')+queries);cov_1btou8obd2.s[45]++;getData(recommendUrl,function(json){cov_1btou8obd2.f[1]++;var resp;cov_1btou8obd2.s[46]++;try{cov_1btou8obd2.s[47]++;resp=JSON.parse(json);}catch(e){cov_1btou8obd2.s[48]++;console.warn('Could not parse json response:'+e);cov_1btou8obd2.s[49]++;callback([]);cov_1btou8obd2.s[50]++;return;}cov_1btou8obd2.s[51]++;if((cov_1btou8obd2.b[20][0]++,resp.data)&&(cov_1btou8obd2.b[20][1]++,resp.data.length>0)){cov_1btou8obd2.b[19][0]++;cov_1btou8obd2.s[52]++;for(var i=0;i1){cov_1btou8obd2.b[22][0]++;cov_1btou8obd2.s[57]++;resp.data[i].url='http://'+url;}else{cov_1btou8obd2.b[22][1]++;}}else{cov_1btou8obd2.b[21][1]++;}}cov_1btou8obd2.s[58]++;sessionStorage.setItem(PREFIX_REC+id,encodeURIComponent(JSON.stringify(resp)));cov_1btou8obd2.s[59]++;callback(resp.data);}else{cov_1btou8obd2.b[19][1]++;cov_1btou8obd2.s[60]++;callback([]);}},function(){cov_1btou8obd2.f[2]++;cov_1btou8obd2.s[61]++;callback([]);});} - if (shouldClose) { - if ( - config.layout !== 'inline' && - (!config.formStates || !config.formStates.success) - ) { - closeWidget(widget.id, true); - widgetOnModalClose(widget, config, event); - } else { - // show success state - handleFormStates(true, widget, config); - } - } - }; - } + var cov_ih684mxdh=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/set-widget-content.js',hash='e1e38c8e15708b1f5626774ff18c306b77a852b2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/set-widget-content.js',statementMap:{'0':{start:{line:16,column:15},end:{line:16,column:31}},'1':{start:{line:18,column:2},end:{line:21,column:3}},'2':{start:{line:19,column:4},end:{line:19,column:56}},'3':{start:{line:20,column:4},end:{line:20,column:29}},'4':{start:{line:23,column:2},end:{line:47,column:5}},'5':{start:{line:26,column:4},end:{line:38,column:5}},'6':{start:{line:27,column:20},end:{line:27,column:27}},'7':{start:{line:28,column:6},end:{line:37,column:8}},'8':{start:{line:42,column:4},end:{line:44,column:5}},'9':{start:{line:43,column:6},end:{line:43,column:77}},'10':{start:{line:46,column:4},end:{line:46,column:9}}},fnMap:{'0':{name:'setWidgetContent',decl:{start:{line:15,column:24},end:{line:15,column:40}},loc:{start:{line:15,column:65},end:{line:48,column:1}},line:15},'1':{name:'(anonymous_1)',decl:{start:{line:23,column:49},end:{line:23,column:50}},loc:{start:{line:23,column:65},end:{line:47,column:3}},line:23}},branchMap:{'0':{loc:{start:{line:18,column:2},end:{line:21,column:3}},type:'if',locations:[{start:{line:18,column:2},end:{line:21,column:3}},{start:{line:18,column:2},end:{line:21,column:3}}],line:18},'1':{loc:{start:{line:18,column:6},end:{line:18,column:33}},type:'binary-expr',locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:33}}],line:18},'2':{loc:{start:{line:26,column:4},end:{line:38,column:5}},type:'if',locations:[{start:{line:26,column:4},end:{line:38,column:5}},{start:{line:26,column:4},end:{line:38,column:5}}],line:26},'3':{loc:{start:{line:42,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:42,column:4},end:{line:44,column:5}},{start:{line:42,column:4},end:{line:44,column:5}}],line:42}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setWidgetContent(accountId,widget,cb){cov_ih684mxdh.f[0]++;var params=(cov_ih684mxdh.s[0]++,widget.recommend);cov_ih684mxdh.s[1]++;if((cov_ih684mxdh.b[1][0]++,params)&&(cov_ih684mxdh.b[1][1]++,params.collection)){cov_ih684mxdh.b[0][0]++;cov_ih684mxdh.s[2]++;params.contentsegment=widget.recommend.collection;cov_ih684mxdh.s[3]++;delete params.collection;}else{cov_ih684mxdh.b[0][1]++;}cov_ih684mxdh.s[4]++;recommendContent(accountId,params,widget.id,function(resp){cov_ih684mxdh.f[1]++;cov_ih684mxdh.s[5]++;if(resp[0]){cov_ih684mxdh.b[2][0]++;var content=(cov_ih684mxdh.s[6]++,resp[0]);cov_ih684mxdh.s[7]++;widget.content=[{title:content.title,description:content.description,url:content.url,image:content.primary_image,date:content.created,author:content.author}];}else{cov_ih684mxdh.b[2][1]++;}cov_ih684mxdh.s[8]++;if(!widget.content){cov_ih684mxdh.b[3][0]++;cov_ih684mxdh.s[9]++;throw new Error('Could not get recommendation and no default defined');}else{cov_ih684mxdh.b[3][1]++;}cov_ih684mxdh.s[10]++;cb();});} - if (widgetReco) { - widgetReco.onmouseenter = function (event) { - trackWidgetAction('hover', config, event.target); - }; + var cov_69tgys6jw=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/validation/validate-recommendation-widget.js',hash='0d37004970cc7e8e85150d9c725ba316c4f00d34',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/validation/validate-recommendation-widget.js',statementMap:{'0':{start:{line:12,column:2},end:{line:14,column:3}},'1':{start:{line:13,column:4},end:{line:13,column:74}},'2':{start:{line:16,column:2},end:{line:22,column:3}},'3':{start:{line:21,column:4},end:{line:21,column:69}},'4':{start:{line:24,column:2},end:{line:26,column:3}},'5':{start:{line:25,column:4},end:{line:25,column:80}}},fnMap:{'0':{name:'validateRecommendationWidget',decl:{start:{line:10,column:24},end:{line:10,column:52}},loc:{start:{line:10,column:62},end:{line:27,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:12,column:2},end:{line:14,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:14,column:3}},{start:{line:12,column:2},end:{line:14,column:3}}],line:12},'1':{loc:{start:{line:16,column:2},end:{line:22,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:22,column:3}},{start:{line:16,column:2},end:{line:22,column:3}}],line:16},'2':{loc:{start:{line:17,column:4},end:{line:19,column:30}},type:'binary-expr',locations:[{start:{line:17,column:4},end:{line:17,column:32}},{start:{line:18,column:4},end:{line:18,column:29}},{start:{line:19,column:4},end:{line:19,column:30}}],line:17},'3':{loc:{start:{line:24,column:2},end:{line:26,column:3}},type:'if',locations:[{start:{line:24,column:2},end:{line:26,column:3}},{start:{line:24,column:2},end:{line:26,column:3}}],line:24},'4':{loc:{start:{line:24,column:6},end:{line:24,column:71}},type:'binary-expr',locations:[{start:{line:24,column:6},end:{line:24,column:20}},{start:{line:24,column:24},end:{line:24,column:41}},{start:{line:24,column:45},end:{line:24,column:71}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0,0],'3':[0,0],'4':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function validateRecommendationWidget(widget){cov_69tgys6jw.f[0]++;cov_69tgys6jw.s[0]++;if(widget.type!=='message'){cov_69tgys6jw.b[0][0]++;cov_69tgys6jw.s[1]++;throw new Error('Unsupported widget type for content recommendation');}else{cov_69tgys6jw.b[0][1]++;}cov_69tgys6jw.s[2]++;if((cov_69tgys6jw.b[2][0]++,widget.layout!=='slideout')&&(cov_69tgys6jw.b[2][1]++,widget.layout!=='modal')&&(cov_69tgys6jw.b[2][2]++,widget.layout!=='inline')){cov_69tgys6jw.b[1][0]++;cov_69tgys6jw.s[3]++;throw new Error('Unsupported layout for content recommendation');}else{cov_69tgys6jw.b[1][1]++;}cov_69tgys6jw.s[4]++;if((cov_69tgys6jw.b[4][0]++,widget.content)&&(cov_69tgys6jw.b[4][1]++,widget.content[0])&&(cov_69tgys6jw.b[4][2]++,!widget.content[0].default)){cov_69tgys6jw.b[3][0]++;cov_69tgys6jw.s[5]++;throw new Error('Cannot define recommended content unless it is a default');}else{cov_69tgys6jw.b[3][1]++;}} - widgetReco.onclick = function (event) { - trackWidgetAction('confirm', config, event.target); - updateActionCookie(PREFIX_CONFIRM + widget.id, config.expiration); - }; - } - } + var cov_kqu4ke1zg=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/preload-recommendation.js',hash='1f23983a04e4dc24f7884f69602dbbfb56a1ebe5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/preload-recommendation.js',statementMap:{'0':{start:{line:20,column:2},end:{line:25,column:3}},'1':{start:{line:21,column:4},end:{line:21,column:41}},'2':{start:{line:22,column:4},end:{line:22,column:44}},'3':{start:{line:24,column:4},end:{line:24,column:9}}},fnMap:{'0':{name:'preloadRecommendation',decl:{start:{line:19,column:24},end:{line:19,column:45}},loc:{start:{line:19,column:63},end:{line:26,column:1}},line:19}},branchMap:{'0':{loc:{start:{line:20,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:20,column:2},end:{line:25,column:3}},{start:{line:20,column:2},end:{line:25,column:3}}],line:20}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function preloadRecommendation(widget,pf,cb){cov_kqu4ke1zg.f[0]++;cov_kqu4ke1zg.s[0]++;if(hasRecommend(widget)){cov_kqu4ke1zg.b[0][0]++;cov_kqu4ke1zg.s[1]++;validateRecommendationWidget(widget);cov_kqu4ke1zg.s[2]++;setWidgetContent(pf.acctid,widget,cb);}else{cov_kqu4ke1zg.b[0][1]++;cov_kqu4ke1zg.s[3]++;cb();}} - /** @module pathfora/widgets/recommendation/setup-widget-content-unit */ + var cov_kmsq8bev8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget-array.js',hash='2cb980a6b67cfefb873c610b49f61228a17be652',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget-array.js',statementMap:{'0':{start:{line:25,column:11},end:{line:25,column:15}},'1':{start:{line:26,column:2},end:{line:26,column:40}},'2':{start:{line:28,column:19},end:{line:77,column:3}},'3':{start:{line:29,column:4},end:{line:31,column:5}},'4':{start:{line:30,column:6},end:{line:30,column:13}},'5':{start:{line:33,column:17},end:{line:33,column:35}},'6':{start:{line:34,column:19},end:{line:34,column:44}},'7':{start:{line:35,column:18},end:{line:35,column:38}},'8':{start:{line:37,column:4},end:{line:37,column:34}},'9':{start:{line:38,column:4},end:{line:38,column:35}},'10':{start:{line:39,column:4},end:{line:39,column:40}},'11':{start:{line:41,column:4},end:{line:45,column:5}},'12':{start:{line:42,column:6},end:{line:42,column:55}},'13':{start:{line:44,column:6},end:{line:44,column:65}},'14':{start:{line:48,column:4},end:{line:56,column:5}},'15':{start:{line:49,column:6},end:{line:51,column:7}},'16':{start:{line:50,column:8},end:{line:50,column:31}},'17':{start:{line:53,column:6},end:{line:55,column:7}},'18':{start:{line:54,column:8},end:{line:54,column:51}},'19':{start:{line:58,column:4},end:{line:72,column:7}},'20':{start:{line:59,column:6},end:{line:71,column:9}},'21':{start:{line:60,column:8},end:{line:60,column:49}},'22':{start:{line:61,column:8},end:{line:70,column:9}},'23':{start:{line:62,column:10},end:{line:67,column:11}},'24':{start:{line:66,column:12},end:{line:66,column:19}},'25':{start:{line:69,column:10},end:{line:69,column:58}},'26':{start:{line:74,column:4},end:{line:76,column:5}},'27':{start:{line:75,column:6},end:{line:75,column:54}},'28':{start:{line:79,column:2},end:{line:79,column:32}}},fnMap:{'0':{name:'initializeWidgetArray',decl:{start:{line:24,column:24},end:{line:24,column:45}},loc:{start:{line:24,column:63},end:{line:80,column:1}},line:24},'1':{name:'(anonymous_1)',decl:{start:{line:28,column:19},end:{line:28,column:20}},loc:{start:{line:28,column:62},end:{line:77,column:3}},line:28},'2':{name:'(anonymous_2)',decl:{start:{line:58,column:27},end:{line:58,column:28}},loc:{start:{line:58,column:39},end:{line:72,column:5}},line:58},'3':{name:'(anonymous_3)',decl:{start:{line:59,column:40},end:{line:59,column:41}},loc:{start:{line:59,column:52},end:{line:71,column:7}},line:59}},branchMap:{'0':{loc:{start:{line:29,column:4},end:{line:31,column:5}},type:'if',locations:[{start:{line:29,column:4},end:{line:31,column:5}},{start:{line:29,column:4},end:{line:31,column:5}}],line:29},'1':{loc:{start:{line:41,column:4},end:{line:45,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:45,column:5}},{start:{line:41,column:4},end:{line:45,column:5}}],line:41},'2':{loc:{start:{line:48,column:4},end:{line:56,column:5}},type:'if',locations:[{start:{line:48,column:4},end:{line:56,column:5}},{start:{line:48,column:4},end:{line:56,column:5}}],line:48},'3':{loc:{start:{line:49,column:6},end:{line:51,column:7}},type:'if',locations:[{start:{line:49,column:6},end:{line:51,column:7}},{start:{line:49,column:6},end:{line:51,column:7}}],line:49},'4':{loc:{start:{line:53,column:6},end:{line:55,column:7}},type:'if',locations:[{start:{line:53,column:6},end:{line:55,column:7}},{start:{line:53,column:6},end:{line:55,column:7}}],line:53},'5':{loc:{start:{line:61,column:8},end:{line:70,column:9}},type:'if',locations:[{start:{line:61,column:8},end:{line:70,column:9}},{start:{line:61,column:8},end:{line:70,column:9}}],line:61},'6':{loc:{start:{line:61,column:12},end:{line:61,column:76}},type:'binary-expr',locations:[{start:{line:61,column:12},end:{line:61,column:23}},{start:{line:61,column:27},end:{line:61,column:76}}],line:61},'7':{loc:{start:{line:62,column:10},end:{line:67,column:11}},type:'if',locations:[{start:{line:62,column:10},end:{line:67,column:11}},{start:{line:62,column:10},end:{line:67,column:11}}],line:62},'8':{loc:{start:{line:63,column:12},end:{line:64,column:64}},type:'binary-expr',locations:[{start:{line:63,column:12},end:{line:63,column:51}},{start:{line:64,column:12},end:{line:64,column:64}}],line:63},'9':{loc:{start:{line:74,column:4},end:{line:76,column:5}},type:'if',locations:[{start:{line:74,column:4},end:{line:76,column:5}},{start:{line:74,column:4},end:{line:76,column:5}}],line:74},'10':{loc:{start:{line:74,column:8},end:{line:74,column:73}},type:'binary-expr',locations:[{start:{line:74,column:8},end:{line:74,column:20}},{start:{line:74,column:24},end:{line:74,column:73}}],line:74}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeWidgetArray(array,options){cov_kmsq8bev8.f[0]++;var pf=(cov_kmsq8bev8.s[0]++,this);cov_kmsq8bev8.s[1]++;widgetTracker.prioritizedWidgets=[];cov_kmsq8bev8.s[2]++;var initWidget=function(widgetArray,index,initOptions){cov_kmsq8bev8.f[1]++;cov_kmsq8bev8.s[3]++;if(index>=widgetArray.length){cov_kmsq8bev8.b[0][0]++;cov_kmsq8bev8.s[4]++;return;}else{cov_kmsq8bev8.b[0][1]++;}var widget=(cov_kmsq8bev8.s[5]++,widgetArray[index]),defaults=(cov_kmsq8bev8.s[6]++,defaultProps[widget.type]),globals=(cov_kmsq8bev8.s[7]++,defaultProps.generic);cov_kmsq8bev8.s[8]++;updateObject(widget,globals);cov_kmsq8bev8.s[9]++;updateObject(widget,defaults);cov_kmsq8bev8.s[10]++;updateObject(widget,widget.config);cov_kmsq8bev8.s[11]++;if(widgetTracker.initializedWidgets.indexOf(widget.id)<0){cov_kmsq8bev8.b[1][0]++;cov_kmsq8bev8.s[12]++;widgetTracker.initializedWidgets.push(widget.id);}else{cov_kmsq8bev8.b[1][1]++;cov_kmsq8bev8.s[13]++;throw new Error('Cannot add two widgets with the same id');}cov_kmsq8bev8.s[14]++;if(widget.success){cov_kmsq8bev8.b[2][0]++;cov_kmsq8bev8.s[15]++;if(!widget.formStates){cov_kmsq8bev8.b[3][0]++;cov_kmsq8bev8.s[16]++;widget.formStates={};}else{cov_kmsq8bev8.b[3][1]++;}cov_kmsq8bev8.s[17]++;if(!widget.formStates.success){cov_kmsq8bev8.b[4][0]++;cov_kmsq8bev8.s[18]++;widget.formStates.success=widget.success;}else{cov_kmsq8bev8.b[4][1]++;}}else{cov_kmsq8bev8.b[2][1]++;}cov_kmsq8bev8.s[19]++;preloadLio(widget,pf,function(){cov_kmsq8bev8.f[2]++;cov_kmsq8bev8.s[20]++;preloadRecommendation(widget,pf,function(){cov_kmsq8bev8.f[3]++;cov_kmsq8bev8.s[21]++;pf.initializeWidget(widget,initOptions);cov_kmsq8bev8.s[22]++;if((cov_kmsq8bev8.b[6][0]++,initOptions)&&(cov_kmsq8bev8.b[6][1]++,initOptions.priority===OPTIONS_PRIORITY_ORDERED)){cov_kmsq8bev8.b[5][0]++;cov_kmsq8bev8.s[23]++;if((cov_kmsq8bev8.b[8][0]++,widgetTracker.prioritizedWidgets.length)&&(cov_kmsq8bev8.b[8][1]++,widgetTracker.prioritizedWidgets[0].id===widget.id)){cov_kmsq8bev8.b[7][0]++;cov_kmsq8bev8.s[24]++;return;}else{cov_kmsq8bev8.b[7][1]++;}cov_kmsq8bev8.s[25]++;initWidget(widgetArray,index+1,initOptions);}else{cov_kmsq8bev8.b[5][1]++;}});});cov_kmsq8bev8.s[26]++;if((cov_kmsq8bev8.b[10][0]++,!initOptions)||(cov_kmsq8bev8.b[10][1]++,initOptions.priority!==OPTIONS_PRIORITY_ORDERED)){cov_kmsq8bev8.b[9][0]++;cov_kmsq8bev8.s[27]++;initWidget(widgetArray,index+1,initOptions);}else{cov_kmsq8bev8.b[9][1]++;}};cov_kmsq8bev8.s[28]++;initWidget(array,0,options);} - /** - * Setup HTML for a widget with content recommendations - * - * @exports setupWidgetContentUnit - * @params {object} widget - * @params {object} config - */ - function setupWidgetContentUnit (widget, config) { - var widgetContentUnit = widget.querySelector('.pf-content-unit'), - settings = config.recommend; + var cov_asbi0800l=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js',hash='8fbdbfdbd7ed43bc0f01f77d8e1b86f99e6ed67d',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js',statementMap:{'0':{start:{line:26,column:2},end:{line:28,column:3}},'1':{start:{line:27,column:4},end:{line:27,column:16}},'2':{start:{line:32,column:19},end:{line:32,column:52}},'3':{start:{line:33,column:13},end:{line:33,column:18}},'4':{start:{line:36,column:2},end:{line:41,column:3}},'5':{start:{line:37,column:4},end:{line:37,column:31}},'6':{start:{line:38,column:4},end:{line:38,column:72}},'7':{start:{line:39,column:4},end:{line:39,column:57}},'8':{start:{line:40,column:4},end:{line:40,column:16}},'9':{start:{line:44,column:2},end:{line:112,column:3}},'10':{start:{line:46,column:19},end:{line:46,column:49}},'11':{start:{line:47,column:16},end:{line:47,column:35}},'12':{start:{line:48,column:14},end:{line:48,column:16}},'13':{start:{line:51,column:4},end:{line:53,column:5}},'14':{start:{line:52,column:6},end:{line:52,column:28}},'15':{start:{line:56,column:16},end:{line:56,column:42}},'16':{start:{line:65,column:4},end:{line:74,column:5}},'17':{start:{line:66,column:6},end:{line:66,column:32}},'18':{start:{line:68,column:11},end:{line:74,column:5}},'19':{start:{line:70,column:19},end:{line:70,column:43}},'20':{start:{line:71,column:6},end:{line:73,column:7}},'21':{start:{line:72,column:8},end:{line:72,column:35}},'22':{start:{line:77,column:4},end:{line:81,column:5}},'23':{start:{line:78,column:6},end:{line:80,column:7}},'24':{start:{line:79,column:8},end:{line:79,column:36}},'25':{start:{line:84,column:4},end:{line:92,column:5}},'26':{start:{line:85,column:6},end:{line:85,column:27}},'27':{start:{line:87,column:6},end:{line:91,column:7}},'28':{start:{line:88,column:8},end:{line:90,column:9}},'29':{start:{line:89,column:10},end:{line:89,column:38}},'30':{start:{line:97,column:4},end:{line:108,column:5}},'31':{start:{line:98,column:6},end:{line:98,column:50}},'32':{start:{line:100,column:11},end:{line:108,column:5}},'33':{start:{line:104,column:6},end:{line:104,column:19}},'34':{start:{line:107,column:6},end:{line:107,column:46}},'35':{start:{line:110,column:4},end:{line:110,column:43}},'36':{start:{line:111,column:4},end:{line:111,column:21}},'37':{start:{line:115,column:2},end:{line:123,column:3}},'38':{start:{line:116,column:4},end:{line:120,column:5}},'39':{start:{line:117,column:6},end:{line:117,column:79}},'40':{start:{line:119,column:6},end:{line:119,column:59}},'41':{start:{line:122,column:4},end:{line:122,column:42}},'42':{start:{line:125,column:2},end:{line:125,column:14}}},fnMap:{'0':{name:'replaceEntityField',decl:{start:{line:20,column:24},end:{line:20,column:42}},loc:{start:{line:25,column:2},end:{line:126,column:1}},line:25}},branchMap:{'0':{loc:{start:{line:26,column:2},end:{line:28,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:28,column:3}},{start:{line:26,column:2},end:{line:28,column:3}}],line:26},'1':{loc:{start:{line:26,column:6},end:{line:26,column:29}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:12}},{start:{line:26,column:16},end:{line:26,column:29}}],line:26},'2':{loc:{start:{line:36,column:2},end:{line:41,column:3}},type:'if',locations:[{start:{line:36,column:2},end:{line:41,column:3}},{start:{line:36,column:2},end:{line:41,column:3}}],line:36},'3':{loc:{start:{line:51,column:4},end:{line:53,column:5}},type:'if',locations:[{start:{line:51,column:4},end:{line:53,column:5}},{start:{line:51,column:4},end:{line:53,column:5}}],line:51},'4':{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:'if',locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},'5':{loc:{start:{line:65,column:8},end:{line:65,column:37}},type:'binary-expr',locations:[{start:{line:65,column:8},end:{line:65,column:18}},{start:{line:65,column:22},end:{line:65,column:37}}],line:65},'6':{loc:{start:{line:68,column:11},end:{line:74,column:5}},type:'if',locations:[{start:{line:68,column:11},end:{line:74,column:5}},{start:{line:68,column:11},end:{line:74,column:5}}],line:68},'7':{loc:{start:{line:68,column:15},end:{line:68,column:75}},type:'binary-expr',locations:[{start:{line:68,column:15},end:{line:68,column:27}},{start:{line:68,column:31},end:{line:68,column:75}}],line:68},'8':{loc:{start:{line:71,column:6},end:{line:73,column:7}},type:'if',locations:[{start:{line:71,column:6},end:{line:73,column:7}},{start:{line:71,column:6},end:{line:73,column:7}}],line:71},'9':{loc:{start:{line:71,column:10},end:{line:71,column:51}},type:'binary-expr',locations:[{start:{line:71,column:10},end:{line:71,column:16}},{start:{line:71,column:20},end:{line:71,column:31}},{start:{line:71,column:35},end:{line:71,column:51}}],line:71},'10':{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:'if',locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},'11':{loc:{start:{line:84,column:4},end:{line:92,column:5}},type:'if',locations:[{start:{line:84,column:4},end:{line:92,column:5}},{start:{line:84,column:4},end:{line:92,column:5}}],line:84},'12':{loc:{start:{line:88,column:8},end:{line:90,column:9}},type:'if',locations:[{start:{line:88,column:8},end:{line:90,column:9}},{start:{line:88,column:8},end:{line:90,column:9}}],line:88},'13':{loc:{start:{line:97,column:4},end:{line:108,column:5}},type:'if',locations:[{start:{line:97,column:4},end:{line:108,column:5}},{start:{line:97,column:4},end:{line:108,column:5}}],line:97},'14':{loc:{start:{line:100,column:11},end:{line:108,column:5}},type:'if',locations:[{start:{line:100,column:11},end:{line:108,column:5}},{start:{line:100,column:11},end:{line:108,column:5}}],line:100},'15':{loc:{start:{line:101,column:6},end:{line:102,column:59}},type:'binary-expr',locations:[{start:{line:101,column:7},end:{line:101,column:11}},{start:{line:101,column:15},end:{line:101,column:31}},{start:{line:102,column:6},end:{line:102,column:59}}],line:101},'16':{loc:{start:{line:115,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:115,column:2},end:{line:123,column:3}},{start:{line:115,column:2},end:{line:123,column:3}}],line:115},'17':{loc:{start:{line:116,column:4},end:{line:120,column:5}},type:'if',locations:[{start:{line:116,column:4},end:{line:120,column:5}},{start:{line:116,column:4},end:{line:120,column:5}}],line:116}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0,0],'16':[0,0],'17':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function replaceEntityField(widget,fieldName,found,customData){cov_asbi0800l.f[0]++;cov_asbi0800l.s[0]++;if((cov_asbi0800l.b[1][0]++,!found)||(cov_asbi0800l.b[1][1]++,!found.length)){cov_asbi0800l.b[0][0]++;cov_asbi0800l.s[1]++;return true;}else{cov_asbi0800l.b[0][1]++;}var fnParams,fn,currentVal=(cov_asbi0800l.s[2]++,getObjectValue(widget,fieldName)),isFn=(cov_asbi0800l.s[3]++,false);cov_asbi0800l.s[4]++;if(typeof currentVal==='function'){cov_asbi0800l.b[2][0]++;cov_asbi0800l.s[5]++;fn=currentVal.toString();cov_asbi0800l.s[6]++;currentVal=fn.substring(fn.indexOf('{')+1,fn.lastIndexOf('}'));cov_asbi0800l.s[7]++;fnParams=fn.match(/(function.+\()(.+(?=\)))(.+$)/);cov_asbi0800l.s[8]++;isFn=true;}else{cov_asbi0800l.b[2][1]++;}cov_asbi0800l.s[9]++;for(var f=0;f1){cov_asbi0800l.b[3][0]++;cov_asbi0800l.s[14]++;def=parts[1].trim();}else{cov_asbi0800l.b[3][1]++;}var split=(cov_asbi0800l.s[15]++,parts[0].trim().split('.'));var dataval;cov_asbi0800l.s[16]++;if((cov_asbi0800l.b[5][0]++,window.lio)&&(cov_asbi0800l.b[5][1]++,window.lio.data)){cov_asbi0800l.b[4][0]++;cov_asbi0800l.s[17]++;dataval=window.lio.data;}else{cov_asbi0800l.b[4][1]++;cov_asbi0800l.s[18]++;if((cov_asbi0800l.b[7][0]++,window.jstag)&&(cov_asbi0800l.b[7][1]++,typeof window.jstag.getEntity==='function')){cov_asbi0800l.b[6][0]++;var entity=(cov_asbi0800l.s[19]++,window.jstag.getEntity());cov_asbi0800l.s[20]++;if((cov_asbi0800l.b[9][0]++,entity)&&(cov_asbi0800l.b[9][1]++,entity.data)&&(cov_asbi0800l.b[9][2]++,entity.data.user)){cov_asbi0800l.b[8][0]++;cov_asbi0800l.s[21]++;dataval=entity.data.user;}else{cov_asbi0800l.b[8][1]++;}}else{cov_asbi0800l.b[6][1]++;}}var s;cov_asbi0800l.s[22]++;for(s=0;s 0) { - // The top recommendation should be default if we couldn't - // get one from the api - var rec = config.content[0], - recImage = document$1.createElement('div'), - recMeta = document$1.createElement('div'), - recTitle = document$1.createElement('h4'), - recDesc = document$1.createElement('p'), - recInfo = document$1.createElement('span'); + var cov_smgnlngmj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/entity-field-checker.js',hash='1c64a92461633b4313bfe4a2557e4316841cf3ea',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/entity-field-checker.js',statementMap:{'0':{start:{line:27,column:14},end:{line:27,column:18}},'1':{start:{line:29,column:2},end:{line:47,column:3}},'2':{start:{line:30,column:16},end:{line:30,column:60}},'3':{start:{line:31,column:21},end:{line:31,column:61}},'4':{start:{line:34,column:4},end:{line:36,column:5}},'5':{start:{line:35,column:6},end:{line:35,column:41}},'6':{start:{line:38,column:4},end:{line:46,column:5}},'7':{start:{line:39,column:6},end:{line:39,column:38}},'8':{start:{line:41,column:6},end:{line:45,column:7}},'9':{start:{line:42,column:8},end:{line:44,column:74}},'10':{start:{line:49,column:2},end:{line:49,column:15}}},fnMap:{'0':{name:'entityFieldChecker',decl:{start:{line:25,column:24},end:{line:25,column:42}},loc:{start:{line:25,column:64},end:{line:50,column:1}},line:25}},branchMap:{'0':{loc:{start:{line:34,column:4},end:{line:36,column:5}},type:'if',locations:[{start:{line:34,column:4},end:{line:36,column:5}},{start:{line:34,column:4},end:{line:36,column:5}}],line:34},'1':{loc:{start:{line:38,column:4},end:{line:46,column:5}},type:'if',locations:[{start:{line:38,column:4},end:{line:46,column:5}},{start:{line:38,column:4},end:{line:46,column:5}}],line:38},'2':{loc:{start:{line:41,column:6},end:{line:45,column:7}},type:'if',locations:[{start:{line:41,column:6},end:{line:45,column:7}},{start:{line:41,column:6},end:{line:45,column:7}}],line:41},'3':{loc:{start:{line:41,column:10},end:{line:41,column:35}},type:'binary-expr',locations:[{start:{line:41,column:10},end:{line:41,column:15}},{start:{line:41,column:19},end:{line:41,column:35}}],line:41},'4':{loc:{start:{line:43,column:10},end:{line:44,column:73}},type:'binary-expr',locations:[{start:{line:43,column:10},end:{line:43,column:15}},{start:{line:44,column:10},end:{line:44,column:73}}],line:43}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function entityFieldChecker(widget,customData){cov_smgnlngmj.f[0]++;var found,valid=(cov_smgnlngmj.s[0]++,true);cov_smgnlngmj.s[1]++;for(var i=0;i0)){cov_smgnlngmj.b[2][0]++;cov_smgnlngmj.s[9]++;valid=(cov_smgnlngmj.b[4][0]++,valid)&&(cov_smgnlngmj.b[4][1]++,replaceEntityField(widget,ENTITY_FIELDS[i],found,customData));}else{cov_smgnlngmj.b[2][1]++;}}else{cov_smgnlngmj.b[1][1]++;}}cov_smgnlngmj.s[10]++;return valid;} - widgetContentUnit.href = rec.url; + var cov_25iug3mcky=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/date-checker.js",hash="2a71b6f546a73218e940201594e551ea6177f8a0",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/date-checker.js",statementMap:{"0":{start:{line:12,column:14},end:{line:12,column:18}},"1":{start:{line:13,column:14},end:{line:13,column:24}},"2":{start:{line:15,column:2},end:{line:17,column:3}},"3":{start:{line:16,column:4},end:{line:16,column:18}},"4":{start:{line:19,column:2},end:{line:21,column:3}},"5":{start:{line:20,column:4},end:{line:20,column:18}},"6":{start:{line:23,column:2},end:{line:23,column:15}}},fnMap:{"0":{name:"dateChecker",decl:{start:{line:11,column:24},end:{line:11,column:35}},loc:{start:{line:11,column:43},end:{line:24,column:1}},line:11}},branchMap:{"0":{loc:{start:{line:15,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:17,column:3}},{start:{line:15,column:2},end:{line:17,column:3}}],line:15},"1":{loc:{start:{line:15,column:6},end:{line:15,column:64}},type:"binary-expr",locations:[{start:{line:15,column:6},end:{line:15,column:19}},{start:{line:15,column:23},end:{line:15,column:64}}],line:15},"2":{loc:{start:{line:19,column:2},end:{line:21,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:21,column:3}},{start:{line:19,column:2},end:{line:21,column:3}}],line:19},"3":{loc:{start:{line:19,column:6},end:{line:19,column:60}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:17}},{start:{line:19,column:21},end:{line:19,column:60}}],line:19}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},f:{"0":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function dateChecker(date){cov_25iug3mcky.f[0]++;var valid=(cov_25iug3mcky.s[0]++,true),today=(cov_25iug3mcky.s[1]++,Date.now());cov_25iug3mcky.s[2]++;if((cov_25iug3mcky.b[1][0]++,date.start_at)&&(cov_25iug3mcky.b[1][1]++,todaynew Date(date.end_at).getTime())){cov_25iug3mcky.b[2][0]++;cov_25iug3mcky.s[5]++;valid=false;}else{cov_25iug3mcky.b[2][1]++;}cov_25iug3mcky.s[6]++;return valid;} - // image div - if ( - rec.image && - (!settings.display || settings.display.image !== false) - ) { - recImage.className = 'pf-content-unit-img'; - recImage.style.backgroundImage = "url('" + rec.image + "')"; - widgetContentUnit.appendChild(recImage); - } + var cov_2bvearpmzj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/page-visits-checker.js',hash='7f5990a1be6844abce2ad9a3e7c154a8ac998a99',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/page-visits-checker.js',statementMap:{'0':{start:{line:16,column:2},end:{line:16,column:52}}},fnMap:{'0':{name:'pageVisitsChecker',decl:{start:{line:15,column:24},end:{line:15,column:41}},loc:{start:{line:15,column:63},end:{line:17,column:1}},line:15}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function pageVisitsChecker(pageVisitsRequired){cov_2bvearpmzj.f[0]++;cov_2bvearpmzj.s[0]++;return read(PF_PAGEVIEWS)>=pageVisitsRequired;} - recMeta.className = 'pf-content-unit-meta'; + var cov_21ecxs3fdh=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/hide-after-action-checker.js',hash='531449efe107ad18fea487af098815186eb8e8b7',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/hide-after-action-checker.js',statementMap:{'0':{start:{line:20,column:14},end:{line:20,column:18}},'1':{start:{line:21,column:12},end:{line:21,column:22}},'2':{start:{line:22,column:16},end:{line:22,column:48}},'3':{start:{line:23,column:15},end:{line:23,column:46}},'4':{start:{line:24,column:15},end:{line:24,column:45}},'5':{start:{line:26,column:2},end:{line:36,column:3}},'6':{start:{line:27,column:4},end:{line:27,column:31}},'7':{start:{line:29,column:4},end:{line:31,column:5}},'8':{start:{line:30,column:6},end:{line:30,column:20}},'9':{start:{line:33,column:4},end:{line:35,column:5}},'10':{start:{line:34,column:6},end:{line:34,column:20}},'11':{start:{line:38,column:2},end:{line:48,column:3}},'12':{start:{line:39,column:4},end:{line:39,column:30}},'13':{start:{line:41,column:4},end:{line:43,column:5}},'14':{start:{line:42,column:6},end:{line:42,column:20}},'15':{start:{line:45,column:4},end:{line:47,column:5}},'16':{start:{line:46,column:6},end:{line:46,column:20}},'17':{start:{line:50,column:2},end:{line:60,column:3}},'18':{start:{line:51,column:4},end:{line:51,column:30}},'19':{start:{line:53,column:4},end:{line:55,column:5}},'20':{start:{line:54,column:6},end:{line:54,column:20}},'21':{start:{line:57,column:4},end:{line:59,column:5}},'22':{start:{line:58,column:6},end:{line:58,column:20}},'23':{start:{line:62,column:2},end:{line:62,column:15}}},fnMap:{'0':{name:'hideAfterActionChecker',decl:{start:{line:18,column:24},end:{line:18,column:46}},loc:{start:{line:18,column:84},end:{line:63,column:1}},line:18}},branchMap:{'0':{loc:{start:{line:26,column:2},end:{line:36,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:36,column:3}},{start:{line:26,column:2},end:{line:36,column:3}}],line:26},'1':{loc:{start:{line:26,column:6},end:{line:26,column:51}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:40}},{start:{line:26,column:44},end:{line:26,column:51}}],line:26},'2':{loc:{start:{line:29,column:4},end:{line:31,column:5}},type:'if',locations:[{start:{line:29,column:4},end:{line:31,column:5}},{start:{line:29,column:4},end:{line:31,column:5}}],line:29},'3':{loc:{start:{line:33,column:4},end:{line:35,column:5}},type:'if',locations:[{start:{line:33,column:4},end:{line:35,column:5}},{start:{line:33,column:4},end:{line:35,column:5}}],line:33},'4':{loc:{start:{line:33,column:8},end:{line:33,column:122}},type:'binary-expr',locations:[{start:{line:33,column:8},end:{line:33,column:39}},{start:{line:33,column:43},end:{line:33,column:122}}],line:33},'5':{loc:{start:{line:38,column:2},end:{line:48,column:3}},type:'if',locations:[{start:{line:38,column:2},end:{line:48,column:3}},{start:{line:38,column:2},end:{line:48,column:3}}],line:38},'6':{loc:{start:{line:38,column:6},end:{line:38,column:49}},type:'binary-expr',locations:[{start:{line:38,column:6},end:{line:38,column:39}},{start:{line:38,column:43},end:{line:38,column:49}}],line:38},'7':{loc:{start:{line:41,column:4},end:{line:43,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:43,column:5}},{start:{line:41,column:4},end:{line:43,column:5}}],line:41},'8':{loc:{start:{line:45,column:4},end:{line:47,column:5}},type:'if',locations:[{start:{line:45,column:4},end:{line:47,column:5}},{start:{line:45,column:4},end:{line:47,column:5}}],line:45},'9':{loc:{start:{line:45,column:8},end:{line:45,column:121}},type:'binary-expr',locations:[{start:{line:45,column:8},end:{line:45,column:39}},{start:{line:45,column:43},end:{line:45,column:121}}],line:45},'10':{loc:{start:{line:50,column:2},end:{line:60,column:3}},type:'if',locations:[{start:{line:50,column:2},end:{line:60,column:3}},{start:{line:50,column:2},end:{line:60,column:3}}],line:50},'11':{loc:{start:{line:50,column:6},end:{line:50,column:49}},type:'binary-expr',locations:[{start:{line:50,column:6},end:{line:50,column:39}},{start:{line:50,column:43},end:{line:50,column:49}}],line:50},'12':{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:'if',locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:53,column:4},end:{line:55,column:5}}],line:53},'13':{loc:{start:{line:57,column:4},end:{line:59,column:5}},type:'if',locations:[{start:{line:57,column:4},end:{line:59,column:5}},{start:{line:57,column:4},end:{line:59,column:5}}],line:57},'14':{loc:{start:{line:57,column:8},end:{line:57,column:121}},type:'binary-expr',locations:[{start:{line:57,column:8},end:{line:57,column:39}},{start:{line:57,column:43},end:{line:57,column:121}}],line:57}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function hideAfterActionChecker(hideAfterActionConstraints,widget){cov_21ecxs3fdh.f[0]++;var parts,valid=(cov_21ecxs3fdh.s[0]++,true),now=(cov_21ecxs3fdh.s[1]++,Date.now()),confirm=(cov_21ecxs3fdh.s[2]++,read(PREFIX_CONFIRM+widget.id)),cancel=(cov_21ecxs3fdh.s[3]++,read(PREFIX_CANCEL+widget.id)),closed=(cov_21ecxs3fdh.s[4]++,read(PREFIX_CLOSE+widget.id));cov_21ecxs3fdh.s[5]++;if((cov_21ecxs3fdh.b[1][0]++,hideAfterActionConstraints.confirm)&&(cov_21ecxs3fdh.b[1][1]++,confirm)){cov_21ecxs3fdh.b[0][0]++;cov_21ecxs3fdh.s[6]++;parts=confirm.split('|');cov_21ecxs3fdh.s[7]++;if(parseInt(parts[0],10)>=hideAfterActionConstraints.confirm.hideCount){cov_21ecxs3fdh.b[2][0]++;cov_21ecxs3fdh.s[8]++;valid=false;}else{cov_21ecxs3fdh.b[2][1]++;}cov_21ecxs3fdh.s[9]++;if((cov_21ecxs3fdh.b[4][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[4][1]++,Math.abs(parts[1]-now)/1000=hideAfterActionConstraints.cancel.hideCount){cov_21ecxs3fdh.b[7][0]++;cov_21ecxs3fdh.s[14]++;valid=false;}else{cov_21ecxs3fdh.b[7][1]++;}cov_21ecxs3fdh.s[15]++;if((cov_21ecxs3fdh.b[9][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[9][1]++,Math.abs(parts[1]-now)/1000=hideAfterActionConstraints.closed.hideCount){cov_21ecxs3fdh.b[12][0]++;cov_21ecxs3fdh.s[20]++;valid=false;}else{cov_21ecxs3fdh.b[12][1]++;}cov_21ecxs3fdh.s[21]++;if((cov_21ecxs3fdh.b[14][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[14][1]++,Math.abs(parts[1]-now)/10001){cov_2kg5p7xgb2.b[0][0]++;cov_2kg5p7xgb2.s[3]++;pieces=pieces[1].split('&');cov_2kg5p7xgb2.s[4]++;for(var i=0;i1){cov_2kg5p7xgb2.b[1][0]++;cov_2kg5p7xgb2.s[7]++;if(pair[0]!=='lytics_variation_preview_id'){cov_2kg5p7xgb2.b[2][0]++;cov_2kg5p7xgb2.s[8]++;query[pair[0]]=pair[1];}else{cov_2kg5p7xgb2.b[2][1]++;}}else{cov_2kg5p7xgb2.b[1][1]++;}}}else{cov_2kg5p7xgb2.b[0][1]++;}cov_2kg5p7xgb2.s[9]++;return query;} - if ( - rec.author && - (settings.display && settings.display.author === true) - ) { - recInfo.innerHTML = 'by ' + rec.author; - } + var cov_m9cdeqi3q=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/compare-queries.js',hash='6b31b5af7daa2fe690db0e4aa7c85587a1ef5554',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/compare-queries.js',statementMap:{'0':{start:{line:13,column:2},end:{line:22,column:3}},'1':{start:{line:15,column:4},end:{line:17,column:5}},'2':{start:{line:16,column:6},end:{line:16,column:19}},'3':{start:{line:18,column:4},end:{line:18,column:10}},'4':{start:{line:21,column:4},end:{line:21,column:10}},'5':{start:{line:24,column:2},end:{line:28,column:3}},'6':{start:{line:25,column:4},end:{line:27,column:5}},'7':{start:{line:26,column:6},end:{line:26,column:19}},'8':{start:{line:30,column:2},end:{line:30,column:14}}},fnMap:{'0':{name:'compareQueries',decl:{start:{line:12,column:24},end:{line:12,column:38}},loc:{start:{line:12,column:65},end:{line:31,column:1}},line:12}},branchMap:{'0':{loc:{start:{line:13,column:2},end:{line:22,column:3}},type:'switch',locations:[{start:{line:14,column:2},end:{line:18,column:10}},{start:{line:20,column:2},end:{line:21,column:10}}],line:13},'1':{loc:{start:{line:15,column:4},end:{line:17,column:5}},type:'if',locations:[{start:{line:15,column:4},end:{line:17,column:5}},{start:{line:15,column:4},end:{line:17,column:5}}],line:15},'2':{loc:{start:{line:25,column:4},end:{line:27,column:5}},type:'if',locations:[{start:{line:25,column:4},end:{line:27,column:5}},{start:{line:25,column:4},end:{line:27,column:5}}],line:25},'3':{loc:{start:{line:25,column:8},end:{line:25,column:72}},type:'binary-expr',locations:[{start:{line:25,column:8},end:{line:25,column:38}},{start:{line:25,column:42},end:{line:25,column:72}}],line:25}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function compareQueries(query,matchQuery,rule){cov_m9cdeqi3q.f[0]++;cov_m9cdeqi3q.s[0]++;switch(rule){case'exact':cov_m9cdeqi3q.b[0][0]++;cov_m9cdeqi3q.s[1]++;if(Object.keys(matchQuery).length!==Object.keys(query).length){cov_m9cdeqi3q.b[1][0]++;cov_m9cdeqi3q.s[2]++;return false;}else{cov_m9cdeqi3q.b[1][1]++;}cov_m9cdeqi3q.s[3]++;break;default:cov_m9cdeqi3q.b[0][1]++;cov_m9cdeqi3q.s[4]++;break;}cov_m9cdeqi3q.s[5]++;for(var key in matchQuery){cov_m9cdeqi3q.s[6]++;if((cov_m9cdeqi3q.b[3][0]++,matchQuery.hasOwnProperty(key))&&(cov_m9cdeqi3q.b[3][1]++,matchQuery[key]!==query[key])){cov_m9cdeqi3q.b[2][0]++;cov_m9cdeqi3q.s[7]++;return false;}else{cov_m9cdeqi3q.b[2][1]++;}}cov_m9cdeqi3q.s[8]++;return true;} - if (rec.date && (settings.display && settings.display.date === true)) { - var published = new Date(rec.date), - locale = settings.display.locale, - dateOptions = settings.display.dateOptions; + var cov_fgqfjwrak=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/phrase-checker.js',hash='af30ca711d191e012d95056ca1c0b1ade6a75544',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/phrase-checker.js',statementMap:{'0':{start:{line:22,column:14},end:{line:22,column:19}},'1':{start:{line:25,column:2},end:{line:84,column:3}},'2':{start:{line:27,column:4},end:{line:29,column:5}},'3':{start:{line:28,column:6},end:{line:28,column:71}},'4':{start:{line:30,column:4},end:{line:30,column:10}},'5':{start:{line:33,column:4},end:{line:78,column:5}},'6':{start:{line:34,column:24},end:{line:34,column:70}},'7':{start:{line:36,column:6},end:{line:74,column:7}},'8':{start:{line:39,column:8},end:{line:41,column:9}},'9':{start:{line:40,column:10},end:{line:40,column:45}},'10':{start:{line:43,column:8},end:{line:45,column:9}},'11':{start:{line:44,column:10},end:{line:44,column:51}},'12':{start:{line:47,column:8},end:{line:49,column:9}},'13':{start:{line:48,column:10},end:{line:48,column:23}},'14':{start:{line:50,column:8},end:{line:50,column:14}},'15':{start:{line:54,column:8},end:{line:56,column:9}},'16':{start:{line:55,column:10},end:{line:55,column:81}},'17':{start:{line:57,column:8},end:{line:57,column:14}},'18':{start:{line:61,column:17},end:{line:61,column:41}},'19':{start:{line:63,column:8},end:{line:65,column:9}},'20':{start:{line:64,column:10},end:{line:64,column:23}},'21':{start:{line:66,column:8},end:{line:66,column:14}},'22':{start:{line:70,column:8},end:{line:72,column:9}},'23':{start:{line:71,column:10},end:{line:71,column:81}},'24':{start:{line:73,column:8},end:{line:73,column:14}},'25':{start:{line:77,column:6},end:{line:77,column:48}},'26':{start:{line:79,column:4},end:{line:79,column:10}},'27':{start:{line:82,column:4},end:{line:82,column:46}},'28':{start:{line:83,column:4},end:{line:83,column:10}},'29':{start:{line:86,column:2},end:{line:86,column:15}}},fnMap:{'0':{name:'phraseChecker',decl:{start:{line:21,column:24},end:{line:21,column:37}},loc:{start:{line:21,column:72},end:{line:87,column:1}},line:21}},branchMap:{'0':{loc:{start:{line:25,column:2},end:{line:84,column:3}},type:'switch',locations:[{start:{line:26,column:2},end:{line:30,column:10}},{start:{line:32,column:2},end:{line:79,column:10}},{start:{line:81,column:2},end:{line:83,column:10}}],line:25},'1':{loc:{start:{line:27,column:4},end:{line:29,column:5}},type:'if',locations:[{start:{line:27,column:4},end:{line:29,column:5}},{start:{line:27,column:4},end:{line:29,column:5}}],line:27},'2':{loc:{start:{line:33,column:4},end:{line:78,column:5}},type:'if',locations:[{start:{line:33,column:4},end:{line:78,column:5}},{start:{line:33,column:4},end:{line:78,column:5}}],line:33},'3':{loc:{start:{line:33,column:8},end:{line:33,column:36}},type:'binary-expr',locations:[{start:{line:33,column:8},end:{line:33,column:20}},{start:{line:33,column:24},end:{line:33,column:36}}],line:33},'4':{loc:{start:{line:36,column:6},end:{line:74,column:7}},type:'switch',locations:[{start:{line:38,column:6},end:{line:50,column:14}},{start:{line:53,column:6},end:{line:57,column:14}},{start:{line:60,column:6},end:{line:66,column:14}},{start:{line:69,column:6},end:{line:73,column:14}}],line:36},'5':{loc:{start:{line:39,column:8},end:{line:41,column:9}},type:'if',locations:[{start:{line:39,column:8},end:{line:41,column:9}},{start:{line:39,column:8},end:{line:41,column:9}}],line:39},'6':{loc:{start:{line:43,column:8},end:{line:45,column:9}},type:'if',locations:[{start:{line:43,column:8},end:{line:45,column:9}},{start:{line:43,column:8},end:{line:45,column:9}}],line:43},'7':{loc:{start:{line:47,column:8},end:{line:49,column:9}},type:'if',locations:[{start:{line:47,column:8},end:{line:49,column:9}},{start:{line:47,column:8},end:{line:49,column:9}}],line:47},'8':{loc:{start:{line:54,column:8},end:{line:56,column:9}},type:'if',locations:[{start:{line:54,column:8},end:{line:56,column:9}},{start:{line:54,column:8},end:{line:56,column:9}}],line:54},'9':{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:'if',locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},'10':{loc:{start:{line:70,column:8},end:{line:72,column:9}},type:'if',locations:[{start:{line:70,column:8},end:{line:72,column:9}},{start:{line:70,column:8},end:{line:72,column:9}}],line:70}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0},f:{'0':0},b:{'0':[0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0,0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function phraseChecker(phrase,url,simpleurl,queries){cov_fgqfjwrak.f[0]++;var valid=(cov_fgqfjwrak.s[0]++,false);cov_fgqfjwrak.s[1]++;switch(typeof phrase){case'string':cov_fgqfjwrak.b[0][0]++;cov_fgqfjwrak.s[2]++;if(url.indexOf(escapeURI(phrase.split('?')[0],{keepEscaped:true}))!==-1){cov_fgqfjwrak.b[1][0]++;cov_fgqfjwrak.s[3]++;valid=compareQueries(queries,parseQuery(phrase),'substring');}else{cov_fgqfjwrak.b[1][1]++;}cov_fgqfjwrak.s[4]++;break;case'object':cov_fgqfjwrak.b[0][1]++;cov_fgqfjwrak.s[5]++;if((cov_fgqfjwrak.b[3][0]++,phrase.match)&&(cov_fgqfjwrak.b[3][1]++,phrase.value)){cov_fgqfjwrak.b[2][0]++;var phraseValue=(cov_fgqfjwrak.s[6]++,escapeURI(phrase.value,{keepEscaped:true}));cov_fgqfjwrak.s[7]++;switch(phrase.match){case'simple':cov_fgqfjwrak.b[4][0]++;cov_fgqfjwrak.s[8]++;if(simpleurl.slice(-1)==='/'){cov_fgqfjwrak.b[5][0]++;cov_fgqfjwrak.s[9]++;simpleurl=simpleurl.slice(0,-1);}else{cov_fgqfjwrak.b[5][1]++;}cov_fgqfjwrak.s[10]++;if(phrase.value.slice(-1)==='/'){cov_fgqfjwrak.b[6][0]++;cov_fgqfjwrak.s[11]++;phrase.value=phrase.value.slice(0,-1);}else{cov_fgqfjwrak.b[6][1]++;}cov_fgqfjwrak.s[12]++;if(simpleurl===phrase.value){cov_fgqfjwrak.b[7][0]++;cov_fgqfjwrak.s[13]++;valid=true;}else{cov_fgqfjwrak.b[7][1]++;}cov_fgqfjwrak.s[14]++;break;case'exact':cov_fgqfjwrak.b[4][1]++;cov_fgqfjwrak.s[15]++;if(url.split('?')[0].replace(/\/$/,'')===phraseValue.split('?')[0].replace(/\/$/,'')){cov_fgqfjwrak.b[8][0]++;cov_fgqfjwrak.s[16]++;valid=compareQueries(queries,parseQuery(phraseValue),phrase.match);}else{cov_fgqfjwrak.b[8][1]++;}cov_fgqfjwrak.s[17]++;break;case'regex':cov_fgqfjwrak.b[4][2]++;var re=(cov_fgqfjwrak.s[18]++,new RegExp(phrase.value));cov_fgqfjwrak.s[19]++;if(re.test(url)){cov_fgqfjwrak.b[9][0]++;cov_fgqfjwrak.s[20]++;valid=true;}else{cov_fgqfjwrak.b[9][1]++;}cov_fgqfjwrak.s[21]++;break;default:cov_fgqfjwrak.b[4][3]++;cov_fgqfjwrak.s[22]++;if(url.indexOf(phraseValue.split('?')[0])!==-1){cov_fgqfjwrak.b[10][0]++;cov_fgqfjwrak.s[23]++;valid=compareQueries(queries,parseQuery(phraseValue),phrase.match);}else{cov_fgqfjwrak.b[10][1]++;}cov_fgqfjwrak.s[24]++;break;}}else{cov_fgqfjwrak.b[2][1]++;cov_fgqfjwrak.s[25]++;console.log('invalid display conditions');}cov_fgqfjwrak.s[26]++;break;default:cov_fgqfjwrak.b[0][2]++;cov_fgqfjwrak.s[27]++;console.log('invalid display conditions');cov_fgqfjwrak.s[28]++;break;}cov_fgqfjwrak.s[29]++;return valid;} - if (!locale && window.pathfora && window.pathfora.locale) { - locale = window.pathfora.locale; - } else if (!locale) { - locale = PF_LOCALE; - } + var cov_2o75h5ah43=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/url-checker.js',hash='722842b0bafbc22581a4f138b31f132763cdff5c',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/url-checker.js',statementMap:{'0':{start:{line:19,column:12},end:{line:19,column:66}},'1':{start:{line:20,column:18},end:{line:20,column:69}},'2':{start:{line:21,column:16},end:{line:21,column:31}},'3':{start:{line:22,column:14},end:{line:22,column:19}},'4':{start:{line:23,column:21},end:{line:23,column:26}},'5':{start:{line:24,column:16},end:{line:24,column:17}},'6':{start:{line:25,column:18},end:{line:25,column:19}},'7':{start:{line:27,column:2},end:{line:31,column:3}},'8':{start:{line:28,column:4},end:{line:30,column:7}},'9':{start:{line:29,column:6},end:{line:29,column:26}},'10':{start:{line:34,column:2},end:{line:46,column:3}},'11':{start:{line:35,column:4},end:{line:43,column:7}},'12':{start:{line:36,column:6},end:{line:42,column:7}},'13':{start:{line:37,column:8},end:{line:37,column:86}},'14':{start:{line:38,column:8},end:{line:38,column:20}},'15':{start:{line:40,column:8},end:{line:40,column:72}},'16':{start:{line:41,column:8},end:{line:41,column:18}},'17':{start:{line:45,column:4},end:{line:45,column:17}},'18':{start:{line:48,column:2},end:{line:50,column:3}},'19':{start:{line:49,column:4},end:{line:49,column:25}},'20':{start:{line:52,column:2},end:{line:54,column:3}},'21':{start:{line:53,column:4},end:{line:53,column:17}},'22':{start:{line:56,column:2},end:{line:56,column:32}}},fnMap:{'0':{name:'urlChecker',decl:{start:{line:18,column:24},end:{line:18,column:34}},loc:{start:{line:18,column:45},end:{line:57,column:1}},line:18},'1':{name:'(anonymous_1)',decl:{start:{line:28,column:39},end:{line:28,column:40}},loc:{start:{line:28,column:54},end:{line:30,column:5}},line:28},'2':{name:'(anonymous_2)',decl:{start:{line:35,column:20},end:{line:35,column:21}},loc:{start:{line:35,column:38},end:{line:43,column:5}},line:35}},branchMap:{'0':{loc:{start:{line:27,column:2},end:{line:31,column:3}},type:'if',locations:[{start:{line:27,column:2},end:{line:31,column:3}},{start:{line:27,column:2},end:{line:31,column:3}}],line:27},'1':{loc:{start:{line:34,column:2},end:{line:46,column:3}},type:'if',locations:[{start:{line:34,column:2},end:{line:46,column:3}},{start:{line:34,column:2},end:{line:46,column:3}}],line:34},'2':{loc:{start:{line:36,column:6},end:{line:42,column:7}},type:'if',locations:[{start:{line:36,column:6},end:{line:42,column:7}},{start:{line:36,column:6},end:{line:42,column:7}}],line:36},'3':{loc:{start:{line:37,column:23},end:{line:37,column:85}},type:'binary-expr',locations:[{start:{line:37,column:23},end:{line:37,column:69}},{start:{line:37,column:73},end:{line:37,column:85}}],line:37},'4':{loc:{start:{line:40,column:16},end:{line:40,column:71}},type:'binary-expr',locations:[{start:{line:40,column:16},end:{line:40,column:62}},{start:{line:40,column:66},end:{line:40,column:71}}],line:40},'5':{loc:{start:{line:48,column:2},end:{line:50,column:3}},type:'if',locations:[{start:{line:48,column:2},end:{line:50,column:3}},{start:{line:48,column:2},end:{line:50,column:3}}],line:48},'6':{loc:{start:{line:52,column:2},end:{line:54,column:3}},type:'if',locations:[{start:{line:52,column:2},end:{line:54,column:3}},{start:{line:52,column:2},end:{line:54,column:3}}],line:52},'7':{loc:{start:{line:56,column:9},end:{line:56,column:31}},type:'binary-expr',locations:[{start:{line:56,column:9},end:{line:56,column:14}},{start:{line:56,column:18},end:{line:56,column:31}}],line:56}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function urlChecker(phrases){cov_2o75h5ah43.f[0]++;var url=(cov_2o75h5ah43.s[0]++,escapeURI(window.location.href,{keepEscaped:true})),simpleurl=(cov_2o75h5ah43.s[1]++,window.location.hostname+window.location.pathname),queries=(cov_2o75h5ah43.s[2]++,parseQuery(url)),valid=(cov_2o75h5ah43.s[3]++,false),excludeValid=(cov_2o75h5ah43.s[4]++,false),matchCt=(cov_2o75h5ah43.s[5]++,0),excludeCt=(cov_2o75h5ah43.s[6]++,0);cov_2o75h5ah43.s[7]++;if(!(phrases instanceof Array)){cov_2o75h5ah43.b[0][0]++;cov_2o75h5ah43.s[8]++;phrases=Object.keys(phrases).map(function(key){cov_2o75h5ah43.f[1]++;cov_2o75h5ah43.s[9]++;return phrases[key];});}else{cov_2o75h5ah43.b[0][1]++;}cov_2o75h5ah43.s[10]++;if(phrases.indexOf('*')===-1){cov_2o75h5ah43.b[1][0]++;cov_2o75h5ah43.s[11]++;phrases.forEach(function(phrase){cov_2o75h5ah43.f[2]++;cov_2o75h5ah43.s[12]++;if(phrase.exclude){cov_2o75h5ah43.b[2][0]++;cov_2o75h5ah43.s[13]++;excludeValid=(cov_2o75h5ah43.b[3][0]++,phraseChecker(phrase,url,simpleurl,queries))||(cov_2o75h5ah43.b[3][1]++,excludeValid);cov_2o75h5ah43.s[14]++;excludeCt++;}else{cov_2o75h5ah43.b[2][1]++;cov_2o75h5ah43.s[15]++;valid=(cov_2o75h5ah43.b[4][0]++,phraseChecker(phrase,url,simpleurl,queries))||(cov_2o75h5ah43.b[4][1]++,valid);cov_2o75h5ah43.s[16]++;matchCt++;}});}else{cov_2o75h5ah43.b[1][1]++;cov_2o75h5ah43.s[17]++;valid=true;}cov_2o75h5ah43.s[18]++;if(matchCt===0){cov_2o75h5ah43.b[5][0]++;cov_2o75h5ah43.s[19]++;return !excludeValid;}else{cov_2o75h5ah43.b[5][1]++;}cov_2o75h5ah43.s[20]++;if(excludeCt===0){cov_2o75h5ah43.b[6][0]++;cov_2o75h5ah43.s[21]++;return valid;}else{cov_2o75h5ah43.b[6][1]++;}cov_2o75h5ah43.s[22]++;return (cov_2o75h5ah43.b[7][0]++,valid)&&(cov_2o75h5ah43.b[7][1]++,!excludeValid);} - if (!dateOptions && window.pathfora && window.pathfora.dateOptions) { - dateOptions = window.pathfora.dateOptions; - } else if (!dateOptions) { - dateOptions = PF_DATE_OPTIONS; - } + var cov_124hm5066v=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/meta-checker.js',hash='f3a6c868a6e535db67be1d8d69e2af6092312a3b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/meta-checker.js',statementMap:{'0':{start:{line:15,column:13},end:{line:15,column:46}},'1':{start:{line:17,column:2},end:{line:43,column:3}},'2':{start:{line:18,column:15},end:{line:18,column:25}},'3':{start:{line:19,column:22},end:{line:19,column:27}},'4':{start:{line:21,column:4},end:{line:38,column:5}},'5':{start:{line:22,column:6},end:{line:33,column:7}},'6':{start:{line:23,column:8},end:{line:32,column:9}},'7':{start:{line:24,column:20},end:{line:24,column:45}},'8':{start:{line:26,column:10},end:{line:31,column:11}},'9':{start:{line:27,column:12},end:{line:27,column:32}},'10':{start:{line:28,column:12},end:{line:28,column:18}},'11':{start:{line:30,column:12},end:{line:30,column:31}},'12':{start:{line:35,column:6},end:{line:37,column:7}},'13':{start:{line:36,column:8},end:{line:36,column:14}},'14':{start:{line:40,column:4},end:{line:42,column:5}},'15':{start:{line:41,column:6},end:{line:41,column:18}},'16':{start:{line:45,column:2},end:{line:45,column:15}}},fnMap:{'0':{name:'metaChecker',decl:{start:{line:14,column:24},end:{line:14,column:35}},loc:{start:{line:14,column:46},end:{line:46,column:1}},line:14}},branchMap:{'0':{loc:{start:{line:23,column:8},end:{line:32,column:9}},type:'if',locations:[{start:{line:23,column:8},end:{line:32,column:9}},{start:{line:23,column:8},end:{line:32,column:9}}],line:23},'1':{loc:{start:{line:26,column:10},end:{line:31,column:11}},type:'if',locations:[{start:{line:26,column:10},end:{line:31,column:11}},{start:{line:26,column:10},end:{line:31,column:11}}],line:26},'2':{loc:{start:{line:26,column:14},end:{line:26,column:39}},type:'binary-expr',locations:[{start:{line:26,column:14},end:{line:26,column:18}},{start:{line:26,column:22},end:{line:26,column:39}}],line:26},'3':{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},'4':{loc:{start:{line:40,column:4},end:{line:42,column:5}},type:'if',locations:[{start:{line:40,column:4},end:{line:42,column:5}},{start:{line:40,column:4},end:{line:42,column:5}}],line:40}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function metaChecker(phrases){cov_124hm5066v.f[0]++;var meta=(cov_124hm5066v.s[0]++,document$1.querySelectorAll('meta'));cov_124hm5066v.s[1]++;for(var j=0;j1)&&((cov_zzx4vfpbw.b[3][1]++,!from)||(cov_zzx4vfpbw.b[3][2]++,from.nodeName==='HTML'))){cov_zzx4vfpbw.b[2][0]++;var y=(cov_zzx4vfpbw.s[4]++,watcher.positions[watcher.positions.length-1].y);var py=(cov_zzx4vfpbw.s[5]++,watcher.positions[watcher.positions.length-2].y);var ySpeed=(cov_zzx4vfpbw.s[6]++,Math.abs(y-py));cov_zzx4vfpbw.s[7]++;watcher.positions=[];cov_zzx4vfpbw.s[8]++;if((cov_zzx4vfpbw.b[5][0]++,y-ySpeed<=50)&&(cov_zzx4vfpbw.b[5][1]++,y30){cov_p5vb3rrc5.b[1][0]++;cov_p5vb3rrc5.s[4]++;watcher.positions.shift();}else{cov_p5vb3rrc5.b[1][1]++;}};cov_p5vb3rrc5.s[5]++;widget.exitIntentTrigger=function(e){cov_p5vb3rrc5.f[2]++;cov_p5vb3rrc5.s[6]++;validateWatchers(widget,function(){cov_p5vb3rrc5.f[3]++;cov_p5vb3rrc5.s[7]++;if(typeof document$1.removeEventListener==='function'){cov_p5vb3rrc5.b[2][0]++;cov_p5vb3rrc5.s[8]++;eventHub.remove(document$1,'mousemove',widget.exitIntentListener);cov_p5vb3rrc5.s[9]++;eventHub.remove(document$1,'mouseout',widget.exitIntentTrigger);}else{cov_p5vb3rrc5.b[2][1]++;cov_p5vb3rrc5.s[10]++;document$1.onmousemove=null;cov_p5vb3rrc5.s[11]++;document$1.onmouseout=null;}},e);};cov_p5vb3rrc5.s[12]++;if(typeof document$1.addEventListener==='function'){cov_p5vb3rrc5.b[3][0]++;cov_p5vb3rrc5.s[13]++;eventHub.add(document$1,'mousemove',widget.exitIntentListener);cov_p5vb3rrc5.s[14]++;eventHub.add(document$1,'mouseout',widget.exitIntentTrigger);}else{cov_p5vb3rrc5.b[3][1]++;cov_p5vb3rrc5.s[15]++;document$1.onmousemove=widget.exitIntentListener;cov_p5vb3rrc5.s[16]++;document$1.onmouseout=widget.exitIntentTrigger;}}else{cov_p5vb3rrc5.b[0][1]++;}cov_p5vb3rrc5.s[17]++;return true;} - // description p - if ( - rec.description && - (!settings.display || settings.display.description !== false) - ) { - var desc = rec.description, - limit = - config.layout === 'modal' - ? DEFAULT_CHAR_LIMIT - : DEFAULT_CHAR_LIMIT_STACK; + var cov_vh4724t1i=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-element-watcher.js',hash='4d0812098b5d268a7b2e4f0ba102d10510e22964',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-element-watcher.js',statementMap:{'0':{start:{line:17,column:16},end:{line:29,column:3}},'1':{start:{line:21,column:22},end:{line:21,column:83}},'2':{start:{line:22,column:29},end:{line:22,column:89}},'3':{start:{line:24,column:6},end:{line:26,column:7}},'4':{start:{line:25,column:8},end:{line:25,column:20}},'5':{start:{line:27,column:6},end:{line:27,column:19}},'6':{start:{line:31,column:2},end:{line:31,column:17}}},fnMap:{'0':{name:'registerElementWatcher',decl:{start:{line:16,column:24},end:{line:16,column:46}},loc:{start:{line:16,column:58},end:{line:32,column:1}},line:16},'1':{name:'(anonymous_1)',decl:{start:{line:20,column:11},end:{line:20,column:12}},loc:{start:{line:20,column:23},end:{line:28,column:5}},line:20}},branchMap:{'0':{loc:{start:{line:21,column:22},end:{line:21,column:83}},type:'binary-expr',locations:[{start:{line:21,column:22},end:{line:21,column:45}},{start:{line:21,column:49},end:{line:21,column:83}}],line:21},'1':{loc:{start:{line:24,column:6},end:{line:26,column:7}},type:'if',locations:[{start:{line:24,column:6},end:{line:26,column:7}},{start:{line:24,column:6},end:{line:26,column:7}}],line:24},'2':{loc:{start:{line:24,column:10},end:{line:24,column:90}},type:'binary-expr',locations:[{start:{line:24,column:10},end:{line:24,column:70}},{start:{line:24,column:74},end:{line:24,column:90}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerElementWatcher(selector){cov_vh4724t1i.f[0]++;var watcher=(cov_vh4724t1i.s[0]++,{elem:document$1.querySelector(selector),check:function(){cov_vh4724t1i.f[1]++;var scrollTop=(cov_vh4724t1i.s[1]++,(cov_vh4724t1i.b[0][0]++,document$1.body.scrollTop)||(cov_vh4724t1i.b[0][1]++,document$1.documentElement.scrollTop)),scrolledToBottom=(cov_vh4724t1i.s[2]++,window.innerHeight+scrollTop>=document$1.body.offsetHeight);cov_vh4724t1i.s[3]++;if((cov_vh4724t1i.b[2][0]++,watcher.elem.offsetTop-window.innerHeight/2<=scrollTop)||(cov_vh4724t1i.b[2][1]++,scrolledToBottom)){cov_vh4724t1i.b[1][0]++;cov_vh4724t1i.s[4]++;return true;}else{cov_vh4724t1i.b[1][1]++;}cov_vh4724t1i.s[5]++;return false;}});cov_vh4724t1i.s[6]++;return watcher;} - // set the default character limit for descriptions - if (!settings.display) { - settings.display = { - descriptionLimit: limit - }; - } else if (!settings.display.descriptionLimit) { - settings.display.descriptionLimit = limit; - } + var cov_1ngw9i8dxt=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/init-scroll-watchers.js',hash='b992c0f36bcdc60a14e9d6b23b3a83f2e47210f2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/init-scroll-watchers.js',statementMap:{'0':{start:{line:19,column:2},end:{line:27,column:4}},'1':{start:{line:20,column:4},end:{line:26,column:7}},'2':{start:{line:21,column:6},end:{line:25,column:7}},'3':{start:{line:22,column:8},end:{line:22,column:65}},'4':{start:{line:24,column:8},end:{line:24,column:31}},'5':{start:{line:30,column:2},end:{line:34,column:3}},'6':{start:{line:31,column:4},end:{line:31,column:58}},'7':{start:{line:33,column:4},end:{line:33,column:44}},'8':{start:{line:35,column:2},end:{line:35,column:14}}},fnMap:{'0':{name:'initializeScrollWatchers',decl:{start:{line:18,column:24},end:{line:18,column:48}},loc:{start:{line:18,column:58},end:{line:36,column:1}},line:18},'1':{name:'(anonymous_1)',decl:{start:{line:19,column:26},end:{line:19,column:27}},loc:{start:{line:19,column:38},end:{line:27,column:3}},line:19},'2':{name:'(anonymous_2)',decl:{start:{line:20,column:29},end:{line:20,column:30}},loc:{start:{line:20,column:41},end:{line:26,column:5}},line:20}},branchMap:{'0':{loc:{start:{line:21,column:6},end:{line:25,column:7}},type:'if',locations:[{start:{line:21,column:6},end:{line:25,column:7}},{start:{line:21,column:6},end:{line:25,column:7}}],line:21},'1':{loc:{start:{line:30,column:2},end:{line:34,column:3}},type:'if',locations:[{start:{line:30,column:2},end:{line:34,column:3}},{start:{line:30,column:2},end:{line:34,column:3}}],line:30}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeScrollWatchers(widget){cov_1ngw9i8dxt.f[0]++;cov_1ngw9i8dxt.s[0]++;widget.scrollListener=function(){cov_1ngw9i8dxt.f[1]++;cov_1ngw9i8dxt.s[1]++;validateWatchers(widget,function(){cov_1ngw9i8dxt.f[2]++;cov_1ngw9i8dxt.s[2]++;if(typeof window.addEventListener==='function'){cov_1ngw9i8dxt.b[0][0]++;cov_1ngw9i8dxt.s[3]++;eventHub.remove(window,'scroll',widget.scrollListener);}else{cov_1ngw9i8dxt.b[0][1]++;cov_1ngw9i8dxt.s[4]++;window.onscroll=null;}});};cov_1ngw9i8dxt.s[5]++;if(typeof window.addEventListener==='function'){cov_1ngw9i8dxt.b[1][0]++;cov_1ngw9i8dxt.s[6]++;eventHub.add(window,'scroll',widget.scrollListener);}else{cov_1ngw9i8dxt.b[1][1]++;cov_1ngw9i8dxt.s[7]++;window.onscroll=widget.scrollListener;}cov_1ngw9i8dxt.s[8]++;return true;} - if ( - desc.length > settings.display.descriptionLimit && - settings.display.descriptionLimit !== -1 - ) { - desc = desc.substring(0, settings.display.descriptionLimit); - desc = desc.substring(0, desc.lastIndexOf(' ')) + '...'; - } + var cov_2a5qhpfcqf=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/get-scrolling-element.js',hash='b96102cd042fb9231df8057e5c698161fa6c8c93',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/get-scrolling-element.js',statementMap:{'0':{start:{line:5,column:14},end:{line:5,column:18}},'1':{start:{line:9,column:2},end:{line:11,column:3}},'2':{start:{line:10,column:4},end:{line:10,column:19}},'3':{start:{line:12,column:2},end:{line:15,column:3}},'4':{start:{line:14,column:4},end:{line:14,column:37}},'5':{start:{line:16,column:15},end:{line:16,column:47}},'6':{start:{line:17,column:2},end:{line:17,column:30}},'7':{start:{line:18,column:2},end:{line:18,column:47}},'8':{start:{line:19,column:12},end:{line:19,column:41}},'9':{start:{line:20,column:2},end:{line:20,column:65}},'10':{start:{line:21,column:2},end:{line:21,column:14}},'11':{start:{line:22,column:20},end:{line:22,column:76}},'12':{start:{line:23,column:2},end:{line:23,column:40}},'13':{start:{line:24,column:2},end:{line:24,column:76}}},fnMap:{'0':{name:'getScrollingElement',decl:{start:{line:8,column:24},end:{line:8,column:43}},loc:{start:{line:8,column:47},end:{line:25,column:1}},line:8}},branchMap:{'0':{loc:{start:{line:9,column:2},end:{line:11,column:3}},type:'if',locations:[{start:{line:9,column:2},end:{line:11,column:3}},{start:{line:9,column:2},end:{line:11,column:3}}],line:9},'1':{loc:{start:{line:12,column:2},end:{line:15,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:15,column:3}},{start:{line:12,column:2},end:{line:15,column:3}}],line:12},'2':{loc:{start:{line:24,column:20},end:{line:24,column:74}},type:'cond-expr',locations:[{start:{line:24,column:34},end:{line:24,column:58}},{start:{line:24,column:61},end:{line:24,column:74}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var element=(cov_2a5qhpfcqf.s[0]++,null);function getScrollingElement(){cov_2a5qhpfcqf.f[0]++;cov_2a5qhpfcqf.s[1]++;if(element){cov_2a5qhpfcqf.b[0][0]++;cov_2a5qhpfcqf.s[2]++;return element;}else{cov_2a5qhpfcqf.b[0][1]++;}cov_2a5qhpfcqf.s[3]++;if(document.body.scrollTop){cov_2a5qhpfcqf.b[1][0]++;cov_2a5qhpfcqf.s[4]++;return element=document.body;}else{cov_2a5qhpfcqf.b[1][1]++;}var iframe=(cov_2a5qhpfcqf.s[5]++,document.createElement('iframe'));cov_2a5qhpfcqf.s[6]++;iframe.style.height='1px';cov_2a5qhpfcqf.s[7]++;document.documentElement.appendChild(iframe);var doc=(cov_2a5qhpfcqf.s[8]++,iframe.contentWindow.document);cov_2a5qhpfcqf.s[9]++;doc.write('
x
');cov_2a5qhpfcqf.s[10]++;doc.close();var isCompliant=(cov_2a5qhpfcqf.s[11]++,doc.documentElement.scrollHeight>doc.body.scrollHeight);cov_2a5qhpfcqf.s[12]++;iframe.parentNode.removeChild(iframe);cov_2a5qhpfcqf.s[13]++;return element=isCompliant?(cov_2a5qhpfcqf.b[2][0]++,document.documentElement):(cov_2a5qhpfcqf.b[2][1]++,document.body);} - recDesc.innerHTML = desc; - recMeta.appendChild(recDesc); - } + var cov_hohobc6jb=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-position-watcher.js',hash='6a53493518fd65ff93eb6536a80d9f7ab201c70b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-position-watcher.js',statementMap:{'0':{start:{line:18,column:16},end:{line:30,column:3}},'1':{start:{line:28,column:6},end:{line:28,column:43}},'2':{start:{line:32,column:2},end:{line:32,column:17}}},fnMap:{'0':{name:'registerPositionWatcher',decl:{start:{line:17,column:24},end:{line:17,column:47}},loc:{start:{line:17,column:58},end:{line:33,column:1}},line:17},'1':{name:'(anonymous_1)',decl:{start:{line:19,column:11},end:{line:19,column:12}},loc:{start:{line:19,column:23},end:{line:29,column:5}},line:19}},branchMap:{},s:{'0':0,'1':0,'2':0},f:{'0':0,'1':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerPositionWatcher(percent){cov_hohobc6jb.f[0]++;var watcher=(cov_hohobc6jb.s[0]++,{check:function(){cov_hohobc6jb.f[1]++;var scrollingElement=document$1.scrollingElement||getScrollingElement(),scrollTop=scrollingElement.scrollTop,scrollHeight=scrollingElement.scrollHeight,clientHeight=scrollingElement.clientHeight,percentageScrolled=scrollTop/(scrollHeight-clientHeight)*100;cov_hohobc6jb.s[1]++;return percentageScrolled>=percent;}});cov_hohobc6jb.s[2]++;return watcher;} - widgetContentUnit.appendChild(recMeta); - } - } - } + var cov_9qjd4sjgg=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js',hash='d33b65eaf4c1cb5d4b51a1cccd7a97120b0bf095',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js',statementMap:{'0':{start:{line:15,column:16},end:{line:22,column:3}},'1':{start:{line:17,column:6},end:{line:19,column:7}},'2':{start:{line:18,column:8},end:{line:18,column:20}},'3':{start:{line:20,column:6},end:{line:20,column:19}},'4':{start:{line:24,column:2},end:{line:24,column:17}}},fnMap:{'0':{name:'registerManualTriggerWatcher',decl:{start:{line:14,column:24},end:{line:14,column:52}},loc:{start:{line:14,column:69},end:{line:25,column:1}},line:14},'1':{name:'(anonymous_1)',decl:{start:{line:16,column:11},end:{line:16,column:12}},loc:{start:{line:16,column:23},end:{line:21,column:5}},line:16}},branchMap:{'0':{loc:{start:{line:17,column:6},end:{line:19,column:7}},type:'if',locations:[{start:{line:17,column:6},end:{line:19,column:7}},{start:{line:17,column:6},end:{line:19,column:7}}],line:17},'1':{loc:{start:{line:17,column:10},end:{line:17,column:99}},type:'binary-expr',locations:[{start:{line:17,column:10},end:{line:17,column:15}},{start:{line:17,column:19},end:{line:17,column:60}},{start:{line:17,column:64},end:{line:17,column:99}}],line:17}},s:{'0':0,'1':0,'2':0,'3':0,'4':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerManualTriggerWatcher(value,widget){cov_9qjd4sjgg.f[0]++;var watcher=(cov_9qjd4sjgg.s[0]++,{check:function(){cov_9qjd4sjgg.f[1]++;cov_9qjd4sjgg.s[1]++;if((cov_9qjd4sjgg.b[1][0]++,value)&&(cov_9qjd4sjgg.b[1][1]++,widgetTracker.triggeredWidgets[widget.id])||(cov_9qjd4sjgg.b[1][2]++,widgetTracker.triggeredWidgets['*'])){cov_9qjd4sjgg.b[0][0]++;cov_9qjd4sjgg.s[2]++;return true;}else{cov_9qjd4sjgg.b[0][1]++;}cov_9qjd4sjgg.s[3]++;return false;}});cov_9qjd4sjgg.s[4]++;return watcher;} - /** @module core/set-widget-classname */ + var cov_1r4iodpbui=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js',hash='2c5efaa78cd8d4cfb28cb87382b8423f36da5238',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js',statementMap:{'0':{start:{line:46,column:18},end:{line:46,column:42}},'1':{start:{line:47,column:11},end:{line:47,column:15}},'2':{start:{line:49,column:2},end:{line:49,column:23}},'3':{start:{line:50,column:2},end:{line:50,column:24}},'4':{start:{line:53,column:2},end:{line:53,column:33}},'5':{start:{line:54,column:2},end:{line:54,column:63}},'6':{start:{line:56,column:2},end:{line:62,column:3}},'7':{start:{line:61,column:4},end:{line:61,column:11}},'8':{start:{line:64,column:2},end:{line:75,column:3}},'9':{start:{line:65,column:4},end:{line:74,column:5}},'10':{start:{line:69,column:6},end:{line:69,column:72}},'11':{start:{line:71,column:6},end:{line:73,column:8}},'12':{start:{line:78,column:2},end:{line:78,column:75}},'13':{start:{line:81,column:2},end:{line:83,column:3}},'14':{start:{line:82,column:4},end:{line:82,column:63}},'15':{start:{line:85,column:2},end:{line:87,column:3}},'16':{start:{line:86,column:4},end:{line:86,column:75}},'17':{start:{line:89,column:2},end:{line:92,column:3}},'18':{start:{line:90,column:4},end:{line:91,column:80}},'19':{start:{line:94,column:2},end:{line:96,column:3}},'20':{start:{line:95,column:4},end:{line:95,column:69}},'21':{start:{line:98,column:2},end:{line:100,column:3}},'22':{start:{line:99,column:4},end:{line:99,column:71}},'23':{start:{line:102,column:2},end:{line:102,column:54}},'24':{start:{line:104,column:2},end:{line:107,column:3}},'25':{start:{line:105,column:4},end:{line:106,column:72}},'26':{start:{line:110,column:2},end:{line:116,column:3}},'27':{start:{line:115,column:4},end:{line:115,column:50}},'28':{start:{line:119,column:2},end:{line:123,column:3}},'29':{start:{line:120,column:4},end:{line:120,column:42}},'30':{start:{line:121,column:4},end:{line:121,column:34}},'31':{start:{line:122,column:4},end:{line:122,column:42}},'32':{start:{line:125,column:2},end:{line:131,column:3}},'33':{start:{line:126,column:4},end:{line:128,column:6}},'34':{start:{line:129,column:4},end:{line:129,column:34}},'35':{start:{line:130,column:4},end:{line:130,column:37}},'36':{start:{line:133,column:2},end:{line:139,column:3}},'37':{start:{line:134,column:4},end:{line:136,column:6}},'38':{start:{line:137,column:4},end:{line:137,column:34}},'39':{start:{line:138,column:4},end:{line:138,column:37}},'40':{start:{line:141,column:2},end:{line:149,column:3}},'41':{start:{line:142,column:4},end:{line:142,column:76}},'42':{start:{line:143,column:4},end:{line:143,column:34}},'43':{start:{line:144,column:4},end:{line:144,column:44}},'44':{start:{line:148,column:4},end:{line:148,column:26}},'45':{start:{line:151,column:2},end:{line:155,column:3}},'46':{start:{line:152,column:4},end:{line:154,column:5}},'47':{start:{line:153,column:6},end:{line:153,column:25}}},fnMap:{'0':{name:'initializeWidget',decl:{start:{line:44,column:24},end:{line:44,column:40}},loc:{start:{line:44,column:59},end:{line:156,column:1}},line:44}},branchMap:{'0':{loc:{start:{line:56,column:2},end:{line:62,column:3}},type:'if',locations:[{start:{line:56,column:2},end:{line:62,column:3}},{start:{line:56,column:2},end:{line:62,column:3}}],line:56},'1':{loc:{start:{line:57,column:4},end:{line:59,column:36}},type:'binary-expr',locations:[{start:{line:57,column:5},end:{line:57,column:31}},{start:{line:58,column:6},end:{line:58,column:48}},{start:{line:59,column:4},end:{line:59,column:36}}],line:57},'2':{loc:{start:{line:64,column:2},end:{line:75,column:3}},type:'if',locations:[{start:{line:64,column:2},end:{line:75,column:3}},{start:{line:64,column:2},end:{line:75,column:3}}],line:64},'3':{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:'if',locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},'4':{loc:{start:{line:66,column:6},end:{line:67,column:77}},type:'binary-expr',locations:[{start:{line:66,column:6},end:{line:66,column:29}},{start:{line:67,column:7},end:{line:67,column:38}},{start:{line:67,column:42},end:{line:67,column:76}}],line:66},'5':{loc:{start:{line:78,column:17},end:{line:78,column:74}},type:'binary-expr',locations:[{start:{line:78,column:17},end:{line:78,column:29}},{start:{line:78,column:33},end:{line:78,column:74}}],line:78},'6':{loc:{start:{line:81,column:2},end:{line:83,column:3}},type:'if',locations:[{start:{line:81,column:2},end:{line:83,column:3}},{start:{line:81,column:2},end:{line:83,column:3}}],line:81},'7':{loc:{start:{line:82,column:19},end:{line:82,column:62}},type:'binary-expr',locations:[{start:{line:82,column:19},end:{line:82,column:31}},{start:{line:82,column:35},end:{line:82,column:62}}],line:82},'8':{loc:{start:{line:85,column:2},end:{line:87,column:3}},type:'if',locations:[{start:{line:85,column:2},end:{line:87,column:3}},{start:{line:85,column:2},end:{line:87,column:3}}],line:85},'9':{loc:{start:{line:86,column:19},end:{line:86,column:74}},type:'binary-expr',locations:[{start:{line:86,column:19},end:{line:86,column:31}},{start:{line:86,column:35},end:{line:86,column:74}}],line:86},'10':{loc:{start:{line:89,column:2},end:{line:92,column:3}},type:'if',locations:[{start:{line:89,column:2},end:{line:92,column:3}},{start:{line:89,column:2},end:{line:92,column:3}}],line:89},'11':{loc:{start:{line:91,column:6},end:{line:91,column:79}},type:'binary-expr',locations:[{start:{line:91,column:6},end:{line:91,column:18}},{start:{line:91,column:22},end:{line:91,column:79}}],line:91},'12':{loc:{start:{line:94,column:2},end:{line:96,column:3}},type:'if',locations:[{start:{line:94,column:2},end:{line:96,column:3}},{start:{line:94,column:2},end:{line:96,column:3}}],line:94},'13':{loc:{start:{line:95,column:19},end:{line:95,column:68}},type:'binary-expr',locations:[{start:{line:95,column:19},end:{line:95,column:31}},{start:{line:95,column:35},end:{line:95,column:68}}],line:95},'14':{loc:{start:{line:98,column:2},end:{line:100,column:3}},type:'if',locations:[{start:{line:98,column:2},end:{line:100,column:3}},{start:{line:98,column:2},end:{line:100,column:3}}],line:98},'15':{loc:{start:{line:99,column:19},end:{line:99,column:70}},type:'binary-expr',locations:[{start:{line:99,column:19},end:{line:99,column:31}},{start:{line:99,column:35},end:{line:99,column:70}}],line:99},'16':{loc:{start:{line:102,column:17},end:{line:102,column:53}},type:'binary-expr',locations:[{start:{line:102,column:17},end:{line:102,column:29}},{start:{line:102,column:33},end:{line:102,column:53}}],line:102},'17':{loc:{start:{line:104,column:2},end:{line:107,column:3}},type:'if',locations:[{start:{line:104,column:2},end:{line:107,column:3}},{start:{line:104,column:2},end:{line:107,column:3}}],line:104},'18':{loc:{start:{line:106,column:6},end:{line:106,column:71}},type:'binary-expr',locations:[{start:{line:106,column:6},end:{line:106,column:18}},{start:{line:106,column:22},end:{line:106,column:71}}],line:106},'19':{loc:{start:{line:110,column:2},end:{line:116,column:3}},type:'if',locations:[{start:{line:110,column:2},end:{line:116,column:3}},{start:{line:110,column:2},end:{line:116,column:3}}],line:110},'20':{loc:{start:{line:111,column:4},end:{line:113,column:49}},type:'binary-expr',locations:[{start:{line:111,column:4},end:{line:111,column:16}},{start:{line:112,column:4},end:{line:112,column:11}},{start:{line:113,column:4},end:{line:113,column:49}}],line:111},'21':{loc:{start:{line:119,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:119,column:2},end:{line:123,column:3}},{start:{line:119,column:2},end:{line:123,column:3}}],line:119},'22':{loc:{start:{line:125,column:2},end:{line:131,column:3}},type:'if',locations:[{start:{line:125,column:2},end:{line:131,column:3}},{start:{line:125,column:2},end:{line:131,column:3}}],line:125},'23':{loc:{start:{line:133,column:2},end:{line:139,column:3}},type:'if',locations:[{start:{line:133,column:2},end:{line:139,column:3}},{start:{line:133,column:2},end:{line:139,column:3}}],line:133},'24':{loc:{start:{line:141,column:2},end:{line:149,column:3}},type:'if',locations:[{start:{line:141,column:2},end:{line:149,column:3}},{start:{line:141,column:2},end:{line:149,column:3}}],line:141},'25':{loc:{start:{line:151,column:2},end:{line:155,column:3}},type:'if',locations:[{start:{line:151,column:2},end:{line:155,column:3}},{start:{line:151,column:2},end:{line:155,column:3}}],line:151},'26':{loc:{start:{line:151,column:6},end:{line:151,column:65}},type:'binary-expr',locations:[{start:{line:151,column:6},end:{line:151,column:34}},{start:{line:151,column:38},end:{line:151,column:65}}],line:151},'27':{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:'if',locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0],'2':[0,0],'3':[0,0],'4':[0,0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeWidget(widget,options){cov_1r4iodpbui.f[0]++;var watcher,condition=(cov_1r4iodpbui.s[0]++,widget.displayConditions),pf=(cov_1r4iodpbui.s[1]++,this);cov_1r4iodpbui.s[2]++;widget.watchers=[];cov_1r4iodpbui.s[3]++;widget.listeners=[];cov_1r4iodpbui.s[4]++;widget.expiration=new Date();cov_1r4iodpbui.s[5]++;widget.expiration.setDate(widget.expiration.getDate()+365);cov_1r4iodpbui.s[6]++;if((cov_1r4iodpbui.b[1][0]++,widget.type==='sitegate')&&(cov_1r4iodpbui.b[1][1]++,read(PREFIX_UNLOCK+widget.id)==='true')||(cov_1r4iodpbui.b[1][2]++,widget.hiddenViaABTests===true)){cov_1r4iodpbui.b[0][0]++;cov_1r4iodpbui.s[7]++;return;}else{cov_1r4iodpbui.b[0][1]++;}cov_1r4iodpbui.s[8]++;if(widget.pushDown){cov_1r4iodpbui.b[2][0]++;cov_1r4iodpbui.s[9]++;if((cov_1r4iodpbui.b[4][0]++,widget.layout==='bar')&&((cov_1r4iodpbui.b[4][1]++,widget.position==='top-fixed')||(cov_1r4iodpbui.b[4][2]++,widget.position==='top-absolute'))){cov_1r4iodpbui.b[3][0]++;cov_1r4iodpbui.s[10]++;addClass(document$1.querySelector(widget.pushDown),'pf-push-down');}else{cov_1r4iodpbui.b[3][1]++;cov_1r4iodpbui.s[11]++;throw new Error('Only top positioned bar widgets may have a pushDown property');}}else{cov_1r4iodpbui.b[2][1]++;}cov_1r4iodpbui.s[12]++;widget.valid=(cov_1r4iodpbui.b[5][0]++,widget.valid)&&(cov_1r4iodpbui.b[5][1]++,entityFieldChecker(widget,pf.customData));cov_1r4iodpbui.s[13]++;if(condition.date){cov_1r4iodpbui.b[6][0]++;cov_1r4iodpbui.s[14]++;widget.valid=(cov_1r4iodpbui.b[7][0]++,widget.valid)&&(cov_1r4iodpbui.b[7][1]++,dateChecker(condition.date));}else{cov_1r4iodpbui.b[6][1]++;}cov_1r4iodpbui.s[15]++;if(condition.pageVisits){cov_1r4iodpbui.b[8][0]++;cov_1r4iodpbui.s[16]++;widget.valid=(cov_1r4iodpbui.b[9][0]++,widget.valid)&&(cov_1r4iodpbui.b[9][1]++,pageVisitsChecker(condition.pageVisits));}else{cov_1r4iodpbui.b[8][1]++;}cov_1r4iodpbui.s[17]++;if(condition.hideAfterAction){cov_1r4iodpbui.b[10][0]++;cov_1r4iodpbui.s[18]++;widget.valid=(cov_1r4iodpbui.b[11][0]++,widget.valid)&&(cov_1r4iodpbui.b[11][1]++,hideAfterActionChecker(condition.hideAfterAction,widget));}else{cov_1r4iodpbui.b[10][1]++;}cov_1r4iodpbui.s[19]++;if(condition.urlContains){cov_1r4iodpbui.b[12][0]++;cov_1r4iodpbui.s[20]++;widget.valid=(cov_1r4iodpbui.b[13][0]++,widget.valid)&&(cov_1r4iodpbui.b[13][1]++,urlChecker(condition.urlContains));}else{cov_1r4iodpbui.b[12][1]++;}cov_1r4iodpbui.s[21]++;if(condition.metaContains){cov_1r4iodpbui.b[14][0]++;cov_1r4iodpbui.s[22]++;widget.valid=(cov_1r4iodpbui.b[15][0]++,widget.valid)&&(cov_1r4iodpbui.b[15][1]++,metaChecker(condition.metaContains));}else{cov_1r4iodpbui.b[14][1]++;}cov_1r4iodpbui.s[23]++;widget.valid=(cov_1r4iodpbui.b[16][0]++,widget.valid)&&(cov_1r4iodpbui.b[16][1]++,condition.showOnInit);cov_1r4iodpbui.s[24]++;if(condition.impressions){cov_1r4iodpbui.b[17][0]++;cov_1r4iodpbui.s[25]++;widget.valid=(cov_1r4iodpbui.b[18][0]++,widget.valid)&&(cov_1r4iodpbui.b[18][1]++,impressionsChecker(condition.impressions,widget));}else{cov_1r4iodpbui.b[17][1]++;}cov_1r4iodpbui.s[26]++;if((cov_1r4iodpbui.b[20][0]++,widget.valid)&&(cov_1r4iodpbui.b[20][1]++,options)&&(cov_1r4iodpbui.b[20][2]++,options.priority===OPTIONS_PRIORITY_ORDERED)){cov_1r4iodpbui.b[19][0]++;cov_1r4iodpbui.s[27]++;widgetTracker.prioritizedWidgets.push(widget);}else{cov_1r4iodpbui.b[19][1]++;}cov_1r4iodpbui.s[28]++;if(condition.showOnExitIntent){cov_1r4iodpbui.b[21][0]++;cov_1r4iodpbui.s[29]++;watcher=registerExitIntentWatcher();cov_1r4iodpbui.s[30]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[31]++;initializeExitIntent(widget,watcher);}else{cov_1r4iodpbui.b[21][1]++;}cov_1r4iodpbui.s[32]++;if(condition.displayWhenElementVisible){cov_1r4iodpbui.b[22][0]++;cov_1r4iodpbui.s[33]++;watcher=registerElementWatcher(condition.displayWhenElementVisible);cov_1r4iodpbui.s[34]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[35]++;initializeScrollWatchers(widget);}else{cov_1r4iodpbui.b[22][1]++;}cov_1r4iodpbui.s[36]++;if(condition.scrollPercentageToDisplay){cov_1r4iodpbui.b[23][0]++;cov_1r4iodpbui.s[37]++;watcher=registerPositionWatcher(condition.scrollPercentageToDisplay);cov_1r4iodpbui.s[38]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[39]++;initializeScrollWatchers(widget);}else{cov_1r4iodpbui.b[23][1]++;}cov_1r4iodpbui.s[40]++;if(condition.manualTrigger){cov_1r4iodpbui.b[24][0]++;cov_1r4iodpbui.s[41]++;watcher=registerManualTriggerWatcher(condition.manualTrigger,widget);cov_1r4iodpbui.s[42]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[43]++;widgetTracker.readyWidgets.push(widget);cov_1r4iodpbui.s[44]++;triggerWidget(widget);}else{cov_1r4iodpbui.b[24][1]++;}cov_1r4iodpbui.s[45]++;if((cov_1r4iodpbui.b[26][0]++,widget.watchers.length===0)&&(cov_1r4iodpbui.b[26][1]++,!condition.showOnExitIntent)){cov_1r4iodpbui.b[25][0]++;cov_1r4iodpbui.s[46]++;if(widget.valid){cov_1r4iodpbui.b[27][0]++;cov_1r4iodpbui.s[47]++;showWidget(widget);}else{cov_1r4iodpbui.b[27][1]++;}}else{cov_1r4iodpbui.b[25][1]++;}} - /** - * Setup the className for a widget - * - * @exports setWidgetClassname - * @params {object} widget - * @params {object} config - */ - function setWidgetClassname (widget, config) { - widget.className = [ - 'pf-widget ', - 'pf-' + config.type, - ' pf-widget-' + config.layout, - config.position ? ' pf-position-' + config.position : '', - config.pushDown ? ' pf-has-push-down' : '', - config.origin ? ' pf-origin-' + config.origin : '', - ' pf-widget-variant-' + config.variant, - config.theme ? ' pf-theme-' + config.theme : '', - config.className ? ' ' + config.className : '', - config.branding ? ' pf-widget-has-branding' : '', - !config.responsive ? ' pf-mobile-hide' : '' - ].join(''); - } + var cov_le7jeyoo5=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js',hash='bd62d0e25a272b36fce88209a18945257367f6d0',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js',statementMap:{'0':{start:{line:17,column:2},end:{line:17,column:33}},'1':{start:{line:18,column:2},end:{line:18,column:34}}},fnMap:{'0':{name:'previewWidget',decl:{start:{line:16,column:24},end:{line:16,column:37}},loc:{start:{line:16,column:47},end:{line:19,column:1}},line:16}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function previewWidget(widget){cov_le7jeyoo5.f[0]++;cov_le7jeyoo5.s[0]++;widget.id=generateUniqueId();cov_le7jeyoo5.s[1]++;return createWidgetHtml(widget);} - /** @module pathfora/form/build-form-element */ + var cov_n9rnkdh8g=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js',hash='c4c1b377992e8b34c9a4d9bffc69f76783c80f27',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js',statementMap:{'0':{start:{line:12,column:17},end:{line:12,column:56}},'1':{start:{line:14,column:2},end:{line:17,column:3}},'2':{start:{line:15,column:4},end:{line:15,column:27}},'3':{start:{line:16,column:4},end:{line:16,column:51}}},fnMap:{'0':{name:'cancelDelayedWidget',decl:{start:{line:11,column:24},end:{line:11,column:43}},loc:{start:{line:11,column:56},end:{line:18,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:14,column:2},end:{line:17,column:3}},type:'if',locations:[{start:{line:14,column:2},end:{line:17,column:3}},{start:{line:14,column:2},end:{line:17,column:3}}],line:14}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function cancelDelayedWidget(widgetKey){cov_n9rnkdh8g.f[0]++;var delayObj=(cov_n9rnkdh8g.s[0]++,widgetTracker.delayedWidgets[widgetKey]);cov_n9rnkdh8g.s[1]++;if(delayObj){cov_n9rnkdh8g.b[0][0]++;cov_n9rnkdh8g.s[2]++;clearTimeout(delayObj);cov_n9rnkdh8g.s[3]++;delete widgetTracker.delayedWidgets[widgetKey];}else{cov_n9rnkdh8g.b[0][1]++;}} - /** - * Build and insert a custom form element into - * the widget's form - * - * @exports buildFormElement - * @params {object} elem - * @params {object} form - */ - function buildFormElement (elem, form) { - var content, - i, - val, - label, - wrapper = document$1.createElement('div'), - isGroup = elem.hasOwnProperty('groupType'); - - // group elements include: checkbox groups - if (isGroup) { - wrapper.className = 'pf-widget-' + elem.type; - content = document$1.createElement('div'); - } else { - switch (elem.type) { - case 'email': - content = document$1.createElement('input'); - content.setAttribute('type', 'email'); - break; - case 'text': - case 'input': - content = document$1.createElement('input'); - content.setAttribute('type', 'text'); - break; - case 'date': - content = document$1.createElement('input'); - content.setAttribute('type', 'date'); - break; - default: - content = document$1.createElement(elem.type); - break; - } - - content.setAttribute('name', elem.name); - content.setAttribute('id', elem.name); - - // add row count for textarea - if (elem.type === 'textarea') { - content.setAttribute('rows', 5); - } - - // add max and min date for date input - if (elem.type === 'date') { - var today = new Date(), - offset = today.getTimezoneOffset(), - todayTimezone = new Date(today.getTime() - offset * 60 * 1000), - max = elem.maxDate - ? elem.maxDate === 'today' - ? todayTimezone - : new Date(elem.maxDate) - : null, - min = elem.minDate - ? elem.minDate === 'today' - ? todayTimezone - : new Date(elem.minDate) - : null; - - if (max != null) { - content.setAttribute('max', max.toISOString().split('T')[0]); - } - if (min != null) { - content.setAttribute('min', min.toISOString().split('T')[0]); - } - } - } - - if (elem.label) { - if (isGroup) { - label = document$1.createElement('span'); - label.id = elem.name; - content.setAttribute('aria-labelledby', elem.name); - } else { - label = document$1.createElement('label'); - label.setAttribute('for', elem.name); - } - - label.innerHTML = elem.label; - label.className = 'pf-form-label'; - addClass(content, 'pf-has-label'); - - if (elem.required === true) { - label.innerHTML += ' *'; - } - - wrapper.appendChild(label); - } - - if (elem.required === true || elem.type === 'date' || elem.type === 'email') { - addClass(wrapper, 'pf-form-required'); - content.setAttribute( - elem.required === true ? 'data-required' : 'data-validate', - 'true' - ); - - if (elem.label) { - var reqFlag = document$1.createElement('div'); - reqFlag.className = 'pf-required-flag'; - reqFlag.innerHTML = elem.required === true ? 'required' : 'invalid'; - - var reqTriangle = document$1.createElement('span'); - reqFlag.appendChild(reqTriangle); - wrapper.appendChild(reqFlag); - } - } - - if (elem.placeholder) { - // select element has first option as placeholder - if (elem.type === 'select') { - var placeholder = document$1.createElement('option'); - placeholder.setAttribute('value', ''); - placeholder.innerHTML = elem.placeholder; - content.appendChild(placeholder); - } else { - content.placeholder = elem.placeholder; - } - - if (!elem.label) { - content.setAttribute('aria-label', elem.placeholder); - } - } - - if (elem.values) { - for (i = 0; i < elem.values.length; i++) { - val = elem.values[i]; - - if (isGroup) { - var input = document$1.createElement('input'); - input.setAttribute('type', elem.groupType); - input.setAttribute('value', val.value); - input.setAttribute('name', elem.name); - - if (val.label) { - label = document$1.createElement('label'); - label.className = 'pf-widget-' + elem.groupType; - label.appendChild(input); - label.appendChild(document$1.createTextNode(val.label)); - content.appendChild(label); - } else { - throw new Error( - elem.groupType + 'form group values must contain labels' - ); - } - } else if (elem.type === 'select') { - var option = document$1.createElement('option'); - option.setAttribute('value', val.value); - option.innerHTML = val.label; - - content.appendChild(option); - } - } - } - - wrapper.appendChild(content); - - // make sure we're inserting the new element before the confirm button - var btn = form.querySelector('.pf-widget-ok'); - if (btn) { - form.insertBefore(wrapper, btn); - } else { - form.appendChild(wrapper); - } - } - - /** @module pathfora/form/build-widget-form */ - - /** - * Build a custom form on a widget according to the - * formElements config provided - * - * @exports buildWidgetForm - * @params {object} formElements - * @params {object} form - */ - function buildWidgetForm (formElements, form) { - for (var i = 0; i < formElements.length; i++) { - var elem = formElements[i]; - - switch (elem.type) { - // Radio & Checkbox Button Group - case 'radio-group': - case 'checkbox-group': - elem.groupType = elem.type.split('-')[0]; - buildFormElement(elem, form); - delete elem.groupType; - break; - - // Textarea, Input, & Select - case 'textarea': - case 'input': - case 'text': - case 'email': - case 'date': - case 'select': - buildFormElement(elem, form); - break; - - default: - throw new Error('unrecognized form element type: ' + elem.type); - } - } - } - - /** @module pathfora/form/construct-form-state */ - - /** - * Setup html for success or error state of a form module - * - * @exports constructFormState - * @params {object} widget - * @params {object} config - * @params {string} name - */ - function constructFormState (config, widget, name) { - if (!config.formStates) { - return; - } - - var obj, defaultHeadline, defaultMsg; - - switch (name) { - case 'success': - obj = config.formStates.success; - defaultMsg = 'We have received your submission.'; - defaultHeadline = 'Thank You'; - break; - case 'error': - obj = config.formStates.error; - defaultMsg = 'There was an error receiving with your submission.'; - defaultHeadline = 'Error'; - break; - default: - throw new Error('Unrecognized formState: ' + name); - } - - var elem = document$1.createElement('div'); - elem.className = name + '-state'; - - var title = document$1.createElement('h2'); - title.className = 'pf-widget-headline'; - title.innerHTML = obj.headline || defaultHeadline; - elem.appendChild(title); - - var msg = document$1.createElement('div'); - msg.className = 'pf-widget-message'; - msg.innerHTML = obj.msg || defaultMsg; - elem.appendChild(msg); - - if (obj.okShow) { - var ok = document$1.createElement('button'); - ok.type = 'button'; - ok.className = 'pf-widget-btn pf-widget-ok'; - ok.innerHTML = obj.okMessage || 'Confirm'; - elem.appendChild(ok); - } - - if (obj.cancelShow) { - var cancel = document$1.createElement('button'); - cancel.type = 'button'; - cancel.className = 'pf-widget-btn pf-widget-cancel'; - cancel.innerHTML = obj.cancelMessage || 'Cancel'; - elem.appendChild(cancel); - } - - return elem; - } - - /** @module pathfora/widgets/actions/form-state-actions */ - - /** - * Add callbacks and tracking for confirm and cancel - * buttons on the success or error state of a form widget - * - * @exports formStateActions - * @params {object} widget - * @params {object} config - * @params {name} string - */ - function formStateActions (config, widget, name) { - var ok = widget.querySelector('.' + name + '-state .pf-widget-ok'), - cancel = widget.querySelector('.' + name + '-state .pf-widget-cancel'); - - if (cancel) { - buttonAction(cancel, name + '.cancel', config, widget); - } - - if (ok) { - buttonAction(ok, name + '.confirm', config, widget); - } - } - - /** @module pathfora/widgets/construct-widget-layout */ - - /** - * Setup inner html elements for a widget - * - * @exports constructWidgetLayout - * @params {object} widget - * @params {object} config - */ - function constructWidgetLayout (widget, config) { - var node, - child, - i, - widgetContent = widget.querySelector('.pf-widget-content'), - widgetCancel = widget.querySelector('.pf-widget-cancel'), - widgetOk = widget.querySelector('.pf-widget-ok'), - widgetHeadline = widget.querySelectorAll('.pf-widget-headline'), - widgetBody = widget.querySelector('.pf-widget-body'), - widgetMessage = widget.querySelector('.pf-widget-message'), - widgetFooter = widget.querySelector('.pf-widget-footer'); - - if (widgetCancel !== null && !config.cancelShow) { - node = widgetCancel; - - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - - if (widgetOk !== null && !config.okShow) { - node = widgetOk; - - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - - if (widgetCancel !== null) { - widgetCancel.innerHTML = config.cancelMessage; - } - - if (widgetOk !== null) { - widgetOk.innerHTML = config.okMessage; - } - - if (widgetOk && widgetOk.value !== null) { - widgetOk.value = config.okMessage; - } - - if (widgetCancel && widgetCancel.value !== null) { - widgetCancel.value = config.cancelMessage; - } - - // Form layouts should have a default success message - switch (config.type) { - case 'form': - case 'subscription': - case 'sitegate': - switch (config.layout) { - case 'modal': - case 'slideout': - case 'sitegate': - case 'inline': - if (!config.formStates) { - break; - } - - // success state - if (config.formStates.success) { - var success = constructFormState(config, widget, 'success'); - widgetContent.appendChild(success); - formStateActions(config, widget, 'success'); - } - - // error state - if (config.formStates.error) { - var error = constructFormState(config, widget, 'error'); - widgetContent.appendChild(error); - formStateActions(config, widget, 'error'); - } - - break; - } - break; - } - - switch (config.layout) { - case 'modal': - case 'slideout': - case 'sitegate': - case 'inline': - if (widgetContent && config.branding) { - var branding = document$1.createElement('div'); - branding.className = 'branding'; - branding.innerHTML = templates.assets.lytics; - widgetContent.appendChild(branding); - } - - break; - } - - switch (config.type) { - case 'form': - switch (config.layout) { - case 'modal': - case 'slideout': - case 'random': - case 'inline': - break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'subscription': - switch (config.layout) { - case 'modal': - case 'bar': - case 'slideout': - case 'random': - case 'inline': - break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'message': - switch (config.layout) { - case 'modal': - case 'slideout': - break; - case 'random': - case 'bar': - case 'button': - case 'inline': - break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'sitegate': - switch (config.layout) { - case 'modal': - if (config.showForm === false) { - node = widget.querySelector('form'); - child = node.querySelectorAll('input, select, textarea'); - - if (node) { - for (i = 0; i < child.length; i++) { - node.removeChild(child[i]); - } - - child = node.querySelector('.pf-sitegate-clear'); - - if (child) { - node.removeChild(child); - } - } - } - break; - default: - throw new Error('Invalid widget layout value'); - } - break; - } - - // NOTE Set The headline - for (i = widgetHeadline.length - 1; i >= 0; i--) { - widgetHeadline[i].innerHTML = config.headline; - } - - // NOTE Set the image - if (config.image) { - var widgetImage = document$1.createElement('img'); - widgetImage.src = config.image; - widgetImage.className = 'pf-widget-img'; - if (config.layout === 'button') ; else if (config.layout === 'modal' || config.layout === 'inline') { - widgetContent.appendChild(widgetImage); - } else { - widgetBody.appendChild(widgetImage); - } - } - - switch (config.type) { - case 'sitegate': - case 'form': - // Check if custom form is defined - if (config.formElements && config.formElements.length) { - // remove the existing form fields - var form = widget.querySelector('form'); - addClass(form, 'pf-custom-form'); - var childName; - var arr = form.children; - - for (var k = 0; k < arr.length; k++) { - child = arr[k]; - - if (typeof child.getAttribute !== 'undefined') { - childName = child.getAttribute('name'); - - if (childName != null) { - form.removeChild(child); - k--; - } - } - } - - buildWidgetForm(config.formElements, form); - } else { - // support old form functions - var getFormElement = function (field) { - if (field === 'name') { - return widget.querySelector('input[name="username"]'); - } - - return widget.querySelector('form [name="' + field + '"]'); - }; - - // Set placeholders - Object.keys(config.placeholders).forEach(function (field) { - var element = getFormElement(field); - - if (element == null) { - return; - } - if (typeof element.placeholder !== 'undefined') { - element.placeholder = config.placeholders[field]; - } else if (typeof element.options !== 'undefined') { - element.options[0].innerHTML = config.placeholders[field]; - } - - element.setAttribute('aria-label', config.placeholders[field]); - }); - - // Set required Fields - Object.keys(config.required).forEach(function (field) { - var element = getFormElement(field); - - if (element && config.required[field]) { - element.setAttribute('data-required', 'true'); - } - }); - - // Hide fields - Object.keys(config.fields).forEach(function (field) { - var element = getFormElement(field); - - if (element && !config.fields[field] && element.parentNode) { - element.parentNode.removeChild(element); - } - }); - - // NOTE: collapse half-width inputs - Array.prototype.slice - .call(widget.querySelectorAll('form .pf-field-half-width')) - .forEach(function (element, halfcount) { - var parent = element.parentNode, - prev = element.previousElementSibling, - next = element.nextElementSibling; - - if (parent) { - if (element.className.indexOf('pf-field-half-width') !== -1) { - if (halfcount % 2) { - // odd - addClass(element, 'right'); - - if ( - !( - prev && - prev.className.indexOf('pf-field-half-width') !== -1 - ) - ) { - removeClass(element, 'pf-field-half-width'); - } - } else if ( - !( - next && next.className.indexOf('pf-field-half-width') !== -1 - ) - ) { - // even - removeClass(element, 'pf-field-half-width'); - } - } - } - }); - } - - // For select boxes we need to control the color of - // the placeholder text - var selects = widget.querySelectorAll('select'); - - for (i = 0; i < selects.length; i++) { - // default class indicates the placeholder text color - if (selects[i].value === '') { - addClass(selects[i], 'default'); - } - - selects[i].onchange = function () { - if (this.value !== '') { - removeClass(this, 'default'); - } else { - addClass(this, 'default'); - } - }; - } - - break; - case 'subscription': - widget.querySelector('input').placeholder = config.placeholders.email; - break; - } - - if (config.msg) { - widgetMessage.innerHTML = config.msg; - } - - if (config.footerText) { - widgetFooter.innerHTML = config.footerText; - } - } - - /** @module pathfora/widgets/colors/set-custom-colors */ - - /** - * Set colors for a widget with a custom theme - * defined in the config - * - * @exports setCustomColors - * @params {object} widget - * @params {object} colors - */ - function setCustomColors (widget, colors) { - var i = 0, - close = widget.querySelector('.pf-widget-close'), - msg = widget.querySelectorAll('.pf-widget-message'), - headline = widget.querySelectorAll('.pf-widget-headline'), - headlineLeft = widget.querySelector( - '.pf-widget-caption-left .pf-widget-headline' - ), - cancelBtn = widget.querySelectorAll('.pf-widget-btn.pf-widget-cancel'), - okBtn = widget.querySelectorAll('.pf-widget-btn.pf-widget-ok'), - arrow = widget.querySelector('.pf-widget-caption span'), - arrowLeft = widget.querySelector('.pf-widget-caption-left span'), - contentUnit = widget.querySelector('.pf-content-unit'), - contentUnitMeta = widget.querySelector('.pf-content-unit-meta'), - fields = widget.querySelectorAll('input, textarea, select'), - branding = widget.querySelector('.branding svg'), - required = widget.querySelectorAll('.pf-required-flag'), - requiredAsterisk = widget.querySelectorAll('span.required'), - requiredInline = widget.querySelectorAll( - '[data-required=true]:not(.pf-has-label), [data-validate=true]:not(.pf-has-label)' - ), - body = widget.querySelector('.pf-widget-body'); - - if (colors.background) { - if (hasClass(widget, 'pf-widget-modal')) { - widget - .querySelector('.pf-widget-content') - .style.setProperty('background-color', colors.background, 'important'); - } else { - widget.style.setProperty( - 'background-color', - colors.background, - 'important' - ); - } - } - - if (colors.fieldBackground) { - for (i = 0; i < fields.length; i++) { - fields[i].style.setProperty( - 'background-color', - colors.fieldBackground, - 'important' - ); - } - } - - if (colors.required) { - for (i = 0; i < required.length; i++) { - required[i].style.setProperty( - 'background-color', - colors.required, - 'important' - ); - required[i] - .querySelector('span') - .style.setProperty('border-right-color', colors.required, 'important'); - } - - for (i = 0; i < requiredInline.length; i++) { - requiredInline[i].style.setProperty( - 'border-color', - colors.required, - 'important' - ); - } - - for (i = 0; i < requiredAsterisk.length; i++) { - requiredAsterisk[i].style.setProperty( - 'color', - colors.required, - 'important' - ); - } - } - - if (colors.requiredText) { - for (i = 0; i < required.length; i++) { - required[i].style.setProperty('color', colors.requiredText, 'important'); - } - } - - if (contentUnit && contentUnitMeta) { - var contentUnitMetaTitle = contentUnitMeta.querySelector('h4'); - var contentUnitMetaDescription = contentUnitMeta.querySelector('p'); - - if (colors.actionBackground) { - contentUnit.style.setProperty( - 'background-color', - colors.actionBackground, - 'important' - ); - } - - if (colors.actionText && contentUnitMetaTitle) { - contentUnitMetaTitle.style.setProperty( - 'color', - colors.actionText, - 'important' - ); - } - - if (colors.text && contentUnitMetaDescription) { - contentUnitMetaDescription.style.setProperty( - 'color', - colors.text, - 'important' - ); - } - } - - if (close && colors.close) { - close.style.setProperty('color', colors.close, 'important'); - } - - if (headline && colors.headline) { - for (i = 0; i < headline.length; i++) { - headline[i].style.setProperty('color', colors.headline, 'important'); - } - } - - if (headlineLeft && colors.headline) { - headlineLeft.style.setProperty('color', colors.headline, 'important'); - } - - if (arrow && colors.close) { - arrow.style.setProperty('color', colors.close, 'important'); - } - - if (arrowLeft && colors.close) { - arrowLeft.style.setProperty('color', colors.close, 'important'); - } - - if (cancelBtn) { - for (i = 0; i < cancelBtn.length; i++) { - if (colors.cancelText) { - cancelBtn[i].style.setProperty('color', colors.cancelText, 'important'); - } - - if (colors.cancelBackground) { - cancelBtn[i].style.setProperty( - 'background-color', - colors.cancelBackground, - 'important' - ); - } - } - } - - if (okBtn) { - for (i = 0; i < okBtn.length; i++) { - if (colors.actionText) { - okBtn[i].style.setProperty('color', colors.actionText, 'important'); - } - - if (colors.actionBackground) { - okBtn[i].style.setProperty( - 'background-color', - colors.actionBackground, - 'important' - ); - } - } - } - - if (colors.text && branding) { - branding.style.setProperty('fill', colors.text, 'important'); - } - - if (msg && colors.text) { - for (i = 0; i < msg.length; i++) { - msg[i].style.setProperty('color', colors.text, 'important'); - } - } - - if (body && colors.text) { - body.style.setProperty('color', colors.text, 'important'); - } - } - - /** @module pathfora/wodgets/colors/setup-widget-colors */ - - /** - * Determine if the widget has a custom or predefined - * theme and setup the colors accordingly - * - * @exports setupWidgetColors - * @params {object} widget - * @params {object} config - */ - function setupWidgetColors (widget, config) { - switch (config.theme) { - case 'custom': - if (config.colors) { - setCustomColors(widget, config.colors); - } - break; - case 'none': - // Do nothing, we will rely on CSS for the colors - break; - default: - if (config.theme) { - setCustomColors(widget, defaultProps.generic.themes[config.theme]); - } - break; - } - } - - /** @module pathfora/widgets/create-widget-html */ - - /** - * Call all the necessary functions to construct - * the widget html - * - * @exports createWidgetHtml - * @params {object} config - * @returns {object} widget - */ - function createWidgetHtml (config) { - var widget = document$1.createElement('div'); - - widget.innerHTML = templates[config.type][config.layout] || ''; - widget.id = config.id; - - if (widget.innerHTML === '') { - throw new Error('Could not get pathfora template based on type and layout.'); - } - - setupWidgetPosition(widget, config); - constructWidgetActions(widget, config); - setupWidgetContentUnit(widget, config); - setWidgetClassname(widget, config); - constructWidgetLayout(widget, config); - setupWidgetColors(widget, config); - - return widget; - } - - /** @module pathfora/widgets/widget-resize-listener */ - - /** - * Adjust widget look and feel on window resize bounds - * - * @exports widgetResizeListener - * @params {object} widget - * @params {object} node - */ - function widgetResizeListener (widget, node) { - if (widget.layout === 'inline' || widget.layout === 'modal' && widget.recommend) { - var rec = node.querySelector('.pf-content-unit'); - if (rec) { - if (node.offsetWidth < WIDTH_BREAKPOINT && !hasClass(rec, 'stack')) { - addClass(rec, 'stack'); - } else if (node.offsetWidth >= WIDTH_BREAKPOINT) { - removeClass(rec, 'stack'); - } - } - } - } - - /** @module pathfora/widgets/show-widget */ - - /** - * Make the widget visible to the user - * - * @exports showWidget - * @params {object} widget - */ - - function showWidget (w) { - var openWidget = function (widget) { - // FIXME Change to Array#filter and Array#length - for (var i = 0; i < widgetTracker.openedWidgets.length; i++) { - if (widgetTracker.openedWidgets[i] === widget) { - return; - } - } - - widgetTracker.openedWidgets.push(widget); - trackWidgetAction('show', widget); - - // increment impressions for widget regardless of display condition need(s) - incrementImpressions(widget); - - var node; - - try { - node = createWidgetHtml(widget); - } catch (error) { - widgetTracker.openedWidgets.pop(); - throw new Error(error); - } - - if (widget.pushDown) { - addClass(document$1.querySelector('.pf-push-down'), 'opened'); - } - - if ( - widget.config.positionSelector == null && - widget.config.layout !== 'inline' - ) { - document$1.body.appendChild(node); - - if (widget.layout === 'modal' || widget.type === 'sitegate') { - // ensure that we set focus the the modal for accessibility reasons - var focusable = node.querySelectorAll( - 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])' - ); - - if (focusable.length) { - widget.listeners.tabindex = { - type: 'keydown', - target: document$1, - fn: function (ev) { - // for modal and sitegate widgets we need to limit tab cycle focus to the widget - if (ev.keyCode === 9) { - if (!node.contains(event.target)) { - ev.preventDefault(); - focusable[0].focus(); - } else if (ev.target === focusable[focusable.length - 1]) { - ev.preventDefault(); - focusable[0].focus(); - } - } - } - }; - } - } - } else { - // support legacy inline layout used position as selector. - var selector = widget.config.positionSelector == null - ? widget.config.position : widget.config.positionSelector; - var hostNode = document$1.querySelector(selector); - - if (hostNode) { - hostNode.appendChild(node); - } else { - widgetTracker.openedWidgets.pop(); - throw new Error('Widget could not be initialized in ' + selector); - } - } - - // NOTE wait for appending to DOM to trigger the animation - // FIXME 50 - magical number - setTimeout(function () { - var widgetLoadCallback = widget.config.onLoad; - - addClass(node, 'opened'); - - if (typeof widgetLoadCallback === 'function') { - widgetLoadCallback(callbackTypes.LOAD, { - config: widget, - widget: node - }); - } - if ( - widget.config.layout === 'modal' && - typeof widget.config.onModalOpen === 'function' - ) { - widget.config.onModalOpen(callbackTypes.MODAL_OPEN, { - config: widget, - widget: node - }); - } - }, 50); - - if (widget.displayConditions.hideAfter) { - setTimeout(function () { - closeWidget(widget.id, true); - }, widget.displayConditions.hideAfter * 1000); - } - - widgetResizeListener(widget, node); - - widget.listeners.resize = { - type: 'resize', - target: window, - fn: function () { - widgetResizeListener(widget, node); - } - }; - - for (var key in widget.listeners) { - if (widget.listeners.hasOwnProperty(key)) { - var val = widget.listeners[key]; - if (val.target && typeof val.target.addEventListener === 'function') { - val.target.addEventListener(val.type, val.fn); - } - } - } - }; - - var widgetOnInitCallback = w.onInit; - if (typeof widgetOnInitCallback === 'function') { - widgetOnInitCallback(callbackTypes.INIT, { - config: w - }); - } - - // account for showDelay condition - if (w.displayConditions && w.displayConditions.showDelay) { - widgetTracker.delayedWidgets[w.id] = setTimeout(function () { - openWidget(w); - document$1.querySelector('.pf-widget-ok').focus(); - }, w.displayConditions.showDelay * 1000); - } else { - openWidget(w); - } - } - - /** @module pathfora/display-conditions/watchers/validate-watchers */ - - function validateWatchers (widget, cb, e) { - var valid = true; - - for (var key in widget.watchers) { - if (widget.watchers.hasOwnProperty(key) && widget.watchers[key] !== null) { - valid = valid && widget.valid && widget.watchers[key].check(e); - } - } - - if (widget.displayConditions.impressions && valid) { - valid = impressionsChecker(widget.displayConditions.impressions, widget); - } - - if (valid) { - showWidget(widget); - widget.valid = false; - cb(); - widget.watchers = []; - - return true; - } - - return false; - } - - /** @module pathfora/display-conditions/manual-trigger/trigger-widget */ - - /** - * Trigger a single "manualTrigger" widget to be shown - * - * @exports triggerWidget - * @params {object} widget - * @returns {boolean} - */ - function triggerWidget (widget) { - return validateWatchers(widget, function () { - widgetTracker.triggeredWidgets[widget.id] = false; - - // remove from the ready widgets list - widgetTracker.readyWidgets.some(function (w, i) { - if (w.id === widget.id) { - widgetTracker.readyWidgets.splice(i, 1); - return true; - } - }); - }); - } - - /** @module pathfora/display-conditions/manual-trigger/trigger-widgets */ - - /** - * Public method to trigger a widget that has already been - * initialized and have the "manualTrigger" display condition - * - * @exports triggerWidgets - * @params {array} widgetIds - */ - function triggerWidgets (widgetIds) { - var i, valid; - - // no widget ids provided, trigger all ready widgets - if (typeof widgetIds === 'undefined') { - widgetTracker.triggeredWidgets['*'] = true; - - for (i = 0; i < widgetTracker.readyWidgets.length; i++) { - valid = triggerWidget(widgetTracker.readyWidgets[i]); - if (valid) { - i--; - } - } - - // trigger all widget ids provided - } else { - widgetIds.forEach(function (id) { - if (widgetTracker.triggeredWidgets[id] !== false) { - widgetTracker.triggeredWidgets[id] = true; - } - - for (i = 0; i < widgetTracker.readyWidgets.length; i++) { - valid = triggerWidget(widgetTracker.readyWidgets[i]); - if (valid) { - i--; - } - } - }); - } - } - - /** @module pathfora/data/segments/get-user-segments */ - - /** - * Get a list of Lytics segments for the user - * - * @exports getUserSegments - * @returns {array} segments - */ - function getUserSegments () { - if (window.lio && window.lio.data && window.lio.data.segments) { - // legacy - return window.lio.data.segments; - } else if (window.jstag && typeof window.jstag.getSegments === 'function') { - // > jstag 3.0.0 - return window.jstag.getSegments(); - } else { - // fallback - return ['all']; - } - } - - /** @module pathfora/validation/validate-widgets-object */ - - /** - * Validate that object provided to initializeWidgets - * is either an array of widgets or a targeting object - * targetting object containing widgets. - * - * @exports validateWidgetsObject - * @params {object} widgets - */ - function validateWidgetsObject (widgets) { - if (widgets.target) { - widgets.common = widgets.common || []; - - for (var i = 0; i < widgets.target.length; i++) { - if (!widgets.target[i].segment) { - throw new Error('All targeted widgets should have segment specified'); - } else if (widgets.target[i].segment === '*') { - widgets.common = widgets.common.concat(widgets.target[i].widgets); - widgets.target.splice(i, 1); - } - } - } - } - - /** @module pathfora/validation/validate-account-id */ - - /** - * Validate and set the Lytics account Id - * - * @exports validateAccountId - * @params {object} pf - */ - function validateAccountId (pf) { - var acctid; - - // in the legacy javascript tag < 2.0, there is an lio object surfaced that holds the account id. - // in > 3.0 this lio object is only available for backwards compatibility and not the main source - // of truth. we should be getting the cid that is passed to the config, which is an array, by default - // we can assume the first cid in the array is the one to be used for personalization and such. - if (typeof pf.acctid === 'undefined' || pf.acctid === '') { - if (window.lio && window.lio.account) { - // tag is legacy - acctid = window.lio.account.id; - } else if ( - // tag is current gen - window.jstag && - window.jstag.config && - window.jstag.config.cid && - window.jstag.config.cid.length > 0 - ) { - acctid = window.jstag.config.cid[0]; - } else { - throw new Error('Could not get account id from Lytics Javascript tag.'); - } - - // make sure we have a valid acctid before setting - if (!!acctid) { - pf.acctid = acctid; - } else { - throw new Error('Lytics Javascript tag returned an empty account id.'); - } - } - } - - /** @module pathfora/widgets/init-targeted-widgets */ - - /** - * Initialize widgets which are targeted by segments. - * - * @exports initializeWidgets - * @params {object} widgets - * @params {object} options - */ - function initializeTargetedWidgets (widgets, options) { - var pf = this, - i; - - validateWidgetsObject(widgets); - - if (widgets.common) { - pf.initializeWidgetArray(widgets.common, options); - } - - // NOTE Target sensitive widgets - if (widgets.target || widgets.exclude) { - pf.addCallback(function () { - validateAccountId(pf); - var targetedWidgets = [], - segments = getUserSegments(); - - // handle inclusions - if (widgets.target) { - for (i = 0; i < widgets.target.length; i++) { - var target = widgets.target[i]; - if (segments && segments.indexOf(target.segment) !== -1) { - // add the widgets with proper targeting to the master list - // ensure we dont overwrite existing widgets in target - targetedWidgets = targetedWidgets.concat(target.widgets); - } - } - } - - // handle exclusions - if (widgets.exclude) { - for (i = 0; i < widgets.exclude.length; i++) { - var exclude = widgets.exclude[i]; - if (segments && segments.indexOf(exclude.segment) !== -1) { - // we found a match, ensure the corresponding segment(s) are not in the - // targetted widgets array - for (var x = 0; x < targetedWidgets.length; x++) { - for (var y = 0; y < exclude.widgets.length; y++) { - if (targetedWidgets[x] === exclude.widgets[y]) { - targetedWidgets.splice(x, 1); - } - } - } - } - } - } - - if (targetedWidgets.length) { - pf.initializeWidgetArray(targetedWidgets, options); - } else if (widgets.inverse) { - pf.initializeWidgetArray(widgets.inverse, options); - } - }); - } - } - - /** @module pathfora/data/tracking/track-time-on-page */ - - /** - * Record the amount of time the user has spent - * on the current page - * - * @exports trackTimeOnPage - */ - function trackTimeOnPage () { - setInterval(function () { - pathforaDataObject.timeSpentOnPage += 1; - }, 1000); - } - - /** @module pathfora/validation/validate-options */ - - /** - * Validate and set the Lytics account Id - * - * @exports validateAccountId - * @params {object} pf - */ - function validateOptions (options) { - if (options) { - // validate priority - if (options.priority) { - switch (options.priority) { - case OPTIONS_PRIORITY_ORDERED: - break; - case OPTIONS_PRIORITY_UNORDERED: - break; - default: - throw new Error('Invalid priority defined in options.'); - } - } - } - } - - /** @module pathfora/widgets/init-widgets */ - - /** - * Public method used to initialize widgets once - * the individual configs have been created - * - * @exports initializeWidgets - * @params {object} widgets - * @params {object} config - * @params {object} options - */ - function initializeWidgets (widgets, config, options) { - var pf = this; - trackTimeOnPage(); - // support legacy initialize function where we passed account id as - // a second parameter and config as third - if (typeof config === 'string') { - if (options) { - config = options; - options = null; - } else { - config = null; - } - } - - if (!widgets) { - throw new Error('Initialize called with no widgets'); - } - - validateOptions(options); - - if (config) { - updateObject(defaultProps, config); - } - - if (Array.isArray(widgets)) { - pf.initializeWidgetArray(widgets, options); - } else { - pf.initializeTargetedWidgets(widgets, options); - } - } - - /** @module pathfora/widgets/has/has-recommend */ - - /** - * Check if the widget has recommendations. - * - * @exports hasRecommend - * @params {object} widget - * @returns {bool} hasRecommend - */ - function hasRecommend (widget) { - return widget.recommend && Object.keys(widget.recommend).length !== 0; - } - - /** @module pathfora/widgets/has/has-entity-templates */ - - /** - * Check if the widget has entity field templates - * - * @exports hasEntityTemplates - * @params {object} widget - * @returns {bool} hasEntityTemplates - */ - function hasEntityTemplates (widget) { - for (var j = 0; j < ENTITY_FIELDS.length; j++) { - var regex = new RegExp(ENTITY_FIELD_TEMPLATE_REGEX, 'g'), - fieldValue = getObjectValue(widget, ENTITY_FIELDS[j]); - - // convert functions to a string - if (typeof fieldValue === 'function') { - fieldValue = fieldValue.toString(); - } - - if (typeof fieldValue === 'string') { - if (regex.test(fieldValue)) { - return true; - } - } - } - - return false; - } - - /** @module pathfora/widgets/preload-lio */ - - /** - * Check if the widget needs lio to be loaded, if so - * wait for the callback, otherwise continue execution. - * - * @exports preloadLio - * @params {object} widget - * @params {object} pf - * @params {function} cb - */ - function preloadLio (widget, pf, cb) { - if (hasRecommend(widget) || hasEntityTemplates(widget)) { - pf.addCallback(function () { - validateAccountId(pf); - cb(); - }); - } else { - cb(); - } - } - - /** @module pathfora/data/request/get-data */ - - /** - * Make an http GET request - * - * @exports getData - * @params {string} url - * @params {function} onSuccess - * @params {function} onError - */ - function getData (url, onSuccess, onError) { - var xhr = new XMLHttpRequest(); - - xhr.onreadystatechange = function () { - if (xhr.readyState === 4 && xhr.status === 200) { - onSuccess(xhr.responseText); - } else if (xhr.readyState === 4) { - onError(xhr.responseText); - } - }; - - xhr.open('GET', url); - xhr.send(); - } - - /** @module pathfora/recommendations/recommend-content */ - - - /** - * Make the request to the Lytics content recommendation API - * and return a list of recommended documents - * - * @exports recommendContent - * @params {string} accountId - * @params {object} params - * @params {string} id - * @params {function} callback - */ - function recommendContent (accountId, params, id, callback) { - // Recommendation API: - // https://www.getlytics.com/developers/rest-api#content-recommendation - - // ensure that the callback arg is a function - if (typeof callback !== 'function') { - console.warn('Could not make recommendation - missing callback function.'); - return; - } - - // if we have the recommendation response cached in session storage - // use that instead of making a new API request - var storedRec = sessionStorage.getItem(PREFIX_REC + id); - - if (typeof storedRec === 'string' && params.visited !== false) { - var rec; - - try { - rec = JSON.parse(decodeSafe(storedRec)); - } catch (e) { - console.warn('Could not parse json stored response:' + e); - } - - if (rec && rec.data) { - // special case: shuffle param - if (params.shuffle === true) { - rec.data.shift(); - } - - if (rec.data.length > 0) { - sessionStorage.setItem(PREFIX_REC + id, encodeURIComponent(JSON.stringify(rec.data))); - callback(rec.data); - } - return; - } - } - - // becuase you can override the base cookiename as well as field name/value we need to account for those - var storedCookieName = 'seerid'; - var userByFieldName = '_uids'; - var userByFieldValue; - - // check for custom cookie name in jstag config - if (window.jstag && window.jstag.config && window.jstag.config.cookie !== '') { - storedCookieName = window.jstag.config.cookie; - } - - // attempt to get value from stored cookie - userByFieldValue = readCookie(storedCookieName); - - // override everything if key/value have been explicitly set for user - if ( - window.liosetup && - window.liosetup.field && - window.liosetup.field !== '' && - window.liosetup.value && - window.liosetup.value !== '' - ) { - userByFieldName = window.liosetup.field; - userByFieldValue = window.liosetup.value; - } - - // ensure we have required params - if (!userByFieldName && !userByFieldValue) { - console.warn('Could not determine BY field and value from config'); - callback([]); - } - - var recommendParts = [ - API_URL, - 'api', - 'content', - 'recommend', - accountId, - 'user', - userByFieldName, - userByFieldValue - ]; - - var ql = params.ql, - ast = params.ast, - display = params.display; - - delete params.ql; - delete params.ast; - delete params.display; - - var queries = constructQueries(params); - - params.display = display; - - if (!params.contentsegment) { - // Special case for Adhoc Segments - if (ql && ql.raw || ast) { - if (queries.length > 0) { - queries += '&'; - } else { - queries += '?'; - } - - // Filter QL - if (ql && ql.raw) { - queries += 'ql=' + ql.raw; - - // Segment JSON (usually segment AST) - } else { - var contentSegment = {table: 'content', ast: ast}; - queries += 'contentsegments=[' + encodeURIComponent(JSON.stringify(contentSegment)) + ']'; - } - } - } - - var recommendUrl = recommendParts.join('/') + queries; - - getData(recommendUrl, function (json) { - var resp; - - try { - resp = JSON.parse(json); - } catch (e) { - console.warn('Could not parse json response:' + e); - callback([]); - return; - } - - if (resp.data && resp.data.length > 0) { - // append a protocol for urls that are absolute - for (var i = 0; i < resp.data.length; i++) { - var url = resp.data[i].url; - if (url) { - var split = url.split('/')[0].split('.'); - if (split.length > 1) { - resp.data[i].url = 'http://' + url; - } - } - } - - // set the session storage. - sessionStorage.setItem(PREFIX_REC + id, encodeURIComponent(JSON.stringify(resp))); - - callback(resp.data); - } else { - callback([]); - } - }, function () { - callback([]); - }); - } - - /** @module pathfora/widgets/recommendation/set-widget-recommendation */ - - /** - * Make the call to get the recommendations then - * handle assigning it to the widget. - * - * @exports setWidgetContent - * @params {object} accountId - * @params {object} widget - * @params {function} cb - */ - - function setWidgetContent (accountId, widget, cb) { - var params = widget.recommend; - - if (params && params.collection) { - params.contentsegment = widget.recommend.collection; - delete params.collection; - } - - recommendContent(accountId, params, widget.id, function (resp) { - // if we get a response from the recommend api put it as the first - // element in the content object this replaces any default content - if (resp[0]) { - var content = resp[0]; - widget.content = [ - { - title: content.title, - description: content.description, - url: content.url, - image: content.primary_image, - date: content.created, - author: content.author - } - ]; - } - - // if we didn't get a valid response from the api, we check if a default - // exists and use that as our content piece instead - if (!widget.content) { - throw new Error('Could not get recommendation and no default defined'); - } - - cb(); - }); - } - - /** @module pathfora/validation/validate-recommendation-widget */ - - /** - * Validate that a recommendation widget - * is using the correct type and layout - * - * @exports validateRecommendationWidget - * @params {object} widget - */ - function validateRecommendationWidget (widget) { - // validate - if (widget.type !== 'message') { - throw new Error('Unsupported widget type for content recommendation'); - } - - if ( - widget.layout !== 'slideout' && - widget.layout !== 'modal' && - widget.layout !== 'inline' - ) { - throw new Error('Unsupported layout for content recommendation'); - } - - if (widget.content && widget.content[0] && !widget.content[0].default) { - throw new Error('Cannot define recommended content unless it is a default'); - } - } - - /** @module pathfora/widgets/recommendation/preload-recommendation */ - - /** - * Check if the widget needs recommendations to be loaded, if so - * wait for the callback, otherwise continue execution. - * - * @exports preloadRecommendation - * @params {object} widget - * @params {object} pf - * @params {function} cb - */ - function preloadRecommendation (widget, pf, cb) { - if (hasRecommend(widget)) { - validateRecommendationWidget(widget); - setWidgetContent(pf.acctid, widget, cb); - } else { - cb(); - } - } - - /** @module pathfora/widgets/initialize-widget-array */ - - /** - * Given an array of widgets, begin off the initialization - * process for each - * - * @exports initializeWidgetArray - * @params {array} array - */ - function initializeWidgetArray (array, options) { - var pf = this; - widgetTracker.prioritizedWidgets = []; - - var initWidget = function (widgetArray, index, initOptions) { - if (index >= widgetArray.length) { - return; - } - - var widget = widgetArray[index], - defaults = defaultProps[widget.type], - globals = defaultProps.generic; - - updateObject(widget, globals); - updateObject(widget, defaults); - updateObject(widget, widget.config); - - if (widgetTracker.initializedWidgets.indexOf(widget.id) < 0) { - widgetTracker.initializedWidgets.push(widget.id); - } else { - throw new Error('Cannot add two widgets with the same id'); - } - - // retain support for old "success" field - if (widget.success) { - if (!widget.formStates) { - widget.formStates = {}; - } - - if (!widget.formStates.success) { - widget.formStates.success = widget.success; - } - } - - preloadLio(widget, pf, function () { - preloadRecommendation(widget, pf, function () { - pf.initializeWidget(widget, initOptions); - if (initOptions && initOptions.priority === OPTIONS_PRIORITY_ORDERED) { - if ( - widgetTracker.prioritizedWidgets.length && - widgetTracker.prioritizedWidgets[0].id === widget.id - ) { - return; - } - - initWidget(widgetArray, index + 1, initOptions); - } - }); - }); - - if (!initOptions || initOptions.priority !== OPTIONS_PRIORITY_ORDERED) { - initWidget(widgetArray, index + 1, initOptions); - } - }; - - initWidget(array, 0, options); - } - - /** @module pathfora/display-conditions/replace-entity-field */ - - /** - * Fill in the data for a entity field template in - * a widgets text field - * - * @exports replaceEntityField - * @params {object} widget - * @params {string} fieldName - * @params {array} found - * @returns {boolean} - */ - function replaceEntityField ( - widget, - fieldName, - found, - customData - ) { - if (!found || !found.length) { - return true; - } - - var fnParams, - fn, - currentVal = getObjectValue(widget, fieldName), - isFn = false; - - // special case if the field is a function, convert it to a string first - if (typeof currentVal === 'function') { - fn = currentVal.toString(); - currentVal = fn.substring(fn.indexOf('{') + 1, fn.lastIndexOf('}')); // body of the function - fnParams = fn.match(/(function.+\()(.+(?=\)))(.+$)/); // get the function param names - isFn = true; - } - - // for each template found... - for (var f = 0; f < found.length; f++) { - // parse the field name - var foundval = found[f].slice(2).slice(0, -2), - parts = foundval.split('|'), - def = ''; - - // get the default (fallback) value - if (parts.length > 1) { - def = parts[1].trim(); - } - - // check for subfields if the value is an object - var split = parts[0].trim().split('.'); - - // get entity data from tag - var dataval; - - // for the legacy tag < 3.0, there is a lio object surfaced. within this object lives the personalization - // data. however, in current gen tag > 3.0 we have a getEntity() method that should be used as the source - // of truth, the returned data model is slightly different in that it supports the full personalization - // api vs the legacy entity api that only returns segment and user field info. - if (window.lio && window.lio.data) { - dataval = window.lio.data; - // tag is legacy - } else if (window.jstag && typeof window.jstag.getEntity === 'function') { - // tag is current gen - var entity = window.jstag.getEntity(); - if (entity && entity.data && entity.data.user) { - dataval = entity.data.user; - } - } - - var s; - for (s = 0; s < split.length; s++) { - if (typeof dataval !== 'undefined') { - dataval = dataval[split[s]]; - } - } - - // if we couldn't find the data in question on the lytics jstag, check customData provided - if (typeof dataval === 'undefined') { - dataval = customData; - - for (s = 0; s < split.length; s++) { - if (typeof dataval !== 'undefined') { - dataval = dataval[split[s]]; - } - } - } - - var val; - - // replace the template with the lytics data value - if (typeof dataval !== 'undefined') { - val = currentVal.replace(found[f], dataval); - // if there's no default and we should error - } else if ( - (!def || def.length === 0) && - widget.displayConditions.showOnMissingFields !== true - ) { - return false; - // replace with the default option, or empty string if not found - } else { - val = currentVal.replace(found[f], def); - } - - setObjectValue(widget, fieldName, val); - currentVal = val; - } - - // if the value is a function, convert it back from a string - if (isFn) { - if (fnParams) { - fn = new Function(fnParams.join(','), getObjectValue(widget, fieldName)); - } else { - fn = new Function(getObjectValue(widget, fieldName)); - } - - setObjectValue(widget, fieldName, fn); - } - - return true; - } - - /** @module pathfora/display-conditions/entity-fields/entity-field-checker */ - - /** - * Evaluate all fields on the list provided and check - * if there are any entity templates that need to be - * replaced. - * - * @exports entityFieldChecker - * @params {array} fields - * @params {object} widget - * @params {function} cb - */ - function entityFieldChecker (widget, customData) { - var found, - valid = true; - - for (var i = 0; i < ENTITY_FIELDS.length; i++) { - var regex = new RegExp(ENTITY_FIELD_TEMPLATE_REGEX, 'g'), - fieldValue = getObjectValue(widget, ENTITY_FIELDS[i]); - - // convert functions to a string - if (typeof fieldValue === 'function') { - fieldValue = fieldValue.toString(); - } - - if (typeof fieldValue === 'string') { - found = fieldValue.match(regex); - - if (found && found.length > 0) { - valid = - valid && - replaceEntityField(widget, ENTITY_FIELDS[i], found, customData); - } - } - } - - return valid; - } - - /** @module pathfora/display-conditions/date-checker */ - - /** - * Check if the current date fits within the - * date displayConditions for the widget - * - * @exports dateChecker - * @params {object} date - * @returns {boolean} - */ - function dateChecker (date) { - var valid = true, - today = Date.now(); - - if (date.start_at && today < new Date(date.start_at).getTime()) { - valid = false; - } - - if (date.end_at && today > new Date(date.end_at).getTime()) { - valid = false; - } - - return valid; - } - - /** @module pathfora/display-conditions/pageviews/page-visits-checker */ - - /** - * Check if the pagevisit count meets the requirements - * - * @exports pageVisitsChecker - * @returns {boolean} - */ - function pageVisitsChecker (pageVisitsRequired) { - return (read(PF_PAGEVIEWS) >= pageVisitsRequired); - } - - /** @module pathfora/display-conditions/hide-after-action-checker */ - - /** - * Check if a widget should be hidden because it meets - * a hideAfterAction display condition - * - * @exports hideAfterActionChecker - * @params {object} hideAfterActionConstraints - * @params {string} widget - * @returns {boolean} - */ - function hideAfterActionChecker (hideAfterActionConstraints, widget) { - var parts, - valid = true, - now = Date.now(), - confirm = read(PREFIX_CONFIRM + widget.id), - cancel = read(PREFIX_CANCEL + widget.id), - closed = read(PREFIX_CLOSE + widget.id); - - if (hideAfterActionConstraints.confirm && confirm) { - parts = confirm.split('|'); - - if (parseInt(parts[0], 10) >= hideAfterActionConstraints.confirm.hideCount) { - valid = false; - } - - if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.confirm.duration) { - valid = false; - } - } - - if (hideAfterActionConstraints.cancel && cancel) { - parts = cancel.split('|'); - - if (parseInt(parts[0], 10) >= hideAfterActionConstraints.cancel.hideCount) { - valid = false; - } - - if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.cancel.duration) { - valid = false; - } - } - - if (hideAfterActionConstraints.closed && closed) { - parts = closed.split('|'); - - if (parseInt(parts[0], 10) >= hideAfterActionConstraints.closed.hideCount) { - valid = false; - } - - if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.closed.duration) { - valid = false; - } - } - - return valid; - } - - /** @module pathfora/display-conditions/url-contains/parse-query */ - - /** - * Convert key/value queries from a URL into an object - * - * @exports parseQuery - * @params {string} url - * @returns {object} query - */ - function parseQuery (url) { - var query = {}, - pieces = escapeURI(url, { keepEscaped: true }).split('?'); - - if (pieces.length > 1) { - pieces = pieces[1].split('&'); - - for (var i = 0; i < pieces.length; i++) { - var pair = pieces[i].split('='); - - if (pair.length > 1) { - // NOTE We should not account for the preview id - if (pair[0] !== 'lytics_variation_preview_id') { - query[pair[0]] = pair[1]; - } - } - } - } - - return query; - } - - /** @module pathfora/display-conditions/url-contains/compare-queries */ - - /** - * Check if urls contain matching query params - * - * @exports compareQueries - * @params {object} query - * @params {object} matchQuery - * @params {string} rule - * @returns {boolean} - */ - function compareQueries (query, matchQuery, rule) { - switch (rule) { - case 'exact': - if (Object.keys(matchQuery).length !== Object.keys(query).length) { - return false; - } - break; - } - - for (var key in matchQuery) { - if (matchQuery.hasOwnProperty(key) && matchQuery[key] !== query[key]) { - return false; - } - } - - return true; - } - - /** @module pathfora/display-conditions/url-contains/phrase-checker */ - - /** - * Evaluate if the current URL matches a single urlContains - * rule provided - * - * @exports phraseChecker - * @params {object} phrase - * @params {string} url - * @params {string} simpleurl - * @params {object} queries - * @returns {boolean} - */ - function phraseChecker (phrase, url, simpleurl, queries) { - var valid = false; - - // legacy match allows for an array of strings, check if we are legacy or current object approach - switch (typeof phrase) { - case 'string': - if (url.indexOf(escapeURI(phrase.split('?')[0], { keepEscaped: true })) !== -1) { - valid = compareQueries(queries, parseQuery(phrase), 'substring'); - } - break; - - case 'object': - if (phrase.match && phrase.value) { - var phraseValue = escapeURI(phrase.value, { keepEscaped: true }); - - switch (phrase.match) { - // simple match - case 'simple': - if (simpleurl.slice(-1) === '/') { - simpleurl = simpleurl.slice(0, -1); - } - - if (phrase.value.slice(-1) === '/') { - phrase.value = phrase.value.slice(0, -1); - } - - if (simpleurl === phrase.value) { - valid = true; - } - break; - - // exact match - case 'exact': - if (url.split('?')[0].replace(/\/$/, '') === phraseValue.split('?')[0].replace(/\/$/, '')) { - valid = compareQueries(queries, parseQuery(phraseValue), phrase.match); - } - break; - - // regex - case 'regex': - var re = new RegExp(phrase.value); - - if (re.test(url)) { - valid = true; - } - break; - - // string match (default) - default: - if (url.indexOf(phraseValue.split('?')[0]) !== -1) { - valid = compareQueries(queries, parseQuery(phraseValue), phrase.match); - } - break; - } - - } else { - console.log('invalid display conditions'); - } - break; - - default: - console.log('invalid display conditions'); - break; - } - - return valid; - } - - /** @module pathfora/display-conditions/url-contains/url-checker */ - - /** - * Evaluate if the current URL matches the rules defined - * by the urlContains display condition - * - * @exports urlChecker - * @params {array} phrases - * @returns {boolean} - */ - function urlChecker (phrases) { - var url = escapeURI(window.location.href, { keepEscaped: true }), - simpleurl = window.location.hostname + window.location.pathname, - queries = parseQuery(url), - valid = false, - excludeValid = false, - matchCt = 0, - excludeCt = 0; - - if (!(phrases instanceof Array)) { - phrases = Object.keys(phrases).map(function (key) { - return phrases[key]; - }); - } - - // array of urlContains params is an "OR" list, so if any are true evaluate valid to true - if (phrases.indexOf('*') === -1) { - phrases.forEach(function (phrase) { - if (phrase.exclude) { - excludeValid = phraseChecker(phrase, url, simpleurl, queries) || excludeValid; - excludeCt++; - } else { - valid = phraseChecker(phrase, url, simpleurl, queries) || valid; - matchCt++; - } - }); - } else { - valid = true; - } - - if (matchCt === 0) { - return !excludeValid; - } - - if (excludeCt === 0) { - return valid; - } - - return valid && !excludeValid; - } - - /** @module pathfora/display-conditions/meta-checker */ - - /** - * Check if the current page contains the meta - * tag and value provided - * - * @exports metaChecker - * @params {array} phrases - * @returns {boolean} - */ - function metaChecker (phrases) { - var meta = document$1.querySelectorAll('meta'); - - for (var j = 0; j < phrases.length; j++) { - var rule = phrases[j], - phraseValid = false; - - for (var i = 0; i < meta.length; i++) { - for (var key in rule) { - if (rule.hasOwnProperty(key)) { - var val = meta[i].getAttribute(key); - - if (!val || val !== rule[key]) { - phraseValid = false; - break; - } else { - phraseValid = true; - } - } - } - - if (phraseValid) { - break; - } - } - - if (phraseValid) { - return true; - } - } - - return false; - } - - /** @module pathfora/display-conditions/exit-intent/register-exit-intent-watcher */ - - /** - * Setup watcher for showOnExitIntent - * display condition - * - * @exports registerExitIntentWatcher - * @params {string} selector - * @params {object} widget - * @returns {object} watcher - */ - function registerExitIntentWatcher () { - var watcher = { - positions: [], - check: function (e) { - if (e != null) { - var from = e.relatedTarget || e.toElement; - - // When there is registered movement and leaving the root element - if (watcher.positions.length > 1 && (!from || from.nodeName === 'HTML')) { - - var y = watcher.positions[watcher.positions.length - 1].y; - var py = watcher.positions[watcher.positions.length - 2].y; - var ySpeed = Math.abs(y - py); - - watcher.positions = []; - - // Did the cursor move up? - // Is it reasonable to believe that it left the top of the page, given the position and the speed? - if (y - ySpeed <= 50 && y < py) { - return true; - } - } - } - return false; - } - }; - - return watcher; - } - - var handlers = []; - - var eventHub = { - add: function (target, type, listener) { - target.addEventListener(type, listener); - handlers.push({ - target: target, - type: type, - listener: listener - }); - }, - remove: function (target, type, listener) { - target.removeEventListener(type, listener); - }, - removeAll: function () { - var hub = this; - handlers.forEach(function (h) { - hub.remove(h.target, h.type, h.listener); - }); - handlers.length = 0; - } - }; - - /** @module pathfora/display-conditions/init-exit-intent */ - - /** - * Setup exitIntent for a widget - * - * @exports initExitIntent - * @params {object} widget - * @returns {boolean} - */ - function initializeExitIntent (widget, watcher) { - if (!widget.exitIntentListener) { - widget.exitIntentListener = function (e) { - watcher.positions.push({ - x: e.clientX, - y: e.clientY - }); - if (watcher.positions.length > 30) { - watcher.positions.shift(); - } - }; - - widget.exitIntentTrigger = function (e) { - validateWatchers(widget, function () { - if (typeof document$1.removeEventListener === 'function') { - eventHub.remove(document$1, 'mousemove', widget.exitIntentListener); - eventHub.remove(document$1, 'mouseout', widget.exitIntentTrigger); - } else { - document$1.onmousemove = null; - document$1.onmouseout = null; - } - }, e); - }; - - // FUTURE Discuss https://www.npmjs.com/package/ie8 polyfill - if (typeof document$1.addEventListener === 'function') { - eventHub.add(document$1, 'mousemove', widget.exitIntentListener); - eventHub.add(document$1, 'mouseout', widget.exitIntentTrigger); - } else { - document$1.onmousemove = widget.exitIntentListener; - document$1.onmouseout = widget.exitIntentTrigger; - } - } - return true; - - } - - /** @module pathfora/display-conditions/scroll/register-element-watcher */ - - /** - * Setup watcher for displayWhenElementVisible - * display condition - * - * @exports registerElementWatcher - * @params {string} selector - * @params {object} widget - * @returns {object} watcher - */ - function registerElementWatcher (selector) { - var watcher = { - elem: document$1.querySelector(selector), - - check: function () { - var scrollTop = document$1.body.scrollTop || document$1.documentElement.scrollTop, - scrolledToBottom = window.innerHeight + scrollTop >= document$1.body.offsetHeight; - - if (watcher.elem.offsetTop - window.innerHeight / 2 <= scrollTop || scrolledToBottom) { - return true; - } - return false; - } - }; - - return watcher; - } - - /** @module pathfora/display-conditions/scroll/init-scroll-watchers */ - - /** - * Add event listener for scroll display conditions - * - * @exports initializeScrollWatchers - * @params {object} widget - * @returns {boolean} - */ - function initializeScrollWatchers (widget) { - widget.scrollListener = function () { - validateWatchers(widget, function () { - if (typeof window.addEventListener === 'function') { - eventHub.remove(window, 'scroll', widget.scrollListener); - } else { - window.onscroll = null; - } - }); - }; - - // FUTURE Discuss https://www.npmjs.com/package/ie8 polyfill - if (typeof window.addEventListener === 'function') { - eventHub.add(window, 'scroll', widget.scrollListener); - } else { - window.onscroll = widget.scrollListener; - } - return true; - } - - /** - * Based on https://github.com/cgygd/scrolling-element - */ - - var element = null; - - /* istanbul ignore next */ - function getScrollingElement () { - if (element) { - return element; - } - if (document.body.scrollTop) { - // speed up if scrollTop > 0 - return (element = document.body); - } - var iframe = document.createElement('iframe'); - iframe.style.height = '1px'; - document.documentElement.appendChild(iframe); - var doc = iframe.contentWindow.document; - doc.write('
x
'); - doc.close(); - var isCompliant = doc.documentElement.scrollHeight > doc.body.scrollHeight; - iframe.parentNode.removeChild(iframe); - return (element = isCompliant ? document.documentElement : document.body); - } - - /** @module pathfora/display-conditions/scroll/register-position-watcher */ - - /** - * Setup watcher for scrollPercentageToDisplay - * display condition - * - * @exports registerPositionWatcher - * @params {int} percent - * @params {object} widget - * @returns {object} watcher - */ - function registerPositionWatcher (percent) { - var watcher = { - check: function () { - /* istanbul ignore next */ - var scrollingElement = document$1.scrollingElement || getScrollingElement(), - scrollTop = scrollingElement.scrollTop, - scrollHeight = scrollingElement.scrollHeight, - clientHeight = scrollingElement.clientHeight, - percentageScrolled = (scrollTop / (scrollHeight - clientHeight)) * 100; - - // if NaN, will always return `false` - return percentageScrolled >= percent; - } - }; - - return watcher; - } - - /** @module pathfora/display-conditions/manual-trigger/register-manual-trigger-watcher */ - - /** - * Begin watching for a custom javascript trigger - * - * @exports registerManualTriggerWatcher - * @params {object} widget - * @params {boolean} value - * @returns {object} watcher - */ - function registerManualTriggerWatcher (value, widget) { - var watcher = { - check: function () { - if (value && widgetTracker.triggeredWidgets[widget.id] || widgetTracker.triggeredWidgets['*']) { - return true; - } - return false; - } - }; - - return watcher; - } - - /** @module pathfora/widgets/init-widget */ - - /** - * Determine if a widget should be shown based on display - * conditions, and if so show the widget - * - * @exports initializeWidget - * @params {object} widget - * @returns {bool} shown - */ - function initializeWidget (widget, options) { - var watcher, - condition = widget.displayConditions, - pf = this; - - widget.watchers = []; - widget.listeners = []; - - // NOTE Default cookie expiration is one year from now - widget.expiration = new Date(); - widget.expiration.setDate(widget.expiration.getDate() + 365); - - if ( - (widget.type === 'sitegate' && - read(PREFIX_UNLOCK + widget.id) === 'true') || - widget.hiddenViaABTests === true - ) { - return; - } - - if (widget.pushDown) { - if ( - widget.layout === 'bar' && - (widget.position === 'top-fixed' || widget.position === 'top-absolute') - ) { - addClass(document$1.querySelector(widget.pushDown), 'pf-push-down'); - } else { - throw new Error( - 'Only top positioned bar widgets may have a pushDown property' - ); - } - } - - // entity fields - widget.valid = widget.valid && entityFieldChecker(widget, pf.customData); - - // display conditions based on page load - if (condition.date) { - widget.valid = widget.valid && dateChecker(condition.date); - } - - if (condition.pageVisits) { - widget.valid = widget.valid && pageVisitsChecker(condition.pageVisits); - } - - if (condition.hideAfterAction) { - widget.valid = - widget.valid && hideAfterActionChecker(condition.hideAfterAction, widget); - } - - if (condition.urlContains) { - widget.valid = widget.valid && urlChecker(condition.urlContains); - } - - if (condition.metaContains) { - widget.valid = widget.valid && metaChecker(condition.metaContains); - } - - widget.valid = widget.valid && condition.showOnInit; - - if (condition.impressions) { - widget.valid = - widget.valid && impressionsChecker(condition.impressions, widget); - } - - // if it's valid at this point, add it to the priority list - if ( - widget.valid && - options && - options.priority === OPTIONS_PRIORITY_ORDERED - ) { - widgetTracker.prioritizedWidgets.push(widget); - } - - // display conditions based on page interaction - if (condition.showOnExitIntent) { - watcher = registerExitIntentWatcher(); - widget.watchers.push(watcher); - initializeExitIntent(widget, watcher); - } - - if (condition.displayWhenElementVisible) { - watcher = registerElementWatcher( - condition.displayWhenElementVisible - ); - widget.watchers.push(watcher); - initializeScrollWatchers(widget); - } - - if (condition.scrollPercentageToDisplay) { - watcher = registerPositionWatcher( - condition.scrollPercentageToDisplay - ); - widget.watchers.push(watcher); - initializeScrollWatchers(widget); - } - - if (condition.manualTrigger) { - watcher = registerManualTriggerWatcher(condition.manualTrigger, widget); - widget.watchers.push(watcher); - widgetTracker.readyWidgets.push(widget); - - // if we've already triggered the widget - // before initializing lets initialize right away - triggerWidget(widget); - } - - if (widget.watchers.length === 0 && !condition.showOnExitIntent) { - if (widget.valid) { - showWidget(widget); - } - } - } - - /** @module pathfora/widgets/preview-widget */ - - /** - * Create a minimal widget for a preview - * - * @exports previewWidget - * @params {object} widget - * @returns {object} - */ - function previewWidget (widget) { - widget.id = generateUniqueId(); - return createWidgetHtml(widget); - } - - /** @module pathfora/display-conditions/cancel-delayed-widget */ - - /** - * Cancel waiting for a delayed widget - * - * @exports cancelDelayedWidget - * @params {string} widgetKey id of the widget - */ - function cancelDelayedWidget (widgetKey) { - var delayObj = widgetTracker.delayedWidgets[widgetKey]; - - if (delayObj) { - clearTimeout(delayObj); - delete widgetTracker.delayedWidgets[widgetKey]; - } - } - - /** @module pathfora/widgets/clear-all */ - - /** - * Close all widgets and reset all settings to default - * - * @exports clearAll - */ - function clearAll () { - var opened = widgetTracker.openedWidgets, - delayed = widgetTracker.delayedWidgets; - - opened.forEach(function (widget) { - var element = document$1.getElementById(widget.id); - removeClass(element, 'opened'); - element.parentNode.removeChild(element); - - for (var key in widget.listeners) { - if (widget.listeners.hasOwnProperty(key)) { - var val = widget.listeners[key]; - val.target.removeEventListener(val.type, val.fn); - } - } - }); - - for (var key in delayed) { - if (delayed.hasOwnProperty(key)) { - cancelDelayedWidget(key); - } - } - - eventHub.removeAll(); - - resetWidgetTracker(widgetTracker); - resetDataObject(pathforaDataObject); - resetDefaultProps(defaultProps); - this.callbacks = []; - this.acctid = ''; - } - - /** @module pathfora/widgets/prepare-widget */ - - /** - * Validate that a widget is correctly set up - * - * @exports prepareWidget - * @params {string} type - * @params {object} config - * @returns {object} - */ - function prepareWidget (type, config) { - var widget = { - valid: true, - type: type - }; - - if (!config) { - throw new Error('Config object is missing'); - } - - widget.config = config; - - if (!config.id) { - throw new Error('All widgets must have an id value'); - } - - widget.id = config.id; - - return widget; - } - - /** @module pathfora/widgets/message */ - - /** - * Public method to create a widget of type message - * - * @exports Message - * @params {object} config - * @returns {object} - */ - function Message (config) { - return prepareWidget('message', config); - } - - /** @module pathfora/widgets/subscription */ - - /** - * Public method to create a widget of type subscription - * - * @exports Subscription - * @params {object} config - * @returns {object} - */ - function Subscription (config) { - return prepareWidget('subscription', config); - } - - /** @module pathfora/widgets/form */ - - /** - * Public method to create a widget of type form - * - * @exports Form - * @params {object} config - * @returns {object} - */ - function Form (config) { - return prepareWidget('form', config); - } - - /** @module pathfora/widgets/site-gate */ - - /** - * Public method to create a widget of type site gate - * - * @exports SiteGate - * @params {object} config - * @returns {object} - */ - function SiteGate (config) { - return prepareWidget('sitegate', config); - } - - /** @module pathfora/ab-test/init-ab-test */ - - /** - * Initialized A/B test from user config - * - * @exports initializeABTesting - * @params {object} abTests - */ - function initializeABTesting (abTests) { - abTests.forEach(function (abTest) { - var abTestingType = abTest.type, - userAbTestingValue = read(abTest.cookieId), - userAbTestingGroup = 0, - date = new Date(); - - if (!userAbTestingValue) { - userAbTestingValue = Math.random(); - } - - // NOTE Always update the cookie to get the new exp date. - date.setDate(date.getDate() + 365); - write(abTest.cookieId, userAbTestingValue, date); - - // NOTE Determine visible group for the user - var i = 0; - while (i < 1) { - i += abTestingType.groups[userAbTestingGroup]; - - if (userAbTestingValue <= i) { - break; - } - - userAbTestingGroup++; - } - - // NOTE Notify widgets about their proper AB groups - abTest.groups.forEach(function (group, index) { - group.forEach(function (widget) { - if (typeof widget.abTestingGroup === 'undefined') { - widget.abTestingGroup = index; - widget.hiddenViaABTests = userAbTestingGroup === index; - } else { - throw new Error('Widget #' + widget.config.id + ' is defined in more than one AB test.'); - } - }); - }); - - if (typeof pathforaDataObject.abTestingGroups[abTest.id] !== 'undefined') { - throw new Error('AB test with ID=' + abTest.id + ' has been already defined.'); - } - - pathforaDataObject.abTestingGroups[abTest.id] = userAbTestingGroup; - }); - } - - /** @module pathfora/ab-test/prepare-ab-test */ - - /** - * Prepares A/B test user config for use - * - * @exports initializeABTesting - * @params {object} abTests - */ - function prepareABTest (config) { - var test = {}; - - if (!config) { - throw new Error('Config object is missing'); - } - - test.id = config.id; - test.cookieId = PREFIX_AB_TEST + config.id; - test.groups = config.groups; - - if (!abTestingTypes[config.type]) { - throw new Error('Unknown AB testing type: ' + config.type); - } - - test.type = abTestingTypes[config.type]; - - return test; - } - - /** @module pathfora/ab-test/ab-test */ - - /** - * Public wrapper method for prepareABTest - * - * @exports ABTest - * @param {object} config - * @returns {object} - */ - function ABTest (config) { - return prepareABTest(config); - } - - /** @module pathfora/inline/prep-elements */ - - /** - * Build a list of all elements to be personalized - * - * @exports prepElements - * @params {string} attr - * @returns {object} dataElements - */ - function prepElements (attr) { - var dataElements = {}, - elements = document$1.querySelectorAll('[' + attr + ']'); - - this.elements = this.elements.concat(elements); - - for (var i = 0; i < elements.length; i++) { - if (elements[i].getAttribute(attr) !== null) { - var theElement = elements[i]; - - switch (attr) { - // CASE: Segment triggered elements - case 'data-pftrigger': - var group = theElement.getAttribute('data-pfgroup'); - - if (!group) { - group = 'default'; - } - - if (!dataElements[group]) { - dataElements[group] = []; - } - - dataElements[group].push({ - elem: theElement, - displayType: theElement.style.display, - group: group, - trigger: theElement.getAttribute('data-pftrigger') - }); - break; - - // CASE: Content recommendation elements - case 'data-pfrecommend': - var recommend = theElement.getAttribute('data-pfrecommend'), - block = theElement.getAttribute('data-pfblock'), - shuffle = false; - - if (!block) { - block = 'default'; - } - - if (!recommend) { - recommend = 'default'; - } - - if (!dataElements[recommend]) { - dataElements[recommend] = { - blocks: [] - }; - } - - if (theElement.hasAttribute('data-pfshuffle')) { - shuffle = theElement.getAttribute('data-pfshuffle') === 'true'; - } - - if (!dataElements[recommend].shuffle) { - dataElements[recommend].shuffle = shuffle; - } - - dataElements[recommend].blocks.push({ - elem: theElement, - displayType: theElement.style.display, - block: block, - recommend: recommend, - shuffle: shuffle, - title: theElement.querySelector('[data-pftype="title"]'), - image: theElement.querySelector('[data-pftype="image"]'), - description: theElement.querySelector('[data-pftype="description"]'), - url: theElement.querySelector('[data-pftype="url"]'), - published: theElement.querySelector('[data-pftype="published"]'), - author: theElement.querySelector('[data-pftype="author"]') - }); - break; - } - } - } - return dataElements; - } - - /** @module pathfora/inline/proc-elements */ - - /** - * Kick off the personalization process for inline trigger fields - * and inline content recommendations - * - * @exports procElements - */ - function procElements () { - var attrs = ['data-pftrigger', 'data-pfrecommend'], - inline = this, - count = 0; - - var cb = function (elements) { - count++; - // After we have processed all elements, proc defaults - if (count === Object.keys(elements).length) { - inline.setDefaultRecommend(elements); - } - }; - - attrs.forEach(function (attr) { - var elements = inline.prepElements(attr); - - for (var key in elements) { - if (elements.hasOwnProperty(key)) { - - switch (attr) { - // CASE: Segment triggered elements - case 'data-pftrigger': - inline.procTriggerElements(elements[key], key); - break; - - // CASE: Content recommendation elements - case 'data-pfrecommend': - if (typeof inline.parent.acctid !== 'undefined' && inline.parent.acctid === '') { - throw new Error('Could not get account id from Lytics Javascript tag.'); - } - - inline.procRecommendElements(elements[key], key, elements[key].shuffle, function () { - cb(elements); - }); - break; - } - } - } - }); - } - - /** @module pathfora/inline/proc-recommend-elements */ - - /** - * Make recommendation and fill in the appropriate inline - * recommendation elements - * - * @exports procRecommendElements - * @params {object} blocks - * @params {string} rec - * @params {function} cb - */ - function procRecommendElements (val, rec, shuffle, cb) { - var inline = this; - - if (rec !== 'default') { - // call the recommendation API using the url pattern urlPattern as a filter - var params = { - contentsegment: rec - }; - - if (shuffle) { - params.shuffle = shuffle; - } - - recommendContent(inline.parent.acctid, params, rec, function (resp) { - val.blocks.forEach(function (elems, idx) { - - // loop through the results as we loop - // through each element with a common liorecommend value - if (resp[idx]) { - var content = resp[idx]; - - if (elems.title) { - elems.title.innerHTML = content.title; - } - - // if attribute is on image element - if (elems.image) { - if (typeof elems.image.src !== 'undefined') { - elems.image.src = content.primary_image; - // if attribute is on container element, set the background - } else { - elems.image.style.backgroundImage = 'url("' + content.primary_image + '")'; - } - } - - // set the description - if (elems.description) { - elems.description.innerHTML = content.description; - } - - // if attribute is on an a (link) element - if (elems.url) { - if (typeof elems.url.href !== 'undefined') { - elems.url.href = content.url; - // if attribute is on container element - } else { - elems.url.innerHTML = content.url; - } - } - - // set the date published - if (elems.published && content.created) { - var published = new Date(content.created); - elems.published.innerHTML = published.toLocaleDateString(inline.parent.locale, inline.parent.dateOptions); - } - - // set the author - if (elems.author) { - elems.author.innerHTML = content.author; - } - - elems.elem.removeAttribute('data-pfrecommend'); - elems.elem.setAttribute('data-pfmodified', 'true'); - inline.preppedElements[elems.block] = elems; - } else { - return; - } - }); - cb(); - }); - } else { - val.blocks.forEach(function (block) { - inline.defaultElements[block.block] = block; - }); - cb(); - } - } - - /** @module pathfora/data/segments/in-segment */ - - /** - * Check if the user is a member of a segment - * - * @exports inSegment - * @params {string} match - * @returns {boolean} membership - */ - function inSegment (match) { - return (getUserSegments().indexOf(match) !== -1); - } - - /** @module pathfora/inline/proc-trigger-elements */ - - /** - * Show/hide trigger elements in a group based on - * Lytics segment membership - * - * @exports procTriggerElements - * @params {object} elems - * @params {string} group - */ - function procTriggerElements (elems, group) { - var matched = false, - defaultEl = {}; - - for (var i = 0; i < elems.length; i++) { - var elem = elems[i]; - - // if we find a match show that and prevent others from showing in same group - if (inSegment(elem.trigger) && !matched) { - elem.elem.removeAttribute('data-pftrigger'); - elem.elem.setAttribute('data-pfmodified', 'true'); - this.preppedElements[group] = elem; - - if (group !== 'default') { - matched = true; - continue; - } - } - - // if this is the default save it - if (elem.trigger === 'default') { - defaultEl = elem; - } - } - - // if nothing matched show default - if (!matched && group !== 'default' && defaultEl.elem) { - defaultEl.elem.removeAttribute('data-pftrigger'); - defaultEl.elem.setAttribute('data-pfmodified', 'true'); - this.preppedElements[group] = defaultEl; - } - } - - /** @module pathfora/inline/set-default-recommend */ - - /** - * Show the default "recommendation" if we received - * a bad response from the API - * - * @exports setDefaultRecommend - */ - function setDefaultRecommend () { - // check the default elements - for (var block in this.defaultElements) { - // If we already have an element prepped for this block, don't show the default - if (this.defaultElements.hasOwnProperty(block) && !this.preppedElements.hasOwnProperty(block)) { - var def = this.defaultElements[block]; - def.elem.removeAttribute('data-pfrecommend'); - def.elem.setAttribute('data-pfmodified', 'true'); - this.preppedElements[block] = def; - } - } - } - - /** @module pathfora/inline/inline */ - - - /** - * Creates a new instance of inline personalization - * - * @exports Inline - * @class {function} Inline - * @params {object} pf - */ - function Inline (pf) { - this.elements = []; - this.preppedElements = []; - this.defaultElements = []; - this.parent = pf; - - this.prepElements = prepElements; - this.procElements = procElements; - this.procRecommendElements = procRecommendElements; - this.procTriggerElements = procTriggerElements; - this.setDefaultRecommend = setDefaultRecommend; - - // for our automatic element handling we need to ensure they are all hidden by default - var css = '[data-pftrigger], [data-pfrecommend]{ display: none; }', - style = document$1.createElement('style'); - - style.type = 'text/css'; - - if (style.styleSheet) { // handle ie - style.styleSheet.cssText = css; - } else { - style.appendChild(document$1.createTextNode(css)); - } - - document$1.getElementsByTagName('head')[0].appendChild(style); - } - - /** @module pathfora/inline/init-inline */ - - /** - * Once the dom is ready and Lytics jstag is - * loaded initialize inline personalization - * - * @exports initializeInline - */ - function initializeInline () { - var pf = this; - - this.onDOMready(function () { - pf.addCallback(function () { - validateAccountId(pf); - pf.inline.procElements(); - }); - }); - } + var cov_h86i05o0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js',hash='e17bfcf474537e9afaaf65b043e905dc76efd98c',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js',statementMap:{'0':{start:{line:29,column:15},end:{line:29,column:42}},'1':{start:{line:30,column:16},end:{line:30,column:44}},'2':{start:{line:32,column:2},end:{line:43,column:5}},'3':{start:{line:33,column:18},end:{line:33,column:52}},'4':{start:{line:34,column:4},end:{line:34,column:35}},'5':{start:{line:35,column:4},end:{line:35,column:44}},'6':{start:{line:37,column:4},end:{line:42,column:5}},'7':{start:{line:38,column:6},end:{line:41,column:7}},'8':{start:{line:39,column:18},end:{line:39,column:39}},'9':{start:{line:40,column:8},end:{line:40,column:57}},'10':{start:{line:45,column:2},end:{line:49,column:3}},'11':{start:{line:46,column:4},end:{line:48,column:5}},'12':{start:{line:47,column:6},end:{line:47,column:31}},'13':{start:{line:51,column:2},end:{line:51,column:23}},'14':{start:{line:53,column:2},end:{line:53,column:36}},'15':{start:{line:54,column:2},end:{line:54,column:38}},'16':{start:{line:55,column:2},end:{line:55,column:34}},'17':{start:{line:56,column:2},end:{line:56,column:22}},'18':{start:{line:57,column:2},end:{line:57,column:19}}},fnMap:{'0':{name:'clearAll',decl:{start:{line:28,column:24},end:{line:28,column:32}},loc:{start:{line:28,column:36},end:{line:58,column:1}},line:28},'1':{name:'(anonymous_1)',decl:{start:{line:32,column:17},end:{line:32,column:18}},loc:{start:{line:32,column:35},end:{line:43,column:3}},line:32}},branchMap:{'0':{loc:{start:{line:38,column:6},end:{line:41,column:7}},type:'if',locations:[{start:{line:38,column:6},end:{line:41,column:7}},{start:{line:38,column:6},end:{line:41,column:7}}],line:38},'1':{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:'if',locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function clearAll(){cov_h86i05o0.f[0]++;var opened=(cov_h86i05o0.s[0]++,widgetTracker.openedWidgets),delayed=(cov_h86i05o0.s[1]++,widgetTracker.delayedWidgets);cov_h86i05o0.s[2]++;opened.forEach(function(widget){cov_h86i05o0.f[1]++;var element=(cov_h86i05o0.s[3]++,document$1.getElementById(widget.id));cov_h86i05o0.s[4]++;removeClass(element,'opened');cov_h86i05o0.s[5]++;element.parentNode.removeChild(element);cov_h86i05o0.s[6]++;for(var key in widget.listeners){cov_h86i05o0.s[7]++;if(widget.listeners.hasOwnProperty(key)){cov_h86i05o0.b[0][0]++;var val=(cov_h86i05o0.s[8]++,widget.listeners[key]);cov_h86i05o0.s[9]++;val.target.removeEventListener(val.type,val.fn);}else{cov_h86i05o0.b[0][1]++;}}});cov_h86i05o0.s[10]++;for(var key in delayed){cov_h86i05o0.s[11]++;if(delayed.hasOwnProperty(key)){cov_h86i05o0.b[1][0]++;cov_h86i05o0.s[12]++;cancelDelayedWidget(key);}else{cov_h86i05o0.b[1][1]++;}}cov_h86i05o0.s[13]++;eventHub.removeAll();cov_h86i05o0.s[14]++;resetWidgetTracker(widgetTracker);cov_h86i05o0.s[15]++;resetDataObject(pathforaDataObject);cov_h86i05o0.s[16]++;resetDefaultProps(defaultProps);cov_h86i05o0.s[17]++;this.callbacks=[];cov_h86i05o0.s[18]++;this.acctid='';} - /** @module pathfora */ + var cov_23wpczx9ss=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js',hash='48c5710abf86ff4e1ae6fd9d3ac23051616bea22',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js',statementMap:{'0':{start:{line:12,column:15},end:{line:15,column:3}},'1':{start:{line:17,column:2},end:{line:19,column:3}},'2':{start:{line:18,column:4},end:{line:18,column:48}},'3':{start:{line:21,column:2},end:{line:21,column:25}},'4':{start:{line:23,column:2},end:{line:25,column:3}},'5':{start:{line:24,column:4},end:{line:24,column:57}},'6':{start:{line:27,column:2},end:{line:27,column:24}},'7':{start:{line:29,column:2},end:{line:29,column:16}}},fnMap:{'0':{name:'prepareWidget',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:53},end:{line:30,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:17,column:2},end:{line:19,column:3}},type:'if',locations:[{start:{line:17,column:2},end:{line:19,column:3}},{start:{line:17,column:2},end:{line:19,column:3}}],line:17},'1':{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepareWidget(type,config){cov_23wpczx9ss.f[0]++;var widget=(cov_23wpczx9ss.s[0]++,{valid:true,type:type});cov_23wpczx9ss.s[1]++;if(!config){cov_23wpczx9ss.b[0][0]++;cov_23wpczx9ss.s[2]++;throw new Error('Config object is missing');}else{cov_23wpczx9ss.b[0][1]++;}cov_23wpczx9ss.s[3]++;widget.config=config;cov_23wpczx9ss.s[4]++;if(!config.id){cov_23wpczx9ss.b[1][0]++;cov_23wpczx9ss.s[5]++;throw new Error('All widgets must have an id value');}else{cov_23wpczx9ss.b[1][1]++;}cov_23wpczx9ss.s[6]++;widget.id=config.id;cov_23wpczx9ss.s[7]++;return widget;} - /** - * Creates a new Pathfora instance - * - * @exports Pathfora - * @class {function} Pathfora - */ - var Pathfora = function () { - // feature detections - if (!('localStorage' in window) || !('sessionStorage' in window)) { - throw new Error('The Pathfora SDK requires the Web Storage API!'); - } + var cov_1iqwah8abq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js',hash='17286eda18a7fed0aae092fcdb48d9b871d15489',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:42}}},fnMap:{'0':{name:'Message',decl:{start:{line:12,column:24},end:{line:12,column:31}},loc:{start:{line:12,column:41},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Message(config){cov_1iqwah8abq.f[0]++;cov_1iqwah8abq.s[0]++;return prepareWidget('message',config);} - // globals - this.version = PF_VERSION; - this.callbacks = []; - this.acctid = ''; - this.locale = PF_LOCALE; - this.dateOptions = PF_DATE_OPTIONS; - this.DOMLoaded = false; - this.enableGA = false; - this.customData = {}; + var cov_2epdthxvv3=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js',hash='b41fd2aeb030616aa757759e1099548ecc181c42',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:47}}},fnMap:{'0':{name:'Subscription',decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:46},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Subscription(config){cov_2epdthxvv3.f[0]++;cov_2epdthxvv3.s[0]++;return prepareWidget('subscription',config);} - // dom - this.onDOMready = onDOMready; + var cov_1obfb7k4x8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js',hash='3946ed6eee471c67ceeb4d80cd237301ac78a166',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:39}}},fnMap:{'0':{name:'Form',decl:{start:{line:12,column:24},end:{line:12,column:28}},loc:{start:{line:12,column:38},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Form(config){cov_1obfb7k4x8.f[0]++;cov_1obfb7k4x8.s[0]++;return prepareWidget('form',config);} - // utils - this.utils = utils; + var cov_zkrihgmcu=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js',hash='a047ceb3e49fd09bf733bd36dfe4818303ea8c72',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:43}}},fnMap:{'0':{name:'SiteGate',decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:42},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function SiteGate(config){cov_zkrihgmcu.f[0]++;cov_zkrihgmcu.s[0]++;return prepareWidget('sitegate',config);} - // data - this.getDataObject = getDataObject; + var cov_seesf16uv=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js',hash='190c01a65f580c8a956f27f46920dbfab69502ae',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js',statementMap:{'0':{start:{line:17,column:2},end:{line:60,column:5}},'1':{start:{line:18,column:24},end:{line:18,column:35}},'2':{start:{line:19,column:29},end:{line:19,column:50}},'3':{start:{line:20,column:29},end:{line:20,column:30}},'4':{start:{line:21,column:15},end:{line:21,column:25}},'5':{start:{line:23,column:4},end:{line:25,column:5}},'6':{start:{line:24,column:6},end:{line:24,column:41}},'7':{start:{line:28,column:4},end:{line:28,column:39}},'8':{start:{line:29,column:4},end:{line:29,column:53}},'9':{start:{line:32,column:12},end:{line:32,column:13}},'10':{start:{line:33,column:4},end:{line:41,column:5}},'11':{start:{line:34,column:6},end:{line:34,column:52}},'12':{start:{line:36,column:6},end:{line:38,column:7}},'13':{start:{line:37,column:8},end:{line:37,column:14}},'14':{start:{line:40,column:6},end:{line:40,column:27}},'15':{start:{line:44,column:4},end:{line:53,column:7}},'16':{start:{line:45,column:6},end:{line:52,column:9}},'17':{start:{line:46,column:8},end:{line:51,column:9}},'18':{start:{line:47,column:10},end:{line:47,column:40}},'19':{start:{line:48,column:10},end:{line:48,column:65}},'20':{start:{line:50,column:10},end:{line:50,column:99}},'21':{start:{line:55,column:4},end:{line:57,column:5}},'22':{start:{line:56,column:6},end:{line:56,column:85}},'23':{start:{line:59,column:4},end:{line:59,column:71}}},fnMap:{'0':{name:'initializeABTesting',decl:{start:{line:16,column:24},end:{line:16,column:43}},loc:{start:{line:16,column:54},end:{line:61,column:1}},line:16},'1':{name:'(anonymous_1)',decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:36},end:{line:60,column:3}},line:17},'2':{name:'(anonymous_2)',decl:{start:{line:44,column:26},end:{line:44,column:27}},loc:{start:{line:44,column:50},end:{line:53,column:5}},line:44},'3':{name:'(anonymous_3)',decl:{start:{line:45,column:20},end:{line:45,column:21}},loc:{start:{line:45,column:38},end:{line:52,column:7}},line:45}},branchMap:{'0':{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:'if',locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:23,column:4},end:{line:25,column:5}}],line:23},'1':{loc:{start:{line:36,column:6},end:{line:38,column:7}},type:'if',locations:[{start:{line:36,column:6},end:{line:38,column:7}},{start:{line:36,column:6},end:{line:38,column:7}}],line:36},'2':{loc:{start:{line:46,column:8},end:{line:51,column:9}},type:'if',locations:[{start:{line:46,column:8},end:{line:51,column:9}},{start:{line:46,column:8},end:{line:51,column:9}}],line:46},'3':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeABTesting(abTests){cov_seesf16uv.f[0]++;cov_seesf16uv.s[0]++;abTests.forEach(function(abTest){cov_seesf16uv.f[1]++;var abTestingType=(cov_seesf16uv.s[1]++,abTest.type),userAbTestingValue=(cov_seesf16uv.s[2]++,read(abTest.cookieId)),userAbTestingGroup=(cov_seesf16uv.s[3]++,0),date=(cov_seesf16uv.s[4]++,new Date());cov_seesf16uv.s[5]++;if(!userAbTestingValue){cov_seesf16uv.b[0][0]++;cov_seesf16uv.s[6]++;userAbTestingValue=Math.random();}else{cov_seesf16uv.b[0][1]++;}cov_seesf16uv.s[7]++;date.setDate(date.getDate()+365);cov_seesf16uv.s[8]++;write(abTest.cookieId,userAbTestingValue,date);var i=(cov_seesf16uv.s[9]++,0);cov_seesf16uv.s[10]++;while(i<1){cov_seesf16uv.s[11]++;i+=abTestingType.groups[userAbTestingGroup];cov_seesf16uv.s[12]++;if(userAbTestingValue<=i){cov_seesf16uv.b[1][0]++;cov_seesf16uv.s[13]++;break;}else{cov_seesf16uv.b[1][1]++;}cov_seesf16uv.s[14]++;userAbTestingGroup++;}cov_seesf16uv.s[15]++;abTest.groups.forEach(function(group,index){cov_seesf16uv.f[2]++;cov_seesf16uv.s[16]++;group.forEach(function(widget){cov_seesf16uv.f[3]++;cov_seesf16uv.s[17]++;if(typeof widget.abTestingGroup==='undefined'){cov_seesf16uv.b[2][0]++;cov_seesf16uv.s[18]++;widget.abTestingGroup=index;cov_seesf16uv.s[19]++;widget.hiddenViaABTests=userAbTestingGroup===index;}else{cov_seesf16uv.b[2][1]++;cov_seesf16uv.s[20]++;throw new Error('Widget #'+widget.config.id+' is defined in more than one AB test.');}});});cov_seesf16uv.s[21]++;if(typeof pathforaDataObject.abTestingGroups[abTest.id]!=='undefined'){cov_seesf16uv.b[3][0]++;cov_seesf16uv.s[22]++;throw new Error('AB test with ID='+abTest.id+' has been already defined.');}else{cov_seesf16uv.b[3][1]++;}cov_seesf16uv.s[23]++;pathforaDataObject.abTestingGroups[abTest.id]=userAbTestingGroup;});} - // callbacks - this.addCallback = addCallback; + var cov_18756r080h=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js',hash='430f6fb5ce0125dd936fd211dbd9fa99079cde99',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js',statementMap:{'0':{start:{line:12,column:13},end:{line:12,column:15}},'1':{start:{line:14,column:2},end:{line:16,column:3}},'2':{start:{line:15,column:4},end:{line:15,column:48}},'3':{start:{line:18,column:2},end:{line:18,column:22}},'4':{start:{line:19,column:2},end:{line:19,column:45}},'5':{start:{line:20,column:2},end:{line:20,column:30}},'6':{start:{line:22,column:2},end:{line:24,column:3}},'7':{start:{line:23,column:4},end:{line:23,column:63}},'8':{start:{line:26,column:2},end:{line:26,column:42}},'9':{start:{line:28,column:2},end:{line:28,column:14}}},fnMap:{'0':{name:'prepareABTest',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:47},end:{line:29,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:'if',locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:14,column:2},end:{line:16,column:3}}],line:14},'1':{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepareABTest(config){cov_18756r080h.f[0]++;var test=(cov_18756r080h.s[0]++,{});cov_18756r080h.s[1]++;if(!config){cov_18756r080h.b[0][0]++;cov_18756r080h.s[2]++;throw new Error('Config object is missing');}else{cov_18756r080h.b[0][1]++;}cov_18756r080h.s[3]++;test.id=config.id;cov_18756r080h.s[4]++;test.cookieId=PREFIX_AB_TEST+config.id;cov_18756r080h.s[5]++;test.groups=config.groups;cov_18756r080h.s[6]++;if(!abTestingTypes[config.type]){cov_18756r080h.b[1][0]++;cov_18756r080h.s[7]++;throw new Error('Unknown AB testing type: '+config.type);}else{cov_18756r080h.b[1][1]++;}cov_18756r080h.s[8]++;test.type=abTestingTypes[config.type];cov_18756r080h.s[9]++;return test;} - // display conditions - this.initializePageViews = initializePageViews; - this.triggerWidgets = triggerWidgets; + var cov_b644lx05h=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js',hash='d992100179a90704e13da4757353d3c010c6896e',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:31}}},fnMap:{'0':{name:'ABTest',decl:{start:{line:12,column:24},end:{line:12,column:30}},loc:{start:{line:12,column:40},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function ABTest(config){cov_b644lx05h.f[0]++;cov_b644lx05h.s[0]++;return prepareABTest(config);} - // widgets - this.initializeTargetedWidgets = initializeTargetedWidgets; - this.initializeWidgets = initializeWidgets; - this.initializeWidgetArray = initializeWidgetArray; - this.initializeWidget = initializeWidget; - this.previewWidget = previewWidget; - this.showWidget = showWidget; - this.closeWidget = closeWidget; - this.clearAll = clearAll; - this.Message = Message; - this.Subscription = Subscription; - this.Form = Form; - this.SiteGate = SiteGate; + var cov_14en7h5tsq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js',hash='4d8bf52c5f0a024149dd445984151f1f02a92edf',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js',statementMap:{'0':{start:{line:13,column:21},end:{line:13,column:23}},'1':{start:{line:14,column:17},end:{line:14,column:60}},'2':{start:{line:16,column:2},end:{line:16,column:49}},'3':{start:{line:18,column:2},end:{line:87,column:3}},'4':{start:{line:19,column:4},end:{line:86,column:5}},'5':{start:{line:20,column:23},end:{line:20,column:34}},'6':{start:{line:22,column:6},end:{line:85,column:7}},'7':{start:{line:25,column:20},end:{line:25,column:59}},'8':{start:{line:27,column:8},end:{line:29,column:9}},'9':{start:{line:28,column:10},end:{line:28,column:28}},'10':{start:{line:31,column:8},end:{line:33,column:9}},'11':{start:{line:32,column:10},end:{line:32,column:35}},'12':{start:{line:35,column:8},end:{line:40,column:11}},'13':{start:{line:41,column:8},end:{line:41,column:14}},'14':{start:{line:45,column:24},end:{line:45,column:67}},'15':{start:{line:46,column:20},end:{line:46,column:59}},'16':{start:{line:47,column:22},end:{line:47,column:27}},'17':{start:{line:49,column:8},end:{line:51,column:9}},'18':{start:{line:50,column:10},end:{line:50,column:28}},'19':{start:{line:53,column:8},end:{line:55,column:9}},'20':{start:{line:54,column:10},end:{line:54,column:32}},'21':{start:{line:57,column:8},end:{line:61,column:9}},'22':{start:{line:58,column:10},end:{line:60,column:12}},'23':{start:{line:63,column:8},end:{line:65,column:9}},'24':{start:{line:64,column:10},end:{line:64,column:73}},'25':{start:{line:67,column:8},end:{line:69,column:9}},'26':{start:{line:68,column:10},end:{line:68,column:52}},'27':{start:{line:71,column:8},end:{line:83,column:11}},'28':{start:{line:84,column:8},end:{line:84,column:14}},'29':{start:{line:88,column:2},end:{line:88,column:22}}},fnMap:{'0':{name:'prepElements',decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:44},end:{line:89,column:1}},line:12}},branchMap:{'0':{loc:{start:{line:19,column:4},end:{line:86,column:5}},type:'if',locations:[{start:{line:19,column:4},end:{line:86,column:5}},{start:{line:19,column:4},end:{line:86,column:5}}],line:19},'1':{loc:{start:{line:22,column:6},end:{line:85,column:7}},type:'switch',locations:[{start:{line:24,column:6},end:{line:41,column:14}},{start:{line:44,column:6},end:{line:84,column:14}}],line:22},'2':{loc:{start:{line:27,column:8},end:{line:29,column:9}},type:'if',locations:[{start:{line:27,column:8},end:{line:29,column:9}},{start:{line:27,column:8},end:{line:29,column:9}}],line:27},'3':{loc:{start:{line:31,column:8},end:{line:33,column:9}},type:'if',locations:[{start:{line:31,column:8},end:{line:33,column:9}},{start:{line:31,column:8},end:{line:33,column:9}}],line:31},'4':{loc:{start:{line:49,column:8},end:{line:51,column:9}},type:'if',locations:[{start:{line:49,column:8},end:{line:51,column:9}},{start:{line:49,column:8},end:{line:51,column:9}}],line:49},'5':{loc:{start:{line:53,column:8},end:{line:55,column:9}},type:'if',locations:[{start:{line:53,column:8},end:{line:55,column:9}},{start:{line:53,column:8},end:{line:55,column:9}}],line:53},'6':{loc:{start:{line:57,column:8},end:{line:61,column:9}},type:'if',locations:[{start:{line:57,column:8},end:{line:61,column:9}},{start:{line:57,column:8},end:{line:61,column:9}}],line:57},'7':{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:'if',locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},'8':{loc:{start:{line:67,column:8},end:{line:69,column:9}},type:'if',locations:[{start:{line:67,column:8},end:{line:69,column:9}},{start:{line:67,column:8},end:{line:69,column:9}}],line:67}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepElements(attr){cov_14en7h5tsq.f[0]++;var dataElements=(cov_14en7h5tsq.s[0]++,{}),elements=(cov_14en7h5tsq.s[1]++,document$1.querySelectorAll('['+attr+']'));cov_14en7h5tsq.s[2]++;this.elements=this.elements.concat(elements);cov_14en7h5tsq.s[3]++;for(var i=0;idiv,.pf-sitegate form.pf-custom-form>div{text-align:left;margin-bottom:10px}.pf-form .pf-form-label,.pf-sitegate .pf-form-label{font-weight:700}.pf-form .pf-widget-checkbox,.pf-form .pf-widget-radio,.pf-sitegate .pf-widget-checkbox,.pf-sitegate .pf-widget-radio{display:block;padding:4px}.pf-form .pf-widget-checkbox input,.pf-form .pf-widget-radio input,.pf-sitegate .pf-widget-checkbox input,.pf-sitegate .pf-widget-radio input{margin-right:10px}.pf-form .pf-has-label,.pf-sitegate .pf-has-label{margin-top:7px}.pf-form div.pf-form-required,.pf-sitegate div.pf-form-required{position:relative}.pf-form div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-form div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label){border:1px solid #f12626;margin:-1px}.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-form div.pf-form-required.pf-widget-radio-group,.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-sitegate div.pf-form-required.pf-widget-radio-group{border-radius:3px}.pf-form div.pf-form-required.invalid div.pf-required-flag,.pf-sitegate div.pf-form-required.invalid div.pf-required-flag{opacity:1;margin-left:10px}.pf-form div.pf-form-required div.pf-required-flag,.pf-sitegate div.pf-form-required div.pf-required-flag{font-size:12px;font-weight:700;position:relative;padding:3px 7px;display:inline;width:auto;color:#fff;background-color:#f12626;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);margin-left:5px;opacity:0}.pf-form div.pf-form-required div.pf-required-flag span,.pf-sitegate div.pf-form-required div.pf-required-flag span{position:absolute;width:0;height:0;top:6px;left:-6px;border-top:4px solid transparent;border-bottom:4px solid transparent;content:'';border-right:6px solid #f12626}.pf-form div.pf-form-required span.required,.pf-sitegate div.pf-form-required span.required{color:#f12626}.pf-form.pf-widget-slideout input.pf-field-half-width,.pf-form.pf-widget-slideout select.pf-field-half-width,.pf-sitegate.pf-widget-slideout input.pf-field-half-width,.pf-sitegate.pf-widget-slideout select.pf-field-half-width{width:48%}.pf-widget-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:9999;text-align:center}.pf-widget-modal .pf-va-middle{display:table-cell;vertical-align:middle}.pf-widget-modal .pf-widget-btn{font-size:16px;line-height:45px}.pf-widget-modal .pf-widget-footer{text-align:center}.pf-widget-slideout .pf-widget-footer,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-headline,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-message{text-align:left}.pf-widget-modal .pf-widget-container{display:table;width:100%;height:100%;position:relative;top:-100vh}.pf-widget-modal .pf-widget-content{background-color:#f1f1f1;color:#888;width:100%;position:fixed;max-width:780px;margin:0 auto;padding:40px;border-radius:5px;overflow-x:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.pf-widget-modal .pf-widget-headline{font-size:28px}.pf-widget-modal .pf-widget-message{font-size:18px;margin:0 0 30px}.pf-widget-modal .pf-widget-body{display:table;width:100%}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select,.pf-widget-modal form textarea{font-size:16px}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select{height:45px}.pf-widget-modal.opened .pf-widget-container{top:0}.pf-widget-modal.pf-widget-variant-2 .pf-widget-headline{margin-top:140px}.pf-widget-modal.pf-widget-variant-2 .pf-widget-img{float:none;position:absolute;top:20px;left:50%;margin-left:-70px;width:140px;height:140px}.pf-widget-modal.pf-subscription .pf-widget-btn{margin-top:2px}.pf-widget-modal.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout{bottom:50px;width:350px;border-radius:4px;top:auto;position:fixed;overflow-x:hidden}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-modal .pf-widget-content{padding:40px 20px}.pf-widget-slideout{width:100%;max-width:350px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{bottom:0}}.pf-widget-slideout .pf-widget-message{margin:0 0 20px}.pf-widget-slideout .pf-widget-btn{line-height:40px}.pf-widget-slideout .pf-widget-content{padding:30px;width:100%}.pf-widget-slideout .pf-widget-headline{font-size:20px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{left:-100%}.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:0}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{bottom:0}}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{left:auto;right:-100%}.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{right:50px}.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-right{bottom:auto;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%)}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{bottom:auto;top:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{left:auto;right:0}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{top:0}}.pf-widget-slideout.pf-origin-bottom{bottom:-100%}.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:50px}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:50px}.pf-widget-slideout.opened.pf-origin-bottom{bottom:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:0}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:0;left:auto}.pf-widget-slideout.opened.pf-origin-bottom{bottom:0}}.pf-widget-slideout .branding svg{bottom:-22px;right:-20px;width:100px}.pf-widget-bar .pf-bar-content,.pf-widget-inline.pf-widget-variant-2 .pf-widget-content,.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content{text-align:center}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-slideout.pf-form{width:370px}.pf-widget-slideout.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-slideout form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px}.pf-push-down.opened{margin-top:59px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-form{width:100%;max-width:370px}.pf-push-down.opened{margin-top:0}}.pf-widget-bar{height:auto;padding:10px 0;min-height:59px;left:0;right:0;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget-bar .pf-widget-body{margin:0 20px;float:left}.pf-widget-bar .pf-widget-close{top:50%;position:absolute;margin-top:-16px;right:20px;line-height:1;margin-right:0}.pf-widget-bar .pf-widget-btn{line-height:35px}.pf-widget-bar .pf-bar-content{padding:0 40px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar .pf-bar-content{padding:0 40px 0 20px}}.pf-widget-bar .pf-bar-content .pf-widget-message{text-overflow:ellipsis;max-width:100%;overflow:hidden;display:inline-block;white-space:normal;margin:6px 16px}.pf-widget-bar .pf-bar-content input[type=email],.pf-widget-bar .pf-bar-content input[type=text]{margin:0 1px;max-width:200px}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email],.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text]{margin-bottom:0}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text].invalid{margin:0}.pf-widget-bar .pf-bar-content>*{display:inline-block;vertical-align:middle}.pf-widget-bar.pf-position-bottom-absolute,.pf-widget-bar.pf-position-top-absolute{position:absolute}.pf-widget-bar.pf-position-top-absolute,.pf-widget-bar.pf-position-top-fixed{top:-50px}.pf-widget-bar.opened.pf-position-top-absolute,.pf-widget-bar.opened.pf-position-top-fixed{top:0}.pf-widget-bar.pf-position-top-absolute .pf-bar-content,.pf-widget-bar.pf-position-top-fixed .pf-bar-content{padding-top:0}.pf-widget-bar.pf-position-bottom-fixed{bottom:-50px}.pf-widget-bar.pf-position-bottom-fixed,.pf-widget-bar.pf-position-top-fixed{position:fixed}.pf-widget-bar.opened.pf-position-bottom-fixed{bottom:0}.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{height:35px;width:35px;top:50%;margin-top:-17.5px;position:absolute}.pf-widget-bar.pf-message .pf-widget-btn,.pf-widget-bar.pf-subscription form .pf-widget-btn{margin-top:2px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{display:none}}.pf-widget-bar.pf-subscription form{width:auto}.pf-widget-bar.pf-subscription form input[type=email]{height:35px}.pf-widget-button{position:fixed;box-shadow:1px 0 4px 0 rgba(0,0,0,.5);border-radius:2px}.pf-widget-button .pf-widget-message{border:0;background-color:transparent;line-height:42px;padding:0 16px 5px;margin:0;font-weight:700;display:block;cursor:pointer;overflow:hidden;max-width:150px;white-space:nowrap;text-overflow:ellipsis;color:#888}.pf-widget-button.pf-position-left{transform-origin:left bottom;transform:rotate(90deg);left:-50px}.pf-widget-button.pf-position-right{box-shadow:-1px 0 4px 0 rgba(0,0,0,.5);transform-origin:right bottom;transform:rotate(-90deg);right:-50px}.pf-widget-button.pf-position-left,.pf-widget-button.pf-position-right{top:10%}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-top-left{left:42px}.pf-widget-button.pf-position-bottom-right,.pf-widget-button.pf-position-top-right{right:42px}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-bottom-right{bottom:-50px}.pf-widget-button.pf-position-top-left,.pf-widget-button.pf-position-top-right{top:-50px}.pf-widget-button.pf-position-top-left .pf-widget-message,.pf-widget-button.pf-position-top-right .pf-widget-message{padding:5px 16px 0}.pf-widget-button.opened.pf-position-left{left:-6px}.pf-widget-button.opened.pf-position-left:hover{left:-1px}.pf-widget-button.opened.pf-position-right{right:-6px}.pf-widget-button.opened.pf-position-right:hover{right:-1px}.pf-widget-button.opened.pf-position-bottom-left,.pf-widget-button.opened.pf-position-bottom-right{bottom:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-bottom-left:hover,.pf-widget-button.opened.pf-position-bottom-right:hover{bottom:-1px}.pf-widget-button.opened.pf-position-top-left,.pf-widget-button.opened.pf-position-top-right{top:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-top-left:hover,.pf-widget-button.opened.pf-position-top-right:hover{top:-1px}.pf-widget-inline{padding:20px;border-radius:2px;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);transition:all 0s;position:relative}.pf-widget-inline .pf-widget-message{margin:0 0 20px}.pf-widget-inline .pf-widget-btn{transition:all 0s}.pf-widget-inline.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-inline.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-inline.pf-subscription .pf-widget-btn{line-height:39px}.pf-widget-inline.pf-subscription.pf-widget-has-branding span{margin-bottom:35px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit{max-width:650px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit.stack{margin:0 auto;max-width:400px}.pf-widget-inline .branding{position:relative}.pf-widget-inline .branding svg{position:absolute;bottom:-10px;right:-10px}.pf-widget-inline form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-inline form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px} \ No newline at end of file +.pf-widget,.pf-widget *{box-sizing:border-box;-webkit-sizing:border-box}.pf-widget,.pf-widget .pf-widget-body{color:#888}.pf-widget .pf-widget-btn,.pf-widget .pf-widget-close,.pf-widget a{text-decoration:none;cursor:pointer}.pf-hidden,.pf-widget .pf-content-unit,.pf-widget .pf-widget-img{display:none}.pf-widget.error,.pf-widget.success{transition:opacity .3s}.pf-box-shadow{box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget{z-index:9999;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;visibility:hidden;opacity:0;text-align:left;-moz-box-sizing:border-box;background-color:#f1f1f1;font-size:15px}.pf-widget .pf-widget-footer{font-size:12px;margin-top:10px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget.pf-mobile-hide{display:none}}.pf-widget *{-moz-box-sizing:border-box;text-shadow:none}.pf-widget a,.pf-widget h2,.pf-widget input,.pf-widget p,.pf-widget select,.pf-widget textarea{margin:0;padding:0;border:0;background:0 0}.pf-widget .pf-widget-headline{margin:0 0 10px;color:#444;font-weight:500}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select,.pf-widget textarea{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:3px;font-size:14px;width:100%;padding:10px 15px;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.2);position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-sizing:border-box}.pf-widget input[type=text]::-webkit-input-placeholder,.pf-widget input[type=email]::-webkit-input-placeholder,.pf-widget input[type=date]::-webkit-input-placeholder,.pf-widget select::-webkit-input-placeholder,.pf-widget textarea::-webkit-input-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-moz-placeholder,.pf-widget input[type=email]:-moz-placeholder,.pf-widget input[type=date]:-moz-placeholder,.pf-widget select:-moz-placeholder,.pf-widget textarea:-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]::-moz-placeholder,.pf-widget input[type=email]::-moz-placeholder,.pf-widget input[type=date]::-moz-placeholder,.pf-widget select::-moz-placeholder,.pf-widget textarea::-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-ms-input-placeholder,.pf-widget input[type=email]:-ms-input-placeholder,.pf-widget input[type=date]:-ms-input-placeholder,.pf-widget select:-ms-input-placeholder,.pf-widget textarea:-ms-input-placeholder{color:#a9a9a9}.pf-widget select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pf-widget select::-ms-expand{display:none}.pf-widget select.default{color:#a9a9a9}.pf-widget form:not(.pf-custom-form) input[type=text],.pf-widget form:not(.pf-custom-form) input[type=email],.pf-widget form:not(.pf-custom-form) select,.pf-widget form:not(.pf-custom-form) textarea{margin-bottom:10px}.pf-widget form:not(.pf-custom-form) [data-required=true].invalid,.pf-widget form:not(.pf-custom-form) [data-validate=true].invalid{border:1px solid #f12626}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select{clear:both}.pf-widget textarea{resize:none}.pf-widget .pf-widget-img{border-radius:50%}.pf-widget .pf-widget-message{line-height:1.5;font-size:15px}.pf-widget .pf-widget-btn{display:inline-block;padding:0 26px;line-height:35px;font-size:14px;border-radius:5px;border:0;margin-bottom:2px}.pf-widget .error-state,.pf-widget .success-state,.pf-widget.success .pf-widget-headline,.pf-widget.success .pf-widget-message,.pf-widget.success form{display:none}.pf-widget .pf-widget-btn.pf-widget-ok{box-shadow:0 1px 1px rgba(0,0,0,.2);color:#444;background-color:#fff}.pf-widget .pf-widget-btn.pf-widget-cancel{color:#bbb;background-color:#f1f1f1}.pf-widget .pf-widget-btn+.pf-widget-btn{margin-left:5px;margin-right:5px}.pf-widget .pf-widget-close{font-size:24px;position:absolute;top:4px;line-height:1;right:0;margin-right:12px;color:#bbb;padding:0;background-color:transparent;border:0}.pf-widget.opened{visibility:visible;opacity:1}.pf-widget .branding{position:relative}.pf-widget .branding svg{position:absolute;bottom:-25px;right:-25px;fill:#888;opacity:.25;width:120px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget .branding svg{right:-8px}}.pf-widget.success .success-state,.pf-widget.success .success-state .pf-widget-headline,.pf-widget.success .success-state .pf-widget-message,.pf-widget.success .success-state form{display:block}.pf-widget.error .pf-widget-headline,.pf-widget.error .pf-widget-message,.pf-widget.error form{display:none}.pf-widget-variant-2 .pf-widget-img,.pf-widget.error .error-state,.pf-widget.error .error-state .pf-widget-headline,.pf-widget.error .error-state .pf-widget-message,.pf-widget.error .error-state form{display:block}.pf-widget-variant-3 .pf-content-unit{display:block;text-align:left;margin-bottom:20px;position:relative;background-color:#fff}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta{padding:10px 15px}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta span.pf-content-unit-info{font-size:12px;display:block;margin-bottom:5px;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta h4{font-weight:500;margin:0 0 5px;line-height:1.4;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta p{line-height:1.3;color:#888}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-img{background-size:cover;background-position:center center;background-repeat:no-repeat}.pf-widget-variant-3 .pf-content-unit:not(.stack){width:95%;margin:0 auto 30px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img{position:absolute;display:block;height:100%;width:40%}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img+.pf-content-unit-meta{width:60%;min-height:135px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta{padding:15px;display:block;margin:0 0 0 auto}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta span.pf-content-unit-info{font-size:13px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta h4{font-size:18px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta h4,.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta p{font-size:14px}.pf-widget-variant-3 .pf-content-unit.stack{width:100%;display:block;text-align:left}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta p{font-size:13px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-img{width:100%;height:135px}.pf-subscription form{width:100%;display:block;margin:0 auto}.pf-subscription form input[type=text],.pf-subscription form input[type=email]{width:100%;margin-bottom:1px}.pf-subscription form .pf-widget-btn{float:right;margin-left:5px;padding:0 16px}.pf-subscription form span{display:block;padding:2px;overflow:hidden}.pf-widget-modal .pf-widget-content,.pf-widget-slideout{max-height:100%;overflow-y:auto;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-form input.pf-field-half-width,.pf-form select.pf-field-half-width,.pf-sitegate input.pf-field-half-width,.pf-sitegate select.pf-field-half-width{width:49%;display:block;clear:none;float:left}.pf-form input.pf-field-half-width.right,.pf-form select.pf-field-half-width.right,.pf-sitegate input.pf-field-half-width.right,.pf-sitegate select.pf-field-half-width.right{float:right}.pf-form .pf-widget-btn,.pf-sitegate .pf-widget-btn{clear:both;margin-top:5px}.pf-form form.pf-custom-form>div,.pf-sitegate form.pf-custom-form>div{text-align:left;margin-bottom:10px}.pf-form .pf-form-label,.pf-sitegate .pf-form-label{font-weight:700}.pf-form .pf-widget-checkbox,.pf-form .pf-widget-radio,.pf-sitegate .pf-widget-checkbox,.pf-sitegate .pf-widget-radio{display:block;padding:4px}.pf-form .pf-widget-checkbox input,.pf-form .pf-widget-radio input,.pf-sitegate .pf-widget-checkbox input,.pf-sitegate .pf-widget-radio input{margin-right:10px}.pf-form .pf-has-label,.pf-sitegate .pf-has-label{margin-top:7px}.pf-form div.pf-form-required,.pf-sitegate div.pf-form-required{position:relative}.pf-form div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-form div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label){border:1px solid #f12626;margin:-1px}.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-form div.pf-form-required.pf-widget-radio-group,.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-sitegate div.pf-form-required.pf-widget-radio-group{border-radius:3px}.pf-form div.pf-form-required.invalid div.pf-required-flag,.pf-form div.pf-form-required.invalid--validate div.pf-invalid-flag,.pf-sitegate div.pf-form-required.invalid div.pf-required-flag,.pf-sitegate div.pf-form-required.invalid--validate div.pf-invalid-flag{opacity:1;margin-left:10px}.pf-form div.pf-form-required div.pf-invalid-flag,.pf-form div.pf-form-required div.pf-required-flag,.pf-sitegate div.pf-form-required div.pf-invalid-flag,.pf-sitegate div.pf-form-required div.pf-required-flag{font-size:12px;font-weight:700;position:absolute;padding:3px 7px;display:inline;width:auto;color:#fff;background-color:#f12626;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);margin-left:5px;opacity:0}.pf-form div.pf-form-required div.pf-invalid-flag span,.pf-form div.pf-form-required div.pf-required-flag span,.pf-sitegate div.pf-form-required div.pf-invalid-flag span,.pf-sitegate div.pf-form-required div.pf-required-flag span{position:absolute;width:0;height:0;top:6px;left:-6px;border-top:4px solid transparent;border-bottom:4px solid transparent;content:'';border-right:6px solid #f12626}.pf-form div.pf-form-required span.required,.pf-sitegate div.pf-form-required span.required{color:#f12626}.pf-form.pf-widget-slideout input.pf-field-half-width,.pf-form.pf-widget-slideout select.pf-field-half-width,.pf-sitegate.pf-widget-slideout input.pf-field-half-width,.pf-sitegate.pf-widget-slideout select.pf-field-half-width{width:48%}.pf-widget-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:9999;text-align:center}.pf-widget-modal .pf-va-middle{display:table-cell;vertical-align:middle}.pf-widget-modal .pf-widget-btn{font-size:16px;line-height:45px}.pf-widget-modal .pf-widget-footer{text-align:center}.pf-widget-slideout .pf-widget-footer,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-headline,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-message{text-align:left}.pf-widget-modal .pf-widget-container{display:table;width:100%;height:100%;position:relative;top:-100vh}.pf-widget-modal .pf-widget-content{background-color:#f1f1f1;color:#888;width:100%;position:fixed;max-width:780px;margin:0 auto;padding:40px;border-radius:5px;overflow-x:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.pf-widget-modal .pf-widget-headline{font-size:28px}.pf-widget-modal .pf-widget-message{font-size:18px;margin:0 0 30px}.pf-widget-modal .pf-widget-body{display:table;width:100%}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select,.pf-widget-modal form textarea{font-size:16px}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select{height:45px}.pf-widget-modal.opened .pf-widget-container{top:0}.pf-widget-modal.pf-widget-variant-2 .pf-widget-headline{margin-top:140px}.pf-widget-modal.pf-widget-variant-2 .pf-widget-img{float:none;position:absolute;top:20px;left:50%;margin-left:-70px;width:140px;height:140px}.pf-widget-modal.pf-subscription .pf-widget-btn{margin-top:2px}.pf-widget-modal.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout{bottom:50px;width:350px;border-radius:4px;top:auto;position:fixed;overflow-x:hidden}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-modal .pf-widget-content{padding:40px 20px}.pf-widget-slideout{width:100%;max-width:350px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{bottom:0}}.pf-widget-slideout .pf-widget-message{margin:0 0 20px}.pf-widget-slideout .pf-widget-btn{line-height:40px}.pf-widget-slideout .pf-widget-content{padding:30px;width:100%}.pf-widget-slideout .pf-widget-headline{font-size:20px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{left:-100%}.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:0}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{bottom:0}}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{left:auto;right:-100%}.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{right:50px}.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-right{bottom:auto;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%)}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{bottom:auto;top:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{left:auto;right:0}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{top:0}}.pf-widget-slideout.pf-origin-bottom{bottom:-100%}.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:50px}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:50px}.pf-widget-slideout.opened.pf-origin-bottom{bottom:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:0}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:0;left:auto}.pf-widget-slideout.opened.pf-origin-bottom{bottom:0}}.pf-widget-slideout .branding svg{bottom:-22px;right:-20px;width:100px}.pf-widget-bar .pf-bar-content,.pf-widget-inline.pf-widget-variant-2 .pf-widget-content,.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content{text-align:center}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-slideout.pf-form{width:370px}.pf-widget-slideout.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-slideout form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px}.pf-push-down.opened{margin-top:59px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-form{width:100%;max-width:370px}.pf-push-down.opened{margin-top:0}}.pf-widget-bar{height:auto;padding:10px 0;min-height:59px;left:0;right:0;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget-bar .pf-widget-body{margin:0 20px;float:left}.pf-widget-bar .pf-widget-close{top:50%;position:absolute;margin-top:-16px;right:20px;line-height:1;margin-right:0}.pf-widget-bar .pf-widget-btn{line-height:35px}.pf-widget-bar .pf-bar-content{padding:0 40px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar .pf-bar-content{padding:0 40px 0 20px}}.pf-widget-bar .pf-bar-content .pf-widget-message{text-overflow:ellipsis;max-width:100%;overflow:hidden;display:inline-block;white-space:normal;margin:6px 16px}.pf-widget-bar .pf-bar-content input[type=email],.pf-widget-bar .pf-bar-content input[type=text]{margin:0 1px;max-width:200px}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email],.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text]{margin-bottom:0}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text].invalid{margin:0}.pf-widget-bar .pf-bar-content>*{display:inline-block;vertical-align:middle}.pf-widget-bar.pf-position-bottom-absolute,.pf-widget-bar.pf-position-top-absolute{position:absolute}.pf-widget-bar.pf-position-top-absolute,.pf-widget-bar.pf-position-top-fixed{top:-50px}.pf-widget-bar.opened.pf-position-top-absolute,.pf-widget-bar.opened.pf-position-top-fixed{top:0}.pf-widget-bar.pf-position-top-absolute .pf-bar-content,.pf-widget-bar.pf-position-top-fixed .pf-bar-content{padding-top:0}.pf-widget-bar.pf-position-bottom-fixed{bottom:-50px}.pf-widget-bar.pf-position-bottom-fixed,.pf-widget-bar.pf-position-top-fixed{position:fixed}.pf-widget-bar.opened.pf-position-bottom-fixed{bottom:0}.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{height:35px;width:35px;top:50%;margin-top:-17.5px;position:absolute}.pf-widget-bar.pf-message .pf-widget-btn,.pf-widget-bar.pf-subscription form .pf-widget-btn{margin-top:2px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{display:none}}.pf-widget-bar.pf-subscription form{width:auto}.pf-widget-bar.pf-subscription form input[type=email]{height:35px}.pf-widget-button{position:fixed;box-shadow:1px 0 4px 0 rgba(0,0,0,.5);border-radius:2px}.pf-widget-button .pf-widget-message{border:0;background-color:transparent;line-height:42px;padding:0 16px 5px;margin:0;font-weight:700;display:block;cursor:pointer;overflow:hidden;max-width:150px;white-space:nowrap;text-overflow:ellipsis;color:#888}.pf-widget-button.pf-position-left{transform-origin:left bottom;transform:rotate(90deg);left:-50px}.pf-widget-button.pf-position-right{box-shadow:-1px 0 4px 0 rgba(0,0,0,.5);transform-origin:right bottom;transform:rotate(-90deg);right:-50px}.pf-widget-button.pf-position-left,.pf-widget-button.pf-position-right{top:10%}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-top-left{left:42px}.pf-widget-button.pf-position-bottom-right,.pf-widget-button.pf-position-top-right{right:42px}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-bottom-right{bottom:-50px}.pf-widget-button.pf-position-top-left,.pf-widget-button.pf-position-top-right{top:-50px}.pf-widget-button.pf-position-top-left .pf-widget-message,.pf-widget-button.pf-position-top-right .pf-widget-message{padding:5px 16px 0}.pf-widget-button.opened.pf-position-left{left:-6px}.pf-widget-button.opened.pf-position-left:hover{left:-1px}.pf-widget-button.opened.pf-position-right{right:-6px}.pf-widget-button.opened.pf-position-right:hover{right:-1px}.pf-widget-button.opened.pf-position-bottom-left,.pf-widget-button.opened.pf-position-bottom-right{bottom:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-bottom-left:hover,.pf-widget-button.opened.pf-position-bottom-right:hover{bottom:-1px}.pf-widget-button.opened.pf-position-top-left,.pf-widget-button.opened.pf-position-top-right{top:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-top-left:hover,.pf-widget-button.opened.pf-position-top-right:hover{top:-1px}.pf-widget-inline{padding:20px;border-radius:2px;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);transition:all 0s;position:relative}.pf-widget-inline .pf-widget-message{margin:0 0 20px}.pf-widget-inline .pf-widget-btn{transition:all 0s}.pf-widget-inline.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-inline.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-inline.pf-subscription .pf-widget-btn{line-height:39px}.pf-widget-inline.pf-subscription.pf-widget-has-branding span{margin-bottom:35px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit{max-width:650px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit.stack{margin:0 auto;max-width:400px}.pf-widget-inline .branding{position:relative}.pf-widget-inline .branding svg{position:absolute;bottom:-10px;right:-10px}.pf-widget-inline form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-inline form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px} \ No newline at end of file diff --git a/dist/pathfora.min.js b/dist/pathfora.min.js index e36e846..43f2334 100644 --- a/dist/pathfora.min.js +++ b/dist/pathfora.min.js @@ -1 +1 @@ -!function(){"use strict";function a(o){return o.generic={className:"pathfora",branding:!1,responsive:!0,headline:"",themes:{dark:{background:"#333",headline:"#fefefe",text:"#aaa",close:"#888",actionText:"#fff",actionBackground:"#444",cancelText:"#888",cancelBackground:"#333"},light:{background:"#f1f1f1",headline:"#444",text:"#888",close:"#bbb",actionText:"#444",actionBackground:"#fff",cancelText:"#bbb",cancelBackground:"#f1f1f1"}},displayConditions:{showOnInit:!0,showOnExitIntent:!1,showDelay:0,hideAfter:0,displayWhenElementVisible:"",scrollPercentageToDisplay:0}},o.message={layout:"modal",position:"",variant:"1",okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.subscription={layout:"modal",position:"",variant:"1",placeholders:{email:"Email"},okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.form={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{company:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Send",okShow:!0,cancelMessage:"Cancel",cancelShow:!0},o.sitegate={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{message:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Submit",okShow:!0,cancelShow:!1,showForm:!0},o}function l(o){return o.delayedWidgets={},o.openedWidgets=[],o.initializedWidgets=[],o.prioritizedWidgets=[],o.readyWidgets=[],o.triggeredWidgets={},o}function p(o){return o.pageViews=0,o.timeSpentOnPage=0,o.closedWidgets=[],o.completedActions=[],o.cancelledActions=[],o.displayedWidgets=[],o.abTestingGroups=[],o}function o(){for(var o=[],t=0;t

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),l.appendChild(a)),(!0===o.required||"date"===o.type||"email"===o.type)&&(K(l,"pf-form-required"),e.setAttribute(!0===o.required?"data-required":"data-validate","true"),o.label)){var v=q.createElement("div");v.className="pf-required-flag",v.innerHTML=!0===o.required?"required":"invalid";var f=q.createElement("span");v.appendChild(f),l.appendChild(v)}if(o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}}),In=(O="/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",R="527f755cdde141e89e47867285e19f13d1284215",W=new function(){}.constructor("return this")(),q={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(H=W[D="__coverage__"]||(W[D]={}))[O]&&H[O].hash===R?H[O]:(q.hash=R,H[O]=q),z="/Users/ash/lytics/pathforajs/src/rollup/dom/document.js",K="c65d2e4509ef22ec2e20b891da6233fa189f8d63",F=new function(){}.constructor("return this")(),Z={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/document.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(J=F[V="__coverage__"]||(F[V]={}))[z]&&J[z].hash===K?J[z]:(Z.hash=K,J[z]=Z),window.document),Nn=(Y="/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js",Q="e5a887164dfe246dafcc3ed2e58224d4f47801c2",$=new function(){}.constructor("return this")(),nn={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js",statementMap:{0:{start:{line:7,column:11},end:{line:7,column:15}},1:{start:{line:8,column:13},end:{line:8,column:46}},2:{start:{line:9,column:25},end:{line:9,column:43}},3:{start:{line:10,column:15},end:{line:10,column:80}},4:{start:{line:12,column:2},end:{line:21,column:3}},5:{start:{line:13,column:4},end:{line:17,column:7}},6:{start:{line:14,column:6},end:{line:14,column:62}},7:{start:{line:15,column:6},end:{line:15,column:26}},8:{start:{line:16,column:6},end:{line:16,column:11}},9:{start:{line:19,column:4},end:{line:19,column:24}},10:{start:{line:20,column:4},end:{line:20,column:9}}},fnMap:{0:{name:"onDOMready",decl:{start:{line:5,column:24},end:{line:5,column:34}},loc:{start:{line:5,column:40},end:{line:22,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:13,column:58},end:{line:13,column:59}},loc:{start:{line:13,column:70},end:{line:17,column:5}},line:13}},branchMap:{0:{loc:{start:{line:10,column:16},end:{line:10,column:53}},type:"cond-expr",locations:[{start:{line:10,column:23},end:{line:10,column:35}},{start:{line:10,column:38},end:{line:10,column:53}}],line:10},1:{loc:{start:{line:12,column:2},end:{line:21,column:3}},type:"if",locations:[{start:{line:12,column:2},end:{line:21,column:3}},{start:{line:12,column:2},end:{line:21,column:3}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ln=$[X="__coverage__"]||($[X]={}))[Y]&&ln[Y].hash===Q?ln[Y]:(nn.hash=Q,ln[Y]=nn));function Bn(n){Nn.f[0]++;var l,e=(Nn.s[0]++,this),o=(Nn.s[1]++,In.documentElement.doScroll),t=(Nn.s[2]++,"DOMContentLoaded"),i=(Nn.s[3]++,(o?(Nn.b[0][0]++,/^loaded|^c/):(Nn.b[0][1]++,/^loaded|^i|^c/)).test(In.readyState));Nn.s[4]++,i?(Nn.b[1][1]++,Nn.s[9]++,e.DOMLoaded=!0,Nn.s[10]++,n()):(Nn.b[1][0]++,Nn.s[5]++,In.addEventListener(t,l=function(){Nn.f[1]++,Nn.s[6]++,In.removeEventListener(t,l),Nn.s[7]++,e.DOMLoaded=!0,Nn.s[8]++,n()}))}var Ln,Pn,Gn,On,Rn,Wn,Dn=(Ln="/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js",Pn="9672a0b353765779a59d989f58a23f3035bb7516",Gn=new function(){}.constructor("return this")(),Rn={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js",statementMap:{0:{start:{line:11,column:2},end:{line:11,column:58}}},fnMap:{0:{name:"escapeRegex",decl:{start:{line:10,column:24},end:{line:10,column:35}},loc:{start:{line:10,column:40},end:{line:12,column:1}},line:10}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Wn=Gn[On="__coverage__"]||(Gn[On]={}))[Ln]&&Wn[Ln].hash===Pn?Wn[Ln]:(Rn.hash=Pn,Wn[Ln]=Rn));function qn(n){return Dn.f[0]++,Dn.s[0]++,String(n).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}var Hn,zn,Kn,Fn,Vn,Zn,Jn=(Hn="/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js",zn="af2b6a3c72edb825a75cf9ee73b16bd533be4472",Kn=new function(){}.constructor("return this")(),Vn={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js",statementMap:{0:{start:{line:13,column:24},end:{line:17,column:19}},1:{start:{line:18,column:2},end:{line:18,column:70}}},fnMap:{0:{name:"removeClass",decl:{start:{line:12,column:24},end:{line:12,column:35}},loc:{start:{line:12,column:57},end:{line:19,column:1}},line:12}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Zn=Kn[Fn="__coverage__"]||(Kn[Fn]={}))[Hn]&&Zn[Hn].hash===zn?Zn[Hn]:(Vn.hash=zn,Zn[Hn]=Vn));function Yn(n,l){Jn.f[0]++;var e=(Jn.s[0]++,new RegExp(["(^|\\b)",qn(l.split(" ").join("|")),"(\\b|$)"].join(""),"gi"));Jn.s[1]++,n.className=n.className.replace(e," ")}var Qn,$n,Xn,nl,ll,el,ol=(Qn="/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js",$n="bc64b7e7bc5f38f1a5ee4dcbab1f4e3ef2fa8240",Xn=new function(){}.constructor("return this")(),ll={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:34}},1:{start:{line:15,column:2},end:{line:18,column:14}}},fnMap:{0:{name:"addClass",decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:54},end:{line:19,column:1}},line:12}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(el=Xn[nl="__coverage__"]||(Xn[nl]={}))[Qn]&&el[Qn].hash===$n?el[Qn]:(ll.hash=$n,el[Qn]=ll));function tl(n,l){ol.f[0]++,ol.s[0]++,Yn(n,l),ol.s[1]++,n.className=[n.className,l].join(" ")}var il,cl,al,sl,ul,ml,rl=(il="/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js",cl="1b19d272ca97fd27026e8edda647250432c9e60b",al=new function(){}.constructor("return this")(),ul={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js",statementMap:{0:{start:{line:14,column:2},end:{line:14,column:94}}},fnMap:{0:{name:"hasClass",decl:{start:{line:13,column:24},end:{line:13,column:32}},loc:{start:{line:13,column:54},end:{line:15,column:1}},line:13}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ml=al[sl="__coverage__"]||(al[sl]={}))[il]&&ml[il].hash===cl?ml[il]:(ul.hash=cl,ml[il]=ul));function dl(n,l){return rl.f[0]++,rl.s[0]++,new RegExp("(^| )"+qn(l)+"( |$)","gi").test(n.className)}var pl,fl,bl,hl,vl,yl,gl=(pl="/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",fl="f3a0b5e86f52c2bc4177b242aaae0316e462ea14",bl=new function(){}.constructor("return this")(),vl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",statementMap:{0:{start:{line:12,column:2},end:{line:16,column:3}},1:{start:{line:13,column:4},end:{line:13,column:33}},2:{start:{line:15,column:4},end:{line:15,column:13}}},fnMap:{0:{name:"decodeSafe",decl:{start:{line:11,column:24},end:{line:11,column:34}},loc:{start:{line:11,column:39},end:{line:17,column:1}},line:11}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(yl=bl[hl="__coverage__"]||(bl[hl]={}))[pl]&&yl[pl].hash===fl?yl[pl]:(vl.hash=fl,yl[pl]=vl));function wl(l){gl.f[0]++,gl.s[0]++;try{return gl.s[1]++,decodeURIComponent(l)}catch(n){return gl.s[2]++,l}}var Ml,_l,Sl,jl,Cl,Al,xl=(Ml="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js",_l="abdbad47d914cdfe3840e45f0e7116e832b6677d",Sl=new function(){}.constructor("return this")(),Cl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js",statementMap:{0:{start:{line:18,column:16},end:{line:18,column:31}},1:{start:{line:19,column:25},end:{line:19,column:112}},2:{start:{line:22,column:2},end:{line:24,column:3}},3:{start:{line:23,column:4},end:{line:23,column:91}},4:{start:{line:26,column:2},end:{line:30,column:3}},5:{start:{line:27,column:14},end:{line:27,column:36}},6:{start:{line:29,column:4},end:{line:29,column:27}},7:{start:{line:32,column:2},end:{line:32,column:14}}},fnMap:{0:{name:"readCookie",decl:{start:{line:17,column:24},end:{line:17,column:34}},loc:{start:{line:17,column:42},end:{line:33,column:1}},line:17}},branchMap:{0:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22},1:{loc:{start:{line:26,column:2},end:{line:30,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:30,column:3}},{start:{line:26,column:2},end:{line:30,column:3}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Al=Sl[jl="__coverage__"]||(Sl[jl]={}))[Ml]&&Al[Ml].hash===_l?Al[Ml]:(Cl.hash=_l,Al[Ml]=Cl));function Ul(n){xl.f[0]++;var l=(xl.s[0]++,In.cookie),e=(xl.s[1]++,l.match("(^|;)\\s*"+encodeURIComponent(qn(n))+"\\s*=\\s*([^;]+)"));if(xl.s[2]++,null==e?(xl.b[0][0]++,xl.s[3]++,e=l.match("(^|;)\\s*"+qn(n)+"\\s*=\\s*([^;]+)")):xl.b[0][1]++,xl.s[4]++,null==e)return xl.b[1][1]++,xl.s[7]++,null;xl.b[1][0]++;var o=(xl.s[5]++,e.pop());return xl.s[6]++,wl(o)}var kl,El,Tl,Il,Nl,Bl,Ll=(kl="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js",El="189688cc883d2d348d321d4d99884f004b004228",Tl=new function(){}.constructor("return this")(),Nl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js",statementMap:{0:{start:{line:16,column:2},end:{line:20,column:3}},1:{start:{line:17,column:4},end:{line:17,column:54}},2:{start:{line:19,column:4},end:{line:19,column:28}},3:{start:{line:22,column:2},end:{line:28,column:13}}},fnMap:{0:{name:"saveCookie",decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:61},end:{line:29,column:1}},line:13}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:16,column:2},end:{line:20,column:3}},{start:{line:16,column:2},end:{line:20,column:3}}],line:16}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Bl=Tl[Il="__coverage__"]||(Tl[Il]={}))[kl]&&Bl[kl].hash===El?Bl[kl]:(Nl.hash=El,Bl[kl]=Nl));function Pl(n,l,e){var o;Ll.f[0]++,Ll.s[0]++,o=e?(Ll.b[0][0]++,Ll.s[1]++,"; expires="+e.toUTCString()):(Ll.b[0][1]++,Ll.s[2]++,"; expires=0"),Ll.s[3]++,In.cookie=[encodeURIComponent(n),"=",encodeURIComponent(l),o,"; path = /"].join("")}var Gl,Ol,Rl,Wl,Dl,ql,Hl=(Gl="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js",Ol="1e40de4ae30d5133b30ef558131106377822421e",Rl=new function(){}.constructor("return this")(),Dl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js",statementMap:{0:{start:{line:12,column:13},end:{line:12,column:54}},1:{start:{line:13,column:2},end:{line:13,column:29}}},fnMap:{0:{name:"deleteCookie",decl:{start:{line:11,column:24},end:{line:11,column:36}},loc:{start:{line:11,column:44},end:{line:14,column:1}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ql=Rl[Wl="__coverage__"]||(Rl[Wl]={}))[Gl]&&ql[Gl].hash===Ol?ql[Gl]:(Dl.hash=Ol,ql[Gl]=Dl));function zl(n){Hl.f[0]++;var l=(Hl.s[0]++,new Date("Thu, 01 Jan 1970 00:00:01 GMT"));Hl.s[1]++,Pl(n,"",l)}var Kl,Fl,Vl,Zl,Jl,Yl,Ql=(Kl="/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js",Fl="456c8431e84a81a68a91d3896ab3ad390e8ff602",Vl=new function(){}.constructor("return this")(),Jl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js",statementMap:{0:{start:{line:2,column:18},end:{line:2,column:21}},1:{start:{line:3,column:18},end:{line:3,column:21}},2:{start:{line:4,column:26},end:{line:4,column:36}},3:{start:{line:7,column:2},end:{line:11,column:3}},4:{start:{line:8,column:4},end:{line:8,column:28}},5:{start:{line:15,column:2},end:{line:15,column:86}},6:{start:{line:18,column:2},end:{line:18,column:46}},7:{start:{line:23,column:21},end:{line:23,column:46}},8:{start:{line:24,column:17},end:{line:24,column:42}},9:{start:{line:26,column:4},end:{line:36,column:5}},10:{start:{line:27,column:6},end:{line:30,column:7}},11:{start:{line:28,column:8},end:{line:28,column:37}},12:{start:{line:29,column:8},end:{line:29,column:20}},13:{start:{line:31,column:6},end:{line:35,column:7}},14:{start:{line:33,column:8},end:{line:33,column:47}},15:{start:{line:34,column:8},end:{line:34,column:35}},16:{start:{line:37,column:4},end:{line:37,column:22}},17:{start:{line:41,column:4},end:{line:44,column:5}},18:{start:{line:42,column:6},end:{line:42,column:29}},19:{start:{line:43,column:6},end:{line:43,column:51}},20:{start:{line:46,column:17},end:{line:46,column:19}},21:{start:{line:48,column:4},end:{line:48,column:39}},22:{start:{line:49,column:4},end:{line:49,column:36}},23:{start:{line:50,column:4},end:{line:50,column:45}},24:{start:{line:52,column:4},end:{line:52,column:54}},25:{start:{line:56,column:4},end:{line:56,column:33}},26:{start:{line:60,column:4},end:{line:62,column:5}},27:{start:{line:61,column:6},end:{line:61,column:56}},28:{start:{line:63,column:15},end:{line:63,column:25}},29:{start:{line:65,column:4},end:{line:65,column:64}},30:{start:{line:67,column:4},end:{line:67,column:37}},31:{start:{line:71,column:4},end:{line:78,column:5}},32:{start:{line:72,column:16},end:{line:72,column:35}},33:{start:{line:73,column:19},end:{line:73,column:59}},34:{start:{line:75,column:6},end:{line:77,column:7}},35:{start:{line:76,column:8},end:{line:76,column:37}}},fnMap:{0:{name:"safeJsonParse",decl:{start:{line:6,column:9},end:{line:6,column:22}},loc:{start:{line:6,column:30},end:{line:12,column:1}},line:6},1:{name:"isExpired",decl:{start:{line:14,column:9},end:{line:14,column:18}},loc:{start:{line:14,column:28},end:{line:16,column:1}},line:14},2:{name:"isCreatedByThisLib",decl:{start:{line:17,column:9},end:{line:17,column:27}},loc:{start:{line:17,column:37},end:{line:19,column:1}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:22,column:11},end:{line:22,column:12}},loc:{start:{line:22,column:26},end:{line:38,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:40,column:11},end:{line:40,column:12}},loc:{start:{line:40,column:46},end:{line:53,column:3}},line:40},5:{name:"(anonymous_5)",decl:{start:{line:55,column:14},end:{line:55,column:15}},loc:{start:{line:55,column:29},end:{line:57,column:3}},line:55},6:{name:"(anonymous_6)",decl:{start:{line:59,column:7},end:{line:59,column:8}},loc:{start:{line:59,column:45},end:{line:68,column:3}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:70,column:22},end:{line:70,column:23}},loc:{start:{line:70,column:34},end:{line:79,column:3}},line:70}},branchMap:{0:{loc:{start:{line:15,column:9},end:{line:15,column:85}},type:"binary-expr",locations:[{start:{line:15,column:9},end:{line:15,column:37}},{start:{line:15,column:41},end:{line:15,column:85}}],line:15},1:{loc:{start:{line:26,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:26,column:4},end:{line:36,column:5}},{start:{line:26,column:4},end:{line:36,column:5}}],line:26},2:{loc:{start:{line:26,column:8},end:{line:26,column:39}},type:"binary-expr",locations:[{start:{line:26,column:8},end:{line:26,column:14}},{start:{line:26,column:18},end:{line:26,column:39}}],line:26},3:{loc:{start:{line:27,column:6},end:{line:30,column:7}},type:"if",locations:[{start:{line:27,column:6},end:{line:30,column:7}},{start:{line:27,column:6},end:{line:30,column:7}}],line:27},4:{loc:{start:{line:31,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:31,column:6},end:{line:35,column:7}},{start:{line:31,column:6},end:{line:35,column:7}}],line:31},5:{loc:{start:{line:41,column:4},end:{line:44,column:5}},type:"if",locations:[{start:{line:41,column:4},end:{line:44,column:5}},{start:{line:41,column:4},end:{line:44,column:5}}],line:41},6:{loc:{start:{line:60,column:4},end:{line:62,column:5}},type:"if",locations:[{start:{line:60,column:4},end:{line:62,column:5}},{start:{line:60,column:4},end:{line:62,column:5}}],line:60},7:{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:"if",locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},8:{loc:{start:{line:75,column:10},end:{line:75,column:67}},type:"binary-expr",locations:[{start:{line:75,column:10},end:{line:75,column:16}},{start:{line:75,column:20},end:{line:75,column:46}},{start:{line:75,column:50},end:{line:75,column:67}}],line:75}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Yl=Vl[Zl="__coverage__"]||(Vl[Zl]={}))[Kl]&&Yl[Kl].hash===Fl?Yl[Kl]:(Jl.hash=Fl,Yl[Kl]=Jl)),$l=(Ql.s[0]++,"$"),Xl=(Ql.s[1]++,"@"),ne=(Ql.s[2]++,"PATHFORA");function le(n){Ql.f[0]++,Ql.s[3]++;try{return Ql.s[4]++,JSON.parse(n)}catch(n){}}function ee(n){return Ql.f[1]++,Ql.s[5]++,Ql.b[0][0]++,Boolean(n[Xl])&&(Ql.b[0][1]++,Date.parse(n[Xl])>5]&1<<(31&e)));var l,e,o}vo.s[10]++;for(var u=0;u>4),a(15&r))):(vo.b[8][1]++,vo.s[19]++,o.push(m))))}return vo.s[20]++,o.join("")}var go,wo,Mo,_o,So,jo,Co=(go="/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js",wo="c7d53580168d40addc52029ff65f77de30c88bc5",Mo=new function(){}.constructor("return this")(),So={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js",statementMap:{0:{start:{line:11,column:2},end:{line:22,column:3}},1:{start:{line:12,column:4},end:{line:21,column:5}},2:{start:{line:13,column:6},end:{line:18,column:7}},3:{start:{line:14,column:8},end:{line:16,column:9}},4:{start:{line:15,column:10},end:{line:15,column:28}},5:{start:{line:17,column:8},end:{line:17,column:49}},6:{start:{line:19,column:11},end:{line:21,column:5}},7:{start:{line:20,column:6},end:{line:20,column:34}}},fnMap:{0:{name:"updateObject",decl:{start:{line:10,column:24},end:{line:10,column:36}},loc:{start:{line:10,column:54},end:{line:23,column:1}},line:10}},branchMap:{0:{loc:{start:{line:12,column:4},end:{line:21,column:5}},type:"if",locations:[{start:{line:12,column:4},end:{line:21,column:5}},{start:{line:12,column:4},end:{line:21,column:5}}],line:12},1:{loc:{start:{line:12,column:8},end:{line:12,column:128}},type:"binary-expr",locations:[{start:{line:12,column:8},end:{line:12,column:35}},{start:{line:12,column:39},end:{line:12,column:71}},{start:{line:12,column:75},end:{line:12,column:96}},{start:{line:12,column:100},end:{line:12,column:128}}],line:12},2:{loc:{start:{line:13,column:6},end:{line:18,column:7}},type:"if",locations:[{start:{line:13,column:6},end:{line:18,column:7}},{start:{line:13,column:6},end:{line:18,column:7}}],line:13},3:{loc:{start:{line:14,column:8},end:{line:16,column:9}},type:"if",locations:[{start:{line:14,column:8},end:{line:16,column:9}},{start:{line:14,column:8},end:{line:16,column:9}}],line:14},4:{loc:{start:{line:19,column:11},end:{line:21,column:5}},type:"if",locations:[{start:{line:19,column:11},end:{line:21,column:5}},{start:{line:19,column:11},end:{line:21,column:5}}],line:19}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0,0,0],2:[0,0],3:[0,0],4:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(jo=Mo[_o="__coverage__"]||(Mo[_o]={}))[go]&&jo[go].hash===wo?jo[go]:(So.hash=wo,jo[go]=So));function Ao(n,l){for(var e in Co.f[0]++,Co.s[0]++,l)Co.s[1]++,Co.b[1][0]++,l.hasOwnProperty(e)&&(Co.b[1][1]++,"object"==typeof l[e])&&(Co.b[1][2]++,null!==l[e])&&(Co.b[1][3]++,!Array.isArray(l[e]))?(Co.b[0][0]++,Co.s[2]++,l.hasOwnProperty(e)?(Co.b[2][0]++,Co.s[3]++,void 0===n[e]?(Co.b[3][0]++,Co.s[4]++,n[e]={}):Co.b[3][1]++,Co.s[5]++,Ao(n[e],l[e])):Co.b[2][1]++):(Co.b[0][1]++,Co.s[6]++,l.hasOwnProperty(e)?(Co.b[4][0]++,Co.s[7]++,n[e]=l[e]):Co.b[4][1]++)}var xo,Uo,ko,Eo,To,Io,No=(xo="/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js",Uo="befca9b830059b45158aa6ad58f6eb7b168d70a9",ko=new function(){}.constructor("return this")(),To={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js",statementMap:{0:{start:{line:14,column:15},end:{line:14,column:21}},1:{start:{line:15,column:15},end:{line:15,column:29}},2:{start:{line:16,column:2},end:{line:24,column:3}},3:{start:{line:17,column:15},end:{line:17,column:24}},4:{start:{line:19,column:4},end:{line:21,column:5}},5:{start:{line:20,column:6},end:{line:20,column:24}},6:{start:{line:23,column:4},end:{line:23,column:26}},7:{start:{line:26,column:2},end:{line:26,column:44}},8:{start:{line:28,column:2},end:{line:28,column:16}}},fnMap:{0:{name:"setObjectValue",decl:{start:{line:13,column:24},end:{line:13,column:38}},loc:{start:{line:13,column:60},end:{line:29,column:1}},line:13}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:21,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:21,column:5}},{start:{line:19,column:4},end:{line:21,column:5}}],line:19}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Io=ko[Eo="__coverage__"]||(ko[Eo]={}))[xo]&&Io[xo].hash===Uo?Io[xo]:(To.hash=Uo,Io[xo]=To));function Bo(n,l,e){No.f[0]++;var o=(No.s[0]++,n),t=(No.s[1]++,l.split("."));No.s[2]++;for(var i=0;i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g);return ot.s[1]++,l.test(n)}var it,ct,at,st,ut,mt,rt,dt,pt,ft,bt,ht,vt=((it="/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js",ct="1cf858a24e43f2bfe227b4ce00fbce848a684557",at=new function(){}.constructor("return this")(),ut={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js",statementMap:{0:{start:{line:46,column:19},end:{line:82,column:1}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(mt=at[st="__coverage__"]||(at[st]={}))[it]&&mt[it].hash===ct?mt[it]:(ut.hash=ct,mt[it]=ut)).s[0]++,{addClass:tl,hasClass:dl,removeClass:Yn,readCookie:Ul,saveCookie:Pl,deleteCookie:zl,updateLegacyCookies:function(){Ae.f[0]++;var l=(Ae.s[0]++,[an,sn,un,rn,dn,pn,fn,bn]),e=(Ae.s[1]++,0);function n(n){return Ae.f[1]++,Ae.s[3]++,0===n.trim().indexOf(l[e])}function o(n){Ae.f[2]++;var l=(Ae.s[5]++,n.trim().split("="));if(Ae.s[6]++,2===l.length){Ae.b[0][0]++;var e=(Ae.s[7]++,l[0]),o=(Ae.s[8]++,l[1]);Ae.s[9]++,zl(e),Ae.s[10]++,re(e,wl(o))}else Ae.b[0][1]++}function t(n){Ae.f[3]++;var l=(Ae.s[12]++,sessionStorage.getItem(n));Ae.s[13]++,ge(l)?(Ae.b[1][0]++,Ae.s[14]++,sessionStorage.removeItem(n),Ae.s[15]++,sessionStorage.setItem(encodeURIComponent(n),encodeURIComponent(l))):Ae.b[1][1]++}for(Ae.s[2]++,Ae.s[4]++,Ae.s[11]++,Ae.s[16]++,e=0;e=n.global.duration)?(qt.b[8][0]++,qt.s[24]++,p()):qt.b[8][1]++):(qt.b[7][0]++,qt.s[21]++,p())}else qt.b[5][1]++;if(qt.s[25]++,a?qt.b[10][1]++:(qt.b[10][0]++,qt.s[26]++,a=0),qt.s[27]++,a>=n.widget.session)return qt.b[11][0]++,qt.s[28]++,!1;if(qt.b[11][1]++,qt.s[29]++,r)if(qt.b[12][1]++,qt.s[31]++,e=r.split("|"),qt.s[32]++,o=parseInt(e[0],10),qt.s[33]++,void 0!==e[1]){if(qt.b[13][0]++,qt.s[34]++,qt.b[15][0]++,0=n.widget.total&&(qt.b[19][1]++,void 0===n.widget.duration))return qt.b[18][0]++,qt.s[39]++,!1;if(qt.b[18][1]++,qt.s[40]++,0=n.global.session)return qt.b[23][0]++,qt.s[46]++,!1;if(qt.b[23][1]++,qt.s[47]++,qt.b[25][0]++,0=n.global.total)return qt.b[33][0]++,qt.s[63]++,!1;qt.b[33][1]++}else qt.b[32][1]++;return qt.s[64]++,qt.b[35][0]++,u>=n.global.total&&(qt.b[35][1]++,void 0===n.global.duration)?(qt.b[34][0]++,qt.s[65]++,!1):(qt.b[34][1]++,qt.s[66]++,!0)}var zt,Kt,Ft,Vt,Zt,Jt,Yt=(zt="/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js",Kt="c888dd09b8720c5888996771d649a96c8d2aaeb5",Ft=new function(){}.constructor("return this")(),Zt={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js",statementMap:{0:{start:{line:9,column:2},end:{line:20,column:11}},1:{start:{line:11,column:6},end:{line:15,column:9}},2:{start:{line:12,column:8},end:{line:14,column:34}},3:{start:{line:18,column:6},end:{line:18,column:28}},4:{start:{line:19,column:6},end:{line:19,column:18}}},fnMap:{0:{name:"censorTrackingKeys",decl:{start:{line:8,column:24},end:{line:8,column:42}},loc:{start:{line:8,column:64},end:{line:21,column:1}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:10,column:12},end:{line:10,column:13}},loc:{start:{line:10,column:27},end:{line:16,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:11,column:32},end:{line:11,column:33}},loc:{start:{line:11,column:55},end:{line:15,column:7}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:17,column:12},end:{line:17,column:13}},loc:{start:{line:17,column:33},end:{line:20,column:5}},line:17}},branchMap:{0:{loc:{start:{line:12,column:15},end:{line:14,column:33}},type:"cond-expr",locations:[{start:{line:13,column:12},end:{line:13,column:31}},{start:{line:14,column:12},end:{line:14,column:33}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Jt=Ft[Vt="__coverage__"]||(Ft[Vt]={}))[zt]&&Jt[zt].hash===Kt?Jt[zt]:(Zt.hash=Kt,Jt[zt]=Zt));var Qt,$t,Xt,ni,li,ei,oi=(Qt="/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js",$t="02372b2a65cccf40011861d79ce348bac92a1e60",Xt=new function(){}.constructor("return this")(),li={path:"/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js",statementMap:{0:{start:{line:16,column:2},end:{line:24,column:3}},1:{start:{line:17,column:4},end:{line:21,column:6}},2:{start:{line:26,column:2},end:{line:44,column:3}},3:{start:{line:27,column:4},end:{line:27,column:66}},4:{start:{line:28,column:4},end:{line:28,column:34}},5:{start:{line:30,column:4},end:{line:43,column:5}},6:{start:{line:31,column:17},end:{line:31,column:40}},7:{start:{line:33,column:6},end:{line:42,column:8}}},fnMap:{0:{name:"reportData",decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:50},end:{line:45,column:1}},line:13}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:16,column:2},end:{line:24,column:3}},{start:{line:16,column:2},end:{line:24,column:3}}],line:16},1:{loc:{start:{line:18,column:6},end:{line:20,column:14}},type:"cond-expr",locations:[{start:{line:19,column:10},end:{line:19,column:61}},{start:{line:20,column:10},end:{line:20,column:14}}],line:18},2:{loc:{start:{line:26,column:2},end:{line:44,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:44,column:3}},{start:{line:26,column:2},end:{line:44,column:3}}],line:26},3:{loc:{start:{line:26,column:6},end:{line:26,column:116}},type:"binary-expr",locations:[{start:{line:26,column:6},end:{line:26,column:39}},{start:{line:26,column:43},end:{line:26,column:74}},{start:{line:26,column:78},end:{line:26,column:116}}],line:26},4:{loc:{start:{line:27,column:14},end:{line:27,column:65}},type:"binary-expr",locations:[{start:{line:27,column:14},end:{line:27,column:38}},{start:{line:27,column:42},end:{line:27,column:65}}],line:27}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0,0],4:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ei=Xt[ni="__coverage__"]||(Xt[ni]={}))[Qt]&&ei[Qt].hash===$t?ei[Qt]:(li.hash=$t,ei[Qt]=li));function ti(n,l){var e,o,t,i;if(oi.f[0]++,oi.s[0]++,"object"==typeof jstag?(oi.b[0][0]++,oi.s[1]++,window.jstag.send(l.censorTrackingKeys?(oi.b[1][0]++,t=n,i=l.censorTrackingKeys,Yt.f[0]++,Yt.s[0]++,Object.keys(t).filter(function(l){return Yt.f[1]++,Yt.s[1]++,!i.some(function(n){return Yt.f[2]++,Yt.s[2]++,"string"==typeof n?(Yt.b[0][0]++,l===n):(Yt.b[0][1]++,n.test(l))})}).reduce(function(n,l){return Yt.f[3]++,Yt.s[3]++,n[l]=t[l],Yt.s[4]++,n},{})):(oi.b[1][1]++,n))):oi.b[0][1]++,oi.s[2]++,oi.b[3][0]++,!0===window.pathfora.enableGA&&(oi.b[3][1]++,"function"==typeof window.ga)&&(oi.b[3][2]++,"function"==typeof window.ga.getAll)){oi.b[2][0]++,oi.s[3]++,oi.b[4][0]++,e=n["pf-widget-action"]||(oi.b[4][1]++,n["pf-widget-event"]),oi.s[4]++,o=window.ga.getAll(),oi.s[5]++;for(var c=0;c*'):ea.b[12][1]++,ea.s[43]++,s.appendChild(i)):ea.b[10][1]++,ea.s[44]++,!0===n.required?(ea.b[13][0]++,ea.s[45]++,tl(s,"pf-form-required"),ea.s[46]++,e.setAttribute("data-required","true"),ea.s[47]++,n.label?(ea.b[14][0]++,ea.s[48]++,c=In.createElement("div"),ea.s[49]++,c.className="pf-required-flag",ea.s[50]++,c.innerHTML="required",ea.s[51]++,a=In.createElement("span"),ea.s[52]++,c.appendChild(a),ea.s[53]++,s.appendChild(c)):ea.b[14][1]++):ea.b[13][1]++,ea.s[54]++,ea.b[16][0]++,"date"===n.type||(ea.b[16][1]++,"email"===n.type)?(ea.b[15][0]++,ea.s[55]++,tl(s,"pf-form-required"),ea.s[56]++,e.setAttribute("data-validate","true"),ea.s[57]++,n.label?(ea.b[17][0]++,ea.s[58]++,c=In.createElement("div"),ea.s[59]++,c.className="pf-invalid-flag",ea.s[60]++,c.innerHTML="invalid",ea.s[61]++,a=In.createElement("span"),ea.s[62]++,c.appendChild(a),ea.s[63]++,s.appendChild(c)):ea.b[17][1]++):ea.b[15][1]++,ea.s[64]++,n.placeholder){if(ea.b[18][0]++,ea.s[65]++,"select"===n.type){ea.b[19][0]++;var b=(ea.s[66]++,In.createElement("option"));ea.s[67]++,b.setAttribute("value",""),ea.s[68]++,b.innerHTML=n.placeholder,ea.s[69]++,e.appendChild(b)}else ea.b[19][1]++,ea.s[70]++,e.placeholder=n.placeholder;ea.s[71]++,n.label?ea.b[20][1]++:(ea.b[20][0]++,ea.s[72]++,e.setAttribute("aria-label",n.placeholder))}else ea.b[18][1]++;if(ea.s[73]++,n.values)for(ea.b[21][0]++,ea.s[74]++,o=0;oo.display.descriptionLimit&&(qc.b[25][1]++,-1!==o.display.descriptionLimit)?(qc.b[24][0]++,qc.s[48]++,p=p.substring(0,o.display.descriptionLimit),qc.s[49]++,p=p.substring(0,p.lastIndexOf(" "))+"..."):qc.b[24][1]++,qc.s[50]++,s.innerHTML=p,qc.s[51]++,c.appendChild(s)}else qc.b[19][1]++;qc.s[52]++,e.appendChild(c)}else qc.b[2][1]++;else qc.b[0][1]++}(o,n),es.s[8]++,l=o,e=n,Jc.f[0]++,Jc.s[0]++,l.className=["pf-widget ","pf-"+e.type," pf-widget-"+e.layout,e.position?(Jc.b[0][0]++," pf-position-"+e.position):(Jc.b[0][1]++,""),e.pushDown?(Jc.b[1][0]++," pf-has-push-down"):(Jc.b[1][1]++,""),e.origin?(Jc.b[2][0]++," pf-origin-"+e.origin):(Jc.b[2][1]++,"")," pf-widget-variant-"+e.variant,e.theme?(Jc.b[3][0]++," pf-theme-"+e.theme):(Jc.b[3][1]++,""),e.className?(Jc.b[4][0]++," "+e.className):(Jc.b[4][1]++,""),e.branding?(Jc.b[5][0]++," pf-widget-has-branding"):(Jc.b[5][1]++,""),e.responsive?(Jc.b[6][1]++,""):(Jc.b[6][0]++," pf-mobile-hide")].join(""),es.s[9]++,Ba(o,n),es.s[10]++,function(n,l){switch(Ja.f[0]++,Ja.s[0]++,l.theme){case"custom":Ja.b[0][0]++,Ja.s[1]++,l.colors?(Ja.b[1][0]++,Ja.s[2]++,qa(n,l.colors)):Ja.b[1][1]++,Ja.s[3]++;break;case"none":Ja.b[0][1]++,Ja.s[4]++;break;default:Ja.b[0][2]++,Ja.s[5]++,l.theme?(Ja.b[2][0]++,Ja.s[6]++,qa(n,Un.generic.themes[l.theme])):Ja.b[2][1]++,Ja.s[7]++}}(o,n),es.s[11]++,o}var ts,is,cs,as,ss,us,ms=(ts="/Users/ash/lytics/pathforajs/src/rollup/widgets/widget-resize-listener.js",is="29ffa03c0f47601f34ee6bfd799f1aa033e2d063",cs=new function(){}.constructor("return this")(),ss={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/widget-resize-listener.js",statementMap:{0:{start:{line:19,column:2},end:{line:28,column:3}},1:{start:{line:20,column:14},end:{line:20,column:52}},2:{start:{line:21,column:4},end:{line:27,column:5}},3:{start:{line:22,column:6},end:{line:26,column:7}},4:{start:{line:23,column:8},end:{line:23,column:31}},5:{start:{line:24,column:13},end:{line:26,column:7}},6:{start:{line:25,column:8},end:{line:25,column:34}}},fnMap:{0:{name:"widgetResizeListener",decl:{start:{line:18,column:24},end:{line:18,column:44}},loc:{start:{line:18,column:60},end:{line:29,column:1}},line:18}},branchMap:{0:{loc:{start:{line:19,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:28,column:3}},{start:{line:19,column:2},end:{line:28,column:3}}],line:19},1:{loc:{start:{line:19,column:6},end:{line:19,column:81}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:32}},{start:{line:19,column:36},end:{line:19,column:61}},{start:{line:19,column:65},end:{line:19,column:81}}],line:19},2:{loc:{start:{line:21,column:4},end:{line:27,column:5}},type:"if",locations:[{start:{line:21,column:4},end:{line:27,column:5}},{start:{line:21,column:4},end:{line:27,column:5}}],line:21},3:{loc:{start:{line:22,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:26,column:7}},{start:{line:22,column:6},end:{line:26,column:7}}],line:22},4:{loc:{start:{line:22,column:10},end:{line:22,column:72}},type:"binary-expr",locations:[{start:{line:22,column:10},end:{line:22,column:45}},{start:{line:22,column:49},end:{line:22,column:72}}],line:22},5:{loc:{start:{line:24,column:13},end:{line:26,column:7}},type:"if",locations:[{start:{line:24,column:13},end:{line:26,column:7}},{start:{line:24,column:13},end:{line:26,column:7}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(us=cs[as="__coverage__"]||(cs[as]={}))[ts]&&us[ts].hash===is?us[ts]:(ss.hash=is,us[ts]=ss));function rs(n,l){if(ms.f[0]++,ms.s[0]++,ms.b[1][0]++,"inline"===n.layout||(ms.b[1][1]++,"modal"===n.layout&&(ms.b[1][2]++,n.recommend))){ms.b[0][0]++;var e=(ms.s[1]++,l.querySelector(".pf-content-unit"));ms.s[2]++,e?(ms.b[2][0]++,ms.s[3]++,ms.b[4][0]++,l.offsetWidth=yn?(ms.b[5][0]++,ms.s[6]++,Yn(e,"stack")):ms.b[5][1]++)):ms.b[2][1]++}else ms.b[0][1]++}var ds,ps,fs,bs,hs,vs,ys=(ds="/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js",ps="5bebecf10199f15959bedc7da442bae714518f0a",fs=new function(){}.constructor("return this")(),hs={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js",statementMap:{0:{start:{line:32,column:19},end:{line:152,column:3}},1:{start:{line:34,column:4},end:{line:38,column:5}},2:{start:{line:35,column:6},end:{line:37,column:7}},3:{start:{line:36,column:8},end:{line:36,column:15}},4:{start:{line:40,column:4},end:{line:40,column:45}},5:{start:{line:41,column:4},end:{line:41,column:38}},6:{start:{line:44,column:4},end:{line:44,column:33}},7:{start:{line:48,column:4},end:{line:53,column:5}},8:{start:{line:49,column:6},end:{line:49,column:38}},9:{start:{line:51,column:6},end:{line:51,column:40}},10:{start:{line:52,column:6},end:{line:52,column:29}},11:{start:{line:55,column:4},end:{line:57,column:5}},12:{start:{line:56,column:6},end:{line:56,column:66}},13:{start:{line:59,column:4},end:{line:102,column:5}},14:{start:{line:63,column:6},end:{line:63,column:38}},15:{start:{line:65,column:6},end:{line:89,column:7}},16:{start:{line:67,column:24},end:{line:69,column:9}},17:{start:{line:71,column:8},end:{line:88,column:9}},18:{start:{line:72,column:10},end:{line:87,column:12}},19:{start:{line:77,column:14},end:{line:85,column:15}},20:{start:{line:78,column:16},end:{line:84,column:17}},21:{start:{line:79,column:18},end:{line:79,column:38}},22:{start:{line:80,column:18},end:{line:80,column:39}},23:{start:{line:81,column:23},end:{line:84,column:17}},24:{start:{line:82,column:18},end:{line:82,column:38}},25:{start:{line:83,column:18},end:{line:83,column:39}},26:{start:{line:92,column:21},end:{line:93,column:65}},27:{start:{line:94,column:21},end:{line:94,column:53}},28:{start:{line:96,column:6},end:{line:101,column:7}},29:{start:{line:97,column:8},end:{line:97,column:35}},30:{start:{line:99,column:8},end:{line:99,column:42}},31:{start:{line:100,column:8},end:{line:100,column:74}},32:{start:{line:106,column:4},end:{line:126,column:11}},33:{start:{line:107,column:31},end:{line:107,column:51}},34:{start:{line:109,column:6},end:{line:109,column:31}},35:{start:{line:111,column:6},end:{line:116,column:7}},36:{start:{line:112,column:8},end:{line:115,column:11}},37:{start:{line:117,column:6},end:{line:125,column:7}},38:{start:{line:121,column:8},end:{line:124,column:11}},39:{start:{line:128,column:4},end:{line:132,column:5}},40:{start:{line:129,column:6},end:{line:131,column:52}},41:{start:{line:130,column:8},end:{line:130,column:37}},42:{start:{line:134,column:4},end:{line:134,column:39}},43:{start:{line:136,column:4},end:{line:142,column:6}},44:{start:{line:140,column:8},end:{line:140,column:43}},45:{start:{line:144,column:4},end:{line:151,column:5}},46:{start:{line:145,column:6},end:{line:150,column:7}},47:{start:{line:146,column:18},end:{line:146,column:39}},48:{start:{line:147,column:8},end:{line:149,column:9}},49:{start:{line:148,column:10},end:{line:148,column:56}},50:{start:{line:154,column:29},end:{line:154,column:37}},51:{start:{line:155,column:2},end:{line:159,column:3}},52:{start:{line:156,column:4},end:{line:158,column:7}},53:{start:{line:162,column:2},end:{line:169,column:3}},54:{start:{line:163,column:4},end:{line:166,column:45}},55:{start:{line:164,column:6},end:{line:164,column:20}},56:{start:{line:165,column:6},end:{line:165,column:54}},57:{start:{line:168,column:4},end:{line:168,column:18}}},fnMap:{0:{name:"showWidget",decl:{start:{line:31,column:24},end:{line:31,column:34}},loc:{start:{line:31,column:39},end:{line:170,column:1}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:32,column:19},end:{line:32,column:20}},loc:{start:{line:32,column:37},end:{line:152,column:3}},line:32},2:{name:"(anonymous_2)",decl:{start:{line:75,column:16},end:{line:75,column:17}},loc:{start:{line:75,column:30},end:{line:86,column:13}},line:75},3:{name:"(anonymous_3)",decl:{start:{line:106,column:15},end:{line:106,column:16}},loc:{start:{line:106,column:27},end:{line:126,column:5}},line:106},4:{name:"(anonymous_4)",decl:{start:{line:129,column:17},end:{line:129,column:18}},loc:{start:{line:129,column:29},end:{line:131,column:7}},line:129},5:{name:"(anonymous_5)",decl:{start:{line:139,column:10},end:{line:139,column:11}},loc:{start:{line:139,column:22},end:{line:141,column:7}},line:139},6:{name:"(anonymous_6)",decl:{start:{line:163,column:52},end:{line:163,column:53}},loc:{start:{line:163,column:64},end:{line:166,column:5}},line:163}},branchMap:{0:{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:"if",locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},1:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},2:{loc:{start:{line:59,column:4},end:{line:102,column:5}},type:"if",locations:[{start:{line:59,column:4},end:{line:102,column:5}},{start:{line:59,column:4},end:{line:102,column:5}}],line:59},3:{loc:{start:{line:60,column:6},end:{line:61,column:39}},type:"binary-expr",locations:[{start:{line:60,column:6},end:{line:60,column:44}},{start:{line:61,column:6},end:{line:61,column:39}}],line:60},4:{loc:{start:{line:65,column:6},end:{line:89,column:7}},type:"if",locations:[{start:{line:65,column:6},end:{line:89,column:7}},{start:{line:65,column:6},end:{line:89,column:7}}],line:65},5:{loc:{start:{line:65,column:10},end:{line:65,column:65}},type:"binary-expr",locations:[{start:{line:65,column:10},end:{line:65,column:35}},{start:{line:65,column:39},end:{line:65,column:65}}],line:65},6:{loc:{start:{line:71,column:8},end:{line:88,column:9}},type:"if",locations:[{start:{line:71,column:8},end:{line:88,column:9}},{start:{line:71,column:8},end:{line:88,column:9}}],line:71},7:{loc:{start:{line:77,column:14},end:{line:85,column:15}},type:"if",locations:[{start:{line:77,column:14},end:{line:85,column:15}},{start:{line:77,column:14},end:{line:85,column:15}}],line:77},8:{loc:{start:{line:78,column:16},end:{line:84,column:17}},type:"if",locations:[{start:{line:78,column:16},end:{line:84,column:17}},{start:{line:78,column:16},end:{line:84,column:17}}],line:78},9:{loc:{start:{line:81,column:23},end:{line:84,column:17}},type:"if",locations:[{start:{line:81,column:23},end:{line:84,column:17}},{start:{line:81,column:23},end:{line:84,column:17}}],line:81},10:{loc:{start:{line:92,column:21},end:{line:93,column:65}},type:"cond-expr",locations:[{start:{line:93,column:10},end:{line:93,column:32}},{start:{line:93,column:35},end:{line:93,column:65}}],line:92},11:{loc:{start:{line:96,column:6},end:{line:101,column:7}},type:"if",locations:[{start:{line:96,column:6},end:{line:101,column:7}},{start:{line:96,column:6},end:{line:101,column:7}}],line:96},12:{loc:{start:{line:111,column:6},end:{line:116,column:7}},type:"if",locations:[{start:{line:111,column:6},end:{line:116,column:7}},{start:{line:111,column:6},end:{line:116,column:7}}],line:111},13:{loc:{start:{line:117,column:6},end:{line:125,column:7}},type:"if",locations:[{start:{line:117,column:6},end:{line:125,column:7}},{start:{line:117,column:6},end:{line:125,column:7}}],line:117},14:{loc:{start:{line:118,column:8},end:{line:119,column:55}},type:"binary-expr",locations:[{start:{line:118,column:8},end:{line:118,column:40}},{start:{line:119,column:8},end:{line:119,column:55}}],line:118},15:{loc:{start:{line:128,column:4},end:{line:132,column:5}},type:"if",locations:[{start:{line:128,column:4},end:{line:132,column:5}},{start:{line:128,column:4},end:{line:132,column:5}}],line:128},16:{loc:{start:{line:145,column:6},end:{line:150,column:7}},type:"if",locations:[{start:{line:145,column:6},end:{line:150,column:7}},{start:{line:145,column:6},end:{line:150,column:7}}],line:145},17:{loc:{start:{line:147,column:8},end:{line:149,column:9}},type:"if",locations:[{start:{line:147,column:8},end:{line:149,column:9}},{start:{line:147,column:8},end:{line:149,column:9}}],line:147},18:{loc:{start:{line:147,column:12},end:{line:147,column:75}},type:"binary-expr",locations:[{start:{line:147,column:12},end:{line:147,column:22}},{start:{line:147,column:26},end:{line:147,column:75}}],line:147},19:{loc:{start:{line:155,column:2},end:{line:159,column:3}},type:"if",locations:[{start:{line:155,column:2},end:{line:159,column:3}},{start:{line:155,column:2},end:{line:159,column:3}}],line:155},20:{loc:{start:{line:162,column:2},end:{line:169,column:3}},type:"if",locations:[{start:{line:162,column:2},end:{line:169,column:3}},{start:{line:162,column:2},end:{line:169,column:3}}],line:162},21:{loc:{start:{line:162,column:6},end:{line:162,column:58}},type:"binary-expr",locations:[{start:{line:162,column:6},end:{line:162,column:25}},{start:{line:162,column:29},end:{line:162,column:58}}],line:162}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(vs=fs[bs="__coverage__"]||(fs[bs]={}))[ds]&&vs[ds].hash===ps?vs[ds]:(hs.hash=ps,vs[ds]=hs));function gs(n){ys.f[0]++,ys.s[0]++;function l(l){ys.f[1]++,ys.s[1]++;for(var n=0;n=n.length)return lr.b[0][0]++,void lr.s[4]++;lr.b[0][1]++;var o=(lr.s[5]++,n[l]),t=(lr.s[6]++,Un[o.type]),i=(lr.s[7]++,Un.generic);if(lr.s[8]++,Ao(o,i),lr.s[9]++,Ao(o,t),lr.s[10]++,Ao(o,o.config),lr.s[11]++,!(xn.initializedWidgets.indexOf(o.id)<0))throw lr.b[1][1]++,lr.s[13]++,new Error("Cannot add two widgets with the same id");lr.b[1][0]++,lr.s[12]++,xn.initializedWidgets.push(o.id),lr.s[14]++,o.success?(lr.b[2][0]++,lr.s[15]++,o.formStates?lr.b[3][1]++:(lr.b[3][0]++,lr.s[16]++,o.formStates={}),lr.s[17]++,o.formStates.success?lr.b[4][1]++:(lr.b[4][0]++,lr.s[18]++,o.formStates.success=o.success)):lr.b[2][1]++,lr.s[19]++,rm(o,c,function(){lr.f[2]++,lr.s[20]++,Zm(o,c,function(){if(lr.f[3]++,lr.s[21]++,c.initializeWidget(o,e),lr.s[22]++,lr.b[6][0]++,e&&(lr.b[6][1]++,e.priority===Sn)){if(lr.b[5][0]++,lr.s[23]++,lr.b[8][0]++,xn.prioritizedWidgets.length&&(lr.b[8][1]++,xn.prioritizedWidgets[0].id===o.id))return lr.b[7][0]++,void lr.s[24]++;lr.b[7][1]++,lr.s[25]++,a(n,l+1,e)}else lr.b[5][1]++})}),lr.s[26]++,lr.b[10][0]++,e&&(lr.b[10][1]++,e.priority===Sn)?lr.b[9][1]++:(lr.b[9][0]++,lr.s[27]++,a(n,l+1,e))};lr.s[28]++,a(n,0,l)}var or,tr,ir,cr,ar,sr,ur=(or="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js",tr="8fbdbfdbd7ed43bc0f01f77d8e1b86f99e6ed67d",ir=new function(){}.constructor("return this")(),ar={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js",statementMap:{0:{start:{line:26,column:2},end:{line:28,column:3}},1:{start:{line:27,column:4},end:{line:27,column:16}},2:{start:{line:32,column:19},end:{line:32,column:52}},3:{start:{line:33,column:13},end:{line:33,column:18}},4:{start:{line:36,column:2},end:{line:41,column:3}},5:{start:{line:37,column:4},end:{line:37,column:31}},6:{start:{line:38,column:4},end:{line:38,column:72}},7:{start:{line:39,column:4},end:{line:39,column:57}},8:{start:{line:40,column:4},end:{line:40,column:16}},9:{start:{line:44,column:2},end:{line:112,column:3}},10:{start:{line:46,column:19},end:{line:46,column:49}},11:{start:{line:47,column:16},end:{line:47,column:35}},12:{start:{line:48,column:14},end:{line:48,column:16}},13:{start:{line:51,column:4},end:{line:53,column:5}},14:{start:{line:52,column:6},end:{line:52,column:28}},15:{start:{line:56,column:16},end:{line:56,column:42}},16:{start:{line:65,column:4},end:{line:74,column:5}},17:{start:{line:66,column:6},end:{line:66,column:32}},18:{start:{line:68,column:11},end:{line:74,column:5}},19:{start:{line:70,column:19},end:{line:70,column:43}},20:{start:{line:71,column:6},end:{line:73,column:7}},21:{start:{line:72,column:8},end:{line:72,column:35}},22:{start:{line:77,column:4},end:{line:81,column:5}},23:{start:{line:78,column:6},end:{line:80,column:7}},24:{start:{line:79,column:8},end:{line:79,column:36}},25:{start:{line:84,column:4},end:{line:92,column:5}},26:{start:{line:85,column:6},end:{line:85,column:27}},27:{start:{line:87,column:6},end:{line:91,column:7}},28:{start:{line:88,column:8},end:{line:90,column:9}},29:{start:{line:89,column:10},end:{line:89,column:38}},30:{start:{line:97,column:4},end:{line:108,column:5}},31:{start:{line:98,column:6},end:{line:98,column:50}},32:{start:{line:100,column:11},end:{line:108,column:5}},33:{start:{line:104,column:6},end:{line:104,column:19}},34:{start:{line:107,column:6},end:{line:107,column:46}},35:{start:{line:110,column:4},end:{line:110,column:43}},36:{start:{line:111,column:4},end:{line:111,column:21}},37:{start:{line:115,column:2},end:{line:123,column:3}},38:{start:{line:116,column:4},end:{line:120,column:5}},39:{start:{line:117,column:6},end:{line:117,column:79}},40:{start:{line:119,column:6},end:{line:119,column:59}},41:{start:{line:122,column:4},end:{line:122,column:42}},42:{start:{line:125,column:2},end:{line:125,column:14}}},fnMap:{0:{name:"replaceEntityField",decl:{start:{line:20,column:24},end:{line:20,column:42}},loc:{start:{line:25,column:2},end:{line:126,column:1}},line:25}},branchMap:{0:{loc:{start:{line:26,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:28,column:3}},{start:{line:26,column:2},end:{line:28,column:3}}],line:26},1:{loc:{start:{line:26,column:6},end:{line:26,column:29}},type:"binary-expr",locations:[{start:{line:26,column:6},end:{line:26,column:12}},{start:{line:26,column:16},end:{line:26,column:29}}],line:26},2:{loc:{start:{line:36,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:41,column:3}},{start:{line:36,column:2},end:{line:41,column:3}}],line:36},3:{loc:{start:{line:51,column:4},end:{line:53,column:5}},type:"if",locations:[{start:{line:51,column:4},end:{line:53,column:5}},{start:{line:51,column:4},end:{line:53,column:5}}],line:51},4:{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},5:{loc:{start:{line:65,column:8},end:{line:65,column:37}},type:"binary-expr",locations:[{start:{line:65,column:8},end:{line:65,column:18}},{start:{line:65,column:22},end:{line:65,column:37}}],line:65},6:{loc:{start:{line:68,column:11},end:{line:74,column:5}},type:"if",locations:[{start:{line:68,column:11},end:{line:74,column:5}},{start:{line:68,column:11},end:{line:74,column:5}}],line:68},7:{loc:{start:{line:68,column:15},end:{line:68,column:75}},type:"binary-expr",locations:[{start:{line:68,column:15},end:{line:68,column:27}},{start:{line:68,column:31},end:{line:68,column:75}}],line:68},8:{loc:{start:{line:71,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:71,column:6},end:{line:73,column:7}},{start:{line:71,column:6},end:{line:73,column:7}}],line:71},9:{loc:{start:{line:71,column:10},end:{line:71,column:51}},type:"binary-expr",locations:[{start:{line:71,column:10},end:{line:71,column:16}},{start:{line:71,column:20},end:{line:71,column:31}},{start:{line:71,column:35},end:{line:71,column:51}}],line:71},10:{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:"if",locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},11:{loc:{start:{line:84,column:4},end:{line:92,column:5}},type:"if",locations:[{start:{line:84,column:4},end:{line:92,column:5}},{start:{line:84,column:4},end:{line:92,column:5}}],line:84},12:{loc:{start:{line:88,column:8},end:{line:90,column:9}},type:"if",locations:[{start:{line:88,column:8},end:{line:90,column:9}},{start:{line:88,column:8},end:{line:90,column:9}}],line:88},13:{loc:{start:{line:97,column:4},end:{line:108,column:5}},type:"if",locations:[{start:{line:97,column:4},end:{line:108,column:5}},{start:{line:97,column:4},end:{line:108,column:5}}],line:97},14:{loc:{start:{line:100,column:11},end:{line:108,column:5}},type:"if",locations:[{start:{line:100,column:11},end:{line:108,column:5}},{start:{line:100,column:11},end:{line:108,column:5}}],line:100},15:{loc:{start:{line:101,column:6},end:{line:102,column:59}},type:"binary-expr",locations:[{start:{line:101,column:7},end:{line:101,column:11}},{start:{line:101,column:15},end:{line:101,column:31}},{start:{line:102,column:6},end:{line:102,column:59}}],line:101},16:{loc:{start:{line:115,column:2},end:{line:123,column:3}},type:"if",locations:[{start:{line:115,column:2},end:{line:123,column:3}},{start:{line:115,column:2},end:{line:123,column:3}}],line:115},17:{loc:{start:{line:116,column:4},end:{line:120,column:5}},type:"if",locations:[{start:{line:116,column:4},end:{line:120,column:5}},{start:{line:116,column:4},end:{line:120,column:5}}],line:116}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0,0],16:[0,0],17:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(sr=ir[cr="__coverage__"]||(ir[cr]={}))[or]&&sr[or].hash===tr?sr[or]:(ar.hash=tr,sr[or]=ar));function mr(n,l,e,o){if(ur.f[0]++,ur.s[0]++,ur.b[1][0]++,!e||(ur.b[1][1]++,!e.length))return ur.b[0][0]++,ur.s[1]++,!0;ur.b[0][1]++;var t,i,c=(ur.s[2]++,qo(n,l)),a=(ur.s[3]++,!1);ur.s[4]++,"function"==typeof c?(ur.b[2][0]++,ur.s[5]++,i=c.toString(),ur.s[6]++,c=i.substring(i.indexOf("{")+1,i.lastIndexOf("}")),ur.s[7]++,t=i.match(/(function.+\()(.+(?=\)))(.+$)/),ur.s[8]++,a=!0):ur.b[2][1]++,ur.s[9]++;for(var s=0;s
x
'),pp.s[10]++,l.close();var e=(pp.s[11]++,l.documentElement.scrollHeight>l.body.scrollHeight);return pp.s[12]++,n.parentNode.removeChild(n),pp.s[13]++,fp=e?(pp.b[2][0]++,document.documentElement):(pp.b[2][1]++,document.body)}(),l=n.scrollTop/(n.scrollHeight-n.clientHeight)*100;return Mp.s[1]++,e<=l}});return Mp.s[2]++,n}var Sp,jp,Cp,Ap,xp,Up,kp=(Sp="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js",jp="d33b65eaf4c1cb5d4b51a1cccd7a97120b0bf095",Cp=new function(){}.constructor("return this")(),xp={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js",statementMap:{0:{start:{line:15,column:16},end:{line:22,column:3}},1:{start:{line:17,column:6},end:{line:19,column:7}},2:{start:{line:18,column:8},end:{line:18,column:20}},3:{start:{line:20,column:6},end:{line:20,column:19}},4:{start:{line:24,column:2},end:{line:24,column:17}}},fnMap:{0:{name:"registerManualTriggerWatcher",decl:{start:{line:14,column:24},end:{line:14,column:52}},loc:{start:{line:14,column:69},end:{line:25,column:1}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:16,column:11},end:{line:16,column:12}},loc:{start:{line:16,column:23},end:{line:21,column:5}},line:16}},branchMap:{0:{loc:{start:{line:17,column:6},end:{line:19,column:7}},type:"if",locations:[{start:{line:17,column:6},end:{line:19,column:7}},{start:{line:17,column:6},end:{line:19,column:7}}],line:17},1:{loc:{start:{line:17,column:10},end:{line:17,column:99}},type:"binary-expr",locations:[{start:{line:17,column:10},end:{line:17,column:15}},{start:{line:17,column:19},end:{line:17,column:60}},{start:{line:17,column:64},end:{line:17,column:99}}],line:17}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Up=Cp[Ap="__coverage__"]||(Cp[Ap]={}))[Sp]&&Up[Sp].hash===jp?Up[Sp]:(xp.hash=jp,Up[Sp]=xp));var Ep,Tp,Ip,Np,Bp,Lp,Pp=(Ep="/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js",Tp="2c5efaa78cd8d4cfb28cb87382b8423f36da5238",Ip=new function(){}.constructor("return this")(),Bp={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js",statementMap:{0:{start:{line:46,column:18},end:{line:46,column:42}},1:{start:{line:47,column:11},end:{line:47,column:15}},2:{start:{line:49,column:2},end:{line:49,column:23}},3:{start:{line:50,column:2},end:{line:50,column:24}},4:{start:{line:53,column:2},end:{line:53,column:33}},5:{start:{line:54,column:2},end:{line:54,column:63}},6:{start:{line:56,column:2},end:{line:62,column:3}},7:{start:{line:61,column:4},end:{line:61,column:11}},8:{start:{line:64,column:2},end:{line:75,column:3}},9:{start:{line:65,column:4},end:{line:74,column:5}},10:{start:{line:69,column:6},end:{line:69,column:72}},11:{start:{line:71,column:6},end:{line:73,column:8}},12:{start:{line:78,column:2},end:{line:78,column:75}},13:{start:{line:81,column:2},end:{line:83,column:3}},14:{start:{line:82,column:4},end:{line:82,column:63}},15:{start:{line:85,column:2},end:{line:87,column:3}},16:{start:{line:86,column:4},end:{line:86,column:75}},17:{start:{line:89,column:2},end:{line:92,column:3}},18:{start:{line:90,column:4},end:{line:91,column:80}},19:{start:{line:94,column:2},end:{line:96,column:3}},20:{start:{line:95,column:4},end:{line:95,column:69}},21:{start:{line:98,column:2},end:{line:100,column:3}},22:{start:{line:99,column:4},end:{line:99,column:71}},23:{start:{line:102,column:2},end:{line:102,column:54}},24:{start:{line:104,column:2},end:{line:107,column:3}},25:{start:{line:105,column:4},end:{line:106,column:72}},26:{start:{line:110,column:2},end:{line:116,column:3}},27:{start:{line:115,column:4},end:{line:115,column:50}},28:{start:{line:119,column:2},end:{line:123,column:3}},29:{start:{line:120,column:4},end:{line:120,column:42}},30:{start:{line:121,column:4},end:{line:121,column:34}},31:{start:{line:122,column:4},end:{line:122,column:42}},32:{start:{line:125,column:2},end:{line:131,column:3}},33:{start:{line:126,column:4},end:{line:128,column:6}},34:{start:{line:129,column:4},end:{line:129,column:34}},35:{start:{line:130,column:4},end:{line:130,column:37}},36:{start:{line:133,column:2},end:{line:139,column:3}},37:{start:{line:134,column:4},end:{line:136,column:6}},38:{start:{line:137,column:4},end:{line:137,column:34}},39:{start:{line:138,column:4},end:{line:138,column:37}},40:{start:{line:141,column:2},end:{line:149,column:3}},41:{start:{line:142,column:4},end:{line:142,column:76}},42:{start:{line:143,column:4},end:{line:143,column:34}},43:{start:{line:144,column:4},end:{line:144,column:44}},44:{start:{line:148,column:4},end:{line:148,column:26}},45:{start:{line:151,column:2},end:{line:155,column:3}},46:{start:{line:152,column:4},end:{line:154,column:5}},47:{start:{line:153,column:6},end:{line:153,column:25}}},fnMap:{0:{name:"initializeWidget",decl:{start:{line:44,column:24},end:{line:44,column:40}},loc:{start:{line:44,column:59},end:{line:156,column:1}},line:44}},branchMap:{0:{loc:{start:{line:56,column:2},end:{line:62,column:3}},type:"if",locations:[{start:{line:56,column:2},end:{line:62,column:3}},{start:{line:56,column:2},end:{line:62,column:3}}],line:56},1:{loc:{start:{line:57,column:4},end:{line:59,column:36}},type:"binary-expr",locations:[{start:{line:57,column:5},end:{line:57,column:31}},{start:{line:58,column:6},end:{line:58,column:48}},{start:{line:59,column:4},end:{line:59,column:36}}],line:57},2:{loc:{start:{line:64,column:2},end:{line:75,column:3}},type:"if",locations:[{start:{line:64,column:2},end:{line:75,column:3}},{start:{line:64,column:2},end:{line:75,column:3}}],line:64},3:{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},4:{loc:{start:{line:66,column:6},end:{line:67,column:77}},type:"binary-expr",locations:[{start:{line:66,column:6},end:{line:66,column:29}},{start:{line:67,column:7},end:{line:67,column:38}},{start:{line:67,column:42},end:{line:67,column:76}}],line:66},5:{loc:{start:{line:78,column:17},end:{line:78,column:74}},type:"binary-expr",locations:[{start:{line:78,column:17},end:{line:78,column:29}},{start:{line:78,column:33},end:{line:78,column:74}}],line:78},6:{loc:{start:{line:81,column:2},end:{line:83,column:3}},type:"if",locations:[{start:{line:81,column:2},end:{line:83,column:3}},{start:{line:81,column:2},end:{line:83,column:3}}],line:81},7:{loc:{start:{line:82,column:19},end:{line:82,column:62}},type:"binary-expr",locations:[{start:{line:82,column:19},end:{line:82,column:31}},{start:{line:82,column:35},end:{line:82,column:62}}],line:82},8:{loc:{start:{line:85,column:2},end:{line:87,column:3}},type:"if",locations:[{start:{line:85,column:2},end:{line:87,column:3}},{start:{line:85,column:2},end:{line:87,column:3}}],line:85},9:{loc:{start:{line:86,column:19},end:{line:86,column:74}},type:"binary-expr",locations:[{start:{line:86,column:19},end:{line:86,column:31}},{start:{line:86,column:35},end:{line:86,column:74}}],line:86},10:{loc:{start:{line:89,column:2},end:{line:92,column:3}},type:"if",locations:[{start:{line:89,column:2},end:{line:92,column:3}},{start:{line:89,column:2},end:{line:92,column:3}}],line:89},11:{loc:{start:{line:91,column:6},end:{line:91,column:79}},type:"binary-expr",locations:[{start:{line:91,column:6},end:{line:91,column:18}},{start:{line:91,column:22},end:{line:91,column:79}}],line:91},12:{loc:{start:{line:94,column:2},end:{line:96,column:3}},type:"if",locations:[{start:{line:94,column:2},end:{line:96,column:3}},{start:{line:94,column:2},end:{line:96,column:3}}],line:94},13:{loc:{start:{line:95,column:19},end:{line:95,column:68}},type:"binary-expr",locations:[{start:{line:95,column:19},end:{line:95,column:31}},{start:{line:95,column:35},end:{line:95,column:68}}],line:95},14:{loc:{start:{line:98,column:2},end:{line:100,column:3}},type:"if",locations:[{start:{line:98,column:2},end:{line:100,column:3}},{start:{line:98,column:2},end:{line:100,column:3}}],line:98},15:{loc:{start:{line:99,column:19},end:{line:99,column:70}},type:"binary-expr",locations:[{start:{line:99,column:19},end:{line:99,column:31}},{start:{line:99,column:35},end:{line:99,column:70}}],line:99},16:{loc:{start:{line:102,column:17},end:{line:102,column:53}},type:"binary-expr",locations:[{start:{line:102,column:17},end:{line:102,column:29}},{start:{line:102,column:33},end:{line:102,column:53}}],line:102},17:{loc:{start:{line:104,column:2},end:{line:107,column:3}},type:"if",locations:[{start:{line:104,column:2},end:{line:107,column:3}},{start:{line:104,column:2},end:{line:107,column:3}}],line:104},18:{loc:{start:{line:106,column:6},end:{line:106,column:71}},type:"binary-expr",locations:[{start:{line:106,column:6},end:{line:106,column:18}},{start:{line:106,column:22},end:{line:106,column:71}}],line:106},19:{loc:{start:{line:110,column:2},end:{line:116,column:3}},type:"if",locations:[{start:{line:110,column:2},end:{line:116,column:3}},{start:{line:110,column:2},end:{line:116,column:3}}],line:110},20:{loc:{start:{line:111,column:4},end:{line:113,column:49}},type:"binary-expr",locations:[{start:{line:111,column:4},end:{line:111,column:16}},{start:{line:112,column:4},end:{line:112,column:11}},{start:{line:113,column:4},end:{line:113,column:49}}],line:111},21:{loc:{start:{line:119,column:2},end:{line:123,column:3}},type:"if",locations:[{start:{line:119,column:2},end:{line:123,column:3}},{start:{line:119,column:2},end:{line:123,column:3}}],line:119},22:{loc:{start:{line:125,column:2},end:{line:131,column:3}},type:"if",locations:[{start:{line:125,column:2},end:{line:131,column:3}},{start:{line:125,column:2},end:{line:131,column:3}}],line:125},23:{loc:{start:{line:133,column:2},end:{line:139,column:3}},type:"if",locations:[{start:{line:133,column:2},end:{line:139,column:3}},{start:{line:133,column:2},end:{line:139,column:3}}],line:133},24:{loc:{start:{line:141,column:2},end:{line:149,column:3}},type:"if",locations:[{start:{line:141,column:2},end:{line:149,column:3}},{start:{line:141,column:2},end:{line:149,column:3}}],line:141},25:{loc:{start:{line:151,column:2},end:{line:155,column:3}},type:"if",locations:[{start:{line:151,column:2},end:{line:155,column:3}},{start:{line:151,column:2},end:{line:155,column:3}}],line:151},26:{loc:{start:{line:151,column:6},end:{line:151,column:65}},type:"binary-expr",locations:[{start:{line:151,column:6},end:{line:151,column:34}},{start:{line:151,column:38},end:{line:151,column:65}}],line:151},27:{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:"if",locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0},f:{0:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Lp=Ip[Np="__coverage__"]||(Ip[Np]={}))[Ep]&&Lp[Ep].hash===Tp?Lp[Ep]:(Bp.hash=Tp,Lp[Ep]=Bp));function Gp(n,l){Pp.f[0]++;var e,o,t,i,c=(Pp.s[0]++,n.displayConditions),a=(Pp.s[1]++,this);if(Pp.s[2]++,n.watchers=[],Pp.s[3]++,n.listeners=[],Pp.s[4]++,n.expiration=new Date,Pp.s[5]++,n.expiration.setDate(n.expiration.getDate()+365),Pp.s[6]++,Pp.b[1][0]++,"sitegate"===n.type&&(Pp.b[1][1]++,"true"===Be(sn+n.id))||(Pp.b[1][2]++,!0===n.hiddenViaABTests))return Pp.b[0][0]++,void Pp.s[7]++;if(Pp.b[0][1]++,Pp.s[8]++,n.pushDown){if(Pp.b[2][0]++,Pp.s[9]++,Pp.b[4][0]++,"bar"!==n.layout||(Pp.b[4][1]++,"top-fixed"!==n.position&&(Pp.b[4][2]++,"top-absolute"!==n.position)))throw Pp.b[3][1]++,Pp.s[11]++,new Error("Only top positioned bar widgets may have a pushDown property");Pp.b[3][0]++,Pp.s[10]++,tl(In.querySelector(n.pushDown),"pf-push-down")}else Pp.b[2][1]++;Pp.s[12]++,n.valid=(Pp.b[5][0]++,n.valid&&(Pp.b[5][1]++,function(n,l){vr.f[0]++;var e,o=(vr.s[0]++,!0);vr.s[1]++;for(var t=0;t<_n.length;t++){var i=(vr.s[2]++,new RegExp(Mn,"g")),c=(vr.s[3]++,qo(n,_n[t]));vr.s[4]++,"function"==typeof c?(vr.b[0][0]++,vr.s[5]++,c=c.toString()):vr.b[0][1]++,vr.s[6]++,"string"==typeof c?(vr.b[1][0]++,vr.s[7]++,e=c.match(i),vr.s[8]++,vr.b[3][0]++,e&&(vr.b[3][1]++,0new Date(n.end_at).getTime())?(jr.b[2][0]++,jr.s[5]++,l=!1):jr.b[2][1]++,jr.s[6]++,l}(c.date)))):Pp.b[6][1]++,Pp.s[15]++,c.pageVisits?(Pp.b[8][0]++,Pp.s[16]++,n.valid=(Pp.b[9][0]++,n.valid&&(Pp.b[9][1]++,o=c.pageVisits,Tr.f[0]++,Tr.s[0]++,Be(bn)>=o))):Pp.b[8][1]++,Pp.s[17]++,c.hideAfterAction?(Pp.b[10][0]++,Pp.s[18]++,n.valid=(Pp.b[11][0]++,n.valid&&(Pp.b[11][1]++,function(n,l){Or.f[0]++;var e,o=(Or.s[0]++,!0),t=(Or.s[1]++,Date.now()),i=(Or.s[2]++,Be(rn+l.id)),c=(Or.s[3]++,Be(dn+l.id)),a=(Or.s[4]++,Be(pn+l.id));return Or.s[5]++,Or.b[1][0]++,n.confirm&&(Or.b[1][1]++,i)?(Or.b[0][0]++,Or.s[6]++,e=i.split("|"),Or.s[7]++,parseInt(e[0],10)>=n.confirm.hideCount?(Or.b[2][0]++,Or.s[8]++,o=!1):Or.b[2][1]++,Or.s[9]++,Or.b[4][0]++,void 0!==e[1]&&(Or.b[4][1]++,Math.abs(e[1]-t)/1e3=n.cancel.hideCount?(Or.b[7][0]++,Or.s[14]++,o=!1):Or.b[7][1]++,Or.s[15]++,Or.b[9][0]++,void 0!==e[1]&&(Or.b[9][1]++,Math.abs(e[1]-t)/1e3=n.closed.hideCount?(Or.b[12][0]++,Or.s[20]++,o=!1):Or.b[12][1]++,Or.s[21]++,Or.b[14][0]++,void 0!==e[1]&&(Or.b[14][1]++,Math.abs(e[1]-t)/1e3=In.body.offsetHeight);return $d.s[3]++,$d.b[2][0]++,e.elem.offsetTop-window.innerHeight/2<=n||($d.b[2][1]++,l)?($d.b[1][0]++,$d.s[4]++,!0):($d.b[1][1]++,$d.s[5]++,!1)}});return $d.s[6]++,e}(c.displayWhenElementVisible),Pp.s[34]++,n.watchers.push(e),Pp.s[35]++,cp(n)):Pp.b[22][1]++,Pp.s[36]++,c.scrollPercentageToDisplay?(Pp.b[23][0]++,Pp.s[37]++,e=_p(c.scrollPercentageToDisplay),Pp.s[38]++,n.watchers.push(e),Pp.s[39]++,cp(n)):Pp.b[23][1]++,Pp.s[40]++,c.manualTrigger?(Pp.b[24][0]++,Pp.s[41]++,e=function(n,l){kp.f[0]++;var e=(kp.s[0]++,{check:function(){return kp.f[1]++,kp.s[1]++,kp.b[1][0]++,n&&(kp.b[1][1]++,xn.triggeredWidgets[l.id])||(kp.b[1][2]++,xn.triggeredWidgets["*"])?(kp.b[0][0]++,kp.s[2]++,!0):(kp.b[0][1]++,kp.s[3]++,!1)}});return kp.s[4]++,e}(c.manualTrigger,n),Pp.s[42]++,n.watchers.push(e),Pp.s[43]++,xn.readyWidgets.push(n),Pp.s[44]++,Ls(n)):Pp.b[24][1]++,Pp.s[45]++,Pp.b[26][0]++,0!==n.watchers.length||(Pp.b[26][1]++,c.showOnExitIntent)?Pp.b[25][1]++:(Pp.b[25][0]++,Pp.s[46]++,n.valid?(Pp.b[27][0]++,Pp.s[47]++,gs(n)):Pp.b[27][1]++)}var Op,Rp,Wp,Dp,qp,Hp,zp=(Op="/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js",Rp="bd62d0e25a272b36fce88209a18945257367f6d0",Wp=new function(){}.constructor("return this")(),qp={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js",statementMap:{0:{start:{line:17,column:2},end:{line:17,column:33}},1:{start:{line:18,column:2},end:{line:18,column:34}}},fnMap:{0:{name:"previewWidget",decl:{start:{line:16,column:24},end:{line:16,column:37}},loc:{start:{line:16,column:47},end:{line:19,column:1}},line:16}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Hp=Wp[Dp="__coverage__"]||(Wp[Dp]={}))[Op]&&Hp[Op].hash===Rp?Hp[Op]:(qp.hash=Rp,Hp[Op]=qp));function Kp(n){return zp.f[0]++,zp.s[0]++,n.id=Yo(),zp.s[1]++,os(n)}var Fp,Vp,Zp,Jp,Yp,Qp,$p=(Fp="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js",Vp="c4c1b377992e8b34c9a4d9bffc69f76783c80f27",Zp=new function(){}.constructor("return this")(),Yp={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js",statementMap:{0:{start:{line:12,column:17},end:{line:12,column:56}},1:{start:{line:14,column:2},end:{line:17,column:3}},2:{start:{line:15,column:4},end:{line:15,column:27}},3:{start:{line:16,column:4},end:{line:16,column:51}}},fnMap:{0:{name:"cancelDelayedWidget",decl:{start:{line:11,column:24},end:{line:11,column:43}},loc:{start:{line:11,column:56},end:{line:18,column:1}},line:11}},branchMap:{0:{loc:{start:{line:14,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:17,column:3}},{start:{line:14,column:2},end:{line:17,column:3}}],line:14}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Qp=Zp[Jp="__coverage__"]||(Zp[Jp]={}))[Fp]&&Qp[Fp].hash===Vp?Qp[Fp]:(Yp.hash=Vp,Qp[Fp]=Yp));function Xp(n){$p.f[0]++;var l=($p.s[0]++,xn.delayedWidgets[n]);$p.s[1]++,l?($p.b[0][0]++,$p.s[2]++,clearTimeout(l),$p.s[3]++,delete xn.delayedWidgets[n]):$p.b[0][1]++}var nf,lf,ef,of,tf,cf,af=(nf="/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js",lf="e17bfcf474537e9afaaf65b043e905dc76efd98c",ef=new function(){}.constructor("return this")(),tf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js",statementMap:{0:{start:{line:29,column:15},end:{line:29,column:42}},1:{start:{line:30,column:16},end:{line:30,column:44}},2:{start:{line:32,column:2},end:{line:43,column:5}},3:{start:{line:33,column:18},end:{line:33,column:52}},4:{start:{line:34,column:4},end:{line:34,column:35}},5:{start:{line:35,column:4},end:{line:35,column:44}},6:{start:{line:37,column:4},end:{line:42,column:5}},7:{start:{line:38,column:6},end:{line:41,column:7}},8:{start:{line:39,column:18},end:{line:39,column:39}},9:{start:{line:40,column:8},end:{line:40,column:57}},10:{start:{line:45,column:2},end:{line:49,column:3}},11:{start:{line:46,column:4},end:{line:48,column:5}},12:{start:{line:47,column:6},end:{line:47,column:31}},13:{start:{line:51,column:2},end:{line:51,column:23}},14:{start:{line:53,column:2},end:{line:53,column:36}},15:{start:{line:54,column:2},end:{line:54,column:38}},16:{start:{line:55,column:2},end:{line:55,column:34}},17:{start:{line:56,column:2},end:{line:56,column:22}},18:{start:{line:57,column:2},end:{line:57,column:19}}},fnMap:{0:{name:"clearAll",decl:{start:{line:28,column:24},end:{line:28,column:32}},loc:{start:{line:28,column:36},end:{line:58,column:1}},line:28},1:{name:"(anonymous_1)",decl:{start:{line:32,column:17},end:{line:32,column:18}},loc:{start:{line:32,column:35},end:{line:43,column:3}},line:32}},branchMap:{0:{loc:{start:{line:38,column:6},end:{line:41,column:7}},type:"if",locations:[{start:{line:38,column:6},end:{line:41,column:7}},{start:{line:38,column:6},end:{line:41,column:7}}],line:38},1:{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(cf=ef[of="__coverage__"]||(ef[of]={}))[nf]&&cf[nf].hash===lf?cf[nf]:(tf.hash=lf,cf[nf]=tf));function sf(){af.f[0]++;var n=(af.s[0]++,xn.openedWidgets),l=(af.s[1]++,xn.delayedWidgets);for(var e in af.s[2]++,n.forEach(function(n){af.f[1]++;var l=(af.s[3]++,In.getElementById(n.id));for(var e in af.s[4]++,Yn(l,"opened"),af.s[5]++,l.parentNode.removeChild(l),af.s[6]++,n.listeners)if(af.s[7]++,n.listeners.hasOwnProperty(e)){af.b[0][0]++;var o=(af.s[8]++,n.listeners[e]);af.s[9]++,o.target.removeEventListener(o.type,o.fn)}else af.b[0][1]++}),af.s[10]++,l)af.s[11]++,l.hasOwnProperty(e)?(af.b[1][0]++,af.s[12]++,Xp(e)):af.b[1][1]++;af.s[13]++,zd.removeAll(),af.s[14]++,b(xn),af.s[15]++,S(kn),af.s[16]++,a(Un),af.s[17]++,this.callbacks=[],af.s[18]++,this.acctid=""}var uf,mf,rf,df,pf,ff,bf=(uf="/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js",mf="48c5710abf86ff4e1ae6fd9d3ac23051616bea22",rf=new function(){}.constructor("return this")(),pf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js",statementMap:{0:{start:{line:12,column:15},end:{line:15,column:3}},1:{start:{line:17,column:2},end:{line:19,column:3}},2:{start:{line:18,column:4},end:{line:18,column:48}},3:{start:{line:21,column:2},end:{line:21,column:25}},4:{start:{line:23,column:2},end:{line:25,column:3}},5:{start:{line:24,column:4},end:{line:24,column:57}},6:{start:{line:27,column:2},end:{line:27,column:24}},7:{start:{line:29,column:2},end:{line:29,column:16}}},fnMap:{0:{name:"prepareWidget",decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:53},end:{line:30,column:1}},line:11}},branchMap:{0:{loc:{start:{line:17,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:19,column:3}},{start:{line:17,column:2},end:{line:19,column:3}}],line:17},1:{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ff=rf[df="__coverage__"]||(rf[df]={}))[uf]&&ff[uf].hash===mf?ff[uf]:(pf.hash=mf,ff[uf]=pf));function hf(n,l){bf.f[0]++;var e=(bf.s[0]++,{valid:!0,type:n});if(bf.s[1]++,!l)throw bf.b[0][0]++,bf.s[2]++,new Error("Config object is missing");if(bf.b[0][1]++,bf.s[3]++,e.config=l,bf.s[4]++,!l.id)throw bf.b[1][0]++,bf.s[5]++,new Error("All widgets must have an id value");return bf.b[1][1]++,bf.s[6]++,e.id=l.id,bf.s[7]++,e}var vf,yf,gf,wf,Mf,_f,Sf=(vf="/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js",yf="17286eda18a7fed0aae092fcdb48d9b871d15489",gf=new function(){}.constructor("return this")(),Mf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:42}}},fnMap:{0:{name:"Message",decl:{start:{line:12,column:24},end:{line:12,column:31}},loc:{start:{line:12,column:41},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(_f=gf[wf="__coverage__"]||(gf[wf]={}))[vf]&&_f[vf].hash===yf?_f[vf]:(Mf.hash=yf,_f[vf]=Mf));function jf(n){return Sf.f[0]++,Sf.s[0]++,hf("message",n)}var Cf,Af,xf,Uf,kf,Ef,Tf=(Cf="/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js",Af="b41fd2aeb030616aa757759e1099548ecc181c42",xf=new function(){}.constructor("return this")(),kf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:47}}},fnMap:{0:{name:"Subscription",decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:46},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Ef=xf[Uf="__coverage__"]||(xf[Uf]={}))[Cf]&&Ef[Cf].hash===Af?Ef[Cf]:(kf.hash=Af,Ef[Cf]=kf));function If(n){return Tf.f[0]++,Tf.s[0]++,hf("subscription",n)}var Nf,Bf,Lf,Pf,Gf,Of,Rf=(Nf="/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js",Bf="3946ed6eee471c67ceeb4d80cd237301ac78a166",Lf=new function(){}.constructor("return this")(),Gf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:39}}},fnMap:{0:{name:"Form",decl:{start:{line:12,column:24},end:{line:12,column:28}},loc:{start:{line:12,column:38},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Of=Lf[Pf="__coverage__"]||(Lf[Pf]={}))[Nf]&&Of[Nf].hash===Bf?Of[Nf]:(Gf.hash=Bf,Of[Nf]=Gf));function Wf(n){return Rf.f[0]++,Rf.s[0]++,hf("form",n)}var Df,qf,Hf,zf,Kf,Ff,Vf=(Df="/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js",qf="a047ceb3e49fd09bf733bd36dfe4818303ea8c72",Hf=new function(){}.constructor("return this")(),Kf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:43}}},fnMap:{0:{name:"SiteGate",decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:42},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Ff=Hf[zf="__coverage__"]||(Hf[zf]={}))[Df]&&Ff[Df].hash===qf?Ff[Df]:(Kf.hash=qf,Ff[Df]=Kf));function Zf(n){return Vf.f[0]++,Vf.s[0]++,hf("sitegate",n)}var Jf,Yf,Qf,$f,Xf,nb,lb=(Jf="/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js",Yf="190c01a65f580c8a956f27f46920dbfab69502ae",Qf=new function(){}.constructor("return this")(),Xf={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js",statementMap:{0:{start:{line:17,column:2},end:{line:60,column:5}},1:{start:{line:18,column:24},end:{line:18,column:35}},2:{start:{line:19,column:29},end:{line:19,column:50}},3:{start:{line:20,column:29},end:{line:20,column:30}},4:{start:{line:21,column:15},end:{line:21,column:25}},5:{start:{line:23,column:4},end:{line:25,column:5}},6:{start:{line:24,column:6},end:{line:24,column:41}},7:{start:{line:28,column:4},end:{line:28,column:39}},8:{start:{line:29,column:4},end:{line:29,column:53}},9:{start:{line:32,column:12},end:{line:32,column:13}},10:{start:{line:33,column:4},end:{line:41,column:5}},11:{start:{line:34,column:6},end:{line:34,column:52}},12:{start:{line:36,column:6},end:{line:38,column:7}},13:{start:{line:37,column:8},end:{line:37,column:14}},14:{start:{line:40,column:6},end:{line:40,column:27}},15:{start:{line:44,column:4},end:{line:53,column:7}},16:{start:{line:45,column:6},end:{line:52,column:9}},17:{start:{line:46,column:8},end:{line:51,column:9}},18:{start:{line:47,column:10},end:{line:47,column:40}},19:{start:{line:48,column:10},end:{line:48,column:65}},20:{start:{line:50,column:10},end:{line:50,column:99}},21:{start:{line:55,column:4},end:{line:57,column:5}},22:{start:{line:56,column:6},end:{line:56,column:85}},23:{start:{line:59,column:4},end:{line:59,column:71}}},fnMap:{0:{name:"initializeABTesting",decl:{start:{line:16,column:24},end:{line:16,column:43}},loc:{start:{line:16,column:54},end:{line:61,column:1}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:36},end:{line:60,column:3}},line:17},2:{name:"(anonymous_2)",decl:{start:{line:44,column:26},end:{line:44,column:27}},loc:{start:{line:44,column:50},end:{line:53,column:5}},line:44},3:{name:"(anonymous_3)",decl:{start:{line:45,column:20},end:{line:45,column:21}},loc:{start:{line:45,column:38},end:{line:52,column:7}},line:45}},branchMap:{0:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:23,column:4},end:{line:25,column:5}}],line:23},1:{loc:{start:{line:36,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:36,column:6},end:{line:38,column:7}},{start:{line:36,column:6},end:{line:38,column:7}}],line:36},2:{loc:{start:{line:46,column:8},end:{line:51,column:9}},type:"if",locations:[{start:{line:46,column:8},end:{line:51,column:9}},{start:{line:46,column:8},end:{line:51,column:9}}],line:46},3:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(nb=Qf[$f="__coverage__"]||(Qf[$f]={}))[Jf]&&nb[Jf].hash===Yf?nb[Jf]:(Xf.hash=Yf,nb[Jf]=Xf));function eb(n){lb.f[0]++,lb.s[0]++,n.forEach(function(n){lb.f[1]++;var l=(lb.s[1]++,n.type),e=(lb.s[2]++,Be(n.cookieId)),o=(lb.s[3]++,0),t=(lb.s[4]++,new Date);lb.s[5]++,e?lb.b[0][1]++:(lb.b[0][0]++,lb.s[6]++,e=Math.random()),lb.s[7]++,t.setDate(t.getDate()+365),lb.s[8]++,re(n.cookieId,e,t);var i=(lb.s[9]++,0);for(lb.s[10]++;i<1;){if(lb.s[11]++,i+=l.groups[o],lb.s[12]++,e<=i){lb.b[1][0]++,lb.s[13]++;break}lb.b[1][1]++,lb.s[14]++,o++}if(lb.s[15]++,n.groups.forEach(function(n,l){lb.f[2]++,lb.s[16]++,n.forEach(function(n){if(lb.f[3]++,lb.s[17]++,void 0!==n.abTestingGroup)throw lb.b[2][1]++,lb.s[20]++,new Error("Widget #"+n.config.id+" is defined in more than one AB test.");lb.b[2][0]++,lb.s[18]++,n.abTestingGroup=l,lb.s[19]++,n.hiddenViaABTests=o===l})}),lb.s[21]++,void 0!==kn.abTestingGroups[n.id])throw lb.b[3][0]++,lb.s[22]++,new Error("AB test with ID="+n.id+" has been already defined.");lb.b[3][1]++,lb.s[23]++,kn.abTestingGroups[n.id]=o})}var ob,tb,ib,cb,ab,sb,ub=(ob="/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js",tb="430f6fb5ce0125dd936fd211dbd9fa99079cde99",ib=new function(){}.constructor("return this")(),ab={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js",statementMap:{0:{start:{line:12,column:13},end:{line:12,column:15}},1:{start:{line:14,column:2},end:{line:16,column:3}},2:{start:{line:15,column:4},end:{line:15,column:48}},3:{start:{line:18,column:2},end:{line:18,column:22}},4:{start:{line:19,column:2},end:{line:19,column:45}},5:{start:{line:20,column:2},end:{line:20,column:30}},6:{start:{line:22,column:2},end:{line:24,column:3}},7:{start:{line:23,column:4},end:{line:23,column:63}},8:{start:{line:26,column:2},end:{line:26,column:42}},9:{start:{line:28,column:2},end:{line:28,column:14}}},fnMap:{0:{name:"prepareABTest",decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:47},end:{line:29,column:1}},line:11}},branchMap:{0:{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:14,column:2},end:{line:16,column:3}}],line:14},1:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(sb=ib[cb="__coverage__"]||(ib[cb]={}))[ob]&&sb[ob].hash===tb?sb[ob]:(ab.hash=tb,sb[ob]=ab));var mb,rb,db,pb,fb,bb,hb=(mb="/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js",rb="d992100179a90704e13da4757353d3c010c6896e",db=new function(){}.constructor("return this")(),fb={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:31}}},fnMap:{0:{name:"ABTest",decl:{start:{line:12,column:24},end:{line:12,column:30}},loc:{start:{line:12,column:40},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(bb=db[pb="__coverage__"]||(db[pb]={}))[mb]&&bb[mb].hash===rb?bb[mb]:(fb.hash=rb,bb[mb]=fb));function vb(n){return hb.f[0]++,hb.s[0]++,function(n){ub.f[0]++;var l=(ub.s[0]++,{});if(ub.s[1]++,!n)throw ub.b[0][0]++,ub.s[2]++,new Error("Config object is missing");if(ub.b[0][1]++,ub.s[3]++,l.id=n.id,ub.s[4]++,l.cookieId=fn+n.id,ub.s[5]++,l.groups=n.groups,ub.s[6]++,!En[n.type])throw ub.b[1][0]++,ub.s[7]++,new Error("Unknown AB testing type: "+n.type);return ub.b[1][1]++,ub.s[8]++,l.type=En[n.type],ub.s[9]++,l}(n)}var yb,gb,wb,Mb,_b,Sb,jb=(yb="/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js",gb="4d8bf52c5f0a024149dd445984151f1f02a92edf",wb=new function(){}.constructor("return this")(),_b={path:"/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js",statementMap:{0:{start:{line:13,column:21},end:{line:13,column:23}},1:{start:{line:14,column:17},end:{line:14,column:60}},2:{start:{line:16,column:2},end:{line:16,column:49}},3:{start:{line:18,column:2},end:{line:87,column:3}},4:{start:{line:19,column:4},end:{line:86,column:5}},5:{start:{line:20,column:23},end:{line:20,column:34}},6:{start:{line:22,column:6},end:{line:85,column:7}},7:{start:{line:25,column:20},end:{line:25,column:59}},8:{start:{line:27,column:8},end:{line:29,column:9}},9:{start:{line:28,column:10},end:{line:28,column:28}},10:{start:{line:31,column:8},end:{line:33,column:9}},11:{start:{line:32,column:10},end:{line:32,column:35}},12:{start:{line:35,column:8},end:{line:40,column:11}},13:{start:{line:41,column:8},end:{line:41,column:14}},14:{start:{line:45,column:24},end:{line:45,column:67}},15:{start:{line:46,column:20},end:{line:46,column:59}},16:{start:{line:47,column:22},end:{line:47,column:27}},17:{start:{line:49,column:8},end:{line:51,column:9}},18:{start:{line:50,column:10},end:{line:50,column:28}},19:{start:{line:53,column:8},end:{line:55,column:9}},20:{start:{line:54,column:10},end:{line:54,column:32}},21:{start:{line:57,column:8},end:{line:61,column:9}},22:{start:{line:58,column:10},end:{line:60,column:12}},23:{start:{line:63,column:8},end:{line:65,column:9}},24:{start:{line:64,column:10},end:{line:64,column:73}},25:{start:{line:67,column:8},end:{line:69,column:9}},26:{start:{line:68,column:10},end:{line:68,column:52}},27:{start:{line:71,column:8},end:{line:83,column:11}},28:{start:{line:84,column:8},end:{line:84,column:14}},29:{start:{line:88,column:2},end:{line:88,column:22}}},fnMap:{0:{name:"prepElements",decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:44},end:{line:89,column:1}},line:12}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:86,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:86,column:5}},{start:{line:19,column:4},end:{line:86,column:5}}],line:19},1:{loc:{start:{line:22,column:6},end:{line:85,column:7}},type:"switch",locations:[{start:{line:24,column:6},end:{line:41,column:14}},{start:{line:44,column:6},end:{line:84,column:14}}],line:22},2:{loc:{start:{line:27,column:8},end:{line:29,column:9}},type:"if",locations:[{start:{line:27,column:8},end:{line:29,column:9}},{start:{line:27,column:8},end:{line:29,column:9}}],line:27},3:{loc:{start:{line:31,column:8},end:{line:33,column:9}},type:"if",locations:[{start:{line:31,column:8},end:{line:33,column:9}},{start:{line:31,column:8},end:{line:33,column:9}}],line:31},4:{loc:{start:{line:49,column:8},end:{line:51,column:9}},type:"if",locations:[{start:{line:49,column:8},end:{line:51,column:9}},{start:{line:49,column:8},end:{line:51,column:9}}],line:49},5:{loc:{start:{line:53,column:8},end:{line:55,column:9}},type:"if",locations:[{start:{line:53,column:8},end:{line:55,column:9}},{start:{line:53,column:8},end:{line:55,column:9}}],line:53},6:{loc:{start:{line:57,column:8},end:{line:61,column:9}},type:"if",locations:[{start:{line:57,column:8},end:{line:61,column:9}},{start:{line:57,column:8},end:{line:61,column:9}}],line:57},7:{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:"if",locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},8:{loc:{start:{line:67,column:8},end:{line:69,column:9}},type:"if",locations:[{start:{line:67,column:8},end:{line:69,column:9}},{start:{line:67,column:8},end:{line:69,column:9}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Sb=wb[Mb="__coverage__"]||(wb[Mb]={}))[yb]&&Sb[yb].hash===gb?Sb[yb]:(_b.hash=gb,Sb[yb]=_b));function Cb(n){jb.f[0]++;var l=(jb.s[0]++,{}),e=(jb.s[1]++,In.querySelectorAll("["+n+"]"));jb.s[2]++,this.elements=this.elements.concat(e),jb.s[3]++;for(var o=0;odiv { + & > div { text-align: left; margin-bottom: 10px; } @@ -463,8 +459,8 @@ textarea { position: relative; &.invalid { - [data-required=true], - [data-validate=true] { + [data-required='true'], + [data-validate='true'] { &:not(.pf-has-label) { border: 1px solid @required; margin: -1px; @@ -473,25 +469,27 @@ textarea { } &.pf-widget-radio-group, - &.pf-widget-checkbox-group [data-required=true] { + &.pf-widget-checkbox-group [data-required='true'] { border-radius: 3px; } - &.invalid div.pf-required-flag { + &.invalid div.pf-required-flag, + &.invalid--validate div.pf-invalid-flag { opacity: 1; margin-left: 10px; } - div.pf-required-flag { + div.pf-required-flag, + div.pf-invalid-flag { font-size: 12px; font-weight: bold; - position: relative; + position: absolute; padding: 3px 7px; display: inline; width: auto; color: white; background-color: @required; - box-shadow: 0 4px 4px -4px rgba(0, 0, 0, .5); + box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.5); margin-left: 5px; opacity: 0; @@ -516,11 +514,10 @@ textarea { .pf-form.pf-widget-slideout, .pf-sitegate.pf-widget-slideout { - input, select { &.pf-field-half-width { width: 48%; } } -} \ No newline at end of file +} diff --git a/src/rollup/form/build-form-element.js b/src/rollup/form/build-form-element.js index c585d84..b3551a5 100644 --- a/src/rollup/form/build-form-element.js +++ b/src/rollup/form/build-form-element.js @@ -14,13 +14,15 @@ import addClass from '../utils/class/add-class'; * @params {object} elem * @params {object} form */ -export default function buildFormElement (elem, form) { +export default function buildFormElement(elem, form) { var content, - i, - val, - label, - wrapper = document.createElement('div'), - isGroup = elem.hasOwnProperty('groupType'); + i, + val, + label, + wrapper = document.createElement('div'), + isGroup = elem.hasOwnProperty('groupType'), + reqFlag, + reqTriangle; // group elements include: checkbox groups if (isGroup) { @@ -28,22 +30,22 @@ export default function buildFormElement (elem, form) { content = document.createElement('div'); } else { switch (elem.type) { - case 'email': - content = document.createElement('input'); - content.setAttribute('type', 'email'); - break; - case 'text': - case 'input': - content = document.createElement('input'); - content.setAttribute('type', 'text'); - break; - case 'date': - content = document.createElement('input'); - content.setAttribute('type', 'date'); - break; - default: - content = document.createElement(elem.type); - break; + case 'email': + content = document.createElement('input'); + content.setAttribute('type', 'email'); + break; + case 'text': + case 'input': + content = document.createElement('input'); + content.setAttribute('type', 'text'); + break; + case 'date': + content = document.createElement('input'); + content.setAttribute('type', 'date'); + break; + default: + content = document.createElement(elem.type); + break; } content.setAttribute('name', elem.name); @@ -57,18 +59,18 @@ export default function buildFormElement (elem, form) { // add max and min date for date input if (elem.type === 'date') { var today = new Date(), - offset = today.getTimezoneOffset(), - todayTimezone = new Date(today.getTime() - offset * 60 * 1000), - max = elem.maxDate - ? elem.maxDate === 'today' - ? todayTimezone - : new Date(elem.maxDate) - : null, - min = elem.minDate - ? elem.minDate === 'today' - ? todayTimezone - : new Date(elem.minDate) - : null; + offset = today.getTimezoneOffset(), + todayTimezone = new Date(today.getTime() - offset * 60 * 1000), + max = elem.maxDate + ? elem.maxDate === 'today' + ? todayTimezone + : new Date(elem.maxDate) + : null, + min = elem.minDate + ? elem.minDate === 'today' + ? todayTimezone + : new Date(elem.minDate) + : null; if (max != null) { content.setAttribute('max', max.toISOString().split('T')[0]); @@ -100,19 +102,31 @@ export default function buildFormElement (elem, form) { wrapper.appendChild(label); } - if (elem.required === true || elem.type === 'date' || elem.type === 'email') { + if (elem.required === true) { addClass(wrapper, 'pf-form-required'); - content.setAttribute( - elem.required === true ? 'data-required' : 'data-validate', - 'true' - ); + content.setAttribute('data-required', 'true'); if (elem.label) { - var reqFlag = document.createElement('div'); + reqFlag = document.createElement('div'); reqFlag.className = 'pf-required-flag'; - reqFlag.innerHTML = elem.required === true ? 'required' : 'invalid'; + reqFlag.innerHTML = 'required'; - var reqTriangle = document.createElement('span'); + reqTriangle = document.createElement('span'); + reqFlag.appendChild(reqTriangle); + wrapper.appendChild(reqFlag); + } + } + + if (elem.type === 'date' || elem.type === 'email') { + addClass(wrapper, 'pf-form-required'); + content.setAttribute('data-validate', 'true'); + + if (elem.label) { + reqFlag = document.createElement('div'); + reqFlag.className = 'pf-invalid-flag'; + reqFlag.innerHTML = 'invalid'; + + reqTriangle = document.createElement('span'); reqFlag.appendChild(reqTriangle); wrapper.appendChild(reqFlag); } diff --git a/src/rollup/widgets/actions/construct-widget-actions.js b/src/rollup/widgets/actions/construct-widget-actions.js index 89ee084..785b42e 100644 --- a/src/rollup/widgets/actions/construct-widget-actions.js +++ b/src/rollup/widgets/actions/construct-widget-actions.js @@ -4,7 +4,7 @@ import { callbackTypes, PREFIX_CONFIRM, - PREFIX_CLOSE + PREFIX_CLOSE, } from '../../globals/config'; // dom @@ -37,63 +37,55 @@ import updateActionCookie from './update-action-cookie'; * @params {object} widget * @params {object} config */ -export default function constructWidgetActions (widget, config) { +export default function constructWidgetActions(widget, config) { var widgetOnButtonClick, - widgetFormValidate, - widgetForm, - widgetOk = widget.querySelector('.pf-widget-ok'), - widgetCancel = widget.querySelector('.pf-widget-cancel'), - widgetClose = widget.querySelector('.pf-widget-close'), - widgetReco = widget.querySelector('.pf-content-unit'), - fieldInvalidate; + widgetFormValidate, + widgetForm, + widgetOk = widget.querySelector('.pf-widget-ok'), + widgetCancel = widget.querySelector('.pf-widget-cancel'), + widgetClose = widget.querySelector('.pf-widget-close'), + widgetReco = widget.querySelector('.pf-content-unit'); // Tracking for widgets with a form element switch (config.type) { - case 'form': - case 'sitegate': - case 'subscription': - widgetForm = widget.querySelector('form'); - - var onInputChange = function (event) { - if (event.target.value && event.target.value.length > 0) { - trackWidgetAction('form_start', config, event.target); - } - }; + case 'form': + case 'sitegate': + case 'subscription': + widgetForm = widget.querySelector('form'); + + var onInputChange = function (event) { + if (event.target.value && event.target.value.length > 0) { + trackWidgetAction('form_start', config, event.target); + } + }; - var onInputFocus = function (event) { - trackWidgetAction('focus', config, event.target); - }; + var onInputFocus = function (event) { + trackWidgetAction('focus', config, event.target); + }; - // Additional tracking for input focus and entering text into the form - for (var elem in widgetForm.childNodes) { - if (widgetForm.children.hasOwnProperty(elem)) { - var child = widgetForm.children[elem]; - if ( - typeof child.getAttribute !== 'undefined' && + // Additional tracking for input focus and entering text into the form + for (var elem in widgetForm.childNodes) { + if (widgetForm.children.hasOwnProperty(elem)) { + var child = widgetForm.children[elem]; + if ( + typeof child.getAttribute !== 'undefined' && child.getAttribute('name') !== null - ) { - // Track focus of form elements - child.onfocus = onInputFocus; + ) { + // Track focus of form elements + child.onfocus = onInputFocus; - // Track input to indicate they've begun to interact with the form - child.onchange = onInputChange; + // Track input to indicate they've begun to interact with the form + child.onchange = onInputChange; + } } } - } - - fieldInvalidate = function (field, count, toFocus) { - addClass(field, 'invalid'); - if (toFocus && count === 0) { - toFocus.focus(); - } - }; - // Form submit handler - widgetFormValidate = function (event) { - event.preventDefault(); + // Form submit handler + widgetFormValidate = function (event) { + event.preventDefault(); - // Validate that the form is filled out correctly - var valid = true, + // Validate that the form is filled out correctly + var valid = true, requiredElements = Array.prototype.slice.call( widgetForm.querySelectorAll('[data-required=true]') ), @@ -104,58 +96,64 @@ export default function constructWidgetActions (widget, config) { field, parent; - for (i = 0; i < requiredElements.length; i++) { - field = requiredElements[i]; + for (i = 0; i < requiredElements.length; i++) { + field = requiredElements[i]; - if (hasClass(widgetForm, 'pf-custom-form')) { - if (field.parentNode) { - parent = field.parentNode; - removeClass(parent, 'invalid'); + if (hasClass(widgetForm, 'pf-custom-form')) { + if (field.parentNode) { + parent = field.parentNode; + removeClass(parent, 'invalid'); - if ( - hasClass(parent, 'pf-widget-radio-group') || + if ( + hasClass(parent, 'pf-widget-radio-group') || hasClass(parent, 'pf-widget-checkbox-group') - ) { - var inputs = field.querySelectorAll('input'); - var count = 0; - - for (var j = 0; j < inputs.length; j++) { - var input = inputs[j]; - if (input.checked) { - count++; + ) { + var inputs = field.querySelectorAll('input'); + var count = 0; + + for (var j = 0; j < inputs.length; j++) { + var input = inputs[j]; + if (input.checked) { + count++; + } } - } - if (count === 0) { + if (count === 0) { + valid = false; + addClass(parent, 'invalid'); + } + } else if (!field.value) { valid = false; - fieldInvalidate(parent); + addClass(parent, 'invalid'); + if (field && i === 0) { + field.focus(); + } } - } else if (!field.value) { - valid = false; - fieldInvalidate(parent, i, field); } - } - // legacy support old, non-custom forms - } else if (field.hasAttribute('data-required')) { - removeClass(field, 'invalid'); + // legacy support old, non-custom forms + } else if (field.hasAttribute('data-required')) { + removeClass(field, 'invalid'); - if (!field.value) { - valid = false; - fieldInvalidate(field, i, field); + if (!field.value) { + valid = false; + addClass(field, 'invalid'); + if (field && i === 0) { + field.focus(); + } + } } } - } - for (i = 0; i < validatableElements.length; i++) { - field = validatableElements[i]; + for (i = 0; i < validatableElements.length; i++) { + field = validatableElements[i]; - if (hasClass(widgetForm, 'pf-custom-form')) { - if (field.parentNode) { - parent = field.parentNode; - removeClass(parent, 'invalid'); + if (hasClass(widgetForm, 'pf-custom-form')) { + if (field.parentNode) { + parent = field.parentNode; + removeClass(parent, 'invalid--validate'); - if ( - (field.value !== '' && + if ( + (field.value !== '' && field.getAttribute('type') === 'email' && !emailValid(field.value)) || (field.getAttribute('type') === 'date' && @@ -164,63 +162,69 @@ export default function constructWidgetActions (widget, config) { field.getAttribute('max'), field.getAttribute('min') )) - ) { - valid = false; - fieldInvalidate(parent, i, field); + ) { + valid = false; + addClass(parent, 'invalid--validate'); + if (field && i === 0) { + field.focus(); + } + } } - } - // legacy support old, non-custom forms - } else if (field.hasAttribute('data-validate')) { - removeClass(field, 'invalid'); + // legacy support old, non-custom forms + } else if (field.hasAttribute('data-validate')) { + removeClass(field, 'invalid'); - if ( - field.getAttribute('type') === 'email' && + if ( + field.getAttribute('type') === 'email' && !emailValid(field.value) && field.value !== '' - ) { - valid = false; - fieldInvalidate(field, i, field); + ) { + valid = false; + addClass(field, 'invalid'); + if (field && i === 0) { + field.focus(); + } + } } } - } - return valid; - }; + return valid; + }; - break; + break; } switch (config.layout) { - case 'button': - if (typeof config.onClick === 'function') { - widgetOnButtonClick = function (event) { - config.onClick(callbackTypes.CLICK, { - widget: widget, - config: config, - event: event - }); - }; - } - break; - case 'modal': - if (config.type !== 'sitegate') { - config.listeners.escape = { - type: 'keydown', - target: document, - fn: function (event) { - event = event || window.event; - if (event.keyCode === 27) { - trackWidgetAction('close', config); - updateActionCookie(PREFIX_CLOSE + widget.id, config.expiration); - closeWidget(widget.id, true); - widgetOnModalClose(widget, config, event); - } - } - }; - } - break; - default: - break; + case 'button': + if (typeof config.onClick === 'function') { + widgetOnButtonClick = function (event) { + config.onClick(callbackTypes.CLICK, { + widget: widget, + config: config, + event: event, + }); + }; + } + break; + case 'modal': + if (config.type !== 'sitegate') { + config.listeners.escape = { + type: 'keydown', + target: document, + fn: function (event) { + event = event || window.event; + if (event.keyCode === 27) { + trackWidgetAction('close', config); + updateActionCookie(PREFIX_CLOSE + widget.id, config.expiration); + closeWidget(widget.id, true); + widgetOnModalClose(widget, config, event); + } + }, + }; + } + break; + default: + break; } if (widgetClose) { @@ -238,21 +242,21 @@ export default function constructWidgetActions (widget, config) { widgetOk.onclick = function (event) { var data, - widgetAction, - shouldClose = true; + widgetAction, + shouldClose = true; // special case for form widgets if (typeof widgetFormValidate === 'function') { switch (config.type) { - case 'form': - widgetAction = 'submit'; - break; - case 'subscription': - widgetAction = 'subscribe'; - break; - case 'sitegate': - widgetAction = 'unlock'; - break; + case 'form': + widgetAction = 'submit'; + break; + case 'subscription': + widgetAction = 'subscribe'; + break; + case 'sitegate': + widgetAction = 'unlock'; + break; } // validate form input @@ -276,7 +280,7 @@ export default function constructWidgetActions (widget, config) { .map(function (element) { return { name: element.name || element.id, - value: element.value + value: element.value, }; }); @@ -287,7 +291,7 @@ export default function constructWidgetActions (widget, config) { widget: widget, config: config, event: event, - data: data + data: data, }); } } @@ -312,7 +316,7 @@ export default function constructWidgetActions (widget, config) { var param = { widget: widget, config: config, - event: event + event: event, }; // include the data from the form if we have it. diff --git a/src/rollup/widgets/construct-widget-layout.js b/src/rollup/widgets/construct-widget-layout.js index 7e74a6a..c24b2cb 100644 --- a/src/rollup/widgets/construct-widget-layout.js +++ b/src/rollup/widgets/construct-widget-layout.js @@ -24,17 +24,17 @@ import formStateActions from './actions/form-state-actions'; * @params {object} widget * @params {object} config */ -export default function constructWidgetLayout (widget, config) { +export default function constructWidgetLayout(widget, config) { var node, - child, - i, - widgetContent = widget.querySelector('.pf-widget-content'), - widgetCancel = widget.querySelector('.pf-widget-cancel'), - widgetOk = widget.querySelector('.pf-widget-ok'), - widgetHeadline = widget.querySelectorAll('.pf-widget-headline'), - widgetBody = widget.querySelector('.pf-widget-body'), - widgetMessage = widget.querySelector('.pf-widget-message'), - widgetFooter = widget.querySelector('.pf-widget-footer'); + child, + i, + widgetContent = widget.querySelector('.pf-widget-content'), + widgetCancel = widget.querySelector('.pf-widget-cancel'), + widgetOk = widget.querySelector('.pf-widget-ok'), + widgetHeadline = widget.querySelectorAll('.pf-widget-headline'), + widgetBody = widget.querySelector('.pf-widget-body'), + widgetMessage = widget.querySelector('.pf-widget-message'), + widgetFooter = widget.querySelector('.pf-widget-footer'); if (widgetCancel !== null && !config.cancelShow) { node = widgetCancel; @@ -70,114 +70,114 @@ export default function constructWidgetLayout (widget, config) { // Form layouts should have a default success message switch (config.type) { - case 'form': - case 'subscription': - case 'sitegate': - switch (config.layout) { - case 'modal': - case 'slideout': + case 'form': + case 'subscription': case 'sitegate': - case 'inline': - if (!config.formStates) { - break; - } + switch (config.layout) { + case 'modal': + case 'slideout': + case 'sitegate': + case 'inline': + if (!config.formStates) { + break; + } - // success state - if (config.formStates.success) { - var success = constructFormState(config, widget, 'success'); - widgetContent.appendChild(success); - formStateActions(config, widget, 'success'); - } + // success state + if (config.formStates.success) { + var success = constructFormState(config, widget, 'success'); + widgetContent.appendChild(success); + formStateActions(config, widget, 'success'); + } - // error state - if (config.formStates.error) { - var error = constructFormState(config, widget, 'error'); - widgetContent.appendChild(error); - formStateActions(config, widget, 'error'); - } + // error state + if (config.formStates.error) { + var error = constructFormState(config, widget, 'error'); + widgetContent.appendChild(error); + formStateActions(config, widget, 'error'); + } + break; + } break; - } - break; } switch (config.layout) { - case 'modal': - case 'slideout': - case 'sitegate': - case 'inline': - if (widgetContent && config.branding) { - var branding = document.createElement('div'); - branding.className = 'branding'; - branding.innerHTML = templates.assets.lytics; - widgetContent.appendChild(branding); - } - - break; - } - - switch (config.type) { - case 'form': - switch (config.layout) { case 'modal': case 'slideout': - case 'random': + case 'sitegate': case 'inline': + if (widgetContent && config.branding) { + var branding = document.createElement('div'); + branding.className = 'branding'; + branding.innerHTML = templates.assets.lytics; + widgetContent.appendChild(branding); + } + break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'subscription': - switch (config.layout) { - case 'modal': - case 'bar': - case 'slideout': - case 'random': - case 'inline': + } + + switch (config.type) { + case 'form': + switch (config.layout) { + case 'modal': + case 'slideout': + case 'random': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'message': - switch (config.layout) { - case 'modal': - case 'slideout': + case 'subscription': + switch (config.layout) { + case 'modal': + case 'bar': + case 'slideout': + case 'random': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } break; - case 'random': - case 'bar': - case 'button': - case 'inline': + case 'message': + switch (config.layout) { + case 'modal': + case 'slideout': + break; + case 'random': + case 'bar': + case 'button': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } break; - default: - throw new Error('Invalid widget layout value'); - } - break; - case 'sitegate': - switch (config.layout) { - case 'modal': - if (config.showForm === false) { - node = widget.querySelector('form'); - child = node.querySelectorAll('input, select, textarea'); - - if (node) { - for (i = 0; i < child.length; i++) { - node.removeChild(child[i]); - } + case 'sitegate': + switch (config.layout) { + case 'modal': + if (config.showForm === false) { + node = widget.querySelector('form'); + child = node.querySelectorAll('input, select, textarea'); + + if (node) { + for (i = 0; i < child.length; i++) { + node.removeChild(child[i]); + } - child = node.querySelector('.pf-sitegate-clear'); + child = node.querySelector('.pf-sitegate-clear'); - if (child) { - node.removeChild(child); + if (child) { + node.removeChild(child); + } + } } - } + break; + default: + throw new Error('Invalid widget layout value'); } break; - default: - throw new Error('Invalid widget layout value'); - } - break; } // NOTE Set The headline @@ -200,132 +200,136 @@ export default function constructWidgetLayout (widget, config) { } switch (config.type) { - case 'sitegate': - case 'form': - // Check if custom form is defined - if (config.formElements && config.formElements.length) { - // remove the existing form fields - var form = widget.querySelector('form'); - addClass(form, 'pf-custom-form'); - var childName; - var arr = form.children; - - for (var k = 0; k < arr.length; k++) { - child = arr[k]; - - if (typeof child.getAttribute !== 'undefined') { - childName = child.getAttribute('name'); - - if (childName != null) { - form.removeChild(child); - k--; + case 'sitegate': + case 'form': + // Check if custom form is defined + if (config.formElements && config.formElements.length) { + // remove the existing form fields + var form = widget.querySelector('form'); + addClass(form, 'pf-custom-form'); + var childName; + var arr = form.children; + + for (var k = 0; k < arr.length; k++) { + child = arr[k]; + + if (typeof child.getAttribute !== 'undefined') { + childName = child.getAttribute('name'); + + if (childName != null) { + form.removeChild(child); + k--; + } } } - } - buildWidgetForm(config.formElements, form); - } else { - // support old form functions - var getFormElement = function (field) { - if (field === 'name') { - return widget.querySelector('input[name="username"]'); - } + buildWidgetForm(config.formElements, form); + } else { + // support old form functions + var getFormElement = function (field) { + if (field === 'name') { + return widget.querySelector('input[name="username"]'); + } - return widget.querySelector('form [name="' + field + '"]'); - }; + return widget.querySelector('form [name="' + field + '"]'); + }; - // Set placeholders - Object.keys(config.placeholders).forEach(function (field) { - var element = getFormElement(field); + // Set placeholders + Object.keys(config.placeholders).forEach(function (field) { + var element = getFormElement(field); - if (element == null) { - return; - } - if (typeof element.placeholder !== 'undefined') { - element.placeholder = config.placeholders[field]; - } else if (typeof element.options !== 'undefined') { - element.options[0].innerHTML = config.placeholders[field]; - } + if (element == null) { + return; + } + if (typeof element.placeholder !== 'undefined') { + element.placeholder = config.placeholders[field]; + } else if (typeof element.options !== 'undefined') { + element.options[0].innerHTML = config.placeholders[field]; + } - element.setAttribute('aria-label', config.placeholders[field]); - }); + element.setAttribute('aria-label', config.placeholders[field]); + }); - // Set required Fields - Object.keys(config.required).forEach(function (field) { - var element = getFormElement(field); + // Set required Fields + Object.keys(config.required).forEach(function (field) { + var element = getFormElement(field); - if (element && config.required[field]) { - element.setAttribute('data-required', 'true'); - } - }); + if (element && config.required[field]) { + element.setAttribute('data-required', 'true'); + } + }); - // Hide fields - Object.keys(config.fields).forEach(function (field) { - var element = getFormElement(field); + // Hide fields + Object.keys(config.fields).forEach(function (field) { + var element = getFormElement(field); - if (element && !config.fields[field] && element.parentNode) { - element.parentNode.removeChild(element); - } - }); + if (field === 'email' && config.fields[field] && element) { + element.setAttribute('data-validate', 'true'); + } + + if (element && !config.fields[field] && element.parentNode) { + element.parentNode.removeChild(element); + } + }); - // NOTE: collapse half-width inputs - Array.prototype.slice - .call(widget.querySelectorAll('form .pf-field-half-width')) - .forEach(function (element, halfcount) { - var parent = element.parentNode, + // NOTE: collapse half-width inputs + Array.prototype.slice + .call(widget.querySelectorAll('form .pf-field-half-width')) + .forEach(function (element, halfcount) { + var parent = element.parentNode, prev = element.previousElementSibling, next = element.nextElementSibling; - if (parent) { - if (element.className.indexOf('pf-field-half-width') !== -1) { - if (halfcount % 2) { - // odd - addClass(element, 'right'); + if (parent) { + if (element.className.indexOf('pf-field-half-width') !== -1) { + if (halfcount % 2) { + // odd + addClass(element, 'right'); - if ( - !( - prev && + if ( + !( + prev && prev.className.indexOf('pf-field-half-width') !== -1 + ) + ) { + removeClass(element, 'pf-field-half-width'); + } + } else if ( + !( + next && next.className.indexOf('pf-field-half-width') !== -1 ) ) { + // even removeClass(element, 'pf-field-half-width'); } - } else if ( - !( - next && next.className.indexOf('pf-field-half-width') !== -1 - ) - ) { - // even - removeClass(element, 'pf-field-half-width'); } } - } - }); - } - - // For select boxes we need to control the color of - // the placeholder text - var selects = widget.querySelectorAll('select'); - - for (i = 0; i < selects.length; i++) { - // default class indicates the placeholder text color - if (selects[i].value === '') { - addClass(selects[i], 'default'); + }); } - selects[i].onchange = function () { - if (this.value !== '') { - removeClass(this, 'default'); - } else { - addClass(this, 'default'); + // For select boxes we need to control the color of + // the placeholder text + var selects = widget.querySelectorAll('select'); + + for (i = 0; i < selects.length; i++) { + // default class indicates the placeholder text color + if (selects[i].value === '') { + addClass(selects[i], 'default'); } - }; - } - break; - case 'subscription': - widget.querySelector('input').placeholder = config.placeholders.email; - break; + selects[i].onchange = function () { + if (this.value !== '') { + removeClass(this, 'default'); + } else { + addClass(this, 'default'); + } + }; + } + + break; + case 'subscription': + widget.querySelector('input').placeholder = config.placeholders.email; + break; } if (config.msg) { diff --git a/test/acceptance/widget.spec.js b/test/acceptance/widget.spec.js index 70fa859..29ae558 100644 --- a/test/acceptance/widget.spec.js +++ b/test/acceptance/widget.spec.js @@ -17,13 +17,13 @@ describe('Widgets', function () { var w1 = new pathfora.Message({ msg: 'Duplicate id test1', layout: 'modal', - id: 'asd' + id: 'asd', }); var w2 = new pathfora.Form({ msg: 'Duplcate id test2', layout: 'slideout', - id: 'asd' + id: 'asd', }); expect(function () { @@ -35,13 +35,13 @@ describe('Widgets', function () { var messageBar = new pathfora.Message({ layout: 'bar', id: 'global-config-1', - msg: 'test' + msg: 'test', }); var config = { generic: { - theme: 'light' - } + theme: 'light', + }, }; pathfora.initializeWidgets([messageBar], config); @@ -59,13 +59,13 @@ describe('Widgets', function () { completedActions: [], cancelledActions: [], displayedWidgets: [], - abTestingGroups: [] + abTestingGroups: [], }; var form = new pathfora.Subscription({ msg: 'test', id: 'clear-widget', - layout: 'modal' + layout: 'modal', }); pathfora.initializeWidgets([form]); @@ -87,7 +87,7 @@ describe('Widgets', function () { var promoWidget = new pathfora.Message({ layout: 'bar', msg: 'Opening widget', - id: 'widget-1' + id: 'widget-1', }); pathfora.initializeWidgets([promoWidget]); @@ -110,14 +110,14 @@ describe('Widgets', function () { layout: 'slideout', position: 'right', msg: 'Welcome to our test website', - id: 'test-id-widget' + id: 'test-id-widget', }); expect(function () { return new pathfora.Message({ layout: 'slideout', position: 'left', - msg: 'Welcome to our test website' + msg: 'Welcome to our test website', }); }).toThrow(new Error('All widgets must have an id value')); @@ -135,7 +135,7 @@ describe('Widgets', function () { var openedWidget = new pathfora.Message({ layout: 'modal', id: 'append-widget', - msg: 'test widget' + msg: 'test widget', }); pathfora.initializeWidgets([openedWidget]); @@ -158,7 +158,7 @@ describe('Widgets', function () { var testWidget = new pathfora.Message({ layout: 'modal', msg: 'Close widget test', - id: 'close-clear-widget' + id: 'close-clear-widget', }); pathfora.initializeWidgets([testWidget]); @@ -184,14 +184,14 @@ describe('Widgets', function () { id: 'modal-esc-test', layout: 'modal', headline: 'Message Title', - msg: 'test' + msg: 'test', }); var gate = new pathfora.SiteGate({ id: 'modal-esc-test2', layout: 'modal', headline: 'Message Title', - msg: 'test' + msg: 'test', }); pathfora.initializeWidgets([modal, gate]); @@ -223,36 +223,36 @@ describe('Widgets', function () { id: 'message-test-widget', layout: 'slideout', headline: 'Message Title', - theme: 'custom' + theme: 'custom', }); var form = new pathfora.Form({ id: 'form-test-widget', layout: 'modal', headline: 'Headline Title', - theme: 'custom' + theme: 'custom', }); var subscription = new pathfora.Subscription({ id: 'subscription-test-widget', layout: 'bar', - theme: 'custom' + theme: 'custom', }); pathfora.initializeWidgets([message, form, subscription]); // test message var mwidget = $('#' + message.id), - mheadline = mwidget.find('.pf-widget-headline'), - mtext = mwidget.find('.pf-widget-message'); + mheadline = mwidget.find('.pf-widget-headline'), + mtext = mwidget.find('.pf-widget-message'); expect(mheadline.html()).not.toEqual('undefined'); expect(mtext.html()).not.toEqual('undefined'); // test form var fwidget = $('#' + form.id), - fheadline = fwidget.find('.pf-widget-headline'), - ftext = fwidget.find('.pf-widget-message'); + fheadline = fwidget.find('.pf-widget-headline'), + ftext = fwidget.find('.pf-widget-message'); expect(fheadline.html()).not.toEqual('undefined'); expect(ftext.html()).not.toEqual('undefined'); @@ -277,19 +277,19 @@ describe('Widgets', function () { msg: 'test', id: 'branding1', layout: 'slideout', - branding: true + branding: true, }); var w2 = new pathfora.Message({ msg: 'test', id: 'branding2', - layout: 'modal' + layout: 'modal', }); pathfora.initializeWidgets([w1, w2]); var widget1 = $('#' + w1.id), - widget2 = $('#' + w2.id); + widget2 = $('#' + w2.id); expect(widget1.find('.branding svg').length).toBe(1); expect(widget2.find('.branding svg').length).toBe(0); @@ -300,39 +300,39 @@ describe('Widgets', function () { id: 'footer1', msg: 'test', layout: 'modal', - footerText: 'Footer text' + footerText: 'Footer text', }); var modalNoFooter = new pathfora.Message({ id: 'footer2', msg: 'test', - layout: 'modal' + layout: 'modal', }); var slideoutFooter = new pathfora.Message({ id: 'slidout1', msg: 'test', layout: 'slideout', - footerText: 'Footer text' + footerText: 'Footer text', }); var slideoutNoFooter = new pathfora.Message({ id: 'slideout2', msg: 'test', - layout: 'slideout' + layout: 'slideout', }); pathfora.initializeWidgets([ modalFooter, modalNoFooter, slideoutFooter, - slideoutNoFooter + slideoutNoFooter, ]); var modal1 = $('#' + modalFooter.id), - modal2 = $('#' + modalNoFooter.id), - slideout1 = $('#' + slideoutFooter.id), - slideout2 = $('#' + slideoutNoFooter.id); + modal2 = $('#' + modalNoFooter.id), + slideout1 = $('#' + slideoutFooter.id), + slideout2 = $('#' + slideoutNoFooter.id); expect(modal1.find('.pf-widget-footer').html()).toEqual('Footer text'); expect(modal2.find('.pf-widget-footer').html()).toEqual(''); expect(slideout1.find('.pf-widget-footer').html()).toEqual('Footer text'); @@ -342,8 +342,8 @@ describe('Widgets', function () { it('should contain pf-widget-text div for inline and modal layouts', function () { var modal = new pathfora.Message({ id: 'modal', - msg:'testmodal', - layout: 'modal' + msg: 'testmodal', + layout: 'modal', }); var div = document.createElement('div'); div.className = 'some-dom-element'; @@ -352,17 +352,17 @@ describe('Widgets', function () { id: 'inline', layout: 'inline', position: '.some-dom-element', - msg: 'testing' + msg: 'testing', }); var slideout = new pathfora.Message({ id: 'slideout', msg: 'test', - layout: 'slideout' + layout: 'slideout', }); pathfora.initializeWidgets([modal, inline, slideout]); var modalWidget = $('#' + modal.id), - inlineWidget = $('#' + inline.id), - slideoutWidget = $('#' + slideout.id); + inlineWidget = $('#' + inline.id), + slideoutWidget = $('#' + slideout.id); expect(modalWidget.find('.pf-widget-text').html()).toBeDefined(); expect(inlineWidget.find('.pf-widget-text').html()).toBeDefined(); expect(slideoutWidget.find('.pf-widget-text').html()).toBeUndefined(); @@ -371,10 +371,10 @@ describe('Widgets', function () { it('should append pf-widget-img to pf-widget-content for modal and inline layouts', function () { var modal = new pathfora.Message({ id: 'modal', - msg:'testmodal', + msg: 'testmodal', layout: 'modal', variant: 2, - image: 'https://lytics.github.io/pathforadocs/assets/lion.jpg' + image: 'https://lytics.github.io/pathforadocs/assets/lion.jpg', }); var div = document.createElement('div'); div.className = 'some-dom-element'; @@ -385,14 +385,20 @@ describe('Widgets', function () { position: '.some-dom-element', msg: 'testing', variant: 2, - image: 'https://lytics.github.io/pathforadocs/assets/lion.jpg' + image: 'https://lytics.github.io/pathforadocs/assets/lion.jpg', }); pathfora.initializeWidgets([modal, inline]); var modalWidget = $('#' + modal.id), - inlineWidget = $('#' + inline.id); - expect(modalWidget.find('.pf-widget-content').find('img').html()).toBeDefined(); - expect(inlineWidget.find('.pf-widget-content').find('img').html()).toBeDefined(); - expect(modalWidget.find('.pf-widget-text').find('img').html()).toBeUndefined(); + inlineWidget = $('#' + inline.id); + expect( + modalWidget.find('.pf-widget-content').find('img').html() + ).toBeDefined(); + expect( + inlineWidget.find('.pf-widget-content').find('img').html() + ).toBeDefined(); + expect( + modalWidget.find('.pf-widget-text').find('img').html() + ).toBeUndefined(); }); // ------------------------- @@ -405,7 +411,7 @@ describe('Widgets', function () { position: 'left', msg: 'light button', id: 'light-widget', - theme: 'light' + theme: 'light', }); var w2 = new pathfora.Message({ @@ -413,7 +419,7 @@ describe('Widgets', function () { position: 'right', msg: 'dark button', id: 'dark-widget', - theme: 'dark' + theme: 'dark', }); var w3 = new pathfora.Message({ @@ -421,22 +427,22 @@ describe('Widgets', function () { position: 'top-left', msg: 'custom color button', id: 'custom-widget', - theme: 'custom' + theme: 'custom', }); var config = { generic: { colors: { - background: '#fff' - } - } + background: '#fff', + }, + }, }; pathfora.initializeWidgets([w1, w2, w3], config); var light = $('#' + w1.id), - dark = $('#' + w2.id), - custom = $('#' + w3.id); + dark = $('#' + w2.id), + custom = $('#' + w3.id); expect(light.hasClass('pf-theme-light')).toBeTruthy(); expect(dark.hasClass('pf-theme-dark')).toBeTruthy(); @@ -456,7 +462,7 @@ describe('Widgets', function () { msg: 'light button', id: 'widget-no-theme', className: 'widget-no-theme-class', - theme: 'none' + theme: 'none', }); pathfora.initializeWidgets([w1]); @@ -471,7 +477,7 @@ describe('Widgets', function () { var openedWidget = new pathfora.Message({ layout: 'modal', msg: 'Displayed on init', - id: 'displayed-on-init' + id: 'displayed-on-init', }); var closedWidget = new pathfora.Message({ @@ -479,8 +485,8 @@ describe('Widgets', function () { msg: 'Hidden on init', id: 'hidden-on-init', displayConditions: { - showOnInit: false - } + showOnInit: false, + }, }); pathfora.initializeWidgets([openedWidget, closedWidget]); @@ -495,7 +501,7 @@ describe('Widgets', function () { layout: 'modal', msg: 'Custom style test', headline: 'Hello', - theme: 'custom' + theme: 'custom', }); var config = { @@ -508,9 +514,9 @@ describe('Widgets', function () { actionText: '#ddd', actionBackground: '#111', cancelText: '#333', - cancelBackground: '#eee' - } - } + cancelBackground: '#eee', + }, + }, }; pathfora.initializeWidgets([modal], config); @@ -542,7 +548,7 @@ describe('Widgets', function () { theme: 'custom', colors: { required: '#ba00a6', - requiredText: '#ebcee8' + requiredText: '#ebcee8', }, formElements: [ { @@ -553,25 +559,25 @@ describe('Widgets', function () { values: [ { label: 'Red', - value: 'red' + value: 'red', }, { label: 'Blue', - value: 'blue' + value: 'blue', }, { label: 'Green', - value: 'green' - } - ] + value: 'green', + }, + ], }, { type: 'input', name: 'name', placeholder: 'Your Name', - required: true - } - ] + required: true, + }, + ], }); pathfora.initializeWidgets([modal]); @@ -604,8 +610,8 @@ describe('Widgets', function () { name: 'Test confirm action', callback: function () { alert('test confirmation'); - } - } + }, + }, }); pathfora.initializeWidgets([modal]); @@ -625,8 +631,8 @@ describe('Widgets', function () { confirmAction: { callback: function () { alert('test confirmation'); - } - } + }, + }, }); pathfora.initializeWidgets([modal]); @@ -644,8 +650,8 @@ describe('Widgets', function () { { name: 'username', value: 'test name' }, { name: 'email', value: 'test@example.com' }, { name: 'title', value: '' }, - { name: 'message', value: '' } - ] + { name: 'message', value: '' }, + ], }) ); }); @@ -657,37 +663,37 @@ describe('Widgets', function () { msg: 'Confirm action test modal', formElements: [ { - 'type': 'text', - 'required': true, - 'label': 'Email Address', - 'name': 'email' + type: 'text', + required: true, + label: 'Email Address', + name: 'email', }, { - 'type': 'checkbox-group', - 'required': true, - 'label': 'Which feeds would you like to subscribe to?', - 'name': 'subscription_feeds', - 'values': [ + type: 'checkbox-group', + required: true, + label: 'Which feeds would you like to subscribe to?', + name: 'subscription_feeds', + values: [ { - 'label': 'Beauty & Perfumes', - 'value': 'beauty' + label: 'Beauty & Perfumes', + value: 'beauty', }, { - 'label': 'Electronics', - 'value': 'electronics' + label: 'Electronics', + value: 'electronics', }, { - 'label': 'Fashion', - 'value': 'fashion' - } - ] - } + label: 'Fashion', + value: 'fashion', + }, + ], + }, ], confirmAction: { callback: function () { alert('test confirmation'); - } - } + }, + }, }); pathfora.initializeWidgets([modal]); @@ -703,8 +709,8 @@ describe('Widgets', function () { jasmine.objectContaining({ data: [ { name: 'email', value: 'test@example.com' }, - { name: 'subscription_feeds', value: 'fashion' } - ] + { name: 'subscription_feeds', value: 'fashion' }, + ], }) ); }); @@ -719,11 +725,11 @@ describe('Widgets', function () { close: false, callback: function () { // do something - } + }, }, cancelAction: { - close: false - } + close: false, + }, }); pathfora.initializeWidgets([modal]); @@ -752,8 +758,8 @@ describe('Widgets', function () { name: 'Test cancel action', callback: function () { alert('test cancel'); - } - } + }, + }, }); pathfora.initializeWidgets([modal]); @@ -772,8 +778,8 @@ describe('Widgets', function () { name: 'Test confirm action', callback: function () { alert('test confirmation'); - } - } + }, + }, }); var w2 = new pathfora.Message({ @@ -783,14 +789,14 @@ describe('Widgets', function () { name: 'Test cancel action', callback: function () { alert('test cancel'); - } - } + }, + }, }); pathfora.initializeWidgets([w1, w2]); var widgetA = $('#widget-with-action-callback'), - widgetB = $('#widget-with-cancel-callback'); + widgetB = $('#widget-with-cancel-callback'); spyOn(w1.confirmAction, 'callback'); spyOn(w2.cancelAction, 'callback'); @@ -810,26 +816,26 @@ describe('Widgets', function () { var w1 = new pathfora.Message({ msg: 'button - default pos test', id: 'position-widget-1', - layout: 'button' + layout: 'button', }); var w2 = new pathfora.Message({ msg: 'bar - default pos test', id: 'position-widget-2', - layout: 'bar' + layout: 'bar', }); var w3 = new pathfora.Message({ msg: 'slideout - default pos test', id: 'position-widget-3', - layout: 'slideout' + layout: 'slideout', }); pathfora.initializeWidgets([w1, w2, w3]); var widget1 = $('#' + w1.id), - widget2 = $('#' + w2.id), - widget3 = $('#' + w3.id); + widget2 = $('#' + w2.id), + widget3 = $('#' + w3.id); expect(widget1.hasClass('pf-position-top-left')).toBeTruthy(); expect(widget2.hasClass('pf-position-top-absolute')).toBeTruthy(); @@ -841,7 +847,7 @@ describe('Widgets', function () { msg: 'Widget positioning test', layout: 'modal', id: 'region-widget', - position: 'customPos' + position: 'customPos', }); spyOn(console, 'warn'); @@ -857,7 +863,7 @@ describe('Widgets', function () { msg: 'Widget positioning test', layout: 'modal', id: 'custom-position-widget', - positionSelector: '.does-not-exist' + positionSelector: '.does-not-exist', }); expect(function () { @@ -875,7 +881,7 @@ describe('Widgets', function () { layout: 'modal', positionSelector: '#overlay', id: 'custom-position-modal', - msg: 'yay' + msg: 'yay', }); pathfora.initializeWidgets([inline]); @@ -899,7 +905,7 @@ describe('Widgets', function () { layout: 'inline', position: '.a-non-existent-div', id: 'inline-1', - msg: 'inline' + msg: 'inline', }); var inlineCustom = new pathfora.Message({ @@ -907,7 +913,7 @@ describe('Widgets', function () { layout: 'inline', positionSelector: '.a-non-existent-div', id: 'inline-2', - msg: 'inline' + msg: 'inline', }); expect(function () { @@ -928,7 +934,7 @@ describe('Widgets', function () { layout: 'inline', position: '#a-real-div', id: 'inline-1', - msg: 'inline' + msg: 'inline', }); var inlineCustom = new pathfora.Message({ @@ -936,7 +942,7 @@ describe('Widgets', function () { layout: 'inline', positionSelector: '#a-real-div', id: 'inline-2', - msg: 'inline' + msg: 'inline', }); pathfora.initializeWidgets([inline, inlineCustom]); @@ -970,7 +976,7 @@ describe('Widgets', function () { return; } cb(false); - } + }, }, formStates: { success: { @@ -983,7 +989,7 @@ describe('Widgets', function () { name: 'confirm success', callback: function () { alert('confirm success'); - } + }, }, cancelShow: true, cancelMessage: 'cancel success', @@ -991,8 +997,8 @@ describe('Widgets', function () { name: 'cancel success', callback: function () { alert('cancel success'); - } - } + }, + }, }, error: { headline: 'test', @@ -1004,7 +1010,7 @@ describe('Widgets', function () { name: 'confirm error', callback: function () { alert('confirm error'); - } + }, }, cancelShow: true, cancelMessage: 'cancel error', @@ -1012,15 +1018,15 @@ describe('Widgets', function () { name: 'cancel error', callback: function () { alert('cancel error'); - } - } - } - } + }, + }, + }, + }, }); window.pathfora.initializeWidgets([formStatesWidget]); var widget = $('#' + formStatesWidget.id), - form = widget.find('form'); + form = widget.find('form'); expect(form.length).toBe(1); var name = form.find('input[name="username"]'); @@ -1043,7 +1049,7 @@ describe('Widgets', function () { ); var success = widget.find('.success-state'), - error = widget.find('.error-state'); + error = widget.find('.error-state'); expect(form.css('display')).toBe('none'); expect(success.css('display')).toBe('block'); @@ -1080,7 +1086,7 @@ describe('Widgets', function () { 'pf-widget-variant': '1', 'pf-widget-event': 'success.confirm', 'pf-widget-action': - formStatesWidget.formStates.success.confirmAction.name + formStatesWidget.formStates.success.confirmAction.name, }) ); pathfora.clearAll(); @@ -1140,7 +1146,7 @@ describe('Widgets', function () { 'pf-widget-variant': '1', 'pf-widget-event': 'error.cancel', 'pf-widget-action': - formStatesWidget.formStates.error.cancelAction.name + formStatesWidget.formStates.error.cancelAction.name, }) ); done(); @@ -1159,8 +1165,8 @@ describe('Widgets', function () { layout: 'slideout', success: { msg: 'a custom success message', - delay: 2 - } + delay: 2, + }, }); pathfora.initializeWidgets([successForm]); @@ -1199,8 +1205,8 @@ describe('Widgets', function () { layout: 'slideout', success: { msg: 'a custom success message', - delay: 0 - } + delay: 0, + }, }); pathfora.initializeWidgets([successForm2]); @@ -1249,16 +1255,16 @@ describe('Widgets', function () { name: 'test success confirmation', callback: function () { window.alert('confirmed'); - } + }, }, cancelAction: { name: 'test success cancelation', callback: function () { window.alert('canceled'); - } + }, }, - delay: 0 - } + delay: 0, + }, }); pathfora.initializeWidgets([successForm3]); @@ -1292,7 +1298,7 @@ describe('Widgets', function () { 'pf-widget-layout': 'slideout', 'pf-widget-variant': '1', 'pf-widget-event': 'success.confirm', - 'pf-widget-action': successForm3.success.confirmAction.name + 'pf-widget-action': successForm3.success.confirmAction.name, }) ); expect(window.alert).toHaveBeenCalledWith('confirmed'); @@ -1316,7 +1322,7 @@ describe('Widgets', function () { 'pf-widget-layout': 'slideout', 'pf-widget-variant': '1', 'pf-widget-event': 'success.cancel', - 'pf-widget-action': successForm3.success.cancelAction.name + 'pf-widget-action': successForm3.success.cancelAction.name, }) ); expect(window.alert).toHaveBeenCalledWith('canceled'); @@ -1338,14 +1344,14 @@ describe('Widgets', function () { msg: 'Custom button text test', headline: 'Hello', okMessage: 'Confirm Here', - cancelMessage: 'Cancel Here' + cancelMessage: 'Cancel Here', }); pathfora.initializeWidgets([modal]); var widget = $('#' + modal.id), - actionBtn = widget.find('.pf-widget-ok'), - cancelBtn = widget.find('.pf-widget-cancel'); + actionBtn = widget.find('.pf-widget-ok'), + cancelBtn = widget.find('.pf-widget-cancel'); expect(actionBtn.html()).toBe('Confirm Here'); expect(cancelBtn.html()).toBe('Cancel Here'); @@ -1363,12 +1369,12 @@ describe('Widgets', function () { layout: 'slideout', fields: { title: false, - username: false + username: false, }, required: { message: true, - email: false - } + email: false, + }, }); pathfora.initializeWidgets([formfields]); @@ -1379,9 +1385,8 @@ describe('Widgets', function () { for (var elem in theform[0].children) { if (typeof theform[0].children[elem].getAttribute !== 'undefined') { var inputname = theform[0].children[elem].getAttribute('name'), - inputrequired = theform[0].children[elem].getAttribute( - 'data-required' - ); + inputrequired = + theform[0].children[elem].getAttribute('data-required'); if (inputname === 'message') { expect(inputrequired).toBe('true'); @@ -1409,7 +1414,7 @@ describe('Widgets', function () { type: 'input', name: 'name', placeholder: 'Your Name', - required: true + required: true, }, { type: 'checkbox-group', @@ -1418,11 +1423,11 @@ describe('Widgets', function () { values: [ { label: 'I agree', - value: 'agree' - } - ] - } - ] + value: 'agree', + }, + ], + }, + ], }); pathfora.initializeWidgets([customForm]); @@ -1432,10 +1437,7 @@ describe('Widgets', function () { widget.find('[name=name]').val('my name here'); spyOn(jstag, 'send'); - widget - .find('form') - .find('.pf-widget-ok') - .click(); + widget.find('form').find('.pf-widget-ok').click(); expect(jstag.send).toHaveBeenCalledWith( jasmine.objectContaining({ @@ -1446,8 +1448,8 @@ describe('Widgets', function () { 'pf-widget-event': 'submit', 'pf-custom-form': { 'terms_agreement': ['agree'], - name: 'my name here' - } + name: 'my name here', + }, }) ); done(); @@ -1468,17 +1470,17 @@ describe('Widgets', function () { values: [ { label: 'Cat', - value: 'cat' + value: 'cat', }, { label: 'Dog', - value: 'dog' + value: 'dog', }, { label: 'Horse', - value: 'horse' - } - ] + value: 'horse', + }, + ], }, { type: 'checkbox-group', @@ -1488,26 +1490,26 @@ describe('Widgets', function () { values: [ { label: 'Vanilla', - value: 'vanilla' + value: 'vanilla', }, { label: 'Chocolate', - value: 'chocolate' + value: 'chocolate', }, { label: 'Strawberry', - value: 'strawberry' - } - ] + value: 'strawberry', + }, + ], }, { type: 'textarea', label: 'Comments', name: 'comments', placeholder: 'Any more comments?', - required: true - } - ] + required: true, + }, + ], }); pathfora.initializeWidgets([customForm]); @@ -1550,7 +1552,7 @@ describe('Widgets', function () { type: 'input', placeholder: "What's your favorite animal?", name: 'favorite_animal', - required: true + required: true, }, { type: 'radio-group', @@ -1560,19 +1562,19 @@ describe('Widgets', function () { values: [ { label: 'Vanilla', - value: 'vanilla' + value: 'vanilla', }, { label: 'Chocolate', - value: 'chocolate' + value: 'chocolate', }, { label: 'Strawberry', - value: 'strawberry' - } - ] - } - ] + value: 'strawberry', + }, + ], + }, + ], }); pathfora.initializeWidgets([customForm]); @@ -1581,10 +1583,7 @@ describe('Widgets', function () { spyOn(jstag, 'send'); setTimeout(function () { - widget - .find('form') - .find('.pf-widget-ok') - .click(); + widget.find('form').find('.pf-widget-ok').click(); expect(jstag.send).not.toHaveBeenCalled(); expect(widget.hasClass('opened')).toBeTruthy(); @@ -1609,7 +1608,8 @@ describe('Widgets', function () { { type: 'email', placeholder: 'Email', - name: 'email' + name: 'email', + required: true, }, { type: 'radio-group', @@ -1618,19 +1618,19 @@ describe('Widgets', function () { values: [ { label: 'Vanilla', - value: 'vanilla' + value: 'vanilla', }, { label: 'Chocolate', - value: 'chocolate' + value: 'chocolate', }, { label: 'Strawberry', - value: 'strawberry' - } - ] - } - ] + value: 'strawberry', + }, + ], + }, + ], }); pathfora.initializeWidgets([customForm]); @@ -1640,10 +1640,7 @@ describe('Widgets', function () { setTimeout(function () { widget.find('input[name=email]').val('zkjhfkdjh'); - widget - .find('form') - .find('.pf-widget-ok') - .click(); + widget.find('form').find('.pf-widget-ok').click(); expect(jstag.send).not.toHaveBeenCalled(); expect(widget.hasClass('opened')).toBeTruthy(); @@ -1653,7 +1650,22 @@ describe('Widgets', function () { for (var i = 0; i < invalid.length; i++) { var req = invalid[i].parentNode; expect(req.className.indexOf('pf-form-required') !== -1).toBeTruthy(); - expect(req.className.indexOf('invalid') !== -1).toBeTruthy(); + expect(req.className.indexOf('invalid--validate') !== -1).toBeTruthy(); + } + + // also check required validation + widget.find('input[name=email]').val(''); + widget.find('form').find('.pf-widget-ok').click(); + expect(jstag.send).not.toHaveBeenCalled(); + expect(widget.hasClass('opened')).toBeTruthy(); + + invalid = widget.find('[data-required=true]'); + expect(invalid.length).toBe(1); + + for (var j = 0; j < invalid.length; j++) { + var reqField = invalid[j].parentNode; + expect(reqField.className.indexOf('pf-form-required') !== -1).toBeTruthy(); + expect(reqField.className.indexOf('invalid') !== -1).toBeTruthy(); } done(); }, 200); @@ -1669,7 +1681,7 @@ describe('Widgets', function () { type: 'date', name: 'birthday', maxDate: 'today', - minDate: '01-01-2020' + minDate: '01-01-2020', }, { type: 'radio-group', @@ -1678,19 +1690,19 @@ describe('Widgets', function () { values: [ { label: 'Vanilla', - value: 'vanilla' + value: 'vanilla', }, { label: 'Chocolate', - value: 'chocolate' + value: 'chocolate', }, { label: 'Strawberry', - value: 'strawberry' - } - ] - } - ] + value: 'strawberry', + }, + ], + }, + ], }); pathfora.initializeWidgets([customForm]); @@ -1700,10 +1712,7 @@ describe('Widgets', function () { setTimeout(function () { widget.find('input[name=birthday]').val('2010-10-10'); - widget - .find('form') - .find('.pf-widget-ok') - .click(); + widget.find('form').find('.pf-widget-ok').click(); expect(jstag.send).not.toHaveBeenCalled(); expect(widget.hasClass('opened')).toBeTruthy(); @@ -1713,7 +1722,7 @@ describe('Widgets', function () { for (var i = 0; i < invalid.length; i++) { var req = invalid[i].parentNode; expect(req.className.indexOf('pf-form-required') !== -1).toBeTruthy(); - expect(req.className.indexOf('invalid') !== -1).toBeTruthy(); + expect(req.className.indexOf('invalid--validate') !== -1).toBeTruthy(); } done(); }, 200); @@ -1742,14 +1751,14 @@ describe('Widgets', function () { var w1 = new pathfora.Message({ msg: 'test warning display', id: 'position-widget', - layout: 'bar' + layout: 'bar', }); var w2 = new pathfora.Message({ msg: 'invalid position test', layout: 'bar', id: 'wrong-position-2', - position: 'wrong-position' + position: 'wrong-position', }); pathfora.initializeWidgets([w1]); From 4ff3797f9914dcfe6146e3978a209ad2d96ef195 Mon Sep 17 00:00:00 2001 From: Ash Yablok Date: Tue, 6 Aug 2024 09:08:46 -0700 Subject: [PATCH 2/3] maint: fix dist --- dist/pathfora.js | 5576 +++++++++++++++++++++++++++++++++++++++++- dist/pathfora.min.js | 2 +- 2 files changed, 5457 insertions(+), 121 deletions(-) diff --git a/dist/pathfora.js b/dist/pathfora.js index b037483..88dd9c0 100644 --- a/dist/pathfora.js +++ b/dist/pathfora.js @@ -1,15 +1,270 @@ (function () { 'use strict'; - var cov_14fabb9poo=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/globals/reset-default-props.js',hash='a6f7d2984ff0674e23a95221cc72beaa72a96872',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/globals/reset-default-props.js',statementMap:{'0':{start:{line:11,column:2},end:{line:46,column:4}},'1':{start:{line:48,column:2},end:{line:56,column:4}},'2':{start:{line:58,column:2},end:{line:69,column:4}},'3':{start:{line:71,column:2},end:{line:99,column:4}},'4':{start:{line:102,column:2},end:{line:130,column:4}},'5':{start:{line:132,column:2},end:{line:132,column:13}}},fnMap:{'0':{name:'resetDefaultProps',decl:{start:{line:10,column:24},end:{line:10,column:41}},loc:{start:{line:10,column:48},end:{line:133,column:1}},line:10}},branchMap:{},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetDefaultProps(obj){cov_14fabb9poo.f[0]++;cov_14fabb9poo.s[0]++;obj.generic={className:'pathfora',branding:false,responsive:true,headline:'',themes:{dark:{background:'#333',headline:'#fefefe',text:'#aaa',close:'#888',actionText:'#fff',actionBackground:'#444',cancelText:'#888',cancelBackground:'#333'},light:{background:'#f1f1f1',headline:'#444',text:'#888',close:'#bbb',actionText:'#444',actionBackground:'#fff',cancelText:'#bbb',cancelBackground:'#f1f1f1'}},displayConditions:{showOnInit:true,showOnExitIntent:false,showDelay:0,hideAfter:0,displayWhenElementVisible:'',scrollPercentageToDisplay:0}};cov_14fabb9poo.s[1]++;obj.message={layout:'modal',position:'',variant:'1',okMessage:'Confirm',cancelMessage:'Cancel',okShow:true,cancelShow:true};cov_14fabb9poo.s[2]++;obj.subscription={layout:'modal',position:'',variant:'1',placeholders:{email:'Email'},okMessage:'Confirm',cancelMessage:'Cancel',okShow:true,cancelShow:true};cov_14fabb9poo.s[3]++;obj.form={layout:'modal',position:'',variant:'1',placeholders:{name:'Name',title:'Title',email:'Email',message:'Message',company:'Company',phone:'Phone Number',country:'Country',referralEmail:'Referral Email'},required:{name:true,email:true},fields:{company:false,phone:false,country:false,referralEmail:false},okMessage:'Send',okShow:true,cancelMessage:'Cancel',cancelShow:true};cov_14fabb9poo.s[4]++;obj.sitegate={layout:'modal',position:'',variant:'1',placeholders:{name:'Name',title:'Title',email:'Email',message:'Message',company:'Company',phone:'Phone Number',country:'Country',referralEmail:'Referral Email'},required:{name:true,email:true},fields:{message:false,phone:false,country:false,referralEmail:false},okMessage:'Submit',okShow:true,cancelShow:false,showForm:true};cov_14fabb9poo.s[5]++;return obj;} + /** @module pathfora/globals/reset-default-props */ - var cov_mxrz945ze=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/globals/reset-widget-tracker.js",hash="06f4feddbacbb64f4f8de2a702f59c1fb684e080",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/globals/reset-widget-tracker.js",statementMap:{"0":{start:{line:11,column:2},end:{line:11,column:26}},"1":{start:{line:12,column:2},end:{line:12,column:25}},"2":{start:{line:13,column:2},end:{line:13,column:30}},"3":{start:{line:14,column:2},end:{line:14,column:30}},"4":{start:{line:15,column:2},end:{line:15,column:24}},"5":{start:{line:16,column:2},end:{line:16,column:28}},"6":{start:{line:18,column:2},end:{line:18,column:13}}},fnMap:{"0":{name:"resetWidgetTracker",decl:{start:{line:10,column:24},end:{line:10,column:42}},loc:{start:{line:10,column:49},end:{line:19,column:1}},line:10}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetWidgetTracker(obj){cov_mxrz945ze.f[0]++;cov_mxrz945ze.s[0]++;obj.delayedWidgets={};cov_mxrz945ze.s[1]++;obj.openedWidgets=[];cov_mxrz945ze.s[2]++;obj.initializedWidgets=[];cov_mxrz945ze.s[3]++;obj.prioritizedWidgets=[];cov_mxrz945ze.s[4]++;obj.readyWidgets=[];cov_mxrz945ze.s[5]++;obj.triggeredWidgets={};cov_mxrz945ze.s[6]++;return obj;} + /** + * Reset the values of the default widget configs + * + * @exports resetDefaultProps + * @params {object} obj + * @returns {object} obj + */ + function resetDefaultProps (obj) { + obj.generic = { + className: 'pathfora', + branding: false, + responsive: true, + headline: '', + themes: { + dark: { + background: '#333', + headline: '#fefefe', + text: '#aaa', + close: '#888', + actionText: '#fff', + actionBackground: '#444', + cancelText: '#888', + cancelBackground: '#333' + }, + light: { + background: '#f1f1f1', + headline: '#444', + text: '#888', + close: '#bbb', + actionText: '#444', + actionBackground: '#fff', + cancelText: '#bbb', + cancelBackground: '#f1f1f1' + } + }, + displayConditions: { + showOnInit: true, + showOnExitIntent: false, + showDelay: 0, + hideAfter: 0, + displayWhenElementVisible: '', + scrollPercentageToDisplay: 0 + } + }; - var cov_15aj7uq486=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/globals/reset-data-object.js",hash="966c26e75cf81d58a79f86eac2961ee26abf5cef",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/globals/reset-data-object.js",statementMap:{"0":{start:{line:11,column:2},end:{line:11,column:20}},"1":{start:{line:12,column:2},end:{line:12,column:26}},"2":{start:{line:13,column:2},end:{line:13,column:25}},"3":{start:{line:14,column:2},end:{line:14,column:28}},"4":{start:{line:15,column:2},end:{line:15,column:28}},"5":{start:{line:16,column:2},end:{line:16,column:28}},"6":{start:{line:17,column:2},end:{line:17,column:27}},"7":{start:{line:19,column:2},end:{line:19,column:13}}},fnMap:{"0":{name:"resetDataObject",decl:{start:{line:10,column:24},end:{line:10,column:39}},loc:{start:{line:10,column:46},end:{line:20,column:1}},line:10}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function resetDataObject(obj){cov_15aj7uq486.f[0]++;cov_15aj7uq486.s[0]++;obj.pageViews=0;cov_15aj7uq486.s[1]++;obj.timeSpentOnPage=0;cov_15aj7uq486.s[2]++;obj.closedWidgets=[];cov_15aj7uq486.s[3]++;obj.completedActions=[];cov_15aj7uq486.s[4]++;obj.cancelledActions=[];cov_15aj7uq486.s[5]++;obj.displayedWidgets=[];cov_15aj7uq486.s[6]++;obj.abTestingGroups=[];cov_15aj7uq486.s[7]++;return obj;} + obj.message = { + layout: 'modal', + position: '', + variant: '1', + okMessage: 'Confirm', + cancelMessage: 'Cancel', + okShow: true, + cancelShow: true + }; - var cov_f2xbatb8f=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/ab-test/create-preset.js",hash="df3bd8f8e4aaef11cb71bb0263f5279ad2b63938",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/create-preset.js",statementMap:{"0":{start:{line:11,column:15},end:{line:11,column:17}},"1":{start:{line:13,column:2},end:{line:15,column:3}},"2":{start:{line:14,column:4},end:{line:14,column:30}},"3":{start:{line:17,column:18},end:{line:19,column:4}},"4":{start:{line:18,column:4},end:{line:18,column:25}},"5":{start:{line:22,column:2},end:{line:28,column:3}},"6":{start:{line:23,column:25},end:{line:23,column:38}},"7":{start:{line:25,column:4},end:{line:27,column:7}},"8":{start:{line:26,column:6},end:{line:26,column:38}},"9":{start:{line:30,column:2},end:{line:33,column:4}}},fnMap:{"0":{name:"createABTestingModePreset",decl:{start:{line:10,column:24},end:{line:10,column:49}},loc:{start:{line:10,column:53},end:{line:34,column:1}},line:10},"1":{name:"(anonymous_1)",decl:{start:{line:17,column:32},end:{line:17,column:33}},loc:{start:{line:17,column:56},end:{line:19,column:3}},line:17},"2":{name:"(anonymous_2)",decl:{start:{line:25,column:24},end:{line:25,column:25}},loc:{start:{line:25,column:43},end:{line:27,column:5}},line:25}},branchMap:{"0":{loc:{start:{line:22,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:28,column:3}},{start:{line:22,column:2},end:{line:28,column:3}}],line:22}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},f:{"0":0,"1":0,"2":0},b:{"0":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function createABTestingModePreset(){cov_f2xbatb8f.f[0]++;var groups=(cov_f2xbatb8f.s[0]++,[]);cov_f2xbatb8f.s[1]++;for(var i=0;i1){cov_f2xbatb8f.b[0][0]++;var groupsSumRatio=(cov_f2xbatb8f.s[6]++,1/groupsSum);cov_f2xbatb8f.s[7]++;groups=groups.map(function(element){cov_f2xbatb8f.f[2]++;cov_f2xbatb8f.s[8]++;return element*groupsSumRatio;});}else{cov_f2xbatb8f.b[0][1]++;}cov_f2xbatb8f.s[9]++;return {groups:groups,groupsNumber:groups.length};} + obj.subscription = { + layout: 'modal', + position: '', + variant: '1', + placeholders: { + email: 'Email' + }, + okMessage: 'Confirm', + cancelMessage: 'Cancel', + okShow: true, + cancelShow: true + }; - var cov_2hz3lzeixl=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/globals/config.js',hash='e4025f65f72115bf5f9c9cdf8eaae1ac1c58d704',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/globals/config.js',statementMap:{'0':{start:{line:11,column:24},end:{line:11,column:32}},'1':{start:{line:12,column:16},end:{line:12,column:23}},'2':{start:{line:13,column:22},end:{line:13,column:24}},'3':{start:{line:14,column:17},end:{line:14,column:37}},'4':{start:{line:15,column:20},end:{line:15,column:39}},'5':{start:{line:16,column:24},end:{line:16,column:46}},'6':{start:{line:17,column:37},end:{line:17,column:69}},'7':{start:{line:18,column:21},end:{line:18,column:39}},'8':{start:{line:19,column:20},end:{line:19,column:37}},'9':{start:{line:20,column:19},end:{line:20,column:36}},'10':{start:{line:21,column:21},end:{line:21,column:36}},'11':{start:{line:22,column:19},end:{line:22,column:37}},'12':{start:{line:23,column:25},end:{line:23,column:28}},'13':{start:{line:24,column:31},end:{line:24,column:34}},'14':{start:{line:25,column:23},end:{line:25,column:26}},'15':{start:{line:26,column:14},end:{line:26,column:28}},'16':{start:{line:27,column:14},end:{line:27,column:28}},'17':{start:{line:28,column:34},end:{line:28,column:51}},'18':{start:{line:29,column:20},end:{line:29,column:74}},'19':{start:{line:30,column:31},end:{line:30,column:40}},'20':{start:{line:31,column:33},end:{line:31,column:44}},'21':{start:{line:33,column:30},end:{line:38,column:1}},'22':{start:{line:40,column:27},end:{line:49,column:1}},'23':{start:{line:51,column:27},end:{line:51,column:49}},'24':{start:{line:52,column:26},end:{line:52,column:47}},'25':{start:{line:53,column:32},end:{line:53,column:51}},'26':{start:{line:55,column:28},end:{line:59,column:1}},'27':{start:{line:62,column:23},end:{line:62,column:38}}},fnMap:{},branchMap:{},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var PF_VERSION=(cov_2hz3lzeixl.s[0]++,'1.2.13'),PF_LOCALE=(cov_2hz3lzeixl.s[1]++,'en-US'),PF_DATE_OPTIONS=(cov_2hz3lzeixl.s[2]++,{}),PREFIX_REC=(cov_2hz3lzeixl.s[3]++,'PathforaRecommend_'),PREFIX_UNLOCK=(cov_2hz3lzeixl.s[4]++,'PathforaUnlocked_'),PREFIX_IMPRESSION=(cov_2hz3lzeixl.s[5]++,'PathforaImpressions_'),PREFIX_TOTAL_IMPRESSIONS_SINCE=(cov_2hz3lzeixl.s[6]++,'PathforaTotalImpressionsSince_'),PREFIX_CONFIRM=(cov_2hz3lzeixl.s[7]++,'PathforaConfirm_'),PREFIX_CANCEL=(cov_2hz3lzeixl.s[8]++,'PathforaCancel_'),PREFIX_CLOSE=(cov_2hz3lzeixl.s[9]++,'PathforaClosed_'),PREFIX_AB_TEST=(cov_2hz3lzeixl.s[10]++,'PathforaTest_'),PF_PAGEVIEWS=(cov_2hz3lzeixl.s[11]++,'PathforaPageView'),DEFAULT_CHAR_LIMIT=(cov_2hz3lzeixl.s[12]++,220),DEFAULT_CHAR_LIMIT_STACK=(cov_2hz3lzeixl.s[13]++,160),WIDTH_BREAKPOINT=(cov_2hz3lzeixl.s[14]++,650),API_URL=(cov_2hz3lzeixl.s[15]++,'//api.lytics.io'),CSS_URL=(cov_2hz3lzeixl.s[16]++,'//c.lytics.io/static/pathfora.min.css'),ENTITY_FIELD_TEMPLATE_REGEX=(cov_2hz3lzeixl.s[17]++,'\\{{2}.*?\\}{2}'),ENTITY_FIELDS=(cov_2hz3lzeixl.s[18]++,['msg','headline','image','confirmAction.callback']),OPTIONS_PRIORITY_ORDERED=(cov_2hz3lzeixl.s[19]++,'ordered'),OPTIONS_PRIORITY_UNORDERED=(cov_2hz3lzeixl.s[20]++,'unordered');var defaultPositions=(cov_2hz3lzeixl.s[21]++,{modal:'',slideout:'bottom-left',button:'top-left',bar:'top-absolute'});var callbackTypes=(cov_2hz3lzeixl.s[22]++,{INIT:'widgetInitialized',LOAD:'widgetLoaded',CLICK:'buttonClicked',FORM_SUBMIT:'formSubmitted',MODAL_OPEN:'modalOpened',MODAL_CLOSE:'modalClosed',MODAL_CONFIRM:'modalConfirm',MODAL_CANCEL:'modalCancel'});var widgetTracker=(cov_2hz3lzeixl.s[23]++,resetWidgetTracker({}));var defaultProps=(cov_2hz3lzeixl.s[24]++,resetDefaultProps({}));var pathforaDataObject=(cov_2hz3lzeixl.s[25]++,resetDataObject({}));var abTestingTypes=(cov_2hz3lzeixl.s[26]++,{'100':createABTestingModePreset(100),'50/50':createABTestingModePreset(50,50),'80/20':createABTestingModePreset(80,20)});var templates=(cov_2hz3lzeixl.s[27]++,{ + obj.form = { + layout: 'modal', + position: '', + variant: '1', + placeholders: { + name: 'Name', + title: 'Title', + email: 'Email', + message: 'Message', + company: 'Company', + phone: 'Phone Number', + country: 'Country', + referralEmail: 'Referral Email' + }, + required: { + name: true, + email: true + }, + fields: { + company: false, + phone: false, + country: false, + referralEmail: false + }, + okMessage: 'Send', + okShow: true, + cancelMessage: 'Cancel', + cancelShow: true + }; + + + obj.sitegate = { + layout: 'modal', + position: '', + variant: '1', + placeholders: { + name: 'Name', + title: 'Title', + email: 'Email', + message: 'Message', + company: 'Company', + phone: 'Phone Number', + country: 'Country', + referralEmail: 'Referral Email' + }, + required: { + name: true, + email: true + }, + fields: { + message: false, + phone: false, + country: false, + referralEmail: false + }, + okMessage: 'Submit', + okShow: true, + cancelShow: false, + showForm: true + }; + + return obj; + } + + /** @module pathfora/globals/reset-widget-tracker */ + + /** + * Reset the widgetTracker to an empty state + * + * @exports resetDefaultProps + * @params {object} obj + * @returns {object} obj + */ + function resetWidgetTracker (obj) { + obj.delayedWidgets = {}; + obj.openedWidgets = []; + obj.initializedWidgets = []; + obj.prioritizedWidgets = []; + obj.readyWidgets = []; + obj.triggeredWidgets = {}; + + return obj; + } + + /** @module pathfora/globals/reset-data-object */ + + /** + * Reset the pathforaDataObject to an empty state + * + * @exports resetDataObject + * @params {object} obj + * @returns {object} obj + */ + function resetDataObject (obj) { + obj.pageViews = 0; + obj.timeSpentOnPage = 0; + obj.closedWidgets = []; + obj.completedActions = []; + obj.cancelledActions = []; + obj.displayedWidgets = []; + obj.abTestingGroups = []; + + return obj; + } + + /* module pathfora/ab-test/create-preset */ + + /** + * Creates A/B test group distrubutions + * + * @exports createABTestingModePreset + * @params {int} a/b values + * @returns {object} + */ + function createABTestingModePreset () { + var groups = []; + + for (var i = 0; i < arguments.length; i++) { + groups.push(arguments[i]); + } + + var groupsSum = groups.reduce(function (sum, element) { + return sum + element; + }); + + // NOTE If groups collapse into a number greater than 1, normalize + if (groupsSum > 1) { + var groupsSumRatio = 1 / groupsSum; + + groups = groups.map(function (element) { + return element * groupsSumRatio; + }); + } + + return { + groups: groups, + groupsNumber: groups.length + }; + } + + /** @module pathfora/globals/config */ + + var PF_VERSION = '1.2.13', + PF_LOCALE = 'en-US', + PF_DATE_OPTIONS = {}, + PREFIX_REC = 'PathforaRecommend_', + PREFIX_UNLOCK = 'PathforaUnlocked_', + PREFIX_IMPRESSION = 'PathforaImpressions_', + PREFIX_TOTAL_IMPRESSIONS_SINCE = 'PathforaTotalImpressionsSince_', + PREFIX_CONFIRM = 'PathforaConfirm_', + PREFIX_CANCEL = 'PathforaCancel_', + PREFIX_CLOSE = 'PathforaClosed_', + PREFIX_AB_TEST = 'PathforaTest_', + PF_PAGEVIEWS = 'PathforaPageView', + DEFAULT_CHAR_LIMIT = 220, + DEFAULT_CHAR_LIMIT_STACK = 160, + WIDTH_BREAKPOINT = 650, + API_URL = '//api.lytics.io', + CSS_URL = '//c.lytics.io/static/pathfora.min.css', + ENTITY_FIELD_TEMPLATE_REGEX = '\\{{2}.*?\\}{2}', + ENTITY_FIELDS = ['msg', 'headline', 'image', 'confirmAction.callback'], + OPTIONS_PRIORITY_ORDERED = 'ordered', + OPTIONS_PRIORITY_UNORDERED = 'unordered'; + + var defaultPositions = { + modal: '', + slideout: 'bottom-left', + button: 'top-left', + bar: 'top-absolute' + }; + + var callbackTypes = { + INIT: 'widgetInitialized', + LOAD: 'widgetLoaded', + CLICK: 'buttonClicked', + FORM_SUBMIT: 'formSubmitted', + MODAL_OPEN: 'modalOpened', + MODAL_CLOSE: 'modalClosed', + MODAL_CONFIRM: 'modalConfirm', + MODAL_CANCEL: 'modalCancel' + }; + + var widgetTracker = resetWidgetTracker({}); + var defaultProps = resetDefaultProps({}); + var pathforaDataObject = resetDataObject({}); + + var abTestingTypes = { + '100': createABTestingModePreset(100), + '50/50': createABTestingModePreset(50, 50), + '80/20': createABTestingModePreset(80, 20) + }; + + /* eslint-disable quotes */ + var templates = { 'subscription': { 'bar': '

', 'inline': '

', @@ -35,234 +290,5315 @@ 'assets': { 'lytics': 'lytics' } -}); +}; + /* eslint-enable quotes */ + + /** @module pathfora/dom/window */ + + /** @module pathfora/dom/document */ + + var document$1 = window.document; + + /** @module pathfora/dom/on-dom-ready */ + + function onDOMready (fn) { + var handler, + pf = this, + hack = document$1.documentElement.doScroll, + domContentLoaded = 'DOMContentLoaded', + loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(document$1.readyState); + + if (!loaded) { + document$1.addEventListener(domContentLoaded, handler = function () { + document$1.removeEventListener(domContentLoaded, handler); + pf.DOMLoaded = true; + fn(); + }); + } else { + pf.DOMLoaded = true; + fn(); + } + } + + /** @module pathfora/utils/escape-regex */ + + /** + * Ensure that a string does not contain regex + * + * @exports escapeURI + * @params {regex} s + * @returns {string} regex + */ + function escapeRegex (s) { + return String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + /** @module pathfora/utils/class/remove-class */ + + /** + * Remove a class from an HTML element + * + * @exports removeClass + * @params {object} DOMNode + * @params {string} className + */ + function removeClass (DOMNode, className) { + var findClassRegexp = new RegExp([ + '(^|\\b)', + escapeRegex(className.split(' ').join('|')), + '(\\b|$)' + ].join(''), 'gi'); + DOMNode.className = DOMNode.className.replace(findClassRegexp, ' '); + } + + /** @module pathfora/utils/class/add-class */ + + /** + * Add a class to an HTML element + * + * @exports addClass + * @params {object} DOMNode + * @params {string} className + */ + function addClass (DOMNode, className) { + removeClass(DOMNode, className); + + DOMNode.className = [ + DOMNode.className, + className + ].join(' '); + } + + /** @module pathfora/utils/class/has-class */ + + /** + * Check if an HTML element has a class + * + * @exports hasClass + * @params {object} DOMNode + * @params {string} className + * @params {boolean} + */ + function hasClass (DOMNode, className) { + return new RegExp('(^| )' + escapeRegex(className) + '( |$)', 'gi').test(DOMNode.className); + } + + /** @module pathfora/utils/decode-safe */ + + /** + * Try decoding a string, return original string + * if the decode fails. + * + * @exports decodeSafe + * @params {string} s + * @returns {string} decoded + */ + function decodeSafe (s) { + try { + return decodeURIComponent(s); + } catch (e) { + return s; + } + } + + /** @module pathfora/utils/cookie/read-cookie */ + + /** + * Get the value of a cookie + * + * @exports readCookie + * @params {string} name + * @returns {string} + */ + function readCookie (name) { + var cookies = document$1.cookie, + findCookieRegexp = cookies.match('(^|;)\\s*' + encodeURIComponent(escapeRegex(name)) + '\\s*=\\s*([^;]+)'); + + // legacy - check for cookie names that haven't been escaped + if (findCookieRegexp == null) { + findCookieRegexp = cookies.match('(^|;)\\s*' + escapeRegex(name) + '\\s*=\\s*([^;]+)'); + } + + if (findCookieRegexp != null) { + var val = findCookieRegexp.pop(); + + return decodeSafe(val); + } + + return null; + } + + /** @module pathfora/utils/cookie/save-cookie */ + + /** + * Set the value of a cookie + * + * @exports saveCookie + * @params {string} name + * @params {string} value + * @params {object} expiration + */ + function saveCookie (name, value, expiration) { + var expires; + + if (expiration) { + expires = '; expires=' + expiration.toUTCString(); + } else { + expires = '; expires=0'; + } + + document$1.cookie = [ + encodeURIComponent(name), + '=', + encodeURIComponent(value), + expires, + '; path = /' + ].join(''); + } + + /** @module pathfora/utils/cookie/delete-cookie */ + + /** + * Delete a cookie + * + * @exports deleteCookie + * @params {string} name + */ + function deleteCookie (name) { + var date = new Date('Thu, 01 Jan 1970 00:00:01 GMT'); + saveCookie(name, '', date); + } + + var PAYLOAD_KEY = '$'; + var EXPIRES_KEY = '@'; + var PATHFORA_IDENTIFIER = 'PATHFORA'; + + function safeJsonParse (json) { + try { + return JSON.parse(json); + } catch (e) { + // recover + } + } + + function isExpired (record) { + return Boolean(record[EXPIRES_KEY]) && Date.parse(record[EXPIRES_KEY]) < Date.now(); + } + function isCreatedByThisLib (record) { + return Boolean(record[PATHFORA_IDENTIFIER]); + } + + var expiringLocalStorage = { + getItem: function (key) { + var serialized = localStorage.getItem(key); + var record = safeJsonParse(serialized); + + if (record && EXPIRES_KEY in record) { + if (isExpired(record)) { + localStorage.removeItem(key); + return null; + } + if (PAYLOAD_KEY in record) { + // Extend the expiration date: + this.setItem(key, record[PAYLOAD_KEY]); + return record[PAYLOAD_KEY]; + } + } + return serialized; + }, + + setItem: function (key, payload, expiresOn) { + if (!expiresOn) { + expiresOn = new Date(); + expiresOn.setDate(expiresOn.getDate() + 365); + } + + var record = {}; + + record[PAYLOAD_KEY] = '' + payload; + record[EXPIRES_KEY] = expiresOn; + record[PATHFORA_IDENTIFIER] = PF_VERSION; // identify localStorage items created by this lib + + localStorage.setItem(key, JSON.stringify(record)); + }, + + removeItem: function (key) { + localStorage.removeItem(key); + }, + + ttl: function (key, payload, milliseconds) { + if (milliseconds !== +milliseconds) { + throw new Error('milliseconds must be a number!'); + } + var date = new Date(); + + date.setMilliseconds(date.getMilliseconds() + milliseconds); + + this.setItem(key, payload, date); + }, + + removeExpiredItems: function () { + for (var i = 0; i < localStorage.length; i++) { + var key = localStorage.key(i); + var record = safeJsonParse(localStorage.getItem(key)); + + if (record && isCreatedByThisLib(record) && isExpired(record)) { + localStorage.removeItem(key); + } + } + } + }; + + function write (key, value, expiration) { + expiringLocalStorage.setItem(key, value, expiration); + } + + /** @module pathfora/utils/is-not-encoded */ + + /** + * Check if a string is encoded or not. + * + * @exports isNotEncoded + * @params {string} s + * @returns {boolean} isNotEncoded + */ + function isNotEncoded (s) { + try { + return decodeURIComponent(s) === s && encodeURIComponent(s) !== s; + } catch (e) { + return false; + } + } + + /** @module pathfora/utils/cookie/update-legacy-cookies */ + + /** + * Update legacy cookies to + * encoded cookie values. + * + * @exports updateLegacyCookies + */ + function updateLegacyCookies () { + // We should update all cookies that have these prefixes. + var cookieFind = [ + PREFIX_REC, + PREFIX_UNLOCK, + PREFIX_IMPRESSION, + PREFIX_CONFIRM, + PREFIX_CANCEL, + PREFIX_CLOSE, + PREFIX_AB_TEST, + PF_PAGEVIEWS + ]; + + var i = 0; + + var filterFunc = function (c) { + return c.trim().indexOf(cookieFind[i]) === 0; + }; + + var cookieFunc = function (c) { + var split = c.trim().split('='); + + if (split.length === 2) { + var name = split[0]; + var val = split[1]; + + deleteCookie(name); + write(name, decodeSafe(val)); + } + }; + + var sessionFunc = function (c) { + var val = sessionStorage.getItem(c); + + if (isNotEncoded(val)) { + sessionStorage.removeItem(c); + sessionStorage.setItem(encodeURIComponent(c), encodeURIComponent(val)); + } + }; + + for (i = 0; i < cookieFind.length; i++) { + document$1.cookie.split(';').filter(filterFunc).forEach(cookieFunc); + Object.keys(sessionStorage).filter(filterFunc).forEach(sessionFunc); + } + } + + function read (key) { + var item = expiringLocalStorage.getItem(key); + + if (item == null) { + item = readCookie(key); + + if (item != null) { + deleteCookie(key); + expiringLocalStorage.setItem(key, item); + } + } + + return item; + } + + function erase (key) { + expiringLocalStorage.removeItem(key); + deleteCookie(key); + } + + /** @module pathfora/utils/scaffold/init-scaffold */ + + /** + * Initialize scaffold for Lytics controlled widgets + * + * @exports initWidgetScaffold + * @returns {object} scaffold + */ + function initWidgetScaffold () { + return { + target: [], + exclude: [], + inverse: [] + }; + } + + /** @module pathfora/utils/scaffold/insert-widget */ + + /** + * Insert a widget and targeting info into + * the widget scaffold + * + * @exports insertWidget + * @params {string} method + * @params {string} segment + * @params {object} widget + * @params {object} config + */ + function insertWidget (method, segment, widget, config) { + // assume that we need to add a new widget until proved otherwise + var subject, + makeNew = true; + + // make sure our scaffold is valid + if (!config.target) { + throw new Error('Invalid scaffold. No target array.'); + } + if (!config.exclude) { + throw new Error('Invalid scaffold. No exclude array.'); + } + if (!config.inverse) { + throw new Error('Invalid scaffold. No inverse array.'); + } + + if (method === 'target') { + subject = config.target; + } else if (method === 'exclude') { + subject = config.exclude; + } else { + throw new Error('Invalid method (' + method + ').'); + } + + for (var i = 0; i < subject.length; i++) { + var wgt = subject[i]; + + if (wgt.segment === segment) { + wgt.widgets.push(widget); + makeNew = false; + } + } + + if (makeNew) { + subject.push({ + 'segment': segment, + 'widgets': [widget] + }); + } + } + + /** @module pafthroa/utils/url/construct-queries */ + + /** + * Construct the params string for a url from an + * object containing key/values + * + * @exports constructQueries + * @params {object} params + * @returns {string} + */ + function constructQueries (params) { + var count = 0, + queries = []; + + for (var key in params) { + if (params.hasOwnProperty(key)) { + if (count !== 0) { + queries.push('&'); + } else { + queries.push('?'); + } + + if (params[key] instanceof Object) { + // multiple params []string (topics or rollups) + for (var i in params[key]) { + if (params[key].hasOwnProperty(i)) { + if (i < Object.keys(params[key]).length && i > 0) { + queries.push('&'); + } + + queries.push(key + '[]=' + params[key][i]); + } + } + + // single param + } else { + queries.push(key + '=' + params[key]); + } + + count++; + } + } + + return queries.join(''); + } + + /** @module pathfora/utils/url/escape-uri */ + + /** + * Escape URIs optionally without double-encoding + * + * @exports escapeURI + * @params {string} text + * @returns {object} options + * @returns {string} uri + */ + function escapeURI (text, options) { + // NOTE This was ported from various bits of C++ code from Chromium + options || (options = {}); + + var length = text.length, + escaped = [], + usePlus = options.usePlus || false, + keepEscaped = options.keepEscaped || false; + + function isHexDigit (c) { + return /[0-9A-Fa-f]/.test(c); + } + + function toHexDigit (i) { + return '0123456789ABCDEF'[i]; + } + + function containsChar (charMap, charCode) { + return (charMap[charCode >> 5] & (1 << (charCode & 31))) !== 0; + } + + function isURISeparator (c) { + return ['#', ':', ';', '/', '?', '$', '&', '+', ',', '@', '='].indexOf(c) !== -1; + } + + function shouldEscape (charText) { + return !isURISeparator(charText) && containsChar([ + 0xffffffff, 0xf80008fd, 0x78000001, 0xb8000001, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff + ], charText.charCodeAt(0)); + } + + for (var index = 0; index < length; index++) { + var charText = text[index], + charCode = text.charCodeAt(index); + + if (usePlus && charText === ' ') { + escaped.push('+'); + } else if (keepEscaped && charText === '%' && length >= index + 2 && + isHexDigit(text[index + 1]) && + isHexDigit(text[index + 2])) { + escaped.push('%'); + } else if (shouldEscape(charText)) { + escaped.push('%', + toHexDigit(charCode >> 4), + toHexDigit(charCode & 0xf)); + } else { + escaped.push(charText); + } + } + + return escaped.join(''); + } + + /** @module pathfora/utils/objects/update-object */ + + /** + * Merge two objects while preserving original fields + * + * @exports updateObject + * @params {object} object + * @params {object} config + */ + function updateObject (object, config) { + for (var prop in config) { + if (config.hasOwnProperty(prop) && typeof config[prop] === 'object' && config[prop] !== null && !Array.isArray(config[prop])) { + if (config.hasOwnProperty(prop)) { + if (typeof object[prop] === 'undefined') { + object[prop] = {}; + } + updateObject(object[prop], config[prop]); + } + } else if (config.hasOwnProperty(prop)) { + object[prop] = config[prop]; + } + } + } + + /** @module pathfora/utils/objects/set-object-value */ + + /** + * Set the value of a field on an object, supports + * nested objects using the key dot notation. + * + * @exports setObjectValue + * @params {object} object + * @params {string} key + * @params value + * @returns {object} + */ + function setObjectValue (object, key, value) { + var parent = object; + var fields = key.split('.'); + for (var i = 0; i < fields.length - 1; i++) { + var elem = fields[i]; + + if (!parent[elem]) { + parent[elem] = {}; + } + + parent = parent[elem]; + } + + parent[fields[fields.length - 1]] = value; + + return parent; + } + + /** @module pathfora/utils/objects/get-object-value */ + + /** + * Get the value of a field on an object, supports + * nested objects using the key dot notation. + * + * @exports getObjectValue + * @params {object} object + * @params {string} key + */ + function getObjectValue (object, key) { + var parent = object; + var fields = key.split('.'); + for (var i = 0; i < fields.length; i++) { + if (typeof parent !== 'undefined') { + parent = parent[fields[i]]; + } + } + + return parent; + } + + /** @module pathfora/utils/generate-unique-id */ + + /** + * Create a unique string identifier + * + * @exports generateUniqueId + * @returns {string} id + */ + function generateUniqueId () { + var s4 = function () { + return Math.floor((1 + Math.random()) * 0x10000) + .toString(16) + .substring(1); + }; + + return [ + s4(), s4(), + '-', + s4(), + '-', + s4(), + '-', + s4(), + '-', + s4(), s4(), s4() + ].join(''); + } + + /** @module pathfora/utils/email-valid */ + + /** + * Validate that the string is a properly formatted email + * + * @exports emailValid + * @params {string} email + * @returns {boolean} valid + */ + function emailValid (email) { + var regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g; + return regex.test(email); + } + + /** @module pathfora/utils */ + + + /** + * Object containing utility functions + * + * @exports utils + */ + + var utils = { + // class + addClass: addClass, + hasClass: hasClass, + removeClass: removeClass, + + // cookies + readCookie: readCookie, + saveCookie: saveCookie, + deleteCookie: deleteCookie, + updateLegacyCookies: updateLegacyCookies, + + // persist + read: read, + write: write, + erase: erase, + store: expiringLocalStorage, + + // scaffold + initWidgetScaffold: initWidgetScaffold, + insertWidget: insertWidget, + + // url + constructQueries: constructQueries, + escapeURI: escapeURI, + + // objects + updateObject: updateObject, + setObjectValue: setObjectValue, + getObjectValue: getObjectValue, + + generateUniqueId: generateUniqueId, + escapeRegex: escapeRegex, + emailValid: emailValid, + decodeSafe: decodeSafe, + isNotEncoded: isNotEncoded + }; + + /** @module pathfora/data/tracking/get-data-object */ + + /** + * Get the pathfora data object + * + * @exports getDataObject + * @returns {object} pathforaDataObject + */ + function getDataObject () { + return pathforaDataObject; + } + + /** @module pathfora/callbacks/add-callback */ + + /** + * Add a function to be called once jstag is loaded + * + * @exports addCallack + * @params {function} cb + */ + function addCallback (cb) { + if (window.lio && window.lio.loaded) { + // legacy + cb(window.lio.data); + return; + } else if (window.jstag && typeof window.jstag.getEntity === 'function') { + if ('entityReady' in window.jstag) { + window.jstag.entityReady(function (e) { + if (e.data && e.data.user) { + cb(e.data.user); + } + }); + } else { + var entity = window.jstag.getEntity(); + if (entity.data && entity.data.user) { + cb(entity.data.user); + } + } + } + + // fallback + this.callbacks.push(cb); + } + + /** @module pathfora/display-conditions/pageviews/init-pageviews */ + + /** + * Track and update the number of pageviews + * + * @exports initializePageViews + */ + function initializePageViews () { + var cookie = read(PF_PAGEVIEWS); + + write(PF_PAGEVIEWS, Math.min(~~cookie, 9998) + 1); + } + + /** @module pathfora/display-conditions/impressions/impressions-checker */ + + /** + * Check if the widget has met the impressions + * display condition. + * + * @exports impressionsChecker + * @params {object} impressionConstraints + * @params {object} widget + * @params {boolean} valid + */ + function impressionsChecker (impressionConstraints, widget) { + var parts, + totalImpressions, + since, + id = PREFIX_IMPRESSION + widget.id, + sinceId = PREFIX_TOTAL_IMPRESSIONS_SINCE + widget.id, + sessionImpressions = ~~sessionStorage.getItem(id), + sessionImpressionsForAllWidgets = 0, + impressionsForAllWidgets = 0, + lastImpressionTimeForAllWidgets = 0, + total = read(id), + now = Date.now(); + + // retain backwards compatibility if using legacy method of: + impressionConstraints.widget = impressionConstraints.widget || {}; + impressionConstraints.global = impressionConstraints.global || {}; + + // migrate impressions.session to impressions.widget.session if not also set + if (typeof impressionConstraints.widget.session === 'undefined') { + impressionConstraints.widget.session = impressionConstraints.session; + } + // migrate impressions.total to impressions.widget.total if not also set + if (typeof impressionConstraints.widget.total === 'undefined') { + impressionConstraints.widget.total = impressionConstraints.total; + } + // migrate impressions.buffer to impressions.widget.buffer if not also set + if (typeof impressionConstraints.widget.buffer === 'undefined') { + impressionConstraints.widget.buffer = impressionConstraints.buffer; + } + + // maintain and overwrite the "total since" value for impressions.global.duration + if (impressionConstraints.global.total > 0 && impressionConstraints.global.duration > 0) { + since = read(sinceId); + + var resetImpressions = function () { + write( + sinceId, + '0|' + now, + widget.expiration + ); + }; + + if (!since) { + resetImpressions(); + } else { + parts = since.split('|'); + if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) >= impressionConstraints.global.duration) { + resetImpressions(); + } + } + } + + if (!sessionImpressions) { + sessionImpressions = 0; + } + + // check for impressions.widget.session + if (sessionImpressions >= impressionConstraints.widget.session) { + return false; + } + + // widget specific historic total + if (!total) { + totalImpressions = 0; + } else { + parts = total.split('|'); + totalImpressions = parseInt(parts[0], 10); + + // check for impressions.widget.buffer + if (typeof parts[1] !== 'undefined') { + if (impressionConstraints.widget.buffer > 0 && (Math.abs(parts[1] - now) / 1000 < impressionConstraints.widget.buffer)) { + return false; + } + + // check for impressions.widget.duration + if ( + impressionConstraints.widget.duration > 0 && + totalImpressions % impressionConstraints.widget.total === 0 && + Math.abs(parts[1] - now) / 1000 < impressionConstraints.widget.duration + ) { + return false; + } + } + } + + // check for impressions.widget.total + if (totalImpressions >= impressionConstraints.widget.total && typeof impressionConstraints.widget.duration === 'undefined') { + return false; + } + + // all widgets session total + if (impressionConstraints.global.session > 0) { + for (var i = 0; i < ~~sessionStorage.length; i++) { + var k = sessionStorage.key(i); + if (typeof k !== 'undefined' && k.includes(PREFIX_IMPRESSION)) { + sessionImpressionsForAllWidgets = + sessionImpressionsForAllWidgets + ~~sessionStorage.getItem(k); + } + } + } + + // check for impressions.global.session + if (sessionImpressionsForAllWidgets >= impressionConstraints.global.session) { + return false; + } + + // all widget multi-session total + if (impressionConstraints.global.total > 0 || impressionConstraints.global.buffer > 0) { + for (var j = 0; j < ~~localStorage.length; j++) { + var l = localStorage.key(j); + if (typeof l !== 'undefined' && l.includes(PREFIX_IMPRESSION)) { + parts = read(l).split('|'); + totalImpressions = parseInt(parts[0], 10); + impressionsForAllWidgets = impressionsForAllWidgets + totalImpressions; + + if (typeof parts[1] !== 'undefined') { + lastImpressionTimeForAllWidgets = Math.max(parts[1], lastImpressionTimeForAllWidgets); + } + } + } + + // check for impressions.global.buffer + if (lastImpressionTimeForAllWidgets > 0) { + if (impressionConstraints.global.buffer > 0 && (Math.abs(lastImpressionTimeForAllWidgets - now) / 1000 < impressionConstraints.global.buffer)) { + return false; + } + } + } + + // check for impressions.global.duration + if (impressionConstraints.global.duration > 0) { + since = read(sinceId); + parts = since.split('|'); + if (parts[0] >= impressionConstraints.global.total) { + return false; + } + } + + // check for impressions.global.total + if (impressionsForAllWidgets >= impressionConstraints.global.total && typeof impressionConstraints.global.duration === 'undefined') { + return false; + } + + return true; + } + + /** + * Censor an object by its keys, by comparing against an array of strings and/or regexps. In the case of strings, + * only exact matches are censored. For non-strings, if the object's test method returns true, the key will be censored. + * + * @param {object} data the data to censor + * @param {obejct} keysToReject an array of strings or regexps to censor the data by preparatory to sending + */ + function censorTrackingKeys (data, keysToReject) { + return Object.keys(data) + .filter(function (key) { + return !keysToReject.some(function (keyToReject) { + return typeof keyToReject === 'string' + ? key === keyToReject + : keyToReject.test(key); + }); + }) + .reduce(function (memo, key) { + memo[key] = data[key]; + return memo; + }, {}); + } + + /** @module pathfora/data/request/report-data */ + + /** + * Send data object to Lytics and GA + * + * @exports reportData + * @params {object} data + * @widget {object} + */ + function reportData (data, widget) { + var gaLabel, trackers; + + if (typeof jstag === 'object') { + window.jstag.send( + widget.censorTrackingKeys + ? censorTrackingKeys(data, widget.censorTrackingKeys) + : data + ); + } + + if (window.pathfora.enableGA === true && typeof window.ga === 'function' && typeof window.ga.getAll === 'function') { + gaLabel = data['pf-widget-action'] || data['pf-widget-event']; + trackers = window.ga.getAll(); + + for (var i = 0; i < trackers.length; i++) { + var name = trackers[i].get('name'); + + window.ga( + name + '.send', + 'event', + 'Lytics', + data['pf-widget-id'] + ' : ' + gaLabel, + '', + { + nonInteraction: true + } + ); + } + } + } + + /** @module pathfora/data/tracking/track-widget-action */ + + /** + * Format and track interaction events such as + * CTA clicks, form status, etc. + * + * @exports trackWidgetAction + * @params {string} action + * @params {object} widget + * @params {object} htmlElement + */ + function trackWidgetAction (action, widget, htmlElement) { + var child, elem, i; + + var params = { + 'pf-widget-id': widget.id, + 'pf-widget-type': widget.type, + 'pf-widget-layout': widget.layout, + 'pf-widget-variant': widget.variant + }; + + if (widget.recommend && widget.content && widget.content.length > 0) { + params['pf-widget-content'] = widget.content[0]; + } + + switch (action) { + case 'show': + pathforaDataObject.displayedWidgets.push(params); + break; + case 'close': + params['pf-widget-action'] = !!widget.closeAction && widget.closeAction.name || 'close'; + pathforaDataObject.closedWidgets.push(params); + break; + case 'confirm': + if (htmlElement && hasClass(htmlElement, 'pf-content-unit')) { + params['pf-widget-action'] = 'content recommendation'; + } else { + params['pf-widget-action'] = !!widget.confirmAction && widget.confirmAction.name || 'default confirm'; + pathforaDataObject.completedActions.push(params); + } + break; + case 'cancel': + params['pf-widget-action'] = !!widget.cancelAction && widget.cancelAction.name || 'default cancel'; + pathforaDataObject.cancelledActions.push(params); + break; + case 'success.confirm': + params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.success + && !!widget.formStates.success.confirmAction && widget.formStates.success.confirmAction.name || 'success confirm'; + pathforaDataObject.completedActions.push(params); + break; + case 'success.cancel': + params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.success + && !!widget.formStates.success.cancelAction && widget.formStates.success.cancelAction.name || 'success cancel'; + pathforaDataObject.cancelledActions.push(params); + break; + case 'error.confirm': + params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.error + && !!widget.formStates.error.confirmAction && widget.formStates.error.confirmAction.name || 'error confirm'; + pathforaDataObject.completedActions.push(params); + break; + case 'error.cancel': + params['pf-widget-action'] = !!widget.formStates && !!widget.formStates.error + && !!widget.formStates.error.cancelAction && widget.formStates.error.cancelAction.name || 'error cancel'; + pathforaDataObject.cancelledActions.push(params); + break; + + case 'submit': + case 'unlock': + if (hasClass(htmlElement, 'pf-custom-form')) { + params['pf-custom-form'] = {}; + } + + for (elem in htmlElement.children) { + if (htmlElement.children.hasOwnProperty(elem)) { + child = htmlElement.children[elem]; + + if (hasClass(child, 'pf-widget-radio-group') || hasClass(child, 'pf-widget-checkbox-group')) { + var values = [], + name = '', + inputs = child.querySelectorAll('input'); + + for (i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if (input.checked) { + name = input.getAttribute('name'); + values.push(input.value); + } + } + + if (name !== '') { + params['pf-custom-form'][name] = values; + } + } else if (child && typeof child.getAttribute !== 'undefined' && child.getAttribute('name') !== null) { + params['pf-form-' + child.getAttribute('name')] = child.value; + } else if (hasClass(htmlElement, 'pf-custom-form') && child && child.querySelector) { + var val = child.querySelector('input, select, textarea'); + + if (val && typeof val.getAttribute !== 'undefined' && val.getAttribute('name') !== null) { + params['pf-custom-form'][val.getAttribute('name')] = val.value; + } + } + } + } + + if (action === 'unlock') { + write(PREFIX_UNLOCK + widget.id, true, widget.expiration); + } + + break; + case 'subscribe': + params['pf-form-email'] = htmlElement.elements.email.value; + break; + case 'hover': + if (hasClass(htmlElement, 'pf-content-unit')) { + params['pf-widget-action'] = 'content recommendation'; + } else if (hasClass(htmlElement, 'pf-widget-ok')) { + if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'success-state')) { + params['pf-widget-action'] = 'success.confirm'; + } else if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'error-state')) { + params['pf-widget-action'] = 'error.confirm'; + } else { + params['pf-widget-action'] = 'confirm'; + } + } else if (hasClass(htmlElement, 'pf-widget-cancel')) { + if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'success-state')) { + params['pf-widget-action'] = 'success.cancel'; + } else if (htmlElement.parentElement && hasClass(htmlElement.parentElement, 'error-state')) { + params['pf-widget-action'] = 'error.cancel'; + } else { + params['pf-widget-action'] = 'cancel'; + } + } else if (hasClass(htmlElement, 'pf-widget-close')) { + params['pf-widget-action'] = 'close'; + } + break; + case 'focus': + if (htmlElement && typeof htmlElement.getAttribute !== 'undefined' && htmlElement.getAttribute('name') !== null) { + params['pf-widget-action'] = htmlElement.getAttribute('name'); + } + break; + case 'form_start': + if (htmlElement && typeof htmlElement.getAttribute !== 'undefined' && htmlElement.getAttribute('name') !== null) { + params['pf-widget-action'] = htmlElement.getAttribute('name'); + } + break; + } + + params['pf-widget-event'] = action; + reportData(params, widget); + } + + /** @module pathfora/display-conditions/impressions/increment-impressions */ + + /** + * Increment the impression count for a widget + * + * @exports incrementImpressions + * @params {object} widget + */ + function incrementImpressions (widget) { + var parts, + totalImpressions, + id = PREFIX_IMPRESSION + widget.id, + sessionImpressions = ~~sessionStorage.getItem(id), + total = read(id), + now = Date.now(); + + if (!sessionImpressions) { + sessionImpressions = 1; + } else { + sessionImpressions += 1; + } + + if (!total) { + totalImpressions = 1; + } else { + parts = total.split('|'); + totalImpressions = parseInt(parts[0], 10) + 1; + } + + sessionStorage.setItem(id, sessionImpressions); + write(id, Math.min(totalImpressions, 9998) + '|' + now, widget.expiration); + + // increment the "total since" values for modals with the impressions.global.duration config option + for (var i = 0; i < ~~localStorage.length; i++) { + var k = localStorage.key(i); + if (typeof k !== 'undefined' && k.includes(PREFIX_TOTAL_IMPRESSIONS_SINCE)) { + parts = read(k).split('|'); + totalImpressions = parseInt(parts[0], 10) + 1; + write(k, totalImpressions + '|' + parts[1], widget.expiration); + } + } + } + + /** @module pathfora/validation/validate-widget-position */ + + /** + * Validate that the widget has correct position field + * for its layout and type + * + * @exports validateWidgetPosition + * @params {object} widget + * @params {object} config + */ + function validateWidgetPosition (widget, config) { + var choices; + + switch (config.layout) { + case 'modal': + choices = ['', 'middle-center']; + break; + case 'slideout': + choices = [ + 'bottom-left', + 'bottom-right', + 'left', + 'right', + 'top-left', + 'top-right' + ]; + break; + case 'bar': + choices = ['top-absolute', 'top-fixed', 'bottom-fixed', 'top-center', 'bottom-center']; + break; + case 'button': + choices = [ + 'left', + 'right', + 'top-left', + 'top-right', + 'bottom-left', + 'bottom-right' + ]; + break; + case 'inline': + choices = []; + break; + } + + if (choices.length && choices.indexOf(config.position) === -1) { + console.warn( + config.position + ' is not a valid position for ' + config.layout + ); + } + } + + /** @module pathfora/widgets/setup-widget-position */ + + /** + * Validate that the widget has correct position field, + * and choose the default if it does not + * + * @exports setupWidgetPostion + * @params {object} widget + * @params {object} config + */ + function setupWidgetPosition (widget, config) { + if (config.position) { + validateWidgetPosition(widget, config); + } else { + config.position = defaultPositions[config.layout]; + } + } + + /** @module pathfora/utils/date-valid */ + + /** + * Validate that the string is a valid date + * + * @exports dateValid + * @params {string} date + * @params {string} max + * @params {string} min + * @returns {boolean} valid + */ + function dateValid (date, max, min) { + var selectedDate = new Date(date).getTime(), + maxDate = max ? new Date(max).getTime() : undefined, + minDate = min ? new Date(min).getTime() : undefined; + + if (max && selectedDate > maxDate) { + return false; + } + + if (min && selectedDate < minDate) { + return false; + } + + return true; + } + + /** @module pathfora/widgets/close-widget */ - var cov_1pwhx7fa55=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",hash="527f755cdde141e89e47867285e19f13d1284215",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}(); + /** + * Close a widget and remove it from the dom + * + * @exports closeWidget + * @params {string} id + * @params {boolean} noTrack + */ + function closeWidget (id, noTrack) { + var i, + node = document$1.getElementById(id); - var cov_i1b9vzuct=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/dom/document.js',hash='c65d2e4509ef22ec2e20b891da6233fa189f8d63',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/dom/document.js',statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var document$1 = window.document; + // FIXME Change to Array#some or Array#filter + for (i = 0; i < widgetTracker.openedWidgets.length; i++) { + if (widgetTracker.openedWidgets[i].id === id) { + if (!noTrack) { + trackWidgetAction('close', widgetTracker.openedWidgets[i]); + } - var cov_10bydpew8k=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js',hash='e5a887164dfe246dafcc3ed2e58224d4f47801c2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js',statementMap:{'0':{start:{line:7,column:11},end:{line:7,column:15}},'1':{start:{line:8,column:13},end:{line:8,column:46}},'2':{start:{line:9,column:25},end:{line:9,column:43}},'3':{start:{line:10,column:15},end:{line:10,column:80}},'4':{start:{line:12,column:2},end:{line:21,column:3}},'5':{start:{line:13,column:4},end:{line:17,column:7}},'6':{start:{line:14,column:6},end:{line:14,column:62}},'7':{start:{line:15,column:6},end:{line:15,column:26}},'8':{start:{line:16,column:6},end:{line:16,column:11}},'9':{start:{line:19,column:4},end:{line:19,column:24}},'10':{start:{line:20,column:4},end:{line:20,column:9}}},fnMap:{'0':{name:'onDOMready',decl:{start:{line:5,column:24},end:{line:5,column:34}},loc:{start:{line:5,column:40},end:{line:22,column:1}},line:5},'1':{name:'(anonymous_1)',decl:{start:{line:13,column:58},end:{line:13,column:59}},loc:{start:{line:13,column:70},end:{line:17,column:5}},line:13}},branchMap:{'0':{loc:{start:{line:10,column:16},end:{line:10,column:53}},type:'cond-expr',locations:[{start:{line:10,column:23},end:{line:10,column:35}},{start:{line:10,column:38},end:{line:10,column:53}}],line:10},'1':{loc:{start:{line:12,column:2},end:{line:21,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:21,column:3}},{start:{line:12,column:2},end:{line:21,column:3}}],line:12}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function onDOMready(fn){cov_10bydpew8k.f[0]++;var handler,pf=(cov_10bydpew8k.s[0]++,this),hack=(cov_10bydpew8k.s[1]++,document$1.documentElement.doScroll),domContentLoaded=(cov_10bydpew8k.s[2]++,'DOMContentLoaded'),loaded=(cov_10bydpew8k.s[3]++,(hack?(cov_10bydpew8k.b[0][0]++,/^loaded|^c/):(cov_10bydpew8k.b[0][1]++,/^loaded|^i|^c/)).test(document$1.readyState));cov_10bydpew8k.s[4]++;if(!loaded){cov_10bydpew8k.b[1][0]++;cov_10bydpew8k.s[5]++;document$1.addEventListener(domContentLoaded,handler=function(){cov_10bydpew8k.f[1]++;cov_10bydpew8k.s[6]++;document$1.removeEventListener(domContentLoaded,handler);cov_10bydpew8k.s[7]++;pf.DOMLoaded=true;cov_10bydpew8k.s[8]++;fn();});}else{cov_10bydpew8k.b[1][1]++;cov_10bydpew8k.s[9]++;pf.DOMLoaded=true;cov_10bydpew8k.s[10]++;fn();}} + for (var key in widgetTracker.openedWidgets[i].listeners) { + if (widgetTracker.openedWidgets[i].listeners.hasOwnProperty(key)) { + var val = widgetTracker.openedWidgets[i].listeners[key]; + val.target.removeEventListener(val.type, val.fn); + } + } - var cov_2izszmhq72=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js',hash='9672a0b353765779a59d989f58a23f3035bb7516',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js',statementMap:{'0':{start:{line:11,column:2},end:{line:11,column:58}}},fnMap:{'0':{name:'escapeRegex',decl:{start:{line:10,column:24},end:{line:10,column:35}},loc:{start:{line:10,column:40},end:{line:12,column:1}},line:10}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function escapeRegex(s){cov_2izszmhq72.f[0]++;cov_2izszmhq72.s[0]++;return String(s).replace(/[\\^$*+?.()|[\]{}]/g,'\\$&');} + widgetTracker.openedWidgets.splice(i, 1); + break; + } + } - var cov_1davc6kwab=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js',hash='af2b6a3c72edb825a75cf9ee73b16bd533be4472',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js',statementMap:{'0':{start:{line:13,column:24},end:{line:17,column:19}},'1':{start:{line:18,column:2},end:{line:18,column:70}}},fnMap:{'0':{name:'removeClass',decl:{start:{line:12,column:24},end:{line:12,column:35}},loc:{start:{line:12,column:57},end:{line:19,column:1}},line:12}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function removeClass(DOMNode,className){cov_1davc6kwab.f[0]++;var findClassRegexp=(cov_1davc6kwab.s[0]++,new RegExp(['(^|\\b)',escapeRegex(className.split(' ').join('|')),'(\\b|$)'].join(''),'gi'));cov_1davc6kwab.s[1]++;DOMNode.className=DOMNode.className.replace(findClassRegexp,' ');} + removeClass(node, 'opened'); - var cov_5fghwnxwd=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js',hash='bc64b7e7bc5f38f1a5ee4dcbab1f4e3ef2fa8240',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:34}},'1':{start:{line:15,column:2},end:{line:18,column:14}}},fnMap:{'0':{name:'addClass',decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:54},end:{line:19,column:1}},line:12}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function addClass(DOMNode,className){cov_5fghwnxwd.f[0]++;cov_5fghwnxwd.s[0]++;removeClass(DOMNode,className);cov_5fghwnxwd.s[1]++;DOMNode.className=[DOMNode.className,className].join(' ');} + if (hasClass(node, 'pf-has-push-down')) { + var pushDown = document$1.querySelector('.pf-push-down'); + if (pushDown) { + removeClass(pushDown, 'opened'); + } + } - var cov_1nj3lzeysl=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js',hash='1b19d272ca97fd27026e8edda647250432c9e60b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js',statementMap:{'0':{start:{line:14,column:2},end:{line:14,column:94}}},fnMap:{'0':{name:'hasClass',decl:{start:{line:13,column:24},end:{line:13,column:32}},loc:{start:{line:13,column:54},end:{line:15,column:1}},line:13}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function hasClass(DOMNode,className){cov_1nj3lzeysl.f[0]++;cov_1nj3lzeysl.s[0]++;return new RegExp('(^| )'+escapeRegex(className)+'( |$)','gi').test(DOMNode.className);} + // FIXME 500 - magical number + setTimeout(function () { + if (node && node.parentNode) { + node.parentNode.removeChild(node); - var cov_1cd7cp9751=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",hash="f3a0b5e86f52c2bc4177b242aaae0316e462ea14",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",statementMap:{"0":{start:{line:12,column:2},end:{line:16,column:3}},"1":{start:{line:13,column:4},end:{line:13,column:33}},"2":{start:{line:15,column:4},end:{line:15,column:13}}},fnMap:{"0":{name:"decodeSafe",decl:{start:{line:11,column:24},end:{line:11,column:34}},loc:{start:{line:11,column:39},end:{line:17,column:1}},line:11}},branchMap:{},s:{"0":0,"1":0,"2":0},f:{"0":0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function decodeSafe(s){cov_1cd7cp9751.f[0]++;cov_1cd7cp9751.s[0]++;try{cov_1cd7cp9751.s[1]++;return decodeURIComponent(s);}catch(e){cov_1cd7cp9751.s[2]++;return s;}} + for (i = 0; i < widgetTracker.initializedWidgets.length; i++) { + if (widgetTracker.initializedWidgets[i] === id) { + widgetTracker.initializedWidgets.splice(i, 1); + } + } + } + }, 500); + } - var cov_1gcrmlam4i=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js',hash='abdbad47d914cdfe3840e45f0e7116e832b6677d',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js',statementMap:{'0':{start:{line:18,column:16},end:{line:18,column:31}},'1':{start:{line:19,column:25},end:{line:19,column:112}},'2':{start:{line:22,column:2},end:{line:24,column:3}},'3':{start:{line:23,column:4},end:{line:23,column:91}},'4':{start:{line:26,column:2},end:{line:30,column:3}},'5':{start:{line:27,column:14},end:{line:27,column:36}},'6':{start:{line:29,column:4},end:{line:29,column:27}},'7':{start:{line:32,column:2},end:{line:32,column:14}}},fnMap:{'0':{name:'readCookie',decl:{start:{line:17,column:24},end:{line:17,column:34}},loc:{start:{line:17,column:42},end:{line:33,column:1}},line:17}},branchMap:{'0':{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22},'1':{loc:{start:{line:26,column:2},end:{line:30,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:30,column:3}},{start:{line:26,column:2},end:{line:30,column:3}}],line:26}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function readCookie(name){cov_1gcrmlam4i.f[0]++;var cookies=(cov_1gcrmlam4i.s[0]++,document$1.cookie),findCookieRegexp=(cov_1gcrmlam4i.s[1]++,cookies.match('(^|;)\\s*'+encodeURIComponent(escapeRegex(name))+'\\s*=\\s*([^;]+)'));cov_1gcrmlam4i.s[2]++;if(findCookieRegexp==null){cov_1gcrmlam4i.b[0][0]++;cov_1gcrmlam4i.s[3]++;findCookieRegexp=cookies.match('(^|;)\\s*'+escapeRegex(name)+'\\s*=\\s*([^;]+)');}else{cov_1gcrmlam4i.b[0][1]++;}cov_1gcrmlam4i.s[4]++;if(findCookieRegexp!=null){cov_1gcrmlam4i.b[1][0]++;var val=(cov_1gcrmlam4i.s[5]++,findCookieRegexp.pop());cov_1gcrmlam4i.s[6]++;return decodeSafe(val);}else{cov_1gcrmlam4i.b[1][1]++;}cov_1gcrmlam4i.s[7]++;return null;} + /** @module pathfora/form/handle-form-states */ - var cov_1ykawmhecv=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js',hash='189688cc883d2d348d321d4d99884f004b004228',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js',statementMap:{'0':{start:{line:16,column:2},end:{line:20,column:3}},'1':{start:{line:17,column:4},end:{line:17,column:54}},'2':{start:{line:19,column:4},end:{line:19,column:28}},'3':{start:{line:22,column:2},end:{line:28,column:13}}},fnMap:{'0':{name:'saveCookie',decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:61},end:{line:29,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:20,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:20,column:3}},{start:{line:16,column:2},end:{line:20,column:3}}],line:16}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function saveCookie(name,value,expiration){cov_1ykawmhecv.f[0]++;var expires;cov_1ykawmhecv.s[0]++;if(expiration){cov_1ykawmhecv.b[0][0]++;cov_1ykawmhecv.s[1]++;expires='; expires='+expiration.toUTCString();}else{cov_1ykawmhecv.b[0][1]++;cov_1ykawmhecv.s[2]++;expires='; expires=0';}cov_1ykawmhecv.s[3]++;document$1.cookie=[encodeURIComponent(name),'=',encodeURIComponent(value),expires,'; path = /'].join('');} + /** + * Handles showing the success or error state of a form. + * + * @exports handleFormStates + * @params {boolean} successful + * @params {object} widget + * @params {object} config + */ + function handleFormStates (successful, widget, config) { + if (config.formStates) { + var delay = 0; - var cov_259g0ccjov=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js',hash='1e40de4ae30d5133b30ef558131106377822421e',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js',statementMap:{'0':{start:{line:12,column:13},end:{line:12,column:54}},'1':{start:{line:13,column:2},end:{line:13,column:29}}},fnMap:{'0':{name:'deleteCookie',decl:{start:{line:11,column:24},end:{line:11,column:36}},loc:{start:{line:11,column:44},end:{line:14,column:1}},line:11}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function deleteCookie(name){cov_259g0ccjov.f[0]++;var date=(cov_259g0ccjov.s[0]++,new Date('Thu, 01 Jan 1970 00:00:01 GMT'));cov_259g0ccjov.s[1]++;saveCookie(name,'',date);} + if (successful) { + addClass(widget, 'success'); + delay = config.formStates.success && typeof config.formStates.success.delay !== 'undefined' ? config.formStates.success.delay * 1000 : 3000; + } else { + addClass(widget, 'error'); + delay = config.formStates.error && typeof config.formStates.error.delay !== 'undefined' ? config.formStates.error.delay * 1000 : 3000; + } - var cov_ge5ip8ph0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js',hash='456c8431e84a81a68a91d3896ab3ad390e8ff602',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js',statementMap:{'0':{start:{line:2,column:18},end:{line:2,column:21}},'1':{start:{line:3,column:18},end:{line:3,column:21}},'2':{start:{line:4,column:26},end:{line:4,column:36}},'3':{start:{line:7,column:2},end:{line:11,column:3}},'4':{start:{line:8,column:4},end:{line:8,column:28}},'5':{start:{line:15,column:2},end:{line:15,column:86}},'6':{start:{line:18,column:2},end:{line:18,column:46}},'7':{start:{line:23,column:21},end:{line:23,column:46}},'8':{start:{line:24,column:17},end:{line:24,column:42}},'9':{start:{line:26,column:4},end:{line:36,column:5}},'10':{start:{line:27,column:6},end:{line:30,column:7}},'11':{start:{line:28,column:8},end:{line:28,column:37}},'12':{start:{line:29,column:8},end:{line:29,column:20}},'13':{start:{line:31,column:6},end:{line:35,column:7}},'14':{start:{line:33,column:8},end:{line:33,column:47}},'15':{start:{line:34,column:8},end:{line:34,column:35}},'16':{start:{line:37,column:4},end:{line:37,column:22}},'17':{start:{line:41,column:4},end:{line:44,column:5}},'18':{start:{line:42,column:6},end:{line:42,column:29}},'19':{start:{line:43,column:6},end:{line:43,column:51}},'20':{start:{line:46,column:17},end:{line:46,column:19}},'21':{start:{line:48,column:4},end:{line:48,column:39}},'22':{start:{line:49,column:4},end:{line:49,column:36}},'23':{start:{line:50,column:4},end:{line:50,column:45}},'24':{start:{line:52,column:4},end:{line:52,column:54}},'25':{start:{line:56,column:4},end:{line:56,column:33}},'26':{start:{line:60,column:4},end:{line:62,column:5}},'27':{start:{line:61,column:6},end:{line:61,column:56}},'28':{start:{line:63,column:15},end:{line:63,column:25}},'29':{start:{line:65,column:4},end:{line:65,column:64}},'30':{start:{line:67,column:4},end:{line:67,column:37}},'31':{start:{line:71,column:4},end:{line:78,column:5}},'32':{start:{line:72,column:16},end:{line:72,column:35}},'33':{start:{line:73,column:19},end:{line:73,column:59}},'34':{start:{line:75,column:6},end:{line:77,column:7}},'35':{start:{line:76,column:8},end:{line:76,column:37}}},fnMap:{'0':{name:'safeJsonParse',decl:{start:{line:6,column:9},end:{line:6,column:22}},loc:{start:{line:6,column:30},end:{line:12,column:1}},line:6},'1':{name:'isExpired',decl:{start:{line:14,column:9},end:{line:14,column:18}},loc:{start:{line:14,column:28},end:{line:16,column:1}},line:14},'2':{name:'isCreatedByThisLib',decl:{start:{line:17,column:9},end:{line:17,column:27}},loc:{start:{line:17,column:37},end:{line:19,column:1}},line:17},'3':{name:'(anonymous_3)',decl:{start:{line:22,column:11},end:{line:22,column:12}},loc:{start:{line:22,column:26},end:{line:38,column:3}},line:22},'4':{name:'(anonymous_4)',decl:{start:{line:40,column:11},end:{line:40,column:12}},loc:{start:{line:40,column:46},end:{line:53,column:3}},line:40},'5':{name:'(anonymous_5)',decl:{start:{line:55,column:14},end:{line:55,column:15}},loc:{start:{line:55,column:29},end:{line:57,column:3}},line:55},'6':{name:'(anonymous_6)',decl:{start:{line:59,column:7},end:{line:59,column:8}},loc:{start:{line:59,column:45},end:{line:68,column:3}},line:59},'7':{name:'(anonymous_7)',decl:{start:{line:70,column:22},end:{line:70,column:23}},loc:{start:{line:70,column:34},end:{line:79,column:3}},line:70}},branchMap:{'0':{loc:{start:{line:15,column:9},end:{line:15,column:85}},type:'binary-expr',locations:[{start:{line:15,column:9},end:{line:15,column:37}},{start:{line:15,column:41},end:{line:15,column:85}}],line:15},'1':{loc:{start:{line:26,column:4},end:{line:36,column:5}},type:'if',locations:[{start:{line:26,column:4},end:{line:36,column:5}},{start:{line:26,column:4},end:{line:36,column:5}}],line:26},'2':{loc:{start:{line:26,column:8},end:{line:26,column:39}},type:'binary-expr',locations:[{start:{line:26,column:8},end:{line:26,column:14}},{start:{line:26,column:18},end:{line:26,column:39}}],line:26},'3':{loc:{start:{line:27,column:6},end:{line:30,column:7}},type:'if',locations:[{start:{line:27,column:6},end:{line:30,column:7}},{start:{line:27,column:6},end:{line:30,column:7}}],line:27},'4':{loc:{start:{line:31,column:6},end:{line:35,column:7}},type:'if',locations:[{start:{line:31,column:6},end:{line:35,column:7}},{start:{line:31,column:6},end:{line:35,column:7}}],line:31},'5':{loc:{start:{line:41,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:44,column:5}},{start:{line:41,column:4},end:{line:44,column:5}}],line:41},'6':{loc:{start:{line:60,column:4},end:{line:62,column:5}},type:'if',locations:[{start:{line:60,column:4},end:{line:62,column:5}},{start:{line:60,column:4},end:{line:62,column:5}}],line:60},'7':{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:'if',locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},'8':{loc:{start:{line:75,column:10},end:{line:75,column:67}},type:'binary-expr',locations:[{start:{line:75,column:10},end:{line:75,column:16}},{start:{line:75,column:20},end:{line:75,column:46}},{start:{line:75,column:50},end:{line:75,column:67}}],line:75}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var PAYLOAD_KEY=(cov_ge5ip8ph0.s[0]++,'$');var EXPIRES_KEY=(cov_ge5ip8ph0.s[1]++,'@');var PATHFORA_IDENTIFIER=(cov_ge5ip8ph0.s[2]++,'PATHFORA');function safeJsonParse(json){cov_ge5ip8ph0.f[0]++;cov_ge5ip8ph0.s[3]++;try{cov_ge5ip8ph0.s[4]++;return JSON.parse(json);}catch(e){}}function isExpired(record){cov_ge5ip8ph0.f[1]++;cov_ge5ip8ph0.s[5]++;return (cov_ge5ip8ph0.b[0][0]++,Boolean(record[EXPIRES_KEY]))&&(cov_ge5ip8ph0.b[0][1]++,Date.parse(record[EXPIRES_KEY]) 0) { + setTimeout(function () { + closeWidget(widget.id, true); + }, delay); + } + } + } - var cov_19rhzn76m3=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/persist/write.js',hash='ddac6fe5b1358843f336326dcbc4252b821f870a',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/persist/write.js',statementMap:{'0':{start:{line:4,column:2},end:{line:4,column:55}}},fnMap:{'0':{name:'write',decl:{start:{line:3,column:24},end:{line:3,column:29}},loc:{start:{line:3,column:55},end:{line:5,column:1}},line:3}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function write(key,value,expiration){cov_19rhzn76m3.f[0]++;cov_19rhzn76m3.s[0]++;expiringLocalStorage.setItem(key,value,expiration);} + /** @module pathfora/widgets/actions/widgetOnModalClose */ - var cov_zym3f475w=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/utils/is-not-encoded.js",hash="3390e30d1af49f22186915029cc3cce41ec2ca48",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/is-not-encoded.js",statementMap:{"0":{start:{line:11,column:2},end:{line:15,column:3}},"1":{start:{line:12,column:4},end:{line:12,column:70}},"2":{start:{line:14,column:4},end:{line:14,column:17}}},fnMap:{"0":{name:"isNotEncoded",decl:{start:{line:10,column:24},end:{line:10,column:36}},loc:{start:{line:10,column:41},end:{line:16,column:1}},line:10}},branchMap:{"0":{loc:{start:{line:12,column:11},end:{line:12,column:69}},type:"binary-expr",locations:[{start:{line:12,column:11},end:{line:12,column:38}},{start:{line:12,column:42},end:{line:12,column:69}}],line:12}},s:{"0":0,"1":0,"2":0},f:{"0":0},b:{"0":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function isNotEncoded(s){cov_zym3f475w.f[0]++;cov_zym3f475w.s[0]++;try{cov_zym3f475w.s[1]++;return (cov_zym3f475w.b[0][0]++,decodeURIComponent(s)===s)&&(cov_zym3f475w.b[0][1]++,encodeURIComponent(s)!==s);}catch(e){cov_zym3f475w.s[2]++;return false;}} + /** + * Execute the onModalClose callback + * if set by the user + * + * @exports widgetOnModalClose + * @params {object} widget + * @params {object} config + * @params {object} event + */ - var cov_2zs0fzy16=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/update-legacy-cookies.js',hash='a4d0306d71759a16b365833aeb0ef0e97fa36ac6',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/update-legacy-cookies.js',statementMap:{'0':{start:{line:32,column:19},end:{line:41,column:3}},'1':{start:{line:43,column:10},end:{line:43,column:11}},'2':{start:{line:45,column:19},end:{line:47,column:3}},'3':{start:{line:46,column:4},end:{line:46,column:49}},'4':{start:{line:49,column:19},end:{line:59,column:3}},'5':{start:{line:50,column:16},end:{line:50,column:35}},'6':{start:{line:52,column:4},end:{line:58,column:5}},'7':{start:{line:53,column:17},end:{line:53,column:25}},'8':{start:{line:54,column:16},end:{line:54,column:24}},'9':{start:{line:56,column:6},end:{line:56,column:25}},'10':{start:{line:57,column:6},end:{line:57,column:35}},'11':{start:{line:61,column:20},end:{line:68,column:3}},'12':{start:{line:62,column:14},end:{line:62,column:39}},'13':{start:{line:64,column:4},end:{line:67,column:5}},'14':{start:{line:65,column:6},end:{line:65,column:35}},'15':{start:{line:66,column:6},end:{line:66,column:77}},'16':{start:{line:70,column:2},end:{line:73,column:3}},'17':{start:{line:71,column:4},end:{line:71,column:70}},'18':{start:{line:72,column:4},end:{line:72,column:72}}},fnMap:{'0':{name:'updateLegacyCookies',decl:{start:{line:30,column:24},end:{line:30,column:43}},loc:{start:{line:30,column:47},end:{line:74,column:1}},line:30},'1':{name:'(anonymous_1)',decl:{start:{line:45,column:19},end:{line:45,column:20}},loc:{start:{line:45,column:32},end:{line:47,column:3}},line:45},'2':{name:'(anonymous_2)',decl:{start:{line:49,column:19},end:{line:49,column:20}},loc:{start:{line:49,column:32},end:{line:59,column:3}},line:49},'3':{name:'(anonymous_3)',decl:{start:{line:61,column:20},end:{line:61,column:21}},loc:{start:{line:61,column:33},end:{line:68,column:3}},line:61}},branchMap:{'0':{loc:{start:{line:52,column:4},end:{line:58,column:5}},type:'if',locations:[{start:{line:52,column:4},end:{line:58,column:5}},{start:{line:52,column:4},end:{line:58,column:5}}],line:52},'1':{loc:{start:{line:64,column:4},end:{line:67,column:5}},type:'if',locations:[{start:{line:64,column:4},end:{line:67,column:5}},{start:{line:64,column:4},end:{line:67,column:5}}],line:64}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function updateLegacyCookies(){cov_2zs0fzy16.f[0]++;var cookieFind=(cov_2zs0fzy16.s[0]++,[PREFIX_REC,PREFIX_UNLOCK,PREFIX_IMPRESSION,PREFIX_CONFIRM,PREFIX_CANCEL,PREFIX_CLOSE,PREFIX_AB_TEST,PF_PAGEVIEWS]);var i=(cov_2zs0fzy16.s[1]++,0);cov_2zs0fzy16.s[2]++;var filterFunc=function(c){cov_2zs0fzy16.f[1]++;cov_2zs0fzy16.s[3]++;return c.trim().indexOf(cookieFind[i])===0;};cov_2zs0fzy16.s[4]++;var cookieFunc=function(c){cov_2zs0fzy16.f[2]++;var split=(cov_2zs0fzy16.s[5]++,c.trim().split('='));cov_2zs0fzy16.s[6]++;if(split.length===2){cov_2zs0fzy16.b[0][0]++;var name=(cov_2zs0fzy16.s[7]++,split[0]);var val=(cov_2zs0fzy16.s[8]++,split[1]);cov_2zs0fzy16.s[9]++;deleteCookie(name);cov_2zs0fzy16.s[10]++;write(name,decodeSafe(val));}else{cov_2zs0fzy16.b[0][1]++;}};cov_2zs0fzy16.s[11]++;var sessionFunc=function(c){cov_2zs0fzy16.f[3]++;var val=(cov_2zs0fzy16.s[12]++,sessionStorage.getItem(c));cov_2zs0fzy16.s[13]++;if(isNotEncoded(val)){cov_2zs0fzy16.b[1][0]++;cov_2zs0fzy16.s[14]++;sessionStorage.removeItem(c);cov_2zs0fzy16.s[15]++;sessionStorage.setItem(encodeURIComponent(c),encodeURIComponent(val));}else{cov_2zs0fzy16.b[1][1]++;}};cov_2zs0fzy16.s[16]++;for(i=0;i0)){cov_2relrkaoki.b[4][0]++;cov_2relrkaoki.s[11]++;queries.push('&');}else{cov_2relrkaoki.b[4][1]++;}cov_2relrkaoki.s[12]++;queries.push(key+'[]='+params[key][i]);}else{cov_2relrkaoki.b[3][1]++;}}}else{cov_2relrkaoki.b[2][1]++;cov_2relrkaoki.s[13]++;queries.push(key+'='+params[key]);}cov_2relrkaoki.s[14]++;count++;}else{cov_2relrkaoki.b[0][1]++;}}cov_2relrkaoki.s[15]++;return queries.join('');} + write(name, ct + '|' + duration, expiration); + } - var cov_c2836m7g0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/url/escape-uri.js',hash='666b5dcabe558c2bd32efe9ef969ae1b0df8fa03',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/url/escape-uri.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:28}},'1':{start:{line:15,column:15},end:{line:15,column:26}},'2':{start:{line:16,column:16},end:{line:16,column:18}},'3':{start:{line:17,column:16},end:{line:17,column:40}},'4':{start:{line:18,column:20},end:{line:18,column:48}},'5':{start:{line:21,column:4},end:{line:21,column:33}},'6':{start:{line:25,column:4},end:{line:25,column:33}},'7':{start:{line:29,column:4},end:{line:29,column:67}},'8':{start:{line:33,column:4},end:{line:33,column:85}},'9':{start:{line:37,column:4},end:{line:40,column:31}},'10':{start:{line:43,column:2},end:{line:60,column:3}},'11':{start:{line:44,column:19},end:{line:44,column:30}},'12':{start:{line:45,column:19},end:{line:45,column:41}},'13':{start:{line:47,column:4},end:{line:59,column:5}},'14':{start:{line:48,column:6},end:{line:48,column:24}},'15':{start:{line:49,column:11},end:{line:59,column:5}},'16':{start:{line:52,column:6},end:{line:52,column:24}},'17':{start:{line:53,column:11},end:{line:59,column:5}},'18':{start:{line:54,column:6},end:{line:56,column:36}},'19':{start:{line:58,column:6},end:{line:58,column:29}},'20':{start:{line:62,column:2},end:{line:62,column:26}}},fnMap:{'0':{name:'escapeURI',decl:{start:{line:11,column:24},end:{line:11,column:33}},loc:{start:{line:11,column:50},end:{line:63,column:1}},line:11},'1':{name:'isHexDigit',decl:{start:{line:20,column:11},end:{line:20,column:21}},loc:{start:{line:20,column:26},end:{line:22,column:3}},line:20},'2':{name:'toHexDigit',decl:{start:{line:24,column:11},end:{line:24,column:21}},loc:{start:{line:24,column:26},end:{line:26,column:3}},line:24},'3':{name:'containsChar',decl:{start:{line:28,column:11},end:{line:28,column:23}},loc:{start:{line:28,column:44},end:{line:30,column:3}},line:28},'4':{name:'isURISeparator',decl:{start:{line:32,column:11},end:{line:32,column:25}},loc:{start:{line:32,column:30},end:{line:34,column:3}},line:32},'5':{name:'shouldEscape',decl:{start:{line:36,column:11},end:{line:36,column:23}},loc:{start:{line:36,column:35},end:{line:41,column:3}},line:36}},branchMap:{'0':{loc:{start:{line:13,column:2},end:{line:13,column:27}},type:'binary-expr',locations:[{start:{line:13,column:2},end:{line:13,column:9}},{start:{line:13,column:14},end:{line:13,column:26}}],line:13},'1':{loc:{start:{line:17,column:16},end:{line:17,column:40}},type:'binary-expr',locations:[{start:{line:17,column:16},end:{line:17,column:31}},{start:{line:17,column:35},end:{line:17,column:40}}],line:17},'2':{loc:{start:{line:18,column:20},end:{line:18,column:48}},type:'binary-expr',locations:[{start:{line:18,column:20},end:{line:18,column:39}},{start:{line:18,column:43},end:{line:18,column:48}}],line:18},'3':{loc:{start:{line:37,column:11},end:{line:40,column:30}},type:'binary-expr',locations:[{start:{line:37,column:11},end:{line:37,column:36}},{start:{line:37,column:40},end:{line:40,column:30}}],line:37},'4':{loc:{start:{line:47,column:4},end:{line:59,column:5}},type:'if',locations:[{start:{line:47,column:4},end:{line:59,column:5}},{start:{line:47,column:4},end:{line:59,column:5}}],line:47},'5':{loc:{start:{line:47,column:8},end:{line:47,column:35}},type:'binary-expr',locations:[{start:{line:47,column:8},end:{line:47,column:15}},{start:{line:47,column:19},end:{line:47,column:35}}],line:47},'6':{loc:{start:{line:49,column:11},end:{line:59,column:5}},type:'if',locations:[{start:{line:49,column:11},end:{line:59,column:5}},{start:{line:49,column:11},end:{line:59,column:5}}],line:49},'7':{loc:{start:{line:49,column:15},end:{line:51,column:35}},type:'binary-expr',locations:[{start:{line:49,column:15},end:{line:49,column:26}},{start:{line:49,column:30},end:{line:49,column:46}},{start:{line:49,column:50},end:{line:49,column:69}},{start:{line:50,column:8},end:{line:50,column:35}},{start:{line:51,column:8},end:{line:51,column:35}}],line:49},'8':{loc:{start:{line:53,column:11},end:{line:59,column:5}},type:'if',locations:[{start:{line:53,column:11},end:{line:59,column:5}},{start:{line:53,column:11},end:{line:59,column:5}}],line:53}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0,0,0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function escapeURI(text,options){cov_c2836m7g0.f[0]++;cov_c2836m7g0.s[0]++;(cov_c2836m7g0.b[0][0]++,options)||(cov_c2836m7g0.b[0][1]++,options={});var length=(cov_c2836m7g0.s[1]++,text.length),escaped=(cov_c2836m7g0.s[2]++,[]),usePlus=(cov_c2836m7g0.s[3]++,(cov_c2836m7g0.b[1][0]++,options.usePlus)||(cov_c2836m7g0.b[1][1]++,false)),keepEscaped=(cov_c2836m7g0.s[4]++,(cov_c2836m7g0.b[2][0]++,options.keepEscaped)||(cov_c2836m7g0.b[2][1]++,false));function isHexDigit(c){cov_c2836m7g0.f[1]++;cov_c2836m7g0.s[5]++;return /[0-9A-Fa-f]/.test(c);}function toHexDigit(i){cov_c2836m7g0.f[2]++;cov_c2836m7g0.s[6]++;return '0123456789ABCDEF'[i];}function containsChar(charMap,charCode){cov_c2836m7g0.f[3]++;cov_c2836m7g0.s[7]++;return (charMap[charCode>>5]&1<<(charCode&31))!==0;}function isURISeparator(c){cov_c2836m7g0.f[4]++;cov_c2836m7g0.s[8]++;return ['#',':',';','/','?','$','&','+',',','@','='].indexOf(c)!==-1;}function shouldEscape(charText){cov_c2836m7g0.f[5]++;cov_c2836m7g0.s[9]++;return (cov_c2836m7g0.b[3][0]++,!isURISeparator(charText))&&(cov_c2836m7g0.b[3][1]++,containsChar([0xffffffff,0xf80008fd,0x78000001,0xb8000001,0xffffffff,0xffffffff,0xffffffff,0xffffffff],charText.charCodeAt(0)));}cov_c2836m7g0.s[10]++;for(var index=0;index=index+2)&&(cov_c2836m7g0.b[7][3]++,isHexDigit(text[index+1]))&&(cov_c2836m7g0.b[7][4]++,isHexDigit(text[index+2]))){cov_c2836m7g0.b[6][0]++;cov_c2836m7g0.s[16]++;escaped.push('%');}else{cov_c2836m7g0.b[6][1]++;cov_c2836m7g0.s[17]++;if(shouldEscape(charText)){cov_c2836m7g0.b[8][0]++;cov_c2836m7g0.s[18]++;escaped.push('%',toHexDigit(charCode>>4),toHexDigit(charCode&0xf));}else{cov_c2836m7g0.b[8][1]++;cov_c2836m7g0.s[19]++;escaped.push(charText);}}}}cov_c2836m7g0.s[20]++;return escaped.join('');} + /** @module pathfora/widgets/actions/buton-action */ - var cov_2icmgm90ml=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js',hash='c7d53580168d40addc52029ff65f77de30c88bc5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js',statementMap:{'0':{start:{line:11,column:2},end:{line:22,column:3}},'1':{start:{line:12,column:4},end:{line:21,column:5}},'2':{start:{line:13,column:6},end:{line:18,column:7}},'3':{start:{line:14,column:8},end:{line:16,column:9}},'4':{start:{line:15,column:10},end:{line:15,column:28}},'5':{start:{line:17,column:8},end:{line:17,column:49}},'6':{start:{line:19,column:11},end:{line:21,column:5}},'7':{start:{line:20,column:6},end:{line:20,column:34}}},fnMap:{'0':{name:'updateObject',decl:{start:{line:10,column:24},end:{line:10,column:36}},loc:{start:{line:10,column:54},end:{line:23,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:12,column:4},end:{line:21,column:5}},type:'if',locations:[{start:{line:12,column:4},end:{line:21,column:5}},{start:{line:12,column:4},end:{line:21,column:5}}],line:12},'1':{loc:{start:{line:12,column:8},end:{line:12,column:128}},type:'binary-expr',locations:[{start:{line:12,column:8},end:{line:12,column:35}},{start:{line:12,column:39},end:{line:12,column:71}},{start:{line:12,column:75},end:{line:12,column:96}},{start:{line:12,column:100},end:{line:12,column:128}}],line:12},'2':{loc:{start:{line:13,column:6},end:{line:18,column:7}},type:'if',locations:[{start:{line:13,column:6},end:{line:18,column:7}},{start:{line:13,column:6},end:{line:18,column:7}}],line:13},'3':{loc:{start:{line:14,column:8},end:{line:16,column:9}},type:'if',locations:[{start:{line:14,column:8},end:{line:16,column:9}},{start:{line:14,column:8},end:{line:16,column:9}}],line:14},'4':{loc:{start:{line:19,column:11},end:{line:21,column:5}},type:'if',locations:[{start:{line:19,column:11},end:{line:21,column:5}},{start:{line:19,column:11},end:{line:21,column:5}}],line:19}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function updateObject(object,config){cov_2icmgm90ml.f[0]++;cov_2icmgm90ml.s[0]++;for(var prop in config){cov_2icmgm90ml.s[1]++;if((cov_2icmgm90ml.b[1][0]++,config.hasOwnProperty(prop))&&(cov_2icmgm90ml.b[1][1]++,typeof config[prop]==='object')&&(cov_2icmgm90ml.b[1][2]++,config[prop]!==null)&&(cov_2icmgm90ml.b[1][3]++,!Array.isArray(config[prop]))){cov_2icmgm90ml.b[0][0]++;cov_2icmgm90ml.s[2]++;if(config.hasOwnProperty(prop)){cov_2icmgm90ml.b[2][0]++;cov_2icmgm90ml.s[3]++;if(typeof object[prop]==='undefined'){cov_2icmgm90ml.b[3][0]++;cov_2icmgm90ml.s[4]++;object[prop]={};}else{cov_2icmgm90ml.b[3][1]++;}cov_2icmgm90ml.s[5]++;updateObject(object[prop],config[prop]);}else{cov_2icmgm90ml.b[2][1]++;}}else{cov_2icmgm90ml.b[0][1]++;cov_2icmgm90ml.s[6]++;if(config.hasOwnProperty(prop)){cov_2icmgm90ml.b[4][0]++;cov_2icmgm90ml.s[7]++;object[prop]=config[prop];}else{cov_2icmgm90ml.b[4][1]++;}}}} + /** + * Execute any callbacks that were assigned + * to a button, and perform tracking + * + * @exports widgetOnModalClose + * @params {object} btn + * @params {string} type + * @params {object} config + * @params {object} widget + */ - var cov_1won452gfq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js',hash='befca9b830059b45158aa6ad58f6eb7b168d70a9',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js',statementMap:{'0':{start:{line:14,column:15},end:{line:14,column:21}},'1':{start:{line:15,column:15},end:{line:15,column:29}},'2':{start:{line:16,column:2},end:{line:24,column:3}},'3':{start:{line:17,column:15},end:{line:17,column:24}},'4':{start:{line:19,column:4},end:{line:21,column:5}},'5':{start:{line:20,column:6},end:{line:20,column:24}},'6':{start:{line:23,column:4},end:{line:23,column:26}},'7':{start:{line:26,column:2},end:{line:26,column:44}},'8':{start:{line:28,column:2},end:{line:28,column:16}}},fnMap:{'0':{name:'setObjectValue',decl:{start:{line:13,column:24},end:{line:13,column:38}},loc:{start:{line:13,column:60},end:{line:29,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:19,column:4},end:{line:21,column:5}},type:'if',locations:[{start:{line:19,column:4},end:{line:21,column:5}},{start:{line:19,column:4},end:{line:21,column:5}}],line:19}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setObjectValue(object,key,value){cov_1won452gfq.f[0]++;var parent=(cov_1won452gfq.s[0]++,object);var fields=(cov_1won452gfq.s[1]++,key.split('.'));cov_1won452gfq.s[2]++;for(var i=0;i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g);cov_1rcyjk6pkr.s[1]++;return regex.test(email);} + if (type === 'error.cancel') { + action = config.formStates.error.cancelAction; + } - var cov_23yxsekd49=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js',hash='1cf858a24e43f2bfe227b4ce00fbce848a684557',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js',statementMap:{'0':{start:{line:46,column:19},end:{line:82,column:1}}},fnMap:{},branchMap:{},s:{'0':0},f:{},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var utils=(cov_23yxsekd49.s[0]++,{addClass:addClass,hasClass:hasClass,removeClass:removeClass,readCookie:readCookie,saveCookie:saveCookie,deleteCookie:deleteCookie,updateLegacyCookies:updateLegacyCookies,read:read,write:write,erase:erase,store:expiringLocalStorage,initWidgetScaffold:initWidgetScaffold,insertWidget:insertWidget,constructQueries:constructQueries,escapeURI:escapeURI,updateObject:updateObject,setObjectValue:setObjectValue,getObjectValue:getObjectValue,generateUniqueId:generateUniqueId,escapeRegex:escapeRegex,emailValid:emailValid,decodeSafe:decodeSafe,isNotEncoded:isNotEncoded}); + break; + case 'confirm': + case 'success.confirm': + case 'error.confirm': + prefix = PREFIX_CONFIRM; + shouldClose = config.layout !== 'inline'; - var cov_2jnbb0xxj6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/data/tracking/get-data-object.js',hash='4a0276004d4fe9fd40c6eae6b982ac6c67dd1b3f',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/data/tracking/get-data-object.js',statementMap:{'0':{start:{line:12,column:2},end:{line:12,column:28}}},fnMap:{'0':{name:'getDataObject',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:41},end:{line:13,column:1}},line:11}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function getDataObject(){cov_2jnbb0xxj6.f[0]++;cov_2jnbb0xxj6.s[0]++;return pathforaDataObject;} + if (type === 'success.confirm') { + action = config.formStates.success.confirmAction; + } + if (type === 'error.confirm') { + action = config.formStates.error.confirmAction; + } - var cov_v3662jjz8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/callbacks/add-callback.js',hash='1bd0f60577271e4eee0dc1fb3583e4992beb5812',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/callbacks/add-callback.js',statementMap:{'0':{start:{line:12,column:2},end:{line:29,column:3}},'1':{start:{line:14,column:4},end:{line:14,column:24}},'2':{start:{line:15,column:4},end:{line:15,column:11}},'3':{start:{line:16,column:9},end:{line:29,column:3}},'4':{start:{line:17,column:4},end:{line:28,column:5}},'5':{start:{line:18,column:6},end:{line:22,column:9}},'6':{start:{line:19,column:8},end:{line:21,column:9}},'7':{start:{line:20,column:10},end:{line:20,column:26}},'8':{start:{line:24,column:19},end:{line:24,column:43}},'9':{start:{line:25,column:6},end:{line:27,column:7}},'10':{start:{line:26,column:8},end:{line:26,column:29}},'11':{start:{line:32,column:2},end:{line:32,column:26}}},fnMap:{'0':{name:'addCallback',decl:{start:{line:11,column:24},end:{line:11,column:35}},loc:{start:{line:11,column:41},end:{line:33,column:1}},line:11},'1':{name:'(anonymous_1)',decl:{start:{line:18,column:31},end:{line:18,column:32}},loc:{start:{line:18,column:44},end:{line:22,column:7}},line:18}},branchMap:{'0':{loc:{start:{line:12,column:2},end:{line:29,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:29,column:3}},{start:{line:12,column:2},end:{line:29,column:3}}],line:12},'1':{loc:{start:{line:12,column:6},end:{line:12,column:37}},type:'binary-expr',locations:[{start:{line:12,column:6},end:{line:12,column:16}},{start:{line:12,column:20},end:{line:12,column:37}}],line:12},'2':{loc:{start:{line:16,column:9},end:{line:29,column:3}},type:'if',locations:[{start:{line:16,column:9},end:{line:29,column:3}},{start:{line:16,column:9},end:{line:29,column:3}}],line:16},'3':{loc:{start:{line:16,column:13},end:{line:16,column:73}},type:'binary-expr',locations:[{start:{line:16,column:13},end:{line:16,column:25}},{start:{line:16,column:29},end:{line:16,column:73}}],line:16},'4':{loc:{start:{line:17,column:4},end:{line:28,column:5}},type:'if',locations:[{start:{line:17,column:4},end:{line:28,column:5}},{start:{line:17,column:4},end:{line:28,column:5}}],line:17},'5':{loc:{start:{line:19,column:8},end:{line:21,column:9}},type:'if',locations:[{start:{line:19,column:8},end:{line:21,column:9}},{start:{line:19,column:8},end:{line:21,column:9}}],line:19},'6':{loc:{start:{line:19,column:12},end:{line:19,column:33}},type:'binary-expr',locations:[{start:{line:19,column:12},end:{line:19,column:18}},{start:{line:19,column:22},end:{line:19,column:33}}],line:19},'7':{loc:{start:{line:25,column:6},end:{line:27,column:7}},type:'if',locations:[{start:{line:25,column:6},end:{line:27,column:7}},{start:{line:25,column:6},end:{line:27,column:7}}],line:25},'8':{loc:{start:{line:25,column:10},end:{line:25,column:41}},type:'binary-expr',locations:[{start:{line:25,column:10},end:{line:25,column:21}},{start:{line:25,column:25},end:{line:25,column:41}}],line:25}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function addCallback(cb){cov_v3662jjz8.f[0]++;cov_v3662jjz8.s[0]++;if((cov_v3662jjz8.b[1][0]++,window.lio)&&(cov_v3662jjz8.b[1][1]++,window.lio.loaded)){cov_v3662jjz8.b[0][0]++;cov_v3662jjz8.s[1]++;cb(window.lio.data);cov_v3662jjz8.s[2]++;return;}else{cov_v3662jjz8.b[0][1]++;cov_v3662jjz8.s[3]++;if((cov_v3662jjz8.b[3][0]++,window.jstag)&&(cov_v3662jjz8.b[3][1]++,typeof window.jstag.getEntity==='function')){cov_v3662jjz8.b[2][0]++;cov_v3662jjz8.s[4]++;if('entityReady'in window.jstag){cov_v3662jjz8.b[4][0]++;cov_v3662jjz8.s[5]++;window.jstag.entityReady(function(e){cov_v3662jjz8.f[1]++;cov_v3662jjz8.s[6]++;if((cov_v3662jjz8.b[6][0]++,e.data)&&(cov_v3662jjz8.b[6][1]++,e.data.user)){cov_v3662jjz8.b[5][0]++;cov_v3662jjz8.s[7]++;cb(e.data.user);}else{cov_v3662jjz8.b[5][1]++;}});}else{cov_v3662jjz8.b[4][1]++;var entity=(cov_v3662jjz8.s[8]++,window.jstag.getEntity());cov_v3662jjz8.s[9]++;if((cov_v3662jjz8.b[8][0]++,entity.data)&&(cov_v3662jjz8.b[8][1]++,entity.data.user)){cov_v3662jjz8.b[7][0]++;cov_v3662jjz8.s[10]++;cb(entity.data.user);}else{cov_v3662jjz8.b[7][1]++;}}}else{cov_v3662jjz8.b[2][1]++;}}cov_v3662jjz8.s[11]++;this.callbacks.push(cb);} + break; + } - var cov_2kwjmf8e58=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/init-pageviews.js',hash='90ec20681f14de647b7257201db2712b21fff4f2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/init-pageviews.js',statementMap:{'0':{start:{line:16,column:15},end:{line:16,column:33}},'1':{start:{line:18,column:2},end:{line:18,column:52}}},fnMap:{'0':{name:'initializePageViews',decl:{start:{line:15,column:24},end:{line:15,column:43}},loc:{start:{line:15,column:47},end:{line:19,column:1}},line:15}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializePageViews(){cov_2kwjmf8e58.f[0]++;var cookie=(cov_2kwjmf8e58.s[0]++,read(PF_PAGEVIEWS));cov_2kwjmf8e58.s[1]++;write(PF_PAGEVIEWS,Math.min(~~cookie,9998)+1);} + btn.onmouseenter = function (event) { + trackWidgetAction('hover', config, event.target); + }; - var cov_hpbzwr9xi=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/impressions/impressions-checker.js',hash='91dd1506b5727ffcc45c54975f4dc45cc2691012',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/impressions/impressions-checker.js',statementMap:{'0':{start:{line:23,column:11},end:{line:23,column:40}},'1':{start:{line:24,column:16},end:{line:24,column:58}},'2':{start:{line:25,column:27},end:{line:25,column:55}},'3':{start:{line:26,column:40},end:{line:26,column:41}},'4':{start:{line:27,column:33},end:{line:27,column:34}},'5':{start:{line:28,column:40},end:{line:28,column:41}},'6':{start:{line:29,column:14},end:{line:29,column:22}},'7':{start:{line:30,column:12},end:{line:30,column:22}},'8':{start:{line:33,column:2},end:{line:33,column:68}},'9':{start:{line:34,column:2},end:{line:34,column:68}},'10':{start:{line:37,column:2},end:{line:39,column:3}},'11':{start:{line:38,column:4},end:{line:38,column:73}},'12':{start:{line:41,column:2},end:{line:43,column:3}},'13':{start:{line:42,column:4},end:{line:42,column:69}},'14':{start:{line:45,column:2},end:{line:47,column:3}},'15':{start:{line:46,column:4},end:{line:46,column:71}},'16':{start:{line:50,column:2},end:{line:69,column:3}},'17':{start:{line:51,column:4},end:{line:51,column:26}},'18':{start:{line:53,column:27},end:{line:59,column:5}},'19':{start:{line:54,column:6},end:{line:58,column:8}},'20':{start:{line:61,column:4},end:{line:68,column:5}},'21':{start:{line:62,column:6},end:{line:62,column:25}},'22':{start:{line:64,column:6},end:{line:64,column:31}},'23':{start:{line:65,column:6},end:{line:67,column:7}},'24':{start:{line:66,column:8},end:{line:66,column:27}},'25':{start:{line:71,column:2},end:{line:73,column:3}},'26':{start:{line:72,column:4},end:{line:72,column:27}},'27':{start:{line:76,column:2},end:{line:78,column:3}},'28':{start:{line:77,column:4},end:{line:77,column:17}},'29':{start:{line:81,column:2},end:{line:102,column:3}},'30':{start:{line:82,column:4},end:{line:82,column:25}},'31':{start:{line:84,column:4},end:{line:84,column:29}},'32':{start:{line:85,column:4},end:{line:85,column:46}},'33':{start:{line:88,column:4},end:{line:101,column:5}},'34':{start:{line:89,column:6},end:{line:91,column:7}},'35':{start:{line:90,column:8},end:{line:90,column:21}},'36':{start:{line:94,column:6},end:{line:100,column:7}},'37':{start:{line:99,column:8},end:{line:99,column:21}},'38':{start:{line:105,column:2},end:{line:107,column:3}},'39':{start:{line:106,column:4},end:{line:106,column:17}},'40':{start:{line:110,column:2},end:{line:118,column:3}},'41':{start:{line:111,column:4},end:{line:117,column:5}},'42':{start:{line:112,column:14},end:{line:112,column:35}},'43':{start:{line:113,column:6},end:{line:116,column:7}},'44':{start:{line:114,column:8},end:{line:115,column:72}},'45':{start:{line:121,column:2},end:{line:123,column:3}},'46':{start:{line:122,column:4},end:{line:122,column:17}},'47':{start:{line:126,column:2},end:{line:146,column:3}},'48':{start:{line:127,column:4},end:{line:138,column:5}},'49':{start:{line:128,column:14},end:{line:128,column:33}},'50':{start:{line:129,column:6},end:{line:137,column:7}},'51':{start:{line:130,column:8},end:{line:130,column:35}},'52':{start:{line:131,column:8},end:{line:131,column:50}},'53':{start:{line:132,column:8},end:{line:132,column:79}},'54':{start:{line:134,column:8},end:{line:136,column:9}},'55':{start:{line:135,column:10},end:{line:135,column:96}},'56':{start:{line:141,column:4},end:{line:145,column:5}},'57':{start:{line:142,column:6},end:{line:144,column:7}},'58':{start:{line:143,column:8},end:{line:143,column:21}},'59':{start:{line:149,column:2},end:{line:155,column:3}},'60':{start:{line:150,column:4},end:{line:150,column:26}},'61':{start:{line:151,column:4},end:{line:151,column:29}},'62':{start:{line:152,column:4},end:{line:154,column:5}},'63':{start:{line:153,column:6},end:{line:153,column:19}},'64':{start:{line:158,column:2},end:{line:160,column:3}},'65':{start:{line:159,column:4},end:{line:159,column:17}},'66':{start:{line:162,column:2},end:{line:162,column:14}}},fnMap:{'0':{name:'impressionsChecker',decl:{start:{line:19,column:24},end:{line:19,column:42}},loc:{start:{line:19,column:75},end:{line:163,column:1}},line:19},'1':{name:'(anonymous_1)',decl:{start:{line:53,column:27},end:{line:53,column:28}},loc:{start:{line:53,column:39},end:{line:59,column:5}},line:53}},branchMap:{'0':{loc:{start:{line:33,column:33},end:{line:33,column:67}},type:'binary-expr',locations:[{start:{line:33,column:33},end:{line:33,column:61}},{start:{line:33,column:65},end:{line:33,column:67}}],line:33},'1':{loc:{start:{line:34,column:33},end:{line:34,column:67}},type:'binary-expr',locations:[{start:{line:34,column:33},end:{line:34,column:61}},{start:{line:34,column:65},end:{line:34,column:67}}],line:34},'2':{loc:{start:{line:37,column:2},end:{line:39,column:3}},type:'if',locations:[{start:{line:37,column:2},end:{line:39,column:3}},{start:{line:37,column:2},end:{line:39,column:3}}],line:37},'3':{loc:{start:{line:41,column:2},end:{line:43,column:3}},type:'if',locations:[{start:{line:41,column:2},end:{line:43,column:3}},{start:{line:41,column:2},end:{line:43,column:3}}],line:41},'4':{loc:{start:{line:45,column:2},end:{line:47,column:3}},type:'if',locations:[{start:{line:45,column:2},end:{line:47,column:3}},{start:{line:45,column:2},end:{line:47,column:3}}],line:45},'5':{loc:{start:{line:50,column:2},end:{line:69,column:3}},type:'if',locations:[{start:{line:50,column:2},end:{line:69,column:3}},{start:{line:50,column:2},end:{line:69,column:3}}],line:50},'6':{loc:{start:{line:50,column:6},end:{line:50,column:89}},type:'binary-expr',locations:[{start:{line:50,column:6},end:{line:50,column:44}},{start:{line:50,column:48},end:{line:50,column:89}}],line:50},'7':{loc:{start:{line:61,column:4},end:{line:68,column:5}},type:'if',locations:[{start:{line:61,column:4},end:{line:68,column:5}},{start:{line:61,column:4},end:{line:68,column:5}}],line:61},'8':{loc:{start:{line:65,column:6},end:{line:67,column:7}},type:'if',locations:[{start:{line:65,column:6},end:{line:67,column:7}},{start:{line:65,column:6},end:{line:67,column:7}}],line:65},'9':{loc:{start:{line:65,column:10},end:{line:65,column:119}},type:'binary-expr',locations:[{start:{line:65,column:10},end:{line:65,column:41}},{start:{line:65,column:45},end:{line:65,column:119}}],line:65},'10':{loc:{start:{line:71,column:2},end:{line:73,column:3}},type:'if',locations:[{start:{line:71,column:2},end:{line:73,column:3}},{start:{line:71,column:2},end:{line:73,column:3}}],line:71},'11':{loc:{start:{line:76,column:2},end:{line:78,column:3}},type:'if',locations:[{start:{line:76,column:2},end:{line:78,column:3}},{start:{line:76,column:2},end:{line:78,column:3}}],line:76},'12':{loc:{start:{line:81,column:2},end:{line:102,column:3}},type:'if',locations:[{start:{line:81,column:2},end:{line:102,column:3}},{start:{line:81,column:2},end:{line:102,column:3}}],line:81},'13':{loc:{start:{line:88,column:4},end:{line:101,column:5}},type:'if',locations:[{start:{line:88,column:4},end:{line:101,column:5}},{start:{line:88,column:4},end:{line:101,column:5}}],line:88},'14':{loc:{start:{line:89,column:6},end:{line:91,column:7}},type:'if',locations:[{start:{line:89,column:6},end:{line:91,column:7}},{start:{line:89,column:6},end:{line:91,column:7}}],line:89},'15':{loc:{start:{line:89,column:10},end:{line:89,column:124}},type:'binary-expr',locations:[{start:{line:89,column:10},end:{line:89,column:49}},{start:{line:89,column:54},end:{line:89,column:123}}],line:89},'16':{loc:{start:{line:94,column:6},end:{line:100,column:7}},type:'if',locations:[{start:{line:94,column:6},end:{line:100,column:7}},{start:{line:94,column:6},end:{line:100,column:7}}],line:94},'17':{loc:{start:{line:95,column:8},end:{line:97,column:79}},type:'binary-expr',locations:[{start:{line:95,column:8},end:{line:95,column:49}},{start:{line:96,column:8},end:{line:96,column:67}},{start:{line:97,column:8},end:{line:97,column:79}}],line:95},'18':{loc:{start:{line:105,column:2},end:{line:107,column:3}},type:'if',locations:[{start:{line:105,column:2},end:{line:107,column:3}},{start:{line:105,column:2},end:{line:107,column:3}}],line:105},'19':{loc:{start:{line:105,column:6},end:{line:105,column:124}},type:'binary-expr',locations:[{start:{line:105,column:6},end:{line:105,column:60}},{start:{line:105,column:64},end:{line:105,column:124}}],line:105},'20':{loc:{start:{line:110,column:2},end:{line:118,column:3}},type:'if',locations:[{start:{line:110,column:2},end:{line:118,column:3}},{start:{line:110,column:2},end:{line:118,column:3}}],line:110},'21':{loc:{start:{line:113,column:6},end:{line:116,column:7}},type:'if',locations:[{start:{line:113,column:6},end:{line:116,column:7}},{start:{line:113,column:6},end:{line:116,column:7}}],line:113},'22':{loc:{start:{line:113,column:10},end:{line:113,column:67}},type:'binary-expr',locations:[{start:{line:113,column:10},end:{line:113,column:34}},{start:{line:113,column:38},end:{line:113,column:67}}],line:113},'23':{loc:{start:{line:121,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:121,column:2},end:{line:123,column:3}},{start:{line:121,column:2},end:{line:123,column:3}}],line:121},'24':{loc:{start:{line:126,column:2},end:{line:146,column:3}},type:'if',locations:[{start:{line:126,column:2},end:{line:146,column:3}},{start:{line:126,column:2},end:{line:146,column:3}}],line:126},'25':{loc:{start:{line:126,column:6},end:{line:126,column:87}},type:'binary-expr',locations:[{start:{line:126,column:6},end:{line:126,column:44}},{start:{line:126,column:48},end:{line:126,column:87}}],line:126},'26':{loc:{start:{line:129,column:6},end:{line:137,column:7}},type:'if',locations:[{start:{line:129,column:6},end:{line:137,column:7}},{start:{line:129,column:6},end:{line:137,column:7}}],line:129},'27':{loc:{start:{line:129,column:10},end:{line:129,column:67}},type:'binary-expr',locations:[{start:{line:129,column:10},end:{line:129,column:34}},{start:{line:129,column:38},end:{line:129,column:67}}],line:129},'28':{loc:{start:{line:134,column:8},end:{line:136,column:9}},type:'if',locations:[{start:{line:134,column:8},end:{line:136,column:9}},{start:{line:134,column:8},end:{line:136,column:9}}],line:134},'29':{loc:{start:{line:141,column:4},end:{line:145,column:5}},type:'if',locations:[{start:{line:141,column:4},end:{line:145,column:5}},{start:{line:141,column:4},end:{line:145,column:5}}],line:141},'30':{loc:{start:{line:142,column:6},end:{line:144,column:7}},type:'if',locations:[{start:{line:142,column:6},end:{line:144,column:7}},{start:{line:142,column:6},end:{line:144,column:7}}],line:142},'31':{loc:{start:{line:142,column:10},end:{line:142,column:147}},type:'binary-expr',locations:[{start:{line:142,column:10},end:{line:142,column:49}},{start:{line:142,column:54},end:{line:142,column:146}}],line:142},'32':{loc:{start:{line:149,column:2},end:{line:155,column:3}},type:'if',locations:[{start:{line:149,column:2},end:{line:155,column:3}},{start:{line:149,column:2},end:{line:155,column:3}}],line:149},'33':{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:'if',locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152},'34':{loc:{start:{line:158,column:2},end:{line:160,column:3}},type:'if',locations:[{start:{line:158,column:2},end:{line:160,column:3}},{start:{line:158,column:2},end:{line:160,column:3}}],line:158},'35':{loc:{start:{line:158,column:6},end:{line:158,column:132}},type:'binary-expr',locations:[{start:{line:158,column:6},end:{line:158,column:68}},{start:{line:158,column:72},end:{line:158,column:132}}],line:158}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0],'28':[0,0],'29':[0,0],'30':[0,0],'31':[0,0],'32':[0,0],'33':[0,0],'34':[0,0],'35':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function impressionsChecker(impressionConstraints,widget){cov_hpbzwr9xi.f[0]++;var parts,totalImpressions,since,id=(cov_hpbzwr9xi.s[0]++,PREFIX_IMPRESSION+widget.id),sinceId=(cov_hpbzwr9xi.s[1]++,PREFIX_TOTAL_IMPRESSIONS_SINCE+widget.id),sessionImpressions=(cov_hpbzwr9xi.s[2]++,~~sessionStorage.getItem(id)),sessionImpressionsForAllWidgets=(cov_hpbzwr9xi.s[3]++,0),impressionsForAllWidgets=(cov_hpbzwr9xi.s[4]++,0),lastImpressionTimeForAllWidgets=(cov_hpbzwr9xi.s[5]++,0),total=(cov_hpbzwr9xi.s[6]++,read(id)),now=(cov_hpbzwr9xi.s[7]++,Date.now());cov_hpbzwr9xi.s[8]++;impressionConstraints.widget=(cov_hpbzwr9xi.b[0][0]++,impressionConstraints.widget)||(cov_hpbzwr9xi.b[0][1]++,{});cov_hpbzwr9xi.s[9]++;impressionConstraints.global=(cov_hpbzwr9xi.b[1][0]++,impressionConstraints.global)||(cov_hpbzwr9xi.b[1][1]++,{});cov_hpbzwr9xi.s[10]++;if(typeof impressionConstraints.widget.session==='undefined'){cov_hpbzwr9xi.b[2][0]++;cov_hpbzwr9xi.s[11]++;impressionConstraints.widget.session=impressionConstraints.session;}else{cov_hpbzwr9xi.b[2][1]++;}cov_hpbzwr9xi.s[12]++;if(typeof impressionConstraints.widget.total==='undefined'){cov_hpbzwr9xi.b[3][0]++;cov_hpbzwr9xi.s[13]++;impressionConstraints.widget.total=impressionConstraints.total;}else{cov_hpbzwr9xi.b[3][1]++;}cov_hpbzwr9xi.s[14]++;if(typeof impressionConstraints.widget.buffer==='undefined'){cov_hpbzwr9xi.b[4][0]++;cov_hpbzwr9xi.s[15]++;impressionConstraints.widget.buffer=impressionConstraints.buffer;}else{cov_hpbzwr9xi.b[4][1]++;}cov_hpbzwr9xi.s[16]++;if((cov_hpbzwr9xi.b[6][0]++,impressionConstraints.global.total>0)&&(cov_hpbzwr9xi.b[6][1]++,impressionConstraints.global.duration>0)){cov_hpbzwr9xi.b[5][0]++;cov_hpbzwr9xi.s[17]++;since=read(sinceId);cov_hpbzwr9xi.s[18]++;var resetImpressions=function(){cov_hpbzwr9xi.f[1]++;cov_hpbzwr9xi.s[19]++;write(sinceId,'0|'+now,widget.expiration);};cov_hpbzwr9xi.s[20]++;if(!since){cov_hpbzwr9xi.b[7][0]++;cov_hpbzwr9xi.s[21]++;resetImpressions();}else{cov_hpbzwr9xi.b[7][1]++;cov_hpbzwr9xi.s[22]++;parts=since.split('|');cov_hpbzwr9xi.s[23]++;if((cov_hpbzwr9xi.b[9][0]++,typeof parts[1]!=='undefined')&&(cov_hpbzwr9xi.b[9][1]++,Math.abs(parts[1]-now)/1000>=impressionConstraints.global.duration)){cov_hpbzwr9xi.b[8][0]++;cov_hpbzwr9xi.s[24]++;resetImpressions();}else{cov_hpbzwr9xi.b[8][1]++;}}}else{cov_hpbzwr9xi.b[5][1]++;}cov_hpbzwr9xi.s[25]++;if(!sessionImpressions){cov_hpbzwr9xi.b[10][0]++;cov_hpbzwr9xi.s[26]++;sessionImpressions=0;}else{cov_hpbzwr9xi.b[10][1]++;}cov_hpbzwr9xi.s[27]++;if(sessionImpressions>=impressionConstraints.widget.session){cov_hpbzwr9xi.b[11][0]++;cov_hpbzwr9xi.s[28]++;return false;}else{cov_hpbzwr9xi.b[11][1]++;}cov_hpbzwr9xi.s[29]++;if(!total){cov_hpbzwr9xi.b[12][0]++;cov_hpbzwr9xi.s[30]++;totalImpressions=0;}else{cov_hpbzwr9xi.b[12][1]++;cov_hpbzwr9xi.s[31]++;parts=total.split('|');cov_hpbzwr9xi.s[32]++;totalImpressions=parseInt(parts[0],10);cov_hpbzwr9xi.s[33]++;if(typeof parts[1]!=='undefined'){cov_hpbzwr9xi.b[13][0]++;cov_hpbzwr9xi.s[34]++;if((cov_hpbzwr9xi.b[15][0]++,impressionConstraints.widget.buffer>0)&&(cov_hpbzwr9xi.b[15][1]++,Math.abs(parts[1]-now)/10000)&&(cov_hpbzwr9xi.b[17][1]++,totalImpressions%impressionConstraints.widget.total===0)&&(cov_hpbzwr9xi.b[17][2]++,Math.abs(parts[1]-now)/1000=impressionConstraints.widget.total)&&(cov_hpbzwr9xi.b[19][1]++,typeof impressionConstraints.widget.duration==='undefined')){cov_hpbzwr9xi.b[18][0]++;cov_hpbzwr9xi.s[39]++;return false;}else{cov_hpbzwr9xi.b[18][1]++;}cov_hpbzwr9xi.s[40]++;if(impressionConstraints.global.session>0){cov_hpbzwr9xi.b[20][0]++;cov_hpbzwr9xi.s[41]++;for(var i=0;i<~~sessionStorage.length;i++){var k=(cov_hpbzwr9xi.s[42]++,sessionStorage.key(i));cov_hpbzwr9xi.s[43]++;if((cov_hpbzwr9xi.b[22][0]++,typeof k!=='undefined')&&(cov_hpbzwr9xi.b[22][1]++,k.includes(PREFIX_IMPRESSION))){cov_hpbzwr9xi.b[21][0]++;cov_hpbzwr9xi.s[44]++;sessionImpressionsForAllWidgets=sessionImpressionsForAllWidgets+~~sessionStorage.getItem(k);}else{cov_hpbzwr9xi.b[21][1]++;}}}else{cov_hpbzwr9xi.b[20][1]++;}cov_hpbzwr9xi.s[45]++;if(sessionImpressionsForAllWidgets>=impressionConstraints.global.session){cov_hpbzwr9xi.b[23][0]++;cov_hpbzwr9xi.s[46]++;return false;}else{cov_hpbzwr9xi.b[23][1]++;}cov_hpbzwr9xi.s[47]++;if((cov_hpbzwr9xi.b[25][0]++,impressionConstraints.global.total>0)||(cov_hpbzwr9xi.b[25][1]++,impressionConstraints.global.buffer>0)){cov_hpbzwr9xi.b[24][0]++;cov_hpbzwr9xi.s[48]++;for(var j=0;j<~~localStorage.length;j++){var l=(cov_hpbzwr9xi.s[49]++,localStorage.key(j));cov_hpbzwr9xi.s[50]++;if((cov_hpbzwr9xi.b[27][0]++,typeof l!=='undefined')&&(cov_hpbzwr9xi.b[27][1]++,l.includes(PREFIX_IMPRESSION))){cov_hpbzwr9xi.b[26][0]++;cov_hpbzwr9xi.s[51]++;parts=read(l).split('|');cov_hpbzwr9xi.s[52]++;totalImpressions=parseInt(parts[0],10);cov_hpbzwr9xi.s[53]++;impressionsForAllWidgets=impressionsForAllWidgets+totalImpressions;cov_hpbzwr9xi.s[54]++;if(typeof parts[1]!=='undefined'){cov_hpbzwr9xi.b[28][0]++;cov_hpbzwr9xi.s[55]++;lastImpressionTimeForAllWidgets=Math.max(parts[1],lastImpressionTimeForAllWidgets);}else{cov_hpbzwr9xi.b[28][1]++;}}else{cov_hpbzwr9xi.b[26][1]++;}}cov_hpbzwr9xi.s[56]++;if(lastImpressionTimeForAllWidgets>0){cov_hpbzwr9xi.b[29][0]++;cov_hpbzwr9xi.s[57]++;if((cov_hpbzwr9xi.b[31][0]++,impressionConstraints.global.buffer>0)&&(cov_hpbzwr9xi.b[31][1]++,Math.abs(lastImpressionTimeForAllWidgets-now)/10000){cov_hpbzwr9xi.b[32][0]++;cov_hpbzwr9xi.s[60]++;since=read(sinceId);cov_hpbzwr9xi.s[61]++;parts=since.split('|');cov_hpbzwr9xi.s[62]++;if(parts[0]>=impressionConstraints.global.total){cov_hpbzwr9xi.b[33][0]++;cov_hpbzwr9xi.s[63]++;return false;}else{cov_hpbzwr9xi.b[33][1]++;}}else{cov_hpbzwr9xi.b[32][1]++;}cov_hpbzwr9xi.s[64]++;if((cov_hpbzwr9xi.b[35][0]++,impressionsForAllWidgets>=impressionConstraints.global.total)&&(cov_hpbzwr9xi.b[35][1]++,typeof impressionConstraints.global.duration==='undefined')){cov_hpbzwr9xi.b[34][0]++;cov_hpbzwr9xi.s[65]++;return false;}else{cov_hpbzwr9xi.b[34][1]++;}cov_hpbzwr9xi.s[66]++;return true;} + btn.onclick = function (event) { + trackWidgetAction(type, config); + updateActionCookie(prefix + widget.id, config.expiration); - var cov_23gaggrknr=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js',hash='c888dd09b8720c5888996771d649a96c8d2aaeb5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js',statementMap:{'0':{start:{line:9,column:2},end:{line:20,column:11}},'1':{start:{line:11,column:6},end:{line:15,column:9}},'2':{start:{line:12,column:8},end:{line:14,column:34}},'3':{start:{line:18,column:6},end:{line:18,column:28}},'4':{start:{line:19,column:6},end:{line:19,column:18}}},fnMap:{'0':{name:'censorTrackingKeys',decl:{start:{line:8,column:24},end:{line:8,column:42}},loc:{start:{line:8,column:64},end:{line:21,column:1}},line:8},'1':{name:'(anonymous_1)',decl:{start:{line:10,column:12},end:{line:10,column:13}},loc:{start:{line:10,column:27},end:{line:16,column:5}},line:10},'2':{name:'(anonymous_2)',decl:{start:{line:11,column:32},end:{line:11,column:33}},loc:{start:{line:11,column:55},end:{line:15,column:7}},line:11},'3':{name:'(anonymous_3)',decl:{start:{line:17,column:12},end:{line:17,column:13}},loc:{start:{line:17,column:33},end:{line:20,column:5}},line:17}},branchMap:{'0':{loc:{start:{line:12,column:15},end:{line:14,column:33}},type:'cond-expr',locations:[{start:{line:13,column:12},end:{line:13,column:31}},{start:{line:14,column:12},end:{line:14,column:33}}],line:12}},s:{'0':0,'1':0,'2':0,'3':0,'4':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function censorTrackingKeys(data,keysToReject){cov_23gaggrknr.f[0]++;cov_23gaggrknr.s[0]++;return Object.keys(data).filter(function(key){cov_23gaggrknr.f[1]++;cov_23gaggrknr.s[1]++;return !keysToReject.some(function(keyToReject){cov_23gaggrknr.f[2]++;cov_23gaggrknr.s[2]++;return typeof keyToReject==='string'?(cov_23gaggrknr.b[0][0]++,key===keyToReject):(cov_23gaggrknr.b[0][1]++,keyToReject.test(key));});}).reduce(function(memo,key){cov_23gaggrknr.f[3]++;cov_23gaggrknr.s[3]++;memo[key]=data[key];cov_23gaggrknr.s[4]++;return memo;},{});} + if (typeof action === 'object') { + if (action.close === false) { + shouldClose = false; + } - var cov_oaabz4hvi=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js',hash='02372b2a65cccf40011861d79ce348bac92a1e60',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js',statementMap:{'0':{start:{line:16,column:2},end:{line:24,column:3}},'1':{start:{line:17,column:4},end:{line:21,column:6}},'2':{start:{line:26,column:2},end:{line:44,column:3}},'3':{start:{line:27,column:4},end:{line:27,column:66}},'4':{start:{line:28,column:4},end:{line:28,column:34}},'5':{start:{line:30,column:4},end:{line:43,column:5}},'6':{start:{line:31,column:17},end:{line:31,column:40}},'7':{start:{line:33,column:6},end:{line:42,column:8}}},fnMap:{'0':{name:'reportData',decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:50},end:{line:45,column:1}},line:13}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:24,column:3}},{start:{line:16,column:2},end:{line:24,column:3}}],line:16},'1':{loc:{start:{line:18,column:6},end:{line:20,column:14}},type:'cond-expr',locations:[{start:{line:19,column:10},end:{line:19,column:61}},{start:{line:20,column:10},end:{line:20,column:14}}],line:18},'2':{loc:{start:{line:26,column:2},end:{line:44,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:44,column:3}},{start:{line:26,column:2},end:{line:44,column:3}}],line:26},'3':{loc:{start:{line:26,column:6},end:{line:26,column:116}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:39}},{start:{line:26,column:43},end:{line:26,column:74}},{start:{line:26,column:78},end:{line:26,column:116}}],line:26},'4':{loc:{start:{line:27,column:14},end:{line:27,column:65}},type:'binary-expr',locations:[{start:{line:27,column:14},end:{line:27,column:38}},{start:{line:27,column:42},end:{line:27,column:65}}],line:27}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function reportData(data,widget){cov_oaabz4hvi.f[0]++;var gaLabel,trackers;cov_oaabz4hvi.s[0]++;if(typeof jstag==='object'){cov_oaabz4hvi.b[0][0]++;cov_oaabz4hvi.s[1]++;window.jstag.send(widget.censorTrackingKeys?(cov_oaabz4hvi.b[1][0]++,censorTrackingKeys(data,widget.censorTrackingKeys)):(cov_oaabz4hvi.b[1][1]++,data));}else{cov_oaabz4hvi.b[0][1]++;}cov_oaabz4hvi.s[2]++;if((cov_oaabz4hvi.b[3][0]++,window.pathfora.enableGA===true)&&(cov_oaabz4hvi.b[3][1]++,typeof window.ga==='function')&&(cov_oaabz4hvi.b[3][2]++,typeof window.ga.getAll==='function')){cov_oaabz4hvi.b[2][0]++;cov_oaabz4hvi.s[3]++;gaLabel=(cov_oaabz4hvi.b[4][0]++,data['pf-widget-action'])||(cov_oaabz4hvi.b[4][1]++,data['pf-widget-event']);cov_oaabz4hvi.s[4]++;trackers=window.ga.getAll();cov_oaabz4hvi.s[5]++;for(var i=0;i0)){cov_1ad9is487e.b[0][0]++;cov_1ad9is487e.s[2]++;params['pf-widget-content']=widget.content[0];}else{cov_1ad9is487e.b[0][1]++;}cov_1ad9is487e.s[3]++;switch(action){case'show':cov_1ad9is487e.b[2][0]++;cov_1ad9is487e.s[4]++;pathforaDataObject.displayedWidgets.push(params);cov_1ad9is487e.s[5]++;break;case'close':cov_1ad9is487e.b[2][1]++;cov_1ad9is487e.s[6]++;params['pf-widget-action']=(cov_1ad9is487e.b[3][0]++,!!widget.closeAction)&&(cov_1ad9is487e.b[3][1]++,widget.closeAction.name)||(cov_1ad9is487e.b[3][2]++,'close');cov_1ad9is487e.s[7]++;pathforaDataObject.closedWidgets.push(params);cov_1ad9is487e.s[8]++;break;case'confirm':cov_1ad9is487e.b[2][2]++;cov_1ad9is487e.s[9]++;if((cov_1ad9is487e.b[5][0]++,htmlElement)&&(cov_1ad9is487e.b[5][1]++,hasClass(htmlElement,'pf-content-unit'))){cov_1ad9is487e.b[4][0]++;cov_1ad9is487e.s[10]++;params['pf-widget-action']='content recommendation';}else{cov_1ad9is487e.b[4][1]++;cov_1ad9is487e.s[11]++;params['pf-widget-action']=(cov_1ad9is487e.b[6][0]++,!!widget.confirmAction)&&(cov_1ad9is487e.b[6][1]++,widget.confirmAction.name)||(cov_1ad9is487e.b[6][2]++,'default confirm');cov_1ad9is487e.s[12]++;pathforaDataObject.completedActions.push(params);}cov_1ad9is487e.s[13]++;break;case'cancel':cov_1ad9is487e.b[2][3]++;cov_1ad9is487e.s[14]++;params['pf-widget-action']=(cov_1ad9is487e.b[7][0]++,!!widget.cancelAction)&&(cov_1ad9is487e.b[7][1]++,widget.cancelAction.name)||(cov_1ad9is487e.b[7][2]++,'default cancel');cov_1ad9is487e.s[15]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[16]++;break;case'success.confirm':cov_1ad9is487e.b[2][4]++;cov_1ad9is487e.s[17]++;params['pf-widget-action']=(cov_1ad9is487e.b[8][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[8][1]++,!!widget.formStates.success)&&(cov_1ad9is487e.b[8][2]++,!!widget.formStates.success.confirmAction)&&(cov_1ad9is487e.b[8][3]++,widget.formStates.success.confirmAction.name)||(cov_1ad9is487e.b[8][4]++,'success confirm');cov_1ad9is487e.s[18]++;pathforaDataObject.completedActions.push(params);cov_1ad9is487e.s[19]++;break;case'success.cancel':cov_1ad9is487e.b[2][5]++;cov_1ad9is487e.s[20]++;params['pf-widget-action']=(cov_1ad9is487e.b[9][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[9][1]++,!!widget.formStates.success)&&(cov_1ad9is487e.b[9][2]++,!!widget.formStates.success.cancelAction)&&(cov_1ad9is487e.b[9][3]++,widget.formStates.success.cancelAction.name)||(cov_1ad9is487e.b[9][4]++,'success cancel');cov_1ad9is487e.s[21]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[22]++;break;case'error.confirm':cov_1ad9is487e.b[2][6]++;cov_1ad9is487e.s[23]++;params['pf-widget-action']=(cov_1ad9is487e.b[10][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[10][1]++,!!widget.formStates.error)&&(cov_1ad9is487e.b[10][2]++,!!widget.formStates.error.confirmAction)&&(cov_1ad9is487e.b[10][3]++,widget.formStates.error.confirmAction.name)||(cov_1ad9is487e.b[10][4]++,'error confirm');cov_1ad9is487e.s[24]++;pathforaDataObject.completedActions.push(params);cov_1ad9is487e.s[25]++;break;case'error.cancel':cov_1ad9is487e.b[2][7]++;cov_1ad9is487e.s[26]++;params['pf-widget-action']=(cov_1ad9is487e.b[11][0]++,!!widget.formStates)&&(cov_1ad9is487e.b[11][1]++,!!widget.formStates.error)&&(cov_1ad9is487e.b[11][2]++,!!widget.formStates.error.cancelAction)&&(cov_1ad9is487e.b[11][3]++,widget.formStates.error.cancelAction.name)||(cov_1ad9is487e.b[11][4]++,'error cancel');cov_1ad9is487e.s[27]++;pathforaDataObject.cancelledActions.push(params);cov_1ad9is487e.s[28]++;break;case'submit':cov_1ad9is487e.b[2][8]++;case'unlock':cov_1ad9is487e.b[2][9]++;cov_1ad9is487e.s[29]++;if(hasClass(htmlElement,'pf-custom-form')){cov_1ad9is487e.b[12][0]++;cov_1ad9is487e.s[30]++;params['pf-custom-form']={};}else{cov_1ad9is487e.b[12][1]++;}cov_1ad9is487e.s[31]++;for(elem in htmlElement.children){cov_1ad9is487e.s[32]++;if(htmlElement.children.hasOwnProperty(elem)){cov_1ad9is487e.b[13][0]++;cov_1ad9is487e.s[33]++;child=htmlElement.children[elem];cov_1ad9is487e.s[34]++;if((cov_1ad9is487e.b[15][0]++,hasClass(child,'pf-widget-radio-group'))||(cov_1ad9is487e.b[15][1]++,hasClass(child,'pf-widget-checkbox-group'))){cov_1ad9is487e.b[14][0]++;var values=(cov_1ad9is487e.s[35]++,[]),name=(cov_1ad9is487e.s[36]++,''),inputs=(cov_1ad9is487e.s[37]++,child.querySelectorAll('input'));cov_1ad9is487e.s[38]++;for(i=0;imaxDate)){cov_nsb0biqij.b[2][0]++;cov_nsb0biqij.s[4]++;return false;}else{cov_nsb0biqij.b[2][1]++;}cov_nsb0biqij.s[5]++;if((cov_nsb0biqij.b[5][0]++,min)&&(cov_nsb0biqij.b[5][1]++,selectedDate 0) { + trackWidgetAction('form_start', config, event.target); + } + }; - var cov_26bsqd9cc2=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/close-widget.js',hash='bc670951829b5a40b101791c4cc8b172361e8c80',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/close-widget.js',statementMap:{'0':{start:{line:25,column:13},end:{line:25,column:40}},'1':{start:{line:28,column:2},end:{line:44,column:3}},'2':{start:{line:29,column:4},end:{line:43,column:5}},'3':{start:{line:30,column:6},end:{line:32,column:7}},'4':{start:{line:31,column:8},end:{line:31,column:67}},'5':{start:{line:34,column:6},end:{line:39,column:7}},'6':{start:{line:35,column:8},end:{line:38,column:9}},'7':{start:{line:36,column:20},end:{line:36,column:65}},'8':{start:{line:37,column:10},end:{line:37,column:59}},'9':{start:{line:41,column:6},end:{line:41,column:47}},'10':{start:{line:42,column:6},end:{line:42,column:12}},'11':{start:{line:46,column:2},end:{line:46,column:30}},'12':{start:{line:48,column:2},end:{line:53,column:3}},'13':{start:{line:49,column:19},end:{line:49,column:58}},'14':{start:{line:50,column:4},end:{line:52,column:5}},'15':{start:{line:51,column:6},end:{line:51,column:38}},'16':{start:{line:56,column:2},end:{line:66,column:10}},'17':{start:{line:57,column:4},end:{line:65,column:5}},'18':{start:{line:58,column:6},end:{line:58,column:40}},'19':{start:{line:60,column:6},end:{line:64,column:7}},'20':{start:{line:61,column:8},end:{line:63,column:9}},'21':{start:{line:62,column:10},end:{line:62,column:56}}},fnMap:{'0':{name:'closeWidget',decl:{start:{line:23,column:24},end:{line:23,column:35}},loc:{start:{line:23,column:50},end:{line:67,column:1}},line:23},'1':{name:'(anonymous_1)',decl:{start:{line:56,column:13},end:{line:56,column:14}},loc:{start:{line:56,column:25},end:{line:66,column:3}},line:56}},branchMap:{'0':{loc:{start:{line:29,column:4},end:{line:43,column:5}},type:'if',locations:[{start:{line:29,column:4},end:{line:43,column:5}},{start:{line:29,column:4},end:{line:43,column:5}}],line:29},'1':{loc:{start:{line:30,column:6},end:{line:32,column:7}},type:'if',locations:[{start:{line:30,column:6},end:{line:32,column:7}},{start:{line:30,column:6},end:{line:32,column:7}}],line:30},'2':{loc:{start:{line:35,column:8},end:{line:38,column:9}},type:'if',locations:[{start:{line:35,column:8},end:{line:38,column:9}},{start:{line:35,column:8},end:{line:38,column:9}}],line:35},'3':{loc:{start:{line:48,column:2},end:{line:53,column:3}},type:'if',locations:[{start:{line:48,column:2},end:{line:53,column:3}},{start:{line:48,column:2},end:{line:53,column:3}}],line:48},'4':{loc:{start:{line:50,column:4},end:{line:52,column:5}},type:'if',locations:[{start:{line:50,column:4},end:{line:52,column:5}},{start:{line:50,column:4},end:{line:52,column:5}}],line:50},'5':{loc:{start:{line:57,column:4},end:{line:65,column:5}},type:'if',locations:[{start:{line:57,column:4},end:{line:65,column:5}},{start:{line:57,column:4},end:{line:65,column:5}}],line:57},'6':{loc:{start:{line:57,column:8},end:{line:57,column:31}},type:'binary-expr',locations:[{start:{line:57,column:8},end:{line:57,column:12}},{start:{line:57,column:16},end:{line:57,column:31}}],line:57},'7':{loc:{start:{line:61,column:8},end:{line:63,column:9}},type:'if',locations:[{start:{line:61,column:8},end:{line:63,column:9}},{start:{line:61,column:8},end:{line:63,column:9}}],line:61}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function closeWidget(id,noTrack){cov_26bsqd9cc2.f[0]++;var i,node=(cov_26bsqd9cc2.s[0]++,document$1.getElementById(id));cov_26bsqd9cc2.s[1]++;for(i=0;i0){cov_28ansbi3y7.b[6][0]++;cov_28ansbi3y7.s[8]++;setTimeout(function(){cov_28ansbi3y7.f[1]++;cov_28ansbi3y7.s[9]++;closeWidget(widget.id,true);},delay);}else{cov_28ansbi3y7.b[6][1]++;}}else{cov_28ansbi3y7.b[0][1]++;}} + // Additional tracking for input focus and entering text into the form + for (var elem in widgetForm.childNodes) { + if (widgetForm.children.hasOwnProperty(elem)) { + var child = widgetForm.children[elem]; + if ( + typeof child.getAttribute !== 'undefined' && + child.getAttribute('name') !== null + ) { + // Track focus of form elements + child.onfocus = onInputFocus; - var cov_2dswyr1xw6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/widget-on-modal-close.js',hash='ec28fd50e0659bc3d67efdb5295ab3fa5526c5fa',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/widget-on-modal-close.js',statementMap:{'0':{start:{line:16,column:2},end:{line:22,column:3}},'1':{start:{line:17,column:4},end:{line:21,column:7}}},fnMap:{'0':{name:'widgetOnModalClose',decl:{start:{line:15,column:24},end:{line:15,column:42}},loc:{start:{line:15,column:67},end:{line:23,column:1}},line:15}},branchMap:{'0':{loc:{start:{line:16,column:2},end:{line:22,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:22,column:3}},{start:{line:16,column:2},end:{line:22,column:3}}],line:16}},s:{'0':0,'1':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function widgetOnModalClose(widget,config,event){cov_2dswyr1xw6.f[0]++;cov_2dswyr1xw6.s[0]++;if(typeof config.onModalClose==='function'){cov_2dswyr1xw6.b[0][0]++;cov_2dswyr1xw6.s[1]++;config.onModalClose(callbackTypes.MODAL_CLOSE,{widget:widget,config:config,event:event});}else{cov_2dswyr1xw6.b[0][1]++;}} + // Track input to indicate they've begun to interact with the form + child.onchange = onInputChange; + } + } + } - var cov_232q98bfi6=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/update-action-cookie.js',hash='b952678f9e2a69aa57d45807bb31c530ba4d7ed5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/update-action-cookie.js',statementMap:{'0':{start:{line:17,column:12},end:{line:17,column:22}},'1':{start:{line:18,column:17},end:{line:18,column:27}},'2':{start:{line:20,column:2},end:{line:25,column:3}},'3':{start:{line:21,column:4},end:{line:21,column:25}},'4':{start:{line:22,column:4},end:{line:22,column:50}},'5':{start:{line:24,column:4},end:{line:24,column:11}},'6':{start:{line:27,column:2},end:{line:27,column:47}}},fnMap:{'0':{name:'updateActionCookie',decl:{start:{line:15,column:24},end:{line:15,column:42}},loc:{start:{line:15,column:62},end:{line:28,column:1}},line:15}},branchMap:{'0':{loc:{start:{line:20,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:20,column:2},end:{line:25,column:3}},{start:{line:20,column:2},end:{line:25,column:3}}],line:20}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function updateActionCookie(name,expiration){cov_232q98bfi6.f[0]++;var ct,val=(cov_232q98bfi6.s[0]++,read(name)),duration=(cov_232q98bfi6.s[1]++,Date.now());cov_232q98bfi6.s[2]++;if(val){cov_232q98bfi6.b[0][0]++;cov_232q98bfi6.s[3]++;val=val.split('|');cov_232q98bfi6.s[4]++;ct=Math.min(parseInt(val[0],10),9998)+1;}else{cov_232q98bfi6.b[0][1]++;cov_232q98bfi6.s[5]++;ct=1;}cov_232q98bfi6.s[6]++;write(name,ct+'|'+duration,expiration);} + // Form submit handler + widgetFormValidate = function (event) { + event.preventDefault(); - var cov_1cutx0ndz8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/button-action.js',hash='b7106ca3be1f9cdbe8b999f020e97e96cc555f37',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/button-action.js',statementMap:{'0':{start:{line:27,column:2},end:{line:66,column:3}},'1':{start:{line:29,column:4},end:{line:29,column:26}},'2':{start:{line:30,column:4},end:{line:30,column:45}},'3':{start:{line:31,column:4},end:{line:31,column:32}},'4':{start:{line:32,column:4},end:{line:32,column:23}},'5':{start:{line:33,column:4},end:{line:33,column:10}},'6':{start:{line:37,column:4},end:{line:37,column:27}},'7':{start:{line:38,column:4},end:{line:38,column:31}},'8':{start:{line:39,column:4},end:{line:39,column:33}},'9':{start:{line:40,column:4},end:{line:40,column:45}},'10':{start:{line:42,column:4},end:{line:44,column:5}},'11':{start:{line:43,column:6},end:{line:43,column:54}},'12':{start:{line:46,column:4},end:{line:48,column:5}},'13':{start:{line:47,column:6},end:{line:47,column:52}},'14':{start:{line:50,column:4},end:{line:50,column:10}},'15':{start:{line:54,column:4},end:{line:54,column:28}},'16':{start:{line:55,column:4},end:{line:55,column:32}},'17':{start:{line:56,column:4},end:{line:56,column:45}},'18':{start:{line:58,column:4},end:{line:60,column:5}},'19':{start:{line:59,column:6},end:{line:59,column:55}},'20':{start:{line:61,column:4},end:{line:63,column:5}},'21':{start:{line:62,column:6},end:{line:62,column:53}},'22':{start:{line:65,column:4},end:{line:65,column:10}},'23':{start:{line:68,column:2},end:{line:70,column:4}},'24':{start:{line:69,column:4},end:{line:69,column:53}},'25':{start:{line:72,column:2},end:{line:94,column:4}},'26':{start:{line:73,column:4},end:{line:73,column:36}},'27':{start:{line:74,column:4},end:{line:74,column:62}},'28':{start:{line:76,column:4},end:{line:88,column:5}},'29':{start:{line:77,column:6},end:{line:79,column:7}},'30':{start:{line:78,column:8},end:{line:78,column:28}},'31':{start:{line:81,column:6},end:{line:87,column:7}},'32':{start:{line:82,column:8},end:{line:86,column:11}},'33':{start:{line:90,column:4},end:{line:93,column:5}},'34':{start:{line:91,column:6},end:{line:91,column:35}},'35':{start:{line:92,column:6},end:{line:92,column:48}}},fnMap:{'0':{name:'buttonAction',decl:{start:{line:24,column:24},end:{line:24,column:36}},loc:{start:{line:24,column:65},end:{line:95,column:1}},line:24},'1':{name:'(anonymous_1)',decl:{start:{line:68,column:21},end:{line:68,column:22}},loc:{start:{line:68,column:38},end:{line:70,column:3}},line:68},'2':{name:'(anonymous_2)',decl:{start:{line:72,column:16},end:{line:72,column:17}},loc:{start:{line:72,column:33},end:{line:94,column:3}},line:72}},branchMap:{'0':{loc:{start:{line:27,column:2},end:{line:66,column:3}},type:'switch',locations:[{start:{line:28,column:2},end:{line:33,column:10}},{start:{line:34,column:2},end:{line:34,column:16}},{start:{line:35,column:2},end:{line:35,column:24}},{start:{line:36,column:2},end:{line:50,column:10}},{start:{line:51,column:2},end:{line:51,column:17}},{start:{line:52,column:2},end:{line:52,column:25}},{start:{line:53,column:2},end:{line:65,column:10}}],line:27},'1':{loc:{start:{line:42,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:42,column:4},end:{line:44,column:5}},{start:{line:42,column:4},end:{line:44,column:5}}],line:42},'2':{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:'if',locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46},'3':{loc:{start:{line:58,column:4},end:{line:60,column:5}},type:'if',locations:[{start:{line:58,column:4},end:{line:60,column:5}},{start:{line:58,column:4},end:{line:60,column:5}}],line:58},'4':{loc:{start:{line:61,column:4},end:{line:63,column:5}},type:'if',locations:[{start:{line:61,column:4},end:{line:63,column:5}},{start:{line:61,column:4},end:{line:63,column:5}}],line:61},'5':{loc:{start:{line:76,column:4},end:{line:88,column:5}},type:'if',locations:[{start:{line:76,column:4},end:{line:88,column:5}},{start:{line:76,column:4},end:{line:88,column:5}}],line:76},'6':{loc:{start:{line:77,column:6},end:{line:79,column:7}},type:'if',locations:[{start:{line:77,column:6},end:{line:79,column:7}},{start:{line:77,column:6},end:{line:79,column:7}}],line:77},'7':{loc:{start:{line:81,column:6},end:{line:87,column:7}},type:'if',locations:[{start:{line:81,column:6},end:{line:87,column:7}},{start:{line:81,column:6},end:{line:87,column:7}}],line:81},'8':{loc:{start:{line:90,column:4},end:{line:93,column:5}},type:'if',locations:[{start:{line:90,column:4},end:{line:93,column:5}},{start:{line:90,column:4},end:{line:93,column:5}}],line:90}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0,0,0,0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function buttonAction(btn,type,config,widget){cov_1cutx0ndz8.f[0]++;var prefix,callbackType,action,shouldClose;cov_1cutx0ndz8.s[0]++;switch(type){case'close':cov_1cutx0ndz8.b[0][0]++;cov_1cutx0ndz8.s[1]++;prefix=PREFIX_CLOSE;cov_1cutx0ndz8.s[2]++;callbackType=callbackTypes.MODAL_CLOSE;cov_1cutx0ndz8.s[3]++;action=config.closeAction;cov_1cutx0ndz8.s[4]++;shouldClose=true;cov_1cutx0ndz8.s[5]++;break;case'cancel':cov_1cutx0ndz8.b[0][1]++;case'success.cancel':cov_1cutx0ndz8.b[0][2]++;case'error.cancel':cov_1cutx0ndz8.b[0][3]++;cov_1cutx0ndz8.s[6]++;prefix=PREFIX_CANCEL;cov_1cutx0ndz8.s[7]++;cov_1cutx0ndz8.s[8]++;action=config.cancelAction;cov_1cutx0ndz8.s[9]++;shouldClose=config.layout!=='inline';cov_1cutx0ndz8.s[10]++;if(type==='success.cancel'){cov_1cutx0ndz8.b[1][0]++;cov_1cutx0ndz8.s[11]++;action=config.formStates.success.cancelAction;}else{cov_1cutx0ndz8.b[1][1]++;}cov_1cutx0ndz8.s[12]++;if(type==='error.cancel'){cov_1cutx0ndz8.b[2][0]++;cov_1cutx0ndz8.s[13]++;action=config.formStates.error.cancelAction;}else{cov_1cutx0ndz8.b[2][1]++;}cov_1cutx0ndz8.s[14]++;break;case'confirm':cov_1cutx0ndz8.b[0][4]++;case'success.confirm':cov_1cutx0ndz8.b[0][5]++;case'error.confirm':cov_1cutx0ndz8.b[0][6]++;cov_1cutx0ndz8.s[15]++;prefix=PREFIX_CONFIRM;cov_1cutx0ndz8.s[16]++;cov_1cutx0ndz8.s[17]++;shouldClose=config.layout!=='inline';cov_1cutx0ndz8.s[18]++;if(type==='success.confirm'){cov_1cutx0ndz8.b[3][0]++;cov_1cutx0ndz8.s[19]++;action=config.formStates.success.confirmAction;}else{cov_1cutx0ndz8.b[3][1]++;}cov_1cutx0ndz8.s[20]++;if(type==='error.confirm'){cov_1cutx0ndz8.b[4][0]++;cov_1cutx0ndz8.s[21]++;action=config.formStates.error.confirmAction;}else{cov_1cutx0ndz8.b[4][1]++;}cov_1cutx0ndz8.s[22]++;break;}cov_1cutx0ndz8.s[23]++;btn.onmouseenter=function(event){cov_1cutx0ndz8.f[1]++;cov_1cutx0ndz8.s[24]++;trackWidgetAction('hover',config,event.target);};cov_1cutx0ndz8.s[25]++;btn.onclick=function(event){cov_1cutx0ndz8.f[2]++;cov_1cutx0ndz8.s[26]++;trackWidgetAction(type,config);cov_1cutx0ndz8.s[27]++;updateActionCookie(prefix+widget.id,config.expiration);cov_1cutx0ndz8.s[28]++;if(typeof action==='object'){cov_1cutx0ndz8.b[5][0]++;cov_1cutx0ndz8.s[29]++;if(action.close===false){cov_1cutx0ndz8.b[6][0]++;cov_1cutx0ndz8.s[30]++;shouldClose=false;}else{cov_1cutx0ndz8.b[6][1]++;}cov_1cutx0ndz8.s[31]++;if(typeof action.callback==='function'){cov_1cutx0ndz8.b[7][0]++;cov_1cutx0ndz8.s[32]++;action.callback(callbackType,{widget:widget,config:config,event:event});}else{cov_1cutx0ndz8.b[7][1]++;}}else{cov_1cutx0ndz8.b[5][1]++;}cov_1cutx0ndz8.s[33]++;if(shouldClose){cov_1cutx0ndz8.b[8][0]++;cov_1cutx0ndz8.s[34]++;closeWidget(widget.id,true);cov_1cutx0ndz8.s[35]++;widgetOnModalClose(widget,config,event);}else{cov_1cutx0ndz8.b[8][1]++;}};} + // Validate that the form is filled out correctly + var valid = true, + requiredElements = Array.prototype.slice.call( + widgetForm.querySelectorAll('[data-required=true]') + ), + validatableElements = Array.prototype.slice.call( + widgetForm.querySelectorAll('[data-validate=true]') + ), + i, + field, + parent; - var cov_2kychcr3iu=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/construct-widget-actions.js',hash='18a7daa68837af22d900ccb224a491017e75f2dd',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/actions/construct-widget-actions.js',statementMap:{'0':{start:{line:44,column:15},end:{line:44,column:52}},'1':{start:{line:45,column:19},end:{line:45,column:60}},'2':{start:{line:46,column:18},end:{line:46,column:58}},'3':{start:{line:47,column:17},end:{line:47,column:57}},'4':{start:{line:50,column:2},end:{line:195,column:3}},'5':{start:{line:54,column:6},end:{line:54,column:48}},'6':{start:{line:56,column:26},end:{line:60,column:7}},'7':{start:{line:57,column:8},end:{line:59,column:9}},'8':{start:{line:58,column:10},end:{line:58,column:64}},'9':{start:{line:62,column:25},end:{line:64,column:7}},'10':{start:{line:63,column:8},end:{line:63,column:57}},'11':{start:{line:67,column:6},end:{line:81,column:7}},'12':{start:{line:68,column:8},end:{line:80,column:9}},'13':{start:{line:69,column:22},end:{line:69,column:47}},'14':{start:{line:70,column:10},end:{line:79,column:11}},'15':{start:{line:75,column:12},end:{line:75,column:41}},'16':{start:{line:78,column:12},end:{line:78,column:43}},'17':{start:{line:84,column:6},end:{line:192,column:8}},'18':{start:{line:85,column:8},end:{line:85,column:31}},'19':{start:{line:88,column:20},end:{line:88,column:24}},'20':{start:{line:89,column:29},end:{line:91,column:11}},'21':{start:{line:92,column:32},end:{line:94,column:11}},'22':{start:{line:99,column:8},end:{line:145,column:9}},'23':{start:{line:100,column:10},end:{line:100,column:38}},'24':{start:{line:102,column:10},end:{line:144,column:11}},'25':{start:{line:103,column:12},end:{line:132,column:13}},'26':{start:{line:104,column:14},end:{line:104,column:40}},'27':{start:{line:105,column:14},end:{line:105,column:45}},'28':{start:{line:107,column:14},end:{line:131,column:15}},'29':{start:{line:111,column:29},end:{line:111,column:60}},'30':{start:{line:112,column:28},end:{line:112,column:29}},'31':{start:{line:114,column:16},end:{line:119,column:17}},'32':{start:{line:115,column:30},end:{line:115,column:39}},'33':{start:{line:116,column:18},end:{line:118,column:19}},'34':{start:{line:117,column:20},end:{line:117,column:28}},'35':{start:{line:121,column:16},end:{line:124,column:17}},'36':{start:{line:122,column:18},end:{line:122,column:32}},'37':{start:{line:123,column:18},end:{line:123,column:46}},'38':{start:{line:125,column:21},end:{line:131,column:15}},'39':{start:{line:126,column:16},end:{line:126,column:30}},'40':{start:{line:127,column:16},end:{line:127,column:44}},'41':{start:{line:128,column:16},end:{line:130,column:17}},'42':{start:{line:129,column:18},end:{line:129,column:32}},'43':{start:{line:134,column:17},end:{line:144,column:11}},'44':{start:{line:135,column:12},end:{line:135,column:42}},'45':{start:{line:137,column:12},end:{line:143,column:13}},'46':{start:{line:138,column:14},end:{line:138,column:28}},'47':{start:{line:139,column:14},end:{line:139,column:41}},'48':{start:{line:140,column:14},end:{line:142,column:15}},'49':{start:{line:141,column:16},end:{line:141,column:30}},'50':{start:{line:147,column:8},end:{line:189,column:9}},'51':{start:{line:148,column:10},end:{line:148,column:41}},'52':{start:{line:150,column:10},end:{line:188,column:11}},'53':{start:{line:151,column:12},end:{line:172,column:13}},'54':{start:{line:152,column:14},end:{line:152,column:40}},'55':{start:{line:153,column:14},end:{line:153,column:55}},'56':{start:{line:155,column:14},end:{line:171,column:15}},'57':{start:{line:166,column:16},end:{line:166,column:30}},'58':{start:{line:167,column:16},end:{line:167,column:54}},'59':{start:{line:168,column:16},end:{line:170,column:17}},'60':{start:{line:169,column:18},end:{line:169,column:32}},'61':{start:{line:174,column:17},end:{line:188,column:11}},'62':{start:{line:175,column:12},end:{line:175,column:42}},'63':{start:{line:177,column:12},end:{line:187,column:13}},'64':{start:{line:182,column:14},end:{line:182,column:28}},'65':{start:{line:183,column:14},end:{line:183,column:41}},'66':{start:{line:184,column:14},end:{line:186,column:15}},'67':{start:{line:185,column:16},end:{line:185,column:30}},'68':{start:{line:191,column:8},end:{line:191,column:21}},'69':{start:{line:194,column:6},end:{line:194,column:12}},'70':{start:{line:197,column:2},end:{line:228,column:3}},'71':{start:{line:199,column:6},end:{line:207,column:7}},'72':{start:{line:200,column:8},end:{line:206,column:10}},'73':{start:{line:201,column:10},end:{line:205,column:13}},'74':{start:{line:208,column:6},end:{line:208,column:12}},'75':{start:{line:210,column:6},end:{line:224,column:7}},'76':{start:{line:211,column:8},end:{line:223,column:10}},'77':{start:{line:215,column:12},end:{line:215,column:42}},'78':{start:{line:216,column:12},end:{line:221,column:13}},'79':{start:{line:217,column:14},end:{line:217,column:49}},'80':{start:{line:218,column:14},end:{line:218,column:78}},'81':{start:{line:219,column:14},end:{line:219,column:43}},'82':{start:{line:220,column:14},end:{line:220,column:56}},'83':{start:{line:225,column:6},end:{line:225,column:12}},'84':{start:{line:227,column:6},end:{line:227,column:12}},'85':{start:{line:230,column:2},end:{line:232,column:3}},'86':{start:{line:231,column:4},end:{line:231,column:55}},'87':{start:{line:234,column:2},end:{line:236,column:3}},'88':{start:{line:235,column:4},end:{line:235,column:57}},'89':{start:{line:238,column:2},end:{line:356,column:3}},'90':{start:{line:239,column:4},end:{line:241,column:6}},'91':{start:{line:240,column:6},end:{line:240,column:55}},'92':{start:{line:243,column:4},end:{line:355,column:6}},'93':{start:{line:246,column:22},end:{line:246,column:26}},'94':{start:{line:249,column:6},end:{line:298,column:7}},'95':{start:{line:250,column:8},end:{line:260,column:9}},'96':{start:{line:252,column:12},end:{line:252,column:36}},'97':{start:{line:253,column:12},end:{line:253,column:18}},'98':{start:{line:255,column:12},end:{line:255,column:39}},'99':{start:{line:256,column:12},end:{line:256,column:18}},'100':{start:{line:258,column:12},end:{line:258,column:36}},'101':{start:{line:259,column:12},end:{line:259,column:18}},'102':{start:{line:263,column:8},end:{line:297,column:9}},'103':{start:{line:264,column:10},end:{line:264,column:17}},'104':{start:{line:265,column:15},end:{line:297,column:9}},'105':{start:{line:266,column:10},end:{line:266,column:62}},'106':{start:{line:269,column:10},end:{line:285,column:15}},'107':{start:{line:272,column:14},end:{line:277,column:15}},'108':{start:{line:276,column:16},end:{line:276,column:39}},'109':{start:{line:278,column:14},end:{line:278,column:26}},'110':{start:{line:281,column:14},end:{line:284,column:16}},'111':{start:{line:289,column:10},end:{line:296,column:11}},'112':{start:{line:290,column:12},end:{line:295,column:15}},'113':{start:{line:301,column:6},end:{line:301,column:43}},'114':{start:{line:302,column:6},end:{line:302,column:72}},'115':{start:{line:305,column:6},end:{line:307,column:7}},'116':{start:{line:306,column:8},end:{line:306,column:35}},'117':{start:{line:310,column:6},end:{line:341,column:7}},'118':{start:{line:311,column:8},end:{line:313,column:9}},'119':{start:{line:312,column:10},end:{line:312,column:30}},'120':{start:{line:315,column:8},end:{line:340,column:9}},'121':{start:{line:316,column:22},end:{line:320,column:11}},'122':{start:{line:323,column:10},end:{line:325,column:11}},'123':{start:{line:324,column:12},end:{line:324,column:30}},'124':{start:{line:328,column:10},end:{line:339,column:11}},'125':{start:{line:329,column:12},end:{line:335,column:14}},'126':{start:{line:333,column:16},end:{line:333,column:61}},'127':{start:{line:336,column:12},end:{line:336,column:19}},'128':{start:{line:338,column:12},end:{line:338,column:78}},'129':{start:{line:343,column:6},end:{line:354,column:7}},'130':{start:{line:344,column:8},end:{line:353,column:9}},'131':{start:{line:348,column:10},end:{line:348,column:39}},'132':{start:{line:349,column:10},end:{line:349,column:52}},'133':{start:{line:352,column:10},end:{line:352,column:49}},'134':{start:{line:358,column:2},end:{line:367,column:3}},'135':{start:{line:359,column:4},end:{line:361,column:6}},'136':{start:{line:360,column:6},end:{line:360,column:55}},'137':{start:{line:363,column:4},end:{line:366,column:6}},'138':{start:{line:364,column:6},end:{line:364,column:57}},'139':{start:{line:365,column:6},end:{line:365,column:72}}},fnMap:{'0':{name:'constructWidgetActions',decl:{start:{line:40,column:24},end:{line:40,column:46}},loc:{start:{line:40,column:63},end:{line:368,column:1}},line:40},'1':{name:'(anonymous_1)',decl:{start:{line:56,column:26},end:{line:56,column:27}},loc:{start:{line:56,column:43},end:{line:60,column:7}},line:56},'2':{name:'(anonymous_2)',decl:{start:{line:62,column:25},end:{line:62,column:26}},loc:{start:{line:62,column:42},end:{line:64,column:7}},line:62},'3':{name:'(anonymous_3)',decl:{start:{line:84,column:27},end:{line:84,column:28}},loc:{start:{line:84,column:44},end:{line:192,column:7}},line:84},'4':{name:'(anonymous_4)',decl:{start:{line:200,column:30},end:{line:200,column:31}},loc:{start:{line:200,column:47},end:{line:206,column:9}},line:200},'5':{name:'(anonymous_5)',decl:{start:{line:214,column:14},end:{line:214,column:15}},loc:{start:{line:214,column:31},end:{line:222,column:11}},line:214},'6':{name:'(anonymous_6)',decl:{start:{line:239,column:28},end:{line:239,column:29}},loc:{start:{line:239,column:45},end:{line:241,column:5}},line:239},'7':{name:'(anonymous_7)',decl:{start:{line:243,column:23},end:{line:243,column:24}},loc:{start:{line:243,column:40},end:{line:355,column:5}},line:243},'8':{name:'(anonymous_8)',decl:{start:{line:271,column:20},end:{line:271,column:21}},loc:{start:{line:271,column:39},end:{line:279,column:13}},line:271},'9':{name:'(anonymous_9)',decl:{start:{line:280,column:17},end:{line:280,column:18}},loc:{start:{line:280,column:36},end:{line:285,column:13}},line:280},'10':{name:'(anonymous_10)',decl:{start:{line:332,column:14},end:{line:332,column:15}},loc:{start:{line:332,column:36},end:{line:334,column:15}},line:332},'11':{name:'(anonymous_11)',decl:{start:{line:359,column:30},end:{line:359,column:31}},loc:{start:{line:359,column:47},end:{line:361,column:5}},line:359},'12':{name:'(anonymous_12)',decl:{start:{line:363,column:25},end:{line:363,column:26}},loc:{start:{line:363,column:42},end:{line:366,column:5}},line:363}},branchMap:{'0':{loc:{start:{line:50,column:2},end:{line:195,column:3}},type:'switch',locations:[{start:{line:51,column:4},end:{line:51,column:16}},{start:{line:52,column:4},end:{line:52,column:20}},{start:{line:53,column:4},end:{line:194,column:12}}],line:50},'1':{loc:{start:{line:57,column:8},end:{line:59,column:9}},type:'if',locations:[{start:{line:57,column:8},end:{line:59,column:9}},{start:{line:57,column:8},end:{line:59,column:9}}],line:57},'2':{loc:{start:{line:57,column:12},end:{line:57,column:63}},type:'binary-expr',locations:[{start:{line:57,column:12},end:{line:57,column:30}},{start:{line:57,column:34},end:{line:57,column:63}}],line:57},'3':{loc:{start:{line:68,column:8},end:{line:80,column:9}},type:'if',locations:[{start:{line:68,column:8},end:{line:80,column:9}},{start:{line:68,column:8},end:{line:80,column:9}}],line:68},'4':{loc:{start:{line:70,column:10},end:{line:79,column:11}},type:'if',locations:[{start:{line:70,column:10},end:{line:79,column:11}},{start:{line:70,column:10},end:{line:79,column:11}}],line:70},'5':{loc:{start:{line:71,column:12},end:{line:72,column:47}},type:'binary-expr',locations:[{start:{line:71,column:12},end:{line:71,column:53}},{start:{line:72,column:12},end:{line:72,column:47}}],line:71},'6':{loc:{start:{line:102,column:10},end:{line:144,column:11}},type:'if',locations:[{start:{line:102,column:10},end:{line:144,column:11}},{start:{line:102,column:10},end:{line:144,column:11}}],line:102},'7':{loc:{start:{line:103,column:12},end:{line:132,column:13}},type:'if',locations:[{start:{line:103,column:12},end:{line:132,column:13}},{start:{line:103,column:12},end:{line:132,column:13}}],line:103},'8':{loc:{start:{line:107,column:14},end:{line:131,column:15}},type:'if',locations:[{start:{line:107,column:14},end:{line:131,column:15}},{start:{line:107,column:14},end:{line:131,column:15}}],line:107},'9':{loc:{start:{line:108,column:16},end:{line:109,column:60}},type:'binary-expr',locations:[{start:{line:108,column:16},end:{line:108,column:57}},{start:{line:109,column:16},end:{line:109,column:60}}],line:108},'10':{loc:{start:{line:116,column:18},end:{line:118,column:19}},type:'if',locations:[{start:{line:116,column:18},end:{line:118,column:19}},{start:{line:116,column:18},end:{line:118,column:19}}],line:116},'11':{loc:{start:{line:121,column:16},end:{line:124,column:17}},type:'if',locations:[{start:{line:121,column:16},end:{line:124,column:17}},{start:{line:121,column:16},end:{line:124,column:17}}],line:121},'12':{loc:{start:{line:125,column:21},end:{line:131,column:15}},type:'if',locations:[{start:{line:125,column:21},end:{line:131,column:15}},{start:{line:125,column:21},end:{line:131,column:15}}],line:125},'13':{loc:{start:{line:128,column:16},end:{line:130,column:17}},type:'if',locations:[{start:{line:128,column:16},end:{line:130,column:17}},{start:{line:128,column:16},end:{line:130,column:17}}],line:128},'14':{loc:{start:{line:128,column:20},end:{line:128,column:36}},type:'binary-expr',locations:[{start:{line:128,column:20},end:{line:128,column:25}},{start:{line:128,column:29},end:{line:128,column:36}}],line:128},'15':{loc:{start:{line:134,column:17},end:{line:144,column:11}},type:'if',locations:[{start:{line:134,column:17},end:{line:144,column:11}},{start:{line:134,column:17},end:{line:144,column:11}}],line:134},'16':{loc:{start:{line:137,column:12},end:{line:143,column:13}},type:'if',locations:[{start:{line:137,column:12},end:{line:143,column:13}},{start:{line:137,column:12},end:{line:143,column:13}}],line:137},'17':{loc:{start:{line:140,column:14},end:{line:142,column:15}},type:'if',locations:[{start:{line:140,column:14},end:{line:142,column:15}},{start:{line:140,column:14},end:{line:142,column:15}}],line:140},'18':{loc:{start:{line:140,column:18},end:{line:140,column:34}},type:'binary-expr',locations:[{start:{line:140,column:18},end:{line:140,column:23}},{start:{line:140,column:27},end:{line:140,column:34}}],line:140},'19':{loc:{start:{line:150,column:10},end:{line:188,column:11}},type:'if',locations:[{start:{line:150,column:10},end:{line:188,column:11}},{start:{line:150,column:10},end:{line:188,column:11}}],line:150},'20':{loc:{start:{line:151,column:12},end:{line:172,column:13}},type:'if',locations:[{start:{line:151,column:12},end:{line:172,column:13}},{start:{line:151,column:12},end:{line:172,column:13}}],line:151},'21':{loc:{start:{line:155,column:14},end:{line:171,column:15}},type:'if',locations:[{start:{line:155,column:14},end:{line:171,column:15}},{start:{line:155,column:14},end:{line:171,column:15}}],line:155},'22':{loc:{start:{line:156,column:16},end:{line:164,column:20}},type:'binary-expr',locations:[{start:{line:156,column:17},end:{line:156,column:35}},{start:{line:157,column:18},end:{line:157,column:56}},{start:{line:158,column:18},end:{line:158,column:42}},{start:{line:159,column:17},end:{line:159,column:54}},{start:{line:160,column:18},end:{line:164,column:19}}],line:156},'23':{loc:{start:{line:168,column:16},end:{line:170,column:17}},type:'if',locations:[{start:{line:168,column:16},end:{line:170,column:17}},{start:{line:168,column:16},end:{line:170,column:17}}],line:168},'24':{loc:{start:{line:168,column:20},end:{line:168,column:36}},type:'binary-expr',locations:[{start:{line:168,column:20},end:{line:168,column:25}},{start:{line:168,column:29},end:{line:168,column:36}}],line:168},'25':{loc:{start:{line:174,column:17},end:{line:188,column:11}},type:'if',locations:[{start:{line:174,column:17},end:{line:188,column:11}},{start:{line:174,column:17},end:{line:188,column:11}}],line:174},'26':{loc:{start:{line:177,column:12},end:{line:187,column:13}},type:'if',locations:[{start:{line:177,column:12},end:{line:187,column:13}},{start:{line:177,column:12},end:{line:187,column:13}}],line:177},'27':{loc:{start:{line:178,column:14},end:{line:180,column:32}},type:'binary-expr',locations:[{start:{line:178,column:14},end:{line:178,column:52}},{start:{line:179,column:14},end:{line:179,column:38}},{start:{line:180,column:14},end:{line:180,column:32}}],line:178},'28':{loc:{start:{line:184,column:14},end:{line:186,column:15}},type:'if',locations:[{start:{line:184,column:14},end:{line:186,column:15}},{start:{line:184,column:14},end:{line:186,column:15}}],line:184},'29':{loc:{start:{line:184,column:18},end:{line:184,column:34}},type:'binary-expr',locations:[{start:{line:184,column:18},end:{line:184,column:23}},{start:{line:184,column:27},end:{line:184,column:34}}],line:184},'30':{loc:{start:{line:197,column:2},end:{line:228,column:3}},type:'switch',locations:[{start:{line:198,column:4},end:{line:208,column:12}},{start:{line:209,column:4},end:{line:225,column:12}},{start:{line:226,column:4},end:{line:227,column:12}}],line:197},'31':{loc:{start:{line:199,column:6},end:{line:207,column:7}},type:'if',locations:[{start:{line:199,column:6},end:{line:207,column:7}},{start:{line:199,column:6},end:{line:207,column:7}}],line:199},'32':{loc:{start:{line:210,column:6},end:{line:224,column:7}},type:'if',locations:[{start:{line:210,column:6},end:{line:224,column:7}},{start:{line:210,column:6},end:{line:224,column:7}}],line:210},'33':{loc:{start:{line:215,column:20},end:{line:215,column:41}},type:'binary-expr',locations:[{start:{line:215,column:20},end:{line:215,column:25}},{start:{line:215,column:29},end:{line:215,column:41}}],line:215},'34':{loc:{start:{line:216,column:12},end:{line:221,column:13}},type:'if',locations:[{start:{line:216,column:12},end:{line:221,column:13}},{start:{line:216,column:12},end:{line:221,column:13}}],line:216},'35':{loc:{start:{line:230,column:2},end:{line:232,column:3}},type:'if',locations:[{start:{line:230,column:2},end:{line:232,column:3}},{start:{line:230,column:2},end:{line:232,column:3}}],line:230},'36':{loc:{start:{line:234,column:2},end:{line:236,column:3}},type:'if',locations:[{start:{line:234,column:2},end:{line:236,column:3}},{start:{line:234,column:2},end:{line:236,column:3}}],line:234},'37':{loc:{start:{line:238,column:2},end:{line:356,column:3}},type:'if',locations:[{start:{line:238,column:2},end:{line:356,column:3}},{start:{line:238,column:2},end:{line:356,column:3}}],line:238},'38':{loc:{start:{line:249,column:6},end:{line:298,column:7}},type:'if',locations:[{start:{line:249,column:6},end:{line:298,column:7}},{start:{line:249,column:6},end:{line:298,column:7}}],line:249},'39':{loc:{start:{line:250,column:8},end:{line:260,column:9}},type:'switch',locations:[{start:{line:251,column:10},end:{line:253,column:18}},{start:{line:254,column:10},end:{line:256,column:18}},{start:{line:257,column:10},end:{line:259,column:18}}],line:250},'40':{loc:{start:{line:263,column:8},end:{line:297,column:9}},type:'if',locations:[{start:{line:263,column:8},end:{line:297,column:9}},{start:{line:263,column:8},end:{line:297,column:9}}],line:263},'41':{loc:{start:{line:263,column:12},end:{line:263,column:55}},type:'binary-expr',locations:[{start:{line:263,column:12},end:{line:263,column:25}},{start:{line:263,column:29},end:{line:263,column:55}}],line:263},'42':{loc:{start:{line:265,column:15},end:{line:297,column:9}},type:'if',locations:[{start:{line:265,column:15},end:{line:297,column:9}},{start:{line:265,column:15},end:{line:297,column:9}}],line:265},'43':{loc:{start:{line:272,column:14},end:{line:277,column:15}},type:'if',locations:[{start:{line:272,column:14},end:{line:277,column:15}},{start:{line:272,column:14},end:{line:277,column:15}}],line:272},'44':{loc:{start:{line:273,column:16},end:{line:274,column:73}},type:'binary-expr',locations:[{start:{line:273,column:16},end:{line:273,column:28}},{start:{line:274,column:17},end:{line:274,column:44}},{start:{line:274,column:48},end:{line:274,column:72}}],line:273},'45':{loc:{start:{line:282,column:22},end:{line:282,column:48}},type:'binary-expr',locations:[{start:{line:282,column:22},end:{line:282,column:34}},{start:{line:282,column:38},end:{line:282,column:48}}],line:282},'46':{loc:{start:{line:289,column:10},end:{line:296,column:11}},type:'if',locations:[{start:{line:289,column:10},end:{line:296,column:11}},{start:{line:289,column:10},end:{line:296,column:11}}],line:289},'47':{loc:{start:{line:305,column:6},end:{line:307,column:7}},type:'if',locations:[{start:{line:305,column:6},end:{line:307,column:7}},{start:{line:305,column:6},end:{line:307,column:7}}],line:305},'48':{loc:{start:{line:310,column:6},end:{line:341,column:7}},type:'if',locations:[{start:{line:310,column:6},end:{line:341,column:7}},{start:{line:310,column:6},end:{line:341,column:7}}],line:310},'49':{loc:{start:{line:311,column:8},end:{line:313,column:9}},type:'if',locations:[{start:{line:311,column:8},end:{line:313,column:9}},{start:{line:311,column:8},end:{line:313,column:9}}],line:311},'50':{loc:{start:{line:315,column:8},end:{line:340,column:9}},type:'if',locations:[{start:{line:315,column:8},end:{line:340,column:9}},{start:{line:315,column:8},end:{line:340,column:9}}],line:315},'51':{loc:{start:{line:323,column:10},end:{line:325,column:11}},type:'if',locations:[{start:{line:323,column:10},end:{line:325,column:11}},{start:{line:323,column:10},end:{line:325,column:11}}],line:323},'52':{loc:{start:{line:328,column:10},end:{line:339,column:11}},type:'if',locations:[{start:{line:328,column:10},end:{line:339,column:11}},{start:{line:328,column:10},end:{line:339,column:11}}],line:328},'53':{loc:{start:{line:343,column:6},end:{line:354,column:7}},type:'if',locations:[{start:{line:343,column:6},end:{line:354,column:7}},{start:{line:343,column:6},end:{line:354,column:7}}],line:343},'54':{loc:{start:{line:344,column:8},end:{line:353,column:9}},type:'if',locations:[{start:{line:344,column:8},end:{line:353,column:9}},{start:{line:344,column:8},end:{line:353,column:9}}],line:344},'55':{loc:{start:{line:345,column:10},end:{line:346,column:60}},type:'binary-expr',locations:[{start:{line:345,column:10},end:{line:345,column:36}},{start:{line:346,column:11},end:{line:346,column:29}},{start:{line:346,column:33},end:{line:346,column:59}}],line:345},'56':{loc:{start:{line:358,column:2},end:{line:367,column:3}},type:'if',locations:[{start:{line:358,column:2},end:{line:367,column:3}},{start:{line:358,column:2},end:{line:367,column:3}}],line:358}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0,'67':0,'68':0,'69':0,'70':0,'71':0,'72':0,'73':0,'74':0,'75':0,'76':0,'77':0,'78':0,'79':0,'80':0,'81':0,'82':0,'83':0,'84':0,'85':0,'86':0,'87':0,'88':0,'89':0,'90':0,'91':0,'92':0,'93':0,'94':0,'95':0,'96':0,'97':0,'98':0,'99':0,'100':0,'101':0,'102':0,'103':0,'104':0,'105':0,'106':0,'107':0,'108':0,'109':0,'110':0,'111':0,'112':0,'113':0,'114':0,'115':0,'116':0,'117':0,'118':0,'119':0,'120':0,'121':0,'122':0,'123':0,'124':0,'125':0,'126':0,'127':0,'128':0,'129':0,'130':0,'131':0,'132':0,'133':0,'134':0,'135':0,'136':0,'137':0,'138':0,'139':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0},b:{'0':[0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0,0,0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0,0],'28':[0,0],'29':[0,0],'30':[0,0,0],'31':[0,0],'32':[0,0],'33':[0,0],'34':[0,0],'35':[0,0],'36':[0,0],'37':[0,0],'38':[0,0],'39':[0,0,0],'40':[0,0],'41':[0,0],'42':[0,0],'43':[0,0],'44':[0,0,0],'45':[0,0],'46':[0,0],'47':[0,0],'48':[0,0],'49':[0,0],'50':[0,0],'51':[0,0],'52':[0,0],'53':[0,0],'54':[0,0],'55':[0,0,0],'56':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function constructWidgetActions(widget,config){cov_2kychcr3iu.f[0]++;var widgetOnButtonClick,widgetFormValidate,widgetForm,widgetOk=(cov_2kychcr3iu.s[0]++,widget.querySelector('.pf-widget-ok')),widgetCancel=(cov_2kychcr3iu.s[1]++,widget.querySelector('.pf-widget-cancel')),widgetClose=(cov_2kychcr3iu.s[2]++,widget.querySelector('.pf-widget-close')),widgetReco=(cov_2kychcr3iu.s[3]++,widget.querySelector('.pf-content-unit'));cov_2kychcr3iu.s[4]++;switch(config.type){case'form':cov_2kychcr3iu.b[0][0]++;case'sitegate':cov_2kychcr3iu.b[0][1]++;case'subscription':cov_2kychcr3iu.b[0][2]++;cov_2kychcr3iu.s[5]++;widgetForm=widget.querySelector('form');var onInputChange=(cov_2kychcr3iu.s[6]++,function(event){cov_2kychcr3iu.f[1]++;cov_2kychcr3iu.s[7]++;if((cov_2kychcr3iu.b[2][0]++,event.target.value)&&(cov_2kychcr3iu.b[2][1]++,event.target.value.length>0)){cov_2kychcr3iu.b[1][0]++;cov_2kychcr3iu.s[8]++;trackWidgetAction('form_start',config,event.target);}else{cov_2kychcr3iu.b[1][1]++;}});var onInputFocus=(cov_2kychcr3iu.s[9]++,function(event){cov_2kychcr3iu.f[2]++;cov_2kychcr3iu.s[10]++;trackWidgetAction('focus',config,event.target);});cov_2kychcr3iu.s[11]++;for(var elem in widgetForm.childNodes){cov_2kychcr3iu.s[12]++;if(widgetForm.children.hasOwnProperty(elem)){cov_2kychcr3iu.b[3][0]++;var child=(cov_2kychcr3iu.s[13]++,widgetForm.children[elem]);cov_2kychcr3iu.s[14]++;if((cov_2kychcr3iu.b[5][0]++,typeof child.getAttribute!=='undefined')&&(cov_2kychcr3iu.b[5][1]++,child.getAttribute('name')!==null)){cov_2kychcr3iu.b[4][0]++;cov_2kychcr3iu.s[15]++;child.onfocus=onInputFocus;cov_2kychcr3iu.s[16]++;child.onchange=onInputChange;}else{cov_2kychcr3iu.b[4][1]++;}}else{cov_2kychcr3iu.b[3][1]++;}}cov_2kychcr3iu.s[17]++;widgetFormValidate=function(event){cov_2kychcr3iu.f[3]++;cov_2kychcr3iu.s[18]++;event.preventDefault();var valid=(cov_2kychcr3iu.s[19]++,true),requiredElements=(cov_2kychcr3iu.s[20]++,Array.prototype.slice.call(widgetForm.querySelectorAll('[data-required=true]'))),validatableElements=(cov_2kychcr3iu.s[21]++,Array.prototype.slice.call(widgetForm.querySelectorAll('[data-validate=true]'))),i,field,parent;cov_2kychcr3iu.s[22]++;for(i=0;i0){cov_29mw2gjt28.b[2][0]++;var rec=(cov_29mw2gjt28.s[4]++,config.content[0]),recImage=(cov_29mw2gjt28.s[5]++,document$1.createElement('div')),recMeta=(cov_29mw2gjt28.s[6]++,document$1.createElement('div')),recTitle=(cov_29mw2gjt28.s[7]++,document$1.createElement('h4')),recDesc=(cov_29mw2gjt28.s[8]++,document$1.createElement('p')),recInfo=(cov_29mw2gjt28.s[9]++,document$1.createElement('span'));cov_29mw2gjt28.s[10]++;widgetContentUnit.href=rec.url;cov_29mw2gjt28.s[11]++;if((cov_29mw2gjt28.b[4][0]++,rec.image)&&((cov_29mw2gjt28.b[4][1]++,!settings.display)||(cov_29mw2gjt28.b[4][2]++,settings.display.image!==false))){cov_29mw2gjt28.b[3][0]++;cov_29mw2gjt28.s[12]++;recImage.className='pf-content-unit-img';cov_29mw2gjt28.s[13]++;recImage.style.backgroundImage="url('"+rec.image+"')";cov_29mw2gjt28.s[14]++;widgetContentUnit.appendChild(recImage);}else{cov_29mw2gjt28.b[3][1]++;}cov_29mw2gjt28.s[15]++;recMeta.className='pf-content-unit-meta';cov_29mw2gjt28.s[16]++;if((cov_29mw2gjt28.b[6][0]++,rec.title)&&((cov_29mw2gjt28.b[6][1]++,!settings.display)||(cov_29mw2gjt28.b[6][2]++,settings.display.title!==false))){cov_29mw2gjt28.b[5][0]++;cov_29mw2gjt28.s[17]++;recTitle.innerHTML=rec.title;cov_29mw2gjt28.s[18]++;recMeta.appendChild(recTitle);}else{cov_29mw2gjt28.b[5][1]++;}cov_29mw2gjt28.s[19]++;if((cov_29mw2gjt28.b[8][0]++,rec.author)&&(cov_29mw2gjt28.b[8][1]++,settings.display)&&(cov_29mw2gjt28.b[8][2]++,settings.display.author===true)){cov_29mw2gjt28.b[7][0]++;cov_29mw2gjt28.s[20]++;recInfo.innerHTML='by '+rec.author;}else{cov_29mw2gjt28.b[7][1]++;}cov_29mw2gjt28.s[21]++;if((cov_29mw2gjt28.b[10][0]++,rec.date)&&(cov_29mw2gjt28.b[10][1]++,settings.display)&&(cov_29mw2gjt28.b[10][2]++,settings.display.date===true)){cov_29mw2gjt28.b[9][0]++;var published=(cov_29mw2gjt28.s[22]++,new Date(rec.date)),locale=(cov_29mw2gjt28.s[23]++,settings.display.locale),dateOptions=(cov_29mw2gjt28.s[24]++,settings.display.dateOptions);cov_29mw2gjt28.s[25]++;if((cov_29mw2gjt28.b[12][0]++,!locale)&&(cov_29mw2gjt28.b[12][1]++,window.pathfora)&&(cov_29mw2gjt28.b[12][2]++,window.pathfora.locale)){cov_29mw2gjt28.b[11][0]++;cov_29mw2gjt28.s[26]++;locale=window.pathfora.locale;}else{cov_29mw2gjt28.b[11][1]++;cov_29mw2gjt28.s[27]++;if(!locale){cov_29mw2gjt28.b[13][0]++;cov_29mw2gjt28.s[28]++;locale=PF_LOCALE;}else{cov_29mw2gjt28.b[13][1]++;}}cov_29mw2gjt28.s[29]++;if((cov_29mw2gjt28.b[15][0]++,!dateOptions)&&(cov_29mw2gjt28.b[15][1]++,window.pathfora)&&(cov_29mw2gjt28.b[15][2]++,window.pathfora.dateOptions)){cov_29mw2gjt28.b[14][0]++;cov_29mw2gjt28.s[30]++;dateOptions=window.pathfora.dateOptions;}else{cov_29mw2gjt28.b[14][1]++;cov_29mw2gjt28.s[31]++;if(!dateOptions){cov_29mw2gjt28.b[16][0]++;cov_29mw2gjt28.s[32]++;dateOptions=PF_DATE_OPTIONS;}else{cov_29mw2gjt28.b[16][1]++;}}cov_29mw2gjt28.s[33]++;published=published.toLocaleDateString(locale,dateOptions);cov_29mw2gjt28.s[34]++;if(!recInfo.innerHTML){cov_29mw2gjt28.b[17][0]++;cov_29mw2gjt28.s[35]++;recInfo.innerHTML=published;}else{cov_29mw2gjt28.b[17][1]++;cov_29mw2gjt28.s[36]++;recInfo.innerHTML+=' | '+published;}}else{cov_29mw2gjt28.b[9][1]++;}cov_29mw2gjt28.s[37]++;if(recInfo.innerHTML){cov_29mw2gjt28.b[18][0]++;cov_29mw2gjt28.s[38]++;recInfo.className='pf-content-unit-info';cov_29mw2gjt28.s[39]++;recMeta.appendChild(recInfo);}else{cov_29mw2gjt28.b[18][1]++;}cov_29mw2gjt28.s[40]++;if((cov_29mw2gjt28.b[20][0]++,rec.description)&&((cov_29mw2gjt28.b[20][1]++,!settings.display)||(cov_29mw2gjt28.b[20][2]++,settings.display.description!==false))){cov_29mw2gjt28.b[19][0]++;var desc=(cov_29mw2gjt28.s[41]++,rec.description),limit=(cov_29mw2gjt28.s[42]++,config.layout==='modal'?(cov_29mw2gjt28.b[21][0]++,DEFAULT_CHAR_LIMIT):(cov_29mw2gjt28.b[21][1]++,DEFAULT_CHAR_LIMIT_STACK));cov_29mw2gjt28.s[43]++;if(!settings.display){cov_29mw2gjt28.b[22][0]++;cov_29mw2gjt28.s[44]++;settings.display={descriptionLimit:limit};}else{cov_29mw2gjt28.b[22][1]++;cov_29mw2gjt28.s[45]++;if(!settings.display.descriptionLimit){cov_29mw2gjt28.b[23][0]++;cov_29mw2gjt28.s[46]++;settings.display.descriptionLimit=limit;}else{cov_29mw2gjt28.b[23][1]++;}}cov_29mw2gjt28.s[47]++;if((cov_29mw2gjt28.b[25][0]++,desc.length>settings.display.descriptionLimit)&&(cov_29mw2gjt28.b[25][1]++,settings.display.descriptionLimit!==-1)){cov_29mw2gjt28.b[24][0]++;cov_29mw2gjt28.s[48]++;desc=desc.substring(0,settings.display.descriptionLimit);cov_29mw2gjt28.s[49]++;desc=desc.substring(0,desc.lastIndexOf(' '))+'...';}else{cov_29mw2gjt28.b[24][1]++;}cov_29mw2gjt28.s[50]++;recDesc.innerHTML=desc;cov_29mw2gjt28.s[51]++;recMeta.appendChild(recDesc);}else{cov_29mw2gjt28.b[19][1]++;}cov_29mw2gjt28.s[52]++;widgetContentUnit.appendChild(recMeta);}else{cov_29mw2gjt28.b[2][1]++;}}else{cov_29mw2gjt28.b[0][1]++;}} + if (hasClass(widgetForm, 'pf-custom-form')) { + if (field.parentNode) { + parent = field.parentNode; + removeClass(parent, 'invalid'); - var cov_169tq0gstz=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/set-widget-classname.js',hash='a0693d76826223eb02255e193d0ef1a81af8f3b3',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/set-widget-classname.js',statementMap:{'0':{start:{line:11,column:2},end:{line:23,column:13}}},fnMap:{'0':{name:'setWidgetClassname',decl:{start:{line:10,column:24},end:{line:10,column:42}},loc:{start:{line:10,column:60},end:{line:24,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:15,column:4},end:{line:15,column:60}},type:'cond-expr',locations:[{start:{line:15,column:22},end:{line:15,column:55}},{start:{line:15,column:58},end:{line:15,column:60}}],line:15},'1':{loc:{start:{line:16,column:4},end:{line:16,column:46}},type:'cond-expr',locations:[{start:{line:16,column:22},end:{line:16,column:41}},{start:{line:16,column:44},end:{line:16,column:46}}],line:16},'2':{loc:{start:{line:17,column:4},end:{line:17,column:54}},type:'cond-expr',locations:[{start:{line:17,column:20},end:{line:17,column:49}},{start:{line:17,column:52},end:{line:17,column:54}}],line:17},'3':{loc:{start:{line:19,column:4},end:{line:19,column:51}},type:'cond-expr',locations:[{start:{line:19,column:19},end:{line:19,column:46}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},'4':{loc:{start:{line:20,column:4},end:{line:20,column:50}},type:'cond-expr',locations:[{start:{line:20,column:23},end:{line:20,column:45}},{start:{line:20,column:48},end:{line:20,column:50}}],line:20},'5':{loc:{start:{line:21,column:4},end:{line:21,column:52}},type:'cond-expr',locations:[{start:{line:21,column:22},end:{line:21,column:47}},{start:{line:21,column:50},end:{line:21,column:52}}],line:21},'6':{loc:{start:{line:22,column:4},end:{line:22,column:47}},type:'cond-expr',locations:[{start:{line:22,column:25},end:{line:22,column:42}},{start:{line:22,column:45},end:{line:22,column:47}}],line:22}},s:{'0':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setWidgetClassname(widget,config){cov_169tq0gstz.f[0]++;cov_169tq0gstz.s[0]++;widget.className=['pf-widget ','pf-'+config.type,' pf-widget-'+config.layout,config.position?(cov_169tq0gstz.b[0][0]++,' pf-position-'+config.position):(cov_169tq0gstz.b[0][1]++,''),config.pushDown?(cov_169tq0gstz.b[1][0]++,' pf-has-push-down'):(cov_169tq0gstz.b[1][1]++,''),config.origin?(cov_169tq0gstz.b[2][0]++,' pf-origin-'+config.origin):(cov_169tq0gstz.b[2][1]++,''),' pf-widget-variant-'+config.variant,config.theme?(cov_169tq0gstz.b[3][0]++,' pf-theme-'+config.theme):(cov_169tq0gstz.b[3][1]++,''),config.className?(cov_169tq0gstz.b[4][0]++,' '+config.className):(cov_169tq0gstz.b[4][1]++,''),config.branding?(cov_169tq0gstz.b[5][0]++,' pf-widget-has-branding'):(cov_169tq0gstz.b[5][1]++,''),!config.responsive?(cov_169tq0gstz.b[6][0]++,' pf-mobile-hide'):(cov_169tq0gstz.b[6][1]++,'')].join('');} + if ( + hasClass(parent, 'pf-widget-radio-group') || + hasClass(parent, 'pf-widget-checkbox-group') + ) { + var inputs = field.querySelectorAll('input'); + var count = 0; - var cov_11trv5b8zj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/form/build-form-element.js',hash='e1d83471bd6cf741da557cd767fb5bd54d23b907',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/form/build-form-element.js',statementMap:{'0':{start:{line:22,column:14},end:{line:22,column:43}},'1':{start:{line:23,column:14},end:{line:23,column:46}},'2':{start:{line:28,column:2},end:{line:82,column:3}},'3':{start:{line:29,column:4},end:{line:29,column:49}},'4':{start:{line:30,column:4},end:{line:30,column:44}},'5':{start:{line:32,column:4},end:{line:49,column:5}},'6':{start:{line:34,column:8},end:{line:34,column:50}},'7':{start:{line:35,column:8},end:{line:35,column:46}},'8':{start:{line:36,column:8},end:{line:36,column:14}},'9':{start:{line:39,column:8},end:{line:39,column:50}},'10':{start:{line:40,column:8},end:{line:40,column:45}},'11':{start:{line:41,column:8},end:{line:41,column:14}},'12':{start:{line:43,column:8},end:{line:43,column:50}},'13':{start:{line:44,column:8},end:{line:44,column:45}},'14':{start:{line:45,column:8},end:{line:45,column:14}},'15':{start:{line:47,column:8},end:{line:47,column:52}},'16':{start:{line:48,column:8},end:{line:48,column:14}},'17':{start:{line:51,column:4},end:{line:51,column:44}},'18':{start:{line:52,column:4},end:{line:52,column:42}},'19':{start:{line:55,column:4},end:{line:57,column:5}},'20':{start:{line:56,column:6},end:{line:56,column:38}},'21':{start:{line:60,column:4},end:{line:81,column:5}},'22':{start:{line:61,column:18},end:{line:61,column:28}},'23':{start:{line:62,column:17},end:{line:62,column:42}},'24':{start:{line:63,column:24},end:{line:63,column:70}},'25':{start:{line:64,column:14},end:{line:68,column:16}},'26':{start:{line:69,column:14},end:{line:73,column:16}},'27':{start:{line:75,column:6},end:{line:77,column:7}},'28':{start:{line:76,column:8},end:{line:76,column:69}},'29':{start:{line:78,column:6},end:{line:80,column:7}},'30':{start:{line:79,column:8},end:{line:79,column:69}},'31':{start:{line:84,column:2},end:{line:103,column:3}},'32':{start:{line:85,column:4},end:{line:92,column:5}},'33':{start:{line:86,column:6},end:{line:86,column:45}},'34':{start:{line:87,column:6},end:{line:87,column:27}},'35':{start:{line:88,column:6},end:{line:88,column:57}},'36':{start:{line:90,column:6},end:{line:90,column:46}},'37':{start:{line:91,column:6},end:{line:91,column:43}},'38':{start:{line:94,column:4},end:{line:94,column:33}},'39':{start:{line:95,column:4},end:{line:95,column:38}},'40':{start:{line:96,column:4},end:{line:96,column:38}},'41':{start:{line:98,column:4},end:{line:100,column:5}},'42':{start:{line:99,column:6},end:{line:99,column:60}},'43':{start:{line:102,column:4},end:{line:102,column:31}},'44':{start:{line:105,column:2},end:{line:118,column:3}},'45':{start:{line:106,column:4},end:{line:106,column:42}},'46':{start:{line:107,column:4},end:{line:107,column:50}},'47':{start:{line:109,column:4},end:{line:117,column:5}},'48':{start:{line:110,column:6},end:{line:110,column:46}},'49':{start:{line:111,column:6},end:{line:111,column:45}},'50':{start:{line:112,column:6},end:{line:112,column:37}},'51':{start:{line:114,column:6},end:{line:114,column:51}},'52':{start:{line:115,column:6},end:{line:115,column:39}},'53':{start:{line:116,column:6},end:{line:116,column:35}},'54':{start:{line:120,column:2},end:{line:133,column:3}},'55':{start:{line:121,column:4},end:{line:121,column:42}},'56':{start:{line:122,column:4},end:{line:122,column:50}},'57':{start:{line:124,column:4},end:{line:132,column:5}},'58':{start:{line:125,column:6},end:{line:125,column:46}},'59':{start:{line:126,column:6},end:{line:126,column:44}},'60':{start:{line:127,column:6},end:{line:127,column:36}},'61':{start:{line:129,column:6},end:{line:129,column:51}},'62':{start:{line:130,column:6},end:{line:130,column:39}},'63':{start:{line:131,column:6},end:{line:131,column:35}},'64':{start:{line:135,column:2},end:{line:149,column:3}},'65':{start:{line:137,column:4},end:{line:144,column:5}},'66':{start:{line:138,column:24},end:{line:138,column:56}},'67':{start:{line:139,column:6},end:{line:139,column:44}},'68':{start:{line:140,column:6},end:{line:140,column:47}},'69':{start:{line:141,column:6},end:{line:141,column:39}},'70':{start:{line:143,column:6},end:{line:143,column:45}},'71':{start:{line:146,column:4},end:{line:148,column:5}},'72':{start:{line:147,column:6},end:{line:147,column:59}},'73':{start:{line:151,column:2},end:{line:180,column:3}},'74':{start:{line:152,column:4},end:{line:179,column:5}},'75':{start:{line:153,column:6},end:{line:153,column:27}},'76':{start:{line:155,column:6},end:{line:178,column:7}},'77':{start:{line:156,column:20},end:{line:156,column:51}},'78':{start:{line:157,column:8},end:{line:157,column:51}},'79':{start:{line:158,column:8},end:{line:158,column:47}},'80':{start:{line:159,column:8},end:{line:159,column:46}},'81':{start:{line:161,column:8},end:{line:171,column:9}},'82':{start:{line:162,column:10},end:{line:162,column:50}},'83':{start:{line:163,column:10},end:{line:163,column:58}},'84':{start:{line:164,column:10},end:{line:164,column:35}},'85':{start:{line:165,column:10},end:{line:165,column:64}},'86':{start:{line:166,column:10},end:{line:166,column:37}},'87':{start:{line:168,column:10},end:{line:170,column:12}},'88':{start:{line:172,column:13},end:{line:178,column:7}},'89':{start:{line:173,column:21},end:{line:173,column:53}},'90':{start:{line:174,column:8},end:{line:174,column:48}},'91':{start:{line:175,column:8},end:{line:175,column:37}},'92':{start:{line:177,column:8},end:{line:177,column:36}},'93':{start:{line:182,column:2},end:{line:182,column:31}},'94':{start:{line:185,column:12},end:{line:185,column:47}},'95':{start:{line:186,column:2},end:{line:190,column:3}},'96':{start:{line:187,column:4},end:{line:187,column:36}},'97':{start:{line:189,column:4},end:{line:189,column:30}}},fnMap:{'0':{name:'buildFormElement',decl:{start:{line:17,column:24},end:{line:17,column:40}},loc:{start:{line:17,column:53},end:{line:191,column:1}},line:17}},branchMap:{'0':{loc:{start:{line:28,column:2},end:{line:82,column:3}},type:'if',locations:[{start:{line:28,column:2},end:{line:82,column:3}},{start:{line:28,column:2},end:{line:82,column:3}}],line:28},'1':{loc:{start:{line:32,column:4},end:{line:49,column:5}},type:'switch',locations:[{start:{line:33,column:6},end:{line:36,column:14}},{start:{line:37,column:6},end:{line:37,column:18}},{start:{line:38,column:6},end:{line:41,column:14}},{start:{line:42,column:6},end:{line:45,column:14}},{start:{line:46,column:6},end:{line:48,column:14}}],line:32},'2':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},'3':{loc:{start:{line:60,column:4},end:{line:81,column:5}},type:'if',locations:[{start:{line:60,column:4},end:{line:81,column:5}},{start:{line:60,column:4},end:{line:81,column:5}}],line:60},'4':{loc:{start:{line:64,column:14},end:{line:68,column:16}},type:'cond-expr',locations:[{start:{line:65,column:12},end:{line:67,column:36}},{start:{line:68,column:12},end:{line:68,column:16}}],line:64},'5':{loc:{start:{line:65,column:12},end:{line:67,column:36}},type:'cond-expr',locations:[{start:{line:66,column:14},end:{line:66,column:27}},{start:{line:67,column:14},end:{line:67,column:36}}],line:65},'6':{loc:{start:{line:69,column:14},end:{line:73,column:16}},type:'cond-expr',locations:[{start:{line:70,column:12},end:{line:72,column:36}},{start:{line:73,column:12},end:{line:73,column:16}}],line:69},'7':{loc:{start:{line:70,column:12},end:{line:72,column:36}},type:'cond-expr',locations:[{start:{line:71,column:14},end:{line:71,column:27}},{start:{line:72,column:14},end:{line:72,column:36}}],line:70},'8':{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:'if',locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},'9':{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:'if',locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},'10':{loc:{start:{line:84,column:2},end:{line:103,column:3}},type:'if',locations:[{start:{line:84,column:2},end:{line:103,column:3}},{start:{line:84,column:2},end:{line:103,column:3}}],line:84},'11':{loc:{start:{line:85,column:4},end:{line:92,column:5}},type:'if',locations:[{start:{line:85,column:4},end:{line:92,column:5}},{start:{line:85,column:4},end:{line:92,column:5}}],line:85},'12':{loc:{start:{line:98,column:4},end:{line:100,column:5}},type:'if',locations:[{start:{line:98,column:4},end:{line:100,column:5}},{start:{line:98,column:4},end:{line:100,column:5}}],line:98},'13':{loc:{start:{line:105,column:2},end:{line:118,column:3}},type:'if',locations:[{start:{line:105,column:2},end:{line:118,column:3}},{start:{line:105,column:2},end:{line:118,column:3}}],line:105},'14':{loc:{start:{line:109,column:4},end:{line:117,column:5}},type:'if',locations:[{start:{line:109,column:4},end:{line:117,column:5}},{start:{line:109,column:4},end:{line:117,column:5}}],line:109},'15':{loc:{start:{line:120,column:2},end:{line:133,column:3}},type:'if',locations:[{start:{line:120,column:2},end:{line:133,column:3}},{start:{line:120,column:2},end:{line:133,column:3}}],line:120},'16':{loc:{start:{line:120,column:6},end:{line:120,column:51}},type:'binary-expr',locations:[{start:{line:120,column:6},end:{line:120,column:26}},{start:{line:120,column:30},end:{line:120,column:51}}],line:120},'17':{loc:{start:{line:124,column:4},end:{line:132,column:5}},type:'if',locations:[{start:{line:124,column:4},end:{line:132,column:5}},{start:{line:124,column:4},end:{line:132,column:5}}],line:124},'18':{loc:{start:{line:135,column:2},end:{line:149,column:3}},type:'if',locations:[{start:{line:135,column:2},end:{line:149,column:3}},{start:{line:135,column:2},end:{line:149,column:3}}],line:135},'19':{loc:{start:{line:137,column:4},end:{line:144,column:5}},type:'if',locations:[{start:{line:137,column:4},end:{line:144,column:5}},{start:{line:137,column:4},end:{line:144,column:5}}],line:137},'20':{loc:{start:{line:146,column:4},end:{line:148,column:5}},type:'if',locations:[{start:{line:146,column:4},end:{line:148,column:5}},{start:{line:146,column:4},end:{line:148,column:5}}],line:146},'21':{loc:{start:{line:151,column:2},end:{line:180,column:3}},type:'if',locations:[{start:{line:151,column:2},end:{line:180,column:3}},{start:{line:151,column:2},end:{line:180,column:3}}],line:151},'22':{loc:{start:{line:155,column:6},end:{line:178,column:7}},type:'if',locations:[{start:{line:155,column:6},end:{line:178,column:7}},{start:{line:155,column:6},end:{line:178,column:7}}],line:155},'23':{loc:{start:{line:161,column:8},end:{line:171,column:9}},type:'if',locations:[{start:{line:161,column:8},end:{line:171,column:9}},{start:{line:161,column:8},end:{line:171,column:9}}],line:161},'24':{loc:{start:{line:172,column:13},end:{line:178,column:7}},type:'if',locations:[{start:{line:172,column:13},end:{line:178,column:7}},{start:{line:172,column:13},end:{line:178,column:7}}],line:172},'25':{loc:{start:{line:186,column:2},end:{line:190,column:3}},type:'if',locations:[{start:{line:186,column:2},end:{line:190,column:3}},{start:{line:186,column:2},end:{line:190,column:3}}],line:186}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0,'67':0,'68':0,'69':0,'70':0,'71':0,'72':0,'73':0,'74':0,'75':0,'76':0,'77':0,'78':0,'79':0,'80':0,'81':0,'82':0,'83':0,'84':0,'85':0,'86':0,'87':0,'88':0,'89':0,'90':0,'91':0,'92':0,'93':0,'94':0,'95':0,'96':0,'97':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0,0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function buildFormElement(elem,form){cov_11trv5b8zj.f[0]++;var content,i,val,label,wrapper=(cov_11trv5b8zj.s[0]++,document$1.createElement('div')),isGroup=(cov_11trv5b8zj.s[1]++,elem.hasOwnProperty('groupType')),reqFlag,reqTriangle;cov_11trv5b8zj.s[2]++;if(isGroup){cov_11trv5b8zj.b[0][0]++;cov_11trv5b8zj.s[3]++;wrapper.className='pf-widget-'+elem.type;cov_11trv5b8zj.s[4]++;content=document$1.createElement('div');}else{cov_11trv5b8zj.b[0][1]++;cov_11trv5b8zj.s[5]++;switch(elem.type){case'email':cov_11trv5b8zj.b[1][0]++;cov_11trv5b8zj.s[6]++;content=document$1.createElement('input');cov_11trv5b8zj.s[7]++;content.setAttribute('type','email');cov_11trv5b8zj.s[8]++;break;case'text':cov_11trv5b8zj.b[1][1]++;case'input':cov_11trv5b8zj.b[1][2]++;cov_11trv5b8zj.s[9]++;content=document$1.createElement('input');cov_11trv5b8zj.s[10]++;content.setAttribute('type','text');cov_11trv5b8zj.s[11]++;break;case'date':cov_11trv5b8zj.b[1][3]++;cov_11trv5b8zj.s[12]++;content=document$1.createElement('input');cov_11trv5b8zj.s[13]++;content.setAttribute('type','date');cov_11trv5b8zj.s[14]++;break;default:cov_11trv5b8zj.b[1][4]++;cov_11trv5b8zj.s[15]++;content=document$1.createElement(elem.type);cov_11trv5b8zj.s[16]++;break;}cov_11trv5b8zj.s[17]++;content.setAttribute('name',elem.name);cov_11trv5b8zj.s[18]++;content.setAttribute('id',elem.name);cov_11trv5b8zj.s[19]++;if(elem.type==='textarea'){cov_11trv5b8zj.b[2][0]++;cov_11trv5b8zj.s[20]++;content.setAttribute('rows',5);}else{cov_11trv5b8zj.b[2][1]++;}cov_11trv5b8zj.s[21]++;if(elem.type==='date'){cov_11trv5b8zj.b[3][0]++;var today=(cov_11trv5b8zj.s[22]++,new Date()),offset=(cov_11trv5b8zj.s[23]++,today.getTimezoneOffset()),todayTimezone=(cov_11trv5b8zj.s[24]++,new Date(today.getTime()-offset*60*1000)),max=(cov_11trv5b8zj.s[25]++,elem.maxDate?(cov_11trv5b8zj.b[4][0]++,elem.maxDate==='today'?(cov_11trv5b8zj.b[5][0]++,todayTimezone):(cov_11trv5b8zj.b[5][1]++,new Date(elem.maxDate))):(cov_11trv5b8zj.b[4][1]++,null)),min=(cov_11trv5b8zj.s[26]++,elem.minDate?(cov_11trv5b8zj.b[6][0]++,elem.minDate==='today'?(cov_11trv5b8zj.b[7][0]++,todayTimezone):(cov_11trv5b8zj.b[7][1]++,new Date(elem.minDate))):(cov_11trv5b8zj.b[6][1]++,null));cov_11trv5b8zj.s[27]++;if(max!=null){cov_11trv5b8zj.b[8][0]++;cov_11trv5b8zj.s[28]++;content.setAttribute('max',max.toISOString().split('T')[0]);}else{cov_11trv5b8zj.b[8][1]++;}cov_11trv5b8zj.s[29]++;if(min!=null){cov_11trv5b8zj.b[9][0]++;cov_11trv5b8zj.s[30]++;content.setAttribute('min',min.toISOString().split('T')[0]);}else{cov_11trv5b8zj.b[9][1]++;}}else{cov_11trv5b8zj.b[3][1]++;}}cov_11trv5b8zj.s[31]++;if(elem.label){cov_11trv5b8zj.b[10][0]++;cov_11trv5b8zj.s[32]++;if(isGroup){cov_11trv5b8zj.b[11][0]++;cov_11trv5b8zj.s[33]++;label=document$1.createElement('span');cov_11trv5b8zj.s[34]++;label.id=elem.name;cov_11trv5b8zj.s[35]++;content.setAttribute('aria-labelledby',elem.name);}else{cov_11trv5b8zj.b[11][1]++;cov_11trv5b8zj.s[36]++;label=document$1.createElement('label');cov_11trv5b8zj.s[37]++;label.setAttribute('for',elem.name);}cov_11trv5b8zj.s[38]++;label.innerHTML=elem.label;cov_11trv5b8zj.s[39]++;label.className='pf-form-label';cov_11trv5b8zj.s[40]++;addClass(content,'pf-has-label');cov_11trv5b8zj.s[41]++;if(elem.required===true){cov_11trv5b8zj.b[12][0]++;cov_11trv5b8zj.s[42]++;label.innerHTML+=' *';}else{cov_11trv5b8zj.b[12][1]++;}cov_11trv5b8zj.s[43]++;wrapper.appendChild(label);}else{cov_11trv5b8zj.b[10][1]++;}cov_11trv5b8zj.s[44]++;if(elem.required===true){cov_11trv5b8zj.b[13][0]++;cov_11trv5b8zj.s[45]++;addClass(wrapper,'pf-form-required');cov_11trv5b8zj.s[46]++;content.setAttribute('data-required','true');cov_11trv5b8zj.s[47]++;if(elem.label){cov_11trv5b8zj.b[14][0]++;cov_11trv5b8zj.s[48]++;reqFlag=document$1.createElement('div');cov_11trv5b8zj.s[49]++;reqFlag.className='pf-required-flag';cov_11trv5b8zj.s[50]++;reqFlag.innerHTML='required';cov_11trv5b8zj.s[51]++;reqTriangle=document$1.createElement('span');cov_11trv5b8zj.s[52]++;reqFlag.appendChild(reqTriangle);cov_11trv5b8zj.s[53]++;wrapper.appendChild(reqFlag);}else{cov_11trv5b8zj.b[14][1]++;}}else{cov_11trv5b8zj.b[13][1]++;}cov_11trv5b8zj.s[54]++;if((cov_11trv5b8zj.b[16][0]++,elem.type==='date')||(cov_11trv5b8zj.b[16][1]++,elem.type==='email')){cov_11trv5b8zj.b[15][0]++;cov_11trv5b8zj.s[55]++;addClass(wrapper,'pf-form-required');cov_11trv5b8zj.s[56]++;content.setAttribute('data-validate','true');cov_11trv5b8zj.s[57]++;if(elem.label){cov_11trv5b8zj.b[17][0]++;cov_11trv5b8zj.s[58]++;reqFlag=document$1.createElement('div');cov_11trv5b8zj.s[59]++;reqFlag.className='pf-invalid-flag';cov_11trv5b8zj.s[60]++;reqFlag.innerHTML='invalid';cov_11trv5b8zj.s[61]++;reqTriangle=document$1.createElement('span');cov_11trv5b8zj.s[62]++;reqFlag.appendChild(reqTriangle);cov_11trv5b8zj.s[63]++;wrapper.appendChild(reqFlag);}else{cov_11trv5b8zj.b[17][1]++;}}else{cov_11trv5b8zj.b[15][1]++;}cov_11trv5b8zj.s[64]++;if(elem.placeholder){cov_11trv5b8zj.b[18][0]++;cov_11trv5b8zj.s[65]++;if(elem.type==='select'){cov_11trv5b8zj.b[19][0]++;var placeholder=(cov_11trv5b8zj.s[66]++,document$1.createElement('option'));cov_11trv5b8zj.s[67]++;placeholder.setAttribute('value','');cov_11trv5b8zj.s[68]++;placeholder.innerHTML=elem.placeholder;cov_11trv5b8zj.s[69]++;content.appendChild(placeholder);}else{cov_11trv5b8zj.b[19][1]++;cov_11trv5b8zj.s[70]++;content.placeholder=elem.placeholder;}cov_11trv5b8zj.s[71]++;if(!elem.label){cov_11trv5b8zj.b[20][0]++;cov_11trv5b8zj.s[72]++;content.setAttribute('aria-label',elem.placeholder);}else{cov_11trv5b8zj.b[20][1]++;}}else{cov_11trv5b8zj.b[18][1]++;}cov_11trv5b8zj.s[73]++;if(elem.values){cov_11trv5b8zj.b[21][0]++;cov_11trv5b8zj.s[74]++;for(i=0;i=0;i--){cov_1gumbpd57i.s[72]++;widgetHeadline[i].innerHTML=config.headline;}cov_1gumbpd57i.s[73]++;if(config.image){cov_1gumbpd57i.b[28][0]++;var widgetImage=(cov_1gumbpd57i.s[74]++,document$1.createElement('img'));cov_1gumbpd57i.s[75]++;widgetImage.src=config.image;cov_1gumbpd57i.s[76]++;widgetImage.className='pf-widget-img';cov_1gumbpd57i.s[77]++;if(config.layout==='button'){cov_1gumbpd57i.b[29][0]++;}else{cov_1gumbpd57i.b[29][1]++;cov_1gumbpd57i.s[78]++;if((cov_1gumbpd57i.b[31][0]++,config.layout==='modal')||(cov_1gumbpd57i.b[31][1]++,config.layout==='inline')){cov_1gumbpd57i.b[30][0]++;cov_1gumbpd57i.s[79]++;widgetContent.appendChild(widgetImage);}else{cov_1gumbpd57i.b[30][1]++;cov_1gumbpd57i.s[80]++;widgetBody.appendChild(widgetImage);}}}else{cov_1gumbpd57i.b[28][1]++;}cov_1gumbpd57i.s[81]++;switch(config.type){case'sitegate':cov_1gumbpd57i.b[32][0]++;case'form':cov_1gumbpd57i.b[32][1]++;cov_1gumbpd57i.s[82]++;if((cov_1gumbpd57i.b[34][0]++,config.formElements)&&(cov_1gumbpd57i.b[34][1]++,config.formElements.length)){cov_1gumbpd57i.b[33][0]++;var form=(cov_1gumbpd57i.s[83]++,widget.querySelector('form'));cov_1gumbpd57i.s[84]++;addClass(form,'pf-custom-form');var childName;var arr=(cov_1gumbpd57i.s[85]++,form.children);cov_1gumbpd57i.s[86]++;for(var k=0;k=WIDTH_BREAKPOINT){cov_4ggqwd3a4.b[5][0]++;cov_4ggqwd3a4.s[6]++;removeClass(rec,'stack');}else{cov_4ggqwd3a4.b[5][1]++;}}}else{cov_4ggqwd3a4.b[2][1]++;}}else{cov_4ggqwd3a4.b[0][1]++;}} + break; + } - var cov_b0kcrg3hs=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js',hash='5bebecf10199f15959bedc7da442bae714518f0a',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js',statementMap:{'0':{start:{line:32,column:19},end:{line:152,column:3}},'1':{start:{line:34,column:4},end:{line:38,column:5}},'2':{start:{line:35,column:6},end:{line:37,column:7}},'3':{start:{line:36,column:8},end:{line:36,column:15}},'4':{start:{line:40,column:4},end:{line:40,column:45}},'5':{start:{line:41,column:4},end:{line:41,column:38}},'6':{start:{line:44,column:4},end:{line:44,column:33}},'7':{start:{line:48,column:4},end:{line:53,column:5}},'8':{start:{line:49,column:6},end:{line:49,column:38}},'9':{start:{line:51,column:6},end:{line:51,column:40}},'10':{start:{line:52,column:6},end:{line:52,column:29}},'11':{start:{line:55,column:4},end:{line:57,column:5}},'12':{start:{line:56,column:6},end:{line:56,column:66}},'13':{start:{line:59,column:4},end:{line:102,column:5}},'14':{start:{line:63,column:6},end:{line:63,column:38}},'15':{start:{line:65,column:6},end:{line:89,column:7}},'16':{start:{line:67,column:24},end:{line:69,column:9}},'17':{start:{line:71,column:8},end:{line:88,column:9}},'18':{start:{line:72,column:10},end:{line:87,column:12}},'19':{start:{line:77,column:14},end:{line:85,column:15}},'20':{start:{line:78,column:16},end:{line:84,column:17}},'21':{start:{line:79,column:18},end:{line:79,column:38}},'22':{start:{line:80,column:18},end:{line:80,column:39}},'23':{start:{line:81,column:23},end:{line:84,column:17}},'24':{start:{line:82,column:18},end:{line:82,column:38}},'25':{start:{line:83,column:18},end:{line:83,column:39}},'26':{start:{line:92,column:21},end:{line:93,column:65}},'27':{start:{line:94,column:21},end:{line:94,column:53}},'28':{start:{line:96,column:6},end:{line:101,column:7}},'29':{start:{line:97,column:8},end:{line:97,column:35}},'30':{start:{line:99,column:8},end:{line:99,column:42}},'31':{start:{line:100,column:8},end:{line:100,column:74}},'32':{start:{line:106,column:4},end:{line:126,column:11}},'33':{start:{line:107,column:31},end:{line:107,column:51}},'34':{start:{line:109,column:6},end:{line:109,column:31}},'35':{start:{line:111,column:6},end:{line:116,column:7}},'36':{start:{line:112,column:8},end:{line:115,column:11}},'37':{start:{line:117,column:6},end:{line:125,column:7}},'38':{start:{line:121,column:8},end:{line:124,column:11}},'39':{start:{line:128,column:4},end:{line:132,column:5}},'40':{start:{line:129,column:6},end:{line:131,column:52}},'41':{start:{line:130,column:8},end:{line:130,column:37}},'42':{start:{line:134,column:4},end:{line:134,column:39}},'43':{start:{line:136,column:4},end:{line:142,column:6}},'44':{start:{line:140,column:8},end:{line:140,column:43}},'45':{start:{line:144,column:4},end:{line:151,column:5}},'46':{start:{line:145,column:6},end:{line:150,column:7}},'47':{start:{line:146,column:18},end:{line:146,column:39}},'48':{start:{line:147,column:8},end:{line:149,column:9}},'49':{start:{line:148,column:10},end:{line:148,column:56}},'50':{start:{line:154,column:29},end:{line:154,column:37}},'51':{start:{line:155,column:2},end:{line:159,column:3}},'52':{start:{line:156,column:4},end:{line:158,column:7}},'53':{start:{line:162,column:2},end:{line:169,column:3}},'54':{start:{line:163,column:4},end:{line:166,column:45}},'55':{start:{line:164,column:6},end:{line:164,column:20}},'56':{start:{line:165,column:6},end:{line:165,column:54}},'57':{start:{line:168,column:4},end:{line:168,column:18}}},fnMap:{'0':{name:'showWidget',decl:{start:{line:31,column:24},end:{line:31,column:34}},loc:{start:{line:31,column:39},end:{line:170,column:1}},line:31},'1':{name:'(anonymous_1)',decl:{start:{line:32,column:19},end:{line:32,column:20}},loc:{start:{line:32,column:37},end:{line:152,column:3}},line:32},'2':{name:'(anonymous_2)',decl:{start:{line:75,column:16},end:{line:75,column:17}},loc:{start:{line:75,column:30},end:{line:86,column:13}},line:75},'3':{name:'(anonymous_3)',decl:{start:{line:106,column:15},end:{line:106,column:16}},loc:{start:{line:106,column:27},end:{line:126,column:5}},line:106},'4':{name:'(anonymous_4)',decl:{start:{line:129,column:17},end:{line:129,column:18}},loc:{start:{line:129,column:29},end:{line:131,column:7}},line:129},'5':{name:'(anonymous_5)',decl:{start:{line:139,column:10},end:{line:139,column:11}},loc:{start:{line:139,column:22},end:{line:141,column:7}},line:139},'6':{name:'(anonymous_6)',decl:{start:{line:163,column:52},end:{line:163,column:53}},loc:{start:{line:163,column:64},end:{line:166,column:5}},line:163}},branchMap:{'0':{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},'1':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},'2':{loc:{start:{line:59,column:4},end:{line:102,column:5}},type:'if',locations:[{start:{line:59,column:4},end:{line:102,column:5}},{start:{line:59,column:4},end:{line:102,column:5}}],line:59},'3':{loc:{start:{line:60,column:6},end:{line:61,column:39}},type:'binary-expr',locations:[{start:{line:60,column:6},end:{line:60,column:44}},{start:{line:61,column:6},end:{line:61,column:39}}],line:60},'4':{loc:{start:{line:65,column:6},end:{line:89,column:7}},type:'if',locations:[{start:{line:65,column:6},end:{line:89,column:7}},{start:{line:65,column:6},end:{line:89,column:7}}],line:65},'5':{loc:{start:{line:65,column:10},end:{line:65,column:65}},type:'binary-expr',locations:[{start:{line:65,column:10},end:{line:65,column:35}},{start:{line:65,column:39},end:{line:65,column:65}}],line:65},'6':{loc:{start:{line:71,column:8},end:{line:88,column:9}},type:'if',locations:[{start:{line:71,column:8},end:{line:88,column:9}},{start:{line:71,column:8},end:{line:88,column:9}}],line:71},'7':{loc:{start:{line:77,column:14},end:{line:85,column:15}},type:'if',locations:[{start:{line:77,column:14},end:{line:85,column:15}},{start:{line:77,column:14},end:{line:85,column:15}}],line:77},'8':{loc:{start:{line:78,column:16},end:{line:84,column:17}},type:'if',locations:[{start:{line:78,column:16},end:{line:84,column:17}},{start:{line:78,column:16},end:{line:84,column:17}}],line:78},'9':{loc:{start:{line:81,column:23},end:{line:84,column:17}},type:'if',locations:[{start:{line:81,column:23},end:{line:84,column:17}},{start:{line:81,column:23},end:{line:84,column:17}}],line:81},'10':{loc:{start:{line:92,column:21},end:{line:93,column:65}},type:'cond-expr',locations:[{start:{line:93,column:10},end:{line:93,column:32}},{start:{line:93,column:35},end:{line:93,column:65}}],line:92},'11':{loc:{start:{line:96,column:6},end:{line:101,column:7}},type:'if',locations:[{start:{line:96,column:6},end:{line:101,column:7}},{start:{line:96,column:6},end:{line:101,column:7}}],line:96},'12':{loc:{start:{line:111,column:6},end:{line:116,column:7}},type:'if',locations:[{start:{line:111,column:6},end:{line:116,column:7}},{start:{line:111,column:6},end:{line:116,column:7}}],line:111},'13':{loc:{start:{line:117,column:6},end:{line:125,column:7}},type:'if',locations:[{start:{line:117,column:6},end:{line:125,column:7}},{start:{line:117,column:6},end:{line:125,column:7}}],line:117},'14':{loc:{start:{line:118,column:8},end:{line:119,column:55}},type:'binary-expr',locations:[{start:{line:118,column:8},end:{line:118,column:40}},{start:{line:119,column:8},end:{line:119,column:55}}],line:118},'15':{loc:{start:{line:128,column:4},end:{line:132,column:5}},type:'if',locations:[{start:{line:128,column:4},end:{line:132,column:5}},{start:{line:128,column:4},end:{line:132,column:5}}],line:128},'16':{loc:{start:{line:145,column:6},end:{line:150,column:7}},type:'if',locations:[{start:{line:145,column:6},end:{line:150,column:7}},{start:{line:145,column:6},end:{line:150,column:7}}],line:145},'17':{loc:{start:{line:147,column:8},end:{line:149,column:9}},type:'if',locations:[{start:{line:147,column:8},end:{line:149,column:9}},{start:{line:147,column:8},end:{line:149,column:9}}],line:147},'18':{loc:{start:{line:147,column:12},end:{line:147,column:75}},type:'binary-expr',locations:[{start:{line:147,column:12},end:{line:147,column:22}},{start:{line:147,column:26},end:{line:147,column:75}}],line:147},'19':{loc:{start:{line:155,column:2},end:{line:159,column:3}},type:'if',locations:[{start:{line:155,column:2},end:{line:159,column:3}},{start:{line:155,column:2},end:{line:159,column:3}}],line:155},'20':{loc:{start:{line:162,column:2},end:{line:169,column:3}},type:'if',locations:[{start:{line:162,column:2},end:{line:169,column:3}},{start:{line:162,column:2},end:{line:169,column:3}}],line:162},'21':{loc:{start:{line:162,column:6},end:{line:162,column:58}},type:'binary-expr',locations:[{start:{line:162,column:6},end:{line:162,column:25}},{start:{line:162,column:29},end:{line:162,column:58}}],line:162}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function showWidget(w){cov_b0kcrg3hs.f[0]++;cov_b0kcrg3hs.s[0]++;var openWidget=function(widget){cov_b0kcrg3hs.f[1]++;cov_b0kcrg3hs.s[1]++;for(var i=0;i0)){cov_efsy2sm4w.b[4][0]++;cov_efsy2sm4w.s[4]++;acctid=window.jstag.config.cid[0];}else{cov_efsy2sm4w.b[4][1]++;cov_efsy2sm4w.s[5]++;throw new Error('Could not get account id from Lytics Javascript tag.');}}cov_efsy2sm4w.s[6]++;if(!!acctid){cov_efsy2sm4w.b[6][0]++;cov_efsy2sm4w.s[7]++;pf.acctid=acctid;}else{cov_efsy2sm4w.b[6][1]++;cov_efsy2sm4w.s[8]++;throw new Error('Lytics Javascript tag returned an empty account id.');}}else{cov_efsy2sm4w.b[0][1]++;}} + // validate form input + if (!widgetAction || !widgetFormValidate(event)) { + return; + } else if (widgetForm) { + trackWidgetAction(widgetAction, config, widgetForm); - var cov_2ph5xt9m43=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-targeted-widgets.js',hash='b0d9c8b2ee7fe9e722b2f58efd359072c66b9657',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-targeted-widgets.js',statementMap:{'0':{start:{line:18,column:11},end:{line:18,column:15}},'1':{start:{line:21,column:2},end:{line:21,column:33}},'2':{start:{line:23,column:2},end:{line:25,column:3}},'3':{start:{line:24,column:4},end:{line:24,column:54}},'4':{start:{line:28,column:2},end:{line:70,column:3}},'5':{start:{line:29,column:4},end:{line:69,column:7}},'6':{start:{line:30,column:6},end:{line:30,column:28}},'7':{start:{line:31,column:28},end:{line:31,column:30}},'8':{start:{line:32,column:21},end:{line:32,column:38}},'9':{start:{line:35,column:6},end:{line:44,column:7}},'10':{start:{line:36,column:8},end:{line:43,column:9}},'11':{start:{line:37,column:23},end:{line:37,column:40}},'12':{start:{line:38,column:10},end:{line:42,column:11}},'13':{start:{line:41,column:12},end:{line:41,column:69}},'14':{start:{line:47,column:6},end:{line:62,column:7}},'15':{start:{line:48,column:8},end:{line:61,column:9}},'16':{start:{line:49,column:24},end:{line:49,column:42}},'17':{start:{line:50,column:10},end:{line:60,column:11}},'18':{start:{line:53,column:12},end:{line:59,column:13}},'19':{start:{line:54,column:14},end:{line:58,column:15}},'20':{start:{line:55,column:16},end:{line:57,column:17}},'21':{start:{line:56,column:18},end:{line:56,column:47}},'22':{start:{line:64,column:6},end:{line:68,column:7}},'23':{start:{line:65,column:8},end:{line:65,column:59}},'24':{start:{line:66,column:13},end:{line:68,column:7}},'25':{start:{line:67,column:8},end:{line:67,column:59}}},fnMap:{'0':{name:'initializeTargetedWidgets',decl:{start:{line:17,column:24},end:{line:17,column:49}},loc:{start:{line:17,column:69},end:{line:71,column:1}},line:17},'1':{name:'(anonymous_1)',decl:{start:{line:29,column:19},end:{line:29,column:20}},loc:{start:{line:29,column:31},end:{line:69,column:5}},line:29}},branchMap:{'0':{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23},'1':{loc:{start:{line:28,column:2},end:{line:70,column:3}},type:'if',locations:[{start:{line:28,column:2},end:{line:70,column:3}},{start:{line:28,column:2},end:{line:70,column:3}}],line:28},'2':{loc:{start:{line:28,column:6},end:{line:28,column:39}},type:'binary-expr',locations:[{start:{line:28,column:6},end:{line:28,column:20}},{start:{line:28,column:24},end:{line:28,column:39}}],line:28},'3':{loc:{start:{line:35,column:6},end:{line:44,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:44,column:7}},{start:{line:35,column:6},end:{line:44,column:7}}],line:35},'4':{loc:{start:{line:38,column:10},end:{line:42,column:11}},type:'if',locations:[{start:{line:38,column:10},end:{line:42,column:11}},{start:{line:38,column:10},end:{line:42,column:11}}],line:38},'5':{loc:{start:{line:38,column:14},end:{line:38,column:65}},type:'binary-expr',locations:[{start:{line:38,column:14},end:{line:38,column:22}},{start:{line:38,column:26},end:{line:38,column:65}}],line:38},'6':{loc:{start:{line:47,column:6},end:{line:62,column:7}},type:'if',locations:[{start:{line:47,column:6},end:{line:62,column:7}},{start:{line:47,column:6},end:{line:62,column:7}}],line:47},'7':{loc:{start:{line:50,column:10},end:{line:60,column:11}},type:'if',locations:[{start:{line:50,column:10},end:{line:60,column:11}},{start:{line:50,column:10},end:{line:60,column:11}}],line:50},'8':{loc:{start:{line:50,column:14},end:{line:50,column:66}},type:'binary-expr',locations:[{start:{line:50,column:14},end:{line:50,column:22}},{start:{line:50,column:26},end:{line:50,column:66}}],line:50},'9':{loc:{start:{line:55,column:16},end:{line:57,column:17}},type:'if',locations:[{start:{line:55,column:16},end:{line:57,column:17}},{start:{line:55,column:16},end:{line:57,column:17}}],line:55},'10':{loc:{start:{line:64,column:6},end:{line:68,column:7}},type:'if',locations:[{start:{line:64,column:6},end:{line:68,column:7}},{start:{line:64,column:6},end:{line:68,column:7}}],line:64},'11':{loc:{start:{line:66,column:13},end:{line:68,column:7}},type:'if',locations:[{start:{line:66,column:13},end:{line:68,column:7}},{start:{line:66,column:13},end:{line:68,column:7}}],line:66}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeTargetedWidgets(widgets,options){cov_2ph5xt9m43.f[0]++;var pf=(cov_2ph5xt9m43.s[0]++,this),i;cov_2ph5xt9m43.s[1]++;validateWidgetsObject(widgets);cov_2ph5xt9m43.s[2]++;if(widgets.common){cov_2ph5xt9m43.b[0][0]++;cov_2ph5xt9m43.s[3]++;pf.initializeWidgetArray(widgets.common,options);}else{cov_2ph5xt9m43.b[0][1]++;}cov_2ph5xt9m43.s[4]++;if((cov_2ph5xt9m43.b[2][0]++,widgets.target)||(cov_2ph5xt9m43.b[2][1]++,widgets.exclude)){cov_2ph5xt9m43.b[1][0]++;cov_2ph5xt9m43.s[5]++;pf.addCallback(function(){cov_2ph5xt9m43.f[1]++;cov_2ph5xt9m43.s[6]++;validateAccountId(pf);var targetedWidgets=(cov_2ph5xt9m43.s[7]++,[]),segments=(cov_2ph5xt9m43.s[8]++,getUserSegments());cov_2ph5xt9m43.s[9]++;if(widgets.target){cov_2ph5xt9m43.b[3][0]++;cov_2ph5xt9m43.s[10]++;for(i=0;i0){cov_1btou8obd2.b[6][0]++;cov_1btou8obd2.s[12]++;sessionStorage.setItem(PREFIX_REC+id,encodeURIComponent(JSON.stringify(rec.data)));cov_1btou8obd2.s[13]++;callback(rec.data);}else{cov_1btou8obd2.b[6][1]++;}cov_1btou8obd2.s[14]++;return;}else{cov_1btou8obd2.b[3][1]++;}}else{cov_1btou8obd2.b[1][1]++;}var storedCookieName=(cov_1btou8obd2.s[15]++,'seerid');var userByFieldName=(cov_1btou8obd2.s[16]++,'_uids');var userByFieldValue;cov_1btou8obd2.s[17]++;if((cov_1btou8obd2.b[8][0]++,window.jstag)&&(cov_1btou8obd2.b[8][1]++,window.jstag.config)&&(cov_1btou8obd2.b[8][2]++,window.jstag.config.cookie!=='')){cov_1btou8obd2.b[7][0]++;cov_1btou8obd2.s[18]++;storedCookieName=window.jstag.config.cookie;}else{cov_1btou8obd2.b[7][1]++;}cov_1btou8obd2.s[19]++;userByFieldValue=readCookie(storedCookieName);cov_1btou8obd2.s[20]++;if((cov_1btou8obd2.b[10][0]++,window.liosetup)&&(cov_1btou8obd2.b[10][1]++,window.liosetup.field)&&(cov_1btou8obd2.b[10][2]++,window.liosetup.field!=='')&&(cov_1btou8obd2.b[10][3]++,window.liosetup.value)&&(cov_1btou8obd2.b[10][4]++,window.liosetup.value!=='')){cov_1btou8obd2.b[9][0]++;cov_1btou8obd2.s[21]++;userByFieldName=window.liosetup.field;cov_1btou8obd2.s[22]++;userByFieldValue=window.liosetup.value;}else{cov_1btou8obd2.b[9][1]++;}cov_1btou8obd2.s[23]++;if((cov_1btou8obd2.b[12][0]++,!userByFieldName)&&(cov_1btou8obd2.b[12][1]++,!userByFieldValue)){cov_1btou8obd2.b[11][0]++;cov_1btou8obd2.s[24]++;console.warn('Could not determine BY field and value from config');cov_1btou8obd2.s[25]++;callback([]);}else{cov_1btou8obd2.b[11][1]++;}var recommendParts=(cov_1btou8obd2.s[26]++,[API_URL,'api','content','recommend',accountId,'user',userByFieldName,userByFieldValue]);var ql=(cov_1btou8obd2.s[27]++,params.ql),ast=(cov_1btou8obd2.s[28]++,params.ast),display=(cov_1btou8obd2.s[29]++,params.display);cov_1btou8obd2.s[30]++;delete params.ql;cov_1btou8obd2.s[31]++;delete params.ast;cov_1btou8obd2.s[32]++;delete params.display;var queries=(cov_1btou8obd2.s[33]++,constructQueries(params));cov_1btou8obd2.s[34]++;params.display=display;cov_1btou8obd2.s[35]++;if(!params.contentsegment){cov_1btou8obd2.b[13][0]++;cov_1btou8obd2.s[36]++;if((cov_1btou8obd2.b[15][0]++,ql)&&(cov_1btou8obd2.b[15][1]++,ql.raw)||(cov_1btou8obd2.b[15][2]++,ast)){cov_1btou8obd2.b[14][0]++;cov_1btou8obd2.s[37]++;if(queries.length>0){cov_1btou8obd2.b[16][0]++;cov_1btou8obd2.s[38]++;queries+='&';}else{cov_1btou8obd2.b[16][1]++;cov_1btou8obd2.s[39]++;queries+='?';}cov_1btou8obd2.s[40]++;if((cov_1btou8obd2.b[18][0]++,ql)&&(cov_1btou8obd2.b[18][1]++,ql.raw)){cov_1btou8obd2.b[17][0]++;cov_1btou8obd2.s[41]++;queries+='ql='+ql.raw;}else{cov_1btou8obd2.b[17][1]++;var contentSegment=(cov_1btou8obd2.s[42]++,{table:'content',ast:ast});cov_1btou8obd2.s[43]++;queries+='contentsegments=['+encodeURIComponent(JSON.stringify(contentSegment))+']';}}else{cov_1btou8obd2.b[14][1]++;}}else{cov_1btou8obd2.b[13][1]++;}var recommendUrl=(cov_1btou8obd2.s[44]++,recommendParts.join('/')+queries);cov_1btou8obd2.s[45]++;getData(recommendUrl,function(json){cov_1btou8obd2.f[1]++;var resp;cov_1btou8obd2.s[46]++;try{cov_1btou8obd2.s[47]++;resp=JSON.parse(json);}catch(e){cov_1btou8obd2.s[48]++;console.warn('Could not parse json response:'+e);cov_1btou8obd2.s[49]++;callback([]);cov_1btou8obd2.s[50]++;return;}cov_1btou8obd2.s[51]++;if((cov_1btou8obd2.b[20][0]++,resp.data)&&(cov_1btou8obd2.b[20][1]++,resp.data.length>0)){cov_1btou8obd2.b[19][0]++;cov_1btou8obd2.s[52]++;for(var i=0;i1){cov_1btou8obd2.b[22][0]++;cov_1btou8obd2.s[57]++;resp.data[i].url='http://'+url;}else{cov_1btou8obd2.b[22][1]++;}}else{cov_1btou8obd2.b[21][1]++;}}cov_1btou8obd2.s[58]++;sessionStorage.setItem(PREFIX_REC+id,encodeURIComponent(JSON.stringify(resp)));cov_1btou8obd2.s[59]++;callback(resp.data);}else{cov_1btou8obd2.b[19][1]++;cov_1btou8obd2.s[60]++;callback([]);}},function(){cov_1btou8obd2.f[2]++;cov_1btou8obd2.s[61]++;callback([]);});} + if (shouldClose) { + if ( + config.layout !== 'inline' && + (!config.formStates || !config.formStates.success) + ) { + closeWidget(widget.id, true); + widgetOnModalClose(widget, config, event); + } else { + // show success state + handleFormStates(true, widget, config); + } + } + }; + } - var cov_ih684mxdh=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/set-widget-content.js',hash='e1e38c8e15708b1f5626774ff18c306b77a852b2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/set-widget-content.js',statementMap:{'0':{start:{line:16,column:15},end:{line:16,column:31}},'1':{start:{line:18,column:2},end:{line:21,column:3}},'2':{start:{line:19,column:4},end:{line:19,column:56}},'3':{start:{line:20,column:4},end:{line:20,column:29}},'4':{start:{line:23,column:2},end:{line:47,column:5}},'5':{start:{line:26,column:4},end:{line:38,column:5}},'6':{start:{line:27,column:20},end:{line:27,column:27}},'7':{start:{line:28,column:6},end:{line:37,column:8}},'8':{start:{line:42,column:4},end:{line:44,column:5}},'9':{start:{line:43,column:6},end:{line:43,column:77}},'10':{start:{line:46,column:4},end:{line:46,column:9}}},fnMap:{'0':{name:'setWidgetContent',decl:{start:{line:15,column:24},end:{line:15,column:40}},loc:{start:{line:15,column:65},end:{line:48,column:1}},line:15},'1':{name:'(anonymous_1)',decl:{start:{line:23,column:49},end:{line:23,column:50}},loc:{start:{line:23,column:65},end:{line:47,column:3}},line:23}},branchMap:{'0':{loc:{start:{line:18,column:2},end:{line:21,column:3}},type:'if',locations:[{start:{line:18,column:2},end:{line:21,column:3}},{start:{line:18,column:2},end:{line:21,column:3}}],line:18},'1':{loc:{start:{line:18,column:6},end:{line:18,column:33}},type:'binary-expr',locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:33}}],line:18},'2':{loc:{start:{line:26,column:4},end:{line:38,column:5}},type:'if',locations:[{start:{line:26,column:4},end:{line:38,column:5}},{start:{line:26,column:4},end:{line:38,column:5}}],line:26},'3':{loc:{start:{line:42,column:4},end:{line:44,column:5}},type:'if',locations:[{start:{line:42,column:4},end:{line:44,column:5}},{start:{line:42,column:4},end:{line:44,column:5}}],line:42}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function setWidgetContent(accountId,widget,cb){cov_ih684mxdh.f[0]++;var params=(cov_ih684mxdh.s[0]++,widget.recommend);cov_ih684mxdh.s[1]++;if((cov_ih684mxdh.b[1][0]++,params)&&(cov_ih684mxdh.b[1][1]++,params.collection)){cov_ih684mxdh.b[0][0]++;cov_ih684mxdh.s[2]++;params.contentsegment=widget.recommend.collection;cov_ih684mxdh.s[3]++;delete params.collection;}else{cov_ih684mxdh.b[0][1]++;}cov_ih684mxdh.s[4]++;recommendContent(accountId,params,widget.id,function(resp){cov_ih684mxdh.f[1]++;cov_ih684mxdh.s[5]++;if(resp[0]){cov_ih684mxdh.b[2][0]++;var content=(cov_ih684mxdh.s[6]++,resp[0]);cov_ih684mxdh.s[7]++;widget.content=[{title:content.title,description:content.description,url:content.url,image:content.primary_image,date:content.created,author:content.author}];}else{cov_ih684mxdh.b[2][1]++;}cov_ih684mxdh.s[8]++;if(!widget.content){cov_ih684mxdh.b[3][0]++;cov_ih684mxdh.s[9]++;throw new Error('Could not get recommendation and no default defined');}else{cov_ih684mxdh.b[3][1]++;}cov_ih684mxdh.s[10]++;cb();});} + if (widgetReco) { + widgetReco.onmouseenter = function (event) { + trackWidgetAction('hover', config, event.target); + }; - var cov_69tgys6jw=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/validation/validate-recommendation-widget.js',hash='0d37004970cc7e8e85150d9c725ba316c4f00d34',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/validation/validate-recommendation-widget.js',statementMap:{'0':{start:{line:12,column:2},end:{line:14,column:3}},'1':{start:{line:13,column:4},end:{line:13,column:74}},'2':{start:{line:16,column:2},end:{line:22,column:3}},'3':{start:{line:21,column:4},end:{line:21,column:69}},'4':{start:{line:24,column:2},end:{line:26,column:3}},'5':{start:{line:25,column:4},end:{line:25,column:80}}},fnMap:{'0':{name:'validateRecommendationWidget',decl:{start:{line:10,column:24},end:{line:10,column:52}},loc:{start:{line:10,column:62},end:{line:27,column:1}},line:10}},branchMap:{'0':{loc:{start:{line:12,column:2},end:{line:14,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:14,column:3}},{start:{line:12,column:2},end:{line:14,column:3}}],line:12},'1':{loc:{start:{line:16,column:2},end:{line:22,column:3}},type:'if',locations:[{start:{line:16,column:2},end:{line:22,column:3}},{start:{line:16,column:2},end:{line:22,column:3}}],line:16},'2':{loc:{start:{line:17,column:4},end:{line:19,column:30}},type:'binary-expr',locations:[{start:{line:17,column:4},end:{line:17,column:32}},{start:{line:18,column:4},end:{line:18,column:29}},{start:{line:19,column:4},end:{line:19,column:30}}],line:17},'3':{loc:{start:{line:24,column:2},end:{line:26,column:3}},type:'if',locations:[{start:{line:24,column:2},end:{line:26,column:3}},{start:{line:24,column:2},end:{line:26,column:3}}],line:24},'4':{loc:{start:{line:24,column:6},end:{line:24,column:71}},type:'binary-expr',locations:[{start:{line:24,column:6},end:{line:24,column:20}},{start:{line:24,column:24},end:{line:24,column:41}},{start:{line:24,column:45},end:{line:24,column:71}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0,0],'3':[0,0],'4':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function validateRecommendationWidget(widget){cov_69tgys6jw.f[0]++;cov_69tgys6jw.s[0]++;if(widget.type!=='message'){cov_69tgys6jw.b[0][0]++;cov_69tgys6jw.s[1]++;throw new Error('Unsupported widget type for content recommendation');}else{cov_69tgys6jw.b[0][1]++;}cov_69tgys6jw.s[2]++;if((cov_69tgys6jw.b[2][0]++,widget.layout!=='slideout')&&(cov_69tgys6jw.b[2][1]++,widget.layout!=='modal')&&(cov_69tgys6jw.b[2][2]++,widget.layout!=='inline')){cov_69tgys6jw.b[1][0]++;cov_69tgys6jw.s[3]++;throw new Error('Unsupported layout for content recommendation');}else{cov_69tgys6jw.b[1][1]++;}cov_69tgys6jw.s[4]++;if((cov_69tgys6jw.b[4][0]++,widget.content)&&(cov_69tgys6jw.b[4][1]++,widget.content[0])&&(cov_69tgys6jw.b[4][2]++,!widget.content[0].default)){cov_69tgys6jw.b[3][0]++;cov_69tgys6jw.s[5]++;throw new Error('Cannot define recommended content unless it is a default');}else{cov_69tgys6jw.b[3][1]++;}} + widgetReco.onclick = function (event) { + trackWidgetAction('confirm', config, event.target); + updateActionCookie(PREFIX_CONFIRM + widget.id, config.expiration); + }; + } + } - var cov_kqu4ke1zg=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/preload-recommendation.js',hash='1f23983a04e4dc24f7884f69602dbbfb56a1ebe5',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/recommendations/preload-recommendation.js',statementMap:{'0':{start:{line:20,column:2},end:{line:25,column:3}},'1':{start:{line:21,column:4},end:{line:21,column:41}},'2':{start:{line:22,column:4},end:{line:22,column:44}},'3':{start:{line:24,column:4},end:{line:24,column:9}}},fnMap:{'0':{name:'preloadRecommendation',decl:{start:{line:19,column:24},end:{line:19,column:45}},loc:{start:{line:19,column:63},end:{line:26,column:1}},line:19}},branchMap:{'0':{loc:{start:{line:20,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:20,column:2},end:{line:25,column:3}},{start:{line:20,column:2},end:{line:25,column:3}}],line:20}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function preloadRecommendation(widget,pf,cb){cov_kqu4ke1zg.f[0]++;cov_kqu4ke1zg.s[0]++;if(hasRecommend(widget)){cov_kqu4ke1zg.b[0][0]++;cov_kqu4ke1zg.s[1]++;validateRecommendationWidget(widget);cov_kqu4ke1zg.s[2]++;setWidgetContent(pf.acctid,widget,cb);}else{cov_kqu4ke1zg.b[0][1]++;cov_kqu4ke1zg.s[3]++;cb();}} + /** @module pathfora/widgets/recommendation/setup-widget-content-unit */ - var cov_kmsq8bev8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget-array.js',hash='2cb980a6b67cfefb873c610b49f61228a17be652',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget-array.js',statementMap:{'0':{start:{line:25,column:11},end:{line:25,column:15}},'1':{start:{line:26,column:2},end:{line:26,column:40}},'2':{start:{line:28,column:19},end:{line:77,column:3}},'3':{start:{line:29,column:4},end:{line:31,column:5}},'4':{start:{line:30,column:6},end:{line:30,column:13}},'5':{start:{line:33,column:17},end:{line:33,column:35}},'6':{start:{line:34,column:19},end:{line:34,column:44}},'7':{start:{line:35,column:18},end:{line:35,column:38}},'8':{start:{line:37,column:4},end:{line:37,column:34}},'9':{start:{line:38,column:4},end:{line:38,column:35}},'10':{start:{line:39,column:4},end:{line:39,column:40}},'11':{start:{line:41,column:4},end:{line:45,column:5}},'12':{start:{line:42,column:6},end:{line:42,column:55}},'13':{start:{line:44,column:6},end:{line:44,column:65}},'14':{start:{line:48,column:4},end:{line:56,column:5}},'15':{start:{line:49,column:6},end:{line:51,column:7}},'16':{start:{line:50,column:8},end:{line:50,column:31}},'17':{start:{line:53,column:6},end:{line:55,column:7}},'18':{start:{line:54,column:8},end:{line:54,column:51}},'19':{start:{line:58,column:4},end:{line:72,column:7}},'20':{start:{line:59,column:6},end:{line:71,column:9}},'21':{start:{line:60,column:8},end:{line:60,column:49}},'22':{start:{line:61,column:8},end:{line:70,column:9}},'23':{start:{line:62,column:10},end:{line:67,column:11}},'24':{start:{line:66,column:12},end:{line:66,column:19}},'25':{start:{line:69,column:10},end:{line:69,column:58}},'26':{start:{line:74,column:4},end:{line:76,column:5}},'27':{start:{line:75,column:6},end:{line:75,column:54}},'28':{start:{line:79,column:2},end:{line:79,column:32}}},fnMap:{'0':{name:'initializeWidgetArray',decl:{start:{line:24,column:24},end:{line:24,column:45}},loc:{start:{line:24,column:63},end:{line:80,column:1}},line:24},'1':{name:'(anonymous_1)',decl:{start:{line:28,column:19},end:{line:28,column:20}},loc:{start:{line:28,column:62},end:{line:77,column:3}},line:28},'2':{name:'(anonymous_2)',decl:{start:{line:58,column:27},end:{line:58,column:28}},loc:{start:{line:58,column:39},end:{line:72,column:5}},line:58},'3':{name:'(anonymous_3)',decl:{start:{line:59,column:40},end:{line:59,column:41}},loc:{start:{line:59,column:52},end:{line:71,column:7}},line:59}},branchMap:{'0':{loc:{start:{line:29,column:4},end:{line:31,column:5}},type:'if',locations:[{start:{line:29,column:4},end:{line:31,column:5}},{start:{line:29,column:4},end:{line:31,column:5}}],line:29},'1':{loc:{start:{line:41,column:4},end:{line:45,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:45,column:5}},{start:{line:41,column:4},end:{line:45,column:5}}],line:41},'2':{loc:{start:{line:48,column:4},end:{line:56,column:5}},type:'if',locations:[{start:{line:48,column:4},end:{line:56,column:5}},{start:{line:48,column:4},end:{line:56,column:5}}],line:48},'3':{loc:{start:{line:49,column:6},end:{line:51,column:7}},type:'if',locations:[{start:{line:49,column:6},end:{line:51,column:7}},{start:{line:49,column:6},end:{line:51,column:7}}],line:49},'4':{loc:{start:{line:53,column:6},end:{line:55,column:7}},type:'if',locations:[{start:{line:53,column:6},end:{line:55,column:7}},{start:{line:53,column:6},end:{line:55,column:7}}],line:53},'5':{loc:{start:{line:61,column:8},end:{line:70,column:9}},type:'if',locations:[{start:{line:61,column:8},end:{line:70,column:9}},{start:{line:61,column:8},end:{line:70,column:9}}],line:61},'6':{loc:{start:{line:61,column:12},end:{line:61,column:76}},type:'binary-expr',locations:[{start:{line:61,column:12},end:{line:61,column:23}},{start:{line:61,column:27},end:{line:61,column:76}}],line:61},'7':{loc:{start:{line:62,column:10},end:{line:67,column:11}},type:'if',locations:[{start:{line:62,column:10},end:{line:67,column:11}},{start:{line:62,column:10},end:{line:67,column:11}}],line:62},'8':{loc:{start:{line:63,column:12},end:{line:64,column:64}},type:'binary-expr',locations:[{start:{line:63,column:12},end:{line:63,column:51}},{start:{line:64,column:12},end:{line:64,column:64}}],line:63},'9':{loc:{start:{line:74,column:4},end:{line:76,column:5}},type:'if',locations:[{start:{line:74,column:4},end:{line:76,column:5}},{start:{line:74,column:4},end:{line:76,column:5}}],line:74},'10':{loc:{start:{line:74,column:8},end:{line:74,column:73}},type:'binary-expr',locations:[{start:{line:74,column:8},end:{line:74,column:20}},{start:{line:74,column:24},end:{line:74,column:73}}],line:74}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeWidgetArray(array,options){cov_kmsq8bev8.f[0]++;var pf=(cov_kmsq8bev8.s[0]++,this);cov_kmsq8bev8.s[1]++;widgetTracker.prioritizedWidgets=[];cov_kmsq8bev8.s[2]++;var initWidget=function(widgetArray,index,initOptions){cov_kmsq8bev8.f[1]++;cov_kmsq8bev8.s[3]++;if(index>=widgetArray.length){cov_kmsq8bev8.b[0][0]++;cov_kmsq8bev8.s[4]++;return;}else{cov_kmsq8bev8.b[0][1]++;}var widget=(cov_kmsq8bev8.s[5]++,widgetArray[index]),defaults=(cov_kmsq8bev8.s[6]++,defaultProps[widget.type]),globals=(cov_kmsq8bev8.s[7]++,defaultProps.generic);cov_kmsq8bev8.s[8]++;updateObject(widget,globals);cov_kmsq8bev8.s[9]++;updateObject(widget,defaults);cov_kmsq8bev8.s[10]++;updateObject(widget,widget.config);cov_kmsq8bev8.s[11]++;if(widgetTracker.initializedWidgets.indexOf(widget.id)<0){cov_kmsq8bev8.b[1][0]++;cov_kmsq8bev8.s[12]++;widgetTracker.initializedWidgets.push(widget.id);}else{cov_kmsq8bev8.b[1][1]++;cov_kmsq8bev8.s[13]++;throw new Error('Cannot add two widgets with the same id');}cov_kmsq8bev8.s[14]++;if(widget.success){cov_kmsq8bev8.b[2][0]++;cov_kmsq8bev8.s[15]++;if(!widget.formStates){cov_kmsq8bev8.b[3][0]++;cov_kmsq8bev8.s[16]++;widget.formStates={};}else{cov_kmsq8bev8.b[3][1]++;}cov_kmsq8bev8.s[17]++;if(!widget.formStates.success){cov_kmsq8bev8.b[4][0]++;cov_kmsq8bev8.s[18]++;widget.formStates.success=widget.success;}else{cov_kmsq8bev8.b[4][1]++;}}else{cov_kmsq8bev8.b[2][1]++;}cov_kmsq8bev8.s[19]++;preloadLio(widget,pf,function(){cov_kmsq8bev8.f[2]++;cov_kmsq8bev8.s[20]++;preloadRecommendation(widget,pf,function(){cov_kmsq8bev8.f[3]++;cov_kmsq8bev8.s[21]++;pf.initializeWidget(widget,initOptions);cov_kmsq8bev8.s[22]++;if((cov_kmsq8bev8.b[6][0]++,initOptions)&&(cov_kmsq8bev8.b[6][1]++,initOptions.priority===OPTIONS_PRIORITY_ORDERED)){cov_kmsq8bev8.b[5][0]++;cov_kmsq8bev8.s[23]++;if((cov_kmsq8bev8.b[8][0]++,widgetTracker.prioritizedWidgets.length)&&(cov_kmsq8bev8.b[8][1]++,widgetTracker.prioritizedWidgets[0].id===widget.id)){cov_kmsq8bev8.b[7][0]++;cov_kmsq8bev8.s[24]++;return;}else{cov_kmsq8bev8.b[7][1]++;}cov_kmsq8bev8.s[25]++;initWidget(widgetArray,index+1,initOptions);}else{cov_kmsq8bev8.b[5][1]++;}});});cov_kmsq8bev8.s[26]++;if((cov_kmsq8bev8.b[10][0]++,!initOptions)||(cov_kmsq8bev8.b[10][1]++,initOptions.priority!==OPTIONS_PRIORITY_ORDERED)){cov_kmsq8bev8.b[9][0]++;cov_kmsq8bev8.s[27]++;initWidget(widgetArray,index+1,initOptions);}else{cov_kmsq8bev8.b[9][1]++;}};cov_kmsq8bev8.s[28]++;initWidget(array,0,options);} + /** + * Setup HTML for a widget with content recommendations + * + * @exports setupWidgetContentUnit + * @params {object} widget + * @params {object} config + */ + function setupWidgetContentUnit (widget, config) { + var widgetContentUnit = widget.querySelector('.pf-content-unit'), + settings = config.recommend; - var cov_asbi0800l=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js',hash='8fbdbfdbd7ed43bc0f01f77d8e1b86f99e6ed67d',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js',statementMap:{'0':{start:{line:26,column:2},end:{line:28,column:3}},'1':{start:{line:27,column:4},end:{line:27,column:16}},'2':{start:{line:32,column:19},end:{line:32,column:52}},'3':{start:{line:33,column:13},end:{line:33,column:18}},'4':{start:{line:36,column:2},end:{line:41,column:3}},'5':{start:{line:37,column:4},end:{line:37,column:31}},'6':{start:{line:38,column:4},end:{line:38,column:72}},'7':{start:{line:39,column:4},end:{line:39,column:57}},'8':{start:{line:40,column:4},end:{line:40,column:16}},'9':{start:{line:44,column:2},end:{line:112,column:3}},'10':{start:{line:46,column:19},end:{line:46,column:49}},'11':{start:{line:47,column:16},end:{line:47,column:35}},'12':{start:{line:48,column:14},end:{line:48,column:16}},'13':{start:{line:51,column:4},end:{line:53,column:5}},'14':{start:{line:52,column:6},end:{line:52,column:28}},'15':{start:{line:56,column:16},end:{line:56,column:42}},'16':{start:{line:65,column:4},end:{line:74,column:5}},'17':{start:{line:66,column:6},end:{line:66,column:32}},'18':{start:{line:68,column:11},end:{line:74,column:5}},'19':{start:{line:70,column:19},end:{line:70,column:43}},'20':{start:{line:71,column:6},end:{line:73,column:7}},'21':{start:{line:72,column:8},end:{line:72,column:35}},'22':{start:{line:77,column:4},end:{line:81,column:5}},'23':{start:{line:78,column:6},end:{line:80,column:7}},'24':{start:{line:79,column:8},end:{line:79,column:36}},'25':{start:{line:84,column:4},end:{line:92,column:5}},'26':{start:{line:85,column:6},end:{line:85,column:27}},'27':{start:{line:87,column:6},end:{line:91,column:7}},'28':{start:{line:88,column:8},end:{line:90,column:9}},'29':{start:{line:89,column:10},end:{line:89,column:38}},'30':{start:{line:97,column:4},end:{line:108,column:5}},'31':{start:{line:98,column:6},end:{line:98,column:50}},'32':{start:{line:100,column:11},end:{line:108,column:5}},'33':{start:{line:104,column:6},end:{line:104,column:19}},'34':{start:{line:107,column:6},end:{line:107,column:46}},'35':{start:{line:110,column:4},end:{line:110,column:43}},'36':{start:{line:111,column:4},end:{line:111,column:21}},'37':{start:{line:115,column:2},end:{line:123,column:3}},'38':{start:{line:116,column:4},end:{line:120,column:5}},'39':{start:{line:117,column:6},end:{line:117,column:79}},'40':{start:{line:119,column:6},end:{line:119,column:59}},'41':{start:{line:122,column:4},end:{line:122,column:42}},'42':{start:{line:125,column:2},end:{line:125,column:14}}},fnMap:{'0':{name:'replaceEntityField',decl:{start:{line:20,column:24},end:{line:20,column:42}},loc:{start:{line:25,column:2},end:{line:126,column:1}},line:25}},branchMap:{'0':{loc:{start:{line:26,column:2},end:{line:28,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:28,column:3}},{start:{line:26,column:2},end:{line:28,column:3}}],line:26},'1':{loc:{start:{line:26,column:6},end:{line:26,column:29}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:12}},{start:{line:26,column:16},end:{line:26,column:29}}],line:26},'2':{loc:{start:{line:36,column:2},end:{line:41,column:3}},type:'if',locations:[{start:{line:36,column:2},end:{line:41,column:3}},{start:{line:36,column:2},end:{line:41,column:3}}],line:36},'3':{loc:{start:{line:51,column:4},end:{line:53,column:5}},type:'if',locations:[{start:{line:51,column:4},end:{line:53,column:5}},{start:{line:51,column:4},end:{line:53,column:5}}],line:51},'4':{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:'if',locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},'5':{loc:{start:{line:65,column:8},end:{line:65,column:37}},type:'binary-expr',locations:[{start:{line:65,column:8},end:{line:65,column:18}},{start:{line:65,column:22},end:{line:65,column:37}}],line:65},'6':{loc:{start:{line:68,column:11},end:{line:74,column:5}},type:'if',locations:[{start:{line:68,column:11},end:{line:74,column:5}},{start:{line:68,column:11},end:{line:74,column:5}}],line:68},'7':{loc:{start:{line:68,column:15},end:{line:68,column:75}},type:'binary-expr',locations:[{start:{line:68,column:15},end:{line:68,column:27}},{start:{line:68,column:31},end:{line:68,column:75}}],line:68},'8':{loc:{start:{line:71,column:6},end:{line:73,column:7}},type:'if',locations:[{start:{line:71,column:6},end:{line:73,column:7}},{start:{line:71,column:6},end:{line:73,column:7}}],line:71},'9':{loc:{start:{line:71,column:10},end:{line:71,column:51}},type:'binary-expr',locations:[{start:{line:71,column:10},end:{line:71,column:16}},{start:{line:71,column:20},end:{line:71,column:31}},{start:{line:71,column:35},end:{line:71,column:51}}],line:71},'10':{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:'if',locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},'11':{loc:{start:{line:84,column:4},end:{line:92,column:5}},type:'if',locations:[{start:{line:84,column:4},end:{line:92,column:5}},{start:{line:84,column:4},end:{line:92,column:5}}],line:84},'12':{loc:{start:{line:88,column:8},end:{line:90,column:9}},type:'if',locations:[{start:{line:88,column:8},end:{line:90,column:9}},{start:{line:88,column:8},end:{line:90,column:9}}],line:88},'13':{loc:{start:{line:97,column:4},end:{line:108,column:5}},type:'if',locations:[{start:{line:97,column:4},end:{line:108,column:5}},{start:{line:97,column:4},end:{line:108,column:5}}],line:97},'14':{loc:{start:{line:100,column:11},end:{line:108,column:5}},type:'if',locations:[{start:{line:100,column:11},end:{line:108,column:5}},{start:{line:100,column:11},end:{line:108,column:5}}],line:100},'15':{loc:{start:{line:101,column:6},end:{line:102,column:59}},type:'binary-expr',locations:[{start:{line:101,column:7},end:{line:101,column:11}},{start:{line:101,column:15},end:{line:101,column:31}},{start:{line:102,column:6},end:{line:102,column:59}}],line:101},'16':{loc:{start:{line:115,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:115,column:2},end:{line:123,column:3}},{start:{line:115,column:2},end:{line:123,column:3}}],line:115},'17':{loc:{start:{line:116,column:4},end:{line:120,column:5}},type:'if',locations:[{start:{line:116,column:4},end:{line:120,column:5}},{start:{line:116,column:4},end:{line:120,column:5}}],line:116}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0,0],'16':[0,0],'17':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function replaceEntityField(widget,fieldName,found,customData){cov_asbi0800l.f[0]++;cov_asbi0800l.s[0]++;if((cov_asbi0800l.b[1][0]++,!found)||(cov_asbi0800l.b[1][1]++,!found.length)){cov_asbi0800l.b[0][0]++;cov_asbi0800l.s[1]++;return true;}else{cov_asbi0800l.b[0][1]++;}var fnParams,fn,currentVal=(cov_asbi0800l.s[2]++,getObjectValue(widget,fieldName)),isFn=(cov_asbi0800l.s[3]++,false);cov_asbi0800l.s[4]++;if(typeof currentVal==='function'){cov_asbi0800l.b[2][0]++;cov_asbi0800l.s[5]++;fn=currentVal.toString();cov_asbi0800l.s[6]++;currentVal=fn.substring(fn.indexOf('{')+1,fn.lastIndexOf('}'));cov_asbi0800l.s[7]++;fnParams=fn.match(/(function.+\()(.+(?=\)))(.+$)/);cov_asbi0800l.s[8]++;isFn=true;}else{cov_asbi0800l.b[2][1]++;}cov_asbi0800l.s[9]++;for(var f=0;f1){cov_asbi0800l.b[3][0]++;cov_asbi0800l.s[14]++;def=parts[1].trim();}else{cov_asbi0800l.b[3][1]++;}var split=(cov_asbi0800l.s[15]++,parts[0].trim().split('.'));var dataval;cov_asbi0800l.s[16]++;if((cov_asbi0800l.b[5][0]++,window.lio)&&(cov_asbi0800l.b[5][1]++,window.lio.data)){cov_asbi0800l.b[4][0]++;cov_asbi0800l.s[17]++;dataval=window.lio.data;}else{cov_asbi0800l.b[4][1]++;cov_asbi0800l.s[18]++;if((cov_asbi0800l.b[7][0]++,window.jstag)&&(cov_asbi0800l.b[7][1]++,typeof window.jstag.getEntity==='function')){cov_asbi0800l.b[6][0]++;var entity=(cov_asbi0800l.s[19]++,window.jstag.getEntity());cov_asbi0800l.s[20]++;if((cov_asbi0800l.b[9][0]++,entity)&&(cov_asbi0800l.b[9][1]++,entity.data)&&(cov_asbi0800l.b[9][2]++,entity.data.user)){cov_asbi0800l.b[8][0]++;cov_asbi0800l.s[21]++;dataval=entity.data.user;}else{cov_asbi0800l.b[8][1]++;}}else{cov_asbi0800l.b[6][1]++;}}var s;cov_asbi0800l.s[22]++;for(s=0;s 0) { + // The top recommendation should be default if we couldn't + // get one from the api + var rec = config.content[0], + recImage = document$1.createElement('div'), + recMeta = document$1.createElement('div'), + recTitle = document$1.createElement('h4'), + recDesc = document$1.createElement('p'), + recInfo = document$1.createElement('span'); - var cov_smgnlngmj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/entity-field-checker.js',hash='1c64a92461633b4313bfe4a2557e4316841cf3ea',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/entity-field-checker.js',statementMap:{'0':{start:{line:27,column:14},end:{line:27,column:18}},'1':{start:{line:29,column:2},end:{line:47,column:3}},'2':{start:{line:30,column:16},end:{line:30,column:60}},'3':{start:{line:31,column:21},end:{line:31,column:61}},'4':{start:{line:34,column:4},end:{line:36,column:5}},'5':{start:{line:35,column:6},end:{line:35,column:41}},'6':{start:{line:38,column:4},end:{line:46,column:5}},'7':{start:{line:39,column:6},end:{line:39,column:38}},'8':{start:{line:41,column:6},end:{line:45,column:7}},'9':{start:{line:42,column:8},end:{line:44,column:74}},'10':{start:{line:49,column:2},end:{line:49,column:15}}},fnMap:{'0':{name:'entityFieldChecker',decl:{start:{line:25,column:24},end:{line:25,column:42}},loc:{start:{line:25,column:64},end:{line:50,column:1}},line:25}},branchMap:{'0':{loc:{start:{line:34,column:4},end:{line:36,column:5}},type:'if',locations:[{start:{line:34,column:4},end:{line:36,column:5}},{start:{line:34,column:4},end:{line:36,column:5}}],line:34},'1':{loc:{start:{line:38,column:4},end:{line:46,column:5}},type:'if',locations:[{start:{line:38,column:4},end:{line:46,column:5}},{start:{line:38,column:4},end:{line:46,column:5}}],line:38},'2':{loc:{start:{line:41,column:6},end:{line:45,column:7}},type:'if',locations:[{start:{line:41,column:6},end:{line:45,column:7}},{start:{line:41,column:6},end:{line:45,column:7}}],line:41},'3':{loc:{start:{line:41,column:10},end:{line:41,column:35}},type:'binary-expr',locations:[{start:{line:41,column:10},end:{line:41,column:15}},{start:{line:41,column:19},end:{line:41,column:35}}],line:41},'4':{loc:{start:{line:43,column:10},end:{line:44,column:73}},type:'binary-expr',locations:[{start:{line:43,column:10},end:{line:43,column:15}},{start:{line:44,column:10},end:{line:44,column:73}}],line:43}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function entityFieldChecker(widget,customData){cov_smgnlngmj.f[0]++;var found,valid=(cov_smgnlngmj.s[0]++,true);cov_smgnlngmj.s[1]++;for(var i=0;i0)){cov_smgnlngmj.b[2][0]++;cov_smgnlngmj.s[9]++;valid=(cov_smgnlngmj.b[4][0]++,valid)&&(cov_smgnlngmj.b[4][1]++,replaceEntityField(widget,ENTITY_FIELDS[i],found,customData));}else{cov_smgnlngmj.b[2][1]++;}}else{cov_smgnlngmj.b[1][1]++;}}cov_smgnlngmj.s[10]++;return valid;} + widgetContentUnit.href = rec.url; - var cov_25iug3mcky=function(){var path="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/date-checker.js",hash="2a71b6f546a73218e940201594e551ea6177f8a0",Function=function(){}.constructor,global=new Function('return this')(),gcv="__coverage__",coverageData={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/date-checker.js",statementMap:{"0":{start:{line:12,column:14},end:{line:12,column:18}},"1":{start:{line:13,column:14},end:{line:13,column:24}},"2":{start:{line:15,column:2},end:{line:17,column:3}},"3":{start:{line:16,column:4},end:{line:16,column:18}},"4":{start:{line:19,column:2},end:{line:21,column:3}},"5":{start:{line:20,column:4},end:{line:20,column:18}},"6":{start:{line:23,column:2},end:{line:23,column:15}}},fnMap:{"0":{name:"dateChecker",decl:{start:{line:11,column:24},end:{line:11,column:35}},loc:{start:{line:11,column:43},end:{line:24,column:1}},line:11}},branchMap:{"0":{loc:{start:{line:15,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:17,column:3}},{start:{line:15,column:2},end:{line:17,column:3}}],line:15},"1":{loc:{start:{line:15,column:6},end:{line:15,column:64}},type:"binary-expr",locations:[{start:{line:15,column:6},end:{line:15,column:19}},{start:{line:15,column:23},end:{line:15,column:64}}],line:15},"2":{loc:{start:{line:19,column:2},end:{line:21,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:21,column:3}},{start:{line:19,column:2},end:{line:21,column:3}}],line:19},"3":{loc:{start:{line:19,column:6},end:{line:19,column:60}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:17}},{start:{line:19,column:21},end:{line:19,column:60}}],line:19}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},f:{"0":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function dateChecker(date){cov_25iug3mcky.f[0]++;var valid=(cov_25iug3mcky.s[0]++,true),today=(cov_25iug3mcky.s[1]++,Date.now());cov_25iug3mcky.s[2]++;if((cov_25iug3mcky.b[1][0]++,date.start_at)&&(cov_25iug3mcky.b[1][1]++,todaynew Date(date.end_at).getTime())){cov_25iug3mcky.b[2][0]++;cov_25iug3mcky.s[5]++;valid=false;}else{cov_25iug3mcky.b[2][1]++;}cov_25iug3mcky.s[6]++;return valid;} + // image div + if ( + rec.image && + (!settings.display || settings.display.image !== false) + ) { + recImage.className = 'pf-content-unit-img'; + recImage.style.backgroundImage = "url('" + rec.image + "')"; + widgetContentUnit.appendChild(recImage); + } - var cov_2bvearpmzj=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/page-visits-checker.js',hash='7f5990a1be6844abce2ad9a3e7c154a8ac998a99',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/pageviews/page-visits-checker.js',statementMap:{'0':{start:{line:16,column:2},end:{line:16,column:52}}},fnMap:{'0':{name:'pageVisitsChecker',decl:{start:{line:15,column:24},end:{line:15,column:41}},loc:{start:{line:15,column:63},end:{line:17,column:1}},line:15}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function pageVisitsChecker(pageVisitsRequired){cov_2bvearpmzj.f[0]++;cov_2bvearpmzj.s[0]++;return read(PF_PAGEVIEWS)>=pageVisitsRequired;} + recMeta.className = 'pf-content-unit-meta'; - var cov_21ecxs3fdh=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/hide-after-action-checker.js',hash='531449efe107ad18fea487af098815186eb8e8b7',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/hide-after-action-checker.js',statementMap:{'0':{start:{line:20,column:14},end:{line:20,column:18}},'1':{start:{line:21,column:12},end:{line:21,column:22}},'2':{start:{line:22,column:16},end:{line:22,column:48}},'3':{start:{line:23,column:15},end:{line:23,column:46}},'4':{start:{line:24,column:15},end:{line:24,column:45}},'5':{start:{line:26,column:2},end:{line:36,column:3}},'6':{start:{line:27,column:4},end:{line:27,column:31}},'7':{start:{line:29,column:4},end:{line:31,column:5}},'8':{start:{line:30,column:6},end:{line:30,column:20}},'9':{start:{line:33,column:4},end:{line:35,column:5}},'10':{start:{line:34,column:6},end:{line:34,column:20}},'11':{start:{line:38,column:2},end:{line:48,column:3}},'12':{start:{line:39,column:4},end:{line:39,column:30}},'13':{start:{line:41,column:4},end:{line:43,column:5}},'14':{start:{line:42,column:6},end:{line:42,column:20}},'15':{start:{line:45,column:4},end:{line:47,column:5}},'16':{start:{line:46,column:6},end:{line:46,column:20}},'17':{start:{line:50,column:2},end:{line:60,column:3}},'18':{start:{line:51,column:4},end:{line:51,column:30}},'19':{start:{line:53,column:4},end:{line:55,column:5}},'20':{start:{line:54,column:6},end:{line:54,column:20}},'21':{start:{line:57,column:4},end:{line:59,column:5}},'22':{start:{line:58,column:6},end:{line:58,column:20}},'23':{start:{line:62,column:2},end:{line:62,column:15}}},fnMap:{'0':{name:'hideAfterActionChecker',decl:{start:{line:18,column:24},end:{line:18,column:46}},loc:{start:{line:18,column:84},end:{line:63,column:1}},line:18}},branchMap:{'0':{loc:{start:{line:26,column:2},end:{line:36,column:3}},type:'if',locations:[{start:{line:26,column:2},end:{line:36,column:3}},{start:{line:26,column:2},end:{line:36,column:3}}],line:26},'1':{loc:{start:{line:26,column:6},end:{line:26,column:51}},type:'binary-expr',locations:[{start:{line:26,column:6},end:{line:26,column:40}},{start:{line:26,column:44},end:{line:26,column:51}}],line:26},'2':{loc:{start:{line:29,column:4},end:{line:31,column:5}},type:'if',locations:[{start:{line:29,column:4},end:{line:31,column:5}},{start:{line:29,column:4},end:{line:31,column:5}}],line:29},'3':{loc:{start:{line:33,column:4},end:{line:35,column:5}},type:'if',locations:[{start:{line:33,column:4},end:{line:35,column:5}},{start:{line:33,column:4},end:{line:35,column:5}}],line:33},'4':{loc:{start:{line:33,column:8},end:{line:33,column:122}},type:'binary-expr',locations:[{start:{line:33,column:8},end:{line:33,column:39}},{start:{line:33,column:43},end:{line:33,column:122}}],line:33},'5':{loc:{start:{line:38,column:2},end:{line:48,column:3}},type:'if',locations:[{start:{line:38,column:2},end:{line:48,column:3}},{start:{line:38,column:2},end:{line:48,column:3}}],line:38},'6':{loc:{start:{line:38,column:6},end:{line:38,column:49}},type:'binary-expr',locations:[{start:{line:38,column:6},end:{line:38,column:39}},{start:{line:38,column:43},end:{line:38,column:49}}],line:38},'7':{loc:{start:{line:41,column:4},end:{line:43,column:5}},type:'if',locations:[{start:{line:41,column:4},end:{line:43,column:5}},{start:{line:41,column:4},end:{line:43,column:5}}],line:41},'8':{loc:{start:{line:45,column:4},end:{line:47,column:5}},type:'if',locations:[{start:{line:45,column:4},end:{line:47,column:5}},{start:{line:45,column:4},end:{line:47,column:5}}],line:45},'9':{loc:{start:{line:45,column:8},end:{line:45,column:121}},type:'binary-expr',locations:[{start:{line:45,column:8},end:{line:45,column:39}},{start:{line:45,column:43},end:{line:45,column:121}}],line:45},'10':{loc:{start:{line:50,column:2},end:{line:60,column:3}},type:'if',locations:[{start:{line:50,column:2},end:{line:60,column:3}},{start:{line:50,column:2},end:{line:60,column:3}}],line:50},'11':{loc:{start:{line:50,column:6},end:{line:50,column:49}},type:'binary-expr',locations:[{start:{line:50,column:6},end:{line:50,column:39}},{start:{line:50,column:43},end:{line:50,column:49}}],line:50},'12':{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:'if',locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:53,column:4},end:{line:55,column:5}}],line:53},'13':{loc:{start:{line:57,column:4},end:{line:59,column:5}},type:'if',locations:[{start:{line:57,column:4},end:{line:59,column:5}},{start:{line:57,column:4},end:{line:59,column:5}}],line:57},'14':{loc:{start:{line:57,column:8},end:{line:57,column:121}},type:'binary-expr',locations:[{start:{line:57,column:8},end:{line:57,column:39}},{start:{line:57,column:43},end:{line:57,column:121}}],line:57}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function hideAfterActionChecker(hideAfterActionConstraints,widget){cov_21ecxs3fdh.f[0]++;var parts,valid=(cov_21ecxs3fdh.s[0]++,true),now=(cov_21ecxs3fdh.s[1]++,Date.now()),confirm=(cov_21ecxs3fdh.s[2]++,read(PREFIX_CONFIRM+widget.id)),cancel=(cov_21ecxs3fdh.s[3]++,read(PREFIX_CANCEL+widget.id)),closed=(cov_21ecxs3fdh.s[4]++,read(PREFIX_CLOSE+widget.id));cov_21ecxs3fdh.s[5]++;if((cov_21ecxs3fdh.b[1][0]++,hideAfterActionConstraints.confirm)&&(cov_21ecxs3fdh.b[1][1]++,confirm)){cov_21ecxs3fdh.b[0][0]++;cov_21ecxs3fdh.s[6]++;parts=confirm.split('|');cov_21ecxs3fdh.s[7]++;if(parseInt(parts[0],10)>=hideAfterActionConstraints.confirm.hideCount){cov_21ecxs3fdh.b[2][0]++;cov_21ecxs3fdh.s[8]++;valid=false;}else{cov_21ecxs3fdh.b[2][1]++;}cov_21ecxs3fdh.s[9]++;if((cov_21ecxs3fdh.b[4][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[4][1]++,Math.abs(parts[1]-now)/1000=hideAfterActionConstraints.cancel.hideCount){cov_21ecxs3fdh.b[7][0]++;cov_21ecxs3fdh.s[14]++;valid=false;}else{cov_21ecxs3fdh.b[7][1]++;}cov_21ecxs3fdh.s[15]++;if((cov_21ecxs3fdh.b[9][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[9][1]++,Math.abs(parts[1]-now)/1000=hideAfterActionConstraints.closed.hideCount){cov_21ecxs3fdh.b[12][0]++;cov_21ecxs3fdh.s[20]++;valid=false;}else{cov_21ecxs3fdh.b[12][1]++;}cov_21ecxs3fdh.s[21]++;if((cov_21ecxs3fdh.b[14][0]++,typeof parts[1]!=='undefined')&&(cov_21ecxs3fdh.b[14][1]++,Math.abs(parts[1]-now)/10001){cov_2kg5p7xgb2.b[0][0]++;cov_2kg5p7xgb2.s[3]++;pieces=pieces[1].split('&');cov_2kg5p7xgb2.s[4]++;for(var i=0;i1){cov_2kg5p7xgb2.b[1][0]++;cov_2kg5p7xgb2.s[7]++;if(pair[0]!=='lytics_variation_preview_id'){cov_2kg5p7xgb2.b[2][0]++;cov_2kg5p7xgb2.s[8]++;query[pair[0]]=pair[1];}else{cov_2kg5p7xgb2.b[2][1]++;}}else{cov_2kg5p7xgb2.b[1][1]++;}}}else{cov_2kg5p7xgb2.b[0][1]++;}cov_2kg5p7xgb2.s[9]++;return query;} + if ( + rec.author && + (settings.display && settings.display.author === true) + ) { + recInfo.innerHTML = 'by ' + rec.author; + } - var cov_m9cdeqi3q=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/compare-queries.js',hash='6b31b5af7daa2fe690db0e4aa7c85587a1ef5554',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/compare-queries.js',statementMap:{'0':{start:{line:13,column:2},end:{line:22,column:3}},'1':{start:{line:15,column:4},end:{line:17,column:5}},'2':{start:{line:16,column:6},end:{line:16,column:19}},'3':{start:{line:18,column:4},end:{line:18,column:10}},'4':{start:{line:21,column:4},end:{line:21,column:10}},'5':{start:{line:24,column:2},end:{line:28,column:3}},'6':{start:{line:25,column:4},end:{line:27,column:5}},'7':{start:{line:26,column:6},end:{line:26,column:19}},'8':{start:{line:30,column:2},end:{line:30,column:14}}},fnMap:{'0':{name:'compareQueries',decl:{start:{line:12,column:24},end:{line:12,column:38}},loc:{start:{line:12,column:65},end:{line:31,column:1}},line:12}},branchMap:{'0':{loc:{start:{line:13,column:2},end:{line:22,column:3}},type:'switch',locations:[{start:{line:14,column:2},end:{line:18,column:10}},{start:{line:20,column:2},end:{line:21,column:10}}],line:13},'1':{loc:{start:{line:15,column:4},end:{line:17,column:5}},type:'if',locations:[{start:{line:15,column:4},end:{line:17,column:5}},{start:{line:15,column:4},end:{line:17,column:5}}],line:15},'2':{loc:{start:{line:25,column:4},end:{line:27,column:5}},type:'if',locations:[{start:{line:25,column:4},end:{line:27,column:5}},{start:{line:25,column:4},end:{line:27,column:5}}],line:25},'3':{loc:{start:{line:25,column:8},end:{line:25,column:72}},type:'binary-expr',locations:[{start:{line:25,column:8},end:{line:25,column:38}},{start:{line:25,column:42},end:{line:25,column:72}}],line:25}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function compareQueries(query,matchQuery,rule){cov_m9cdeqi3q.f[0]++;cov_m9cdeqi3q.s[0]++;switch(rule){case'exact':cov_m9cdeqi3q.b[0][0]++;cov_m9cdeqi3q.s[1]++;if(Object.keys(matchQuery).length!==Object.keys(query).length){cov_m9cdeqi3q.b[1][0]++;cov_m9cdeqi3q.s[2]++;return false;}else{cov_m9cdeqi3q.b[1][1]++;}cov_m9cdeqi3q.s[3]++;break;default:cov_m9cdeqi3q.b[0][1]++;cov_m9cdeqi3q.s[4]++;break;}cov_m9cdeqi3q.s[5]++;for(var key in matchQuery){cov_m9cdeqi3q.s[6]++;if((cov_m9cdeqi3q.b[3][0]++,matchQuery.hasOwnProperty(key))&&(cov_m9cdeqi3q.b[3][1]++,matchQuery[key]!==query[key])){cov_m9cdeqi3q.b[2][0]++;cov_m9cdeqi3q.s[7]++;return false;}else{cov_m9cdeqi3q.b[2][1]++;}}cov_m9cdeqi3q.s[8]++;return true;} + if (rec.date && (settings.display && settings.display.date === true)) { + var published = new Date(rec.date), + locale = settings.display.locale, + dateOptions = settings.display.dateOptions; - var cov_fgqfjwrak=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/phrase-checker.js',hash='af30ca711d191e012d95056ca1c0b1ade6a75544',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/phrase-checker.js',statementMap:{'0':{start:{line:22,column:14},end:{line:22,column:19}},'1':{start:{line:25,column:2},end:{line:84,column:3}},'2':{start:{line:27,column:4},end:{line:29,column:5}},'3':{start:{line:28,column:6},end:{line:28,column:71}},'4':{start:{line:30,column:4},end:{line:30,column:10}},'5':{start:{line:33,column:4},end:{line:78,column:5}},'6':{start:{line:34,column:24},end:{line:34,column:70}},'7':{start:{line:36,column:6},end:{line:74,column:7}},'8':{start:{line:39,column:8},end:{line:41,column:9}},'9':{start:{line:40,column:10},end:{line:40,column:45}},'10':{start:{line:43,column:8},end:{line:45,column:9}},'11':{start:{line:44,column:10},end:{line:44,column:51}},'12':{start:{line:47,column:8},end:{line:49,column:9}},'13':{start:{line:48,column:10},end:{line:48,column:23}},'14':{start:{line:50,column:8},end:{line:50,column:14}},'15':{start:{line:54,column:8},end:{line:56,column:9}},'16':{start:{line:55,column:10},end:{line:55,column:81}},'17':{start:{line:57,column:8},end:{line:57,column:14}},'18':{start:{line:61,column:17},end:{line:61,column:41}},'19':{start:{line:63,column:8},end:{line:65,column:9}},'20':{start:{line:64,column:10},end:{line:64,column:23}},'21':{start:{line:66,column:8},end:{line:66,column:14}},'22':{start:{line:70,column:8},end:{line:72,column:9}},'23':{start:{line:71,column:10},end:{line:71,column:81}},'24':{start:{line:73,column:8},end:{line:73,column:14}},'25':{start:{line:77,column:6},end:{line:77,column:48}},'26':{start:{line:79,column:4},end:{line:79,column:10}},'27':{start:{line:82,column:4},end:{line:82,column:46}},'28':{start:{line:83,column:4},end:{line:83,column:10}},'29':{start:{line:86,column:2},end:{line:86,column:15}}},fnMap:{'0':{name:'phraseChecker',decl:{start:{line:21,column:24},end:{line:21,column:37}},loc:{start:{line:21,column:72},end:{line:87,column:1}},line:21}},branchMap:{'0':{loc:{start:{line:25,column:2},end:{line:84,column:3}},type:'switch',locations:[{start:{line:26,column:2},end:{line:30,column:10}},{start:{line:32,column:2},end:{line:79,column:10}},{start:{line:81,column:2},end:{line:83,column:10}}],line:25},'1':{loc:{start:{line:27,column:4},end:{line:29,column:5}},type:'if',locations:[{start:{line:27,column:4},end:{line:29,column:5}},{start:{line:27,column:4},end:{line:29,column:5}}],line:27},'2':{loc:{start:{line:33,column:4},end:{line:78,column:5}},type:'if',locations:[{start:{line:33,column:4},end:{line:78,column:5}},{start:{line:33,column:4},end:{line:78,column:5}}],line:33},'3':{loc:{start:{line:33,column:8},end:{line:33,column:36}},type:'binary-expr',locations:[{start:{line:33,column:8},end:{line:33,column:20}},{start:{line:33,column:24},end:{line:33,column:36}}],line:33},'4':{loc:{start:{line:36,column:6},end:{line:74,column:7}},type:'switch',locations:[{start:{line:38,column:6},end:{line:50,column:14}},{start:{line:53,column:6},end:{line:57,column:14}},{start:{line:60,column:6},end:{line:66,column:14}},{start:{line:69,column:6},end:{line:73,column:14}}],line:36},'5':{loc:{start:{line:39,column:8},end:{line:41,column:9}},type:'if',locations:[{start:{line:39,column:8},end:{line:41,column:9}},{start:{line:39,column:8},end:{line:41,column:9}}],line:39},'6':{loc:{start:{line:43,column:8},end:{line:45,column:9}},type:'if',locations:[{start:{line:43,column:8},end:{line:45,column:9}},{start:{line:43,column:8},end:{line:45,column:9}}],line:43},'7':{loc:{start:{line:47,column:8},end:{line:49,column:9}},type:'if',locations:[{start:{line:47,column:8},end:{line:49,column:9}},{start:{line:47,column:8},end:{line:49,column:9}}],line:47},'8':{loc:{start:{line:54,column:8},end:{line:56,column:9}},type:'if',locations:[{start:{line:54,column:8},end:{line:56,column:9}},{start:{line:54,column:8},end:{line:56,column:9}}],line:54},'9':{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:'if',locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},'10':{loc:{start:{line:70,column:8},end:{line:72,column:9}},type:'if',locations:[{start:{line:70,column:8},end:{line:72,column:9}},{start:{line:70,column:8},end:{line:72,column:9}}],line:70}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0},f:{'0':0},b:{'0':[0,0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0,0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function phraseChecker(phrase,url,simpleurl,queries){cov_fgqfjwrak.f[0]++;var valid=(cov_fgqfjwrak.s[0]++,false);cov_fgqfjwrak.s[1]++;switch(typeof phrase){case'string':cov_fgqfjwrak.b[0][0]++;cov_fgqfjwrak.s[2]++;if(url.indexOf(escapeURI(phrase.split('?')[0],{keepEscaped:true}))!==-1){cov_fgqfjwrak.b[1][0]++;cov_fgqfjwrak.s[3]++;valid=compareQueries(queries,parseQuery(phrase),'substring');}else{cov_fgqfjwrak.b[1][1]++;}cov_fgqfjwrak.s[4]++;break;case'object':cov_fgqfjwrak.b[0][1]++;cov_fgqfjwrak.s[5]++;if((cov_fgqfjwrak.b[3][0]++,phrase.match)&&(cov_fgqfjwrak.b[3][1]++,phrase.value)){cov_fgqfjwrak.b[2][0]++;var phraseValue=(cov_fgqfjwrak.s[6]++,escapeURI(phrase.value,{keepEscaped:true}));cov_fgqfjwrak.s[7]++;switch(phrase.match){case'simple':cov_fgqfjwrak.b[4][0]++;cov_fgqfjwrak.s[8]++;if(simpleurl.slice(-1)==='/'){cov_fgqfjwrak.b[5][0]++;cov_fgqfjwrak.s[9]++;simpleurl=simpleurl.slice(0,-1);}else{cov_fgqfjwrak.b[5][1]++;}cov_fgqfjwrak.s[10]++;if(phrase.value.slice(-1)==='/'){cov_fgqfjwrak.b[6][0]++;cov_fgqfjwrak.s[11]++;phrase.value=phrase.value.slice(0,-1);}else{cov_fgqfjwrak.b[6][1]++;}cov_fgqfjwrak.s[12]++;if(simpleurl===phrase.value){cov_fgqfjwrak.b[7][0]++;cov_fgqfjwrak.s[13]++;valid=true;}else{cov_fgqfjwrak.b[7][1]++;}cov_fgqfjwrak.s[14]++;break;case'exact':cov_fgqfjwrak.b[4][1]++;cov_fgqfjwrak.s[15]++;if(url.split('?')[0].replace(/\/$/,'')===phraseValue.split('?')[0].replace(/\/$/,'')){cov_fgqfjwrak.b[8][0]++;cov_fgqfjwrak.s[16]++;valid=compareQueries(queries,parseQuery(phraseValue),phrase.match);}else{cov_fgqfjwrak.b[8][1]++;}cov_fgqfjwrak.s[17]++;break;case'regex':cov_fgqfjwrak.b[4][2]++;var re=(cov_fgqfjwrak.s[18]++,new RegExp(phrase.value));cov_fgqfjwrak.s[19]++;if(re.test(url)){cov_fgqfjwrak.b[9][0]++;cov_fgqfjwrak.s[20]++;valid=true;}else{cov_fgqfjwrak.b[9][1]++;}cov_fgqfjwrak.s[21]++;break;default:cov_fgqfjwrak.b[4][3]++;cov_fgqfjwrak.s[22]++;if(url.indexOf(phraseValue.split('?')[0])!==-1){cov_fgqfjwrak.b[10][0]++;cov_fgqfjwrak.s[23]++;valid=compareQueries(queries,parseQuery(phraseValue),phrase.match);}else{cov_fgqfjwrak.b[10][1]++;}cov_fgqfjwrak.s[24]++;break;}}else{cov_fgqfjwrak.b[2][1]++;cov_fgqfjwrak.s[25]++;console.log('invalid display conditions');}cov_fgqfjwrak.s[26]++;break;default:cov_fgqfjwrak.b[0][2]++;cov_fgqfjwrak.s[27]++;console.log('invalid display conditions');cov_fgqfjwrak.s[28]++;break;}cov_fgqfjwrak.s[29]++;return valid;} + if (!locale && window.pathfora && window.pathfora.locale) { + locale = window.pathfora.locale; + } else if (!locale) { + locale = PF_LOCALE; + } - var cov_2o75h5ah43=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/url-checker.js',hash='722842b0bafbc22581a4f138b31f132763cdff5c',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/url-contains/url-checker.js',statementMap:{'0':{start:{line:19,column:12},end:{line:19,column:66}},'1':{start:{line:20,column:18},end:{line:20,column:69}},'2':{start:{line:21,column:16},end:{line:21,column:31}},'3':{start:{line:22,column:14},end:{line:22,column:19}},'4':{start:{line:23,column:21},end:{line:23,column:26}},'5':{start:{line:24,column:16},end:{line:24,column:17}},'6':{start:{line:25,column:18},end:{line:25,column:19}},'7':{start:{line:27,column:2},end:{line:31,column:3}},'8':{start:{line:28,column:4},end:{line:30,column:7}},'9':{start:{line:29,column:6},end:{line:29,column:26}},'10':{start:{line:34,column:2},end:{line:46,column:3}},'11':{start:{line:35,column:4},end:{line:43,column:7}},'12':{start:{line:36,column:6},end:{line:42,column:7}},'13':{start:{line:37,column:8},end:{line:37,column:86}},'14':{start:{line:38,column:8},end:{line:38,column:20}},'15':{start:{line:40,column:8},end:{line:40,column:72}},'16':{start:{line:41,column:8},end:{line:41,column:18}},'17':{start:{line:45,column:4},end:{line:45,column:17}},'18':{start:{line:48,column:2},end:{line:50,column:3}},'19':{start:{line:49,column:4},end:{line:49,column:25}},'20':{start:{line:52,column:2},end:{line:54,column:3}},'21':{start:{line:53,column:4},end:{line:53,column:17}},'22':{start:{line:56,column:2},end:{line:56,column:32}}},fnMap:{'0':{name:'urlChecker',decl:{start:{line:18,column:24},end:{line:18,column:34}},loc:{start:{line:18,column:45},end:{line:57,column:1}},line:18},'1':{name:'(anonymous_1)',decl:{start:{line:28,column:39},end:{line:28,column:40}},loc:{start:{line:28,column:54},end:{line:30,column:5}},line:28},'2':{name:'(anonymous_2)',decl:{start:{line:35,column:20},end:{line:35,column:21}},loc:{start:{line:35,column:38},end:{line:43,column:5}},line:35}},branchMap:{'0':{loc:{start:{line:27,column:2},end:{line:31,column:3}},type:'if',locations:[{start:{line:27,column:2},end:{line:31,column:3}},{start:{line:27,column:2},end:{line:31,column:3}}],line:27},'1':{loc:{start:{line:34,column:2},end:{line:46,column:3}},type:'if',locations:[{start:{line:34,column:2},end:{line:46,column:3}},{start:{line:34,column:2},end:{line:46,column:3}}],line:34},'2':{loc:{start:{line:36,column:6},end:{line:42,column:7}},type:'if',locations:[{start:{line:36,column:6},end:{line:42,column:7}},{start:{line:36,column:6},end:{line:42,column:7}}],line:36},'3':{loc:{start:{line:37,column:23},end:{line:37,column:85}},type:'binary-expr',locations:[{start:{line:37,column:23},end:{line:37,column:69}},{start:{line:37,column:73},end:{line:37,column:85}}],line:37},'4':{loc:{start:{line:40,column:16},end:{line:40,column:71}},type:'binary-expr',locations:[{start:{line:40,column:16},end:{line:40,column:62}},{start:{line:40,column:66},end:{line:40,column:71}}],line:40},'5':{loc:{start:{line:48,column:2},end:{line:50,column:3}},type:'if',locations:[{start:{line:48,column:2},end:{line:50,column:3}},{start:{line:48,column:2},end:{line:50,column:3}}],line:48},'6':{loc:{start:{line:52,column:2},end:{line:54,column:3}},type:'if',locations:[{start:{line:52,column:2},end:{line:54,column:3}},{start:{line:52,column:2},end:{line:54,column:3}}],line:52},'7':{loc:{start:{line:56,column:9},end:{line:56,column:31}},type:'binary-expr',locations:[{start:{line:56,column:9},end:{line:56,column:14}},{start:{line:56,column:18},end:{line:56,column:31}}],line:56}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function urlChecker(phrases){cov_2o75h5ah43.f[0]++;var url=(cov_2o75h5ah43.s[0]++,escapeURI(window.location.href,{keepEscaped:true})),simpleurl=(cov_2o75h5ah43.s[1]++,window.location.hostname+window.location.pathname),queries=(cov_2o75h5ah43.s[2]++,parseQuery(url)),valid=(cov_2o75h5ah43.s[3]++,false),excludeValid=(cov_2o75h5ah43.s[4]++,false),matchCt=(cov_2o75h5ah43.s[5]++,0),excludeCt=(cov_2o75h5ah43.s[6]++,0);cov_2o75h5ah43.s[7]++;if(!(phrases instanceof Array)){cov_2o75h5ah43.b[0][0]++;cov_2o75h5ah43.s[8]++;phrases=Object.keys(phrases).map(function(key){cov_2o75h5ah43.f[1]++;cov_2o75h5ah43.s[9]++;return phrases[key];});}else{cov_2o75h5ah43.b[0][1]++;}cov_2o75h5ah43.s[10]++;if(phrases.indexOf('*')===-1){cov_2o75h5ah43.b[1][0]++;cov_2o75h5ah43.s[11]++;phrases.forEach(function(phrase){cov_2o75h5ah43.f[2]++;cov_2o75h5ah43.s[12]++;if(phrase.exclude){cov_2o75h5ah43.b[2][0]++;cov_2o75h5ah43.s[13]++;excludeValid=(cov_2o75h5ah43.b[3][0]++,phraseChecker(phrase,url,simpleurl,queries))||(cov_2o75h5ah43.b[3][1]++,excludeValid);cov_2o75h5ah43.s[14]++;excludeCt++;}else{cov_2o75h5ah43.b[2][1]++;cov_2o75h5ah43.s[15]++;valid=(cov_2o75h5ah43.b[4][0]++,phraseChecker(phrase,url,simpleurl,queries))||(cov_2o75h5ah43.b[4][1]++,valid);cov_2o75h5ah43.s[16]++;matchCt++;}});}else{cov_2o75h5ah43.b[1][1]++;cov_2o75h5ah43.s[17]++;valid=true;}cov_2o75h5ah43.s[18]++;if(matchCt===0){cov_2o75h5ah43.b[5][0]++;cov_2o75h5ah43.s[19]++;return !excludeValid;}else{cov_2o75h5ah43.b[5][1]++;}cov_2o75h5ah43.s[20]++;if(excludeCt===0){cov_2o75h5ah43.b[6][0]++;cov_2o75h5ah43.s[21]++;return valid;}else{cov_2o75h5ah43.b[6][1]++;}cov_2o75h5ah43.s[22]++;return (cov_2o75h5ah43.b[7][0]++,valid)&&(cov_2o75h5ah43.b[7][1]++,!excludeValid);} + if (!dateOptions && window.pathfora && window.pathfora.dateOptions) { + dateOptions = window.pathfora.dateOptions; + } else if (!dateOptions) { + dateOptions = PF_DATE_OPTIONS; + } - var cov_124hm5066v=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/meta-checker.js',hash='f3a6c868a6e535db67be1d8d69e2af6092312a3b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/meta-checker.js',statementMap:{'0':{start:{line:15,column:13},end:{line:15,column:46}},'1':{start:{line:17,column:2},end:{line:43,column:3}},'2':{start:{line:18,column:15},end:{line:18,column:25}},'3':{start:{line:19,column:22},end:{line:19,column:27}},'4':{start:{line:21,column:4},end:{line:38,column:5}},'5':{start:{line:22,column:6},end:{line:33,column:7}},'6':{start:{line:23,column:8},end:{line:32,column:9}},'7':{start:{line:24,column:20},end:{line:24,column:45}},'8':{start:{line:26,column:10},end:{line:31,column:11}},'9':{start:{line:27,column:12},end:{line:27,column:32}},'10':{start:{line:28,column:12},end:{line:28,column:18}},'11':{start:{line:30,column:12},end:{line:30,column:31}},'12':{start:{line:35,column:6},end:{line:37,column:7}},'13':{start:{line:36,column:8},end:{line:36,column:14}},'14':{start:{line:40,column:4},end:{line:42,column:5}},'15':{start:{line:41,column:6},end:{line:41,column:18}},'16':{start:{line:45,column:2},end:{line:45,column:15}}},fnMap:{'0':{name:'metaChecker',decl:{start:{line:14,column:24},end:{line:14,column:35}},loc:{start:{line:14,column:46},end:{line:46,column:1}},line:14}},branchMap:{'0':{loc:{start:{line:23,column:8},end:{line:32,column:9}},type:'if',locations:[{start:{line:23,column:8},end:{line:32,column:9}},{start:{line:23,column:8},end:{line:32,column:9}}],line:23},'1':{loc:{start:{line:26,column:10},end:{line:31,column:11}},type:'if',locations:[{start:{line:26,column:10},end:{line:31,column:11}},{start:{line:26,column:10},end:{line:31,column:11}}],line:26},'2':{loc:{start:{line:26,column:14},end:{line:26,column:39}},type:'binary-expr',locations:[{start:{line:26,column:14},end:{line:26,column:18}},{start:{line:26,column:22},end:{line:26,column:39}}],line:26},'3':{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:'if',locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},'4':{loc:{start:{line:40,column:4},end:{line:42,column:5}},type:'if',locations:[{start:{line:40,column:4},end:{line:42,column:5}},{start:{line:40,column:4},end:{line:42,column:5}}],line:40}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function metaChecker(phrases){cov_124hm5066v.f[0]++;var meta=(cov_124hm5066v.s[0]++,document$1.querySelectorAll('meta'));cov_124hm5066v.s[1]++;for(var j=0;j1)&&((cov_zzx4vfpbw.b[3][1]++,!from)||(cov_zzx4vfpbw.b[3][2]++,from.nodeName==='HTML'))){cov_zzx4vfpbw.b[2][0]++;var y=(cov_zzx4vfpbw.s[4]++,watcher.positions[watcher.positions.length-1].y);var py=(cov_zzx4vfpbw.s[5]++,watcher.positions[watcher.positions.length-2].y);var ySpeed=(cov_zzx4vfpbw.s[6]++,Math.abs(y-py));cov_zzx4vfpbw.s[7]++;watcher.positions=[];cov_zzx4vfpbw.s[8]++;if((cov_zzx4vfpbw.b[5][0]++,y-ySpeed<=50)&&(cov_zzx4vfpbw.b[5][1]++,y30){cov_p5vb3rrc5.b[1][0]++;cov_p5vb3rrc5.s[4]++;watcher.positions.shift();}else{cov_p5vb3rrc5.b[1][1]++;}};cov_p5vb3rrc5.s[5]++;widget.exitIntentTrigger=function(e){cov_p5vb3rrc5.f[2]++;cov_p5vb3rrc5.s[6]++;validateWatchers(widget,function(){cov_p5vb3rrc5.f[3]++;cov_p5vb3rrc5.s[7]++;if(typeof document$1.removeEventListener==='function'){cov_p5vb3rrc5.b[2][0]++;cov_p5vb3rrc5.s[8]++;eventHub.remove(document$1,'mousemove',widget.exitIntentListener);cov_p5vb3rrc5.s[9]++;eventHub.remove(document$1,'mouseout',widget.exitIntentTrigger);}else{cov_p5vb3rrc5.b[2][1]++;cov_p5vb3rrc5.s[10]++;document$1.onmousemove=null;cov_p5vb3rrc5.s[11]++;document$1.onmouseout=null;}},e);};cov_p5vb3rrc5.s[12]++;if(typeof document$1.addEventListener==='function'){cov_p5vb3rrc5.b[3][0]++;cov_p5vb3rrc5.s[13]++;eventHub.add(document$1,'mousemove',widget.exitIntentListener);cov_p5vb3rrc5.s[14]++;eventHub.add(document$1,'mouseout',widget.exitIntentTrigger);}else{cov_p5vb3rrc5.b[3][1]++;cov_p5vb3rrc5.s[15]++;document$1.onmousemove=widget.exitIntentListener;cov_p5vb3rrc5.s[16]++;document$1.onmouseout=widget.exitIntentTrigger;}}else{cov_p5vb3rrc5.b[0][1]++;}cov_p5vb3rrc5.s[17]++;return true;} + // description p + if ( + rec.description && + (!settings.display || settings.display.description !== false) + ) { + var desc = rec.description, + limit = + config.layout === 'modal' + ? DEFAULT_CHAR_LIMIT + : DEFAULT_CHAR_LIMIT_STACK; - var cov_vh4724t1i=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-element-watcher.js',hash='4d0812098b5d268a7b2e4f0ba102d10510e22964',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-element-watcher.js',statementMap:{'0':{start:{line:17,column:16},end:{line:29,column:3}},'1':{start:{line:21,column:22},end:{line:21,column:83}},'2':{start:{line:22,column:29},end:{line:22,column:89}},'3':{start:{line:24,column:6},end:{line:26,column:7}},'4':{start:{line:25,column:8},end:{line:25,column:20}},'5':{start:{line:27,column:6},end:{line:27,column:19}},'6':{start:{line:31,column:2},end:{line:31,column:17}}},fnMap:{'0':{name:'registerElementWatcher',decl:{start:{line:16,column:24},end:{line:16,column:46}},loc:{start:{line:16,column:58},end:{line:32,column:1}},line:16},'1':{name:'(anonymous_1)',decl:{start:{line:20,column:11},end:{line:20,column:12}},loc:{start:{line:20,column:23},end:{line:28,column:5}},line:20}},branchMap:{'0':{loc:{start:{line:21,column:22},end:{line:21,column:83}},type:'binary-expr',locations:[{start:{line:21,column:22},end:{line:21,column:45}},{start:{line:21,column:49},end:{line:21,column:83}}],line:21},'1':{loc:{start:{line:24,column:6},end:{line:26,column:7}},type:'if',locations:[{start:{line:24,column:6},end:{line:26,column:7}},{start:{line:24,column:6},end:{line:26,column:7}}],line:24},'2':{loc:{start:{line:24,column:10},end:{line:24,column:90}},type:'binary-expr',locations:[{start:{line:24,column:10},end:{line:24,column:70}},{start:{line:24,column:74},end:{line:24,column:90}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0],'2':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerElementWatcher(selector){cov_vh4724t1i.f[0]++;var watcher=(cov_vh4724t1i.s[0]++,{elem:document$1.querySelector(selector),check:function(){cov_vh4724t1i.f[1]++;var scrollTop=(cov_vh4724t1i.s[1]++,(cov_vh4724t1i.b[0][0]++,document$1.body.scrollTop)||(cov_vh4724t1i.b[0][1]++,document$1.documentElement.scrollTop)),scrolledToBottom=(cov_vh4724t1i.s[2]++,window.innerHeight+scrollTop>=document$1.body.offsetHeight);cov_vh4724t1i.s[3]++;if((cov_vh4724t1i.b[2][0]++,watcher.elem.offsetTop-window.innerHeight/2<=scrollTop)||(cov_vh4724t1i.b[2][1]++,scrolledToBottom)){cov_vh4724t1i.b[1][0]++;cov_vh4724t1i.s[4]++;return true;}else{cov_vh4724t1i.b[1][1]++;}cov_vh4724t1i.s[5]++;return false;}});cov_vh4724t1i.s[6]++;return watcher;} + // set the default character limit for descriptions + if (!settings.display) { + settings.display = { + descriptionLimit: limit + }; + } else if (!settings.display.descriptionLimit) { + settings.display.descriptionLimit = limit; + } - var cov_1ngw9i8dxt=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/init-scroll-watchers.js',hash='b992c0f36bcdc60a14e9d6b23b3a83f2e47210f2',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/init-scroll-watchers.js',statementMap:{'0':{start:{line:19,column:2},end:{line:27,column:4}},'1':{start:{line:20,column:4},end:{line:26,column:7}},'2':{start:{line:21,column:6},end:{line:25,column:7}},'3':{start:{line:22,column:8},end:{line:22,column:65}},'4':{start:{line:24,column:8},end:{line:24,column:31}},'5':{start:{line:30,column:2},end:{line:34,column:3}},'6':{start:{line:31,column:4},end:{line:31,column:58}},'7':{start:{line:33,column:4},end:{line:33,column:44}},'8':{start:{line:35,column:2},end:{line:35,column:14}}},fnMap:{'0':{name:'initializeScrollWatchers',decl:{start:{line:18,column:24},end:{line:18,column:48}},loc:{start:{line:18,column:58},end:{line:36,column:1}},line:18},'1':{name:'(anonymous_1)',decl:{start:{line:19,column:26},end:{line:19,column:27}},loc:{start:{line:19,column:38},end:{line:27,column:3}},line:19},'2':{name:'(anonymous_2)',decl:{start:{line:20,column:29},end:{line:20,column:30}},loc:{start:{line:20,column:41},end:{line:26,column:5}},line:20}},branchMap:{'0':{loc:{start:{line:21,column:6},end:{line:25,column:7}},type:'if',locations:[{start:{line:21,column:6},end:{line:25,column:7}},{start:{line:21,column:6},end:{line:25,column:7}}],line:21},'1':{loc:{start:{line:30,column:2},end:{line:34,column:3}},type:'if',locations:[{start:{line:30,column:2},end:{line:34,column:3}},{start:{line:30,column:2},end:{line:34,column:3}}],line:30}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0},f:{'0':0,'1':0,'2':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeScrollWatchers(widget){cov_1ngw9i8dxt.f[0]++;cov_1ngw9i8dxt.s[0]++;widget.scrollListener=function(){cov_1ngw9i8dxt.f[1]++;cov_1ngw9i8dxt.s[1]++;validateWatchers(widget,function(){cov_1ngw9i8dxt.f[2]++;cov_1ngw9i8dxt.s[2]++;if(typeof window.addEventListener==='function'){cov_1ngw9i8dxt.b[0][0]++;cov_1ngw9i8dxt.s[3]++;eventHub.remove(window,'scroll',widget.scrollListener);}else{cov_1ngw9i8dxt.b[0][1]++;cov_1ngw9i8dxt.s[4]++;window.onscroll=null;}});};cov_1ngw9i8dxt.s[5]++;if(typeof window.addEventListener==='function'){cov_1ngw9i8dxt.b[1][0]++;cov_1ngw9i8dxt.s[6]++;eventHub.add(window,'scroll',widget.scrollListener);}else{cov_1ngw9i8dxt.b[1][1]++;cov_1ngw9i8dxt.s[7]++;window.onscroll=widget.scrollListener;}cov_1ngw9i8dxt.s[8]++;return true;} + if ( + desc.length > settings.display.descriptionLimit && + settings.display.descriptionLimit !== -1 + ) { + desc = desc.substring(0, settings.display.descriptionLimit); + desc = desc.substring(0, desc.lastIndexOf(' ')) + '...'; + } - var cov_2a5qhpfcqf=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/utils/get-scrolling-element.js',hash='b96102cd042fb9231df8057e5c698161fa6c8c93',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/utils/get-scrolling-element.js',statementMap:{'0':{start:{line:5,column:14},end:{line:5,column:18}},'1':{start:{line:9,column:2},end:{line:11,column:3}},'2':{start:{line:10,column:4},end:{line:10,column:19}},'3':{start:{line:12,column:2},end:{line:15,column:3}},'4':{start:{line:14,column:4},end:{line:14,column:37}},'5':{start:{line:16,column:15},end:{line:16,column:47}},'6':{start:{line:17,column:2},end:{line:17,column:30}},'7':{start:{line:18,column:2},end:{line:18,column:47}},'8':{start:{line:19,column:12},end:{line:19,column:41}},'9':{start:{line:20,column:2},end:{line:20,column:65}},'10':{start:{line:21,column:2},end:{line:21,column:14}},'11':{start:{line:22,column:20},end:{line:22,column:76}},'12':{start:{line:23,column:2},end:{line:23,column:40}},'13':{start:{line:24,column:2},end:{line:24,column:76}}},fnMap:{'0':{name:'getScrollingElement',decl:{start:{line:8,column:24},end:{line:8,column:43}},loc:{start:{line:8,column:47},end:{line:25,column:1}},line:8}},branchMap:{'0':{loc:{start:{line:9,column:2},end:{line:11,column:3}},type:'if',locations:[{start:{line:9,column:2},end:{line:11,column:3}},{start:{line:9,column:2},end:{line:11,column:3}}],line:9},'1':{loc:{start:{line:12,column:2},end:{line:15,column:3}},type:'if',locations:[{start:{line:12,column:2},end:{line:15,column:3}},{start:{line:12,column:2},end:{line:15,column:3}}],line:12},'2':{loc:{start:{line:24,column:20},end:{line:24,column:74}},type:'cond-expr',locations:[{start:{line:24,column:34},end:{line:24,column:58}},{start:{line:24,column:61},end:{line:24,column:74}}],line:24}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var element=(cov_2a5qhpfcqf.s[0]++,null);function getScrollingElement(){cov_2a5qhpfcqf.f[0]++;cov_2a5qhpfcqf.s[1]++;if(element){cov_2a5qhpfcqf.b[0][0]++;cov_2a5qhpfcqf.s[2]++;return element;}else{cov_2a5qhpfcqf.b[0][1]++;}cov_2a5qhpfcqf.s[3]++;if(document.body.scrollTop){cov_2a5qhpfcqf.b[1][0]++;cov_2a5qhpfcqf.s[4]++;return element=document.body;}else{cov_2a5qhpfcqf.b[1][1]++;}var iframe=(cov_2a5qhpfcqf.s[5]++,document.createElement('iframe'));cov_2a5qhpfcqf.s[6]++;iframe.style.height='1px';cov_2a5qhpfcqf.s[7]++;document.documentElement.appendChild(iframe);var doc=(cov_2a5qhpfcqf.s[8]++,iframe.contentWindow.document);cov_2a5qhpfcqf.s[9]++;doc.write('
x
');cov_2a5qhpfcqf.s[10]++;doc.close();var isCompliant=(cov_2a5qhpfcqf.s[11]++,doc.documentElement.scrollHeight>doc.body.scrollHeight);cov_2a5qhpfcqf.s[12]++;iframe.parentNode.removeChild(iframe);cov_2a5qhpfcqf.s[13]++;return element=isCompliant?(cov_2a5qhpfcqf.b[2][0]++,document.documentElement):(cov_2a5qhpfcqf.b[2][1]++,document.body);} + recDesc.innerHTML = desc; + recMeta.appendChild(recDesc); + } - var cov_hohobc6jb=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-position-watcher.js',hash='6a53493518fd65ff93eb6536a80d9f7ab201c70b',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/scroll/register-position-watcher.js',statementMap:{'0':{start:{line:18,column:16},end:{line:30,column:3}},'1':{start:{line:28,column:6},end:{line:28,column:43}},'2':{start:{line:32,column:2},end:{line:32,column:17}}},fnMap:{'0':{name:'registerPositionWatcher',decl:{start:{line:17,column:24},end:{line:17,column:47}},loc:{start:{line:17,column:58},end:{line:33,column:1}},line:17},'1':{name:'(anonymous_1)',decl:{start:{line:19,column:11},end:{line:19,column:12}},loc:{start:{line:19,column:23},end:{line:29,column:5}},line:19}},branchMap:{},s:{'0':0,'1':0,'2':0},f:{'0':0,'1':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerPositionWatcher(percent){cov_hohobc6jb.f[0]++;var watcher=(cov_hohobc6jb.s[0]++,{check:function(){cov_hohobc6jb.f[1]++;var scrollingElement=document$1.scrollingElement||getScrollingElement(),scrollTop=scrollingElement.scrollTop,scrollHeight=scrollingElement.scrollHeight,clientHeight=scrollingElement.clientHeight,percentageScrolled=scrollTop/(scrollHeight-clientHeight)*100;cov_hohobc6jb.s[1]++;return percentageScrolled>=percent;}});cov_hohobc6jb.s[2]++;return watcher;} + widgetContentUnit.appendChild(recMeta); + } + } + } - var cov_9qjd4sjgg=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js',hash='d33b65eaf4c1cb5d4b51a1cccd7a97120b0bf095',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js',statementMap:{'0':{start:{line:15,column:16},end:{line:22,column:3}},'1':{start:{line:17,column:6},end:{line:19,column:7}},'2':{start:{line:18,column:8},end:{line:18,column:20}},'3':{start:{line:20,column:6},end:{line:20,column:19}},'4':{start:{line:24,column:2},end:{line:24,column:17}}},fnMap:{'0':{name:'registerManualTriggerWatcher',decl:{start:{line:14,column:24},end:{line:14,column:52}},loc:{start:{line:14,column:69},end:{line:25,column:1}},line:14},'1':{name:'(anonymous_1)',decl:{start:{line:16,column:11},end:{line:16,column:12}},loc:{start:{line:16,column:23},end:{line:21,column:5}},line:16}},branchMap:{'0':{loc:{start:{line:17,column:6},end:{line:19,column:7}},type:'if',locations:[{start:{line:17,column:6},end:{line:19,column:7}},{start:{line:17,column:6},end:{line:19,column:7}}],line:17},'1':{loc:{start:{line:17,column:10},end:{line:17,column:99}},type:'binary-expr',locations:[{start:{line:17,column:10},end:{line:17,column:15}},{start:{line:17,column:19},end:{line:17,column:60}},{start:{line:17,column:64},end:{line:17,column:99}}],line:17}},s:{'0':0,'1':0,'2':0,'3':0,'4':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function registerManualTriggerWatcher(value,widget){cov_9qjd4sjgg.f[0]++;var watcher=(cov_9qjd4sjgg.s[0]++,{check:function(){cov_9qjd4sjgg.f[1]++;cov_9qjd4sjgg.s[1]++;if((cov_9qjd4sjgg.b[1][0]++,value)&&(cov_9qjd4sjgg.b[1][1]++,widgetTracker.triggeredWidgets[widget.id])||(cov_9qjd4sjgg.b[1][2]++,widgetTracker.triggeredWidgets['*'])){cov_9qjd4sjgg.b[0][0]++;cov_9qjd4sjgg.s[2]++;return true;}else{cov_9qjd4sjgg.b[0][1]++;}cov_9qjd4sjgg.s[3]++;return false;}});cov_9qjd4sjgg.s[4]++;return watcher;} + /** @module core/set-widget-classname */ - var cov_1r4iodpbui=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js',hash='2c5efaa78cd8d4cfb28cb87382b8423f36da5238',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js',statementMap:{'0':{start:{line:46,column:18},end:{line:46,column:42}},'1':{start:{line:47,column:11},end:{line:47,column:15}},'2':{start:{line:49,column:2},end:{line:49,column:23}},'3':{start:{line:50,column:2},end:{line:50,column:24}},'4':{start:{line:53,column:2},end:{line:53,column:33}},'5':{start:{line:54,column:2},end:{line:54,column:63}},'6':{start:{line:56,column:2},end:{line:62,column:3}},'7':{start:{line:61,column:4},end:{line:61,column:11}},'8':{start:{line:64,column:2},end:{line:75,column:3}},'9':{start:{line:65,column:4},end:{line:74,column:5}},'10':{start:{line:69,column:6},end:{line:69,column:72}},'11':{start:{line:71,column:6},end:{line:73,column:8}},'12':{start:{line:78,column:2},end:{line:78,column:75}},'13':{start:{line:81,column:2},end:{line:83,column:3}},'14':{start:{line:82,column:4},end:{line:82,column:63}},'15':{start:{line:85,column:2},end:{line:87,column:3}},'16':{start:{line:86,column:4},end:{line:86,column:75}},'17':{start:{line:89,column:2},end:{line:92,column:3}},'18':{start:{line:90,column:4},end:{line:91,column:80}},'19':{start:{line:94,column:2},end:{line:96,column:3}},'20':{start:{line:95,column:4},end:{line:95,column:69}},'21':{start:{line:98,column:2},end:{line:100,column:3}},'22':{start:{line:99,column:4},end:{line:99,column:71}},'23':{start:{line:102,column:2},end:{line:102,column:54}},'24':{start:{line:104,column:2},end:{line:107,column:3}},'25':{start:{line:105,column:4},end:{line:106,column:72}},'26':{start:{line:110,column:2},end:{line:116,column:3}},'27':{start:{line:115,column:4},end:{line:115,column:50}},'28':{start:{line:119,column:2},end:{line:123,column:3}},'29':{start:{line:120,column:4},end:{line:120,column:42}},'30':{start:{line:121,column:4},end:{line:121,column:34}},'31':{start:{line:122,column:4},end:{line:122,column:42}},'32':{start:{line:125,column:2},end:{line:131,column:3}},'33':{start:{line:126,column:4},end:{line:128,column:6}},'34':{start:{line:129,column:4},end:{line:129,column:34}},'35':{start:{line:130,column:4},end:{line:130,column:37}},'36':{start:{line:133,column:2},end:{line:139,column:3}},'37':{start:{line:134,column:4},end:{line:136,column:6}},'38':{start:{line:137,column:4},end:{line:137,column:34}},'39':{start:{line:138,column:4},end:{line:138,column:37}},'40':{start:{line:141,column:2},end:{line:149,column:3}},'41':{start:{line:142,column:4},end:{line:142,column:76}},'42':{start:{line:143,column:4},end:{line:143,column:34}},'43':{start:{line:144,column:4},end:{line:144,column:44}},'44':{start:{line:148,column:4},end:{line:148,column:26}},'45':{start:{line:151,column:2},end:{line:155,column:3}},'46':{start:{line:152,column:4},end:{line:154,column:5}},'47':{start:{line:153,column:6},end:{line:153,column:25}}},fnMap:{'0':{name:'initializeWidget',decl:{start:{line:44,column:24},end:{line:44,column:40}},loc:{start:{line:44,column:59},end:{line:156,column:1}},line:44}},branchMap:{'0':{loc:{start:{line:56,column:2},end:{line:62,column:3}},type:'if',locations:[{start:{line:56,column:2},end:{line:62,column:3}},{start:{line:56,column:2},end:{line:62,column:3}}],line:56},'1':{loc:{start:{line:57,column:4},end:{line:59,column:36}},type:'binary-expr',locations:[{start:{line:57,column:5},end:{line:57,column:31}},{start:{line:58,column:6},end:{line:58,column:48}},{start:{line:59,column:4},end:{line:59,column:36}}],line:57},'2':{loc:{start:{line:64,column:2},end:{line:75,column:3}},type:'if',locations:[{start:{line:64,column:2},end:{line:75,column:3}},{start:{line:64,column:2},end:{line:75,column:3}}],line:64},'3':{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:'if',locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},'4':{loc:{start:{line:66,column:6},end:{line:67,column:77}},type:'binary-expr',locations:[{start:{line:66,column:6},end:{line:66,column:29}},{start:{line:67,column:7},end:{line:67,column:38}},{start:{line:67,column:42},end:{line:67,column:76}}],line:66},'5':{loc:{start:{line:78,column:17},end:{line:78,column:74}},type:'binary-expr',locations:[{start:{line:78,column:17},end:{line:78,column:29}},{start:{line:78,column:33},end:{line:78,column:74}}],line:78},'6':{loc:{start:{line:81,column:2},end:{line:83,column:3}},type:'if',locations:[{start:{line:81,column:2},end:{line:83,column:3}},{start:{line:81,column:2},end:{line:83,column:3}}],line:81},'7':{loc:{start:{line:82,column:19},end:{line:82,column:62}},type:'binary-expr',locations:[{start:{line:82,column:19},end:{line:82,column:31}},{start:{line:82,column:35},end:{line:82,column:62}}],line:82},'8':{loc:{start:{line:85,column:2},end:{line:87,column:3}},type:'if',locations:[{start:{line:85,column:2},end:{line:87,column:3}},{start:{line:85,column:2},end:{line:87,column:3}}],line:85},'9':{loc:{start:{line:86,column:19},end:{line:86,column:74}},type:'binary-expr',locations:[{start:{line:86,column:19},end:{line:86,column:31}},{start:{line:86,column:35},end:{line:86,column:74}}],line:86},'10':{loc:{start:{line:89,column:2},end:{line:92,column:3}},type:'if',locations:[{start:{line:89,column:2},end:{line:92,column:3}},{start:{line:89,column:2},end:{line:92,column:3}}],line:89},'11':{loc:{start:{line:91,column:6},end:{line:91,column:79}},type:'binary-expr',locations:[{start:{line:91,column:6},end:{line:91,column:18}},{start:{line:91,column:22},end:{line:91,column:79}}],line:91},'12':{loc:{start:{line:94,column:2},end:{line:96,column:3}},type:'if',locations:[{start:{line:94,column:2},end:{line:96,column:3}},{start:{line:94,column:2},end:{line:96,column:3}}],line:94},'13':{loc:{start:{line:95,column:19},end:{line:95,column:68}},type:'binary-expr',locations:[{start:{line:95,column:19},end:{line:95,column:31}},{start:{line:95,column:35},end:{line:95,column:68}}],line:95},'14':{loc:{start:{line:98,column:2},end:{line:100,column:3}},type:'if',locations:[{start:{line:98,column:2},end:{line:100,column:3}},{start:{line:98,column:2},end:{line:100,column:3}}],line:98},'15':{loc:{start:{line:99,column:19},end:{line:99,column:70}},type:'binary-expr',locations:[{start:{line:99,column:19},end:{line:99,column:31}},{start:{line:99,column:35},end:{line:99,column:70}}],line:99},'16':{loc:{start:{line:102,column:17},end:{line:102,column:53}},type:'binary-expr',locations:[{start:{line:102,column:17},end:{line:102,column:29}},{start:{line:102,column:33},end:{line:102,column:53}}],line:102},'17':{loc:{start:{line:104,column:2},end:{line:107,column:3}},type:'if',locations:[{start:{line:104,column:2},end:{line:107,column:3}},{start:{line:104,column:2},end:{line:107,column:3}}],line:104},'18':{loc:{start:{line:106,column:6},end:{line:106,column:71}},type:'binary-expr',locations:[{start:{line:106,column:6},end:{line:106,column:18}},{start:{line:106,column:22},end:{line:106,column:71}}],line:106},'19':{loc:{start:{line:110,column:2},end:{line:116,column:3}},type:'if',locations:[{start:{line:110,column:2},end:{line:116,column:3}},{start:{line:110,column:2},end:{line:116,column:3}}],line:110},'20':{loc:{start:{line:111,column:4},end:{line:113,column:49}},type:'binary-expr',locations:[{start:{line:111,column:4},end:{line:111,column:16}},{start:{line:112,column:4},end:{line:112,column:11}},{start:{line:113,column:4},end:{line:113,column:49}}],line:111},'21':{loc:{start:{line:119,column:2},end:{line:123,column:3}},type:'if',locations:[{start:{line:119,column:2},end:{line:123,column:3}},{start:{line:119,column:2},end:{line:123,column:3}}],line:119},'22':{loc:{start:{line:125,column:2},end:{line:131,column:3}},type:'if',locations:[{start:{line:125,column:2},end:{line:131,column:3}},{start:{line:125,column:2},end:{line:131,column:3}}],line:125},'23':{loc:{start:{line:133,column:2},end:{line:139,column:3}},type:'if',locations:[{start:{line:133,column:2},end:{line:139,column:3}},{start:{line:133,column:2},end:{line:139,column:3}}],line:133},'24':{loc:{start:{line:141,column:2},end:{line:149,column:3}},type:'if',locations:[{start:{line:141,column:2},end:{line:149,column:3}},{start:{line:141,column:2},end:{line:149,column:3}}],line:141},'25':{loc:{start:{line:151,column:2},end:{line:155,column:3}},type:'if',locations:[{start:{line:151,column:2},end:{line:155,column:3}},{start:{line:151,column:2},end:{line:155,column:3}}],line:151},'26':{loc:{start:{line:151,column:6},end:{line:151,column:65}},type:'binary-expr',locations:[{start:{line:151,column:6},end:{line:151,column:34}},{start:{line:151,column:38},end:{line:151,column:65}}],line:151},'27':{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:'if',locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0},f:{'0':0},b:{'0':[0,0],'1':[0,0,0],'2':[0,0],'3':[0,0],'4':[0,0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeWidget(widget,options){cov_1r4iodpbui.f[0]++;var watcher,condition=(cov_1r4iodpbui.s[0]++,widget.displayConditions),pf=(cov_1r4iodpbui.s[1]++,this);cov_1r4iodpbui.s[2]++;widget.watchers=[];cov_1r4iodpbui.s[3]++;widget.listeners=[];cov_1r4iodpbui.s[4]++;widget.expiration=new Date();cov_1r4iodpbui.s[5]++;widget.expiration.setDate(widget.expiration.getDate()+365);cov_1r4iodpbui.s[6]++;if((cov_1r4iodpbui.b[1][0]++,widget.type==='sitegate')&&(cov_1r4iodpbui.b[1][1]++,read(PREFIX_UNLOCK+widget.id)==='true')||(cov_1r4iodpbui.b[1][2]++,widget.hiddenViaABTests===true)){cov_1r4iodpbui.b[0][0]++;cov_1r4iodpbui.s[7]++;return;}else{cov_1r4iodpbui.b[0][1]++;}cov_1r4iodpbui.s[8]++;if(widget.pushDown){cov_1r4iodpbui.b[2][0]++;cov_1r4iodpbui.s[9]++;if((cov_1r4iodpbui.b[4][0]++,widget.layout==='bar')&&((cov_1r4iodpbui.b[4][1]++,widget.position==='top-fixed')||(cov_1r4iodpbui.b[4][2]++,widget.position==='top-absolute'))){cov_1r4iodpbui.b[3][0]++;cov_1r4iodpbui.s[10]++;addClass(document$1.querySelector(widget.pushDown),'pf-push-down');}else{cov_1r4iodpbui.b[3][1]++;cov_1r4iodpbui.s[11]++;throw new Error('Only top positioned bar widgets may have a pushDown property');}}else{cov_1r4iodpbui.b[2][1]++;}cov_1r4iodpbui.s[12]++;widget.valid=(cov_1r4iodpbui.b[5][0]++,widget.valid)&&(cov_1r4iodpbui.b[5][1]++,entityFieldChecker(widget,pf.customData));cov_1r4iodpbui.s[13]++;if(condition.date){cov_1r4iodpbui.b[6][0]++;cov_1r4iodpbui.s[14]++;widget.valid=(cov_1r4iodpbui.b[7][0]++,widget.valid)&&(cov_1r4iodpbui.b[7][1]++,dateChecker(condition.date));}else{cov_1r4iodpbui.b[6][1]++;}cov_1r4iodpbui.s[15]++;if(condition.pageVisits){cov_1r4iodpbui.b[8][0]++;cov_1r4iodpbui.s[16]++;widget.valid=(cov_1r4iodpbui.b[9][0]++,widget.valid)&&(cov_1r4iodpbui.b[9][1]++,pageVisitsChecker(condition.pageVisits));}else{cov_1r4iodpbui.b[8][1]++;}cov_1r4iodpbui.s[17]++;if(condition.hideAfterAction){cov_1r4iodpbui.b[10][0]++;cov_1r4iodpbui.s[18]++;widget.valid=(cov_1r4iodpbui.b[11][0]++,widget.valid)&&(cov_1r4iodpbui.b[11][1]++,hideAfterActionChecker(condition.hideAfterAction,widget));}else{cov_1r4iodpbui.b[10][1]++;}cov_1r4iodpbui.s[19]++;if(condition.urlContains){cov_1r4iodpbui.b[12][0]++;cov_1r4iodpbui.s[20]++;widget.valid=(cov_1r4iodpbui.b[13][0]++,widget.valid)&&(cov_1r4iodpbui.b[13][1]++,urlChecker(condition.urlContains));}else{cov_1r4iodpbui.b[12][1]++;}cov_1r4iodpbui.s[21]++;if(condition.metaContains){cov_1r4iodpbui.b[14][0]++;cov_1r4iodpbui.s[22]++;widget.valid=(cov_1r4iodpbui.b[15][0]++,widget.valid)&&(cov_1r4iodpbui.b[15][1]++,metaChecker(condition.metaContains));}else{cov_1r4iodpbui.b[14][1]++;}cov_1r4iodpbui.s[23]++;widget.valid=(cov_1r4iodpbui.b[16][0]++,widget.valid)&&(cov_1r4iodpbui.b[16][1]++,condition.showOnInit);cov_1r4iodpbui.s[24]++;if(condition.impressions){cov_1r4iodpbui.b[17][0]++;cov_1r4iodpbui.s[25]++;widget.valid=(cov_1r4iodpbui.b[18][0]++,widget.valid)&&(cov_1r4iodpbui.b[18][1]++,impressionsChecker(condition.impressions,widget));}else{cov_1r4iodpbui.b[17][1]++;}cov_1r4iodpbui.s[26]++;if((cov_1r4iodpbui.b[20][0]++,widget.valid)&&(cov_1r4iodpbui.b[20][1]++,options)&&(cov_1r4iodpbui.b[20][2]++,options.priority===OPTIONS_PRIORITY_ORDERED)){cov_1r4iodpbui.b[19][0]++;cov_1r4iodpbui.s[27]++;widgetTracker.prioritizedWidgets.push(widget);}else{cov_1r4iodpbui.b[19][1]++;}cov_1r4iodpbui.s[28]++;if(condition.showOnExitIntent){cov_1r4iodpbui.b[21][0]++;cov_1r4iodpbui.s[29]++;watcher=registerExitIntentWatcher();cov_1r4iodpbui.s[30]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[31]++;initializeExitIntent(widget,watcher);}else{cov_1r4iodpbui.b[21][1]++;}cov_1r4iodpbui.s[32]++;if(condition.displayWhenElementVisible){cov_1r4iodpbui.b[22][0]++;cov_1r4iodpbui.s[33]++;watcher=registerElementWatcher(condition.displayWhenElementVisible);cov_1r4iodpbui.s[34]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[35]++;initializeScrollWatchers(widget);}else{cov_1r4iodpbui.b[22][1]++;}cov_1r4iodpbui.s[36]++;if(condition.scrollPercentageToDisplay){cov_1r4iodpbui.b[23][0]++;cov_1r4iodpbui.s[37]++;watcher=registerPositionWatcher(condition.scrollPercentageToDisplay);cov_1r4iodpbui.s[38]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[39]++;initializeScrollWatchers(widget);}else{cov_1r4iodpbui.b[23][1]++;}cov_1r4iodpbui.s[40]++;if(condition.manualTrigger){cov_1r4iodpbui.b[24][0]++;cov_1r4iodpbui.s[41]++;watcher=registerManualTriggerWatcher(condition.manualTrigger,widget);cov_1r4iodpbui.s[42]++;widget.watchers.push(watcher);cov_1r4iodpbui.s[43]++;widgetTracker.readyWidgets.push(widget);cov_1r4iodpbui.s[44]++;triggerWidget(widget);}else{cov_1r4iodpbui.b[24][1]++;}cov_1r4iodpbui.s[45]++;if((cov_1r4iodpbui.b[26][0]++,widget.watchers.length===0)&&(cov_1r4iodpbui.b[26][1]++,!condition.showOnExitIntent)){cov_1r4iodpbui.b[25][0]++;cov_1r4iodpbui.s[46]++;if(widget.valid){cov_1r4iodpbui.b[27][0]++;cov_1r4iodpbui.s[47]++;showWidget(widget);}else{cov_1r4iodpbui.b[27][1]++;}}else{cov_1r4iodpbui.b[25][1]++;}} + /** + * Setup the className for a widget + * + * @exports setWidgetClassname + * @params {object} widget + * @params {object} config + */ + function setWidgetClassname (widget, config) { + widget.className = [ + 'pf-widget ', + 'pf-' + config.type, + ' pf-widget-' + config.layout, + config.position ? ' pf-position-' + config.position : '', + config.pushDown ? ' pf-has-push-down' : '', + config.origin ? ' pf-origin-' + config.origin : '', + ' pf-widget-variant-' + config.variant, + config.theme ? ' pf-theme-' + config.theme : '', + config.className ? ' ' + config.className : '', + config.branding ? ' pf-widget-has-branding' : '', + !config.responsive ? ' pf-mobile-hide' : '' + ].join(''); + } - var cov_le7jeyoo5=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js',hash='bd62d0e25a272b36fce88209a18945257367f6d0',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js',statementMap:{'0':{start:{line:17,column:2},end:{line:17,column:33}},'1':{start:{line:18,column:2},end:{line:18,column:34}}},fnMap:{'0':{name:'previewWidget',decl:{start:{line:16,column:24},end:{line:16,column:37}},loc:{start:{line:16,column:47},end:{line:19,column:1}},line:16}},branchMap:{},s:{'0':0,'1':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function previewWidget(widget){cov_le7jeyoo5.f[0]++;cov_le7jeyoo5.s[0]++;widget.id=generateUniqueId();cov_le7jeyoo5.s[1]++;return createWidgetHtml(widget);} + /** @module pathfora/form/build-form-element */ - var cov_n9rnkdh8g=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js',hash='c4c1b377992e8b34c9a4d9bffc69f76783c80f27',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js',statementMap:{'0':{start:{line:12,column:17},end:{line:12,column:56}},'1':{start:{line:14,column:2},end:{line:17,column:3}},'2':{start:{line:15,column:4},end:{line:15,column:27}},'3':{start:{line:16,column:4},end:{line:16,column:51}}},fnMap:{'0':{name:'cancelDelayedWidget',decl:{start:{line:11,column:24},end:{line:11,column:43}},loc:{start:{line:11,column:56},end:{line:18,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:14,column:2},end:{line:17,column:3}},type:'if',locations:[{start:{line:14,column:2},end:{line:17,column:3}},{start:{line:14,column:2},end:{line:17,column:3}}],line:14}},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0},b:{'0':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function cancelDelayedWidget(widgetKey){cov_n9rnkdh8g.f[0]++;var delayObj=(cov_n9rnkdh8g.s[0]++,widgetTracker.delayedWidgets[widgetKey]);cov_n9rnkdh8g.s[1]++;if(delayObj){cov_n9rnkdh8g.b[0][0]++;cov_n9rnkdh8g.s[2]++;clearTimeout(delayObj);cov_n9rnkdh8g.s[3]++;delete widgetTracker.delayedWidgets[widgetKey];}else{cov_n9rnkdh8g.b[0][1]++;}} + /** + * Build and insert a custom form element into + * the widget's form + * + * @exports buildFormElement + * @params {object} elem + * @params {object} form + */ + function buildFormElement(elem, form) { + var content, + i, + val, + label, + wrapper = document$1.createElement('div'), + isGroup = elem.hasOwnProperty('groupType'), + reqFlag, + reqTriangle; - var cov_h86i05o0=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js',hash='e17bfcf474537e9afaaf65b043e905dc76efd98c',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js',statementMap:{'0':{start:{line:29,column:15},end:{line:29,column:42}},'1':{start:{line:30,column:16},end:{line:30,column:44}},'2':{start:{line:32,column:2},end:{line:43,column:5}},'3':{start:{line:33,column:18},end:{line:33,column:52}},'4':{start:{line:34,column:4},end:{line:34,column:35}},'5':{start:{line:35,column:4},end:{line:35,column:44}},'6':{start:{line:37,column:4},end:{line:42,column:5}},'7':{start:{line:38,column:6},end:{line:41,column:7}},'8':{start:{line:39,column:18},end:{line:39,column:39}},'9':{start:{line:40,column:8},end:{line:40,column:57}},'10':{start:{line:45,column:2},end:{line:49,column:3}},'11':{start:{line:46,column:4},end:{line:48,column:5}},'12':{start:{line:47,column:6},end:{line:47,column:31}},'13':{start:{line:51,column:2},end:{line:51,column:23}},'14':{start:{line:53,column:2},end:{line:53,column:36}},'15':{start:{line:54,column:2},end:{line:54,column:38}},'16':{start:{line:55,column:2},end:{line:55,column:34}},'17':{start:{line:56,column:2},end:{line:56,column:22}},'18':{start:{line:57,column:2},end:{line:57,column:19}}},fnMap:{'0':{name:'clearAll',decl:{start:{line:28,column:24},end:{line:28,column:32}},loc:{start:{line:28,column:36},end:{line:58,column:1}},line:28},'1':{name:'(anonymous_1)',decl:{start:{line:32,column:17},end:{line:32,column:18}},loc:{start:{line:32,column:35},end:{line:43,column:3}},line:32}},branchMap:{'0':{loc:{start:{line:38,column:6},end:{line:41,column:7}},type:'if',locations:[{start:{line:38,column:6},end:{line:41,column:7}},{start:{line:38,column:6},end:{line:41,column:7}}],line:38},'1':{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:'if',locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0},f:{'0':0,'1':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function clearAll(){cov_h86i05o0.f[0]++;var opened=(cov_h86i05o0.s[0]++,widgetTracker.openedWidgets),delayed=(cov_h86i05o0.s[1]++,widgetTracker.delayedWidgets);cov_h86i05o0.s[2]++;opened.forEach(function(widget){cov_h86i05o0.f[1]++;var element=(cov_h86i05o0.s[3]++,document$1.getElementById(widget.id));cov_h86i05o0.s[4]++;removeClass(element,'opened');cov_h86i05o0.s[5]++;element.parentNode.removeChild(element);cov_h86i05o0.s[6]++;for(var key in widget.listeners){cov_h86i05o0.s[7]++;if(widget.listeners.hasOwnProperty(key)){cov_h86i05o0.b[0][0]++;var val=(cov_h86i05o0.s[8]++,widget.listeners[key]);cov_h86i05o0.s[9]++;val.target.removeEventListener(val.type,val.fn);}else{cov_h86i05o0.b[0][1]++;}}});cov_h86i05o0.s[10]++;for(var key in delayed){cov_h86i05o0.s[11]++;if(delayed.hasOwnProperty(key)){cov_h86i05o0.b[1][0]++;cov_h86i05o0.s[12]++;cancelDelayedWidget(key);}else{cov_h86i05o0.b[1][1]++;}}cov_h86i05o0.s[13]++;eventHub.removeAll();cov_h86i05o0.s[14]++;resetWidgetTracker(widgetTracker);cov_h86i05o0.s[15]++;resetDataObject(pathforaDataObject);cov_h86i05o0.s[16]++;resetDefaultProps(defaultProps);cov_h86i05o0.s[17]++;this.callbacks=[];cov_h86i05o0.s[18]++;this.acctid='';} + // group elements include: checkbox groups + if (isGroup) { + wrapper.className = 'pf-widget-' + elem.type; + content = document$1.createElement('div'); + } else { + switch (elem.type) { + case 'email': + content = document$1.createElement('input'); + content.setAttribute('type', 'email'); + break; + case 'text': + case 'input': + content = document$1.createElement('input'); + content.setAttribute('type', 'text'); + break; + case 'date': + content = document$1.createElement('input'); + content.setAttribute('type', 'date'); + break; + default: + content = document$1.createElement(elem.type); + break; + } + + content.setAttribute('name', elem.name); + content.setAttribute('id', elem.name); + + // add row count for textarea + if (elem.type === 'textarea') { + content.setAttribute('rows', 5); + } + + // add max and min date for date input + if (elem.type === 'date') { + var today = new Date(), + offset = today.getTimezoneOffset(), + todayTimezone = new Date(today.getTime() - offset * 60 * 1000), + max = elem.maxDate + ? elem.maxDate === 'today' + ? todayTimezone + : new Date(elem.maxDate) + : null, + min = elem.minDate + ? elem.minDate === 'today' + ? todayTimezone + : new Date(elem.minDate) + : null; + + if (max != null) { + content.setAttribute('max', max.toISOString().split('T')[0]); + } + if (min != null) { + content.setAttribute('min', min.toISOString().split('T')[0]); + } + } + } + + if (elem.label) { + if (isGroup) { + label = document$1.createElement('span'); + label.id = elem.name; + content.setAttribute('aria-labelledby', elem.name); + } else { + label = document$1.createElement('label'); + label.setAttribute('for', elem.name); + } + + label.innerHTML = elem.label; + label.className = 'pf-form-label'; + addClass(content, 'pf-has-label'); + + if (elem.required === true) { + label.innerHTML += ' *'; + } + + wrapper.appendChild(label); + } + + if (elem.required === true) { + addClass(wrapper, 'pf-form-required'); + content.setAttribute('data-required', 'true'); + + if (elem.label) { + reqFlag = document$1.createElement('div'); + reqFlag.className = 'pf-required-flag'; + reqFlag.innerHTML = 'required'; + + reqTriangle = document$1.createElement('span'); + reqFlag.appendChild(reqTriangle); + wrapper.appendChild(reqFlag); + } + } + + if (elem.type === 'date' || elem.type === 'email') { + addClass(wrapper, 'pf-form-required'); + content.setAttribute('data-validate', 'true'); + + if (elem.label) { + reqFlag = document$1.createElement('div'); + reqFlag.className = 'pf-invalid-flag'; + reqFlag.innerHTML = 'invalid'; + + reqTriangle = document$1.createElement('span'); + reqFlag.appendChild(reqTriangle); + wrapper.appendChild(reqFlag); + } + } + + if (elem.placeholder) { + // select element has first option as placeholder + if (elem.type === 'select') { + var placeholder = document$1.createElement('option'); + placeholder.setAttribute('value', ''); + placeholder.innerHTML = elem.placeholder; + content.appendChild(placeholder); + } else { + content.placeholder = elem.placeholder; + } + + if (!elem.label) { + content.setAttribute('aria-label', elem.placeholder); + } + } + + if (elem.values) { + for (i = 0; i < elem.values.length; i++) { + val = elem.values[i]; + + if (isGroup) { + var input = document$1.createElement('input'); + input.setAttribute('type', elem.groupType); + input.setAttribute('value', val.value); + input.setAttribute('name', elem.name); + + if (val.label) { + label = document$1.createElement('label'); + label.className = 'pf-widget-' + elem.groupType; + label.appendChild(input); + label.appendChild(document$1.createTextNode(val.label)); + content.appendChild(label); + } else { + throw new Error( + elem.groupType + 'form group values must contain labels' + ); + } + } else if (elem.type === 'select') { + var option = document$1.createElement('option'); + option.setAttribute('value', val.value); + option.innerHTML = val.label; + + content.appendChild(option); + } + } + } + + wrapper.appendChild(content); + + // make sure we're inserting the new element before the confirm button + var btn = form.querySelector('.pf-widget-ok'); + if (btn) { + form.insertBefore(wrapper, btn); + } else { + form.appendChild(wrapper); + } + } + + /** @module pathfora/form/build-widget-form */ + + /** + * Build a custom form on a widget according to the + * formElements config provided + * + * @exports buildWidgetForm + * @params {object} formElements + * @params {object} form + */ + function buildWidgetForm (formElements, form) { + for (var i = 0; i < formElements.length; i++) { + var elem = formElements[i]; + + switch (elem.type) { + // Radio & Checkbox Button Group + case 'radio-group': + case 'checkbox-group': + elem.groupType = elem.type.split('-')[0]; + buildFormElement(elem, form); + delete elem.groupType; + break; + + // Textarea, Input, & Select + case 'textarea': + case 'input': + case 'text': + case 'email': + case 'date': + case 'select': + buildFormElement(elem, form); + break; + + default: + throw new Error('unrecognized form element type: ' + elem.type); + } + } + } + + /** @module pathfora/form/construct-form-state */ + + /** + * Setup html for success or error state of a form module + * + * @exports constructFormState + * @params {object} widget + * @params {object} config + * @params {string} name + */ + function constructFormState (config, widget, name) { + if (!config.formStates) { + return; + } + + var obj, defaultHeadline, defaultMsg; + + switch (name) { + case 'success': + obj = config.formStates.success; + defaultMsg = 'We have received your submission.'; + defaultHeadline = 'Thank You'; + break; + case 'error': + obj = config.formStates.error; + defaultMsg = 'There was an error receiving with your submission.'; + defaultHeadline = 'Error'; + break; + default: + throw new Error('Unrecognized formState: ' + name); + } + + var elem = document$1.createElement('div'); + elem.className = name + '-state'; + + var title = document$1.createElement('h2'); + title.className = 'pf-widget-headline'; + title.innerHTML = obj.headline || defaultHeadline; + elem.appendChild(title); + + var msg = document$1.createElement('div'); + msg.className = 'pf-widget-message'; + msg.innerHTML = obj.msg || defaultMsg; + elem.appendChild(msg); + + if (obj.okShow) { + var ok = document$1.createElement('button'); + ok.type = 'button'; + ok.className = 'pf-widget-btn pf-widget-ok'; + ok.innerHTML = obj.okMessage || 'Confirm'; + elem.appendChild(ok); + } + + if (obj.cancelShow) { + var cancel = document$1.createElement('button'); + cancel.type = 'button'; + cancel.className = 'pf-widget-btn pf-widget-cancel'; + cancel.innerHTML = obj.cancelMessage || 'Cancel'; + elem.appendChild(cancel); + } + + return elem; + } + + /** @module pathfora/widgets/actions/form-state-actions */ + + /** + * Add callbacks and tracking for confirm and cancel + * buttons on the success or error state of a form widget + * + * @exports formStateActions + * @params {object} widget + * @params {object} config + * @params {name} string + */ + function formStateActions (config, widget, name) { + var ok = widget.querySelector('.' + name + '-state .pf-widget-ok'), + cancel = widget.querySelector('.' + name + '-state .pf-widget-cancel'); + + if (cancel) { + buttonAction(cancel, name + '.cancel', config, widget); + } + + if (ok) { + buttonAction(ok, name + '.confirm', config, widget); + } + } + + /** @module pathfora/widgets/construct-widget-layout */ + + /** + * Setup inner html elements for a widget + * + * @exports constructWidgetLayout + * @params {object} widget + * @params {object} config + */ + function constructWidgetLayout(widget, config) { + var node, + child, + i, + widgetContent = widget.querySelector('.pf-widget-content'), + widgetCancel = widget.querySelector('.pf-widget-cancel'), + widgetOk = widget.querySelector('.pf-widget-ok'), + widgetHeadline = widget.querySelectorAll('.pf-widget-headline'), + widgetBody = widget.querySelector('.pf-widget-body'), + widgetMessage = widget.querySelector('.pf-widget-message'), + widgetFooter = widget.querySelector('.pf-widget-footer'); + + if (widgetCancel !== null && !config.cancelShow) { + node = widgetCancel; + + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + + if (widgetOk !== null && !config.okShow) { + node = widgetOk; + + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + + if (widgetCancel !== null) { + widgetCancel.innerHTML = config.cancelMessage; + } + + if (widgetOk !== null) { + widgetOk.innerHTML = config.okMessage; + } + + if (widgetOk && widgetOk.value !== null) { + widgetOk.value = config.okMessage; + } + + if (widgetCancel && widgetCancel.value !== null) { + widgetCancel.value = config.cancelMessage; + } + + // Form layouts should have a default success message + switch (config.type) { + case 'form': + case 'subscription': + case 'sitegate': + switch (config.layout) { + case 'modal': + case 'slideout': + case 'sitegate': + case 'inline': + if (!config.formStates) { + break; + } + + // success state + if (config.formStates.success) { + var success = constructFormState(config, widget, 'success'); + widgetContent.appendChild(success); + formStateActions(config, widget, 'success'); + } + + // error state + if (config.formStates.error) { + var error = constructFormState(config, widget, 'error'); + widgetContent.appendChild(error); + formStateActions(config, widget, 'error'); + } + + break; + } + break; + } + + switch (config.layout) { + case 'modal': + case 'slideout': + case 'sitegate': + case 'inline': + if (widgetContent && config.branding) { + var branding = document$1.createElement('div'); + branding.className = 'branding'; + branding.innerHTML = templates.assets.lytics; + widgetContent.appendChild(branding); + } + + break; + } + + switch (config.type) { + case 'form': + switch (config.layout) { + case 'modal': + case 'slideout': + case 'random': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } + break; + case 'subscription': + switch (config.layout) { + case 'modal': + case 'bar': + case 'slideout': + case 'random': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } + break; + case 'message': + switch (config.layout) { + case 'modal': + case 'slideout': + break; + case 'random': + case 'bar': + case 'button': + case 'inline': + break; + default: + throw new Error('Invalid widget layout value'); + } + break; + case 'sitegate': + switch (config.layout) { + case 'modal': + if (config.showForm === false) { + node = widget.querySelector('form'); + child = node.querySelectorAll('input, select, textarea'); + + if (node) { + for (i = 0; i < child.length; i++) { + node.removeChild(child[i]); + } + + child = node.querySelector('.pf-sitegate-clear'); + + if (child) { + node.removeChild(child); + } + } + } + break; + default: + throw new Error('Invalid widget layout value'); + } + break; + } + + // NOTE Set The headline + for (i = widgetHeadline.length - 1; i >= 0; i--) { + widgetHeadline[i].innerHTML = config.headline; + } + + // NOTE Set the image + if (config.image) { + var widgetImage = document$1.createElement('img'); + widgetImage.src = config.image; + widgetImage.className = 'pf-widget-img'; + if (config.layout === 'button') ; else if (config.layout === 'modal' || config.layout === 'inline') { + widgetContent.appendChild(widgetImage); + } else { + widgetBody.appendChild(widgetImage); + } + } + + switch (config.type) { + case 'sitegate': + case 'form': + // Check if custom form is defined + if (config.formElements && config.formElements.length) { + // remove the existing form fields + var form = widget.querySelector('form'); + addClass(form, 'pf-custom-form'); + var childName; + var arr = form.children; + + for (var k = 0; k < arr.length; k++) { + child = arr[k]; + + if (typeof child.getAttribute !== 'undefined') { + childName = child.getAttribute('name'); + + if (childName != null) { + form.removeChild(child); + k--; + } + } + } + + buildWidgetForm(config.formElements, form); + } else { + // support old form functions + var getFormElement = function (field) { + if (field === 'name') { + return widget.querySelector('input[name="username"]'); + } + + return widget.querySelector('form [name="' + field + '"]'); + }; + + // Set placeholders + Object.keys(config.placeholders).forEach(function (field) { + var element = getFormElement(field); + + if (element == null) { + return; + } + if (typeof element.placeholder !== 'undefined') { + element.placeholder = config.placeholders[field]; + } else if (typeof element.options !== 'undefined') { + element.options[0].innerHTML = config.placeholders[field]; + } + + element.setAttribute('aria-label', config.placeholders[field]); + }); + + // Set required Fields + Object.keys(config.required).forEach(function (field) { + var element = getFormElement(field); + + if (element && config.required[field]) { + element.setAttribute('data-required', 'true'); + } + }); + + // Hide fields + Object.keys(config.fields).forEach(function (field) { + var element = getFormElement(field); + + if (field === 'email' && config.fields[field] && element) { + element.setAttribute('data-validate', 'true'); + } + + if (element && !config.fields[field] && element.parentNode) { + element.parentNode.removeChild(element); + } + }); + + // NOTE: collapse half-width inputs + Array.prototype.slice + .call(widget.querySelectorAll('form .pf-field-half-width')) + .forEach(function (element, halfcount) { + var parent = element.parentNode, + prev = element.previousElementSibling, + next = element.nextElementSibling; + + if (parent) { + if (element.className.indexOf('pf-field-half-width') !== -1) { + if (halfcount % 2) { + // odd + addClass(element, 'right'); + + if ( + !( + prev && + prev.className.indexOf('pf-field-half-width') !== -1 + ) + ) { + removeClass(element, 'pf-field-half-width'); + } + } else if ( + !( + next && next.className.indexOf('pf-field-half-width') !== -1 + ) + ) { + // even + removeClass(element, 'pf-field-half-width'); + } + } + } + }); + } + + // For select boxes we need to control the color of + // the placeholder text + var selects = widget.querySelectorAll('select'); + + for (i = 0; i < selects.length; i++) { + // default class indicates the placeholder text color + if (selects[i].value === '') { + addClass(selects[i], 'default'); + } + + selects[i].onchange = function () { + if (this.value !== '') { + removeClass(this, 'default'); + } else { + addClass(this, 'default'); + } + }; + } + + break; + case 'subscription': + widget.querySelector('input').placeholder = config.placeholders.email; + break; + } + + if (config.msg) { + widgetMessage.innerHTML = config.msg; + } + + if (config.footerText) { + widgetFooter.innerHTML = config.footerText; + } + } + + /** @module pathfora/widgets/colors/set-custom-colors */ + + /** + * Set colors for a widget with a custom theme + * defined in the config + * + * @exports setCustomColors + * @params {object} widget + * @params {object} colors + */ + function setCustomColors (widget, colors) { + var i = 0, + close = widget.querySelector('.pf-widget-close'), + msg = widget.querySelectorAll('.pf-widget-message'), + headline = widget.querySelectorAll('.pf-widget-headline'), + headlineLeft = widget.querySelector( + '.pf-widget-caption-left .pf-widget-headline' + ), + cancelBtn = widget.querySelectorAll('.pf-widget-btn.pf-widget-cancel'), + okBtn = widget.querySelectorAll('.pf-widget-btn.pf-widget-ok'), + arrow = widget.querySelector('.pf-widget-caption span'), + arrowLeft = widget.querySelector('.pf-widget-caption-left span'), + contentUnit = widget.querySelector('.pf-content-unit'), + contentUnitMeta = widget.querySelector('.pf-content-unit-meta'), + fields = widget.querySelectorAll('input, textarea, select'), + branding = widget.querySelector('.branding svg'), + required = widget.querySelectorAll('.pf-required-flag'), + requiredAsterisk = widget.querySelectorAll('span.required'), + requiredInline = widget.querySelectorAll( + '[data-required=true]:not(.pf-has-label), [data-validate=true]:not(.pf-has-label)' + ), + body = widget.querySelector('.pf-widget-body'); + + if (colors.background) { + if (hasClass(widget, 'pf-widget-modal')) { + widget + .querySelector('.pf-widget-content') + .style.setProperty('background-color', colors.background, 'important'); + } else { + widget.style.setProperty( + 'background-color', + colors.background, + 'important' + ); + } + } + + if (colors.fieldBackground) { + for (i = 0; i < fields.length; i++) { + fields[i].style.setProperty( + 'background-color', + colors.fieldBackground, + 'important' + ); + } + } + + if (colors.required) { + for (i = 0; i < required.length; i++) { + required[i].style.setProperty( + 'background-color', + colors.required, + 'important' + ); + required[i] + .querySelector('span') + .style.setProperty('border-right-color', colors.required, 'important'); + } + + for (i = 0; i < requiredInline.length; i++) { + requiredInline[i].style.setProperty( + 'border-color', + colors.required, + 'important' + ); + } + + for (i = 0; i < requiredAsterisk.length; i++) { + requiredAsterisk[i].style.setProperty( + 'color', + colors.required, + 'important' + ); + } + } + + if (colors.requiredText) { + for (i = 0; i < required.length; i++) { + required[i].style.setProperty('color', colors.requiredText, 'important'); + } + } + + if (contentUnit && contentUnitMeta) { + var contentUnitMetaTitle = contentUnitMeta.querySelector('h4'); + var contentUnitMetaDescription = contentUnitMeta.querySelector('p'); + + if (colors.actionBackground) { + contentUnit.style.setProperty( + 'background-color', + colors.actionBackground, + 'important' + ); + } + + if (colors.actionText && contentUnitMetaTitle) { + contentUnitMetaTitle.style.setProperty( + 'color', + colors.actionText, + 'important' + ); + } + + if (colors.text && contentUnitMetaDescription) { + contentUnitMetaDescription.style.setProperty( + 'color', + colors.text, + 'important' + ); + } + } + + if (close && colors.close) { + close.style.setProperty('color', colors.close, 'important'); + } + + if (headline && colors.headline) { + for (i = 0; i < headline.length; i++) { + headline[i].style.setProperty('color', colors.headline, 'important'); + } + } + + if (headlineLeft && colors.headline) { + headlineLeft.style.setProperty('color', colors.headline, 'important'); + } + + if (arrow && colors.close) { + arrow.style.setProperty('color', colors.close, 'important'); + } + + if (arrowLeft && colors.close) { + arrowLeft.style.setProperty('color', colors.close, 'important'); + } + + if (cancelBtn) { + for (i = 0; i < cancelBtn.length; i++) { + if (colors.cancelText) { + cancelBtn[i].style.setProperty('color', colors.cancelText, 'important'); + } + + if (colors.cancelBackground) { + cancelBtn[i].style.setProperty( + 'background-color', + colors.cancelBackground, + 'important' + ); + } + } + } + + if (okBtn) { + for (i = 0; i < okBtn.length; i++) { + if (colors.actionText) { + okBtn[i].style.setProperty('color', colors.actionText, 'important'); + } + + if (colors.actionBackground) { + okBtn[i].style.setProperty( + 'background-color', + colors.actionBackground, + 'important' + ); + } + } + } + + if (colors.text && branding) { + branding.style.setProperty('fill', colors.text, 'important'); + } + + if (msg && colors.text) { + for (i = 0; i < msg.length; i++) { + msg[i].style.setProperty('color', colors.text, 'important'); + } + } + + if (body && colors.text) { + body.style.setProperty('color', colors.text, 'important'); + } + } + + /** @module pathfora/wodgets/colors/setup-widget-colors */ + + /** + * Determine if the widget has a custom or predefined + * theme and setup the colors accordingly + * + * @exports setupWidgetColors + * @params {object} widget + * @params {object} config + */ + function setupWidgetColors (widget, config) { + switch (config.theme) { + case 'custom': + if (config.colors) { + setCustomColors(widget, config.colors); + } + break; + case 'none': + // Do nothing, we will rely on CSS for the colors + break; + default: + if (config.theme) { + setCustomColors(widget, defaultProps.generic.themes[config.theme]); + } + break; + } + } + + /** @module pathfora/widgets/create-widget-html */ + + /** + * Call all the necessary functions to construct + * the widget html + * + * @exports createWidgetHtml + * @params {object} config + * @returns {object} widget + */ + function createWidgetHtml (config) { + var widget = document$1.createElement('div'); + + widget.innerHTML = templates[config.type][config.layout] || ''; + widget.id = config.id; + + if (widget.innerHTML === '') { + throw new Error('Could not get pathfora template based on type and layout.'); + } + + setupWidgetPosition(widget, config); + constructWidgetActions(widget, config); + setupWidgetContentUnit(widget, config); + setWidgetClassname(widget, config); + constructWidgetLayout(widget, config); + setupWidgetColors(widget, config); + + return widget; + } + + /** @module pathfora/widgets/widget-resize-listener */ + + /** + * Adjust widget look and feel on window resize bounds + * + * @exports widgetResizeListener + * @params {object} widget + * @params {object} node + */ + function widgetResizeListener (widget, node) { + if (widget.layout === 'inline' || widget.layout === 'modal' && widget.recommend) { + var rec = node.querySelector('.pf-content-unit'); + if (rec) { + if (node.offsetWidth < WIDTH_BREAKPOINT && !hasClass(rec, 'stack')) { + addClass(rec, 'stack'); + } else if (node.offsetWidth >= WIDTH_BREAKPOINT) { + removeClass(rec, 'stack'); + } + } + } + } + + /** @module pathfora/widgets/show-widget */ + + /** + * Make the widget visible to the user + * + * @exports showWidget + * @params {object} widget + */ + + function showWidget (w) { + var openWidget = function (widget) { + // FIXME Change to Array#filter and Array#length + for (var i = 0; i < widgetTracker.openedWidgets.length; i++) { + if (widgetTracker.openedWidgets[i] === widget) { + return; + } + } + + widgetTracker.openedWidgets.push(widget); + trackWidgetAction('show', widget); + + // increment impressions for widget regardless of display condition need(s) + incrementImpressions(widget); + + var node; + + try { + node = createWidgetHtml(widget); + } catch (error) { + widgetTracker.openedWidgets.pop(); + throw new Error(error); + } + + if (widget.pushDown) { + addClass(document$1.querySelector('.pf-push-down'), 'opened'); + } + + if ( + widget.config.positionSelector == null && + widget.config.layout !== 'inline' + ) { + document$1.body.appendChild(node); + + if (widget.layout === 'modal' || widget.type === 'sitegate') { + // ensure that we set focus the the modal for accessibility reasons + var focusable = node.querySelectorAll( + 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])' + ); + + if (focusable.length) { + widget.listeners.tabindex = { + type: 'keydown', + target: document$1, + fn: function (ev) { + // for modal and sitegate widgets we need to limit tab cycle focus to the widget + if (ev.keyCode === 9) { + if (!node.contains(event.target)) { + ev.preventDefault(); + focusable[0].focus(); + } else if (ev.target === focusable[focusable.length - 1]) { + ev.preventDefault(); + focusable[0].focus(); + } + } + } + }; + } + } + } else { + // support legacy inline layout used position as selector. + var selector = widget.config.positionSelector == null + ? widget.config.position : widget.config.positionSelector; + var hostNode = document$1.querySelector(selector); + + if (hostNode) { + hostNode.appendChild(node); + } else { + widgetTracker.openedWidgets.pop(); + throw new Error('Widget could not be initialized in ' + selector); + } + } + + // NOTE wait for appending to DOM to trigger the animation + // FIXME 50 - magical number + setTimeout(function () { + var widgetLoadCallback = widget.config.onLoad; + + addClass(node, 'opened'); + + if (typeof widgetLoadCallback === 'function') { + widgetLoadCallback(callbackTypes.LOAD, { + config: widget, + widget: node + }); + } + if ( + widget.config.layout === 'modal' && + typeof widget.config.onModalOpen === 'function' + ) { + widget.config.onModalOpen(callbackTypes.MODAL_OPEN, { + config: widget, + widget: node + }); + } + }, 50); + + if (widget.displayConditions.hideAfter) { + setTimeout(function () { + closeWidget(widget.id, true); + }, widget.displayConditions.hideAfter * 1000); + } + + widgetResizeListener(widget, node); + + widget.listeners.resize = { + type: 'resize', + target: window, + fn: function () { + widgetResizeListener(widget, node); + } + }; + + for (var key in widget.listeners) { + if (widget.listeners.hasOwnProperty(key)) { + var val = widget.listeners[key]; + if (val.target && typeof val.target.addEventListener === 'function') { + val.target.addEventListener(val.type, val.fn); + } + } + } + }; + + var widgetOnInitCallback = w.onInit; + if (typeof widgetOnInitCallback === 'function') { + widgetOnInitCallback(callbackTypes.INIT, { + config: w + }); + } + + // account for showDelay condition + if (w.displayConditions && w.displayConditions.showDelay) { + widgetTracker.delayedWidgets[w.id] = setTimeout(function () { + openWidget(w); + document$1.querySelector('.pf-widget-ok').focus(); + }, w.displayConditions.showDelay * 1000); + } else { + openWidget(w); + } + } + + /** @module pathfora/display-conditions/watchers/validate-watchers */ + + function validateWatchers (widget, cb, e) { + var valid = true; + + for (var key in widget.watchers) { + if (widget.watchers.hasOwnProperty(key) && widget.watchers[key] !== null) { + valid = valid && widget.valid && widget.watchers[key].check(e); + } + } + + if (widget.displayConditions.impressions && valid) { + valid = impressionsChecker(widget.displayConditions.impressions, widget); + } + + if (valid) { + showWidget(widget); + widget.valid = false; + cb(); + widget.watchers = []; + + return true; + } + + return false; + } + + /** @module pathfora/display-conditions/manual-trigger/trigger-widget */ + + /** + * Trigger a single "manualTrigger" widget to be shown + * + * @exports triggerWidget + * @params {object} widget + * @returns {boolean} + */ + function triggerWidget (widget) { + return validateWatchers(widget, function () { + widgetTracker.triggeredWidgets[widget.id] = false; + + // remove from the ready widgets list + widgetTracker.readyWidgets.some(function (w, i) { + if (w.id === widget.id) { + widgetTracker.readyWidgets.splice(i, 1); + return true; + } + }); + }); + } + + /** @module pathfora/display-conditions/manual-trigger/trigger-widgets */ + + /** + * Public method to trigger a widget that has already been + * initialized and have the "manualTrigger" display condition + * + * @exports triggerWidgets + * @params {array} widgetIds + */ + function triggerWidgets (widgetIds) { + var i, valid; + + // no widget ids provided, trigger all ready widgets + if (typeof widgetIds === 'undefined') { + widgetTracker.triggeredWidgets['*'] = true; + + for (i = 0; i < widgetTracker.readyWidgets.length; i++) { + valid = triggerWidget(widgetTracker.readyWidgets[i]); + if (valid) { + i--; + } + } + + // trigger all widget ids provided + } else { + widgetIds.forEach(function (id) { + if (widgetTracker.triggeredWidgets[id] !== false) { + widgetTracker.triggeredWidgets[id] = true; + } + + for (i = 0; i < widgetTracker.readyWidgets.length; i++) { + valid = triggerWidget(widgetTracker.readyWidgets[i]); + if (valid) { + i--; + } + } + }); + } + } + + /** @module pathfora/data/segments/get-user-segments */ + + /** + * Get a list of Lytics segments for the user + * + * @exports getUserSegments + * @returns {array} segments + */ + function getUserSegments () { + if (window.lio && window.lio.data && window.lio.data.segments) { + // legacy + return window.lio.data.segments; + } else if (window.jstag && typeof window.jstag.getSegments === 'function') { + // > jstag 3.0.0 + return window.jstag.getSegments(); + } else { + // fallback + return ['all']; + } + } + + /** @module pathfora/validation/validate-widgets-object */ + + /** + * Validate that object provided to initializeWidgets + * is either an array of widgets or a targeting object + * targetting object containing widgets. + * + * @exports validateWidgetsObject + * @params {object} widgets + */ + function validateWidgetsObject (widgets) { + if (widgets.target) { + widgets.common = widgets.common || []; + + for (var i = 0; i < widgets.target.length; i++) { + if (!widgets.target[i].segment) { + throw new Error('All targeted widgets should have segment specified'); + } else if (widgets.target[i].segment === '*') { + widgets.common = widgets.common.concat(widgets.target[i].widgets); + widgets.target.splice(i, 1); + } + } + } + } + + /** @module pathfora/validation/validate-account-id */ + + /** + * Validate and set the Lytics account Id + * + * @exports validateAccountId + * @params {object} pf + */ + function validateAccountId (pf) { + var acctid; + + // in the legacy javascript tag < 2.0, there is an lio object surfaced that holds the account id. + // in > 3.0 this lio object is only available for backwards compatibility and not the main source + // of truth. we should be getting the cid that is passed to the config, which is an array, by default + // we can assume the first cid in the array is the one to be used for personalization and such. + if (typeof pf.acctid === 'undefined' || pf.acctid === '') { + if (window.lio && window.lio.account) { + // tag is legacy + acctid = window.lio.account.id; + } else if ( + // tag is current gen + window.jstag && + window.jstag.config && + window.jstag.config.cid && + window.jstag.config.cid.length > 0 + ) { + acctid = window.jstag.config.cid[0]; + } else { + throw new Error('Could not get account id from Lytics Javascript tag.'); + } + + // make sure we have a valid acctid before setting + if (!!acctid) { + pf.acctid = acctid; + } else { + throw new Error('Lytics Javascript tag returned an empty account id.'); + } + } + } + + /** @module pathfora/widgets/init-targeted-widgets */ + + /** + * Initialize widgets which are targeted by segments. + * + * @exports initializeWidgets + * @params {object} widgets + * @params {object} options + */ + function initializeTargetedWidgets (widgets, options) { + var pf = this, + i; + + validateWidgetsObject(widgets); + + if (widgets.common) { + pf.initializeWidgetArray(widgets.common, options); + } + + // NOTE Target sensitive widgets + if (widgets.target || widgets.exclude) { + pf.addCallback(function () { + validateAccountId(pf); + var targetedWidgets = [], + segments = getUserSegments(); + + // handle inclusions + if (widgets.target) { + for (i = 0; i < widgets.target.length; i++) { + var target = widgets.target[i]; + if (segments && segments.indexOf(target.segment) !== -1) { + // add the widgets with proper targeting to the master list + // ensure we dont overwrite existing widgets in target + targetedWidgets = targetedWidgets.concat(target.widgets); + } + } + } + + // handle exclusions + if (widgets.exclude) { + for (i = 0; i < widgets.exclude.length; i++) { + var exclude = widgets.exclude[i]; + if (segments && segments.indexOf(exclude.segment) !== -1) { + // we found a match, ensure the corresponding segment(s) are not in the + // targetted widgets array + for (var x = 0; x < targetedWidgets.length; x++) { + for (var y = 0; y < exclude.widgets.length; y++) { + if (targetedWidgets[x] === exclude.widgets[y]) { + targetedWidgets.splice(x, 1); + } + } + } + } + } + } + + if (targetedWidgets.length) { + pf.initializeWidgetArray(targetedWidgets, options); + } else if (widgets.inverse) { + pf.initializeWidgetArray(widgets.inverse, options); + } + }); + } + } + + /** @module pathfora/data/tracking/track-time-on-page */ + + /** + * Record the amount of time the user has spent + * on the current page + * + * @exports trackTimeOnPage + */ + function trackTimeOnPage () { + setInterval(function () { + pathforaDataObject.timeSpentOnPage += 1; + }, 1000); + } + + /** @module pathfora/validation/validate-options */ + + /** + * Validate and set the Lytics account Id + * + * @exports validateAccountId + * @params {object} pf + */ + function validateOptions (options) { + if (options) { + // validate priority + if (options.priority) { + switch (options.priority) { + case OPTIONS_PRIORITY_ORDERED: + break; + case OPTIONS_PRIORITY_UNORDERED: + break; + default: + throw new Error('Invalid priority defined in options.'); + } + } + } + } + + /** @module pathfora/widgets/init-widgets */ + + /** + * Public method used to initialize widgets once + * the individual configs have been created + * + * @exports initializeWidgets + * @params {object} widgets + * @params {object} config + * @params {object} options + */ + function initializeWidgets (widgets, config, options) { + var pf = this; + trackTimeOnPage(); + // support legacy initialize function where we passed account id as + // a second parameter and config as third + if (typeof config === 'string') { + if (options) { + config = options; + options = null; + } else { + config = null; + } + } + + if (!widgets) { + throw new Error('Initialize called with no widgets'); + } + + validateOptions(options); + + if (config) { + updateObject(defaultProps, config); + } + + if (Array.isArray(widgets)) { + pf.initializeWidgetArray(widgets, options); + } else { + pf.initializeTargetedWidgets(widgets, options); + } + } + + /** @module pathfora/widgets/has/has-recommend */ + + /** + * Check if the widget has recommendations. + * + * @exports hasRecommend + * @params {object} widget + * @returns {bool} hasRecommend + */ + function hasRecommend (widget) { + return widget.recommend && Object.keys(widget.recommend).length !== 0; + } + + /** @module pathfora/widgets/has/has-entity-templates */ + + /** + * Check if the widget has entity field templates + * + * @exports hasEntityTemplates + * @params {object} widget + * @returns {bool} hasEntityTemplates + */ + function hasEntityTemplates (widget) { + for (var j = 0; j < ENTITY_FIELDS.length; j++) { + var regex = new RegExp(ENTITY_FIELD_TEMPLATE_REGEX, 'g'), + fieldValue = getObjectValue(widget, ENTITY_FIELDS[j]); + + // convert functions to a string + if (typeof fieldValue === 'function') { + fieldValue = fieldValue.toString(); + } + + if (typeof fieldValue === 'string') { + if (regex.test(fieldValue)) { + return true; + } + } + } + + return false; + } + + /** @module pathfora/widgets/preload-lio */ + + /** + * Check if the widget needs lio to be loaded, if so + * wait for the callback, otherwise continue execution. + * + * @exports preloadLio + * @params {object} widget + * @params {object} pf + * @params {function} cb + */ + function preloadLio (widget, pf, cb) { + if (hasRecommend(widget) || hasEntityTemplates(widget)) { + pf.addCallback(function () { + validateAccountId(pf); + cb(); + }); + } else { + cb(); + } + } + + /** @module pathfora/data/request/get-data */ + + /** + * Make an http GET request + * + * @exports getData + * @params {string} url + * @params {function} onSuccess + * @params {function} onError + */ + function getData (url, onSuccess, onError) { + var xhr = new XMLHttpRequest(); + + xhr.onreadystatechange = function () { + if (xhr.readyState === 4 && xhr.status === 200) { + onSuccess(xhr.responseText); + } else if (xhr.readyState === 4) { + onError(xhr.responseText); + } + }; + + xhr.open('GET', url); + xhr.send(); + } + + /** @module pathfora/recommendations/recommend-content */ + + + /** + * Make the request to the Lytics content recommendation API + * and return a list of recommended documents + * + * @exports recommendContent + * @params {string} accountId + * @params {object} params + * @params {string} id + * @params {function} callback + */ + function recommendContent (accountId, params, id, callback) { + // Recommendation API: + // https://www.getlytics.com/developers/rest-api#content-recommendation + + // ensure that the callback arg is a function + if (typeof callback !== 'function') { + console.warn('Could not make recommendation - missing callback function.'); + return; + } + + // if we have the recommendation response cached in session storage + // use that instead of making a new API request + var storedRec = sessionStorage.getItem(PREFIX_REC + id); + + if (typeof storedRec === 'string' && params.visited !== false) { + var rec; + + try { + rec = JSON.parse(decodeSafe(storedRec)); + } catch (e) { + console.warn('Could not parse json stored response:' + e); + } + + if (rec && rec.data) { + // special case: shuffle param + if (params.shuffle === true) { + rec.data.shift(); + } + + if (rec.data.length > 0) { + sessionStorage.setItem(PREFIX_REC + id, encodeURIComponent(JSON.stringify(rec.data))); + callback(rec.data); + } + return; + } + } + + // becuase you can override the base cookiename as well as field name/value we need to account for those + var storedCookieName = 'seerid'; + var userByFieldName = '_uids'; + var userByFieldValue; + + // check for custom cookie name in jstag config + if (window.jstag && window.jstag.config && window.jstag.config.cookie !== '') { + storedCookieName = window.jstag.config.cookie; + } + + // attempt to get value from stored cookie + userByFieldValue = readCookie(storedCookieName); + + // override everything if key/value have been explicitly set for user + if ( + window.liosetup && + window.liosetup.field && + window.liosetup.field !== '' && + window.liosetup.value && + window.liosetup.value !== '' + ) { + userByFieldName = window.liosetup.field; + userByFieldValue = window.liosetup.value; + } + + // ensure we have required params + if (!userByFieldName && !userByFieldValue) { + console.warn('Could not determine BY field and value from config'); + callback([]); + } + + var recommendParts = [ + API_URL, + 'api', + 'content', + 'recommend', + accountId, + 'user', + userByFieldName, + userByFieldValue + ]; + + var ql = params.ql, + ast = params.ast, + display = params.display; + + delete params.ql; + delete params.ast; + delete params.display; + + var queries = constructQueries(params); + + params.display = display; + + if (!params.contentsegment) { + // Special case for Adhoc Segments + if (ql && ql.raw || ast) { + if (queries.length > 0) { + queries += '&'; + } else { + queries += '?'; + } + + // Filter QL + if (ql && ql.raw) { + queries += 'ql=' + ql.raw; + + // Segment JSON (usually segment AST) + } else { + var contentSegment = {table: 'content', ast: ast}; + queries += 'contentsegments=[' + encodeURIComponent(JSON.stringify(contentSegment)) + ']'; + } + } + } + + var recommendUrl = recommendParts.join('/') + queries; + + getData(recommendUrl, function (json) { + var resp; + + try { + resp = JSON.parse(json); + } catch (e) { + console.warn('Could not parse json response:' + e); + callback([]); + return; + } + + if (resp.data && resp.data.length > 0) { + // append a protocol for urls that are absolute + for (var i = 0; i < resp.data.length; i++) { + var url = resp.data[i].url; + if (url) { + var split = url.split('/')[0].split('.'); + if (split.length > 1) { + resp.data[i].url = 'http://' + url; + } + } + } + + // set the session storage. + sessionStorage.setItem(PREFIX_REC + id, encodeURIComponent(JSON.stringify(resp))); + + callback(resp.data); + } else { + callback([]); + } + }, function () { + callback([]); + }); + } + + /** @module pathfora/widgets/recommendation/set-widget-recommendation */ + + /** + * Make the call to get the recommendations then + * handle assigning it to the widget. + * + * @exports setWidgetContent + * @params {object} accountId + * @params {object} widget + * @params {function} cb + */ + + function setWidgetContent (accountId, widget, cb) { + var params = widget.recommend; + + if (params && params.collection) { + params.contentsegment = widget.recommend.collection; + delete params.collection; + } + + recommendContent(accountId, params, widget.id, function (resp) { + // if we get a response from the recommend api put it as the first + // element in the content object this replaces any default content + if (resp[0]) { + var content = resp[0]; + widget.content = [ + { + title: content.title, + description: content.description, + url: content.url, + image: content.primary_image, + date: content.created, + author: content.author + } + ]; + } + + // if we didn't get a valid response from the api, we check if a default + // exists and use that as our content piece instead + if (!widget.content) { + throw new Error('Could not get recommendation and no default defined'); + } + + cb(); + }); + } + + /** @module pathfora/validation/validate-recommendation-widget */ + + /** + * Validate that a recommendation widget + * is using the correct type and layout + * + * @exports validateRecommendationWidget + * @params {object} widget + */ + function validateRecommendationWidget (widget) { + // validate + if (widget.type !== 'message') { + throw new Error('Unsupported widget type for content recommendation'); + } + + if ( + widget.layout !== 'slideout' && + widget.layout !== 'modal' && + widget.layout !== 'inline' + ) { + throw new Error('Unsupported layout for content recommendation'); + } + + if (widget.content && widget.content[0] && !widget.content[0].default) { + throw new Error('Cannot define recommended content unless it is a default'); + } + } + + /** @module pathfora/widgets/recommendation/preload-recommendation */ + + /** + * Check if the widget needs recommendations to be loaded, if so + * wait for the callback, otherwise continue execution. + * + * @exports preloadRecommendation + * @params {object} widget + * @params {object} pf + * @params {function} cb + */ + function preloadRecommendation (widget, pf, cb) { + if (hasRecommend(widget)) { + validateRecommendationWidget(widget); + setWidgetContent(pf.acctid, widget, cb); + } else { + cb(); + } + } + + /** @module pathfora/widgets/initialize-widget-array */ + + /** + * Given an array of widgets, begin off the initialization + * process for each + * + * @exports initializeWidgetArray + * @params {array} array + */ + function initializeWidgetArray (array, options) { + var pf = this; + widgetTracker.prioritizedWidgets = []; + + var initWidget = function (widgetArray, index, initOptions) { + if (index >= widgetArray.length) { + return; + } + + var widget = widgetArray[index], + defaults = defaultProps[widget.type], + globals = defaultProps.generic; + + updateObject(widget, globals); + updateObject(widget, defaults); + updateObject(widget, widget.config); + + if (widgetTracker.initializedWidgets.indexOf(widget.id) < 0) { + widgetTracker.initializedWidgets.push(widget.id); + } else { + throw new Error('Cannot add two widgets with the same id'); + } + + // retain support for old "success" field + if (widget.success) { + if (!widget.formStates) { + widget.formStates = {}; + } + + if (!widget.formStates.success) { + widget.formStates.success = widget.success; + } + } + + preloadLio(widget, pf, function () { + preloadRecommendation(widget, pf, function () { + pf.initializeWidget(widget, initOptions); + if (initOptions && initOptions.priority === OPTIONS_PRIORITY_ORDERED) { + if ( + widgetTracker.prioritizedWidgets.length && + widgetTracker.prioritizedWidgets[0].id === widget.id + ) { + return; + } + + initWidget(widgetArray, index + 1, initOptions); + } + }); + }); + + if (!initOptions || initOptions.priority !== OPTIONS_PRIORITY_ORDERED) { + initWidget(widgetArray, index + 1, initOptions); + } + }; + + initWidget(array, 0, options); + } + + /** @module pathfora/display-conditions/replace-entity-field */ + + /** + * Fill in the data for a entity field template in + * a widgets text field + * + * @exports replaceEntityField + * @params {object} widget + * @params {string} fieldName + * @params {array} found + * @returns {boolean} + */ + function replaceEntityField ( + widget, + fieldName, + found, + customData + ) { + if (!found || !found.length) { + return true; + } + + var fnParams, + fn, + currentVal = getObjectValue(widget, fieldName), + isFn = false; + + // special case if the field is a function, convert it to a string first + if (typeof currentVal === 'function') { + fn = currentVal.toString(); + currentVal = fn.substring(fn.indexOf('{') + 1, fn.lastIndexOf('}')); // body of the function + fnParams = fn.match(/(function.+\()(.+(?=\)))(.+$)/); // get the function param names + isFn = true; + } + + // for each template found... + for (var f = 0; f < found.length; f++) { + // parse the field name + var foundval = found[f].slice(2).slice(0, -2), + parts = foundval.split('|'), + def = ''; + + // get the default (fallback) value + if (parts.length > 1) { + def = parts[1].trim(); + } + + // check for subfields if the value is an object + var split = parts[0].trim().split('.'); + + // get entity data from tag + var dataval; + + // for the legacy tag < 3.0, there is a lio object surfaced. within this object lives the personalization + // data. however, in current gen tag > 3.0 we have a getEntity() method that should be used as the source + // of truth, the returned data model is slightly different in that it supports the full personalization + // api vs the legacy entity api that only returns segment and user field info. + if (window.lio && window.lio.data) { + dataval = window.lio.data; + // tag is legacy + } else if (window.jstag && typeof window.jstag.getEntity === 'function') { + // tag is current gen + var entity = window.jstag.getEntity(); + if (entity && entity.data && entity.data.user) { + dataval = entity.data.user; + } + } + + var s; + for (s = 0; s < split.length; s++) { + if (typeof dataval !== 'undefined') { + dataval = dataval[split[s]]; + } + } + + // if we couldn't find the data in question on the lytics jstag, check customData provided + if (typeof dataval === 'undefined') { + dataval = customData; + + for (s = 0; s < split.length; s++) { + if (typeof dataval !== 'undefined') { + dataval = dataval[split[s]]; + } + } + } + + var val; + + // replace the template with the lytics data value + if (typeof dataval !== 'undefined') { + val = currentVal.replace(found[f], dataval); + // if there's no default and we should error + } else if ( + (!def || def.length === 0) && + widget.displayConditions.showOnMissingFields !== true + ) { + return false; + // replace with the default option, or empty string if not found + } else { + val = currentVal.replace(found[f], def); + } + + setObjectValue(widget, fieldName, val); + currentVal = val; + } + + // if the value is a function, convert it back from a string + if (isFn) { + if (fnParams) { + fn = new Function(fnParams.join(','), getObjectValue(widget, fieldName)); + } else { + fn = new Function(getObjectValue(widget, fieldName)); + } + + setObjectValue(widget, fieldName, fn); + } + + return true; + } + + /** @module pathfora/display-conditions/entity-fields/entity-field-checker */ + + /** + * Evaluate all fields on the list provided and check + * if there are any entity templates that need to be + * replaced. + * + * @exports entityFieldChecker + * @params {array} fields + * @params {object} widget + * @params {function} cb + */ + function entityFieldChecker (widget, customData) { + var found, + valid = true; + + for (var i = 0; i < ENTITY_FIELDS.length; i++) { + var regex = new RegExp(ENTITY_FIELD_TEMPLATE_REGEX, 'g'), + fieldValue = getObjectValue(widget, ENTITY_FIELDS[i]); + + // convert functions to a string + if (typeof fieldValue === 'function') { + fieldValue = fieldValue.toString(); + } + + if (typeof fieldValue === 'string') { + found = fieldValue.match(regex); + + if (found && found.length > 0) { + valid = + valid && + replaceEntityField(widget, ENTITY_FIELDS[i], found, customData); + } + } + } + + return valid; + } + + /** @module pathfora/display-conditions/date-checker */ + + /** + * Check if the current date fits within the + * date displayConditions for the widget + * + * @exports dateChecker + * @params {object} date + * @returns {boolean} + */ + function dateChecker (date) { + var valid = true, + today = Date.now(); + + if (date.start_at && today < new Date(date.start_at).getTime()) { + valid = false; + } + + if (date.end_at && today > new Date(date.end_at).getTime()) { + valid = false; + } + + return valid; + } + + /** @module pathfora/display-conditions/pageviews/page-visits-checker */ + + /** + * Check if the pagevisit count meets the requirements + * + * @exports pageVisitsChecker + * @returns {boolean} + */ + function pageVisitsChecker (pageVisitsRequired) { + return (read(PF_PAGEVIEWS) >= pageVisitsRequired); + } + + /** @module pathfora/display-conditions/hide-after-action-checker */ + + /** + * Check if a widget should be hidden because it meets + * a hideAfterAction display condition + * + * @exports hideAfterActionChecker + * @params {object} hideAfterActionConstraints + * @params {string} widget + * @returns {boolean} + */ + function hideAfterActionChecker (hideAfterActionConstraints, widget) { + var parts, + valid = true, + now = Date.now(), + confirm = read(PREFIX_CONFIRM + widget.id), + cancel = read(PREFIX_CANCEL + widget.id), + closed = read(PREFIX_CLOSE + widget.id); + + if (hideAfterActionConstraints.confirm && confirm) { + parts = confirm.split('|'); + + if (parseInt(parts[0], 10) >= hideAfterActionConstraints.confirm.hideCount) { + valid = false; + } + + if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.confirm.duration) { + valid = false; + } + } + + if (hideAfterActionConstraints.cancel && cancel) { + parts = cancel.split('|'); + + if (parseInt(parts[0], 10) >= hideAfterActionConstraints.cancel.hideCount) { + valid = false; + } + + if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.cancel.duration) { + valid = false; + } + } + + if (hideAfterActionConstraints.closed && closed) { + parts = closed.split('|'); + + if (parseInt(parts[0], 10) >= hideAfterActionConstraints.closed.hideCount) { + valid = false; + } + + if (typeof parts[1] !== 'undefined' && (Math.abs(parts[1] - now) / 1000) < hideAfterActionConstraints.closed.duration) { + valid = false; + } + } + + return valid; + } + + /** @module pathfora/display-conditions/url-contains/parse-query */ + + /** + * Convert key/value queries from a URL into an object + * + * @exports parseQuery + * @params {string} url + * @returns {object} query + */ + function parseQuery (url) { + var query = {}, + pieces = escapeURI(url, { keepEscaped: true }).split('?'); + + if (pieces.length > 1) { + pieces = pieces[1].split('&'); + + for (var i = 0; i < pieces.length; i++) { + var pair = pieces[i].split('='); + + if (pair.length > 1) { + // NOTE We should not account for the preview id + if (pair[0] !== 'lytics_variation_preview_id') { + query[pair[0]] = pair[1]; + } + } + } + } + + return query; + } + + /** @module pathfora/display-conditions/url-contains/compare-queries */ + + /** + * Check if urls contain matching query params + * + * @exports compareQueries + * @params {object} query + * @params {object} matchQuery + * @params {string} rule + * @returns {boolean} + */ + function compareQueries (query, matchQuery, rule) { + switch (rule) { + case 'exact': + if (Object.keys(matchQuery).length !== Object.keys(query).length) { + return false; + } + break; + } + + for (var key in matchQuery) { + if (matchQuery.hasOwnProperty(key) && matchQuery[key] !== query[key]) { + return false; + } + } + + return true; + } + + /** @module pathfora/display-conditions/url-contains/phrase-checker */ + + /** + * Evaluate if the current URL matches a single urlContains + * rule provided + * + * @exports phraseChecker + * @params {object} phrase + * @params {string} url + * @params {string} simpleurl + * @params {object} queries + * @returns {boolean} + */ + function phraseChecker (phrase, url, simpleurl, queries) { + var valid = false; + + // legacy match allows for an array of strings, check if we are legacy or current object approach + switch (typeof phrase) { + case 'string': + if (url.indexOf(escapeURI(phrase.split('?')[0], { keepEscaped: true })) !== -1) { + valid = compareQueries(queries, parseQuery(phrase), 'substring'); + } + break; + + case 'object': + if (phrase.match && phrase.value) { + var phraseValue = escapeURI(phrase.value, { keepEscaped: true }); + + switch (phrase.match) { + // simple match + case 'simple': + if (simpleurl.slice(-1) === '/') { + simpleurl = simpleurl.slice(0, -1); + } + + if (phrase.value.slice(-1) === '/') { + phrase.value = phrase.value.slice(0, -1); + } + + if (simpleurl === phrase.value) { + valid = true; + } + break; + + // exact match + case 'exact': + if (url.split('?')[0].replace(/\/$/, '') === phraseValue.split('?')[0].replace(/\/$/, '')) { + valid = compareQueries(queries, parseQuery(phraseValue), phrase.match); + } + break; + + // regex + case 'regex': + var re = new RegExp(phrase.value); + + if (re.test(url)) { + valid = true; + } + break; + + // string match (default) + default: + if (url.indexOf(phraseValue.split('?')[0]) !== -1) { + valid = compareQueries(queries, parseQuery(phraseValue), phrase.match); + } + break; + } + + } else { + console.log('invalid display conditions'); + } + break; + + default: + console.log('invalid display conditions'); + break; + } + + return valid; + } + + /** @module pathfora/display-conditions/url-contains/url-checker */ + + /** + * Evaluate if the current URL matches the rules defined + * by the urlContains display condition + * + * @exports urlChecker + * @params {array} phrases + * @returns {boolean} + */ + function urlChecker (phrases) { + var url = escapeURI(window.location.href, { keepEscaped: true }), + simpleurl = window.location.hostname + window.location.pathname, + queries = parseQuery(url), + valid = false, + excludeValid = false, + matchCt = 0, + excludeCt = 0; + + if (!(phrases instanceof Array)) { + phrases = Object.keys(phrases).map(function (key) { + return phrases[key]; + }); + } + + // array of urlContains params is an "OR" list, so if any are true evaluate valid to true + if (phrases.indexOf('*') === -1) { + phrases.forEach(function (phrase) { + if (phrase.exclude) { + excludeValid = phraseChecker(phrase, url, simpleurl, queries) || excludeValid; + excludeCt++; + } else { + valid = phraseChecker(phrase, url, simpleurl, queries) || valid; + matchCt++; + } + }); + } else { + valid = true; + } + + if (matchCt === 0) { + return !excludeValid; + } + + if (excludeCt === 0) { + return valid; + } + + return valid && !excludeValid; + } + + /** @module pathfora/display-conditions/meta-checker */ + + /** + * Check if the current page contains the meta + * tag and value provided + * + * @exports metaChecker + * @params {array} phrases + * @returns {boolean} + */ + function metaChecker (phrases) { + var meta = document$1.querySelectorAll('meta'); + + for (var j = 0; j < phrases.length; j++) { + var rule = phrases[j], + phraseValid = false; + + for (var i = 0; i < meta.length; i++) { + for (var key in rule) { + if (rule.hasOwnProperty(key)) { + var val = meta[i].getAttribute(key); + + if (!val || val !== rule[key]) { + phraseValid = false; + break; + } else { + phraseValid = true; + } + } + } + + if (phraseValid) { + break; + } + } + + if (phraseValid) { + return true; + } + } + + return false; + } + + /** @module pathfora/display-conditions/exit-intent/register-exit-intent-watcher */ + + /** + * Setup watcher for showOnExitIntent + * display condition + * + * @exports registerExitIntentWatcher + * @params {string} selector + * @params {object} widget + * @returns {object} watcher + */ + function registerExitIntentWatcher () { + var watcher = { + positions: [], + check: function (e) { + if (e != null) { + var from = e.relatedTarget || e.toElement; + + // When there is registered movement and leaving the root element + if (watcher.positions.length > 1 && (!from || from.nodeName === 'HTML')) { + + var y = watcher.positions[watcher.positions.length - 1].y; + var py = watcher.positions[watcher.positions.length - 2].y; + var ySpeed = Math.abs(y - py); + + watcher.positions = []; + + // Did the cursor move up? + // Is it reasonable to believe that it left the top of the page, given the position and the speed? + if (y - ySpeed <= 50 && y < py) { + return true; + } + } + } + return false; + } + }; + + return watcher; + } + + var handlers = []; + + var eventHub = { + add: function (target, type, listener) { + target.addEventListener(type, listener); + handlers.push({ + target: target, + type: type, + listener: listener + }); + }, + remove: function (target, type, listener) { + target.removeEventListener(type, listener); + }, + removeAll: function () { + var hub = this; + handlers.forEach(function (h) { + hub.remove(h.target, h.type, h.listener); + }); + handlers.length = 0; + } + }; + + /** @module pathfora/display-conditions/init-exit-intent */ + + /** + * Setup exitIntent for a widget + * + * @exports initExitIntent + * @params {object} widget + * @returns {boolean} + */ + function initializeExitIntent (widget, watcher) { + if (!widget.exitIntentListener) { + widget.exitIntentListener = function (e) { + watcher.positions.push({ + x: e.clientX, + y: e.clientY + }); + if (watcher.positions.length > 30) { + watcher.positions.shift(); + } + }; + + widget.exitIntentTrigger = function (e) { + validateWatchers(widget, function () { + if (typeof document$1.removeEventListener === 'function') { + eventHub.remove(document$1, 'mousemove', widget.exitIntentListener); + eventHub.remove(document$1, 'mouseout', widget.exitIntentTrigger); + } else { + document$1.onmousemove = null; + document$1.onmouseout = null; + } + }, e); + }; + + // FUTURE Discuss https://www.npmjs.com/package/ie8 polyfill + if (typeof document$1.addEventListener === 'function') { + eventHub.add(document$1, 'mousemove', widget.exitIntentListener); + eventHub.add(document$1, 'mouseout', widget.exitIntentTrigger); + } else { + document$1.onmousemove = widget.exitIntentListener; + document$1.onmouseout = widget.exitIntentTrigger; + } + } + return true; + + } + + /** @module pathfora/display-conditions/scroll/register-element-watcher */ + + /** + * Setup watcher for displayWhenElementVisible + * display condition + * + * @exports registerElementWatcher + * @params {string} selector + * @params {object} widget + * @returns {object} watcher + */ + function registerElementWatcher (selector) { + var watcher = { + elem: document$1.querySelector(selector), + + check: function () { + var scrollTop = document$1.body.scrollTop || document$1.documentElement.scrollTop, + scrolledToBottom = window.innerHeight + scrollTop >= document$1.body.offsetHeight; + + if (watcher.elem.offsetTop - window.innerHeight / 2 <= scrollTop || scrolledToBottom) { + return true; + } + return false; + } + }; + + return watcher; + } + + /** @module pathfora/display-conditions/scroll/init-scroll-watchers */ + + /** + * Add event listener for scroll display conditions + * + * @exports initializeScrollWatchers + * @params {object} widget + * @returns {boolean} + */ + function initializeScrollWatchers (widget) { + widget.scrollListener = function () { + validateWatchers(widget, function () { + if (typeof window.addEventListener === 'function') { + eventHub.remove(window, 'scroll', widget.scrollListener); + } else { + window.onscroll = null; + } + }); + }; + + // FUTURE Discuss https://www.npmjs.com/package/ie8 polyfill + if (typeof window.addEventListener === 'function') { + eventHub.add(window, 'scroll', widget.scrollListener); + } else { + window.onscroll = widget.scrollListener; + } + return true; + } + + /** + * Based on https://github.com/cgygd/scrolling-element + */ + + var element = null; + + /* istanbul ignore next */ + function getScrollingElement () { + if (element) { + return element; + } + if (document.body.scrollTop) { + // speed up if scrollTop > 0 + return (element = document.body); + } + var iframe = document.createElement('iframe'); + iframe.style.height = '1px'; + document.documentElement.appendChild(iframe); + var doc = iframe.contentWindow.document; + doc.write('
x
'); + doc.close(); + var isCompliant = doc.documentElement.scrollHeight > doc.body.scrollHeight; + iframe.parentNode.removeChild(iframe); + return (element = isCompliant ? document.documentElement : document.body); + } + + /** @module pathfora/display-conditions/scroll/register-position-watcher */ + + /** + * Setup watcher for scrollPercentageToDisplay + * display condition + * + * @exports registerPositionWatcher + * @params {int} percent + * @params {object} widget + * @returns {object} watcher + */ + function registerPositionWatcher (percent) { + var watcher = { + check: function () { + /* istanbul ignore next */ + var scrollingElement = document$1.scrollingElement || getScrollingElement(), + scrollTop = scrollingElement.scrollTop, + scrollHeight = scrollingElement.scrollHeight, + clientHeight = scrollingElement.clientHeight, + percentageScrolled = (scrollTop / (scrollHeight - clientHeight)) * 100; + + // if NaN, will always return `false` + return percentageScrolled >= percent; + } + }; + + return watcher; + } + + /** @module pathfora/display-conditions/manual-trigger/register-manual-trigger-watcher */ + + /** + * Begin watching for a custom javascript trigger + * + * @exports registerManualTriggerWatcher + * @params {object} widget + * @params {boolean} value + * @returns {object} watcher + */ + function registerManualTriggerWatcher (value, widget) { + var watcher = { + check: function () { + if (value && widgetTracker.triggeredWidgets[widget.id] || widgetTracker.triggeredWidgets['*']) { + return true; + } + return false; + } + }; + + return watcher; + } + + /** @module pathfora/widgets/init-widget */ + + /** + * Determine if a widget should be shown based on display + * conditions, and if so show the widget + * + * @exports initializeWidget + * @params {object} widget + * @returns {bool} shown + */ + function initializeWidget (widget, options) { + var watcher, + condition = widget.displayConditions, + pf = this; + + widget.watchers = []; + widget.listeners = []; + + // NOTE Default cookie expiration is one year from now + widget.expiration = new Date(); + widget.expiration.setDate(widget.expiration.getDate() + 365); + + if ( + (widget.type === 'sitegate' && + read(PREFIX_UNLOCK + widget.id) === 'true') || + widget.hiddenViaABTests === true + ) { + return; + } + + if (widget.pushDown) { + if ( + widget.layout === 'bar' && + (widget.position === 'top-fixed' || widget.position === 'top-absolute') + ) { + addClass(document$1.querySelector(widget.pushDown), 'pf-push-down'); + } else { + throw new Error( + 'Only top positioned bar widgets may have a pushDown property' + ); + } + } + + // entity fields + widget.valid = widget.valid && entityFieldChecker(widget, pf.customData); + + // display conditions based on page load + if (condition.date) { + widget.valid = widget.valid && dateChecker(condition.date); + } + + if (condition.pageVisits) { + widget.valid = widget.valid && pageVisitsChecker(condition.pageVisits); + } + + if (condition.hideAfterAction) { + widget.valid = + widget.valid && hideAfterActionChecker(condition.hideAfterAction, widget); + } + + if (condition.urlContains) { + widget.valid = widget.valid && urlChecker(condition.urlContains); + } + + if (condition.metaContains) { + widget.valid = widget.valid && metaChecker(condition.metaContains); + } + + widget.valid = widget.valid && condition.showOnInit; + + if (condition.impressions) { + widget.valid = + widget.valid && impressionsChecker(condition.impressions, widget); + } + + // if it's valid at this point, add it to the priority list + if ( + widget.valid && + options && + options.priority === OPTIONS_PRIORITY_ORDERED + ) { + widgetTracker.prioritizedWidgets.push(widget); + } + + // display conditions based on page interaction + if (condition.showOnExitIntent) { + watcher = registerExitIntentWatcher(); + widget.watchers.push(watcher); + initializeExitIntent(widget, watcher); + } + + if (condition.displayWhenElementVisible) { + watcher = registerElementWatcher( + condition.displayWhenElementVisible + ); + widget.watchers.push(watcher); + initializeScrollWatchers(widget); + } + + if (condition.scrollPercentageToDisplay) { + watcher = registerPositionWatcher( + condition.scrollPercentageToDisplay + ); + widget.watchers.push(watcher); + initializeScrollWatchers(widget); + } + + if (condition.manualTrigger) { + watcher = registerManualTriggerWatcher(condition.manualTrigger, widget); + widget.watchers.push(watcher); + widgetTracker.readyWidgets.push(widget); + + // if we've already triggered the widget + // before initializing lets initialize right away + triggerWidget(widget); + } + + if (widget.watchers.length === 0 && !condition.showOnExitIntent) { + if (widget.valid) { + showWidget(widget); + } + } + } + + /** @module pathfora/widgets/preview-widget */ + + /** + * Create a minimal widget for a preview + * + * @exports previewWidget + * @params {object} widget + * @returns {object} + */ + function previewWidget (widget) { + widget.id = generateUniqueId(); + return createWidgetHtml(widget); + } + + /** @module pathfora/display-conditions/cancel-delayed-widget */ + + /** + * Cancel waiting for a delayed widget + * + * @exports cancelDelayedWidget + * @params {string} widgetKey id of the widget + */ + function cancelDelayedWidget (widgetKey) { + var delayObj = widgetTracker.delayedWidgets[widgetKey]; + + if (delayObj) { + clearTimeout(delayObj); + delete widgetTracker.delayedWidgets[widgetKey]; + } + } + + /** @module pathfora/widgets/clear-all */ + + /** + * Close all widgets and reset all settings to default + * + * @exports clearAll + */ + function clearAll () { + var opened = widgetTracker.openedWidgets, + delayed = widgetTracker.delayedWidgets; + + opened.forEach(function (widget) { + var element = document$1.getElementById(widget.id); + removeClass(element, 'opened'); + element.parentNode.removeChild(element); + + for (var key in widget.listeners) { + if (widget.listeners.hasOwnProperty(key)) { + var val = widget.listeners[key]; + val.target.removeEventListener(val.type, val.fn); + } + } + }); + + for (var key in delayed) { + if (delayed.hasOwnProperty(key)) { + cancelDelayedWidget(key); + } + } + + eventHub.removeAll(); + + resetWidgetTracker(widgetTracker); + resetDataObject(pathforaDataObject); + resetDefaultProps(defaultProps); + this.callbacks = []; + this.acctid = ''; + } + + /** @module pathfora/widgets/prepare-widget */ + + /** + * Validate that a widget is correctly set up + * + * @exports prepareWidget + * @params {string} type + * @params {object} config + * @returns {object} + */ + function prepareWidget (type, config) { + var widget = { + valid: true, + type: type + }; + + if (!config) { + throw new Error('Config object is missing'); + } + + widget.config = config; + + if (!config.id) { + throw new Error('All widgets must have an id value'); + } + + widget.id = config.id; + + return widget; + } + + /** @module pathfora/widgets/message */ + + /** + * Public method to create a widget of type message + * + * @exports Message + * @params {object} config + * @returns {object} + */ + function Message (config) { + return prepareWidget('message', config); + } + + /** @module pathfora/widgets/subscription */ + + /** + * Public method to create a widget of type subscription + * + * @exports Subscription + * @params {object} config + * @returns {object} + */ + function Subscription (config) { + return prepareWidget('subscription', config); + } + + /** @module pathfora/widgets/form */ + + /** + * Public method to create a widget of type form + * + * @exports Form + * @params {object} config + * @returns {object} + */ + function Form (config) { + return prepareWidget('form', config); + } + + /** @module pathfora/widgets/site-gate */ + + /** + * Public method to create a widget of type site gate + * + * @exports SiteGate + * @params {object} config + * @returns {object} + */ + function SiteGate (config) { + return prepareWidget('sitegate', config); + } + + /** @module pathfora/ab-test/init-ab-test */ + + /** + * Initialized A/B test from user config + * + * @exports initializeABTesting + * @params {object} abTests + */ + function initializeABTesting (abTests) { + abTests.forEach(function (abTest) { + var abTestingType = abTest.type, + userAbTestingValue = read(abTest.cookieId), + userAbTestingGroup = 0, + date = new Date(); + + if (!userAbTestingValue) { + userAbTestingValue = Math.random(); + } + + // NOTE Always update the cookie to get the new exp date. + date.setDate(date.getDate() + 365); + write(abTest.cookieId, userAbTestingValue, date); + + // NOTE Determine visible group for the user + var i = 0; + while (i < 1) { + i += abTestingType.groups[userAbTestingGroup]; + + if (userAbTestingValue <= i) { + break; + } + + userAbTestingGroup++; + } + + // NOTE Notify widgets about their proper AB groups + abTest.groups.forEach(function (group, index) { + group.forEach(function (widget) { + if (typeof widget.abTestingGroup === 'undefined') { + widget.abTestingGroup = index; + widget.hiddenViaABTests = userAbTestingGroup === index; + } else { + throw new Error('Widget #' + widget.config.id + ' is defined in more than one AB test.'); + } + }); + }); + + if (typeof pathforaDataObject.abTestingGroups[abTest.id] !== 'undefined') { + throw new Error('AB test with ID=' + abTest.id + ' has been already defined.'); + } + + pathforaDataObject.abTestingGroups[abTest.id] = userAbTestingGroup; + }); + } + + /** @module pathfora/ab-test/prepare-ab-test */ + + /** + * Prepares A/B test user config for use + * + * @exports initializeABTesting + * @params {object} abTests + */ + function prepareABTest (config) { + var test = {}; + + if (!config) { + throw new Error('Config object is missing'); + } + + test.id = config.id; + test.cookieId = PREFIX_AB_TEST + config.id; + test.groups = config.groups; + + if (!abTestingTypes[config.type]) { + throw new Error('Unknown AB testing type: ' + config.type); + } + + test.type = abTestingTypes[config.type]; + + return test; + } + + /** @module pathfora/ab-test/ab-test */ + + /** + * Public wrapper method for prepareABTest + * + * @exports ABTest + * @param {object} config + * @returns {object} + */ + function ABTest (config) { + return prepareABTest(config); + } + + /** @module pathfora/inline/prep-elements */ + + /** + * Build a list of all elements to be personalized + * + * @exports prepElements + * @params {string} attr + * @returns {object} dataElements + */ + function prepElements (attr) { + var dataElements = {}, + elements = document$1.querySelectorAll('[' + attr + ']'); + + this.elements = this.elements.concat(elements); + + for (var i = 0; i < elements.length; i++) { + if (elements[i].getAttribute(attr) !== null) { + var theElement = elements[i]; + + switch (attr) { + // CASE: Segment triggered elements + case 'data-pftrigger': + var group = theElement.getAttribute('data-pfgroup'); + + if (!group) { + group = 'default'; + } + + if (!dataElements[group]) { + dataElements[group] = []; + } + + dataElements[group].push({ + elem: theElement, + displayType: theElement.style.display, + group: group, + trigger: theElement.getAttribute('data-pftrigger') + }); + break; + + // CASE: Content recommendation elements + case 'data-pfrecommend': + var recommend = theElement.getAttribute('data-pfrecommend'), + block = theElement.getAttribute('data-pfblock'), + shuffle = false; + + if (!block) { + block = 'default'; + } + + if (!recommend) { + recommend = 'default'; + } + + if (!dataElements[recommend]) { + dataElements[recommend] = { + blocks: [] + }; + } + + if (theElement.hasAttribute('data-pfshuffle')) { + shuffle = theElement.getAttribute('data-pfshuffle') === 'true'; + } + + if (!dataElements[recommend].shuffle) { + dataElements[recommend].shuffle = shuffle; + } + + dataElements[recommend].blocks.push({ + elem: theElement, + displayType: theElement.style.display, + block: block, + recommend: recommend, + shuffle: shuffle, + title: theElement.querySelector('[data-pftype="title"]'), + image: theElement.querySelector('[data-pftype="image"]'), + description: theElement.querySelector('[data-pftype="description"]'), + url: theElement.querySelector('[data-pftype="url"]'), + published: theElement.querySelector('[data-pftype="published"]'), + author: theElement.querySelector('[data-pftype="author"]') + }); + break; + } + } + } + return dataElements; + } + + /** @module pathfora/inline/proc-elements */ + + /** + * Kick off the personalization process for inline trigger fields + * and inline content recommendations + * + * @exports procElements + */ + function procElements () { + var attrs = ['data-pftrigger', 'data-pfrecommend'], + inline = this, + count = 0; + + var cb = function (elements) { + count++; + // After we have processed all elements, proc defaults + if (count === Object.keys(elements).length) { + inline.setDefaultRecommend(elements); + } + }; + + attrs.forEach(function (attr) { + var elements = inline.prepElements(attr); + + for (var key in elements) { + if (elements.hasOwnProperty(key)) { + + switch (attr) { + // CASE: Segment triggered elements + case 'data-pftrigger': + inline.procTriggerElements(elements[key], key); + break; + + // CASE: Content recommendation elements + case 'data-pfrecommend': + if (typeof inline.parent.acctid !== 'undefined' && inline.parent.acctid === '') { + throw new Error('Could not get account id from Lytics Javascript tag.'); + } + + inline.procRecommendElements(elements[key], key, elements[key].shuffle, function () { + cb(elements); + }); + break; + } + } + } + }); + } + + /** @module pathfora/inline/proc-recommend-elements */ + + /** + * Make recommendation and fill in the appropriate inline + * recommendation elements + * + * @exports procRecommendElements + * @params {object} blocks + * @params {string} rec + * @params {function} cb + */ + function procRecommendElements (val, rec, shuffle, cb) { + var inline = this; + + if (rec !== 'default') { + // call the recommendation API using the url pattern urlPattern as a filter + var params = { + contentsegment: rec + }; + + if (shuffle) { + params.shuffle = shuffle; + } + + recommendContent(inline.parent.acctid, params, rec, function (resp) { + val.blocks.forEach(function (elems, idx) { + + // loop through the results as we loop + // through each element with a common liorecommend value + if (resp[idx]) { + var content = resp[idx]; + + if (elems.title) { + elems.title.innerHTML = content.title; + } + + // if attribute is on image element + if (elems.image) { + if (typeof elems.image.src !== 'undefined') { + elems.image.src = content.primary_image; + // if attribute is on container element, set the background + } else { + elems.image.style.backgroundImage = 'url("' + content.primary_image + '")'; + } + } + + // set the description + if (elems.description) { + elems.description.innerHTML = content.description; + } + + // if attribute is on an a (link) element + if (elems.url) { + if (typeof elems.url.href !== 'undefined') { + elems.url.href = content.url; + // if attribute is on container element + } else { + elems.url.innerHTML = content.url; + } + } + + // set the date published + if (elems.published && content.created) { + var published = new Date(content.created); + elems.published.innerHTML = published.toLocaleDateString(inline.parent.locale, inline.parent.dateOptions); + } + + // set the author + if (elems.author) { + elems.author.innerHTML = content.author; + } + + elems.elem.removeAttribute('data-pfrecommend'); + elems.elem.setAttribute('data-pfmodified', 'true'); + inline.preppedElements[elems.block] = elems; + } else { + return; + } + }); + cb(); + }); + } else { + val.blocks.forEach(function (block) { + inline.defaultElements[block.block] = block; + }); + cb(); + } + } + + /** @module pathfora/data/segments/in-segment */ + + /** + * Check if the user is a member of a segment + * + * @exports inSegment + * @params {string} match + * @returns {boolean} membership + */ + function inSegment (match) { + return (getUserSegments().indexOf(match) !== -1); + } + + /** @module pathfora/inline/proc-trigger-elements */ + + /** + * Show/hide trigger elements in a group based on + * Lytics segment membership + * + * @exports procTriggerElements + * @params {object} elems + * @params {string} group + */ + function procTriggerElements (elems, group) { + var matched = false, + defaultEl = {}; + + for (var i = 0; i < elems.length; i++) { + var elem = elems[i]; + + // if we find a match show that and prevent others from showing in same group + if (inSegment(elem.trigger) && !matched) { + elem.elem.removeAttribute('data-pftrigger'); + elem.elem.setAttribute('data-pfmodified', 'true'); + this.preppedElements[group] = elem; + + if (group !== 'default') { + matched = true; + continue; + } + } + + // if this is the default save it + if (elem.trigger === 'default') { + defaultEl = elem; + } + } + + // if nothing matched show default + if (!matched && group !== 'default' && defaultEl.elem) { + defaultEl.elem.removeAttribute('data-pftrigger'); + defaultEl.elem.setAttribute('data-pfmodified', 'true'); + this.preppedElements[group] = defaultEl; + } + } + + /** @module pathfora/inline/set-default-recommend */ + + /** + * Show the default "recommendation" if we received + * a bad response from the API + * + * @exports setDefaultRecommend + */ + function setDefaultRecommend () { + // check the default elements + for (var block in this.defaultElements) { + // If we already have an element prepped for this block, don't show the default + if (this.defaultElements.hasOwnProperty(block) && !this.preppedElements.hasOwnProperty(block)) { + var def = this.defaultElements[block]; + def.elem.removeAttribute('data-pfrecommend'); + def.elem.setAttribute('data-pfmodified', 'true'); + this.preppedElements[block] = def; + } + } + } + + /** @module pathfora/inline/inline */ + + + /** + * Creates a new instance of inline personalization + * + * @exports Inline + * @class {function} Inline + * @params {object} pf + */ + function Inline (pf) { + this.elements = []; + this.preppedElements = []; + this.defaultElements = []; + this.parent = pf; + + this.prepElements = prepElements; + this.procElements = procElements; + this.procRecommendElements = procRecommendElements; + this.procTriggerElements = procTriggerElements; + this.setDefaultRecommend = setDefaultRecommend; + + // for our automatic element handling we need to ensure they are all hidden by default + var css = '[data-pftrigger], [data-pfrecommend]{ display: none; }', + style = document$1.createElement('style'); + + style.type = 'text/css'; + + if (style.styleSheet) { // handle ie + style.styleSheet.cssText = css; + } else { + style.appendChild(document$1.createTextNode(css)); + } + + document$1.getElementsByTagName('head')[0].appendChild(style); + } + + /** @module pathfora/inline/init-inline */ + + /** + * Once the dom is ready and Lytics jstag is + * loaded initialize inline personalization + * + * @exports initializeInline + */ + function initializeInline () { + var pf = this; + + this.onDOMready(function () { + pf.addCallback(function () { + validateAccountId(pf); + pf.inline.procElements(); + }); + }); + } - var cov_23wpczx9ss=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js',hash='48c5710abf86ff4e1ae6fd9d3ac23051616bea22',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js',statementMap:{'0':{start:{line:12,column:15},end:{line:15,column:3}},'1':{start:{line:17,column:2},end:{line:19,column:3}},'2':{start:{line:18,column:4},end:{line:18,column:48}},'3':{start:{line:21,column:2},end:{line:21,column:25}},'4':{start:{line:23,column:2},end:{line:25,column:3}},'5':{start:{line:24,column:4},end:{line:24,column:57}},'6':{start:{line:27,column:2},end:{line:27,column:24}},'7':{start:{line:29,column:2},end:{line:29,column:16}}},fnMap:{'0':{name:'prepareWidget',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:53},end:{line:30,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:17,column:2},end:{line:19,column:3}},type:'if',locations:[{start:{line:17,column:2},end:{line:19,column:3}},{start:{line:17,column:2},end:{line:19,column:3}}],line:17},'1':{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:'if',locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepareWidget(type,config){cov_23wpczx9ss.f[0]++;var widget=(cov_23wpczx9ss.s[0]++,{valid:true,type:type});cov_23wpczx9ss.s[1]++;if(!config){cov_23wpczx9ss.b[0][0]++;cov_23wpczx9ss.s[2]++;throw new Error('Config object is missing');}else{cov_23wpczx9ss.b[0][1]++;}cov_23wpczx9ss.s[3]++;widget.config=config;cov_23wpczx9ss.s[4]++;if(!config.id){cov_23wpczx9ss.b[1][0]++;cov_23wpczx9ss.s[5]++;throw new Error('All widgets must have an id value');}else{cov_23wpczx9ss.b[1][1]++;}cov_23wpczx9ss.s[6]++;widget.id=config.id;cov_23wpczx9ss.s[7]++;return widget;} + /** @module pathfora */ - var cov_1iqwah8abq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js',hash='17286eda18a7fed0aae092fcdb48d9b871d15489',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:42}}},fnMap:{'0':{name:'Message',decl:{start:{line:12,column:24},end:{line:12,column:31}},loc:{start:{line:12,column:41},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Message(config){cov_1iqwah8abq.f[0]++;cov_1iqwah8abq.s[0]++;return prepareWidget('message',config);} + /** + * Creates a new Pathfora instance + * + * @exports Pathfora + * @class {function} Pathfora + */ + var Pathfora = function () { + // feature detections + if (!('localStorage' in window) || !('sessionStorage' in window)) { + throw new Error('The Pathfora SDK requires the Web Storage API!'); + } - var cov_2epdthxvv3=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js',hash='b41fd2aeb030616aa757759e1099548ecc181c42',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:47}}},fnMap:{'0':{name:'Subscription',decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:46},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Subscription(config){cov_2epdthxvv3.f[0]++;cov_2epdthxvv3.s[0]++;return prepareWidget('subscription',config);} + // globals + this.version = PF_VERSION; + this.callbacks = []; + this.acctid = ''; + this.locale = PF_LOCALE; + this.dateOptions = PF_DATE_OPTIONS; + this.DOMLoaded = false; + this.enableGA = false; + this.customData = {}; - var cov_1obfb7k4x8=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js',hash='3946ed6eee471c67ceeb4d80cd237301ac78a166',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:39}}},fnMap:{'0':{name:'Form',decl:{start:{line:12,column:24},end:{line:12,column:28}},loc:{start:{line:12,column:38},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function Form(config){cov_1obfb7k4x8.f[0]++;cov_1obfb7k4x8.s[0]++;return prepareWidget('form',config);} + // dom + this.onDOMready = onDOMready; - var cov_zkrihgmcu=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js',hash='a047ceb3e49fd09bf733bd36dfe4818303ea8c72',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:43}}},fnMap:{'0':{name:'SiteGate',decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:42},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function SiteGate(config){cov_zkrihgmcu.f[0]++;cov_zkrihgmcu.s[0]++;return prepareWidget('sitegate',config);} + // utils + this.utils = utils; - var cov_seesf16uv=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js',hash='190c01a65f580c8a956f27f46920dbfab69502ae',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js',statementMap:{'0':{start:{line:17,column:2},end:{line:60,column:5}},'1':{start:{line:18,column:24},end:{line:18,column:35}},'2':{start:{line:19,column:29},end:{line:19,column:50}},'3':{start:{line:20,column:29},end:{line:20,column:30}},'4':{start:{line:21,column:15},end:{line:21,column:25}},'5':{start:{line:23,column:4},end:{line:25,column:5}},'6':{start:{line:24,column:6},end:{line:24,column:41}},'7':{start:{line:28,column:4},end:{line:28,column:39}},'8':{start:{line:29,column:4},end:{line:29,column:53}},'9':{start:{line:32,column:12},end:{line:32,column:13}},'10':{start:{line:33,column:4},end:{line:41,column:5}},'11':{start:{line:34,column:6},end:{line:34,column:52}},'12':{start:{line:36,column:6},end:{line:38,column:7}},'13':{start:{line:37,column:8},end:{line:37,column:14}},'14':{start:{line:40,column:6},end:{line:40,column:27}},'15':{start:{line:44,column:4},end:{line:53,column:7}},'16':{start:{line:45,column:6},end:{line:52,column:9}},'17':{start:{line:46,column:8},end:{line:51,column:9}},'18':{start:{line:47,column:10},end:{line:47,column:40}},'19':{start:{line:48,column:10},end:{line:48,column:65}},'20':{start:{line:50,column:10},end:{line:50,column:99}},'21':{start:{line:55,column:4},end:{line:57,column:5}},'22':{start:{line:56,column:6},end:{line:56,column:85}},'23':{start:{line:59,column:4},end:{line:59,column:71}}},fnMap:{'0':{name:'initializeABTesting',decl:{start:{line:16,column:24},end:{line:16,column:43}},loc:{start:{line:16,column:54},end:{line:61,column:1}},line:16},'1':{name:'(anonymous_1)',decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:36},end:{line:60,column:3}},line:17},'2':{name:'(anonymous_2)',decl:{start:{line:44,column:26},end:{line:44,column:27}},loc:{start:{line:44,column:50},end:{line:53,column:5}},line:44},'3':{name:'(anonymous_3)',decl:{start:{line:45,column:20},end:{line:45,column:21}},loc:{start:{line:45,column:38},end:{line:52,column:7}},line:45}},branchMap:{'0':{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:'if',locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:23,column:4},end:{line:25,column:5}}],line:23},'1':{loc:{start:{line:36,column:6},end:{line:38,column:7}},type:'if',locations:[{start:{line:36,column:6},end:{line:38,column:7}},{start:{line:36,column:6},end:{line:38,column:7}}],line:36},'2':{loc:{start:{line:46,column:8},end:{line:51,column:9}},type:'if',locations:[{start:{line:46,column:8},end:{line:51,column:9}},{start:{line:46,column:8},end:{line:51,column:9}}],line:46},'3':{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:'if',locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0},f:{'0':0,'1':0,'2':0,'3':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function initializeABTesting(abTests){cov_seesf16uv.f[0]++;cov_seesf16uv.s[0]++;abTests.forEach(function(abTest){cov_seesf16uv.f[1]++;var abTestingType=(cov_seesf16uv.s[1]++,abTest.type),userAbTestingValue=(cov_seesf16uv.s[2]++,read(abTest.cookieId)),userAbTestingGroup=(cov_seesf16uv.s[3]++,0),date=(cov_seesf16uv.s[4]++,new Date());cov_seesf16uv.s[5]++;if(!userAbTestingValue){cov_seesf16uv.b[0][0]++;cov_seesf16uv.s[6]++;userAbTestingValue=Math.random();}else{cov_seesf16uv.b[0][1]++;}cov_seesf16uv.s[7]++;date.setDate(date.getDate()+365);cov_seesf16uv.s[8]++;write(abTest.cookieId,userAbTestingValue,date);var i=(cov_seesf16uv.s[9]++,0);cov_seesf16uv.s[10]++;while(i<1){cov_seesf16uv.s[11]++;i+=abTestingType.groups[userAbTestingGroup];cov_seesf16uv.s[12]++;if(userAbTestingValue<=i){cov_seesf16uv.b[1][0]++;cov_seesf16uv.s[13]++;break;}else{cov_seesf16uv.b[1][1]++;}cov_seesf16uv.s[14]++;userAbTestingGroup++;}cov_seesf16uv.s[15]++;abTest.groups.forEach(function(group,index){cov_seesf16uv.f[2]++;cov_seesf16uv.s[16]++;group.forEach(function(widget){cov_seesf16uv.f[3]++;cov_seesf16uv.s[17]++;if(typeof widget.abTestingGroup==='undefined'){cov_seesf16uv.b[2][0]++;cov_seesf16uv.s[18]++;widget.abTestingGroup=index;cov_seesf16uv.s[19]++;widget.hiddenViaABTests=userAbTestingGroup===index;}else{cov_seesf16uv.b[2][1]++;cov_seesf16uv.s[20]++;throw new Error('Widget #'+widget.config.id+' is defined in more than one AB test.');}});});cov_seesf16uv.s[21]++;if(typeof pathforaDataObject.abTestingGroups[abTest.id]!=='undefined'){cov_seesf16uv.b[3][0]++;cov_seesf16uv.s[22]++;throw new Error('AB test with ID='+abTest.id+' has been already defined.');}else{cov_seesf16uv.b[3][1]++;}cov_seesf16uv.s[23]++;pathforaDataObject.abTestingGroups[abTest.id]=userAbTestingGroup;});} + // data + this.getDataObject = getDataObject; - var cov_18756r080h=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js',hash='430f6fb5ce0125dd936fd211dbd9fa99079cde99',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js',statementMap:{'0':{start:{line:12,column:13},end:{line:12,column:15}},'1':{start:{line:14,column:2},end:{line:16,column:3}},'2':{start:{line:15,column:4},end:{line:15,column:48}},'3':{start:{line:18,column:2},end:{line:18,column:22}},'4':{start:{line:19,column:2},end:{line:19,column:45}},'5':{start:{line:20,column:2},end:{line:20,column:30}},'6':{start:{line:22,column:2},end:{line:24,column:3}},'7':{start:{line:23,column:4},end:{line:23,column:63}},'8':{start:{line:26,column:2},end:{line:26,column:42}},'9':{start:{line:28,column:2},end:{line:28,column:14}}},fnMap:{'0':{name:'prepareABTest',decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:47},end:{line:29,column:1}},line:11}},branchMap:{'0':{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:'if',locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:14,column:2},end:{line:16,column:3}}],line:14},'1':{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:'if',locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0},f:{'0':0},b:{'0':[0,0],'1':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepareABTest(config){cov_18756r080h.f[0]++;var test=(cov_18756r080h.s[0]++,{});cov_18756r080h.s[1]++;if(!config){cov_18756r080h.b[0][0]++;cov_18756r080h.s[2]++;throw new Error('Config object is missing');}else{cov_18756r080h.b[0][1]++;}cov_18756r080h.s[3]++;test.id=config.id;cov_18756r080h.s[4]++;test.cookieId=PREFIX_AB_TEST+config.id;cov_18756r080h.s[5]++;test.groups=config.groups;cov_18756r080h.s[6]++;if(!abTestingTypes[config.type]){cov_18756r080h.b[1][0]++;cov_18756r080h.s[7]++;throw new Error('Unknown AB testing type: '+config.type);}else{cov_18756r080h.b[1][1]++;}cov_18756r080h.s[8]++;test.type=abTestingTypes[config.type];cov_18756r080h.s[9]++;return test;} + // callbacks + this.addCallback = addCallback; - var cov_b644lx05h=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js',hash='d992100179a90704e13da4757353d3c010c6896e',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js',statementMap:{'0':{start:{line:13,column:2},end:{line:13,column:31}}},fnMap:{'0':{name:'ABTest',decl:{start:{line:12,column:24},end:{line:12,column:30}},loc:{start:{line:12,column:40},end:{line:14,column:1}},line:12}},branchMap:{},s:{'0':0},f:{'0':0},b:{},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function ABTest(config){cov_b644lx05h.f[0]++;cov_b644lx05h.s[0]++;return prepareABTest(config);} + // display conditions + this.initializePageViews = initializePageViews; + this.triggerWidgets = triggerWidgets; - var cov_14en7h5tsq=function(){var path='/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js',hash='4d8bf52c5f0a024149dd445984151f1f02a92edf',Function=function(){}.constructor,global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js',statementMap:{'0':{start:{line:13,column:21},end:{line:13,column:23}},'1':{start:{line:14,column:17},end:{line:14,column:60}},'2':{start:{line:16,column:2},end:{line:16,column:49}},'3':{start:{line:18,column:2},end:{line:87,column:3}},'4':{start:{line:19,column:4},end:{line:86,column:5}},'5':{start:{line:20,column:23},end:{line:20,column:34}},'6':{start:{line:22,column:6},end:{line:85,column:7}},'7':{start:{line:25,column:20},end:{line:25,column:59}},'8':{start:{line:27,column:8},end:{line:29,column:9}},'9':{start:{line:28,column:10},end:{line:28,column:28}},'10':{start:{line:31,column:8},end:{line:33,column:9}},'11':{start:{line:32,column:10},end:{line:32,column:35}},'12':{start:{line:35,column:8},end:{line:40,column:11}},'13':{start:{line:41,column:8},end:{line:41,column:14}},'14':{start:{line:45,column:24},end:{line:45,column:67}},'15':{start:{line:46,column:20},end:{line:46,column:59}},'16':{start:{line:47,column:22},end:{line:47,column:27}},'17':{start:{line:49,column:8},end:{line:51,column:9}},'18':{start:{line:50,column:10},end:{line:50,column:28}},'19':{start:{line:53,column:8},end:{line:55,column:9}},'20':{start:{line:54,column:10},end:{line:54,column:32}},'21':{start:{line:57,column:8},end:{line:61,column:9}},'22':{start:{line:58,column:10},end:{line:60,column:12}},'23':{start:{line:63,column:8},end:{line:65,column:9}},'24':{start:{line:64,column:10},end:{line:64,column:73}},'25':{start:{line:67,column:8},end:{line:69,column:9}},'26':{start:{line:68,column:10},end:{line:68,column:52}},'27':{start:{line:71,column:8},end:{line:83,column:11}},'28':{start:{line:84,column:8},end:{line:84,column:14}},'29':{start:{line:88,column:2},end:{line:88,column:22}}},fnMap:{'0':{name:'prepElements',decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:44},end:{line:89,column:1}},line:12}},branchMap:{'0':{loc:{start:{line:19,column:4},end:{line:86,column:5}},type:'if',locations:[{start:{line:19,column:4},end:{line:86,column:5}},{start:{line:19,column:4},end:{line:86,column:5}}],line:19},'1':{loc:{start:{line:22,column:6},end:{line:85,column:7}},type:'switch',locations:[{start:{line:24,column:6},end:{line:41,column:14}},{start:{line:44,column:6},end:{line:84,column:14}}],line:22},'2':{loc:{start:{line:27,column:8},end:{line:29,column:9}},type:'if',locations:[{start:{line:27,column:8},end:{line:29,column:9}},{start:{line:27,column:8},end:{line:29,column:9}}],line:27},'3':{loc:{start:{line:31,column:8},end:{line:33,column:9}},type:'if',locations:[{start:{line:31,column:8},end:{line:33,column:9}},{start:{line:31,column:8},end:{line:33,column:9}}],line:31},'4':{loc:{start:{line:49,column:8},end:{line:51,column:9}},type:'if',locations:[{start:{line:49,column:8},end:{line:51,column:9}},{start:{line:49,column:8},end:{line:51,column:9}}],line:49},'5':{loc:{start:{line:53,column:8},end:{line:55,column:9}},type:'if',locations:[{start:{line:53,column:8},end:{line:55,column:9}},{start:{line:53,column:8},end:{line:55,column:9}}],line:53},'6':{loc:{start:{line:57,column:8},end:{line:61,column:9}},type:'if',locations:[{start:{line:57,column:8},end:{line:61,column:9}},{start:{line:57,column:8},end:{line:61,column:9}}],line:57},'7':{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:'if',locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},'8':{loc:{start:{line:67,column:8},end:{line:69,column:9}},type:'if',locations:[{start:{line:67,column:8},end:{line:69,column:9}},{start:{line:67,column:8},end:{line:69,column:9}}],line:67}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0},f:{'0':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();function prepElements(attr){cov_14en7h5tsq.f[0]++;var dataElements=(cov_14en7h5tsq.s[0]++,{}),elements=(cov_14en7h5tsq.s[1]++,document$1.querySelectorAll('['+attr+']'));cov_14en7h5tsq.s[2]++;this.elements=this.elements.concat(elements);cov_14en7h5tsq.s[3]++;for(var i=0;i

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}}),In=(O="/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",R="527f755cdde141e89e47867285e19f13d1284215",W=new function(){}.constructor("return this")(),q={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/window.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(H=W[D="__coverage__"]||(W[D]={}))[O]&&H[O].hash===R?H[O]:(q.hash=R,H[O]=q),z="/Users/ash/lytics/pathforajs/src/rollup/dom/document.js",K="c65d2e4509ef22ec2e20b891da6233fa189f8d63",F=new function(){}.constructor("return this")(),Z={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/document.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(J=F[V="__coverage__"]||(F[V]={}))[z]&&J[z].hash===K?J[z]:(Z.hash=K,J[z]=Z),window.document),Nn=(Y="/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js",Q="e5a887164dfe246dafcc3ed2e58224d4f47801c2",$=new function(){}.constructor("return this")(),nn={path:"/Users/ash/lytics/pathforajs/src/rollup/dom/on-dom-ready.js",statementMap:{0:{start:{line:7,column:11},end:{line:7,column:15}},1:{start:{line:8,column:13},end:{line:8,column:46}},2:{start:{line:9,column:25},end:{line:9,column:43}},3:{start:{line:10,column:15},end:{line:10,column:80}},4:{start:{line:12,column:2},end:{line:21,column:3}},5:{start:{line:13,column:4},end:{line:17,column:7}},6:{start:{line:14,column:6},end:{line:14,column:62}},7:{start:{line:15,column:6},end:{line:15,column:26}},8:{start:{line:16,column:6},end:{line:16,column:11}},9:{start:{line:19,column:4},end:{line:19,column:24}},10:{start:{line:20,column:4},end:{line:20,column:9}}},fnMap:{0:{name:"onDOMready",decl:{start:{line:5,column:24},end:{line:5,column:34}},loc:{start:{line:5,column:40},end:{line:22,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:13,column:58},end:{line:13,column:59}},loc:{start:{line:13,column:70},end:{line:17,column:5}},line:13}},branchMap:{0:{loc:{start:{line:10,column:16},end:{line:10,column:53}},type:"cond-expr",locations:[{start:{line:10,column:23},end:{line:10,column:35}},{start:{line:10,column:38},end:{line:10,column:53}}],line:10},1:{loc:{start:{line:12,column:2},end:{line:21,column:3}},type:"if",locations:[{start:{line:12,column:2},end:{line:21,column:3}},{start:{line:12,column:2},end:{line:21,column:3}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ln=$[X="__coverage__"]||($[X]={}))[Y]&&ln[Y].hash===Q?ln[Y]:(nn.hash=Q,ln[Y]=nn));function Bn(n){Nn.f[0]++;var l,e=(Nn.s[0]++,this),o=(Nn.s[1]++,In.documentElement.doScroll),t=(Nn.s[2]++,"DOMContentLoaded"),i=(Nn.s[3]++,(o?(Nn.b[0][0]++,/^loaded|^c/):(Nn.b[0][1]++,/^loaded|^i|^c/)).test(In.readyState));Nn.s[4]++,i?(Nn.b[1][1]++,Nn.s[9]++,e.DOMLoaded=!0,Nn.s[10]++,n()):(Nn.b[1][0]++,Nn.s[5]++,In.addEventListener(t,l=function(){Nn.f[1]++,Nn.s[6]++,In.removeEventListener(t,l),Nn.s[7]++,e.DOMLoaded=!0,Nn.s[8]++,n()}))}var Ln,Pn,Gn,On,Rn,Wn,Dn=(Ln="/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js",Pn="9672a0b353765779a59d989f58a23f3035bb7516",Gn=new function(){}.constructor("return this")(),Rn={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/escape-regex.js",statementMap:{0:{start:{line:11,column:2},end:{line:11,column:58}}},fnMap:{0:{name:"escapeRegex",decl:{start:{line:10,column:24},end:{line:10,column:35}},loc:{start:{line:10,column:40},end:{line:12,column:1}},line:10}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Wn=Gn[On="__coverage__"]||(Gn[On]={}))[Ln]&&Wn[Ln].hash===Pn?Wn[Ln]:(Rn.hash=Pn,Wn[Ln]=Rn));function qn(n){return Dn.f[0]++,Dn.s[0]++,String(n).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}var Hn,zn,Kn,Fn,Vn,Zn,Jn=(Hn="/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js",zn="af2b6a3c72edb825a75cf9ee73b16bd533be4472",Kn=new function(){}.constructor("return this")(),Vn={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/remove-class.js",statementMap:{0:{start:{line:13,column:24},end:{line:17,column:19}},1:{start:{line:18,column:2},end:{line:18,column:70}}},fnMap:{0:{name:"removeClass",decl:{start:{line:12,column:24},end:{line:12,column:35}},loc:{start:{line:12,column:57},end:{line:19,column:1}},line:12}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Zn=Kn[Fn="__coverage__"]||(Kn[Fn]={}))[Hn]&&Zn[Hn].hash===zn?Zn[Hn]:(Vn.hash=zn,Zn[Hn]=Vn));function Yn(n,l){Jn.f[0]++;var e=(Jn.s[0]++,new RegExp(["(^|\\b)",qn(l.split(" ").join("|")),"(\\b|$)"].join(""),"gi"));Jn.s[1]++,n.className=n.className.replace(e," ")}var Qn,$n,Xn,nl,ll,el,ol=(Qn="/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js",$n="bc64b7e7bc5f38f1a5ee4dcbab1f4e3ef2fa8240",Xn=new function(){}.constructor("return this")(),ll={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/add-class.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:34}},1:{start:{line:15,column:2},end:{line:18,column:14}}},fnMap:{0:{name:"addClass",decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:54},end:{line:19,column:1}},line:12}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(el=Xn[nl="__coverage__"]||(Xn[nl]={}))[Qn]&&el[Qn].hash===$n?el[Qn]:(ll.hash=$n,el[Qn]=ll));function tl(n,l){ol.f[0]++,ol.s[0]++,Yn(n,l),ol.s[1]++,n.className=[n.className,l].join(" ")}var il,cl,al,sl,ul,ml,rl=(il="/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js",cl="1b19d272ca97fd27026e8edda647250432c9e60b",al=new function(){}.constructor("return this")(),ul={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/class/has-class.js",statementMap:{0:{start:{line:14,column:2},end:{line:14,column:94}}},fnMap:{0:{name:"hasClass",decl:{start:{line:13,column:24},end:{line:13,column:32}},loc:{start:{line:13,column:54},end:{line:15,column:1}},line:13}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ml=al[sl="__coverage__"]||(al[sl]={}))[il]&&ml[il].hash===cl?ml[il]:(ul.hash=cl,ml[il]=ul));function dl(n,l){return rl.f[0]++,rl.s[0]++,new RegExp("(^| )"+qn(l)+"( |$)","gi").test(n.className)}var pl,fl,bl,hl,vl,yl,gl=(pl="/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",fl="f3a0b5e86f52c2bc4177b242aaae0316e462ea14",bl=new function(){}.constructor("return this")(),vl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/decode-safe.js",statementMap:{0:{start:{line:12,column:2},end:{line:16,column:3}},1:{start:{line:13,column:4},end:{line:13,column:33}},2:{start:{line:15,column:4},end:{line:15,column:13}}},fnMap:{0:{name:"decodeSafe",decl:{start:{line:11,column:24},end:{line:11,column:34}},loc:{start:{line:11,column:39},end:{line:17,column:1}},line:11}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(yl=bl[hl="__coverage__"]||(bl[hl]={}))[pl]&&yl[pl].hash===fl?yl[pl]:(vl.hash=fl,yl[pl]=vl));function wl(l){gl.f[0]++,gl.s[0]++;try{return gl.s[1]++,decodeURIComponent(l)}catch(n){return gl.s[2]++,l}}var Ml,_l,Sl,jl,Cl,Al,xl=(Ml="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js",_l="abdbad47d914cdfe3840e45f0e7116e832b6677d",Sl=new function(){}.constructor("return this")(),Cl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/read-cookie.js",statementMap:{0:{start:{line:18,column:16},end:{line:18,column:31}},1:{start:{line:19,column:25},end:{line:19,column:112}},2:{start:{line:22,column:2},end:{line:24,column:3}},3:{start:{line:23,column:4},end:{line:23,column:91}},4:{start:{line:26,column:2},end:{line:30,column:3}},5:{start:{line:27,column:14},end:{line:27,column:36}},6:{start:{line:29,column:4},end:{line:29,column:27}},7:{start:{line:32,column:2},end:{line:32,column:14}}},fnMap:{0:{name:"readCookie",decl:{start:{line:17,column:24},end:{line:17,column:34}},loc:{start:{line:17,column:42},end:{line:33,column:1}},line:17}},branchMap:{0:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22},1:{loc:{start:{line:26,column:2},end:{line:30,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:30,column:3}},{start:{line:26,column:2},end:{line:30,column:3}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Al=Sl[jl="__coverage__"]||(Sl[jl]={}))[Ml]&&Al[Ml].hash===_l?Al[Ml]:(Cl.hash=_l,Al[Ml]=Cl));function Ul(n){xl.f[0]++;var l=(xl.s[0]++,In.cookie),e=(xl.s[1]++,l.match("(^|;)\\s*"+encodeURIComponent(qn(n))+"\\s*=\\s*([^;]+)"));if(xl.s[2]++,null==e?(xl.b[0][0]++,xl.s[3]++,e=l.match("(^|;)\\s*"+qn(n)+"\\s*=\\s*([^;]+)")):xl.b[0][1]++,xl.s[4]++,null==e)return xl.b[1][1]++,xl.s[7]++,null;xl.b[1][0]++;var o=(xl.s[5]++,e.pop());return xl.s[6]++,wl(o)}var kl,El,Tl,Il,Nl,Bl,Ll=(kl="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js",El="189688cc883d2d348d321d4d99884f004b004228",Tl=new function(){}.constructor("return this")(),Nl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/save-cookie.js",statementMap:{0:{start:{line:16,column:2},end:{line:20,column:3}},1:{start:{line:17,column:4},end:{line:17,column:54}},2:{start:{line:19,column:4},end:{line:19,column:28}},3:{start:{line:22,column:2},end:{line:28,column:13}}},fnMap:{0:{name:"saveCookie",decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:61},end:{line:29,column:1}},line:13}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:16,column:2},end:{line:20,column:3}},{start:{line:16,column:2},end:{line:20,column:3}}],line:16}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Bl=Tl[Il="__coverage__"]||(Tl[Il]={}))[kl]&&Bl[kl].hash===El?Bl[kl]:(Nl.hash=El,Bl[kl]=Nl));function Pl(n,l,e){var o;Ll.f[0]++,Ll.s[0]++,o=e?(Ll.b[0][0]++,Ll.s[1]++,"; expires="+e.toUTCString()):(Ll.b[0][1]++,Ll.s[2]++,"; expires=0"),Ll.s[3]++,In.cookie=[encodeURIComponent(n),"=",encodeURIComponent(l),o,"; path = /"].join("")}var Gl,Ol,Rl,Wl,Dl,ql,Hl=(Gl="/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js",Ol="1e40de4ae30d5133b30ef558131106377822421e",Rl=new function(){}.constructor("return this")(),Dl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/cookies/delete-cookie.js",statementMap:{0:{start:{line:12,column:13},end:{line:12,column:54}},1:{start:{line:13,column:2},end:{line:13,column:29}}},fnMap:{0:{name:"deleteCookie",decl:{start:{line:11,column:24},end:{line:11,column:36}},loc:{start:{line:11,column:44},end:{line:14,column:1}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ql=Rl[Wl="__coverage__"]||(Rl[Wl]={}))[Gl]&&ql[Gl].hash===Ol?ql[Gl]:(Dl.hash=Ol,ql[Gl]=Dl));function zl(n){Hl.f[0]++;var l=(Hl.s[0]++,new Date("Thu, 01 Jan 1970 00:00:01 GMT"));Hl.s[1]++,Pl(n,"",l)}var Kl,Fl,Vl,Zl,Jl,Yl,Ql=(Kl="/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js",Fl="456c8431e84a81a68a91d3896ab3ad390e8ff602",Vl=new function(){}.constructor("return this")(),Jl={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/persist/expiring-local-storage.js",statementMap:{0:{start:{line:2,column:18},end:{line:2,column:21}},1:{start:{line:3,column:18},end:{line:3,column:21}},2:{start:{line:4,column:26},end:{line:4,column:36}},3:{start:{line:7,column:2},end:{line:11,column:3}},4:{start:{line:8,column:4},end:{line:8,column:28}},5:{start:{line:15,column:2},end:{line:15,column:86}},6:{start:{line:18,column:2},end:{line:18,column:46}},7:{start:{line:23,column:21},end:{line:23,column:46}},8:{start:{line:24,column:17},end:{line:24,column:42}},9:{start:{line:26,column:4},end:{line:36,column:5}},10:{start:{line:27,column:6},end:{line:30,column:7}},11:{start:{line:28,column:8},end:{line:28,column:37}},12:{start:{line:29,column:8},end:{line:29,column:20}},13:{start:{line:31,column:6},end:{line:35,column:7}},14:{start:{line:33,column:8},end:{line:33,column:47}},15:{start:{line:34,column:8},end:{line:34,column:35}},16:{start:{line:37,column:4},end:{line:37,column:22}},17:{start:{line:41,column:4},end:{line:44,column:5}},18:{start:{line:42,column:6},end:{line:42,column:29}},19:{start:{line:43,column:6},end:{line:43,column:51}},20:{start:{line:46,column:17},end:{line:46,column:19}},21:{start:{line:48,column:4},end:{line:48,column:39}},22:{start:{line:49,column:4},end:{line:49,column:36}},23:{start:{line:50,column:4},end:{line:50,column:45}},24:{start:{line:52,column:4},end:{line:52,column:54}},25:{start:{line:56,column:4},end:{line:56,column:33}},26:{start:{line:60,column:4},end:{line:62,column:5}},27:{start:{line:61,column:6},end:{line:61,column:56}},28:{start:{line:63,column:15},end:{line:63,column:25}},29:{start:{line:65,column:4},end:{line:65,column:64}},30:{start:{line:67,column:4},end:{line:67,column:37}},31:{start:{line:71,column:4},end:{line:78,column:5}},32:{start:{line:72,column:16},end:{line:72,column:35}},33:{start:{line:73,column:19},end:{line:73,column:59}},34:{start:{line:75,column:6},end:{line:77,column:7}},35:{start:{line:76,column:8},end:{line:76,column:37}}},fnMap:{0:{name:"safeJsonParse",decl:{start:{line:6,column:9},end:{line:6,column:22}},loc:{start:{line:6,column:30},end:{line:12,column:1}},line:6},1:{name:"isExpired",decl:{start:{line:14,column:9},end:{line:14,column:18}},loc:{start:{line:14,column:28},end:{line:16,column:1}},line:14},2:{name:"isCreatedByThisLib",decl:{start:{line:17,column:9},end:{line:17,column:27}},loc:{start:{line:17,column:37},end:{line:19,column:1}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:22,column:11},end:{line:22,column:12}},loc:{start:{line:22,column:26},end:{line:38,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:40,column:11},end:{line:40,column:12}},loc:{start:{line:40,column:46},end:{line:53,column:3}},line:40},5:{name:"(anonymous_5)",decl:{start:{line:55,column:14},end:{line:55,column:15}},loc:{start:{line:55,column:29},end:{line:57,column:3}},line:55},6:{name:"(anonymous_6)",decl:{start:{line:59,column:7},end:{line:59,column:8}},loc:{start:{line:59,column:45},end:{line:68,column:3}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:70,column:22},end:{line:70,column:23}},loc:{start:{line:70,column:34},end:{line:79,column:3}},line:70}},branchMap:{0:{loc:{start:{line:15,column:9},end:{line:15,column:85}},type:"binary-expr",locations:[{start:{line:15,column:9},end:{line:15,column:37}},{start:{line:15,column:41},end:{line:15,column:85}}],line:15},1:{loc:{start:{line:26,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:26,column:4},end:{line:36,column:5}},{start:{line:26,column:4},end:{line:36,column:5}}],line:26},2:{loc:{start:{line:26,column:8},end:{line:26,column:39}},type:"binary-expr",locations:[{start:{line:26,column:8},end:{line:26,column:14}},{start:{line:26,column:18},end:{line:26,column:39}}],line:26},3:{loc:{start:{line:27,column:6},end:{line:30,column:7}},type:"if",locations:[{start:{line:27,column:6},end:{line:30,column:7}},{start:{line:27,column:6},end:{line:30,column:7}}],line:27},4:{loc:{start:{line:31,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:31,column:6},end:{line:35,column:7}},{start:{line:31,column:6},end:{line:35,column:7}}],line:31},5:{loc:{start:{line:41,column:4},end:{line:44,column:5}},type:"if",locations:[{start:{line:41,column:4},end:{line:44,column:5}},{start:{line:41,column:4},end:{line:44,column:5}}],line:41},6:{loc:{start:{line:60,column:4},end:{line:62,column:5}},type:"if",locations:[{start:{line:60,column:4},end:{line:62,column:5}},{start:{line:60,column:4},end:{line:62,column:5}}],line:60},7:{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:"if",locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:75,column:6},end:{line:77,column:7}}],line:75},8:{loc:{start:{line:75,column:10},end:{line:75,column:67}},type:"binary-expr",locations:[{start:{line:75,column:10},end:{line:75,column:16}},{start:{line:75,column:20},end:{line:75,column:46}},{start:{line:75,column:50},end:{line:75,column:67}}],line:75}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Yl=Vl[Zl="__coverage__"]||(Vl[Zl]={}))[Kl]&&Yl[Kl].hash===Fl?Yl[Kl]:(Jl.hash=Fl,Yl[Kl]=Jl)),$l=(Ql.s[0]++,"$"),Xl=(Ql.s[1]++,"@"),ne=(Ql.s[2]++,"PATHFORA");function le(n){Ql.f[0]++,Ql.s[3]++;try{return Ql.s[4]++,JSON.parse(n)}catch(n){}}function ee(n){return Ql.f[1]++,Ql.s[5]++,Ql.b[0][0]++,Boolean(n[Xl])&&(Ql.b[0][1]++,Date.parse(n[Xl])>5]&1<<(31&e)));var l,e,o}vo.s[10]++;for(var u=0;u>4),a(15&r))):(vo.b[8][1]++,vo.s[19]++,o.push(m))))}return vo.s[20]++,o.join("")}var go,wo,Mo,_o,So,jo,Co=(go="/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js",wo="c7d53580168d40addc52029ff65f77de30c88bc5",Mo=new function(){}.constructor("return this")(),So={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/objects/update-object.js",statementMap:{0:{start:{line:11,column:2},end:{line:22,column:3}},1:{start:{line:12,column:4},end:{line:21,column:5}},2:{start:{line:13,column:6},end:{line:18,column:7}},3:{start:{line:14,column:8},end:{line:16,column:9}},4:{start:{line:15,column:10},end:{line:15,column:28}},5:{start:{line:17,column:8},end:{line:17,column:49}},6:{start:{line:19,column:11},end:{line:21,column:5}},7:{start:{line:20,column:6},end:{line:20,column:34}}},fnMap:{0:{name:"updateObject",decl:{start:{line:10,column:24},end:{line:10,column:36}},loc:{start:{line:10,column:54},end:{line:23,column:1}},line:10}},branchMap:{0:{loc:{start:{line:12,column:4},end:{line:21,column:5}},type:"if",locations:[{start:{line:12,column:4},end:{line:21,column:5}},{start:{line:12,column:4},end:{line:21,column:5}}],line:12},1:{loc:{start:{line:12,column:8},end:{line:12,column:128}},type:"binary-expr",locations:[{start:{line:12,column:8},end:{line:12,column:35}},{start:{line:12,column:39},end:{line:12,column:71}},{start:{line:12,column:75},end:{line:12,column:96}},{start:{line:12,column:100},end:{line:12,column:128}}],line:12},2:{loc:{start:{line:13,column:6},end:{line:18,column:7}},type:"if",locations:[{start:{line:13,column:6},end:{line:18,column:7}},{start:{line:13,column:6},end:{line:18,column:7}}],line:13},3:{loc:{start:{line:14,column:8},end:{line:16,column:9}},type:"if",locations:[{start:{line:14,column:8},end:{line:16,column:9}},{start:{line:14,column:8},end:{line:16,column:9}}],line:14},4:{loc:{start:{line:19,column:11},end:{line:21,column:5}},type:"if",locations:[{start:{line:19,column:11},end:{line:21,column:5}},{start:{line:19,column:11},end:{line:21,column:5}}],line:19}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0,0,0],2:[0,0],3:[0,0],4:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(jo=Mo[_o="__coverage__"]||(Mo[_o]={}))[go]&&jo[go].hash===wo?jo[go]:(So.hash=wo,jo[go]=So));function Ao(n,l){for(var e in Co.f[0]++,Co.s[0]++,l)Co.s[1]++,Co.b[1][0]++,l.hasOwnProperty(e)&&(Co.b[1][1]++,"object"==typeof l[e])&&(Co.b[1][2]++,null!==l[e])&&(Co.b[1][3]++,!Array.isArray(l[e]))?(Co.b[0][0]++,Co.s[2]++,l.hasOwnProperty(e)?(Co.b[2][0]++,Co.s[3]++,void 0===n[e]?(Co.b[3][0]++,Co.s[4]++,n[e]={}):Co.b[3][1]++,Co.s[5]++,Ao(n[e],l[e])):Co.b[2][1]++):(Co.b[0][1]++,Co.s[6]++,l.hasOwnProperty(e)?(Co.b[4][0]++,Co.s[7]++,n[e]=l[e]):Co.b[4][1]++)}var xo,Uo,ko,Eo,To,Io,No=(xo="/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js",Uo="befca9b830059b45158aa6ad58f6eb7b168d70a9",ko=new function(){}.constructor("return this")(),To={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/objects/set-object-value.js",statementMap:{0:{start:{line:14,column:15},end:{line:14,column:21}},1:{start:{line:15,column:15},end:{line:15,column:29}},2:{start:{line:16,column:2},end:{line:24,column:3}},3:{start:{line:17,column:15},end:{line:17,column:24}},4:{start:{line:19,column:4},end:{line:21,column:5}},5:{start:{line:20,column:6},end:{line:20,column:24}},6:{start:{line:23,column:4},end:{line:23,column:26}},7:{start:{line:26,column:2},end:{line:26,column:44}},8:{start:{line:28,column:2},end:{line:28,column:16}}},fnMap:{0:{name:"setObjectValue",decl:{start:{line:13,column:24},end:{line:13,column:38}},loc:{start:{line:13,column:60},end:{line:29,column:1}},line:13}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:21,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:21,column:5}},{start:{line:19,column:4},end:{line:21,column:5}}],line:19}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Io=ko[Eo="__coverage__"]||(ko[Eo]={}))[xo]&&Io[xo].hash===Uo?Io[xo]:(To.hash=Uo,Io[xo]=To));function Bo(n,l,e){No.f[0]++;var o=(No.s[0]++,n),t=(No.s[1]++,l.split("."));No.s[2]++;for(var i=0;i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g);return ot.s[1]++,l.test(n)}var it,ct,at,st,ut,mt,rt,dt,pt,ft,bt,ht,vt=((it="/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js",ct="1cf858a24e43f2bfe227b4ce00fbce848a684557",at=new function(){}.constructor("return this")(),ut={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/utils.js",statementMap:{0:{start:{line:46,column:19},end:{line:82,column:1}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(mt=at[st="__coverage__"]||(at[st]={}))[it]&&mt[it].hash===ct?mt[it]:(ut.hash=ct,mt[it]=ut)).s[0]++,{addClass:tl,hasClass:dl,removeClass:Yn,readCookie:Ul,saveCookie:Pl,deleteCookie:zl,updateLegacyCookies:function(){Ae.f[0]++;var l=(Ae.s[0]++,[an,sn,un,rn,dn,pn,fn,bn]),e=(Ae.s[1]++,0);function n(n){return Ae.f[1]++,Ae.s[3]++,0===n.trim().indexOf(l[e])}function o(n){Ae.f[2]++;var l=(Ae.s[5]++,n.trim().split("="));if(Ae.s[6]++,2===l.length){Ae.b[0][0]++;var e=(Ae.s[7]++,l[0]),o=(Ae.s[8]++,l[1]);Ae.s[9]++,zl(e),Ae.s[10]++,re(e,wl(o))}else Ae.b[0][1]++}function t(n){Ae.f[3]++;var l=(Ae.s[12]++,sessionStorage.getItem(n));Ae.s[13]++,ge(l)?(Ae.b[1][0]++,Ae.s[14]++,sessionStorage.removeItem(n),Ae.s[15]++,sessionStorage.setItem(encodeURIComponent(n),encodeURIComponent(l))):Ae.b[1][1]++}for(Ae.s[2]++,Ae.s[4]++,Ae.s[11]++,Ae.s[16]++,e=0;e=n.global.duration)?(qt.b[8][0]++,qt.s[24]++,p()):qt.b[8][1]++):(qt.b[7][0]++,qt.s[21]++,p())}else qt.b[5][1]++;if(qt.s[25]++,a?qt.b[10][1]++:(qt.b[10][0]++,qt.s[26]++,a=0),qt.s[27]++,a>=n.widget.session)return qt.b[11][0]++,qt.s[28]++,!1;if(qt.b[11][1]++,qt.s[29]++,r)if(qt.b[12][1]++,qt.s[31]++,e=r.split("|"),qt.s[32]++,o=parseInt(e[0],10),qt.s[33]++,void 0!==e[1]){if(qt.b[13][0]++,qt.s[34]++,qt.b[15][0]++,0=n.widget.total&&(qt.b[19][1]++,void 0===n.widget.duration))return qt.b[18][0]++,qt.s[39]++,!1;if(qt.b[18][1]++,qt.s[40]++,0=n.global.session)return qt.b[23][0]++,qt.s[46]++,!1;if(qt.b[23][1]++,qt.s[47]++,qt.b[25][0]++,0=n.global.total)return qt.b[33][0]++,qt.s[63]++,!1;qt.b[33][1]++}else qt.b[32][1]++;return qt.s[64]++,qt.b[35][0]++,u>=n.global.total&&(qt.b[35][1]++,void 0===n.global.duration)?(qt.b[34][0]++,qt.s[65]++,!1):(qt.b[34][1]++,qt.s[66]++,!0)}var zt,Kt,Ft,Vt,Zt,Jt,Yt=(zt="/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js",Kt="c888dd09b8720c5888996771d649a96c8d2aaeb5",Ft=new function(){}.constructor("return this")(),Zt={path:"/Users/ash/lytics/pathforajs/src/rollup/utils/censor-tracking-keys.js",statementMap:{0:{start:{line:9,column:2},end:{line:20,column:11}},1:{start:{line:11,column:6},end:{line:15,column:9}},2:{start:{line:12,column:8},end:{line:14,column:34}},3:{start:{line:18,column:6},end:{line:18,column:28}},4:{start:{line:19,column:6},end:{line:19,column:18}}},fnMap:{0:{name:"censorTrackingKeys",decl:{start:{line:8,column:24},end:{line:8,column:42}},loc:{start:{line:8,column:64},end:{line:21,column:1}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:10,column:12},end:{line:10,column:13}},loc:{start:{line:10,column:27},end:{line:16,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:11,column:32},end:{line:11,column:33}},loc:{start:{line:11,column:55},end:{line:15,column:7}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:17,column:12},end:{line:17,column:13}},loc:{start:{line:17,column:33},end:{line:20,column:5}},line:17}},branchMap:{0:{loc:{start:{line:12,column:15},end:{line:14,column:33}},type:"cond-expr",locations:[{start:{line:13,column:12},end:{line:13,column:31}},{start:{line:14,column:12},end:{line:14,column:33}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Jt=Ft[Vt="__coverage__"]||(Ft[Vt]={}))[zt]&&Jt[zt].hash===Kt?Jt[zt]:(Zt.hash=Kt,Jt[zt]=Zt));var Qt,$t,Xt,ni,li,ei,oi=(Qt="/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js",$t="02372b2a65cccf40011861d79ce348bac92a1e60",Xt=new function(){}.constructor("return this")(),li={path:"/Users/ash/lytics/pathforajs/src/rollup/data/request/report-data.js",statementMap:{0:{start:{line:16,column:2},end:{line:24,column:3}},1:{start:{line:17,column:4},end:{line:21,column:6}},2:{start:{line:26,column:2},end:{line:44,column:3}},3:{start:{line:27,column:4},end:{line:27,column:66}},4:{start:{line:28,column:4},end:{line:28,column:34}},5:{start:{line:30,column:4},end:{line:43,column:5}},6:{start:{line:31,column:17},end:{line:31,column:40}},7:{start:{line:33,column:6},end:{line:42,column:8}}},fnMap:{0:{name:"reportData",decl:{start:{line:13,column:24},end:{line:13,column:34}},loc:{start:{line:13,column:50},end:{line:45,column:1}},line:13}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:16,column:2},end:{line:24,column:3}},{start:{line:16,column:2},end:{line:24,column:3}}],line:16},1:{loc:{start:{line:18,column:6},end:{line:20,column:14}},type:"cond-expr",locations:[{start:{line:19,column:10},end:{line:19,column:61}},{start:{line:20,column:10},end:{line:20,column:14}}],line:18},2:{loc:{start:{line:26,column:2},end:{line:44,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:44,column:3}},{start:{line:26,column:2},end:{line:44,column:3}}],line:26},3:{loc:{start:{line:26,column:6},end:{line:26,column:116}},type:"binary-expr",locations:[{start:{line:26,column:6},end:{line:26,column:39}},{start:{line:26,column:43},end:{line:26,column:74}},{start:{line:26,column:78},end:{line:26,column:116}}],line:26},4:{loc:{start:{line:27,column:14},end:{line:27,column:65}},type:"binary-expr",locations:[{start:{line:27,column:14},end:{line:27,column:38}},{start:{line:27,column:42},end:{line:27,column:65}}],line:27}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0,0],4:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ei=Xt[ni="__coverage__"]||(Xt[ni]={}))[Qt]&&ei[Qt].hash===$t?ei[Qt]:(li.hash=$t,ei[Qt]=li));function ti(n,l){var e,o,t,i;if(oi.f[0]++,oi.s[0]++,"object"==typeof jstag?(oi.b[0][0]++,oi.s[1]++,window.jstag.send(l.censorTrackingKeys?(oi.b[1][0]++,t=n,i=l.censorTrackingKeys,Yt.f[0]++,Yt.s[0]++,Object.keys(t).filter(function(l){return Yt.f[1]++,Yt.s[1]++,!i.some(function(n){return Yt.f[2]++,Yt.s[2]++,"string"==typeof n?(Yt.b[0][0]++,l===n):(Yt.b[0][1]++,n.test(l))})}).reduce(function(n,l){return Yt.f[3]++,Yt.s[3]++,n[l]=t[l],Yt.s[4]++,n},{})):(oi.b[1][1]++,n))):oi.b[0][1]++,oi.s[2]++,oi.b[3][0]++,!0===window.pathfora.enableGA&&(oi.b[3][1]++,"function"==typeof window.ga)&&(oi.b[3][2]++,"function"==typeof window.ga.getAll)){oi.b[2][0]++,oi.s[3]++,oi.b[4][0]++,e=n["pf-widget-action"]||(oi.b[4][1]++,n["pf-widget-event"]),oi.s[4]++,o=window.ga.getAll(),oi.s[5]++;for(var c=0;c*'):ea.b[12][1]++,ea.s[43]++,s.appendChild(i)):ea.b[10][1]++,ea.s[44]++,!0===n.required?(ea.b[13][0]++,ea.s[45]++,tl(s,"pf-form-required"),ea.s[46]++,e.setAttribute("data-required","true"),ea.s[47]++,n.label?(ea.b[14][0]++,ea.s[48]++,c=In.createElement("div"),ea.s[49]++,c.className="pf-required-flag",ea.s[50]++,c.innerHTML="required",ea.s[51]++,a=In.createElement("span"),ea.s[52]++,c.appendChild(a),ea.s[53]++,s.appendChild(c)):ea.b[14][1]++):ea.b[13][1]++,ea.s[54]++,ea.b[16][0]++,"date"===n.type||(ea.b[16][1]++,"email"===n.type)?(ea.b[15][0]++,ea.s[55]++,tl(s,"pf-form-required"),ea.s[56]++,e.setAttribute("data-validate","true"),ea.s[57]++,n.label?(ea.b[17][0]++,ea.s[58]++,c=In.createElement("div"),ea.s[59]++,c.className="pf-invalid-flag",ea.s[60]++,c.innerHTML="invalid",ea.s[61]++,a=In.createElement("span"),ea.s[62]++,c.appendChild(a),ea.s[63]++,s.appendChild(c)):ea.b[17][1]++):ea.b[15][1]++,ea.s[64]++,n.placeholder){if(ea.b[18][0]++,ea.s[65]++,"select"===n.type){ea.b[19][0]++;var b=(ea.s[66]++,In.createElement("option"));ea.s[67]++,b.setAttribute("value",""),ea.s[68]++,b.innerHTML=n.placeholder,ea.s[69]++,e.appendChild(b)}else ea.b[19][1]++,ea.s[70]++,e.placeholder=n.placeholder;ea.s[71]++,n.label?ea.b[20][1]++:(ea.b[20][0]++,ea.s[72]++,e.setAttribute("aria-label",n.placeholder))}else ea.b[18][1]++;if(ea.s[73]++,n.values)for(ea.b[21][0]++,ea.s[74]++,o=0;oo.display.descriptionLimit&&(qc.b[25][1]++,-1!==o.display.descriptionLimit)?(qc.b[24][0]++,qc.s[48]++,p=p.substring(0,o.display.descriptionLimit),qc.s[49]++,p=p.substring(0,p.lastIndexOf(" "))+"..."):qc.b[24][1]++,qc.s[50]++,s.innerHTML=p,qc.s[51]++,c.appendChild(s)}else qc.b[19][1]++;qc.s[52]++,e.appendChild(c)}else qc.b[2][1]++;else qc.b[0][1]++}(o,n),es.s[8]++,l=o,e=n,Jc.f[0]++,Jc.s[0]++,l.className=["pf-widget ","pf-"+e.type," pf-widget-"+e.layout,e.position?(Jc.b[0][0]++," pf-position-"+e.position):(Jc.b[0][1]++,""),e.pushDown?(Jc.b[1][0]++," pf-has-push-down"):(Jc.b[1][1]++,""),e.origin?(Jc.b[2][0]++," pf-origin-"+e.origin):(Jc.b[2][1]++,"")," pf-widget-variant-"+e.variant,e.theme?(Jc.b[3][0]++," pf-theme-"+e.theme):(Jc.b[3][1]++,""),e.className?(Jc.b[4][0]++," "+e.className):(Jc.b[4][1]++,""),e.branding?(Jc.b[5][0]++," pf-widget-has-branding"):(Jc.b[5][1]++,""),e.responsive?(Jc.b[6][1]++,""):(Jc.b[6][0]++," pf-mobile-hide")].join(""),es.s[9]++,Ba(o,n),es.s[10]++,function(n,l){switch(Ja.f[0]++,Ja.s[0]++,l.theme){case"custom":Ja.b[0][0]++,Ja.s[1]++,l.colors?(Ja.b[1][0]++,Ja.s[2]++,qa(n,l.colors)):Ja.b[1][1]++,Ja.s[3]++;break;case"none":Ja.b[0][1]++,Ja.s[4]++;break;default:Ja.b[0][2]++,Ja.s[5]++,l.theme?(Ja.b[2][0]++,Ja.s[6]++,qa(n,Un.generic.themes[l.theme])):Ja.b[2][1]++,Ja.s[7]++}}(o,n),es.s[11]++,o}var ts,is,cs,as,ss,us,ms=(ts="/Users/ash/lytics/pathforajs/src/rollup/widgets/widget-resize-listener.js",is="29ffa03c0f47601f34ee6bfd799f1aa033e2d063",cs=new function(){}.constructor("return this")(),ss={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/widget-resize-listener.js",statementMap:{0:{start:{line:19,column:2},end:{line:28,column:3}},1:{start:{line:20,column:14},end:{line:20,column:52}},2:{start:{line:21,column:4},end:{line:27,column:5}},3:{start:{line:22,column:6},end:{line:26,column:7}},4:{start:{line:23,column:8},end:{line:23,column:31}},5:{start:{line:24,column:13},end:{line:26,column:7}},6:{start:{line:25,column:8},end:{line:25,column:34}}},fnMap:{0:{name:"widgetResizeListener",decl:{start:{line:18,column:24},end:{line:18,column:44}},loc:{start:{line:18,column:60},end:{line:29,column:1}},line:18}},branchMap:{0:{loc:{start:{line:19,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:28,column:3}},{start:{line:19,column:2},end:{line:28,column:3}}],line:19},1:{loc:{start:{line:19,column:6},end:{line:19,column:81}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:32}},{start:{line:19,column:36},end:{line:19,column:61}},{start:{line:19,column:65},end:{line:19,column:81}}],line:19},2:{loc:{start:{line:21,column:4},end:{line:27,column:5}},type:"if",locations:[{start:{line:21,column:4},end:{line:27,column:5}},{start:{line:21,column:4},end:{line:27,column:5}}],line:21},3:{loc:{start:{line:22,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:26,column:7}},{start:{line:22,column:6},end:{line:26,column:7}}],line:22},4:{loc:{start:{line:22,column:10},end:{line:22,column:72}},type:"binary-expr",locations:[{start:{line:22,column:10},end:{line:22,column:45}},{start:{line:22,column:49},end:{line:22,column:72}}],line:22},5:{loc:{start:{line:24,column:13},end:{line:26,column:7}},type:"if",locations:[{start:{line:24,column:13},end:{line:26,column:7}},{start:{line:24,column:13},end:{line:26,column:7}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(us=cs[as="__coverage__"]||(cs[as]={}))[ts]&&us[ts].hash===is?us[ts]:(ss.hash=is,us[ts]=ss));function rs(n,l){if(ms.f[0]++,ms.s[0]++,ms.b[1][0]++,"inline"===n.layout||(ms.b[1][1]++,"modal"===n.layout&&(ms.b[1][2]++,n.recommend))){ms.b[0][0]++;var e=(ms.s[1]++,l.querySelector(".pf-content-unit"));ms.s[2]++,e?(ms.b[2][0]++,ms.s[3]++,ms.b[4][0]++,l.offsetWidth=yn?(ms.b[5][0]++,ms.s[6]++,Yn(e,"stack")):ms.b[5][1]++)):ms.b[2][1]++}else ms.b[0][1]++}var ds,ps,fs,bs,hs,vs,ys=(ds="/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js",ps="5bebecf10199f15959bedc7da442bae714518f0a",fs=new function(){}.constructor("return this")(),hs={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/show-widget.js",statementMap:{0:{start:{line:32,column:19},end:{line:152,column:3}},1:{start:{line:34,column:4},end:{line:38,column:5}},2:{start:{line:35,column:6},end:{line:37,column:7}},3:{start:{line:36,column:8},end:{line:36,column:15}},4:{start:{line:40,column:4},end:{line:40,column:45}},5:{start:{line:41,column:4},end:{line:41,column:38}},6:{start:{line:44,column:4},end:{line:44,column:33}},7:{start:{line:48,column:4},end:{line:53,column:5}},8:{start:{line:49,column:6},end:{line:49,column:38}},9:{start:{line:51,column:6},end:{line:51,column:40}},10:{start:{line:52,column:6},end:{line:52,column:29}},11:{start:{line:55,column:4},end:{line:57,column:5}},12:{start:{line:56,column:6},end:{line:56,column:66}},13:{start:{line:59,column:4},end:{line:102,column:5}},14:{start:{line:63,column:6},end:{line:63,column:38}},15:{start:{line:65,column:6},end:{line:89,column:7}},16:{start:{line:67,column:24},end:{line:69,column:9}},17:{start:{line:71,column:8},end:{line:88,column:9}},18:{start:{line:72,column:10},end:{line:87,column:12}},19:{start:{line:77,column:14},end:{line:85,column:15}},20:{start:{line:78,column:16},end:{line:84,column:17}},21:{start:{line:79,column:18},end:{line:79,column:38}},22:{start:{line:80,column:18},end:{line:80,column:39}},23:{start:{line:81,column:23},end:{line:84,column:17}},24:{start:{line:82,column:18},end:{line:82,column:38}},25:{start:{line:83,column:18},end:{line:83,column:39}},26:{start:{line:92,column:21},end:{line:93,column:65}},27:{start:{line:94,column:21},end:{line:94,column:53}},28:{start:{line:96,column:6},end:{line:101,column:7}},29:{start:{line:97,column:8},end:{line:97,column:35}},30:{start:{line:99,column:8},end:{line:99,column:42}},31:{start:{line:100,column:8},end:{line:100,column:74}},32:{start:{line:106,column:4},end:{line:126,column:11}},33:{start:{line:107,column:31},end:{line:107,column:51}},34:{start:{line:109,column:6},end:{line:109,column:31}},35:{start:{line:111,column:6},end:{line:116,column:7}},36:{start:{line:112,column:8},end:{line:115,column:11}},37:{start:{line:117,column:6},end:{line:125,column:7}},38:{start:{line:121,column:8},end:{line:124,column:11}},39:{start:{line:128,column:4},end:{line:132,column:5}},40:{start:{line:129,column:6},end:{line:131,column:52}},41:{start:{line:130,column:8},end:{line:130,column:37}},42:{start:{line:134,column:4},end:{line:134,column:39}},43:{start:{line:136,column:4},end:{line:142,column:6}},44:{start:{line:140,column:8},end:{line:140,column:43}},45:{start:{line:144,column:4},end:{line:151,column:5}},46:{start:{line:145,column:6},end:{line:150,column:7}},47:{start:{line:146,column:18},end:{line:146,column:39}},48:{start:{line:147,column:8},end:{line:149,column:9}},49:{start:{line:148,column:10},end:{line:148,column:56}},50:{start:{line:154,column:29},end:{line:154,column:37}},51:{start:{line:155,column:2},end:{line:159,column:3}},52:{start:{line:156,column:4},end:{line:158,column:7}},53:{start:{line:162,column:2},end:{line:169,column:3}},54:{start:{line:163,column:4},end:{line:166,column:45}},55:{start:{line:164,column:6},end:{line:164,column:20}},56:{start:{line:165,column:6},end:{line:165,column:54}},57:{start:{line:168,column:4},end:{line:168,column:18}}},fnMap:{0:{name:"showWidget",decl:{start:{line:31,column:24},end:{line:31,column:34}},loc:{start:{line:31,column:39},end:{line:170,column:1}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:32,column:19},end:{line:32,column:20}},loc:{start:{line:32,column:37},end:{line:152,column:3}},line:32},2:{name:"(anonymous_2)",decl:{start:{line:75,column:16},end:{line:75,column:17}},loc:{start:{line:75,column:30},end:{line:86,column:13}},line:75},3:{name:"(anonymous_3)",decl:{start:{line:106,column:15},end:{line:106,column:16}},loc:{start:{line:106,column:27},end:{line:126,column:5}},line:106},4:{name:"(anonymous_4)",decl:{start:{line:129,column:17},end:{line:129,column:18}},loc:{start:{line:129,column:29},end:{line:131,column:7}},line:129},5:{name:"(anonymous_5)",decl:{start:{line:139,column:10},end:{line:139,column:11}},loc:{start:{line:139,column:22},end:{line:141,column:7}},line:139},6:{name:"(anonymous_6)",decl:{start:{line:163,column:52},end:{line:163,column:53}},loc:{start:{line:163,column:64},end:{line:166,column:5}},line:163}},branchMap:{0:{loc:{start:{line:35,column:6},end:{line:37,column:7}},type:"if",locations:[{start:{line:35,column:6},end:{line:37,column:7}},{start:{line:35,column:6},end:{line:37,column:7}}],line:35},1:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55},2:{loc:{start:{line:59,column:4},end:{line:102,column:5}},type:"if",locations:[{start:{line:59,column:4},end:{line:102,column:5}},{start:{line:59,column:4},end:{line:102,column:5}}],line:59},3:{loc:{start:{line:60,column:6},end:{line:61,column:39}},type:"binary-expr",locations:[{start:{line:60,column:6},end:{line:60,column:44}},{start:{line:61,column:6},end:{line:61,column:39}}],line:60},4:{loc:{start:{line:65,column:6},end:{line:89,column:7}},type:"if",locations:[{start:{line:65,column:6},end:{line:89,column:7}},{start:{line:65,column:6},end:{line:89,column:7}}],line:65},5:{loc:{start:{line:65,column:10},end:{line:65,column:65}},type:"binary-expr",locations:[{start:{line:65,column:10},end:{line:65,column:35}},{start:{line:65,column:39},end:{line:65,column:65}}],line:65},6:{loc:{start:{line:71,column:8},end:{line:88,column:9}},type:"if",locations:[{start:{line:71,column:8},end:{line:88,column:9}},{start:{line:71,column:8},end:{line:88,column:9}}],line:71},7:{loc:{start:{line:77,column:14},end:{line:85,column:15}},type:"if",locations:[{start:{line:77,column:14},end:{line:85,column:15}},{start:{line:77,column:14},end:{line:85,column:15}}],line:77},8:{loc:{start:{line:78,column:16},end:{line:84,column:17}},type:"if",locations:[{start:{line:78,column:16},end:{line:84,column:17}},{start:{line:78,column:16},end:{line:84,column:17}}],line:78},9:{loc:{start:{line:81,column:23},end:{line:84,column:17}},type:"if",locations:[{start:{line:81,column:23},end:{line:84,column:17}},{start:{line:81,column:23},end:{line:84,column:17}}],line:81},10:{loc:{start:{line:92,column:21},end:{line:93,column:65}},type:"cond-expr",locations:[{start:{line:93,column:10},end:{line:93,column:32}},{start:{line:93,column:35},end:{line:93,column:65}}],line:92},11:{loc:{start:{line:96,column:6},end:{line:101,column:7}},type:"if",locations:[{start:{line:96,column:6},end:{line:101,column:7}},{start:{line:96,column:6},end:{line:101,column:7}}],line:96},12:{loc:{start:{line:111,column:6},end:{line:116,column:7}},type:"if",locations:[{start:{line:111,column:6},end:{line:116,column:7}},{start:{line:111,column:6},end:{line:116,column:7}}],line:111},13:{loc:{start:{line:117,column:6},end:{line:125,column:7}},type:"if",locations:[{start:{line:117,column:6},end:{line:125,column:7}},{start:{line:117,column:6},end:{line:125,column:7}}],line:117},14:{loc:{start:{line:118,column:8},end:{line:119,column:55}},type:"binary-expr",locations:[{start:{line:118,column:8},end:{line:118,column:40}},{start:{line:119,column:8},end:{line:119,column:55}}],line:118},15:{loc:{start:{line:128,column:4},end:{line:132,column:5}},type:"if",locations:[{start:{line:128,column:4},end:{line:132,column:5}},{start:{line:128,column:4},end:{line:132,column:5}}],line:128},16:{loc:{start:{line:145,column:6},end:{line:150,column:7}},type:"if",locations:[{start:{line:145,column:6},end:{line:150,column:7}},{start:{line:145,column:6},end:{line:150,column:7}}],line:145},17:{loc:{start:{line:147,column:8},end:{line:149,column:9}},type:"if",locations:[{start:{line:147,column:8},end:{line:149,column:9}},{start:{line:147,column:8},end:{line:149,column:9}}],line:147},18:{loc:{start:{line:147,column:12},end:{line:147,column:75}},type:"binary-expr",locations:[{start:{line:147,column:12},end:{line:147,column:22}},{start:{line:147,column:26},end:{line:147,column:75}}],line:147},19:{loc:{start:{line:155,column:2},end:{line:159,column:3}},type:"if",locations:[{start:{line:155,column:2},end:{line:159,column:3}},{start:{line:155,column:2},end:{line:159,column:3}}],line:155},20:{loc:{start:{line:162,column:2},end:{line:169,column:3}},type:"if",locations:[{start:{line:162,column:2},end:{line:169,column:3}},{start:{line:162,column:2},end:{line:169,column:3}}],line:162},21:{loc:{start:{line:162,column:6},end:{line:162,column:58}},type:"binary-expr",locations:[{start:{line:162,column:6},end:{line:162,column:25}},{start:{line:162,column:29},end:{line:162,column:58}}],line:162}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(vs=fs[bs="__coverage__"]||(fs[bs]={}))[ds]&&vs[ds].hash===ps?vs[ds]:(hs.hash=ps,vs[ds]=hs));function gs(n){ys.f[0]++,ys.s[0]++;function l(l){ys.f[1]++,ys.s[1]++;for(var n=0;n=n.length)return lr.b[0][0]++,void lr.s[4]++;lr.b[0][1]++;var o=(lr.s[5]++,n[l]),t=(lr.s[6]++,Un[o.type]),i=(lr.s[7]++,Un.generic);if(lr.s[8]++,Ao(o,i),lr.s[9]++,Ao(o,t),lr.s[10]++,Ao(o,o.config),lr.s[11]++,!(xn.initializedWidgets.indexOf(o.id)<0))throw lr.b[1][1]++,lr.s[13]++,new Error("Cannot add two widgets with the same id");lr.b[1][0]++,lr.s[12]++,xn.initializedWidgets.push(o.id),lr.s[14]++,o.success?(lr.b[2][0]++,lr.s[15]++,o.formStates?lr.b[3][1]++:(lr.b[3][0]++,lr.s[16]++,o.formStates={}),lr.s[17]++,o.formStates.success?lr.b[4][1]++:(lr.b[4][0]++,lr.s[18]++,o.formStates.success=o.success)):lr.b[2][1]++,lr.s[19]++,rm(o,c,function(){lr.f[2]++,lr.s[20]++,Zm(o,c,function(){if(lr.f[3]++,lr.s[21]++,c.initializeWidget(o,e),lr.s[22]++,lr.b[6][0]++,e&&(lr.b[6][1]++,e.priority===Sn)){if(lr.b[5][0]++,lr.s[23]++,lr.b[8][0]++,xn.prioritizedWidgets.length&&(lr.b[8][1]++,xn.prioritizedWidgets[0].id===o.id))return lr.b[7][0]++,void lr.s[24]++;lr.b[7][1]++,lr.s[25]++,a(n,l+1,e)}else lr.b[5][1]++})}),lr.s[26]++,lr.b[10][0]++,e&&(lr.b[10][1]++,e.priority===Sn)?lr.b[9][1]++:(lr.b[9][0]++,lr.s[27]++,a(n,l+1,e))};lr.s[28]++,a(n,0,l)}var or,tr,ir,cr,ar,sr,ur=(or="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js",tr="8fbdbfdbd7ed43bc0f01f77d8e1b86f99e6ed67d",ir=new function(){}.constructor("return this")(),ar={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/entity-fields/replace-entity-field.js",statementMap:{0:{start:{line:26,column:2},end:{line:28,column:3}},1:{start:{line:27,column:4},end:{line:27,column:16}},2:{start:{line:32,column:19},end:{line:32,column:52}},3:{start:{line:33,column:13},end:{line:33,column:18}},4:{start:{line:36,column:2},end:{line:41,column:3}},5:{start:{line:37,column:4},end:{line:37,column:31}},6:{start:{line:38,column:4},end:{line:38,column:72}},7:{start:{line:39,column:4},end:{line:39,column:57}},8:{start:{line:40,column:4},end:{line:40,column:16}},9:{start:{line:44,column:2},end:{line:112,column:3}},10:{start:{line:46,column:19},end:{line:46,column:49}},11:{start:{line:47,column:16},end:{line:47,column:35}},12:{start:{line:48,column:14},end:{line:48,column:16}},13:{start:{line:51,column:4},end:{line:53,column:5}},14:{start:{line:52,column:6},end:{line:52,column:28}},15:{start:{line:56,column:16},end:{line:56,column:42}},16:{start:{line:65,column:4},end:{line:74,column:5}},17:{start:{line:66,column:6},end:{line:66,column:32}},18:{start:{line:68,column:11},end:{line:74,column:5}},19:{start:{line:70,column:19},end:{line:70,column:43}},20:{start:{line:71,column:6},end:{line:73,column:7}},21:{start:{line:72,column:8},end:{line:72,column:35}},22:{start:{line:77,column:4},end:{line:81,column:5}},23:{start:{line:78,column:6},end:{line:80,column:7}},24:{start:{line:79,column:8},end:{line:79,column:36}},25:{start:{line:84,column:4},end:{line:92,column:5}},26:{start:{line:85,column:6},end:{line:85,column:27}},27:{start:{line:87,column:6},end:{line:91,column:7}},28:{start:{line:88,column:8},end:{line:90,column:9}},29:{start:{line:89,column:10},end:{line:89,column:38}},30:{start:{line:97,column:4},end:{line:108,column:5}},31:{start:{line:98,column:6},end:{line:98,column:50}},32:{start:{line:100,column:11},end:{line:108,column:5}},33:{start:{line:104,column:6},end:{line:104,column:19}},34:{start:{line:107,column:6},end:{line:107,column:46}},35:{start:{line:110,column:4},end:{line:110,column:43}},36:{start:{line:111,column:4},end:{line:111,column:21}},37:{start:{line:115,column:2},end:{line:123,column:3}},38:{start:{line:116,column:4},end:{line:120,column:5}},39:{start:{line:117,column:6},end:{line:117,column:79}},40:{start:{line:119,column:6},end:{line:119,column:59}},41:{start:{line:122,column:4},end:{line:122,column:42}},42:{start:{line:125,column:2},end:{line:125,column:14}}},fnMap:{0:{name:"replaceEntityField",decl:{start:{line:20,column:24},end:{line:20,column:42}},loc:{start:{line:25,column:2},end:{line:126,column:1}},line:25}},branchMap:{0:{loc:{start:{line:26,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:26,column:2},end:{line:28,column:3}},{start:{line:26,column:2},end:{line:28,column:3}}],line:26},1:{loc:{start:{line:26,column:6},end:{line:26,column:29}},type:"binary-expr",locations:[{start:{line:26,column:6},end:{line:26,column:12}},{start:{line:26,column:16},end:{line:26,column:29}}],line:26},2:{loc:{start:{line:36,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:41,column:3}},{start:{line:36,column:2},end:{line:41,column:3}}],line:36},3:{loc:{start:{line:51,column:4},end:{line:53,column:5}},type:"if",locations:[{start:{line:51,column:4},end:{line:53,column:5}},{start:{line:51,column:4},end:{line:53,column:5}}],line:51},4:{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},5:{loc:{start:{line:65,column:8},end:{line:65,column:37}},type:"binary-expr",locations:[{start:{line:65,column:8},end:{line:65,column:18}},{start:{line:65,column:22},end:{line:65,column:37}}],line:65},6:{loc:{start:{line:68,column:11},end:{line:74,column:5}},type:"if",locations:[{start:{line:68,column:11},end:{line:74,column:5}},{start:{line:68,column:11},end:{line:74,column:5}}],line:68},7:{loc:{start:{line:68,column:15},end:{line:68,column:75}},type:"binary-expr",locations:[{start:{line:68,column:15},end:{line:68,column:27}},{start:{line:68,column:31},end:{line:68,column:75}}],line:68},8:{loc:{start:{line:71,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:71,column:6},end:{line:73,column:7}},{start:{line:71,column:6},end:{line:73,column:7}}],line:71},9:{loc:{start:{line:71,column:10},end:{line:71,column:51}},type:"binary-expr",locations:[{start:{line:71,column:10},end:{line:71,column:16}},{start:{line:71,column:20},end:{line:71,column:31}},{start:{line:71,column:35},end:{line:71,column:51}}],line:71},10:{loc:{start:{line:78,column:6},end:{line:80,column:7}},type:"if",locations:[{start:{line:78,column:6},end:{line:80,column:7}},{start:{line:78,column:6},end:{line:80,column:7}}],line:78},11:{loc:{start:{line:84,column:4},end:{line:92,column:5}},type:"if",locations:[{start:{line:84,column:4},end:{line:92,column:5}},{start:{line:84,column:4},end:{line:92,column:5}}],line:84},12:{loc:{start:{line:88,column:8},end:{line:90,column:9}},type:"if",locations:[{start:{line:88,column:8},end:{line:90,column:9}},{start:{line:88,column:8},end:{line:90,column:9}}],line:88},13:{loc:{start:{line:97,column:4},end:{line:108,column:5}},type:"if",locations:[{start:{line:97,column:4},end:{line:108,column:5}},{start:{line:97,column:4},end:{line:108,column:5}}],line:97},14:{loc:{start:{line:100,column:11},end:{line:108,column:5}},type:"if",locations:[{start:{line:100,column:11},end:{line:108,column:5}},{start:{line:100,column:11},end:{line:108,column:5}}],line:100},15:{loc:{start:{line:101,column:6},end:{line:102,column:59}},type:"binary-expr",locations:[{start:{line:101,column:7},end:{line:101,column:11}},{start:{line:101,column:15},end:{line:101,column:31}},{start:{line:102,column:6},end:{line:102,column:59}}],line:101},16:{loc:{start:{line:115,column:2},end:{line:123,column:3}},type:"if",locations:[{start:{line:115,column:2},end:{line:123,column:3}},{start:{line:115,column:2},end:{line:123,column:3}}],line:115},17:{loc:{start:{line:116,column:4},end:{line:120,column:5}},type:"if",locations:[{start:{line:116,column:4},end:{line:120,column:5}},{start:{line:116,column:4},end:{line:120,column:5}}],line:116}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0,0],16:[0,0],17:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(sr=ir[cr="__coverage__"]||(ir[cr]={}))[or]&&sr[or].hash===tr?sr[or]:(ar.hash=tr,sr[or]=ar));function mr(n,l,e,o){if(ur.f[0]++,ur.s[0]++,ur.b[1][0]++,!e||(ur.b[1][1]++,!e.length))return ur.b[0][0]++,ur.s[1]++,!0;ur.b[0][1]++;var t,i,c=(ur.s[2]++,qo(n,l)),a=(ur.s[3]++,!1);ur.s[4]++,"function"==typeof c?(ur.b[2][0]++,ur.s[5]++,i=c.toString(),ur.s[6]++,c=i.substring(i.indexOf("{")+1,i.lastIndexOf("}")),ur.s[7]++,t=i.match(/(function.+\()(.+(?=\)))(.+$)/),ur.s[8]++,a=!0):ur.b[2][1]++,ur.s[9]++;for(var s=0;s
x
'),pp.s[10]++,l.close();var e=(pp.s[11]++,l.documentElement.scrollHeight>l.body.scrollHeight);return pp.s[12]++,n.parentNode.removeChild(n),pp.s[13]++,fp=e?(pp.b[2][0]++,document.documentElement):(pp.b[2][1]++,document.body)}(),l=n.scrollTop/(n.scrollHeight-n.clientHeight)*100;return Mp.s[1]++,e<=l}});return Mp.s[2]++,n}var Sp,jp,Cp,Ap,xp,Up,kp=(Sp="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js",jp="d33b65eaf4c1cb5d4b51a1cccd7a97120b0bf095",Cp=new function(){}.constructor("return this")(),xp={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/manual-trigger/register-manual-trigger-watcher.js",statementMap:{0:{start:{line:15,column:16},end:{line:22,column:3}},1:{start:{line:17,column:6},end:{line:19,column:7}},2:{start:{line:18,column:8},end:{line:18,column:20}},3:{start:{line:20,column:6},end:{line:20,column:19}},4:{start:{line:24,column:2},end:{line:24,column:17}}},fnMap:{0:{name:"registerManualTriggerWatcher",decl:{start:{line:14,column:24},end:{line:14,column:52}},loc:{start:{line:14,column:69},end:{line:25,column:1}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:16,column:11},end:{line:16,column:12}},loc:{start:{line:16,column:23},end:{line:21,column:5}},line:16}},branchMap:{0:{loc:{start:{line:17,column:6},end:{line:19,column:7}},type:"if",locations:[{start:{line:17,column:6},end:{line:19,column:7}},{start:{line:17,column:6},end:{line:19,column:7}}],line:17},1:{loc:{start:{line:17,column:10},end:{line:17,column:99}},type:"binary-expr",locations:[{start:{line:17,column:10},end:{line:17,column:15}},{start:{line:17,column:19},end:{line:17,column:60}},{start:{line:17,column:64},end:{line:17,column:99}}],line:17}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Up=Cp[Ap="__coverage__"]||(Cp[Ap]={}))[Sp]&&Up[Sp].hash===jp?Up[Sp]:(xp.hash=jp,Up[Sp]=xp));var Ep,Tp,Ip,Np,Bp,Lp,Pp=(Ep="/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js",Tp="2c5efaa78cd8d4cfb28cb87382b8423f36da5238",Ip=new function(){}.constructor("return this")(),Bp={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/init-widget.js",statementMap:{0:{start:{line:46,column:18},end:{line:46,column:42}},1:{start:{line:47,column:11},end:{line:47,column:15}},2:{start:{line:49,column:2},end:{line:49,column:23}},3:{start:{line:50,column:2},end:{line:50,column:24}},4:{start:{line:53,column:2},end:{line:53,column:33}},5:{start:{line:54,column:2},end:{line:54,column:63}},6:{start:{line:56,column:2},end:{line:62,column:3}},7:{start:{line:61,column:4},end:{line:61,column:11}},8:{start:{line:64,column:2},end:{line:75,column:3}},9:{start:{line:65,column:4},end:{line:74,column:5}},10:{start:{line:69,column:6},end:{line:69,column:72}},11:{start:{line:71,column:6},end:{line:73,column:8}},12:{start:{line:78,column:2},end:{line:78,column:75}},13:{start:{line:81,column:2},end:{line:83,column:3}},14:{start:{line:82,column:4},end:{line:82,column:63}},15:{start:{line:85,column:2},end:{line:87,column:3}},16:{start:{line:86,column:4},end:{line:86,column:75}},17:{start:{line:89,column:2},end:{line:92,column:3}},18:{start:{line:90,column:4},end:{line:91,column:80}},19:{start:{line:94,column:2},end:{line:96,column:3}},20:{start:{line:95,column:4},end:{line:95,column:69}},21:{start:{line:98,column:2},end:{line:100,column:3}},22:{start:{line:99,column:4},end:{line:99,column:71}},23:{start:{line:102,column:2},end:{line:102,column:54}},24:{start:{line:104,column:2},end:{line:107,column:3}},25:{start:{line:105,column:4},end:{line:106,column:72}},26:{start:{line:110,column:2},end:{line:116,column:3}},27:{start:{line:115,column:4},end:{line:115,column:50}},28:{start:{line:119,column:2},end:{line:123,column:3}},29:{start:{line:120,column:4},end:{line:120,column:42}},30:{start:{line:121,column:4},end:{line:121,column:34}},31:{start:{line:122,column:4},end:{line:122,column:42}},32:{start:{line:125,column:2},end:{line:131,column:3}},33:{start:{line:126,column:4},end:{line:128,column:6}},34:{start:{line:129,column:4},end:{line:129,column:34}},35:{start:{line:130,column:4},end:{line:130,column:37}},36:{start:{line:133,column:2},end:{line:139,column:3}},37:{start:{line:134,column:4},end:{line:136,column:6}},38:{start:{line:137,column:4},end:{line:137,column:34}},39:{start:{line:138,column:4},end:{line:138,column:37}},40:{start:{line:141,column:2},end:{line:149,column:3}},41:{start:{line:142,column:4},end:{line:142,column:76}},42:{start:{line:143,column:4},end:{line:143,column:34}},43:{start:{line:144,column:4},end:{line:144,column:44}},44:{start:{line:148,column:4},end:{line:148,column:26}},45:{start:{line:151,column:2},end:{line:155,column:3}},46:{start:{line:152,column:4},end:{line:154,column:5}},47:{start:{line:153,column:6},end:{line:153,column:25}}},fnMap:{0:{name:"initializeWidget",decl:{start:{line:44,column:24},end:{line:44,column:40}},loc:{start:{line:44,column:59},end:{line:156,column:1}},line:44}},branchMap:{0:{loc:{start:{line:56,column:2},end:{line:62,column:3}},type:"if",locations:[{start:{line:56,column:2},end:{line:62,column:3}},{start:{line:56,column:2},end:{line:62,column:3}}],line:56},1:{loc:{start:{line:57,column:4},end:{line:59,column:36}},type:"binary-expr",locations:[{start:{line:57,column:5},end:{line:57,column:31}},{start:{line:58,column:6},end:{line:58,column:48}},{start:{line:59,column:4},end:{line:59,column:36}}],line:57},2:{loc:{start:{line:64,column:2},end:{line:75,column:3}},type:"if",locations:[{start:{line:64,column:2},end:{line:75,column:3}},{start:{line:64,column:2},end:{line:75,column:3}}],line:64},3:{loc:{start:{line:65,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:74,column:5}},{start:{line:65,column:4},end:{line:74,column:5}}],line:65},4:{loc:{start:{line:66,column:6},end:{line:67,column:77}},type:"binary-expr",locations:[{start:{line:66,column:6},end:{line:66,column:29}},{start:{line:67,column:7},end:{line:67,column:38}},{start:{line:67,column:42},end:{line:67,column:76}}],line:66},5:{loc:{start:{line:78,column:17},end:{line:78,column:74}},type:"binary-expr",locations:[{start:{line:78,column:17},end:{line:78,column:29}},{start:{line:78,column:33},end:{line:78,column:74}}],line:78},6:{loc:{start:{line:81,column:2},end:{line:83,column:3}},type:"if",locations:[{start:{line:81,column:2},end:{line:83,column:3}},{start:{line:81,column:2},end:{line:83,column:3}}],line:81},7:{loc:{start:{line:82,column:19},end:{line:82,column:62}},type:"binary-expr",locations:[{start:{line:82,column:19},end:{line:82,column:31}},{start:{line:82,column:35},end:{line:82,column:62}}],line:82},8:{loc:{start:{line:85,column:2},end:{line:87,column:3}},type:"if",locations:[{start:{line:85,column:2},end:{line:87,column:3}},{start:{line:85,column:2},end:{line:87,column:3}}],line:85},9:{loc:{start:{line:86,column:19},end:{line:86,column:74}},type:"binary-expr",locations:[{start:{line:86,column:19},end:{line:86,column:31}},{start:{line:86,column:35},end:{line:86,column:74}}],line:86},10:{loc:{start:{line:89,column:2},end:{line:92,column:3}},type:"if",locations:[{start:{line:89,column:2},end:{line:92,column:3}},{start:{line:89,column:2},end:{line:92,column:3}}],line:89},11:{loc:{start:{line:91,column:6},end:{line:91,column:79}},type:"binary-expr",locations:[{start:{line:91,column:6},end:{line:91,column:18}},{start:{line:91,column:22},end:{line:91,column:79}}],line:91},12:{loc:{start:{line:94,column:2},end:{line:96,column:3}},type:"if",locations:[{start:{line:94,column:2},end:{line:96,column:3}},{start:{line:94,column:2},end:{line:96,column:3}}],line:94},13:{loc:{start:{line:95,column:19},end:{line:95,column:68}},type:"binary-expr",locations:[{start:{line:95,column:19},end:{line:95,column:31}},{start:{line:95,column:35},end:{line:95,column:68}}],line:95},14:{loc:{start:{line:98,column:2},end:{line:100,column:3}},type:"if",locations:[{start:{line:98,column:2},end:{line:100,column:3}},{start:{line:98,column:2},end:{line:100,column:3}}],line:98},15:{loc:{start:{line:99,column:19},end:{line:99,column:70}},type:"binary-expr",locations:[{start:{line:99,column:19},end:{line:99,column:31}},{start:{line:99,column:35},end:{line:99,column:70}}],line:99},16:{loc:{start:{line:102,column:17},end:{line:102,column:53}},type:"binary-expr",locations:[{start:{line:102,column:17},end:{line:102,column:29}},{start:{line:102,column:33},end:{line:102,column:53}}],line:102},17:{loc:{start:{line:104,column:2},end:{line:107,column:3}},type:"if",locations:[{start:{line:104,column:2},end:{line:107,column:3}},{start:{line:104,column:2},end:{line:107,column:3}}],line:104},18:{loc:{start:{line:106,column:6},end:{line:106,column:71}},type:"binary-expr",locations:[{start:{line:106,column:6},end:{line:106,column:18}},{start:{line:106,column:22},end:{line:106,column:71}}],line:106},19:{loc:{start:{line:110,column:2},end:{line:116,column:3}},type:"if",locations:[{start:{line:110,column:2},end:{line:116,column:3}},{start:{line:110,column:2},end:{line:116,column:3}}],line:110},20:{loc:{start:{line:111,column:4},end:{line:113,column:49}},type:"binary-expr",locations:[{start:{line:111,column:4},end:{line:111,column:16}},{start:{line:112,column:4},end:{line:112,column:11}},{start:{line:113,column:4},end:{line:113,column:49}}],line:111},21:{loc:{start:{line:119,column:2},end:{line:123,column:3}},type:"if",locations:[{start:{line:119,column:2},end:{line:123,column:3}},{start:{line:119,column:2},end:{line:123,column:3}}],line:119},22:{loc:{start:{line:125,column:2},end:{line:131,column:3}},type:"if",locations:[{start:{line:125,column:2},end:{line:131,column:3}},{start:{line:125,column:2},end:{line:131,column:3}}],line:125},23:{loc:{start:{line:133,column:2},end:{line:139,column:3}},type:"if",locations:[{start:{line:133,column:2},end:{line:139,column:3}},{start:{line:133,column:2},end:{line:139,column:3}}],line:133},24:{loc:{start:{line:141,column:2},end:{line:149,column:3}},type:"if",locations:[{start:{line:141,column:2},end:{line:149,column:3}},{start:{line:141,column:2},end:{line:149,column:3}}],line:141},25:{loc:{start:{line:151,column:2},end:{line:155,column:3}},type:"if",locations:[{start:{line:151,column:2},end:{line:155,column:3}},{start:{line:151,column:2},end:{line:155,column:3}}],line:151},26:{loc:{start:{line:151,column:6},end:{line:151,column:65}},type:"binary-expr",locations:[{start:{line:151,column:6},end:{line:151,column:34}},{start:{line:151,column:38},end:{line:151,column:65}}],line:151},27:{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:"if",locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:152,column:4},end:{line:154,column:5}}],line:152}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0},f:{0:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Lp=Ip[Np="__coverage__"]||(Ip[Np]={}))[Ep]&&Lp[Ep].hash===Tp?Lp[Ep]:(Bp.hash=Tp,Lp[Ep]=Bp));function Gp(n,l){Pp.f[0]++;var e,o,t,i,c=(Pp.s[0]++,n.displayConditions),a=(Pp.s[1]++,this);if(Pp.s[2]++,n.watchers=[],Pp.s[3]++,n.listeners=[],Pp.s[4]++,n.expiration=new Date,Pp.s[5]++,n.expiration.setDate(n.expiration.getDate()+365),Pp.s[6]++,Pp.b[1][0]++,"sitegate"===n.type&&(Pp.b[1][1]++,"true"===Be(sn+n.id))||(Pp.b[1][2]++,!0===n.hiddenViaABTests))return Pp.b[0][0]++,void Pp.s[7]++;if(Pp.b[0][1]++,Pp.s[8]++,n.pushDown){if(Pp.b[2][0]++,Pp.s[9]++,Pp.b[4][0]++,"bar"!==n.layout||(Pp.b[4][1]++,"top-fixed"!==n.position&&(Pp.b[4][2]++,"top-absolute"!==n.position)))throw Pp.b[3][1]++,Pp.s[11]++,new Error("Only top positioned bar widgets may have a pushDown property");Pp.b[3][0]++,Pp.s[10]++,tl(In.querySelector(n.pushDown),"pf-push-down")}else Pp.b[2][1]++;Pp.s[12]++,n.valid=(Pp.b[5][0]++,n.valid&&(Pp.b[5][1]++,function(n,l){vr.f[0]++;var e,o=(vr.s[0]++,!0);vr.s[1]++;for(var t=0;t<_n.length;t++){var i=(vr.s[2]++,new RegExp(Mn,"g")),c=(vr.s[3]++,qo(n,_n[t]));vr.s[4]++,"function"==typeof c?(vr.b[0][0]++,vr.s[5]++,c=c.toString()):vr.b[0][1]++,vr.s[6]++,"string"==typeof c?(vr.b[1][0]++,vr.s[7]++,e=c.match(i),vr.s[8]++,vr.b[3][0]++,e&&(vr.b[3][1]++,0new Date(n.end_at).getTime())?(jr.b[2][0]++,jr.s[5]++,l=!1):jr.b[2][1]++,jr.s[6]++,l}(c.date)))):Pp.b[6][1]++,Pp.s[15]++,c.pageVisits?(Pp.b[8][0]++,Pp.s[16]++,n.valid=(Pp.b[9][0]++,n.valid&&(Pp.b[9][1]++,o=c.pageVisits,Tr.f[0]++,Tr.s[0]++,Be(bn)>=o))):Pp.b[8][1]++,Pp.s[17]++,c.hideAfterAction?(Pp.b[10][0]++,Pp.s[18]++,n.valid=(Pp.b[11][0]++,n.valid&&(Pp.b[11][1]++,function(n,l){Or.f[0]++;var e,o=(Or.s[0]++,!0),t=(Or.s[1]++,Date.now()),i=(Or.s[2]++,Be(rn+l.id)),c=(Or.s[3]++,Be(dn+l.id)),a=(Or.s[4]++,Be(pn+l.id));return Or.s[5]++,Or.b[1][0]++,n.confirm&&(Or.b[1][1]++,i)?(Or.b[0][0]++,Or.s[6]++,e=i.split("|"),Or.s[7]++,parseInt(e[0],10)>=n.confirm.hideCount?(Or.b[2][0]++,Or.s[8]++,o=!1):Or.b[2][1]++,Or.s[9]++,Or.b[4][0]++,void 0!==e[1]&&(Or.b[4][1]++,Math.abs(e[1]-t)/1e3=n.cancel.hideCount?(Or.b[7][0]++,Or.s[14]++,o=!1):Or.b[7][1]++,Or.s[15]++,Or.b[9][0]++,void 0!==e[1]&&(Or.b[9][1]++,Math.abs(e[1]-t)/1e3=n.closed.hideCount?(Or.b[12][0]++,Or.s[20]++,o=!1):Or.b[12][1]++,Or.s[21]++,Or.b[14][0]++,void 0!==e[1]&&(Or.b[14][1]++,Math.abs(e[1]-t)/1e3=In.body.offsetHeight);return $d.s[3]++,$d.b[2][0]++,e.elem.offsetTop-window.innerHeight/2<=n||($d.b[2][1]++,l)?($d.b[1][0]++,$d.s[4]++,!0):($d.b[1][1]++,$d.s[5]++,!1)}});return $d.s[6]++,e}(c.displayWhenElementVisible),Pp.s[34]++,n.watchers.push(e),Pp.s[35]++,cp(n)):Pp.b[22][1]++,Pp.s[36]++,c.scrollPercentageToDisplay?(Pp.b[23][0]++,Pp.s[37]++,e=_p(c.scrollPercentageToDisplay),Pp.s[38]++,n.watchers.push(e),Pp.s[39]++,cp(n)):Pp.b[23][1]++,Pp.s[40]++,c.manualTrigger?(Pp.b[24][0]++,Pp.s[41]++,e=function(n,l){kp.f[0]++;var e=(kp.s[0]++,{check:function(){return kp.f[1]++,kp.s[1]++,kp.b[1][0]++,n&&(kp.b[1][1]++,xn.triggeredWidgets[l.id])||(kp.b[1][2]++,xn.triggeredWidgets["*"])?(kp.b[0][0]++,kp.s[2]++,!0):(kp.b[0][1]++,kp.s[3]++,!1)}});return kp.s[4]++,e}(c.manualTrigger,n),Pp.s[42]++,n.watchers.push(e),Pp.s[43]++,xn.readyWidgets.push(n),Pp.s[44]++,Ls(n)):Pp.b[24][1]++,Pp.s[45]++,Pp.b[26][0]++,0!==n.watchers.length||(Pp.b[26][1]++,c.showOnExitIntent)?Pp.b[25][1]++:(Pp.b[25][0]++,Pp.s[46]++,n.valid?(Pp.b[27][0]++,Pp.s[47]++,gs(n)):Pp.b[27][1]++)}var Op,Rp,Wp,Dp,qp,Hp,zp=(Op="/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js",Rp="bd62d0e25a272b36fce88209a18945257367f6d0",Wp=new function(){}.constructor("return this")(),qp={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/preview-widget.js",statementMap:{0:{start:{line:17,column:2},end:{line:17,column:33}},1:{start:{line:18,column:2},end:{line:18,column:34}}},fnMap:{0:{name:"previewWidget",decl:{start:{line:16,column:24},end:{line:16,column:37}},loc:{start:{line:16,column:47},end:{line:19,column:1}},line:16}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Hp=Wp[Dp="__coverage__"]||(Wp[Dp]={}))[Op]&&Hp[Op].hash===Rp?Hp[Op]:(qp.hash=Rp,Hp[Op]=qp));function Kp(n){return zp.f[0]++,zp.s[0]++,n.id=Yo(),zp.s[1]++,os(n)}var Fp,Vp,Zp,Jp,Yp,Qp,$p=(Fp="/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js",Vp="c4c1b377992e8b34c9a4d9bffc69f76783c80f27",Zp=new function(){}.constructor("return this")(),Yp={path:"/Users/ash/lytics/pathforajs/src/rollup/display-conditions/cancel-delayed-widget.js",statementMap:{0:{start:{line:12,column:17},end:{line:12,column:56}},1:{start:{line:14,column:2},end:{line:17,column:3}},2:{start:{line:15,column:4},end:{line:15,column:27}},3:{start:{line:16,column:4},end:{line:16,column:51}}},fnMap:{0:{name:"cancelDelayedWidget",decl:{start:{line:11,column:24},end:{line:11,column:43}},loc:{start:{line:11,column:56},end:{line:18,column:1}},line:11}},branchMap:{0:{loc:{start:{line:14,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:17,column:3}},{start:{line:14,column:2},end:{line:17,column:3}}],line:14}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Qp=Zp[Jp="__coverage__"]||(Zp[Jp]={}))[Fp]&&Qp[Fp].hash===Vp?Qp[Fp]:(Yp.hash=Vp,Qp[Fp]=Yp));function Xp(n){$p.f[0]++;var l=($p.s[0]++,xn.delayedWidgets[n]);$p.s[1]++,l?($p.b[0][0]++,$p.s[2]++,clearTimeout(l),$p.s[3]++,delete xn.delayedWidgets[n]):$p.b[0][1]++}var nf,lf,ef,of,tf,cf,af=(nf="/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js",lf="e17bfcf474537e9afaaf65b043e905dc76efd98c",ef=new function(){}.constructor("return this")(),tf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/clear-all.js",statementMap:{0:{start:{line:29,column:15},end:{line:29,column:42}},1:{start:{line:30,column:16},end:{line:30,column:44}},2:{start:{line:32,column:2},end:{line:43,column:5}},3:{start:{line:33,column:18},end:{line:33,column:52}},4:{start:{line:34,column:4},end:{line:34,column:35}},5:{start:{line:35,column:4},end:{line:35,column:44}},6:{start:{line:37,column:4},end:{line:42,column:5}},7:{start:{line:38,column:6},end:{line:41,column:7}},8:{start:{line:39,column:18},end:{line:39,column:39}},9:{start:{line:40,column:8},end:{line:40,column:57}},10:{start:{line:45,column:2},end:{line:49,column:3}},11:{start:{line:46,column:4},end:{line:48,column:5}},12:{start:{line:47,column:6},end:{line:47,column:31}},13:{start:{line:51,column:2},end:{line:51,column:23}},14:{start:{line:53,column:2},end:{line:53,column:36}},15:{start:{line:54,column:2},end:{line:54,column:38}},16:{start:{line:55,column:2},end:{line:55,column:34}},17:{start:{line:56,column:2},end:{line:56,column:22}},18:{start:{line:57,column:2},end:{line:57,column:19}}},fnMap:{0:{name:"clearAll",decl:{start:{line:28,column:24},end:{line:28,column:32}},loc:{start:{line:28,column:36},end:{line:58,column:1}},line:28},1:{name:"(anonymous_1)",decl:{start:{line:32,column:17},end:{line:32,column:18}},loc:{start:{line:32,column:35},end:{line:43,column:3}},line:32}},branchMap:{0:{loc:{start:{line:38,column:6},end:{line:41,column:7}},type:"if",locations:[{start:{line:38,column:6},end:{line:41,column:7}},{start:{line:38,column:6},end:{line:41,column:7}}],line:38},1:{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:46,column:4},end:{line:48,column:5}}],line:46}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(cf=ef[of="__coverage__"]||(ef[of]={}))[nf]&&cf[nf].hash===lf?cf[nf]:(tf.hash=lf,cf[nf]=tf));function sf(){af.f[0]++;var n=(af.s[0]++,xn.openedWidgets),l=(af.s[1]++,xn.delayedWidgets);for(var e in af.s[2]++,n.forEach(function(n){af.f[1]++;var l=(af.s[3]++,In.getElementById(n.id));for(var e in af.s[4]++,Yn(l,"opened"),af.s[5]++,l.parentNode.removeChild(l),af.s[6]++,n.listeners)if(af.s[7]++,n.listeners.hasOwnProperty(e)){af.b[0][0]++;var o=(af.s[8]++,n.listeners[e]);af.s[9]++,o.target.removeEventListener(o.type,o.fn)}else af.b[0][1]++}),af.s[10]++,l)af.s[11]++,l.hasOwnProperty(e)?(af.b[1][0]++,af.s[12]++,Xp(e)):af.b[1][1]++;af.s[13]++,zd.removeAll(),af.s[14]++,b(xn),af.s[15]++,S(kn),af.s[16]++,a(Un),af.s[17]++,this.callbacks=[],af.s[18]++,this.acctid=""}var uf,mf,rf,df,pf,ff,bf=(uf="/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js",mf="48c5710abf86ff4e1ae6fd9d3ac23051616bea22",rf=new function(){}.constructor("return this")(),pf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/prepare-widget.js",statementMap:{0:{start:{line:12,column:15},end:{line:15,column:3}},1:{start:{line:17,column:2},end:{line:19,column:3}},2:{start:{line:18,column:4},end:{line:18,column:48}},3:{start:{line:21,column:2},end:{line:21,column:25}},4:{start:{line:23,column:2},end:{line:25,column:3}},5:{start:{line:24,column:4},end:{line:24,column:57}},6:{start:{line:27,column:2},end:{line:27,column:24}},7:{start:{line:29,column:2},end:{line:29,column:16}}},fnMap:{0:{name:"prepareWidget",decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:53},end:{line:30,column:1}},line:11}},branchMap:{0:{loc:{start:{line:17,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:19,column:3}},{start:{line:17,column:2},end:{line:19,column:3}}],line:17},1:{loc:{start:{line:23,column:2},end:{line:25,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:25,column:3}},{start:{line:23,column:2},end:{line:25,column:3}}],line:23}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(ff=rf[df="__coverage__"]||(rf[df]={}))[uf]&&ff[uf].hash===mf?ff[uf]:(pf.hash=mf,ff[uf]=pf));function hf(n,l){bf.f[0]++;var e=(bf.s[0]++,{valid:!0,type:n});if(bf.s[1]++,!l)throw bf.b[0][0]++,bf.s[2]++,new Error("Config object is missing");if(bf.b[0][1]++,bf.s[3]++,e.config=l,bf.s[4]++,!l.id)throw bf.b[1][0]++,bf.s[5]++,new Error("All widgets must have an id value");return bf.b[1][1]++,bf.s[6]++,e.id=l.id,bf.s[7]++,e}var vf,yf,gf,wf,Mf,_f,Sf=(vf="/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js",yf="17286eda18a7fed0aae092fcdb48d9b871d15489",gf=new function(){}.constructor("return this")(),Mf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/message.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:42}}},fnMap:{0:{name:"Message",decl:{start:{line:12,column:24},end:{line:12,column:31}},loc:{start:{line:12,column:41},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(_f=gf[wf="__coverage__"]||(gf[wf]={}))[vf]&&_f[vf].hash===yf?_f[vf]:(Mf.hash=yf,_f[vf]=Mf));function jf(n){return Sf.f[0]++,Sf.s[0]++,hf("message",n)}var Cf,Af,xf,Uf,kf,Ef,Tf=(Cf="/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js",Af="b41fd2aeb030616aa757759e1099548ecc181c42",xf=new function(){}.constructor("return this")(),kf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/subscription.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:47}}},fnMap:{0:{name:"Subscription",decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:46},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Ef=xf[Uf="__coverage__"]||(xf[Uf]={}))[Cf]&&Ef[Cf].hash===Af?Ef[Cf]:(kf.hash=Af,Ef[Cf]=kf));function If(n){return Tf.f[0]++,Tf.s[0]++,hf("subscription",n)}var Nf,Bf,Lf,Pf,Gf,Of,Rf=(Nf="/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js",Bf="3946ed6eee471c67ceeb4d80cd237301ac78a166",Lf=new function(){}.constructor("return this")(),Gf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/form.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:39}}},fnMap:{0:{name:"Form",decl:{start:{line:12,column:24},end:{line:12,column:28}},loc:{start:{line:12,column:38},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Of=Lf[Pf="__coverage__"]||(Lf[Pf]={}))[Nf]&&Of[Nf].hash===Bf?Of[Nf]:(Gf.hash=Bf,Of[Nf]=Gf));function Wf(n){return Rf.f[0]++,Rf.s[0]++,hf("form",n)}var Df,qf,Hf,zf,Kf,Ff,Vf=(Df="/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js",qf="a047ceb3e49fd09bf733bd36dfe4818303ea8c72",Hf=new function(){}.constructor("return this")(),Kf={path:"/Users/ash/lytics/pathforajs/src/rollup/widgets/site-gate.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:43}}},fnMap:{0:{name:"SiteGate",decl:{start:{line:12,column:24},end:{line:12,column:32}},loc:{start:{line:12,column:42},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Ff=Hf[zf="__coverage__"]||(Hf[zf]={}))[Df]&&Ff[Df].hash===qf?Ff[Df]:(Kf.hash=qf,Ff[Df]=Kf));function Zf(n){return Vf.f[0]++,Vf.s[0]++,hf("sitegate",n)}var Jf,Yf,Qf,$f,Xf,nb,lb=(Jf="/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js",Yf="190c01a65f580c8a956f27f46920dbfab69502ae",Qf=new function(){}.constructor("return this")(),Xf={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/init-ab-test.js",statementMap:{0:{start:{line:17,column:2},end:{line:60,column:5}},1:{start:{line:18,column:24},end:{line:18,column:35}},2:{start:{line:19,column:29},end:{line:19,column:50}},3:{start:{line:20,column:29},end:{line:20,column:30}},4:{start:{line:21,column:15},end:{line:21,column:25}},5:{start:{line:23,column:4},end:{line:25,column:5}},6:{start:{line:24,column:6},end:{line:24,column:41}},7:{start:{line:28,column:4},end:{line:28,column:39}},8:{start:{line:29,column:4},end:{line:29,column:53}},9:{start:{line:32,column:12},end:{line:32,column:13}},10:{start:{line:33,column:4},end:{line:41,column:5}},11:{start:{line:34,column:6},end:{line:34,column:52}},12:{start:{line:36,column:6},end:{line:38,column:7}},13:{start:{line:37,column:8},end:{line:37,column:14}},14:{start:{line:40,column:6},end:{line:40,column:27}},15:{start:{line:44,column:4},end:{line:53,column:7}},16:{start:{line:45,column:6},end:{line:52,column:9}},17:{start:{line:46,column:8},end:{line:51,column:9}},18:{start:{line:47,column:10},end:{line:47,column:40}},19:{start:{line:48,column:10},end:{line:48,column:65}},20:{start:{line:50,column:10},end:{line:50,column:99}},21:{start:{line:55,column:4},end:{line:57,column:5}},22:{start:{line:56,column:6},end:{line:56,column:85}},23:{start:{line:59,column:4},end:{line:59,column:71}}},fnMap:{0:{name:"initializeABTesting",decl:{start:{line:16,column:24},end:{line:16,column:43}},loc:{start:{line:16,column:54},end:{line:61,column:1}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:36},end:{line:60,column:3}},line:17},2:{name:"(anonymous_2)",decl:{start:{line:44,column:26},end:{line:44,column:27}},loc:{start:{line:44,column:50},end:{line:53,column:5}},line:44},3:{name:"(anonymous_3)",decl:{start:{line:45,column:20},end:{line:45,column:21}},loc:{start:{line:45,column:38},end:{line:52,column:7}},line:45}},branchMap:{0:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:23,column:4},end:{line:25,column:5}}],line:23},1:{loc:{start:{line:36,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:36,column:6},end:{line:38,column:7}},{start:{line:36,column:6},end:{line:38,column:7}}],line:36},2:{loc:{start:{line:46,column:8},end:{line:51,column:9}},type:"if",locations:[{start:{line:46,column:8},end:{line:51,column:9}},{start:{line:46,column:8},end:{line:51,column:9}}],line:46},3:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:55,column:4},end:{line:57,column:5}}],line:55}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(nb=Qf[$f="__coverage__"]||(Qf[$f]={}))[Jf]&&nb[Jf].hash===Yf?nb[Jf]:(Xf.hash=Yf,nb[Jf]=Xf));function eb(n){lb.f[0]++,lb.s[0]++,n.forEach(function(n){lb.f[1]++;var l=(lb.s[1]++,n.type),e=(lb.s[2]++,Be(n.cookieId)),o=(lb.s[3]++,0),t=(lb.s[4]++,new Date);lb.s[5]++,e?lb.b[0][1]++:(lb.b[0][0]++,lb.s[6]++,e=Math.random()),lb.s[7]++,t.setDate(t.getDate()+365),lb.s[8]++,re(n.cookieId,e,t);var i=(lb.s[9]++,0);for(lb.s[10]++;i<1;){if(lb.s[11]++,i+=l.groups[o],lb.s[12]++,e<=i){lb.b[1][0]++,lb.s[13]++;break}lb.b[1][1]++,lb.s[14]++,o++}if(lb.s[15]++,n.groups.forEach(function(n,l){lb.f[2]++,lb.s[16]++,n.forEach(function(n){if(lb.f[3]++,lb.s[17]++,void 0!==n.abTestingGroup)throw lb.b[2][1]++,lb.s[20]++,new Error("Widget #"+n.config.id+" is defined in more than one AB test.");lb.b[2][0]++,lb.s[18]++,n.abTestingGroup=l,lb.s[19]++,n.hiddenViaABTests=o===l})}),lb.s[21]++,void 0!==kn.abTestingGroups[n.id])throw lb.b[3][0]++,lb.s[22]++,new Error("AB test with ID="+n.id+" has been already defined.");lb.b[3][1]++,lb.s[23]++,kn.abTestingGroups[n.id]=o})}var ob,tb,ib,cb,ab,sb,ub=(ob="/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js",tb="430f6fb5ce0125dd936fd211dbd9fa99079cde99",ib=new function(){}.constructor("return this")(),ab={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/prepare-ab-test.js",statementMap:{0:{start:{line:12,column:13},end:{line:12,column:15}},1:{start:{line:14,column:2},end:{line:16,column:3}},2:{start:{line:15,column:4},end:{line:15,column:48}},3:{start:{line:18,column:2},end:{line:18,column:22}},4:{start:{line:19,column:2},end:{line:19,column:45}},5:{start:{line:20,column:2},end:{line:20,column:30}},6:{start:{line:22,column:2},end:{line:24,column:3}},7:{start:{line:23,column:4},end:{line:23,column:63}},8:{start:{line:26,column:2},end:{line:26,column:42}},9:{start:{line:28,column:2},end:{line:28,column:14}}},fnMap:{0:{name:"prepareABTest",decl:{start:{line:11,column:24},end:{line:11,column:37}},loc:{start:{line:11,column:47},end:{line:29,column:1}},line:11}},branchMap:{0:{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:14,column:2},end:{line:16,column:3}}],line:14},1:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:22,column:2},end:{line:24,column:3}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(sb=ib[cb="__coverage__"]||(ib[cb]={}))[ob]&&sb[ob].hash===tb?sb[ob]:(ab.hash=tb,sb[ob]=ab));var mb,rb,db,pb,fb,bb,hb=(mb="/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js",rb="d992100179a90704e13da4757353d3c010c6896e",db=new function(){}.constructor("return this")(),fb={path:"/Users/ash/lytics/pathforajs/src/rollup/ab-test/ab-test.js",statementMap:{0:{start:{line:13,column:2},end:{line:13,column:31}}},fnMap:{0:{name:"ABTest",decl:{start:{line:12,column:24},end:{line:12,column:30}},loc:{start:{line:12,column:40},end:{line:14,column:1}},line:12}},branchMap:{},s:{0:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(bb=db[pb="__coverage__"]||(db[pb]={}))[mb]&&bb[mb].hash===rb?bb[mb]:(fb.hash=rb,bb[mb]=fb));function vb(n){return hb.f[0]++,hb.s[0]++,function(n){ub.f[0]++;var l=(ub.s[0]++,{});if(ub.s[1]++,!n)throw ub.b[0][0]++,ub.s[2]++,new Error("Config object is missing");if(ub.b[0][1]++,ub.s[3]++,l.id=n.id,ub.s[4]++,l.cookieId=fn+n.id,ub.s[5]++,l.groups=n.groups,ub.s[6]++,!En[n.type])throw ub.b[1][0]++,ub.s[7]++,new Error("Unknown AB testing type: "+n.type);return ub.b[1][1]++,ub.s[8]++,l.type=En[n.type],ub.s[9]++,l}(n)}var yb,gb,wb,Mb,_b,Sb,jb=(yb="/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js",gb="4d8bf52c5f0a024149dd445984151f1f02a92edf",wb=new function(){}.constructor("return this")(),_b={path:"/Users/ash/lytics/pathforajs/src/rollup/inline/prep-elements.js",statementMap:{0:{start:{line:13,column:21},end:{line:13,column:23}},1:{start:{line:14,column:17},end:{line:14,column:60}},2:{start:{line:16,column:2},end:{line:16,column:49}},3:{start:{line:18,column:2},end:{line:87,column:3}},4:{start:{line:19,column:4},end:{line:86,column:5}},5:{start:{line:20,column:23},end:{line:20,column:34}},6:{start:{line:22,column:6},end:{line:85,column:7}},7:{start:{line:25,column:20},end:{line:25,column:59}},8:{start:{line:27,column:8},end:{line:29,column:9}},9:{start:{line:28,column:10},end:{line:28,column:28}},10:{start:{line:31,column:8},end:{line:33,column:9}},11:{start:{line:32,column:10},end:{line:32,column:35}},12:{start:{line:35,column:8},end:{line:40,column:11}},13:{start:{line:41,column:8},end:{line:41,column:14}},14:{start:{line:45,column:24},end:{line:45,column:67}},15:{start:{line:46,column:20},end:{line:46,column:59}},16:{start:{line:47,column:22},end:{line:47,column:27}},17:{start:{line:49,column:8},end:{line:51,column:9}},18:{start:{line:50,column:10},end:{line:50,column:28}},19:{start:{line:53,column:8},end:{line:55,column:9}},20:{start:{line:54,column:10},end:{line:54,column:32}},21:{start:{line:57,column:8},end:{line:61,column:9}},22:{start:{line:58,column:10},end:{line:60,column:12}},23:{start:{line:63,column:8},end:{line:65,column:9}},24:{start:{line:64,column:10},end:{line:64,column:73}},25:{start:{line:67,column:8},end:{line:69,column:9}},26:{start:{line:68,column:10},end:{line:68,column:52}},27:{start:{line:71,column:8},end:{line:83,column:11}},28:{start:{line:84,column:8},end:{line:84,column:14}},29:{start:{line:88,column:2},end:{line:88,column:22}}},fnMap:{0:{name:"prepElements",decl:{start:{line:12,column:24},end:{line:12,column:36}},loc:{start:{line:12,column:44},end:{line:89,column:1}},line:12}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:86,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:86,column:5}},{start:{line:19,column:4},end:{line:86,column:5}}],line:19},1:{loc:{start:{line:22,column:6},end:{line:85,column:7}},type:"switch",locations:[{start:{line:24,column:6},end:{line:41,column:14}},{start:{line:44,column:6},end:{line:84,column:14}}],line:22},2:{loc:{start:{line:27,column:8},end:{line:29,column:9}},type:"if",locations:[{start:{line:27,column:8},end:{line:29,column:9}},{start:{line:27,column:8},end:{line:29,column:9}}],line:27},3:{loc:{start:{line:31,column:8},end:{line:33,column:9}},type:"if",locations:[{start:{line:31,column:8},end:{line:33,column:9}},{start:{line:31,column:8},end:{line:33,column:9}}],line:31},4:{loc:{start:{line:49,column:8},end:{line:51,column:9}},type:"if",locations:[{start:{line:49,column:8},end:{line:51,column:9}},{start:{line:49,column:8},end:{line:51,column:9}}],line:49},5:{loc:{start:{line:53,column:8},end:{line:55,column:9}},type:"if",locations:[{start:{line:53,column:8},end:{line:55,column:9}},{start:{line:53,column:8},end:{line:55,column:9}}],line:53},6:{loc:{start:{line:57,column:8},end:{line:61,column:9}},type:"if",locations:[{start:{line:57,column:8},end:{line:61,column:9}},{start:{line:57,column:8},end:{line:61,column:9}}],line:57},7:{loc:{start:{line:63,column:8},end:{line:65,column:9}},type:"if",locations:[{start:{line:63,column:8},end:{line:65,column:9}},{start:{line:63,column:8},end:{line:65,column:9}}],line:63},8:{loc:{start:{line:67,column:8},end:{line:69,column:9}},type:"if",locations:[{start:{line:67,column:8},end:{line:69,column:9}},{start:{line:67,column:8},end:{line:69,column:9}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(Sb=wb[Mb="__coverage__"]||(wb[Mb]={}))[yb]&&Sb[yb].hash===gb?Sb[yb]:(_b.hash=gb,Sb[yb]=_b));function Cb(n){jb.f[0]++;var l=(jb.s[0]++,{}),e=(jb.s[1]++,In.querySelectorAll("["+n+"]"));jb.s[2]++,this.elements=this.elements.concat(e),jb.s[3]++;for(var o=0;o

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),r.appendChild(a)),!0===o.required&&(K(r,"pf-form-required"),e.setAttribute("data-required","true"),o.label&&((l=q.createElement("div")).className="pf-required-flag",l.innerHTML="required",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),"date"!==o.type&&"email"!==o.type||(K(r,"pf-form-required"),e.setAttribute("data-validate","true"),o.label&&((l=q.createElement("div")).className="pf-invalid-flag",l.innerHTML="invalid",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i Date: Tue, 6 Aug 2024 11:04:57 -0700 Subject: [PATCH 3/3] bug: legacy form validate --- dist/pathfora.css | 14 ++++++++++---- dist/pathfora.js | 18 ++++++++++-------- dist/pathfora.min.css | 2 +- dist/pathfora.min.js | 2 +- src/less/widgets/widgets-general.less | 7 ++++--- .../actions/construct-widget-actions.js | 8 ++++---- src/rollup/widgets/construct-widget-layout.js | 10 ++++++---- test/acceptance/widget.spec.js | 8 +++++--- 8 files changed, 41 insertions(+), 28 deletions(-) diff --git a/dist/pathfora.css b/dist/pathfora.css index 1e79438..680f866 100644 --- a/dist/pathfora.css +++ b/dist/pathfora.css @@ -128,7 +128,9 @@ margin-bottom: 10px; } .pf-widget form:not(.pf-custom-form) [data-required='true'].invalid, -.pf-widget form:not(.pf-custom-form) [data-validate='true'].invalid { +.pf-widget form:not(.pf-custom-form) [data-validate='true'].invalid, +.pf-widget form:not(.pf-custom-form) [data-required='true'].bad-validation, +.pf-widget form:not(.pf-custom-form) [data-validate='true'].bad-validation { border: 1px solid #f12626; } .pf-widget input[type='text'], @@ -393,8 +395,12 @@ } .pf-form div.pf-form-required.invalid [data-required='true']:not(.pf-has-label), .pf-sitegate div.pf-form-required.invalid [data-required='true']:not(.pf-has-label), +.pf-form div.pf-form-required.bad-validation [data-required='true']:not(.pf-has-label), +.pf-sitegate div.pf-form-required.bad-validation [data-required='true']:not(.pf-has-label), .pf-form div.pf-form-required.invalid [data-validate='true']:not(.pf-has-label), -.pf-sitegate div.pf-form-required.invalid [data-validate='true']:not(.pf-has-label) { +.pf-sitegate div.pf-form-required.invalid [data-validate='true']:not(.pf-has-label), +.pf-form div.pf-form-required.bad-validation [data-validate='true']:not(.pf-has-label), +.pf-sitegate div.pf-form-required.bad-validation [data-validate='true']:not(.pf-has-label) { border: 1px solid #f12626; margin: -1px; } @@ -406,8 +412,8 @@ } .pf-form div.pf-form-required.invalid div.pf-required-flag, .pf-sitegate div.pf-form-required.invalid div.pf-required-flag, -.pf-form div.pf-form-required.invalid--validate div.pf-invalid-flag, -.pf-sitegate div.pf-form-required.invalid--validate div.pf-invalid-flag { +.pf-form div.pf-form-required.bad-validation div.pf-invalid-flag, +.pf-sitegate div.pf-form-required.bad-validation div.pf-invalid-flag { opacity: 1; margin-left: 10px; } diff --git a/dist/pathfora.js b/dist/pathfora.js index 88dd9c0..24856c7 100644 --- a/dist/pathfora.js +++ b/dist/pathfora.js @@ -1896,7 +1896,7 @@ if (hasClass(widgetForm, 'pf-custom-form')) { if (field.parentNode) { parent = field.parentNode; - removeClass(parent, 'invalid--validate'); + removeClass(parent, 'bad-validation'); if ( (field.value !== '' && @@ -1910,7 +1910,7 @@ )) ) { valid = false; - addClass(parent, 'invalid--validate'); + addClass(parent, 'bad-validation'); if (field && i === 0) { field.focus(); } @@ -1918,7 +1918,7 @@ } // legacy support old, non-custom forms } else if (field.hasAttribute('data-validate')) { - removeClass(field, 'invalid'); + removeClass(field, 'bad-validation'); if ( field.getAttribute('type') === 'email' && @@ -1926,7 +1926,7 @@ field.value !== '' ) { valid = false; - addClass(field, 'invalid'); + addClass(field, 'bad-validation'); if (field && i === 0) { field.focus(); } @@ -2814,14 +2814,16 @@ } }); + // Set validation for email field + var emailField = getFormElement('email'); + if (emailField && emailField.type === 'email') { + emailField.setAttribute('data-validate', 'true'); + } + // Hide fields Object.keys(config.fields).forEach(function (field) { var element = getFormElement(field); - if (field === 'email' && config.fields[field] && element) { - element.setAttribute('data-validate', 'true'); - } - if (element && !config.fields[field] && element.parentNode) { element.parentNode.removeChild(element); } diff --git a/dist/pathfora.min.css b/dist/pathfora.min.css index e75ef9f..80bcbb8 100644 --- a/dist/pathfora.min.css +++ b/dist/pathfora.min.css @@ -1 +1 @@ -.pf-widget,.pf-widget *{box-sizing:border-box;-webkit-sizing:border-box}.pf-widget,.pf-widget .pf-widget-body{color:#888}.pf-widget .pf-widget-btn,.pf-widget .pf-widget-close,.pf-widget a{text-decoration:none;cursor:pointer}.pf-hidden,.pf-widget .pf-content-unit,.pf-widget .pf-widget-img{display:none}.pf-widget.error,.pf-widget.success{transition:opacity .3s}.pf-box-shadow{box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget{z-index:9999;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;visibility:hidden;opacity:0;text-align:left;-moz-box-sizing:border-box;background-color:#f1f1f1;font-size:15px}.pf-widget .pf-widget-footer{font-size:12px;margin-top:10px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget.pf-mobile-hide{display:none}}.pf-widget *{-moz-box-sizing:border-box;text-shadow:none}.pf-widget a,.pf-widget h2,.pf-widget input,.pf-widget p,.pf-widget select,.pf-widget textarea{margin:0;padding:0;border:0;background:0 0}.pf-widget .pf-widget-headline{margin:0 0 10px;color:#444;font-weight:500}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select,.pf-widget textarea{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:3px;font-size:14px;width:100%;padding:10px 15px;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.2);position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-sizing:border-box}.pf-widget input[type=text]::-webkit-input-placeholder,.pf-widget input[type=email]::-webkit-input-placeholder,.pf-widget input[type=date]::-webkit-input-placeholder,.pf-widget select::-webkit-input-placeholder,.pf-widget textarea::-webkit-input-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-moz-placeholder,.pf-widget input[type=email]:-moz-placeholder,.pf-widget input[type=date]:-moz-placeholder,.pf-widget select:-moz-placeholder,.pf-widget textarea:-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]::-moz-placeholder,.pf-widget input[type=email]::-moz-placeholder,.pf-widget input[type=date]::-moz-placeholder,.pf-widget select::-moz-placeholder,.pf-widget textarea::-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-ms-input-placeholder,.pf-widget input[type=email]:-ms-input-placeholder,.pf-widget input[type=date]:-ms-input-placeholder,.pf-widget select:-ms-input-placeholder,.pf-widget textarea:-ms-input-placeholder{color:#a9a9a9}.pf-widget select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pf-widget select::-ms-expand{display:none}.pf-widget select.default{color:#a9a9a9}.pf-widget form:not(.pf-custom-form) input[type=text],.pf-widget form:not(.pf-custom-form) input[type=email],.pf-widget form:not(.pf-custom-form) select,.pf-widget form:not(.pf-custom-form) textarea{margin-bottom:10px}.pf-widget form:not(.pf-custom-form) [data-required=true].invalid,.pf-widget form:not(.pf-custom-form) [data-validate=true].invalid{border:1px solid #f12626}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select{clear:both}.pf-widget textarea{resize:none}.pf-widget .pf-widget-img{border-radius:50%}.pf-widget .pf-widget-message{line-height:1.5;font-size:15px}.pf-widget .pf-widget-btn{display:inline-block;padding:0 26px;line-height:35px;font-size:14px;border-radius:5px;border:0;margin-bottom:2px}.pf-widget .error-state,.pf-widget .success-state,.pf-widget.success .pf-widget-headline,.pf-widget.success .pf-widget-message,.pf-widget.success form{display:none}.pf-widget .pf-widget-btn.pf-widget-ok{box-shadow:0 1px 1px rgba(0,0,0,.2);color:#444;background-color:#fff}.pf-widget .pf-widget-btn.pf-widget-cancel{color:#bbb;background-color:#f1f1f1}.pf-widget .pf-widget-btn+.pf-widget-btn{margin-left:5px;margin-right:5px}.pf-widget .pf-widget-close{font-size:24px;position:absolute;top:4px;line-height:1;right:0;margin-right:12px;color:#bbb;padding:0;background-color:transparent;border:0}.pf-widget.opened{visibility:visible;opacity:1}.pf-widget .branding{position:relative}.pf-widget .branding svg{position:absolute;bottom:-25px;right:-25px;fill:#888;opacity:.25;width:120px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget .branding svg{right:-8px}}.pf-widget.success .success-state,.pf-widget.success .success-state .pf-widget-headline,.pf-widget.success .success-state .pf-widget-message,.pf-widget.success .success-state form{display:block}.pf-widget.error .pf-widget-headline,.pf-widget.error .pf-widget-message,.pf-widget.error form{display:none}.pf-widget-variant-2 .pf-widget-img,.pf-widget.error .error-state,.pf-widget.error .error-state .pf-widget-headline,.pf-widget.error .error-state .pf-widget-message,.pf-widget.error .error-state form{display:block}.pf-widget-variant-3 .pf-content-unit{display:block;text-align:left;margin-bottom:20px;position:relative;background-color:#fff}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta{padding:10px 15px}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta span.pf-content-unit-info{font-size:12px;display:block;margin-bottom:5px;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta h4{font-weight:500;margin:0 0 5px;line-height:1.4;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta p{line-height:1.3;color:#888}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-img{background-size:cover;background-position:center center;background-repeat:no-repeat}.pf-widget-variant-3 .pf-content-unit:not(.stack){width:95%;margin:0 auto 30px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img{position:absolute;display:block;height:100%;width:40%}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img+.pf-content-unit-meta{width:60%;min-height:135px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta{padding:15px;display:block;margin:0 0 0 auto}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta span.pf-content-unit-info{font-size:13px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta h4{font-size:18px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta h4,.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta p{font-size:14px}.pf-widget-variant-3 .pf-content-unit.stack{width:100%;display:block;text-align:left}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta p{font-size:13px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-img{width:100%;height:135px}.pf-subscription form{width:100%;display:block;margin:0 auto}.pf-subscription form input[type=text],.pf-subscription form input[type=email]{width:100%;margin-bottom:1px}.pf-subscription form .pf-widget-btn{float:right;margin-left:5px;padding:0 16px}.pf-subscription form span{display:block;padding:2px;overflow:hidden}.pf-widget-modal .pf-widget-content,.pf-widget-slideout{max-height:100%;overflow-y:auto;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-form input.pf-field-half-width,.pf-form select.pf-field-half-width,.pf-sitegate input.pf-field-half-width,.pf-sitegate select.pf-field-half-width{width:49%;display:block;clear:none;float:left}.pf-form input.pf-field-half-width.right,.pf-form select.pf-field-half-width.right,.pf-sitegate input.pf-field-half-width.right,.pf-sitegate select.pf-field-half-width.right{float:right}.pf-form .pf-widget-btn,.pf-sitegate .pf-widget-btn{clear:both;margin-top:5px}.pf-form form.pf-custom-form>div,.pf-sitegate form.pf-custom-form>div{text-align:left;margin-bottom:10px}.pf-form .pf-form-label,.pf-sitegate .pf-form-label{font-weight:700}.pf-form .pf-widget-checkbox,.pf-form .pf-widget-radio,.pf-sitegate .pf-widget-checkbox,.pf-sitegate .pf-widget-radio{display:block;padding:4px}.pf-form .pf-widget-checkbox input,.pf-form .pf-widget-radio input,.pf-sitegate .pf-widget-checkbox input,.pf-sitegate .pf-widget-radio input{margin-right:10px}.pf-form .pf-has-label,.pf-sitegate .pf-has-label{margin-top:7px}.pf-form div.pf-form-required,.pf-sitegate div.pf-form-required{position:relative}.pf-form div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-form div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label){border:1px solid #f12626;margin:-1px}.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-form div.pf-form-required.pf-widget-radio-group,.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-sitegate div.pf-form-required.pf-widget-radio-group{border-radius:3px}.pf-form div.pf-form-required.invalid div.pf-required-flag,.pf-form div.pf-form-required.invalid--validate div.pf-invalid-flag,.pf-sitegate div.pf-form-required.invalid div.pf-required-flag,.pf-sitegate div.pf-form-required.invalid--validate div.pf-invalid-flag{opacity:1;margin-left:10px}.pf-form div.pf-form-required div.pf-invalid-flag,.pf-form div.pf-form-required div.pf-required-flag,.pf-sitegate div.pf-form-required div.pf-invalid-flag,.pf-sitegate div.pf-form-required div.pf-required-flag{font-size:12px;font-weight:700;position:absolute;padding:3px 7px;display:inline;width:auto;color:#fff;background-color:#f12626;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);margin-left:5px;opacity:0}.pf-form div.pf-form-required div.pf-invalid-flag span,.pf-form div.pf-form-required div.pf-required-flag span,.pf-sitegate div.pf-form-required div.pf-invalid-flag span,.pf-sitegate div.pf-form-required div.pf-required-flag span{position:absolute;width:0;height:0;top:6px;left:-6px;border-top:4px solid transparent;border-bottom:4px solid transparent;content:'';border-right:6px solid #f12626}.pf-form div.pf-form-required span.required,.pf-sitegate div.pf-form-required span.required{color:#f12626}.pf-form.pf-widget-slideout input.pf-field-half-width,.pf-form.pf-widget-slideout select.pf-field-half-width,.pf-sitegate.pf-widget-slideout input.pf-field-half-width,.pf-sitegate.pf-widget-slideout select.pf-field-half-width{width:48%}.pf-widget-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:9999;text-align:center}.pf-widget-modal .pf-va-middle{display:table-cell;vertical-align:middle}.pf-widget-modal .pf-widget-btn{font-size:16px;line-height:45px}.pf-widget-modal .pf-widget-footer{text-align:center}.pf-widget-slideout .pf-widget-footer,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-headline,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-message{text-align:left}.pf-widget-modal .pf-widget-container{display:table;width:100%;height:100%;position:relative;top:-100vh}.pf-widget-modal .pf-widget-content{background-color:#f1f1f1;color:#888;width:100%;position:fixed;max-width:780px;margin:0 auto;padding:40px;border-radius:5px;overflow-x:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.pf-widget-modal .pf-widget-headline{font-size:28px}.pf-widget-modal .pf-widget-message{font-size:18px;margin:0 0 30px}.pf-widget-modal .pf-widget-body{display:table;width:100%}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select,.pf-widget-modal form textarea{font-size:16px}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select{height:45px}.pf-widget-modal.opened .pf-widget-container{top:0}.pf-widget-modal.pf-widget-variant-2 .pf-widget-headline{margin-top:140px}.pf-widget-modal.pf-widget-variant-2 .pf-widget-img{float:none;position:absolute;top:20px;left:50%;margin-left:-70px;width:140px;height:140px}.pf-widget-modal.pf-subscription .pf-widget-btn{margin-top:2px}.pf-widget-modal.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout{bottom:50px;width:350px;border-radius:4px;top:auto;position:fixed;overflow-x:hidden}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-modal .pf-widget-content{padding:40px 20px}.pf-widget-slideout{width:100%;max-width:350px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{bottom:0}}.pf-widget-slideout .pf-widget-message{margin:0 0 20px}.pf-widget-slideout .pf-widget-btn{line-height:40px}.pf-widget-slideout .pf-widget-content{padding:30px;width:100%}.pf-widget-slideout .pf-widget-headline{font-size:20px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{left:-100%}.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:0}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{bottom:0}}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{left:auto;right:-100%}.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{right:50px}.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-right{bottom:auto;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%)}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{bottom:auto;top:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{left:auto;right:0}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{top:0}}.pf-widget-slideout.pf-origin-bottom{bottom:-100%}.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:50px}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:50px}.pf-widget-slideout.opened.pf-origin-bottom{bottom:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:0}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:0;left:auto}.pf-widget-slideout.opened.pf-origin-bottom{bottom:0}}.pf-widget-slideout .branding svg{bottom:-22px;right:-20px;width:100px}.pf-widget-bar .pf-bar-content,.pf-widget-inline.pf-widget-variant-2 .pf-widget-content,.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content{text-align:center}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-slideout.pf-form{width:370px}.pf-widget-slideout.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-slideout form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px}.pf-push-down.opened{margin-top:59px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-form{width:100%;max-width:370px}.pf-push-down.opened{margin-top:0}}.pf-widget-bar{height:auto;padding:10px 0;min-height:59px;left:0;right:0;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget-bar .pf-widget-body{margin:0 20px;float:left}.pf-widget-bar .pf-widget-close{top:50%;position:absolute;margin-top:-16px;right:20px;line-height:1;margin-right:0}.pf-widget-bar .pf-widget-btn{line-height:35px}.pf-widget-bar .pf-bar-content{padding:0 40px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar .pf-bar-content{padding:0 40px 0 20px}}.pf-widget-bar .pf-bar-content .pf-widget-message{text-overflow:ellipsis;max-width:100%;overflow:hidden;display:inline-block;white-space:normal;margin:6px 16px}.pf-widget-bar .pf-bar-content input[type=email],.pf-widget-bar .pf-bar-content input[type=text]{margin:0 1px;max-width:200px}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email],.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text]{margin-bottom:0}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text].invalid{margin:0}.pf-widget-bar .pf-bar-content>*{display:inline-block;vertical-align:middle}.pf-widget-bar.pf-position-bottom-absolute,.pf-widget-bar.pf-position-top-absolute{position:absolute}.pf-widget-bar.pf-position-top-absolute,.pf-widget-bar.pf-position-top-fixed{top:-50px}.pf-widget-bar.opened.pf-position-top-absolute,.pf-widget-bar.opened.pf-position-top-fixed{top:0}.pf-widget-bar.pf-position-top-absolute .pf-bar-content,.pf-widget-bar.pf-position-top-fixed .pf-bar-content{padding-top:0}.pf-widget-bar.pf-position-bottom-fixed{bottom:-50px}.pf-widget-bar.pf-position-bottom-fixed,.pf-widget-bar.pf-position-top-fixed{position:fixed}.pf-widget-bar.opened.pf-position-bottom-fixed{bottom:0}.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{height:35px;width:35px;top:50%;margin-top:-17.5px;position:absolute}.pf-widget-bar.pf-message .pf-widget-btn,.pf-widget-bar.pf-subscription form .pf-widget-btn{margin-top:2px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{display:none}}.pf-widget-bar.pf-subscription form{width:auto}.pf-widget-bar.pf-subscription form input[type=email]{height:35px}.pf-widget-button{position:fixed;box-shadow:1px 0 4px 0 rgba(0,0,0,.5);border-radius:2px}.pf-widget-button .pf-widget-message{border:0;background-color:transparent;line-height:42px;padding:0 16px 5px;margin:0;font-weight:700;display:block;cursor:pointer;overflow:hidden;max-width:150px;white-space:nowrap;text-overflow:ellipsis;color:#888}.pf-widget-button.pf-position-left{transform-origin:left bottom;transform:rotate(90deg);left:-50px}.pf-widget-button.pf-position-right{box-shadow:-1px 0 4px 0 rgba(0,0,0,.5);transform-origin:right bottom;transform:rotate(-90deg);right:-50px}.pf-widget-button.pf-position-left,.pf-widget-button.pf-position-right{top:10%}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-top-left{left:42px}.pf-widget-button.pf-position-bottom-right,.pf-widget-button.pf-position-top-right{right:42px}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-bottom-right{bottom:-50px}.pf-widget-button.pf-position-top-left,.pf-widget-button.pf-position-top-right{top:-50px}.pf-widget-button.pf-position-top-left .pf-widget-message,.pf-widget-button.pf-position-top-right .pf-widget-message{padding:5px 16px 0}.pf-widget-button.opened.pf-position-left{left:-6px}.pf-widget-button.opened.pf-position-left:hover{left:-1px}.pf-widget-button.opened.pf-position-right{right:-6px}.pf-widget-button.opened.pf-position-right:hover{right:-1px}.pf-widget-button.opened.pf-position-bottom-left,.pf-widget-button.opened.pf-position-bottom-right{bottom:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-bottom-left:hover,.pf-widget-button.opened.pf-position-bottom-right:hover{bottom:-1px}.pf-widget-button.opened.pf-position-top-left,.pf-widget-button.opened.pf-position-top-right{top:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-top-left:hover,.pf-widget-button.opened.pf-position-top-right:hover{top:-1px}.pf-widget-inline{padding:20px;border-radius:2px;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);transition:all 0s;position:relative}.pf-widget-inline .pf-widget-message{margin:0 0 20px}.pf-widget-inline .pf-widget-btn{transition:all 0s}.pf-widget-inline.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-inline.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-inline.pf-subscription .pf-widget-btn{line-height:39px}.pf-widget-inline.pf-subscription.pf-widget-has-branding span{margin-bottom:35px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit{max-width:650px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit.stack{margin:0 auto;max-width:400px}.pf-widget-inline .branding{position:relative}.pf-widget-inline .branding svg{position:absolute;bottom:-10px;right:-10px}.pf-widget-inline form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-inline form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px} \ No newline at end of file +.pf-widget,.pf-widget *{box-sizing:border-box;-webkit-sizing:border-box}.pf-widget,.pf-widget .pf-widget-body{color:#888}.pf-widget .pf-widget-btn,.pf-widget .pf-widget-close,.pf-widget a{text-decoration:none;cursor:pointer}.pf-hidden,.pf-widget .pf-content-unit,.pf-widget .pf-widget-img{display:none}.pf-widget.error,.pf-widget.success{transition:opacity .3s}.pf-box-shadow{box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget{z-index:9999;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;visibility:hidden;opacity:0;text-align:left;-moz-box-sizing:border-box;background-color:#f1f1f1;font-size:15px}.pf-widget .pf-widget-footer{font-size:12px;margin-top:10px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget.pf-mobile-hide{display:none}}.pf-widget *{-moz-box-sizing:border-box;text-shadow:none}.pf-widget a,.pf-widget h2,.pf-widget input,.pf-widget p,.pf-widget select,.pf-widget textarea{margin:0;padding:0;border:0;background:0 0}.pf-widget .pf-widget-headline{margin:0 0 10px;color:#444;font-weight:500}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select,.pf-widget textarea{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:3px;font-size:14px;width:100%;padding:10px 15px;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.2);position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-sizing:border-box}.pf-widget input[type=text]::-webkit-input-placeholder,.pf-widget input[type=email]::-webkit-input-placeholder,.pf-widget input[type=date]::-webkit-input-placeholder,.pf-widget select::-webkit-input-placeholder,.pf-widget textarea::-webkit-input-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-moz-placeholder,.pf-widget input[type=email]:-moz-placeholder,.pf-widget input[type=date]:-moz-placeholder,.pf-widget select:-moz-placeholder,.pf-widget textarea:-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]::-moz-placeholder,.pf-widget input[type=email]::-moz-placeholder,.pf-widget input[type=date]::-moz-placeholder,.pf-widget select::-moz-placeholder,.pf-widget textarea::-moz-placeholder{color:#a9a9a9}.pf-widget input[type=text]:-ms-input-placeholder,.pf-widget input[type=email]:-ms-input-placeholder,.pf-widget input[type=date]:-ms-input-placeholder,.pf-widget select:-ms-input-placeholder,.pf-widget textarea:-ms-input-placeholder{color:#a9a9a9}.pf-widget select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pf-widget select::-ms-expand{display:none}.pf-widget select.default{color:#a9a9a9}.pf-widget form:not(.pf-custom-form) input[type=text],.pf-widget form:not(.pf-custom-form) input[type=email],.pf-widget form:not(.pf-custom-form) select,.pf-widget form:not(.pf-custom-form) textarea{margin-bottom:10px}.pf-widget form:not(.pf-custom-form) [data-required=true].bad-validation,.pf-widget form:not(.pf-custom-form) [data-required=true].invalid,.pf-widget form:not(.pf-custom-form) [data-validate=true].bad-validation,.pf-widget form:not(.pf-custom-form) [data-validate=true].invalid{border:1px solid #f12626}.pf-widget input[type=text],.pf-widget input[type=email],.pf-widget input[type=date],.pf-widget select{clear:both}.pf-widget textarea{resize:none}.pf-widget .pf-widget-img{border-radius:50%}.pf-widget .pf-widget-message{line-height:1.5;font-size:15px}.pf-widget .pf-widget-btn{display:inline-block;padding:0 26px;line-height:35px;font-size:14px;border-radius:5px;border:0;margin-bottom:2px}.pf-widget .error-state,.pf-widget .success-state,.pf-widget.success .pf-widget-headline,.pf-widget.success .pf-widget-message,.pf-widget.success form{display:none}.pf-widget .pf-widget-btn.pf-widget-ok{box-shadow:0 1px 1px rgba(0,0,0,.2);color:#444;background-color:#fff}.pf-widget .pf-widget-btn.pf-widget-cancel{color:#bbb;background-color:#f1f1f1}.pf-widget .pf-widget-btn+.pf-widget-btn{margin-left:5px;margin-right:5px}.pf-widget .pf-widget-close{font-size:24px;position:absolute;top:4px;line-height:1;right:0;margin-right:12px;color:#bbb;padding:0;background-color:transparent;border:0}.pf-widget.opened{visibility:visible;opacity:1}.pf-widget .branding{position:relative}.pf-widget .branding svg{position:absolute;bottom:-25px;right:-25px;fill:#888;opacity:.25;width:120px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget .branding svg{right:-8px}}.pf-widget.success .success-state,.pf-widget.success .success-state .pf-widget-headline,.pf-widget.success .success-state .pf-widget-message,.pf-widget.success .success-state form{display:block}.pf-widget.error .pf-widget-headline,.pf-widget.error .pf-widget-message,.pf-widget.error form{display:none}.pf-widget-variant-2 .pf-widget-img,.pf-widget.error .error-state,.pf-widget.error .error-state .pf-widget-headline,.pf-widget.error .error-state .pf-widget-message,.pf-widget.error .error-state form{display:block}.pf-widget-variant-3 .pf-content-unit{display:block;text-align:left;margin-bottom:20px;position:relative;background-color:#fff}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta{padding:10px 15px}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta span.pf-content-unit-info{font-size:12px;display:block;margin-bottom:5px;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta h4{font-weight:500;margin:0 0 5px;line-height:1.4;color:#444}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-meta p{line-height:1.3;color:#888}.pf-widget-variant-3 .pf-content-unit .pf-content-unit-img{background-size:cover;background-position:center center;background-repeat:no-repeat}.pf-widget-variant-3 .pf-content-unit:not(.stack){width:95%;margin:0 auto 30px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img{position:absolute;display:block;height:100%;width:40%}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-img+.pf-content-unit-meta{width:60%;min-height:135px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta{padding:15px;display:block;margin:0 0 0 auto}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta span.pf-content-unit-info{font-size:13px}.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta h4{font-size:18px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta h4,.pf-widget-variant-3 .pf-content-unit:not(.stack) .pf-content-unit-meta p{font-size:14px}.pf-widget-variant-3 .pf-content-unit.stack{width:100%;display:block;text-align:left}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-meta p{font-size:13px}.pf-widget-variant-3 .pf-content-unit.stack .pf-content-unit-img{width:100%;height:135px}.pf-subscription form{width:100%;display:block;margin:0 auto}.pf-subscription form input[type=text],.pf-subscription form input[type=email]{width:100%;margin-bottom:1px}.pf-subscription form .pf-widget-btn{float:right;margin-left:5px;padding:0 16px}.pf-subscription form span{display:block;padding:2px;overflow:hidden}.pf-widget-modal .pf-widget-content,.pf-widget-slideout{max-height:100%;overflow-y:auto;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-form input.pf-field-half-width,.pf-form select.pf-field-half-width,.pf-sitegate input.pf-field-half-width,.pf-sitegate select.pf-field-half-width{width:49%;display:block;clear:none;float:left}.pf-form input.pf-field-half-width.right,.pf-form select.pf-field-half-width.right,.pf-sitegate input.pf-field-half-width.right,.pf-sitegate select.pf-field-half-width.right{float:right}.pf-form .pf-widget-btn,.pf-sitegate .pf-widget-btn{clear:both;margin-top:5px}.pf-form form.pf-custom-form>div,.pf-sitegate form.pf-custom-form>div{text-align:left;margin-bottom:10px}.pf-form .pf-form-label,.pf-sitegate .pf-form-label{font-weight:700}.pf-form .pf-widget-checkbox,.pf-form .pf-widget-radio,.pf-sitegate .pf-widget-checkbox,.pf-sitegate .pf-widget-radio{display:block;padding:4px}.pf-form .pf-widget-checkbox input,.pf-form .pf-widget-radio input,.pf-sitegate .pf-widget-checkbox input,.pf-sitegate .pf-widget-radio input{margin-right:10px}.pf-form .pf-has-label,.pf-sitegate .pf-has-label{margin-top:7px}.pf-form div.pf-form-required,.pf-sitegate div.pf-form-required{position:relative}.pf-form div.pf-form-required.bad-validation [data-required=true]:not(.pf-has-label),.pf-form div.pf-form-required.bad-validation [data-validate=true]:not(.pf-has-label),.pf-form div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-form div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.bad-validation [data-required=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.bad-validation [data-validate=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-required=true]:not(.pf-has-label),.pf-sitegate div.pf-form-required.invalid [data-validate=true]:not(.pf-has-label){border:1px solid #f12626;margin:-1px}.pf-form div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-form div.pf-form-required.pf-widget-radio-group,.pf-sitegate div.pf-form-required.pf-widget-checkbox-group [data-required=true],.pf-sitegate div.pf-form-required.pf-widget-radio-group{border-radius:3px}.pf-form div.pf-form-required.bad-validation div.pf-invalid-flag,.pf-form div.pf-form-required.invalid div.pf-required-flag,.pf-sitegate div.pf-form-required.bad-validation div.pf-invalid-flag,.pf-sitegate div.pf-form-required.invalid div.pf-required-flag{opacity:1;margin-left:10px}.pf-form div.pf-form-required div.pf-invalid-flag,.pf-form div.pf-form-required div.pf-required-flag,.pf-sitegate div.pf-form-required div.pf-invalid-flag,.pf-sitegate div.pf-form-required div.pf-required-flag{font-size:12px;font-weight:700;position:absolute;padding:3px 7px;display:inline;width:auto;color:#fff;background-color:#f12626;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);margin-left:5px;opacity:0}.pf-form div.pf-form-required div.pf-invalid-flag span,.pf-form div.pf-form-required div.pf-required-flag span,.pf-sitegate div.pf-form-required div.pf-invalid-flag span,.pf-sitegate div.pf-form-required div.pf-required-flag span{position:absolute;width:0;height:0;top:6px;left:-6px;border-top:4px solid transparent;border-bottom:4px solid transparent;content:'';border-right:6px solid #f12626}.pf-form div.pf-form-required span.required,.pf-sitegate div.pf-form-required span.required{color:#f12626}.pf-form.pf-widget-slideout input.pf-field-half-width,.pf-form.pf-widget-slideout select.pf-field-half-width,.pf-sitegate.pf-widget-slideout input.pf-field-half-width,.pf-sitegate.pf-widget-slideout select.pf-field-half-width{width:48%}.pf-widget-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);z-index:9999;text-align:center}.pf-widget-modal .pf-va-middle{display:table-cell;vertical-align:middle}.pf-widget-modal .pf-widget-btn{font-size:16px;line-height:45px}.pf-widget-modal .pf-widget-footer{text-align:center}.pf-widget-slideout .pf-widget-footer,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-headline,.pf-widget-slideout.pf-widget-variant-1 .pf-widget-content .pf-widget-message{text-align:left}.pf-widget-modal .pf-widget-container{display:table;width:100%;height:100%;position:relative;top:-100vh}.pf-widget-modal .pf-widget-content{background-color:#f1f1f1;color:#888;width:100%;position:fixed;max-width:780px;margin:0 auto;padding:40px;border-radius:5px;overflow-x:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.pf-widget-modal .pf-widget-headline{font-size:28px}.pf-widget-modal .pf-widget-message{font-size:18px;margin:0 0 30px}.pf-widget-modal .pf-widget-body{display:table;width:100%}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select,.pf-widget-modal form textarea{font-size:16px}.pf-widget-modal form input[type=text],.pf-widget-modal form input[type=email],.pf-widget-modal form input[type=date],.pf-widget-modal form select{height:45px}.pf-widget-modal.opened .pf-widget-container{top:0}.pf-widget-modal.pf-widget-variant-2 .pf-widget-headline{margin-top:140px}.pf-widget-modal.pf-widget-variant-2 .pf-widget-img{float:none;position:absolute;top:20px;left:50%;margin-left:-70px;width:140px;height:140px}.pf-widget-modal.pf-subscription .pf-widget-btn{margin-top:2px}.pf-widget-modal.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout{bottom:50px;width:350px;border-radius:4px;top:auto;position:fixed;overflow-x:hidden}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-modal .pf-widget-content{padding:40px 20px}.pf-widget-slideout{width:100%;max-width:350px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{bottom:0}}.pf-widget-slideout .pf-widget-message{margin:0 0 20px}.pf-widget-slideout .pf-widget-btn{line-height:40px}.pf-widget-slideout .pf-widget-content{padding:30px;width:100%}.pf-widget-slideout .pf-widget-headline{font-size:20px}.pf-widget-slideout.pf-position-bottom-left,.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-top-left{left:-100%}.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-left.pf-origin-bottom,.pf-widget-slideout.pf-position-left.pf-origin-bottom,.pf-widget-slideout.pf-position-top-left.pf-origin-bottom{left:0}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{bottom:0}}.pf-widget-slideout.pf-position-bottom-right,.pf-widget-slideout.pf-position-right,.pf-widget-slideout.pf-position-top-right{left:auto;right:-100%}.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{right:50px}.pf-widget-slideout.pf-position-left,.pf-widget-slideout.pf-position-right{bottom:auto;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%)}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{bottom:auto;top:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-position-bottom-right.pf-origin-bottom,.pf-widget-slideout.pf-position-right.pf-origin-bottom,.pf-widget-slideout.pf-position-top-right.pf-origin-bottom{left:auto;right:0}.pf-widget-slideout.pf-position-top-left,.pf-widget-slideout.pf-position-top-right{top:0}}.pf-widget-slideout.pf-origin-bottom{bottom:-100%}.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:50px}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:50px}.pf-widget-slideout.opened.pf-origin-bottom{bottom:50px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.opened.pf-position-bottom-left,.pf-widget-slideout.opened.pf-position-left,.pf-widget-slideout.opened.pf-position-top-left{left:0}.pf-widget-slideout.opened.pf-position-bottom-right,.pf-widget-slideout.opened.pf-position-right,.pf-widget-slideout.opened.pf-position-top-right{right:0;left:auto}.pf-widget-slideout.opened.pf-origin-bottom{bottom:0}}.pf-widget-slideout .branding svg{bottom:-22px;right:-20px;width:100px}.pf-widget-bar .pf-bar-content,.pf-widget-inline.pf-widget-variant-2 .pf-widget-content,.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content{text-align:center}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-slideout.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-slideout.pf-form{width:370px}.pf-widget-slideout.pf-subscription.pf-widget-has-branding span{margin-bottom:13px}.pf-widget-slideout form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-slideout form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px}.pf-push-down.opened{margin-top:59px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-slideout.pf-form{width:100%;max-width:370px}.pf-push-down.opened{margin-top:0}}.pf-widget-bar{height:auto;padding:10px 0;min-height:59px;left:0;right:0;box-shadow:0 4px 4px -4px rgba(0,0,0,.5)}.pf-widget-bar .pf-widget-body{margin:0 20px;float:left}.pf-widget-bar .pf-widget-close{top:50%;position:absolute;margin-top:-16px;right:20px;line-height:1;margin-right:0}.pf-widget-bar .pf-widget-btn{line-height:35px}.pf-widget-bar .pf-bar-content{padding:0 40px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar .pf-bar-content{padding:0 40px 0 20px}}.pf-widget-bar .pf-bar-content .pf-widget-message{text-overflow:ellipsis;max-width:100%;overflow:hidden;display:inline-block;white-space:normal;margin:6px 16px}.pf-widget-bar .pf-bar-content input[type=email],.pf-widget-bar .pf-bar-content input[type=text]{margin:0 1px;max-width:200px}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email],.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text]{margin-bottom:0}.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-bar .pf-bar-content form:not(.pf-custom-form) input[type=text].invalid{margin:0}.pf-widget-bar .pf-bar-content>*{display:inline-block;vertical-align:middle}.pf-widget-bar.pf-position-bottom-absolute,.pf-widget-bar.pf-position-top-absolute{position:absolute}.pf-widget-bar.pf-position-top-absolute,.pf-widget-bar.pf-position-top-fixed{top:-50px}.pf-widget-bar.opened.pf-position-top-absolute,.pf-widget-bar.opened.pf-position-top-fixed{top:0}.pf-widget-bar.pf-position-top-absolute .pf-bar-content,.pf-widget-bar.pf-position-top-fixed .pf-bar-content{padding-top:0}.pf-widget-bar.pf-position-bottom-fixed{bottom:-50px}.pf-widget-bar.pf-position-bottom-fixed,.pf-widget-bar.pf-position-top-fixed{position:fixed}.pf-widget-bar.opened.pf-position-bottom-fixed{bottom:0}.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{height:35px;width:35px;top:50%;margin-top:-17.5px;position:absolute}.pf-widget-bar.pf-message .pf-widget-btn,.pf-widget-bar.pf-subscription form .pf-widget-btn{margin-top:2px}@media screen and (max-width:736px),screen and (max-height:640px){.pf-widget-bar.pf-widget-variant-2 .pf-widget-img{display:none}}.pf-widget-bar.pf-subscription form{width:auto}.pf-widget-bar.pf-subscription form input[type=email]{height:35px}.pf-widget-button{position:fixed;box-shadow:1px 0 4px 0 rgba(0,0,0,.5);border-radius:2px}.pf-widget-button .pf-widget-message{border:0;background-color:transparent;line-height:42px;padding:0 16px 5px;margin:0;font-weight:700;display:block;cursor:pointer;overflow:hidden;max-width:150px;white-space:nowrap;text-overflow:ellipsis;color:#888}.pf-widget-button.pf-position-left{transform-origin:left bottom;transform:rotate(90deg);left:-50px}.pf-widget-button.pf-position-right{box-shadow:-1px 0 4px 0 rgba(0,0,0,.5);transform-origin:right bottom;transform:rotate(-90deg);right:-50px}.pf-widget-button.pf-position-left,.pf-widget-button.pf-position-right{top:10%}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-top-left{left:42px}.pf-widget-button.pf-position-bottom-right,.pf-widget-button.pf-position-top-right{right:42px}.pf-widget-button.pf-position-bottom-left,.pf-widget-button.pf-position-bottom-right{bottom:-50px}.pf-widget-button.pf-position-top-left,.pf-widget-button.pf-position-top-right{top:-50px}.pf-widget-button.pf-position-top-left .pf-widget-message,.pf-widget-button.pf-position-top-right .pf-widget-message{padding:5px 16px 0}.pf-widget-button.opened.pf-position-left{left:-6px}.pf-widget-button.opened.pf-position-left:hover{left:-1px}.pf-widget-button.opened.pf-position-right{right:-6px}.pf-widget-button.opened.pf-position-right:hover{right:-1px}.pf-widget-button.opened.pf-position-bottom-left,.pf-widget-button.opened.pf-position-bottom-right{bottom:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-bottom-left:hover,.pf-widget-button.opened.pf-position-bottom-right:hover{bottom:-1px}.pf-widget-button.opened.pf-position-top-left,.pf-widget-button.opened.pf-position-top-right{top:-6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.pf-widget-button.opened.pf-position-top-left:hover,.pf-widget-button.opened.pf-position-top-right:hover{top:-1px}.pf-widget-inline{padding:20px;border-radius:2px;box-shadow:0 4px 4px -4px rgba(0,0,0,.5);transition:all 0s;position:relative}.pf-widget-inline .pf-widget-message{margin:0 0 20px}.pf-widget-inline .pf-widget-btn{transition:all 0s}.pf-widget-inline.pf-widget-variant-2 .pf-widget-content .pf-widget-headline{margin-top:110px}.pf-widget-inline.pf-widget-variant-2 .pf-widget-img{width:100px;height:100px;float:none;position:absolute;top:20px;left:50%;margin-left:-50px}.pf-widget-inline.pf-subscription .pf-widget-btn{line-height:39px}.pf-widget-inline.pf-subscription.pf-widget-has-branding span{margin-bottom:35px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit{max-width:650px}.pf-widget-inline.pf-widget-variant-3 .pf-content-unit.stack{margin:0 auto;max-width:400px}.pf-widget-inline .branding{position:relative}.pf-widget-inline .branding svg{position:absolute;bottom:-10px;right:-10px}.pf-widget-inline form:not(.pf-custom-form) input[type=email].invalid,.pf-widget-inline form:not(.pf-custom-form) input[type=text].invalid{margin:-1px -1px 9px} \ No newline at end of file diff --git a/dist/pathfora.min.js b/dist/pathfora.min.js index 3218668..18f5ea0 100644 --- a/dist/pathfora.min.js +++ b/dist/pathfora.min.js @@ -1 +1 @@ -!function(){"use strict";function a(o){return o.generic={className:"pathfora",branding:!1,responsive:!0,headline:"",themes:{dark:{background:"#333",headline:"#fefefe",text:"#aaa",close:"#888",actionText:"#fff",actionBackground:"#444",cancelText:"#888",cancelBackground:"#333"},light:{background:"#f1f1f1",headline:"#444",text:"#888",close:"#bbb",actionText:"#444",actionBackground:"#fff",cancelText:"#bbb",cancelBackground:"#f1f1f1"}},displayConditions:{showOnInit:!0,showOnExitIntent:!1,showDelay:0,hideAfter:0,displayWhenElementVisible:"",scrollPercentageToDisplay:0}},o.message={layout:"modal",position:"",variant:"1",okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.subscription={layout:"modal",position:"",variant:"1",placeholders:{email:"Email"},okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.form={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{company:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Send",okShow:!0,cancelMessage:"Cancel",cancelShow:!0},o.sitegate={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{message:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Submit",okShow:!0,cancelShow:!1,showForm:!0},o}function l(o){return o.delayedWidgets={},o.openedWidgets=[],o.initializedWidgets=[],o.prioritizedWidgets=[],o.readyWidgets=[],o.triggeredWidgets={},o}function p(o){return o.pageViews=0,o.timeSpentOnPage=0,o.closedWidgets=[],o.completedActions=[],o.cancelledActions=[],o.displayedWidgets=[],o.abTestingGroups=[],o}function o(){for(var o=[],t=0;t

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),r.appendChild(a)),!0===o.required&&(K(r,"pf-form-required"),e.setAttribute("data-required","true"),o.label&&((l=q.createElement("div")).className="pf-required-flag",l.innerHTML="required",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),"date"!==o.type&&"email"!==o.type||(K(r,"pf-form-required"),e.setAttribute("data-validate","true"),o.label&&((l=q.createElement("div")).className="pf-invalid-flag",l.innerHTML="invalid",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),r.appendChild(a)),!0===o.required&&(K(r,"pf-form-required"),e.setAttribute("data-required","true"),o.label&&((l=q.createElement("div")).className="pf-required-flag",l.innerHTML="required",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),"date"!==o.type&&"email"!==o.type||(K(r,"pf-form-required"),e.setAttribute("data-validate","true"),o.label&&((l=q.createElement("div")).className="pf-invalid-flag",l.innerHTML="invalid",p=q.createElement("span"),l.appendChild(p),r.appendChild(l))),o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i