(function( blueConic, undefined ) {var ps='https://plugins.blueconic.net/';var pf='/gallery/';(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.BCClass=function(){};BCClass.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();var InteractionType=BCClass.extend({init:function(a){},getPreloadProperties:function(){return[]},getContent:function(){},onEvent:function(){},importLibraries:function(c){var e=[];var a=[];if(!c||c.length===0){return}for(var b=0;b<c.length;b++){var d=c[b];if(d&&d.sharing==="none"){e.push(d.url)}else{a.push(d.url)}}blueConic.fn.importLibraries.call(this,e);blueConic.fn.importAndCacheLibraries.call(this,a)}});(function(){ var PUSH_FREQUENCY_TYPES={ONLY:"only",PLC:"plc"},InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"tlpf",STANDARD_EVENTS:["ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase","Lead","CompleteRegistration"],MIGRATED_SEGMENT_ID:"migrated-segment",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._migrate(),this.pixelId=this.parameters.pixelId[0],this.goals=this._parseGoals(),this.segments=this.blueConicClient.getSegments()},getPreloadProperties:function(){var e=this._getFrontendGoals(this.parameters).reduce((function(e,t){var n=JSON.parse(t.parameters.exportMapping[0]).filter((function(e){return"property"===e.from.dataType&&e.from.values&&e.from.values.length>0})).map((function(e){return e.from.values[0].id}));return e.concat(n)}),[]).concat(this.goals.reduce((function(e,t){return e.push(t.context.LAST_PUSH_PROPERTY),e.push(t.context.VARIABLE_STATE_PUSH_PROPERTY),e}),[]));return e.push(this.SENT_TO_CONNECTION_PROPERTY),e.push(this.SENT_TO_SYSTEM_PROPERTY),e},onLoad:function(){if(0!==this.goals.length&&this.pixelId){this._addVariablesToGoals(),this._createFacebookScript(),window.fbq("init",this.pixelId);for(var e=0;e<this.goals.length;e++)this._handleGoal(this.goals[e].goal,this.goals[e].context)}},_addVariablesToGoals:function(){this.goals.forEach((function(e){var t=[];e.goal.exportMapping.forEach((function(n){if(e.goal.pushFrequency===PUSH_FREQUENCY_TYPES.ONLY){var i=n.from;this.bcConnectionUtil.getVariableValue(i,e.context)&&(i.key=n.to.values[0].id,t.push(i))}})),e.context.variables=t}))},_parseGoals:function(){var e=this._getFrontendGoals(this.parameters);if(0===e.length||!this.pixelId)return[];for(var t=[],n=0;n<e.length;n++)if(this._shouldGoalExecute(e[n])){var i=this._parseGoal(e[n]);t.push({goal:i,context:this._createGoalContext(i)})}return t},_getFrontendGoals:function(e){return e.frontendGoals.map(JSON.parse)},_createFacebookScript:function(){var e,t,n,i,r,a;e=window,t=document,n="script",e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],(r=t.createElement(n)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(a=t.getElementsByTagName(n)[0]).parentNode.insertBefore(r,a))},_parseGoal:function(e){var t=e.parameters;return t.exportMapping=JSON.parse(this._getValue("exportMapping",t)),t.pushFrequency=this._getValue("pushFrequency",t),t.exportSegment=this._getValue("exportSegment",t),t.eventName=this._getValue("eventName",t),t.events=[],t.triggerEvent&&t.events.push(t.triggerEvent),t.pushFrequency===PUSH_FREQUENCY_TYPES.PLC&&t.events.push(this.blueConicClient.event.onProfilePermissionChange),t},_getValue:function(e,t){return t[e]&&t[e][0]||null},_getValues:function(e,t){return t[e]?t[e]:[]},_handleGoal:function(e,t){if(!1!==this._validSegment(e.exportSegment)){var n=this;e.events.forEach((function(i){n.blueConicClient.event.subscribe(i,n,(function(){setTimeout((function(){n.profile.loadValues(n.preloadProperties,n,(function(){n._pushGoalData(e,t)}))}),200)}))})),this.bcConnectionUtil.doPush(t)&&this._pushGoalData(e,t)}},_pushGoalData:function(e,t){for(var n={},i=!1,r=0;r<e.exportMapping.length;r++){var a=e.exportMapping[r];if(a.from){var s=this.bcConnectionUtil.getVariableValue(a.from,t,!0).filter((function(e){return null!==e&&e!==undefined}));s&&s.length>0&&(n[a.to.values[0].id]=1===s.length?s[0]:s,i=!0)}}if(i){var o=e.eventName||"BlueConic";this._isStandardEvent(o)?window.fbq("track",o,n):window.fbq("trackCustom",o,n),this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY])}},_validSegment:function(e){if(e===this.MIGRATED_SEGMENT_ID)return!0;for(var t=0;t<this.segments.length;t++)if(this.segments[t].id===e)return!0;return!1},_createGoalContext:function(e){return{LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),push_frequency:e.pushFrequency||null,profile:this.profile,variables:[]}},_shouldGoalExecute:function(e){return this.context.getGoals().some((function(t){return t.getId()===e.id}))},_isStandardEvent:function(e){for(var t=0;t<this.STANDARD_EVENTS.length;t++)if(e===this.STANDARD_EVENTS[t])return!0;return!1},_migrate:function(){(this.parameters.version&&this.parameters.version[0]?parseInt(this.parameters.version[0]):1)<3&&this._migrateToV3()},_migrateToV3:function(){var e=this.parameters.eventName,t=this.parameters.push_frequency,n=JSON.parse(this.parameters.variables).map((function(e){return{from:{typeId:e.type,values:[{id:e.property}]},to:{typeId:"text",dataType:"text",values:[{id:e.key}]}}}));this.parameters.frontendGoals=[],this.parameters.frontendGoals.push(JSON.stringify({id:"migrated-goal-"+Math.round(1e3*Math.random()),active:!0,type:"export-pixel",parameters:{exportMapping:[JSON.stringify(n)],eventName:e,triggerEvent:null,pushFrequency:t,exportSegment:[this.MIGRATED_SEGMENT_ID]}}))}});var a = [];var i='connection_facebook_ads';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.6.0/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.6.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"lipf",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",SCRIPT_URL:"https://snap.licdn.com/li.lms-analytics/insight.min.js",PUSH_FREQUENCY:"pushFrequency",EXPORT_SEGMENT:"exportSegment",init:function(t,e){this.blueConicClient=t,this.context=e,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.pixelId=this._getValue("pixelId",this.parameters),this.segments=this.blueConicClient.getSegments(),this.goals=this._parseGoals()},onLoad:function(){0!==this.goals.length&&this.pixelId&&this.goals.forEach((function(t){this._handleGoal(t.goal,t.context)}),this)},getPreloadProperties:function(){return[this.SENT_TO_CONNECTION_PROPERTY,this.SENT_TO_SYSTEM_PROPERTY]},_parseGoals:function(){var t=this._getFrontendGoals(this.parameters);if(0===t.length||!this.pixelId)return[];for(var e=[],i=0;i<t.length;i++){var n=this._parseGoal(t[i]);e.push({goal:n,context:this._createGoalContext(n)})}return e},_getFrontendGoals:function(t){return t.frontendGoals.map(JSON.parse)},_parseGoal:function(t){var e=t.parameters;return e.pushFrequency=this._getValue(this.PUSH_FREQUENCY,e),e.exportSegment=this._getValue(this.EXPORT_SEGMENT,e),e},_getValue:function(t,e){return e[t]&&e[t][0]||null},_handleGoal:function(t,e){this._validSegment(t.exportSegment)&&this.bcConnectionUtil.doPush(e)&&this._pushGoalData()},_pushGoalData:function(){this.pixelId&&(window._linkedin_data_partner_ids=window._linkedin_data_partner_ids||[],window._linkedin_data_partner_ids.push(this.pixelId),this.blueConicClient.util.loadScript(this.SCRIPT_URL,this,(function(){this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_CONNECTION_PROPERTY,this.SENT_TO_SYSTEM_PROPERTY])})))},_validSegment:function(t){for(var e=0;e<this.segments.length;e++)if(this.segments[e].id===t)return!0;return!1},_createGoalContext:function(t){return{LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),push_frequency:t.pushFrequency||null,profile:this.profile}}});var a = [];var i='connection_linkedin';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.0/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t||null,this.parameters=this.context.getParameters(),this.profile=e.profile.getProfile(),this.isInEditMode=e.isInEditMode(),this._createdElements=[],this.parameters&&this.parameters.content&&(this._fragment=this._createFragment(this.parameters.content))},_createFragment:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("div"),i=0;i<n.length;i++)n[i].getAttribute("data-bc-external")&&(n[i].innerHTML="");return t},onLoad:function(){if(this.element=this.context.getDOMElement(),this.element){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery;var e=this.element.cloneNode(!0),t=this;this.loadInteraction((function(n,i){if(n)return console.error("[BC] Content interaction couldn't be loaded because of the following error(s)",n),void(t.isInEditMode||(console.error("[BC] The element will be restored to it's previous content"),t._createdElements.forEach((function(e){e.remove()})),t.element.replaceWith?t.element.replaceWith(e):t.element.innerHTML=e.innerHTML));t._createdElements=i.createdElements,t.isInEditMode?t.blueConicClient.event.publish("contentinteractiontype.interactionLoaded",{interaction:t}):t.blueConicClient.createEvent("VIEW",t.context.getInteractionId())}))}},loadInteraction:function(e,t){var n="boolean"!=typeof(t=t||{}).loadContent||t.loadContent,i=window._bcp.interactionUtil,r=this.getValue("content");r||(r=this.element.innerHTML);var l=[];n&&l.push(i.createContentHandler({content:r,interactionId:this.context.getInteractionId(),bcEvent:this.blueConicClient.event,isInEditMode:this.isInEditMode,jQuery:this.jQuery})),l.push(i.createCssHandler({cssUrl:this.getValue("styling_css")}),i.createAdvancedHandler({blueConicClient:this.blueConicClient,interactionId:this.context.getInteractionId(),clickEventSelector:this.getValue("click_event_selector"),jQuery:this.jQuery}),i.createJavaScriptHandler({interactionId:this.context.getInteractionId(),javaScriptUrls:this.getValues("javascript_urls"),inlineJavaScript:this.getValue("javascript"),isInEditMode:this.isInEditMode})),i.runHandlers(this.element,l,e)},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(e=n.exec(t));)for(var r=e[1].split(","),l=0;l<r.length;l++)i.push(r[l]);return i||[]},getContent:function(){return this.loadInlineStyling(),this._fragment?this._fragment.innerHTML:null},loadInlineStyling:function(){var e=this.getValue("styling_css_inline");e?(this._inlineStylingElement||(this._inlineStylingElement=document.createElement("style"),document.head.appendChild(this._inlineStylingElement),this._createdElements.push(this._inlineStylingElement)),this._inlineStylingElement.innerHTML=e):this._inlineStylingElement&&(this._inlineStylingElement.remove(),this._inlineStylingElement=null)},onMessageReceived:function(e){this.blueConicClient.event.publish("contentinteractiontype.messageReceived",e)},getValue:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getValues:function(e){return this.parameters[e]||[]}});var a = [];var i='contentinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handlerUtil.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleCss.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleContent.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleJavaScript.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleAdvanced.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({html:{nl:{content:'<div class="bcCSContent">Plaats hier uw content</div>'},"default":{content:'<div class="bcCSContent">Place your content here</div>'}},init:function(a,b){this.blueConicClient=a,this.context=b?b:null,this.profile=a.profile.getProfile(),this.element=this.context.getDOMElement(),this.identifier='bc_'+this.context.getInteractionId(),this.parameters=this.context.getParameters(),this.currentInsertType=this.parameters.inserttype&&this.parameters.inserttype[0]?this.parameters.inserttype[0]:'replace','replacecontainer'!==this.currentInsertType||document.getElementById(this.identifier)||this._hidePosition();var c=this.parameters.content+'';this.htmlFragment=this._createElement(c),this._lastEvent=null,this._inlineCss=null,this._lastCheckDate=null,this._timeoutID=null},getPreloadProperties:function(){return this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[]},getContent:function(){return(this._handleStyling(),!this.htmlFragment)?null:(this.element||(this.element=this.context.getDOMElement()),'replace'===this.currentInsertType)?(this._emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external'),this.htmlFragment.innerHTML):void 0},onUpdate:function(){this.currentInsertType!==this.context.getParameters().inserttype[0]&&document.location.reload()},onLoad:function(){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,this.currentInsertType&&this._placeContent()},onMessageReceived:function(a){a.parameters&&(this.parameters=a.parameters),'updateStyling'===a.action&&(this.inlineCss&&(document.head.removeChild(this.inlineCss),this.inlineCss=null),this._handleStyling())},_hidePosition:function(){this.styleIdentifier='bcCS'+this.context.getInteractionId();var a=this.context.getPosition()+' {opacity: 0 !important}',b=document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0],c=document.createElement('style');c.type='text/css',c.id=this.styleIdentifier,c.styleSheet?c.styleSheet.cssText=a:c.innerHTML=a,b.appendChild(c)},_showPosition:function(){this.jQuery('#'+this.styleIdentifier).remove()},_placeContent:function(){var a=this.element||this.context.getDOMElement();if(a&&(this._handleStyling(),this.blueConicClient.isInEditMode()||this._handleURLs(this.htmlFragment),'replace'===this.currentInsertType?this._replaceContent(a):this.htmlFragment&&(this._emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external'),this._setContent()),!this.blueConicClient.isInEditMode())){var b=this.parameters.clickselector&&this.parameters.clickselector[0]?this.parameters.clickselector[0]:'';if(b){this.jQuery('body').one('click',b,this.jQuery.proxy(function(a){this._lastEvent&&this._lastEvent.originalEvent===a.originalEvent||this._logClickEvent(a)},this));try{this.jQuery(b).one('click',this.jQuery.proxy(function(a){this.lastEvent=a,this._logClickEvent(a)},this))}catch(a){}}var c=!!this.parameters.forceclick&&('true'===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0]);c&&this.blueConicClient.createEvent('CLICK',this.context.getInteractionId());var d=this.parameters.javascript&&this.parameters.javascript[0]?this.parameters.javascript[0]:'';if(d)try{d=d.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+this.context.getInteractionId()+'"$2'),this.jQuery('<script>'+d+'</script>').appendTo(this.jQuery('body'))}catch(a){console.error(a)}}},_replaceContent:function(a){this._assureVisibilty(a);var b=this.getContent();if(b){var c=a.nodeName?a.nodeName.toLowerCase():a.nodeName;if(-1===this.blueConicClient.util.array.indexOfArray(['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr'],c)){if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.innerHTML!==b&&(a.innerHTML=b);else try{this.jQuery(a).html(b)}catch(a){console.error(a)}}else if(a.parentNode){var d=a.parentNode.innerHTML,e=document.createElement('div');e.appendChild(a.cloneNode(!0));var f=e.innerHTML,g=d.replace(f,b);a.parentNode.innerHTML!==g&&(a.parentNode.innerHTML=g)}this._handleComplexObjects(a),this._trackView(a)}},_setContent:function(){var a=this._getElementByPosition(this.context.getPosition());if(a){var b=a.parent().get(0),c=this.jQuery('[data-bc-id="'+this.identifier+'"],#'+this.identifier);if(0<c.length)return this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?null:(c.replaceWith(this.htmlFragment.innerHTML),this._handleComplexObjects(b),void('prepend'===this.currentInsertType?(a.prev().attr('data-bc-id',this.identifier),this._trackView(a.prev().get(0))):'append'===this.currentInsertType&&(a.next().attr('data-bc-id',this.identifier),this._trackView(a.next().get(0)))));if('prepend'===this.currentInsertType){var d=a.prev();if(0<d.length&&d.attr('data-bc-id')===this.identifier)return;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'prepend',lockPosition:!0,redrawPosition:!0});else{try{a.before(this.htmlFragment.innerHTML)}catch(a){console.error(a)}var e=a.prev();e.attr('data-bc-id',this.identifier),this._trackView(e.get(0))}}if('append'===this.currentInsertType){var f=a.next();if(0<f.length&&f.attr('data-bc-id')===this.identifier)return;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0).nextSibling),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'append',lockPosition:!0,redrawPosition:!0});else{try{a.after(this.htmlFragment.innerHTML)}catch(a){console.error(a)}var g=a.next();g.attr('data-bc-id',this.identifier),this._trackView(g.get(0))}}if('replacecontainer'===this.currentInsertType){if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.replaceChild(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'replace container',lockPosition:!0,redrawPosition:!0});else{var h=this.jQuery(this.htmlFragment.innerHTML).replaceAll(a);this._trackView(h.get(0))}this._showPosition()}this.blueConicClient.isInEditMode()&&null===this.context.getInteractionId()&&setTimeout(function(){window.blueConicClient.fn.postMessage('onOpenEditMode',window.blueConicClient.positionHandlers[0])},500),this._handleComplexObjects(b)}},_trackView:function(a){if(!this.blueConicClient.isInEditMode()){var b=!!(this.parameters.trackviewwhenvisible&&this.parameters.trackviewwhenvisible[0])&&'true'===this.parameters.trackviewwhenvisible[0];b?this._isVisible(a)?this.blueConicClient.createEvent('VIEW',this.context.getInteractionId()):(this._lastCheckDate=new Date().getTime(),this.jQuery(document).on('scroll.bcCSP'+this.identifier,this.jQuery.proxy(function(){this._checkVisibility(a)},this)),this.jQuery(window).on('resize.bcCSP'+this.identifier,this.jQuery.proxy(function(){this._checkVisibility(a)},this)),this._checkVisibility(a)):this.blueConicClient.createEvent('VIEW',this.context.getInteractionId())}},_checkVisibility:function(a){var b=new Date().getTime();return 500<=b-this._lastCheckDate&&(this._lastCheckDate=new Date().getTime(),this._isVisible(a))?(this.blueConicClient.createEvent('VIEW',this.context.getInteractionId()),this.jQuery(document).off('scroll.bcCSP'+this.identifier),this.jQuery(window).off('resize.bcCSP'+this.identifier),void clearTimeout(this._timeoutID)):void(clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this.jQuery.proxy(function(){this._checkVisibility(a)},this),1500))},_isVisible:function(a){var b=a.getBoundingClientRect();return 0<=b.top&&b.top<window.innerHeight&&this.jQuery(a).is(':visible')},_logClickEvent:function(a){if(!(a&&a.originalEvent&&a.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId())){var b=a&&a.target&&a.target.pathname&&a.target.hostname&&0===a.target.pathname.indexOf('/s/')&&-1!==a.target.hostname.indexOf('blueconic');b||(a.originalEvent&&(a.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent('CLICK',this.context.getInteractionId()))}},_getElementByPosition:function(a){var b=document.getElementById(a);return b=b?this.jQuery(b):this.jQuery(a),b},_createElement:function(a){var b;if(!a)if(this.blueConicClient.isInEditMode()&&('prepend'===this.currentInsertType||'append'===this.currentInsertType)){var c='nl'===this.context.getLocale()?'nl':'default';a=this.html[c].content}else return null;try{b=document.createElement('div'),b.id=this.identifier,b.innerHTML=a}catch(a){return null}return b},_handleURLs:function(a){var b=!!(this.parameters.newwindow&&this.parameters.newwindow[0])&&'true'===this.parameters.newwindow[0];if(b)for(var c=a.getElementsByTagName('a'),d=0,e=c.length;d<e;d++){var f=c[d],g=f.getAttribute('target');g||f.setAttribute('target','_blank')}this._handlePlaceholders(a)},_assureVisibilty:function(a){this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()&&(a.style.minWidth='10px',a.style.minHeight='10px')},_handlePlaceholders:function(a){for(var b=this._getPropertiesFromPlaceholders(a.innerHTML),c=0;c<b.length;c++){var d=b[c],e=this.profile.getValue(d)||'',f=new RegExp('\\$\\{'+d+'\\}','g');a.innerHTML=a.innerHTML.replace(f,encodeURI(e))}},_getPropertiesFromPlaceholders:function(a){for(var b,c=/\$\{([a-zA-Z\-_0-9]+)\}/g,d=[];null!==(b=c.exec(a));)d.push(b[1]);for(var e=/data-bc-preload="([^"]*)"/g,f=[];null!==(b=e.exec(a));)for(var g=b[1].split(','),h=0;h<g.length;h++)f.push(g[h]);return d.concat(f)},_emptyElementsWithAttribute:function(a,b,c){for(var d,e=this.getElementsWithAttribute(a,b,c),f=0,g=e.length;f<g;f++)d=e[f],d.innerHTML=''},getElementsWithAttribute:function(a,b,c){for(var d,e=[],f=a.getElementsByTagName(b),g=0,h=f.length;g<h;g++)d=f[g],d.getAttribute(c)&&e.push(d);return e},_handleComplexObjects:function(a){for(var b=this.getElementsWithAttribute(a,'div','data-bc-pluginid'),c=0;c<b.length;c++){var d=b[c],e=d.getAttribute('data-bc-pluginid'),f=d.getAttribute('data-bc-config');if(f)try{var g=f.replace(/\n/g,'\\\\n').replace(/\r/g,'\\\\r').replace(/\t/g,'\\\\t');f=this.blueConicClient.json.parse(g)}catch(a){f=null}this.blueConicClient.event.publish('bcComplexObject',{plugin:e,config:f,node:d,interactionId:this.context.getInteractionId()}),this.blueConicClient.isInEditMode()||(d.removeAttribute('data-bc-pluginid'),d.removeAttribute('data-bc-config'))}},_handleStyling:function(){var a='bcIS'+this.context.getInteractionId(),b=this.parameters.styling_css_inline&&this.parameters.styling_css_inline[0]?this.parameters.styling_css_inline[0]:'';b&&(this.inlineCss=document.getElementById(a),this.inlineCss||(this.inlineCss=document.createElement('style'),this.inlineCss.id=a,this.inlineCss.innerHTML=b.replace(/&#xd;/gi,''),document.head.appendChild(this.inlineCss)))}});var a = [];var i='contentinteractiontypespecial';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/contentinteractiontypespecial/ts_25b8fc569d2bb21e2b65eaf5782e7c3a/'},{ id : 'boolean', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'boolean/1.0.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({DEFAULT_MAX_AGE:7776000000,MAX_ITEMS:100,SKIP_LIMITED:"limited",RESET_ROLLING:"rolling",RESET_CALENDAR:"calendar",init:function(a,b){this.blueConicClient=a,this.context=b,this.interactionId="cm"+this.context.getInteractionId(),this.historyProperty="_cm_"+this.interactionId,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.preLoadProperties=[this.historyProperty],this.excludeRules=[];try{this.excludeRules=this.blueConicClient.json.parse(this.parameters.excludeRules[0])}catch(a){}if(0<this.excludeRules.length){var c=this.excludeRules.filter(function(a){return"expression"===a.area.selectedoption&&-1!==a.area.expression.indexOf("getValue")});this.preLoadProperties=this.preLoadProperties.concat(c.map(function(a){return this._getPropertyIdsFromExpression(a.area.expression)},this))}this.includeRules=[];try{this.includeRules=this.blueConicClient.json.parse(this.parameters.includeRules[0])}catch(a){}if(0<this.includeRules.length){var d=this.includeRules.filter(function(a){return"expression"===a.area.selectedoption&&-1!==a.area.expression.indexOf("getValue")});this.preLoadProperties=this.preLoadProperties.concat(d.map(function(a){return this._getPropertyIdsFromExpression(a.area.expression)},this))}this.freeRules=[];try{this.freeRules=this.blueConicClient.json.parse(this.parameters.freeRules[0])}catch(a){}0<this.freeRules.length&&(this.freeRules=this.freeRules.filter(function(a){return!!a.property}),this.preLoadProperties=this.preLoadProperties.concat(this.freeRules.map(function(a){return a.property.id}))),this.expireAt=parseInt(this.parameters.expireAt[0]),isNaN(this.expireAt)&&(this.expireAt=10),this.resetAfter=this.parameters.resetAfter[0],this.uniqueOnly="true"===this.parameters.uniqueOnly[0],this.onceOnly=!!(this.parameters.onceOnly&&"true"===this.parameters.onceOnly[0]),this.now=this.blueConicClient.getCurrentDate(),this.maxAge=this._getMaxAge(),this.delayMetering=!!(this.parameters.delayMetering&&"true"===this.parameters.delayMetering[0]),this.eventSubscribed=!1,this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.onLoad()})},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.delayMetering&&!this.eventSubscribed)return this.eventSubscribed=!0,void this.blueConicClient.event.subscribe("cm_start_metering",this,function(){this.onLoad()});var a=this._visitorQualifies();if(a){var b={};try{var c=this.profile.getValue(this.historyProperty);c&&(b=this.blueConicClient.json.parse(this.profile.getValue(this.historyProperty)))}catch(a){}this.history=new this.History(b,this.maxAge,this.now);var d=this._getCurrentView();if(d){var e=!d.isSkippedView||d.isSkippedView&&!!d.skippedFor;e?(this._addViewToHistory(d),!d.isSkippedView&&this._writeExtraProfileProperties(d),this.blueConicClient.profile.updateProfile(this,function(){this._throwEvents(d)})):this._throwEvents(d)}}},_throwEvents:function(a){var b=this._getCurrentViews(a);(a.isHistoricallyAllowedView||a.isHistoricallyAllowedFreeView)&&this.blueConicClient.createEvent("cm_already_viewed"),a.isFreeView?(this.blueConicClient.createEvent("cm_free_view"),(this.onceOnly&&!a.isHistoricallyAllowedFreeView||!this.onceOnly)&&(this.freeViewTracker.consumedFreeCount===this.freeViewTracker.totalFree?this.blueConicClient.createEvent("cm_last_free_view"):this.blueConicClient.createEvent("cm_free_view_"+this.freeViewTracker.consumedFreeCount))):((this.onceOnly&&!a.isHistoricallyAllowedView&&!a.isSkippedView||!this.onceOnly)&&(1===b?this.blueConicClient.createEvent("cm_firstview"):b===this.expireAt-1?this.blueConicClient.createEvent("cm_lastview"):b<this.expireAt&&this.blueConicClient.createEvent("cm_view_"+b)),b>=this.expireAt&&this.blueConicClient.createEvent("cm_exceeded"),a.isSkippedView&&this.blueConicClient.createEvent("cm_excluded"));var c=this.parameters.bottomFrom&&this.parameters.bottomFrom[0]?parseInt(this.parameters.bottomFrom[0]):null,d=this.parameters.bottomTo&&this.parameters.bottomTo[0]?parseInt(this.parameters.bottomTo[0]):null,e=this.parameters.middleFrom&&this.parameters.middleFrom[0]?parseInt(this.parameters.middleFrom[0]):null,f=this.parameters.middleTo&&this.parameters.middleTo[0]?parseInt(this.parameters.middleTo[0]):null,g=this.parameters.topFrom&&this.parameters.topFrom[0]?parseInt(this.parameters.topFrom[0]):null,h=this.parameters.topTo&&this.parameters.topTo[0]?parseInt(this.parameters.topTo[0]):null;c&&d&&b>=c&&b<=d&&this.blueConicClient.createEvent("cm_bottom"),e&&f&&b>=e&&b<=f&&this.blueConicClient.createEvent("cm_middle"),g&&h&&b>=g&&b<=h&&this.blueConicClient.createEvent("cm_top")},_addViewToHistory:function(a){this._getCurrentViews(a)>=this.expireAt&&!a.isFreeView||(a.isFreeView?this.history.free.push({u:a.url,ff:a.freeFor,ts:a.timestamp}):a.isSkippedView?this.history.skipped.push({u:a.url,sf:a.skippedFor,ts:a.timestamp}):(this.history.included.push({u:a.url,v:a.includeValue,ts:a.timestamp}),a.isAddedToHistory=!0),this.history.included.length>this.MAX_ITEMS&&(this.history.included.sort(function(c,a){var b=c.ts,d=a.ts;return b<d?-1:b>d?1:0}),this.history.included.shift()),this.profile.setValue(this.historyProperty,this.blueConicClient.json.stringify(this.history)))},_writeExtraProfileProperties:function(a){var b=this._getCurrentViews(a),c=this.parameters.expireAtProperty&&this.parameters.expireAtProperty[0]?this.parameters.expireAtProperty[0]:null,d=this.parameters.numViewsProperty&&this.parameters.numViewsProperty[0]?this.parameters.numViewsProperty[0]:null,e=this.parameters.numViewsLeftProperty&&this.parameters.numViewsLeftProperty[0]?this.parameters.numViewsLeftProperty[0]:null,f=this.parameters.numFreeViewsProperty&&this.parameters.numFreeViewsProperty[0]?this.parameters.numFreeViewsProperty[0]:null,g=this.parameters.numFreeViewsLeftProperty&&this.parameters.numFreeViewsLeftProperty[0]?this.parameters.numFreeViewsLeftProperty[0]:null;if(c&&"null"!==c&&this.profile.setValue(c,this.expireAt),d&&"null"!==d&&this.profile.setValue(d,b<=this.expireAt?b:this.expireAt),e&&"null"!==e&&this.profile.setValue(e,b<this.expireAt?this.expireAt-b:0),a.isFreeView&&(f&&"null"!==f&&this.profile.setValue(f,this.freeViewTracker.consumedFreeCount),g&&"null"!==g)){var h=this.freeViewTracker.totalFree-this.freeViewTracker.consumedFreeCount;this.profile.setValue(g,0<h?h:0)}},_getCurrentView:function(){var a=(this.jQuery("meta[property=\"og:url\"]").attr("content")||document.location.href).toLowerCase(),b=document.referrer.toLowerCase(),c=new this.PageView(a,b,this.now);return c.isHistoricallyAllowedView=this._isHistoricallyAllowed(a),c.includeValue=this._getIncludeValue(c),0<c.includeValue?(c.isSkippedView=this._isPageViewSkipped(c),this._getCurrentViews(c)>=this.expireAt&&this._setPageViewFree(c),c):null},_getIncludeValue:function(a){for(var b,c=0;c<this.includeRules.length;c++)if(b=this.includeRules[c],this._isRuleApplicable(b,a))return b.views;return 0},_isPageViewSkipped:function(a){var b=new this.SkippedViewTracker(this),c=this;return this.excludeRules.filter(function(b){return c._isRuleApplicable(b,a)}).some(function(d){if(d.skip.selectedoption!==c.SKIP_LIMITED)return!0;return!(b.skipped[d.id]=b.skipped[d.id]?b.skipped[d.id]+1:1,!(b.skipped[d.id]<=d.skip.views))&&(a.skippedFor=d.id,!0)})},_setPageViewFree:function(a){var b=this;this.freeViewTracker=new this.FreeViewTracker(this),a.isHistoricallyAllowedFreeView=this._isHistoricallyAllowedFree(a.url),this.freeRules.filter(function(c){return b._isRuleApplicable(c,a)}).forEach(function(c){b.freeViewTracker.totalFree+=c.views,a.isFreeView||(a.isHistoricallyAllowedFreeView?(a.freeFor=c.id,a.isFreeView=!0):(b.freeViewTracker.free[c.id]=b.freeViewTracker.free[c.id]?b.freeViewTracker.free[c.id]+1:1,b.freeViewTracker.free[c.id]<=c.views&&(a.freeFor=c.id,a.isFreeView=!0,b.freeViewTracker.consumedFreeCount++)))})},_isRuleApplicable:function(a,b){var c=a.area.selectedoption;if("url"===c||"referrer"===c){var d="url"===c?b.url:b.referrer;if(a.anyWord||this._URLMatchesWords(d,a.containsmatches,a.words))return!0}else if("selector"===c){var e=this._getContent(a.area.selector,!0);if(e&&a.anyWord)return!0;if(a.area.selector&&a.words&&this._contentMatchesWords(e,a.containsmatches,a.words))return!0}else if("variable"===c){var f=this._getVariableValue(a.area.variable);if(f&&a.anyWord)return!0;if(f&&this._contentMatchesWords(f,a.containsmatches,a.words))return!0}else if("expression"===c){var g=this._getContent(a.area.expression,!1);if(g&&a.anyWord)return!0;if(g&&this._contentMatchesWords(g,a.containsmatches,a.words))return!0}else if("property"===c){var h=this.profile.getValues(a.property.id);if(0<h.length&&a.anyWord)return!0;var i=this;return h.some(function(b){return!!(a.words&&i._contentMatchesWords(b,a.containsmatches,a.words))||!!(a.dateTime&&!isNaN(parseInt(b))&&i.now.getTime()-parseInt(b)<=i.maxAge)})}return!1},_isHistoricallyAllowed:function(a){if(!this.uniqueOnly)return!1;var b=this.history.included.filter(function(b){return b.u===a});return 0<b.length},_isHistoricallyAllowedFree:function(a){if(!this.uniqueOnly)return!1;var b=this.history.free.filter(function(b){return b.u===a});return 0<b.length},_getCurrentViews:function(a){for(var b,c=0,d=[],e=0;e<this.history.included.length;e++)(b=this.history.included[e],!(this.uniqueOnly&&-1!==this.blueConicClient.util.array.indexOfArray(d,b.u)))&&(d.push(b.u),c+=b.v);var f=this._isHistoricallyAllowed(a.url)||a.isAddedToHistory;return f||a.isSkippedView||c!==this.expireAt-1||(c+=a.includeValue),c},_visitorQualifies:function(){var a=[];try{a=this.blueConicClient.json.parse(this.parameters.segments)}catch(a){}if(0===a.length)return!0;var b=this.blueConicClient.getSegments();if(0===b.length)return!1;for(var c,d=0;d<b.length;d++){c=b[d];for(var e,f=0;f<a.length;f++)if(e=a[f],c.id===e.id)return!0}return!1},_getMaxAge:function(){if(this.resetAfter===this.RESET_ROLLING){var a=this.parameters.resetRolling&&!isNaN(parseInt(this.parameters.resetRolling[0]))?parseInt(1e3*(60*(60*(24*this.parameters.resetRolling[0])))):this.DEFAULT_MAX_AGE;return a}return this.resetAfter===this.RESET_CALENDAR?this.now.getTime()-new Date(this.now.getFullYear(),this.now.getMonth(),1).getTime():this.DEFAULT_MAX_AGE},_contentMatchesWords:function(a,b,c){if(!a||"string"!=typeof a)return!1;a=a.toLowerCase();for(var d=0;d<c.length;d++){if("contains"===b&&-1!==a.indexOf(c[d].toLowerCase()))return!0;if("not_contains"===b){if(-1===a.indexOf(c[d].toLowerCase()))return!0;}else if(a===c[d].toLowerCase())return!0}return!1},_URLMatchesWords:function(a,b,c){for(var d=0;d<c.length;d++)if("contains"===b||"not_contains"===b){var e=this._escapeRegularExpressionCharacters(c[d]);try{var f=new RegExp(e,"i"),g=f.test(a);if(g&&"contains"===b||!g&&"not_contains"===b)return!0}catch(a){}}else if(a===c[d])return!0;return!1},_getContent:function(expression,isCssSelector){var content=null;isCssSelector||-1===expression.indexOf("return ")||(expression="(function(jQuery) {"+expression+"}(jQuery))");try{content=isCssSelector&&-1===expression.indexOf("jQuery(")?this.jQuery(expression):function(selector,jQuery,profile){return eval("var jQuery = arguments[1]"),eval("var blueConicProfile = arguments[2]"),eval(selector)}(expression,this.jQuery,this.profile)}catch(a){}if(content&&content instanceof this.jQuery){if(0<content.length){var contentArr=[];return this.jQuery.each(content,this.jQuery.proxy(function(a,b){var c=this.jQuery(b);c.attr("content")?contentArr.push(this._normalizeText(c.attr("content"))):contentArr.push(this._normalizeText(c.text()))},this)),contentArr.join().toLowerCase()}}else if(null!==content&&"undefined"!=typeof content)return"object"==typeof content||"function"==typeof value?JSON.stringify(content).toLowerCase():content.toLowerCase()},_getVariableValue:function(a){for(var b=a.replace("[",".").replace("]","").replace("\"\"",""),c=b.split("."),d=window[c.shift()];0<c.length;){if(!d)return null;d=d[c.shift()]}return d instanceof Array?d.join().toLowerCase():"object"==typeof d||"function"==typeof d?null:(""+d).toLowerCase()},_escapeRegularExpressionCharacters:function(a){return a=a.replace(/[\\?.{}+]/g,function(a){return"\\"+a}),a=a.replace(/\*/g,".*"),a},_normalizeText:function(a){return a?this.jQuery.trim(a).replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):a},_getPropertyIdsFromExpression:function(a){for(var b,c=RegExp(/getValues?\(["']([^"']+)["']\)/,"g"),d=[];null!==(b=c.exec(a));)d.push(b[1]);return d},PageView:function(a,b,c){this.url=a,this.timestamp=c.getTime(),this.referrer=b,this.includeValue=0,this.isSkippedView=!1,this.skippedFor=null,this.isFreeView=!1,this.isHistoricallyAllowedView=!1,this.isAddedToHistory=!1},SkippedViewTracker:function(a){this.skipped={};for(var b,c=[],d=0;d<a.history.skipped.length;d++)b=a.history.skipped[d],a.uniqueOnly&&-1!==a.blueConicClient.util.array.indexOfArray(c,b.u)||(this.skipped[b.sf]=this.skipped[b.sf]?this.skipped[b.sf]+1:1),c.push(b.u)},FreeViewTracker:function(a){this.free={},this.consumedFreeCount=0,this.totalFree=0;for(var b,c=[],d=0;d<a.history.free.length;d++)b=a.history.free[d],a.uniqueOnly&&-1!==a.blueConicClient.util.array.indexOfArray(c,b.u)||(this.free[b.ff]=this.free[b.ff]?this.free[b.ff]+1:1,this.consumedFreeCount++),c.push(b.u)},History:function(a,b,c){function d(a){for(var d=a.length;d--;){var e=a[d];c.getTime()-e.ts>b&&a.splice(d,1)}return a}this.included=a.included?d(a.included):[],this.skipped=a.skipped?d(a.skipped):[],this.free=a.free?d(a.free):[]}});var a = [];var i='contentmeter';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/contentmeter/ts_0e69746438ac0d7e955432554da32dc3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},onLoad:function(){var e=this.blueConicClient,t=this.context.getParameters(),n=this.jQuery;if(t){var r=(t.clickcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),a=(t.contentcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),i={},o={},c={};r.forEach((function(e){candidateChecker(e,registerClickHandlers)})),a.forEach((function(e){candidateChecker(e,checkContentHandler)}))}function candidateChecker(t,n){var handler=function(){n(t);var r=o[t.interactionId],a=c[t.selecterarea];r||a||e.position.subscribe(t.selecterarea,null,handler)};e.position.subscribe(t.selecterarea,null,handler),n(t)}function registerClickHandlers(e){for(var t=getHandler(e),r=n(e.selecterarea),a=0,i=r.length;a<i;a++)r[a].addEventListener("click",t,{once:!0})}function checkContentHandler(e){isContentConversionMomentMet(e)&&getHandler(e)()}function isContentConversionMomentMet(e){if(o[e.interactionId])return!1;for(var t=n(e.selecterarea),r=0,a=t.length;r<a;r++)if(_textContains(t[r].textContent,e.words))return!0;return!1}function getHandler(t){return i[t.interactionId]||(i[t.interactionId]=function(i,l){var s=o[i],u=c[t.selecterarea];if(!s&&!u){var d=[];d=(d=l instanceof MouseEvent?r.filter((function(e){var t=!o[e.interactionId],r=n(e.selecterarea).is(event.target),a=n(e.selecterarea).find(event.target).length>0;return t&&(r||a)})):a.filter((function(e){return isContentConversionMomentMet(e)}))).filter((function(e){return e.interactionId!==t.interactionId})),c[t.selecterarea]=!0,c[t.interactionId]=!0,d.forEach((function(e){c[e.selecterarea]=!0,o[e.interactionId]=!0}));var f=d.map((function(e){return e.interactionId}));e.createEvent("CONVERSION",i,null,(function(){e.util.log("CONVERSION event registered. Interaction: ["+i+"]")}),{losingInteractions:f})}}.bind(null,t.interactionId)),i[t.interactionId]}function _textContains(e,t){if(!e||!Array.isArray(t))return!1;var n=t.filter((function(e){return Boolean(e)&&"pre_any"!==e})).map((function(e){return e.trim().toLowerCase()}));if(0===n.length)return!0;for(var r=e.toLowerCase(),a=0,i=n.length;a<i;a++)if(r.indexOf(n[a])>=0)return!0;return!1}function _updateSelectorCandidate(e){var t=e.selecterarea;return/^pre_any/.test(t)?t="html":/^pre_header/.test(t)?t="h1, h2, h3, h4, h5, h6":/^pre_/.test(t)&&(t=t.replace(/^pre_/,"")),e.selecterarea=t,e}}});var a = [];var i='conversionlistenerinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.10/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.10/'}]);})();(function(){ !function(){var t=null,e=null,i=null,n=null,o=null;window.InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.customCssElements=[],this.customJsElements=[],this.isInEditMode=this.blueConicClient.isInEditMode(),this._temporyLocation=null,this._contentElement=null,this._openedOnce=!1,this._resetTimeoutId=0,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())},onLoad:function(){t=window._bcp.notificationBar.Enums.FLOW_TYPE,e=window._bcp.notificationBar.Enums.POSITION,i=window._bcp.notificationBar.Enums.ENTER_ANIMATION,n=window._bcp.notificationBar.Enums.APPEAR_ON,o=window._bcp.notificationBar.Enums.CLOSE_POSITION,this.parseParameters(),this.isInEditMode&&(window._bcp.notificationBar.NotificationBar.prototype.close=function(){});var r=this;this.loadCustomContent((function(t){if(t)return r.blueConicClient.util.log(t.message);r.addBlueConicEventHandlers()}))},parseParameters:function(){this.notificationBarHeight=parseInt(this.getParameter("height")),this.notificationBarHeight=isNaN(this.notificationBarHeight)?window._bcp.notificationBar.Constants.DEFAULT_HEIGHT:this.notificationBarHeight;var r=this.getParameter("location")||"top";this._position="top"===r?e.TOP:e.BOTTOM;var a=this.getParameter("close_position");if(this._closePosition="TOP_LEFT"===a?o.TOP_LEFT:"BOTTOM_RIGHT"===a?o.BOTTOM_RIGHT:o.TOP_RIGHT,this._closePadding=parseInt(this.getParameter("close_padding")),this._closePadding=isNaN(this._closePadding)?10:this._closePadding,document.body.style.animationName===undefined||!0===this.isInEditMode)this._enterAnimation=i.NONE;else switch(this.getParameter("effect")){case"slideIn":this._enterAnimation=i.SLIDE_IN;break;case"fadeIn":this._enterAnimation=i.FADE_IN;break;default:this._enterAnimation=i.NONE}var s=this.getParameters("selected_when");this._appearOnTriggers=[];for(var c=0;c<s.length;c++)switch(s[c]){case"triggerOn":this._appearOnTriggers.push(n.SCROLL_EVENT);break;case"scroll_depth":this._appearOnTriggers.push(n.SCROLL_DEPTH);break;case"click_selector":this._appearOnTriggers.push(n.ELEMENT_CLICKED);break;case"content_condition":this._appearOnTriggers.push(n.CONTENT_VISIBLE)}0===this._appearOnTriggers.length&&this._appearOnTriggers.push(n.PAGE_LOAD);var l=this.getParameter("location_type");this._type="scroll"===l?t.NON_STICKY:t.STICKY},addBlueConicEventHandlers:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.notificationBar.close()})),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this.notificationBar&&this.notificationBar.isVisible&&this.notificationBar.close()}))},loadCustomContent:function(t){t||(t=function(){});var e=this;this.callbackChain([this.createContentElement.bind(this),this.loadComplexObjects.bind(this),this.removeTempLocation.bind(this),this.loadCss.bind(this),this.loadCustomCss.bind(this)],(function(i){return i?t(i):(e.createNotificationBar(),e.setShowEventTrigger(),e.isInEditMode&&e.blueConicClient.event.publish("notificationBar.interactionLoaded",{interaction:e}),t())}))},callbackChain:function(t,e,i){var n=this;i||(i=0);try{t[i]((function(o){return o?e(o):i+1>=t.length?e(null):n.callbackChain(t,e,i+1)}))}catch(o){return e(o)}},createContentElement:function(t){return this._temporyLocation=document.createElement("div"),this._temporyLocation.style.display="none",document.body.appendChild(this._temporyLocation),this._contentElement=document.createElement("div"),this._contentElement=this.jQuery("<div></div>").html(this.getContent())[0],this._temporyLocation.appendChild(this._contentElement),t()},removeTempLocation:function(t){return document.body.removeChild(this._temporyLocation),t()},loadComplexObjects:function(t){this.jQuery(this._contentElement).find("div[data-bc-external]").html("");for(var e=this.jQuery(this._contentElement).find("div[data-bc-pluginid]"),i=0;i<e.length;i++){var n=e.eq(i),o=n.attr("data-bc-pluginid"),r=n.attr("data-bc-config");if(r)try{for(var a=r.match(/: *"(\\"|[^"])*\n(\\"|[^"])*"/g)||[],s=r,c=0;c<a.length;c++)s=s.replace(a[c],a[c].replace(/\n/g,"\\n"));r=this.blueConicClient.json.parse(s)}catch(u){console.error("Error parsing the config of the complex object:",u),r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:n[0],interactionId:this.context.getInteractionId()}),this.isInEditMode||(n.removeAttr("data-bc-pluginid"),n.removeAttr("data-bc-config"))}if(0===e.length)return t();var l=0,h=setInterval((function(){if(0===e.length)return clearInterval(h),clearTimeout(l),t();for(var i=e.length-1;i>=0;i--)e.eq(i).html()&&e.splice(i,1)}),10);l=setTimeout((function(){return clearInterval(h),t({message:"Couldn't load the complex objects (timeout of 5000ms passed)."})}),5e3)},loadCss:function(t){var e=document.createElement("link");e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),e.onload=function(){t()};var i=this.baseURL;e.onerror=function(e){return t({message:"Error occured loading the main css file ("+i+"frontend/src/css/notificationBar.css)",eventData:e})},this.jQuery("head").append(e),e.setAttribute("href",this.baseURL+"frontend/src/css/notificationBar.css")},loadCustomCss:function(t){var e=this,i=this.getParameter("styling_css"),n=this.getParameter("styling_css_inline");if(i){var o=document.createElement("link");o.setAttribute("type","text/css"),o.setAttribute("rel","stylesheet"),o.onload=function(){t()},o.onerror=function(n){return e.isInEditMode?(console.error("[BC] Loading the custom css failed for the following url: "+i),t()):t({message:"Loading the custom css failed for the following url: "+i,eventData:n})},this.customCssElements.push(this.jQuery(o)),this.jQuery("head").append(this.jQuery(o)),o.setAttribute("href",i)}if(n){n=n.replace(/&#xd;/gi,"");var r=this.jQuery("<style>"+n+"</style>");this.customCssElements.push(r),this.jQuery("head").append(r)}if("false"===this.getParameter("show_close")){var a=this.jQuery("<style>.bcpNotificationBarClose { display: none; }</style>");this.customCssElements.push(a),this.jQuery("head").append(a)}else if("true"===this.getParameter("custom_close")){var s=this.getParameter("close_icon"),c=this.getParameter("close_icon_hover"),l="";s&&(l+=".bcpNotificationBarCloseIcon {border-radius: 0;background-image: url("+s+");background-position: 0;background-size: contain;}.bcpNotificationBarCloseIcon:hover {background-position: 0;}"),c&&(l+=".bcpNotificationBarCloseIcon:hover {background-image: url("+c+");}");var h=this.jQuery("<style>"+l+"</style>");this.customCssElements.push(h),this.jQuery("head").append(h)}if(!i)return t()},resetCustomCss:function(){for(var t=0;t<this.customCssElements.length;t++){this.customCssElements[t].remove()}this.customCssElements=[]},triggerOnScrollDepth:function(){this.jQuery(window).scrollTop()/(this.jQuery(document).height()-this.jQuery(window).height())*100>=parseInt(this.getParameter("scroll_depth"))&&(this.jQuery(window).off("scroll.bcpNotificationBarTrigger"),this.triggerNotificationBar())},setShowEventTrigger:function(){for(var t=this,e=0;e<this._appearOnTriggers.length;e++)switch(this._appearOnTriggers[e]){case n.PAGE_LOAD:this.triggerNotificationBar();break;case n.SCROLL_EVENT:this.jQuery(window).off("scroll.bcpNotificationBarTriggerEvent").one("scroll.bcpNotificationBarTriggerEvent",(function(){t.triggerNotificationBar()}));break;case n.SCROLL_DEPTH:t.triggerOnScrollDepth(),this.jQuery(window).off("scroll.bcpNotificationBarTriggerDepth").on("scroll.bcpNotificationBarTriggerDepth",(function(){t.triggerOnScrollDepth()}));break;case n.ELEMENT_CLICKED:this.jQuery(this.getParameter("click_selector")).off("click.bcpNotificationBarTrigger").on("click.bcpNotificationBarTrigger",(function(){!1===t.notificationBar.isVisible&&t.triggerNotificationBar()}));break;case n.CONTENT_VISIBLE:this._addTriggerOnContentHandler(t.getParameter("content_condition"))}},_addTriggerOnContentHandler:function(t){var e=this,i=null,n=null,checkAndTriggerFunction=function(){e.jQuery(t).length>0&&e.jQuery(t).html().length>0&&(e.triggerNotificationBar(),i&&i.disconnect(),n&&clearInterval(n))};window.MutationObserver?(i=new MutationObserver(checkAndTriggerFunction)).observe(document.body,{childList:!0,subtree:!0}):n=setInterval(checkAndTriggerFunction,1e3),checkAndTriggerFunction()},triggerNotificationBar:function(){var t=parseInt(this.getParameter("delay")),e=this;function _trigger(){e.callbackChain([function(t){e._handleJavascript((function(i){return i&&!e.isInEditMode?t(i):(e._addInlineJavascript(),t())}))},e.notificationBar.show.bind(e.notificationBar),function(t){return!1===e._openedOnce&&(e._addFrontEndBindings(),e._addClickEventLogger(),e.blueConicClient.createEvent("VIEW",e.context.getInteractionId()),e._openedOnce=!0),!0===e.isInEditMode&&setTimeout((function(){e.notificationBar.scrollIntoView()}),1e3),t()}],(function(t){t&&console.error(t)}))}t&&!isNaN(t)&&!0!==this.isInEditMode||(t=0),0===t?_trigger():setTimeout(_trigger,1e3*t)},_addFrontEndBindings:function(){var t=this.jQuery(".bcpNotificationBarDontShowAgainLink"),e=this.jQuery(".bcpNotificationBarCloseButton"),i=this.jQuery(".bcpNotificationBarCloseIcon"),n=this;i.on("click",(function(){"true"===n.getParameter("hide_after_close")&&n.blueConicClient.doNotShowAgain(n.context.getInteractionId()),n.notificationBar.close()})),t.on("click",(function(t){t.preventDefault(),n.blueConicClient.doNotShowAgain(n.context.getInteractionId()),n.notificationBar.close()})),e.on("click",(function(){n.notificationBar.close()}))},_addClickEventLogger:function(){var t=this.getParameter("click_event_selector");if(t){var e=this;this.jQuery(t).off("click.bcpNotificationBar").one("click.bcpNotificationBar",(function(t){t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||e.blueConicClient.createEvent("CLICK",e.context.getInteractionId())}))}},_addInlineJavascript:function(){var t=this.getParameter("javascript");if(t&&!this.isInEditMode){t=t.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+this.context.getInteractionId()+'"$2');var e=this.jQuery("<script>"+t+"<\/script>");try{e.appendTo(this.jQuery("body"))}catch(i){console.error(i)}}},_handleJavascript:function(t){var e=this.getParameters("javascript_urls")||[],i=this;if(0===e.length)return t();{var n=null,o=0;function scriptLoaded(){if(++o===e.length)return i.isInEditMode?t():t(n)}function scriptError(t){(n=n||{message:"[BC] Loading for the following javascript urls failed, notificationBar will not be shown.",urls:[]}).urls.push(t),scriptLoaded()}for(var r=0;r<e.length;r++){var a=e[r],s=document.createElement("script");s.setAttribute("src",a),s.onload=scriptLoaded,s.onerror=scriptError.bind(null,a),document.head.appendChild(s)}}},onSave:function(){return this.notificationBar.getContentHTML()},onMessageReceived:function(t){this.blueConicClient.event.publish("notificationBar.messageReceived",t)},getContent:function(){var t=this.getParameter("content");if(!t){var e="nl"===this.context.getLocale()?"nl":"default";t=window._bcp.notificationBar.Constants.HTML[e].content}return t},createNotificationBar:function(){var t=window._bcp.notificationBar.NotificationBar;this.notificationBar=new t(this.blueConicClient,this.context,this.jQuery,this._contentElement,{closePosition:this._closePosition,closePadding:this._closePadding,flowType:this._type,position:this._position,animationType:this._enterAnimation,height:this.notificationBarHeight})},resetNotificationBar:function(){this.notificationBar.domModifier.reset(!1),this.jQuery(this.notificationBar._containerElement).remove(),this.resetCustomCss();var t=this;this.loadCustomCss((function(){t.createNotificationBar(),t.notificationBar.show(),!0===t.isInEditMode&&t.notificationBar.scrollIntoView()}))},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]?this.parameters[t]:[]}})}();var a = [];var i='dialogue_notification_bar';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/frontend/src/scripts/enumsAndConstants.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/frontend/src/scripts/elementModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/frontend/src/scripts/domModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/frontend/src/scripts/notificationBar.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.3/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters();var r=new Date(2017,8,1,0,0,0,0),s=this.blueConicClient.getCurrentDate().getTime()-r.getTime();this.days=Math.floor(s/864e5);var i=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(i){i=e.json.parse(i),this.preLoadProperties=[];for(var a=0,p=0;p<i.length;p++){var n=i[p];n.profileproperty&&n.decay&&n.nr&&(this.preLoadProperties.push(n.profileproperty+"_index"),n.decay>a&&(a=n.decay,this.property=n.profileproperty))}}else{var o=this.parameters.property?this.parameters.property[0]:this.parameters.property;o&&(this.property=this.blueConicClient.json.parse(o)[0].profileproperty,this.preLoadProperties=[this.property+"_index"])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.preLoadProperties.length>0){var e=this.context.getProfile(),t=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!t)return;if(0===(t=this.blueConicClient.json.parse(t)).length)return;var r=this.parameters.interests?this.parameters.interests[0]:this.parameters.interests;r=r?this.blueConicClient.json.parse(r).values:[];var s=new this.BlueConicEngagement(this.blueConicClient,e,this.context.getInteractionId(),!0,r,this.jQuery,this.days,!0);if(s.applyEngagementRules(t),s.isChanged())s.save();else{for(var i=!1,a=0;a<this.preLoadProperties.length;a++){var p=this.preLoadProperties[a];e.getValue(p)||(e.setValue(p,"0"),i=!0)}i&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_interest_ranking';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/engagement-service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters(this.context.getParameters())),this.preloadProperties},onLoad:function(){var e=this.context.getProfile(),r=this.context.getParameters(),t=this.jQuery,i=r.listener_rules?r.listener_rules[0]:r.listener_rules;if(i){i=this.blueConicClient.json.parse(i);var s=new this.RuleService(this.blueConicClient,e,t);s.applyRules(i),s.save()}},getProfilePropertiesFromParameters:function(e){var r=[],t=e.listener_rules?e.listener_rules[0]:e.listener_rules;if(!t)return r;t=this.blueConicClient.json.parse(t);for(var i=0;i<t.rules.length;i++){var s=t.rules[i];!s.profileproperty||"set_if_empty"!==s.addset&&"merge"!==s.addset||r.push(s.profileproperty[0].profileproperty)}return r}});var a = [];var i='enrichprofilebyvisitorbehavior';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/frontend/src/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r,this.parameters=this.context.getParameters(),this.rules=this._migrate(this.parameters.version||1)},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters()),this.preloadProperties},onLoad:function(){if(this.rules){var e=this.context.getProfile();new window.FormRuleService(this.blueConicClient,e,this.jQuery).applyRules(this.rules)}},getProfilePropertiesFromParameters:function(){if(this.rules){for(var e=[],r=0;r<this.rules.length;r++){var t=this.rules[r];t.profileProperty&&"set_if_empty"===t.addset&&e.push(t.profileProperty)}return e}},_migrate:function(e){var r=this.parameters.form_listener_rules?this.parameters.form_listener_rules[0]:this.parameters.form_listener_rules;return r=this.blueConicClient.json.parse(r),1===e&&(e=2,r=this._migrateToVersion2(r)),r},_migrateToVersion2:function(e){if(!e)return e;e=e.rules||e;for(var r=0;r<e.length;r++){e[r].id=e[r].id||e[r].identifier,delete e[r].identifier,e[r].profileproperty&&!e[r].profileProperty&&(e[r].profileProperty=e[r].profileproperty[0]&&e[r].profileproperty[0].profileproperty||"",delete e[r].profileproperty);var t=this._migrateConverterMappingsToVersion2(e[r]);t&&(e[r].converter.mappings=t)}return e},_migrateConverterMappingsToVersion2:function(e){if(e&&e.converter&&e.converter.mappings){for(var r=[],t=0;t<e.converter.mappings.length;t++){var i=e.converter.mappings[t];i&&i.original&&i.converted?r.push(i):r.push({id:i.identifier||i.id,original:i.o,converted:i.c})}return r}}});var a = [];var i='enrichprofilewithvisitorinput';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/frontend/src/node_modules/@blueconic/frontend-form-rule-service/formRuleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,n){this.blueConicClient=t,this.rules=[],this.timeouts=[];try{this.rules=this.blueConicClient.json.parse(n.getParameters().rules[0])}catch(i){}this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this._unsubscribePositionListeners(),this._resetTimeouts(),this.onLoad()})),this._positionListeners=[]},onLoad:function(){for(var t=0;t<this.rules.length;t++){var n=this.rules[t];"click"===n.type?this._setClickBindings(n,!0):this._createEvent(n)}},_resetTimeouts:function(){this.timeouts.forEach((function(t){clearTimeout(t)})),this.timeouts=[]},_createEvent:function(t){var n=t.area.selectedoption,i=!1;if("selector"===n&&t.area.selector?(t.words&&this._contentMatchesWords(this._getContentForSelector(t),t.containsmatches,t.words)||t.anyWord&&this._getContentForSelector(t))&&(i=!0):"variable"===n&&t.area.variable?(t.words&&this._contentMatchesWords(this._getVariableValue(t.area.variable),t.containsmatches,t.words)||t.anyWord&&this._getVariableValue(t.area.variable))&&(i=!0):"customjs"===n&&t.area.customjs&&(t.words&&this._contentMatchesWords(this._getCustomJsValue(t.area.customjs),t.containsmatches,t.words)||t.anyWord&&this._getCustomJsValue(t.area.customjs))&&(i=!0),i){var s=0;t.delay&&!isNaN(parseInt(t.delay))&&(s=parseInt(t.delay));var r=setTimeout(function(){this.blueConicClient.createEvent(t.event.id)}.bind(this),s);this.timeouts.push(r)}},_setClickBindings:function(t,n){if(t.clickarea.selector){var i=this.jQuery,s=null;try{s=i(t.clickarea.selector)}catch(r){return void this.blueConicClient.util.log("Invalid click selector: "+r)}0===s.length?this.blueConicClient.position.subscribe(t.clickarea.selector,this,(function(){this._setClickBindings(t,!1)})):s.off("click."+t.id).on("click."+t.id,{clickRule:t},function(t){this.lastEvent=t;try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this)),n&&i(document).on("click",t.clickarea.selector,{clickRule:t},function(t){if(!this.lastEvent||this.lastEvent.originalEvent!==t.originalEvent)try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this))}},_contentMatchesWords:function(t,n,i){if(!t)return!1;for(var s=0;s<i.length;s++)if("contains"===n){if(-1!==t.indexOf(i[s].toLowerCase()))return!0}else if(t===i[s].toLowerCase())return!0;return!1},_getContentForSelector:function(rule){var selector=rule.area.selector,contentAreas=null;if(-1!==selector.indexOf("jQuery("))contentAreas=function(selector,jQuery){return eval("var jQuery = arguments[1]"),eval(selector)}(selector,this.jQuery);else try{contentAreas=this.jQuery(selector)}catch(e){this.blueConicClient.util.log("Invalid content selector: "+e)}if(contentAreas&&contentAreas instanceof this.jQuery&&contentAreas.length>0){var contentArr=[];return this.jQuery.each(contentAreas,function(t,n){var i=this.jQuery(n);i.attr("content")?contentArr.push(this._normalizeText(i.attr("content"))):i.attr("src")?contentArr.push(this._normalizeText(i.attr("src"))):contentArr.push(this._normalizeText(i.text()))}.bind(this)),contentArr.join().toLowerCase()}if("content"===rule.type){var subscription=this.blueConicClient.position.subscribe(selector,this,(function(){this._createEvent(rule)}));this._positionListeners.push(subscription)}},_unsubscribePositionListeners:function(){this._positionListeners&&this._positionListeners.forEach((function(t){this.blueConicClient.position.unsubscribe(t)})),this._positionListeners=[]},_getVariableValue:function(t){try{for(var n=t.split("."),i=window[n.shift()];n.length>0;)i=i[n.shift()];return i instanceof Array?i.join().toLowerCase():"object"==typeof i||"function"==typeof i?this.blueConicClient.json.stringify(i):i?(""+i).toLowerCase():null}catch(s){return null}},_getCustomJsValue:function(customjs){try{var value=function(customjs,jQuery){return eval("var jQuery = arguments[1]"),eval("var $ = arguments[1]"),eval(customjs)}(customjs,this.jQuery);return value&&value instanceof Object&&(value=this._stringify(value)),value?(""+value).toLowerCase():null}catch(e){return null}},_stringify:function(t){try{return this.blueConicClient.json.stringify(t)}catch(i){var n=[];return JSON.stringify(obj,(function(t,i){if("object"==typeof i&&null!==i){if(-1!==n.indexOf(i))return;n.push(i)}return i}))}},_normalizeText:function(t){return t?t.replace(/^\s+|\s+$/g,"").replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):t}});var a = [];var i='eventtrigger';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.parameters=this.context.getParameters()},_ouibounce:function(){var a=this,b="sensitivity",c="delay";this.ouibounce({aggressive:!0,timer:0,sensitivity:this.parameters[b]?parseInt(this.parameters[b][0]):20,delay:this.parameters[c]?parseInt(this.parameters[c][0]):0,callback:function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown||a.blueConicClient.createEvent("exitintent"),window.blueConicClient&&(window.blueConicClient.exitIntentThrown=!0)}})},onLoad:function(){this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown&&(window.blueConicClient.exitIntentThrown=!1,this._ouibounce())}),this._ouibounce()}});var a = [];var i='exitintent';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/js/ouibounce.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({languageLabels:{nl:{defaultValidation:"Vul een valide waarde in"},"default":{defaultValidation:"Please enter a valid value"}},_editorOpen:!1,init:function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),this.blueConicClient=e,this.baseURL=this.blueConicClient.getBaseURL("forms");var i=this;this.blueConicClient.event.subscribe("bcComplexObject",this,(function(e,s){s&&"forms"===s.plugin&&s.config&&(s.config.attributionId=s.interactionId,s.config=this._migrateConfig(s.config),this._loadLibraries(s.config).done((function(){i._loadData(s,t)})))})),this.blueConicClient.isInEditMode()&&(this._sendMessage("forms.formLoaded"),this.blueConicClient.event.subscribe("forms.updateName",this,(function(e,t){var i=t.message.field,s=document.querySelector(".bcForm[data-bc-id='"+t.message.form+"']").querySelector(".fieldHolder[data-bc-id='"+i.id+"']"),n=s.querySelector(".bcLabel");n&&(n.textContent=i.settings.label);var a=s.querySelector(".buttonInput");a&&a.setAttribute("value",i.settings.label)})),this.blueConicClient.event.subscribe("forms.updateField",this,(function(e,s){i._updateField(s.message.form,s.message.field,t)})),this.blueConicClient.event.subscribe("forms.updateLabelLocation",this,(function(e,t){i._updateLabelLocation(t.message.form,t.message.show_labels_inline)})),this.blueConicClient.event.subscribe("forms.updateStyling",this,(function(e,t){i._updateStyling(t.message.styling)})),this.blueConicClient.event.subscribe("forms.addField",this,(function(e,t){i._addField(t.message.form,t.message.field,!0)})),this.blueConicClient.event.subscribe("forms.deleteField",this,(function(e,t){var s=document.querySelector(".bcForm[data-bc-id='"+t.message.form+"']").querySelector(".fieldHolder[data-bc-id='"+t.message.fieldId+"']");s.parentNode.removeChild(s),i._removeSelectedState()})),this.blueConicClient.event.subscribe("forms.updateConfig",this,(function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+t.message.id+"']");if(i){var s=i.closest(".bccomplexobject");s.setAttribute("data-bc-config",JSON.stringify(t.message));var n=t.message.actions;t.message.fields.length>0&&Array.prototype.forEach.call(t.message.fields,(function(e){"Button"===e.fieldType&&e.settings&&e.settings.actions&&Array.prototype.forEach.call(e.settings.actions,(function(e){n.push(e)}))}));var a=n.filter((function(e){return"setaddvalue"===e.type&&"set_if_empty"===e.operation&&e.property})).map((function(e){return e.property}));s.setAttribute("data-bc-preload",a.join(","))}})),this.blueConicClient.event.subscribe("forms.updateOrdering",this,(function(e,t){i._updateOrdering(t.message.form,t.message.ordering)})),this.blueConicClient.event.subscribe("editorOpened",this,(function(){this._editorOpen=!0;var e=this;this._loadLibraries().done((function(){e._addBindings(t)}))})),this.blueConicClient.event.subscribe("editorClosed",this,(function(){this._editorOpen=!1,i._removeSelectedState(),i._sendMessage("forms.closeConfigurator")})))},getPreloadProperties:function(){return[]},_migrateConfig:function(e){if((e=JSON.parse(JSON.stringify(e))).actions||!e.routing)return e;var t,i=e.routing;return"form_routing_inline"===i.type?t={type:"text",text:i.inline_message}:"form_routing_url"===i.type?t={type:"url",url:i.go_to_url}:"form_routing_close_lightbox"===i.type&&(t={type:"close"}),e.actions=t?[t]:[],e},_loadLibraries:function(e){var t,i,s=this.jQuery;if(window.BlueConicJQuery=s,this.blueConicClient.isInEditMode())t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"),i=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/jquery-ui.min.js");else for(var n=0;n<e.fields.length;n++)"DatePicker"===e.fields[n].fieldType&&(t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"));return s.when(t,i)},_getLoadScriptDeferred:function(e){var t=this.jQuery.Deferred();return this.blueConicClient.util.loadScript(e,this,(function(){t.resolve()})),t},_updateOrdering:function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+e+"']"),s=null;t.forEach((function(e){var t=i.querySelector(".fieldHolder[data-bc-id='"+e+"']");if(s)s.parentNode.insertBefore(t,s.nextSibling);else{var n=i.querySelector("fieldset");n.insertBefore(t,n.firstChild)}s=t}))},_removeSelectedState:function(){var e=document.querySelectorAll(".fieldHolder");Array.prototype.forEach.call(e,(function(e){e.className=e.className.replace("bcSelected","").replace("  "," ")}))},_updateStyling:function(e){if(this._stylingUrl){var t=document.querySelector("link[href='"+this._stylingUrl+"']");t.parentNode.removeChild(t)}this._inlineCss&&this._inlineCss.parentNode.removeChild(this._inlineCss),this._handleStyling(e)},_handleStyling:function(e){if(e&&e.css&&(this._stylingUrl=e.css,this.blueConicClient.util.loadCSS(this._stylingUrl)),e&&e.css_inline){var t=document.createElement("style");t.innerHTML=e.css_inline,this._inlineCss=t,document.body.appendChild(this._inlineCss)}},_selectField:function(e,t){if(this._removeSelectedState(),e.className=e.className.split(" ").concat(["bcSelected"]).join(" "),!t){var i=e.closest(".bccomplexobject").getAttribute("data-bc-config"),s=this._jsonEscape(i);this._sendMessage("forms.fieldSelected",{form:JSON.parse(s),field:e.getAttribute("data-bc-id")})}},_jsonEscape:function(e){return e.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t")},_addBindings:function(e){var t=window.CKEDITOR;if(t){this.baseURL=this.blueConicClient.getBaseURL(e.getInteractionTypeId()),this.blueConicClient.util.loadCSS(this.baseURL+"frontend/src/css/formsinline.css");var i,s=this.jQuery,n=this,clickHandler=function(){n._editorOpen&&n._selectField(this)},a=document.querySelectorAll(".fieldHolder");if(Array.prototype.forEach.call(a,(function(e){e.addEventListener("click",clickHandler)})),t.currentInstance)for(i in t.currentInstance.widgets.instances)if("bccomplexobject"===t.currentInstance.widgets.instances[i].name){var l=t.currentInstance.widgets.instances[i];"forms"===s(l.wrapper.$).find(".bccomplexobject").attr("data-bc-pluginid")&&(l.on("select",(function(e){s(e.sender.wrapper.$).removeClass("cke_widget_selected")})),l.on("deselect",(function(){n._removeSelectedState(),n._sendMessage("forms.closeConfigurator")})))}s(".bcForm fieldset").sortable({handle:".bcDragHandle",stop:function(e){var t=[];s(".fieldHolder",s(this)).each((function(){s(this).attr("data-bc-id")&&t.push(s(this).attr("data-bc-id"))})),n._sendMessage("forms.updateOrdering",{form:JSON.parse(s(this).closest(".bccomplexobject").attr("data-bc-config")),order:t});var i=e.toElement;i.getAttribute("data-bc-config")||(i=i.closest(".fieldHolder")),n._selectField(i,!0)}})}},_sendMessage:function(e,t){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(e,t)},_addField:function(e,t,i){var s=this,n=this._getFieldsHTML(t),a=document.createElement("div");a.innerHTML=n;var l=a.childNodes[0];document.querySelector(".bcForm[data-bc-id='"+e+"'] fieldset").appendChild(l),this._selectField(l,!0),l.addEventListener("click",function(){this._selectField(l)}.bind(this)),i&&setTimeout((function(){s._isElementInViewport(l)||l.scrollIntoView()}),100)},_isElementInViewport:function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},_updateField:function(e,t,i){var s=this._getFieldsHTML(t,!0),n=document.querySelector(".bcForm[data-bc-id='"+e+"']");n&&(n.querySelector(".fieldHolder[data-bc-id='"+t.id+"']").innerHTML=s,this._addDatePickerHandleForField(t,i))},_updateLabelLocation:function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+e+"'] fieldset");i&&(i.className=t?i.className.split(" ").concat(["inlineLabels"]).join(" "):i.className.replace("inlineLabels","").replace("  "," "))},_loadData:function(e,t){var i=this,s=e.node;s.innerHTML="",this.baseURL=this.blueConicClient.getBaseURL(t.getInteractionTypeId());var n=document.createElement("div");n.innerHTML='<link type="text/css" href="'+this.baseURL+'frontend/src/css/default.uni-form.css" rel="stylesheet" />';var a=n.childNodes[0];a.addEventListener("load",(function(){i._handleStyling(e.config.styling),i._loadForm(s,e.config,t),i._editorOpen&&i._addBindings(t)})),document.head.appendChild(a)},_loadForm:function(e,t,i){this._node=e;var s=document.createElement("div");s.className="bcForm",s.setAttribute("data-bc-external","true"),s.setAttribute("data-bc-id",t.id),e.appendChild(s);var n=this._getForm(t);s.appendChild(n),this.blueConicClient.isInEditMode()?this._addDatePickerHandler(t,i):this._prefillForm(s,t,i)},_getForm:function(e){e.styling||(e.styling={});var t=document.createElement("div");t.className="uniForm",t.setAttribute("id",e.id),t.setAttribute("action","#");var i=document.createElement("div");i.className="formHolder",t.appendChild(i);var s=document.createElement("fieldset");e.styling.show_labels_inline&&(s.className="inlineLabels"),i.appendChild(s);for(var n=e.fields,a=0;a<n.length;a++){var l=n[a],r=this._getFieldsHTML(l),o=document.createElement("div");o.innerHTML=r;var c=o.childNodes[0];s.appendChild(c)}return t},_getFieldsHTML:function(e,t){var i='<% if(settings.description) { %><span class="formHint"><%= settings.description %></span><% } %>',s="<% if(settings.required) { %><em>*</em><% } %>",n="";switch(e.fieldType){case"PlainText":n='<div class="plaintext"><%= settings.text %></div>';break;case"SingleLineText":"small"===e.settings.fieldSize||e.settings.fieldSize;n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><input type="text" class="'+("small"===e.settings.fieldSize?"bcSmall":"large"===e.settings.fieldSize?"bcLarge":"bcMedium")+' textInput" placeholder="<%= settings.value %>" />'+i+"</div>";break;case"TextArea":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><textarea rows="'+("small"===e.settings.fieldSize?3:"large"===e.settings.fieldSize?10:5)+'" placeholder="<%= settings.value %>"></textarea>'+i+"</div>";break;case"Select":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><select class="selectInput"><% if (settings.values) for(var i=0; i < settings.values.length; i++) { %><option<% if(settings.values[i].defaultOn) { %> selected="selected"<% } %> value="<%= escape(settings.values[i].identifier || "") %>"><%= settings.values[i].name %></option><% } %></select>'+i+"</div>";break;case"CheckboxList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="checkbox" name="bcCList_<%= id %>" id="bcCList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcCList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"RadioButtonList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="radio" name="bcRadioList_<%= id %>" id="bcRadioList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcRadioList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"DatePicker":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><% if(settings.flat) { %><div class="datepicker"/><input type="hidden" class="hiddenInput"/><% } else { %><input type="text" class="textInput" placeholder="<%= settings.value %>" /><input type="hidden" class="hiddenInput"/><% } %>'+i+"</div>";break;case"Button":n='<div class="buttonHolder<% if (settings.className) {%> <%= settings.className %><% } %>"><input type="<% if (settings.submitForm === false) {%>button<% } else { %>submit<% } %>" class="buttonInput primaryAction" value="<%= settings.label %>"/></div>'}return this.blueConicClient.isInEditMode()&&(n+='<div class="bcDragHandle"><div class="bcInnerDragHandle"></div></div>'),t||(n='<div class="fieldHolder blueConic<%= fieldType %>" data-bc-id="<%= id %>">'+n+"</div>"),this._tmpl(n,e)},_prefillForm:function(e,t,i){for(var s=i.getProfile(),n=e.querySelectorAll(".fieldHolder"),a=[],l=0;l<t.fields.length;l++){var r=t.fields[l];r.settings.prefillproperty&&a.push(r.settings.prefillproperty)}0!==a.length?s.loadValues(a,this,(function(){this._addFormListeners(e,t,i);for(var filterAndCheckRadioButtons=function(e,t){Array.prototype.filter.call(e,(function(e){return e.value===t})).forEach((function(e){e.setAttribute("checked","checked")}))},a=0;a<t.fields.length;a++){var l=t.fields[a],r=n[a].querySelectorAll("input, textarea, select");if(l.settings.prefillproperty){var o=s.getValues(l.settings.prefillproperty);if(o.length>0)switch(l.fieldType){case"DatePicker":break;case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var c=0;c<o.length;c++){filterAndCheckRadioButtons(r,o[c])}break;default:r[0].value=o[0]}}}})):this._addFormListeners(e,t,i)},_formatDate:function(e){var t=e.getMonth()+1,i=e.getDate();return e.getYear()+1900+"-"+(t<10?"0":"")+t+"-"+(i<10?"0":"")+i},_addDatePickerHandler:function(e,t){for(var i=0;i<e.fields.length;i++){var s=e.fields[i];this._addDatePickerHandleForField(s,t)}},_getDateForTimestamp:function(e){if(!e)return null;var t=new Date(parseInt(e));return t&&t instanceof Date&&!isNaN(t)?t:null},_addDatePickerHandleForField:function(e,t){var i=this.jQuery;if("DatePicker"===e.fieldType){var s=document.querySelector("div[data-bc-id='"+e.id+"']");if(!s)return;var n,a=this.blueConicClient.profile.getProfile(),l="nl"===t.getLocale()?"NL":"EN",r=this._getDateForTimestamp(a.getValue(e.settings.prefillproperty));if(r){n=r;var o=s.querySelector(".textInput");o&&(o.value=this._formatDate(n))}else n=e.settings.pickerOffset?new Date(e.settings.pickerOffset):new Date;if(i("input.textInput, div.datepicker",i(s)).DatePicker({flat:e.settings.flat,lang:l,calendars:e.settings.calendars,date:n,current:this._formatDate(n),onChange:function(e,t){var s=document.querySelector("div[data-bc-id='"+this.id+"']");s.querySelector("input.hiddenInput").value=t.getTime();var n=s.querySelectorAll("input.textInput");n.length>0&&(n[0].value=e,i(n[0]).DatePickerHide())}.bind(e)}),!e.settings.flat){var c=s.querySelector("input.textInput");c&&c.addEventListener("focus",(function(){i("input.textInput, div.datepicker",s).DatePickerShow()}))}}},_submit:function(e,t,i){if(this._validateForm(e,t,i)){!1!==t.logConversion&&this.blueConicClient.createEvent("CONVERSION",t.attributionId),this._storeFormValues(e,t,i);this.blueConicClient.profile.updateProfile(function(){this._handleActions(t.actions,t.attributionId,e,i)}.bind(this))}},_handleActions:function(e,t,i,s){if(e){var n=new window._bcp.utils.AfterSubmitActionHandlerV2(this.blueConicClient,s,t);e.forEach((function(e){n.executeAction(e,i)}),this)}},_getField:function(e,t){var i=e.closest(".fieldHolder").getAttribute("data-bc-id");if(i&&void 0!==i){for(var s,n=0;n<t.fields.length;n++){var a=t.fields[n];if(a&&a.id&&"undefined"!=typeof a.id&&a.id===i){s=a;break}}return s}},_addFormListeners:function(e,t,i){var s=this;this._addDatePickerHandler(t,i);var submitHandler=function(n){n.preventDefault();var a=s._getField(this,t);a&&a.settings&&!1===a.settings.logClick||s.blueConicClient.createEvent("CLICK",t.attributionId),s._submit(e,t,i)},n=e.querySelectorAll('input[type="submit"]');Array.prototype.forEach.call(n,(function(e){e.addEventListener("click",submitHandler)}));var clickHandler=function(){var n=s._getField(this,t);n&&(n.settings&&!1!==n.settings.logClick&&s.blueConicClient.createEvent("CLICK",t.attributionId),s._handleActions(n.settings.actions,t.attributionId,e,i))},a=e.querySelectorAll('input[type="button"]');if(Array.prototype.forEach.call(a,(function(e){e.addEventListener("click",clickHandler)})),1===t.fields.length&&"RadioButtonList"===t.fields[0].fieldType){var radioClickHandler=function(n){n.preventDefault(),s.blueConicClient.createEvent("CLICK",t.attributionId),s._submit(e,t,i)},l=document.querySelectorAll('input[type="radio"]');Array.prototype.forEach.call(l,(function(e){e.addEventListener("click",radioClickHandler)}))}},_validateForm:function(e,t,i){var s=e.querySelectorAll(".fieldHolder"),n=e.querySelectorAll("span.errormsg");Array.prototype.forEach.call(n,(function(e){e.parentNode.removeChild(e)})),Array.prototype.forEach.call(s,(function(e){e.className=e.className.replace("error","").replace("  "," ")}));for(var a=!0,l=0;l<t.fields.length;l++){var r=t.fields[l],o=s[l],c=o.querySelectorAll("input, textarea, select"),d=!1;if(r.settings.required)switch(r.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":0===this._filterCheckedFields(c).length&&(d=!0);break;case"DatePicker":var u=Array.prototype.filter.call(c,(function(e){return-1!==e.className.indexOf("hiddenInput")}));d=!(u[0]&&u[0].value);break;default:var f=c[0].value;f&&f.trim()||(d=!0)}var p=!1;if(!d&&r.settings.validation){var g=c[0].value,b=g&&g.trim();if(b)switch(r.settings.validation){case"email":b.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)||(p=!0);break;case"number":b.match(/^\d+$/)||(p=!0);break;case"regexp":try{r.settings.validation_regexp&&!b.match(r.settings.validation_regexp)&&(p=!0)}catch(v){console.error(v)}}}if((d||p)&&(a=!1,o.className=o.className.split(" ").concat(["error"]).join(" "),p||r.settings.validation_failed_msg)){var h="nl"===i.getLocale()?"nl":"default",m=document.createElement("span");m.className="errormsg",m.textContent=r.settings.validation_failed_msg||this.languageLabels[h].defaultValidation,o.insertAdjacentElement("beforebegin",m)}}return a},_filterCheckedFields:function(e){return Array.prototype.filter.call(e,(function(e){return e.checked}))},_storeFormValues:function(e,t,i){for(var s=i.getProfile(),n=0;n<t.fields.length;n++){var a,l=t.fields[n],r=e.querySelector("div[data-bc-id = '"+l.id+"']").querySelectorAll("input, textarea, select");if(l.settings.storeproperty)switch(l.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var o=[],c=this._filterCheckedFields(r),d=0;d<c.length;d++){var u=c[d].value;u=unescape(u),o.push(u)}if("set"===l.settings.overwriteValue)s.setValues(l.settings.storeproperty,o);else for(var f=0;f<o.length;f++)s.addValue(l.settings.storeproperty,o[f]);break;case"DatePicker":var p=Array.prototype.filter.call(r,(function(e){return-1!==e.className.indexOf("hiddenInput")}));(a=p[0]&&p[0].value)&&("set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a));break;default:a=unescape(r[0].value),"set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a)}}},_tmpl:function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):this.cache[e]=this.cache[e]||_tmpl(document.getElementById(e).innerHTML);return t?i(t):i}});var a = [];var i='forms';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/actionhandlers-frontend/AfterSubmitActionHandler.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,n){this.blueConicClient=e,this.context=n},onLoad:function(){var e=this.context.getParameters(),n=e.gatrackername?e.gatrackername[0]:null,t=e.gaeventname?e.gaeventname[0]:null;this._subscribeLastViewEvent(["cm_lastview",t,n])},_subscribeLastViewEvent:function(e){var n=this;blueConicClient.event.subscribe(e[0],n,function(){e[2]?e[2]=e[2]+".send":e[2]="send",ga(e[2],"event",e[1],"Content Meter Last View",{nonInteraction:1,userId:n.blueConicClient.profile.getProfile().getId()},undefined)})}});var a = [];var i='gacmlastvieweventlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/gacmlastvieweventlistener/ts_c10abff9b4984a9cb1bb3b6b030fd6b6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,i){if(this.blueConicClient=e,this.context=i||null,this.parameters=this.context.getParameters(),this._initPublishedEvents(),this.parameters){this.blueConicClient.event.subscribe("PAGEVIEW",this,(function(){window._bcp=window._bcp||{},window._bcp.publishedEvents=window._bcp.publishedEvents||{},window._bcp.publishedEvents.viewEvent={}})),"true"!==this.parameters.hasOverlay[0]||this._isViewEventPublished()||this._handleView();var t=this.parameters.positions;if(t)for(var n=0;n<t.length;n++){var s=t[n];this.blueConicClient.position.subscribe(s,this,this._handlePosition)}}},_initPublishedEvents:function(){window._bcp=window._bcp||{},window._bcp.publishedEvents=window._bcp.publishedEvents||{},window._bcp.publishedEvents.viewEvent=window._bcp.publishedEvents.viewEvent||{},window._bcp.publishedEvents.clickEvent=window._bcp.publishedEvents.clickEvent||{}},_handleClick:function(){this._isClickEventPublished()||(this._setClickEventPublished(!0),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_handleView:function(){this._setViewEventPublished(!0),this.blueConicClient.createEvent("VIEW",this.context.getInteractionId())},_handlePosition:function(e){this._isViewEventPublished()||this.blueConicClient.isInEditMode()||this._handleView();var i=this;try{var t="bcCtrl"+this.context.getInteractionId();if(this.jQuery(e+" a").off("click."+t).on("click."+t,(function(){i._handleClick()})),this.jQuery(document).off("click."+t).on("click."+t,e+" a",(function(){i._handleClick()})),this.jQuery(document).off("submit."+t).on("submit."+t,e+" form",(function(){i._handleClick()})),this.jQuery(e).find("iframe").length>0){window.focus();var n=!1,s=this.jQuery(this.jQuery(e).find("iframe"));s.off("mouseenter."+t).on("mouseenter."+t,(function(){n=!0})),s.off("mouseleave."+t).on("mouseleave."+t,(function(){n=!1})),document.querySelectorAll(window).removeEventListener("blur."+t).addEventListener("blur."+t,function(){n&&this._handleClick()}.bind(this))}}catch(o){}},onLoad:function(){if(this.parameters){var e=this.parameters.positions;if(e)for(var i=0;i<e.length;i++){var t=e[i];this.jQuery(t).length>0&&this._handlePosition(t)}}},_isViewEventPublished:function(){return Boolean(window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()])},_setViewEventPublished:function(e){window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()]=e},_isClickEventPublished:function(){return Boolean(window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()])},_setClickEventPublished:function(e){window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()]=e}});var a = [];var i='globallistener_controlgroup';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"gtmpf",BLUECONIC_EVENT_PREFIX:"GTM:",init:function(e,t){this.blueConicClient=e,this.context=t||null,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.parameters=this.migrate(this.parameters),this.objectName=this.parameters.objectname&&this.parameters.objectname.length>0&&this.parameters.objectname[0]?this.parameters.objectname[0]:"dataLayer",this._goals=[];var i=t.getGoals().reduce((function(e,t){return e[t.getId()]=!0,e}),{});if(this.parameters.goalParameters)for(var n=0;n<this.parameters.goalParameters.length;n++){var a=e.json.parse(this.parameters.goalParameters[n]);a.active&&i[a.id]&&this._goals.push(a)}this.connectionContext={LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),profile:this.profile,variables:[],SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",RECEIVED_FROM_SYSTEM_PROPERTY:"received_from_system",RECEIVED_FROM_CONNECTION_PROPERTY:"received_from_connection"}},initDataLayerUtil:function(){this.bcConnectionUtil.md5Lib=this.md5,this._bcDatalayerUtil=new this.BlueConicDataLayerUtil(this.objectName,this.blueConicClient,this.bcConnectionUtil,this.context,this.connectionContext,this.profile),this._bcDatalayerUtil.LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._bcDatalayerUtil.VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()},onLoad:function(){this.initDataLayerUtil();var e=this,t=0;(function gtmReady(){if(e._bcDatalayerUtil.getDataLayer())e._handleGoals();else{if(t>20)return;t++,window.setTimeout(gtmReady,250)}}).call(this)},_handleGoals:function(){for(var e=0;e<this._goals.length;e++){var t=this._goals[e],i=t.parameters.segment?t.parameters.segment[0]:null;this._bcDatalayerUtil.visitorInSegment(i)&&("export"===t.type&&this._handleExportGoal(t.parameters,t.id),"import"===t.type&&this._handleImportGoal(t.parameters))}},_handleImportGoal:function(e){var t=this._bcDatalayerUtil.getDataLayer();if(t){this._bcDatalayerUtil.doImport(e),this._publishEvents();var i=this,n=t.length;window.setInterval((function(){t=i._bcDatalayerUtil.getDataLayer(),n!==t.length&&(i._publishEvents(n),n=t.length)}),1e3)}},_publishEvents:function(e){for(var t=this._bcDatalayerUtil.getDataLayer(),i=e=e||0;i<t.length;i++){var n=t[i].event;n&&this.blueConicClient.event.publish(this.BLUECONIC_EVENT_PREFIX+n,[t[i]])}},_handleExportGoal:function(e,t){this._bcDatalayerUtil.doExport(e,t);var i=Array.isArray(e.push_interactions)&&"true"===e.push_interactions[0],n=Array.isArray(e.passOnEvents)&&"true"===e.passOnEvents[0];!window[this.objectName]||window[this.objectName].push?(i&&this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionView),n&&this._subscribeToPassOnEvents()):console.warn("window."+this.objectName+" does not have a push function: is the correct Object Name entered?")},getPreloadProperties:function(){for(var e=[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY],t=0;t<this._goals.length;t++){var i=this._goals[t];if("export"===i.type){e.push(this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()+"_"+i.id),e.push(this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId()+"_"+i.id);for(var n=this.blueConicClient.json.parse(i.parameters.exportMapping),a=0;a<n.length;a++)"property"===n[a].from.dataType&&n[a].from.values.length>0&&e.push(n[a].from.values[0].id)}else for(var r=this.blueConicClient.json.parse(i.parameters.importMapping),s=0;s<r.length;s++)r[s].to.values.length>0&&e.push(r[s].to.values[0].id)}return e},_pushInteractionView:function(e,t){var i=this.blueConicClient.getInteractionNamesById(t);if(null!==i){var n=i.variantName?i.name+" / "+i.variantName:i.name;window[this.objectName].push({event:"bcInteractionView",name:n})}},_subscribeToPassOnEvents:function(){var e,t=[["inactivity","Inactivity"],["exitintent","Exit Intent"],["cm_firstview","Content Meter View 1"],["cm_exceeded","Content Meter Exceeded"],["cm_lastview","Content Meter Last View"],["cm_excluded","Content Meter Excluded View"],["cm_bottom","Content Meter Bottom Range"],["cm_middle","Content Meter Middle Range"],["cm_top","Content Meter Top Range"],["cm_already_viewed","Content Meter Already Viewed"],["cm_free_view","Content Meter Free View"],["cm_last_free_view","Content Meter Last Free View"]];for(e=2;e<10;e++)t.push(["cm_view_"+e,"Content Meter View "+e]);for(e=1;e<10;e++)t.push(["cm_free_view_"+e,"Content Meter Free View "+e]);var i=this;t.forEach((function(e){i.blueConicClient.event.subscribe(e[0],i,(function(){window[this.objectName].push({event:"bcEvent",bcEventName:e[1]})}))}))},migrate:function(e){var t=parseInt(e.version||"2");return!e.usecases&&!e.variables||e.goalParameters||(t=1),t<2&&(e=this._migrateToV2(e),t=2),t<3&&(e=this._migrateToV3(e)),e},_migrateToV2:function(e){var t={objectname:e.objectname},i=[];if(-1!==e.usecases.indexOf("uc2")){var n={id:1,name:"Import",active:!0,type:"import"},a=[];if(e.importVariables&&e.importVariables.length>0)for(var r=this.blueConicClient.json.parse(e.importVariables[0]),s=0;s<r.length;s++)a.push({from:{fieldId:r[s].fieldLabel},to:{type:"property",property:r[s].property},restriction:r[s].restriction,mergeRule:r[s].mergeRule});n.parameters={importMapping:[this.blueConicClient.json.stringify(a)]},i.push(this.blueConicClient.json.stringify(n))}if(-1!==e.usecases.indexOf("uc1")){var o={id:2,name:"Export",active:!0,type:"export"},l=[];if(e.variables&&e.variables.length>0)for(var c=this.blueConicClient.json.parse(e.variables[0]),h=0;h<c.length;h++)l.push({to:{fieldId:c[h].key},from:{type:"pm"===c[h].type?"permission":c[h].type,property:c[h].property,segments:c[h].segments,fieldId:c[h].text}});o.parameters={exportMapping:[this.blueConicClient.json.stringify(l)],eventname:e.eventname,push_frequency:e.push_frequency,push_interactions:e.push_interactions,passOnEvents:e.passOnEvents,triggerEvent:e.triggerEvent},i.push(this.blueConicClient.json.stringify(o))}return t.goalParameters=i,t},_migrateToV3:function(e){return e.goalParameters=(e.goalParameters||[]).map(JSON.parse).map((function(e){if("export"===e.type){var t=e.parameters.eventname?e.parameters.eventname[0]:null;e.parameters.eventname=[t||"BlueConic"]}return JSON.stringify(e)})),e}});var a = [];var i='gtmconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/datalayer_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/lib/jsonpathplus.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.isInEditMode=this.blueConicClient.isInEditMode(),this.fancyBoxLib="frontend/src/lib/fancybox/jquery.fancybox.pack.js";var n=this.context.getInteractionTypeId();this.baseURL=this.blueConicClient.getBaseURL(n);var i=this.parameters.content+"";this.htmlFragment=this.createElement(i),this.profile=t.profile.getProfile(),this.inlineCss=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this._lightboxTriggered=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){var t=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(t,1)}))},getPreloadProperties:function(){for(var t,e=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(t=n.exec(e));)for(var o=t[1].split(","),r=0;r<o.length;r++)i.push(o[r]);for(var a=this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[],c=0;c<i.length;c++)a.push(i[c]);return a},onMessageReceived:function(t){this.blueConicClient.event.publish("lightbox.messageReceived",t)},onLoad:function(){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,window.bcFancyboxLoading?this.blueConicClient.event.subscribe("bcFancyboxLoaded",this,(function(){this.onLoad()})):this.blueConicClient._lightboxinteractiontypeFancybox?(this.jQuery.fancybox=this.blueConicClient._lightboxinteractiontypeFancybox,this._onLoadWithLibrary()):(window.bcFancyboxLoading=!0,this.blueConicClient.util.loadScript(this.baseURL+this.fancyBoxLib,this,(function(){this.blueConicClient._loadLightboxInteractionTypeFancyBox(window,document,this.jQuery),this.blueConicClient._lightboxinteractiontypeFancybox=this.jQuery.fancybox,delete this.blueConicClient._loadLightboxInteractionTypeFancyBox,this._onLoadWithLibrary(),window.bcFancyboxLoading=!1,this.blueConicClient.event.publish("bcFancyboxLoaded")})))},_onLoadWithLibrary:function(){if(this.isInEditMode)this.showLightbox();else{var t=this.parameters.selected_when||[],e=this.getParameter("click_selector");e&&-1!==this.blueConicClient.util.array.indexOfArray(t,"click_selector")&&this._addClickTriggerBindings(e);var n=this.getParameter("content_condition");n&&-1!==this.blueConicClient.util.array.indexOfArray(t,"content_condition")&&this._addContentPolling(n);var i=this.parameters.scroll_depth&&this.parameters.scroll_depth[0]&&!isNaN(this.parameters.scroll_depth[0])?parseInt(this.parameters.scroll_depth[0]):0;i&&-1!==this.blueConicClient.util.array.indexOfArray(t,"scroll_depth")&&this._addScrollBinding(i),0===t.length&&this.showLightbox(),this._addCloseEventHandler()}},_getScrollPercent:function(){return document.documentElement.scrollTop/(document.documentElement.scrollHeight-window.innerHeight)*100},_checkScrollCondition:function(t){this._getScrollPercent()>=t&&this.showLightbox()},_addScrollBinding:function(t){this._checkScrollCondition(t),document.addEventListener("scroll",function(){this._checkScrollCondition(t)}.bind(this))},_addClickTriggerBindings:function(t){try{var e=this.jQuery(t);e.length>0?e.off("click.lightboxinteractiontype").on("click.lightboxinteractiontype",this.jQuery.proxy((function(){this.showLightbox(!0)}),this)):this.blueConicClient.position.subscribe(t,this,this.jQuery.proxy(this._addClickTriggerBindings,this,t))}catch(n){}},_addContentPolling:function(t){this._checkContentCondition(t);var e=this,n=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){e._observeContentChanges(t)})),this._observer.observe(n,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){e._observeContentChanges(t)},n.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var i=setInterval((function(){e._lightboxTriggered?clearInterval(i):e._checkContentCondition(t)}),500)},_observeContentChanges:function(t){if(this._lightboxTriggered){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var e=this,n=(new Date).getTime();this._timestamp=n,setTimeout((function(){e._timestamp!==n||e._lightboxTriggered||e._checkContentCondition(t)}),250)}},_checkContentCondition:function(t){this.jQuery(t).length>0&&this.jQuery(t).html()&&this.jQuery(t).html().length>0&&this.showLightbox()},closeLightbox:function(){this.isInEditMode||this.jQuery.fancybox.close()},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.closeLightbox()}))},showLightbox:function(t){if(-1===this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId())&&(!this._lightboxTriggered||this.isInEditMode||t)){this.blueConicClient._renderedInteractions.push(this.context.getInteractionId());var e=this.parameters.delay&&this.parameters.delay[0]&&!isNaN(this.parameters.delay[0])?1e3*parseInt(this.parameters.delay[0]):0;!this.isInEditMode&&e>0?window.setTimeout(this._showLightbox.bind(this),e):this._showLightbox()}},getSettings:function(){var t=null,e=this.getParameter("width")||null,n=this.getParameter("height")||null,i="true"===this.getParameter("hide_after_close");this.htmlFragment&&(t=this.htmlFragment.innerHTML);var o=!(e||n),r=this.getParameter("show_close"),a=this.getParameter("alternative_close"),c={parent:"body",autoSize:o,autoCenter:!1,autoWidth:!e,autoHeight:!n,closeBtn:"false"!==r,width:e||"auto",height:n||"auto",keys:{close:"false"===a||this.isInEditMode?null:[27]},helpers:{overlay:{locked:!0,closeClick:"false"!==a&&!this.isInEditMode,speedOut:0}}};this.getParameter("template")&&(c.padding=0),(t||this.isInEditMode)&&(c.content=" ",c.type="inline");var s=this,l=this.jQuery,h=this.getParameter("effect"),d=this.getParameter("effect_slide_direction")||"left";if(this.isInEditMode&&(h="noEffect"),h&&"noEffect"!==h&&("fadeIn"===h?l.fancybox.transitions.openEffect=function(){var t=l.fancybox._getPosition(!0);t.opacity=0,l.fancybox.wrap.css(t).show().animate({opacity:1},{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}:"slideIn"===h&&(l.fancybox.transitions.openEffect=function(){var t,e=l.fancybox._getPosition(!0),n=window.innerHeight,i=window.innerWidth,o=l.fancybox.current.wrap[0].getBoundingClientRect(),r="top"===d||"bottom"===d?"top":"left";"top"===d||"bottom"===d?t=n-(n-o.height)/2:"left"!==d&&"right"!==d||(t=i-(i-o.width)/2),e[r]="top"===d||"left"===d?parseInt(e[r])-t+"px":parseInt(e[r])+t+"px";var a={},c="top"===d||"left"===d?"+":"-";a[r]=c+"="+t+"px",l.fancybox.wrap.css(e).show().animate(a,{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}),l.fancybox.transitions.openEffect&&(c.openMethod="openEffect",c.openSpeed=600)),t)c.afterLoad=function(t){s.emptyElementsWithAttribute(s.htmlFragment,"div","data-bc-external");try{t.inner.html(s.htmlFragment.innerHTML)}catch(n){console.error("[BC] Error occured when injecting the HTML in the DOM",n)}s.isInEditMode&&s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s}),s.handleComplexElements(t.inner[0]);var e=s.getParameter("javascript");if(e&&!s.blueConicClient.isInEditMode()){e=e.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+s.context.getInteractionId()+'"$2'),s._inlineJs=s.jQuery("<script>"+e+"<\/script>");try{s._inlineJs.appendTo(s.jQuery("body"))}catch(n){console.error(n)}}};else if(s.isInEditMode){c.afterLoad=function(){s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s})}}return this.isInEditMode?c.afterShow=function(){l(".fancybox-close").off("click.fb")}:i&&(c.afterShow=function(){Array.prototype.forEach.call(document.querySelectorAll(".fancybox-close"),(function(t){t.addEventListener("click",(function(){s.blueConicClient.doNotShowAgain(s.context.getInteractionId())}))}))}),c.afterClose=function(){var t=s.blueConicClient.util.array.indexOfArray(s.blueConicClient._renderedInteractions,s.context.getInteractionId());s.blueConicClient._renderedInteractions.splice(t,1)},c},updateLightbox:function(){this.jQuery.fancybox.update()},getCurrentFancyBox:function(){return this.jQuery.fancybox.current},_showLightbox:function(){this._lightboxTriggered=!0;var t=this.getParameter("close_icon"),e=this.getParameter("close_icon_hover"),n=this,i=this.jQuery;function doLightBox(){if(!this.isInEditMode){this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()),!!this.parameters.forceclick&&("true"===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0])&&this.blueConicClient.createEvent("CLICK",this.context.getInteractionId());var t=this.getParameter("click_event_selector");if(t){this.jQuery("body").one("click",t,function(t){this.lastClickEvent&&this.lastClickEvent.originalEvent===t.originalEvent||this._logClickEvent(t)}.bind(this));try{this.jQuery(t).one("click",function(t){this.lastClickEvent=t,this._logClickEvent(t)}.bind(this))}catch(i){}}}Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.parentNode.removeChild(t)})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.parentNode.removeChild(t)}));var e=function findHighestZIndex(t){var e,n=document.getElementsByTagName(t),i=0,o=0;for(o=0;o<n.length;o++)"auto"!==(e=document.defaultView.getComputedStyle(n[o],null).getPropertyValue("z-index"))&&parseInt(e)>i&&(i=parseInt(e));return i}("*");this.htmlFragment&&(this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this.isInEditMode||this.handlePlaceholders(this.htmlFragment)),this.jQuery.fancybox(this.getSettings());var n=2147483647;e>8e3&&e+1030<n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=e+1030})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=e+920})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=e+910}))),e+1030>=n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=n})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=2147483646})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=2147483645}))),this.isInEditMode||this._setupFrontEndBindings()}this.handleStyling(t,e,(function(t){if(!t||(console.error(t),n.isInEditMode))n.handleJavascript().then((function(){doLightBox.call(n,i)}),(function(t){if(console.error("[BC] Loading Javascript urls for the lightbox failed:",t),n.isInEditMode)doLightBox.call(n,i);else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}));else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}))},_logClickEvent:function(t){t&&t.originalEvent&&t.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||(t.originalEvent&&(t.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setupFrontEndBindings:function(){var t=this.jQuery(".bcLightboxDontShowAgainLink"),e=this.jQuery(".bcLightboxCloseButton");t.length>0&&t.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",function(t){t.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this.closeLightbox()}.bind(this)),e.length>0&&e.off("click.closeButtons").on("click.closeButtons",function(){this.closeLightbox()}.bind(this))},handleComplexElements:function(t){for(var e=this.getElementsWithAttribute(t,"div","data-bc-pluginid"),n=0;n<e.length;n++){var i=e[n],o=i.getAttribute("data-bc-pluginid"),r=i.getAttribute("data-bc-config");if(r)try{var a=r.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");r=this.blueConicClient.json.parse(a)}catch(c){r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:i,interactionId:this.context.getInteractionId()}),this.isInEditMode||(i.removeAttribute("data-bc-pluginid"),i.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(t,e,n){for(var i=this.getElementsWithAttribute(t,e,n),o=0,r=i.length;o<r;o++){i[o].innerHTML=""}},getElementsWithAttribute:function(t,e,n){for(var i=[],o=t.getElementsByTagName(e),r=0,a=o.length;r<a;r++){var c=o[r];c.getAttribute(n)&&i.push(c)}return i},createElement:function(t){var e;if(!t)return null;try{(e=document.createElement("div")).innerHTML=t}catch(n){return null}return e},handlePlaceholders:function(t){for(var e=this._getPropertiesFromPlaceholders(t.innerHTML),n=0;n<e.length;n++){var i=e[n],o=this.profile.getValue(i)||"",r=new RegExp("\\$\\{"+i+"\\}","g");t.innerHTML=t.innerHTML.replace(r,encodeURI(o))}},_getPropertiesFromPlaceholders:function(t){for(var e,n=/\$\{([a-zA-Z\-_0-9]+)\}/g,i=[];e=n.exec(t);)i.push(e[1]);return i},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]||null},handleJavascript:function(){var t=this.jQuery,e=this.getParameters("javascript_urls"),n=[];if(e){this.javascriptUrls=e;for(var i=0;i<e.length;i++)n.push(this._getLoadScriptDeferred(e[i]))}return t.when.apply(t,n)},_getLoadScriptDeferred:function(t){var e=this.jQuery.Deferred(),n=document.createElement("script");return n.setAttribute("src",t),n.onload=function(){e.resolve()},n.onerror=function(){e.reject('Url "'+t+"\" couldn't be loaded")},document.head.appendChild(n),e},handleStyling:function(t,e,n){var i=this.getParameter("content"),o=[this.baseURL+"frontend/src/lib/fancybox/jquery.fancybox.css"];i&&-1!==i.indexOf("bcLightboxTemplate")||o.push(this.baseURL+"frontend/src/css/lightbox.css");var r=this.getParameter("styling_css");r&&(this.stylingUrl=r,o.push(r));var a="";"true"===this.getParameter("custom_close")&&t&&(a+=".fancybox-close {background-image: url('"+t+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}",e&&(a+=".fancybox-close:hover {background-image: url('"+e+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}"));var c=this.getParameter("close_position"),s=this.getParameter("close_padding");a+=this._getClosePositionStyling(c,s);var l=this.getParameter("styling_css_inline");return l&&(a+=l.replace(/&#xd;/gi,"")),a&&(this.inlineCss=this.jQuery("<style>"+a+"</style>"),this.inlineCss.appendTo(this.jQuery("body"))),this._loadCssUrls(o,n)},_loadCssUrls:function(t,e){var n=(t=t||[]).length,i=0,o=[];if(0===n)return e();function urlLoaded(){if(++i>=n)return o.length>0?e(o):e()}t.forEach((function(t){if(document.querySelector('link[href="'+t+'"]'))urlLoaded();else{var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e.onload=urlLoaded,e.onerror=function(t){o.push(t),urlLoaded()},document.head.appendChild(e)}}))},_getClosePositionStyling:function(t,e){if(!t)return"";null!==e&&"NaN"!==e||(e="-18");var n=".fancybox-close {";switch(t){case"TOP_LEFT":n+="top:"+e+"px; right: unset; bottom: unset; left:"+e+"px;";break;case"BOTTOM_RIGHT":n+="top: auto; right: "+e+"px; bottom: "+e+"px; left: unset;";break;default:n+="top: "+e+"px; right: "+e+"px; bottom: unset; left: unset;"}return n+"}"}});var a = [];var i='lightboxinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.4.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.4.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({EVENT_NAME:"adblock_detected",init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.property?e.property[0]:e.property;return t?[t]:[]},onLoad:function(){var e=this,t=this.context.getProfile(),n=this.context.getParameters(),o=n.property?n.property[0]:n.property;o||(o=this.EVENT_NAME);var adBlockNotDetected=function(){"no"!==t.getValue(o)&&(t.setValue(o,"no"),e.blueConicClient.profile.updateProfile())},r=window.navigator.userAgent;/MSIE|Trident/.test(r)?adBlockNotDetected():justDetectAdblock.detectAnyAdblocker().then((function(n){n?("yes"!==t.getValue(o)&&(t.setValue(o,"yes"),e.blueConicClient.profile.updateProfile()),e.blueConicClient.createEvent(e.EVENT_NAME)):adBlockNotDetected()}))}});var a = [];var i='listener_adblock';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/frontend/src/lib/just-detect-adblock.min.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({AMP_CLIENT_ID:"amp_client_id",AMP_BC:"amp_bc",init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters()},getPreloadedProperties:function(){return[this.AMP_CLIENT_ID]},onLoad:function(){var e=this.context.getProfile(),t=this._getClientIdFromURL();t&&-1===e.getValues(this.AMP_CLIENT_ID).indexOf(t)&&(e.addValue(this.AMP_CLIENT_ID,t),this.blueConicClient.profile.updateProfile())},_getClientIdFromURL:function(){var e=new RegExp("[\\?&#]"+this.AMP_BC+"=([^&#]*)").exec(window.location.href),t=(null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))).split("amp_cid*");return t[1]?window.atob(t[1].replace(/\.+$/,"")):null}});var a = [];var i='listener_amp';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.responseProperty?e.responseProperty[0]:e.responseProperty;return t?(this.campaignIdentifierProperty=t,[t]):(this.campaignIdentifierProperty="responded_to_campaigns",["responded_to_campaigns"])},onLoad:function(){var e=this.context.getProfile(),t=this.context.getParameters(),r=this.blueConicClient,n=!1,i=!1,o=t.config?t.config[0]:t.config;if(o){for(var a=this.blueConicClient.json.parse(o),c=0;c<a.length;c++){var p=a[c],l=this.getParameterByName(p.parameter);l&&p.profileProperty&&(e.addValue(p.profileProperty,l),n=!0,p.isCampaignIdentifier&&!i&&(this._bindHandlers(l),i=!0))}n&&r.profile.updateProfile()}},_bindHandlers:function(e){var t=this,r=this.context.getProfile(),n=this.blueConicClient,i=document.querySelectorAll("a");Array.prototype.forEach.call(i,(function(i){i.addEventListener("click",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}));i=document.querySelectorAll("form");Array.prototype.forEach.call(i,(function(i){i.addEventListener("submit",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}))},getParameterByName:function(e){if(!e)return"";e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&#]"+e+"=([^&#]*)").exec(this.getLocationHref());return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},getLocationHref:function(){return window.location.href}});var a = [];var i='listener_campaign_tracker';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PARAMETERS:{ENGAGEMENT_PROPERTY:"engagementProperty",ENGAGEMENT_SCORE_PROPERTY:"engagementScoreProperty",DECAY:"decay",ENGAGEMENT_ON_CHANNEL:"engagementOnChannel"},DEFAULTS:{ENGAGEMENT:"engagement",ENGAGEMENT_SCORE:"engagement_score",VISITS:"visits",CLICKCOUNT:"clickcount"},SCORES:{LOW:"low",MEDIUM:"medium",HIGH:"high"},DEFAULT_DECAY:50,init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=t.getParameters(),this._channelId=e.getChannelId();var i="true"===this.getParameterValue(this.PARAMETERS.ENGAGEMENT_ON_CHANNEL)&&this._channelId;this.properties={engagement:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),engagementScore:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_SCORE_PROPERTY,this.DEFAULTS.ENGAGEMENT_SCORE),engagementObject:"_"+this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),visits:this.DEFAULTS.VISITS+(i?"_"+this._channelId:""),clickcount:this.DEFAULTS.CLICKCOUNT+(i?"_"+this._channelId:"")};var r=new Date(2015,0,1,0,0,0,0),n=(new Date).getTime()-r.getTime();this.days=Math.floor(n/864e5),this.weekNr=Math.floor(this.days/7),this.decay=parseInt(this.getParameterValue(this.PARAMETERS.DECAY))||this.DEFAULT_DECAY},getPreloadProperties:function(){return[this.properties.engagementObject,this.properties.visits,this.properties.clickcount]},onLoad:function(){var e=this.context.getProfile(),t=e.getValue(this.properties.clickcount)?parseInt(e.getValue(this.properties.clickcount)):0,i=e.getValue(this.properties.visits)?parseInt(e.getValue(this.properties.visits)):0,r=e.getValues(this.properties.engagementObject).map(function(e){return this.blueConicClient.json.parse(e)||{}}.bind(this)),n=this._clearInvalidValues(r,i),s=n.cleanedValues,a=this._sumInternalValues(s),h=this._addCurrentWeek(a,t,i),o=this._getCalculated(a,i,t),c=this._calculateScore(o);isNaN(c)||((h||s.length>1||n.removedValues)&&e.setValue(this.properties.engagementObject,JSON.stringify(a)),this._setEngagement(e,c))},getParameterValue:function(e,t){return this.parameters&&this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:t},_clearInvalidValues:function(e,t){var i=!1;return e.forEach(function(e){var r=Object.keys(e).filter(function(e){return-1!==e.indexOf("v")}).map(function(e){return parseInt(e.substring(1))});r.sort(function(e,t){return t-e}),r.forEach(function(r){(i||e["v"+r]>t||e["v"+r]<0)&&(delete e["v"+r],delete e["c"+r],i=!0)})},this),{removedValues:i,cleanedValues:e}},_sumInternalValues:function(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(i){t[i]=(t[i]||0)+e[i]})}),t},_setEngagement:function(e,t){var i=this.context.getParameters(),r=parseInt(i.lowTreshold?i.lowTreshold[0]:i.lowTreshold),n=parseInt(i.highTreshold?i.highTreshold[0]:i.highTreshold),s=this.SCORES.MEDIUM;t<r?s=this.SCORES.LOW:t>n&&(s=this.SCORES.HIGH),e.setValue(this.properties.engagementScore,t),e.setValue(this.properties.engagement,s),this.blueConicClient.profile.updateProfile()},_addCurrentWeek:function(e,t,i){var r=!1;return e["v"+this.weekNr]||(e["v"+this.weekNr]=i,r=!0),e["c"+this.weekNr]||(e["c"+this.weekNr]=t,r=!0),r},_calculateScore:function(e){for(var t=0,i=0;i<e.length;i++){var r=this._getWeight(i+1,this.decay),n=e[i];t+=(n.clickCount+5*n.visits)*r}return t=Math.floor(t)},_getWeight:function(e,t){return e<=.1*t?1:e<=.2*t?.8:e<=.4*t?.5:e<=t?.3:.1},_getCalculated:function(e,t,i){for(var r=[],n=this.weekNr;n>0;n--){var s=0;e["v"+n]&&(t-=s=Math.max(t-e["v"+n],0));var a=0;e["c"+n]&&(i-=a=Math.max(i-e["c"+n],0)),r.push({week:n,visits:s,clickCount:a})}return r}});var a = [];var i='listener_engagement';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(n,t){this.blueConicClient=n,this.context=t},getPreloadProperties:function(){return[]},onLoad:function(){}});var a = [];var i='listener_geolocation';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId()),this.internalProperty="_"+this.context.getInteractionId(),this.BEHAVIOR={PAGEVIEW:"PAGEVIEW",SCROLL:"PAGESCROLL",CLICK:"CLICK",EVENT:"EVENT",FORM:"FORMSUBMIT"},this.SAVE_POINTS_EVENT="engagementRanker.savePoints",this.DEFAULT_RESTRICTION_OPERATOR="AND"},onLoad:function(){window._bcp.engagementRanker.$=this.jQuery,0!==this.preLoadProperties.length&&this._execute()},getPreloadProperties:function(){this.preLoadProperties=[];var e=this.parameters.storeInInterests&&this.parameters.storeInInterests[0]?this.blueConicClient.json.parse(this.parameters.storeInInterests[0]):[];return this.preLoadProperties=e.filter((function(e){return e.property})).map((function(e){return e.property+"_index"})),this.preLoadProperties},_execute:function(){var e=window._bcp.engagementRanker.util,t=window._bcp.engagementRanker.metadataService,i=e.getParameters(this.parameters);this._initExecuter(i);var n=i.restrictions||{rules:[]};if(t.checkRestrictions(n.rules,n.operator||this.DEFAULT_RESTRICTION_OPERATOR)){this._checkScoreProperties(),this._subscribeSavePointsListener();var r=this.parameters.keywordsSources&&this.parameters.keywordsSources[0]?this.blueConicClient.json.parse(this.parameters.keywordsSources[0]):[];return(r=r.filter((function(t){return e.getHandler(t.id)||console.log("Could not find handler for",t.id),t.selected&&e.getHandler(t.id)}))).forEach((function(e){this._executer.addToRulesMap(e)}),this),this.jQuery.when(this._executer.loadLibraries(r)).then(function(){return this._executer.addBindings()}.bind(this),(function(e){console.log("Failed to load libraries")}))}},_initExecuter:function(e,t){this._executer=new window._bcp.engagementRanker.Executer(this.blueConicClient,this.context,e,this.jQuery,this.baseURL,{postponeTimeout:this.postponeTimeout})},_subscribeSavePointsListener:function(){this.blueConicClient.event.subscribe(this.SAVE_POINTS_EVENT,this,(function(e,t){(t=t||e).internalProperty===this.internalProperty&&this._savePoints(t.changes)}))},_checkScoreProperties:function(){var e=this.blueConicClient.profile.getProfile(),t=!1;this.preLoadProperties.filter((function(t){return 0===e.getValues(t).length})).forEach((function(i){t=!0,e.setValue(i,"0")})),t&&this.blueConicClient.profile.updateProfile()},_savePoints:function(e){if(e&&e.length>0){var t=window._bcp.engagementRanker.util,i={TIME:(new Date).getTime(),days:t.getDays(this.blueConicClient.getCurrentDate()),data:e};this.blueConicClient.profile.getProfile().addValue(this.internalProperty,this.blueConicClient.json.stringify(i)),this.blueConicClient.profile.updateProfile()}}});var a = [];var i='listener_interest_ranker';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/Util.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/Executer.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/MetaKeywordRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/TextRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/UrlRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/MetadataService.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/JavascriptRanker.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){return["ip_address"]},onLoad:function(){var e=this.context.getProfile(),t=e.getValue("ip_address"),i=this.blueConicClient.getIPAddress();i!==t&&(e.setValue("ip_address",i),this.blueConicClient.profile.updateProfile())}});var a = [];var i='listener_ip_address';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;var c=b.getParameters();if(c.selector&&c.selector[0]&&(this.selector=c.selector[0]),c.autoPlayFlag&&c.autoPlayFlag[0]&&(this.autoPlayFlag=c.autoPlayFlag[0]),c.urlRestriction&&c.urlRestriction[0])try{this.urlRestriction=new RegExp(c.urlRestriction[0])}catch(b){a.util.log("[ERROR] "+b.message)}this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,this._findMediaElement),this._reset()},_reset:function(){this._playFired={},0<document.querySelectorAll(this.selector).length?this._positionFound():this.blueConicClient.position.subscribe(this.selector,this,this._positionFound),this.progressInterval&&clearInterval(this.progressInterval),this.playedPercentage=0},_onEnded:function(a){var b=a.target.getAttribute("src");this._playFired[b]&&(this.urlRestriction&&!this.urlRestriction.test(b)||(this._checkProgress(a.target),window._bcMediaPlayer.lastEvent="media:ended",this.blueConicClient.createEvent("media:ended",[a.target]),clearInterval(this.progressInterval)))},_checkProgress:function(a){if(!isNaN(a.currentTime)&&!(isNaN(a.duration)||a.duration===Infinity)){var b=Math.floor(100*(a.currentTime/a.duration));if(0!==b){for(var c=this.playedPercentage+1;c<=b;c++)(0==c%10||0==c%25)&&(window._bcMediaPlayer.lastEvent="media:played_"+c+"%",this.blueConicClient.event.publish("media:played_"+c+"%",[a]));this.playedPercentage=b}}},_onPlaying:function(a){var b=a.target.getAttribute("src");(window._bcMediaPlayer={},!!b)&&(this._playFired[b]||this.urlRestriction&&!this.urlRestriction.test(b)||(window._bcMediaPlayer.video=b,window._bcMediaPlayer.lastEvent="media:play",this.blueConicClient.createEvent("media:play",[a.target]),this._playFired[b]=!0,this.progressInterval=setInterval(this._checkProgress.bind(this),1e3,a.target)))},_positionFound:function(){for(var a=document.querySelectorAll(this.selector),b=!1,c=0;c<a.length;c++)if("IFRAME"===a[c].tagName){var d=a[c];d.contentDocument&&d.contentDocument.children&&0<d.contentDocument.children.length?this._createMediaEvents(d.contentDocument.children[0]):(d.addEventListener("load",this._positionFound.bind(this)),b=!0)}else this._createMediaEvents(a[c]);b||this.blueConicClient.position.subscribe(this.selector,this,this._positionFound)},_createMediaEvents:function(a){a&&!a.getAttribute("data-blueconic-media-listener")&&("true"===this.autoPlayFlag?this._chromeAutoPlay(a):this._bindMediaEvents(a))},_bindMediaEvents:function(a){a.addEventListener("ended",this._onEnded.bind(this),!0),a.addEventListener("playing",this._onPlaying.bind(this),!0),a.setAttribute("data-blueconic-media-listener",!0)},_chromeAutoPlay:function(a){if(!!window.chrome&&(!!window.chrome.webstore||!!window.chrome.runtime)){var b=a.play();b===void 0?this._bindMediaEvents(a):b.then(function(){a.addEventListener("ended",this._onEnded.bind(this),!0),this.progressInterval=setInterval(this._checkProgress.bind(this),1e3,a),a.setAttribute("data-blueconic-media-listener",!0);var b=a.getAttribute("src");window._bcMediaPlayer={},window._bcMediaPlayer.video=b,window._bcMediaPlayer.lastEvent="media:play",this.blueConicClient.createEvent("media:play",[a])}.bind(this)).catch(function(a){blueConicClient.util.log("[BC][ERROR] MEDIA LISTENER Autoplay Error: "+a)})}else this._bindMediaEvents(a)}});var a = [];var i='listener_media';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_media/ts_7385f256e99a5d23637d33d7589bbd80/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2017,8,1,0,0,0,0),d=this.blueConicClient.getCurrentDate().getTime(),e=d-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),c=b.property?b.property[0]:b.property;if(c){var d=this.blueConicClient.util.array.ensureArray(b.excludedKeywords),e=this.blueConicClient.json.parse(c)[0].profileproperty,f=[],g=document.getElementsByTagName("meta");if(g)for(var h=!1,j=0,k=g.length;j<k;j++)if("news_keywords"===g[j].name.toLowerCase()){var l=g[j].content.split(",");0===l.length||1===l.length&&""===l[0]||(f=l,h=!0)}else h||0!==f.length||"keywords"!==g[j].name.toLowerCase()||(f=g[j].content.split(","));if(0<f.length){for(var m,n={TIME:new Date().getTime(),days:this.days,points:1,keywords:[]},o=0;o<f.length;o++)m=this._trim(f[o]),""!==m&&-1===this.blueConicClient.util.array.indexOfArray(d,m)&&n.keywords.push(m);0<n.keywords.length&&(a.addValue("_hl_"+e,this.blueConicClient.json.stringify(n)),this.blueConicClient.profile.updateProfile())}}},_trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}});var a = [];var i='listener_meta_keywords_ranker';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2017,8,1,0,0,0,0),d=this.blueConicClient.getCurrentDate().getTime(),e=d-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),c=b.property?b.property[0]:b.property;if(c){var d=this.blueConicClient.json.parse(c)[0].profileproperty,e=this.blueConicClient.getCurrentDate(),f=this._getTimeFrame(e.getHours(),b.locale[0]),g={TIME:new Date().getTime(),data:[]};g.data.push({n:f,p:1,d:this.days}),a.addValue("_hl_"+d,this.blueConicClient.json.stringify(g)),this.blueConicClient.profile.updateProfile()}},_getTimeFrame:function(a,b){return this._getHour(a,b)+" - "+this._getHour(a+1,b)},_getHour:function(a,b){if("en-us"===b){var c=12<=a?"PM":"AM";return a%=12,a=0===a?12:a,a+" "+c}return a=10>a?"0"+a:a,a+":00"}});var a = [];var i='listener_preferred_hour';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2012,0,1,0,0,0,0),d=new Date,e=d.getTime()-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getParameters(),b=a.config?a.config[0]:a.config;if(b){var c=this.blueConicClient.json.parse(b),d=document.location.href;(0<=d.indexOf("#")||0<=d.indexOf("?"))&&(d=d.substring(0,d.indexOf("#"))||d.substring(0,d.indexOf("?")));var e,f=d.split("/"),g=!1;for(e=0;e<c.length;e++){var h=c[e],i=f[e+3];h.checked&&h.profileProperty&&!g&&(this._storeEngagement(h.profileProperty,this._getValue(i)),i&&30<i.length&&h.checked&&(g=!0))}this.blueConicClient.profile.updateProfile()}},_getValue:function(a){return a?30<a.length?null:(0<=a.indexOf(".")&&(a=a.substring(0,a.indexOf("."))),isNaN(a)&&"index"!==a&&0!==a.indexOf("index.")?a:null):null},_storeEngagement:function(a,b){if(b){var c=this.context.getProfile(),d={TIME:new Date().getTime()};d[b]={},d[b]["p"+this.days]=1,c.addValue("_"+a,this.blueConicClient.json.stringify(d))}}});var a = [];var i='listener_url_structure';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.20/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,_profile:null,_userLanguage:null,_systemLanguage:null,_language:null,_referrer:null,_hostName:null,_currentUrl:null,_domain:null,ORIGIN_TYPES:{WEB:"web",MOBILE_WEB:"mobile_web",CONNECTION:"connection",MOBILE:"mobile_app"},CONSTANTS:{THIRTY_MINUTES_IN_MS:18e5,UNKNOWN:""},PROFILE_PROPERTIES:{CLICKCOUNT:"clickcount",VISITS:"visits",VISITCLICKS:"visitclicks",LASTVISITDATE:"lastvisitdate",VISITEDSITES:"visitedsites",VISITEDDOMAIN:"visiteddomain",ENTRYPAGE:"entrypage",REFERRERHOST:"referrerhost",REFERRERHOSTS:"referrerhosts",HOSTENTRYPAGE:"hostentrypage",HOSTAVERAGETIME:"hostaveragetime",LASTREFERRERAVERAGE:"lastreferreraverage",AVERAGETIME:"averagetime",TOTALVISITTIME:"totalvisittime",RESOLUTION:"resolution",CURRENTRESOLUTION:"currentresolution",CURRENTSCREENWIDTH:"currentscreenwidth",CURRENTSCREENHEIGHT:"currentscreenheight",ORIGIN_TYPE:"origin_type",ORIGIN_SOURCE:"origin_source",ORIGIN_DETAIL:"origin_detail",DEVICETYPE:"devicetype",RECEIVED_FROM_SYSTEM:"received_from_system",RECEIVED_FROM_CONNECTION:"received_from_connection",MOBILE_APP_ID:"mobile_app_id",MOBILE_APP_NAMEVERSION:"mobile_app_nameversion",LANGUAGE:"language",KEYWORDS:"keywords",CURRENTKEYWORDS:"currentkeywords",CURRENT_UTM_SOURCE:"current_utm_source",CURRENT_UTM_MEDIUM:"current_utm_medium",CURRENT_UTM_TERM:"current_utm_term",CURRENT_UTM_CONTENT:"current_utm_content",CURRENT_UTM_CAMPAIGN:"current_utm_campaign",UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",UTM_CAMPAIGN:"utm_campaign"},PROFILE_PROPERTIES_FOR_CHANNEL:{},init:function(e,t){this.blueConicClient=e,this.context=t,this._profile=e.profile.getProfile(),this._channelId=e.getChannelId(),this._referrer=document.referrer,this._hostName=window.location.hostname,this._currentUrl=window.location.href,this._domain=document.domain,this._userLanguage=window.navigator.userLanguage,this._systemLanguage=navigator.systemLanguage,this._language=window.navigator.language,this.PROFILE_PROPERTIES_FOR_CHANNEL={CLICKCOUNT:this.PROFILE_PROPERTIES.CLICKCOUNT+"_"+this._channelId,VISITS:this.PROFILE_PROPERTIES.VISITS+"_"+this._channelId,VISITCLICKS:this.PROFILE_PROPERTIES.VISITCLICKS+"_"+this._channelId,LASTVISITDATE:this.PROFILE_PROPERTIES.LASTVISITDATE+"_"+this._channelId}},onPrepare:function(){this._profile&&(this._setLanguageProperties(),this._setResolutionProperties(),this._setReferrerProperties(),this._setCampaignProperties())},onLoad:function(){this._profile&&(this._setReferrerHostOnLoad(),this._setVisitProperties(),this._setOriginProperties(),this.blueConicClient.profile.updateProfile())},getPreloadProperties:function(){return[this.PROFILE_PROPERTIES.CLICKCOUNT,this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE,this.PROFILE_PROPERTIES.VISITEDSITES,this.PROFILE_PROPERTIES.ENTRYPAGE,this.PROFILE_PROPERTIES.HOSTENTRYPAGE,this.PROFILE_PROPERTIES.HOSTAVERAGETIME,this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,this.PROFILE_PROPERTIES.AVERAGETIME,this.PROFILE_PROPERTIES.TOTALVISITTIME,this.PROFILE_PROPERTIES.RESOLUTION,this.PROFILE_PROPERTIES.DEVICETYPE,this.PROFILE_PROPERTIES.ORIGIN_TYPE,this.PROFILE_PROPERTIES.ORIGIN_SOURCE,this.PROFILE_PROPERTIES.ORIGIN_DETAIL,this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM,this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION,this.PROFILE_PROPERTIES.VISITEDDOMAIN,this.PROFILE_PROPERTIES.MOBILE_APP_ID,this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION,this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE]},_setLanguageProperties:function(){var e=this._userLanguage||this._systemLanguage||this._language,t=this._normalizeLocale(e).split("-")[0];t&&this._profile.setValue(this.PROFILE_PROPERTIES.LANGUAGE,t)},_normalizeLocale:function(e){return e&&e.replace("_","-").toLowerCase()},_setResolutionProperties:function(){var e=screen.width,t=screen.height;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENWIDTH,e),this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENHEIGHT,t);var i=e+"x"+t;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTRESOLUTION,i),this._profile.addValue(this.PROFILE_PROPERTIES.RESOLUTION,i)},_setReferrerProperties:function(){this._setReferrerKeywords(),this._setReferrerHost()},_setReferrerKeywords:function(){var e=this.HELPER.decodeReferrer(this._referrer)||[];e.length>0&&(this._addProfileValues(this.PROFILE_PROPERTIES.KEYWORDS,e),this._profile.setValues(this.PROFILE_PROPERTIES.CURRENTKEYWORDS,e))},_addProfileValues:function(e,t){(Array.isArray(t)?t:[t]).forEach((function(t){this._profile.addValue(e,t)}),this)},_setReferrerHost:function(){var e=this._getReferrerHost();e!==this._hostName&&(this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl),e&&(this._profile.setValue(this.PROFILE_PROPERTIES.REFERRERHOST,e),this._profile.addValue(this.PROFILE_PROPERTIES.REFERRERHOSTS,e)))},_setReferrerHostOnLoad:function(){var e=this._getReferrerHost();e!==this._hostName&&this._setHostEntryPageProperty(),this._setHostTotalAndAverageTimeProperty(this._hostName,e)},_getReferrerHost:function(){return this._referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,"$1")},_setCampaignProperties:function(){[this.PROFILE_PROPERTIES.UTM_SOURCE,this.PROFILE_PROPERTIES.UTM_MEDIUM,this.PROFILE_PROPERTIES.UTM_TERM,this.PROFILE_PROPERTIES.UTM_CONTENT,this.PROFILE_PROPERTIES.UTM_CAMPAIGN].forEach((function(e){var t=this._removeHashPart(this.HELPER._getParameterByName(this._currentUrl,e));t&&(this._profile.setValue("current_"+e,t),this._profile.addValue(e,t))}),this)},_setHostEntryPageProperty:function(){this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl);var e=this._getHostEntryPageMapping();e[this._hostName]={entrypage:this._currentUrl},this._profile.setValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE,JSON.stringify(e))},_getHostEntryPageMapping:function(){return this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE))},_safeJSONParse:function(e){try{var t=e.replace(/'/g,'"');return JSON.parse(t)||{}}catch(i){return{}}},_setHostTotalAndAverageTimeProperty:function(e,t){var i=this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME));i[e]||(i[e]=this._createNewVisitData());var s=this.blueConicClient.getCurrentDate().getTime(),E=this._profile.getValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE),r=0,R=0,I=0;Object.keys(i).map((function(e){return e.toString()})).forEach((function(_){var n=i[_];this._isSessionExpired(n.enddate)?this._addVisit(n,n.enddate-n.startdate):_===e?n.enddate=s:_===t&&E!==t&&(n.enddate=s,this._profile.setValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,t)),0!==n.averageTime&&(R++,r+=n.averageTime,I+=n.averageTime*n.visits)}),this),this._profile.setValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME,JSON.stringify(i)),this._profile.setValue(this.PROFILE_PROPERTIES.TOTALVISITTIME,I);var _=R>0?Math.round(r/R):0;this._profile.setValue(this.PROFILE_PROPERTIES.AVERAGETIME,_)},_addVisit:function(e,t){if(t>0){var i=e.averageTime*e.visits+t/1e3;e.visits++,e.averageTime=Math.round(i/e.visits)}var s=this.blueConicClient.getCurrentDate().getTime();e.startdate=s,e.enddate=s},_createNewVisitData:function(){var e=this.blueConicClient.getCurrentDate().getTime();return{startdate:e,enddate:e,averageTime:0,visits:0}},_setPropertyIfEmpty:function(e,t,i){"undefined"==typeof e[t]&&(e[t]=i)},_setVisitProperties:function(){this._addVisitedDomain(this._domain),this._increaseClickCount(),this._increaseVisits(this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE),this._channelId&&this._increaseVisits(this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE)},_increaseVisits:function(e,t,i){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.VISITCLICKS,i=i||this.PROFILE_PROPERTIES.LASTVISITDATE,this._isNewSession(e,i)?(this._resetPageViewsCurrentSession(t),this._increaseSessionCount(e)):this._increasePageViewsCurrentSession(t),this._setLastVisitDate(i,this.blueConicClient.getCurrentDate().getTime())},_setLastVisitDate:function(e,t){e=e||this.PROFILE_PROPERTIES.LASTVISITDATE,this._profile.setValue(e,t)},_addVisitedDomain:function(e){this._hasVisitedDomain(e)||this._profile.addValue(this.PROFILE_PROPERTIES.VISITEDSITES,e)},_hasVisitedDomain:function(e){var t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[];return t.length>0&&-1!==t.indexOf(e)},_increaseClickCount:function(){var e=this._getNumberProperty(this.PROFILE_PROPERTIES.CLICKCOUNT);if(this._profile.setValue(this.PROFILE_PROPERTIES.CLICKCOUNT,e+1),this._channelId){var t=this._getNumberProperty(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT);this._profile.setValue(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,t+1)}},_isNewSession:function(e,t){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.LASTVISITDATE;var i=this._getNumberProperty(e),s=this._getNumberProperty(t)||0;return 0===i||this._isSessionExpired(s)},_isSessionExpired:function(e){return this.blueConicClient.getCurrentDate().getTime()>e+this.CONSTANTS.THIRTY_MINUTES_IN_MS},_resetPageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS,this._profile.setValue(e,1)},_increasePageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS;var t=this._getNumberProperty(e);this._profile.setValue(e,t+1)},_increaseSessionCount:function(e){e=e||this.PROFILE_PROPERTIES.VISITS;var t=this._getNumberProperty(e);this._profile.setValue(e,t+1)},_setOriginProperties:function(){var e=this._getOriginCount();e>1?this._mergeOriginProperties():0===e&&this._resolveOriginProperties()},_getOriginCount:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_TYPE)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_SOURCE)||[],i=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)||[];return Math.max(e.length,t.length,i.length)},_mergeOriginProperties:function(){this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_TYPE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_SOURCE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)},_mergePropertyToUnknown:function(e){var t=this._profile.getValues(e)||[];this._profile.setValue(e,1===t.length?t[0]:this.CONSTANTS.UNKNOWN)},_resolveOriginProperties:function(){this._isVisitorOriginFromWeb()?this._resolveOriginForWebVisitor():this._isVisitorOriginFromConnection()?this._resolveOriginForProfileComingFromConnection():this._isVisitorOriginFromMobileApp()&&this._resolveOriginForMobileAppVisitor()},_isVisitorOriginFromWeb:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[];return 0===e.length&&0===t.length},_isVisitorOriginFromMobileApp:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return t.length>0&&0===e.length&&0===i},_isVisitorOriginFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM),t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID),i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return e&&e.length>0&&t&&0===t.length&&i<=0},_resolveOriginForWebVisitor:function(){var e="",t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[],i=this._profile.getValue(this.PROFILE_PROPERTIES.DEVICETYPE)||"",s=this._profile.getValues(this.PROFILE_PROPERTIES.ENTRYPAGE)||[];i&&(e="PC"===i?this.ORIGIN_TYPES.WEB:this.ORIGIN_TYPES.MOBILE_WEB);var E=1===t.length?t[0]:this.CONSTANTS.UNKNOWN,r=1===s.length?s[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(e,E,r)},_resolveOriginForProfileComingFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.CONNECTION,i,s)},_resolveOriginForMobileAppVisitor:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.MOBILE,i,s)},_setOriginProfileProperties:function(e,t,i){this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_TYPE,e),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_SOURCE,t),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_DETAIL,i)},_removeHashPart:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},HELPER:{search_engines:[["google\\.","q"],["bing\\.","q"],["search\\.yahoo\\.","p"],["search\\.aol\\.","q"],["duckduckgo\\.","q"],["baidu\\.","wd"],["ask\\.com","q"],["search\\.lycos\\.","q"],["dogpile\\.com","q"]],substringToHash:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},decodeReferrer:function(e){for(var t=new RegExp(""),i=0;i<this.search_engines.length;i++){var s=this.search_engines[i];t.compile("^http(s?)://(www\\.)?"+s[0],"i");var E=e.match(t);if(E){var r;if(r=isNaN(s[1])?this._getParameterByName(e,s[1]):E[s[1]+1])return r=decodeURIComponent(r),s.length>2&&s[2]&&(r=decodeURIComponent(r)),r=(r=(r=r.replace(/'|"/g,"")).split(/[\s,+.]+/)).filter((function(e){return e}));break}}return null},_getParameterByName:function(e,t){if(!t)return"";t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))}},_getNumberProperty:function(e){var t=this._profile.getValue(e);if(!t)return 0;try{t=parseInt(t),isNaN(t)&&(t=0)}catch(i){t=0}return t}});var a = [];var i='listenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({LAST_VISIT_COOKIE_NAME:'last_visit_bc',NEW_VISIT_PROPERTY:'new_visit_bc',SESSION_TIMEOUT_MINUTES:30,init:function(a){this.blueConicClient=a,this.profile=a.profile.getProfile()},onPrepare:function(){var a=this.blueConicClient.getCurrentDate().getTime(),b=this.blueConicClient.util.cookie.getCookie(this.LAST_VISIT_COOKIE_NAME);if(b&&!isNaN(parseInt(b))){var c=new Date(parseInt(b));c.setMinutes(c.getMinutes()+this.SESSION_TIMEOUT_MINUTES),a>c?this.profile.setValue(this.NEW_VISIT_PROPERTY,'true'):this.profile.setValue(this.NEW_VISIT_PROPERTY,'false')}else this.profile.setValue(this.NEW_VISIT_PROPERTY,'true');this.blueConicClient.util.cookie.setCookie(this.LAST_VISIT_COOKIE_NAME,a)},onLoad:function(){'true'===this.profile.getValue(this.NEW_VISIT_PROPERTY)&&this.blueConicClient.createEvent('new_visit')}});var a = [];var i='newvisitlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({open:!1,data:{},nrOfTries:0,closeButtonWidth:10,borderWidth:1,BASE_CSS_ID_PREFIX:"bcBaseStyle_",INLINE_CSS_ID_PREFIX:"bcInlineStyle_",EXTERNAL_CSS_ID_PREFIX:"bcExternalStyle_",html:{nl:{content:"<p>Inhoud</p>"},"default":{content:"<p>Content</p>"}},init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this._variantId=this.context.getInteractionId(),this._viewEventThrown=!1,this._manuallyClosed=!1,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())+"frontend/src/",this.customCssUrls=[],this.customJsUrls=[],this.inlineCss=null,this.inlineJs=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this.isInEditMode=this.blueConicClient.isInEditMode(),this.clickTrigger=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){if(this.open){this.domUtils.removeNode(this._getToasterNode()),this._removeToasterStyling();var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1),this.open=!1}}))},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",i=/data-bc-preload="([^"]*)"/g,s=[];null!==(e=i.exec(t));)for(var o=e[1].split(","),n=0;n<o.length;n++)s.push(o[n]);return s||[]},onMessageReceived:function(e){this.blueConicClient.event.publish("toaster.messageReceived",e)},onSave:function(){return this._getNodeWithinToaster(".bcToasterContent")[0].innerHTML},onLoad:function(e){"function"!=typeof e&&(e=function(){}),window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,this.domUtils=window.bc.BlueConicDomUtilities;var t=this,i=this.getParameter("content"),s=i&&-1!==i.indexOf("bcToasterTemplate")?"_clean":"",o=this.getParameter("version"),n="";n=s||"3"!==o?"css/toaster"+s:"css/toaster_v3",n+=".css";var r=this.domUtils.createNodeFromHtml('<link type="text/css" id="'+this.BASE_CSS_ID_PREFIX+this._variantId+'" href="'+this.baseURL+n+'" rel="stylesheet" />'),a=this.getParameter("template");this.template=a,r.addEventListener("load",(function(){t.handleStyling(t.getParameter("close_icon"),t.getParameter("close_icon_hover"),(function(i){if(i&&(console.error(i.message),!t.isInEditMode))return t._removeUrls(),e(i.message);t.handleJavascript((function(i){return i&&(console.error(i.message),!t.isInEditMode)?(t._removeUrls(),e(i.message)):(t.loadToaster(),e())}))}))})),document.head.appendChild(r)},loadToaster:function(){var e=this.context.getParameters();if(!this.domUtils.nodeHasClassName(this._getToasterNode(),"bcToasterOpen")){this._getToasterNode()&&this.domUtils.removeNode(this._getToasterNode());var t=this.getParameter("close_icon");t&&(this._closeIcon=t);var i=this.getParameter("close_icon_hover");i&&(this._closeIconHover=i);var s=this;if(this._addContent(e,this.jQuery),this._getNodeWithinToaster(".bcClose")[0].addEventListener("click",(function(){s._manuallyClosed=!0,s._hideToaster()})),this.emptyElementsWithAttribute(this._getToasterNode(),"div","data-bc-external"),this.handleComplexElements(this._getToasterNode()),this.positionDivs(),this.isInEditMode)s._showToaster();else{var o=[],n=0,r=this.getParameter("triggerWhen");r?(n=100,o.push(this._convertWhenSettingPreviousToasterVersion(r))):(o=e.selected_when&&0!==e.selected_when.length?e.selected_when:["onPageLoad"],n=e.scroll_depth&&e.scroll_depth[0]&&!isNaN(e.scroll_depth[0])?parseInt(e.scroll_depth[0]):0);for(var a=this.getParameter("click_selector"),l=this.getParameter("content_condition"),c=0;c<o.length;c++)switch(o[c]){case"click_selector":this._addClickTriggerBindings(a);break;case"content_condition":this._addContentPolling(l);break;case"scroll_depth":this._addScrollBinding(n);break;case"triggerOn":this._addScrollOn(s);break;default:s._checkDelayBeforeTrigger()}this._setupFrontEndBindings()}}},_setupFrontEndBindings:function(){var e=this,t=document.querySelectorAll(".bcToasterDontShowAgainLink"),i=document.querySelectorAll(".bcToasterCloseButton");if(t.length>0){var linksClickHandler=function(e){e.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this._hideToaster()};Array.prototype.forEach.call(t,(function(t){t.removeEventListener("click",linksClickHandler),t.addEventListener("click",linksClickHandler.bind(e))}))}if(i.length>0){var buttonClickHandler=function(){e._hideToaster()};Array.prototype.forEach.call(i,(function(t){t.removeEventListener("click",buttonClickHandler),t.addEventListener("click",buttonClickHandler.bind(e))}))}this._addCloseEventHandler()},_convertWhenSettingPreviousToasterVersion:function(e){switch(e){case"scroll":return"triggerOn";case"reachedBottom":return"scroll_depth";default:return"onPageLoad"}},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(e,t){t instanceof Array&&t[0]===this.context.getInteractionId()&&this._hideToaster()}))},_addScrollOn:function(e){window.addEventListener("scroll",(function(){e._checkDelayBeforeTrigger()}))},_checkScrollCondition:function(e){this.jQuery(window).scrollTop()/(this.jQuery(document).height()-window.innerHeight)*100>=e&&this._checkDelayBeforeTrigger()},_addScrollBinding:function(e){this._checkScrollCondition(e);window.addEventListener("scroll",function(){this._checkScrollCondition(e)}.bind(this))},_addClickTriggerBindings:function(e){try{var t=this.jQuery(e);if(this.clickTrigger=!0,t.length>0){t.off("click").on("click",function(){this._getToasterNode()?this._checkDelayBeforeTrigger(!0):this.open||this._setupToasterBeforeToShow()}.bind(this))}else this.blueConicClient.position.subscribe(e,this,this._addClickTriggerBindings.bind(this,e))}catch(i){}},_setupToasterBeforeToShow:function(){this.handleStyling(this.getParameter("close_icon"),this.getParameter("close_icon_hover"),(function(){})),this.handleJavascript((function(){})),this._addContent(null,this.jQuery);var e=this;Array.prototype.forEach.call(this._getNodeWithinToaster(".bcClose"),(function(t){t.addEventListener("click",(function(){e._hideToaster()}))})),this.clickTrigger=!0,this._checkDelayBeforeTrigger()},_getNodeWithinToaster:function(e){try{var t=this._getToasterNode();if(t)return t.querySelectorAll(e)}catch(i){return void console.error(i)}},_isToasterContentWidthZero:function(){return 0===parseFloat(getComputedStyle(this._getNodeWithinToaster(".bcToasterContent")[0],null).width.replace("px",""))},_getToasterNode:function(){try{return document.getElementById(this._variantId)}catch(e){return void console.error(e)}},_addContentPolling:function(e){this._checkContentCondition(e);var t=this,i=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){t._observeContentChanges(e)})),this._observer.observe(i,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){t._observeContentChanges(e)},i.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var s=setInterval((function(){t.open?clearInterval(s):t._checkContentCondition(e)}),500)},_observeContentChanges:function(e){if(this.open){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var t=this,i=(new Date).getTime();this._timestamp=i,setTimeout((function(){t._timestamp!==i||t.open||t._checkContentCondition(e)}),250)}},_checkContentCondition:function(e){var t=this.jQuery(e);t.length>0&&t.html()&&t.html().length>0&&this._checkDelayBeforeTrigger()},_addContent:function(e,t){var i=this.getParameter("content");if(i&&-1!==i.indexOf("<body></body>")&&(i=""),!i){var s="nl"===this.context.getLocale()?"nl":"default";i=this.html[s].content}var o=t(i=this.template?'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent bcTemplateContent">'+i+"</div></div>":'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent">'+i+"</div></div>"),n=this.getParameter("close_icon");"true"===this.getParameter("custom_close")&&n?this.domUtils.removeClassNames(o.get(0),["bcDefaultClose"]):this.domUtils.appendClassNames(o.get(0),["bcDefaultClose"]);try{o.appendTo(t("body"))}catch(r){this.isInEditMode&&console.error("Error caught: "+r)}},handleComplexElements:function(e){for(var t=this.getElementsWithAttribute(e,"div","data-bc-pluginid"),i=0;i<t.length;i++){var s=t[i],o=s.getAttribute("data-bc-pluginid"),n=s.getAttribute("data-bc-config");if(n)try{var r=n.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");n=this.blueConicClient.json.parse(r)}catch(a){n=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:n,node:s,interactionId:this.context.getInteractionId()}),this.isInEditMode||(s.removeAttribute("data-bc-pluginid"),s.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(e,t,i){for(var s=this.getElementsWithAttribute(e,t,i),o=0,n=s.length;o<n;o++){s[o].innerHTML=""}},getElementsWithAttribute:function(e,t,i){for(var s=[],o=e.getElementsByTagName(t),n=0,r=o.length;n<r;n++){var a=o[n];a.getAttribute(i)&&s.push(a)}return s},_positionFromPerpendicularEdge:function(){var e=this.getParameter("location")||"right",t=this.getParameter("pixelsFrom")?this.getParameter("pixelsFrom"):"",i=this.getParameter("locationFrom")?this.getParameter("locationFrom"):"left_or_top";if(this.getParameter("locationFrom")||this.getParameter("version")||(i="right_or_bottom"),t||0===t){var s="left"===e||"right"===e?"left_or_top"===i?"top":"bottom":"left_or_top"===i?"left":"right";this._getToasterNode().style[s]=t+"px"}else{var o=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect();if("left"===e||"right"===e){var n=window.innerHeight||document.documentElement.clientHeight,r=o.height||o.bottom-o.top;this._getToasterNode().style.top=Math.max((n-r)/2,0)+"px"}else{var a=window.innerWidth||document.documentElement.clientWidth,l=o.width||o.right-o.left;this._getToasterNode().style.left=Math.max((a-l)/2,0)+"px"}}this._getToasterNode().style[e]="0px"},positionDivs:function(){var e=this.getParameter("location")||"right",t=this._getShowClose();this._positionFromPerpendicularEdge(),"left"===e?(this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcTop","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcLeft"])):"right"===e?(this.domUtils.removeClassNames(this._getToasterNode(),["bcLeft","bcTop","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcRight"])):"top"===e?(this._getNodeWithinToaster(".bcToasterContent")[0].insertAdjacentElement("afterend",document.querySelector(".bcToaster .bcCloseWrapper")),this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcLeft","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcTop"])):(this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcLeft","bcTop"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcBottom"])),t?this.domUtils.appendClassNames(this._getToasterNode(),["bcShowClose"]):this.domUtils.removeClassNames(this._getToasterNode(),["bcShowClose"])},handleStyling:function(e,t,i){var s="",o=[];if(this._getShowClose()?this.domUtils.appendClassNames(this._getToasterNode(),["bcShowClose"]):this.domUtils.removeClassNames(this._getToasterNode(),["bcShowClose"]),"true"===this.getParameter("custom_close")&&e){this.domUtils.removeClassNames(this._getToasterNode(),["bcDefaultClose"]),s+=".bcToaster .bcClose > div { background-image: none;}";var n=".bcToaster .bcClose {background-image: url('"+e+"');background-repeat: no-repeat;background-color: transparent;",r=".bcToaster .bcClose:hover {background-image: url('"+t+"');";"3"===this.getParameter("version")?(s+=n+"background-position: center center;background-size: contain;}",t&&(s+=r+"}")):(s+=n+"}",t?s+=r+"background-position: 0px 0px;}":document.querySelectorAll(".bcToaster .bcClose:hover")[0].style.backgroundPosition="")}else this.domUtils.appendClassNames(this._getToasterNode(),["bcDefaultClose"]);var a=this.getParameter("close_position"),l=this.getParameter("close_padding");s+=this._addClosePositionStyling(a,l);var c=this.getParameter("styling_css");c&&(this.stylingUrl=c,this.customCssUrls.push(c),o.push(c));var h=this.getParameter("styling_css_inline");h&&(s+=h.replace(/&#xd;/gi,"")),s&&(this.inlineCss=this.domUtils.createNodeFromHtml("<style id='"+this.INLINE_CSS_ID_PREFIX+this._variantId+"'>"+s+"</style>"),document.head.appendChild(this.inlineCss)),this._loadCss(o,i)},_loadCss:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('link[href="'+e+'"]'))urlLoaded();else{var t=document.createElement("link");t.setAttribute("href",e),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_loadJs:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('script[src="'+e+'"]'))urlLoaded();else{var t=document.createElement("script");t.setAttribute("src",e),t.setAttribute("type","text/javascript"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_removeUrls:function(){var e=this;this.customCssUrls.forEach((function(t){t&&e.domUtils.removeNode(document.querySelector('link[href="'+t+'"]'))})),this.customJsUrls.forEach((function(t){t&&e.domUtils.removeNode(document.querySelector('script[src="'+t+'"]'))}))},handleJavascript:function(e){var t=this.getParameters("javascript_urls");this.customJsUrls=t,null===this.customJsUrls&&(this.customJsUrls=[]),this._loadJs(this.customJsUrls,e)},_getShowClose:function(){var e=!1,t=this.getParameter("show_close");return"true"===t||"false"===t||!0===t||!1===t?"true"===t||!0===t:(e=!!this.getParameter("close")&&"showClose"===this.getParameter("close"),this.getParameter("showClose")&&(e=!0),e)},_hideToaster:function(){if(!this.isInEditMode){var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1);var t="true"===this.getParameter("hide_after_close"),i=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect(),s=this.getParameter("location")||"right",o=this._getShowClose(),n="left"===s||"right"===s?i.width:i.height;this._setToasterEffect(!0,o,n),t&&this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),window.setTimeout(function(){this._removeToasterStyling(),this.domUtils.removeClassNames(this._getToasterNode(),["bcDefaultClose"]),this.clickTrigger&&(this.open=!1)}.bind(this),501)}},_removeToasterStyling:function(){this.domUtils.removeNode(this._getBaseCssReference()),this.domUtils.removeNode(this._getInlineCssReference()),this._externalStylesheetReference&&this.domUtils.removeNode(this._externalStylesheetReference)},_getBaseCssReference:function(){return document.querySelector("#"+this.BASE_CSS_ID_PREFIX+this._variantId)},_getInlineCssReference:function(){return document.querySelector("#"+this.INLINE_CSS_ID_PREFIX+this._variantId)},_checkDelayBeforeTrigger:function(e){var t=this.context.getParameters(),i=t.delay&&t.delay[0]&&!isNaN(t.delay[0])?1e3*parseInt(t.delay[0]):0;if(i>0){window.setTimeout(function(){this._showToaster(e)}.bind(this),i)}else this._showToaster(e)},_showToaster:function(e){var t=this;if(!this._manuallyClosed||this.isInEditMode||e){if(this._getNodeWithinToaster(".bcToasterContent")&&this._isToasterContentWidthZero()&&!e){if(this.nrOfTries>10)return;return this.nrOfTries++,void setTimeout((function(){t._showToaster(e)}),500)}if(!this.open){if(-1!==this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId()))return;this.blueConicClient._renderedInteractions.push(this.context.getInteractionId()),this.isInEditMode||this._viewEventThrown||(this._viewEventThrown=!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var i=this._getShowClose();this.positionDivs(),this._getToasterNode().style.visibility="visible",this._getToasterNode().style.display="block",this.domUtils.appendClassNames(this._getToasterNode(),["bcToasterOpen"]);window.addEventListener("resize",function(){this.positionDivs()}.bind(this));var s=this.getParameter("click_event_selector");if(s){this.jQuery("body").one("click",s,function(e){this.lastClickEvent&&this.lastClickEvent.originalEvent===e.originalEvent||this._logClickEvent(e)}.bind(this));try{this.jQuery(s).one("click",function(e){this.lastClickEvent=e,this._logClickEvent(e)}.bind(this))}catch(r){}}this._setToasterEffect(!1,i);var o=t.getParameter("javascript");if(this.inlineJs=o,o&&!t.isInEditMode){o=o.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+t.context.getInteractionId()+'"$2');var n=this.domUtils.createNodeFromHtml("<script>"+o+"<\/script>");try{this.jQuery("body").append(n)}catch(a){console.error(a)}}this.open=!0,this.isInEditMode&&this.blueConicClient.event.publish("toaster.interactionLoaded",{interaction:this})}}},_logClickEvent:function(e){e&&e.originalEvent&&e.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(e&&e.target&&e.target.pathname&&e.target.hostname&&0===e.target.pathname.indexOf("/s/")&&-1!==e.target.hostname.indexOf("blueconic")||(e.originalEvent&&(e.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setToasterEffect:function(e,t,i){var s={},o=this.getParameter("location")||"right",n=t?this.closeButtonWidth+this.borderWidth:this.borderWidth,r=this.getParameter("effect");r||this.getParameter("version")||(r="slideIn");var a=this.getParameter("effect_slide_direction")||"left";s[o]="-"+(i+n)+"px";var l=r+"_"+a===this._effect;this.isInEditMode&&l&&(r="noEffect");var c=this;if(r&&"noEffect"!==r){var h=this.jQuery(this._getToasterNode());if("fadeIn"!==r||e)if("fadeIn"===r&&e)h.fadeOut(500);else if("slideIn"!==r||e)"slideIn"===r&&e&&h.animate(s,500,(function(){c._getToasterNode().style.display="none"}));else{s[o]="0px";var d=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect(),u="left"===o||"right"===o?d.width:d.height;this._getToasterNode().style[o]="-"+(u+n)+"px",h.animate(s,500,(function(){c.domUtils.appendClassNames(c._getToasterNode(),["bcToasterOpen"])}))}else h.hide(),h.fadeIn(500,(function(){c.domUtils.appendClassNames(c._getToasterNode(),["bcToasterOpen"])}))}else e&&(this._getToasterNode().style.display="none")},_addClosePositionStyling:function(e,t){var i="3"===this.getParameter("version");if(!e||!i)return"";null!==t&&"NaN"!==t||(t="5");var s=".bcToaster .bcClose {";switch(e){case"TOP_LEFT":s+="top:"+t+"px; right: unset; bottom: unset; left:"+t+"px;";break;case"BOTTOM_RIGHT":s+="top: unset; right: "+t+"px; bottom: "+t+"px; left: unset;";break;default:s+="top: "+t+"px; right: "+t+"px; bottom: unset; left: unset;"}return s+="}"},getParameter:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getParameters:function(e){return this.parameters[e]||null}});var a = [];var i='toaster';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/frontend/src/node_modules/@blueconic/dom_utils/src/index.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,profile:null,parameters:null,objectName:null,DEFAULT_TRACKER_NAME:"ga",DEFAULT_EVENT_NAME:"BlueConic",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",PF_PROPERTY_PREFIX:"uapf",_LAST_PUSH_PROPERTY:null,_VARIABLE_STATE_PUSH_PROPERTY:null,_goalParams:null,_preloadProperties:null,_hasSynchronized:!1,_visitorSegmentIds:[],init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),this.parameters=this._migrateParameters(this.parameters),this.objectName=this.parameters.trackerName&&this.parameters.trackerName[0]||this.DEFAULT_TRACKER_NAME,this._visitorSegmentIds=this._getVisitorSegmentIds(),this._goalParams=this._parseGoalParams(this.parameters.goalParameters),this._fillPreloadProperties()},_getVisitorSegmentIds:function(){return this.blueConicClient.getSegments().map((function(e){return e.id}))||[]},_parseGoalParams:function(e){return e.map((function(e){return e&&this.blueConicClient.json.parse(e)}),this).filter((function(e){return e&&e.active&&e.parameters})).map((function(e){return e.parameters.id=e.id,e.parameters.exportMapping=this._parseExportMapping(e.parameters.exportMapping),e.parameters}),this)},_parseExportMapping:function(e){return(e&&this.blueConicClient.json.parse(e[0])||[]).filter((function(e){return this._isValidExportMapping(e)}),this)},_isValidExportMapping:function(e){var t=e&&e.from&&e.to&&e.to.values&&e.to.values[0]&&e.to.values[0].id&&("property"!==e.from.typeId||e.from.values&&e.from.values[0]&&e.from.values[0].id);return Boolean(t)},_fillPreloadProperties:function(){this._preloadProperties=[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY],this._goalParams.forEach((function(e){this._preloadProperties.push(this._LAST_PUSH_PROPERTY+"_"+e.id),this._preloadProperties.push(this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id),e.exportMapping.forEach((function(e){var t=e.from&&"property"===e.from.typeId&&e.from.values&&e.from.values[0]&&e.from.values[0].id;t&&-1===this._preloadProperties.indexOf(t)&&this._preloadProperties.push(e.from.values[0].id)}),this)}),this)},getPreloadProperties:function(){return this._preloadProperties},onLoad:function(){this.bcConnectionUtil.md5Lib=window.md5;var e=this,t=0;(function tagReady(){if(window[e.objectName])e._handleGoals();else{if(t>20)return;t++,window.setTimeout(tagReady,250)}}).call(this)},_handleGoals:function(){this._goalParams.forEach((function(e){this._isSegmentValid(e.exportSegment)&&this._applyGoal(e)}),this)},_isSegmentValid:function(e){var t=!e||0===e.length,i=e&&e[0]&&-1!==this._visitorSegmentIds.indexOf(e[0]);return t||i},_applyGoal:function(e){var t=this._createConnectionContext(e);this._pushProfileValues(e,t),e.triggerEvent&&e.triggerEvent[0]&&this.blueConicClient.event.subscribe(e.triggerEvent[0],this,(function(){this._doPush(e,t)}));var i=this._getEventNameForGoal(e),n=this._getTrackerNameForGoal(e);e.push_interactions&&"true"===e.push_interactions[0]&&this._subscribeToInteractionViews(n,i),e.passOnEvents&&"true"===e.passOnEvents[0]&&this._subscribeToPassOnEvents(n,i)},_pushProfileValues:function(e,t){this.bcConnectionUtil.doPush(t)?this._doPush(e,t):"plc"===t.push_frequency&&this.blueConicClient.event.subscribe(this.blueConicClient.event.onProfilePermissionChange,this,(function(){this._doPush(e,t)}))},_doPush:function(e,t){var i=e.exportMapping;if(0===i.length)return!1;var n={nonInteraction:1,userId:this.profile.getId()},s=!1;if(i.forEach((function(e){var i=this.bcConnectionUtil.getVariableValue(e.from,t,!0);i&&(n[e.to.values[0].id]=i.join(","),s=!0)}),this),s){var r=this._getEventNameForGoal(e),o=this._getTrackerNameForGoal(e);this._pushUA(o,r,"Profile",n)}return s},_createConnectionContext:function(e){var t={LAST_PUSH_PROPERTY:this._LAST_PUSH_PROPERTY+"_"+e.id,VARIABLE_STATE_PUSH_PROPERTY:this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id,profile:this.profile,push_frequency:e.push_frequency&&e.push_frequency[0]?e.push_frequency[0]:null,variables:i,SENT_TO_SYSTEM_PROPERTY:this.SENT_TO_SYSTEM_PROPERTY,SENT_TO_CONNECTION_PROPERTY:this.SENT_TO_CONNECTION_PROPERTY},i=[];return e.exportMapping.forEach((function(e){var n=e.from;this.bcConnectionUtil.getVariableValue(n,t)&&(n.key=e.to.values[0].id,i.push(n))})),t.variables=i,t},_getEventNameForGoal:function(e){return e.eventname&&e.eventname[0]||this.DEFAULT_EVENT_NAME},_getTrackerNameForGoal:function(e){return e.trackerName&&e.trackerName[0]?e.trackerName[0]+".":""},_subscribeToInteractionViews:function(e,t){this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionViews.bind(this,e,t))},_pushUA:function(e,t,i,n,s){window[this.objectName](e+"send","event",t,i,n,s),this._syncProperties()},_pushInteractionViews:function(e,t){this.blueConicClient.getInteractions().map((function(e){return e.variantName?e.name+" / "+e.variantName:e.name})).forEach((function(i){this._pushUA(e,t,"Interaction View",i,{nonInteraction:1,userId:this.profile.getId()})}),this)},_subscribeToPassOnEvents:function(e,t){this.blueConicClient.event.subscribe("inactivity",this,this.onEventPublished.bind(this,e,t,"Inactivity")),this.blueConicClient.event.subscribe("exitintent",this,this.onEventPublished.bind(this,e,t,"Exit Intent")),this.blueConicClient.event.subscribe("cm_firstview",this,this.onEventPublished.bind(this,e,t,"Content Meter View 1")),this.blueConicClient.event.subscribe("cm_exceeded",this,this.onEventPublished.bind(this,e,t,"Content Meter View Content Meter Exceeded"));for(var i=2;i<10;i++)this.blueConicClient.event.subscribe("cm_view_"+i,this,(function(i){var n=i.split("_")[2];this.onEventPublished(e,t,"Content Meter View "+n)}))},onEventPublished:function(e,t,i){var n={nonInteraction:1,userId:this.profile.getId()};this._pushUA(e,t,i,n)},_syncProperties:function(){this._hasSynchronized||(this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY]),this._hasSynchronized=!0)},_migrateParameters:function(e){return e.goalParameters?e:this._migrateToV2(e)},_migrateToV2:function(e){var getValue=function(t,i){return e[t]||i},t=[],i=getValue("dimensions");(i&&i[0]?JSON.parse(i[0]):[]).forEach((function(e){var i={id:e.id,from:{type:"pm"===e.type?"permission":e.type,property:e.property,segments:e.segments,fieldLabel:"text"===e.type?e.text:undefined,fieldId:e.text},to:{type:"text",fieldLabel:"Dimension "+e.index,fieldId:"dimension"+e.index},mergeRule:"set"};t.push(i)}));var n=getValue("profileproperties"),s={exportSegment:[""],exportMapping:[this.blueConicClient.json.stringify(t)],properties_out:Array.isArray(n)?n:[n],segments:[],push_frequency:getValue("push_frequency")||[""],triggerEvent:getValue("triggerEvent")||[""],eventname:[this.DEFAULT_EVENT_NAME],push_interactions:["true"],passOnEvents:["false"],saved:["true"]};return{trackerName:[getValue("custom_tracker")||this.DEFAULT_TRACKER_NAME],goalParameters:[JSON.stringify({id:"1",type:"export",name:"Export data into Universal Analytics",active:!0,parameters:s})]}}});var a = [];var i='uaconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/'}]);})();})(blueConicClient);