MORE ABOUT SARAH

Sarah is a second generation homeschooling mom. Originally from Michigan, she now lives with her husband Jay and 5 kids in Florida. They love staying active as a family and going on trips in their renovated RV. Sarah loves to sing, make pretty things and eat pizza.

COPYRIGHT & DISCLOSURE

All content on this site is copyright Sarah Lemp. Many of my posts contain affiliate links. If you click on an affiliate link and buy something, I may receive a small commission. Read more on my DISCLOSURE PAGE.

Copyright © 2024 · All Things with Purpose · All Rights Reserved · Powered by Mai Theme

'),a.insertAdjacentHTML(d,e));return document.getElementById(b)};c.prototype._repeatDynamicAds=function(a){var b= [],d=this._removeRecipeCapExperiment.result&&"Recipe"===a.location?99:this.locationMaxLazySequence.get(a.location),e=a.lazy?u(d,0):0;d=a.max;var f=a.lazyMax;e=Math.max(d,0===e&&a.lazy?d+f:Math.min(Math.max(e-a.sequence+1,0),d+f));for(f=0;f=d;b.push(y(y({},a),{sequence:g,lazy:h}))}return b};c.prototype._locationEnabled=function(a){a=this._clsOptions.enabledLocations.includes(a.location);var b=this._clsOptions.disableAds&&this._clsOptions.disableAds.all|| document.body.classList.contains("adthrive-disable-all"),d=!document.body.classList.contains("adthrive-disable-content")&&!this._clsOptions.disableAds.reasons.has("content_plugin");return a&&!b&&d};return c}(),db=function(c){function a(b,d){var e=c.call(this,b,"ClsVideoInsertion")||this;e._videoConfig=b;e._clsOptions=d;e._IN_POST_SELECTOR=".adthrive-video-player";e._WRAPPER_BAR_HEIGHT=36;e._playersAddedFromPlugin=[];d.removeVideoTitleWrapper&&(e._WRAPPER_BAR_HEIGHT=0);return e}v(a,c);a.prototype.init= function(){this._initializePlayers()};a.prototype._wrapJWPlayerWithCLS=function(b,d,e){void 0===e&&(e=0);return b.parentNode?(d=this._createGenericCLSWrapper(.5625*b.offsetWidth,d,e),b.parentNode.insertBefore(d,b),d.appendChild(b),d):null};a.prototype._createGenericCLSWrapper=function(b,d,e){var f=document.createElement("div");f.id="cls-video-container-".concat(d);f.className="adthrive";f.style.minHeight="".concat(b+e,"px");return f};a.prototype._getTitleHeight=function(b){b.innerText="Title";b.style.visibility= "hidden";document.body.appendChild(b);var d=window.getComputedStyle(b),e=parseInt(d.height,10),f=parseInt(d.marginTop,10);d=parseInt(d.marginBottom,10);document.body.removeChild(b);return Math.min(e+d+f,50)};a.prototype._initializePlayers=function(){var b=document.querySelectorAll(this._IN_POST_SELECTOR);b.length&&this._initializeRelatedPlayers(b);this._shouldRunAutoplayPlayers()&&this._determineAutoplayPlayers()};a.prototype._createStationaryRelatedPlayer=function(b,d,e){var f="mobile"===this._device? [400,225]:[640,360],g=G.Video_In_Post_ClicktoPlay_SoundOn;d&&b.mediaOrPlaylistId&&(e="".concat(b.mediaOrPlaylistId,"_").concat(e),d=this._wrapJWPlayerWithCLS(d,e),this._playersAddedFromPlugin.push(b.mediaOrPlaylistId),d&&this._clsOptions.setInjectedVideoSlots({playerId:b.playerId,playerName:g,playerSize:f,element:d,type:"stationaryRelated"}))};a.prototype._createStickyRelatedPlayer=function(b,d){var e="mobile"===this._device?[400,225]:[640,360],f=G.Video_Individual_Autoplay_SOff;this._stickyRelatedOnPage= !0;this._videoConfig.mobileStickyPlayerOnPage="mobile"===this._device;if(d&&b.position&&b.mediaId){var g=document.createElement("div");d.insertAdjacentElement(b.position,g);d=document.createElement("h3");d.style.margin="10px 0";d=this._getTitleHeight(d);d=this._wrapJWPlayerWithCLS(g,b.mediaId,this._WRAPPER_BAR_HEIGHT+d);this._playersAddedFromPlugin.push(b.mediaId);d&&this._clsOptions.setInjectedVideoSlots({playlistId:b.playlistId,playerId:b.playerId,playerSize:e,playerName:f,element:g,type:"stickyRelated"})}}; a.prototype._createPlaylistPlayer=function(b,d){var e=b.playlistId,f="mobile"===this._device?G.Video_Coll_SOff_Smartphone:G.Video_Collapse_Autoplay_SoundOff,g="mobile"===this._device?[400,225]:[640,360];this._videoConfig.mobileStickyPlayerOnPage=!0;var h=document.createElement("div");d.insertAdjacentElement(b.position,h);d=this._wrapJWPlayerWithCLS(h,e,this._WRAPPER_BAR_HEIGHT);this._playersAddedFromPlugin.push("playlist-".concat(e));d&&this._clsOptions.setInjectedVideoSlots({playlistId:b.playlistId, playerId:b.playerId,playerSize:g,playerName:f,element:h,type:"stickyPlaylist"})};a.prototype._isVideoAllowedOnPage=function(){var b=this._clsOptions.disableAds;if(b&&b.video){var d="";b.reasons.has("video_tag")?d="video tag":b.reasons.has("video_plugin")?d="video plugin":b.reasons.has("video_page")&&(d="command queue");q.error(d?"ClsVideoInsertionMigrated":"ClsVideoInsertion","isVideoAllowedOnPage",Error("DBP: Disabled by publisher via ".concat(d||"other")));return!1}return this._clsOptions.videoDisabledFromPlugin? !1:!0};return a}(function(c){function a(b,d){var e=c.call(this)||this;e._videoConfig=b;e._component=d;e._stickyRelatedOnPage=!1;e._relatedMediaIds=[];e._device=ta()?"desktop":"mobile";e._potentialPlayerMap=e.setPotentialPlayersMap();return e}v(a,c);a.prototype.setPotentialPlayersMap=function(){var b=this._videoConfig.players||[],d=this._filterPlayerMap();b=b.filter(function(e){return"stationaryRelated"===e.type&&e.enabled});d.stationaryRelated=b;return this._potentialPlayerMap=d};a.prototype._filterPlayerMap= function(){var b=this,d=this._videoConfig.players,e={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return d&&d.length?d.filter(function(f){var g;return null===(g=f.devices)||void 0===g?void 0:g.includes(b._device)}).reduce(function(f,g){f[g.type]||(q.event(b._component,"constructor","Unknown Video Player Type detected",g.type),f[g.type]=[]);g.enabled&&f[g.type].push(g);return f},e):e};a.prototype._checkPlayerSelectorOnPage=function(b){var d=this;b=this._potentialPlayerMap[b].map(function(e){return{player:e, playerElement:d._getPlacementElement(e)}});return b.length?b[0]:{player:null,playerElement:null}};a.prototype._getOverrideElement=function(b,d,e){b&&d?(e=document.createElement("div"),d.insertAdjacentElement(b.position,e)):(d=this._checkPlayerSelectorOnPage("stickyPlaylist"),b=d.player,d=d.playerElement,b&&d&&(e=document.createElement("div"),d.insertAdjacentElement(b.position,e)));return e};a.prototype._shouldOverrideElement=function(b){b=b.getAttribute("override-embed");return"true"===b||"false"=== b?"true"===b:this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.overrideEmbedLocation:!1};a.prototype._checkPageSelector=function(b,d,e){void 0===e&&(e=[]);return b&&d&&0===e.length?("/"!==window.location.pathname&&q.event("VideoUtils","getPlacementElement",Error("PSNF: ".concat(b," does not exist on the page"))),!1):!0};a.prototype._getElementSelector=function(b,d,e){if(d&&d.length>e)return d[e];q.event("VideoUtils","getPlacementElement",Error("ESNF: ".concat(b," does not exist on the page"))); return null};a.prototype._getPlacementElement=function(b){var d=b.pageSelector,e=b.elementSelector;b=b.skip;var f=ea(d),g=f.valid,h=f.elements;f=S(f,["valid","elements"]);var k=da(e),l=k.valid,p=k.elements;k=S(k,["valid","elements"]);return""===d||g?l?this._checkPageSelector(d,g,h)?this._getElementSelector(e,p,b)||null:null:(q.error("VideoUtils","getPlacementElement",Error("".concat(e," is not a valid selector")),k),null):(q.error("VideoUtils","getPlacementElement",Error("".concat(d," is not a valid selector")), f),null)};a.prototype._getEmbeddedPlayerType=function(b){(b=b.getAttribute("data-player-type"))&&"default"!==b||(b=this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.defaultPlayerType:"static");this._stickyRelatedOnPage&&(b="static");return b};a.prototype._getMediaId=function(b){return(b=b.getAttribute("data-video-id"))?(this._relatedMediaIds.push(b),b):!1};a.prototype._createRelatedPlayer=function(b,d,e,f){"collapse"===d?this._createCollapsePlayer(b,e):"static"===d&&this._createStaticPlayer(b, e,f)};a.prototype._createCollapsePlayer=function(b,d){var e=this._checkPlayerSelectorOnPage("stickyRelated"),f=e.player;e=e.playerElement;var g=f?f:this._potentialPlayerMap.stationaryRelated[0];g&&g.playerId?(this._shouldOverrideElement(d)&&(d=this._getOverrideElement(f,e,d)),d=document.querySelector("#cls-video-container-".concat(b," > div"))||d,this._createStickyRelatedPlayer(y(y({},g),{mediaId:b}),d)):q.error(this._component,"_createCollapsePlayer","No video player found")};a.prototype._createStaticPlayer= function(b,d,e){this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId?this._createStationaryRelatedPlayer(y(y({},this._potentialPlayerMap.stationaryRelated[0]),{mediaOrPlaylistId:b}),d,e):q.error(this._component,"_createStaticPlayer","No video player found")};a.prototype._shouldRunAutoplayPlayers=function(){return this._isVideoAllowedOnPage()&&(this._potentialPlayerMap.stickyRelated.length||this._potentialPlayerMap.stickyPlaylist.length)?!0:!1}; a.prototype._determineAutoplayPlayers=function(){var b=this._component,d="VideoManagerComponent"===b,e=this._config;if(this._stickyRelatedOnPage)q.event(b,"stickyRelatedOnPage",d&&{device:e&&e.context.device,isDesktop:this._device}||{});else{var f=this._checkPlayerSelectorOnPage("stickyPlaylist"),g=f.player;f=f.playerElement;g&&g.playerId&&g.playlistId&&f?this._createPlaylistPlayer(g,f):q.event(b,"noStickyPlaylist",d&&{vendor:"none",device:e&&e.context.device,isDesktop:this._device}||{})}};a.prototype._initializeRelatedPlayers= function(b){for(var d=new Map,e=0;e