/*! This file is auto-generated */ !function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.7",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},qn=Pn(r),r=Pn(An(r)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,t,r,e,u){return e instanceof t?(e=En(n.prototype),o(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,o){function i(){for(var n=0,t=o.length,r=Array(t),e=0;e= self.timeLimit ); } ) ); }, onTick: function() { var idsOverLimit, self = this; if ( ! this.isViewportActive ) { return; } _.each( this.idsVisible, function( elementId ) { if ( 'undefined' === typeof self.idsViewTime[ elementId ] ) { self.idsViewTime[ elementId ] = 0; } self.idsViewTime[ elementId ] += 1; } ); idsOverLimit = this.idsOverLimit(); if ( idsOverLimit.length ) { _.each( idsOverLimit, function( elementId ) { self.idsViewTime[ elementId ] = 0; } ); this.onLimitCallback( idsOverLimit ); } }, onIntersecting: function( entries ) { let self = this; _.each( entries, function( entry ) { if ( entry.isIntersecting && entry.intersectionRatio >= 0.5 ) { if ( -1 === self.idsVisible.indexOf( entry.target.id ) ) { self.idsVisible.push( entry.target.id ); } } else { self.idsVisible = _.without( self.idsVisible, entry.target.id ); } } ); } }; ; /* global ioneAdsConfig, ioneViewTimeTracker */ ( function () { /** * Asynchronously load a script by url. * * @param {string} url Url to load. */ const loadScript = function ( url ) { const script = document.createElement( 'script' ); script.src = url; script.type = 'text/javascript'; script.async = true; document.body.appendChild( script ); }; /** * Amazon A9 bootstrap. */ const loadAPS = function () { ! function (a9, a, p, s, t, A, g) {if (a[a9]) return;function q(c, r) {a[a9]._Q.push([c, r])}a[a9] = {init: function () {q("i", arguments)},fetchBids: function () {q("f", arguments)},setDisplayBids: function () {},targetingKeys: function () {return []},_Q: []};A = p.createElement(s);A.async = !0;A.src = t;g = p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A, g)}("apstag", window, document, "script", "//c.amazon-adsystem.com/aax2/apstag.js"); }; /** * OpenWrap bootstrap. */ const loadPWT = function () { const purl = window.location.href; const url = '//ads.pubmatic.com/AdServer/js/pwt/161483/7379'; let profileVersionId = ''; if ( purl.indexOf( 'pwtv=' ) > 0 ) { const regexp = /pwtv=(.*?)(&|$)/g; const matches = regexp.exec( purl ); if ( matches.length >= 2 && matches[ 1 ].length > 0 ) { profileVersionId = '/' + matches[ 1 ]; } } const wtads = document.createElement( 'script' ); wtads.async = true; wtads.type = 'text/javascript'; wtads.src = url + profileVersionId + '/pwt.js'; const node = document.getElementsByTagName( 'script' )[ 0 ]; node.parentNode.insertBefore( wtads, node ); }; const timeout = setTimeout( () => { loadScript( 'https://securepubads.g.doubleclick.net/tag/js/gpt.js', true ); window.PWT = null; }, 500 ); window.PWT = { jsLoaded() { clearTimeout( timeout ); loadScript( 'https://securepubads.g.doubleclick.net/tag/js/gpt.js', true ); }, }; loadPWT(); loadAPS(); } )(); var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var ioneAdLoader = { apstagHasInitialized: false, apsPromise: function ( slots ) { if ( this.getQueryVars().hasOwnProperty( 'disableaps' ) ) { console.log( 'A9 DISABLED' ); // eslint-disable-line return; } let self = this; if ( ! this.apstagHasInitialized ) { apstag.init( { pubID: 'f699d784-7fb8-4b13-8909-93bdd4636914', adServer: 'googletag' } ); this.apstagHasInitialized = true; } return new Promise( ( resolve, reject ) => { const a9Slots = []; slots.forEach( function ( item ) { var slot = { slotID: item.getSlotElementId(), slotName: item.getAdUnitPath(), pos: item.getTargeting( 'pos' ) }; var config = self.findConfigByPos( slot.pos ); // At this point, the config should exist. But let's test anyway. if ( null === config ) { return; } slot.sizes = self.isMobile() ? config.sizes.mobile : config.sizes.desktop; if ( slot.sizes.length > 0 ) { a9Slots.push( slot ); } } ); if ( a9Slots.length > 0 ) { apstag.fetchBids( { slots: a9Slots, timeout: 600 }, function ( bids ) { apstag.setDisplayBids(); resolve(); } ); } else { resolve(); } } ); }, /** * Calls bids from OpenWrap. * * @param {Slot[]} slots Array of GPT ad slots to fetch bids for. See https://developers.google.com/publisher-tag/reference#googletag.Slot. * @param {number} timeout Timeout before the request is skipped. * @return {Promise} An openwrap promise when bids are back. */ openWrapPromise: function ( slots, timeout = 2000 ) { if ( 'undefined' === typeof window.PWT ) { return false; } return new Promise( ( resolve ) => { const failSafe = setTimeout( () => { resolve(); }, timeout ); const PWT = window.PWT; PWT.requestBids( PWT.generateConfForGPT( slots ), function ( adUnitsArray ) { PWT.addKeyValuePairsToGPTSlots( adUnitsArray ); PWT.ow_BidsReceived = true; clearTimeout( failSafe ); resolve(); } ); } ); }, getQueryVars: function () { let string = window.location.href; const vars = {}; if ( string.search( /\?/i ) === -1 ) return []; // Store GET params as vars[] const hashes = string.slice( string.indexOf( '?' ) + 1 ).split( '&' ); for( var i = 0; i < hashes.length; i++ ) { const hash = hashes[ i ].split('='); vars[ hash[ 0 ] ] = hash[ 1 ]; } return vars; }, isMobile: function () { return window.innerWidth < ioneAdsConfig.desktopBreakPoint[ 0 ]; }, findConfigByPos: function ( pos ) { const ad = ioneAdsConfig.adConfig.filter( _ad => _ad.targeting.pos === pos ); if ( ad.length > 0 ) { return ad[ 0 ]; } return null; }, refreshAds: function ( slots ) { if ( slots && slots.length > 0 ) { Promise.all( [ this.apsPromise( slots ), this.openWrapPromise( slots ) ] ).then( () => { googletag.pubads().refresh( slots, { changeCorrelator: false } ); } ); } }, viewableTimeObserver: new ioneViewTimeTracker( parseInt( ioneAdsConfig.viewableRefreshInterval ), ( elementIds ) => { const adSlots = ioneAdLoader.adSlots.filter( ( adSlot ) => -1 !== elementIds.indexOf( adSlot.getSlotElementId() ) ); adSlots.forEach( ( adSlot ) => { adSlot.setTargeting( 'refresh', 'yes' ); } ); ioneAdLoader.refreshAds( adSlots ); } ), adSlots: [], init: function () { if ( this.getQueryVars().hasOwnProperty( 'disablegpt' ) ) { console.log( 'GPT DISABLED' ); // eslint-disable-line return; } const self = this; googletag.cmd.push( function () { if ( ! ioneAdsConfig.adConfig ) { console.error( 'ADS NOT CONFIGURED' ); // eslint-disable-line return; } for ( const key in ioneAdsConfig.targeting ) { googletag.pubads().setTargeting( key, ioneAdsConfig.targeting[ key ] ); } googletag.pubads().disableInitialLoad(); googletag.pubads().enableAsyncRendering(); googletag.pubads().enableSingleRequest(); googletag.enableServices(); const divs = document.querySelectorAll( 'div.ione-ad' ); divs.forEach( function ( div, index ) { let adUnit; if ( ! div.dataset.hasOwnProperty( 'pos' ) ) { return; } const config = self.findConfigByPos( div.dataset.pos ); if ( null === config ) { return; } div.id = 'ione-ad-' + index; if ( self.isMobile() ) { adUnit = ioneAdsConfig.baseMobileAdUnit; } else { adUnit = ioneAdsConfig.baseDesktopAdUnit; } if ( config.adUnit ) { adUnit = config.adUnit; } const thisMap = googletag.sizeMapping( ) .addSize( ioneAdsConfig.desktopBreakPoint, config.sizes.desktop ) .addSize( [ 0, 0 ], config.sizes.mobile ) .build(); const slot = googletag.defineSlot( adUnit, [ 1, 1 ], div.id ); slot.setCollapseEmptyDiv( true, false ).addService( googletag.pubads() ); for ( const key in config.targeting ) { slot.setTargeting( key, config.targeting[ key ] ); } slot.defineSizeMapping( thisMap ); self.adSlots.push( slot ); self.viewableTimeObserver.observe( div ); } ); self.refreshAds( self.adSlots ); if ( ! self.getQueryVars().hasOwnProperty( 'disablerefresh' ) && ioneAdsConfig.viewableRefreshInterval > 5 ) { self.viewableTimeObserver.init(); } else { console.log( 'AD REFRESH DISABLED' ); // eslint-disable-line } } ); console.log( `iOne ad network started. Version ${ ioneAdsConfig.pluginVersion }` ); // eslint-disable-line } }; ioneAdLoader.init(); ; /*! This file is auto-generated */ (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>P,addAction:()=>A,addFilter:()=>m,applyFilters:()=>w,applyFiltersAsync:()=>I,createHooks:()=>h,currentAction:()=>x,currentFilter:()=>T,defaultHooks:()=>f,didAction:()=>j,didFilter:()=>z,doAction:()=>g,doActionAsync:()=>k,doingAction:()=>O,doingFilter:()=>S,filters:()=>Z,hasAction:()=>_,hasFilter:()=>v,removeAction:()=>p,removeAllActions:()=>F,removeAllFilters:()=>b,removeFilter:()=>y});const n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const r=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const o=function(t,e){return function(o,i,s,c=10){const l=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:i};if(l[o]){const t=l[o].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}else l[o]={handlers:[a],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};const i=function(t,e,o=!1){return function(i,s){const c=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return 0;let l=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};const s=function(t,e){return function(n,r){const o=t[e];return void 0!==r?n in o&&o[n].handlers.some((t=>t.namespace===r)):n in o}};const c=function(t,e,n,r){return function(o,...i){const s=t[e];s[o]||(s[o]={handlers:[],runs:0}),s[o].runs++;const c=s[o].handlers;if(!c||!c.length)return n?i[0]:void 0;const l={name:o,currentIndex:0};return(r?async function(){try{s.__current.add(l);let t=n?i[0]:void 0;for(;l.currentIndex0:Array.from(r.__current).some((t=>t.name===n))}};const u=function(t,e){return function(n){const o=t[e];if(r(n))return o[n]&&o[n].runs?o[n].runs:0}};class d{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions",!1,!1),this.doActionAsync=c(this,"actions",!1,!0),this.applyFilters=c(this,"filters",!0,!1),this.applyFiltersAsync=c(this,"filters",!0,!0),this.currentAction=l(this,"actions"),this.currentFilter=l(this,"filters"),this.doingAction=a(this,"actions"),this.doingFilter=a(this,"filters"),this.didAction=u(this,"actions"),this.didFilter=u(this,"filters")}}const h=function(){return new d},f=h(),{addAction:A,addFilter:m,removeAction:p,removeFilter:y,hasAction:_,hasFilter:v,removeAllActions:F,removeAllFilters:b,doAction:g,doActionAsync:k,applyFilters:w,applyFiltersAsync:I,currentAction:x,currentFilter:T,doingAction:O,doingFilter:S,didAction:j,didFilter:z,actions:P,filters:Z}=f;(window.wp=window.wp||{}).hooks=e})();;